@ardennguyen/zalo-agent-cli 2.5.8 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +23 -2
- package/DISCLAIMER.md +3 -3
- package/LICENSE +2 -3
- package/NOTICE +14 -34
- package/README.md +166 -72
- package/package.json +37 -19
- package/src/commands/account.js +369 -40
- package/src/commands/auto-reply.js +8 -25
- package/src/commands/bank.js +25 -6
- package/src/commands/catalog.js +54 -11
- package/src/commands/cloud.js +459 -0
- package/src/commands/conv.js +470 -287
- package/src/commands/db.js +442 -0
- package/src/commands/fleet.js +449 -41
- package/src/commands/friend.js +198 -45
- package/src/commands/group.js +256 -43
- package/src/commands/label.js +16 -2
- package/src/commands/listen.js +495 -122
- package/src/commands/login.js +313 -117
- package/src/commands/mcp-approver.js +103 -0
- package/src/commands/mcp-webhook.js +13 -5
- package/src/commands/mcp.js +800 -104
- package/src/commands/msg-media.js +187 -0
- package/src/commands/msg-search.js +219 -0
- package/src/commands/msg.js +414 -110
- package/src/commands/oa/calls.js +134 -0
- package/src/commands/oa/content.js +266 -0
- package/src/commands/oa/gmf.js +429 -0
- package/src/commands/oa/messages.js +355 -0
- package/src/commands/oa/users.js +502 -0
- package/src/commands/oa-init.js +122 -123
- package/src/commands/oa-listen.js +374 -150
- package/src/commands/oa.js +83 -598
- package/src/commands/policy.js +224 -0
- package/src/commands/poll.js +3 -0
- package/src/commands/presence.js +175 -0
- package/src/commands/profile.js +45 -94
- package/src/commands/quick-msg.js +26 -0
- package/src/commands/read.js +172 -0
- package/src/commands/reminder.js +34 -4
- package/src/commands/social.js +223 -0
- package/src/commands/sync.js +482 -158
- package/src/commands/write.js +85 -0
- package/src/commands/zbs.js +502 -0
- package/src/core/account-devices.js +76 -0
- package/src/core/account-state.js +167 -0
- package/src/core/account-status.js +355 -0
- package/src/core/accounts.js +11 -4
- package/src/core/admin-api.js +392 -0
- package/src/core/approval.js +271 -0
- package/src/core/auto-reply.js +27 -0
- package/src/core/bank-accounts.js +1 -1
- package/src/core/block-sharing.js +43 -0
- package/src/core/board-pass.js +94 -0
- package/src/core/cached-message.js +78 -8
- package/src/core/cloud-plan.js +285 -0
- package/src/core/cloud-verify.js +305 -0
- package/src/core/confirm-guard.js +808 -0
- package/src/core/contact-names.js +504 -0
- package/src/core/control-events.js +525 -0
- package/src/core/control-replay.js +106 -0
- package/src/core/conversation-actions.js +214 -0
- package/src/core/credentials.js +112 -11
- package/src/core/current-user-names.js +60 -26
- package/src/core/daemon-channel.js +296 -15
- package/src/core/daemon-health.js +110 -7
- package/src/core/daemon-presence.js +455 -0
- package/src/core/daemon-sync.js +58 -18
- package/src/core/data-export.js +610 -0
- package/src/core/db-tools.js +473 -0
- package/src/core/db.js +1327 -83
- package/src/core/deploy-policy.js +560 -0
- package/src/core/device-since.js +123 -0
- package/src/core/e2ee-notice.js +41 -0
- package/src/core/exit-codes.js +7 -0
- package/src/core/export-crypt.js +290 -0
- package/src/core/fleet-controller.js +340 -0
- package/src/core/fleet-purge.js +144 -0
- package/src/core/fleet-qr.js +273 -0
- package/src/core/fleet-serve.js +292 -0
- package/src/core/fleet-supervisor.js +176 -0
- package/src/core/fleet-templates.js +568 -39
- package/src/core/fleet.js +232 -20
- package/src/core/friend-requests.js +80 -16
- package/src/core/friend-search.js +1 -1
- package/src/core/group-admin.js +2 -29
- package/src/core/group-departure.js +233 -0
- package/src/core/group-exit.js +621 -0
- package/src/core/group-members.js +21 -9
- package/src/core/group-settings.js +5 -207
- package/src/core/hidden-chat-actions.js +96 -0
- package/src/core/hidden-chats.js +425 -0
- package/src/core/history-fetch.js +81 -27
- package/src/core/keystore/config.js +163 -0
- package/src/core/keystore/container.js +208 -0
- package/src/core/keystore/index.js +483 -0
- package/src/core/keystore/keyring.js +588 -0
- package/src/core/keystore/kms.js +157 -0
- package/src/core/keystore/media-seal.js +711 -0
- package/src/core/keystore/providers.js +492 -0
- package/src/core/keystore/stores.js +177 -0
- package/src/core/keystore/worker.js +80 -0
- package/src/core/kick-marker.js +61 -0
- package/src/core/last-online.js +236 -0
- package/src/core/list-all.js +280 -0
- package/src/core/listener-lifecycle.js +101 -10
- package/src/core/live-api.js +1 -1
- package/src/core/live-store.js +111 -53
- package/src/core/local-reads.js +16 -0
- package/src/core/logout.js +102 -140
- package/src/core/media-deliver.js +732 -0
- package/src/core/media-route.js +347 -0
- package/src/core/media-store.js +408 -0
- package/src/core/mutual-groups.js +94 -0
- package/src/core/name-refresh.js +135 -0
- package/src/core/oa/calls.js +212 -0
- package/src/core/oa/content.js +390 -0
- package/src/core/oa/gmf.js +537 -0
- package/src/core/oa/messages.js +470 -0
- package/src/core/oa/oauth.js +422 -0
- package/src/core/oa/transport.js +645 -0
- package/src/core/oa/users.js +694 -0
- package/src/core/oa-client.js +49 -415
- package/src/core/overflow-repair.js +221 -0
- package/src/core/policy-layer.js +55 -0
- package/src/core/policy-schema.js +401 -0
- package/src/core/policy-store.js +1058 -0
- package/src/core/presence-config.js +100 -0
- package/src/core/presence-leases.js +211 -0
- package/src/core/presence.js +688 -0
- package/src/core/profile-settings.js +243 -0
- package/src/core/qr-login-flow.js +237 -0
- package/src/core/read-state.js +145 -22
- package/src/core/receipts.js +355 -548
- package/src/core/recent-conversations.js +28 -6
- package/src/core/row-mac.js +405 -0
- package/src/core/search.js +271 -0
- package/src/core/secure-page.js +771 -0
- package/src/core/self-heal.js +493 -34
- package/src/core/session-expiry.js +103 -0
- package/src/core/session-notice.js +249 -0
- package/src/core/social/client.js +296 -0
- package/src/core/social/dpop.js +54 -0
- package/src/core/socket-host.js +437 -0
- package/src/core/sqlite.js +520 -0
- package/src/core/startup-gate.js +49 -5
- package/src/core/storage-quota.js +796 -0
- package/src/core/sync-action.js +180 -0
- package/src/core/sync-v2/auto-sync.js +356 -0
- package/src/core/sync-v2/board.js +130 -92
- package/src/core/sync-v2/conv-state.js +21 -4
- package/src/core/sync-v2/gap-advice.js +2 -3
- package/src/core/sync-v2/index.js +739 -323
- package/src/core/sync-v2/media.js +116 -27
- package/src/core/sync-v2/plan.js +16 -2
- package/src/core/sync-v2/ranges.js +98 -0
- package/src/core/sync-v2/reactions.js +12 -196
- package/src/core/sync-v2/senders.js +32 -14
- package/src/core/sync-v2/zcloud.js +177 -579
- package/src/core/sync.js +23 -21
- package/src/core/test-fake-session.js +87 -0
- package/src/core/typing.js +78 -0
- package/src/core/unknown-acts.js +240 -0
- package/src/core/voice-text.js +171 -0
- package/src/core/webhook-outbox.js +110 -12
- package/src/core/zalo-client.js +147 -188
- package/src/core/zbs/api.js +505 -0
- package/src/core/zbs/image.js +85 -0
- package/src/core/zbs/phone.js +59 -0
- package/src/core/zbs/rsa.js +129 -0
- package/src/core/zbs/template-check.js +449 -0
- package/src/index.js +60 -10
- package/src/mcp/action-tool.js +188 -0
- package/src/mcp/actions-business.js +488 -0
- package/src/mcp/actions-conversation.js +633 -0
- package/src/mcp/actions-media.js +268 -0
- package/src/mcp/actions-profile.js +281 -0
- package/src/mcp/actions-social.js +518 -0
- package/src/mcp/instructions.js +19 -5
- package/src/mcp/mcp-config.js +112 -10
- package/src/mcp/mcp-http-transport.js +162 -25
- package/src/mcp/mcp-server.js +14 -3
- package/src/mcp/mcp-tools.js +1686 -384
- package/src/mcp/message-buffer.js +58 -12
- package/src/mcp/notifier.js +1 -1
- package/src/mcp/official-tool.js +298 -0
- package/src/mcp/sync-jobs.js +7 -1
- package/src/mcp/sync-stages.js +72 -0
- package/src/mcp/thread-name-cache.js +43 -5
- package/src/mcp/tool-presence.js +153 -0
- package/src/mcp/wait-batch.js +27 -0
- package/src/mcp/wait-result.js +19 -21
- package/src/utils/bank-helpers.js +52 -1
- package/src/utils/cli-args.js +12 -12
- package/src/utils/date-range.js +50 -0
- package/src/utils/hidden-access.js +141 -0
- package/src/utils/interrupt.js +37 -0
- package/src/utils/json-input.js +41 -0
- package/src/utils/list-replies.js +60 -0
- package/src/utils/my-documents.js +2 -3
- package/src/utils/output.js +66 -2
- package/src/utils/qr-display.js +14 -8
- package/src/utils/qr-http-server.js +674 -134
- package/src/utils/quote.js +8 -8
- package/src/utils/secret-input.js +57 -0
- package/src/utils/vn-text.js +72 -0
- package/src/zalo/README.md +46 -0
- package/src/zalo/anomaly-store.js +49 -0
- package/src/zalo/api/actions.js +670 -0
- package/src/zalo/api/boards.js +1036 -0
- package/src/zalo/api/business.js +662 -0
- package/src/zalo/api/conversations.js +329 -0
- package/src/zalo/api/groups.js +631 -0
- package/src/zalo/api/messages.js +695 -0
- package/src/zalo/api/people.js +711 -0
- package/src/zalo/api/profile.js +374 -0
- package/src/zalo/api/session.js +45 -0
- package/src/zalo/api/upload.js +976 -0
- package/src/zalo/api.js +117 -0
- package/src/zalo/client.js +206 -0
- package/src/zalo/custom/forward.js +199 -0
- package/src/zalo/custom/gid.js +123 -0
- package/src/zalo/custom/group-history.js +246 -0
- package/src/zalo/custom/group-invite.js +53 -0
- package/src/zalo/custom/group-settings.js +186 -0
- package/src/zalo/custom/group-visibility.js +71 -0
- package/src/zalo/custom/pin.js +220 -0
- package/src/zalo/custom/renewlink.js +115 -0
- package/src/zalo/device-fingerprint.js +33 -0
- package/src/zalo/download-fetch.js +45 -0
- package/src/zalo/enums.js +25 -0
- package/src/zalo/errors.js +195 -0
- package/src/zalo/format/mentions.js +140 -0
- package/src/zalo/format/split-message.js +222 -0
- package/src/zalo/format/urgency.js +29 -0
- package/src/zalo/headers.js +93 -0
- package/src/zalo/index.js +72 -0
- package/src/zalo/kernel/atomic-file.js +217 -0
- package/src/zalo/kernel/bound.js +46 -0
- package/src/zalo/kernel/cipher.js +88 -0
- package/src/zalo/kernel/cookies.js +125 -0
- package/src/zalo/kernel/endpoint.js +211 -0
- package/src/zalo/kernel/http.js +360 -0
- package/src/zalo/kernel/json-ids.js +118 -0
- package/src/zalo/kernel/login-cipher.js +165 -0
- package/src/zalo/kernel/secret-file.js +45 -0
- package/src/zalo/kernel/session.js +261 -0
- package/src/zalo/kernel/zcloud-cipher.js +83 -0
- package/src/zalo/kickout.js +136 -0
- package/src/zalo/listener/dispatch.js +404 -0
- package/src/zalo/listener/frames.js +222 -0
- package/src/zalo/listener/friend-events.js +113 -0
- package/src/zalo/listener/group-events.js +117 -0
- package/src/zalo/listener/keepalive.js +191 -0
- package/src/zalo/listener/listener.js +469 -0
- package/src/zalo/listener/models.js +220 -0
- package/src/zalo/listener/reactions.js +224 -0
- package/src/zalo/listener/socket-tap.js +228 -0
- package/src/zalo/login.js +387 -0
- package/src/zalo/logout.js +192 -0
- package/src/zalo/maintenance.js +183 -0
- package/src/zalo/official-logout.js +254 -0
- package/src/zalo/paging.js +114 -0
- package/src/zalo/profile.js +184 -0
- package/src/zalo/pulls.js +129 -0
- package/src/zalo/qr-image.js +90 -0
- package/src/zalo/qr-login.js +494 -0
- package/src/zalo/queues/control-queue.js +193 -0
- package/src/zalo/queues/offline-queue.js +275 -0
- package/src/zalo/queues/queue-verify.js +306 -0
- package/src/zalo/reads.js +723 -0
- package/src/zalo/receipts.js +550 -0
- package/src/zalo/req-id.js +24 -0
- package/src/zalo/retry.js +343 -0
- package/src/zalo/session-call.js +55 -0
- package/src/zalo/socket.js +762 -0
- package/src/zalo/transfer-sync/assets.js +181 -0
- package/src/zalo/transfer-sync/channel.js +459 -0
- package/src/zalo/transfer-sync/download.js +161 -0
- package/src/zalo/transfer-sync/message-types.js +520 -0
- package/src/zalo/transfer-sync/transfer.js +468 -0
- package/src/zalo/trust-store.js +99 -0
- package/src/zalo/trust-wasm.js +393 -0
- package/src/zalo/upkeep.js +127 -0
- package/src/zalo/web-call.js +103 -0
- package/src/zalo/writes.js +704 -0
- package/src/zalo/zcloud-e2ee.js +214 -0
- package/src/zalo/zcloud.js +802 -0
- package/node_modules/asynckit/LICENSE +0 -21
- package/node_modules/asynckit/README.md +0 -233
- package/node_modules/asynckit/bench.js +0 -76
- package/node_modules/asynckit/index.js +0 -6
- package/node_modules/asynckit/lib/abort.js +0 -29
- package/node_modules/asynckit/lib/async.js +0 -34
- package/node_modules/asynckit/lib/defer.js +0 -26
- package/node_modules/asynckit/lib/iterate.js +0 -75
- package/node_modules/asynckit/lib/readable_asynckit.js +0 -91
- package/node_modules/asynckit/lib/readable_parallel.js +0 -25
- package/node_modules/asynckit/lib/readable_serial.js +0 -25
- package/node_modules/asynckit/lib/readable_serial_ordered.js +0 -29
- package/node_modules/asynckit/lib/state.js +0 -37
- package/node_modules/asynckit/lib/streamify.js +0 -141
- package/node_modules/asynckit/lib/terminator.js +0 -29
- package/node_modules/asynckit/package.json +0 -63
- package/node_modules/asynckit/parallel.js +0 -43
- package/node_modules/asynckit/serial.js +0 -17
- package/node_modules/asynckit/serialOrdered.js +0 -75
- package/node_modules/asynckit/stream.js +0 -21
- package/node_modules/bignumber.js/CHANGELOG.md +0 -381
- package/node_modules/bignumber.js/LICENCE.md +0 -26
- package/node_modules/bignumber.js/README.md +0 -289
- package/node_modules/bignumber.js/bignumber.d.mts +0 -6
- package/node_modules/bignumber.js/bignumber.d.ts +0 -5
- package/node_modules/bignumber.js/bignumber.js +0 -2922
- package/node_modules/bignumber.js/bignumber.mjs +0 -2907
- package/node_modules/bignumber.js/doc/API.html +0 -2249
- package/node_modules/bignumber.js/package.json +0 -60
- package/node_modules/bignumber.js/types.d.ts +0 -1821
- package/node_modules/call-bind-apply-helpers/.eslintrc +0 -17
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +0 -12
- package/node_modules/call-bind-apply-helpers/.nycrc +0 -9
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +0 -30
- package/node_modules/call-bind-apply-helpers/LICENSE +0 -21
- package/node_modules/call-bind-apply-helpers/README.md +0 -62
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +0 -1
- package/node_modules/call-bind-apply-helpers/actualApply.js +0 -10
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +0 -19
- package/node_modules/call-bind-apply-helpers/applyBind.js +0 -10
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +0 -1
- package/node_modules/call-bind-apply-helpers/functionApply.js +0 -4
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +0 -1
- package/node_modules/call-bind-apply-helpers/functionCall.js +0 -4
- package/node_modules/call-bind-apply-helpers/index.d.ts +0 -64
- package/node_modules/call-bind-apply-helpers/index.js +0 -15
- package/node_modules/call-bind-apply-helpers/package.json +0 -85
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +0 -3
- package/node_modules/call-bind-apply-helpers/reflectApply.js +0 -4
- package/node_modules/call-bind-apply-helpers/test/index.js +0 -63
- package/node_modules/call-bind-apply-helpers/tsconfig.json +0 -9
- package/node_modules/combined-stream/License +0 -19
- package/node_modules/combined-stream/Readme.md +0 -138
- package/node_modules/combined-stream/lib/combined_stream.js +0 -208
- package/node_modules/combined-stream/package.json +0 -25
- package/node_modules/crypto-js/CONTRIBUTING.md +0 -28
- package/node_modules/crypto-js/LICENSE +0 -24
- package/node_modules/crypto-js/README.md +0 -275
- package/node_modules/crypto-js/aes.js +0 -234
- package/node_modules/crypto-js/blowfish.js +0 -471
- package/node_modules/crypto-js/bower.json +0 -39
- package/node_modules/crypto-js/cipher-core.js +0 -895
- package/node_modules/crypto-js/core.js +0 -807
- package/node_modules/crypto-js/crypto-js.js +0 -6657
- package/node_modules/crypto-js/docs/QuickStartGuide.wiki +0 -470
- package/node_modules/crypto-js/enc-base64.js +0 -136
- package/node_modules/crypto-js/enc-base64url.js +0 -148
- package/node_modules/crypto-js/enc-hex.js +0 -18
- package/node_modules/crypto-js/enc-latin1.js +0 -18
- package/node_modules/crypto-js/enc-utf16.js +0 -149
- package/node_modules/crypto-js/enc-utf8.js +0 -18
- package/node_modules/crypto-js/evpkdf.js +0 -134
- package/node_modules/crypto-js/format-hex.js +0 -66
- package/node_modules/crypto-js/format-openssl.js +0 -18
- package/node_modules/crypto-js/hmac-md5.js +0 -18
- package/node_modules/crypto-js/hmac-ripemd160.js +0 -18
- package/node_modules/crypto-js/hmac-sha1.js +0 -18
- package/node_modules/crypto-js/hmac-sha224.js +0 -18
- package/node_modules/crypto-js/hmac-sha256.js +0 -18
- package/node_modules/crypto-js/hmac-sha3.js +0 -18
- package/node_modules/crypto-js/hmac-sha384.js +0 -18
- package/node_modules/crypto-js/hmac-sha512.js +0 -18
- package/node_modules/crypto-js/hmac.js +0 -143
- package/node_modules/crypto-js/index.js +0 -18
- package/node_modules/crypto-js/lib-typedarrays.js +0 -76
- package/node_modules/crypto-js/md5.js +0 -268
- package/node_modules/crypto-js/mode-cfb.js +0 -80
- package/node_modules/crypto-js/mode-ctr-gladman.js +0 -116
- package/node_modules/crypto-js/mode-ctr.js +0 -58
- package/node_modules/crypto-js/mode-ecb.js +0 -40
- package/node_modules/crypto-js/mode-ofb.js +0 -54
- package/node_modules/crypto-js/package.json +0 -42
- package/node_modules/crypto-js/pad-ansix923.js +0 -49
- package/node_modules/crypto-js/pad-iso10126.js +0 -44
- package/node_modules/crypto-js/pad-iso97971.js +0 -40
- package/node_modules/crypto-js/pad-nopadding.js +0 -30
- package/node_modules/crypto-js/pad-pkcs7.js +0 -18
- package/node_modules/crypto-js/pad-zeropadding.js +0 -47
- package/node_modules/crypto-js/pbkdf2.js +0 -145
- package/node_modules/crypto-js/rabbit-legacy.js +0 -190
- package/node_modules/crypto-js/rabbit.js +0 -192
- package/node_modules/crypto-js/rc4.js +0 -139
- package/node_modules/crypto-js/ripemd160.js +0 -267
- package/node_modules/crypto-js/sha1.js +0 -150
- package/node_modules/crypto-js/sha224.js +0 -80
- package/node_modules/crypto-js/sha256.js +0 -199
- package/node_modules/crypto-js/sha3.js +0 -326
- package/node_modules/crypto-js/sha384.js +0 -83
- package/node_modules/crypto-js/sha512.js +0 -326
- package/node_modules/crypto-js/tripledes.js +0 -779
- package/node_modules/crypto-js/x64-core.js +0 -304
- package/node_modules/delayed-stream/.npmignore +0 -1
- package/node_modules/delayed-stream/License +0 -19
- package/node_modules/delayed-stream/Makefile +0 -7
- package/node_modules/delayed-stream/Readme.md +0 -141
- package/node_modules/delayed-stream/lib/delayed_stream.js +0 -107
- package/node_modules/delayed-stream/package.json +0 -27
- package/node_modules/dunder-proto/.eslintrc +0 -5
- package/node_modules/dunder-proto/.github/FUNDING.yml +0 -12
- package/node_modules/dunder-proto/.nycrc +0 -13
- package/node_modules/dunder-proto/CHANGELOG.md +0 -24
- package/node_modules/dunder-proto/LICENSE +0 -21
- package/node_modules/dunder-proto/README.md +0 -54
- package/node_modules/dunder-proto/get.d.ts +0 -5
- package/node_modules/dunder-proto/get.js +0 -30
- package/node_modules/dunder-proto/package.json +0 -76
- package/node_modules/dunder-proto/set.d.ts +0 -5
- package/node_modules/dunder-proto/set.js +0 -35
- package/node_modules/dunder-proto/test/get.js +0 -34
- package/node_modules/dunder-proto/test/index.js +0 -4
- package/node_modules/dunder-proto/test/set.js +0 -50
- package/node_modules/dunder-proto/tsconfig.json +0 -9
- package/node_modules/es-define-property/.eslintrc +0 -13
- package/node_modules/es-define-property/.github/FUNDING.yml +0 -12
- package/node_modules/es-define-property/.nycrc +0 -9
- package/node_modules/es-define-property/CHANGELOG.md +0 -29
- package/node_modules/es-define-property/LICENSE +0 -21
- package/node_modules/es-define-property/README.md +0 -49
- package/node_modules/es-define-property/index.d.ts +0 -3
- package/node_modules/es-define-property/index.js +0 -14
- package/node_modules/es-define-property/package.json +0 -81
- package/node_modules/es-define-property/test/index.js +0 -56
- package/node_modules/es-define-property/tsconfig.json +0 -10
- package/node_modules/es-errors/.eslintrc +0 -5
- package/node_modules/es-errors/.github/FUNDING.yml +0 -12
- package/node_modules/es-errors/CHANGELOG.md +0 -40
- package/node_modules/es-errors/LICENSE +0 -21
- package/node_modules/es-errors/README.md +0 -55
- package/node_modules/es-errors/eval.d.ts +0 -3
- package/node_modules/es-errors/eval.js +0 -4
- package/node_modules/es-errors/index.d.ts +0 -3
- package/node_modules/es-errors/index.js +0 -4
- package/node_modules/es-errors/package.json +0 -80
- package/node_modules/es-errors/range.d.ts +0 -3
- package/node_modules/es-errors/range.js +0 -4
- package/node_modules/es-errors/ref.d.ts +0 -3
- package/node_modules/es-errors/ref.js +0 -4
- package/node_modules/es-errors/syntax.d.ts +0 -3
- package/node_modules/es-errors/syntax.js +0 -4
- package/node_modules/es-errors/test/index.js +0 -19
- package/node_modules/es-errors/tsconfig.json +0 -49
- package/node_modules/es-errors/type.d.ts +0 -3
- package/node_modules/es-errors/type.js +0 -4
- package/node_modules/es-errors/uri.d.ts +0 -3
- package/node_modules/es-errors/uri.js +0 -4
- package/node_modules/es-object-atoms/.eslintrc +0 -16
- package/node_modules/es-object-atoms/.github/FUNDING.yml +0 -12
- package/node_modules/es-object-atoms/CHANGELOG.md +0 -44
- package/node_modules/es-object-atoms/LICENSE +0 -21
- package/node_modules/es-object-atoms/README.md +0 -63
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +0 -3
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +0 -11
- package/node_modules/es-object-atoms/ToObject.d.ts +0 -7
- package/node_modules/es-object-atoms/ToObject.js +0 -10
- package/node_modules/es-object-atoms/index.d.ts +0 -3
- package/node_modules/es-object-atoms/index.js +0 -4
- package/node_modules/es-object-atoms/isObject.d.ts +0 -3
- package/node_modules/es-object-atoms/isObject.js +0 -6
- package/node_modules/es-object-atoms/package.json +0 -79
- package/node_modules/es-object-atoms/test/index.js +0 -38
- package/node_modules/es-object-atoms/tsconfig.json +0 -7
- package/node_modules/es-set-tostringtag/.eslintrc +0 -13
- package/node_modules/es-set-tostringtag/.nycrc +0 -9
- package/node_modules/es-set-tostringtag/CHANGELOG.md +0 -67
- package/node_modules/es-set-tostringtag/LICENSE +0 -21
- package/node_modules/es-set-tostringtag/README.md +0 -53
- package/node_modules/es-set-tostringtag/index.d.ts +0 -10
- package/node_modules/es-set-tostringtag/index.js +0 -35
- package/node_modules/es-set-tostringtag/package.json +0 -78
- package/node_modules/es-set-tostringtag/test/index.js +0 -85
- package/node_modules/es-set-tostringtag/tsconfig.json +0 -9
- package/node_modules/form-data/CHANGELOG.md +0 -686
- package/node_modules/form-data/License +0 -19
- package/node_modules/form-data/README.md +0 -355
- package/node_modules/form-data/index.d.ts +0 -62
- package/node_modules/form-data/lib/browser.js +0 -4
- package/node_modules/form-data/lib/form_data.js +0 -506
- package/node_modules/form-data/lib/populate.js +0 -10
- package/node_modules/form-data/node_modules/mime-db/HISTORY.md +0 -507
- package/node_modules/form-data/node_modules/mime-db/LICENSE +0 -23
- package/node_modules/form-data/node_modules/mime-db/README.md +0 -100
- package/node_modules/form-data/node_modules/mime-db/db.json +0 -8519
- package/node_modules/form-data/node_modules/mime-db/index.js +0 -12
- package/node_modules/form-data/node_modules/mime-db/package.json +0 -60
- package/node_modules/form-data/node_modules/mime-types/HISTORY.md +0 -397
- package/node_modules/form-data/node_modules/mime-types/LICENSE +0 -23
- package/node_modules/form-data/node_modules/mime-types/README.md +0 -113
- package/node_modules/form-data/node_modules/mime-types/index.js +0 -188
- package/node_modules/form-data/node_modules/mime-types/package.json +0 -44
- package/node_modules/form-data/package.json +0 -82
- package/node_modules/function-bind/.eslintrc +0 -21
- package/node_modules/function-bind/.github/FUNDING.yml +0 -12
- package/node_modules/function-bind/.github/SECURITY.md +0 -3
- package/node_modules/function-bind/.nycrc +0 -13
- package/node_modules/function-bind/CHANGELOG.md +0 -136
- package/node_modules/function-bind/LICENSE +0 -20
- package/node_modules/function-bind/README.md +0 -46
- package/node_modules/function-bind/implementation.js +0 -84
- package/node_modules/function-bind/index.js +0 -5
- package/node_modules/function-bind/package.json +0 -87
- package/node_modules/function-bind/test/.eslintrc +0 -9
- package/node_modules/function-bind/test/index.js +0 -252
- package/node_modules/get-intrinsic/.eslintrc +0 -42
- package/node_modules/get-intrinsic/.github/FUNDING.yml +0 -12
- package/node_modules/get-intrinsic/.nycrc +0 -9
- package/node_modules/get-intrinsic/CHANGELOG.md +0 -186
- package/node_modules/get-intrinsic/LICENSE +0 -21
- package/node_modules/get-intrinsic/README.md +0 -71
- package/node_modules/get-intrinsic/index.js +0 -378
- package/node_modules/get-intrinsic/package.json +0 -97
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +0 -274
- package/node_modules/get-proto/.eslintrc +0 -10
- package/node_modules/get-proto/.github/FUNDING.yml +0 -12
- package/node_modules/get-proto/.nycrc +0 -9
- package/node_modules/get-proto/CHANGELOG.md +0 -21
- package/node_modules/get-proto/LICENSE +0 -21
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +0 -5
- package/node_modules/get-proto/Object.getPrototypeOf.js +0 -6
- package/node_modules/get-proto/README.md +0 -50
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +0 -3
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +0 -4
- package/node_modules/get-proto/index.d.ts +0 -5
- package/node_modules/get-proto/index.js +0 -27
- package/node_modules/get-proto/package.json +0 -81
- package/node_modules/get-proto/test/index.js +0 -68
- package/node_modules/get-proto/tsconfig.json +0 -9
- package/node_modules/gopd/.eslintrc +0 -16
- package/node_modules/gopd/.github/FUNDING.yml +0 -12
- package/node_modules/gopd/CHANGELOG.md +0 -45
- package/node_modules/gopd/LICENSE +0 -21
- package/node_modules/gopd/README.md +0 -40
- package/node_modules/gopd/gOPD.d.ts +0 -1
- package/node_modules/gopd/gOPD.js +0 -4
- package/node_modules/gopd/index.d.ts +0 -5
- package/node_modules/gopd/index.js +0 -15
- package/node_modules/gopd/package.json +0 -77
- package/node_modules/gopd/test/index.js +0 -36
- package/node_modules/gopd/tsconfig.json +0 -9
- package/node_modules/has-symbols/.eslintrc +0 -11
- package/node_modules/has-symbols/.github/FUNDING.yml +0 -12
- package/node_modules/has-symbols/.nycrc +0 -9
- package/node_modules/has-symbols/CHANGELOG.md +0 -91
- package/node_modules/has-symbols/LICENSE +0 -21
- package/node_modules/has-symbols/README.md +0 -46
- package/node_modules/has-symbols/index.d.ts +0 -3
- package/node_modules/has-symbols/index.js +0 -14
- package/node_modules/has-symbols/package.json +0 -111
- package/node_modules/has-symbols/shams.d.ts +0 -3
- package/node_modules/has-symbols/shams.js +0 -45
- package/node_modules/has-symbols/test/index.js +0 -22
- package/node_modules/has-symbols/test/shams/core-js.js +0 -29
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +0 -29
- package/node_modules/has-symbols/test/tests.js +0 -58
- package/node_modules/has-symbols/tsconfig.json +0 -10
- package/node_modules/has-tostringtag/.eslintrc +0 -5
- package/node_modules/has-tostringtag/.github/FUNDING.yml +0 -12
- package/node_modules/has-tostringtag/.nycrc +0 -13
- package/node_modules/has-tostringtag/CHANGELOG.md +0 -42
- package/node_modules/has-tostringtag/LICENSE +0 -21
- package/node_modules/has-tostringtag/README.md +0 -46
- package/node_modules/has-tostringtag/index.d.ts +0 -3
- package/node_modules/has-tostringtag/index.js +0 -8
- package/node_modules/has-tostringtag/package.json +0 -108
- package/node_modules/has-tostringtag/shams.d.ts +0 -3
- package/node_modules/has-tostringtag/shams.js +0 -8
- package/node_modules/has-tostringtag/test/index.js +0 -21
- package/node_modules/has-tostringtag/test/shams/core-js.js +0 -31
- package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +0 -30
- package/node_modules/has-tostringtag/test/tests.js +0 -15
- package/node_modules/has-tostringtag/tsconfig.json +0 -49
- package/node_modules/hasown/.github/FUNDING.yml +0 -12
- package/node_modules/hasown/.nycrc +0 -13
- package/node_modules/hasown/CHANGELOG.md +0 -58
- package/node_modules/hasown/LICENSE +0 -21
- package/node_modules/hasown/README.md +0 -40
- package/node_modules/hasown/eslint.config.mjs +0 -6
- package/node_modules/hasown/index.d.ts +0 -3
- package/node_modules/hasown/index.js +0 -8
- package/node_modules/hasown/package.json +0 -91
- package/node_modules/hasown/tsconfig.json +0 -6
- package/node_modules/json-bigint/LICENSE +0 -20
- package/node_modules/json-bigint/README.md +0 -240
- package/node_modules/json-bigint/index.js +0 -12
- package/node_modules/json-bigint/lib/parse.js +0 -443
- package/node_modules/json-bigint/lib/stringify.js +0 -384
- package/node_modules/json-bigint/package.json +0 -34
- package/node_modules/math-intrinsics/.eslintrc +0 -16
- package/node_modules/math-intrinsics/.github/FUNDING.yml +0 -12
- package/node_modules/math-intrinsics/CHANGELOG.md +0 -24
- package/node_modules/math-intrinsics/LICENSE +0 -21
- package/node_modules/math-intrinsics/README.md +0 -50
- package/node_modules/math-intrinsics/abs.d.ts +0 -1
- package/node_modules/math-intrinsics/abs.js +0 -4
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +0 -3
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +0 -4
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +0 -3
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +0 -5
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +0 -3
- package/node_modules/math-intrinsics/constants/maxValue.js +0 -5
- package/node_modules/math-intrinsics/floor.d.ts +0 -1
- package/node_modules/math-intrinsics/floor.js +0 -4
- package/node_modules/math-intrinsics/isFinite.d.ts +0 -3
- package/node_modules/math-intrinsics/isFinite.js +0 -12
- package/node_modules/math-intrinsics/isInteger.d.ts +0 -3
- package/node_modules/math-intrinsics/isInteger.js +0 -16
- package/node_modules/math-intrinsics/isNaN.d.ts +0 -1
- package/node_modules/math-intrinsics/isNaN.js +0 -6
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +0 -3
- package/node_modules/math-intrinsics/isNegativeZero.js +0 -6
- package/node_modules/math-intrinsics/max.d.ts +0 -1
- package/node_modules/math-intrinsics/max.js +0 -4
- package/node_modules/math-intrinsics/min.d.ts +0 -1
- package/node_modules/math-intrinsics/min.js +0 -4
- package/node_modules/math-intrinsics/mod.d.ts +0 -3
- package/node_modules/math-intrinsics/mod.js +0 -9
- package/node_modules/math-intrinsics/package.json +0 -86
- package/node_modules/math-intrinsics/pow.d.ts +0 -1
- package/node_modules/math-intrinsics/pow.js +0 -4
- package/node_modules/math-intrinsics/round.d.ts +0 -1
- package/node_modules/math-intrinsics/round.js +0 -4
- package/node_modules/math-intrinsics/sign.d.ts +0 -3
- package/node_modules/math-intrinsics/sign.js +0 -11
- package/node_modules/math-intrinsics/test/index.js +0 -192
- package/node_modules/math-intrinsics/tsconfig.json +0 -3
- package/node_modules/pako/LICENSE +0 -21
- package/node_modules/pako/README.md +0 -155
- package/node_modules/pako/dist/pako.es5.js +0 -6760
- package/node_modules/pako/dist/pako.es5.min.js +0 -2
- package/node_modules/pako/dist/pako.esm.mjs +0 -6945
- package/node_modules/pako/dist/pako.js +0 -6964
- package/node_modules/pako/dist/pako.min.js +0 -2
- package/node_modules/pako/dist/pako_deflate.es5.js +0 -3953
- package/node_modules/pako/dist/pako_deflate.es5.min.js +0 -2
- package/node_modules/pako/dist/pako_deflate.js +0 -4154
- package/node_modules/pako/dist/pako_deflate.min.js +0 -2
- package/node_modules/pako/dist/pako_inflate.es5.js +0 -3272
- package/node_modules/pako/dist/pako_inflate.es5.min.js +0 -2
- package/node_modules/pako/dist/pako_inflate.js +0 -3279
- package/node_modules/pako/dist/pako_inflate.min.js +0 -2
- package/node_modules/pako/index.js +0 -18
- package/node_modules/pako/lib/deflate.js +0 -387
- package/node_modules/pako/lib/inflate.js +0 -456
- package/node_modules/pako/lib/utils/common.js +0 -48
- package/node_modules/pako/lib/utils/strings.js +0 -174
- package/node_modules/pako/lib/zlib/README +0 -59
- package/node_modules/pako/lib/zlib/adler32.js +0 -51
- package/node_modules/pako/lib/zlib/constants.js +0 -68
- package/node_modules/pako/lib/zlib/crc32.js +0 -59
- package/node_modules/pako/lib/zlib/deflate.js +0 -2069
- package/node_modules/pako/lib/zlib/gzheader.js +0 -58
- package/node_modules/pako/lib/zlib/inffast.js +0 -344
- package/node_modules/pako/lib/zlib/inflate.js +0 -1575
- package/node_modules/pako/lib/zlib/inftrees.js +0 -340
- package/node_modules/pako/lib/zlib/messages.js +0 -32
- package/node_modules/pako/lib/zlib/trees.js +0 -1179
- package/node_modules/pako/lib/zlib/zstream.js +0 -47
- package/node_modules/pako/package.json +0 -73
- package/node_modules/semver/LICENSE +0 -15
- package/node_modules/semver/README.md +0 -680
- package/node_modules/semver/bin/semver.js +0 -195
- package/node_modules/semver/classes/comparator.js +0 -143
- package/node_modules/semver/classes/index.js +0 -7
- package/node_modules/semver/classes/range.js +0 -577
- package/node_modules/semver/classes/semver.js +0 -350
- package/node_modules/semver/functions/clean.js +0 -8
- package/node_modules/semver/functions/cmp.js +0 -54
- package/node_modules/semver/functions/coerce.js +0 -62
- package/node_modules/semver/functions/compare-build.js +0 -9
- package/node_modules/semver/functions/compare-loose.js +0 -5
- package/node_modules/semver/functions/compare.js +0 -7
- package/node_modules/semver/functions/diff.js +0 -60
- package/node_modules/semver/functions/eq.js +0 -5
- package/node_modules/semver/functions/gt.js +0 -5
- package/node_modules/semver/functions/gte.js +0 -5
- package/node_modules/semver/functions/inc.js +0 -21
- package/node_modules/semver/functions/lt.js +0 -5
- package/node_modules/semver/functions/lte.js +0 -5
- package/node_modules/semver/functions/major.js +0 -5
- package/node_modules/semver/functions/minor.js +0 -5
- package/node_modules/semver/functions/neq.js +0 -5
- package/node_modules/semver/functions/parse.js +0 -18
- package/node_modules/semver/functions/patch.js +0 -5
- package/node_modules/semver/functions/prerelease.js +0 -8
- package/node_modules/semver/functions/rcompare.js +0 -5
- package/node_modules/semver/functions/rsort.js +0 -5
- package/node_modules/semver/functions/satisfies.js +0 -12
- package/node_modules/semver/functions/sort.js +0 -5
- package/node_modules/semver/functions/truncate.js +0 -48
- package/node_modules/semver/functions/valid.js +0 -8
- package/node_modules/semver/index.js +0 -93
- package/node_modules/semver/internal/constants.js +0 -37
- package/node_modules/semver/internal/debug.js +0 -11
- package/node_modules/semver/internal/identifiers.js +0 -29
- package/node_modules/semver/internal/lrucache.js +0 -42
- package/node_modules/semver/internal/parse-options.js +0 -17
- package/node_modules/semver/internal/re.js +0 -223
- package/node_modules/semver/package.json +0 -78
- package/node_modules/semver/preload.js +0 -4
- package/node_modules/semver/range.bnf +0 -17
- package/node_modules/semver/ranges/gtr.js +0 -6
- package/node_modules/semver/ranges/intersects.js +0 -9
- package/node_modules/semver/ranges/ltr.js +0 -6
- package/node_modules/semver/ranges/max-satisfying.js +0 -27
- package/node_modules/semver/ranges/min-satisfying.js +0 -26
- package/node_modules/semver/ranges/min-version.js +0 -63
- package/node_modules/semver/ranges/outside.js +0 -82
- package/node_modules/semver/ranges/simplify.js +0 -49
- package/node_modules/semver/ranges/subset.js +0 -249
- package/node_modules/semver/ranges/to-comparators.js +0 -10
- package/node_modules/semver/ranges/valid.js +0 -13
- package/node_modules/spark-md5/LICENSE +0 -13
- package/node_modules/spark-md5/README.md +0 -191
- package/node_modules/spark-md5/package.json +0 -35
- package/node_modules/spark-md5/spark-md5.js +0 -751
- package/node_modules/spark-md5/spark-md5.min.js +0 -1
- package/node_modules/tldts/LICENSE +0 -13
- package/node_modules/tldts/README.md +0 -327
- package/node_modules/tldts/bin/cli.js +0 -21
- package/node_modules/tldts/dist/cjs/index.js +0 -666
- package/node_modules/tldts/dist/cjs/index.js.map +0 -1
- package/node_modules/tldts/dist/cjs/src/data/trie.js +0 -14
- package/node_modules/tldts/dist/cjs/src/data/trie.js.map +0 -1
- package/node_modules/tldts/dist/cjs/src/suffix-trie.js +0 -67
- package/node_modules/tldts/dist/cjs/src/suffix-trie.js.map +0 -1
- package/node_modules/tldts/dist/cjs/tsconfig.tsbuildinfo +0 -1
- package/node_modules/tldts/dist/es6/index.js +0 -33
- package/node_modules/tldts/dist/es6/index.js.map +0 -1
- package/node_modules/tldts/dist/es6/src/data/trie.js +0 -11
- package/node_modules/tldts/dist/es6/src/data/trie.js.map +0 -1
- package/node_modules/tldts/dist/es6/src/suffix-trie.js +0 -64
- package/node_modules/tldts/dist/es6/src/suffix-trie.js.map +0 -1
- package/node_modules/tldts/dist/es6/tsconfig.bundle.tsbuildinfo +0 -1
- package/node_modules/tldts/dist/index.cjs.min.js +0 -2
- package/node_modules/tldts/dist/index.cjs.min.js.map +0 -1
- package/node_modules/tldts/dist/index.esm.min.js +0 -2
- package/node_modules/tldts/dist/index.esm.min.js.map +0 -1
- package/node_modules/tldts/dist/index.umd.min.js +0 -2
- package/node_modules/tldts/dist/index.umd.min.js.map +0 -1
- package/node_modules/tldts/dist/types/index.d.ts +0 -7
- package/node_modules/tldts/dist/types/src/data/trie.d.ts +0 -5
- package/node_modules/tldts/dist/types/src/suffix-trie.d.ts +0 -5
- package/node_modules/tldts/index.ts +0 -62
- package/node_modules/tldts/package.json +0 -91
- package/node_modules/tldts/src/data/trie.ts +0 -14
- package/node_modules/tldts/src/suffix-trie.ts +0 -110
- package/node_modules/tldts-core/LICENSE +0 -13
- package/node_modules/tldts-core/README.md +0 -3
- package/node_modules/tldts-core/dist/cjs/index.js +0 -561
- package/node_modules/tldts-core/dist/cjs/index.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/domain-without-suffix.js +0 -15
- package/node_modules/tldts-core/dist/cjs/src/domain-without-suffix.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/domain.js +0 -83
- package/node_modules/tldts-core/dist/cjs/src/domain.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/extract-hostname.js +0 -149
- package/node_modules/tldts-core/dist/cjs/src/extract-hostname.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/factory.js +0 -104
- package/node_modules/tldts-core/dist/cjs/src/factory.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/is-ip.js +0 -72
- package/node_modules/tldts-core/dist/cjs/src/is-ip.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/is-valid.js +0 -69
- package/node_modules/tldts-core/dist/cjs/src/is-valid.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/lookup/fast-path.js +0 -69
- package/node_modules/tldts-core/dist/cjs/src/lookup/fast-path.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/lookup/interface.js +0 -3
- package/node_modules/tldts-core/dist/cjs/src/lookup/interface.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/options.js +0 -22
- package/node_modules/tldts-core/dist/cjs/src/options.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/subdomain.js +0 -14
- package/node_modules/tldts-core/dist/cjs/src/subdomain.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/tsconfig.tsbuildinfo +0 -1
- package/node_modules/tldts-core/dist/es6/index.js +0 -4
- package/node_modules/tldts-core/dist/es6/index.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/domain-without-suffix.js +0 -12
- package/node_modules/tldts-core/dist/es6/src/domain-without-suffix.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/domain.js +0 -80
- package/node_modules/tldts-core/dist/es6/src/domain.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/extract-hostname.js +0 -146
- package/node_modules/tldts-core/dist/es6/src/extract-hostname.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/factory.js +0 -99
- package/node_modules/tldts-core/dist/es6/src/factory.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/is-ip.js +0 -69
- package/node_modules/tldts-core/dist/es6/src/is-ip.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/is-valid.js +0 -66
- package/node_modules/tldts-core/dist/es6/src/is-valid.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/lookup/fast-path.js +0 -66
- package/node_modules/tldts-core/dist/es6/src/lookup/fast-path.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/lookup/interface.js +0 -2
- package/node_modules/tldts-core/dist/es6/src/lookup/interface.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/options.js +0 -19
- package/node_modules/tldts-core/dist/es6/src/options.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/subdomain.js +0 -11
- package/node_modules/tldts-core/dist/es6/src/subdomain.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/tsconfig.bundle.tsbuildinfo +0 -1
- package/node_modules/tldts-core/dist/types/index.d.ts +0 -4
- package/node_modules/tldts-core/dist/types/src/domain-without-suffix.d.ts +0 -6
- package/node_modules/tldts-core/dist/types/src/domain.d.ts +0 -5
- package/node_modules/tldts-core/dist/types/src/extract-hostname.d.ts +0 -5
- package/node_modules/tldts-core/dist/types/src/factory.d.ts +0 -28
- package/node_modules/tldts-core/dist/types/src/is-ip.d.ts +0 -6
- package/node_modules/tldts-core/dist/types/src/is-valid.d.ts +0 -15
- package/node_modules/tldts-core/dist/types/src/lookup/fast-path.d.ts +0 -2
- package/node_modules/tldts-core/dist/types/src/lookup/interface.d.ts +0 -9
- package/node_modules/tldts-core/dist/types/src/options.d.ts +0 -10
- package/node_modules/tldts-core/dist/types/src/subdomain.d.ts +0 -4
- package/node_modules/tldts-core/index.ts +0 -10
- package/node_modules/tldts-core/package.json +0 -68
- package/node_modules/tldts-core/src/domain-without-suffix.ts +0 -14
- package/node_modules/tldts-core/src/domain.ts +0 -100
- package/node_modules/tldts-core/src/extract-hostname.ts +0 -170
- package/node_modules/tldts-core/src/factory.ts +0 -160
- package/node_modules/tldts-core/src/is-ip.ts +0 -87
- package/node_modules/tldts-core/src/is-valid.ts +0 -79
- package/node_modules/tldts-core/src/lookup/fast-path.ts +0 -80
- package/node_modules/tldts-core/src/lookup/interface.ts +0 -10
- package/node_modules/tldts-core/src/options.ts +0 -39
- package/node_modules/tldts-core/src/subdomain.ts +0 -11
- package/node_modules/tough-cookie/LICENSE +0 -12
- package/node_modules/tough-cookie/README.md +0 -154
- package/node_modules/tough-cookie/dist/cookie/canonicalDomain.d.ts +0 -33
- package/node_modules/tough-cookie/dist/cookie/canonicalDomain.js +0 -65
- package/node_modules/tough-cookie/dist/cookie/constants.d.ts +0 -54
- package/node_modules/tough-cookie/dist/cookie/constants.js +0 -38
- package/node_modules/tough-cookie/dist/cookie/cookie.d.ts +0 -326
- package/node_modules/tough-cookie/dist/cookie/cookie.js +0 -831
- package/node_modules/tough-cookie/dist/cookie/cookieCompare.d.ts +0 -58
- package/node_modules/tough-cookie/dist/cookie/cookieCompare.js +0 -84
- package/node_modules/tough-cookie/dist/cookie/cookieJar.d.ts +0 -621
- package/node_modules/tough-cookie/dist/cookie/cookieJar.js +0 -1000
- package/node_modules/tough-cookie/dist/cookie/defaultPath.d.ts +0 -40
- package/node_modules/tough-cookie/dist/cookie/defaultPath.js +0 -60
- package/node_modules/tough-cookie/dist/cookie/domainMatch.d.ts +0 -38
- package/node_modules/tough-cookie/dist/cookie/domainMatch.js +0 -94
- package/node_modules/tough-cookie/dist/cookie/formatDate.d.ts +0 -15
- package/node_modules/tough-cookie/dist/cookie/formatDate.js +0 -20
- package/node_modules/tough-cookie/dist/cookie/index.d.ts +0 -29
- package/node_modules/tough-cookie/dist/cookie/index.js +0 -54
- package/node_modules/tough-cookie/dist/cookie/parseDate.d.ts +0 -103
- package/node_modules/tough-cookie/dist/cookie/parseDate.js +0 -323
- package/node_modules/tough-cookie/dist/cookie/permutePath.d.ts +0 -14
- package/node_modules/tough-cookie/dist/cookie/permutePath.js +0 -32
- package/node_modules/tough-cookie/dist/getPublicSuffix.d.ts +0 -55
- package/node_modules/tough-cookie/dist/getPublicSuffix.js +0 -71
- package/node_modules/tough-cookie/dist/memstore.d.ts +0 -220
- package/node_modules/tough-cookie/dist/memstore.js +0 -187
- package/node_modules/tough-cookie/dist/pathMatch.d.ts +0 -17
- package/node_modules/tough-cookie/dist/pathMatch.js +0 -40
- package/node_modules/tough-cookie/dist/permuteDomain.d.ts +0 -15
- package/node_modules/tough-cookie/dist/permuteDomain.js +0 -44
- package/node_modules/tough-cookie/dist/store.d.ts +0 -211
- package/node_modules/tough-cookie/dist/store.js +0 -76
- package/node_modules/tough-cookie/dist/utils.d.ts +0 -34
- package/node_modules/tough-cookie/dist/utils.js +0 -99
- package/node_modules/tough-cookie/dist/validators.d.ts +0 -24
- package/node_modules/tough-cookie/dist/validators.js +0 -90
- package/node_modules/tough-cookie/dist/version.d.ts +0 -5
- package/node_modules/tough-cookie/dist/version.js +0 -8
- package/node_modules/tough-cookie/package.json +0 -144
- package/node_modules/ws/LICENSE +0 -20
- package/node_modules/ws/README.md +0 -548
- package/node_modules/ws/browser.js +0 -8
- package/node_modules/ws/index.js +0 -22
- package/node_modules/ws/lib/buffer-util.js +0 -131
- package/node_modules/ws/lib/constants.js +0 -19
- package/node_modules/ws/lib/event-target.js +0 -292
- package/node_modules/ws/lib/extension.js +0 -203
- package/node_modules/ws/lib/limiter.js +0 -55
- package/node_modules/ws/lib/permessage-deflate.js +0 -530
- package/node_modules/ws/lib/receiver.js +0 -743
- package/node_modules/ws/lib/sender.js +0 -607
- package/node_modules/ws/lib/stream.js +0 -161
- package/node_modules/ws/lib/subprotocol.js +0 -62
- package/node_modules/ws/lib/validation.js +0 -152
- package/node_modules/ws/lib/websocket-server.js +0 -562
- package/node_modules/ws/lib/websocket.js +0 -1407
- package/node_modules/ws/package.json +0 -74
- package/node_modules/ws/wrapper.mjs +0 -21
- package/node_modules/zca-js/.prettierrc +0 -5
- package/node_modules/zca-js/CODE_OF_CONDUCT.md +0 -163
- package/node_modules/zca-js/CONTRIBUTING.md +0 -470
- package/node_modules/zca-js/LICENSE +0 -21
- package/node_modules/zca-js/README.md +0 -225
- package/node_modules/zca-js/SECURITY.md +0 -83
- package/node_modules/zca-js/dist/Errors/ZaloApiError.d.ts +0 -4
- package/node_modules/zca-js/dist/Errors/ZaloApiError.js +0 -7
- package/node_modules/zca-js/dist/Errors/ZaloApiLoginQRAborted.d.ts +0 -4
- package/node_modules/zca-js/dist/Errors/ZaloApiLoginQRAborted.js +0 -7
- package/node_modules/zca-js/dist/Errors/ZaloApiLoginQRDeclined.d.ts +0 -4
- package/node_modules/zca-js/dist/Errors/ZaloApiLoginQRDeclined.js +0 -7
- package/node_modules/zca-js/dist/Errors/ZaloApiMissingImageMetadataGetter.d.ts +0 -4
- package/node_modules/zca-js/dist/Errors/ZaloApiMissingImageMetadataGetter.js +0 -7
- package/node_modules/zca-js/dist/Errors/index.d.ts +0 -4
- package/node_modules/zca-js/dist/Errors/index.js +0 -4
- package/node_modules/zca-js/dist/apis/acceptFriendRequest.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/acceptFriendRequest.js +0 -28
- package/node_modules/zca-js/dist/apis/addGroupBlockedMember.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/addGroupBlockedMember.js +0 -28
- package/node_modules/zca-js/dist/apis/addGroupDeputy.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/addGroupDeputy.js +0 -30
- package/node_modules/zca-js/dist/apis/addPollOptions.d.ts +0 -14
- package/node_modules/zca-js/dist/apis/addPollOptions.js +0 -26
- package/node_modules/zca-js/dist/apis/addQuickMessage.d.ts +0 -11
- package/node_modules/zca-js/dist/apis/addQuickMessage.js +0 -60
- package/node_modules/zca-js/dist/apis/addReaction.d.ts +0 -18
- package/node_modules/zca-js/dist/apis/addReaction.js +0 -294
- package/node_modules/zca-js/dist/apis/addUnreadMark.d.ts +0 -8
- package/node_modules/zca-js/dist/apis/addUnreadMark.js +0 -52
- package/node_modules/zca-js/dist/apis/addUserToGroup.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/addUserToGroup.js +0 -34
- package/node_modules/zca-js/dist/apis/blockUser.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/blockUser.js +0 -28
- package/node_modules/zca-js/dist/apis/blockViewFeed.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/blockViewFeed.js +0 -30
- package/node_modules/zca-js/dist/apis/changeAccountAvatar.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/changeAccountAvatar.js +0 -52
- package/node_modules/zca-js/dist/apis/changeFriendAlias.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/changeFriendAlias.js +0 -27
- package/node_modules/zca-js/dist/apis/changeGroupAvatar.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/changeGroupAvatar.js +0 -44
- package/node_modules/zca-js/dist/apis/changeGroupName.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/changeGroupName.js +0 -32
- package/node_modules/zca-js/dist/apis/changeGroupOwner.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/changeGroupOwner.js +0 -30
- package/node_modules/zca-js/dist/apis/createAutoReply.d.ts +0 -14
- package/node_modules/zca-js/dist/apis/createAutoReply.js +0 -37
- package/node_modules/zca-js/dist/apis/createBankAccount.d.ts +0 -8
- package/node_modules/zca-js/dist/apis/createBankAccount.js +0 -32
- package/node_modules/zca-js/dist/apis/createCatalog.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/createCatalog.js +0 -29
- package/node_modules/zca-js/dist/apis/createGroup.d.ts +0 -28
- package/node_modules/zca-js/dist/apis/createGroup.js +0 -43
- package/node_modules/zca-js/dist/apis/createNote.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/createNote.js +0 -47
- package/node_modules/zca-js/dist/apis/createPoll.d.ts +0 -36
- package/node_modules/zca-js/dist/apis/createPoll.js +0 -40
- package/node_modules/zca-js/dist/apis/createProductCatalog.d.ts +0 -23
- package/node_modules/zca-js/dist/apis/createProductCatalog.js +0 -50
- package/node_modules/zca-js/dist/apis/createReminder.d.ts +0 -12
- package/node_modules/zca-js/dist/apis/createReminder.js +0 -63
- package/node_modules/zca-js/dist/apis/custom.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/custom.js +0 -15
- package/node_modules/zca-js/dist/apis/deleteAutoReply.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/deleteAutoReply.js +0 -29
- package/node_modules/zca-js/dist/apis/deleteAvatar.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/deleteAvatar.js +0 -27
- package/node_modules/zca-js/dist/apis/deleteBankAccount.d.ts +0 -11
- package/node_modules/zca-js/dist/apis/deleteBankAccount.js +0 -32
- package/node_modules/zca-js/dist/apis/deleteCatalog.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/deleteCatalog.js +0 -28
- package/node_modules/zca-js/dist/apis/deleteChat.d.ts +0 -19
- package/node_modules/zca-js/dist/apis/deleteChat.js +0 -50
- package/node_modules/zca-js/dist/apis/deleteGroupInviteBox.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/deleteGroupInviteBox.js +0 -27
- package/node_modules/zca-js/dist/apis/deleteMessage.d.ts +0 -14
- package/node_modules/zca-js/dist/apis/deleteMessage.js +0 -52
- package/node_modules/zca-js/dist/apis/deleteProductCatalog.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/deleteProductCatalog.js +0 -31
- package/node_modules/zca-js/dist/apis/disableGroupLink.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/disableGroupLink.js +0 -24
- package/node_modules/zca-js/dist/apis/disperseGroup.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/disperseGroup.js +0 -28
- package/node_modules/zca-js/dist/apis/editNote.d.ts +0 -17
- package/node_modules/zca-js/dist/apis/editNote.js +0 -46
- package/node_modules/zca-js/dist/apis/editReminder.d.ts +0 -13
- package/node_modules/zca-js/dist/apis/editReminder.js +0 -61
- package/node_modules/zca-js/dist/apis/enableGroupLink.d.ts +0 -6
- package/node_modules/zca-js/dist/apis/enableGroupLink.js +0 -25
- package/node_modules/zca-js/dist/apis/fetchAccountInfo.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/fetchAccountInfo.js +0 -10
- package/node_modules/zca-js/dist/apis/findUser.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/findUser.js +0 -42
- package/node_modules/zca-js/dist/apis/findUserByUsername.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/findUserByUsername.js +0 -27
- package/node_modules/zca-js/dist/apis/forwardMessage.d.ts +0 -24
- package/node_modules/zca-js/dist/apis/forwardMessage.js +0 -114
- package/node_modules/zca-js/dist/apis/getAliasList.d.ts +0 -8
- package/node_modules/zca-js/dist/apis/getAliasList.js +0 -27
- package/node_modules/zca-js/dist/apis/getAllFriends.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/getAllFriends.js +0 -34
- package/node_modules/zca-js/dist/apis/getAllGroups.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/getAllGroups.js +0 -10
- package/node_modules/zca-js/dist/apis/getArchivedChatList.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/getArchivedChatList.js +0 -23
- package/node_modules/zca-js/dist/apis/getAutoDeleteChat.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/getAutoDeleteChat.js +0 -21
- package/node_modules/zca-js/dist/apis/getAutoReplyList.d.ts +0 -6
- package/node_modules/zca-js/dist/apis/getAutoReplyList.js +0 -24
- package/node_modules/zca-js/dist/apis/getAvatarList.d.ts +0 -12
- package/node_modules/zca-js/dist/apis/getAvatarList.js +0 -28
- package/node_modules/zca-js/dist/apis/getAvatarUrlProfile.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/getAvatarUrlProfile.js +0 -30
- package/node_modules/zca-js/dist/apis/getBizAccount.d.ts +0 -24
- package/node_modules/zca-js/dist/apis/getBizAccount.js +0 -27
- package/node_modules/zca-js/dist/apis/getCatalogList.d.ts +0 -18
- package/node_modules/zca-js/dist/apis/getCatalogList.js +0 -32
- package/node_modules/zca-js/dist/apis/getCloseFriends.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/getCloseFriends.js +0 -20
- package/node_modules/zca-js/dist/apis/getContext.d.ts +0 -1
- package/node_modules/zca-js/dist/apis/getContext.js +0 -4
- package/node_modules/zca-js/dist/apis/getCookie.d.ts +0 -1
- package/node_modules/zca-js/dist/apis/getCookie.js +0 -9
- package/node_modules/zca-js/dist/apis/getFriendBoardList.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/getFriendBoardList.js +0 -26
- package/node_modules/zca-js/dist/apis/getFriendOnlines.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/getFriendOnlines.js +0 -35
- package/node_modules/zca-js/dist/apis/getFriendRecommendations.d.ts +0 -42
- package/node_modules/zca-js/dist/apis/getFriendRecommendations.js +0 -27
- package/node_modules/zca-js/dist/apis/getFriendRequestStatus.d.ts +0 -8
- package/node_modules/zca-js/dist/apis/getFriendRequestStatus.js +0 -25
- package/node_modules/zca-js/dist/apis/getFullAvatar.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/getFullAvatar.js +0 -25
- package/node_modules/zca-js/dist/apis/getGroupBlockedMember.d.ts +0 -23
- package/node_modules/zca-js/dist/apis/getGroupBlockedMember.js +0 -29
- package/node_modules/zca-js/dist/apis/getGroupChatHistory.d.ts +0 -8
- package/node_modules/zca-js/dist/apis/getGroupChatHistory.js +0 -36
- package/node_modules/zca-js/dist/apis/getGroupInfo.d.ts +0 -16
- package/node_modules/zca-js/dist/apis/getGroupInfo.js +0 -32
- package/node_modules/zca-js/dist/apis/getGroupInviteBoxInfo.d.ts +0 -32
- package/node_modules/zca-js/dist/apis/getGroupInviteBoxInfo.js +0 -38
- package/node_modules/zca-js/dist/apis/getGroupInviteBoxList.d.ts +0 -38
- package/node_modules/zca-js/dist/apis/getGroupInviteBoxList.js +0 -31
- package/node_modules/zca-js/dist/apis/getGroupLinkDetail.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/getGroupLinkDetail.js +0 -25
- package/node_modules/zca-js/dist/apis/getGroupLinkInfo.d.ts +0 -34
- package/node_modules/zca-js/dist/apis/getGroupLinkInfo.js +0 -28
- package/node_modules/zca-js/dist/apis/getGroupMembersInfo.d.ts +0 -17
- package/node_modules/zca-js/dist/apis/getGroupMembersInfo.js +0 -24
- package/node_modules/zca-js/dist/apis/getHiddenConversations.d.ts +0 -11
- package/node_modules/zca-js/dist/apis/getHiddenConversations.js +0 -23
- package/node_modules/zca-js/dist/apis/getLabels.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/getLabels.js +0 -28
- package/node_modules/zca-js/dist/apis/getListBank.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/getListBank.js +0 -20
- package/node_modules/zca-js/dist/apis/getListBankAccount.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/getListBankAccount.js +0 -27
- package/node_modules/zca-js/dist/apis/getListBoard.d.ts +0 -21
- package/node_modules/zca-js/dist/apis/getListBoard.js +0 -45
- package/node_modules/zca-js/dist/apis/getListDevice.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/getListDevice.js +0 -22
- package/node_modules/zca-js/dist/apis/getListReminder.d.ts +0 -28
- package/node_modules/zca-js/dist/apis/getListReminder.js +0 -47
- package/node_modules/zca-js/dist/apis/getMultiUsersByPhones.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/getMultiUsersByPhones.js +0 -39
- package/node_modules/zca-js/dist/apis/getMute.d.ts +0 -13
- package/node_modules/zca-js/dist/apis/getMute.js +0 -22
- package/node_modules/zca-js/dist/apis/getOwnId.d.ts +0 -1
- package/node_modules/zca-js/dist/apis/getOwnId.js +0 -4
- package/node_modules/zca-js/dist/apis/getPendingGroupMembers.d.ts +0 -11
- package/node_modules/zca-js/dist/apis/getPendingGroupMembers.js +0 -27
- package/node_modules/zca-js/dist/apis/getPinConversations.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/getPinConversations.js +0 -22
- package/node_modules/zca-js/dist/apis/getPollDetail.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/getPollDetail.js +0 -30
- package/node_modules/zca-js/dist/apis/getProductCatalogList.d.ts +0 -20
- package/node_modules/zca-js/dist/apis/getProductCatalogList.js +0 -33
- package/node_modules/zca-js/dist/apis/getQR.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/getQR.js +0 -29
- package/node_modules/zca-js/dist/apis/getQuickMessageList.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/getQuickMessageList.js +0 -24
- package/node_modules/zca-js/dist/apis/getRelatedFriendGroup.d.ts +0 -6
- package/node_modules/zca-js/dist/apis/getRelatedFriendGroup.js +0 -30
- package/node_modules/zca-js/dist/apis/getReminder.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/getReminder.js +0 -25
- package/node_modules/zca-js/dist/apis/getReminderResponses.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/getReminderResponses.js +0 -24
- package/node_modules/zca-js/dist/apis/getSentFriendRequest.d.ts +0 -18
- package/node_modules/zca-js/dist/apis/getSentFriendRequest.js +0 -24
- package/node_modules/zca-js/dist/apis/getSettings.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/getSettings.js +0 -20
- package/node_modules/zca-js/dist/apis/getStickerCategoryDetail.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/getStickerCategoryDetail.js +0 -24
- package/node_modules/zca-js/dist/apis/getStickers.d.ts +0 -1
- package/node_modules/zca-js/dist/apis/getStickers.js +0 -40
- package/node_modules/zca-js/dist/apis/getStickersDetail.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/getStickersDetail.js +0 -40
- package/node_modules/zca-js/dist/apis/getUnreadMark.d.ts +0 -14
- package/node_modules/zca-js/dist/apis/getUnreadMark.js +0 -30
- package/node_modules/zca-js/dist/apis/getUserInfo.d.ts +0 -8
- package/node_modules/zca-js/dist/apis/getUserInfo.js +0 -44
- package/node_modules/zca-js/dist/apis/inviteUserToGroups.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/inviteUserToGroups.js +0 -30
- package/node_modules/zca-js/dist/apis/joinGroupInviteBox.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/joinGroupInviteBox.js +0 -25
- package/node_modules/zca-js/dist/apis/joinGroupLink.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/joinGroupLink.js +0 -27
- package/node_modules/zca-js/dist/apis/keepAlive.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/keepAlive.js +0 -22
- package/node_modules/zca-js/dist/apis/lastOnline.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/lastOnline.js +0 -26
- package/node_modules/zca-js/dist/apis/leaveGroup.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/leaveGroup.js +0 -33
- package/node_modules/zca-js/dist/apis/listen.d.ts +0 -102
- package/node_modules/zca-js/dist/apis/listen.js +0 -425
- package/node_modules/zca-js/dist/apis/lockPoll.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/lockPoll.js +0 -28
- package/node_modules/zca-js/dist/apis/login.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/login.js +0 -96
- package/node_modules/zca-js/dist/apis/loginQR.d.ts +0 -71
- package/node_modules/zca-js/dist/apis/loginQR.js +0 -376
- package/node_modules/zca-js/dist/apis/logoutV2.js +0 -79
- package/node_modules/zca-js/dist/apis/lostFocus.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/lostFocus.js +0 -23
- package/node_modules/zca-js/dist/apis/parseLink.d.ts +0 -21
- package/node_modules/zca-js/dist/apis/parseLink.js +0 -27
- package/node_modules/zca-js/dist/apis/registerCatalog.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/registerCatalog.js +0 -27
- package/node_modules/zca-js/dist/apis/rejectFriendRequest.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/rejectFriendRequest.js +0 -27
- package/node_modules/zca-js/dist/apis/removeFriend.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/removeFriend.js +0 -28
- package/node_modules/zca-js/dist/apis/removeFriendAlias.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/removeFriendAlias.js +0 -24
- package/node_modules/zca-js/dist/apis/removeGroupBlockedMember.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/removeGroupBlockedMember.js +0 -28
- package/node_modules/zca-js/dist/apis/removeGroupDeputy.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/removeGroupDeputy.js +0 -30
- package/node_modules/zca-js/dist/apis/removeQuickMessage.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/removeQuickMessage.js +0 -27
- package/node_modules/zca-js/dist/apis/removeReminder.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/removeReminder.js +0 -40
- package/node_modules/zca-js/dist/apis/removeUnreadMark.d.ts +0 -8
- package/node_modules/zca-js/dist/apis/removeUnreadMark.js +0 -50
- package/node_modules/zca-js/dist/apis/removeUserFromGroup.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/removeUserFromGroup.js +0 -34
- package/node_modules/zca-js/dist/apis/resetHiddenConversPin.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/resetHiddenConversPin.js +0 -20
- package/node_modules/zca-js/dist/apis/reuseAvatar.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/reuseAvatar.js +0 -26
- package/node_modules/zca-js/dist/apis/reviewPendingMemberRequest.d.ts +0 -14
- package/node_modules/zca-js/dist/apis/reviewPendingMemberRequest.js +0 -38
- package/node_modules/zca-js/dist/apis/scanURL.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/scanURL.js +0 -28
- package/node_modules/zca-js/dist/apis/searchSticker.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/searchSticker.js +0 -28
- package/node_modules/zca-js/dist/apis/sendBankCard.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/sendBankCard.js +0 -53
- package/node_modules/zca-js/dist/apis/sendCard.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/sendCard.js +0 -75
- package/node_modules/zca-js/dist/apis/sendDeliveredEvent.d.ts +0 -16
- package/node_modules/zca-js/dist/apis/sendDeliveredEvent.js +0 -55
- package/node_modules/zca-js/dist/apis/sendFriendRequest.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/sendFriendRequest.js +0 -39
- package/node_modules/zca-js/dist/apis/sendLink.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/sendLink.js +0 -78
- package/node_modules/zca-js/dist/apis/sendMessage.d.ts +0 -105
- package/node_modules/zca-js/dist/apis/sendMessage.js +0 -486
- package/node_modules/zca-js/dist/apis/sendReport.d.ts +0 -17
- package/node_modules/zca-js/dist/apis/sendReport.js +0 -53
- package/node_modules/zca-js/dist/apis/sendSeenEvent.d.ts +0 -16
- package/node_modules/zca-js/dist/apis/sendSeenEvent.js +0 -63
- package/node_modules/zca-js/dist/apis/sendSticker.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/sendSticker.js +0 -74
- package/node_modules/zca-js/dist/apis/sendTypingEvent.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/sendTypingEvent.js +0 -33
- package/node_modules/zca-js/dist/apis/sendVideo.d.ts +0 -35
- package/node_modules/zca-js/dist/apis/sendVideo.js +0 -134
- package/node_modules/zca-js/dist/apis/sendVoice.d.ts +0 -12
- package/node_modules/zca-js/dist/apis/sendVoice.js +0 -89
- package/node_modules/zca-js/dist/apis/setHiddenConversations.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/setHiddenConversations.js +0 -39
- package/node_modules/zca-js/dist/apis/setMute.d.ts +0 -20
- package/node_modules/zca-js/dist/apis/setMute.js +0 -67
- package/node_modules/zca-js/dist/apis/setPinnedConversations.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/setPinnedConversations.js +0 -34
- package/node_modules/zca-js/dist/apis/sharePoll.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/sharePoll.js +0 -28
- package/node_modules/zca-js/dist/apis/unblockUser.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/unblockUser.js +0 -28
- package/node_modules/zca-js/dist/apis/undo.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/undo.js +0 -42
- package/node_modules/zca-js/dist/apis/undoFriendRequest.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/undoFriendRequest.js +0 -27
- package/node_modules/zca-js/dist/apis/updateActiveStatus.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/updateActiveStatus.js +0 -27
- package/node_modules/zca-js/dist/apis/updateArchivedChatList.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/updateArchivedChatList.js +0 -34
- package/node_modules/zca-js/dist/apis/updateAutoDeleteChat.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/updateAutoDeleteChat.js +0 -40
- package/node_modules/zca-js/dist/apis/updateAutoReply.d.ts +0 -15
- package/node_modules/zca-js/dist/apis/updateAutoReply.js +0 -38
- package/node_modules/zca-js/dist/apis/updateBankAccount.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/updateBankAccount.js +0 -31
- package/node_modules/zca-js/dist/apis/updateCatalog.d.ts +0 -11
- package/node_modules/zca-js/dist/apis/updateCatalog.js +0 -30
- package/node_modules/zca-js/dist/apis/updateGroupSettings.d.ts +0 -40
- package/node_modules/zca-js/dist/apis/updateGroupSettings.js +0 -43
- package/node_modules/zca-js/dist/apis/updateHiddenConversPin.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/updateHiddenConversPin.js +0 -30
- package/node_modules/zca-js/dist/apis/updateLabels.d.ts +0 -15
- package/node_modules/zca-js/dist/apis/updateLabels.js +0 -34
- package/node_modules/zca-js/dist/apis/updateLang.d.ts +0 -6
- package/node_modules/zca-js/dist/apis/updateLang.js +0 -30
- package/node_modules/zca-js/dist/apis/updateProductCatalog.d.ts +0 -25
- package/node_modules/zca-js/dist/apis/updateProductCatalog.js +0 -51
- package/node_modules/zca-js/dist/apis/updateProfile.d.ts +0 -20
- package/node_modules/zca-js/dist/apis/updateProfile.js +0 -43
- package/node_modules/zca-js/dist/apis/updateProfileBio.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/updateProfileBio.js +0 -27
- package/node_modules/zca-js/dist/apis/updateQuickMessage.d.ts +0 -11
- package/node_modules/zca-js/dist/apis/updateQuickMessage.js +0 -61
- package/node_modules/zca-js/dist/apis/updateSettings.d.ts +0 -16
- package/node_modules/zca-js/dist/apis/updateSettings.js +0 -90
- package/node_modules/zca-js/dist/apis/upgradeGroupToCommunity.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/upgradeGroupToCommunity.js +0 -27
- package/node_modules/zca-js/dist/apis/uploadAttachment.d.ts +0 -50
- package/node_modules/zca-js/dist/apis/uploadAttachment.js +0 -197
- package/node_modules/zca-js/dist/apis/uploadProductPhoto.d.ts +0 -14
- package/node_modules/zca-js/dist/apis/uploadProductPhoto.js +0 -50
- package/node_modules/zca-js/dist/apis/votePoll.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/votePoll.js +0 -29
- package/node_modules/zca-js/dist/apis.d.ts +0 -317
- package/node_modules/zca-js/dist/apis.js +0 -319
- package/node_modules/zca-js/dist/cjs/Errors/ZaloApiError.cjs +0 -11
- package/node_modules/zca-js/dist/cjs/Errors/ZaloApiLoginQRAborted.cjs +0 -12
- package/node_modules/zca-js/dist/cjs/Errors/ZaloApiLoginQRDeclined.cjs +0 -12
- package/node_modules/zca-js/dist/cjs/Errors/ZaloApiMissingImageMetadataGetter.cjs +0 -12
- package/node_modules/zca-js/dist/cjs/apis/acceptFriendRequest.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/addGroupBlockedMember.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/addGroupDeputy.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/addPollOptions.cjs +0 -31
- package/node_modules/zca-js/dist/cjs/apis/addQuickMessage.cjs +0 -65
- package/node_modules/zca-js/dist/cjs/apis/addReaction.cjs +0 -308
- package/node_modules/zca-js/dist/cjs/apis/addUnreadMark.cjs +0 -66
- package/node_modules/zca-js/dist/cjs/apis/addUserToGroup.cjs +0 -39
- package/node_modules/zca-js/dist/cjs/apis/blockUser.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/blockViewFeed.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/changeAccountAvatar.cjs +0 -57
- package/node_modules/zca-js/dist/cjs/apis/changeFriendAlias.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/changeGroupAvatar.cjs +0 -49
- package/node_modules/zca-js/dist/cjs/apis/changeGroupName.cjs +0 -37
- package/node_modules/zca-js/dist/cjs/apis/changeGroupOwner.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/createAutoReply.cjs +0 -42
- package/node_modules/zca-js/dist/cjs/apis/createBankAccount.cjs +0 -37
- package/node_modules/zca-js/dist/cjs/apis/createCatalog.cjs +0 -34
- package/node_modules/zca-js/dist/cjs/apis/createGroup.cjs +0 -48
- package/node_modules/zca-js/dist/cjs/apis/createNote.cjs +0 -52
- package/node_modules/zca-js/dist/cjs/apis/createPoll.cjs +0 -45
- package/node_modules/zca-js/dist/cjs/apis/createProductCatalog.cjs +0 -55
- package/node_modules/zca-js/dist/cjs/apis/createReminder.cjs +0 -77
- package/node_modules/zca-js/dist/cjs/apis/custom.cjs +0 -19
- package/node_modules/zca-js/dist/cjs/apis/deleteAutoReply.cjs +0 -34
- package/node_modules/zca-js/dist/cjs/apis/deleteAvatar.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/deleteBankAccount.cjs +0 -37
- package/node_modules/zca-js/dist/cjs/apis/deleteCatalog.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/deleteChat.cjs +0 -64
- package/node_modules/zca-js/dist/cjs/apis/deleteGroupInviteBox.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/deleteMessage.cjs +0 -66
- package/node_modules/zca-js/dist/cjs/apis/deleteProductCatalog.cjs +0 -36
- package/node_modules/zca-js/dist/cjs/apis/disableGroupLink.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/disperseGroup.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/editNote.cjs +0 -51
- package/node_modules/zca-js/dist/cjs/apis/editReminder.cjs +0 -75
- package/node_modules/zca-js/dist/cjs/apis/enableGroupLink.cjs +0 -30
- package/node_modules/zca-js/dist/cjs/apis/fetchAccountInfo.cjs +0 -15
- package/node_modules/zca-js/dist/cjs/apis/findUser.cjs +0 -56
- package/node_modules/zca-js/dist/cjs/apis/findUserByUsername.cjs +0 -41
- package/node_modules/zca-js/dist/cjs/apis/forwardMessage.cjs +0 -129
- package/node_modules/zca-js/dist/cjs/apis/getAliasList.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/getAllFriends.cjs +0 -48
- package/node_modules/zca-js/dist/cjs/apis/getAllGroups.cjs +0 -15
- package/node_modules/zca-js/dist/cjs/apis/getArchivedChatList.cjs +0 -28
- package/node_modules/zca-js/dist/cjs/apis/getAutoDeleteChat.cjs +0 -26
- package/node_modules/zca-js/dist/cjs/apis/getAutoReplyList.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/getAvatarList.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/getAvatarUrlProfile.cjs +0 -44
- package/node_modules/zca-js/dist/cjs/apis/getBizAccount.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/getCatalogList.cjs +0 -37
- package/node_modules/zca-js/dist/cjs/apis/getCloseFriends.cjs +0 -25
- package/node_modules/zca-js/dist/cjs/apis/getContext.cjs +0 -9
- package/node_modules/zca-js/dist/cjs/apis/getCookie.cjs +0 -14
- package/node_modules/zca-js/dist/cjs/apis/getFriendBoardList.cjs +0 -31
- package/node_modules/zca-js/dist/cjs/apis/getFriendOnlines.cjs +0 -40
- package/node_modules/zca-js/dist/cjs/apis/getFriendRecommendations.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/getFriendRequestStatus.cjs +0 -30
- package/node_modules/zca-js/dist/cjs/apis/getFullAvatar.cjs +0 -30
- package/node_modules/zca-js/dist/cjs/apis/getGroupBlockedMember.cjs +0 -34
- package/node_modules/zca-js/dist/cjs/apis/getGroupChatHistory.cjs +0 -51
- package/node_modules/zca-js/dist/cjs/apis/getGroupInfo.cjs +0 -37
- package/node_modules/zca-js/dist/cjs/apis/getGroupInviteBoxInfo.cjs +0 -43
- package/node_modules/zca-js/dist/cjs/apis/getGroupInviteBoxList.cjs +0 -36
- package/node_modules/zca-js/dist/cjs/apis/getGroupLinkDetail.cjs +0 -30
- package/node_modules/zca-js/dist/cjs/apis/getGroupLinkInfo.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/getGroupMembersInfo.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/getHiddenConversations.cjs +0 -28
- package/node_modules/zca-js/dist/cjs/apis/getLabels.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/getListBank.cjs +0 -25
- package/node_modules/zca-js/dist/cjs/apis/getListBankAccount.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/getListBoard.cjs +0 -59
- package/node_modules/zca-js/dist/cjs/apis/getListDevice.cjs +0 -27
- package/node_modules/zca-js/dist/cjs/apis/getListReminder.cjs +0 -61
- package/node_modules/zca-js/dist/cjs/apis/getMultiUsersByPhones.cjs +0 -53
- package/node_modules/zca-js/dist/cjs/apis/getMute.cjs +0 -27
- package/node_modules/zca-js/dist/cjs/apis/getOwnId.cjs +0 -9
- package/node_modules/zca-js/dist/cjs/apis/getPendingGroupMembers.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/getPinConversations.cjs +0 -27
- package/node_modules/zca-js/dist/cjs/apis/getPollDetail.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/getProductCatalogList.cjs +0 -38
- package/node_modules/zca-js/dist/cjs/apis/getQR.cjs +0 -34
- package/node_modules/zca-js/dist/cjs/apis/getQuickMessageList.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/getRelatedFriendGroup.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/getReminder.cjs +0 -30
- package/node_modules/zca-js/dist/cjs/apis/getReminderResponses.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/getSentFriendRequest.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/getSettings.cjs +0 -25
- package/node_modules/zca-js/dist/cjs/apis/getStickerCategoryDetail.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/getStickers.cjs +0 -45
- package/node_modules/zca-js/dist/cjs/apis/getStickersDetail.cjs +0 -45
- package/node_modules/zca-js/dist/cjs/apis/getUnreadMark.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/getUserInfo.cjs +0 -58
- package/node_modules/zca-js/dist/cjs/apis/inviteUserToGroups.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/joinGroupInviteBox.cjs +0 -30
- package/node_modules/zca-js/dist/cjs/apis/joinGroupLink.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/keepAlive.cjs +0 -27
- package/node_modules/zca-js/dist/cjs/apis/lastOnline.cjs +0 -31
- package/node_modules/zca-js/dist/cjs/apis/leaveGroup.cjs +0 -38
- package/node_modules/zca-js/dist/cjs/apis/listen.cjs +0 -440
- package/node_modules/zca-js/dist/cjs/apis/lockPoll.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/login.cjs +0 -102
- package/node_modules/zca-js/dist/cjs/apis/loginQR.cjs +0 -368
- package/node_modules/zca-js/dist/cjs/apis/logoutV2.cjs +0 -83
- package/node_modules/zca-js/dist/cjs/apis/lostFocus.cjs +0 -28
- package/node_modules/zca-js/dist/cjs/apis/parseLink.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/registerCatalog.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/rejectFriendRequest.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/removeFriend.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/removeFriendAlias.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/removeGroupBlockedMember.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/removeGroupDeputy.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/removeQuickMessage.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/removeReminder.cjs +0 -54
- package/node_modules/zca-js/dist/cjs/apis/removeUnreadMark.cjs +0 -64
- package/node_modules/zca-js/dist/cjs/apis/removeUserFromGroup.cjs +0 -39
- package/node_modules/zca-js/dist/cjs/apis/resetHiddenConversPin.cjs +0 -25
- package/node_modules/zca-js/dist/cjs/apis/reuseAvatar.cjs +0 -31
- package/node_modules/zca-js/dist/cjs/apis/reviewPendingMemberRequest.cjs +0 -43
- package/node_modules/zca-js/dist/cjs/apis/scanURL.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/searchSticker.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/sendBankCard.cjs +0 -68
- package/node_modules/zca-js/dist/cjs/apis/sendCard.cjs +0 -89
- package/node_modules/zca-js/dist/cjs/apis/sendDeliveredEvent.cjs +0 -69
- package/node_modules/zca-js/dist/cjs/apis/sendFriendRequest.cjs +0 -44
- package/node_modules/zca-js/dist/cjs/apis/sendLink.cjs +0 -92
- package/node_modules/zca-js/dist/cjs/apis/sendMessage.cjs +0 -500
- package/node_modules/zca-js/dist/cjs/apis/sendReport.cjs +0 -67
- package/node_modules/zca-js/dist/cjs/apis/sendSeenEvent.cjs +0 -77
- package/node_modules/zca-js/dist/cjs/apis/sendSticker.cjs +0 -88
- package/node_modules/zca-js/dist/cjs/apis/sendTypingEvent.cjs +0 -47
- package/node_modules/zca-js/dist/cjs/apis/sendVideo.cjs +0 -148
- package/node_modules/zca-js/dist/cjs/apis/sendVoice.cjs +0 -103
- package/node_modules/zca-js/dist/cjs/apis/setHiddenConversations.cjs +0 -53
- package/node_modules/zca-js/dist/cjs/apis/setMute.cjs +0 -81
- package/node_modules/zca-js/dist/cjs/apis/setPinnedConversations.cjs +0 -48
- package/node_modules/zca-js/dist/cjs/apis/sharePoll.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/unblockUser.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/undo.cjs +0 -56
- package/node_modules/zca-js/dist/cjs/apis/undoFriendRequest.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/updateActiveStatus.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/updateArchivedChatList.cjs +0 -39
- package/node_modules/zca-js/dist/cjs/apis/updateAutoDeleteChat.cjs +0 -54
- package/node_modules/zca-js/dist/cjs/apis/updateAutoReply.cjs +0 -43
- package/node_modules/zca-js/dist/cjs/apis/updateBankAccount.cjs +0 -36
- package/node_modules/zca-js/dist/cjs/apis/updateCatalog.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/updateGroupSettings.cjs +0 -48
- package/node_modules/zca-js/dist/cjs/apis/updateHiddenConversPin.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/updateLabels.cjs +0 -39
- package/node_modules/zca-js/dist/cjs/apis/updateLang.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/updateProductCatalog.cjs +0 -56
- package/node_modules/zca-js/dist/cjs/apis/updateProfile.cjs +0 -48
- package/node_modules/zca-js/dist/cjs/apis/updateProfileBio.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/updateQuickMessage.cjs +0 -66
- package/node_modules/zca-js/dist/cjs/apis/updateSettings.cjs +0 -95
- package/node_modules/zca-js/dist/cjs/apis/upgradeGroupToCommunity.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/uploadAttachment.cjs +0 -211
- package/node_modules/zca-js/dist/cjs/apis/uploadProductPhoto.cjs +0 -55
- package/node_modules/zca-js/dist/cjs/apis/votePoll.cjs +0 -34
- package/node_modules/zca-js/dist/cjs/apis.cjs +0 -324
- package/node_modules/zca-js/dist/cjs/context.cjs +0 -34
- package/node_modules/zca-js/dist/cjs/index.cjs +0 -159
- package/node_modules/zca-js/dist/cjs/models/AutoReply.cjs +0 -9
- package/node_modules/zca-js/dist/cjs/models/Bank.cjs +0 -263
- package/node_modules/zca-js/dist/cjs/models/Board.cjs +0 -8
- package/node_modules/zca-js/dist/cjs/models/DeliveredMessage.cjs +0 -23
- package/node_modules/zca-js/dist/cjs/models/Enum.cjs +0 -27
- package/node_modules/zca-js/dist/cjs/models/FriendEvent.cjs +0 -87
- package/node_modules/zca-js/dist/cjs/models/Group.cjs +0 -13
- package/node_modules/zca-js/dist/cjs/models/GroupEvent.cjs +0 -94
- package/node_modules/zca-js/dist/cjs/models/Message.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/models/Reaction.cjs +0 -74
- package/node_modules/zca-js/dist/cjs/models/Reminder.cjs +0 -9
- package/node_modules/zca-js/dist/cjs/models/SeenMessage.cjs +0 -23
- package/node_modules/zca-js/dist/cjs/models/Typing.cjs +0 -23
- package/node_modules/zca-js/dist/cjs/models/Undo.cjs +0 -16
- package/node_modules/zca-js/dist/cjs/models/ZBusiness.cjs +0 -39
- package/node_modules/zca-js/dist/cjs/update.cjs +0 -34
- package/node_modules/zca-js/dist/cjs/utils.cjs +0 -703
- package/node_modules/zca-js/dist/cjs/zalo.cjs +0 -112
- package/node_modules/zca-js/dist/context.d.ts +0 -179
- package/node_modules/zca-js/dist/context.js +0 -28
- package/node_modules/zca-js/dist/index.d.ts +0 -166
- package/node_modules/zca-js/dist/index.js +0 -14
- package/node_modules/zca-js/dist/models/Attachment.d.ts +0 -9
- package/node_modules/zca-js/dist/models/Attachment.js +0 -1
- package/node_modules/zca-js/dist/models/AutoReply.d.ts +0 -20
- package/node_modules/zca-js/dist/models/AutoReply.js +0 -7
- package/node_modules/zca-js/dist/models/Bank.d.ts +0 -291
- package/node_modules/zca-js/dist/models/Bank.js +0 -262
- package/node_modules/zca-js/dist/models/Board.d.ts +0 -60
- package/node_modules/zca-js/dist/models/Board.js +0 -6
- package/node_modules/zca-js/dist/models/Catalog.d.ts +0 -16
- package/node_modules/zca-js/dist/models/Catalog.js +0 -1
- package/node_modules/zca-js/dist/models/DeliveredMessage.d.ts +0 -27
- package/node_modules/zca-js/dist/models/DeliveredMessage.js +0 -17
- package/node_modules/zca-js/dist/models/Enum.d.ts +0 -21
- package/node_modules/zca-js/dist/models/Enum.js +0 -25
- package/node_modules/zca-js/dist/models/FriendEvent.d.ts +0 -107
- package/node_modules/zca-js/dist/models/FriendEvent.js +0 -83
- package/node_modules/zca-js/dist/models/Group.d.ts +0 -125
- package/node_modules/zca-js/dist/models/Group.js +0 -11
- package/node_modules/zca-js/dist/models/GroupEvent.d.ts +0 -178
- package/node_modules/zca-js/dist/models/GroupEvent.js +0 -90
- package/node_modules/zca-js/dist/models/Label.d.ts +0 -10
- package/node_modules/zca-js/dist/models/Label.js +0 -1
- package/node_modules/zca-js/dist/models/Message.d.ts +0 -91
- package/node_modules/zca-js/dist/models/Message.js +0 -29
- package/node_modules/zca-js/dist/models/ProductCatalog.d.ts +0 -17
- package/node_modules/zca-js/dist/models/ProductCatalog.js +0 -1
- package/node_modules/zca-js/dist/models/QuickMessage.d.ts +0 -25
- package/node_modules/zca-js/dist/models/QuickMessage.js +0 -1
- package/node_modules/zca-js/dist/models/Reaction.d.ts +0 -85
- package/node_modules/zca-js/dist/models/Reaction.js +0 -70
- package/node_modules/zca-js/dist/models/Reminder.d.ts +0 -51
- package/node_modules/zca-js/dist/models/Reminder.js +0 -7
- package/node_modules/zca-js/dist/models/SeenMessage.d.ts +0 -26
- package/node_modules/zca-js/dist/models/SeenMessage.js +0 -17
- package/node_modules/zca-js/dist/models/Sticker.d.ts +0 -27
- package/node_modules/zca-js/dist/models/Sticker.js +0 -1
- package/node_modules/zca-js/dist/models/Typing.d.ts +0 -24
- package/node_modules/zca-js/dist/models/Typing.js +0 -17
- package/node_modules/zca-js/dist/models/Undo.d.ts +0 -34
- package/node_modules/zca-js/dist/models/Undo.js +0 -12
- package/node_modules/zca-js/dist/models/User.d.ts +0 -70
- package/node_modules/zca-js/dist/models/User.js +0 -1
- package/node_modules/zca-js/dist/models/ZBusiness.d.ts +0 -22
- package/node_modules/zca-js/dist/models/ZBusiness.js +0 -35
- package/node_modules/zca-js/dist/models/index.d.ts +0 -22
- package/node_modules/zca-js/dist/models/index.js +0 -22
- package/node_modules/zca-js/dist/update.d.ts +0 -2
- package/node_modules/zca-js/dist/update.js +0 -29
- package/node_modules/zca-js/dist/utils.d.ts +0 -167
- package/node_modules/zca-js/dist/utils.js +0 -719
- package/node_modules/zca-js/dist/zalo.d.ts +0 -41
- package/node_modules/zca-js/dist/zalo.js +0 -107
- package/node_modules/zca-js/eslint.config.js +0 -21
- package/node_modules/zca-js/index.d.ts +0 -2
- package/node_modules/zca-js/package.json +0 -78
- package/node_modules/zca-js/rollup.config.js +0 -28
- package/patches/zca-js+2.2.0.patch +0 -1445
- package/src/cli.test.js +0 -127
- package/src/core/forward.js +0 -112
- package/src/core/group-history.js +0 -248
- package/src/core/group-invite.js +0 -53
- package/src/core/offline-queue.js +0 -194
- package/src/core/pin.js +0 -222
- package/src/core/socket-tap.js +0 -154
- package/src/core/sync-v2/assets.js +0 -181
- package/src/core/sync-v2/gid.js +0 -106
- package/src/core/sync-v2/keepalive.js +0 -177
- package/src/core/sync-v2/message-types.js +0 -522
- package/src/core/sync-v2/renewlink.js +0 -124
- package/src/core/sync-v2/zcloud-cipher.js +0 -88
- package/src/core/zca-custom.js +0 -78
- package/src/mcp/message-buffer.test.js +0 -360
- package/src/mcp/notifier.test.js +0 -275
- package/src/mcp/thread-filter.test.js +0 -206
- package/src/mcp/thread-name-cache.test.js +0 -142
- package/src/utils/atomic-file.js +0 -209
- package/src/utils/bank-helpers.test.js +0 -66
- package/src/utils/device-fingerprint.js +0 -72
- package/src/utils/mentions.js +0 -140
- package/src/utils/proxy-helpers.test.js +0 -36
- package/src/utils/split-message.js +0 -166
- package/src/utils/urgency.js +0 -29
- /package/src/{core → zalo/custom}/user-info.js +0 -0
- /package/src/{utils → zalo/format}/extract-message-text.js +0 -0
- /package/src/{utils → zalo/format}/markdown.js +0 -0
package/src/core/self-heal.js
CHANGED
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
* missed from Zalo's offline queue -- on its own socket, with no phone -- and
|
|
4
4
|
* resolves a coverage gap only for the window that pull actually covered.
|
|
5
5
|
*
|
|
6
|
-
* This is what
|
|
7
|
-
*
|
|
8
|
-
* everything after its saved cursor, page by page until the server says there
|
|
6
|
+
* This is what a client does on every authenticated connect (../zalo/queues/offline-queue.js): each message queue is
|
|
7
|
+
* asked for everything after its saved cursor, page by page until the server says there
|
|
9
8
|
* is no more. It never involves the phone. The phone-backed restore
|
|
10
9
|
* (transfer-sync-v2, cmd 590) is a different thing -- the full history, and the
|
|
11
10
|
* one step that needs the owner's tap -- and nothing here ever starts it; only a
|
|
@@ -14,10 +13,18 @@
|
|
|
14
13
|
* The rules, and why:
|
|
15
14
|
*
|
|
16
15
|
* - **Runs on every handshake.** The trigger is the cmd 1 handshake frame, read
|
|
17
|
-
* by
|
|
18
|
-
* socket usable, it carries the queue list (`qCmds`), and
|
|
16
|
+
* by ../zalo/listener/socket-tap.js, not the listener's `connected`: the handshake is what makes a
|
|
17
|
+
* socket usable, it carries the queue list (`qCmds`), and the listener sets the
|
|
19
18
|
* cipher key from it synchronously just before. A daemon start is simply the
|
|
20
19
|
* first handshake.
|
|
20
|
+
* - **One queue at a time, one deadline.** The message queues in the handshake's `qCmds` order, then the control
|
|
21
|
+
* queues, each drained from its own cursor once the one before it is done. Asking every queue in the same moment, as
|
|
22
|
+
* this once did (5c99017), fails: live, Zalo then answered only the first queue
|
|
23
|
+
* and never 511_1 or 603_1, at start or on a wake, reproduced both ways on the same cursors (2026-11-12). The whole
|
|
24
|
+
* catch-up has one deadline (`offline_timeout`, 480 s), and one page is waited for at most 30 s inside it. A
|
|
25
|
+
* queue unanswered then, or whose socket closed, is not finished: its gaps stay pending and the next connect or
|
|
26
|
+
* wake asks again. The socket supervisor owns every reconnect, so at its deadline the run only says it did not
|
|
27
|
+
* finish.
|
|
21
28
|
* - **One of our stages at a time.** It takes the daemon's stage lock
|
|
22
29
|
* (daemon-channel.js `createStageLock`), so it waits behind a running `sync`
|
|
23
30
|
* stage or `msg history` fetch and never shares the socket with one. Live
|
|
@@ -30,8 +37,8 @@
|
|
|
30
37
|
* msgId). Moving it before the write would let a crash skip a message
|
|
31
38
|
* forever; a cursor that lags only re-fetches what insert-if-absent then
|
|
32
39
|
* ignores. With no saved cursor, a queue starts from its newest stored
|
|
33
|
-
* message, then from the other queue's cursor (
|
|
34
|
-
*
|
|
40
|
+
* message, then from the other queue's cursor (one shared `lastActionId`
|
|
41
|
+
* serves queues that have no id of their own).
|
|
35
42
|
* - **Written insert-if-absent, removals applied.** New messages go through
|
|
36
43
|
* the history writer (`storeHistoryMessage`, `raw_data.src` "offline"), so a
|
|
37
44
|
* row the cache already holds is never modified. A recall or a
|
|
@@ -46,13 +53,40 @@
|
|
|
46
53
|
* - **A gap resolves only where it was covered.** A pending gap overlapping the
|
|
47
54
|
* covered window is resolved, and its uncovered remainder is recorded again
|
|
48
55
|
* as a pending gap, named with the `zalo-agent sync` command that closes it.
|
|
56
|
+
* - **Coverage never spans a device change.** Zalo keeps the offline queue per
|
|
57
|
+
* device (imei): a new device's queue starts at its login, and a cursor from an
|
|
58
|
+
* earlier device is answered with what the new queue holds -- often nothing,
|
|
59
|
+
* `more: 0`, no `evict`. So coverage never starts before the time this device id
|
|
60
|
+
* came into use (`deviceSince`, ./device-since.js), unless a phone-backed restore
|
|
61
|
+
* finished after it and reached back past it. What lies before stays pending as
|
|
62
|
+
* `new-device`, with the `zalo-agent sync --from` advice.
|
|
63
|
+
* - **Overflow repairs groups, and reports the rest.** A queue that reports
|
|
64
|
+
* `evict` (or a reset) dropped messages. For the group queue the groups' cloud
|
|
65
|
+
* store is read back to the loss (./overflow-repair.js, bounded) and, when that
|
|
66
|
+
* reached every group, the group loss is closed without a tap. A 1-1 loss stays
|
|
67
|
+
* pending. Either way a `queue_overflow` notice goes out (`onNotice`). A drain of
|
|
68
|
+
* 0 rows with no `evict` is a quiet queue, never an overflow.
|
|
49
69
|
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* not
|
|
70
|
+
* - **Items are acknowledged after the write, never before** (Y10, D7). Zalo wants to be told which queue
|
|
71
|
+
* items a client holds (a `532`, see ../zalo/queues/queue-verify.js), and repairs what it was not told about. A live push
|
|
72
|
+
* is acknowledged once every message in it is committed; a message the server re-sends as a `534` is stored first
|
|
73
|
+
* and acknowledged after. An item whose row did not commit is not acknowledged, so the server delivers it again.
|
|
74
|
+
* - **Offline pages are never acknowledged, and nothing is while they drain.** Offline batches are not verified
|
|
75
|
+
* (`skip_offline_verify`), and the verifier starts only once the offline catch-up is done
|
|
76
|
+
* (`verify_on_done_offline`). So a connect holds the verifier until its catch-up
|
|
77
|
+
* run is over, finished or not; live and `534` acks confirmed meanwhile go out then. Offline rows are still
|
|
78
|
+
* stored and still move the cursor.
|
|
79
|
+
* - **A re-sent message is announced once** (design 6.1, FX 11). Our listener announces a `534` as `message` too,
|
|
80
|
+
* after the tap stored it here and handed it on through `onRecovered`. `isRepeatedRepush` tells `listen` and
|
|
81
|
+
* `mcp start` that such a message is already stored, so neither prints, buffers nor posts it a second time. The
|
|
82
|
+
* `534` ids are noted even with self-heal off (read only: nothing sent, nothing written), so a re-push of a
|
|
83
|
+
* message the daemon already got live stays one event there too.
|
|
84
|
+
*
|
|
85
|
+
* Out of scope here, on purpose: the 533/570 resend path (the server asking us for ids it says we hold). It
|
|
86
|
+
* repairs a push lost in transit on a live socket; the catch-up above is a cursor pull and does not depend on
|
|
87
|
+
* it.
|
|
54
88
|
*/
|
|
55
|
-
import { GroupMessage, UserMessage, Undo } from "
|
|
89
|
+
import { GroupMessage, UserMessage, Undo } from "../zalo/listener/models.js";
|
|
56
90
|
import {
|
|
57
91
|
getMessageById,
|
|
58
92
|
getMessages,
|
|
@@ -65,11 +99,22 @@ import {
|
|
|
65
99
|
setSyncState,
|
|
66
100
|
} from "./db.js";
|
|
67
101
|
import { isRemovalMessage, storeHistoryMessage, storeLiveDelete, storeLiveUndo } from "./live-store.js";
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
102
|
+
import { IDLE_EVICTED_REASON, IDLE_GAP_REASON } from "./listener-lifecycle.js";
|
|
103
|
+
import {
|
|
104
|
+
DEFAULT_DRAIN_TIMEOUT_MS,
|
|
105
|
+
DEFAULT_MAX_PAGES,
|
|
106
|
+
controlQueuesFrom,
|
|
107
|
+
drainOfflineQueue,
|
|
108
|
+
messageQueuesFrom,
|
|
109
|
+
} from "../zalo/queues/offline-queue.js";
|
|
110
|
+
import { replayControlQueues } from "./control-replay.js";
|
|
111
|
+
import { CMD_AUTHEN } from "../zalo/listener/socket-tap.js";
|
|
112
|
+
import { CMD_VERIFY, createQueueVerifier, idsOf } from "../zalo/queues/queue-verify.js";
|
|
113
|
+
import { controlCursorsOf, readControls } from "../zalo/queues/control-queue.js";
|
|
70
114
|
import { describeGap } from "./sync-v2/gap-advice.js";
|
|
115
|
+
import { queueOverflowEvent, repairGroupsFromCloud } from "./overflow-repair.js";
|
|
71
116
|
|
|
72
|
-
/**
|
|
117
|
+
/** THREAD_TYPE.Group; anything else is a 1-1. */
|
|
73
118
|
const THREAD_GROUP = 1;
|
|
74
119
|
|
|
75
120
|
/** Live pushes, and the queue whose cursor each one's envelope carries. */
|
|
@@ -78,9 +123,28 @@ const PUSH_QUEUE = new Map([
|
|
|
78
123
|
[521, { queueName: "511_1", rows: "groupMsgs" }],
|
|
79
124
|
]);
|
|
80
125
|
|
|
126
|
+
/** The control frame: transfer-sync statuses and batches, unread marks, group and friend events. */
|
|
127
|
+
const CMD_CONTROL = 601;
|
|
128
|
+
|
|
129
|
+
/** A server re-push of a message it noticed we never confirmed (534), in the envelope of 501/521. */
|
|
130
|
+
const CMD_PUSH_MISS = 534;
|
|
131
|
+
|
|
132
|
+
/** At most this many re-pushed (534) message ids are remembered until their `message` event; the oldest go first. */
|
|
133
|
+
const REPUSH_MAX = 2000;
|
|
134
|
+
|
|
135
|
+
/** How long a live push waits for its rows to be stored before it is forgotten (never acknowledged). */
|
|
136
|
+
const AWAIT_MS = 10 * 60 * 1000;
|
|
137
|
+
const AWAIT_MAX = 500;
|
|
138
|
+
|
|
81
139
|
/** recordGap's own floor: shorter than this is not a gap worth naming. */
|
|
82
140
|
const MIN_GAP_MS = 1000;
|
|
83
141
|
|
|
142
|
+
/** The reason of a window before this device's login, which the device's queue cannot reach (./device-since.js). */
|
|
143
|
+
export const NEW_DEVICE_REASON = "new-device";
|
|
144
|
+
|
|
145
|
+
/** The message queue of 1-1 messages and of group messages, by the cmd their name starts with. */
|
|
146
|
+
const isGroupQueue = (queueName) => String(queueName).startsWith("511");
|
|
147
|
+
|
|
84
148
|
/**
|
|
85
149
|
* The sync_state key holding one queue's cursor, `{id, ts}` as JSON.
|
|
86
150
|
*
|
|
@@ -105,25 +169,48 @@ const iso = (ts) => new Date(ts).toISOString();
|
|
|
105
169
|
/** "uncovered:uncovered:startup-gap" helps nobody; keep the original cause. */
|
|
106
170
|
const baseReason = (reason) => String(reason || "gap").replace(/^(uncovered:)+/, "");
|
|
107
171
|
|
|
172
|
+
/**
|
|
173
|
+
* What an uncovered part of a gap is called. A planned idle window (on-demand presence) that the queue no longer
|
|
174
|
+
* covers becomes `idle-evicted`: a real gap, alarmed on, closed by `sync --from`.
|
|
175
|
+
*/
|
|
176
|
+
const uncoveredReason = (reason, cause = null) =>
|
|
177
|
+
baseReason(reason) === IDLE_GAP_REASON || baseReason(reason) === IDLE_EVICTED_REASON
|
|
178
|
+
? IDLE_EVICTED_REASON
|
|
179
|
+
: cause || `uncovered:${baseReason(reason)}`;
|
|
180
|
+
|
|
108
181
|
/**
|
|
109
182
|
* Build a daemon's self-heal. `listen` and `mcp start` each build exactly one.
|
|
110
183
|
*
|
|
111
184
|
* @param {object} args
|
|
112
185
|
* @param {() => object} args.getApi - the daemon's CURRENT api; re-login replaces it
|
|
113
|
-
* @param {ReturnType<import("
|
|
186
|
+
* @param {ReturnType<import("../zalo/listener/socket-tap.js").createSocketTap>} args.tap - the daemon's socket tap
|
|
114
187
|
* @param {ReturnType<import("./daemon-channel.js").createStageLock>} [args.lock] - the
|
|
115
188
|
* stage lock the daemon channel holds; without one the catch-up runs unguarded
|
|
116
|
-
* @param {boolean} [args.enabled=true] - false (`--no-self-heal`):
|
|
117
|
-
* nothing,
|
|
189
|
+
* @param {boolean} [args.enabled=true] - false (`--no-self-heal`): send nothing,
|
|
190
|
+
* write nothing, and subscribe to nothing but the read-only note of `534` ids
|
|
191
|
+
* that `isRepeatedRepush` answers from
|
|
118
192
|
* @param {(line: string) => void} [args.log] - one line per run; stderr only
|
|
119
193
|
* @param {(items: Array<{msg: object, info: object}>) => void} [args.onRecovered] -
|
|
120
194
|
* the messages a run stored that the cache never had, oldest first, for the
|
|
121
195
|
* daemon's bot-facing output (the MCP buffer, `listen`'s events and webhook)
|
|
122
196
|
* @param {() => number} [args.now]
|
|
123
|
-
* @param {number} [args.timeoutMs] -
|
|
197
|
+
* @param {number} [args.timeoutMs] - the whole catch-up's deadline, every queue and page included
|
|
198
|
+
* (`offline_timeout`); there is no per-page wait
|
|
124
199
|
* @param {number} [args.maxPages] - pages per queue
|
|
200
|
+
* @param {boolean} [args.acks=true] - acknowledge stored queue items to Zalo (`532`); false sends nothing of the kind
|
|
201
|
+
* @param {(undo: Undo) => {stored: boolean}} [args.storeUndo] - writes a recall found on a queue page; the live
|
|
202
|
+
* store's by default. A seam for tests: the recall's thread type does not reach zalo.db.
|
|
203
|
+
* @param {() => (number|{ts: number, source?: string}|null)} [args.deviceSince] - since when this account's device id
|
|
204
|
+
* is in use (./device-since.js `deviceSinceOf`); coverage never starts before it. Null or absent: no floor.
|
|
205
|
+
* @param {(event: object) => void} [args.onNotice] - a `queue_overflow` event (./overflow-repair.js) for the daemon's
|
|
206
|
+
* log, webhook and MCP buffer
|
|
207
|
+
* @param {object} [args.groupRepair] - options for ./overflow-repair.js `repairGroupsFromCloud` (tests: its seams);
|
|
208
|
+
* `false` turns the group repair off
|
|
209
|
+
* @param {(done: {reason: string, ms: number, result: object|null}) => void} [args.onRun] - a catch-up (one run, with
|
|
210
|
+
* the runs folded into it) finished: on-demand presence ends its start-up and pulse holds here
|
|
125
211
|
* @returns {{attach: (listener: object) => void, run: (reason?: string) => Promise<object>,
|
|
126
212
|
* settled: () => Promise<void>, noteDelivered: (msg: object) => void,
|
|
213
|
+
* isRepeatedRepush: (msg: object) => boolean,
|
|
127
214
|
* cursor: (queueName: string) => {id: string, ts: number}|null}}
|
|
128
215
|
*/
|
|
129
216
|
export function createSelfHeal({
|
|
@@ -134,14 +221,35 @@ export function createSelfHeal({
|
|
|
134
221
|
log = (line) => console.error(line),
|
|
135
222
|
onRecovered = () => {},
|
|
136
223
|
now = () => Date.now(),
|
|
137
|
-
timeoutMs =
|
|
224
|
+
timeoutMs = DEFAULT_DRAIN_TIMEOUT_MS,
|
|
138
225
|
maxPages = DEFAULT_MAX_PAGES,
|
|
226
|
+
acks = true,
|
|
227
|
+
storeUndo = storeLiveUndo,
|
|
228
|
+
deviceSince = null,
|
|
229
|
+
onNotice = () => {},
|
|
230
|
+
groupRepair = {},
|
|
231
|
+
onRun = () => {},
|
|
139
232
|
} = {}) {
|
|
140
233
|
const cursors = new Map();
|
|
234
|
+
// Tells Zalo which queue items are safely stored (Y10). Nothing is handed to it before the commit.
|
|
235
|
+
const verifier =
|
|
236
|
+
enabled && acks
|
|
237
|
+
? createQueueVerifier({
|
|
238
|
+
getListener: () => getApi?.()?.listener ?? null,
|
|
239
|
+
settings: () => getApi?.()?.getContext?.()?.settings?.features?.socket ?? {},
|
|
240
|
+
log: (line) => say(line),
|
|
241
|
+
})
|
|
242
|
+
: null;
|
|
243
|
+
/** The message ids of `534` frames whose `message` events have not come yet, oldest first. */
|
|
244
|
+
const repushed = new Set();
|
|
245
|
+
/** Live pushes whose rows are not all stored yet: {queueName, ids, msgIds: Set, at}. */
|
|
246
|
+
const awaiting = [];
|
|
141
247
|
const attached = new WeakSet();
|
|
142
248
|
let running = null;
|
|
143
249
|
let again = false;
|
|
144
250
|
let lastResult = null;
|
|
251
|
+
/** The repair a live overflow started, so they run one at a time. */
|
|
252
|
+
let overflowRun = Promise.resolve();
|
|
145
253
|
|
|
146
254
|
const say = (line) => {
|
|
147
255
|
try {
|
|
@@ -151,6 +259,43 @@ export function createSelfHeal({
|
|
|
151
259
|
}
|
|
152
260
|
};
|
|
153
261
|
|
|
262
|
+
/**
|
|
263
|
+
* The coverage floor: this device's login, lowered to where a phone-backed restore reached back when that restore
|
|
264
|
+
* finished after it (the restore then covers the window the device's queue cannot).
|
|
265
|
+
*/
|
|
266
|
+
function coverageFloor() {
|
|
267
|
+
let floor = null;
|
|
268
|
+
let source = null;
|
|
269
|
+
try {
|
|
270
|
+
const v = typeof deviceSince === "function" ? deviceSince() : deviceSince;
|
|
271
|
+
const ts = typeof v === "object" && v !== null ? Number(v.ts) : Number(v);
|
|
272
|
+
if (Number.isFinite(ts) && ts > 0) {
|
|
273
|
+
floor = ts;
|
|
274
|
+
source = typeof v === "object" && v !== null ? v.source || null : null;
|
|
275
|
+
}
|
|
276
|
+
} catch (e) {
|
|
277
|
+
say(`could not read when this device logged in: ${e?.message || e}`);
|
|
278
|
+
return { ts: now(), source: "unknown" };
|
|
279
|
+
}
|
|
280
|
+
if (floor === null) return null;
|
|
281
|
+
try {
|
|
282
|
+
const okAt = Number(getSyncState("lastSyncOkAt"));
|
|
283
|
+
const okFrom = Number(getSyncState("lastSyncOkFrom"));
|
|
284
|
+
if (
|
|
285
|
+
getSyncState("lastSyncOkKind") === "transfer" &&
|
|
286
|
+
Number.isFinite(okAt) &&
|
|
287
|
+
Number.isFinite(okFrom) &&
|
|
288
|
+
okAt >= floor &&
|
|
289
|
+
okFrom <= floor
|
|
290
|
+
) {
|
|
291
|
+
return { ts: okFrom, source: "restore", deviceTs: floor };
|
|
292
|
+
}
|
|
293
|
+
} catch {
|
|
294
|
+
/* no restore on record: the device's login stays the floor */
|
|
295
|
+
}
|
|
296
|
+
return { ts: floor, source, deviceTs: floor };
|
|
297
|
+
}
|
|
298
|
+
|
|
154
299
|
function readCursor(queueName) {
|
|
155
300
|
if (cursors.has(queueName)) return cursors.get(queueName);
|
|
156
301
|
let c = null;
|
|
@@ -194,11 +339,37 @@ export function createSelfHeal({
|
|
|
194
339
|
if (!getMessageById(String(id))) return;
|
|
195
340
|
const queueName = msg.type === THREAD_GROUP ? "511_1" : "510_1";
|
|
196
341
|
advance(queueName, { id: String(id), ts: Number(msg.data.ts) || now() });
|
|
342
|
+
settle(String(id));
|
|
197
343
|
} catch (e) {
|
|
198
344
|
say(`could not record the queue position: ${e?.message || e}`);
|
|
199
345
|
}
|
|
200
346
|
}
|
|
201
347
|
|
|
348
|
+
/** A row is committed: acknowledge every live push whose rows are now all committed. */
|
|
349
|
+
function settle(msgId) {
|
|
350
|
+
if (!verifier) return;
|
|
351
|
+
for (let i = awaiting.length - 1; i >= 0; i--) {
|
|
352
|
+
const entry = awaiting[i];
|
|
353
|
+
if (!entry.msgIds.delete(msgId) || entry.msgIds.size > 0) continue;
|
|
354
|
+
awaiting.splice(i, 1);
|
|
355
|
+
verifier.confirm(entry.queueName, entry.ids);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/** A live push named queue items: acknowledge them once its rows are committed. */
|
|
360
|
+
function trackPush(queueName, d, rowsKey) {
|
|
361
|
+
if (!verifier) return;
|
|
362
|
+
const ids = idsOf(d.queueStatus, queueName);
|
|
363
|
+
if (!ids.length) return;
|
|
364
|
+
const cutoff = now() - AWAIT_MS;
|
|
365
|
+
while (awaiting.length && (awaiting[0].at < cutoff || awaiting.length >= AWAIT_MAX)) awaiting.shift();
|
|
366
|
+
const rows = Array.isArray(d[rowsKey]) ? d[rowsKey] : [];
|
|
367
|
+
// Rows the storing handler committed before this frame was read are already safe.
|
|
368
|
+
const msgIds = new Set(rows.map((r) => String(r?.msgId ?? "")).filter((id) => isId(id) && !getMessageById(id)));
|
|
369
|
+
if (msgIds.size === 0) verifier.confirm(queueName, ids);
|
|
370
|
+
else awaiting.push({ queueName, ids, msgIds, at: now() });
|
|
371
|
+
}
|
|
372
|
+
|
|
202
373
|
/** True when some pending gap already spans part of [fromTs, toTs]. */
|
|
203
374
|
function overlapsPending(fromTs, toTs) {
|
|
204
375
|
return getPendingSyncGaps().some((g) => Number(g.toTs) > fromTs && Number(g.fromTs) < toTs);
|
|
@@ -229,27 +400,48 @@ export function createSelfHeal({
|
|
|
229
400
|
const evicted = Object.entries(d.queueStatus || {}).some(
|
|
230
401
|
([q, st]) => q.startsWith(push.queueName.slice(0, 4)) && Number(st?.evict) === 1,
|
|
231
402
|
);
|
|
232
|
-
|
|
403
|
+
const lost = [];
|
|
404
|
+
if (evicted && cur && recordLoss(cur.ts, oldest, `queue-evicted:${push.queueName}`)) {
|
|
405
|
+
lost.push({ queueName: push.queueName, fromTs: cur.ts });
|
|
406
|
+
}
|
|
233
407
|
const reset = d.resetLastActionId;
|
|
234
408
|
if (isId(reset) && String(reset) !== "0") {
|
|
235
|
-
if (cur
|
|
409
|
+
if (cur && recordLoss(cur.ts, now(), `queue-reset:${push.queueName}`)) {
|
|
410
|
+
lost.push({ queueName: push.queueName, fromTs: cur.ts });
|
|
411
|
+
}
|
|
236
412
|
writeCursor(push.queueName, { id: String(reset), ts: now() });
|
|
237
413
|
}
|
|
414
|
+
if (lost.length) scheduleOverflow(lost);
|
|
415
|
+
trackPush(push.queueName, d, push.rows);
|
|
238
416
|
} catch (e) {
|
|
239
417
|
say(`could not read a live queue status: ${e?.message || e}`);
|
|
240
418
|
}
|
|
241
419
|
}
|
|
242
420
|
|
|
421
|
+
/** A live push reported a loss: repair and report it under the stage lock, after whatever runs now. */
|
|
422
|
+
function scheduleOverflow(lost) {
|
|
423
|
+
overflowRun = overflowRun
|
|
424
|
+
.then(async () => {
|
|
425
|
+
const release = lock ? await lock.acquire("self-heal") : () => {};
|
|
426
|
+
try {
|
|
427
|
+
await handleOverflow(getApi?.(), lost);
|
|
428
|
+
} finally {
|
|
429
|
+
release();
|
|
430
|
+
}
|
|
431
|
+
})
|
|
432
|
+
.catch((e) => say(`overflow repair failed: ${e?.message || e}`));
|
|
433
|
+
}
|
|
434
|
+
|
|
243
435
|
/** Write one page's rows as the listener would have, had it seen them live. */
|
|
244
436
|
function storeRows(queue, rows, ownId, cursorId) {
|
|
245
437
|
const isGroup = queue.threadType === THREAD_GROUP;
|
|
246
|
-
const out = { added: [], untouched: 0, removals: 0, newest: null, oldestTs: null, older: 0 };
|
|
438
|
+
const out = { added: [], untouched: 0, removals: 0, newest: null, oldestTs: null, older: 0, failed: 0 };
|
|
247
439
|
for (const raw of rows) {
|
|
248
440
|
if (!raw || typeof raw !== "object") continue;
|
|
249
|
-
const row = { ...raw }; //
|
|
441
|
+
const row = { ...raw }; // the message models rewrite their data in place
|
|
250
442
|
const ts = Number(row.ts);
|
|
251
443
|
if (Number.isFinite(ts) && ts > 0) out.oldestTs = out.oldestTs === null ? ts : Math.min(out.oldestTs, ts);
|
|
252
|
-
// lastId means "after this" in every use Zalo
|
|
444
|
+
// lastId means "after this" in every use Zalo makes of it; a
|
|
253
445
|
// row from before the cursor says the server read it differently.
|
|
254
446
|
if (isId(row.msgId) && idGreater(cursorId, row.msgId)) out.older++;
|
|
255
447
|
try {
|
|
@@ -260,8 +452,8 @@ export function createSelfHeal({
|
|
|
260
452
|
!Array.isArray(content) &&
|
|
261
453
|
Object.hasOwn(content, "deleteMsg")
|
|
262
454
|
) {
|
|
263
|
-
// A recall:
|
|
264
|
-
if (
|
|
455
|
+
// A recall: the listener turns exactly this shape into its `undo` event.
|
|
456
|
+
if (storeUndo(new Undo(ownId, row, isGroup)).stored) out.removals++;
|
|
265
457
|
continue;
|
|
266
458
|
}
|
|
267
459
|
const msg = isGroup ? new GroupMessage(ownId, row) : new UserMessage(ownId, row);
|
|
@@ -271,7 +463,11 @@ export function createSelfHeal({
|
|
|
271
463
|
}
|
|
272
464
|
const r = storeHistoryMessage(msg, { src: "offline" });
|
|
273
465
|
if (r.stored) out.added.push({ msg, info: r.info });
|
|
274
|
-
else
|
|
466
|
+
else {
|
|
467
|
+
out.untouched++;
|
|
468
|
+
// A row deliberately not written is handled; one whose write failed is not.
|
|
469
|
+
if (r.failed) out.failed++;
|
|
470
|
+
}
|
|
275
471
|
// The cursor may pass this row only because it is in zalo.db now.
|
|
276
472
|
const id = String(row.msgId ?? "");
|
|
277
473
|
if (isId(id) && getMessageById(id) && (!out.newest || idGreater(id, out.newest.id))) {
|
|
@@ -279,6 +475,7 @@ export function createSelfHeal({
|
|
|
279
475
|
}
|
|
280
476
|
} catch (e) {
|
|
281
477
|
out.untouched++;
|
|
478
|
+
out.failed++;
|
|
282
479
|
say(`a recovered row was not stored: ${e?.message || e}`);
|
|
283
480
|
}
|
|
284
481
|
}
|
|
@@ -298,11 +495,11 @@ export function createSelfHeal({
|
|
|
298
495
|
left.push({
|
|
299
496
|
fromTs: f,
|
|
300
497
|
toTs: coverage.from,
|
|
301
|
-
reason:
|
|
498
|
+
reason: uncoveredReason(g.reason, coverage.cause),
|
|
302
499
|
});
|
|
303
500
|
}
|
|
304
501
|
if (t - coverage.to >= MIN_GAP_MS) {
|
|
305
|
-
left.push({ fromTs: coverage.to, toTs: t, reason:
|
|
502
|
+
left.push({ fromTs: coverage.to, toTs: t, reason: uncoveredReason(g.reason) });
|
|
306
503
|
}
|
|
307
504
|
runInTransaction(() => {
|
|
308
505
|
resolveSyncGap(g.id);
|
|
@@ -343,6 +540,13 @@ export function createSelfHeal({
|
|
|
343
540
|
`asking Zalo's offline queue on this socket what it missed (${reason}; no phone involved): ${asked.join(", ")}`,
|
|
344
541
|
);
|
|
345
542
|
|
|
543
|
+
// One queue at a time, the message queues in `qCmds` order and then the control queues, all under one deadline
|
|
544
|
+
// from this moment. Not all at once: asked in the same moment, Zalo
|
|
545
|
+
// answered only the first (510_1) for this client and never 511_1 or 603_1, so group messages and group events
|
|
546
|
+
// missed while parked never came back (2026-11-12, reproduced both ways on the same cursors).
|
|
547
|
+
const deadline = now() + timeoutMs;
|
|
548
|
+
const left = () => Math.max(0, deadline - now());
|
|
549
|
+
|
|
346
550
|
const results = [];
|
|
347
551
|
for (const p of plan) {
|
|
348
552
|
if (!p.cursor) {
|
|
@@ -354,11 +558,13 @@ export function createSelfHeal({
|
|
|
354
558
|
tap,
|
|
355
559
|
queue: p.queue,
|
|
356
560
|
lastId: p.cursor.id,
|
|
357
|
-
timeoutMs,
|
|
561
|
+
timeoutMs: left(),
|
|
358
562
|
maxPages,
|
|
563
|
+
log: say,
|
|
359
564
|
});
|
|
360
565
|
const s = storeRows(p.queue, r.rows, ownId, p.cursor.id);
|
|
361
566
|
if (s.newest) advance(p.queue.queueName, s.newest);
|
|
567
|
+
// Not acknowledged: an offline batch is never verified (`skip_offline_verify`, see the file header).
|
|
362
568
|
if (r.resetTo) writeCursor(p.queue.queueName, { id: r.resetTo, ts: now() });
|
|
363
569
|
if (s.older) {
|
|
364
570
|
say(
|
|
@@ -371,6 +577,7 @@ export function createSelfHeal({
|
|
|
371
577
|
const reason = r.complete && s.older ? "out-of-order" : r.reason;
|
|
372
578
|
results.push({ queue: p.queue, cursor: p.cursor, ...r, ...s, complete, reason });
|
|
373
579
|
}
|
|
580
|
+
const controlsDone = replayControls(listener, left());
|
|
374
581
|
|
|
375
582
|
const added = results.flatMap((r) => r.added || []);
|
|
376
583
|
if (added.length) {
|
|
@@ -381,7 +588,7 @@ export function createSelfHeal({
|
|
|
381
588
|
}
|
|
382
589
|
}
|
|
383
590
|
|
|
384
|
-
// Coverage: every queue drained, each from a known point.
|
|
591
|
+
// Coverage: every queue drained, each from a known point -- and never from before this device's login.
|
|
385
592
|
let coverage = null;
|
|
386
593
|
if (results.every((r) => r.complete)) {
|
|
387
594
|
let from = -Infinity;
|
|
@@ -397,6 +604,16 @@ export function createSelfHeal({
|
|
|
397
604
|
cause = r.evicted ? `queue-evicted:${r.queue.queueName}` : null;
|
|
398
605
|
}
|
|
399
606
|
}
|
|
607
|
+
const floor = from !== null && Number.isFinite(from) ? coverageFloor() : null;
|
|
608
|
+
if (floor && floor.ts > from) {
|
|
609
|
+
say(
|
|
610
|
+
`this device logged in at ${iso(floor.deviceTs ?? floor.ts)}, after the queue position ` +
|
|
611
|
+
`(${iso(from)}): Zalo keeps the offline queue per device, so nothing before that can come ` +
|
|
612
|
+
"from it, however empty its answer was",
|
|
613
|
+
);
|
|
614
|
+
from = floor.ts;
|
|
615
|
+
cause = NEW_DEVICE_REASON;
|
|
616
|
+
}
|
|
400
617
|
if (from !== null && Number.isFinite(from)) coverage = { from, to: now(), cause };
|
|
401
618
|
}
|
|
402
619
|
|
|
@@ -404,17 +621,21 @@ export function createSelfHeal({
|
|
|
404
621
|
|
|
405
622
|
// What the server says it lost is a gap even with nothing pending over it.
|
|
406
623
|
const losses = [];
|
|
624
|
+
const overflowed = [];
|
|
407
625
|
for (const r of results) {
|
|
408
626
|
if (!r.cursor) continue;
|
|
409
627
|
if (r.evicted) {
|
|
410
628
|
const l = recordLoss(r.cursor.ts, r.oldestTs ?? now(), `queue-evicted:${r.queue.queueName}`);
|
|
411
629
|
if (l) losses.push(l);
|
|
630
|
+
overflowed.push({ queueName: r.queue.queueName, fromTs: r.cursor.ts });
|
|
412
631
|
}
|
|
413
632
|
if (r.resetTo) {
|
|
414
633
|
const l = recordLoss(r.cursor.ts, now(), `queue-reset:${r.queue.queueName}`);
|
|
415
634
|
if (l) losses.push(l);
|
|
635
|
+
overflowed.push({ queueName: r.queue.queueName, fromTs: r.cursor.ts });
|
|
416
636
|
}
|
|
417
637
|
}
|
|
638
|
+
const overflow = overflowed.length ? await handleOverflow(api, overflowed) : null;
|
|
418
639
|
|
|
419
640
|
const untouched = results.reduce((n, r) => n + (r.untouched || 0), 0);
|
|
420
641
|
const removals = results.reduce((n, r) => n + (r.removals || 0), 0);
|
|
@@ -431,6 +652,16 @@ export function createSelfHeal({
|
|
|
431
652
|
}
|
|
432
653
|
} else {
|
|
433
654
|
const failed = results.filter((r) => !r.complete).map((r) => `${r.queue.queueName} (${r.reason})`);
|
|
655
|
+
// A planned idle window this run could not cover (a timeout, the page cap) is no longer planned.
|
|
656
|
+
const idle = getPendingSyncGaps().filter((g) => g.reason === IDLE_GAP_REASON);
|
|
657
|
+
if (idle.length) {
|
|
658
|
+
runInTransaction(() => {
|
|
659
|
+
for (const g of idle) {
|
|
660
|
+
resolveSyncGap(g.id);
|
|
661
|
+
recordSyncGap(Number(g.fromTs), Number(g.toTs), IDLE_EVICTED_REASON);
|
|
662
|
+
}
|
|
663
|
+
});
|
|
664
|
+
}
|
|
434
665
|
const pendingGaps = getPendingSyncGaps();
|
|
435
666
|
let hint = "";
|
|
436
667
|
if (pendingGaps.length) {
|
|
@@ -441,9 +672,12 @@ export function createSelfHeal({
|
|
|
441
672
|
say(`${summary}; not finished: ${failed.join(", ")}, so no window is marked covered${hint}`);
|
|
442
673
|
}
|
|
443
674
|
|
|
675
|
+
const controls = await controlsDone;
|
|
676
|
+
|
|
444
677
|
return {
|
|
445
678
|
ran: true,
|
|
446
679
|
reason,
|
|
680
|
+
controls,
|
|
447
681
|
recovered: added.length,
|
|
448
682
|
untouched,
|
|
449
683
|
removals,
|
|
@@ -451,6 +685,7 @@ export function createSelfHeal({
|
|
|
451
685
|
resolved: done.resolved,
|
|
452
686
|
remainders: done.remainders,
|
|
453
687
|
losses,
|
|
688
|
+
overflow,
|
|
454
689
|
queues: results.map((r) => ({
|
|
455
690
|
queueName: r.queue.queueName,
|
|
456
691
|
lastId: r.cursor?.id ?? null,
|
|
@@ -463,6 +698,118 @@ export function createSelfHeal({
|
|
|
463
698
|
};
|
|
464
699
|
}
|
|
465
700
|
|
|
701
|
+
/**
|
|
702
|
+
* Zalo dropped (evict) or reset message queues. Groups: read back from the groups' cloud store, and the group loss
|
|
703
|
+
* closed when every group was reached. 1-1: stays pending. Then one `queue_overflow` notice.
|
|
704
|
+
*
|
|
705
|
+
* @param {object} api
|
|
706
|
+
* @param {Array<{queueName: string, fromTs: number}>} overflowed
|
|
707
|
+
*/
|
|
708
|
+
async function handleOverflow(api, overflowed) {
|
|
709
|
+
const fromTs = Math.min(...overflowed.map((o) => o.fromTs));
|
|
710
|
+
const toTs = now();
|
|
711
|
+
const queues = [...new Set(overflowed.map((o) => o.queueName))];
|
|
712
|
+
const direct = queues.some((q) => !isGroupQueue(q));
|
|
713
|
+
let groups = null;
|
|
714
|
+
if (queues.some(isGroupQueue) && groupRepair !== false) {
|
|
715
|
+
say(`the group queue overflowed: reading the groups' cloud store back to ${iso(fromTs)} (no phone)`);
|
|
716
|
+
let repair;
|
|
717
|
+
try {
|
|
718
|
+
repair = await repairGroupsFromCloud({ api, fromTs, ...(groupRepair || {}) });
|
|
719
|
+
} catch (e) {
|
|
720
|
+
repair = { checked: 0, active: 0, added: [], complete: false, incomplete: [String(e?.message || e)] };
|
|
721
|
+
}
|
|
722
|
+
groups = { checked: repair.checked, active: repair.active, added: repair.added.length };
|
|
723
|
+
groups.complete = repair.complete;
|
|
724
|
+
if (repair.added.length) {
|
|
725
|
+
try {
|
|
726
|
+
onRecovered(repair.added);
|
|
727
|
+
} catch (e) {
|
|
728
|
+
say(`handing recovered messages on failed: ${e?.message || e}`);
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
if (repair.complete) {
|
|
732
|
+
// Every group was read back to the loss: the group queue's loss is covered.
|
|
733
|
+
const closing = getPendingSyncGaps().filter(
|
|
734
|
+
(g) => /^queue-(evicted|reset):511/.test(String(g.reason)) && Number(g.fromTs) >= fromTs,
|
|
735
|
+
);
|
|
736
|
+
runInTransaction(() => {
|
|
737
|
+
for (const g of closing) resolveSyncGap(g.id);
|
|
738
|
+
});
|
|
739
|
+
say(
|
|
740
|
+
`groups repaired from the cloud store: ${repair.added.length} message(s) added from ` +
|
|
741
|
+
`${repair.active} active group(s) of ${repair.checked}; closed ${closing.length} group gap(s)`,
|
|
742
|
+
);
|
|
743
|
+
} else {
|
|
744
|
+
say(
|
|
745
|
+
`groups partly repaired from the cloud store (${repair.added.length} message(s) added, ` +
|
|
746
|
+
`${repair.checked} group(s) read): ${repair.incomplete.join("; ")}; the group gap stays pending`,
|
|
747
|
+
);
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
const pending = getPendingSyncGaps().some((g) => Number(g.toTs) > fromTs && Number(g.fromTs) < toTs);
|
|
751
|
+
const ownId = String(api?.getOwnId?.() ?? api?.getContext?.()?.uid ?? "") || null;
|
|
752
|
+
const event = queueOverflowEvent({ accountId: ownId, fromTs, toTs, queues, direct, groups, pending });
|
|
753
|
+
try {
|
|
754
|
+
onNotice(event);
|
|
755
|
+
} catch (e) {
|
|
756
|
+
say(`the overflow notice failed: ${e?.message || e}`);
|
|
757
|
+
}
|
|
758
|
+
return event;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
/**
|
|
762
|
+
* After the message queues: the control queues, replayed from their saved cursors (./control-replay.js), one at a
|
|
763
|
+
* time, in what is left of the same deadline. Each page reaches the same handlers as a live control push, which
|
|
764
|
+
* move the cursors; a queue with no saved cursor is not asked. Never rejects.
|
|
765
|
+
*
|
|
766
|
+
* @param {object} listener
|
|
767
|
+
* @param {number} budgetMs - what is left of the catch-up's deadline
|
|
768
|
+
*/
|
|
769
|
+
async function replayControls(listener, budgetMs) {
|
|
770
|
+
const queues = controlQueuesFrom(tap?.auth()?.ctrl_qCmds);
|
|
771
|
+
let results;
|
|
772
|
+
try {
|
|
773
|
+
results = await replayControlQueues({
|
|
774
|
+
listener,
|
|
775
|
+
tap,
|
|
776
|
+
queues,
|
|
777
|
+
cursorOf: readCursor,
|
|
778
|
+
timeoutMs: budgetMs,
|
|
779
|
+
maxPages,
|
|
780
|
+
log: say,
|
|
781
|
+
});
|
|
782
|
+
} catch (e) {
|
|
783
|
+
say(`control replay failed: ${e?.message || e}`);
|
|
784
|
+
return [];
|
|
785
|
+
}
|
|
786
|
+
for (const r of results) {
|
|
787
|
+
const name = r.queue.queueName;
|
|
788
|
+
if (r.reason === "no-cursor") {
|
|
789
|
+
say(`${name}: no saved control cursor yet, nothing to replay (the next live control sets one)`);
|
|
790
|
+
continue;
|
|
791
|
+
}
|
|
792
|
+
if (r.resetTo) writeCursor(name, { id: r.resetTo, ts: now() });
|
|
793
|
+
say(
|
|
794
|
+
`${name}: replayed ${r.replayed} control(s) after ${r.cursor.id}` +
|
|
795
|
+
(r.complete ? "" : `; not finished (${r.reason})`),
|
|
796
|
+
);
|
|
797
|
+
if (r.evicted) {
|
|
798
|
+
say(
|
|
799
|
+
`${name}: Zalo dropped control events while this client was away; group, friend and read-state ` +
|
|
800
|
+
"changes among them may be missing, and a `sync` restores what the phone holds",
|
|
801
|
+
);
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
return results.map((r) => ({
|
|
805
|
+
queueName: r.queue.queueName,
|
|
806
|
+
replayed: r.replayed,
|
|
807
|
+
complete: r.complete,
|
|
808
|
+
reason: r.reason,
|
|
809
|
+
evicted: r.evicted,
|
|
810
|
+
}));
|
|
811
|
+
}
|
|
812
|
+
|
|
466
813
|
async function healUnderLock(reason) {
|
|
467
814
|
const release = lock ? await lock.acquire("self-heal") : () => {};
|
|
468
815
|
try {
|
|
@@ -479,6 +826,7 @@ export function createSelfHeal({
|
|
|
479
826
|
again = true;
|
|
480
827
|
return;
|
|
481
828
|
}
|
|
829
|
+
const startedAt = now();
|
|
482
830
|
running = (async () => {
|
|
483
831
|
try {
|
|
484
832
|
let why = reason;
|
|
@@ -491,13 +839,119 @@ export function createSelfHeal({
|
|
|
491
839
|
say(`failed: ${e?.message || e}`);
|
|
492
840
|
} finally {
|
|
493
841
|
running = null;
|
|
842
|
+
// The catch-up is over, finished or not: what was confirmed meanwhile may be acknowledged now.
|
|
843
|
+
verifier?.release();
|
|
844
|
+
try {
|
|
845
|
+
onRun({ reason, ms: now() - startedAt, result: lastResult ?? null });
|
|
846
|
+
} catch {
|
|
847
|
+
/* a hook failure is not the catch-up's */
|
|
848
|
+
}
|
|
494
849
|
}
|
|
495
850
|
})();
|
|
496
851
|
}
|
|
497
852
|
|
|
853
|
+
/** Control kinds already reported as unhandled, so each is named once. */
|
|
854
|
+
const unhandled = new Set();
|
|
855
|
+
|
|
856
|
+
/**
|
|
857
|
+
* A 601: keep the control queues' cursors (forward only) for the pull that will use them, and name any
|
|
858
|
+
* control this client has no handler for, once, instead of letting it pass unseen (X4).
|
|
859
|
+
*/
|
|
860
|
+
function noteControls(frame) {
|
|
861
|
+
const d = frame.data;
|
|
862
|
+
if (!d) return;
|
|
863
|
+
try {
|
|
864
|
+
for (const { queueName, id } of controlCursorsOf(d)) advance(queueName, { id, ts: now() });
|
|
865
|
+
for (const c of readControls(d)) {
|
|
866
|
+
if (c.handled) continue;
|
|
867
|
+
const key = `${c.actType}/${c.act}`;
|
|
868
|
+
if (unhandled.has(key)) continue;
|
|
869
|
+
unhandled.add(key);
|
|
870
|
+
say(`a control this client has no handler for: act_type "${c.actType}", act "${c.act}"`);
|
|
871
|
+
}
|
|
872
|
+
} catch (e) {
|
|
873
|
+
say(`could not read a control frame: ${e?.message || e}`);
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
/** The server re-sends a message it noticed we never confirmed: store it, then acknowledge it. */
|
|
878
|
+
function noteMissedPush(frame) {
|
|
879
|
+
const d = frame.data;
|
|
880
|
+
if (!d) return;
|
|
881
|
+
try {
|
|
882
|
+
const api = getApi?.();
|
|
883
|
+
const ownId = String(api?.getOwnId?.() ?? api?.getContext?.()?.uid ?? "");
|
|
884
|
+
const kinds = [
|
|
885
|
+
{ queueName: "510_1", rows: "msgs", threadType: 0 },
|
|
886
|
+
{ queueName: "511_1", rows: "groupMsgs", threadType: THREAD_GROUP },
|
|
887
|
+
];
|
|
888
|
+
const added = [];
|
|
889
|
+
for (const kind of kinds) {
|
|
890
|
+
const rows = Array.isArray(d[kind.rows]) ? d[kind.rows] : [];
|
|
891
|
+
if (!rows.length) continue;
|
|
892
|
+
const s = storeRows(kind, rows, ownId, "0");
|
|
893
|
+
added.push(...s.added);
|
|
894
|
+
if (s.newest) advance(kind.queueName, s.newest);
|
|
895
|
+
const ids = idsOf(d.queueStatus, kind.queueName);
|
|
896
|
+
if (verifier && s.failed === 0 && ids.length) verifier.confirm(kind.queueName, ids);
|
|
897
|
+
}
|
|
898
|
+
if (added.length) {
|
|
899
|
+
say(`Zalo re-sent ${added.length} message(s) it noticed this client never confirmed; stored`);
|
|
900
|
+
onRecovered(added);
|
|
901
|
+
}
|
|
902
|
+
} catch (e) {
|
|
903
|
+
say(`could not store a re-sent message: ${e?.message || e}`);
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
/** A 534 frame: note its message ids before the listener announces them (the tap sees a frame first). */
|
|
908
|
+
function noteRepushIds(frame) {
|
|
909
|
+
const d = frame.data;
|
|
910
|
+
if (!d) return;
|
|
911
|
+
for (const key of ["msgs", "groupMsgs", "pageMsgs"]) {
|
|
912
|
+
for (const row of Array.isArray(d[key]) ? d[key] : []) {
|
|
913
|
+
if (!isId(row?.msgId)) continue;
|
|
914
|
+
const id = String(row.msgId);
|
|
915
|
+
repushed.delete(id);
|
|
916
|
+
repushed.add(id);
|
|
917
|
+
if (repushed.size > REPUSH_MAX) repushed.delete(repushed.values().next().value);
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
/**
|
|
923
|
+
* True for the `message` event of a message the server re-sent (534) that zalo.db already holds: it was stored
|
|
924
|
+
* and announced already (live, or by the re-push handling above), so the daemon must not announce it again. A
|
|
925
|
+
* re-sent message that is not stored yet is false: the daemon announces and stores it as a live one. Each id
|
|
926
|
+
* answers true once.
|
|
927
|
+
*/
|
|
928
|
+
function isRepeatedRepush(msg) {
|
|
929
|
+
const id = msg?.data?.msgId;
|
|
930
|
+
if (!isId(id) || !repushed.has(String(id))) return false;
|
|
931
|
+
repushed.delete(String(id));
|
|
932
|
+
try {
|
|
933
|
+
return !!getMessageById(String(id));
|
|
934
|
+
} catch {
|
|
935
|
+
return false;
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
if (tap) tap.on(CMD_PUSH_MISS, noteRepushIds);
|
|
498
940
|
if (enabled && tap) {
|
|
499
|
-
tap.on(CMD_AUTHEN, () =>
|
|
941
|
+
tap.on(CMD_AUTHEN, () => {
|
|
942
|
+
// A new connection: what was waiting to be acknowledged belonged to the old one. Nothing is acknowledged
|
|
943
|
+
// until this connection's catch-up is over (`verify_on_done_offline`).
|
|
944
|
+
verifier?.reset();
|
|
945
|
+
verifier?.hold();
|
|
946
|
+
awaiting.length = 0;
|
|
947
|
+
trigger("connect");
|
|
948
|
+
});
|
|
500
949
|
for (const cmd of PUSH_QUEUE.keys()) tap.on(cmd, noteEnvelope);
|
|
950
|
+
tap.on(CMD_CONTROL, noteControls);
|
|
951
|
+
if (verifier) {
|
|
952
|
+
tap.on(CMD_VERIFY, (frame) => verifier.handleReply(frame));
|
|
953
|
+
tap.on(CMD_PUSH_MISS, noteMissedPush);
|
|
954
|
+
}
|
|
501
955
|
}
|
|
502
956
|
|
|
503
957
|
return {
|
|
@@ -514,9 +968,14 @@ export function createSelfHeal({
|
|
|
514
968
|
return lastResult;
|
|
515
969
|
},
|
|
516
970
|
settled() {
|
|
517
|
-
return running
|
|
971
|
+
return Promise.all([running ?? Promise.resolve(), overflowRun]).then(() => {});
|
|
518
972
|
},
|
|
519
973
|
noteDelivered,
|
|
974
|
+
isRepeatedRepush,
|
|
520
975
|
cursor: (queueName) => readCursor(queueName),
|
|
976
|
+
/** The queue acknowledgements so far, or null when they are off. */
|
|
977
|
+
queueAcks: () => verifier?.stats() ?? null,
|
|
978
|
+
/** Send the pending acknowledgements now (a test and shutdown seam). */
|
|
979
|
+
flushAcks: () => verifier?.flush() ?? 0,
|
|
521
980
|
};
|
|
522
981
|
}
|