@ardennguyen/zalo-agent-cli 2.5.9 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +23 -2
- package/DISCLAIMER.md +3 -3
- package/LICENSE +2 -3
- package/NOTICE +14 -34
- package/README.md +166 -72
- package/package.json +37 -19
- package/src/commands/account.js +369 -40
- package/src/commands/auto-reply.js +8 -25
- package/src/commands/bank.js +25 -6
- package/src/commands/catalog.js +54 -11
- package/src/commands/cloud.js +459 -0
- package/src/commands/conv.js +470 -287
- package/src/commands/db.js +442 -0
- package/src/commands/fleet.js +449 -41
- package/src/commands/friend.js +198 -45
- package/src/commands/group.js +256 -43
- package/src/commands/label.js +16 -2
- package/src/commands/listen.js +495 -122
- package/src/commands/login.js +313 -117
- package/src/commands/mcp-approver.js +103 -0
- package/src/commands/mcp-webhook.js +13 -5
- package/src/commands/mcp.js +800 -104
- package/src/commands/msg-media.js +187 -0
- package/src/commands/msg-search.js +219 -0
- package/src/commands/msg.js +414 -110
- package/src/commands/oa/calls.js +134 -0
- package/src/commands/oa/content.js +266 -0
- package/src/commands/oa/gmf.js +429 -0
- package/src/commands/oa/messages.js +355 -0
- package/src/commands/oa/users.js +502 -0
- package/src/commands/oa-init.js +122 -123
- package/src/commands/oa-listen.js +374 -150
- package/src/commands/oa.js +83 -598
- package/src/commands/policy.js +224 -0
- package/src/commands/poll.js +3 -0
- package/src/commands/presence.js +175 -0
- package/src/commands/profile.js +45 -94
- package/src/commands/quick-msg.js +26 -0
- package/src/commands/read.js +172 -0
- package/src/commands/reminder.js +34 -4
- package/src/commands/social.js +223 -0
- package/src/commands/sync.js +482 -158
- package/src/commands/write.js +85 -0
- package/src/commands/zbs.js +502 -0
- package/src/core/account-devices.js +76 -0
- package/src/core/account-state.js +167 -0
- package/src/core/account-status.js +355 -0
- package/src/core/accounts.js +11 -4
- package/src/core/admin-api.js +392 -0
- package/src/core/approval.js +271 -0
- package/src/core/auto-reply.js +27 -0
- package/src/core/bank-accounts.js +1 -1
- package/src/core/block-sharing.js +43 -0
- package/src/core/board-pass.js +94 -0
- package/src/core/cached-message.js +78 -8
- package/src/core/cloud-plan.js +285 -0
- package/src/core/cloud-verify.js +305 -0
- package/src/core/confirm-guard.js +808 -0
- package/src/core/contact-names.js +504 -0
- package/src/core/control-events.js +525 -0
- package/src/core/control-replay.js +106 -0
- package/src/core/conversation-actions.js +214 -0
- package/src/core/credentials.js +112 -11
- package/src/core/current-user-names.js +60 -26
- package/src/core/daemon-channel.js +296 -15
- package/src/core/daemon-health.js +110 -7
- package/src/core/daemon-presence.js +455 -0
- package/src/core/daemon-sync.js +58 -18
- package/src/core/data-export.js +610 -0
- package/src/core/db-tools.js +473 -0
- package/src/core/db.js +1327 -83
- package/src/core/deploy-policy.js +560 -0
- package/src/core/device-since.js +123 -0
- package/src/core/e2ee-notice.js +41 -0
- package/src/core/exit-codes.js +7 -0
- package/src/core/export-crypt.js +290 -0
- package/src/core/fleet-controller.js +340 -0
- package/src/core/fleet-purge.js +144 -0
- package/src/core/fleet-qr.js +273 -0
- package/src/core/fleet-serve.js +292 -0
- package/src/core/fleet-supervisor.js +176 -0
- package/src/core/fleet-templates.js +568 -39
- package/src/core/fleet.js +232 -20
- package/src/core/friend-requests.js +80 -16
- package/src/core/friend-search.js +1 -1
- package/src/core/group-admin.js +2 -29
- package/src/core/group-departure.js +233 -0
- package/src/core/group-exit.js +621 -0
- package/src/core/group-members.js +21 -9
- package/src/core/group-settings.js +5 -207
- package/src/core/hidden-chat-actions.js +96 -0
- package/src/core/hidden-chats.js +425 -0
- package/src/core/history-fetch.js +81 -27
- package/src/core/keystore/config.js +163 -0
- package/src/core/keystore/container.js +208 -0
- package/src/core/keystore/index.js +483 -0
- package/src/core/keystore/keyring.js +588 -0
- package/src/core/keystore/kms.js +157 -0
- package/src/core/keystore/media-seal.js +711 -0
- package/src/core/keystore/providers.js +492 -0
- package/src/core/keystore/stores.js +177 -0
- package/src/core/keystore/worker.js +80 -0
- package/src/core/kick-marker.js +61 -0
- package/src/core/last-online.js +236 -0
- package/src/core/list-all.js +280 -0
- package/src/core/listener-lifecycle.js +101 -10
- package/src/core/live-api.js +1 -1
- package/src/core/live-store.js +111 -53
- package/src/core/local-reads.js +16 -0
- package/src/core/logout.js +102 -140
- package/src/core/media-deliver.js +732 -0
- package/src/core/media-route.js +347 -0
- package/src/core/media-store.js +408 -0
- package/src/core/mutual-groups.js +94 -0
- package/src/core/name-refresh.js +135 -0
- package/src/core/oa/calls.js +212 -0
- package/src/core/oa/content.js +390 -0
- package/src/core/oa/gmf.js +537 -0
- package/src/core/oa/messages.js +470 -0
- package/src/core/oa/oauth.js +422 -0
- package/src/core/oa/transport.js +645 -0
- package/src/core/oa/users.js +694 -0
- package/src/core/oa-client.js +49 -415
- package/src/core/overflow-repair.js +221 -0
- package/src/core/policy-layer.js +55 -0
- package/src/core/policy-schema.js +401 -0
- package/src/core/policy-store.js +1058 -0
- package/src/core/presence-config.js +100 -0
- package/src/core/presence-leases.js +211 -0
- package/src/core/presence.js +688 -0
- package/src/core/profile-settings.js +243 -0
- package/src/core/qr-login-flow.js +237 -0
- package/src/core/read-state.js +145 -22
- package/src/core/receipts.js +355 -548
- package/src/core/recent-conversations.js +28 -6
- package/src/core/row-mac.js +405 -0
- package/src/core/search.js +271 -0
- package/src/core/secure-page.js +771 -0
- package/src/core/self-heal.js +493 -34
- package/src/core/session-expiry.js +103 -0
- package/src/core/session-notice.js +249 -0
- package/src/core/social/client.js +296 -0
- package/src/core/social/dpop.js +54 -0
- package/src/core/socket-host.js +437 -0
- package/src/core/sqlite.js +520 -0
- package/src/core/startup-gate.js +49 -5
- package/src/core/storage-quota.js +796 -0
- package/src/core/sync-action.js +180 -0
- package/src/core/sync-v2/auto-sync.js +356 -0
- package/src/core/sync-v2/board.js +130 -92
- package/src/core/sync-v2/conv-state.js +21 -4
- package/src/core/sync-v2/gap-advice.js +2 -3
- package/src/core/sync-v2/index.js +739 -323
- package/src/core/sync-v2/media.js +116 -27
- package/src/core/sync-v2/plan.js +16 -2
- package/src/core/sync-v2/ranges.js +98 -0
- package/src/core/sync-v2/reactions.js +12 -196
- package/src/core/sync-v2/senders.js +32 -14
- package/src/core/sync-v2/zcloud.js +177 -579
- package/src/core/sync.js +23 -21
- package/src/core/test-fake-session.js +87 -0
- package/src/core/typing.js +78 -0
- package/src/core/unknown-acts.js +240 -0
- package/src/core/voice-text.js +171 -0
- package/src/core/webhook-outbox.js +110 -12
- package/src/core/zalo-client.js +147 -188
- package/src/core/zbs/api.js +505 -0
- package/src/core/zbs/image.js +85 -0
- package/src/core/zbs/phone.js +59 -0
- package/src/core/zbs/rsa.js +129 -0
- package/src/core/zbs/template-check.js +449 -0
- package/src/index.js +60 -10
- package/src/mcp/action-tool.js +188 -0
- package/src/mcp/actions-business.js +488 -0
- package/src/mcp/actions-conversation.js +633 -0
- package/src/mcp/actions-media.js +268 -0
- package/src/mcp/actions-profile.js +281 -0
- package/src/mcp/actions-social.js +518 -0
- package/src/mcp/instructions.js +19 -5
- package/src/mcp/mcp-config.js +112 -10
- package/src/mcp/mcp-http-transport.js +162 -25
- package/src/mcp/mcp-server.js +14 -3
- package/src/mcp/mcp-tools.js +1686 -384
- package/src/mcp/message-buffer.js +58 -12
- package/src/mcp/notifier.js +1 -1
- package/src/mcp/official-tool.js +298 -0
- package/src/mcp/sync-jobs.js +7 -1
- package/src/mcp/sync-stages.js +72 -0
- package/src/mcp/thread-name-cache.js +43 -5
- package/src/mcp/tool-presence.js +153 -0
- package/src/mcp/wait-batch.js +27 -0
- package/src/mcp/wait-result.js +19 -21
- package/src/utils/bank-helpers.js +52 -1
- package/src/utils/cli-args.js +12 -12
- package/src/utils/date-range.js +50 -0
- package/src/utils/hidden-access.js +141 -0
- package/src/utils/interrupt.js +37 -0
- package/src/utils/json-input.js +41 -0
- package/src/utils/list-replies.js +60 -0
- package/src/utils/my-documents.js +2 -3
- package/src/utils/output.js +66 -2
- package/src/utils/qr-display.js +14 -8
- package/src/utils/qr-http-server.js +674 -134
- package/src/utils/quote.js +8 -8
- package/src/utils/secret-input.js +57 -0
- package/src/utils/vn-text.js +72 -0
- package/src/zalo/README.md +46 -0
- package/src/zalo/anomaly-store.js +49 -0
- package/src/zalo/api/actions.js +670 -0
- package/src/zalo/api/boards.js +1036 -0
- package/src/zalo/api/business.js +662 -0
- package/src/zalo/api/conversations.js +329 -0
- package/src/zalo/api/groups.js +631 -0
- package/src/zalo/api/messages.js +695 -0
- package/src/zalo/api/people.js +711 -0
- package/src/zalo/api/profile.js +374 -0
- package/src/zalo/api/session.js +45 -0
- package/src/zalo/api/upload.js +976 -0
- package/src/zalo/api.js +117 -0
- package/src/zalo/client.js +206 -0
- package/src/zalo/custom/forward.js +199 -0
- package/src/zalo/custom/gid.js +123 -0
- package/src/zalo/custom/group-history.js +246 -0
- package/src/zalo/custom/group-invite.js +53 -0
- package/src/zalo/custom/group-settings.js +186 -0
- package/src/zalo/custom/group-visibility.js +71 -0
- package/src/zalo/custom/pin.js +220 -0
- package/src/zalo/custom/renewlink.js +115 -0
- package/src/zalo/device-fingerprint.js +33 -0
- package/src/zalo/download-fetch.js +45 -0
- package/src/zalo/enums.js +25 -0
- package/src/zalo/errors.js +195 -0
- package/src/zalo/format/mentions.js +140 -0
- package/src/zalo/format/split-message.js +222 -0
- package/src/zalo/format/urgency.js +29 -0
- package/src/zalo/headers.js +93 -0
- package/src/zalo/index.js +72 -0
- package/src/zalo/kernel/atomic-file.js +217 -0
- package/src/zalo/kernel/bound.js +46 -0
- package/src/zalo/kernel/cipher.js +88 -0
- package/src/zalo/kernel/cookies.js +125 -0
- package/src/zalo/kernel/endpoint.js +211 -0
- package/src/zalo/kernel/http.js +360 -0
- package/src/zalo/kernel/json-ids.js +118 -0
- package/src/zalo/kernel/login-cipher.js +165 -0
- package/src/zalo/kernel/secret-file.js +45 -0
- package/src/zalo/kernel/session.js +261 -0
- package/src/zalo/kernel/zcloud-cipher.js +83 -0
- package/src/zalo/kickout.js +136 -0
- package/src/zalo/listener/dispatch.js +404 -0
- package/src/zalo/listener/frames.js +222 -0
- package/src/zalo/listener/friend-events.js +113 -0
- package/src/zalo/listener/group-events.js +117 -0
- package/src/zalo/listener/keepalive.js +191 -0
- package/src/zalo/listener/listener.js +469 -0
- package/src/zalo/listener/models.js +220 -0
- package/src/zalo/listener/reactions.js +224 -0
- package/src/zalo/listener/socket-tap.js +228 -0
- package/src/zalo/login.js +387 -0
- package/src/zalo/logout.js +192 -0
- package/src/zalo/maintenance.js +183 -0
- package/src/zalo/official-logout.js +254 -0
- package/src/zalo/paging.js +114 -0
- package/src/zalo/profile.js +184 -0
- package/src/zalo/pulls.js +129 -0
- package/src/zalo/qr-image.js +90 -0
- package/src/zalo/qr-login.js +494 -0
- package/src/zalo/queues/control-queue.js +193 -0
- package/src/zalo/queues/offline-queue.js +275 -0
- package/src/zalo/queues/queue-verify.js +306 -0
- package/src/zalo/reads.js +723 -0
- package/src/zalo/receipts.js +550 -0
- package/src/zalo/req-id.js +24 -0
- package/src/zalo/retry.js +343 -0
- package/src/zalo/session-call.js +55 -0
- package/src/zalo/socket.js +762 -0
- package/src/zalo/transfer-sync/assets.js +181 -0
- package/src/zalo/transfer-sync/channel.js +459 -0
- package/src/zalo/transfer-sync/download.js +161 -0
- package/src/zalo/transfer-sync/message-types.js +520 -0
- package/src/zalo/transfer-sync/transfer.js +468 -0
- package/src/zalo/trust-store.js +99 -0
- package/src/zalo/trust-wasm.js +393 -0
- package/src/zalo/upkeep.js +127 -0
- package/src/zalo/web-call.js +103 -0
- package/src/zalo/writes.js +704 -0
- package/src/zalo/zcloud-e2ee.js +214 -0
- package/src/zalo/zcloud.js +802 -0
- package/node_modules/asynckit/LICENSE +0 -21
- package/node_modules/asynckit/README.md +0 -233
- package/node_modules/asynckit/bench.js +0 -76
- package/node_modules/asynckit/index.js +0 -6
- package/node_modules/asynckit/lib/abort.js +0 -29
- package/node_modules/asynckit/lib/async.js +0 -34
- package/node_modules/asynckit/lib/defer.js +0 -26
- package/node_modules/asynckit/lib/iterate.js +0 -75
- package/node_modules/asynckit/lib/readable_asynckit.js +0 -91
- package/node_modules/asynckit/lib/readable_parallel.js +0 -25
- package/node_modules/asynckit/lib/readable_serial.js +0 -25
- package/node_modules/asynckit/lib/readable_serial_ordered.js +0 -29
- package/node_modules/asynckit/lib/state.js +0 -37
- package/node_modules/asynckit/lib/streamify.js +0 -141
- package/node_modules/asynckit/lib/terminator.js +0 -29
- package/node_modules/asynckit/package.json +0 -63
- package/node_modules/asynckit/parallel.js +0 -43
- package/node_modules/asynckit/serial.js +0 -17
- package/node_modules/asynckit/serialOrdered.js +0 -75
- package/node_modules/asynckit/stream.js +0 -21
- package/node_modules/bignumber.js/CHANGELOG.md +0 -381
- package/node_modules/bignumber.js/LICENCE.md +0 -26
- package/node_modules/bignumber.js/README.md +0 -289
- package/node_modules/bignumber.js/bignumber.d.mts +0 -6
- package/node_modules/bignumber.js/bignumber.d.ts +0 -5
- package/node_modules/bignumber.js/bignumber.js +0 -2922
- package/node_modules/bignumber.js/bignumber.mjs +0 -2907
- package/node_modules/bignumber.js/doc/API.html +0 -2249
- package/node_modules/bignumber.js/package.json +0 -60
- package/node_modules/bignumber.js/types.d.ts +0 -1821
- package/node_modules/call-bind-apply-helpers/.eslintrc +0 -17
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +0 -12
- package/node_modules/call-bind-apply-helpers/.nycrc +0 -9
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +0 -30
- package/node_modules/call-bind-apply-helpers/LICENSE +0 -21
- package/node_modules/call-bind-apply-helpers/README.md +0 -62
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +0 -1
- package/node_modules/call-bind-apply-helpers/actualApply.js +0 -10
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +0 -19
- package/node_modules/call-bind-apply-helpers/applyBind.js +0 -10
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +0 -1
- package/node_modules/call-bind-apply-helpers/functionApply.js +0 -4
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +0 -1
- package/node_modules/call-bind-apply-helpers/functionCall.js +0 -4
- package/node_modules/call-bind-apply-helpers/index.d.ts +0 -64
- package/node_modules/call-bind-apply-helpers/index.js +0 -15
- package/node_modules/call-bind-apply-helpers/package.json +0 -85
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +0 -3
- package/node_modules/call-bind-apply-helpers/reflectApply.js +0 -4
- package/node_modules/call-bind-apply-helpers/test/index.js +0 -63
- package/node_modules/call-bind-apply-helpers/tsconfig.json +0 -9
- package/node_modules/combined-stream/License +0 -19
- package/node_modules/combined-stream/Readme.md +0 -138
- package/node_modules/combined-stream/lib/combined_stream.js +0 -208
- package/node_modules/combined-stream/package.json +0 -25
- package/node_modules/crypto-js/CONTRIBUTING.md +0 -28
- package/node_modules/crypto-js/LICENSE +0 -24
- package/node_modules/crypto-js/README.md +0 -275
- package/node_modules/crypto-js/aes.js +0 -234
- package/node_modules/crypto-js/blowfish.js +0 -471
- package/node_modules/crypto-js/bower.json +0 -39
- package/node_modules/crypto-js/cipher-core.js +0 -895
- package/node_modules/crypto-js/core.js +0 -807
- package/node_modules/crypto-js/crypto-js.js +0 -6657
- package/node_modules/crypto-js/docs/QuickStartGuide.wiki +0 -470
- package/node_modules/crypto-js/enc-base64.js +0 -136
- package/node_modules/crypto-js/enc-base64url.js +0 -148
- package/node_modules/crypto-js/enc-hex.js +0 -18
- package/node_modules/crypto-js/enc-latin1.js +0 -18
- package/node_modules/crypto-js/enc-utf16.js +0 -149
- package/node_modules/crypto-js/enc-utf8.js +0 -18
- package/node_modules/crypto-js/evpkdf.js +0 -134
- package/node_modules/crypto-js/format-hex.js +0 -66
- package/node_modules/crypto-js/format-openssl.js +0 -18
- package/node_modules/crypto-js/hmac-md5.js +0 -18
- package/node_modules/crypto-js/hmac-ripemd160.js +0 -18
- package/node_modules/crypto-js/hmac-sha1.js +0 -18
- package/node_modules/crypto-js/hmac-sha224.js +0 -18
- package/node_modules/crypto-js/hmac-sha256.js +0 -18
- package/node_modules/crypto-js/hmac-sha3.js +0 -18
- package/node_modules/crypto-js/hmac-sha384.js +0 -18
- package/node_modules/crypto-js/hmac-sha512.js +0 -18
- package/node_modules/crypto-js/hmac.js +0 -143
- package/node_modules/crypto-js/index.js +0 -18
- package/node_modules/crypto-js/lib-typedarrays.js +0 -76
- package/node_modules/crypto-js/md5.js +0 -268
- package/node_modules/crypto-js/mode-cfb.js +0 -80
- package/node_modules/crypto-js/mode-ctr-gladman.js +0 -116
- package/node_modules/crypto-js/mode-ctr.js +0 -58
- package/node_modules/crypto-js/mode-ecb.js +0 -40
- package/node_modules/crypto-js/mode-ofb.js +0 -54
- package/node_modules/crypto-js/package.json +0 -42
- package/node_modules/crypto-js/pad-ansix923.js +0 -49
- package/node_modules/crypto-js/pad-iso10126.js +0 -44
- package/node_modules/crypto-js/pad-iso97971.js +0 -40
- package/node_modules/crypto-js/pad-nopadding.js +0 -30
- package/node_modules/crypto-js/pad-pkcs7.js +0 -18
- package/node_modules/crypto-js/pad-zeropadding.js +0 -47
- package/node_modules/crypto-js/pbkdf2.js +0 -145
- package/node_modules/crypto-js/rabbit-legacy.js +0 -190
- package/node_modules/crypto-js/rabbit.js +0 -192
- package/node_modules/crypto-js/rc4.js +0 -139
- package/node_modules/crypto-js/ripemd160.js +0 -267
- package/node_modules/crypto-js/sha1.js +0 -150
- package/node_modules/crypto-js/sha224.js +0 -80
- package/node_modules/crypto-js/sha256.js +0 -199
- package/node_modules/crypto-js/sha3.js +0 -326
- package/node_modules/crypto-js/sha384.js +0 -83
- package/node_modules/crypto-js/sha512.js +0 -326
- package/node_modules/crypto-js/tripledes.js +0 -779
- package/node_modules/crypto-js/x64-core.js +0 -304
- package/node_modules/delayed-stream/.npmignore +0 -1
- package/node_modules/delayed-stream/License +0 -19
- package/node_modules/delayed-stream/Makefile +0 -7
- package/node_modules/delayed-stream/Readme.md +0 -141
- package/node_modules/delayed-stream/lib/delayed_stream.js +0 -107
- package/node_modules/delayed-stream/package.json +0 -27
- package/node_modules/dunder-proto/.eslintrc +0 -5
- package/node_modules/dunder-proto/.github/FUNDING.yml +0 -12
- package/node_modules/dunder-proto/.nycrc +0 -13
- package/node_modules/dunder-proto/CHANGELOG.md +0 -24
- package/node_modules/dunder-proto/LICENSE +0 -21
- package/node_modules/dunder-proto/README.md +0 -54
- package/node_modules/dunder-proto/get.d.ts +0 -5
- package/node_modules/dunder-proto/get.js +0 -30
- package/node_modules/dunder-proto/package.json +0 -76
- package/node_modules/dunder-proto/set.d.ts +0 -5
- package/node_modules/dunder-proto/set.js +0 -35
- package/node_modules/dunder-proto/test/get.js +0 -34
- package/node_modules/dunder-proto/test/index.js +0 -4
- package/node_modules/dunder-proto/test/set.js +0 -50
- package/node_modules/dunder-proto/tsconfig.json +0 -9
- package/node_modules/es-define-property/.eslintrc +0 -13
- package/node_modules/es-define-property/.github/FUNDING.yml +0 -12
- package/node_modules/es-define-property/.nycrc +0 -9
- package/node_modules/es-define-property/CHANGELOG.md +0 -29
- package/node_modules/es-define-property/LICENSE +0 -21
- package/node_modules/es-define-property/README.md +0 -49
- package/node_modules/es-define-property/index.d.ts +0 -3
- package/node_modules/es-define-property/index.js +0 -14
- package/node_modules/es-define-property/package.json +0 -81
- package/node_modules/es-define-property/test/index.js +0 -56
- package/node_modules/es-define-property/tsconfig.json +0 -10
- package/node_modules/es-errors/.eslintrc +0 -5
- package/node_modules/es-errors/.github/FUNDING.yml +0 -12
- package/node_modules/es-errors/CHANGELOG.md +0 -40
- package/node_modules/es-errors/LICENSE +0 -21
- package/node_modules/es-errors/README.md +0 -55
- package/node_modules/es-errors/eval.d.ts +0 -3
- package/node_modules/es-errors/eval.js +0 -4
- package/node_modules/es-errors/index.d.ts +0 -3
- package/node_modules/es-errors/index.js +0 -4
- package/node_modules/es-errors/package.json +0 -80
- package/node_modules/es-errors/range.d.ts +0 -3
- package/node_modules/es-errors/range.js +0 -4
- package/node_modules/es-errors/ref.d.ts +0 -3
- package/node_modules/es-errors/ref.js +0 -4
- package/node_modules/es-errors/syntax.d.ts +0 -3
- package/node_modules/es-errors/syntax.js +0 -4
- package/node_modules/es-errors/test/index.js +0 -19
- package/node_modules/es-errors/tsconfig.json +0 -49
- package/node_modules/es-errors/type.d.ts +0 -3
- package/node_modules/es-errors/type.js +0 -4
- package/node_modules/es-errors/uri.d.ts +0 -3
- package/node_modules/es-errors/uri.js +0 -4
- package/node_modules/es-object-atoms/.eslintrc +0 -16
- package/node_modules/es-object-atoms/.github/FUNDING.yml +0 -12
- package/node_modules/es-object-atoms/CHANGELOG.md +0 -44
- package/node_modules/es-object-atoms/LICENSE +0 -21
- package/node_modules/es-object-atoms/README.md +0 -63
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +0 -3
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +0 -11
- package/node_modules/es-object-atoms/ToObject.d.ts +0 -7
- package/node_modules/es-object-atoms/ToObject.js +0 -10
- package/node_modules/es-object-atoms/index.d.ts +0 -3
- package/node_modules/es-object-atoms/index.js +0 -4
- package/node_modules/es-object-atoms/isObject.d.ts +0 -3
- package/node_modules/es-object-atoms/isObject.js +0 -6
- package/node_modules/es-object-atoms/package.json +0 -79
- package/node_modules/es-object-atoms/test/index.js +0 -38
- package/node_modules/es-object-atoms/tsconfig.json +0 -7
- package/node_modules/es-set-tostringtag/.eslintrc +0 -13
- package/node_modules/es-set-tostringtag/.nycrc +0 -9
- package/node_modules/es-set-tostringtag/CHANGELOG.md +0 -67
- package/node_modules/es-set-tostringtag/LICENSE +0 -21
- package/node_modules/es-set-tostringtag/README.md +0 -53
- package/node_modules/es-set-tostringtag/index.d.ts +0 -10
- package/node_modules/es-set-tostringtag/index.js +0 -35
- package/node_modules/es-set-tostringtag/package.json +0 -78
- package/node_modules/es-set-tostringtag/test/index.js +0 -85
- package/node_modules/es-set-tostringtag/tsconfig.json +0 -9
- package/node_modules/form-data/CHANGELOG.md +0 -686
- package/node_modules/form-data/License +0 -19
- package/node_modules/form-data/README.md +0 -355
- package/node_modules/form-data/index.d.ts +0 -62
- package/node_modules/form-data/lib/browser.js +0 -4
- package/node_modules/form-data/lib/form_data.js +0 -506
- package/node_modules/form-data/lib/populate.js +0 -10
- package/node_modules/form-data/node_modules/mime-db/HISTORY.md +0 -507
- package/node_modules/form-data/node_modules/mime-db/LICENSE +0 -23
- package/node_modules/form-data/node_modules/mime-db/README.md +0 -100
- package/node_modules/form-data/node_modules/mime-db/db.json +0 -8519
- package/node_modules/form-data/node_modules/mime-db/index.js +0 -12
- package/node_modules/form-data/node_modules/mime-db/package.json +0 -60
- package/node_modules/form-data/node_modules/mime-types/HISTORY.md +0 -397
- package/node_modules/form-data/node_modules/mime-types/LICENSE +0 -23
- package/node_modules/form-data/node_modules/mime-types/README.md +0 -113
- package/node_modules/form-data/node_modules/mime-types/index.js +0 -188
- package/node_modules/form-data/node_modules/mime-types/package.json +0 -44
- package/node_modules/form-data/package.json +0 -82
- package/node_modules/function-bind/.eslintrc +0 -21
- package/node_modules/function-bind/.github/FUNDING.yml +0 -12
- package/node_modules/function-bind/.github/SECURITY.md +0 -3
- package/node_modules/function-bind/.nycrc +0 -13
- package/node_modules/function-bind/CHANGELOG.md +0 -136
- package/node_modules/function-bind/LICENSE +0 -20
- package/node_modules/function-bind/README.md +0 -46
- package/node_modules/function-bind/implementation.js +0 -84
- package/node_modules/function-bind/index.js +0 -5
- package/node_modules/function-bind/package.json +0 -87
- package/node_modules/function-bind/test/.eslintrc +0 -9
- package/node_modules/function-bind/test/index.js +0 -252
- package/node_modules/get-intrinsic/.eslintrc +0 -42
- package/node_modules/get-intrinsic/.github/FUNDING.yml +0 -12
- package/node_modules/get-intrinsic/.nycrc +0 -9
- package/node_modules/get-intrinsic/CHANGELOG.md +0 -186
- package/node_modules/get-intrinsic/LICENSE +0 -21
- package/node_modules/get-intrinsic/README.md +0 -71
- package/node_modules/get-intrinsic/index.js +0 -378
- package/node_modules/get-intrinsic/package.json +0 -97
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +0 -274
- package/node_modules/get-proto/.eslintrc +0 -10
- package/node_modules/get-proto/.github/FUNDING.yml +0 -12
- package/node_modules/get-proto/.nycrc +0 -9
- package/node_modules/get-proto/CHANGELOG.md +0 -21
- package/node_modules/get-proto/LICENSE +0 -21
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +0 -5
- package/node_modules/get-proto/Object.getPrototypeOf.js +0 -6
- package/node_modules/get-proto/README.md +0 -50
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +0 -3
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +0 -4
- package/node_modules/get-proto/index.d.ts +0 -5
- package/node_modules/get-proto/index.js +0 -27
- package/node_modules/get-proto/package.json +0 -81
- package/node_modules/get-proto/test/index.js +0 -68
- package/node_modules/get-proto/tsconfig.json +0 -9
- package/node_modules/gopd/.eslintrc +0 -16
- package/node_modules/gopd/.github/FUNDING.yml +0 -12
- package/node_modules/gopd/CHANGELOG.md +0 -45
- package/node_modules/gopd/LICENSE +0 -21
- package/node_modules/gopd/README.md +0 -40
- package/node_modules/gopd/gOPD.d.ts +0 -1
- package/node_modules/gopd/gOPD.js +0 -4
- package/node_modules/gopd/index.d.ts +0 -5
- package/node_modules/gopd/index.js +0 -15
- package/node_modules/gopd/package.json +0 -77
- package/node_modules/gopd/test/index.js +0 -36
- package/node_modules/gopd/tsconfig.json +0 -9
- package/node_modules/has-symbols/.eslintrc +0 -11
- package/node_modules/has-symbols/.github/FUNDING.yml +0 -12
- package/node_modules/has-symbols/.nycrc +0 -9
- package/node_modules/has-symbols/CHANGELOG.md +0 -91
- package/node_modules/has-symbols/LICENSE +0 -21
- package/node_modules/has-symbols/README.md +0 -46
- package/node_modules/has-symbols/index.d.ts +0 -3
- package/node_modules/has-symbols/index.js +0 -14
- package/node_modules/has-symbols/package.json +0 -111
- package/node_modules/has-symbols/shams.d.ts +0 -3
- package/node_modules/has-symbols/shams.js +0 -45
- package/node_modules/has-symbols/test/index.js +0 -22
- package/node_modules/has-symbols/test/shams/core-js.js +0 -29
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +0 -29
- package/node_modules/has-symbols/test/tests.js +0 -58
- package/node_modules/has-symbols/tsconfig.json +0 -10
- package/node_modules/has-tostringtag/.eslintrc +0 -5
- package/node_modules/has-tostringtag/.github/FUNDING.yml +0 -12
- package/node_modules/has-tostringtag/.nycrc +0 -13
- package/node_modules/has-tostringtag/CHANGELOG.md +0 -42
- package/node_modules/has-tostringtag/LICENSE +0 -21
- package/node_modules/has-tostringtag/README.md +0 -46
- package/node_modules/has-tostringtag/index.d.ts +0 -3
- package/node_modules/has-tostringtag/index.js +0 -8
- package/node_modules/has-tostringtag/package.json +0 -108
- package/node_modules/has-tostringtag/shams.d.ts +0 -3
- package/node_modules/has-tostringtag/shams.js +0 -8
- package/node_modules/has-tostringtag/test/index.js +0 -21
- package/node_modules/has-tostringtag/test/shams/core-js.js +0 -31
- package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +0 -30
- package/node_modules/has-tostringtag/test/tests.js +0 -15
- package/node_modules/has-tostringtag/tsconfig.json +0 -49
- package/node_modules/hasown/.github/FUNDING.yml +0 -12
- package/node_modules/hasown/.nycrc +0 -13
- package/node_modules/hasown/CHANGELOG.md +0 -58
- package/node_modules/hasown/LICENSE +0 -21
- package/node_modules/hasown/README.md +0 -40
- package/node_modules/hasown/eslint.config.mjs +0 -6
- package/node_modules/hasown/index.d.ts +0 -3
- package/node_modules/hasown/index.js +0 -8
- package/node_modules/hasown/package.json +0 -91
- package/node_modules/hasown/tsconfig.json +0 -6
- package/node_modules/json-bigint/LICENSE +0 -20
- package/node_modules/json-bigint/README.md +0 -240
- package/node_modules/json-bigint/index.js +0 -12
- package/node_modules/json-bigint/lib/parse.js +0 -443
- package/node_modules/json-bigint/lib/stringify.js +0 -384
- package/node_modules/json-bigint/package.json +0 -34
- package/node_modules/math-intrinsics/.eslintrc +0 -16
- package/node_modules/math-intrinsics/.github/FUNDING.yml +0 -12
- package/node_modules/math-intrinsics/CHANGELOG.md +0 -24
- package/node_modules/math-intrinsics/LICENSE +0 -21
- package/node_modules/math-intrinsics/README.md +0 -50
- package/node_modules/math-intrinsics/abs.d.ts +0 -1
- package/node_modules/math-intrinsics/abs.js +0 -4
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +0 -3
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +0 -4
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +0 -3
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +0 -5
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +0 -3
- package/node_modules/math-intrinsics/constants/maxValue.js +0 -5
- package/node_modules/math-intrinsics/floor.d.ts +0 -1
- package/node_modules/math-intrinsics/floor.js +0 -4
- package/node_modules/math-intrinsics/isFinite.d.ts +0 -3
- package/node_modules/math-intrinsics/isFinite.js +0 -12
- package/node_modules/math-intrinsics/isInteger.d.ts +0 -3
- package/node_modules/math-intrinsics/isInteger.js +0 -16
- package/node_modules/math-intrinsics/isNaN.d.ts +0 -1
- package/node_modules/math-intrinsics/isNaN.js +0 -6
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +0 -3
- package/node_modules/math-intrinsics/isNegativeZero.js +0 -6
- package/node_modules/math-intrinsics/max.d.ts +0 -1
- package/node_modules/math-intrinsics/max.js +0 -4
- package/node_modules/math-intrinsics/min.d.ts +0 -1
- package/node_modules/math-intrinsics/min.js +0 -4
- package/node_modules/math-intrinsics/mod.d.ts +0 -3
- package/node_modules/math-intrinsics/mod.js +0 -9
- package/node_modules/math-intrinsics/package.json +0 -86
- package/node_modules/math-intrinsics/pow.d.ts +0 -1
- package/node_modules/math-intrinsics/pow.js +0 -4
- package/node_modules/math-intrinsics/round.d.ts +0 -1
- package/node_modules/math-intrinsics/round.js +0 -4
- package/node_modules/math-intrinsics/sign.d.ts +0 -3
- package/node_modules/math-intrinsics/sign.js +0 -11
- package/node_modules/math-intrinsics/test/index.js +0 -192
- package/node_modules/math-intrinsics/tsconfig.json +0 -3
- package/node_modules/pako/LICENSE +0 -21
- package/node_modules/pako/README.md +0 -155
- package/node_modules/pako/dist/pako.es5.js +0 -6760
- package/node_modules/pako/dist/pako.es5.min.js +0 -2
- package/node_modules/pako/dist/pako.esm.mjs +0 -6945
- package/node_modules/pako/dist/pako.js +0 -6964
- package/node_modules/pako/dist/pako.min.js +0 -2
- package/node_modules/pako/dist/pako_deflate.es5.js +0 -3953
- package/node_modules/pako/dist/pako_deflate.es5.min.js +0 -2
- package/node_modules/pako/dist/pako_deflate.js +0 -4154
- package/node_modules/pako/dist/pako_deflate.min.js +0 -2
- package/node_modules/pako/dist/pako_inflate.es5.js +0 -3272
- package/node_modules/pako/dist/pako_inflate.es5.min.js +0 -2
- package/node_modules/pako/dist/pako_inflate.js +0 -3279
- package/node_modules/pako/dist/pako_inflate.min.js +0 -2
- package/node_modules/pako/index.js +0 -18
- package/node_modules/pako/lib/deflate.js +0 -387
- package/node_modules/pako/lib/inflate.js +0 -456
- package/node_modules/pako/lib/utils/common.js +0 -48
- package/node_modules/pako/lib/utils/strings.js +0 -174
- package/node_modules/pako/lib/zlib/README +0 -59
- package/node_modules/pako/lib/zlib/adler32.js +0 -51
- package/node_modules/pako/lib/zlib/constants.js +0 -68
- package/node_modules/pako/lib/zlib/crc32.js +0 -59
- package/node_modules/pako/lib/zlib/deflate.js +0 -2069
- package/node_modules/pako/lib/zlib/gzheader.js +0 -58
- package/node_modules/pako/lib/zlib/inffast.js +0 -344
- package/node_modules/pako/lib/zlib/inflate.js +0 -1575
- package/node_modules/pako/lib/zlib/inftrees.js +0 -340
- package/node_modules/pako/lib/zlib/messages.js +0 -32
- package/node_modules/pako/lib/zlib/trees.js +0 -1179
- package/node_modules/pako/lib/zlib/zstream.js +0 -47
- package/node_modules/pako/package.json +0 -73
- package/node_modules/semver/LICENSE +0 -15
- package/node_modules/semver/README.md +0 -680
- package/node_modules/semver/bin/semver.js +0 -195
- package/node_modules/semver/classes/comparator.js +0 -143
- package/node_modules/semver/classes/index.js +0 -7
- package/node_modules/semver/classes/range.js +0 -577
- package/node_modules/semver/classes/semver.js +0 -350
- package/node_modules/semver/functions/clean.js +0 -8
- package/node_modules/semver/functions/cmp.js +0 -54
- package/node_modules/semver/functions/coerce.js +0 -62
- package/node_modules/semver/functions/compare-build.js +0 -9
- package/node_modules/semver/functions/compare-loose.js +0 -5
- package/node_modules/semver/functions/compare.js +0 -7
- package/node_modules/semver/functions/diff.js +0 -60
- package/node_modules/semver/functions/eq.js +0 -5
- package/node_modules/semver/functions/gt.js +0 -5
- package/node_modules/semver/functions/gte.js +0 -5
- package/node_modules/semver/functions/inc.js +0 -21
- package/node_modules/semver/functions/lt.js +0 -5
- package/node_modules/semver/functions/lte.js +0 -5
- package/node_modules/semver/functions/major.js +0 -5
- package/node_modules/semver/functions/minor.js +0 -5
- package/node_modules/semver/functions/neq.js +0 -5
- package/node_modules/semver/functions/parse.js +0 -18
- package/node_modules/semver/functions/patch.js +0 -5
- package/node_modules/semver/functions/prerelease.js +0 -8
- package/node_modules/semver/functions/rcompare.js +0 -5
- package/node_modules/semver/functions/rsort.js +0 -5
- package/node_modules/semver/functions/satisfies.js +0 -12
- package/node_modules/semver/functions/sort.js +0 -5
- package/node_modules/semver/functions/truncate.js +0 -48
- package/node_modules/semver/functions/valid.js +0 -8
- package/node_modules/semver/index.js +0 -93
- package/node_modules/semver/internal/constants.js +0 -37
- package/node_modules/semver/internal/debug.js +0 -11
- package/node_modules/semver/internal/identifiers.js +0 -29
- package/node_modules/semver/internal/lrucache.js +0 -42
- package/node_modules/semver/internal/parse-options.js +0 -17
- package/node_modules/semver/internal/re.js +0 -223
- package/node_modules/semver/package.json +0 -78
- package/node_modules/semver/preload.js +0 -4
- package/node_modules/semver/range.bnf +0 -17
- package/node_modules/semver/ranges/gtr.js +0 -6
- package/node_modules/semver/ranges/intersects.js +0 -9
- package/node_modules/semver/ranges/ltr.js +0 -6
- package/node_modules/semver/ranges/max-satisfying.js +0 -27
- package/node_modules/semver/ranges/min-satisfying.js +0 -26
- package/node_modules/semver/ranges/min-version.js +0 -63
- package/node_modules/semver/ranges/outside.js +0 -82
- package/node_modules/semver/ranges/simplify.js +0 -49
- package/node_modules/semver/ranges/subset.js +0 -249
- package/node_modules/semver/ranges/to-comparators.js +0 -10
- package/node_modules/semver/ranges/valid.js +0 -13
- package/node_modules/spark-md5/LICENSE +0 -13
- package/node_modules/spark-md5/README.md +0 -191
- package/node_modules/spark-md5/package.json +0 -35
- package/node_modules/spark-md5/spark-md5.js +0 -751
- package/node_modules/spark-md5/spark-md5.min.js +0 -1
- package/node_modules/tldts/LICENSE +0 -13
- package/node_modules/tldts/README.md +0 -327
- package/node_modules/tldts/bin/cli.js +0 -21
- package/node_modules/tldts/dist/cjs/index.js +0 -666
- package/node_modules/tldts/dist/cjs/index.js.map +0 -1
- package/node_modules/tldts/dist/cjs/src/data/trie.js +0 -14
- package/node_modules/tldts/dist/cjs/src/data/trie.js.map +0 -1
- package/node_modules/tldts/dist/cjs/src/suffix-trie.js +0 -67
- package/node_modules/tldts/dist/cjs/src/suffix-trie.js.map +0 -1
- package/node_modules/tldts/dist/cjs/tsconfig.tsbuildinfo +0 -1
- package/node_modules/tldts/dist/es6/index.js +0 -33
- package/node_modules/tldts/dist/es6/index.js.map +0 -1
- package/node_modules/tldts/dist/es6/src/data/trie.js +0 -11
- package/node_modules/tldts/dist/es6/src/data/trie.js.map +0 -1
- package/node_modules/tldts/dist/es6/src/suffix-trie.js +0 -64
- package/node_modules/tldts/dist/es6/src/suffix-trie.js.map +0 -1
- package/node_modules/tldts/dist/es6/tsconfig.bundle.tsbuildinfo +0 -1
- package/node_modules/tldts/dist/index.cjs.min.js +0 -2
- package/node_modules/tldts/dist/index.cjs.min.js.map +0 -1
- package/node_modules/tldts/dist/index.esm.min.js +0 -2
- package/node_modules/tldts/dist/index.esm.min.js.map +0 -1
- package/node_modules/tldts/dist/index.umd.min.js +0 -2
- package/node_modules/tldts/dist/index.umd.min.js.map +0 -1
- package/node_modules/tldts/dist/types/index.d.ts +0 -7
- package/node_modules/tldts/dist/types/src/data/trie.d.ts +0 -5
- package/node_modules/tldts/dist/types/src/suffix-trie.d.ts +0 -5
- package/node_modules/tldts/index.ts +0 -62
- package/node_modules/tldts/package.json +0 -91
- package/node_modules/tldts/src/data/trie.ts +0 -14
- package/node_modules/tldts/src/suffix-trie.ts +0 -110
- package/node_modules/tldts-core/LICENSE +0 -13
- package/node_modules/tldts-core/README.md +0 -3
- package/node_modules/tldts-core/dist/cjs/index.js +0 -561
- package/node_modules/tldts-core/dist/cjs/index.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/domain-without-suffix.js +0 -15
- package/node_modules/tldts-core/dist/cjs/src/domain-without-suffix.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/domain.js +0 -83
- package/node_modules/tldts-core/dist/cjs/src/domain.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/extract-hostname.js +0 -149
- package/node_modules/tldts-core/dist/cjs/src/extract-hostname.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/factory.js +0 -104
- package/node_modules/tldts-core/dist/cjs/src/factory.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/is-ip.js +0 -72
- package/node_modules/tldts-core/dist/cjs/src/is-ip.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/is-valid.js +0 -69
- package/node_modules/tldts-core/dist/cjs/src/is-valid.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/lookup/fast-path.js +0 -69
- package/node_modules/tldts-core/dist/cjs/src/lookup/fast-path.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/lookup/interface.js +0 -3
- package/node_modules/tldts-core/dist/cjs/src/lookup/interface.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/options.js +0 -22
- package/node_modules/tldts-core/dist/cjs/src/options.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/src/subdomain.js +0 -14
- package/node_modules/tldts-core/dist/cjs/src/subdomain.js.map +0 -1
- package/node_modules/tldts-core/dist/cjs/tsconfig.tsbuildinfo +0 -1
- package/node_modules/tldts-core/dist/es6/index.js +0 -4
- package/node_modules/tldts-core/dist/es6/index.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/domain-without-suffix.js +0 -12
- package/node_modules/tldts-core/dist/es6/src/domain-without-suffix.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/domain.js +0 -80
- package/node_modules/tldts-core/dist/es6/src/domain.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/extract-hostname.js +0 -146
- package/node_modules/tldts-core/dist/es6/src/extract-hostname.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/factory.js +0 -99
- package/node_modules/tldts-core/dist/es6/src/factory.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/is-ip.js +0 -69
- package/node_modules/tldts-core/dist/es6/src/is-ip.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/is-valid.js +0 -66
- package/node_modules/tldts-core/dist/es6/src/is-valid.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/lookup/fast-path.js +0 -66
- package/node_modules/tldts-core/dist/es6/src/lookup/fast-path.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/lookup/interface.js +0 -2
- package/node_modules/tldts-core/dist/es6/src/lookup/interface.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/options.js +0 -19
- package/node_modules/tldts-core/dist/es6/src/options.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/src/subdomain.js +0 -11
- package/node_modules/tldts-core/dist/es6/src/subdomain.js.map +0 -1
- package/node_modules/tldts-core/dist/es6/tsconfig.bundle.tsbuildinfo +0 -1
- package/node_modules/tldts-core/dist/types/index.d.ts +0 -4
- package/node_modules/tldts-core/dist/types/src/domain-without-suffix.d.ts +0 -6
- package/node_modules/tldts-core/dist/types/src/domain.d.ts +0 -5
- package/node_modules/tldts-core/dist/types/src/extract-hostname.d.ts +0 -5
- package/node_modules/tldts-core/dist/types/src/factory.d.ts +0 -28
- package/node_modules/tldts-core/dist/types/src/is-ip.d.ts +0 -6
- package/node_modules/tldts-core/dist/types/src/is-valid.d.ts +0 -15
- package/node_modules/tldts-core/dist/types/src/lookup/fast-path.d.ts +0 -2
- package/node_modules/tldts-core/dist/types/src/lookup/interface.d.ts +0 -9
- package/node_modules/tldts-core/dist/types/src/options.d.ts +0 -10
- package/node_modules/tldts-core/dist/types/src/subdomain.d.ts +0 -4
- package/node_modules/tldts-core/index.ts +0 -10
- package/node_modules/tldts-core/package.json +0 -68
- package/node_modules/tldts-core/src/domain-without-suffix.ts +0 -14
- package/node_modules/tldts-core/src/domain.ts +0 -100
- package/node_modules/tldts-core/src/extract-hostname.ts +0 -170
- package/node_modules/tldts-core/src/factory.ts +0 -160
- package/node_modules/tldts-core/src/is-ip.ts +0 -87
- package/node_modules/tldts-core/src/is-valid.ts +0 -79
- package/node_modules/tldts-core/src/lookup/fast-path.ts +0 -80
- package/node_modules/tldts-core/src/lookup/interface.ts +0 -10
- package/node_modules/tldts-core/src/options.ts +0 -39
- package/node_modules/tldts-core/src/subdomain.ts +0 -11
- package/node_modules/tough-cookie/LICENSE +0 -12
- package/node_modules/tough-cookie/README.md +0 -154
- package/node_modules/tough-cookie/dist/cookie/canonicalDomain.d.ts +0 -33
- package/node_modules/tough-cookie/dist/cookie/canonicalDomain.js +0 -65
- package/node_modules/tough-cookie/dist/cookie/constants.d.ts +0 -54
- package/node_modules/tough-cookie/dist/cookie/constants.js +0 -38
- package/node_modules/tough-cookie/dist/cookie/cookie.d.ts +0 -326
- package/node_modules/tough-cookie/dist/cookie/cookie.js +0 -831
- package/node_modules/tough-cookie/dist/cookie/cookieCompare.d.ts +0 -58
- package/node_modules/tough-cookie/dist/cookie/cookieCompare.js +0 -84
- package/node_modules/tough-cookie/dist/cookie/cookieJar.d.ts +0 -621
- package/node_modules/tough-cookie/dist/cookie/cookieJar.js +0 -1000
- package/node_modules/tough-cookie/dist/cookie/defaultPath.d.ts +0 -40
- package/node_modules/tough-cookie/dist/cookie/defaultPath.js +0 -60
- package/node_modules/tough-cookie/dist/cookie/domainMatch.d.ts +0 -38
- package/node_modules/tough-cookie/dist/cookie/domainMatch.js +0 -94
- package/node_modules/tough-cookie/dist/cookie/formatDate.d.ts +0 -15
- package/node_modules/tough-cookie/dist/cookie/formatDate.js +0 -20
- package/node_modules/tough-cookie/dist/cookie/index.d.ts +0 -29
- package/node_modules/tough-cookie/dist/cookie/index.js +0 -54
- package/node_modules/tough-cookie/dist/cookie/parseDate.d.ts +0 -103
- package/node_modules/tough-cookie/dist/cookie/parseDate.js +0 -323
- package/node_modules/tough-cookie/dist/cookie/permutePath.d.ts +0 -14
- package/node_modules/tough-cookie/dist/cookie/permutePath.js +0 -32
- package/node_modules/tough-cookie/dist/getPublicSuffix.d.ts +0 -55
- package/node_modules/tough-cookie/dist/getPublicSuffix.js +0 -71
- package/node_modules/tough-cookie/dist/memstore.d.ts +0 -220
- package/node_modules/tough-cookie/dist/memstore.js +0 -187
- package/node_modules/tough-cookie/dist/pathMatch.d.ts +0 -17
- package/node_modules/tough-cookie/dist/pathMatch.js +0 -40
- package/node_modules/tough-cookie/dist/permuteDomain.d.ts +0 -15
- package/node_modules/tough-cookie/dist/permuteDomain.js +0 -44
- package/node_modules/tough-cookie/dist/store.d.ts +0 -211
- package/node_modules/tough-cookie/dist/store.js +0 -76
- package/node_modules/tough-cookie/dist/utils.d.ts +0 -34
- package/node_modules/tough-cookie/dist/utils.js +0 -99
- package/node_modules/tough-cookie/dist/validators.d.ts +0 -24
- package/node_modules/tough-cookie/dist/validators.js +0 -90
- package/node_modules/tough-cookie/dist/version.d.ts +0 -5
- package/node_modules/tough-cookie/dist/version.js +0 -8
- package/node_modules/tough-cookie/package.json +0 -144
- package/node_modules/ws/LICENSE +0 -20
- package/node_modules/ws/README.md +0 -548
- package/node_modules/ws/browser.js +0 -8
- package/node_modules/ws/index.js +0 -22
- package/node_modules/ws/lib/buffer-util.js +0 -131
- package/node_modules/ws/lib/constants.js +0 -19
- package/node_modules/ws/lib/event-target.js +0 -292
- package/node_modules/ws/lib/extension.js +0 -203
- package/node_modules/ws/lib/limiter.js +0 -55
- package/node_modules/ws/lib/permessage-deflate.js +0 -530
- package/node_modules/ws/lib/receiver.js +0 -743
- package/node_modules/ws/lib/sender.js +0 -607
- package/node_modules/ws/lib/stream.js +0 -161
- package/node_modules/ws/lib/subprotocol.js +0 -62
- package/node_modules/ws/lib/validation.js +0 -152
- package/node_modules/ws/lib/websocket-server.js +0 -562
- package/node_modules/ws/lib/websocket.js +0 -1407
- package/node_modules/ws/package.json +0 -74
- package/node_modules/ws/wrapper.mjs +0 -21
- package/node_modules/zca-js/.prettierrc +0 -5
- package/node_modules/zca-js/CODE_OF_CONDUCT.md +0 -163
- package/node_modules/zca-js/CONTRIBUTING.md +0 -470
- package/node_modules/zca-js/LICENSE +0 -21
- package/node_modules/zca-js/README.md +0 -225
- package/node_modules/zca-js/SECURITY.md +0 -83
- package/node_modules/zca-js/dist/Errors/ZaloApiError.d.ts +0 -4
- package/node_modules/zca-js/dist/Errors/ZaloApiError.js +0 -7
- package/node_modules/zca-js/dist/Errors/ZaloApiLoginQRAborted.d.ts +0 -4
- package/node_modules/zca-js/dist/Errors/ZaloApiLoginQRAborted.js +0 -7
- package/node_modules/zca-js/dist/Errors/ZaloApiLoginQRDeclined.d.ts +0 -4
- package/node_modules/zca-js/dist/Errors/ZaloApiLoginQRDeclined.js +0 -7
- package/node_modules/zca-js/dist/Errors/ZaloApiMissingImageMetadataGetter.d.ts +0 -4
- package/node_modules/zca-js/dist/Errors/ZaloApiMissingImageMetadataGetter.js +0 -7
- package/node_modules/zca-js/dist/Errors/index.d.ts +0 -4
- package/node_modules/zca-js/dist/Errors/index.js +0 -4
- package/node_modules/zca-js/dist/apis/acceptFriendRequest.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/acceptFriendRequest.js +0 -28
- package/node_modules/zca-js/dist/apis/addGroupBlockedMember.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/addGroupBlockedMember.js +0 -28
- package/node_modules/zca-js/dist/apis/addGroupDeputy.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/addGroupDeputy.js +0 -30
- package/node_modules/zca-js/dist/apis/addPollOptions.d.ts +0 -14
- package/node_modules/zca-js/dist/apis/addPollOptions.js +0 -26
- package/node_modules/zca-js/dist/apis/addQuickMessage.d.ts +0 -11
- package/node_modules/zca-js/dist/apis/addQuickMessage.js +0 -60
- package/node_modules/zca-js/dist/apis/addReaction.d.ts +0 -18
- package/node_modules/zca-js/dist/apis/addReaction.js +0 -294
- package/node_modules/zca-js/dist/apis/addUnreadMark.d.ts +0 -8
- package/node_modules/zca-js/dist/apis/addUnreadMark.js +0 -52
- package/node_modules/zca-js/dist/apis/addUserToGroup.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/addUserToGroup.js +0 -34
- package/node_modules/zca-js/dist/apis/blockUser.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/blockUser.js +0 -28
- package/node_modules/zca-js/dist/apis/blockViewFeed.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/blockViewFeed.js +0 -30
- package/node_modules/zca-js/dist/apis/changeAccountAvatar.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/changeAccountAvatar.js +0 -52
- package/node_modules/zca-js/dist/apis/changeFriendAlias.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/changeFriendAlias.js +0 -27
- package/node_modules/zca-js/dist/apis/changeGroupAvatar.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/changeGroupAvatar.js +0 -44
- package/node_modules/zca-js/dist/apis/changeGroupName.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/changeGroupName.js +0 -32
- package/node_modules/zca-js/dist/apis/changeGroupOwner.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/changeGroupOwner.js +0 -30
- package/node_modules/zca-js/dist/apis/createAutoReply.d.ts +0 -14
- package/node_modules/zca-js/dist/apis/createAutoReply.js +0 -37
- package/node_modules/zca-js/dist/apis/createBankAccount.d.ts +0 -8
- package/node_modules/zca-js/dist/apis/createBankAccount.js +0 -32
- package/node_modules/zca-js/dist/apis/createCatalog.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/createCatalog.js +0 -29
- package/node_modules/zca-js/dist/apis/createGroup.d.ts +0 -28
- package/node_modules/zca-js/dist/apis/createGroup.js +0 -43
- package/node_modules/zca-js/dist/apis/createNote.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/createNote.js +0 -47
- package/node_modules/zca-js/dist/apis/createPoll.d.ts +0 -36
- package/node_modules/zca-js/dist/apis/createPoll.js +0 -40
- package/node_modules/zca-js/dist/apis/createProductCatalog.d.ts +0 -23
- package/node_modules/zca-js/dist/apis/createProductCatalog.js +0 -50
- package/node_modules/zca-js/dist/apis/createReminder.d.ts +0 -12
- package/node_modules/zca-js/dist/apis/createReminder.js +0 -63
- package/node_modules/zca-js/dist/apis/custom.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/custom.js +0 -15
- package/node_modules/zca-js/dist/apis/deleteAutoReply.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/deleteAutoReply.js +0 -29
- package/node_modules/zca-js/dist/apis/deleteAvatar.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/deleteAvatar.js +0 -27
- package/node_modules/zca-js/dist/apis/deleteBankAccount.d.ts +0 -11
- package/node_modules/zca-js/dist/apis/deleteBankAccount.js +0 -32
- package/node_modules/zca-js/dist/apis/deleteCatalog.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/deleteCatalog.js +0 -28
- package/node_modules/zca-js/dist/apis/deleteChat.d.ts +0 -19
- package/node_modules/zca-js/dist/apis/deleteChat.js +0 -50
- package/node_modules/zca-js/dist/apis/deleteGroupInviteBox.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/deleteGroupInviteBox.js +0 -27
- package/node_modules/zca-js/dist/apis/deleteMessage.d.ts +0 -14
- package/node_modules/zca-js/dist/apis/deleteMessage.js +0 -52
- package/node_modules/zca-js/dist/apis/deleteProductCatalog.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/deleteProductCatalog.js +0 -31
- package/node_modules/zca-js/dist/apis/disableGroupLink.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/disableGroupLink.js +0 -24
- package/node_modules/zca-js/dist/apis/disperseGroup.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/disperseGroup.js +0 -28
- package/node_modules/zca-js/dist/apis/editNote.d.ts +0 -17
- package/node_modules/zca-js/dist/apis/editNote.js +0 -46
- package/node_modules/zca-js/dist/apis/editReminder.d.ts +0 -13
- package/node_modules/zca-js/dist/apis/editReminder.js +0 -61
- package/node_modules/zca-js/dist/apis/enableGroupLink.d.ts +0 -6
- package/node_modules/zca-js/dist/apis/enableGroupLink.js +0 -25
- package/node_modules/zca-js/dist/apis/fetchAccountInfo.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/fetchAccountInfo.js +0 -10
- package/node_modules/zca-js/dist/apis/findUser.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/findUser.js +0 -42
- package/node_modules/zca-js/dist/apis/findUserByUsername.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/findUserByUsername.js +0 -27
- package/node_modules/zca-js/dist/apis/forwardMessage.d.ts +0 -24
- package/node_modules/zca-js/dist/apis/forwardMessage.js +0 -114
- package/node_modules/zca-js/dist/apis/getAliasList.d.ts +0 -8
- package/node_modules/zca-js/dist/apis/getAliasList.js +0 -27
- package/node_modules/zca-js/dist/apis/getAllFriends.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/getAllFriends.js +0 -34
- package/node_modules/zca-js/dist/apis/getAllGroups.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/getAllGroups.js +0 -10
- package/node_modules/zca-js/dist/apis/getArchivedChatList.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/getArchivedChatList.js +0 -23
- package/node_modules/zca-js/dist/apis/getAutoDeleteChat.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/getAutoDeleteChat.js +0 -21
- package/node_modules/zca-js/dist/apis/getAutoReplyList.d.ts +0 -6
- package/node_modules/zca-js/dist/apis/getAutoReplyList.js +0 -24
- package/node_modules/zca-js/dist/apis/getAvatarList.d.ts +0 -12
- package/node_modules/zca-js/dist/apis/getAvatarList.js +0 -28
- package/node_modules/zca-js/dist/apis/getAvatarUrlProfile.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/getAvatarUrlProfile.js +0 -30
- package/node_modules/zca-js/dist/apis/getBizAccount.d.ts +0 -24
- package/node_modules/zca-js/dist/apis/getBizAccount.js +0 -27
- package/node_modules/zca-js/dist/apis/getCatalogList.d.ts +0 -18
- package/node_modules/zca-js/dist/apis/getCatalogList.js +0 -32
- package/node_modules/zca-js/dist/apis/getCloseFriends.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/getCloseFriends.js +0 -20
- package/node_modules/zca-js/dist/apis/getContext.d.ts +0 -1
- package/node_modules/zca-js/dist/apis/getContext.js +0 -4
- package/node_modules/zca-js/dist/apis/getCookie.d.ts +0 -1
- package/node_modules/zca-js/dist/apis/getCookie.js +0 -9
- package/node_modules/zca-js/dist/apis/getFriendBoardList.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/getFriendBoardList.js +0 -26
- package/node_modules/zca-js/dist/apis/getFriendOnlines.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/getFriendOnlines.js +0 -35
- package/node_modules/zca-js/dist/apis/getFriendRecommendations.d.ts +0 -42
- package/node_modules/zca-js/dist/apis/getFriendRecommendations.js +0 -27
- package/node_modules/zca-js/dist/apis/getFriendRequestStatus.d.ts +0 -8
- package/node_modules/zca-js/dist/apis/getFriendRequestStatus.js +0 -25
- package/node_modules/zca-js/dist/apis/getFullAvatar.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/getFullAvatar.js +0 -25
- package/node_modules/zca-js/dist/apis/getGroupBlockedMember.d.ts +0 -23
- package/node_modules/zca-js/dist/apis/getGroupBlockedMember.js +0 -29
- package/node_modules/zca-js/dist/apis/getGroupChatHistory.d.ts +0 -8
- package/node_modules/zca-js/dist/apis/getGroupChatHistory.js +0 -36
- package/node_modules/zca-js/dist/apis/getGroupInfo.d.ts +0 -16
- package/node_modules/zca-js/dist/apis/getGroupInfo.js +0 -32
- package/node_modules/zca-js/dist/apis/getGroupInviteBoxInfo.d.ts +0 -32
- package/node_modules/zca-js/dist/apis/getGroupInviteBoxInfo.js +0 -38
- package/node_modules/zca-js/dist/apis/getGroupInviteBoxList.d.ts +0 -38
- package/node_modules/zca-js/dist/apis/getGroupInviteBoxList.js +0 -31
- package/node_modules/zca-js/dist/apis/getGroupLinkDetail.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/getGroupLinkDetail.js +0 -25
- package/node_modules/zca-js/dist/apis/getGroupLinkInfo.d.ts +0 -34
- package/node_modules/zca-js/dist/apis/getGroupLinkInfo.js +0 -28
- package/node_modules/zca-js/dist/apis/getGroupMembersInfo.d.ts +0 -17
- package/node_modules/zca-js/dist/apis/getGroupMembersInfo.js +0 -24
- package/node_modules/zca-js/dist/apis/getHiddenConversations.d.ts +0 -11
- package/node_modules/zca-js/dist/apis/getHiddenConversations.js +0 -23
- package/node_modules/zca-js/dist/apis/getLabels.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/getLabels.js +0 -28
- package/node_modules/zca-js/dist/apis/getListBank.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/getListBank.js +0 -20
- package/node_modules/zca-js/dist/apis/getListBankAccount.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/getListBankAccount.js +0 -27
- package/node_modules/zca-js/dist/apis/getListBoard.d.ts +0 -21
- package/node_modules/zca-js/dist/apis/getListBoard.js +0 -45
- package/node_modules/zca-js/dist/apis/getListDevice.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/getListDevice.js +0 -22
- package/node_modules/zca-js/dist/apis/getListReminder.d.ts +0 -28
- package/node_modules/zca-js/dist/apis/getListReminder.js +0 -47
- package/node_modules/zca-js/dist/apis/getMultiUsersByPhones.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/getMultiUsersByPhones.js +0 -39
- package/node_modules/zca-js/dist/apis/getMute.d.ts +0 -13
- package/node_modules/zca-js/dist/apis/getMute.js +0 -22
- package/node_modules/zca-js/dist/apis/getOwnId.d.ts +0 -1
- package/node_modules/zca-js/dist/apis/getOwnId.js +0 -4
- package/node_modules/zca-js/dist/apis/getPendingGroupMembers.d.ts +0 -11
- package/node_modules/zca-js/dist/apis/getPendingGroupMembers.js +0 -27
- package/node_modules/zca-js/dist/apis/getPinConversations.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/getPinConversations.js +0 -22
- package/node_modules/zca-js/dist/apis/getPollDetail.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/getPollDetail.js +0 -30
- package/node_modules/zca-js/dist/apis/getProductCatalogList.d.ts +0 -20
- package/node_modules/zca-js/dist/apis/getProductCatalogList.js +0 -33
- package/node_modules/zca-js/dist/apis/getQR.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/getQR.js +0 -29
- package/node_modules/zca-js/dist/apis/getQuickMessageList.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/getQuickMessageList.js +0 -24
- package/node_modules/zca-js/dist/apis/getRelatedFriendGroup.d.ts +0 -6
- package/node_modules/zca-js/dist/apis/getRelatedFriendGroup.js +0 -30
- package/node_modules/zca-js/dist/apis/getReminder.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/getReminder.js +0 -25
- package/node_modules/zca-js/dist/apis/getReminderResponses.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/getReminderResponses.js +0 -24
- package/node_modules/zca-js/dist/apis/getSentFriendRequest.d.ts +0 -18
- package/node_modules/zca-js/dist/apis/getSentFriendRequest.js +0 -24
- package/node_modules/zca-js/dist/apis/getSettings.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/getSettings.js +0 -20
- package/node_modules/zca-js/dist/apis/getStickerCategoryDetail.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/getStickerCategoryDetail.js +0 -24
- package/node_modules/zca-js/dist/apis/getStickers.d.ts +0 -1
- package/node_modules/zca-js/dist/apis/getStickers.js +0 -40
- package/node_modules/zca-js/dist/apis/getStickersDetail.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/getStickersDetail.js +0 -40
- package/node_modules/zca-js/dist/apis/getUnreadMark.d.ts +0 -14
- package/node_modules/zca-js/dist/apis/getUnreadMark.js +0 -30
- package/node_modules/zca-js/dist/apis/getUserInfo.d.ts +0 -8
- package/node_modules/zca-js/dist/apis/getUserInfo.js +0 -44
- package/node_modules/zca-js/dist/apis/inviteUserToGroups.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/inviteUserToGroups.js +0 -30
- package/node_modules/zca-js/dist/apis/joinGroupInviteBox.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/joinGroupInviteBox.js +0 -25
- package/node_modules/zca-js/dist/apis/joinGroupLink.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/joinGroupLink.js +0 -27
- package/node_modules/zca-js/dist/apis/keepAlive.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/keepAlive.js +0 -22
- package/node_modules/zca-js/dist/apis/lastOnline.d.ts +0 -7
- package/node_modules/zca-js/dist/apis/lastOnline.js +0 -26
- package/node_modules/zca-js/dist/apis/leaveGroup.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/leaveGroup.js +0 -33
- package/node_modules/zca-js/dist/apis/listen.d.ts +0 -102
- package/node_modules/zca-js/dist/apis/listen.js +0 -425
- package/node_modules/zca-js/dist/apis/lockPoll.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/lockPoll.js +0 -28
- package/node_modules/zca-js/dist/apis/login.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/login.js +0 -96
- package/node_modules/zca-js/dist/apis/loginQR.d.ts +0 -71
- package/node_modules/zca-js/dist/apis/loginQR.js +0 -376
- package/node_modules/zca-js/dist/apis/logoutV2.js +0 -79
- package/node_modules/zca-js/dist/apis/lostFocus.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/lostFocus.js +0 -23
- package/node_modules/zca-js/dist/apis/parseLink.d.ts +0 -21
- package/node_modules/zca-js/dist/apis/parseLink.js +0 -27
- package/node_modules/zca-js/dist/apis/registerCatalog.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/registerCatalog.js +0 -27
- package/node_modules/zca-js/dist/apis/rejectFriendRequest.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/rejectFriendRequest.js +0 -27
- package/node_modules/zca-js/dist/apis/removeFriend.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/removeFriend.js +0 -28
- package/node_modules/zca-js/dist/apis/removeFriendAlias.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/removeFriendAlias.js +0 -24
- package/node_modules/zca-js/dist/apis/removeGroupBlockedMember.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/removeGroupBlockedMember.js +0 -28
- package/node_modules/zca-js/dist/apis/removeGroupDeputy.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/removeGroupDeputy.js +0 -30
- package/node_modules/zca-js/dist/apis/removeQuickMessage.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/removeQuickMessage.js +0 -27
- package/node_modules/zca-js/dist/apis/removeReminder.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/removeReminder.js +0 -40
- package/node_modules/zca-js/dist/apis/removeUnreadMark.d.ts +0 -8
- package/node_modules/zca-js/dist/apis/removeUnreadMark.js +0 -50
- package/node_modules/zca-js/dist/apis/removeUserFromGroup.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/removeUserFromGroup.js +0 -34
- package/node_modules/zca-js/dist/apis/resetHiddenConversPin.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/resetHiddenConversPin.js +0 -20
- package/node_modules/zca-js/dist/apis/reuseAvatar.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/reuseAvatar.js +0 -26
- package/node_modules/zca-js/dist/apis/reviewPendingMemberRequest.d.ts +0 -14
- package/node_modules/zca-js/dist/apis/reviewPendingMemberRequest.js +0 -38
- package/node_modules/zca-js/dist/apis/scanURL.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/scanURL.js +0 -28
- package/node_modules/zca-js/dist/apis/searchSticker.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/searchSticker.js +0 -28
- package/node_modules/zca-js/dist/apis/sendBankCard.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/sendBankCard.js +0 -53
- package/node_modules/zca-js/dist/apis/sendCard.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/sendCard.js +0 -75
- package/node_modules/zca-js/dist/apis/sendDeliveredEvent.d.ts +0 -16
- package/node_modules/zca-js/dist/apis/sendDeliveredEvent.js +0 -55
- package/node_modules/zca-js/dist/apis/sendFriendRequest.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/sendFriendRequest.js +0 -39
- package/node_modules/zca-js/dist/apis/sendLink.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/sendLink.js +0 -78
- package/node_modules/zca-js/dist/apis/sendMessage.d.ts +0 -105
- package/node_modules/zca-js/dist/apis/sendMessage.js +0 -486
- package/node_modules/zca-js/dist/apis/sendReport.d.ts +0 -17
- package/node_modules/zca-js/dist/apis/sendReport.js +0 -53
- package/node_modules/zca-js/dist/apis/sendSeenEvent.d.ts +0 -16
- package/node_modules/zca-js/dist/apis/sendSeenEvent.js +0 -63
- package/node_modules/zca-js/dist/apis/sendSticker.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/sendSticker.js +0 -74
- package/node_modules/zca-js/dist/apis/sendTypingEvent.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/sendTypingEvent.js +0 -33
- package/node_modules/zca-js/dist/apis/sendVideo.d.ts +0 -35
- package/node_modules/zca-js/dist/apis/sendVideo.js +0 -134
- package/node_modules/zca-js/dist/apis/sendVoice.d.ts +0 -12
- package/node_modules/zca-js/dist/apis/sendVoice.js +0 -89
- package/node_modules/zca-js/dist/apis/setHiddenConversations.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/setHiddenConversations.js +0 -39
- package/node_modules/zca-js/dist/apis/setMute.d.ts +0 -20
- package/node_modules/zca-js/dist/apis/setMute.js +0 -67
- package/node_modules/zca-js/dist/apis/setPinnedConversations.d.ts +0 -3
- package/node_modules/zca-js/dist/apis/setPinnedConversations.js +0 -34
- package/node_modules/zca-js/dist/apis/sharePoll.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/sharePoll.js +0 -28
- package/node_modules/zca-js/dist/apis/unblockUser.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/unblockUser.js +0 -28
- package/node_modules/zca-js/dist/apis/undo.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/undo.js +0 -42
- package/node_modules/zca-js/dist/apis/undoFriendRequest.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/undoFriendRequest.js +0 -27
- package/node_modules/zca-js/dist/apis/updateActiveStatus.d.ts +0 -4
- package/node_modules/zca-js/dist/apis/updateActiveStatus.js +0 -27
- package/node_modules/zca-js/dist/apis/updateArchivedChatList.d.ts +0 -10
- package/node_modules/zca-js/dist/apis/updateArchivedChatList.js +0 -34
- package/node_modules/zca-js/dist/apis/updateAutoDeleteChat.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/updateAutoDeleteChat.js +0 -40
- package/node_modules/zca-js/dist/apis/updateAutoReply.d.ts +0 -15
- package/node_modules/zca-js/dist/apis/updateAutoReply.js +0 -38
- package/node_modules/zca-js/dist/apis/updateBankAccount.d.ts +0 -9
- package/node_modules/zca-js/dist/apis/updateBankAccount.js +0 -31
- package/node_modules/zca-js/dist/apis/updateCatalog.d.ts +0 -11
- package/node_modules/zca-js/dist/apis/updateCatalog.js +0 -30
- package/node_modules/zca-js/dist/apis/updateGroupSettings.d.ts +0 -40
- package/node_modules/zca-js/dist/apis/updateGroupSettings.js +0 -43
- package/node_modules/zca-js/dist/apis/updateHiddenConversPin.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/updateHiddenConversPin.js +0 -30
- package/node_modules/zca-js/dist/apis/updateLabels.d.ts +0 -15
- package/node_modules/zca-js/dist/apis/updateLabels.js +0 -34
- package/node_modules/zca-js/dist/apis/updateLang.d.ts +0 -6
- package/node_modules/zca-js/dist/apis/updateLang.js +0 -30
- package/node_modules/zca-js/dist/apis/updateProductCatalog.d.ts +0 -25
- package/node_modules/zca-js/dist/apis/updateProductCatalog.js +0 -51
- package/node_modules/zca-js/dist/apis/updateProfile.d.ts +0 -20
- package/node_modules/zca-js/dist/apis/updateProfile.js +0 -43
- package/node_modules/zca-js/dist/apis/updateProfileBio.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/updateProfileBio.js +0 -27
- package/node_modules/zca-js/dist/apis/updateQuickMessage.d.ts +0 -11
- package/node_modules/zca-js/dist/apis/updateQuickMessage.js +0 -61
- package/node_modules/zca-js/dist/apis/updateSettings.d.ts +0 -16
- package/node_modules/zca-js/dist/apis/updateSettings.js +0 -90
- package/node_modules/zca-js/dist/apis/upgradeGroupToCommunity.d.ts +0 -2
- package/node_modules/zca-js/dist/apis/upgradeGroupToCommunity.js +0 -27
- package/node_modules/zca-js/dist/apis/uploadAttachment.d.ts +0 -50
- package/node_modules/zca-js/dist/apis/uploadAttachment.js +0 -197
- package/node_modules/zca-js/dist/apis/uploadProductPhoto.d.ts +0 -14
- package/node_modules/zca-js/dist/apis/uploadProductPhoto.js +0 -50
- package/node_modules/zca-js/dist/apis/votePoll.d.ts +0 -5
- package/node_modules/zca-js/dist/apis/votePoll.js +0 -29
- package/node_modules/zca-js/dist/apis.d.ts +0 -317
- package/node_modules/zca-js/dist/apis.js +0 -319
- package/node_modules/zca-js/dist/cjs/Errors/ZaloApiError.cjs +0 -11
- package/node_modules/zca-js/dist/cjs/Errors/ZaloApiLoginQRAborted.cjs +0 -12
- package/node_modules/zca-js/dist/cjs/Errors/ZaloApiLoginQRDeclined.cjs +0 -12
- package/node_modules/zca-js/dist/cjs/Errors/ZaloApiMissingImageMetadataGetter.cjs +0 -12
- package/node_modules/zca-js/dist/cjs/apis/acceptFriendRequest.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/addGroupBlockedMember.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/addGroupDeputy.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/addPollOptions.cjs +0 -31
- package/node_modules/zca-js/dist/cjs/apis/addQuickMessage.cjs +0 -65
- package/node_modules/zca-js/dist/cjs/apis/addReaction.cjs +0 -308
- package/node_modules/zca-js/dist/cjs/apis/addUnreadMark.cjs +0 -66
- package/node_modules/zca-js/dist/cjs/apis/addUserToGroup.cjs +0 -39
- package/node_modules/zca-js/dist/cjs/apis/blockUser.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/blockViewFeed.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/changeAccountAvatar.cjs +0 -57
- package/node_modules/zca-js/dist/cjs/apis/changeFriendAlias.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/changeGroupAvatar.cjs +0 -49
- package/node_modules/zca-js/dist/cjs/apis/changeGroupName.cjs +0 -37
- package/node_modules/zca-js/dist/cjs/apis/changeGroupOwner.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/createAutoReply.cjs +0 -42
- package/node_modules/zca-js/dist/cjs/apis/createBankAccount.cjs +0 -37
- package/node_modules/zca-js/dist/cjs/apis/createCatalog.cjs +0 -34
- package/node_modules/zca-js/dist/cjs/apis/createGroup.cjs +0 -48
- package/node_modules/zca-js/dist/cjs/apis/createNote.cjs +0 -52
- package/node_modules/zca-js/dist/cjs/apis/createPoll.cjs +0 -45
- package/node_modules/zca-js/dist/cjs/apis/createProductCatalog.cjs +0 -55
- package/node_modules/zca-js/dist/cjs/apis/createReminder.cjs +0 -77
- package/node_modules/zca-js/dist/cjs/apis/custom.cjs +0 -19
- package/node_modules/zca-js/dist/cjs/apis/deleteAutoReply.cjs +0 -34
- package/node_modules/zca-js/dist/cjs/apis/deleteAvatar.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/deleteBankAccount.cjs +0 -37
- package/node_modules/zca-js/dist/cjs/apis/deleteCatalog.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/deleteChat.cjs +0 -64
- package/node_modules/zca-js/dist/cjs/apis/deleteGroupInviteBox.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/deleteMessage.cjs +0 -66
- package/node_modules/zca-js/dist/cjs/apis/deleteProductCatalog.cjs +0 -36
- package/node_modules/zca-js/dist/cjs/apis/disableGroupLink.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/disperseGroup.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/editNote.cjs +0 -51
- package/node_modules/zca-js/dist/cjs/apis/editReminder.cjs +0 -75
- package/node_modules/zca-js/dist/cjs/apis/enableGroupLink.cjs +0 -30
- package/node_modules/zca-js/dist/cjs/apis/fetchAccountInfo.cjs +0 -15
- package/node_modules/zca-js/dist/cjs/apis/findUser.cjs +0 -56
- package/node_modules/zca-js/dist/cjs/apis/findUserByUsername.cjs +0 -41
- package/node_modules/zca-js/dist/cjs/apis/forwardMessage.cjs +0 -129
- package/node_modules/zca-js/dist/cjs/apis/getAliasList.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/getAllFriends.cjs +0 -48
- package/node_modules/zca-js/dist/cjs/apis/getAllGroups.cjs +0 -15
- package/node_modules/zca-js/dist/cjs/apis/getArchivedChatList.cjs +0 -28
- package/node_modules/zca-js/dist/cjs/apis/getAutoDeleteChat.cjs +0 -26
- package/node_modules/zca-js/dist/cjs/apis/getAutoReplyList.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/getAvatarList.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/getAvatarUrlProfile.cjs +0 -44
- package/node_modules/zca-js/dist/cjs/apis/getBizAccount.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/getCatalogList.cjs +0 -37
- package/node_modules/zca-js/dist/cjs/apis/getCloseFriends.cjs +0 -25
- package/node_modules/zca-js/dist/cjs/apis/getContext.cjs +0 -9
- package/node_modules/zca-js/dist/cjs/apis/getCookie.cjs +0 -14
- package/node_modules/zca-js/dist/cjs/apis/getFriendBoardList.cjs +0 -31
- package/node_modules/zca-js/dist/cjs/apis/getFriendOnlines.cjs +0 -40
- package/node_modules/zca-js/dist/cjs/apis/getFriendRecommendations.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/getFriendRequestStatus.cjs +0 -30
- package/node_modules/zca-js/dist/cjs/apis/getFullAvatar.cjs +0 -30
- package/node_modules/zca-js/dist/cjs/apis/getGroupBlockedMember.cjs +0 -34
- package/node_modules/zca-js/dist/cjs/apis/getGroupChatHistory.cjs +0 -51
- package/node_modules/zca-js/dist/cjs/apis/getGroupInfo.cjs +0 -37
- package/node_modules/zca-js/dist/cjs/apis/getGroupInviteBoxInfo.cjs +0 -43
- package/node_modules/zca-js/dist/cjs/apis/getGroupInviteBoxList.cjs +0 -36
- package/node_modules/zca-js/dist/cjs/apis/getGroupLinkDetail.cjs +0 -30
- package/node_modules/zca-js/dist/cjs/apis/getGroupLinkInfo.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/getGroupMembersInfo.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/getHiddenConversations.cjs +0 -28
- package/node_modules/zca-js/dist/cjs/apis/getLabels.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/getListBank.cjs +0 -25
- package/node_modules/zca-js/dist/cjs/apis/getListBankAccount.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/getListBoard.cjs +0 -59
- package/node_modules/zca-js/dist/cjs/apis/getListDevice.cjs +0 -27
- package/node_modules/zca-js/dist/cjs/apis/getListReminder.cjs +0 -61
- package/node_modules/zca-js/dist/cjs/apis/getMultiUsersByPhones.cjs +0 -53
- package/node_modules/zca-js/dist/cjs/apis/getMute.cjs +0 -27
- package/node_modules/zca-js/dist/cjs/apis/getOwnId.cjs +0 -9
- package/node_modules/zca-js/dist/cjs/apis/getPendingGroupMembers.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/getPinConversations.cjs +0 -27
- package/node_modules/zca-js/dist/cjs/apis/getPollDetail.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/getProductCatalogList.cjs +0 -38
- package/node_modules/zca-js/dist/cjs/apis/getQR.cjs +0 -34
- package/node_modules/zca-js/dist/cjs/apis/getQuickMessageList.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/getRelatedFriendGroup.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/getReminder.cjs +0 -30
- package/node_modules/zca-js/dist/cjs/apis/getReminderResponses.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/getSentFriendRequest.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/getSettings.cjs +0 -25
- package/node_modules/zca-js/dist/cjs/apis/getStickerCategoryDetail.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/getStickers.cjs +0 -45
- package/node_modules/zca-js/dist/cjs/apis/getStickersDetail.cjs +0 -45
- package/node_modules/zca-js/dist/cjs/apis/getUnreadMark.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/getUserInfo.cjs +0 -58
- package/node_modules/zca-js/dist/cjs/apis/inviteUserToGroups.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/joinGroupInviteBox.cjs +0 -30
- package/node_modules/zca-js/dist/cjs/apis/joinGroupLink.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/keepAlive.cjs +0 -27
- package/node_modules/zca-js/dist/cjs/apis/lastOnline.cjs +0 -31
- package/node_modules/zca-js/dist/cjs/apis/leaveGroup.cjs +0 -38
- package/node_modules/zca-js/dist/cjs/apis/listen.cjs +0 -440
- package/node_modules/zca-js/dist/cjs/apis/lockPoll.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/login.cjs +0 -102
- package/node_modules/zca-js/dist/cjs/apis/loginQR.cjs +0 -368
- package/node_modules/zca-js/dist/cjs/apis/logoutV2.cjs +0 -83
- package/node_modules/zca-js/dist/cjs/apis/lostFocus.cjs +0 -28
- package/node_modules/zca-js/dist/cjs/apis/parseLink.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/registerCatalog.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/rejectFriendRequest.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/removeFriend.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/removeFriendAlias.cjs +0 -29
- package/node_modules/zca-js/dist/cjs/apis/removeGroupBlockedMember.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/removeGroupDeputy.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/removeQuickMessage.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/removeReminder.cjs +0 -54
- package/node_modules/zca-js/dist/cjs/apis/removeUnreadMark.cjs +0 -64
- package/node_modules/zca-js/dist/cjs/apis/removeUserFromGroup.cjs +0 -39
- package/node_modules/zca-js/dist/cjs/apis/resetHiddenConversPin.cjs +0 -25
- package/node_modules/zca-js/dist/cjs/apis/reuseAvatar.cjs +0 -31
- package/node_modules/zca-js/dist/cjs/apis/reviewPendingMemberRequest.cjs +0 -43
- package/node_modules/zca-js/dist/cjs/apis/scanURL.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/searchSticker.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/sendBankCard.cjs +0 -68
- package/node_modules/zca-js/dist/cjs/apis/sendCard.cjs +0 -89
- package/node_modules/zca-js/dist/cjs/apis/sendDeliveredEvent.cjs +0 -69
- package/node_modules/zca-js/dist/cjs/apis/sendFriendRequest.cjs +0 -44
- package/node_modules/zca-js/dist/cjs/apis/sendLink.cjs +0 -92
- package/node_modules/zca-js/dist/cjs/apis/sendMessage.cjs +0 -500
- package/node_modules/zca-js/dist/cjs/apis/sendReport.cjs +0 -67
- package/node_modules/zca-js/dist/cjs/apis/sendSeenEvent.cjs +0 -77
- package/node_modules/zca-js/dist/cjs/apis/sendSticker.cjs +0 -88
- package/node_modules/zca-js/dist/cjs/apis/sendTypingEvent.cjs +0 -47
- package/node_modules/zca-js/dist/cjs/apis/sendVideo.cjs +0 -148
- package/node_modules/zca-js/dist/cjs/apis/sendVoice.cjs +0 -103
- package/node_modules/zca-js/dist/cjs/apis/setHiddenConversations.cjs +0 -53
- package/node_modules/zca-js/dist/cjs/apis/setMute.cjs +0 -81
- package/node_modules/zca-js/dist/cjs/apis/setPinnedConversations.cjs +0 -48
- package/node_modules/zca-js/dist/cjs/apis/sharePoll.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/unblockUser.cjs +0 -33
- package/node_modules/zca-js/dist/cjs/apis/undo.cjs +0 -56
- package/node_modules/zca-js/dist/cjs/apis/undoFriendRequest.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/updateActiveStatus.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/updateArchivedChatList.cjs +0 -39
- package/node_modules/zca-js/dist/cjs/apis/updateAutoDeleteChat.cjs +0 -54
- package/node_modules/zca-js/dist/cjs/apis/updateAutoReply.cjs +0 -43
- package/node_modules/zca-js/dist/cjs/apis/updateBankAccount.cjs +0 -36
- package/node_modules/zca-js/dist/cjs/apis/updateCatalog.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/updateGroupSettings.cjs +0 -48
- package/node_modules/zca-js/dist/cjs/apis/updateHiddenConversPin.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/updateLabels.cjs +0 -39
- package/node_modules/zca-js/dist/cjs/apis/updateLang.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/apis/updateProductCatalog.cjs +0 -56
- package/node_modules/zca-js/dist/cjs/apis/updateProfile.cjs +0 -48
- package/node_modules/zca-js/dist/cjs/apis/updateProfileBio.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/updateQuickMessage.cjs +0 -66
- package/node_modules/zca-js/dist/cjs/apis/updateSettings.cjs +0 -95
- package/node_modules/zca-js/dist/cjs/apis/upgradeGroupToCommunity.cjs +0 -32
- package/node_modules/zca-js/dist/cjs/apis/uploadAttachment.cjs +0 -211
- package/node_modules/zca-js/dist/cjs/apis/uploadProductPhoto.cjs +0 -55
- package/node_modules/zca-js/dist/cjs/apis/votePoll.cjs +0 -34
- package/node_modules/zca-js/dist/cjs/apis.cjs +0 -324
- package/node_modules/zca-js/dist/cjs/context.cjs +0 -34
- package/node_modules/zca-js/dist/cjs/index.cjs +0 -159
- package/node_modules/zca-js/dist/cjs/models/AutoReply.cjs +0 -9
- package/node_modules/zca-js/dist/cjs/models/Bank.cjs +0 -263
- package/node_modules/zca-js/dist/cjs/models/Board.cjs +0 -8
- package/node_modules/zca-js/dist/cjs/models/DeliveredMessage.cjs +0 -23
- package/node_modules/zca-js/dist/cjs/models/Enum.cjs +0 -27
- package/node_modules/zca-js/dist/cjs/models/FriendEvent.cjs +0 -87
- package/node_modules/zca-js/dist/cjs/models/Group.cjs +0 -13
- package/node_modules/zca-js/dist/cjs/models/GroupEvent.cjs +0 -94
- package/node_modules/zca-js/dist/cjs/models/Message.cjs +0 -35
- package/node_modules/zca-js/dist/cjs/models/Reaction.cjs +0 -74
- package/node_modules/zca-js/dist/cjs/models/Reminder.cjs +0 -9
- package/node_modules/zca-js/dist/cjs/models/SeenMessage.cjs +0 -23
- package/node_modules/zca-js/dist/cjs/models/Typing.cjs +0 -23
- package/node_modules/zca-js/dist/cjs/models/Undo.cjs +0 -16
- package/node_modules/zca-js/dist/cjs/models/ZBusiness.cjs +0 -39
- package/node_modules/zca-js/dist/cjs/update.cjs +0 -34
- package/node_modules/zca-js/dist/cjs/utils.cjs +0 -703
- package/node_modules/zca-js/dist/cjs/zalo.cjs +0 -112
- package/node_modules/zca-js/dist/context.d.ts +0 -179
- package/node_modules/zca-js/dist/context.js +0 -28
- package/node_modules/zca-js/dist/index.d.ts +0 -166
- package/node_modules/zca-js/dist/index.js +0 -14
- package/node_modules/zca-js/dist/models/Attachment.d.ts +0 -9
- package/node_modules/zca-js/dist/models/Attachment.js +0 -1
- package/node_modules/zca-js/dist/models/AutoReply.d.ts +0 -20
- package/node_modules/zca-js/dist/models/AutoReply.js +0 -7
- package/node_modules/zca-js/dist/models/Bank.d.ts +0 -291
- package/node_modules/zca-js/dist/models/Bank.js +0 -262
- package/node_modules/zca-js/dist/models/Board.d.ts +0 -60
- package/node_modules/zca-js/dist/models/Board.js +0 -6
- package/node_modules/zca-js/dist/models/Catalog.d.ts +0 -16
- package/node_modules/zca-js/dist/models/Catalog.js +0 -1
- package/node_modules/zca-js/dist/models/DeliveredMessage.d.ts +0 -27
- package/node_modules/zca-js/dist/models/DeliveredMessage.js +0 -17
- package/node_modules/zca-js/dist/models/Enum.d.ts +0 -21
- package/node_modules/zca-js/dist/models/Enum.js +0 -25
- package/node_modules/zca-js/dist/models/FriendEvent.d.ts +0 -107
- package/node_modules/zca-js/dist/models/FriendEvent.js +0 -83
- package/node_modules/zca-js/dist/models/Group.d.ts +0 -125
- package/node_modules/zca-js/dist/models/Group.js +0 -11
- package/node_modules/zca-js/dist/models/GroupEvent.d.ts +0 -178
- package/node_modules/zca-js/dist/models/GroupEvent.js +0 -90
- package/node_modules/zca-js/dist/models/Label.d.ts +0 -10
- package/node_modules/zca-js/dist/models/Label.js +0 -1
- package/node_modules/zca-js/dist/models/Message.d.ts +0 -91
- package/node_modules/zca-js/dist/models/Message.js +0 -29
- package/node_modules/zca-js/dist/models/ProductCatalog.d.ts +0 -17
- package/node_modules/zca-js/dist/models/ProductCatalog.js +0 -1
- package/node_modules/zca-js/dist/models/QuickMessage.d.ts +0 -25
- package/node_modules/zca-js/dist/models/QuickMessage.js +0 -1
- package/node_modules/zca-js/dist/models/Reaction.d.ts +0 -85
- package/node_modules/zca-js/dist/models/Reaction.js +0 -70
- package/node_modules/zca-js/dist/models/Reminder.d.ts +0 -51
- package/node_modules/zca-js/dist/models/Reminder.js +0 -7
- package/node_modules/zca-js/dist/models/SeenMessage.d.ts +0 -26
- package/node_modules/zca-js/dist/models/SeenMessage.js +0 -17
- package/node_modules/zca-js/dist/models/Sticker.d.ts +0 -27
- package/node_modules/zca-js/dist/models/Sticker.js +0 -1
- package/node_modules/zca-js/dist/models/Typing.d.ts +0 -24
- package/node_modules/zca-js/dist/models/Typing.js +0 -17
- package/node_modules/zca-js/dist/models/Undo.d.ts +0 -34
- package/node_modules/zca-js/dist/models/Undo.js +0 -12
- package/node_modules/zca-js/dist/models/User.d.ts +0 -70
- package/node_modules/zca-js/dist/models/User.js +0 -1
- package/node_modules/zca-js/dist/models/ZBusiness.d.ts +0 -22
- package/node_modules/zca-js/dist/models/ZBusiness.js +0 -35
- package/node_modules/zca-js/dist/models/index.d.ts +0 -22
- package/node_modules/zca-js/dist/models/index.js +0 -22
- package/node_modules/zca-js/dist/update.d.ts +0 -2
- package/node_modules/zca-js/dist/update.js +0 -29
- package/node_modules/zca-js/dist/utils.d.ts +0 -167
- package/node_modules/zca-js/dist/utils.js +0 -719
- package/node_modules/zca-js/dist/zalo.d.ts +0 -41
- package/node_modules/zca-js/dist/zalo.js +0 -107
- package/node_modules/zca-js/eslint.config.js +0 -21
- package/node_modules/zca-js/index.d.ts +0 -2
- package/node_modules/zca-js/package.json +0 -78
- package/node_modules/zca-js/rollup.config.js +0 -28
- package/patches/zca-js+2.2.0.patch +0 -1445
- package/src/cli.test.js +0 -127
- package/src/core/forward.js +0 -112
- package/src/core/group-history.js +0 -248
- package/src/core/group-invite.js +0 -53
- package/src/core/offline-queue.js +0 -194
- package/src/core/pin.js +0 -222
- package/src/core/socket-tap.js +0 -154
- package/src/core/sync-v2/assets.js +0 -181
- package/src/core/sync-v2/gid.js +0 -106
- package/src/core/sync-v2/keepalive.js +0 -177
- package/src/core/sync-v2/message-types.js +0 -522
- package/src/core/sync-v2/renewlink.js +0 -124
- package/src/core/sync-v2/zcloud-cipher.js +0 -88
- package/src/core/zca-custom.js +0 -78
- package/src/mcp/message-buffer.test.js +0 -360
- package/src/mcp/notifier.test.js +0 -275
- package/src/mcp/thread-filter.test.js +0 -206
- package/src/mcp/thread-name-cache.test.js +0 -142
- package/src/utils/atomic-file.js +0 -209
- package/src/utils/bank-helpers.test.js +0 -66
- package/src/utils/device-fingerprint.js +0 -72
- package/src/utils/mentions.js +0 -140
- package/src/utils/proxy-helpers.test.js +0 -36
- package/src/utils/split-message.js +0 -222
- package/src/utils/urgency.js +0 -29
- /package/src/{core → zalo/custom}/user-info.js +0 -0
- /package/src/{utils → zalo/format}/extract-message-text.js +0 -0
- /package/src/{utils → zalo/format}/markdown.js +0 -0
|
@@ -0,0 +1,1036 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notes, polls and reminders: the board objects of a conversation (agent/docs/zca-replace/spec-boards.md).
|
|
3
|
+
*
|
|
4
|
+
* Every call is one session request on the ordinary envelope (kernel/endpoint.js), shaped the way the server
|
|
5
|
+
* expects it. Where that differs from what the engine sent before:
|
|
6
|
+
*
|
|
7
|
+
* - Polls go to the `group_poll` host, falling back to `group` when the service map has no `group_poll`. Their
|
|
8
|
+
* replies keep `creator` and `voters` as strings.
|
|
9
|
+
* - `getPollDetail` is a GET.
|
|
10
|
+
* - `getListBoard` and the group `getListReminder` take a cursor (`lastId`, `lastType`) for page 2 and later, as the
|
|
11
|
+
* server expects; `boardCursor()` reads it off a page. A reply that is a JSON string of a
|
|
12
|
+
* bare array is read as a list of notes. The group reminder list's `last_id` goes out as a
|
|
13
|
+
* parsed Number, rounded past 2^53: the exact id brings page 1 back again (live, 2026-11-07). A page with the
|
|
14
|
+
* cursor can come back short while more follow, so the pagers stop at an empty page.
|
|
15
|
+
* - A group id loses Zalo's conversation prefix `g` before it goes out.
|
|
16
|
+
* - Reminders are created and edited in Zalo's default colour (-16777216, opaque black) and in the expected key
|
|
17
|
+
* order. The caller's emoji is kept (design 6.1 item 12; Zalo's own apps always send "⏰").
|
|
18
|
+
* - `editReminder` loads the reminder first and sends its current values for every field the caller did not change
|
|
19
|
+
* (a group one through `getReminder`, a DM one from the DM list), as Zalo edits a loaded reminder. Before, an
|
|
20
|
+
* edit without a time moved the reminder to the moment of the edit, and one without a repeat reset it.
|
|
21
|
+
* - `addPollOptions` sends the caller's current votes as `voted_option_ids` (read from the poll first) unless the
|
|
22
|
+
* caller names them: the list is the full selection after the change, so an empty one cleared them. On a
|
|
23
|
+
* single-choice poll, voting a new option drops the old vote, as Zalo does.
|
|
24
|
+
* - Reminder replies keep `topicId`, `reminderId`, `id` and `eventId` as strings; a `params` that arrives as a JSON
|
|
25
|
+
* string is opened into an object.
|
|
26
|
+
* - `lockPoll` takes a success with no `data` as done (only the outer code of `/api/poll/end` is read).
|
|
27
|
+
* - A list call answered with an error whose `data` is the string `"[]"` is an empty page: that answer means
|
|
28
|
+
* "no more".
|
|
29
|
+
* - A DM's reminder replies keep `creatorUid`, `creatorId` and `toUid` as strings too (ours, not Zalo's key list:
|
|
30
|
+
* `editReminder` sends the loaded creator back, and a rounded uid would name somebody else).
|
|
31
|
+
*
|
|
32
|
+
* `listOneOneBoard` (moved here from src/core/sync-v2/board.js) asks a DM's board for every kind of item.
|
|
33
|
+
*
|
|
34
|
+
* Every id stays as the caller gave it, or a string. Nothing here writes to stdout or logs.
|
|
35
|
+
*/
|
|
36
|
+
import { THREAD_TYPE } from "../enums.js";
|
|
37
|
+
import { ZaloApiError } from "../errors.js";
|
|
38
|
+
import { openSession } from "../kernel/cipher.js";
|
|
39
|
+
import { callEndpoint } from "../kernel/endpoint.js";
|
|
40
|
+
import { preParse } from "../kernel/json-ids.js";
|
|
41
|
+
|
|
42
|
+
// ── Constants (spec-boards 0) ───────────────
|
|
43
|
+
|
|
44
|
+
/** The board host of notes, board lists and reminders. */
|
|
45
|
+
export const BOARD_HOST = "group_board";
|
|
46
|
+
|
|
47
|
+
/** The poll host, and the fallback when the service map has no `group_poll`. */
|
|
48
|
+
export const POLL_HOST = Object.freeze(["group_poll", "group"]);
|
|
49
|
+
|
|
50
|
+
/** A topic's default colour: opaque black, `0xFF000000` as an int32. */
|
|
51
|
+
export const TOPIC_COLOR = -16777216;
|
|
52
|
+
|
|
53
|
+
/** A reminder's default emoji. */
|
|
54
|
+
export const REMINDER_EMOJI = "⏰";
|
|
55
|
+
|
|
56
|
+
/** The `src` of a create: the chat bar, as the engine has always sent. */
|
|
57
|
+
export const CREATE_SRC = 1;
|
|
58
|
+
|
|
59
|
+
/** What a board list item is (`boardType`): a note or reminder, a pinned message, a poll. */
|
|
60
|
+
export const BOARD_TYPE = Object.freeze({ ALL: 0, TOPIC: 1, MESSAGE: 2, POLL: 3 });
|
|
61
|
+
|
|
62
|
+
/** The page size asked for. */
|
|
63
|
+
export const PAGE_SIZE = 20;
|
|
64
|
+
|
|
65
|
+
/** The keys quoted in a poll reply, so a 19-digit uid keeps every digit. */
|
|
66
|
+
export const POLL_ID_KEYS = Object.freeze(["creator", "voters"]);
|
|
67
|
+
|
|
68
|
+
/** The keys quoted in a reminder reply. */
|
|
69
|
+
export const REMINDER_ID_KEYS = Object.freeze(["topicId", "reminderId", "id", "eventId"]);
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The keys kept as strings in a DM reminder reply: the reminder ids, and the uids a DM reminder carries, because
|
|
73
|
+
* `editReminder` sends the loaded creator back.
|
|
74
|
+
*/
|
|
75
|
+
export const DM_REMINDER_ID_KEYS = Object.freeze([...REMINDER_ID_KEYS, "creatorUid", "creatorId", "toUid"]);
|
|
76
|
+
|
|
77
|
+
/** The uid lists of a reminder's responses: kept as strings too. */
|
|
78
|
+
export const RESPONSE_ID_KEYS = Object.freeze(["acceptMember", "rejectMember"]);
|
|
79
|
+
|
|
80
|
+
/** How many pages of a DM's reminder list `editReminder` reads to find the one it edits. */
|
|
81
|
+
export const EDIT_LOOKUP_PAGES = 10;
|
|
82
|
+
|
|
83
|
+
/** The message for a thread type that is neither user (0) nor group (1). */
|
|
84
|
+
export const INVALID_THREAD_TYPE = "Thread type is invalid";
|
|
85
|
+
|
|
86
|
+
// ── Small helpers ───────────────────────────────────────────────────────
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* A group id as the wire carries it: Zalo's conversation prefix `g` taken off, always a string.
|
|
90
|
+
*
|
|
91
|
+
* @param {string|number} id - `"g<digits>"` or `"<digits>"`
|
|
92
|
+
* @returns {string}
|
|
93
|
+
*/
|
|
94
|
+
export function bareGroupId(id) {
|
|
95
|
+
const s = String(id ?? "");
|
|
96
|
+
return /^g\d+$/.test(s) ? s.slice(1) : s;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* A thread type as 0 (user) or 1 (group); none means user, as before. Anything else is refused before a request.
|
|
101
|
+
*
|
|
102
|
+
* @param {unknown} type
|
|
103
|
+
* @returns {0|1}
|
|
104
|
+
* @throws {ZaloApiError} "Thread type is invalid"
|
|
105
|
+
*/
|
|
106
|
+
export function threadTypeOf(type) {
|
|
107
|
+
if (type === undefined || type === null) return THREAD_TYPE.USER;
|
|
108
|
+
const n = Number(type);
|
|
109
|
+
if (type !== "" && (n === THREAD_TYPE.USER || n === THREAD_TYPE.GROUP)) return n;
|
|
110
|
+
throw new ZaloApiError(INVALID_THREAD_TYPE);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* A board object's `params` as an object: a JSON string is opened, an object kept, anything else is `{}`.
|
|
115
|
+
*
|
|
116
|
+
* @param {unknown} params
|
|
117
|
+
* @returns {object}
|
|
118
|
+
*/
|
|
119
|
+
export function paramsObject(params) {
|
|
120
|
+
if (params && typeof params === "object") return params;
|
|
121
|
+
if (typeof params === "string" && params) {
|
|
122
|
+
try {
|
|
123
|
+
const v = JSON.parse(params);
|
|
124
|
+
return v && typeof v === "object" ? v : {};
|
|
125
|
+
} catch {
|
|
126
|
+
return {};
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return {};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Open a JSON-string `params` of one board object in place (what the CLI's `params.title` and MCP's results read).
|
|
134
|
+
* A string that is not JSON is left as it came.
|
|
135
|
+
*
|
|
136
|
+
* @param {any} item
|
|
137
|
+
* @returns {any} the same item
|
|
138
|
+
*/
|
|
139
|
+
export function openParams(item) {
|
|
140
|
+
if (item && typeof item === "object" && typeof item.params === "string") {
|
|
141
|
+
try {
|
|
142
|
+
item.params = JSON.parse(item.params);
|
|
143
|
+
} catch {
|
|
144
|
+
/* not JSON: kept as it came */
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return item;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/** A JSON string opened, anything else returned as it came. */
|
|
151
|
+
function maybeJson(data) {
|
|
152
|
+
if (typeof data !== "string") return data;
|
|
153
|
+
try {
|
|
154
|
+
return JSON.parse(data);
|
|
155
|
+
} catch {
|
|
156
|
+
return data;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The cursor of the page after `items`: the id and board type of the last item with a positive id (a poll's id is
|
|
162
|
+
* its `poll_id`). `{lastId: 0, lastType: 0}` when there is none.
|
|
163
|
+
*
|
|
164
|
+
* @param {Array<{boardType?: number, data?: object}>} items
|
|
165
|
+
* @returns {{lastId: number|string, lastType: number}}
|
|
166
|
+
*/
|
|
167
|
+
export function boardCursor(items) {
|
|
168
|
+
let lastId = 0;
|
|
169
|
+
let lastType = 0;
|
|
170
|
+
for (const item of Array.isArray(items) ? items : []) {
|
|
171
|
+
const d = item?.data;
|
|
172
|
+
if (!d) continue;
|
|
173
|
+
const type = Number(item.boardType);
|
|
174
|
+
const id = type === BOARD_TYPE.POLL ? (d.poll_id ?? d.pollId) : d.id;
|
|
175
|
+
if (id !== undefined && id !== null && Number(id) > 0) {
|
|
176
|
+
lastId = id;
|
|
177
|
+
lastType = type;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return { lastId, lastType };
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Open the sealed `data` of a reply whose outer envelope said success, for a call where only the outer code
|
|
185
|
+
* matters: no data at all is a success with nothing to return.
|
|
186
|
+
*
|
|
187
|
+
* @param {object} ctx - the session (`secretKey`)
|
|
188
|
+
* @param {unknown} data - the outer envelope's `data`
|
|
189
|
+
* @param {readonly string[]} keys - id keys to keep as strings
|
|
190
|
+
* @returns {any} the inner `data`, or null
|
|
191
|
+
* @throws {ZaloApiError} for data the session key cannot open, or an inner error (its code on `.code`)
|
|
192
|
+
*/
|
|
193
|
+
export function openOptionalReply(ctx, data, keys) {
|
|
194
|
+
if (data === undefined || data === null || data === "") return null;
|
|
195
|
+
const opened = openSession(ctx?.secretKey, data);
|
|
196
|
+
let inner;
|
|
197
|
+
try {
|
|
198
|
+
if (opened === null) throw new Error("does not open");
|
|
199
|
+
inner = JSON.parse(preParse(opened, keys));
|
|
200
|
+
} catch {
|
|
201
|
+
throw new ZaloApiError("Failed to parse response data");
|
|
202
|
+
}
|
|
203
|
+
const code = inner?.error_code;
|
|
204
|
+
if (code !== undefined && code !== null && Number(code) !== 0) {
|
|
205
|
+
const n = Number(code);
|
|
206
|
+
throw new ZaloApiError(
|
|
207
|
+
inner?.error_message ?? `Zalo answered error ${code}`,
|
|
208
|
+
Number.isFinite(n) ? n : null,
|
|
209
|
+
inner?.data ?? undefined,
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
return inner?.data ?? null;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Whether an error is Zalo's "no more" answer to a list: an error whose `data` is the string `"[]"`, which marks
|
|
217
|
+
* the end of the list.
|
|
218
|
+
*
|
|
219
|
+
* @param {unknown} e
|
|
220
|
+
* @returns {boolean}
|
|
221
|
+
*/
|
|
222
|
+
export function isEndOfList(e) {
|
|
223
|
+
return e instanceof ZaloApiError && e.data === "[]";
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Run a list endpoint. Zalo's "no more" answer ({@link isEndOfList}) is the empty list the endpoint's own reader
|
|
228
|
+
* makes of `"[]"`; every other error is thrown as it came.
|
|
229
|
+
*
|
|
230
|
+
* @param {object} target - a session handle `s`, or the api object
|
|
231
|
+
* @param {object} def - a list definition (its `transform` reads `"[]"` as an empty list)
|
|
232
|
+
* @param {object} args
|
|
233
|
+
* @returns {Promise<any>}
|
|
234
|
+
* @throws {ZaloApiError} Zalo's own error, other than the end of the list
|
|
235
|
+
*/
|
|
236
|
+
export async function callList(target, def, args) {
|
|
237
|
+
try {
|
|
238
|
+
return await callEndpoint(target, def, args);
|
|
239
|
+
} catch (e) {
|
|
240
|
+
if (isEndOfList(e)) return def.transform("[]", args);
|
|
241
|
+
throw e;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// ── Reply readers ───────────────────────────────────────────────────────
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* A topic reply (a note or a group reminder): its `params` opened.
|
|
249
|
+
*
|
|
250
|
+
* @param {any} data
|
|
251
|
+
* @returns {any}
|
|
252
|
+
*/
|
|
253
|
+
export function topicReply(data) {
|
|
254
|
+
return openParams(data);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* A board list reply as `{items: [{boardType, data}], ...}`. An object with `items` keeps every other key; a JSON
|
|
259
|
+
* string of a bare array is a list of notes. Every item but a poll has its `params` opened.
|
|
260
|
+
*
|
|
261
|
+
* @param {any} data
|
|
262
|
+
* @returns {{items: Array<{boardType: number, data: object}>}}
|
|
263
|
+
*/
|
|
264
|
+
export function boardListReply(data) {
|
|
265
|
+
const v = maybeJson(data);
|
|
266
|
+
let out;
|
|
267
|
+
if (Array.isArray(v)) out = { items: v.map((d) => ({ boardType: BOARD_TYPE.TOPIC, data: d })) };
|
|
268
|
+
else if (v && typeof v === "object") out = Array.isArray(v.items) ? v : { ...v, items: [] };
|
|
269
|
+
else out = { items: [] };
|
|
270
|
+
for (const item of out.items) {
|
|
271
|
+
if (Number(item?.boardType) !== BOARD_TYPE.POLL) openParams(item?.data);
|
|
272
|
+
}
|
|
273
|
+
return out;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* A group reminder list read from `/api/board/listReminder`: the reply (a JSON string) is a bare array or
|
|
278
|
+
* `{items: [{boardType, data}]}`; the reminders are the topic items whose `startTime` is a positive number.
|
|
279
|
+
*
|
|
280
|
+
* The page's cursor is read before that filter:
|
|
281
|
+
* the array carries it as a non-enumerable `page` property, `{lastId, size}`, the id (`reminderId`, else `id`) of
|
|
282
|
+
* the page's last topic and how many topics the page held. {@link groupReminderPage} pages with it.
|
|
283
|
+
*
|
|
284
|
+
* @param {any} data
|
|
285
|
+
* @returns {object[]} the reminders, `params` opened
|
|
286
|
+
*/
|
|
287
|
+
export function groupReminderListReply(data) {
|
|
288
|
+
const v = maybeJson(data);
|
|
289
|
+
let entries = [];
|
|
290
|
+
if (Array.isArray(v)) entries = v.map((d) => ({ boardType: BOARD_TYPE.TOPIC, data: d }));
|
|
291
|
+
else if (Array.isArray(v?.items)) entries = v.items;
|
|
292
|
+
const topics = entries.filter((e) => Number(e?.boardType) === BOARD_TYPE.TOPIC && e.data).map((e) => e.data);
|
|
293
|
+
const reminders = topics.filter((d) => typeof d.startTime === "number" && d.startTime > 0).map(openParams);
|
|
294
|
+
const last = topics.at(-1);
|
|
295
|
+
const lastId = last ? (last.reminderId ?? last.id ?? 0) : 0;
|
|
296
|
+
Object.defineProperty(reminders, "page", { value: { lastId, size: topics.length } });
|
|
297
|
+
return reminders;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* A DM reminder list (`/api/board/oneone/list`, board type 1): the reply (a JSON string) is an array of reminders,
|
|
302
|
+
* each with its `reminderId`. An object with `items` is read too.
|
|
303
|
+
*
|
|
304
|
+
* @param {any} data
|
|
305
|
+
* @returns {object[]} the reminders, `params` opened
|
|
306
|
+
*/
|
|
307
|
+
export function dmReminderListReply(data) {
|
|
308
|
+
const v = maybeJson(data);
|
|
309
|
+
let list = [];
|
|
310
|
+
if (Array.isArray(v)) list = v;
|
|
311
|
+
else if (Array.isArray(v?.items)) list = v.items.map((e) => (e && e.data && "boardType" in e ? e.data : e));
|
|
312
|
+
return list.filter((r) => r && typeof r === "object").map(openParams);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* A DM's whole board (`/api/board/oneone/list`, board type 0) as `{items: [{boardType, data}]}`. An item that comes
|
|
317
|
+
* without its board type is a reminder: Zalo files each one as a topic (board type 1) whose `id` is its
|
|
318
|
+
* `reminderId`. Here the item keeps its `reminderId` too.
|
|
319
|
+
*
|
|
320
|
+
* @param {any} data
|
|
321
|
+
* @returns {{items: Array<{boardType: number, data: object}>}}
|
|
322
|
+
*/
|
|
323
|
+
export function dmBoardReply(data) {
|
|
324
|
+
const v = maybeJson(data);
|
|
325
|
+
let list = [];
|
|
326
|
+
if (Array.isArray(v)) list = v;
|
|
327
|
+
else if (Array.isArray(v?.items)) list = v.items;
|
|
328
|
+
else if (Array.isArray(v?.data?.items)) list = v.data.items;
|
|
329
|
+
const items = list
|
|
330
|
+
.filter((e) => e && typeof e === "object")
|
|
331
|
+
.map((e) => {
|
|
332
|
+
if ("boardType" in e && e.data) return e;
|
|
333
|
+
return { boardType: BOARD_TYPE.TOPIC, data: { ...e, id: e.reminderId ?? e.id } };
|
|
334
|
+
});
|
|
335
|
+
for (const item of items) {
|
|
336
|
+
if (Number(item.boardType) !== BOARD_TYPE.POLL) openParams(item.data);
|
|
337
|
+
}
|
|
338
|
+
return { items };
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// ── Endpoint definitions ────────────────────────────────────────────────
|
|
342
|
+
|
|
343
|
+
/** A note's body: `grid, type, color, emoji, startTime, duration, params, ...` with the note's fixed values. */
|
|
344
|
+
const noteHead = (a) => ({
|
|
345
|
+
grid: bareGroupId(a.groupId),
|
|
346
|
+
type: 0,
|
|
347
|
+
color: TOPIC_COLOR,
|
|
348
|
+
emoji: "",
|
|
349
|
+
startTime: -1,
|
|
350
|
+
duration: -1,
|
|
351
|
+
params: JSON.stringify({ title: a.title }),
|
|
352
|
+
});
|
|
353
|
+
|
|
354
|
+
/** `POST {group_board}/api/board/topic/createv2`, a note. */
|
|
355
|
+
export const NOTE_CREATE = Object.freeze({
|
|
356
|
+
host: BOARD_HOST,
|
|
357
|
+
path: "/api/board/topic/createv2",
|
|
358
|
+
cmd: 12007,
|
|
359
|
+
method: "post",
|
|
360
|
+
body: (a, ctx) => ({ ...noteHead(a), repeat: 0, src: CREATE_SRC, imei: ctx.imei, pinAct: a.pin ? 1 : 0 }),
|
|
361
|
+
reply: "session",
|
|
362
|
+
transform: topicReply,
|
|
363
|
+
});
|
|
364
|
+
|
|
365
|
+
/** `POST {group_board}/api/board/topic/updatev2`, a note; `pinAct` 2 leaves the pin as it is. */
|
|
366
|
+
export const NOTE_UPDATE = Object.freeze({
|
|
367
|
+
host: BOARD_HOST,
|
|
368
|
+
path: "/api/board/topic/updatev2",
|
|
369
|
+
cmd: 12008,
|
|
370
|
+
method: "post",
|
|
371
|
+
body: (a, ctx) => ({ ...noteHead(a), topicId: a.topicId, repeat: 0, imei: ctx.imei, pinAct: a.pin ? 1 : 2 }),
|
|
372
|
+
reply: "session",
|
|
373
|
+
transform: topicReply,
|
|
374
|
+
});
|
|
375
|
+
|
|
376
|
+
/** `GET {group_board}/api/board/list`: a group's notes, pinned messages and polls. */
|
|
377
|
+
export const BOARD_LIST = Object.freeze({
|
|
378
|
+
host: BOARD_HOST,
|
|
379
|
+
path: "/api/board/list",
|
|
380
|
+
cmd: 12140,
|
|
381
|
+
method: "get",
|
|
382
|
+
body: (a, ctx) => ({
|
|
383
|
+
group_id: bareGroupId(a.groupId),
|
|
384
|
+
board_type: BOARD_TYPE.ALL,
|
|
385
|
+
page: a.page,
|
|
386
|
+
count: a.count,
|
|
387
|
+
last_id: a.lastId,
|
|
388
|
+
last_type: a.lastType,
|
|
389
|
+
imei: ctx.imei,
|
|
390
|
+
}),
|
|
391
|
+
reply: "session",
|
|
392
|
+
transform: boardListReply,
|
|
393
|
+
});
|
|
394
|
+
|
|
395
|
+
/** `POST {group_poll}/api/poll/create`. */
|
|
396
|
+
export const POLL_CREATE = Object.freeze({
|
|
397
|
+
host: POLL_HOST,
|
|
398
|
+
path: "/api/poll/create",
|
|
399
|
+
cmd: 12080,
|
|
400
|
+
method: "post",
|
|
401
|
+
body: (a, ctx) => ({
|
|
402
|
+
group_id: bareGroupId(a.groupId),
|
|
403
|
+
question: a.question,
|
|
404
|
+
options: a.options,
|
|
405
|
+
expired_time: a.expiredTime,
|
|
406
|
+
pinAct: false,
|
|
407
|
+
allow_multi_choices: a.allowMultiChoices,
|
|
408
|
+
allow_add_new_option: a.allowAddNewOption,
|
|
409
|
+
is_hide_vote_preview: a.hideVotePreview,
|
|
410
|
+
is_anonymous: a.isAnonymous,
|
|
411
|
+
poll_type: 0,
|
|
412
|
+
src: CREATE_SRC,
|
|
413
|
+
imei: ctx.imei,
|
|
414
|
+
}),
|
|
415
|
+
reply: "session",
|
|
416
|
+
bigIdKeys: POLL_ID_KEYS,
|
|
417
|
+
});
|
|
418
|
+
|
|
419
|
+
/** `GET {group_poll}/api/poll/detail`. */
|
|
420
|
+
export const POLL_DETAIL = Object.freeze({
|
|
421
|
+
host: POLL_HOST,
|
|
422
|
+
path: "/api/poll/detail",
|
|
423
|
+
cmd: 12081,
|
|
424
|
+
method: "get",
|
|
425
|
+
body: (a, ctx) => ({ poll_id: a.pollId, imei: ctx.imei }),
|
|
426
|
+
reply: "session",
|
|
427
|
+
bigIdKeys: POLL_ID_KEYS,
|
|
428
|
+
});
|
|
429
|
+
|
|
430
|
+
/** `GET {group_poll}/api/poll/vote`: `option_ids` is the whole selection after the vote; empty removes it. */
|
|
431
|
+
export const POLL_VOTE = Object.freeze({
|
|
432
|
+
host: POLL_HOST,
|
|
433
|
+
path: "/api/poll/vote",
|
|
434
|
+
cmd: 12084,
|
|
435
|
+
method: "get",
|
|
436
|
+
body: (a, ctx) => ({ poll_id: a.pollId, option_ids: a.optionIds, imei: ctx.imei }),
|
|
437
|
+
reply: "session",
|
|
438
|
+
bigIdKeys: POLL_ID_KEYS,
|
|
439
|
+
});
|
|
440
|
+
|
|
441
|
+
/** `POST {group_poll}/api/poll/end`: the reply is read by its outer code; `data` may be absent. */
|
|
442
|
+
export const POLL_LOCK = Object.freeze({
|
|
443
|
+
host: POLL_HOST,
|
|
444
|
+
path: "/api/poll/end",
|
|
445
|
+
cmd: 12089,
|
|
446
|
+
method: "post",
|
|
447
|
+
body: (a, ctx) => ({ poll_id: a.pollId, imei: ctx.imei }),
|
|
448
|
+
reply: "plain",
|
|
449
|
+
});
|
|
450
|
+
|
|
451
|
+
/** `POST {group_poll}/api/poll/share`. */
|
|
452
|
+
export const POLL_SHARE = Object.freeze({
|
|
453
|
+
host: POLL_HOST,
|
|
454
|
+
path: "/api/poll/share",
|
|
455
|
+
cmd: 12085,
|
|
456
|
+
method: "post",
|
|
457
|
+
body: (a, ctx) => ({ poll_id: a.pollId, imei: ctx.imei }),
|
|
458
|
+
reply: "session",
|
|
459
|
+
bigIdKeys: POLL_ID_KEYS,
|
|
460
|
+
});
|
|
461
|
+
|
|
462
|
+
/** `GET {group_poll}/api/poll/option/add`, no imei. */
|
|
463
|
+
export const POLL_ADD_OPTIONS = Object.freeze({
|
|
464
|
+
host: POLL_HOST,
|
|
465
|
+
path: "/api/poll/option/add",
|
|
466
|
+
cmd: 12083,
|
|
467
|
+
method: "get",
|
|
468
|
+
body: (a) => ({ poll_id: a.pollId, new_options: a.newOptions, voted_option_ids: a.votedOptionIds }),
|
|
469
|
+
reply: "session",
|
|
470
|
+
bigIdKeys: POLL_ID_KEYS,
|
|
471
|
+
});
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* A group reminder's topic body, in the expected order:
|
|
475
|
+
* `grid, type, color, emoji, startTime, duration, params, [topicId,] repeat, [src,] imei, pinAct`.
|
|
476
|
+
*/
|
|
477
|
+
function groupReminderBody(a, ctx, { update }) {
|
|
478
|
+
const body = {
|
|
479
|
+
grid: bareGroupId(a.threadId),
|
|
480
|
+
type: 0,
|
|
481
|
+
color: a.color,
|
|
482
|
+
emoji: a.emoji,
|
|
483
|
+
startTime: a.startTime,
|
|
484
|
+
duration: -1,
|
|
485
|
+
params: JSON.stringify(a.params),
|
|
486
|
+
};
|
|
487
|
+
if (update) body.topicId = a.topicId;
|
|
488
|
+
body.repeat = a.repeat;
|
|
489
|
+
if (!update) body.src = CREATE_SRC;
|
|
490
|
+
body.imei = ctx.imei;
|
|
491
|
+
body.pinAct = update ? 2 : 0;
|
|
492
|
+
return body;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* A DM reminder's `objectData`, in the expected order: `toUid, creatorUid, type,
|
|
497
|
+
* color, emoji, startTime, duration, params, needPin, repeat`, then `src` on a create or `reminderId` on an edit.
|
|
498
|
+
*/
|
|
499
|
+
function dmReminderObject(a, { update }) {
|
|
500
|
+
const o = {
|
|
501
|
+
toUid: String(a.threadId),
|
|
502
|
+
creatorUid: a.creatorUid,
|
|
503
|
+
type: 0,
|
|
504
|
+
color: a.color,
|
|
505
|
+
emoji: a.emoji,
|
|
506
|
+
startTime: a.startTime,
|
|
507
|
+
duration: -1,
|
|
508
|
+
params: a.params,
|
|
509
|
+
needPin: false,
|
|
510
|
+
repeat: a.repeat,
|
|
511
|
+
};
|
|
512
|
+
if (update) o.reminderId = a.topicId;
|
|
513
|
+
else o.src = CREATE_SRC;
|
|
514
|
+
return JSON.stringify(o);
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/** `POST {group_board}/api/board/topic/createv2`, a group reminder (a topic with a start time). */
|
|
518
|
+
export const REMINDER_CREATE_GROUP = Object.freeze({
|
|
519
|
+
host: BOARD_HOST,
|
|
520
|
+
path: "/api/board/topic/createv2",
|
|
521
|
+
cmd: 12007,
|
|
522
|
+
method: "post",
|
|
523
|
+
body: (a, ctx) => groupReminderBody(a, ctx, { update: false }),
|
|
524
|
+
reply: "session",
|
|
525
|
+
bigIdKeys: REMINDER_ID_KEYS,
|
|
526
|
+
transform: topicReply,
|
|
527
|
+
});
|
|
528
|
+
|
|
529
|
+
/** `POST {group_board}/api/board/topic/updatev2`, a group reminder, pin left as it is. */
|
|
530
|
+
export const REMINDER_UPDATE_GROUP = Object.freeze({
|
|
531
|
+
host: BOARD_HOST,
|
|
532
|
+
path: "/api/board/topic/updatev2",
|
|
533
|
+
cmd: 12008,
|
|
534
|
+
method: "post",
|
|
535
|
+
body: (a, ctx) => groupReminderBody(a, ctx, { update: true }),
|
|
536
|
+
reply: "session",
|
|
537
|
+
bigIdKeys: REMINDER_ID_KEYS,
|
|
538
|
+
transform: topicReply,
|
|
539
|
+
});
|
|
540
|
+
|
|
541
|
+
/** `POST {group_board}/api/board/oneone/create`: `{objectData, imei}`. */
|
|
542
|
+
export const REMINDER_CREATE_DM = Object.freeze({
|
|
543
|
+
host: BOARD_HOST,
|
|
544
|
+
path: "/api/board/oneone/create",
|
|
545
|
+
cmd: 12429,
|
|
546
|
+
method: "post",
|
|
547
|
+
body: (a, ctx) => ({ objectData: dmReminderObject(a, { update: false }), imei: ctx.imei }),
|
|
548
|
+
reply: "session",
|
|
549
|
+
bigIdKeys: DM_REMINDER_ID_KEYS,
|
|
550
|
+
transform: topicReply,
|
|
551
|
+
});
|
|
552
|
+
|
|
553
|
+
/** `POST {group_board}/api/board/oneone/update`: `{objectData}`, no imei. */
|
|
554
|
+
export const REMINDER_UPDATE_DM = Object.freeze({
|
|
555
|
+
host: BOARD_HOST,
|
|
556
|
+
path: "/api/board/oneone/update",
|
|
557
|
+
cmd: 12430,
|
|
558
|
+
method: "post",
|
|
559
|
+
body: (a) => ({ objectData: dmReminderObject(a, { update: true }) }),
|
|
560
|
+
reply: "session",
|
|
561
|
+
bigIdKeys: DM_REMINDER_ID_KEYS,
|
|
562
|
+
transform: topicReply,
|
|
563
|
+
});
|
|
564
|
+
|
|
565
|
+
/** `POST {group_board}/api/board/topic/remove`. */
|
|
566
|
+
export const REMINDER_REMOVE_GROUP = Object.freeze({
|
|
567
|
+
host: BOARD_HOST,
|
|
568
|
+
path: "/api/board/topic/remove",
|
|
569
|
+
cmd: 12143,
|
|
570
|
+
method: "post",
|
|
571
|
+
body: (a, ctx) => ({ grid: bareGroupId(a.threadId), topicId: a.reminderId, imei: ctx.imei }),
|
|
572
|
+
reply: "session",
|
|
573
|
+
});
|
|
574
|
+
|
|
575
|
+
/** `POST {group_board}/api/board/oneone/remove`: `{uid, reminderId}`, no imei. */
|
|
576
|
+
export const REMINDER_REMOVE_DM = Object.freeze({
|
|
577
|
+
host: BOARD_HOST,
|
|
578
|
+
path: "/api/board/oneone/remove",
|
|
579
|
+
cmd: 12431,
|
|
580
|
+
method: "post",
|
|
581
|
+
body: (a) => ({ uid: a.threadId, reminderId: a.reminderId }),
|
|
582
|
+
reply: "session",
|
|
583
|
+
});
|
|
584
|
+
|
|
585
|
+
/** `GET {group_board}/api/board/topic/getReminder`. */
|
|
586
|
+
export const REMINDER_GET = Object.freeze({
|
|
587
|
+
host: BOARD_HOST,
|
|
588
|
+
path: "/api/board/topic/getReminder",
|
|
589
|
+
cmd: 12088,
|
|
590
|
+
method: "get",
|
|
591
|
+
body: (a, ctx) => ({ eventId: a.reminderId, imei: ctx.imei }),
|
|
592
|
+
reply: "session",
|
|
593
|
+
bigIdKeys: REMINDER_ID_KEYS,
|
|
594
|
+
transform: topicReply,
|
|
595
|
+
});
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* The group reminder list's `last_id` as the server expects it: a JSON number, a parsed Number (the board
|
|
599
|
+
* reply has no big-id pass), so past 2^53 it goes out rounded. Live (2026-11-07), that is what pages correctly: Zalo
|
|
600
|
+
* answers a value that is no reminder's id by page number, while the exact id of the page's last reminder, quoted or
|
|
601
|
+
* bare, brings page 1 back again.
|
|
602
|
+
*
|
|
603
|
+
* @param {number|string} id - the cursor, 0 on page 1
|
|
604
|
+
* @returns {number}
|
|
605
|
+
*/
|
|
606
|
+
function webLastId(id) {
|
|
607
|
+
return typeof id === "string" && /^\d+$/.test(id) ? Number(id) : id;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
/** `GET {group_board}/api/board/listReminder`. */
|
|
611
|
+
export const REMINDER_LIST_GROUP = Object.freeze({
|
|
612
|
+
host: BOARD_HOST,
|
|
613
|
+
path: "/api/board/listReminder",
|
|
614
|
+
cmd: 12425,
|
|
615
|
+
method: "get",
|
|
616
|
+
body: (a, ctx) => ({
|
|
617
|
+
objectData: JSON.stringify({
|
|
618
|
+
group_id: bareGroupId(a.threadId),
|
|
619
|
+
board_type: BOARD_TYPE.TOPIC,
|
|
620
|
+
page: a.page,
|
|
621
|
+
count: a.count,
|
|
622
|
+
last_id: webLastId(a.lastId),
|
|
623
|
+
last_type: 0,
|
|
624
|
+
}),
|
|
625
|
+
imei: ctx.imei,
|
|
626
|
+
}),
|
|
627
|
+
reply: "session",
|
|
628
|
+
bigIdKeys: REMINDER_ID_KEYS,
|
|
629
|
+
transform: groupReminderListReply,
|
|
630
|
+
});
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* `GET {group_board}/api/board/oneone/list`: `{objectData}`, no imei.
|
|
634
|
+
* Board type 1 is the reminders, 0 every kind of item.
|
|
635
|
+
*/
|
|
636
|
+
export const ONEONE_LIST = Object.freeze({
|
|
637
|
+
host: BOARD_HOST,
|
|
638
|
+
path: "/api/board/oneone/list",
|
|
639
|
+
cmd: 12432,
|
|
640
|
+
method: "get",
|
|
641
|
+
body: (a) => ({
|
|
642
|
+
objectData: JSON.stringify({
|
|
643
|
+
uid: String(a.threadId),
|
|
644
|
+
board_type: a.boardType,
|
|
645
|
+
page: a.page,
|
|
646
|
+
count: a.count,
|
|
647
|
+
last_id: 0,
|
|
648
|
+
last_type: 0,
|
|
649
|
+
}),
|
|
650
|
+
}),
|
|
651
|
+
reply: "session",
|
|
652
|
+
bigIdKeys: DM_REMINDER_ID_KEYS,
|
|
653
|
+
transform: (data, a) => (a.boardType === BOARD_TYPE.ALL ? dmBoardReply(data) : dmReminderListReply(data)),
|
|
654
|
+
});
|
|
655
|
+
|
|
656
|
+
/** `GET {group_board}/api/board/topic/listResponseEvent`: `{eventId}`, no imei. */
|
|
657
|
+
export const REMINDER_RESPONSES = Object.freeze({
|
|
658
|
+
host: BOARD_HOST,
|
|
659
|
+
path: "/api/board/topic/listResponseEvent",
|
|
660
|
+
cmd: 12086,
|
|
661
|
+
method: "get",
|
|
662
|
+
body: (a) => ({ eventId: a.reminderId }),
|
|
663
|
+
reply: "session",
|
|
664
|
+
bigIdKeys: RESPONSE_ID_KEYS,
|
|
665
|
+
});
|
|
666
|
+
|
|
667
|
+
// ── Calls that are more than one request ────────────────────────────────
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* List a 1-1 conversation's whole board (notes, pinned messages, reminders): `/api/board/oneone/list` with board
|
|
671
|
+
* type 0, which is what Zalo asks. Usable with a session handle or a logged-in api object.
|
|
672
|
+
*
|
|
673
|
+
* @param {object} target - a session handle `s`, or the api object (`getContext()`, `zpwServiceMap`)
|
|
674
|
+
* @param {string} threadId - the other user's id
|
|
675
|
+
* @param {number} [page] - from 1
|
|
676
|
+
* @param {number} [pageSize] - items per page
|
|
677
|
+
* @returns {Promise<{items: Array<{boardType: number, data: object}>}>}
|
|
678
|
+
* @throws {ZaloApiError} Zalo's own error
|
|
679
|
+
*/
|
|
680
|
+
export function listOneOneBoard(target, threadId, page = 1, pageSize = PAGE_SIZE) {
|
|
681
|
+
return callList(target, ONEONE_LIST, { threadId, boardType: BOARD_TYPE.ALL, page, count: pageSize });
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
/**
|
|
685
|
+
* The reminder an edit starts from: a group one by `getReminder`, a DM one found in the DM list.
|
|
686
|
+
*
|
|
687
|
+
* @param {import("../api.js").Session} s
|
|
688
|
+
* @param {string|number} reminderId
|
|
689
|
+
* @param {string} threadId
|
|
690
|
+
* @param {0|1} type
|
|
691
|
+
* @returns {Promise<object>}
|
|
692
|
+
* @throws {ZaloApiError} when a DM list has no reminder with that id
|
|
693
|
+
*/
|
|
694
|
+
async function currentReminder(s, reminderId, threadId, type) {
|
|
695
|
+
if (type === THREAD_TYPE.GROUP) return (await s.call(REMINDER_GET, { reminderId })) ?? {};
|
|
696
|
+
const want = String(reminderId);
|
|
697
|
+
for (let page = 1; page <= EDIT_LOOKUP_PAGES; page++) {
|
|
698
|
+
const list = await callList(s, ONEONE_LIST, { threadId, boardType: BOARD_TYPE.TOPIC, page, count: PAGE_SIZE });
|
|
699
|
+
const found = list.find((r) => String(r.reminderId ?? r.id) === want);
|
|
700
|
+
if (found) return found;
|
|
701
|
+
if (list.length < PAGE_SIZE) break;
|
|
702
|
+
}
|
|
703
|
+
throw new ZaloApiError("The reminder to edit was not found in this conversation");
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
/**
|
|
707
|
+
* The creator a DM reminder edit sends back: the loaded reminder's (`creatorUid`, else `creatorId`), else this
|
|
708
|
+
* account, which is the only one that can have made a reminder it finds with no creator.
|
|
709
|
+
*
|
|
710
|
+
* @param {object} reminder - the loaded reminder
|
|
711
|
+
* @param {string|number} ownId
|
|
712
|
+
* @returns {string}
|
|
713
|
+
*/
|
|
714
|
+
export function creatorOf(reminder, ownId) {
|
|
715
|
+
for (const v of [reminder?.creatorUid, reminder?.creatorId]) {
|
|
716
|
+
if (v !== undefined && v !== null && v !== "") return String(v);
|
|
717
|
+
}
|
|
718
|
+
return String(ownId);
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* The option ids the caller has voted for on a poll (the options whose voters
|
|
723
|
+
* include this account, or that say `voted`).
|
|
724
|
+
*
|
|
725
|
+
* @param {any} poll - a poll detail
|
|
726
|
+
* @param {string} ownId
|
|
727
|
+
* @returns {Array<number|string>}
|
|
728
|
+
*/
|
|
729
|
+
export function votedOptionIds(poll, ownId) {
|
|
730
|
+
const out = [];
|
|
731
|
+
for (const o of Array.isArray(poll?.options) ? poll.options : []) {
|
|
732
|
+
const id = o?.option_id;
|
|
733
|
+
if (id === undefined || id === null || !(Number(id) > 0)) continue;
|
|
734
|
+
const voters = Array.isArray(o.voters) ? o.voters.map(String) : [];
|
|
735
|
+
if (o.voted === true || voters.includes(String(ownId))) out.push(id);
|
|
736
|
+
}
|
|
737
|
+
return out;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* One page of a group's board, reached the way Zalo pages it: page 2 and later carry the cursor of the page
|
|
742
|
+
* before (`boardCursor`), so the pages before the one asked are read first. An empty page on the way means there is
|
|
743
|
+
* nothing after it, and `{items: []}` is the answer without asking further. A short page does not: with the cursor,
|
|
744
|
+
* Zalo can answer fewer items than asked while more follow (live, 2026-11-07), so paging stops only when empty.
|
|
745
|
+
*
|
|
746
|
+
* @param {{getListBoard: Function}} api - a logged-in api
|
|
747
|
+
* @param {string} groupId
|
|
748
|
+
* @param {number} [page] - from 1
|
|
749
|
+
* @param {number} [count] - items per page
|
|
750
|
+
* @returns {Promise<{items: Array<{boardType: number, data: object}>}>}
|
|
751
|
+
* @throws {ZaloApiError} Zalo's own error, from any page on the way
|
|
752
|
+
*/
|
|
753
|
+
export async function boardPage(api, groupId, page = 1, count = PAGE_SIZE) {
|
|
754
|
+
let cursor = { lastId: 0, lastType: 0 };
|
|
755
|
+
for (let p = 1; p < page; p++) {
|
|
756
|
+
const items = (await api.getListBoard({ page: p, count, ...cursor }, groupId))?.items ?? [];
|
|
757
|
+
if (items.length === 0) return { items: [] };
|
|
758
|
+
cursor = boardCursor(items);
|
|
759
|
+
}
|
|
760
|
+
return api.getListBoard({ page, count, ...cursor }, groupId);
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* One page of a group's reminders, reached the way Zalo pages them: page 2 and later carry `lastId`, the id of
|
|
765
|
+
* the last topic of the page before (read off the reply, {@link groupReminderListReply}), so the pages before the one
|
|
766
|
+
* asked are read first. An empty page means there is nothing after it; a short one does not, since a page asked
|
|
767
|
+
* with the cursor can hold fewer than asked while more follow (paging stops only at an empty page). A DM's reminders
|
|
768
|
+
* have no cursor (`last_id` is always 0 there) and are asked for by page number alone.
|
|
769
|
+
*
|
|
770
|
+
* @param {{getListReminder: Function}} api - a logged-in api
|
|
771
|
+
* @param {string} groupId
|
|
772
|
+
* @param {number} [page] - from 1
|
|
773
|
+
* @param {number} [count] - reminders per page
|
|
774
|
+
* @returns {Promise<object[]>} the reminders
|
|
775
|
+
* @throws {ZaloApiError} Zalo's own error, from any page on the way
|
|
776
|
+
*/
|
|
777
|
+
export async function groupReminderPage(api, groupId, page = 1, count = PAGE_SIZE) {
|
|
778
|
+
let lastId = 0;
|
|
779
|
+
for (let p = 1; p < page; p++) {
|
|
780
|
+
const list = await api.getListReminder({ page: p, count, lastId }, groupId, THREAD_TYPE.GROUP);
|
|
781
|
+
const got = Array.isArray(list) ? list : [];
|
|
782
|
+
const size = got.page?.size ?? got.length;
|
|
783
|
+
if (size === 0) return [];
|
|
784
|
+
const last = got.at(-1);
|
|
785
|
+
lastId = got.page?.lastId ?? last?.reminderId ?? last?.id ?? 0;
|
|
786
|
+
}
|
|
787
|
+
return api.getListReminder({ page, count, lastId }, groupId, THREAD_TYPE.GROUP);
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
/**
|
|
791
|
+
* The board calls, bound to one session handle.
|
|
792
|
+
*
|
|
793
|
+
* @param {import("../api.js").Session} s
|
|
794
|
+
* @returns {Record<string, Function>}
|
|
795
|
+
*/
|
|
796
|
+
export function boardMethods(s) {
|
|
797
|
+
return {
|
|
798
|
+
/**
|
|
799
|
+
* Create a note in a group.
|
|
800
|
+
*
|
|
801
|
+
* @param {{title: string, pinAct?: boolean}} options - `pinAct` pins it
|
|
802
|
+
* @param {string} groupId
|
|
803
|
+
* @returns {Promise<object>} the note, `params` opened
|
|
804
|
+
*/
|
|
805
|
+
createNote: (options, groupId) =>
|
|
806
|
+
s.call(NOTE_CREATE, { groupId, title: options?.title, pin: Boolean(options?.pinAct) }),
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* Change a group note's title. `pinAct` true pins it; false leaves the pin as it is (never unpins).
|
|
810
|
+
*
|
|
811
|
+
* @param {{title: string, topicId: string|number, pinAct?: boolean}} options
|
|
812
|
+
* @param {string} groupId
|
|
813
|
+
* @returns {Promise<object>} the note, `params` opened
|
|
814
|
+
*/
|
|
815
|
+
editNote: (options, groupId) =>
|
|
816
|
+
s.call(NOTE_UPDATE, {
|
|
817
|
+
groupId,
|
|
818
|
+
title: options?.title,
|
|
819
|
+
topicId: options?.topicId,
|
|
820
|
+
pin: Boolean(options?.pinAct),
|
|
821
|
+
}),
|
|
822
|
+
|
|
823
|
+
/**
|
|
824
|
+
* One page of a group's board: notes, pinned messages and polls. Page 2 and later take the cursor of the
|
|
825
|
+
* page before (`boardCursor(items)`).
|
|
826
|
+
*
|
|
827
|
+
* @param {{page?: number, count?: number, lastId?: number|string, lastType?: number}} options
|
|
828
|
+
* @param {string} groupId
|
|
829
|
+
* @returns {Promise<{items: Array<{boardType: number, data: object}>}>}
|
|
830
|
+
*/
|
|
831
|
+
getListBoard: (options, groupId) =>
|
|
832
|
+
callList(s, BOARD_LIST, {
|
|
833
|
+
groupId,
|
|
834
|
+
page: options?.page ?? 1,
|
|
835
|
+
count: options?.count ?? PAGE_SIZE,
|
|
836
|
+
lastId: options?.lastId ?? 0,
|
|
837
|
+
lastType: options?.lastType ?? 0,
|
|
838
|
+
}),
|
|
839
|
+
|
|
840
|
+
/**
|
|
841
|
+
* Create a poll in a group.
|
|
842
|
+
*
|
|
843
|
+
* @param {{question: string, options: string[], expiredTime?: number, allowMultiChoices?: boolean,
|
|
844
|
+
* allowAddNewOption?: boolean, hideVotePreview?: boolean, isAnonymous?: boolean}} options -
|
|
845
|
+
* `expiredTime` in epoch ms, 0 for never
|
|
846
|
+
* @param {string} groupId
|
|
847
|
+
* @returns {Promise<object>} the poll
|
|
848
|
+
*/
|
|
849
|
+
createPoll: (options, groupId) =>
|
|
850
|
+
s.call(POLL_CREATE, {
|
|
851
|
+
groupId,
|
|
852
|
+
question: options?.question,
|
|
853
|
+
options: options?.options,
|
|
854
|
+
expiredTime: options?.expiredTime ?? 0,
|
|
855
|
+
allowMultiChoices: Boolean(options?.allowMultiChoices),
|
|
856
|
+
allowAddNewOption: Boolean(options?.allowAddNewOption),
|
|
857
|
+
hideVotePreview: Boolean(options?.hideVotePreview),
|
|
858
|
+
isAnonymous: Boolean(options?.isAnonymous),
|
|
859
|
+
}),
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
* A poll's detail.
|
|
863
|
+
*
|
|
864
|
+
* @param {number|string} pollId
|
|
865
|
+
* @returns {Promise<object>}
|
|
866
|
+
* @throws {ZaloApiError} "Missing poll id" before any request when there is none
|
|
867
|
+
*/
|
|
868
|
+
getPollDetail: async (pollId) => {
|
|
869
|
+
if (!pollId) throw new ZaloApiError("Missing poll id");
|
|
870
|
+
return s.call(POLL_DETAIL, { pollId });
|
|
871
|
+
},
|
|
872
|
+
|
|
873
|
+
/**
|
|
874
|
+
* Vote on a poll. The ids are the whole selection after the vote; an empty list removes this account's vote.
|
|
875
|
+
*
|
|
876
|
+
* @param {number|string} pollId
|
|
877
|
+
* @param {Array<number|string>|number|string} optionIds
|
|
878
|
+
* @returns {Promise<object>} the poll after the vote
|
|
879
|
+
*/
|
|
880
|
+
votePoll: (pollId, optionIds) =>
|
|
881
|
+
s.call(POLL_VOTE, { pollId, optionIds: Array.isArray(optionIds) ? optionIds : [optionIds] }),
|
|
882
|
+
|
|
883
|
+
/**
|
|
884
|
+
* Close a poll to further votes.
|
|
885
|
+
*
|
|
886
|
+
* @param {number|string} pollId
|
|
887
|
+
* @returns {Promise<any>} what Zalo answered, null when nothing
|
|
888
|
+
*/
|
|
889
|
+
lockPoll: async (pollId) => openOptionalReply(s.ctx, await s.call(POLL_LOCK, { pollId }), POLL_ID_KEYS),
|
|
890
|
+
|
|
891
|
+
/**
|
|
892
|
+
* Share a poll into its group's chat.
|
|
893
|
+
*
|
|
894
|
+
* @param {number|string} pollId
|
|
895
|
+
* @returns {Promise<any>}
|
|
896
|
+
*/
|
|
897
|
+
sharePoll: (pollId) => s.call(POLL_SHARE, { pollId }),
|
|
898
|
+
|
|
899
|
+
/**
|
|
900
|
+
* Add options to a poll. `votedOptionIds` is this account's whole selection afterwards; when it is empty or
|
|
901
|
+
* absent, the poll is read first and the current votes are kept (Zalo expects them, and an empty list
|
|
902
|
+
* would clear them), except on a single-choice poll where a new option is voted: that vote replaces the
|
|
903
|
+
* old one, so none is kept (Zalo unchecks the others).
|
|
904
|
+
*
|
|
905
|
+
* @param {{pollId: number|string, options: Array<{content: string, voted?: boolean}>,
|
|
906
|
+
* votedOptionIds?: Array<number|string>}} payload
|
|
907
|
+
* @returns {Promise<object>} the poll after the change
|
|
908
|
+
*/
|
|
909
|
+
addPollOptions: async (payload) => {
|
|
910
|
+
const pollId = payload?.pollId;
|
|
911
|
+
const fresh = (Array.isArray(payload?.options) ? payload.options : []).map((o) => ({
|
|
912
|
+
content: o?.content,
|
|
913
|
+
voted: Boolean(o?.voted),
|
|
914
|
+
}));
|
|
915
|
+
let voted = Array.isArray(payload?.votedOptionIds) ? payload.votedOptionIds : [];
|
|
916
|
+
if (voted.length === 0) {
|
|
917
|
+
const poll = await s.call(POLL_DETAIL, { pollId });
|
|
918
|
+
const replaced = !poll?.allow_multi_choices && fresh.some((o) => o.voted);
|
|
919
|
+
voted = replaced ? [] : votedOptionIds(poll, s.ctx.uid);
|
|
920
|
+
}
|
|
921
|
+
return s.call(POLL_ADD_OPTIONS, { pollId, newOptions: JSON.stringify(fresh), votedOptionIds: voted });
|
|
922
|
+
},
|
|
923
|
+
|
|
924
|
+
/**
|
|
925
|
+
* Create a reminder in a DM (type 0) or a group (type 1).
|
|
926
|
+
*
|
|
927
|
+
* @param {{title: string, emoji?: string, startTime?: number, repeat?: number}} options - `startTime` in
|
|
928
|
+
* epoch ms (now by default); `repeat` 0 none, 1 daily, 2 weekly, 3 monthly
|
|
929
|
+
* @param {string} threadId
|
|
930
|
+
* @param {number} [type] - 0 user (default), 1 group
|
|
931
|
+
* @returns {Promise<object>} the reminder (a DM one has `reminderId`, a group one `id`)
|
|
932
|
+
*/
|
|
933
|
+
createReminder: async (options, threadId, type) => {
|
|
934
|
+
const kind = threadTypeOf(type);
|
|
935
|
+
const a = {
|
|
936
|
+
threadId,
|
|
937
|
+
creatorUid: String(s.ctx.uid),
|
|
938
|
+
color: TOPIC_COLOR,
|
|
939
|
+
emoji: options?.emoji ?? REMINDER_EMOJI,
|
|
940
|
+
startTime: options?.startTime ?? s.now(),
|
|
941
|
+
params: { title: options?.title },
|
|
942
|
+
repeat: options?.repeat ?? 0,
|
|
943
|
+
};
|
|
944
|
+
return s.call(kind === THREAD_TYPE.GROUP ? REMINDER_CREATE_GROUP : REMINDER_CREATE_DM, a);
|
|
945
|
+
},
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* Change a reminder. The reminder is read first, and every field not given keeps its current value.
|
|
949
|
+
*
|
|
950
|
+
* @param {{topicId: string|number, title?: string, emoji?: string, startTime?: number, repeat?: number}}
|
|
951
|
+
* options - `topicId` is the reminder's id
|
|
952
|
+
* @param {string} threadId
|
|
953
|
+
* @param {number} [type] - 0 user (default), 1 group
|
|
954
|
+
* @returns {Promise<object>}
|
|
955
|
+
* @throws {ZaloApiError} when a DM reminder with that id is not in the conversation's list
|
|
956
|
+
*/
|
|
957
|
+
editReminder: async (options, threadId, type) => {
|
|
958
|
+
const kind = threadTypeOf(type);
|
|
959
|
+
const topicId = options?.topicId;
|
|
960
|
+
const cur = await currentReminder(s, topicId, threadId, kind);
|
|
961
|
+
const curParams = paramsObject(cur.params);
|
|
962
|
+
const a = {
|
|
963
|
+
threadId,
|
|
964
|
+
topicId,
|
|
965
|
+
creatorUid: creatorOf(cur, s.ctx.uid),
|
|
966
|
+
color: typeof cur.color === "number" ? cur.color : TOPIC_COLOR,
|
|
967
|
+
emoji: options?.emoji ?? cur.emoji ?? REMINDER_EMOJI,
|
|
968
|
+
startTime: options?.startTime ?? cur.startTime ?? s.now(),
|
|
969
|
+
params: { ...curParams, title: options?.title ?? curParams.title },
|
|
970
|
+
repeat: options?.repeat ?? cur.repeat ?? 0,
|
|
971
|
+
};
|
|
972
|
+
return s.call(kind === THREAD_TYPE.GROUP ? REMINDER_UPDATE_GROUP : REMINDER_UPDATE_DM, a);
|
|
973
|
+
},
|
|
974
|
+
|
|
975
|
+
/**
|
|
976
|
+
* Remove a reminder.
|
|
977
|
+
*
|
|
978
|
+
* @param {string|number} reminderId
|
|
979
|
+
* @param {string} threadId
|
|
980
|
+
* @param {number} [type] - 0 user (default), 1 group
|
|
981
|
+
* @returns {Promise<any>}
|
|
982
|
+
*/
|
|
983
|
+
removeReminder: async (reminderId, threadId, type) => {
|
|
984
|
+
const kind = threadTypeOf(type);
|
|
985
|
+
return s.call(kind === THREAD_TYPE.GROUP ? REMINDER_REMOVE_GROUP : REMINDER_REMOVE_DM, {
|
|
986
|
+
reminderId,
|
|
987
|
+
threadId,
|
|
988
|
+
});
|
|
989
|
+
},
|
|
990
|
+
|
|
991
|
+
/**
|
|
992
|
+
* A group reminder's detail, its `params` opened.
|
|
993
|
+
*
|
|
994
|
+
* @param {string|number} reminderId
|
|
995
|
+
* @returns {Promise<object>}
|
|
996
|
+
*/
|
|
997
|
+
getReminder: (reminderId) => s.call(REMINDER_GET, { reminderId }),
|
|
998
|
+
|
|
999
|
+
/**
|
|
1000
|
+
* One page of a conversation's reminders. A group's page 2 and later take `lastId`, the id of the last
|
|
1001
|
+
* reminder of the page before.
|
|
1002
|
+
*
|
|
1003
|
+
* @param {{page?: number, count?: number, lastId?: number|string}} options
|
|
1004
|
+
* @param {string} threadId
|
|
1005
|
+
* @param {number} [type] - 0 user (default), 1 group
|
|
1006
|
+
* @returns {Promise<object[]>} the reminders, `params` opened
|
|
1007
|
+
*/
|
|
1008
|
+
getListReminder: async (options, threadId, type) => {
|
|
1009
|
+
const kind = threadTypeOf(type);
|
|
1010
|
+
const page = options?.page ?? 1;
|
|
1011
|
+
const count = options?.count ?? PAGE_SIZE;
|
|
1012
|
+
if (kind === THREAD_TYPE.GROUP) {
|
|
1013
|
+
return callList(s, REMINDER_LIST_GROUP, { threadId, page, count, lastId: options?.lastId ?? 0 });
|
|
1014
|
+
}
|
|
1015
|
+
return callList(s, ONEONE_LIST, { threadId, boardType: BOARD_TYPE.TOPIC, page, count });
|
|
1016
|
+
},
|
|
1017
|
+
|
|
1018
|
+
/**
|
|
1019
|
+
* Who accepted and who declined a group reminder.
|
|
1020
|
+
*
|
|
1021
|
+
* @param {string|number} reminderId
|
|
1022
|
+
* @returns {Promise<{acceptMember?: string[], rejectMember?: string[]}>}
|
|
1023
|
+
*/
|
|
1024
|
+
getReminderResponses: (reminderId) => s.call(REMINDER_RESPONSES, { reminderId }),
|
|
1025
|
+
|
|
1026
|
+
/**
|
|
1027
|
+
* A 1-1 conversation's whole board: notes, pinned messages and reminders.
|
|
1028
|
+
*
|
|
1029
|
+
* @param {string} threadId - the other user's id
|
|
1030
|
+
* @param {number} [page] - from 1
|
|
1031
|
+
* @param {number} [pageSize] - items per page
|
|
1032
|
+
* @returns {Promise<{items: Array<{boardType: number, data: object}>}>}
|
|
1033
|
+
*/
|
|
1034
|
+
listOneOneBoard: (threadId, page, pageSize) => listOneOneBoard(s, threadId, page, pageSize),
|
|
1035
|
+
};
|
|
1036
|
+
}
|