@ardennguyen/zalo-agent-cli 2.5.9 → 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 -222
- 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
package/src/commands/conv.js
CHANGED
|
@@ -3,29 +3,45 @@
|
|
|
3
3
|
* mute, unmute, read, unread, delete.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { MUTE_ACTION } from "../zalo/enums.js";
|
|
7
7
|
import { getApi } from "../core/zalo-client.js";
|
|
8
8
|
import { success, error, info, output, warning } from "../utils/output.js";
|
|
9
9
|
import { getActive } from "../core/accounts.js";
|
|
10
10
|
import { getAccountDbPath } from "../core/credentials.js";
|
|
11
|
-
import { initDb, getMessages, getReadStates, markThreadGone, getOrphanThreads,
|
|
11
|
+
import { initDb, getMessages, getReadStates, markThreadGone, getOrphanThreads, getThreadNames } from "../core/db.js";
|
|
12
12
|
import { recentConversations } from "../core/recent-conversations.js";
|
|
13
13
|
import { describeReadState, readStateLabel } from "../core/read-state.js";
|
|
14
|
-
import {
|
|
15
|
-
import { markConversationRead,
|
|
14
|
+
import { pinnedConversations } from "../core/sync-v2/conv-state.js";
|
|
15
|
+
import { markConversationRead, unreadMarkAnchor } from "../core/receipts.js";
|
|
16
|
+
import {
|
|
17
|
+
AUTO_DELETE_TTLS,
|
|
18
|
+
SEEN_ANCHOR_SCAN_DEPTH,
|
|
19
|
+
forgetConversation,
|
|
20
|
+
newestMessageAnchor as newestAnchorFromSources,
|
|
21
|
+
setConversationArchived,
|
|
22
|
+
setConversationPinned,
|
|
23
|
+
} from "../core/conversation-actions.js";
|
|
16
24
|
import { readUserAliases, currentUserName } from "../core/current-user-names.js";
|
|
25
|
+
import { guardSubcommand } from "../core/confirm-guard.js";
|
|
26
|
+
import { setBlockSharing } from "../core/block-sharing.js";
|
|
27
|
+
import { parseOnOff } from "../utils/cli-args.js";
|
|
28
|
+
import { parseIntAtLeast } from "../utils/parse-options.js";
|
|
29
|
+
import { withoutHidden } from "../core/hidden-chats.js";
|
|
30
|
+
import { changeHiddenPin, readHidden, resetHiddenPinAndDelete } from "../core/hidden-chat-actions.js";
|
|
31
|
+
import {
|
|
32
|
+
addHiddenOptions,
|
|
33
|
+
exitPinRequired,
|
|
34
|
+
hiddenAccess,
|
|
35
|
+
hiddenSetForCli,
|
|
36
|
+
readPin,
|
|
37
|
+
readPinLines,
|
|
38
|
+
unlockOrExit,
|
|
39
|
+
} from "../utils/hidden-access.js";
|
|
17
40
|
|
|
18
41
|
/**
|
|
19
|
-
*
|
|
20
|
-
* `
|
|
21
|
-
*
|
|
22
|
-
* Groups expose a REST history endpoint; DMs do not, so the caller has to
|
|
23
|
-
* supply the ids by hand there. Both paths are best-effort: Zalo's history
|
|
24
|
-
* APIs lag live traffic, so the "newest" message found may not be the true
|
|
25
|
-
* newest (see agent/work/transfer-sync-v2/NOTES.md § Ordering).
|
|
26
|
-
*
|
|
27
|
-
* Opens the account's zalo.db whichever source answers, because the caller
|
|
28
|
-
* writes to it next.
|
|
42
|
+
* The anchor `conv delete` deletes backwards from (src/core/conversation-actions.js), with this account's cache
|
|
43
|
+
* opened first: the group store may not answer, and `conv delete` flags the thread in the cache (markThreadGone)
|
|
44
|
+
* straight after.
|
|
29
45
|
*
|
|
30
46
|
* @param {object} api
|
|
31
47
|
* @param {string} threadId
|
|
@@ -33,175 +49,39 @@ import { readUserAliases, currentUserName } from "../core/current-user-names.js"
|
|
|
33
49
|
* @returns {Promise<{ownerId: string, cliMsgId: string, globalMsgId: string}|null>}
|
|
34
50
|
*/
|
|
35
51
|
async function newestMessageAnchor(api, threadId, type) {
|
|
36
|
-
// Open the cache before either source runs. Source 2 reads it, and
|
|
37
|
-
// `conv delete` flags the thread in it (markThreadGone) straight after --
|
|
38
|
-
// which only ever worked because source 1 always failed and source 2
|
|
39
|
-
// opened the cache on the way.
|
|
40
|
-
let cacheOpen = false;
|
|
41
52
|
try {
|
|
42
53
|
const activeAcc = getActive();
|
|
43
|
-
if (activeAcc)
|
|
44
|
-
initDb(getAccountDbPath(activeAcc.ownId));
|
|
45
|
-
cacheOpen = true;
|
|
46
|
-
}
|
|
54
|
+
if (activeAcc) initDb(getAccountDbPath(activeAcc.ownId));
|
|
47
55
|
} catch {
|
|
48
|
-
// No cache on this machine;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// Source 1: Zalo's cloud-message store, the group history Zalo Web reads
|
|
52
|
-
// (src/core/group-history.js). zca-js's getGroupChatHistory asked
|
|
53
|
-
// /api/group/history, which Zalo answers with 404 -- and this used to read
|
|
54
|
-
// its answer as an array, a shape it never had.
|
|
55
|
-
if (type === 1) {
|
|
56
|
-
try {
|
|
57
|
-
// Loaded on demand: only the group path needs it.
|
|
58
|
-
const { getGroupHistory } = await import("../core/group-history.js");
|
|
59
|
-
const history = await getGroupHistory(api, threadId, 1);
|
|
60
|
-
const last = history.groupMsgs[0]?.data;
|
|
61
|
-
const anchor = toAnchor(last?.uidFrom ?? last?.ownerId, last?.cliMsgId, last?.msgId ?? last?.globalMsgId);
|
|
62
|
-
if (anchor) return anchor;
|
|
63
|
-
} catch {
|
|
64
|
-
// Store unreachable, or no group_cloud_message host — fall through to the local cache.
|
|
65
|
-
}
|
|
56
|
+
// No cache on this machine; the group store can still answer.
|
|
66
57
|
}
|
|
58
|
+
return newestAnchorFromSources(api, threadId, type);
|
|
59
|
+
}
|
|
67
60
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
// whose newest rows came from sync-v2 therefore has a newest row that
|
|
77
|
-
// cannot anchor anything, while older rows can — measured on a live
|
|
78
|
-
// account as 10 usable rows out of 294 for a group, and 0 out of 43 for
|
|
79
|
-
// a DM that had never been history-fetched. Reading only row 1 turned
|
|
80
|
-
// that into "Could not determine the last message", and made the group
|
|
81
|
-
// path succeed or fail on the luck of which writer touched it last.
|
|
82
|
-
//
|
|
83
|
-
// Deleting backwards from a slightly older anchor leaves the newest few
|
|
84
|
-
// messages in place, which is the same staleness `msg history` already
|
|
85
|
-
// has (see agent/work/transfer-sync-v2/NOTES.md § Ordering) and is far
|
|
86
|
-
// better than refusing outright.
|
|
87
|
-
if (!cacheOpen) return null;
|
|
61
|
+
/**
|
|
62
|
+
* The newest cached message of a thread, as `addUnreadMark` names it, or null when the cache has none (or there is
|
|
63
|
+
* no cache on this machine). Never throws: the mark is still sent without it.
|
|
64
|
+
*
|
|
65
|
+
* @param {string} threadId
|
|
66
|
+
* @returns {{cliMsgId: string, fromUid: string}|null}
|
|
67
|
+
*/
|
|
68
|
+
function newestMessageForUnreadMark(threadId) {
|
|
88
69
|
try {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
} catch {
|
|
94
|
-
continue; // unparseable payload — try an older row
|
|
95
|
-
}
|
|
96
|
-
const data = raw.data ?? raw;
|
|
97
|
-
const anchor = toAnchor(row.senderId ?? data.uidFrom, data.cliMsgId, row.msgId ?? data.msgId);
|
|
98
|
-
if (anchor) return anchor;
|
|
99
|
-
}
|
|
100
|
-
return null;
|
|
70
|
+
const activeAcc = getActive();
|
|
71
|
+
if (!activeAcc) return null;
|
|
72
|
+
initDb(getAccountDbPath(activeAcc.ownId));
|
|
73
|
+
return unreadMarkAnchor(getMessages(String(threadId), SEEN_ANCHOR_SCAN_DEPTH), { ownId: activeAcc.ownId });
|
|
101
74
|
} catch {
|
|
102
75
|
return null;
|
|
103
76
|
}
|
|
104
77
|
}
|
|
105
78
|
|
|
106
|
-
/**
|
|
107
|
-
* How many cached rows to inspect before giving up on finding an anchor.
|
|
108
|
-
* Deep enough to see past a run of sync-v2 rows, shallow enough that the
|
|
109
|
-
* lookup stays a single cheap query.
|
|
110
|
-
*/
|
|
111
|
-
/** How far back to look for an incoming message to anchor a seen event on. */
|
|
112
|
-
const SEEN_ANCHOR_SCAN_DEPTH = 50;
|
|
113
|
-
|
|
114
|
-
const ANCHOR_SCAN_DEPTH = 200;
|
|
115
|
-
|
|
116
|
-
/** Build the deleteChat anchor triple, or null when any part is missing. */
|
|
117
|
-
function toAnchor(ownerId, cliMsgId, globalMsgId) {
|
|
118
|
-
if (!ownerId || !cliMsgId || !globalMsgId) return null;
|
|
119
|
-
return { ownerId: String(ownerId), cliMsgId: String(cliMsgId), globalMsgId: String(globalMsgId) };
|
|
120
|
-
}
|
|
121
|
-
|
|
122
79
|
/** `-t` as 0 (user) or 1 (group), or null for anything else. */
|
|
123
80
|
function threadTypeOf(value) {
|
|
124
81
|
const t = Number(value);
|
|
125
82
|
return t === 0 || t === 1 ? t : null;
|
|
126
83
|
}
|
|
127
84
|
|
|
128
|
-
/**
|
|
129
|
-
* Pin or unpin one conversation, exactly as Zalo Web does.
|
|
130
|
-
*
|
|
131
|
-
* `POST {conversation}/api/pinconvers/updatev2` with
|
|
132
|
-
* `{actionType: 1 pin | 2 unpin, conversations: ["g<id>" | "u<id>"], tab: 0}`
|
|
133
|
-
* -- captured for a group and a DM, both directions. zca-js's
|
|
134
|
-
* setPinnedConversations sends the same minus `tab`, so it is not used.
|
|
135
|
-
*
|
|
136
|
-
* @param {object} api - logged-in zca-js api
|
|
137
|
-
* @param {{threadId: string, type: 0|1, pinned: boolean}} opts
|
|
138
|
-
* @returns {Promise<object>}
|
|
139
|
-
*/
|
|
140
|
-
async function setConversationPinned(api, { threadId, type, pinned }) {
|
|
141
|
-
const conversation = `${type === 1 ? "g" : "u"}${threadId}`;
|
|
142
|
-
const response = await zaloPost(api, {
|
|
143
|
-
url: `${api.zpwServiceMap.conversation[0]}/api/pinconvers/updatev2`,
|
|
144
|
-
params: () => ({ actionType: pinned ? 1 : 2, conversations: [conversation], tab: 0 }),
|
|
145
|
-
});
|
|
146
|
-
return { threadId: String(threadId), type, pinned, conversation, response };
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Move one conversation to Zalo's "Other" tab (archive) or back to Focused.
|
|
151
|
-
*
|
|
152
|
-
* `POST {label}/api/archivedchat/update` with
|
|
153
|
-
* `{ids: [{id, type: 1 group | 0 user}], version, actionType: 0 to Other | 1 back, imei}`.
|
|
154
|
-
*
|
|
155
|
-
* `version` is the one decision here. zca-js's updateArchivedChatList sends
|
|
156
|
-
* `Date.now()`. Zalo Web sends the SERVER's version: each captured update
|
|
157
|
-
* carried exactly the `version` the previous response returned, and the first
|
|
158
|
-
* carried the one the web had stored from the server -- 25 days older than the
|
|
159
|
-
* clock. Its archived-chat manager (module FEfs in the web API bundle) keeps
|
|
160
|
-
* that value, refreshes it from `archivedchat/list` at start-up and from every
|
|
161
|
-
* update response, and refetches the list when an answer flags it stale. A CLI
|
|
162
|
-
* run is a fresh client every time, so it does what the web does at start-up:
|
|
163
|
-
* read the list (zca-js's getArchivedChatList, the same GET a fresh web
|
|
164
|
-
* session makes) and send the version found there. With no version, nothing
|
|
165
|
-
* is sent.
|
|
166
|
-
*
|
|
167
|
-
* @param {object} api - logged-in zca-js api
|
|
168
|
-
* @param {{threadId: string, type: 0|1, archived: boolean}} opts
|
|
169
|
-
* @returns {Promise<object>}
|
|
170
|
-
*/
|
|
171
|
-
async function setConversationArchived(api, { threadId, type, archived }) {
|
|
172
|
-
let listed;
|
|
173
|
-
try {
|
|
174
|
-
listed = await api.getArchivedChatList();
|
|
175
|
-
} catch (e) {
|
|
176
|
-
throw new Error(`Could not read Zalo's archived-chat version, so nothing was sent: ${e.message}`);
|
|
177
|
-
}
|
|
178
|
-
const v = listed?.version;
|
|
179
|
-
const version = typeof v === "number" ? v : /^\d+$/.test(String(v ?? "")) ? Number(v) : NaN;
|
|
180
|
-
if (!Number.isFinite(version)) {
|
|
181
|
-
throw new Error(
|
|
182
|
-
`Zalo's archived-chat list carried no usable version (${JSON.stringify(v)}), so nothing was sent.`,
|
|
183
|
-
);
|
|
184
|
-
}
|
|
185
|
-
const response = await zaloPost(api, {
|
|
186
|
-
url: `${api.zpwServiceMap.label[0]}/api/archivedchat/update`,
|
|
187
|
-
params: (ctx) => ({
|
|
188
|
-
ids: [{ id: String(threadId), type: type === 1 ? 1 : 0 }],
|
|
189
|
-
version,
|
|
190
|
-
actionType: archived ? 0 : 1,
|
|
191
|
-
imei: ctx.imei,
|
|
192
|
-
}),
|
|
193
|
-
});
|
|
194
|
-
return {
|
|
195
|
-
threadId: String(threadId),
|
|
196
|
-
type,
|
|
197
|
-
archived,
|
|
198
|
-
previousVersion: version,
|
|
199
|
-
version: response?.version ?? null,
|
|
200
|
-
needResync: Boolean(response?.needResync),
|
|
201
|
-
response,
|
|
202
|
-
};
|
|
203
|
-
}
|
|
204
|
-
|
|
205
85
|
/**
|
|
206
86
|
* Register the `conv` command group.
|
|
207
87
|
*
|
|
@@ -217,18 +97,33 @@ export function registerConvCommands(program, deps = {}) {
|
|
|
217
97
|
|
|
218
98
|
conv.command("recent")
|
|
219
99
|
.description("List recent conversations with thread_id (friends + groups)")
|
|
220
|
-
.option("-n, --limit <n>", "Max results per type",
|
|
100
|
+
.option("-n, --limit <n>", "Max results per type (default: all)", parseIntAtLeast(1))
|
|
221
101
|
.option("--friends-only", "Show only friend conversations")
|
|
222
102
|
.option("--groups-only", "Show only group conversations")
|
|
103
|
+
.option(
|
|
104
|
+
"--include-hidden",
|
|
105
|
+
"Show hidden conversations too: asks for the hidden-chat PIN (never pass it on the command line)",
|
|
106
|
+
)
|
|
107
|
+
.option("--pin-stdin", "Read the hidden-chat PIN from standard input instead of a prompt")
|
|
223
108
|
.action(async (opts) => {
|
|
224
109
|
const jsonMode = program.opts().json;
|
|
225
|
-
|
|
110
|
+
// No -n means every conversation; -n caps each type.
|
|
111
|
+
const limit = opts.limit ?? null;
|
|
112
|
+
const cap = (list) => (limit ? list.slice(0, limit) : list);
|
|
226
113
|
|
|
227
114
|
const activeAcc = getActive();
|
|
228
115
|
if (!activeAcc) {
|
|
229
116
|
error("No active account. Please login first.");
|
|
230
117
|
process.exit(1);
|
|
231
118
|
}
|
|
119
|
+
// Hidden chats are left out, as Zalo lists them, unless --include-hidden and the PIN.
|
|
120
|
+
let liveApi = null;
|
|
121
|
+
try {
|
|
122
|
+
liveApi = getApi();
|
|
123
|
+
} catch {
|
|
124
|
+
/* cache only: the hidden-id mirror still applies */
|
|
125
|
+
}
|
|
126
|
+
const hidden = await hiddenAccess(opts, { ownId: activeAcc.ownId, api: liveApi, json: jsonMode });
|
|
232
127
|
|
|
233
128
|
try {
|
|
234
129
|
initDb(getAccountDbPath(activeAcc.ownId));
|
|
@@ -244,6 +139,7 @@ export function registerConvCommands(program, deps = {}) {
|
|
|
244
139
|
const localThreads = recentConversations(
|
|
245
140
|
limit,
|
|
246
141
|
opts.friendsOnly ? "dm" : opts.groupsOnly ? "group" : "all",
|
|
142
|
+
{ excludeThreadIds: hidden.ids },
|
|
247
143
|
);
|
|
248
144
|
|
|
249
145
|
if (localThreads && localThreads.length > 0) {
|
|
@@ -262,6 +158,8 @@ export function registerConvCommands(program, deps = {}) {
|
|
|
262
158
|
typeFlag: t.type === "group" ? 1 : 0,
|
|
263
159
|
lastActive: t.lastUpdate ? new Date(t.lastUpdate).toLocaleString() : "?",
|
|
264
160
|
readState: describeReadState(reads.get(String(t.threadId))),
|
|
161
|
+
// A group this account left or lost, kept by groups.onLeave "keep" (src/core/group-exit.js).
|
|
162
|
+
...(t.gone && { gone: true, leftAt: t.leftAt, goneReason: t.goneReason }),
|
|
265
163
|
}));
|
|
266
164
|
|
|
267
165
|
output(conversations, jsonMode, () => {
|
|
@@ -272,7 +170,8 @@ export function registerConvCommands(program, deps = {}) {
|
|
|
272
170
|
for (const c of conversations) {
|
|
273
171
|
const id = c.threadId.padEnd(22);
|
|
274
172
|
const read = readStateLabel(c.readState).padEnd(18);
|
|
275
|
-
|
|
173
|
+
const gone = c.gone ? ` [gone: ${c.goneReason}]` : "";
|
|
174
|
+
console.log(` ${id} ${c.type.padEnd(12)} ${read} ${c.name}${gone}`);
|
|
276
175
|
}
|
|
277
176
|
console.log();
|
|
278
177
|
info("Use thread_id with messaging commands:");
|
|
@@ -295,10 +194,9 @@ export function registerConvCommands(program, deps = {}) {
|
|
|
295
194
|
if (!opts.groupsOnly) {
|
|
296
195
|
const friends = await api.getAllFriends();
|
|
297
196
|
const list = Array.isArray(friends) ? friends : [];
|
|
298
|
-
const sorted =
|
|
299
|
-
.filter((f) => f.lastActionTime > 0)
|
|
300
|
-
|
|
301
|
-
.slice(0, limit);
|
|
197
|
+
const sorted = cap(
|
|
198
|
+
list.filter((f) => f.lastActionTime > 0).sort((a, b) => b.lastActionTime - a.lastActionTime),
|
|
199
|
+
);
|
|
302
200
|
const aliases = sorted.length > 0 ? await readUserAliases(api) : new Map();
|
|
303
201
|
for (const f of sorted) {
|
|
304
202
|
const resolved = currentUserName(f.userId, f, aliases);
|
|
@@ -325,7 +223,7 @@ export function registerConvCommands(program, deps = {}) {
|
|
|
325
223
|
if (groupIds.length > 0) {
|
|
326
224
|
const batchSize = 50;
|
|
327
225
|
const batches = [];
|
|
328
|
-
const limitedIds = groupIds
|
|
226
|
+
const limitedIds = cap(groupIds); // cap to limit BEFORE batching
|
|
329
227
|
for (let i = 0; i < limitedIds.length; i += batchSize) {
|
|
330
228
|
batches.push(limitedIds.slice(i, i + batchSize));
|
|
331
229
|
}
|
|
@@ -349,6 +247,9 @@ export function registerConvCommands(program, deps = {}) {
|
|
|
349
247
|
}
|
|
350
248
|
}
|
|
351
249
|
|
|
250
|
+
const shown = withoutHidden(conversations, hidden.set, hidden.mode);
|
|
251
|
+
conversations.length = 0;
|
|
252
|
+
conversations.push(...shown);
|
|
352
253
|
output(conversations, program.opts().json, () => {
|
|
353
254
|
if (conversations.length === 0) {
|
|
354
255
|
error("No conversations found.");
|
|
@@ -377,8 +278,18 @@ export function registerConvCommands(program, deps = {}) {
|
|
|
377
278
|
.description("List pinned conversations")
|
|
378
279
|
.action(async () => {
|
|
379
280
|
try {
|
|
380
|
-
const result = await
|
|
381
|
-
|
|
281
|
+
const result = await zaloApi().getPinConversations();
|
|
282
|
+
// Zalo's `m1` entry is not a conversation; Zalo skips it (spec-actions 7.3), as the pin sync does.
|
|
283
|
+
// A hidden chat is left out, as Zalo's list leaves it out (`u<id>`/`g<id>` entries).
|
|
284
|
+
const active = getActive();
|
|
285
|
+
const hidden = active ? await hiddenSetForCli(active.ownId, zaloApi(), { preferMirror: true }) : null;
|
|
286
|
+
const conversations = withoutHidden(
|
|
287
|
+
pinnedConversations(result?.conversations),
|
|
288
|
+
hidden,
|
|
289
|
+
"exclude",
|
|
290
|
+
(c) => c,
|
|
291
|
+
);
|
|
292
|
+
output({ ...result, conversations }, program.opts().json);
|
|
382
293
|
} catch (e) {
|
|
383
294
|
error(e.message);
|
|
384
295
|
}
|
|
@@ -411,16 +322,36 @@ export function registerConvCommands(program, deps = {}) {
|
|
|
411
322
|
.option("-t, --type <n>", "Thread type: 0=User, 1=Group", "0")
|
|
412
323
|
.action((threadId, opts) => pinAction(threadId, opts, false));
|
|
413
324
|
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
});
|
|
325
|
+
/**
|
|
326
|
+
* What `conv archived` / `conv muted` show of hidden chats: left out, unless --include-hidden and the PIN.
|
|
327
|
+
*
|
|
328
|
+
* @param {object} opts - the command's options
|
|
329
|
+
* @returns {Promise<(list: object[], idOf: (item: object) => unknown) => object[]>}
|
|
330
|
+
*/
|
|
331
|
+
async function hiddenFilter(opts) {
|
|
332
|
+
const active = getActive();
|
|
333
|
+
if (!active) return (list) => list;
|
|
334
|
+
const hidden = await hiddenAccess(opts, { ownId: active.ownId, api: zaloApi(), json: program.opts().json });
|
|
335
|
+
return (list, idOf) => withoutHidden(list, hidden.set, hidden.mode, idOf);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
addHiddenOptions(
|
|
339
|
+
conv
|
|
340
|
+
.command("archived")
|
|
341
|
+
.description("List archived conversations (hidden chats are left out unless --include-hidden)"),
|
|
342
|
+
).action(async (opts) => {
|
|
343
|
+
try {
|
|
344
|
+
const result = await zaloApi().getArchivedChatList();
|
|
345
|
+
// Zalo's answer: `{items: [{id, type}], version}`.
|
|
346
|
+
const shown = await hiddenFilter(opts);
|
|
347
|
+
output(
|
|
348
|
+
Array.isArray(result?.items) ? { ...result, items: shown(result.items, (i) => i?.id) } : result,
|
|
349
|
+
program.opts().json,
|
|
350
|
+
);
|
|
351
|
+
} catch (e) {
|
|
352
|
+
error(e.message);
|
|
353
|
+
}
|
|
354
|
+
});
|
|
424
355
|
|
|
425
356
|
/** `conv archive` / `conv unarchive`. */
|
|
426
357
|
async function archiveAction(threadId, opts, archived) {
|
|
@@ -465,7 +396,7 @@ export function registerConvCommands(program, deps = {}) {
|
|
|
465
396
|
.option("-d, --duration <secs>", "Duration in seconds (-1 = forever)", "-1")
|
|
466
397
|
.action(async (threadId, opts) => {
|
|
467
398
|
try {
|
|
468
|
-
//
|
|
399
|
+
// The session's signature is setMute(params, threadID, type) -- the options
|
|
469
400
|
// object comes FIRST. This used to pass (threadId, type,
|
|
470
401
|
// duration) positionally, so `params` got the thread id
|
|
471
402
|
// string, `threadID` got 0 or 1, and the request went out
|
|
@@ -473,7 +404,7 @@ export function registerConvCommands(program, deps = {}) {
|
|
|
473
404
|
// time: `conv mute` had never once worked. Same defect, and
|
|
474
405
|
// the same shape, as the `msg delete` arity bug.
|
|
475
406
|
const result = await getApi().setMute(
|
|
476
|
-
{ duration: Number(opts.duration), action:
|
|
407
|
+
{ duration: Number(opts.duration), action: MUTE_ACTION.MUTE },
|
|
477
408
|
threadId,
|
|
478
409
|
Number(opts.type),
|
|
479
410
|
);
|
|
@@ -489,9 +420,9 @@ export function registerConvCommands(program, deps = {}) {
|
|
|
489
420
|
.action(async (threadId, opts) => {
|
|
490
421
|
try {
|
|
491
422
|
// Same arity bug as `mute` above. Unmute is an ACTION, not a
|
|
492
|
-
// duration of 0 --
|
|
423
|
+
// duration of 0 -- the session derives the duration itself once
|
|
493
424
|
// action is UNMUTE.
|
|
494
|
-
const result = await getApi().setMute({ action:
|
|
425
|
+
const result = await getApi().setMute({ action: MUTE_ACTION.UNMUTE }, threadId, Number(opts.type));
|
|
495
426
|
output(result, program.opts().json, () => success("Conversation unmuted"));
|
|
496
427
|
} catch (e) {
|
|
497
428
|
error(e.message);
|
|
@@ -500,19 +431,19 @@ export function registerConvCommands(program, deps = {}) {
|
|
|
500
431
|
|
|
501
432
|
conv.command("read <threadId>")
|
|
502
433
|
.description(
|
|
503
|
-
|
|
504
|
-
"
|
|
505
|
-
|
|
434
|
+
'Mark a conversation as read, as Zalo\'s "Mark as read" does: a seen receipt for every cached ' +
|
|
435
|
+
"incoming message newer than your read position (up to 50), a reaction-seen receipt when a reaction " +
|
|
436
|
+
'is unread, and removing the manual unread mark when it is set. The sender sees "Seen" unless your ' +
|
|
437
|
+
"seen status is hidden (profile set seen-status 0)",
|
|
506
438
|
)
|
|
507
439
|
.option("-t, --type <n>", "Thread type: 0=User, 1=Group", "0")
|
|
440
|
+
.option(
|
|
441
|
+
"--mark-only",
|
|
442
|
+
"Only remove the manual unread mark (the red dot): Zalo's real unread count stays and nothing is marked seen",
|
|
443
|
+
)
|
|
508
444
|
.action(async (threadId, opts) => {
|
|
509
|
-
//
|
|
510
|
-
//
|
|
511
|
-
// thread id in it -- and, once that was fixed, still went out with
|
|
512
|
-
// st/at/cmd/ts all -1 (zca-js cannot send real values), no imei on a
|
|
513
|
-
// DM, and no removeUnreadMark at all, so it could not undo
|
|
514
|
-
// `conv unread`. Both requests are now built in src/core/receipts.js
|
|
515
|
-
// to match a capture of the real Zalo Web client.
|
|
445
|
+
// Both surfaces call src/core/receipts.js markConversationRead and answer its JSON (zalo_conversation
|
|
446
|
+
// `read`). The requests are built to match what Zalo sends.
|
|
516
447
|
//
|
|
517
448
|
// process.exit stays outside the try blocks: inside one, a throwing
|
|
518
449
|
// exit would be caught and reported as an API error.
|
|
@@ -530,20 +461,27 @@ export function registerConvCommands(program, deps = {}) {
|
|
|
530
461
|
let result;
|
|
531
462
|
try {
|
|
532
463
|
initDb(getAccountDbPath(activeAcc.ownId));
|
|
533
|
-
|
|
534
|
-
|
|
464
|
+
result = await markConversationRead(zaloApi(), {
|
|
465
|
+
threadId,
|
|
466
|
+
type,
|
|
467
|
+
ownId: activeAcc.ownId,
|
|
468
|
+
markOnly: Boolean(opts.markOnly),
|
|
469
|
+
});
|
|
535
470
|
} catch (e) {
|
|
536
471
|
error(e.message);
|
|
537
472
|
return;
|
|
538
473
|
}
|
|
539
474
|
|
|
475
|
+
if (!result.success && program.opts().json) process.exitCode = 1;
|
|
540
476
|
output(result, program.opts().json, () => {
|
|
541
|
-
|
|
542
|
-
|
|
477
|
+
const mark = result.unreadMark;
|
|
478
|
+
if (mark.removed) success("Removed the manual unread mark");
|
|
479
|
+
else if (mark.error) error(`Could not clear the manual unread mark: ${mark.error}`);
|
|
480
|
+
else if (mark.wasSet === false) info("No manual unread mark was set");
|
|
543
481
|
|
|
544
482
|
const seen = result.seen;
|
|
545
|
-
if (seen
|
|
546
|
-
success(`
|
|
483
|
+
if (seen?.sent) {
|
|
484
|
+
success(`Marked ${seen.sent} message(s) seen (${seen.msgIds.join(", ")})`);
|
|
547
485
|
if (seen.guessed.length) {
|
|
548
486
|
warning(
|
|
549
487
|
`${seen.guessed.join(", ")} came from a fallback, not the message's own frame: the ` +
|
|
@@ -551,22 +489,29 @@ export function registerConvCommands(program, deps = {}) {
|
|
|
551
489
|
"st=3 and at=5 are a guess).",
|
|
552
490
|
);
|
|
553
491
|
}
|
|
554
|
-
} else if (seen
|
|
492
|
+
} else if (seen?.refused === "no-cache") {
|
|
555
493
|
error(seen.error);
|
|
556
|
-
info("Zalo marks a MESSAGE as seen, not a thread
|
|
557
|
-
info("The cache is written by `listen` and by `sync` only. Run one of them first:");
|
|
494
|
+
info("Zalo marks a MESSAGE as seen, not a thread. Run one of these first:");
|
|
558
495
|
info(` zalo-agent sync --from ${new Date(Date.now() - 7 * 864e5).toISOString().slice(0, 10)}`);
|
|
559
|
-
|
|
496
|
+
info(" zalo-agent listen");
|
|
497
|
+
} else if (seen?.refused === "noised-sender") {
|
|
498
|
+
error(seen.error);
|
|
499
|
+
info("Keep `listen` or `mcp start` running, and run `conv read` again once a new message arrives.");
|
|
500
|
+
} else if (seen?.error) {
|
|
560
501
|
error(seen.error);
|
|
561
|
-
info("A message the listener receives carries its real sender id. Keep `listen` or `mcp start`");
|
|
562
|
-
info("running, and run `conv read` again once a new message has arrived in this conversation.");
|
|
563
|
-
} else {
|
|
564
|
-
error(`Seen receipt for message ${seen.msgId} failed: ${seen.error}`);
|
|
565
502
|
}
|
|
503
|
+
if (seen?.skipped?.e2ee) {
|
|
504
|
+
info(
|
|
505
|
+
`${seen.skipped.e2ee} end-to-end encrypted message(s) left out: this client cannot mark those.`,
|
|
506
|
+
);
|
|
507
|
+
}
|
|
508
|
+
if (result.reactions?.sent) success("Marked the conversation's reactions seen");
|
|
509
|
+
else if (result.reactions?.error) error(`Reaction-seen receipt failed: ${result.reactions.error}`);
|
|
510
|
+
if (result.note) info(result.note);
|
|
566
511
|
});
|
|
567
512
|
// A refused seen receipt is the command not doing what it says, so it
|
|
568
513
|
// keeps the exit code the cold-cache refusal always had.
|
|
569
|
-
if (result.seen
|
|
514
|
+
if (result.seen?.refused) process.exit(1);
|
|
570
515
|
});
|
|
571
516
|
|
|
572
517
|
conv.command("unread <threadId>")
|
|
@@ -574,72 +519,259 @@ export function registerConvCommands(program, deps = {}) {
|
|
|
574
519
|
.option("-t, --type <n>", "Thread type: 0=User, 1=Group", "0")
|
|
575
520
|
.action(async (threadId, opts) => {
|
|
576
521
|
try {
|
|
577
|
-
//
|
|
522
|
+
// The session names this addUnreadMark (paired with removeUnreadMark
|
|
578
523
|
// and getUnreadMark). There has never been a markAsUnread, so
|
|
579
524
|
// every invocation died on "is not a function" before reaching
|
|
580
525
|
// the network -- which no test caught, because reaching the
|
|
581
526
|
// network is exactly what the offline suite cannot do.
|
|
582
|
-
|
|
527
|
+
//
|
|
528
|
+
// Zalo pins the mark to the conversation's newest message
|
|
529
|
+
// (its cliMsgId and sender), so the cache is read for it; with
|
|
530
|
+
// none cached Zalo's "-1" goes out instead.
|
|
531
|
+
const last = newestMessageForUnreadMark(threadId);
|
|
532
|
+
const result = await zaloApi().addUnreadMark(threadId, Number(opts.type), last);
|
|
583
533
|
output(result, program.opts().json, () => success("Marked as unread"));
|
|
584
534
|
} catch (e) {
|
|
585
535
|
error(e.message);
|
|
586
536
|
}
|
|
587
537
|
});
|
|
588
538
|
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
539
|
+
/** The active account, or exit 1. */
|
|
540
|
+
const activeOrExit = () => {
|
|
541
|
+
const acc = getActive();
|
|
542
|
+
if (!acc) {
|
|
543
|
+
error("No active account. Please login first.");
|
|
544
|
+
process.exit(1);
|
|
545
|
+
}
|
|
546
|
+
return acc;
|
|
547
|
+
};
|
|
548
|
+
|
|
549
|
+
addHiddenOptions(
|
|
550
|
+
conv
|
|
551
|
+
.command("hidden")
|
|
552
|
+
.description(
|
|
553
|
+
"List hidden conversations: asks for the hidden-chat PIN first, as Zalo does (without it, " +
|
|
554
|
+
"only how many there are and whether a PIN is set)",
|
|
555
|
+
),
|
|
556
|
+
{ include: false },
|
|
557
|
+
).action(async (opts) => {
|
|
558
|
+
const json = program.opts().json;
|
|
559
|
+
const acc = activeOrExit();
|
|
560
|
+
let listed;
|
|
561
|
+
const set = await hiddenSetForCli(acc.ownId, null);
|
|
562
|
+
try {
|
|
563
|
+
listed = await readHidden(zaloApi(), set);
|
|
564
|
+
} catch (e) {
|
|
565
|
+
error(`Get hidden conversations failed: ${e.message}`);
|
|
566
|
+
return;
|
|
567
|
+
}
|
|
568
|
+
if (!listed.hasPin) {
|
|
569
|
+
output({ count: listed.count, hasPin: false, threads: [] }, json, () =>
|
|
570
|
+
info("No hidden-chat PIN is set; nothing is hidden."),
|
|
571
|
+
);
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
// With a PIN set it is checked even when nothing is hidden: a wrong PIN is refused (exit 1, counted toward
|
|
575
|
+
// the lockout) whatever the list holds, as Zalo asks it before showing the list.
|
|
576
|
+
await unlockOrExit(set, {
|
|
577
|
+
pinStdin: Boolean(opts.pinStdin),
|
|
578
|
+
json,
|
|
579
|
+
extra: { count: listed.count, hasPin: true },
|
|
580
|
+
});
|
|
581
|
+
let names = new Map();
|
|
582
|
+
try {
|
|
583
|
+
initDb(getAccountDbPath(acc.ownId));
|
|
584
|
+
names = getThreadNames();
|
|
585
|
+
} catch {
|
|
586
|
+
/* no cache: ids only */
|
|
587
|
+
}
|
|
588
|
+
const threads = listed.threads.map((t) => ({
|
|
589
|
+
threadId: t.threadId,
|
|
590
|
+
threadType: t.isGroup === null ? null : t.isGroup ? "group" : "dm",
|
|
591
|
+
name: names.get(String(t.threadId))?.name ?? null,
|
|
592
|
+
}));
|
|
593
|
+
output({ count: threads.length, hasPin: true, threads }, json, () => {
|
|
594
|
+
if (!threads.length) {
|
|
595
|
+
info("No hidden conversations.");
|
|
596
|
+
return;
|
|
597
597
|
}
|
|
598
|
+
info(`${threads.length} hidden conversation(s):`);
|
|
599
|
+
for (const t of threads)
|
|
600
|
+
console.log(` ${t.threadId.padEnd(22)} ${(t.threadType ?? "?").padEnd(6)} ${t.name ?? ""}`);
|
|
598
601
|
});
|
|
602
|
+
});
|
|
599
603
|
|
|
600
604
|
conv.command("hide <threadIds...>")
|
|
601
|
-
.description("Hide conversation(s)")
|
|
605
|
+
.description("Hide conversation(s) behind the hidden-chat PIN (a PIN must be set first: `conv hidden-pin`)")
|
|
602
606
|
.option("-t, --type <n>", "Thread type: 0=User, 1=Group", "0")
|
|
603
607
|
.action(async (threadIds, opts) => {
|
|
608
|
+
const acc = activeOrExit();
|
|
604
609
|
try {
|
|
605
|
-
const
|
|
610
|
+
const set = await hiddenSetForCli(acc.ownId, null);
|
|
611
|
+
await set.refresh(zaloApi());
|
|
612
|
+
// Zalo asks for a PIN before the first hide: a hidden chat with no PIN is hidden from nobody.
|
|
613
|
+
if (!set.hasPin) {
|
|
614
|
+
error("No hidden-chat PIN is set: set one with `zalo-agent conv hidden-pin` first, then hide.");
|
|
615
|
+
process.exit(1);
|
|
616
|
+
}
|
|
617
|
+
const result = await zaloApi().setHiddenConversations(true, threadIds, Number(opts.type));
|
|
618
|
+
for (const id of threadIds) set.ids.add(String(id));
|
|
606
619
|
output(result, program.opts().json, () => success(`Hidden ${threadIds.length} conversation(s)`));
|
|
607
620
|
} catch (e) {
|
|
608
621
|
error(`Hide failed: ${e.message}`);
|
|
609
622
|
}
|
|
610
623
|
});
|
|
611
624
|
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
625
|
+
addHiddenOptions(
|
|
626
|
+
conv
|
|
627
|
+
.command("unhide <threadIds...>")
|
|
628
|
+
.description("Unhide conversation(s): asks for the hidden-chat PIN, as opening a hidden chat does")
|
|
629
|
+
.option("-t, --type <n>", "Thread type: 0=User, 1=Group", "0"),
|
|
630
|
+
{ include: false },
|
|
631
|
+
).action(async (threadIds, opts) => {
|
|
632
|
+
const json = program.opts().json;
|
|
633
|
+
const acc = activeOrExit();
|
|
634
|
+
const set = await hiddenSetForCli(acc.ownId, null);
|
|
635
|
+
try {
|
|
636
|
+
await set.refresh(zaloApi());
|
|
637
|
+
} catch (e) {
|
|
638
|
+
error(`Unhide failed: ${e.message}`);
|
|
639
|
+
return;
|
|
640
|
+
}
|
|
641
|
+
await unlockOrExit(set, { pinStdin: Boolean(opts.pinStdin), json });
|
|
642
|
+
try {
|
|
643
|
+
const result = await zaloApi().setHiddenConversations(false, threadIds, Number(opts.type));
|
|
644
|
+
for (const id of threadIds) set.ids.delete(String(id));
|
|
645
|
+
output(result, json, () => success(`Unhidden ${threadIds.length} conversation(s)`));
|
|
646
|
+
} catch (e) {
|
|
647
|
+
error(`Unhide failed: ${e.message}`);
|
|
648
|
+
}
|
|
649
|
+
});
|
|
650
|
+
|
|
651
|
+
const hiddenPin = conv
|
|
652
|
+
.command("hidden-pin [removed]")
|
|
653
|
+
.description(
|
|
654
|
+
"Set or change the hidden-chat PIN: asks for the current PIN (when one is set), then the new one twice. " +
|
|
655
|
+
"The PIN is never a command-line argument; --pin-stdin reads the same answers, one per line",
|
|
656
|
+
)
|
|
657
|
+
.option("--pin-stdin", "Read the PINs from standard input, one per line (current, if set; new; new again)");
|
|
658
|
+
// The 2.x form `conv hidden-pin 1234` put the PIN in the shell history and the process list: refused before any
|
|
659
|
+
// login (src/index.js runs this preflight), with how to do it now.
|
|
660
|
+
hiddenPin.zaloPreflight = (command, { json }) => {
|
|
661
|
+
if (command.args.length === 0) return;
|
|
662
|
+
const why =
|
|
663
|
+
"Not done: `conv hidden-pin` no longer takes the PIN as an argument (it would land in your shell " +
|
|
664
|
+
"history and the process list). Run `zalo-agent conv hidden-pin` and type it at the prompt, or pipe " +
|
|
665
|
+
"it with --pin-stdin.";
|
|
666
|
+
if (json) console.log(JSON.stringify({ error: why, pinArgumentRemoved: true }, null, 2));
|
|
667
|
+
else error(why);
|
|
668
|
+
process.exit(1);
|
|
669
|
+
};
|
|
670
|
+
hiddenPin.action(async (_removed, opts) => {
|
|
671
|
+
const json = program.opts().json;
|
|
672
|
+
const acc = activeOrExit();
|
|
673
|
+
const set = await hiddenSetForCli(acc.ownId, null);
|
|
674
|
+
try {
|
|
675
|
+
await set.refresh(zaloApi());
|
|
676
|
+
} catch (e) {
|
|
677
|
+
error(`Update PIN failed: ${e.message}`);
|
|
678
|
+
return;
|
|
679
|
+
}
|
|
680
|
+
const lines = opts.pinStdin ? await readPinLines() : null;
|
|
681
|
+
const ask = async (prompt) => {
|
|
682
|
+
const v = await readPin({ pinStdin: Boolean(opts.pinStdin), prompt, lines });
|
|
683
|
+
if (v === null) exitPinRequired(json, { hasPin: set.hasPin });
|
|
684
|
+
return v;
|
|
685
|
+
};
|
|
686
|
+
let typed;
|
|
687
|
+
try {
|
|
688
|
+
typed = {
|
|
689
|
+
pin: set.hasPin ? await ask("Current hidden-chat PIN: ") : undefined,
|
|
690
|
+
newPin: await ask("New PIN (4 digits): "),
|
|
691
|
+
newPin2: await ask("New PIN again: "),
|
|
692
|
+
};
|
|
693
|
+
} catch (e) {
|
|
694
|
+
error(`Could not read the PIN: ${e.message}`);
|
|
695
|
+
process.exit(1);
|
|
696
|
+
}
|
|
697
|
+
let r;
|
|
698
|
+
try {
|
|
699
|
+
r = await changeHiddenPin(zaloApi(), set, typed);
|
|
700
|
+
} catch (e) {
|
|
701
|
+
error(`Update PIN failed: ${e.message}`);
|
|
702
|
+
return;
|
|
703
|
+
} finally {
|
|
704
|
+
typed = null;
|
|
705
|
+
}
|
|
706
|
+
if (!r.ok) {
|
|
707
|
+
error(r.message);
|
|
708
|
+
process.exit(1);
|
|
709
|
+
}
|
|
710
|
+
output({ success: true, changed: true, hadPin: r.hadPin }, json, () =>
|
|
711
|
+
success(r.hadPin ? "Hidden-chat PIN changed" : "Hidden-chat PIN set"),
|
|
712
|
+
);
|
|
713
|
+
});
|
|
714
|
+
|
|
715
|
+
conv.command("hidden-pin-reset")
|
|
716
|
+
.description(
|
|
717
|
+
"Remove the hidden-chat PIN (no PIN needed) and, as Zalo does, delete every hidden conversation's " +
|
|
718
|
+
"history for this account; each deletion is reported",
|
|
719
|
+
)
|
|
720
|
+
.action(async () => {
|
|
721
|
+
const acc = activeOrExit();
|
|
616
722
|
try {
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
error(`Unhide failed: ${e.message}`);
|
|
723
|
+
initDb(getAccountDbPath(acc.ownId));
|
|
724
|
+
} catch {
|
|
725
|
+
/* no cache: the group store can still anchor a group's delete */
|
|
621
726
|
}
|
|
622
|
-
});
|
|
623
|
-
|
|
624
|
-
conv.command("hidden-pin <pin>")
|
|
625
|
-
.description("Set or update PIN for hidden conversations (4 digits)")
|
|
626
|
-
.action(async (pin) => {
|
|
627
727
|
try {
|
|
628
|
-
const
|
|
629
|
-
|
|
728
|
+
const set = await hiddenSetForCli(acc.ownId, null);
|
|
729
|
+
const r = await resetHiddenPinAndDelete(zaloApi(), set);
|
|
730
|
+
const failed = r.conversations.filter((c) => !c.deleted);
|
|
731
|
+
if (failed.length && program.opts().json) process.exitCode = 1;
|
|
732
|
+
output(
|
|
733
|
+
{
|
|
734
|
+
...(failed.length && { error: `${failed.length} hidden conversation(s) could not be deleted` }),
|
|
735
|
+
success: failed.length === 0,
|
|
736
|
+
...r,
|
|
737
|
+
},
|
|
738
|
+
program.opts().json,
|
|
739
|
+
() => {
|
|
740
|
+
success("Hidden-chat PIN removed");
|
|
741
|
+
for (const c of r.conversations) {
|
|
742
|
+
if (c.deleted) success(`Deleted hidden conversation ${c.threadId} (${c.threadType})`);
|
|
743
|
+
else error(`Could not delete hidden conversation ${c.threadId}: ${c.error}`);
|
|
744
|
+
}
|
|
745
|
+
if (!r.conversations.length) info("There were no hidden conversations to delete.");
|
|
746
|
+
},
|
|
747
|
+
);
|
|
630
748
|
} catch (e) {
|
|
631
|
-
error(`
|
|
749
|
+
error(`Reset PIN failed: ${e.message}`);
|
|
632
750
|
}
|
|
633
751
|
});
|
|
634
752
|
|
|
635
|
-
conv.command("
|
|
636
|
-
.description(
|
|
637
|
-
|
|
753
|
+
conv.command("block-sharing <threadId> <state>")
|
|
754
|
+
.description(
|
|
755
|
+
"Turn block sharing on or off for one conversation (on|off): Zalo's setting that stops its messages " +
|
|
756
|
+
"being forwarded or saved. Needs a zBusiness Max account. " +
|
|
757
|
+
"`read run blocksharing-list` lists the conversations that have it",
|
|
758
|
+
)
|
|
759
|
+
.option("-t, --type <n>", "Thread type: 0=User, 1=Group", "0")
|
|
760
|
+
.action(async (threadId, state, opts) => {
|
|
638
761
|
try {
|
|
639
|
-
const
|
|
640
|
-
|
|
762
|
+
const type = threadTypeOf(opts.type);
|
|
763
|
+
if (type === null) throw new Error(`Invalid --type "${opts.type}": use 0 (user) or 1 (group).`);
|
|
764
|
+
// The same reply as zalo_conversation `block_sharing` (src/core/block-sharing.js).
|
|
765
|
+
const result = await setBlockSharing(zaloApi(), {
|
|
766
|
+
threadId,
|
|
767
|
+
type,
|
|
768
|
+
enabled: parseOnOff(state, "block-sharing"),
|
|
769
|
+
});
|
|
770
|
+
output(result, program.opts().json, () =>
|
|
771
|
+
success(`Block sharing ${result.blockSharing ? "on" : "off"} for ${threadId}`),
|
|
772
|
+
);
|
|
641
773
|
} catch (e) {
|
|
642
|
-
error(`
|
|
774
|
+
error(`Block sharing failed: ${e.message}`);
|
|
643
775
|
}
|
|
644
776
|
});
|
|
645
777
|
|
|
@@ -659,8 +791,7 @@ export function registerConvCommands(program, deps = {}) {
|
|
|
659
791
|
.option("-t, --type <n>", "Thread type: 0=User, 1=Group", "0")
|
|
660
792
|
.action(async (threadId, ttl, opts) => {
|
|
661
793
|
try {
|
|
662
|
-
const
|
|
663
|
-
const ttlValue = ttlMap[ttl];
|
|
794
|
+
const ttlValue = AUTO_DELETE_TTLS[ttl];
|
|
664
795
|
if (ttlValue === undefined) {
|
|
665
796
|
error(`Invalid TTL "${ttl}". Valid: off, 1d, 7d, 14d`);
|
|
666
797
|
return;
|
|
@@ -683,7 +814,7 @@ export function registerConvCommands(program, deps = {}) {
|
|
|
683
814
|
const api = getApi();
|
|
684
815
|
const type = Number(opts.type);
|
|
685
816
|
|
|
686
|
-
//
|
|
817
|
+
// The session exposes deleteChat(lastMessage, threadId, type) — NOT
|
|
687
818
|
// deleteConversation(), which this used to call and which does
|
|
688
819
|
// not exist, so `conv delete` failed on every invocation with
|
|
689
820
|
// "getApi(...).deleteConversation is not a function".
|
|
@@ -760,12 +891,21 @@ export function registerConvCommands(program, deps = {}) {
|
|
|
760
891
|
? getOrphanThreads().map((t) => ({ threadId: String(t.threadId), name: t.name, ...t }))
|
|
761
892
|
: [{ threadId: String(threadId), name: "" }];
|
|
762
893
|
|
|
894
|
+
const jsonMode = program.opts().json;
|
|
895
|
+
const note = "Nothing was sent to Zalo; only this machine's copy was removed.";
|
|
763
896
|
if (!targets.length) {
|
|
764
|
-
|
|
897
|
+
output({ success: true, forgotten: 0, messages: 0, files: 0, note }, jsonMode, () =>
|
|
898
|
+
success("No orphaned conversations — nothing to forget."),
|
|
899
|
+
);
|
|
765
900
|
process.exit(0);
|
|
766
901
|
}
|
|
767
902
|
|
|
768
903
|
if (opts.dryRun) {
|
|
904
|
+
// The same preview `zalo_conversation forget` gives with dryRun.
|
|
905
|
+
if (jsonMode) {
|
|
906
|
+
output({ dryRun: true, conversations: targets }, jsonMode);
|
|
907
|
+
process.exit(0);
|
|
908
|
+
}
|
|
769
909
|
info(`Would forget ${targets.length} conversation(s):`);
|
|
770
910
|
// Every one of them: a preview that stops at a page does not
|
|
771
911
|
// show what the real run is about to remove.
|
|
@@ -774,51 +914,94 @@ export function registerConvCommands(program, deps = {}) {
|
|
|
774
914
|
` ${t.threadId}${t.name ? ` (${t.name})` : ""}${t.messages ? ` — ${t.messages} message(s), ${t.files || 0} file(s)` : ""}`,
|
|
775
915
|
);
|
|
776
916
|
}
|
|
777
|
-
info("Re-run
|
|
917
|
+
info("Re-run with --yes instead of --dry-run to remove them. This does not contact Zalo.");
|
|
778
918
|
process.exit(0);
|
|
779
919
|
}
|
|
780
920
|
|
|
781
921
|
let removed = 0;
|
|
782
922
|
let files = 0;
|
|
923
|
+
const errors = [];
|
|
783
924
|
for (const t of targets) {
|
|
784
|
-
//
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
925
|
+
// Media first, then rows (src/core/conversation-actions.js); each failure is reported, not fatal.
|
|
926
|
+
const gone = await forgetConversation(t.threadId);
|
|
927
|
+
files += gone.files;
|
|
928
|
+
removed += gone.messages;
|
|
929
|
+
for (const e of gone.errors) errors.push({ threadId: t.threadId, ...e });
|
|
930
|
+
}
|
|
931
|
+
// The reply `zalo_conversation forget` gives (src/mcp/actions-conversation.js).
|
|
932
|
+
const result = {
|
|
933
|
+
success: errors.length === 0,
|
|
934
|
+
forgotten: targets.length,
|
|
935
|
+
messages: removed,
|
|
936
|
+
files,
|
|
937
|
+
...(errors.length > 0 && { errors }),
|
|
938
|
+
note,
|
|
939
|
+
};
|
|
940
|
+
// A media cleanup failure is a warning; a conversation whose rows stayed is a failure.
|
|
941
|
+
const failed = errors.find((e) => e.what !== "media");
|
|
942
|
+
if (jsonMode) {
|
|
943
|
+
if (failed) process.exitCode = 1;
|
|
944
|
+
output(
|
|
945
|
+
failed ? { error: `Failed to forget ${failed.threadId}: ${failed.message}`, ...result } : result,
|
|
946
|
+
jsonMode,
|
|
947
|
+
);
|
|
948
|
+
process.exit();
|
|
949
|
+
}
|
|
950
|
+
for (const e of errors) {
|
|
951
|
+
if (e.what === "media") warning(`Media cleanup failed for ${e.threadId}: ${e.message}`);
|
|
952
|
+
else error(`Failed to forget ${e.threadId}: ${e.message}`);
|
|
798
953
|
}
|
|
799
954
|
success(
|
|
800
955
|
`Forgot ${targets.length} conversation(s): ${removed} message(s) and ${files} file(s) removed locally.`,
|
|
801
956
|
);
|
|
802
957
|
info("Nothing was sent to Zalo; this only cleared the local cache.");
|
|
803
|
-
|
|
958
|
+
// 1 when any conversation failed to forget (error() set it), else 0.
|
|
959
|
+
process.exit();
|
|
804
960
|
});
|
|
805
961
|
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
962
|
+
addHiddenOptions(
|
|
963
|
+
conv
|
|
964
|
+
.command("muted")
|
|
965
|
+
.description(
|
|
966
|
+
"List the conversations and groups you have muted (hidden chats are left out unless --include-hidden)",
|
|
967
|
+
),
|
|
968
|
+
).action(async (opts) => {
|
|
969
|
+
try {
|
|
970
|
+
const raw = await zaloApi().getMute();
|
|
971
|
+
// Zalo's answer: `{chatEntries: [{id, ...}], groupChatEntries: [{id, ...}]}`.
|
|
972
|
+
const shown = await hiddenFilter(opts);
|
|
973
|
+
const result =
|
|
974
|
+
raw && typeof raw === "object"
|
|
975
|
+
? {
|
|
976
|
+
...raw,
|
|
977
|
+
...(Array.isArray(raw.chatEntries) && {
|
|
978
|
+
chatEntries: shown(raw.chatEntries, (m) => m?.id),
|
|
979
|
+
}),
|
|
980
|
+
...(Array.isArray(raw.groupChatEntries) && {
|
|
981
|
+
groupChatEntries: shown(raw.groupChatEntries, (m) => m?.id),
|
|
982
|
+
}),
|
|
983
|
+
}
|
|
984
|
+
: raw;
|
|
985
|
+
output(result, program.opts().json, () => {
|
|
986
|
+
for (const [label, entries] of [
|
|
987
|
+
["chat", result?.chatEntries ?? []],
|
|
988
|
+
["group", result?.groupChatEntries ?? []],
|
|
989
|
+
]) {
|
|
990
|
+
info(`${entries.length} muted ${label}(s)`);
|
|
991
|
+
for (const m of entries) console.log(` ${m.id} mode=${m.muteMode} duration=${m.duration}`);
|
|
992
|
+
}
|
|
993
|
+
});
|
|
994
|
+
} catch (e) {
|
|
995
|
+
error(`Get muted conversations failed: ${e.message}`);
|
|
996
|
+
}
|
|
997
|
+
});
|
|
998
|
+
// Asked about first, as Zalo does: --yes to act, --dry-run to preview (src/core/confirm-guard.js).
|
|
999
|
+
guardSubcommand(conv, "delete", "conv.delete", { target: (threadId) => ({ threadId }) });
|
|
1000
|
+
guardSubcommand(conv, "hidden-pin-reset", "conv.hiddenPinReset", { target: () => ({}) });
|
|
1001
|
+
guardSubcommand(conv, "unhide", "conv.unhide", { target: (threadIds) => ({ threadIds }) });
|
|
1002
|
+
// `forget` keeps its own --dry-run, which lists what would go.
|
|
1003
|
+
guardSubcommand(conv, "forget", "conv.forget", {
|
|
1004
|
+
target: (threadId, opts) => ({ threadId: threadId ?? null, orphans: Boolean(opts.orphans) }),
|
|
1005
|
+
ownDryRun: true,
|
|
1006
|
+
});
|
|
824
1007
|
}
|