@ardennguyen/zalo-agent-cli 2.5.8 → 3.0.0
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/.env.example +23 -2
- package/DISCLAIMER.md +3 -3
- package/LICENSE +2 -3
- package/NOTICE +14 -34
- package/README.md +166 -72
- package/package.json +37 -19
- package/src/commands/account.js +369 -40
- package/src/commands/auto-reply.js +8 -25
- package/src/commands/bank.js +25 -6
- package/src/commands/catalog.js +54 -11
- package/src/commands/cloud.js +459 -0
- package/src/commands/conv.js +470 -287
- package/src/commands/db.js +442 -0
- package/src/commands/fleet.js +449 -41
- package/src/commands/friend.js +198 -45
- package/src/commands/group.js +256 -43
- package/src/commands/label.js +16 -2
- package/src/commands/listen.js +495 -122
- package/src/commands/login.js +313 -117
- package/src/commands/mcp-approver.js +103 -0
- package/src/commands/mcp-webhook.js +13 -5
- package/src/commands/mcp.js +800 -104
- package/src/commands/msg-media.js +187 -0
- package/src/commands/msg-search.js +219 -0
- package/src/commands/msg.js +414 -110
- package/src/commands/oa/calls.js +134 -0
- package/src/commands/oa/content.js +266 -0
- package/src/commands/oa/gmf.js +429 -0
- package/src/commands/oa/messages.js +355 -0
- package/src/commands/oa/users.js +502 -0
- package/src/commands/oa-init.js +122 -123
- package/src/commands/oa-listen.js +374 -150
- package/src/commands/oa.js +83 -598
- package/src/commands/policy.js +224 -0
- package/src/commands/poll.js +3 -0
- package/src/commands/presence.js +175 -0
- package/src/commands/profile.js +45 -94
- package/src/commands/quick-msg.js +26 -0
- package/src/commands/read.js +172 -0
- package/src/commands/reminder.js +34 -4
- package/src/commands/social.js +223 -0
- package/src/commands/sync.js +482 -158
- package/src/commands/write.js +85 -0
- package/src/commands/zbs.js +502 -0
- package/src/core/account-devices.js +76 -0
- package/src/core/account-state.js +167 -0
- package/src/core/account-status.js +355 -0
- package/src/core/accounts.js +11 -4
- package/src/core/admin-api.js +392 -0
- package/src/core/approval.js +271 -0
- package/src/core/auto-reply.js +27 -0
- package/src/core/bank-accounts.js +1 -1
- package/src/core/block-sharing.js +43 -0
- package/src/core/board-pass.js +94 -0
- package/src/core/cached-message.js +78 -8
- package/src/core/cloud-plan.js +285 -0
- package/src/core/cloud-verify.js +305 -0
- package/src/core/confirm-guard.js +808 -0
- package/src/core/contact-names.js +504 -0
- package/src/core/control-events.js +525 -0
- package/src/core/control-replay.js +106 -0
- package/src/core/conversation-actions.js +214 -0
- package/src/core/credentials.js +112 -11
- package/src/core/current-user-names.js +60 -26
- package/src/core/daemon-channel.js +296 -15
- package/src/core/daemon-health.js +110 -7
- package/src/core/daemon-presence.js +455 -0
- package/src/core/daemon-sync.js +58 -18
- package/src/core/data-export.js +610 -0
- package/src/core/db-tools.js +473 -0
- package/src/core/db.js +1327 -83
- package/src/core/deploy-policy.js +560 -0
- package/src/core/device-since.js +123 -0
- package/src/core/e2ee-notice.js +41 -0
- package/src/core/exit-codes.js +7 -0
- package/src/core/export-crypt.js +290 -0
- package/src/core/fleet-controller.js +340 -0
- package/src/core/fleet-purge.js +144 -0
- package/src/core/fleet-qr.js +273 -0
- package/src/core/fleet-serve.js +292 -0
- package/src/core/fleet-supervisor.js +176 -0
- package/src/core/fleet-templates.js +568 -39
- package/src/core/fleet.js +232 -20
- package/src/core/friend-requests.js +80 -16
- package/src/core/friend-search.js +1 -1
- package/src/core/group-admin.js +2 -29
- package/src/core/group-departure.js +233 -0
- package/src/core/group-exit.js +621 -0
- package/src/core/group-members.js +21 -9
- package/src/core/group-settings.js +5 -207
- package/src/core/hidden-chat-actions.js +96 -0
- package/src/core/hidden-chats.js +425 -0
- package/src/core/history-fetch.js +81 -27
- package/src/core/keystore/config.js +163 -0
- package/src/core/keystore/container.js +208 -0
- package/src/core/keystore/index.js +483 -0
- package/src/core/keystore/keyring.js +588 -0
- package/src/core/keystore/kms.js +157 -0
- package/src/core/keystore/media-seal.js +711 -0
- package/src/core/keystore/providers.js +492 -0
- package/src/core/keystore/stores.js +177 -0
- package/src/core/keystore/worker.js +80 -0
- package/src/core/kick-marker.js +61 -0
- package/src/core/last-online.js +236 -0
- package/src/core/list-all.js +280 -0
- package/src/core/listener-lifecycle.js +101 -10
- package/src/core/live-api.js +1 -1
- package/src/core/live-store.js +111 -53
- package/src/core/local-reads.js +16 -0
- package/src/core/logout.js +102 -140
- package/src/core/media-deliver.js +732 -0
- package/src/core/media-route.js +347 -0
- package/src/core/media-store.js +408 -0
- package/src/core/mutual-groups.js +94 -0
- package/src/core/name-refresh.js +135 -0
- package/src/core/oa/calls.js +212 -0
- package/src/core/oa/content.js +390 -0
- package/src/core/oa/gmf.js +537 -0
- package/src/core/oa/messages.js +470 -0
- package/src/core/oa/oauth.js +422 -0
- package/src/core/oa/transport.js +645 -0
- package/src/core/oa/users.js +694 -0
- package/src/core/oa-client.js +49 -415
- package/src/core/overflow-repair.js +221 -0
- package/src/core/policy-layer.js +55 -0
- package/src/core/policy-schema.js +401 -0
- package/src/core/policy-store.js +1058 -0
- package/src/core/presence-config.js +100 -0
- package/src/core/presence-leases.js +211 -0
- package/src/core/presence.js +688 -0
- package/src/core/profile-settings.js +243 -0
- package/src/core/qr-login-flow.js +237 -0
- package/src/core/read-state.js +145 -22
- package/src/core/receipts.js +355 -548
- package/src/core/recent-conversations.js +28 -6
- package/src/core/row-mac.js +405 -0
- package/src/core/search.js +271 -0
- package/src/core/secure-page.js +771 -0
- package/src/core/self-heal.js +493 -34
- package/src/core/session-expiry.js +103 -0
- package/src/core/session-notice.js +249 -0
- package/src/core/social/client.js +296 -0
- package/src/core/social/dpop.js +54 -0
- package/src/core/socket-host.js +437 -0
- package/src/core/sqlite.js +520 -0
- package/src/core/startup-gate.js +49 -5
- package/src/core/storage-quota.js +796 -0
- package/src/core/sync-action.js +180 -0
- package/src/core/sync-v2/auto-sync.js +356 -0
- package/src/core/sync-v2/board.js +130 -92
- package/src/core/sync-v2/conv-state.js +21 -4
- package/src/core/sync-v2/gap-advice.js +2 -3
- package/src/core/sync-v2/index.js +739 -323
- package/src/core/sync-v2/media.js +116 -27
- package/src/core/sync-v2/plan.js +16 -2
- package/src/core/sync-v2/ranges.js +98 -0
- package/src/core/sync-v2/reactions.js +12 -196
- package/src/core/sync-v2/senders.js +32 -14
- package/src/core/sync-v2/zcloud.js +177 -579
- package/src/core/sync.js +23 -21
- package/src/core/test-fake-session.js +87 -0
- package/src/core/typing.js +78 -0
- package/src/core/unknown-acts.js +240 -0
- package/src/core/voice-text.js +171 -0
- package/src/core/webhook-outbox.js +110 -12
- package/src/core/zalo-client.js +147 -188
- package/src/core/zbs/api.js +505 -0
- package/src/core/zbs/image.js +85 -0
- package/src/core/zbs/phone.js +59 -0
- package/src/core/zbs/rsa.js +129 -0
- package/src/core/zbs/template-check.js +449 -0
- package/src/index.js +60 -10
- package/src/mcp/action-tool.js +188 -0
- package/src/mcp/actions-business.js +488 -0
- package/src/mcp/actions-conversation.js +633 -0
- package/src/mcp/actions-media.js +268 -0
- package/src/mcp/actions-profile.js +281 -0
- package/src/mcp/actions-social.js +518 -0
- package/src/mcp/instructions.js +19 -5
- package/src/mcp/mcp-config.js +112 -10
- package/src/mcp/mcp-http-transport.js +162 -25
- package/src/mcp/mcp-server.js +14 -3
- package/src/mcp/mcp-tools.js +1686 -384
- package/src/mcp/message-buffer.js +58 -12
- package/src/mcp/notifier.js +1 -1
- package/src/mcp/official-tool.js +298 -0
- package/src/mcp/sync-jobs.js +7 -1
- package/src/mcp/sync-stages.js +72 -0
- package/src/mcp/thread-name-cache.js +43 -5
- package/src/mcp/tool-presence.js +153 -0
- package/src/mcp/wait-batch.js +27 -0
- package/src/mcp/wait-result.js +19 -21
- package/src/utils/bank-helpers.js +52 -1
- package/src/utils/cli-args.js +12 -12
- package/src/utils/date-range.js +50 -0
- package/src/utils/hidden-access.js +141 -0
- package/src/utils/interrupt.js +37 -0
- package/src/utils/json-input.js +41 -0
- package/src/utils/list-replies.js +60 -0
- package/src/utils/my-documents.js +2 -3
- package/src/utils/output.js +66 -2
- package/src/utils/qr-display.js +14 -8
- package/src/utils/qr-http-server.js +674 -134
- package/src/utils/quote.js +8 -8
- package/src/utils/secret-input.js +57 -0
- package/src/utils/vn-text.js +72 -0
- package/src/zalo/README.md +46 -0
- package/src/zalo/anomaly-store.js +49 -0
- package/src/zalo/api/actions.js +670 -0
- package/src/zalo/api/boards.js +1036 -0
- package/src/zalo/api/business.js +662 -0
- package/src/zalo/api/conversations.js +329 -0
- package/src/zalo/api/groups.js +631 -0
- package/src/zalo/api/messages.js +695 -0
- package/src/zalo/api/people.js +711 -0
- package/src/zalo/api/profile.js +374 -0
- package/src/zalo/api/session.js +45 -0
- package/src/zalo/api/upload.js +976 -0
- package/src/zalo/api.js +117 -0
- package/src/zalo/client.js +206 -0
- package/src/zalo/custom/forward.js +199 -0
- package/src/zalo/custom/gid.js +123 -0
- package/src/zalo/custom/group-history.js +246 -0
- package/src/zalo/custom/group-invite.js +53 -0
- package/src/zalo/custom/group-settings.js +186 -0
- package/src/zalo/custom/group-visibility.js +71 -0
- package/src/zalo/custom/pin.js +220 -0
- package/src/zalo/custom/renewlink.js +115 -0
- package/src/zalo/device-fingerprint.js +33 -0
- package/src/zalo/download-fetch.js +45 -0
- package/src/zalo/enums.js +25 -0
- package/src/zalo/errors.js +195 -0
- package/src/zalo/format/mentions.js +140 -0
- package/src/zalo/format/split-message.js +222 -0
- package/src/zalo/format/urgency.js +29 -0
- package/src/zalo/headers.js +93 -0
- package/src/zalo/index.js +72 -0
- package/src/zalo/kernel/atomic-file.js +217 -0
- package/src/zalo/kernel/bound.js +46 -0
- package/src/zalo/kernel/cipher.js +88 -0
- package/src/zalo/kernel/cookies.js +125 -0
- package/src/zalo/kernel/endpoint.js +211 -0
- package/src/zalo/kernel/http.js +360 -0
- package/src/zalo/kernel/json-ids.js +118 -0
- package/src/zalo/kernel/login-cipher.js +165 -0
- package/src/zalo/kernel/secret-file.js +45 -0
- package/src/zalo/kernel/session.js +261 -0
- package/src/zalo/kernel/zcloud-cipher.js +83 -0
- package/src/zalo/kickout.js +136 -0
- package/src/zalo/listener/dispatch.js +404 -0
- package/src/zalo/listener/frames.js +222 -0
- package/src/zalo/listener/friend-events.js +113 -0
- package/src/zalo/listener/group-events.js +117 -0
- package/src/zalo/listener/keepalive.js +191 -0
- package/src/zalo/listener/listener.js +469 -0
- package/src/zalo/listener/models.js +220 -0
- package/src/zalo/listener/reactions.js +224 -0
- package/src/zalo/listener/socket-tap.js +228 -0
- package/src/zalo/login.js +387 -0
- package/src/zalo/logout.js +192 -0
- package/src/zalo/maintenance.js +183 -0
- package/src/zalo/official-logout.js +254 -0
- package/src/zalo/paging.js +114 -0
- package/src/zalo/profile.js +184 -0
- package/src/zalo/pulls.js +129 -0
- package/src/zalo/qr-image.js +90 -0
- package/src/zalo/qr-login.js +494 -0
- package/src/zalo/queues/control-queue.js +193 -0
- package/src/zalo/queues/offline-queue.js +275 -0
- package/src/zalo/queues/queue-verify.js +306 -0
- package/src/zalo/reads.js +723 -0
- package/src/zalo/receipts.js +550 -0
- package/src/zalo/req-id.js +24 -0
- package/src/zalo/retry.js +343 -0
- package/src/zalo/session-call.js +55 -0
- package/src/zalo/socket.js +762 -0
- package/src/zalo/transfer-sync/assets.js +181 -0
- package/src/zalo/transfer-sync/channel.js +459 -0
- package/src/zalo/transfer-sync/download.js +161 -0
- package/src/zalo/transfer-sync/message-types.js +520 -0
- package/src/zalo/transfer-sync/transfer.js +468 -0
- package/src/zalo/trust-store.js +99 -0
- package/src/zalo/trust-wasm.js +393 -0
- package/src/zalo/upkeep.js +127 -0
- package/src/zalo/web-call.js +103 -0
- package/src/zalo/writes.js +704 -0
- package/src/zalo/zcloud-e2ee.js +214 -0
- package/src/zalo/zcloud.js +802 -0
- package/node_modules/asynckit/LICENSE +0 -21
- package/node_modules/asynckit/README.md +0 -233
- package/node_modules/asynckit/bench.js +0 -76
- package/node_modules/asynckit/index.js +0 -6
- package/node_modules/asynckit/lib/abort.js +0 -29
- package/node_modules/asynckit/lib/async.js +0 -34
- package/node_modules/asynckit/lib/defer.js +0 -26
- package/node_modules/asynckit/lib/iterate.js +0 -75
- package/node_modules/asynckit/lib/readable_asynckit.js +0 -91
- package/node_modules/asynckit/lib/readable_parallel.js +0 -25
- package/node_modules/asynckit/lib/readable_serial.js +0 -25
- package/node_modules/asynckit/lib/readable_serial_ordered.js +0 -29
- package/node_modules/asynckit/lib/state.js +0 -37
- package/node_modules/asynckit/lib/streamify.js +0 -141
- package/node_modules/asynckit/lib/terminator.js +0 -29
- package/node_modules/asynckit/package.json +0 -63
- package/node_modules/asynckit/parallel.js +0 -43
- package/node_modules/asynckit/serial.js +0 -17
- package/node_modules/asynckit/serialOrdered.js +0 -75
- package/node_modules/asynckit/stream.js +0 -21
- package/node_modules/bignumber.js/CHANGELOG.md +0 -381
- package/node_modules/bignumber.js/LICENCE.md +0 -26
- package/node_modules/bignumber.js/README.md +0 -289
- package/node_modules/bignumber.js/bignumber.d.mts +0 -6
- package/node_modules/bignumber.js/bignumber.d.ts +0 -5
- package/node_modules/bignumber.js/bignumber.js +0 -2922
- package/node_modules/bignumber.js/bignumber.mjs +0 -2907
- package/node_modules/bignumber.js/doc/API.html +0 -2249
- package/node_modules/bignumber.js/package.json +0 -60
- package/node_modules/bignumber.js/types.d.ts +0 -1821
- package/node_modules/call-bind-apply-helpers/.eslintrc +0 -17
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +0 -12
- package/node_modules/call-bind-apply-helpers/.nycrc +0 -9
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +0 -30
- package/node_modules/call-bind-apply-helpers/LICENSE +0 -21
- package/node_modules/call-bind-apply-helpers/README.md +0 -62
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +0 -1
- package/node_modules/call-bind-apply-helpers/actualApply.js +0 -10
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +0 -19
- package/node_modules/call-bind-apply-helpers/applyBind.js +0 -10
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +0 -1
- package/node_modules/call-bind-apply-helpers/functionApply.js +0 -4
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +0 -1
- package/node_modules/call-bind-apply-helpers/functionCall.js +0 -4
- package/node_modules/call-bind-apply-helpers/index.d.ts +0 -64
- package/node_modules/call-bind-apply-helpers/index.js +0 -15
- package/node_modules/call-bind-apply-helpers/package.json +0 -85
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +0 -3
- package/node_modules/call-bind-apply-helpers/reflectApply.js +0 -4
- package/node_modules/call-bind-apply-helpers/test/index.js +0 -63
- package/node_modules/call-bind-apply-helpers/tsconfig.json +0 -9
- package/node_modules/combined-stream/License +0 -19
- package/node_modules/combined-stream/Readme.md +0 -138
- package/node_modules/combined-stream/lib/combined_stream.js +0 -208
- package/node_modules/combined-stream/package.json +0 -25
- package/node_modules/crypto-js/CONTRIBUTING.md +0 -28
- package/node_modules/crypto-js/LICENSE +0 -24
- package/node_modules/crypto-js/README.md +0 -275
- package/node_modules/crypto-js/aes.js +0 -234
- package/node_modules/crypto-js/blowfish.js +0 -471
- package/node_modules/crypto-js/bower.json +0 -39
- package/node_modules/crypto-js/cipher-core.js +0 -895
- package/node_modules/crypto-js/core.js +0 -807
- package/node_modules/crypto-js/crypto-js.js +0 -6657
- package/node_modules/crypto-js/docs/QuickStartGuide.wiki +0 -470
- package/node_modules/crypto-js/enc-base64.js +0 -136
- package/node_modules/crypto-js/enc-base64url.js +0 -148
- package/node_modules/crypto-js/enc-hex.js +0 -18
- package/node_modules/crypto-js/enc-latin1.js +0 -18
- package/node_modules/crypto-js/enc-utf16.js +0 -149
- package/node_modules/crypto-js/enc-utf8.js +0 -18
- package/node_modules/crypto-js/evpkdf.js +0 -134
- package/node_modules/crypto-js/format-hex.js +0 -66
- package/node_modules/crypto-js/format-openssl.js +0 -18
- package/node_modules/crypto-js/hmac-md5.js +0 -18
- package/node_modules/crypto-js/hmac-ripemd160.js +0 -18
- package/node_modules/crypto-js/hmac-sha1.js +0 -18
- package/node_modules/crypto-js/hmac-sha224.js +0 -18
- package/node_modules/crypto-js/hmac-sha256.js +0 -18
- package/node_modules/crypto-js/hmac-sha3.js +0 -18
- package/node_modules/crypto-js/hmac-sha384.js +0 -18
- package/node_modules/crypto-js/hmac-sha512.js +0 -18
- package/node_modules/crypto-js/hmac.js +0 -143
- package/node_modules/crypto-js/index.js +0 -18
- package/node_modules/crypto-js/lib-typedarrays.js +0 -76
- package/node_modules/crypto-js/md5.js +0 -268
- package/node_modules/crypto-js/mode-cfb.js +0 -80
- package/node_modules/crypto-js/mode-ctr-gladman.js +0 -116
- package/node_modules/crypto-js/mode-ctr.js +0 -58
- package/node_modules/crypto-js/mode-ecb.js +0 -40
- package/node_modules/crypto-js/mode-ofb.js +0 -54
- package/node_modules/crypto-js/package.json +0 -42
- package/node_modules/crypto-js/pad-ansix923.js +0 -49
- package/node_modules/crypto-js/pad-iso10126.js +0 -44
- package/node_modules/crypto-js/pad-iso97971.js +0 -40
- package/node_modules/crypto-js/pad-nopadding.js +0 -30
- package/node_modules/crypto-js/pad-pkcs7.js +0 -18
- package/node_modules/crypto-js/pad-zeropadding.js +0 -47
- package/node_modules/crypto-js/pbkdf2.js +0 -145
- package/node_modules/crypto-js/rabbit-legacy.js +0 -190
- package/node_modules/crypto-js/rabbit.js +0 -192
- package/node_modules/crypto-js/rc4.js +0 -139
- package/node_modules/crypto-js/ripemd160.js +0 -267
- package/node_modules/crypto-js/sha1.js +0 -150
- package/node_modules/crypto-js/sha224.js +0 -80
- package/node_modules/crypto-js/sha256.js +0 -199
- package/node_modules/crypto-js/sha3.js +0 -326
- package/node_modules/crypto-js/sha384.js +0 -83
- package/node_modules/crypto-js/sha512.js +0 -326
- package/node_modules/crypto-js/tripledes.js +0 -779
- package/node_modules/crypto-js/x64-core.js +0 -304
- package/node_modules/delayed-stream/.npmignore +0 -1
- package/node_modules/delayed-stream/License +0 -19
- package/node_modules/delayed-stream/Makefile +0 -7
- package/node_modules/delayed-stream/Readme.md +0 -141
- package/node_modules/delayed-stream/lib/delayed_stream.js +0 -107
- package/node_modules/delayed-stream/package.json +0 -27
- package/node_modules/dunder-proto/.eslintrc +0 -5
- package/node_modules/dunder-proto/.github/FUNDING.yml +0 -12
- package/node_modules/dunder-proto/.nycrc +0 -13
- package/node_modules/dunder-proto/CHANGELOG.md +0 -24
- package/node_modules/dunder-proto/LICENSE +0 -21
- package/node_modules/dunder-proto/README.md +0 -54
- package/node_modules/dunder-proto/get.d.ts +0 -5
- package/node_modules/dunder-proto/get.js +0 -30
- package/node_modules/dunder-proto/package.json +0 -76
- package/node_modules/dunder-proto/set.d.ts +0 -5
- package/node_modules/dunder-proto/set.js +0 -35
- package/node_modules/dunder-proto/test/get.js +0 -34
- package/node_modules/dunder-proto/test/index.js +0 -4
- package/node_modules/dunder-proto/test/set.js +0 -50
- package/node_modules/dunder-proto/tsconfig.json +0 -9
- package/node_modules/es-define-property/.eslintrc +0 -13
- package/node_modules/es-define-property/.github/FUNDING.yml +0 -12
- package/node_modules/es-define-property/.nycrc +0 -9
- package/node_modules/es-define-property/CHANGELOG.md +0 -29
- package/node_modules/es-define-property/LICENSE +0 -21
- package/node_modules/es-define-property/README.md +0 -49
- package/node_modules/es-define-property/index.d.ts +0 -3
- package/node_modules/es-define-property/index.js +0 -14
- package/node_modules/es-define-property/package.json +0 -81
- package/node_modules/es-define-property/test/index.js +0 -56
- package/node_modules/es-define-property/tsconfig.json +0 -10
- package/node_modules/es-errors/.eslintrc +0 -5
- package/node_modules/es-errors/.github/FUNDING.yml +0 -12
- package/node_modules/es-errors/CHANGELOG.md +0 -40
- package/node_modules/es-errors/LICENSE +0 -21
- package/node_modules/es-errors/README.md +0 -55
- package/node_modules/es-errors/eval.d.ts +0 -3
- package/node_modules/es-errors/eval.js +0 -4
- package/node_modules/es-errors/index.d.ts +0 -3
- package/node_modules/es-errors/index.js +0 -4
- package/node_modules/es-errors/package.json +0 -80
- package/node_modules/es-errors/range.d.ts +0 -3
- package/node_modules/es-errors/range.js +0 -4
- package/node_modules/es-errors/ref.d.ts +0 -3
- package/node_modules/es-errors/ref.js +0 -4
- package/node_modules/es-errors/syntax.d.ts +0 -3
- package/node_modules/es-errors/syntax.js +0 -4
- package/node_modules/es-errors/test/index.js +0 -19
- package/node_modules/es-errors/tsconfig.json +0 -49
- package/node_modules/es-errors/type.d.ts +0 -3
- package/node_modules/es-errors/type.js +0 -4
- package/node_modules/es-errors/uri.d.ts +0 -3
- package/node_modules/es-errors/uri.js +0 -4
- package/node_modules/es-object-atoms/.eslintrc +0 -16
- package/node_modules/es-object-atoms/.github/FUNDING.yml +0 -12
- package/node_modules/es-object-atoms/CHANGELOG.md +0 -44
- package/node_modules/es-object-atoms/LICENSE +0 -21
- package/node_modules/es-object-atoms/README.md +0 -63
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +0 -3
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +0 -11
- package/node_modules/es-object-atoms/ToObject.d.ts +0 -7
- package/node_modules/es-object-atoms/ToObject.js +0 -10
- package/node_modules/es-object-atoms/index.d.ts +0 -3
- package/node_modules/es-object-atoms/index.js +0 -4
- package/node_modules/es-object-atoms/isObject.d.ts +0 -3
- package/node_modules/es-object-atoms/isObject.js +0 -6
- package/node_modules/es-object-atoms/package.json +0 -79
- package/node_modules/es-object-atoms/test/index.js +0 -38
- package/node_modules/es-object-atoms/tsconfig.json +0 -7
- package/node_modules/es-set-tostringtag/.eslintrc +0 -13
- package/node_modules/es-set-tostringtag/.nycrc +0 -9
- package/node_modules/es-set-tostringtag/CHANGELOG.md +0 -67
- package/node_modules/es-set-tostringtag/LICENSE +0 -21
- package/node_modules/es-set-tostringtag/README.md +0 -53
- package/node_modules/es-set-tostringtag/index.d.ts +0 -10
- package/node_modules/es-set-tostringtag/index.js +0 -35
- package/node_modules/es-set-tostringtag/package.json +0 -78
- package/node_modules/es-set-tostringtag/test/index.js +0 -85
- package/node_modules/es-set-tostringtag/tsconfig.json +0 -9
- package/node_modules/form-data/CHANGELOG.md +0 -686
- package/node_modules/form-data/License +0 -19
- package/node_modules/form-data/README.md +0 -355
- package/node_modules/form-data/index.d.ts +0 -62
- package/node_modules/form-data/lib/browser.js +0 -4
- package/node_modules/form-data/lib/form_data.js +0 -506
- package/node_modules/form-data/lib/populate.js +0 -10
- package/node_modules/form-data/node_modules/mime-db/HISTORY.md +0 -507
- package/node_modules/form-data/node_modules/mime-db/LICENSE +0 -23
- package/node_modules/form-data/node_modules/mime-db/README.md +0 -100
- package/node_modules/form-data/node_modules/mime-db/db.json +0 -8519
- package/node_modules/form-data/node_modules/mime-db/index.js +0 -12
- package/node_modules/form-data/node_modules/mime-db/package.json +0 -60
- package/node_modules/form-data/node_modules/mime-types/HISTORY.md +0 -397
- package/node_modules/form-data/node_modules/mime-types/LICENSE +0 -23
- package/node_modules/form-data/node_modules/mime-types/README.md +0 -113
- package/node_modules/form-data/node_modules/mime-types/index.js +0 -188
- package/node_modules/form-data/node_modules/mime-types/package.json +0 -44
- package/node_modules/form-data/package.json +0 -82
- package/node_modules/function-bind/.eslintrc +0 -21
- package/node_modules/function-bind/.github/FUNDING.yml +0 -12
- package/node_modules/function-bind/.github/SECURITY.md +0 -3
- package/node_modules/function-bind/.nycrc +0 -13
- package/node_modules/function-bind/CHANGELOG.md +0 -136
- package/node_modules/function-bind/LICENSE +0 -20
- package/node_modules/function-bind/README.md +0 -46
- package/node_modules/function-bind/implementation.js +0 -84
- package/node_modules/function-bind/index.js +0 -5
- package/node_modules/function-bind/package.json +0 -87
- package/node_modules/function-bind/test/.eslintrc +0 -9
- package/node_modules/function-bind/test/index.js +0 -252
- package/node_modules/get-intrinsic/.eslintrc +0 -42
- package/node_modules/get-intrinsic/.github/FUNDING.yml +0 -12
- package/node_modules/get-intrinsic/.nycrc +0 -9
- package/node_modules/get-intrinsic/CHANGELOG.md +0 -186
- package/node_modules/get-intrinsic/LICENSE +0 -21
- package/node_modules/get-intrinsic/README.md +0 -71
- package/node_modules/get-intrinsic/index.js +0 -378
- package/node_modules/get-intrinsic/package.json +0 -97
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +0 -274
- package/node_modules/get-proto/.eslintrc +0 -10
- package/node_modules/get-proto/.github/FUNDING.yml +0 -12
- package/node_modules/get-proto/.nycrc +0 -9
- package/node_modules/get-proto/CHANGELOG.md +0 -21
- package/node_modules/get-proto/LICENSE +0 -21
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +0 -5
- package/node_modules/get-proto/Object.getPrototypeOf.js +0 -6
- package/node_modules/get-proto/README.md +0 -50
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +0 -3
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +0 -4
- package/node_modules/get-proto/index.d.ts +0 -5
- package/node_modules/get-proto/index.js +0 -27
- package/node_modules/get-proto/package.json +0 -81
- package/node_modules/get-proto/test/index.js +0 -68
- package/node_modules/get-proto/tsconfig.json +0 -9
- package/node_modules/gopd/.eslintrc +0 -16
- package/node_modules/gopd/.github/FUNDING.yml +0 -12
- package/node_modules/gopd/CHANGELOG.md +0 -45
- package/node_modules/gopd/LICENSE +0 -21
- package/node_modules/gopd/README.md +0 -40
- package/node_modules/gopd/gOPD.d.ts +0 -1
- package/node_modules/gopd/gOPD.js +0 -4
- package/node_modules/gopd/index.d.ts +0 -5
- package/node_modules/gopd/index.js +0 -15
- package/node_modules/gopd/package.json +0 -77
- package/node_modules/gopd/test/index.js +0 -36
- package/node_modules/gopd/tsconfig.json +0 -9
- package/node_modules/has-symbols/.eslintrc +0 -11
- package/node_modules/has-symbols/.github/FUNDING.yml +0 -12
- package/node_modules/has-symbols/.nycrc +0 -9
- package/node_modules/has-symbols/CHANGELOG.md +0 -91
- package/node_modules/has-symbols/LICENSE +0 -21
- package/node_modules/has-symbols/README.md +0 -46
- package/node_modules/has-symbols/index.d.ts +0 -3
- package/node_modules/has-symbols/index.js +0 -14
- package/node_modules/has-symbols/package.json +0 -111
- package/node_modules/has-symbols/shams.d.ts +0 -3
- package/node_modules/has-symbols/shams.js +0 -45
- package/node_modules/has-symbols/test/index.js +0 -22
- package/node_modules/has-symbols/test/shams/core-js.js +0 -29
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +0 -29
- package/node_modules/has-symbols/test/tests.js +0 -58
- package/node_modules/has-symbols/tsconfig.json +0 -10
- package/node_modules/has-tostringtag/.eslintrc +0 -5
- package/node_modules/has-tostringtag/.github/FUNDING.yml +0 -12
- package/node_modules/has-tostringtag/.nycrc +0 -13
- package/node_modules/has-tostringtag/CHANGELOG.md +0 -42
- package/node_modules/has-tostringtag/LICENSE +0 -21
- package/node_modules/has-tostringtag/README.md +0 -46
- package/node_modules/has-tostringtag/index.d.ts +0 -3
- package/node_modules/has-tostringtag/index.js +0 -8
- package/node_modules/has-tostringtag/package.json +0 -108
- package/node_modules/has-tostringtag/shams.d.ts +0 -3
- package/node_modules/has-tostringtag/shams.js +0 -8
- package/node_modules/has-tostringtag/test/index.js +0 -21
- package/node_modules/has-tostringtag/test/shams/core-js.js +0 -31
- package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +0 -30
- package/node_modules/has-tostringtag/test/tests.js +0 -15
- package/node_modules/has-tostringtag/tsconfig.json +0 -49
- package/node_modules/hasown/.github/FUNDING.yml +0 -12
- package/node_modules/hasown/.nycrc +0 -13
- package/node_modules/hasown/CHANGELOG.md +0 -58
- package/node_modules/hasown/LICENSE +0 -21
- package/node_modules/hasown/README.md +0 -40
- package/node_modules/hasown/eslint.config.mjs +0 -6
- package/node_modules/hasown/index.d.ts +0 -3
- package/node_modules/hasown/index.js +0 -8
- package/node_modules/hasown/package.json +0 -91
- package/node_modules/hasown/tsconfig.json +0 -6
- package/node_modules/json-bigint/LICENSE +0 -20
- package/node_modules/json-bigint/README.md +0 -240
- package/node_modules/json-bigint/index.js +0 -12
- package/node_modules/json-bigint/lib/parse.js +0 -443
- package/node_modules/json-bigint/lib/stringify.js +0 -384
- package/node_modules/json-bigint/package.json +0 -34
- package/node_modules/math-intrinsics/.eslintrc +0 -16
- package/node_modules/math-intrinsics/.github/FUNDING.yml +0 -12
- package/node_modules/math-intrinsics/CHANGELOG.md +0 -24
- package/node_modules/math-intrinsics/LICENSE +0 -21
- package/node_modules/math-intrinsics/README.md +0 -50
- package/node_modules/math-intrinsics/abs.d.ts +0 -1
- package/node_modules/math-intrinsics/abs.js +0 -4
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +0 -3
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +0 -4
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +0 -3
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +0 -5
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +0 -3
- package/node_modules/math-intrinsics/constants/maxValue.js +0 -5
- package/node_modules/math-intrinsics/floor.d.ts +0 -1
- package/node_modules/math-intrinsics/floor.js +0 -4
- package/node_modules/math-intrinsics/isFinite.d.ts +0 -3
- package/node_modules/math-intrinsics/isFinite.js +0 -12
- package/node_modules/math-intrinsics/isInteger.d.ts +0 -3
- package/node_modules/math-intrinsics/isInteger.js +0 -16
- package/node_modules/math-intrinsics/isNaN.d.ts +0 -1
- package/node_modules/math-intrinsics/isNaN.js +0 -6
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +0 -3
- package/node_modules/math-intrinsics/isNegativeZero.js +0 -6
- package/node_modules/math-intrinsics/max.d.ts +0 -1
- package/node_modules/math-intrinsics/max.js +0 -4
- package/node_modules/math-intrinsics/min.d.ts +0 -1
- package/node_modules/math-intrinsics/min.js +0 -4
- package/node_modules/math-intrinsics/mod.d.ts +0 -3
- package/node_modules/math-intrinsics/mod.js +0 -9
- package/node_modules/math-intrinsics/package.json +0 -86
- package/node_modules/math-intrinsics/pow.d.ts +0 -1
- package/node_modules/math-intrinsics/pow.js +0 -4
- package/node_modules/math-intrinsics/round.d.ts +0 -1
- package/node_modules/math-intrinsics/round.js +0 -4
- package/node_modules/math-intrinsics/sign.d.ts +0 -3
- package/node_modules/math-intrinsics/sign.js +0 -11
- package/node_modules/math-intrinsics/test/index.js +0 -192
- package/node_modules/math-intrinsics/tsconfig.json +0 -3
- package/node_modules/pako/LICENSE +0 -21
- package/node_modules/pako/README.md +0 -155
- package/node_modules/pako/dist/pako.es5.js +0 -6760
- package/node_modules/pako/dist/pako.es5.min.js +0 -2
- package/node_modules/pako/dist/pako.esm.mjs +0 -6945
- package/node_modules/pako/dist/pako.js +0 -6964
- package/node_modules/pako/dist/pako.min.js +0 -2
- package/node_modules/pako/dist/pako_deflate.es5.js +0 -3953
- package/node_modules/pako/dist/pako_deflate.es5.min.js +0 -2
- package/node_modules/pako/dist/pako_deflate.js +0 -4154
- package/node_modules/pako/dist/pako_deflate.min.js +0 -2
- package/node_modules/pako/dist/pako_inflate.es5.js +0 -3272
- package/node_modules/pako/dist/pako_inflate.es5.min.js +0 -2
- package/node_modules/pako/dist/pako_inflate.js +0 -3279
- package/node_modules/pako/dist/pako_inflate.min.js +0 -2
- package/node_modules/pako/index.js +0 -18
- package/node_modules/pako/lib/deflate.js +0 -387
- package/node_modules/pako/lib/inflate.js +0 -456
- package/node_modules/pako/lib/utils/common.js +0 -48
- package/node_modules/pako/lib/utils/strings.js +0 -174
- package/node_modules/pako/lib/zlib/README +0 -59
- package/node_modules/pako/lib/zlib/adler32.js +0 -51
- package/node_modules/pako/lib/zlib/constants.js +0 -68
- package/node_modules/pako/lib/zlib/crc32.js +0 -59
- package/node_modules/pako/lib/zlib/deflate.js +0 -2069
- package/node_modules/pako/lib/zlib/gzheader.js +0 -58
- package/node_modules/pako/lib/zlib/inffast.js +0 -344
- package/node_modules/pako/lib/zlib/inflate.js +0 -1575
- package/node_modules/pako/lib/zlib/inftrees.js +0 -340
- package/node_modules/pako/lib/zlib/messages.js +0 -32
- package/node_modules/pako/lib/zlib/trees.js +0 -1179
- package/node_modules/pako/lib/zlib/zstream.js +0 -47
- package/node_modules/pako/package.json +0 -73
- package/node_modules/semver/LICENSE +0 -15
- package/node_modules/semver/README.md +0 -680
- package/node_modules/semver/bin/semver.js +0 -195
- package/node_modules/semver/classes/comparator.js +0 -143
- package/node_modules/semver/classes/index.js +0 -7
- package/node_modules/semver/classes/range.js +0 -577
- package/node_modules/semver/classes/semver.js +0 -350
- package/node_modules/semver/functions/clean.js +0 -8
- package/node_modules/semver/functions/cmp.js +0 -54
- package/node_modules/semver/functions/coerce.js +0 -62
- package/node_modules/semver/functions/compare-build.js +0 -9
- package/node_modules/semver/functions/compare-loose.js +0 -5
- package/node_modules/semver/functions/compare.js +0 -7
- package/node_modules/semver/functions/diff.js +0 -60
- package/node_modules/semver/functions/eq.js +0 -5
- package/node_modules/semver/functions/gt.js +0 -5
- package/node_modules/semver/functions/gte.js +0 -5
- package/node_modules/semver/functions/inc.js +0 -21
- package/node_modules/semver/functions/lt.js +0 -5
- package/node_modules/semver/functions/lte.js +0 -5
- package/node_modules/semver/functions/major.js +0 -5
- package/node_modules/semver/functions/minor.js +0 -5
- package/node_modules/semver/functions/neq.js +0 -5
- package/node_modules/semver/functions/parse.js +0 -18
- package/node_modules/semver/functions/patch.js +0 -5
- package/node_modules/semver/functions/prerelease.js +0 -8
- package/node_modules/semver/functions/rcompare.js +0 -5
- package/node_modules/semver/functions/rsort.js +0 -5
- package/node_modules/semver/functions/satisfies.js +0 -12
- package/node_modules/semver/functions/sort.js +0 -5
- package/node_modules/semver/functions/truncate.js +0 -48
- package/node_modules/semver/functions/valid.js +0 -8
- package/node_modules/semver/index.js +0 -93
- package/node_modules/semver/internal/constants.js +0 -37
- package/node_modules/semver/internal/debug.js +0 -11
- package/node_modules/semver/internal/identifiers.js +0 -29
- package/node_modules/semver/internal/lrucache.js +0 -42
- package/node_modules/semver/internal/parse-options.js +0 -17
- package/node_modules/semver/internal/re.js +0 -223
- package/node_modules/semver/package.json +0 -78
- package/node_modules/semver/preload.js +0 -4
- package/node_modules/semver/range.bnf +0 -17
- package/node_modules/semver/ranges/gtr.js +0 -6
- package/node_modules/semver/ranges/intersects.js +0 -9
- package/node_modules/semver/ranges/ltr.js +0 -6
- package/node_modules/semver/ranges/max-satisfying.js +0 -27
- package/node_modules/semver/ranges/min-satisfying.js +0 -26
- package/node_modules/semver/ranges/min-version.js +0 -63
- package/node_modules/semver/ranges/outside.js +0 -82
- package/node_modules/semver/ranges/simplify.js +0 -49
- package/node_modules/semver/ranges/subset.js +0 -249
- package/node_modules/semver/ranges/to-comparators.js +0 -10
- package/node_modules/semver/ranges/valid.js +0 -13
- package/node_modules/spark-md5/LICENSE +0 -13
- package/node_modules/spark-md5/README.md +0 -191
- package/node_modules/spark-md5/package.json +0 -35
- package/node_modules/spark-md5/spark-md5.js +0 -751
- package/node_modules/spark-md5/spark-md5.min.js +0 -1
- package/node_modules/tldts/LICENSE +0 -13
- package/node_modules/tldts/README.md +0 -327
- package/node_modules/tldts/bin/cli.js +0 -21
- package/node_modules/tldts/dist/cjs/index.js +0 -666
- package/node_modules/tldts/dist/cjs/index.js.map +0 -1
- package/node_modules/tldts/dist/cjs/src/data/trie.js +0 -14
- package/node_modules/tldts/dist/cjs/src/data/trie.js.map +0 -1
- package/node_modules/tldts/dist/cjs/src/suffix-trie.js +0 -67
- package/node_modules/tldts/dist/cjs/src/suffix-trie.js.map +0 -1
- package/node_modules/tldts/dist/cjs/tsconfig.tsbuildinfo +0 -1
- package/node_modules/tldts/dist/es6/index.js +0 -33
- package/node_modules/tldts/dist/es6/index.js.map +0 -1
- package/node_modules/tldts/dist/es6/src/data/trie.js +0 -11
- package/node_modules/tldts/dist/es6/src/data/trie.js.map +0 -1
- package/node_modules/tldts/dist/es6/src/suffix-trie.js +0 -64
- package/node_modules/tldts/dist/es6/src/suffix-trie.js.map +0 -1
- package/node_modules/tldts/dist/es6/tsconfig.bundle.tsbuildinfo +0 -1
- package/node_modules/tldts/dist/index.cjs.min.js +0 -2
- package/node_modules/tldts/dist/index.cjs.min.js.map +0 -1
- package/node_modules/tldts/dist/index.esm.min.js +0 -2
- package/node_modules/tldts/dist/index.esm.min.js.map +0 -1
- package/node_modules/tldts/dist/index.umd.min.js +0 -2
- package/node_modules/tldts/dist/index.umd.min.js.map +0 -1
- package/node_modules/tldts/dist/types/index.d.ts +0 -7
- package/node_modules/tldts/dist/types/src/data/trie.d.ts +0 -5
- package/node_modules/tldts/dist/types/src/suffix-trie.d.ts +0 -5
- package/node_modules/tldts/index.ts +0 -62
- package/node_modules/tldts/package.json +0 -91
- package/node_modules/tldts/src/data/trie.ts +0 -14
- package/node_modules/tldts/src/suffix-trie.ts +0 -110
- package/node_modules/tldts-core/LICENSE +0 -13
- package/node_modules/tldts-core/README.md +0 -3
- package/node_modules/tldts-core/dist/cjs/index.js +0 -561
- package/node_modules/tldts-core/dist/cjs/index.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/domain-without-suffix.js +0 -15
- package/node_modules/tldts-core/dist/cjs/src/domain-without-suffix.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/domain.js +0 -83
- package/node_modules/tldts-core/dist/cjs/src/domain.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/extract-hostname.js +0 -149
- package/node_modules/tldts-core/dist/cjs/src/extract-hostname.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/factory.js +0 -104
- package/node_modules/tldts-core/dist/cjs/src/factory.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/is-ip.js +0 -72
- package/node_modules/tldts-core/dist/cjs/src/is-ip.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/is-valid.js +0 -69
- package/node_modules/tldts-core/dist/cjs/src/is-valid.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/lookup/fast-path.js +0 -69
- package/node_modules/tldts-core/dist/cjs/src/lookup/fast-path.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/lookup/interface.js +0 -3
- package/node_modules/tldts-core/dist/cjs/src/lookup/interface.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/options.js +0 -22
- package/node_modules/tldts-core/dist/cjs/src/options.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/subdomain.js +0 -14
- package/node_modules/tldts-core/dist/cjs/src/subdomain.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/tsconfig.tsbuildinfo +0 -1
- package/node_modules/tldts-core/dist/es6/index.js +0 -4
- package/node_modules/tldts-core/dist/es6/index.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/domain-without-suffix.js +0 -12
- package/node_modules/tldts-core/dist/es6/src/domain-without-suffix.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/domain.js +0 -80
- package/node_modules/tldts-core/dist/es6/src/domain.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/extract-hostname.js +0 -146
- package/node_modules/tldts-core/dist/es6/src/extract-hostname.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/factory.js +0 -99
- package/node_modules/tldts-core/dist/es6/src/factory.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/is-ip.js +0 -69
- package/node_modules/tldts-core/dist/es6/src/is-ip.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/is-valid.js +0 -66
- package/node_modules/tldts-core/dist/es6/src/is-valid.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/lookup/fast-path.js +0 -66
- package/node_modules/tldts-core/dist/es6/src/lookup/fast-path.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/lookup/interface.js +0 -2
- package/node_modules/tldts-core/dist/es6/src/lookup/interface.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/options.js +0 -19
- package/node_modules/tldts-core/dist/es6/src/options.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/subdomain.js +0 -11
- package/node_modules/tldts-core/dist/es6/src/subdomain.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/tsconfig.bundle.tsbuildinfo +0 -1
- package/node_modules/tldts-core/dist/types/index.d.ts +0 -4
- package/node_modules/tldts-core/dist/types/src/domain-without-suffix.d.ts +0 -6
- package/node_modules/tldts-core/dist/types/src/domain.d.ts +0 -5
- package/node_modules/tldts-core/dist/types/src/extract-hostname.d.ts +0 -5
- package/node_modules/tldts-core/dist/types/src/factory.d.ts +0 -28
- package/node_modules/tldts-core/dist/types/src/is-ip.d.ts +0 -6
- package/node_modules/tldts-core/dist/types/src/is-valid.d.ts +0 -15
- package/node_modules/tldts-core/dist/types/src/lookup/fast-path.d.ts +0 -2
- package/node_modules/tldts-core/dist/types/src/lookup/interface.d.ts +0 -9
- package/node_modules/tldts-core/dist/types/src/options.d.ts +0 -10
- package/node_modules/tldts-core/dist/types/src/subdomain.d.ts +0 -4
- package/node_modules/tldts-core/index.ts +0 -10
- package/node_modules/tldts-core/package.json +0 -68
- package/node_modules/tldts-core/src/domain-without-suffix.ts +0 -14
- package/node_modules/tldts-core/src/domain.ts +0 -100
- package/node_modules/tldts-core/src/extract-hostname.ts +0 -170
- package/node_modules/tldts-core/src/factory.ts +0 -160
- package/node_modules/tldts-core/src/is-ip.ts +0 -87
- package/node_modules/tldts-core/src/is-valid.ts +0 -79
- package/node_modules/tldts-core/src/lookup/fast-path.ts +0 -80
- package/node_modules/tldts-core/src/lookup/interface.ts +0 -10
- package/node_modules/tldts-core/src/options.ts +0 -39
- package/node_modules/tldts-core/src/subdomain.ts +0 -11
- package/node_modules/tough-cookie/LICENSE +0 -12
- package/node_modules/tough-cookie/README.md +0 -154
- package/node_modules/tough-cookie/dist/cookie/canonicalDomain.d.ts +0 -33
- package/node_modules/tough-cookie/dist/cookie/canonicalDomain.js +0 -65
- package/node_modules/tough-cookie/dist/cookie/constants.d.ts +0 -54
- package/node_modules/tough-cookie/dist/cookie/constants.js +0 -38
- package/node_modules/tough-cookie/dist/cookie/cookie.d.ts +0 -326
- package/node_modules/tough-cookie/dist/cookie/cookie.js +0 -831
- package/node_modules/tough-cookie/dist/cookie/cookieCompare.d.ts +0 -58
- package/node_modules/tough-cookie/dist/cookie/cookieCompare.js +0 -84
- package/node_modules/tough-cookie/dist/cookie/cookieJar.d.ts +0 -621
- package/node_modules/tough-cookie/dist/cookie/cookieJar.js +0 -1000
- package/node_modules/tough-cookie/dist/cookie/defaultPath.d.ts +0 -40
- package/node_modules/tough-cookie/dist/cookie/defaultPath.js +0 -60
- package/node_modules/tough-cookie/dist/cookie/domainMatch.d.ts +0 -38
- package/node_modules/tough-cookie/dist/cookie/domainMatch.js +0 -94
- package/node_modules/tough-cookie/dist/cookie/formatDate.d.ts +0 -15
- package/node_modules/tough-cookie/dist/cookie/formatDate.js +0 -20
- package/node_modules/tough-cookie/dist/cookie/index.d.ts +0 -29
- package/node_modules/tough-cookie/dist/cookie/index.js +0 -54
- package/node_modules/tough-cookie/dist/cookie/parseDate.d.ts +0 -103
- package/node_modules/tough-cookie/dist/cookie/parseDate.js +0 -323
- package/node_modules/tough-cookie/dist/cookie/permutePath.d.ts +0 -14
- package/node_modules/tough-cookie/dist/cookie/permutePath.js +0 -32
- package/node_modules/tough-cookie/dist/getPublicSuffix.d.ts +0 -55
- package/node_modules/tough-cookie/dist/getPublicSuffix.js +0 -71
- package/node_modules/tough-cookie/dist/memstore.d.ts +0 -220
- package/node_modules/tough-cookie/dist/memstore.js +0 -187
- package/node_modules/tough-cookie/dist/pathMatch.d.ts +0 -17
- package/node_modules/tough-cookie/dist/pathMatch.js +0 -40
- package/node_modules/tough-cookie/dist/permuteDomain.d.ts +0 -15
- package/node_modules/tough-cookie/dist/permuteDomain.js +0 -44
- package/node_modules/tough-cookie/dist/store.d.ts +0 -211
- package/node_modules/tough-cookie/dist/store.js +0 -76
- package/node_modules/tough-cookie/dist/utils.d.ts +0 -34
- package/node_modules/tough-cookie/dist/utils.js +0 -99
- package/node_modules/tough-cookie/dist/validators.d.ts +0 -24
- package/node_modules/tough-cookie/dist/validators.js +0 -90
- package/node_modules/tough-cookie/dist/version.d.ts +0 -5
- package/node_modules/tough-cookie/dist/version.js +0 -8
- package/node_modules/tough-cookie/package.json +0 -144
- package/node_modules/ws/LICENSE +0 -20
- package/node_modules/ws/README.md +0 -548
- package/node_modules/ws/browser.js +0 -8
- package/node_modules/ws/index.js +0 -22
- package/node_modules/ws/lib/buffer-util.js +0 -131
- package/node_modules/ws/lib/constants.js +0 -19
- package/node_modules/ws/lib/event-target.js +0 -292
- package/node_modules/ws/lib/extension.js +0 -203
- package/node_modules/ws/lib/limiter.js +0 -55
- package/node_modules/ws/lib/permessage-deflate.js +0 -530
- package/node_modules/ws/lib/receiver.js +0 -743
- package/node_modules/ws/lib/sender.js +0 -607
- package/node_modules/ws/lib/stream.js +0 -161
- package/node_modules/ws/lib/subprotocol.js +0 -62
- package/node_modules/ws/lib/validation.js +0 -152
- package/node_modules/ws/lib/websocket-server.js +0 -562
- package/node_modules/ws/lib/websocket.js +0 -1407
- package/node_modules/ws/package.json +0 -74
- package/node_modules/ws/wrapper.mjs +0 -21
- package/node_modules/zca-js/.prettierrc +0 -5
- package/node_modules/zca-js/CODE_OF_CONDUCT.md +0 -163
- package/node_modules/zca-js/CONTRIBUTING.md +0 -470
- package/node_modules/zca-js/LICENSE +0 -21
- package/node_modules/zca-js/README.md +0 -225
- package/node_modules/zca-js/SECURITY.md +0 -83
- package/node_modules/zca-js/dist/Errors/ZaloApiError.d.ts +0 -4
- package/node_modules/zca-js/dist/Errors/ZaloApiError.js +0 -7
- package/node_modules/zca-js/dist/Errors/ZaloApiLoginQRAborted.d.ts +0 -4
- package/node_modules/zca-js/dist/Errors/ZaloApiLoginQRAborted.js +0 -7
- package/node_modules/zca-js/dist/Errors/ZaloApiLoginQRDeclined.d.ts +0 -4
- package/node_modules/zca-js/dist/Errors/ZaloApiLoginQRDeclined.js +0 -7
- package/node_modules/zca-js/dist/Errors/ZaloApiMissingImageMetadataGetter.d.ts +0 -4
- package/node_modules/zca-js/dist/Errors/ZaloApiMissingImageMetadataGetter.js +0 -7
- package/node_modules/zca-js/dist/Errors/index.d.ts +0 -4
- package/node_modules/zca-js/dist/Errors/index.js +0 -4
- package/node_modules/zca-js/dist/apis/acceptFriendRequest.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/acceptFriendRequest.js +0 -28
- package/node_modules/zca-js/dist/apis/addGroupBlockedMember.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/addGroupBlockedMember.js +0 -28
- package/node_modules/zca-js/dist/apis/addGroupDeputy.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/addGroupDeputy.js +0 -30
- package/node_modules/zca-js/dist/apis/addPollOptions.d.ts +0 -14
- package/node_modules/zca-js/dist/apis/addPollOptions.js +0 -26
- package/node_modules/zca-js/dist/apis/addQuickMessage.d.ts +0 -11
- package/node_modules/zca-js/dist/apis/addQuickMessage.js +0 -60
- package/node_modules/zca-js/dist/apis/addReaction.d.ts +0 -18
- package/node_modules/zca-js/dist/apis/addReaction.js +0 -294
- package/node_modules/zca-js/dist/apis/addUnreadMark.d.ts +0 -8
- package/node_modules/zca-js/dist/apis/addUnreadMark.js +0 -52
- package/node_modules/zca-js/dist/apis/addUserToGroup.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/addUserToGroup.js +0 -34
- package/node_modules/zca-js/dist/apis/blockUser.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/blockUser.js +0 -28
- package/node_modules/zca-js/dist/apis/blockViewFeed.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/blockViewFeed.js +0 -30
- package/node_modules/zca-js/dist/apis/changeAccountAvatar.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/changeAccountAvatar.js +0 -52
- package/node_modules/zca-js/dist/apis/changeFriendAlias.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/changeFriendAlias.js +0 -27
- package/node_modules/zca-js/dist/apis/changeGroupAvatar.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/changeGroupAvatar.js +0 -44
- package/node_modules/zca-js/dist/apis/changeGroupName.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/changeGroupName.js +0 -32
- package/node_modules/zca-js/dist/apis/changeGroupOwner.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/changeGroupOwner.js +0 -30
- package/node_modules/zca-js/dist/apis/createAutoReply.d.ts +0 -14
- package/node_modules/zca-js/dist/apis/createAutoReply.js +0 -37
- package/node_modules/zca-js/dist/apis/createBankAccount.d.ts +0 -8
- package/node_modules/zca-js/dist/apis/createBankAccount.js +0 -32
- package/node_modules/zca-js/dist/apis/createCatalog.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/createCatalog.js +0 -29
- package/node_modules/zca-js/dist/apis/createGroup.d.ts +0 -28
- package/node_modules/zca-js/dist/apis/createGroup.js +0 -43
- package/node_modules/zca-js/dist/apis/createNote.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/createNote.js +0 -47
- package/node_modules/zca-js/dist/apis/createPoll.d.ts +0 -36
- package/node_modules/zca-js/dist/apis/createPoll.js +0 -40
- package/node_modules/zca-js/dist/apis/createProductCatalog.d.ts +0 -23
- package/node_modules/zca-js/dist/apis/createProductCatalog.js +0 -50
- package/node_modules/zca-js/dist/apis/createReminder.d.ts +0 -12
- package/node_modules/zca-js/dist/apis/createReminder.js +0 -63
- package/node_modules/zca-js/dist/apis/custom.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/custom.js +0 -15
- package/node_modules/zca-js/dist/apis/deleteAutoReply.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/deleteAutoReply.js +0 -29
- package/node_modules/zca-js/dist/apis/deleteAvatar.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/deleteAvatar.js +0 -27
- package/node_modules/zca-js/dist/apis/deleteBankAccount.d.ts +0 -11
- package/node_modules/zca-js/dist/apis/deleteBankAccount.js +0 -32
- package/node_modules/zca-js/dist/apis/deleteCatalog.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/deleteCatalog.js +0 -28
- package/node_modules/zca-js/dist/apis/deleteChat.d.ts +0 -19
- package/node_modules/zca-js/dist/apis/deleteChat.js +0 -50
- package/node_modules/zca-js/dist/apis/deleteGroupInviteBox.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/deleteGroupInviteBox.js +0 -27
- package/node_modules/zca-js/dist/apis/deleteMessage.d.ts +0 -14
- package/node_modules/zca-js/dist/apis/deleteMessage.js +0 -52
- package/node_modules/zca-js/dist/apis/deleteProductCatalog.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/deleteProductCatalog.js +0 -31
- package/node_modules/zca-js/dist/apis/disableGroupLink.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/disableGroupLink.js +0 -24
- package/node_modules/zca-js/dist/apis/disperseGroup.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/disperseGroup.js +0 -28
- package/node_modules/zca-js/dist/apis/editNote.d.ts +0 -17
- package/node_modules/zca-js/dist/apis/editNote.js +0 -46
- package/node_modules/zca-js/dist/apis/editReminder.d.ts +0 -13
- package/node_modules/zca-js/dist/apis/editReminder.js +0 -61
- package/node_modules/zca-js/dist/apis/enableGroupLink.d.ts +0 -6
- package/node_modules/zca-js/dist/apis/enableGroupLink.js +0 -25
- package/node_modules/zca-js/dist/apis/fetchAccountInfo.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/fetchAccountInfo.js +0 -10
- package/node_modules/zca-js/dist/apis/findUser.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/findUser.js +0 -42
- package/node_modules/zca-js/dist/apis/findUserByUsername.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/findUserByUsername.js +0 -27
- package/node_modules/zca-js/dist/apis/forwardMessage.d.ts +0 -24
- package/node_modules/zca-js/dist/apis/forwardMessage.js +0 -114
- package/node_modules/zca-js/dist/apis/getAliasList.d.ts +0 -8
- package/node_modules/zca-js/dist/apis/getAliasList.js +0 -27
- package/node_modules/zca-js/dist/apis/getAllFriends.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/getAllFriends.js +0 -34
- package/node_modules/zca-js/dist/apis/getAllGroups.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/getAllGroups.js +0 -10
- package/node_modules/zca-js/dist/apis/getArchivedChatList.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/getArchivedChatList.js +0 -23
- package/node_modules/zca-js/dist/apis/getAutoDeleteChat.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/getAutoDeleteChat.js +0 -21
- package/node_modules/zca-js/dist/apis/getAutoReplyList.d.ts +0 -6
- package/node_modules/zca-js/dist/apis/getAutoReplyList.js +0 -24
- package/node_modules/zca-js/dist/apis/getAvatarList.d.ts +0 -12
- package/node_modules/zca-js/dist/apis/getAvatarList.js +0 -28
- package/node_modules/zca-js/dist/apis/getAvatarUrlProfile.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/getAvatarUrlProfile.js +0 -30
- package/node_modules/zca-js/dist/apis/getBizAccount.d.ts +0 -24
- package/node_modules/zca-js/dist/apis/getBizAccount.js +0 -27
- package/node_modules/zca-js/dist/apis/getCatalogList.d.ts +0 -18
- package/node_modules/zca-js/dist/apis/getCatalogList.js +0 -32
- package/node_modules/zca-js/dist/apis/getCloseFriends.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/getCloseFriends.js +0 -20
- package/node_modules/zca-js/dist/apis/getContext.d.ts +0 -1
- package/node_modules/zca-js/dist/apis/getContext.js +0 -4
- package/node_modules/zca-js/dist/apis/getCookie.d.ts +0 -1
- package/node_modules/zca-js/dist/apis/getCookie.js +0 -9
- package/node_modules/zca-js/dist/apis/getFriendBoardList.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/getFriendBoardList.js +0 -26
- package/node_modules/zca-js/dist/apis/getFriendOnlines.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/getFriendOnlines.js +0 -35
- package/node_modules/zca-js/dist/apis/getFriendRecommendations.d.ts +0 -42
- package/node_modules/zca-js/dist/apis/getFriendRecommendations.js +0 -27
- package/node_modules/zca-js/dist/apis/getFriendRequestStatus.d.ts +0 -8
- package/node_modules/zca-js/dist/apis/getFriendRequestStatus.js +0 -25
- package/node_modules/zca-js/dist/apis/getFullAvatar.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/getFullAvatar.js +0 -25
- package/node_modules/zca-js/dist/apis/getGroupBlockedMember.d.ts +0 -23
- package/node_modules/zca-js/dist/apis/getGroupBlockedMember.js +0 -29
- package/node_modules/zca-js/dist/apis/getGroupChatHistory.d.ts +0 -8
- package/node_modules/zca-js/dist/apis/getGroupChatHistory.js +0 -36
- package/node_modules/zca-js/dist/apis/getGroupInfo.d.ts +0 -16
- package/node_modules/zca-js/dist/apis/getGroupInfo.js +0 -32
- package/node_modules/zca-js/dist/apis/getGroupInviteBoxInfo.d.ts +0 -32
- package/node_modules/zca-js/dist/apis/getGroupInviteBoxInfo.js +0 -38
- package/node_modules/zca-js/dist/apis/getGroupInviteBoxList.d.ts +0 -38
- package/node_modules/zca-js/dist/apis/getGroupInviteBoxList.js +0 -31
- package/node_modules/zca-js/dist/apis/getGroupLinkDetail.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/getGroupLinkDetail.js +0 -25
- package/node_modules/zca-js/dist/apis/getGroupLinkInfo.d.ts +0 -34
- package/node_modules/zca-js/dist/apis/getGroupLinkInfo.js +0 -28
- package/node_modules/zca-js/dist/apis/getGroupMembersInfo.d.ts +0 -17
- package/node_modules/zca-js/dist/apis/getGroupMembersInfo.js +0 -24
- package/node_modules/zca-js/dist/apis/getHiddenConversations.d.ts +0 -11
- package/node_modules/zca-js/dist/apis/getHiddenConversations.js +0 -23
- package/node_modules/zca-js/dist/apis/getLabels.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/getLabels.js +0 -28
- package/node_modules/zca-js/dist/apis/getListBank.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/getListBank.js +0 -20
- package/node_modules/zca-js/dist/apis/getListBankAccount.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/getListBankAccount.js +0 -27
- package/node_modules/zca-js/dist/apis/getListBoard.d.ts +0 -21
- package/node_modules/zca-js/dist/apis/getListBoard.js +0 -45
- package/node_modules/zca-js/dist/apis/getListDevice.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/getListDevice.js +0 -22
- package/node_modules/zca-js/dist/apis/getListReminder.d.ts +0 -28
- package/node_modules/zca-js/dist/apis/getListReminder.js +0 -47
- package/node_modules/zca-js/dist/apis/getMultiUsersByPhones.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/getMultiUsersByPhones.js +0 -39
- package/node_modules/zca-js/dist/apis/getMute.d.ts +0 -13
- package/node_modules/zca-js/dist/apis/getMute.js +0 -22
- package/node_modules/zca-js/dist/apis/getOwnId.d.ts +0 -1
- package/node_modules/zca-js/dist/apis/getOwnId.js +0 -4
- package/node_modules/zca-js/dist/apis/getPendingGroupMembers.d.ts +0 -11
- package/node_modules/zca-js/dist/apis/getPendingGroupMembers.js +0 -27
- package/node_modules/zca-js/dist/apis/getPinConversations.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/getPinConversations.js +0 -22
- package/node_modules/zca-js/dist/apis/getPollDetail.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/getPollDetail.js +0 -30
- package/node_modules/zca-js/dist/apis/getProductCatalogList.d.ts +0 -20
- package/node_modules/zca-js/dist/apis/getProductCatalogList.js +0 -33
- package/node_modules/zca-js/dist/apis/getQR.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/getQR.js +0 -29
- package/node_modules/zca-js/dist/apis/getQuickMessageList.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/getQuickMessageList.js +0 -24
- package/node_modules/zca-js/dist/apis/getRelatedFriendGroup.d.ts +0 -6
- package/node_modules/zca-js/dist/apis/getRelatedFriendGroup.js +0 -30
- package/node_modules/zca-js/dist/apis/getReminder.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/getReminder.js +0 -25
- package/node_modules/zca-js/dist/apis/getReminderResponses.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/getReminderResponses.js +0 -24
- package/node_modules/zca-js/dist/apis/getSentFriendRequest.d.ts +0 -18
- package/node_modules/zca-js/dist/apis/getSentFriendRequest.js +0 -24
- package/node_modules/zca-js/dist/apis/getSettings.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/getSettings.js +0 -20
- package/node_modules/zca-js/dist/apis/getStickerCategoryDetail.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/getStickerCategoryDetail.js +0 -24
- package/node_modules/zca-js/dist/apis/getStickers.d.ts +0 -1
- package/node_modules/zca-js/dist/apis/getStickers.js +0 -40
- package/node_modules/zca-js/dist/apis/getStickersDetail.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/getStickersDetail.js +0 -40
- package/node_modules/zca-js/dist/apis/getUnreadMark.d.ts +0 -14
- package/node_modules/zca-js/dist/apis/getUnreadMark.js +0 -30
- package/node_modules/zca-js/dist/apis/getUserInfo.d.ts +0 -8
- package/node_modules/zca-js/dist/apis/getUserInfo.js +0 -44
- package/node_modules/zca-js/dist/apis/inviteUserToGroups.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/inviteUserToGroups.js +0 -30
- package/node_modules/zca-js/dist/apis/joinGroupInviteBox.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/joinGroupInviteBox.js +0 -25
- package/node_modules/zca-js/dist/apis/joinGroupLink.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/joinGroupLink.js +0 -27
- package/node_modules/zca-js/dist/apis/keepAlive.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/keepAlive.js +0 -22
- package/node_modules/zca-js/dist/apis/lastOnline.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/lastOnline.js +0 -26
- package/node_modules/zca-js/dist/apis/leaveGroup.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/leaveGroup.js +0 -33
- package/node_modules/zca-js/dist/apis/listen.d.ts +0 -102
- package/node_modules/zca-js/dist/apis/listen.js +0 -425
- package/node_modules/zca-js/dist/apis/lockPoll.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/lockPoll.js +0 -28
- package/node_modules/zca-js/dist/apis/login.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/login.js +0 -96
- package/node_modules/zca-js/dist/apis/loginQR.d.ts +0 -71
- package/node_modules/zca-js/dist/apis/loginQR.js +0 -376
- package/node_modules/zca-js/dist/apis/logoutV2.js +0 -79
- package/node_modules/zca-js/dist/apis/lostFocus.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/lostFocus.js +0 -23
- package/node_modules/zca-js/dist/apis/parseLink.d.ts +0 -21
- package/node_modules/zca-js/dist/apis/parseLink.js +0 -27
- package/node_modules/zca-js/dist/apis/registerCatalog.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/registerCatalog.js +0 -27
- package/node_modules/zca-js/dist/apis/rejectFriendRequest.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/rejectFriendRequest.js +0 -27
- package/node_modules/zca-js/dist/apis/removeFriend.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/removeFriend.js +0 -28
- package/node_modules/zca-js/dist/apis/removeFriendAlias.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/removeFriendAlias.js +0 -24
- package/node_modules/zca-js/dist/apis/removeGroupBlockedMember.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/removeGroupBlockedMember.js +0 -28
- package/node_modules/zca-js/dist/apis/removeGroupDeputy.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/removeGroupDeputy.js +0 -30
- package/node_modules/zca-js/dist/apis/removeQuickMessage.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/removeQuickMessage.js +0 -27
- package/node_modules/zca-js/dist/apis/removeReminder.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/removeReminder.js +0 -40
- package/node_modules/zca-js/dist/apis/removeUnreadMark.d.ts +0 -8
- package/node_modules/zca-js/dist/apis/removeUnreadMark.js +0 -50
- package/node_modules/zca-js/dist/apis/removeUserFromGroup.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/removeUserFromGroup.js +0 -34
- package/node_modules/zca-js/dist/apis/resetHiddenConversPin.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/resetHiddenConversPin.js +0 -20
- package/node_modules/zca-js/dist/apis/reuseAvatar.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/reuseAvatar.js +0 -26
- package/node_modules/zca-js/dist/apis/reviewPendingMemberRequest.d.ts +0 -14
- package/node_modules/zca-js/dist/apis/reviewPendingMemberRequest.js +0 -38
- package/node_modules/zca-js/dist/apis/scanURL.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/scanURL.js +0 -28
- package/node_modules/zca-js/dist/apis/searchSticker.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/searchSticker.js +0 -28
- package/node_modules/zca-js/dist/apis/sendBankCard.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/sendBankCard.js +0 -53
- package/node_modules/zca-js/dist/apis/sendCard.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/sendCard.js +0 -75
- package/node_modules/zca-js/dist/apis/sendDeliveredEvent.d.ts +0 -16
- package/node_modules/zca-js/dist/apis/sendDeliveredEvent.js +0 -55
- package/node_modules/zca-js/dist/apis/sendFriendRequest.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/sendFriendRequest.js +0 -39
- package/node_modules/zca-js/dist/apis/sendLink.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/sendLink.js +0 -78
- package/node_modules/zca-js/dist/apis/sendMessage.d.ts +0 -105
- package/node_modules/zca-js/dist/apis/sendMessage.js +0 -486
- package/node_modules/zca-js/dist/apis/sendReport.d.ts +0 -17
- package/node_modules/zca-js/dist/apis/sendReport.js +0 -53
- package/node_modules/zca-js/dist/apis/sendSeenEvent.d.ts +0 -16
- package/node_modules/zca-js/dist/apis/sendSeenEvent.js +0 -63
- package/node_modules/zca-js/dist/apis/sendSticker.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/sendSticker.js +0 -74
- package/node_modules/zca-js/dist/apis/sendTypingEvent.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/sendTypingEvent.js +0 -33
- package/node_modules/zca-js/dist/apis/sendVideo.d.ts +0 -35
- package/node_modules/zca-js/dist/apis/sendVideo.js +0 -134
- package/node_modules/zca-js/dist/apis/sendVoice.d.ts +0 -12
- package/node_modules/zca-js/dist/apis/sendVoice.js +0 -89
- package/node_modules/zca-js/dist/apis/setHiddenConversations.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/setHiddenConversations.js +0 -39
- package/node_modules/zca-js/dist/apis/setMute.d.ts +0 -20
- package/node_modules/zca-js/dist/apis/setMute.js +0 -67
- package/node_modules/zca-js/dist/apis/setPinnedConversations.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/setPinnedConversations.js +0 -34
- package/node_modules/zca-js/dist/apis/sharePoll.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/sharePoll.js +0 -28
- package/node_modules/zca-js/dist/apis/unblockUser.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/unblockUser.js +0 -28
- package/node_modules/zca-js/dist/apis/undo.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/undo.js +0 -42
- package/node_modules/zca-js/dist/apis/undoFriendRequest.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/undoFriendRequest.js +0 -27
- package/node_modules/zca-js/dist/apis/updateActiveStatus.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/updateActiveStatus.js +0 -27
- package/node_modules/zca-js/dist/apis/updateArchivedChatList.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/updateArchivedChatList.js +0 -34
- package/node_modules/zca-js/dist/apis/updateAutoDeleteChat.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/updateAutoDeleteChat.js +0 -40
- package/node_modules/zca-js/dist/apis/updateAutoReply.d.ts +0 -15
- package/node_modules/zca-js/dist/apis/updateAutoReply.js +0 -38
- package/node_modules/zca-js/dist/apis/updateBankAccount.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/updateBankAccount.js +0 -31
- package/node_modules/zca-js/dist/apis/updateCatalog.d.ts +0 -11
- package/node_modules/zca-js/dist/apis/updateCatalog.js +0 -30
- package/node_modules/zca-js/dist/apis/updateGroupSettings.d.ts +0 -40
- package/node_modules/zca-js/dist/apis/updateGroupSettings.js +0 -43
- package/node_modules/zca-js/dist/apis/updateHiddenConversPin.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/updateHiddenConversPin.js +0 -30
- package/node_modules/zca-js/dist/apis/updateLabels.d.ts +0 -15
- package/node_modules/zca-js/dist/apis/updateLabels.js +0 -34
- package/node_modules/zca-js/dist/apis/updateLang.d.ts +0 -6
- package/node_modules/zca-js/dist/apis/updateLang.js +0 -30
- package/node_modules/zca-js/dist/apis/updateProductCatalog.d.ts +0 -25
- package/node_modules/zca-js/dist/apis/updateProductCatalog.js +0 -51
- package/node_modules/zca-js/dist/apis/updateProfile.d.ts +0 -20
- package/node_modules/zca-js/dist/apis/updateProfile.js +0 -43
- package/node_modules/zca-js/dist/apis/updateProfileBio.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/updateProfileBio.js +0 -27
- package/node_modules/zca-js/dist/apis/updateQuickMessage.d.ts +0 -11
- package/node_modules/zca-js/dist/apis/updateQuickMessage.js +0 -61
- package/node_modules/zca-js/dist/apis/updateSettings.d.ts +0 -16
- package/node_modules/zca-js/dist/apis/updateSettings.js +0 -90
- package/node_modules/zca-js/dist/apis/upgradeGroupToCommunity.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/upgradeGroupToCommunity.js +0 -27
- package/node_modules/zca-js/dist/apis/uploadAttachment.d.ts +0 -50
- package/node_modules/zca-js/dist/apis/uploadAttachment.js +0 -197
- package/node_modules/zca-js/dist/apis/uploadProductPhoto.d.ts +0 -14
- package/node_modules/zca-js/dist/apis/uploadProductPhoto.js +0 -50
- package/node_modules/zca-js/dist/apis/votePoll.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/votePoll.js +0 -29
- package/node_modules/zca-js/dist/apis.d.ts +0 -317
- package/node_modules/zca-js/dist/apis.js +0 -319
- package/node_modules/zca-js/dist/cjs/Errors/ZaloApiError.cjs +0 -11
- package/node_modules/zca-js/dist/cjs/Errors/ZaloApiLoginQRAborted.cjs +0 -12
- package/node_modules/zca-js/dist/cjs/Errors/ZaloApiLoginQRDeclined.cjs +0 -12
- package/node_modules/zca-js/dist/cjs/Errors/ZaloApiMissingImageMetadataGetter.cjs +0 -12
- package/node_modules/zca-js/dist/cjs/apis/acceptFriendRequest.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/addGroupBlockedMember.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/addGroupDeputy.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/addPollOptions.cjs +0 -31
- package/node_modules/zca-js/dist/cjs/apis/addQuickMessage.cjs +0 -65
- package/node_modules/zca-js/dist/cjs/apis/addReaction.cjs +0 -308
- package/node_modules/zca-js/dist/cjs/apis/addUnreadMark.cjs +0 -66
- package/node_modules/zca-js/dist/cjs/apis/addUserToGroup.cjs +0 -39
- package/node_modules/zca-js/dist/cjs/apis/blockUser.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/blockViewFeed.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/changeAccountAvatar.cjs +0 -57
- package/node_modules/zca-js/dist/cjs/apis/changeFriendAlias.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/changeGroupAvatar.cjs +0 -49
- package/node_modules/zca-js/dist/cjs/apis/changeGroupName.cjs +0 -37
- package/node_modules/zca-js/dist/cjs/apis/changeGroupOwner.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/createAutoReply.cjs +0 -42
- package/node_modules/zca-js/dist/cjs/apis/createBankAccount.cjs +0 -37
- package/node_modules/zca-js/dist/cjs/apis/createCatalog.cjs +0 -34
- package/node_modules/zca-js/dist/cjs/apis/createGroup.cjs +0 -48
- package/node_modules/zca-js/dist/cjs/apis/createNote.cjs +0 -52
- package/node_modules/zca-js/dist/cjs/apis/createPoll.cjs +0 -45
- package/node_modules/zca-js/dist/cjs/apis/createProductCatalog.cjs +0 -55
- package/node_modules/zca-js/dist/cjs/apis/createReminder.cjs +0 -77
- package/node_modules/zca-js/dist/cjs/apis/custom.cjs +0 -19
- package/node_modules/zca-js/dist/cjs/apis/deleteAutoReply.cjs +0 -34
- package/node_modules/zca-js/dist/cjs/apis/deleteAvatar.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/deleteBankAccount.cjs +0 -37
- package/node_modules/zca-js/dist/cjs/apis/deleteCatalog.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/deleteChat.cjs +0 -64
- package/node_modules/zca-js/dist/cjs/apis/deleteGroupInviteBox.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/deleteMessage.cjs +0 -66
- package/node_modules/zca-js/dist/cjs/apis/deleteProductCatalog.cjs +0 -36
- package/node_modules/zca-js/dist/cjs/apis/disableGroupLink.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/disperseGroup.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/editNote.cjs +0 -51
- package/node_modules/zca-js/dist/cjs/apis/editReminder.cjs +0 -75
- package/node_modules/zca-js/dist/cjs/apis/enableGroupLink.cjs +0 -30
- package/node_modules/zca-js/dist/cjs/apis/fetchAccountInfo.cjs +0 -15
- package/node_modules/zca-js/dist/cjs/apis/findUser.cjs +0 -56
- package/node_modules/zca-js/dist/cjs/apis/findUserByUsername.cjs +0 -41
- package/node_modules/zca-js/dist/cjs/apis/forwardMessage.cjs +0 -129
- package/node_modules/zca-js/dist/cjs/apis/getAliasList.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/getAllFriends.cjs +0 -48
- package/node_modules/zca-js/dist/cjs/apis/getAllGroups.cjs +0 -15
- package/node_modules/zca-js/dist/cjs/apis/getArchivedChatList.cjs +0 -28
- package/node_modules/zca-js/dist/cjs/apis/getAutoDeleteChat.cjs +0 -26
- package/node_modules/zca-js/dist/cjs/apis/getAutoReplyList.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/getAvatarList.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/getAvatarUrlProfile.cjs +0 -44
- package/node_modules/zca-js/dist/cjs/apis/getBizAccount.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/getCatalogList.cjs +0 -37
- package/node_modules/zca-js/dist/cjs/apis/getCloseFriends.cjs +0 -25
- package/node_modules/zca-js/dist/cjs/apis/getContext.cjs +0 -9
- package/node_modules/zca-js/dist/cjs/apis/getCookie.cjs +0 -14
- package/node_modules/zca-js/dist/cjs/apis/getFriendBoardList.cjs +0 -31
- package/node_modules/zca-js/dist/cjs/apis/getFriendOnlines.cjs +0 -40
- package/node_modules/zca-js/dist/cjs/apis/getFriendRecommendations.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/getFriendRequestStatus.cjs +0 -30
- package/node_modules/zca-js/dist/cjs/apis/getFullAvatar.cjs +0 -30
- package/node_modules/zca-js/dist/cjs/apis/getGroupBlockedMember.cjs +0 -34
- package/node_modules/zca-js/dist/cjs/apis/getGroupChatHistory.cjs +0 -51
- package/node_modules/zca-js/dist/cjs/apis/getGroupInfo.cjs +0 -37
- package/node_modules/zca-js/dist/cjs/apis/getGroupInviteBoxInfo.cjs +0 -43
- package/node_modules/zca-js/dist/cjs/apis/getGroupInviteBoxList.cjs +0 -36
- package/node_modules/zca-js/dist/cjs/apis/getGroupLinkDetail.cjs +0 -30
- package/node_modules/zca-js/dist/cjs/apis/getGroupLinkInfo.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/getGroupMembersInfo.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/getHiddenConversations.cjs +0 -28
- package/node_modules/zca-js/dist/cjs/apis/getLabels.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/getListBank.cjs +0 -25
- package/node_modules/zca-js/dist/cjs/apis/getListBankAccount.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/getListBoard.cjs +0 -59
- package/node_modules/zca-js/dist/cjs/apis/getListDevice.cjs +0 -27
- package/node_modules/zca-js/dist/cjs/apis/getListReminder.cjs +0 -61
- package/node_modules/zca-js/dist/cjs/apis/getMultiUsersByPhones.cjs +0 -53
- package/node_modules/zca-js/dist/cjs/apis/getMute.cjs +0 -27
- package/node_modules/zca-js/dist/cjs/apis/getOwnId.cjs +0 -9
- package/node_modules/zca-js/dist/cjs/apis/getPendingGroupMembers.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/getPinConversations.cjs +0 -27
- package/node_modules/zca-js/dist/cjs/apis/getPollDetail.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/getProductCatalogList.cjs +0 -38
- package/node_modules/zca-js/dist/cjs/apis/getQR.cjs +0 -34
- package/node_modules/zca-js/dist/cjs/apis/getQuickMessageList.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/getRelatedFriendGroup.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/getReminder.cjs +0 -30
- package/node_modules/zca-js/dist/cjs/apis/getReminderResponses.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/getSentFriendRequest.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/getSettings.cjs +0 -25
- package/node_modules/zca-js/dist/cjs/apis/getStickerCategoryDetail.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/getStickers.cjs +0 -45
- package/node_modules/zca-js/dist/cjs/apis/getStickersDetail.cjs +0 -45
- package/node_modules/zca-js/dist/cjs/apis/getUnreadMark.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/getUserInfo.cjs +0 -58
- package/node_modules/zca-js/dist/cjs/apis/inviteUserToGroups.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/joinGroupInviteBox.cjs +0 -30
- package/node_modules/zca-js/dist/cjs/apis/joinGroupLink.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/keepAlive.cjs +0 -27
- package/node_modules/zca-js/dist/cjs/apis/lastOnline.cjs +0 -31
- package/node_modules/zca-js/dist/cjs/apis/leaveGroup.cjs +0 -38
- package/node_modules/zca-js/dist/cjs/apis/listen.cjs +0 -440
- package/node_modules/zca-js/dist/cjs/apis/lockPoll.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/login.cjs +0 -102
- package/node_modules/zca-js/dist/cjs/apis/loginQR.cjs +0 -368
- package/node_modules/zca-js/dist/cjs/apis/logoutV2.cjs +0 -83
- package/node_modules/zca-js/dist/cjs/apis/lostFocus.cjs +0 -28
- package/node_modules/zca-js/dist/cjs/apis/parseLink.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/registerCatalog.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/rejectFriendRequest.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/removeFriend.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/removeFriendAlias.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/removeGroupBlockedMember.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/removeGroupDeputy.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/removeQuickMessage.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/removeReminder.cjs +0 -54
- package/node_modules/zca-js/dist/cjs/apis/removeUnreadMark.cjs +0 -64
- package/node_modules/zca-js/dist/cjs/apis/removeUserFromGroup.cjs +0 -39
- package/node_modules/zca-js/dist/cjs/apis/resetHiddenConversPin.cjs +0 -25
- package/node_modules/zca-js/dist/cjs/apis/reuseAvatar.cjs +0 -31
- package/node_modules/zca-js/dist/cjs/apis/reviewPendingMemberRequest.cjs +0 -43
- package/node_modules/zca-js/dist/cjs/apis/scanURL.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/searchSticker.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/sendBankCard.cjs +0 -68
- package/node_modules/zca-js/dist/cjs/apis/sendCard.cjs +0 -89
- package/node_modules/zca-js/dist/cjs/apis/sendDeliveredEvent.cjs +0 -69
- package/node_modules/zca-js/dist/cjs/apis/sendFriendRequest.cjs +0 -44
- package/node_modules/zca-js/dist/cjs/apis/sendLink.cjs +0 -92
- package/node_modules/zca-js/dist/cjs/apis/sendMessage.cjs +0 -500
- package/node_modules/zca-js/dist/cjs/apis/sendReport.cjs +0 -67
- package/node_modules/zca-js/dist/cjs/apis/sendSeenEvent.cjs +0 -77
- package/node_modules/zca-js/dist/cjs/apis/sendSticker.cjs +0 -88
- package/node_modules/zca-js/dist/cjs/apis/sendTypingEvent.cjs +0 -47
- package/node_modules/zca-js/dist/cjs/apis/sendVideo.cjs +0 -148
- package/node_modules/zca-js/dist/cjs/apis/sendVoice.cjs +0 -103
- package/node_modules/zca-js/dist/cjs/apis/setHiddenConversations.cjs +0 -53
- package/node_modules/zca-js/dist/cjs/apis/setMute.cjs +0 -81
- package/node_modules/zca-js/dist/cjs/apis/setPinnedConversations.cjs +0 -48
- package/node_modules/zca-js/dist/cjs/apis/sharePoll.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/unblockUser.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/undo.cjs +0 -56
- package/node_modules/zca-js/dist/cjs/apis/undoFriendRequest.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/updateActiveStatus.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/updateArchivedChatList.cjs +0 -39
- package/node_modules/zca-js/dist/cjs/apis/updateAutoDeleteChat.cjs +0 -54
- package/node_modules/zca-js/dist/cjs/apis/updateAutoReply.cjs +0 -43
- package/node_modules/zca-js/dist/cjs/apis/updateBankAccount.cjs +0 -36
- package/node_modules/zca-js/dist/cjs/apis/updateCatalog.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/updateGroupSettings.cjs +0 -48
- package/node_modules/zca-js/dist/cjs/apis/updateHiddenConversPin.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/updateLabels.cjs +0 -39
- package/node_modules/zca-js/dist/cjs/apis/updateLang.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/updateProductCatalog.cjs +0 -56
- package/node_modules/zca-js/dist/cjs/apis/updateProfile.cjs +0 -48
- package/node_modules/zca-js/dist/cjs/apis/updateProfileBio.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/updateQuickMessage.cjs +0 -66
- package/node_modules/zca-js/dist/cjs/apis/updateSettings.cjs +0 -95
- package/node_modules/zca-js/dist/cjs/apis/upgradeGroupToCommunity.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/uploadAttachment.cjs +0 -211
- package/node_modules/zca-js/dist/cjs/apis/uploadProductPhoto.cjs +0 -55
- package/node_modules/zca-js/dist/cjs/apis/votePoll.cjs +0 -34
- package/node_modules/zca-js/dist/cjs/apis.cjs +0 -324
- package/node_modules/zca-js/dist/cjs/context.cjs +0 -34
- package/node_modules/zca-js/dist/cjs/index.cjs +0 -159
- package/node_modules/zca-js/dist/cjs/models/AutoReply.cjs +0 -9
- package/node_modules/zca-js/dist/cjs/models/Bank.cjs +0 -263
- package/node_modules/zca-js/dist/cjs/models/Board.cjs +0 -8
- package/node_modules/zca-js/dist/cjs/models/DeliveredMessage.cjs +0 -23
- package/node_modules/zca-js/dist/cjs/models/Enum.cjs +0 -27
- package/node_modules/zca-js/dist/cjs/models/FriendEvent.cjs +0 -87
- package/node_modules/zca-js/dist/cjs/models/Group.cjs +0 -13
- package/node_modules/zca-js/dist/cjs/models/GroupEvent.cjs +0 -94
- package/node_modules/zca-js/dist/cjs/models/Message.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/models/Reaction.cjs +0 -74
- package/node_modules/zca-js/dist/cjs/models/Reminder.cjs +0 -9
- package/node_modules/zca-js/dist/cjs/models/SeenMessage.cjs +0 -23
- package/node_modules/zca-js/dist/cjs/models/Typing.cjs +0 -23
- package/node_modules/zca-js/dist/cjs/models/Undo.cjs +0 -16
- package/node_modules/zca-js/dist/cjs/models/ZBusiness.cjs +0 -39
- package/node_modules/zca-js/dist/cjs/update.cjs +0 -34
- package/node_modules/zca-js/dist/cjs/utils.cjs +0 -703
- package/node_modules/zca-js/dist/cjs/zalo.cjs +0 -112
- package/node_modules/zca-js/dist/context.d.ts +0 -179
- package/node_modules/zca-js/dist/context.js +0 -28
- package/node_modules/zca-js/dist/index.d.ts +0 -166
- package/node_modules/zca-js/dist/index.js +0 -14
- package/node_modules/zca-js/dist/models/Attachment.d.ts +0 -9
- package/node_modules/zca-js/dist/models/Attachment.js +0 -1
- package/node_modules/zca-js/dist/models/AutoReply.d.ts +0 -20
- package/node_modules/zca-js/dist/models/AutoReply.js +0 -7
- package/node_modules/zca-js/dist/models/Bank.d.ts +0 -291
- package/node_modules/zca-js/dist/models/Bank.js +0 -262
- package/node_modules/zca-js/dist/models/Board.d.ts +0 -60
- package/node_modules/zca-js/dist/models/Board.js +0 -6
- package/node_modules/zca-js/dist/models/Catalog.d.ts +0 -16
- package/node_modules/zca-js/dist/models/Catalog.js +0 -1
- package/node_modules/zca-js/dist/models/DeliveredMessage.d.ts +0 -27
- package/node_modules/zca-js/dist/models/DeliveredMessage.js +0 -17
- package/node_modules/zca-js/dist/models/Enum.d.ts +0 -21
- package/node_modules/zca-js/dist/models/Enum.js +0 -25
- package/node_modules/zca-js/dist/models/FriendEvent.d.ts +0 -107
- package/node_modules/zca-js/dist/models/FriendEvent.js +0 -83
- package/node_modules/zca-js/dist/models/Group.d.ts +0 -125
- package/node_modules/zca-js/dist/models/Group.js +0 -11
- package/node_modules/zca-js/dist/models/GroupEvent.d.ts +0 -178
- package/node_modules/zca-js/dist/models/GroupEvent.js +0 -90
- package/node_modules/zca-js/dist/models/Label.d.ts +0 -10
- package/node_modules/zca-js/dist/models/Label.js +0 -1
- package/node_modules/zca-js/dist/models/Message.d.ts +0 -91
- package/node_modules/zca-js/dist/models/Message.js +0 -29
- package/node_modules/zca-js/dist/models/ProductCatalog.d.ts +0 -17
- package/node_modules/zca-js/dist/models/ProductCatalog.js +0 -1
- package/node_modules/zca-js/dist/models/QuickMessage.d.ts +0 -25
- package/node_modules/zca-js/dist/models/QuickMessage.js +0 -1
- package/node_modules/zca-js/dist/models/Reaction.d.ts +0 -85
- package/node_modules/zca-js/dist/models/Reaction.js +0 -70
- package/node_modules/zca-js/dist/models/Reminder.d.ts +0 -51
- package/node_modules/zca-js/dist/models/Reminder.js +0 -7
- package/node_modules/zca-js/dist/models/SeenMessage.d.ts +0 -26
- package/node_modules/zca-js/dist/models/SeenMessage.js +0 -17
- package/node_modules/zca-js/dist/models/Sticker.d.ts +0 -27
- package/node_modules/zca-js/dist/models/Sticker.js +0 -1
- package/node_modules/zca-js/dist/models/Typing.d.ts +0 -24
- package/node_modules/zca-js/dist/models/Typing.js +0 -17
- package/node_modules/zca-js/dist/models/Undo.d.ts +0 -34
- package/node_modules/zca-js/dist/models/Undo.js +0 -12
- package/node_modules/zca-js/dist/models/User.d.ts +0 -70
- package/node_modules/zca-js/dist/models/User.js +0 -1
- package/node_modules/zca-js/dist/models/ZBusiness.d.ts +0 -22
- package/node_modules/zca-js/dist/models/ZBusiness.js +0 -35
- package/node_modules/zca-js/dist/models/index.d.ts +0 -22
- package/node_modules/zca-js/dist/models/index.js +0 -22
- package/node_modules/zca-js/dist/update.d.ts +0 -2
- package/node_modules/zca-js/dist/update.js +0 -29
- package/node_modules/zca-js/dist/utils.d.ts +0 -167
- package/node_modules/zca-js/dist/utils.js +0 -719
- package/node_modules/zca-js/dist/zalo.d.ts +0 -41
- package/node_modules/zca-js/dist/zalo.js +0 -107
- package/node_modules/zca-js/eslint.config.js +0 -21
- package/node_modules/zca-js/index.d.ts +0 -2
- package/node_modules/zca-js/package.json +0 -78
- package/node_modules/zca-js/rollup.config.js +0 -28
- package/patches/zca-js+2.2.0.patch +0 -1445
- package/src/cli.test.js +0 -127
- package/src/core/forward.js +0 -112
- package/src/core/group-history.js +0 -248
- package/src/core/group-invite.js +0 -53
- package/src/core/offline-queue.js +0 -194
- package/src/core/pin.js +0 -222
- package/src/core/socket-tap.js +0 -154
- package/src/core/sync-v2/assets.js +0 -181
- package/src/core/sync-v2/gid.js +0 -106
- package/src/core/sync-v2/keepalive.js +0 -177
- package/src/core/sync-v2/message-types.js +0 -522
- package/src/core/sync-v2/renewlink.js +0 -124
- package/src/core/sync-v2/zcloud-cipher.js +0 -88
- package/src/core/zca-custom.js +0 -78
- package/src/mcp/message-buffer.test.js +0 -360
- package/src/mcp/notifier.test.js +0 -275
- package/src/mcp/thread-filter.test.js +0 -206
- package/src/mcp/thread-name-cache.test.js +0 -142
- package/src/utils/atomic-file.js +0 -209
- package/src/utils/bank-helpers.test.js +0 -66
- package/src/utils/device-fingerprint.js +0 -72
- package/src/utils/mentions.js +0 -140
- package/src/utils/proxy-helpers.test.js +0 -36
- package/src/utils/split-message.js +0 -166
- package/src/utils/urgency.js +0 -29
- /package/src/{core → zalo/custom}/user-info.js +0 -0
- /package/src/{utils → zalo/format}/extract-message-text.js +0 -0
- /package/src/{utils → zalo/format}/markdown.js +0 -0
|
@@ -0,0 +1,808 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one confirmation guard for destructive actions, shared by the CLI and the MCP server.
|
|
3
|
+
*
|
|
4
|
+
* Which actions are guarded follows Zalo's own confirm dialogs: leaving or breaking up a group, removing a
|
|
5
|
+
* member or a friend, recalling or deleting a message, removing a reminder, closing a poll, and the like. Each
|
|
6
|
+
* guarded action is one entry in GUARDS, and the sentence that says what it would do is built there once, so
|
|
7
|
+
* `group leave` on the command line and `zalo_group leave` over MCP refuse, preview and ask in the same words.
|
|
8
|
+
*
|
|
9
|
+
* - CLI: a guarded command acts only with `-y, --yes`; `--dry-run` reports what would happen and sends nothing
|
|
10
|
+
* (exit 0); without either nothing is sent and the command exits 2 (CONFIRM_EXIT_CODE), so a script can tell
|
|
11
|
+
* "not confirmed" from "failed" (1). There is no global off switch.
|
|
12
|
+
* - MCP: a guarded action takes `confirm: true` to act and `dryRun: true` to preview. What `confirm` means
|
|
13
|
+
* depends on the deployment's confirm mode (resolveConfirmMode): `agent` (the caller's confirm: true is
|
|
14
|
+
* enough), `human` (the server asks the person through MCP form elicitation, or else on a one-time approve page,
|
|
15
|
+
* src/core/secure-page.js, whose `ticket` the repeated call carries; the caller cannot answer for them), or `off`
|
|
16
|
+
* (no question). `zalo_write` runs raw endpoints and is guarded even when the mode is `off`. Where the approve page's
|
|
17
|
+
* link goes and what it asks besides a click are the deployment's `approval.deliver` and `approval.secret`
|
|
18
|
+
* (src/core/approval.js).
|
|
19
|
+
*/
|
|
20
|
+
import { error, info } from "../utils/output.js";
|
|
21
|
+
import { askOnSecurePage, getSecurePage } from "./secure-page.js";
|
|
22
|
+
import { approverFor } from "./approval.js";
|
|
23
|
+
import { resolveApproval } from "./deploy-policy.js";
|
|
24
|
+
import { policyFor } from "./policy-layer.js";
|
|
25
|
+
|
|
26
|
+
/** What an unconfirmed guarded CLI command exits with: distinct from a failure (1). */
|
|
27
|
+
export const CONFIRM_EXIT_CODE = 2;
|
|
28
|
+
|
|
29
|
+
/** The deployment-wide MCP confirm modes. */
|
|
30
|
+
export const CONFIRM_MODES = Object.freeze(["agent", "human", "off"]);
|
|
31
|
+
|
|
32
|
+
/** Up to five ids, then a count: the sentence stays readable for a long list. */
|
|
33
|
+
function ids(list) {
|
|
34
|
+
const all = (Array.isArray(list) ? list : [list]).filter((v) => v !== undefined && v !== null).map(String);
|
|
35
|
+
if (all.length <= 5) return all.join(", ");
|
|
36
|
+
return `${all.slice(0, 5).join(", ")} and ${all.length - 5} more`;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** "1 member" / "3 members", for the sentences below. */
|
|
40
|
+
const count = (list, one) => {
|
|
41
|
+
const n = Array.isArray(list) ? list.length : 1;
|
|
42
|
+
return `${n} ${one}${n === 1 ? "" : "s"}`;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Every guarded action. `cli` and `mcp` name the command and the tool action that run it (null where one
|
|
47
|
+
* surface has none); `what(target)` finishes the sentence "this would …"; `irreversible` (or a function of the
|
|
48
|
+
* target) says whether the action can be taken back.
|
|
49
|
+
*/
|
|
50
|
+
export const GUARDS = Object.freeze({
|
|
51
|
+
"group.leave": {
|
|
52
|
+
cli: "group leave",
|
|
53
|
+
mcp: "zalo_group leave",
|
|
54
|
+
irreversible: true,
|
|
55
|
+
what: (t) =>
|
|
56
|
+
`leave group ${t.groupId}${t.silent ? " silently (the owner still sees it)" : ""}` +
|
|
57
|
+
(t.newOwner
|
|
58
|
+
? `, handing ownership to ${t.newOwner} first`
|
|
59
|
+
: t.randomOwner
|
|
60
|
+
? ", letting Zalo give ownership to a random member"
|
|
61
|
+
: ""),
|
|
62
|
+
},
|
|
63
|
+
"group.removeMember": {
|
|
64
|
+
cli: "group remove-member",
|
|
65
|
+
mcp: "zalo_group remove_member",
|
|
66
|
+
irreversible: true,
|
|
67
|
+
what: (t) => `remove ${count(t.userIds, "member")} (${ids(t.userIds)}) from group ${t.groupId}`,
|
|
68
|
+
},
|
|
69
|
+
"group.removeAdmin": {
|
|
70
|
+
cli: "group remove-admin",
|
|
71
|
+
mcp: "zalo_group remove_admin",
|
|
72
|
+
irreversible: false,
|
|
73
|
+
what: (t) => `take admin rights away from ${ids(t.userIds)} in group ${t.groupId}`,
|
|
74
|
+
},
|
|
75
|
+
"group.transferOwner": {
|
|
76
|
+
cli: "group transfer-owner",
|
|
77
|
+
mcp: "zalo_group transfer_owner",
|
|
78
|
+
irreversible: true,
|
|
79
|
+
what: (t) => `make ${t.userId} the owner of group ${t.groupId}; this account stops being its owner`,
|
|
80
|
+
},
|
|
81
|
+
"group.disperse": {
|
|
82
|
+
cli: "group disperse",
|
|
83
|
+
mcp: "zalo_group disperse",
|
|
84
|
+
irreversible: true,
|
|
85
|
+
what: (t) =>
|
|
86
|
+
`disband group ${t.groupId} for every member` +
|
|
87
|
+
(Number.isFinite(t.others) ? ` (${t.others} other member(s) lose it too)` : ""),
|
|
88
|
+
},
|
|
89
|
+
"group.disableLink": {
|
|
90
|
+
cli: "group disable-link",
|
|
91
|
+
mcp: "zalo_group disable_link",
|
|
92
|
+
irreversible: true,
|
|
93
|
+
what: (t) => `turn off group ${t.groupId}'s invite link; the current link stops working for good`,
|
|
94
|
+
},
|
|
95
|
+
"group.settings": {
|
|
96
|
+
cli: "group settings",
|
|
97
|
+
mcp: "zalo_group settings",
|
|
98
|
+
irreversible: false,
|
|
99
|
+
what: (t) =>
|
|
100
|
+
t.approvalOff
|
|
101
|
+
? `turn off membership approval in group ${t.groupId}, so anyone with the link joins without approval`
|
|
102
|
+
: `change the settings of group ${t.groupId}`,
|
|
103
|
+
},
|
|
104
|
+
"group.blockMember": {
|
|
105
|
+
cli: "group block-member",
|
|
106
|
+
mcp: "zalo_group block_member",
|
|
107
|
+
irreversible: false,
|
|
108
|
+
what: (t) => `block ${ids(t.userIds)} from group ${t.groupId}; they cannot rejoin until unblocked`,
|
|
109
|
+
},
|
|
110
|
+
"friend.remove": {
|
|
111
|
+
cli: "friend remove",
|
|
112
|
+
mcp: "zalo_friend remove",
|
|
113
|
+
irreversible: true,
|
|
114
|
+
what: (t) => `unfriend ${t.userId}; becoming friends again takes a new friend request`,
|
|
115
|
+
},
|
|
116
|
+
"friend.block": {
|
|
117
|
+
cli: "friend block",
|
|
118
|
+
mcp: "zalo_friend block",
|
|
119
|
+
irreversible: false,
|
|
120
|
+
what: (t) => `block ${t.userId}: they can no longer message or call this account`,
|
|
121
|
+
},
|
|
122
|
+
"friend.reject": {
|
|
123
|
+
cli: "friend reject",
|
|
124
|
+
mcp: "zalo_friend reject",
|
|
125
|
+
irreversible: true,
|
|
126
|
+
what: (t) => `reject the friend request from ${t.userId}`,
|
|
127
|
+
},
|
|
128
|
+
"friend.undoRequest": {
|
|
129
|
+
cli: "friend undo-request",
|
|
130
|
+
mcp: "zalo_friend undo",
|
|
131
|
+
irreversible: false,
|
|
132
|
+
what: (t) => `cancel the friend request this account sent to ${t.userId}`,
|
|
133
|
+
},
|
|
134
|
+
"msg.undo": {
|
|
135
|
+
cli: "msg undo",
|
|
136
|
+
mcp: "zalo_undo",
|
|
137
|
+
irreversible: true,
|
|
138
|
+
what: (t) => `recall message ${t.msgId} for everyone in conversation ${t.threadId}`,
|
|
139
|
+
},
|
|
140
|
+
"msg.delete": {
|
|
141
|
+
cli: "msg delete",
|
|
142
|
+
mcp: "zalo_delete_message",
|
|
143
|
+
irreversible: true,
|
|
144
|
+
what: (t) =>
|
|
145
|
+
t.everyone
|
|
146
|
+
? `delete message ${t.msgId} for everyone in group ${t.threadId}`
|
|
147
|
+
: `delete message ${t.msgId} in conversation ${t.threadId} from this account's view`,
|
|
148
|
+
},
|
|
149
|
+
"conv.delete": {
|
|
150
|
+
cli: "conv delete",
|
|
151
|
+
mcp: "zalo_conversation delete",
|
|
152
|
+
irreversible: true,
|
|
153
|
+
what: (t) => `delete the history of conversation ${t.threadId} on Zalo, for this account`,
|
|
154
|
+
},
|
|
155
|
+
"conv.hiddenPinReset": {
|
|
156
|
+
cli: "conv hidden-pin-reset",
|
|
157
|
+
mcp: "zalo_conversation hidden_pin_reset",
|
|
158
|
+
irreversible: true,
|
|
159
|
+
what: () =>
|
|
160
|
+
"remove the PIN that protects this account's hidden conversations and, as Zalo does, delete every " +
|
|
161
|
+
"hidden conversation's history for this account",
|
|
162
|
+
},
|
|
163
|
+
"conv.unhide": {
|
|
164
|
+
cli: "conv unhide",
|
|
165
|
+
mcp: "zalo_conversation unhide",
|
|
166
|
+
irreversible: false,
|
|
167
|
+
what: (t) => `unhide ${count(t.threadIds, "conversation")} (${ids(t.threadIds)}): they show without the PIN`,
|
|
168
|
+
},
|
|
169
|
+
"conv.forget": {
|
|
170
|
+
cli: "conv forget",
|
|
171
|
+
mcp: "zalo_conversation forget",
|
|
172
|
+
irreversible: true,
|
|
173
|
+
what: (t) =>
|
|
174
|
+
`delete this machine's copy of ${t.orphans ? "every orphaned conversation" : `conversation ${t.threadId}`} ` +
|
|
175
|
+
"(messages, board items, reminders and downloaded media); Zalo is not contacted",
|
|
176
|
+
},
|
|
177
|
+
"poll.lock": {
|
|
178
|
+
cli: "poll lock",
|
|
179
|
+
mcp: "zalo_poll lock",
|
|
180
|
+
irreversible: true,
|
|
181
|
+
what: (t) => `close poll ${t.pollId}; nobody can vote on it any more`,
|
|
182
|
+
},
|
|
183
|
+
"reminder.remove": {
|
|
184
|
+
cli: "reminder remove",
|
|
185
|
+
mcp: "zalo_reminder remove",
|
|
186
|
+
irreversible: true,
|
|
187
|
+
what: (t) => `remove reminder ${t.reminderId} from conversation ${t.threadId}`,
|
|
188
|
+
},
|
|
189
|
+
"label.update": {
|
|
190
|
+
cli: "label update",
|
|
191
|
+
mcp: "zalo_label update",
|
|
192
|
+
irreversible: (t) => Boolean(t.removedLabels?.length),
|
|
193
|
+
what: (t) =>
|
|
194
|
+
t.removedLabels?.length
|
|
195
|
+
? `remove ${count(t.removedLabels, "label")} (${ids(t.removedLabels)}) and their conversation ` +
|
|
196
|
+
"assignments, and save the rest of the label list"
|
|
197
|
+
: "replace the label list (no label is removed)",
|
|
198
|
+
},
|
|
199
|
+
"catalog.delete": {
|
|
200
|
+
cli: "catalog delete",
|
|
201
|
+
mcp: "zalo_catalog delete",
|
|
202
|
+
irreversible: true,
|
|
203
|
+
what: (t) => `delete catalog ${t.catalogId} and every product in it`,
|
|
204
|
+
},
|
|
205
|
+
"catalog.deleteProduct": {
|
|
206
|
+
cli: "catalog delete-product",
|
|
207
|
+
mcp: "zalo_catalog delete_product",
|
|
208
|
+
irreversible: true,
|
|
209
|
+
what: (t) => `delete ${count(t.productIds, "product")} (${ids(t.productIds)}) from catalog ${t.catalogId}`,
|
|
210
|
+
},
|
|
211
|
+
"cloud.delete": {
|
|
212
|
+
cli: "cloud apply",
|
|
213
|
+
mcp: "zalo_cloud apply",
|
|
214
|
+
irreversible: true,
|
|
215
|
+
what: (t) =>
|
|
216
|
+
`delete the chat message behind each of ${t.items ?? 0} zCloud item(s) (${t.size ?? "0 B"}) in ` +
|
|
217
|
+
`${t.conversations ?? 0} conversation(s), for this account on every device, so the cloud drops them`,
|
|
218
|
+
},
|
|
219
|
+
"bank.remove": {
|
|
220
|
+
cli: "bank remove",
|
|
221
|
+
mcp: "zalo_bank remove",
|
|
222
|
+
irreversible: true,
|
|
223
|
+
what: (t) => `remove saved bank account ${t.bankAccountId} from this Zalo account`,
|
|
224
|
+
},
|
|
225
|
+
"autoReply.delete": {
|
|
226
|
+
cli: "auto-reply delete",
|
|
227
|
+
mcp: "zalo_auto_reply delete",
|
|
228
|
+
irreversible: true,
|
|
229
|
+
what: (t) => `delete auto-reply ${t.autoReplyId}`,
|
|
230
|
+
},
|
|
231
|
+
"quickMsg.remove": {
|
|
232
|
+
cli: "quick-msg remove",
|
|
233
|
+
mcp: "zalo_quick_message remove",
|
|
234
|
+
irreversible: true,
|
|
235
|
+
what: (t) => `remove ${count(t.quickMessageIds, "quick message")} (${ids(t.quickMessageIds)})`,
|
|
236
|
+
},
|
|
237
|
+
"profile.deleteAvatar": {
|
|
238
|
+
cli: "profile delete-avatar",
|
|
239
|
+
mcp: "zalo_profile delete_avatar",
|
|
240
|
+
irreversible: true,
|
|
241
|
+
what: (t) => `delete ${count(t.photoIds, "photo")} (${ids(t.photoIds)}) from this account's avatar history`,
|
|
242
|
+
},
|
|
243
|
+
logout: {
|
|
244
|
+
cli: "logout",
|
|
245
|
+
mcp: null,
|
|
246
|
+
irreversible: true,
|
|
247
|
+
what: (t) => {
|
|
248
|
+
const who = t.account ? `account ${t.account}` : "the active account";
|
|
249
|
+
const remote =
|
|
250
|
+
t.remote === false ? "" : t.keepSession ? "end its session at Zalo and " : "sign it out at Zalo and ";
|
|
251
|
+
const local = t.purge
|
|
252
|
+
? "delete its saved credentials and all its local data (chat cache, media, sync keys)"
|
|
253
|
+
: t.deleteHistory
|
|
254
|
+
? "delete its saved credentials and its local chat history"
|
|
255
|
+
: "delete its saved credentials";
|
|
256
|
+
return `log out ${who}: ${remote}${local}; the next command needs a new QR login`;
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
"account.remove": {
|
|
260
|
+
cli: "account remove",
|
|
261
|
+
mcp: null,
|
|
262
|
+
irreversible: true,
|
|
263
|
+
what: (t) =>
|
|
264
|
+
`remove account ${t.ownerId} from this machine: end its session if it is the active one, and delete ` +
|
|
265
|
+
"its credentials and all its local data (chat cache, media, sync keys)",
|
|
266
|
+
},
|
|
267
|
+
"account.export": {
|
|
268
|
+
cli: "account export",
|
|
269
|
+
mcp: null,
|
|
270
|
+
irreversible: false,
|
|
271
|
+
what: (t) =>
|
|
272
|
+
`write the saved login of account ${t.ownerId ?? "(active)"} in plaintext to ${t.output ?? "a file"}: ` +
|
|
273
|
+
"anyone who reads that file can use the account",
|
|
274
|
+
},
|
|
275
|
+
"db.exportPlaintext": {
|
|
276
|
+
cli: "db export --plaintext",
|
|
277
|
+
mcp: null,
|
|
278
|
+
irreversible: false,
|
|
279
|
+
what: (t) =>
|
|
280
|
+
`write the message database of account ${t.ownerId ?? "(active)"} decrypted to ${t.output ?? "a file"}: ` +
|
|
281
|
+
"anyone who reads that file reads every cached message in it" +
|
|
282
|
+
(t.includeHidden
|
|
283
|
+
? ", hidden chats included (after the PIN)"
|
|
284
|
+
: "; hidden chats are left out unless --include-hidden and the PIN"),
|
|
285
|
+
},
|
|
286
|
+
"db.purge": {
|
|
287
|
+
cli: "db purge",
|
|
288
|
+
mcp: null,
|
|
289
|
+
irreversible: true,
|
|
290
|
+
what: (t) =>
|
|
291
|
+
`delete what the quota and retention rules of account ${t.ownerId ?? "(active)"} make due: the oldest ` +
|
|
292
|
+
"downloaded media, then the oldest messages (with their search entries), and dead webhook deliveries past " +
|
|
293
|
+
"retention.outboxDead; purged messages are never restored by a later sync or history fetch",
|
|
294
|
+
},
|
|
295
|
+
"fleet.purge": {
|
|
296
|
+
cli: "fleet purge",
|
|
297
|
+
mcp: null,
|
|
298
|
+
irreversible: true,
|
|
299
|
+
what: (t) =>
|
|
300
|
+
`run the quota and retention purge for ${t.accounts ?? "every account on this machine"}: here under ` +
|
|
301
|
+
"daemon.lock for an account with no daemon, through its daemon for one whose purge timer is behind; " +
|
|
302
|
+
"the oldest downloaded media, then the oldest messages, where a rule makes them due, and dead webhook " +
|
|
303
|
+
"deliveries past retention.outboxDead; purged messages are never restored by a later sync",
|
|
304
|
+
},
|
|
305
|
+
"webhook.purge": {
|
|
306
|
+
cli: "mcp webhook purge",
|
|
307
|
+
mcp: null,
|
|
308
|
+
irreversible: true,
|
|
309
|
+
what: (t) =>
|
|
310
|
+
`delete ${t.seq !== undefined ? `dead-lettered webhook event #${t.seq}` : "every dead-lettered webhook event"} ` +
|
|
311
|
+
`of account ${t.account ?? "the active account"} for good`,
|
|
312
|
+
},
|
|
313
|
+
"presence.resume": {
|
|
314
|
+
cli: "presence resume",
|
|
315
|
+
mcp: "zalo_profile presence_resume",
|
|
316
|
+
irreversible: false,
|
|
317
|
+
what: (t) =>
|
|
318
|
+
`take account ${t.ownerId ?? "(active)"} back from the other session of this login: its daemon opens the ` +
|
|
319
|
+
"socket again, which ends that other session's socket if it is still open",
|
|
320
|
+
},
|
|
321
|
+
"write.run": {
|
|
322
|
+
cli: "write run",
|
|
323
|
+
mcp: "zalo_write",
|
|
324
|
+
irreversible: (t) => t.risk === "destructive",
|
|
325
|
+
what: (t) =>
|
|
326
|
+
`send the "${t.name}" write to Zalo (${t.risk ?? "unknown risk"}` +
|
|
327
|
+
`${t.verified === false ? ", not yet seen working" : ""})`,
|
|
328
|
+
},
|
|
329
|
+
// Official Account (official API): zalo_official runs the same command.
|
|
330
|
+
"oa.tag.remove": {
|
|
331
|
+
cli: "oa tag remove",
|
|
332
|
+
mcp: "zalo_official oa tag remove",
|
|
333
|
+
irreversible: true,
|
|
334
|
+
what: (t) =>
|
|
335
|
+
`delete tag "${t.tagName ?? t.name}" from Official Account ${t.oaId ?? "default"}, untagging every user`,
|
|
336
|
+
},
|
|
337
|
+
"oa.follower.deleteInfo": {
|
|
338
|
+
cli: "oa follower delete-info",
|
|
339
|
+
mcp: "zalo_official oa follower delete-info",
|
|
340
|
+
irreversible: true,
|
|
341
|
+
what: (t) => `delete the information Official Account ${t.oaId ?? "default"} holds about user ${t.userId}`,
|
|
342
|
+
},
|
|
343
|
+
"oa.userfield.delete": {
|
|
344
|
+
cli: "oa userfield delete",
|
|
345
|
+
mcp: "zalo_official oa userfield delete",
|
|
346
|
+
irreversible: true,
|
|
347
|
+
what: (t) =>
|
|
348
|
+
`delete user field ${t.fieldId ?? t.name} of Official Account ${t.oaId ?? "default"}, with every user's value in it`,
|
|
349
|
+
},
|
|
350
|
+
"oa.purchase": {
|
|
351
|
+
cli: "oa purchase confirm-order",
|
|
352
|
+
mcp: "zalo_official oa purchase confirm-order",
|
|
353
|
+
irreversible: true,
|
|
354
|
+
what: (t) =>
|
|
355
|
+
`pay order ${t.orderId ?? "(order)"} of Official Account ${t.oaId ?? "default"}: the product is bought ` +
|
|
356
|
+
"and the Zalo Cloud Account is charged",
|
|
357
|
+
},
|
|
358
|
+
"oa.call.consentRequest": {
|
|
359
|
+
cli: "oa call consent-request",
|
|
360
|
+
mcp: "zalo_official oa call consent-request",
|
|
361
|
+
irreversible: false,
|
|
362
|
+
what: (t) =>
|
|
363
|
+
`ask ${t.phone ?? "a user"} for permission to call them from Official Account ${t.oaId ?? "default"}: ` +
|
|
364
|
+
"Zalo charges each request (440 VND per Zalo's OA docs), whatever the answer",
|
|
365
|
+
},
|
|
366
|
+
"oa.article.remove": {
|
|
367
|
+
cli: "oa article remove",
|
|
368
|
+
mcp: "zalo_official oa article remove",
|
|
369
|
+
irreversible: true,
|
|
370
|
+
what: (t) => `delete article ${t.articleId ?? t.name} of Official Account ${t.oaId ?? "default"}`,
|
|
371
|
+
},
|
|
372
|
+
"oa.group.removeMembers": {
|
|
373
|
+
cli: "oa group remove-members",
|
|
374
|
+
mcp: "zalo_official oa group remove-members",
|
|
375
|
+
irreversible: true,
|
|
376
|
+
what: (t) =>
|
|
377
|
+
`remove ${count(t.userIds, "member")} (${ids(t.userIds)}) from Official Account group chat ${t.groupId}`,
|
|
378
|
+
},
|
|
379
|
+
"oa.group.delete": {
|
|
380
|
+
cli: "oa group delete",
|
|
381
|
+
mcp: "zalo_official oa group delete",
|
|
382
|
+
irreversible: true,
|
|
383
|
+
what: (t) => `delete Official Account group chat ${t.groupId} for every member`,
|
|
384
|
+
},
|
|
385
|
+
});
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* The parts every reply about one guarded action shares.
|
|
389
|
+
*
|
|
390
|
+
* @param {string} key - a GUARDS key
|
|
391
|
+
* @param {object} target - the ids the action would act on
|
|
392
|
+
* @param {"cli"|"mcp"} surface - which name to report the action by
|
|
393
|
+
* @returns {{action: string, wouldDo: string, target: object, irreversible: boolean}}
|
|
394
|
+
*/
|
|
395
|
+
export function describeGuarded(key, target = {}, surface = "cli") {
|
|
396
|
+
const guard = GUARDS[key];
|
|
397
|
+
if (!guard) throw new Error(`unknown guarded action "${key}"`);
|
|
398
|
+
const irreversible = typeof guard.irreversible === "function" ? guard.irreversible(target) : guard.irreversible;
|
|
399
|
+
return { action: guard[surface] ?? guard.cli, wouldDo: guard.what(target), target, irreversible };
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/** "remove X — this cannot be undone": the sentence a person reads. */
|
|
403
|
+
function sentence(d) {
|
|
404
|
+
return `${d.wouldDo}${d.irreversible ? " — this cannot be undone" : ""}`;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* The machine-readable refusal of an unconfirmed guarded action (CLI `--json` stdout, and the MCP error reply).
|
|
409
|
+
* `error` comes first, so a caller testing `.error` sees the refusal like any other failure.
|
|
410
|
+
*
|
|
411
|
+
* @param {string} key
|
|
412
|
+
* @param {object} target
|
|
413
|
+
* @param {"cli"|"mcp"} surface
|
|
414
|
+
* @returns {object}
|
|
415
|
+
*/
|
|
416
|
+
export function confirmationRefusal(key, target, surface = "cli") {
|
|
417
|
+
const d = describeGuarded(key, target, surface);
|
|
418
|
+
return {
|
|
419
|
+
error: `Not done: confirmation needed: ${d.wouldDo}`,
|
|
420
|
+
confirmationRequired: true,
|
|
421
|
+
action: d.action,
|
|
422
|
+
wouldDo: d.wouldDo,
|
|
423
|
+
target: d.target,
|
|
424
|
+
irreversible: d.irreversible,
|
|
425
|
+
retryWith: surface === "mcp" ? { confirm: true } : "--yes",
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* The one line a person reads when a guarded action was not confirmed.
|
|
431
|
+
*
|
|
432
|
+
* @param {string} key
|
|
433
|
+
* @param {object} target
|
|
434
|
+
* @param {"cli"|"mcp"} surface
|
|
435
|
+
* @returns {string}
|
|
436
|
+
*/
|
|
437
|
+
export function refusalLine(key, target, surface = "cli") {
|
|
438
|
+
const d = describeGuarded(key, target, surface);
|
|
439
|
+
const retry =
|
|
440
|
+
surface === "mcp"
|
|
441
|
+
? "Repeat the call with confirm: true, or dryRun: true to preview."
|
|
442
|
+
: "Re-run with --yes, or --dry-run to preview.";
|
|
443
|
+
return `Not done: this would ${sentence(d)}. ${retry}`;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* What a dry run of a guarded action reports: what would happen, and that nothing was sent.
|
|
448
|
+
*
|
|
449
|
+
* @param {string} key
|
|
450
|
+
* @param {object} target
|
|
451
|
+
* @param {"cli"|"mcp"} surface
|
|
452
|
+
* @returns {object}
|
|
453
|
+
*/
|
|
454
|
+
export function dryRunReport(key, target, surface = "cli") {
|
|
455
|
+
const d = describeGuarded(key, target, surface);
|
|
456
|
+
return { dryRun: true, sent: false, ...d };
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* The labels a label update would remove: those in the current list whose id the new list leaves out. A label
|
|
461
|
+
* update sends the whole list, so dropping one from it deletes the label (and its conversation assignments);
|
|
462
|
+
* only that case is guarded.
|
|
463
|
+
*
|
|
464
|
+
* @param {Array<{id?: unknown, text?: unknown}>|null|undefined} current - `labelData` as getLabels returns it
|
|
465
|
+
* @param {Array<{id?: unknown}>|null|undefined} next - the `labelData` about to be sent
|
|
466
|
+
* @returns {string[]} each removed label as "<id> (<text>)"
|
|
467
|
+
*/
|
|
468
|
+
export function removedLabels(current, next) {
|
|
469
|
+
const kept = new Set((Array.isArray(next) ? next : []).map((l) => String(l?.id)));
|
|
470
|
+
return (Array.isArray(current) ? current : [])
|
|
471
|
+
.filter((l) => l && l.id !== undefined && !kept.has(String(l.id)))
|
|
472
|
+
.map((l) => (l.text ? `${l.id} (${l.text})` : String(l.id)));
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
// --- CLI ---
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Settle a guarded CLI command before it acts: true to go ahead; otherwise this prints the dry run (exit 0)
|
|
479
|
+
* or the refusal (exit CONFIRM_EXIT_CODE) and ends the process, having sent nothing.
|
|
480
|
+
*
|
|
481
|
+
* @param {string} key - a GUARDS key
|
|
482
|
+
* @param {object} target - the ids the command would act on
|
|
483
|
+
* @param {{yes?: boolean, dryRun?: boolean}} opts - the command's own options
|
|
484
|
+
* @param {object} [how]
|
|
485
|
+
* @param {boolean} [how.json] - `--json`: one JSON value on stdout
|
|
486
|
+
* @param {boolean} [how.applies=true] - false when this invocation is not the guarded case (it goes ahead)
|
|
487
|
+
* @param {boolean} [how.ownDryRun=false] - the command implements `--dry-run` itself: let it through
|
|
488
|
+
* @returns {true}
|
|
489
|
+
*/
|
|
490
|
+
export function gateCli(key, target, opts = {}, { json = false, applies = true, ownDryRun = false } = {}) {
|
|
491
|
+
if (opts.dryRun) {
|
|
492
|
+
if (ownDryRun) return true;
|
|
493
|
+
const report = dryRunReport(key, target, "cli");
|
|
494
|
+
if (json) console.log(JSON.stringify(report, null, 2));
|
|
495
|
+
else info(`Dry run: this would ${sentence(report)}. Nothing was sent.`);
|
|
496
|
+
process.exit(0);
|
|
497
|
+
}
|
|
498
|
+
if (opts.yes || !applies) return true;
|
|
499
|
+
refuseCli(key, target, { json });
|
|
500
|
+
return true; // not reached: refuseCli exits
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Print the refusal of an unconfirmed guarded command and exit CONFIRM_EXIT_CODE. For a command that checks
|
|
505
|
+
* its own arguments first (`write run`) and so cannot be settled by gateCli before its action.
|
|
506
|
+
*
|
|
507
|
+
* @param {string} key
|
|
508
|
+
* @param {object} target
|
|
509
|
+
* @param {{json?: boolean}} [how]
|
|
510
|
+
*/
|
|
511
|
+
export function refuseCli(key, target, { json = false } = {}) {
|
|
512
|
+
if (json) console.log(JSON.stringify(confirmationRefusal(key, target, "cli"), null, 2));
|
|
513
|
+
else error(refusalLine(key, target, "cli"));
|
|
514
|
+
process.exit(CONFIRM_EXIT_CODE);
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Make a CLI command a guarded one: add `-y, --yes` and `--dry-run` and record how to settle it, which the
|
|
519
|
+
* preAction hook (src/index.js) does through enforceCliGuard before any login or request.
|
|
520
|
+
*
|
|
521
|
+
* @param {import("commander").Command} command
|
|
522
|
+
* @param {string} key - a GUARDS key
|
|
523
|
+
* @param {object} spec
|
|
524
|
+
* @param {(...argsThenOpts: any[]) => object} spec.target - the target, from the command's arguments and options
|
|
525
|
+
* @param {(target: object, opts: object) => boolean} [spec.when] - only this case is guarded (default: always)
|
|
526
|
+
* @param {boolean} [spec.ownDryRun] - the command already has `--dry-run` and implements it
|
|
527
|
+
* @param {boolean} [spec.deferred] - the action settles it itself with gateCli (it needs a read first)
|
|
528
|
+
* @returns {import("commander").Command} the command, for chaining
|
|
529
|
+
*/
|
|
530
|
+
export function guardCommand(command, key, spec) {
|
|
531
|
+
if (!GUARDS[key]) throw new Error(`unknown guarded action "${key}"`);
|
|
532
|
+
command.option("-y, --yes", "Do it: without this nothing is sent (exit 2)");
|
|
533
|
+
if (!spec.ownDryRun) command.option("--dry-run", "Say what would happen, and send nothing");
|
|
534
|
+
command.zaloGuard = { key, ...spec };
|
|
535
|
+
return command;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* guardCommand for a subcommand named after it was registered, so a command file can list its guarded
|
|
540
|
+
* commands in one place.
|
|
541
|
+
*
|
|
542
|
+
* @param {import("commander").Command} parent - e.g. the `group` command
|
|
543
|
+
* @param {string} name - the subcommand's name, e.g. "leave"
|
|
544
|
+
* @param {string} key - a GUARDS key
|
|
545
|
+
* @param {object} spec - as for guardCommand
|
|
546
|
+
* @returns {import("commander").Command} the subcommand
|
|
547
|
+
*/
|
|
548
|
+
export function guardSubcommand(parent, name, key, spec) {
|
|
549
|
+
const command = parent.commands.find((c) => c.name() === name);
|
|
550
|
+
if (!command) throw new Error(`no "${parent.name()} ${name}" command to guard`);
|
|
551
|
+
return guardCommand(command, key, spec);
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* The preAction half of guardCommand: settle a guarded command from its parsed arguments, before the session
|
|
556
|
+
* is touched. A command that is not guarded, or settles itself (`deferred`), goes ahead untouched.
|
|
557
|
+
*
|
|
558
|
+
* @param {import("commander").Command} command - the command about to run
|
|
559
|
+
* @param {{json?: boolean}} [how]
|
|
560
|
+
*/
|
|
561
|
+
export function enforceCliGuard(command, { json = false } = {}) {
|
|
562
|
+
const guard = command?.zaloGuard;
|
|
563
|
+
if (!guard || guard.deferred) return;
|
|
564
|
+
const opts = command.opts();
|
|
565
|
+
const target = guard.target(...(command.processedArgs ?? []), opts);
|
|
566
|
+
const applies = guard.when ? guard.when(target, opts) : true;
|
|
567
|
+
gateCli(guard.key, target, opts, { json, applies, ownDryRun: guard.ownDryRun });
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
// --- MCP ---
|
|
571
|
+
|
|
572
|
+
const ON = ["1", "true", "on", "yes"];
|
|
573
|
+
const OFF = ["0", "false", "off", "no"];
|
|
574
|
+
const warned = new Set();
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* The deployment's MCP confirm mode, and where it came from.
|
|
578
|
+
*
|
|
579
|
+
* Highest first: the live policy (`confirmMode` in the account's or its tenant's policy), `ZALO_MCP_CONFIRM_MODE_<ownId>`, `ZALO_MCP_CONFIRM_MODE`, `confirmMode` in mcp-config.json, then the deprecated aliases
|
|
580
|
+
* `ZALO_MCP_GROUP_CONFIRM` (`0`/`false`/`off`/`no` mean `off`, `1`/`true`/`on`/`yes` mean `agent`) and
|
|
581
|
+
* `groupConfirm: false` (means `off`). The environment wins over the file, as for every other setting, and an
|
|
582
|
+
* explicit confirm mode wins over either alias. A value that is not a mode is reported once and skipped; with
|
|
583
|
+
* nothing set the mode is `agent`.
|
|
584
|
+
*
|
|
585
|
+
* @param {object} [sources]
|
|
586
|
+
* @param {{confirmMode?: unknown, groupConfirm?: unknown}|null} [sources.config] - the loaded MCP config
|
|
587
|
+
* @param {NodeJS.ProcessEnv} [sources.env] - environment, process.env by default
|
|
588
|
+
* @param {string} [sources.accountId] - the account served, for the per-account variable
|
|
589
|
+
* @returns {{mode: "agent"|"human"|"off", source: string}}
|
|
590
|
+
*/
|
|
591
|
+
export function resolveConfirmMode({ config, env = process.env, accountId, policy } = {}) {
|
|
592
|
+
const scoped = accountId ? `ZALO_MCP_CONFIRM_MODE_${accountId}` : null;
|
|
593
|
+
const norm = (v) =>
|
|
594
|
+
String(v ?? "")
|
|
595
|
+
.trim()
|
|
596
|
+
.toLowerCase();
|
|
597
|
+
// The live policy (src/core/policy-store.js) is above the environment.
|
|
598
|
+
const live = policy === undefined ? policyFor(accountId) : policy;
|
|
599
|
+
for (const [value, source] of [
|
|
600
|
+
[live?.confirmMode, "policy:confirmMode"],
|
|
601
|
+
...(scoped ? [[env?.[scoped], scoped]] : []),
|
|
602
|
+
[env?.ZALO_MCP_CONFIRM_MODE, "ZALO_MCP_CONFIRM_MODE"],
|
|
603
|
+
[config?.confirmMode, "confirmMode"],
|
|
604
|
+
]) {
|
|
605
|
+
const mode = norm(value);
|
|
606
|
+
if (!mode) continue;
|
|
607
|
+
if (CONFIRM_MODES.includes(mode)) return { mode, source };
|
|
608
|
+
if (!warned.has(`${source}=${mode}`)) {
|
|
609
|
+
warned.add(`${source}=${mode}`);
|
|
610
|
+
console.error(`[confirm] ${source} "${value}" is not agent, human or off; ignoring it`);
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
const alias = norm(env?.ZALO_MCP_GROUP_CONFIRM);
|
|
614
|
+
if (OFF.includes(alias)) return { mode: "off", source: "ZALO_MCP_GROUP_CONFIRM" };
|
|
615
|
+
if (ON.includes(alias)) return { mode: "agent", source: "ZALO_MCP_GROUP_CONFIRM" };
|
|
616
|
+
if (config?.groupConfirm === false) return { mode: "off", source: "groupConfirm" };
|
|
617
|
+
return { mode: "agent", source: "default" };
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
/** An MCP error reply: the JSON fields first, then the line a person reads. */
|
|
621
|
+
function mcpError(payload, line) {
|
|
622
|
+
return {
|
|
623
|
+
content: [
|
|
624
|
+
{ type: "text", text: JSON.stringify(payload) },
|
|
625
|
+
{ type: "text", text: line },
|
|
626
|
+
],
|
|
627
|
+
isError: true,
|
|
628
|
+
};
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
* How `human` mode asks over the HTTP transport. That transport is stateless: every POST gets a fresh server
|
|
633
|
+
* (src/mcp/mcp-http-transport.js), so the server answering a tool call never saw the client's `initialize` and cannot
|
|
634
|
+
* ask it anything, and an answer would arrive as a new POST that a fresh server cannot match to the waiting call. So
|
|
635
|
+
* the question goes to the one-time approve page (src/core/secure-page.js) instead: the reply carries its link, the
|
|
636
|
+
* person approves there, and the agent repeats the call with `ticket`.
|
|
637
|
+
*/
|
|
638
|
+
export const STATELESS_HUMAN_NOTE =
|
|
639
|
+
"this call came over the stateless HTTP transport, so the question is a one-time approve page instead of an " +
|
|
640
|
+
"MCP elicitation";
|
|
641
|
+
|
|
642
|
+
/** How long the server waits for a person to answer an elicitation. */
|
|
643
|
+
export const ELICIT_TIMEOUT_MS = 5 * 60_000;
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Settle a guarded MCP action: null to go ahead, otherwise the reply to return instead (a dry-run report, or
|
|
647
|
+
* an error that says why nothing was done). Call it after the arguments are checked and the ids resolved, and
|
|
648
|
+
* before anything is sent.
|
|
649
|
+
*
|
|
650
|
+
* @param {string} key - a GUARDS key
|
|
651
|
+
* @param {object} target - the ids the action would act on
|
|
652
|
+
* @param {object} call
|
|
653
|
+
* @param {boolean} [call.confirm] - the caller's `confirm`
|
|
654
|
+
* @param {boolean} [call.dryRun] - the caller's `dryRun`
|
|
655
|
+
* @param {object} [call.config] - the MCP config, for resolveConfirmMode
|
|
656
|
+
* @param {NodeJS.ProcessEnv} [call.env]
|
|
657
|
+
* @param {string} [call.accountId] - the account served, for `ZALO_MCP_CONFIRM_MODE_<ownId>`
|
|
658
|
+
* @param {object} [call.server] - the McpServer, whose `.server` asks the person in `human` mode
|
|
659
|
+
* @param {object} [call.extra] - the tool call's request context, so the question rides on its request
|
|
660
|
+
* @param {boolean} [call.applies=true] - false when this call is not the guarded case (it goes ahead)
|
|
661
|
+
* @param {boolean} [call.always=false] - guarded even when the mode is `off` (zalo_write)
|
|
662
|
+
* @param {boolean} [call.stateless=false] - the call came over the stateless HTTP transport, where no question can
|
|
663
|
+
* be answered in the call: the approve page is used (see STATELESS_HUMAN_NOTE)
|
|
664
|
+
* @param {string} [call.ticket] - the caller's `ticket` from an approve page (human mode)
|
|
665
|
+
* @param {import("./secure-page.js").SecurePage} [call.securePage] - the process's page (getSecurePage())
|
|
666
|
+
* @param {string|null} [call.accountDir] - the account folder, for the approver password (approval.secret)
|
|
667
|
+
* @param {() => import("./hidden-chats.js").HiddenChats} [call.hidden] - the hidden set, for approval.secret "pin"
|
|
668
|
+
* @returns {Promise<object|null>}
|
|
669
|
+
*/
|
|
670
|
+
export async function gateMcp(
|
|
671
|
+
key,
|
|
672
|
+
target,
|
|
673
|
+
{
|
|
674
|
+
confirm,
|
|
675
|
+
dryRun,
|
|
676
|
+
config,
|
|
677
|
+
env = process.env,
|
|
678
|
+
accountId,
|
|
679
|
+
server,
|
|
680
|
+
extra,
|
|
681
|
+
applies = true,
|
|
682
|
+
always = false,
|
|
683
|
+
stateless = false,
|
|
684
|
+
ticket,
|
|
685
|
+
securePage,
|
|
686
|
+
accountDir = null,
|
|
687
|
+
hidden = null,
|
|
688
|
+
} = {},
|
|
689
|
+
) {
|
|
690
|
+
if (dryRun === true) {
|
|
691
|
+
const report = dryRunReport(key, target, "mcp");
|
|
692
|
+
return { content: [{ type: "text", text: JSON.stringify(report) }] };
|
|
693
|
+
}
|
|
694
|
+
if (!applies) return null;
|
|
695
|
+
let { mode } = resolveConfirmMode({ config, env, accountId });
|
|
696
|
+
if (mode === "off" && always) mode = "agent";
|
|
697
|
+
if (mode === "off") return null;
|
|
698
|
+
if (mode === "agent") {
|
|
699
|
+
if (confirm === true) return null;
|
|
700
|
+
return mcpError(confirmationRefusal(key, target, "mcp"), refusalLine(key, target, "mcp"));
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
// human: only the person's own answer counts; the caller's confirm does not stand in for it.
|
|
704
|
+
const d = describeGuarded(key, target, "mcp");
|
|
705
|
+
const page = securePage ?? getSecurePage();
|
|
706
|
+
const expect = { accountId: accountId ?? "", action: key, target };
|
|
707
|
+
if (ticket !== undefined && ticket !== null && ticket !== "") {
|
|
708
|
+
const used = page.store.consume(String(ticket), expect);
|
|
709
|
+
if (used.ok) return null;
|
|
710
|
+
const why = `Not done: ${used.message} Nothing was sent: ${d.wouldDo}.`;
|
|
711
|
+
return mcpError({ error: why, ticketRefused: used.reason, confirmMode: "human", ...d }, why);
|
|
712
|
+
}
|
|
713
|
+
const asker = stateless ? null : server?.server;
|
|
714
|
+
const elicitation = asker?.getClientCapabilities?.()?.elicitation;
|
|
715
|
+
if (!elicitation?.form) {
|
|
716
|
+
// No form question possible here (stateless HTTP, or a client without form elicitation): the approve page.
|
|
717
|
+
const approval = resolveApproval({ config, env, accountId });
|
|
718
|
+
let asked;
|
|
719
|
+
try {
|
|
720
|
+
asked = await askOnSecurePage({
|
|
721
|
+
page,
|
|
722
|
+
server,
|
|
723
|
+
extra,
|
|
724
|
+
stateless,
|
|
725
|
+
needs: "confirmationRequired",
|
|
726
|
+
spec: {
|
|
727
|
+
accountId: expect.accountId,
|
|
728
|
+
action: key,
|
|
729
|
+
target,
|
|
730
|
+
kind: "confirm",
|
|
731
|
+
title: "Approve a Zalo action",
|
|
732
|
+
description: `${d.action} would ${sentence(d)}.`,
|
|
733
|
+
},
|
|
734
|
+
retryWith: {},
|
|
735
|
+
deliver: approval.deliver,
|
|
736
|
+
approver: (throughAgent) => approverFor({ mode: approval.secret, throughAgent, accountDir, hidden }),
|
|
737
|
+
about: { action: d.action, wouldDo: d.wouldDo, target },
|
|
738
|
+
});
|
|
739
|
+
} catch (e) {
|
|
740
|
+
const why = `Not done: the approve page could not be opened (${e.message}), so nothing was sent: ${d.wouldDo}.`;
|
|
741
|
+
return mcpError({ error: why, confirmMode: "human", ...d }, why);
|
|
742
|
+
}
|
|
743
|
+
if (asked.token) {
|
|
744
|
+
const used = page.store.consume(asked.token, expect);
|
|
745
|
+
if (used.ok) return null;
|
|
746
|
+
const why = `Not done: ${used.message} Nothing was sent: ${d.wouldDo}.`;
|
|
747
|
+
return mcpError({ error: why, declined: true, confirmMode: "human", ...d }, why);
|
|
748
|
+
}
|
|
749
|
+
if (asked.error) {
|
|
750
|
+
const why = `Not done: ${asked.error} Nothing was sent: ${d.wouldDo}.`;
|
|
751
|
+
return mcpError({ error: why, confirmMode: "human", ...d }, why);
|
|
752
|
+
}
|
|
753
|
+
if (asked.declined) {
|
|
754
|
+
const why =
|
|
755
|
+
`Not done: the user did not complete the approve page (${asked.declined}), so nothing was sent: ` +
|
|
756
|
+
`${d.wouldDo}. Do not repeat the call unless the user asks for it again.`;
|
|
757
|
+
return mcpError({ error: why, declined: true, confirmMode: "human", ...d }, why);
|
|
758
|
+
}
|
|
759
|
+
const payload = {
|
|
760
|
+
...asked.reply,
|
|
761
|
+
confirmMode: "human",
|
|
762
|
+
...(stateless && { statelessTransport: true }),
|
|
763
|
+
...d,
|
|
764
|
+
};
|
|
765
|
+
const asks =
|
|
766
|
+
`Not done yet: confirmMode "human" asks the account owner before it would ${sentence(d)}` +
|
|
767
|
+
`${stateless ? `; ${STATELESS_HUMAN_NOTE}` : ""}.`;
|
|
768
|
+
const line = payload.secureUrl
|
|
769
|
+
? `${asks} Give them this one-time link to approve: ${payload.secureUrl} (expires ` +
|
|
770
|
+
`${payload.ticketExpiresAt}), then repeat the call with ticket.`
|
|
771
|
+
: `${asks} The approve page went to the deployment's approval channel (webhook); once the owner ` +
|
|
772
|
+
`approves (before ${payload.ticketExpiresAt}), repeat the call with ticket.`;
|
|
773
|
+
return mcpError(payload, line);
|
|
774
|
+
}
|
|
775
|
+
let answer;
|
|
776
|
+
try {
|
|
777
|
+
answer = await asker.elicitInput(
|
|
778
|
+
{
|
|
779
|
+
mode: "form",
|
|
780
|
+
message: `Zalo: ${d.action} would ${sentence(d)}. Go ahead?`,
|
|
781
|
+
requestedSchema: {
|
|
782
|
+
type: "object",
|
|
783
|
+
properties: {
|
|
784
|
+
confirm: {
|
|
785
|
+
type: "boolean",
|
|
786
|
+
title: "Yes, do it",
|
|
787
|
+
description: `Do it: ${d.wouldDo}`,
|
|
788
|
+
default: false,
|
|
789
|
+
},
|
|
790
|
+
},
|
|
791
|
+
required: ["confirm"],
|
|
792
|
+
},
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
timeout: ELICIT_TIMEOUT_MS,
|
|
796
|
+
...(extra?.requestId !== undefined && { relatedRequestId: extra.requestId }),
|
|
797
|
+
},
|
|
798
|
+
);
|
|
799
|
+
} catch (e) {
|
|
800
|
+
const why = `Not done: asking you to confirm failed (${e.message}), so nothing was sent: ${d.wouldDo}.`;
|
|
801
|
+
return mcpError({ error: why, confirmMode: "human", ...d }, why);
|
|
802
|
+
}
|
|
803
|
+
if (answer?.action === "accept" && answer.content?.confirm === true) return null;
|
|
804
|
+
const why =
|
|
805
|
+
`Not done: the user did not confirm (${answer?.action === "accept" ? "answered no" : (answer?.action ?? "no answer")}), ` +
|
|
806
|
+
`so nothing was sent: ${d.wouldDo}. Do not repeat the call unless the user asks for it again.`;
|
|
807
|
+
return mcpError({ error: why, declined: true, confirmMode: "human", ...d }, why);
|
|
808
|
+
}
|