@ardennguyen/zalo-agent-cli 1.0.7 → 2.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/DISCLAIMER.md +2 -2
- package/README.md +146 -69
- package/node_modules/asynckit/LICENSE +21 -0
- package/node_modules/asynckit/README.md +233 -0
- package/node_modules/asynckit/bench.js +76 -0
- package/node_modules/asynckit/index.js +6 -0
- package/node_modules/asynckit/lib/abort.js +29 -0
- package/node_modules/asynckit/lib/async.js +34 -0
- package/node_modules/asynckit/lib/defer.js +26 -0
- package/node_modules/asynckit/lib/iterate.js +75 -0
- package/node_modules/asynckit/lib/readable_asynckit.js +91 -0
- package/node_modules/asynckit/lib/readable_parallel.js +25 -0
- package/node_modules/asynckit/lib/readable_serial.js +25 -0
- package/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
- package/node_modules/asynckit/lib/state.js +37 -0
- package/node_modules/asynckit/lib/streamify.js +141 -0
- package/node_modules/asynckit/lib/terminator.js +29 -0
- package/node_modules/asynckit/package.json +63 -0
- package/node_modules/asynckit/parallel.js +43 -0
- package/node_modules/asynckit/serial.js +17 -0
- package/node_modules/asynckit/serialOrdered.js +75 -0
- package/node_modules/asynckit/stream.js +21 -0
- package/node_modules/bignumber.js/CHANGELOG.md +381 -0
- package/node_modules/bignumber.js/LICENCE.md +26 -0
- package/node_modules/bignumber.js/README.md +289 -0
- package/node_modules/bignumber.js/bignumber.d.mts +6 -0
- package/node_modules/bignumber.js/bignumber.d.ts +5 -0
- package/node_modules/bignumber.js/bignumber.js +2922 -0
- package/node_modules/bignumber.js/bignumber.mjs +2907 -0
- package/node_modules/bignumber.js/doc/API.html +2249 -0
- package/node_modules/bignumber.js/package.json +60 -0
- package/node_modules/bignumber.js/types.d.ts +1821 -0
- package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
- package/node_modules/call-bind-apply-helpers/LICENSE +21 -0
- package/node_modules/call-bind-apply-helpers/README.md +62 -0
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
- package/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/node_modules/combined-stream/License +19 -0
- package/node_modules/combined-stream/Readme.md +138 -0
- package/node_modules/combined-stream/lib/combined_stream.js +208 -0
- package/node_modules/combined-stream/package.json +25 -0
- package/node_modules/crypto-js/CONTRIBUTING.md +28 -0
- package/node_modules/crypto-js/LICENSE +24 -0
- package/node_modules/crypto-js/README.md +275 -0
- package/node_modules/crypto-js/aes.js +234 -0
- package/node_modules/crypto-js/blowfish.js +471 -0
- package/node_modules/crypto-js/bower.json +39 -0
- package/node_modules/crypto-js/cipher-core.js +895 -0
- package/node_modules/crypto-js/core.js +807 -0
- package/node_modules/crypto-js/crypto-js.js +6657 -0
- package/node_modules/crypto-js/docs/QuickStartGuide.wiki +470 -0
- package/node_modules/crypto-js/enc-base64.js +136 -0
- package/node_modules/crypto-js/enc-base64url.js +148 -0
- package/node_modules/crypto-js/enc-hex.js +18 -0
- package/node_modules/crypto-js/enc-latin1.js +18 -0
- package/node_modules/crypto-js/enc-utf16.js +149 -0
- package/node_modules/crypto-js/enc-utf8.js +18 -0
- package/node_modules/crypto-js/evpkdf.js +134 -0
- package/node_modules/crypto-js/format-hex.js +66 -0
- package/node_modules/crypto-js/format-openssl.js +18 -0
- package/node_modules/crypto-js/hmac-md5.js +18 -0
- package/node_modules/crypto-js/hmac-ripemd160.js +18 -0
- package/node_modules/crypto-js/hmac-sha1.js +18 -0
- package/node_modules/crypto-js/hmac-sha224.js +18 -0
- package/node_modules/crypto-js/hmac-sha256.js +18 -0
- package/node_modules/crypto-js/hmac-sha3.js +18 -0
- package/node_modules/crypto-js/hmac-sha384.js +18 -0
- package/node_modules/crypto-js/hmac-sha512.js +18 -0
- package/node_modules/crypto-js/hmac.js +143 -0
- package/node_modules/crypto-js/index.js +18 -0
- package/node_modules/crypto-js/lib-typedarrays.js +76 -0
- package/node_modules/crypto-js/md5.js +268 -0
- package/node_modules/crypto-js/mode-cfb.js +80 -0
- package/node_modules/crypto-js/mode-ctr-gladman.js +116 -0
- package/node_modules/crypto-js/mode-ctr.js +58 -0
- package/node_modules/crypto-js/mode-ecb.js +40 -0
- package/node_modules/crypto-js/mode-ofb.js +54 -0
- package/node_modules/crypto-js/package.json +42 -0
- package/node_modules/crypto-js/pad-ansix923.js +49 -0
- package/node_modules/crypto-js/pad-iso10126.js +44 -0
- package/node_modules/crypto-js/pad-iso97971.js +40 -0
- package/node_modules/crypto-js/pad-nopadding.js +30 -0
- package/node_modules/crypto-js/pad-pkcs7.js +18 -0
- package/node_modules/crypto-js/pad-zeropadding.js +47 -0
- package/node_modules/crypto-js/pbkdf2.js +145 -0
- package/node_modules/crypto-js/rabbit-legacy.js +190 -0
- package/node_modules/crypto-js/rabbit.js +192 -0
- package/node_modules/crypto-js/rc4.js +139 -0
- package/node_modules/crypto-js/ripemd160.js +267 -0
- package/node_modules/crypto-js/sha1.js +150 -0
- package/node_modules/crypto-js/sha224.js +80 -0
- package/node_modules/crypto-js/sha256.js +199 -0
- package/node_modules/crypto-js/sha3.js +326 -0
- package/node_modules/crypto-js/sha384.js +83 -0
- package/node_modules/crypto-js/sha512.js +326 -0
- package/node_modules/crypto-js/tripledes.js +779 -0
- package/node_modules/crypto-js/x64-core.js +304 -0
- package/node_modules/delayed-stream/.npmignore +1 -0
- package/node_modules/delayed-stream/License +19 -0
- package/node_modules/delayed-stream/Makefile +7 -0
- package/node_modules/delayed-stream/Readme.md +141 -0
- package/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
- package/node_modules/delayed-stream/package.json +27 -0
- package/node_modules/dunder-proto/.eslintrc +5 -0
- package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
- package/node_modules/dunder-proto/.nycrc +13 -0
- package/node_modules/dunder-proto/CHANGELOG.md +24 -0
- package/node_modules/dunder-proto/LICENSE +21 -0
- package/node_modules/dunder-proto/README.md +54 -0
- package/node_modules/dunder-proto/get.d.ts +5 -0
- package/node_modules/dunder-proto/get.js +30 -0
- package/node_modules/dunder-proto/package.json +76 -0
- package/node_modules/dunder-proto/set.d.ts +5 -0
- package/node_modules/dunder-proto/set.js +35 -0
- package/node_modules/dunder-proto/test/get.js +34 -0
- package/node_modules/dunder-proto/test/index.js +4 -0
- package/node_modules/dunder-proto/test/set.js +50 -0
- package/node_modules/dunder-proto/tsconfig.json +9 -0
- package/node_modules/es-define-property/.eslintrc +13 -0
- package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
- package/node_modules/es-define-property/.nycrc +9 -0
- package/node_modules/es-define-property/CHANGELOG.md +29 -0
- package/node_modules/es-define-property/LICENSE +21 -0
- package/node_modules/es-define-property/README.md +49 -0
- package/node_modules/es-define-property/index.d.ts +3 -0
- package/node_modules/es-define-property/index.js +14 -0
- package/node_modules/es-define-property/package.json +81 -0
- package/node_modules/es-define-property/test/index.js +56 -0
- package/node_modules/es-define-property/tsconfig.json +10 -0
- package/node_modules/es-errors/.eslintrc +5 -0
- package/node_modules/es-errors/.github/FUNDING.yml +12 -0
- package/node_modules/es-errors/CHANGELOG.md +40 -0
- package/node_modules/es-errors/LICENSE +21 -0
- package/node_modules/es-errors/README.md +55 -0
- package/node_modules/es-errors/eval.d.ts +3 -0
- package/node_modules/es-errors/eval.js +4 -0
- package/node_modules/es-errors/index.d.ts +3 -0
- package/node_modules/es-errors/index.js +4 -0
- package/node_modules/es-errors/package.json +80 -0
- package/node_modules/es-errors/range.d.ts +3 -0
- package/node_modules/es-errors/range.js +4 -0
- package/node_modules/es-errors/ref.d.ts +3 -0
- package/node_modules/es-errors/ref.js +4 -0
- package/node_modules/es-errors/syntax.d.ts +3 -0
- package/node_modules/es-errors/syntax.js +4 -0
- package/node_modules/es-errors/test/index.js +19 -0
- package/node_modules/es-errors/tsconfig.json +49 -0
- package/node_modules/es-errors/type.d.ts +3 -0
- package/node_modules/es-errors/type.js +4 -0
- package/node_modules/es-errors/uri.d.ts +3 -0
- package/node_modules/es-errors/uri.js +4 -0
- package/node_modules/es-object-atoms/.eslintrc +16 -0
- package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/node_modules/es-object-atoms/CHANGELOG.md +44 -0
- package/node_modules/es-object-atoms/LICENSE +21 -0
- package/node_modules/es-object-atoms/README.md +63 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/node_modules/es-object-atoms/ToObject.js +10 -0
- package/node_modules/es-object-atoms/index.d.ts +3 -0
- package/node_modules/es-object-atoms/index.js +4 -0
- package/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/node_modules/es-object-atoms/isObject.js +6 -0
- package/node_modules/es-object-atoms/package.json +79 -0
- package/node_modules/es-object-atoms/test/index.js +38 -0
- package/node_modules/es-object-atoms/tsconfig.json +7 -0
- package/node_modules/es-set-tostringtag/.eslintrc +13 -0
- package/node_modules/es-set-tostringtag/.nycrc +9 -0
- package/node_modules/es-set-tostringtag/CHANGELOG.md +67 -0
- package/node_modules/es-set-tostringtag/LICENSE +21 -0
- package/node_modules/es-set-tostringtag/README.md +53 -0
- package/node_modules/es-set-tostringtag/index.d.ts +10 -0
- package/node_modules/es-set-tostringtag/index.js +35 -0
- package/node_modules/es-set-tostringtag/package.json +78 -0
- package/node_modules/es-set-tostringtag/test/index.js +85 -0
- package/node_modules/es-set-tostringtag/tsconfig.json +9 -0
- package/node_modules/form-data/CHANGELOG.md +686 -0
- package/node_modules/form-data/License +19 -0
- package/node_modules/form-data/README.md +355 -0
- package/node_modules/form-data/index.d.ts +62 -0
- package/node_modules/form-data/lib/browser.js +4 -0
- package/node_modules/form-data/lib/form_data.js +506 -0
- package/node_modules/form-data/lib/populate.js +10 -0
- package/node_modules/form-data/node_modules/mime-db/HISTORY.md +507 -0
- package/node_modules/form-data/node_modules/mime-db/LICENSE +23 -0
- package/node_modules/form-data/node_modules/mime-db/README.md +100 -0
- package/node_modules/form-data/node_modules/mime-db/db.json +8519 -0
- package/node_modules/form-data/node_modules/mime-db/index.js +12 -0
- package/node_modules/form-data/node_modules/mime-db/package.json +60 -0
- package/node_modules/form-data/node_modules/mime-types/HISTORY.md +397 -0
- package/node_modules/form-data/node_modules/mime-types/LICENSE +23 -0
- package/node_modules/form-data/node_modules/mime-types/README.md +113 -0
- package/node_modules/form-data/node_modules/mime-types/index.js +188 -0
- package/node_modules/form-data/node_modules/mime-types/package.json +44 -0
- package/node_modules/form-data/package.json +82 -0
- package/node_modules/function-bind/.eslintrc +21 -0
- package/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/node_modules/function-bind/.nycrc +13 -0
- package/node_modules/function-bind/CHANGELOG.md +136 -0
- package/node_modules/function-bind/LICENSE +20 -0
- package/node_modules/function-bind/README.md +46 -0
- package/node_modules/function-bind/implementation.js +84 -0
- package/node_modules/function-bind/index.js +5 -0
- package/node_modules/function-bind/package.json +87 -0
- package/node_modules/function-bind/test/.eslintrc +9 -0
- package/node_modules/function-bind/test/index.js +252 -0
- package/node_modules/get-intrinsic/.eslintrc +42 -0
- package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/node_modules/get-intrinsic/.nycrc +9 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +186 -0
- package/node_modules/get-intrinsic/LICENSE +21 -0
- package/node_modules/get-intrinsic/README.md +71 -0
- package/node_modules/get-intrinsic/index.js +378 -0
- package/node_modules/get-intrinsic/package.json +97 -0
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
- package/node_modules/get-proto/.eslintrc +10 -0
- package/node_modules/get-proto/.github/FUNDING.yml +12 -0
- package/node_modules/get-proto/.nycrc +9 -0
- package/node_modules/get-proto/CHANGELOG.md +21 -0
- package/node_modules/get-proto/LICENSE +21 -0
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/node_modules/get-proto/README.md +50 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/node_modules/get-proto/index.d.ts +5 -0
- package/node_modules/get-proto/index.js +27 -0
- package/node_modules/get-proto/package.json +81 -0
- package/node_modules/get-proto/test/index.js +68 -0
- package/node_modules/get-proto/tsconfig.json +9 -0
- package/node_modules/gopd/.eslintrc +16 -0
- package/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/node_modules/gopd/CHANGELOG.md +45 -0
- package/node_modules/gopd/LICENSE +21 -0
- package/node_modules/gopd/README.md +40 -0
- package/node_modules/gopd/gOPD.d.ts +1 -0
- package/node_modules/gopd/gOPD.js +4 -0
- package/node_modules/gopd/index.d.ts +5 -0
- package/node_modules/gopd/index.js +15 -0
- package/node_modules/gopd/package.json +77 -0
- package/node_modules/gopd/test/index.js +36 -0
- package/node_modules/gopd/tsconfig.json +9 -0
- package/node_modules/has-symbols/.eslintrc +11 -0
- package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/node_modules/has-symbols/.nycrc +9 -0
- package/node_modules/has-symbols/CHANGELOG.md +91 -0
- package/node_modules/has-symbols/LICENSE +21 -0
- package/node_modules/has-symbols/README.md +46 -0
- package/node_modules/has-symbols/index.d.ts +3 -0
- package/node_modules/has-symbols/index.js +14 -0
- package/node_modules/has-symbols/package.json +111 -0
- package/node_modules/has-symbols/shams.d.ts +3 -0
- package/node_modules/has-symbols/shams.js +45 -0
- package/node_modules/has-symbols/test/index.js +22 -0
- package/node_modules/has-symbols/test/shams/core-js.js +29 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
- package/node_modules/has-symbols/test/tests.js +58 -0
- package/node_modules/has-symbols/tsconfig.json +10 -0
- package/node_modules/has-tostringtag/.eslintrc +5 -0
- package/node_modules/has-tostringtag/.github/FUNDING.yml +12 -0
- package/node_modules/has-tostringtag/.nycrc +13 -0
- package/node_modules/has-tostringtag/CHANGELOG.md +42 -0
- package/node_modules/has-tostringtag/LICENSE +21 -0
- package/node_modules/has-tostringtag/README.md +46 -0
- package/node_modules/has-tostringtag/index.d.ts +3 -0
- package/node_modules/has-tostringtag/index.js +8 -0
- package/node_modules/has-tostringtag/package.json +108 -0
- package/node_modules/has-tostringtag/shams.d.ts +3 -0
- package/node_modules/has-tostringtag/shams.js +8 -0
- package/node_modules/has-tostringtag/test/index.js +21 -0
- package/node_modules/has-tostringtag/test/shams/core-js.js +31 -0
- package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +30 -0
- package/node_modules/has-tostringtag/test/tests.js +15 -0
- package/node_modules/has-tostringtag/tsconfig.json +49 -0
- package/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/node_modules/hasown/.nycrc +13 -0
- package/node_modules/hasown/CHANGELOG.md +58 -0
- package/node_modules/hasown/LICENSE +21 -0
- package/node_modules/hasown/README.md +40 -0
- package/node_modules/hasown/eslint.config.mjs +6 -0
- package/node_modules/hasown/index.d.ts +3 -0
- package/node_modules/hasown/index.js +8 -0
- package/node_modules/hasown/package.json +91 -0
- package/node_modules/hasown/tsconfig.json +6 -0
- package/node_modules/json-bigint/LICENSE +20 -0
- package/node_modules/json-bigint/README.md +240 -0
- package/node_modules/json-bigint/index.js +12 -0
- package/node_modules/json-bigint/lib/parse.js +443 -0
- package/node_modules/json-bigint/lib/stringify.js +384 -0
- package/node_modules/json-bigint/package.json +34 -0
- package/node_modules/math-intrinsics/.eslintrc +16 -0
- package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/node_modules/math-intrinsics/LICENSE +21 -0
- package/node_modules/math-intrinsics/README.md +50 -0
- package/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/node_modules/math-intrinsics/abs.js +4 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/node_modules/math-intrinsics/floor.js +4 -0
- package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/node_modules/math-intrinsics/isFinite.js +12 -0
- package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/isInteger.js +16 -0
- package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/node_modules/math-intrinsics/isNaN.js +6 -0
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/node_modules/math-intrinsics/max.d.ts +1 -0
- package/node_modules/math-intrinsics/max.js +4 -0
- package/node_modules/math-intrinsics/min.d.ts +1 -0
- package/node_modules/math-intrinsics/min.js +4 -0
- package/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/node_modules/math-intrinsics/mod.js +9 -0
- package/node_modules/math-intrinsics/package.json +86 -0
- package/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/node_modules/math-intrinsics/pow.js +4 -0
- package/node_modules/math-intrinsics/round.d.ts +1 -0
- package/node_modules/math-intrinsics/round.js +4 -0
- package/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/node_modules/math-intrinsics/sign.js +11 -0
- package/node_modules/math-intrinsics/test/index.js +192 -0
- package/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/node_modules/pako/LICENSE +21 -0
- package/node_modules/pako/README.md +155 -0
- package/node_modules/pako/dist/pako.es5.js +6760 -0
- package/node_modules/pako/dist/pako.es5.min.js +2 -0
- package/node_modules/pako/dist/pako.esm.mjs +6945 -0
- package/node_modules/pako/dist/pako.js +6964 -0
- package/node_modules/pako/dist/pako.min.js +2 -0
- package/node_modules/pako/dist/pako_deflate.es5.js +3953 -0
- package/node_modules/pako/dist/pako_deflate.es5.min.js +2 -0
- package/node_modules/pako/dist/pako_deflate.js +4154 -0
- package/node_modules/pako/dist/pako_deflate.min.js +2 -0
- package/node_modules/pako/dist/pako_inflate.es5.js +3272 -0
- package/node_modules/pako/dist/pako_inflate.es5.min.js +2 -0
- package/node_modules/pako/dist/pako_inflate.js +3279 -0
- package/node_modules/pako/dist/pako_inflate.min.js +2 -0
- package/node_modules/pako/index.js +18 -0
- package/node_modules/pako/lib/deflate.js +387 -0
- package/node_modules/pako/lib/inflate.js +456 -0
- package/node_modules/pako/lib/utils/common.js +48 -0
- package/node_modules/pako/lib/utils/strings.js +174 -0
- package/node_modules/pako/lib/zlib/README +59 -0
- package/node_modules/pako/lib/zlib/adler32.js +51 -0
- package/node_modules/pako/lib/zlib/constants.js +68 -0
- package/node_modules/pako/lib/zlib/crc32.js +59 -0
- package/node_modules/pako/lib/zlib/deflate.js +2069 -0
- package/node_modules/pako/lib/zlib/gzheader.js +58 -0
- package/node_modules/pako/lib/zlib/inffast.js +344 -0
- package/node_modules/pako/lib/zlib/inflate.js +1575 -0
- package/node_modules/pako/lib/zlib/inftrees.js +340 -0
- package/node_modules/pako/lib/zlib/messages.js +32 -0
- package/node_modules/pako/lib/zlib/trees.js +1179 -0
- package/node_modules/pako/lib/zlib/zstream.js +47 -0
- package/node_modules/pako/package.json +73 -0
- package/node_modules/semver/LICENSE +15 -0
- package/node_modules/semver/README.md +680 -0
- package/node_modules/semver/bin/semver.js +195 -0
- package/node_modules/semver/classes/comparator.js +143 -0
- package/node_modules/semver/classes/index.js +7 -0
- package/node_modules/semver/classes/range.js +577 -0
- package/node_modules/semver/classes/semver.js +350 -0
- package/node_modules/semver/functions/clean.js +8 -0
- package/node_modules/semver/functions/cmp.js +54 -0
- package/node_modules/semver/functions/coerce.js +62 -0
- package/node_modules/semver/functions/compare-build.js +9 -0
- package/node_modules/semver/functions/compare-loose.js +5 -0
- package/node_modules/semver/functions/compare.js +7 -0
- package/node_modules/semver/functions/diff.js +60 -0
- package/node_modules/semver/functions/eq.js +5 -0
- package/node_modules/semver/functions/gt.js +5 -0
- package/node_modules/semver/functions/gte.js +5 -0
- package/node_modules/semver/functions/inc.js +21 -0
- package/node_modules/semver/functions/lt.js +5 -0
- package/node_modules/semver/functions/lte.js +5 -0
- package/node_modules/semver/functions/major.js +5 -0
- package/node_modules/semver/functions/minor.js +5 -0
- package/node_modules/semver/functions/neq.js +5 -0
- package/node_modules/semver/functions/parse.js +18 -0
- package/node_modules/semver/functions/patch.js +5 -0
- package/node_modules/semver/functions/prerelease.js +8 -0
- package/node_modules/semver/functions/rcompare.js +5 -0
- package/node_modules/semver/functions/rsort.js +5 -0
- package/node_modules/semver/functions/satisfies.js +12 -0
- package/node_modules/semver/functions/sort.js +5 -0
- package/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/semver/functions/valid.js +8 -0
- package/node_modules/semver/index.js +93 -0
- package/node_modules/semver/internal/constants.js +37 -0
- package/node_modules/semver/internal/debug.js +11 -0
- package/node_modules/semver/internal/identifiers.js +29 -0
- package/node_modules/semver/internal/lrucache.js +42 -0
- package/node_modules/semver/internal/parse-options.js +17 -0
- package/node_modules/semver/internal/re.js +223 -0
- package/node_modules/semver/package.json +78 -0
- package/node_modules/semver/preload.js +4 -0
- package/node_modules/semver/range.bnf +17 -0
- package/node_modules/semver/ranges/gtr.js +6 -0
- package/node_modules/semver/ranges/intersects.js +9 -0
- package/node_modules/semver/ranges/ltr.js +6 -0
- package/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/node_modules/semver/ranges/min-version.js +63 -0
- package/node_modules/semver/ranges/outside.js +82 -0
- package/node_modules/semver/ranges/simplify.js +49 -0
- package/node_modules/semver/ranges/subset.js +249 -0
- package/node_modules/semver/ranges/to-comparators.js +10 -0
- package/node_modules/semver/ranges/valid.js +13 -0
- package/node_modules/spark-md5/LICENSE +13 -0
- package/node_modules/spark-md5/README.md +191 -0
- package/node_modules/spark-md5/package.json +35 -0
- package/node_modules/spark-md5/spark-md5.js +751 -0
- package/node_modules/spark-md5/spark-md5.min.js +1 -0
- package/node_modules/tldts/LICENSE +13 -0
- package/node_modules/tldts/README.md +327 -0
- package/node_modules/tldts/bin/cli.js +21 -0
- package/node_modules/tldts/dist/cjs/index.js +666 -0
- package/node_modules/tldts/dist/cjs/index.js.map +1 -0
- package/node_modules/tldts/dist/cjs/src/data/trie.js +14 -0
- package/node_modules/tldts/dist/cjs/src/data/trie.js.map +1 -0
- package/node_modules/tldts/dist/cjs/src/suffix-trie.js +67 -0
- package/node_modules/tldts/dist/cjs/src/suffix-trie.js.map +1 -0
- package/node_modules/tldts/dist/cjs/tsconfig.tsbuildinfo +1 -0
- package/node_modules/tldts/dist/es6/index.js +33 -0
- package/node_modules/tldts/dist/es6/index.js.map +1 -0
- package/node_modules/tldts/dist/es6/src/data/trie.js +11 -0
- package/node_modules/tldts/dist/es6/src/data/trie.js.map +1 -0
- package/node_modules/tldts/dist/es6/src/suffix-trie.js +64 -0
- package/node_modules/tldts/dist/es6/src/suffix-trie.js.map +1 -0
- package/node_modules/tldts/dist/es6/tsconfig.bundle.tsbuildinfo +1 -0
- package/node_modules/tldts/dist/index.cjs.min.js +2 -0
- package/node_modules/tldts/dist/index.cjs.min.js.map +1 -0
- package/node_modules/tldts/dist/index.esm.min.js +2 -0
- package/node_modules/tldts/dist/index.esm.min.js.map +1 -0
- package/node_modules/tldts/dist/index.umd.min.js +2 -0
- package/node_modules/tldts/dist/index.umd.min.js.map +1 -0
- package/node_modules/tldts/dist/types/index.d.ts +7 -0
- package/node_modules/tldts/dist/types/src/data/trie.d.ts +5 -0
- package/node_modules/tldts/dist/types/src/suffix-trie.d.ts +5 -0
- package/node_modules/tldts/index.ts +62 -0
- package/node_modules/tldts/package.json +91 -0
- package/node_modules/tldts/src/data/trie.ts +14 -0
- package/node_modules/tldts/src/suffix-trie.ts +110 -0
- package/node_modules/tldts-core/LICENSE +13 -0
- package/node_modules/tldts-core/README.md +3 -0
- package/node_modules/tldts-core/dist/cjs/index.js +561 -0
- package/node_modules/tldts-core/dist/cjs/index.js.map +1 -0
- package/node_modules/tldts-core/dist/cjs/src/domain-without-suffix.js +15 -0
- package/node_modules/tldts-core/dist/cjs/src/domain-without-suffix.js.map +1 -0
- package/node_modules/tldts-core/dist/cjs/src/domain.js +83 -0
- package/node_modules/tldts-core/dist/cjs/src/domain.js.map +1 -0
- package/node_modules/tldts-core/dist/cjs/src/extract-hostname.js +149 -0
- package/node_modules/tldts-core/dist/cjs/src/extract-hostname.js.map +1 -0
- package/node_modules/tldts-core/dist/cjs/src/factory.js +104 -0
- package/node_modules/tldts-core/dist/cjs/src/factory.js.map +1 -0
- package/node_modules/tldts-core/dist/cjs/src/is-ip.js +72 -0
- package/node_modules/tldts-core/dist/cjs/src/is-ip.js.map +1 -0
- package/node_modules/tldts-core/dist/cjs/src/is-valid.js +69 -0
- package/node_modules/tldts-core/dist/cjs/src/is-valid.js.map +1 -0
- package/node_modules/tldts-core/dist/cjs/src/lookup/fast-path.js +69 -0
- package/node_modules/tldts-core/dist/cjs/src/lookup/fast-path.js.map +1 -0
- package/node_modules/tldts-core/dist/cjs/src/lookup/interface.js +3 -0
- package/node_modules/tldts-core/dist/cjs/src/lookup/interface.js.map +1 -0
- package/node_modules/tldts-core/dist/cjs/src/options.js +22 -0
- package/node_modules/tldts-core/dist/cjs/src/options.js.map +1 -0
- package/node_modules/tldts-core/dist/cjs/src/subdomain.js +14 -0
- package/node_modules/tldts-core/dist/cjs/src/subdomain.js.map +1 -0
- package/node_modules/tldts-core/dist/cjs/tsconfig.tsbuildinfo +1 -0
- package/node_modules/tldts-core/dist/es6/index.js +4 -0
- package/node_modules/tldts-core/dist/es6/index.js.map +1 -0
- package/node_modules/tldts-core/dist/es6/src/domain-without-suffix.js +12 -0
- package/node_modules/tldts-core/dist/es6/src/domain-without-suffix.js.map +1 -0
- package/node_modules/tldts-core/dist/es6/src/domain.js +80 -0
- package/node_modules/tldts-core/dist/es6/src/domain.js.map +1 -0
- package/node_modules/tldts-core/dist/es6/src/extract-hostname.js +146 -0
- package/node_modules/tldts-core/dist/es6/src/extract-hostname.js.map +1 -0
- package/node_modules/tldts-core/dist/es6/src/factory.js +99 -0
- package/node_modules/tldts-core/dist/es6/src/factory.js.map +1 -0
- package/node_modules/tldts-core/dist/es6/src/is-ip.js +69 -0
- package/node_modules/tldts-core/dist/es6/src/is-ip.js.map +1 -0
- package/node_modules/tldts-core/dist/es6/src/is-valid.js +66 -0
- package/node_modules/tldts-core/dist/es6/src/is-valid.js.map +1 -0
- package/node_modules/tldts-core/dist/es6/src/lookup/fast-path.js +66 -0
- package/node_modules/tldts-core/dist/es6/src/lookup/fast-path.js.map +1 -0
- package/node_modules/tldts-core/dist/es6/src/lookup/interface.js +2 -0
- package/node_modules/tldts-core/dist/es6/src/lookup/interface.js.map +1 -0
- package/node_modules/tldts-core/dist/es6/src/options.js +19 -0
- package/node_modules/tldts-core/dist/es6/src/options.js.map +1 -0
- package/node_modules/tldts-core/dist/es6/src/subdomain.js +11 -0
- package/node_modules/tldts-core/dist/es6/src/subdomain.js.map +1 -0
- package/node_modules/tldts-core/dist/es6/tsconfig.bundle.tsbuildinfo +1 -0
- package/node_modules/tldts-core/dist/types/index.d.ts +4 -0
- package/node_modules/tldts-core/dist/types/src/domain-without-suffix.d.ts +6 -0
- package/node_modules/tldts-core/dist/types/src/domain.d.ts +5 -0
- package/node_modules/tldts-core/dist/types/src/extract-hostname.d.ts +5 -0
- package/node_modules/tldts-core/dist/types/src/factory.d.ts +28 -0
- package/node_modules/tldts-core/dist/types/src/is-ip.d.ts +6 -0
- package/node_modules/tldts-core/dist/types/src/is-valid.d.ts +15 -0
- package/node_modules/tldts-core/dist/types/src/lookup/fast-path.d.ts +2 -0
- package/node_modules/tldts-core/dist/types/src/lookup/interface.d.ts +9 -0
- package/node_modules/tldts-core/dist/types/src/options.d.ts +10 -0
- package/node_modules/tldts-core/dist/types/src/subdomain.d.ts +4 -0
- package/node_modules/tldts-core/index.ts +10 -0
- package/node_modules/tldts-core/package.json +68 -0
- package/node_modules/tldts-core/src/domain-without-suffix.ts +14 -0
- package/node_modules/tldts-core/src/domain.ts +100 -0
- package/node_modules/tldts-core/src/extract-hostname.ts +170 -0
- package/node_modules/tldts-core/src/factory.ts +160 -0
- package/node_modules/tldts-core/src/is-ip.ts +87 -0
- package/node_modules/tldts-core/src/is-valid.ts +79 -0
- package/node_modules/tldts-core/src/lookup/fast-path.ts +80 -0
- package/node_modules/tldts-core/src/lookup/interface.ts +10 -0
- package/node_modules/tldts-core/src/options.ts +39 -0
- package/node_modules/tldts-core/src/subdomain.ts +11 -0
- package/node_modules/tough-cookie/LICENSE +12 -0
- package/node_modules/tough-cookie/README.md +154 -0
- package/node_modules/tough-cookie/dist/cookie/canonicalDomain.d.ts +33 -0
- package/node_modules/tough-cookie/dist/cookie/canonicalDomain.js +65 -0
- package/node_modules/tough-cookie/dist/cookie/constants.d.ts +54 -0
- package/node_modules/tough-cookie/dist/cookie/constants.js +38 -0
- package/node_modules/tough-cookie/dist/cookie/cookie.d.ts +326 -0
- package/node_modules/tough-cookie/dist/cookie/cookie.js +831 -0
- package/node_modules/tough-cookie/dist/cookie/cookieCompare.d.ts +58 -0
- package/node_modules/tough-cookie/dist/cookie/cookieCompare.js +84 -0
- package/node_modules/tough-cookie/dist/cookie/cookieJar.d.ts +621 -0
- package/node_modules/tough-cookie/dist/cookie/cookieJar.js +1000 -0
- package/node_modules/tough-cookie/dist/cookie/defaultPath.d.ts +40 -0
- package/node_modules/tough-cookie/dist/cookie/defaultPath.js +60 -0
- package/node_modules/tough-cookie/dist/cookie/domainMatch.d.ts +38 -0
- package/node_modules/tough-cookie/dist/cookie/domainMatch.js +94 -0
- package/node_modules/tough-cookie/dist/cookie/formatDate.d.ts +15 -0
- package/node_modules/tough-cookie/dist/cookie/formatDate.js +20 -0
- package/node_modules/tough-cookie/dist/cookie/index.d.ts +29 -0
- package/node_modules/tough-cookie/dist/cookie/index.js +54 -0
- package/node_modules/tough-cookie/dist/cookie/parseDate.d.ts +103 -0
- package/node_modules/tough-cookie/dist/cookie/parseDate.js +323 -0
- package/node_modules/tough-cookie/dist/cookie/permutePath.d.ts +14 -0
- package/node_modules/tough-cookie/dist/cookie/permutePath.js +32 -0
- package/node_modules/tough-cookie/dist/getPublicSuffix.d.ts +55 -0
- package/node_modules/tough-cookie/dist/getPublicSuffix.js +71 -0
- package/node_modules/tough-cookie/dist/memstore.d.ts +220 -0
- package/node_modules/tough-cookie/dist/memstore.js +187 -0
- package/node_modules/tough-cookie/dist/pathMatch.d.ts +17 -0
- package/node_modules/tough-cookie/dist/pathMatch.js +40 -0
- package/node_modules/tough-cookie/dist/permuteDomain.d.ts +15 -0
- package/node_modules/tough-cookie/dist/permuteDomain.js +44 -0
- package/node_modules/tough-cookie/dist/store.d.ts +211 -0
- package/node_modules/tough-cookie/dist/store.js +76 -0
- package/node_modules/tough-cookie/dist/utils.d.ts +34 -0
- package/node_modules/tough-cookie/dist/utils.js +99 -0
- package/node_modules/tough-cookie/dist/validators.d.ts +24 -0
- package/node_modules/tough-cookie/dist/validators.js +90 -0
- package/node_modules/tough-cookie/dist/version.d.ts +5 -0
- package/node_modules/tough-cookie/dist/version.js +8 -0
- package/node_modules/tough-cookie/package.json +144 -0
- package/node_modules/ws/LICENSE +20 -0
- package/node_modules/ws/README.md +548 -0
- package/node_modules/ws/browser.js +8 -0
- package/node_modules/ws/index.js +22 -0
- package/node_modules/ws/lib/buffer-util.js +131 -0
- package/node_modules/ws/lib/constants.js +19 -0
- package/node_modules/ws/lib/event-target.js +292 -0
- package/node_modules/ws/lib/extension.js +203 -0
- package/node_modules/ws/lib/limiter.js +55 -0
- package/node_modules/ws/lib/permessage-deflate.js +530 -0
- package/node_modules/ws/lib/receiver.js +743 -0
- package/node_modules/ws/lib/sender.js +607 -0
- package/node_modules/ws/lib/stream.js +161 -0
- package/node_modules/ws/lib/subprotocol.js +62 -0
- package/node_modules/ws/lib/validation.js +152 -0
- package/node_modules/ws/lib/websocket-server.js +562 -0
- package/node_modules/ws/lib/websocket.js +1407 -0
- package/node_modules/ws/package.json +74 -0
- package/node_modules/ws/wrapper.mjs +21 -0
- package/node_modules/zca-js/.prettierrc +5 -0
- package/node_modules/zca-js/CODE_OF_CONDUCT.md +163 -0
- package/node_modules/zca-js/CONTRIBUTING.md +470 -0
- package/node_modules/zca-js/LICENSE +21 -0
- package/node_modules/zca-js/README.md +225 -0
- package/node_modules/zca-js/SECURITY.md +83 -0
- package/node_modules/zca-js/dist/Errors/ZaloApiError.d.ts +4 -0
- package/node_modules/zca-js/dist/Errors/ZaloApiError.js +7 -0
- package/node_modules/zca-js/dist/Errors/ZaloApiLoginQRAborted.d.ts +4 -0
- package/node_modules/zca-js/dist/Errors/ZaloApiLoginQRAborted.js +7 -0
- package/node_modules/zca-js/dist/Errors/ZaloApiLoginQRDeclined.d.ts +4 -0
- package/node_modules/zca-js/dist/Errors/ZaloApiLoginQRDeclined.js +7 -0
- package/node_modules/zca-js/dist/Errors/ZaloApiMissingImageMetadataGetter.d.ts +4 -0
- package/node_modules/zca-js/dist/Errors/ZaloApiMissingImageMetadataGetter.js +7 -0
- package/node_modules/zca-js/dist/Errors/index.d.ts +4 -0
- package/node_modules/zca-js/dist/Errors/index.js +4 -0
- package/node_modules/zca-js/dist/apis/acceptFriendRequest.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/acceptFriendRequest.js +28 -0
- package/node_modules/zca-js/dist/apis/addGroupBlockedMember.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/addGroupBlockedMember.js +28 -0
- package/node_modules/zca-js/dist/apis/addGroupDeputy.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/addGroupDeputy.js +30 -0
- package/node_modules/zca-js/dist/apis/addPollOptions.d.ts +14 -0
- package/node_modules/zca-js/dist/apis/addPollOptions.js +26 -0
- package/node_modules/zca-js/dist/apis/addQuickMessage.d.ts +11 -0
- package/node_modules/zca-js/dist/apis/addQuickMessage.js +60 -0
- package/node_modules/zca-js/dist/apis/addReaction.d.ts +18 -0
- package/node_modules/zca-js/dist/apis/addReaction.js +294 -0
- package/node_modules/zca-js/dist/apis/addUnreadMark.d.ts +8 -0
- package/node_modules/zca-js/dist/apis/addUnreadMark.js +52 -0
- package/node_modules/zca-js/dist/apis/addUserToGroup.d.ts +5 -0
- package/node_modules/zca-js/dist/apis/addUserToGroup.js +34 -0
- package/node_modules/zca-js/dist/apis/blockUser.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/blockUser.js +28 -0
- package/node_modules/zca-js/dist/apis/blockViewFeed.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/blockViewFeed.js +30 -0
- package/node_modules/zca-js/dist/apis/changeAccountAvatar.d.ts +3 -0
- package/node_modules/zca-js/dist/apis/changeAccountAvatar.js +52 -0
- package/node_modules/zca-js/dist/apis/changeFriendAlias.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/changeFriendAlias.js +27 -0
- package/node_modules/zca-js/dist/apis/changeGroupAvatar.d.ts +3 -0
- package/node_modules/zca-js/dist/apis/changeGroupAvatar.js +44 -0
- package/node_modules/zca-js/dist/apis/changeGroupName.d.ts +4 -0
- package/node_modules/zca-js/dist/apis/changeGroupName.js +32 -0
- package/node_modules/zca-js/dist/apis/changeGroupOwner.d.ts +4 -0
- package/node_modules/zca-js/dist/apis/changeGroupOwner.js +30 -0
- package/node_modules/zca-js/dist/apis/createAutoReply.d.ts +14 -0
- package/node_modules/zca-js/dist/apis/createAutoReply.js +37 -0
- package/node_modules/zca-js/dist/apis/createBankAccount.d.ts +8 -0
- package/node_modules/zca-js/dist/apis/createBankAccount.js +32 -0
- package/node_modules/zca-js/dist/apis/createCatalog.d.ts +7 -0
- package/node_modules/zca-js/dist/apis/createCatalog.js +29 -0
- package/node_modules/zca-js/dist/apis/createGroup.d.ts +28 -0
- package/node_modules/zca-js/dist/apis/createGroup.js +43 -0
- package/node_modules/zca-js/dist/apis/createNote.d.ts +7 -0
- package/node_modules/zca-js/dist/apis/createNote.js +47 -0
- package/node_modules/zca-js/dist/apis/createPoll.d.ts +36 -0
- package/node_modules/zca-js/dist/apis/createPoll.js +40 -0
- package/node_modules/zca-js/dist/apis/createProductCatalog.d.ts +23 -0
- package/node_modules/zca-js/dist/apis/createProductCatalog.js +50 -0
- package/node_modules/zca-js/dist/apis/createReminder.d.ts +12 -0
- package/node_modules/zca-js/dist/apis/createReminder.js +63 -0
- package/node_modules/zca-js/dist/apis/custom.d.ts +9 -0
- package/node_modules/zca-js/dist/apis/custom.js +15 -0
- package/node_modules/zca-js/dist/apis/deleteAutoReply.d.ts +5 -0
- package/node_modules/zca-js/dist/apis/deleteAutoReply.js +29 -0
- package/node_modules/zca-js/dist/apis/deleteAvatar.d.ts +9 -0
- package/node_modules/zca-js/dist/apis/deleteAvatar.js +27 -0
- package/node_modules/zca-js/dist/apis/deleteBankAccount.d.ts +11 -0
- package/node_modules/zca-js/dist/apis/deleteBankAccount.js +32 -0
- package/node_modules/zca-js/dist/apis/deleteCatalog.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/deleteCatalog.js +28 -0
- package/node_modules/zca-js/dist/apis/deleteChat.d.ts +19 -0
- package/node_modules/zca-js/dist/apis/deleteChat.js +50 -0
- package/node_modules/zca-js/dist/apis/deleteGroupInviteBox.d.ts +9 -0
- package/node_modules/zca-js/dist/apis/deleteGroupInviteBox.js +27 -0
- package/node_modules/zca-js/dist/apis/deleteMessage.d.ts +14 -0
- package/node_modules/zca-js/dist/apis/deleteMessage.js +52 -0
- package/node_modules/zca-js/dist/apis/deleteProductCatalog.d.ts +10 -0
- package/node_modules/zca-js/dist/apis/deleteProductCatalog.js +31 -0
- package/node_modules/zca-js/dist/apis/deleteSnapshotMobileMsg.js +18 -0
- package/node_modules/zca-js/dist/apis/disableGroupLink.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/disableGroupLink.js +24 -0
- package/node_modules/zca-js/dist/apis/disperseGroup.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/disperseGroup.js +28 -0
- package/node_modules/zca-js/dist/apis/editNote.d.ts +17 -0
- package/node_modules/zca-js/dist/apis/editNote.js +46 -0
- package/node_modules/zca-js/dist/apis/editReminder.d.ts +13 -0
- package/node_modules/zca-js/dist/apis/editReminder.js +61 -0
- package/node_modules/zca-js/dist/apis/enableGroupLink.d.ts +6 -0
- package/node_modules/zca-js/dist/apis/enableGroupLink.js +25 -0
- package/node_modules/zca-js/dist/apis/fetchAccountInfo.d.ts +5 -0
- package/node_modules/zca-js/dist/apis/fetchAccountInfo.js +10 -0
- package/node_modules/zca-js/dist/apis/findUser.d.ts +3 -0
- package/node_modules/zca-js/dist/apis/findUser.js +42 -0
- package/node_modules/zca-js/dist/apis/findUserByUsername.d.ts +3 -0
- package/node_modules/zca-js/dist/apis/findUserByUsername.js +27 -0
- package/node_modules/zca-js/dist/apis/forwardMessage.d.ts +24 -0
- package/node_modules/zca-js/dist/apis/forwardMessage.js +114 -0
- package/node_modules/zca-js/dist/apis/getAliasList.d.ts +8 -0
- package/node_modules/zca-js/dist/apis/getAliasList.js +27 -0
- package/node_modules/zca-js/dist/apis/getAllFriends.d.ts +3 -0
- package/node_modules/zca-js/dist/apis/getAllFriends.js +34 -0
- package/node_modules/zca-js/dist/apis/getAllGroups.d.ts +7 -0
- package/node_modules/zca-js/dist/apis/getAllGroups.js +10 -0
- package/node_modules/zca-js/dist/apis/getArchivedChatList.d.ts +5 -0
- package/node_modules/zca-js/dist/apis/getArchivedChatList.js +23 -0
- package/node_modules/zca-js/dist/apis/getAutoDeleteChat.d.ts +9 -0
- package/node_modules/zca-js/dist/apis/getAutoDeleteChat.js +21 -0
- package/node_modules/zca-js/dist/apis/getAutoReplyList.d.ts +6 -0
- package/node_modules/zca-js/dist/apis/getAutoReplyList.js +24 -0
- package/node_modules/zca-js/dist/apis/getAvatarList.d.ts +12 -0
- package/node_modules/zca-js/dist/apis/getAvatarList.js +28 -0
- package/node_modules/zca-js/dist/apis/getAvatarUrlProfile.d.ts +7 -0
- package/node_modules/zca-js/dist/apis/getAvatarUrlProfile.js +30 -0
- package/node_modules/zca-js/dist/apis/getBizAccount.d.ts +24 -0
- package/node_modules/zca-js/dist/apis/getBizAccount.js +27 -0
- package/node_modules/zca-js/dist/apis/getCatalogList.d.ts +18 -0
- package/node_modules/zca-js/dist/apis/getCatalogList.js +32 -0
- package/node_modules/zca-js/dist/apis/getCloseFriends.d.ts +3 -0
- package/node_modules/zca-js/dist/apis/getCloseFriends.js +20 -0
- package/node_modules/zca-js/dist/apis/getContext.d.ts +1 -0
- package/node_modules/zca-js/dist/apis/getContext.js +4 -0
- package/node_modules/zca-js/dist/apis/getCookie.d.ts +1 -0
- package/node_modules/zca-js/dist/apis/getCookie.js +9 -0
- package/node_modules/zca-js/dist/apis/getCrossDB.js +18 -0
- package/node_modules/zca-js/dist/apis/getFriendBoardList.d.ts +5 -0
- package/node_modules/zca-js/dist/apis/getFriendBoardList.js +26 -0
- package/node_modules/zca-js/dist/apis/getFriendOnlines.d.ts +10 -0
- package/node_modules/zca-js/dist/apis/getFriendOnlines.js +35 -0
- package/node_modules/zca-js/dist/apis/getFriendRecommendations.d.ts +42 -0
- package/node_modules/zca-js/dist/apis/getFriendRecommendations.js +27 -0
- package/node_modules/zca-js/dist/apis/getFriendRequestStatus.d.ts +8 -0
- package/node_modules/zca-js/dist/apis/getFriendRequestStatus.js +25 -0
- package/node_modules/zca-js/dist/apis/getFullAvatar.d.ts +5 -0
- package/node_modules/zca-js/dist/apis/getFullAvatar.js +25 -0
- package/node_modules/zca-js/dist/apis/getGroupBlockedMember.d.ts +23 -0
- package/node_modules/zca-js/dist/apis/getGroupBlockedMember.js +29 -0
- package/node_modules/zca-js/dist/apis/getGroupChatHistory.d.ts +8 -0
- package/node_modules/zca-js/dist/apis/getGroupChatHistory.js +36 -0
- package/node_modules/zca-js/dist/apis/getGroupInfo.d.ts +16 -0
- package/node_modules/zca-js/dist/apis/getGroupInfo.js +32 -0
- package/node_modules/zca-js/dist/apis/getGroupInviteBoxInfo.d.ts +32 -0
- package/node_modules/zca-js/dist/apis/getGroupInviteBoxInfo.js +38 -0
- package/node_modules/zca-js/dist/apis/getGroupInviteBoxList.d.ts +38 -0
- package/node_modules/zca-js/dist/apis/getGroupInviteBoxList.js +31 -0
- package/node_modules/zca-js/dist/apis/getGroupLinkDetail.d.ts +9 -0
- package/node_modules/zca-js/dist/apis/getGroupLinkDetail.js +25 -0
- package/node_modules/zca-js/dist/apis/getGroupLinkInfo.d.ts +34 -0
- package/node_modules/zca-js/dist/apis/getGroupLinkInfo.js +28 -0
- package/node_modules/zca-js/dist/apis/getGroupMembersInfo.d.ts +17 -0
- package/node_modules/zca-js/dist/apis/getGroupMembersInfo.js +24 -0
- package/node_modules/zca-js/dist/apis/getHiddenConversations.d.ts +11 -0
- package/node_modules/zca-js/dist/apis/getHiddenConversations.js +23 -0
- package/node_modules/zca-js/dist/apis/getLabels.d.ts +7 -0
- package/node_modules/zca-js/dist/apis/getLabels.js +28 -0
- package/node_modules/zca-js/dist/apis/getListBank.d.ts +5 -0
- package/node_modules/zca-js/dist/apis/getListBank.js +20 -0
- package/node_modules/zca-js/dist/apis/getListBankAccount.d.ts +7 -0
- package/node_modules/zca-js/dist/apis/getListBankAccount.js +27 -0
- package/node_modules/zca-js/dist/apis/getListBoard.d.ts +21 -0
- package/node_modules/zca-js/dist/apis/getListBoard.js +45 -0
- package/node_modules/zca-js/dist/apis/getListDevice.d.ts +10 -0
- package/node_modules/zca-js/dist/apis/getListDevice.js +22 -0
- package/node_modules/zca-js/dist/apis/getListReminder.d.ts +28 -0
- package/node_modules/zca-js/dist/apis/getListReminder.js +47 -0
- package/node_modules/zca-js/dist/apis/getMultiUsersByPhones.d.ts +5 -0
- package/node_modules/zca-js/dist/apis/getMultiUsersByPhones.js +39 -0
- package/node_modules/zca-js/dist/apis/getMute.d.ts +13 -0
- package/node_modules/zca-js/dist/apis/getMute.js +22 -0
- package/node_modules/zca-js/dist/apis/getOwnId.d.ts +1 -0
- package/node_modules/zca-js/dist/apis/getOwnId.js +4 -0
- package/node_modules/zca-js/dist/apis/getPendingGroupMembers.d.ts +11 -0
- package/node_modules/zca-js/dist/apis/getPendingGroupMembers.js +27 -0
- package/node_modules/zca-js/dist/apis/getPinConversations.d.ts +5 -0
- package/node_modules/zca-js/dist/apis/getPinConversations.js +22 -0
- package/node_modules/zca-js/dist/apis/getPollDetail.d.ts +3 -0
- package/node_modules/zca-js/dist/apis/getPollDetail.js +30 -0
- package/node_modules/zca-js/dist/apis/getProductCatalogList.d.ts +20 -0
- package/node_modules/zca-js/dist/apis/getProductCatalogList.js +33 -0
- package/node_modules/zca-js/dist/apis/getQR.d.ts +4 -0
- package/node_modules/zca-js/dist/apis/getQR.js +29 -0
- package/node_modules/zca-js/dist/apis/getQuickMessageList.d.ts +7 -0
- package/node_modules/zca-js/dist/apis/getQuickMessageList.js +24 -0
- package/node_modules/zca-js/dist/apis/getRelatedFriendGroup.d.ts +6 -0
- package/node_modules/zca-js/dist/apis/getRelatedFriendGroup.js +30 -0
- package/node_modules/zca-js/dist/apis/getReminder.d.ts +3 -0
- package/node_modules/zca-js/dist/apis/getReminder.js +25 -0
- package/node_modules/zca-js/dist/apis/getReminderResponses.d.ts +5 -0
- package/node_modules/zca-js/dist/apis/getReminderResponses.js +24 -0
- package/node_modules/zca-js/dist/apis/getSentFriendRequest.d.ts +18 -0
- package/node_modules/zca-js/dist/apis/getSentFriendRequest.js +24 -0
- package/node_modules/zca-js/dist/apis/getSettings.d.ts +3 -0
- package/node_modules/zca-js/dist/apis/getSettings.js +20 -0
- package/node_modules/zca-js/dist/apis/getStickerCategoryDetail.d.ts +3 -0
- package/node_modules/zca-js/dist/apis/getStickerCategoryDetail.js +24 -0
- package/node_modules/zca-js/dist/apis/getStickers.d.ts +1 -0
- package/node_modules/zca-js/dist/apis/getStickers.js +40 -0
- package/node_modules/zca-js/dist/apis/getStickersDetail.d.ts +3 -0
- package/node_modules/zca-js/dist/apis/getStickersDetail.js +40 -0
- package/node_modules/zca-js/dist/apis/getUnreadMark.d.ts +14 -0
- package/node_modules/zca-js/dist/apis/getUnreadMark.js +30 -0
- package/node_modules/zca-js/dist/apis/getUserInfo.d.ts +8 -0
- package/node_modules/zca-js/dist/apis/getUserInfo.js +44 -0
- package/node_modules/zca-js/dist/apis/inviteUserToGroups.d.ts +10 -0
- package/node_modules/zca-js/dist/apis/inviteUserToGroups.js +30 -0
- package/node_modules/zca-js/dist/apis/joinGroupInviteBox.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/joinGroupInviteBox.js +25 -0
- package/node_modules/zca-js/dist/apis/joinGroupLink.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/joinGroupLink.js +27 -0
- package/node_modules/zca-js/dist/apis/keepAlive.d.ts +4 -0
- package/node_modules/zca-js/dist/apis/keepAlive.js +22 -0
- package/node_modules/zca-js/dist/apis/lastOnline.d.ts +7 -0
- package/node_modules/zca-js/dist/apis/lastOnline.js +26 -0
- package/node_modules/zca-js/dist/apis/leaveGroup.d.ts +4 -0
- package/node_modules/zca-js/dist/apis/leaveGroup.js +33 -0
- package/node_modules/zca-js/dist/apis/listen.d.ts +102 -0
- package/node_modules/zca-js/dist/apis/listen.js +425 -0
- package/node_modules/zca-js/dist/apis/lockPoll.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/lockPoll.js +28 -0
- package/node_modules/zca-js/dist/apis/login.d.ts +3 -0
- package/node_modules/zca-js/dist/apis/login.js +96 -0
- package/node_modules/zca-js/dist/apis/loginQR.d.ts +71 -0
- package/node_modules/zca-js/dist/apis/loginQR.js +376 -0
- package/node_modules/zca-js/dist/apis/logoutV2.js +79 -0
- package/node_modules/zca-js/dist/apis/lostFocus.d.ts +4 -0
- package/node_modules/zca-js/dist/apis/lostFocus.js +23 -0
- package/node_modules/zca-js/dist/apis/parseLink.d.ts +21 -0
- package/node_modules/zca-js/dist/apis/parseLink.js +27 -0
- package/node_modules/zca-js/dist/apis/pullMobileMsg.js +22 -0
- package/node_modules/zca-js/dist/apis/registerCatalog.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/registerCatalog.js +27 -0
- package/node_modules/zca-js/dist/apis/rejectFriendRequest.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/rejectFriendRequest.js +27 -0
- package/node_modules/zca-js/dist/apis/removeFriend.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/removeFriend.js +28 -0
- package/node_modules/zca-js/dist/apis/removeFriendAlias.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/removeFriendAlias.js +24 -0
- package/node_modules/zca-js/dist/apis/removeGroupBlockedMember.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/removeGroupBlockedMember.js +28 -0
- package/node_modules/zca-js/dist/apis/removeGroupDeputy.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/removeGroupDeputy.js +30 -0
- package/node_modules/zca-js/dist/apis/removeQuickMessage.d.ts +5 -0
- package/node_modules/zca-js/dist/apis/removeQuickMessage.js +27 -0
- package/node_modules/zca-js/dist/apis/removeReminder.d.ts +3 -0
- package/node_modules/zca-js/dist/apis/removeReminder.js +40 -0
- package/node_modules/zca-js/dist/apis/removeUnreadMark.d.ts +8 -0
- package/node_modules/zca-js/dist/apis/removeUnreadMark.js +50 -0
- package/node_modules/zca-js/dist/apis/removeUserFromGroup.d.ts +4 -0
- package/node_modules/zca-js/dist/apis/removeUserFromGroup.js +34 -0
- package/node_modules/zca-js/dist/apis/requestSyncMessage.js +18 -0
- package/node_modules/zca-js/dist/apis/resetHiddenConversPin.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/resetHiddenConversPin.js +20 -0
- package/node_modules/zca-js/dist/apis/reuseAvatar.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/reuseAvatar.js +26 -0
- package/node_modules/zca-js/dist/apis/reviewPendingMemberRequest.d.ts +14 -0
- package/node_modules/zca-js/dist/apis/reviewPendingMemberRequest.js +38 -0
- package/node_modules/zca-js/dist/apis/scanURL.d.ts +4 -0
- package/node_modules/zca-js/dist/apis/scanURL.js +28 -0
- package/node_modules/zca-js/dist/apis/searchSticker.d.ts +3 -0
- package/node_modules/zca-js/dist/apis/searchSticker.js +28 -0
- package/node_modules/zca-js/dist/apis/sendBankCard.d.ts +9 -0
- package/node_modules/zca-js/dist/apis/sendBankCard.js +53 -0
- package/node_modules/zca-js/dist/apis/sendCard.d.ts +10 -0
- package/node_modules/zca-js/dist/apis/sendCard.js +75 -0
- package/node_modules/zca-js/dist/apis/sendDeliveredEvent.d.ts +16 -0
- package/node_modules/zca-js/dist/apis/sendDeliveredEvent.js +55 -0
- package/node_modules/zca-js/dist/apis/sendFriendRequest.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/sendFriendRequest.js +39 -0
- package/node_modules/zca-js/dist/apis/sendLink.d.ts +10 -0
- package/node_modules/zca-js/dist/apis/sendLink.js +78 -0
- package/node_modules/zca-js/dist/apis/sendMessage.d.ts +105 -0
- package/node_modules/zca-js/dist/apis/sendMessage.js +486 -0
- package/node_modules/zca-js/dist/apis/sendReport.d.ts +17 -0
- package/node_modules/zca-js/dist/apis/sendReport.js +53 -0
- package/node_modules/zca-js/dist/apis/sendSeenEvent.d.ts +16 -0
- package/node_modules/zca-js/dist/apis/sendSeenEvent.js +63 -0
- package/node_modules/zca-js/dist/apis/sendSticker.d.ts +10 -0
- package/node_modules/zca-js/dist/apis/sendSticker.js +74 -0
- package/node_modules/zca-js/dist/apis/sendTypingEvent.d.ts +5 -0
- package/node_modules/zca-js/dist/apis/sendTypingEvent.js +33 -0
- package/node_modules/zca-js/dist/apis/sendVideo.d.ts +35 -0
- package/node_modules/zca-js/dist/apis/sendVideo.js +134 -0
- package/node_modules/zca-js/dist/apis/sendVoice.d.ts +12 -0
- package/node_modules/zca-js/dist/apis/sendVoice.js +89 -0
- package/node_modules/zca-js/dist/apis/setHiddenConversations.d.ts +3 -0
- package/node_modules/zca-js/dist/apis/setHiddenConversations.js +39 -0
- package/node_modules/zca-js/dist/apis/setMute.d.ts +20 -0
- package/node_modules/zca-js/dist/apis/setMute.js +67 -0
- package/node_modules/zca-js/dist/apis/setPinnedConversations.d.ts +3 -0
- package/node_modules/zca-js/dist/apis/setPinnedConversations.js +34 -0
- package/node_modules/zca-js/dist/apis/sharePoll.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/sharePoll.js +28 -0
- package/node_modules/zca-js/dist/apis/unblockUser.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/unblockUser.js +28 -0
- package/node_modules/zca-js/dist/apis/undo.d.ts +9 -0
- package/node_modules/zca-js/dist/apis/undo.js +42 -0
- package/node_modules/zca-js/dist/apis/undoFriendRequest.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/undoFriendRequest.js +27 -0
- package/node_modules/zca-js/dist/apis/updateActiveStatus.d.ts +4 -0
- package/node_modules/zca-js/dist/apis/updateActiveStatus.js +27 -0
- package/node_modules/zca-js/dist/apis/updateArchivedChatList.d.ts +10 -0
- package/node_modules/zca-js/dist/apis/updateArchivedChatList.js +34 -0
- package/node_modules/zca-js/dist/apis/updateAutoDeleteChat.d.ts +9 -0
- package/node_modules/zca-js/dist/apis/updateAutoDeleteChat.js +40 -0
- package/node_modules/zca-js/dist/apis/updateAutoReply.d.ts +15 -0
- package/node_modules/zca-js/dist/apis/updateAutoReply.js +38 -0
- package/node_modules/zca-js/dist/apis/updateBankAccount.d.ts +9 -0
- package/node_modules/zca-js/dist/apis/updateBankAccount.js +31 -0
- package/node_modules/zca-js/dist/apis/updateCatalog.d.ts +11 -0
- package/node_modules/zca-js/dist/apis/updateCatalog.js +30 -0
- package/node_modules/zca-js/dist/apis/updateGroupSettings.d.ts +40 -0
- package/node_modules/zca-js/dist/apis/updateGroupSettings.js +43 -0
- package/node_modules/zca-js/dist/apis/updateHiddenConversPin.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/updateHiddenConversPin.js +30 -0
- package/node_modules/zca-js/dist/apis/updateLabels.d.ts +15 -0
- package/node_modules/zca-js/dist/apis/updateLabels.js +34 -0
- package/node_modules/zca-js/dist/apis/updateLang.d.ts +6 -0
- package/node_modules/zca-js/dist/apis/updateLang.js +30 -0
- package/node_modules/zca-js/dist/apis/updateProductCatalog.d.ts +25 -0
- package/node_modules/zca-js/dist/apis/updateProductCatalog.js +51 -0
- package/node_modules/zca-js/dist/apis/updateProfile.d.ts +20 -0
- package/node_modules/zca-js/dist/apis/updateProfile.js +43 -0
- package/node_modules/zca-js/dist/apis/updateProfileBio.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/updateProfileBio.js +27 -0
- package/node_modules/zca-js/dist/apis/updateQuickMessage.d.ts +11 -0
- package/node_modules/zca-js/dist/apis/updateQuickMessage.js +61 -0
- package/node_modules/zca-js/dist/apis/updateSettings.d.ts +16 -0
- package/node_modules/zca-js/dist/apis/updateSettings.js +90 -0
- package/node_modules/zca-js/dist/apis/upgradeGroupToCommunity.d.ts +2 -0
- package/node_modules/zca-js/dist/apis/upgradeGroupToCommunity.js +27 -0
- package/node_modules/zca-js/dist/apis/uploadAttachment.d.ts +50 -0
- package/node_modules/zca-js/dist/apis/uploadAttachment.js +197 -0
- package/node_modules/zca-js/dist/apis/uploadProductPhoto.d.ts +14 -0
- package/node_modules/zca-js/dist/apis/uploadProductPhoto.js +50 -0
- package/node_modules/zca-js/dist/apis/votePoll.d.ts +5 -0
- package/node_modules/zca-js/dist/apis/votePoll.js +29 -0
- package/node_modules/zca-js/dist/apis.d.ts +317 -0
- package/node_modules/zca-js/dist/apis.js +327 -0
- package/node_modules/zca-js/dist/cjs/Errors/ZaloApiError.cjs +11 -0
- package/node_modules/zca-js/dist/cjs/Errors/ZaloApiLoginQRAborted.cjs +12 -0
- package/node_modules/zca-js/dist/cjs/Errors/ZaloApiLoginQRDeclined.cjs +12 -0
- package/node_modules/zca-js/dist/cjs/Errors/ZaloApiMissingImageMetadataGetter.cjs +12 -0
- package/node_modules/zca-js/dist/cjs/apis/acceptFriendRequest.cjs +33 -0
- package/node_modules/zca-js/dist/cjs/apis/addGroupBlockedMember.cjs +33 -0
- package/node_modules/zca-js/dist/cjs/apis/addGroupDeputy.cjs +35 -0
- package/node_modules/zca-js/dist/cjs/apis/addPollOptions.cjs +31 -0
- package/node_modules/zca-js/dist/cjs/apis/addQuickMessage.cjs +65 -0
- package/node_modules/zca-js/dist/cjs/apis/addReaction.cjs +308 -0
- package/node_modules/zca-js/dist/cjs/apis/addUnreadMark.cjs +66 -0
- package/node_modules/zca-js/dist/cjs/apis/addUserToGroup.cjs +39 -0
- package/node_modules/zca-js/dist/cjs/apis/blockUser.cjs +33 -0
- package/node_modules/zca-js/dist/cjs/apis/blockViewFeed.cjs +35 -0
- package/node_modules/zca-js/dist/cjs/apis/changeAccountAvatar.cjs +57 -0
- package/node_modules/zca-js/dist/cjs/apis/changeFriendAlias.cjs +32 -0
- package/node_modules/zca-js/dist/cjs/apis/changeGroupAvatar.cjs +49 -0
- package/node_modules/zca-js/dist/cjs/apis/changeGroupName.cjs +37 -0
- package/node_modules/zca-js/dist/cjs/apis/changeGroupOwner.cjs +35 -0
- package/node_modules/zca-js/dist/cjs/apis/createAutoReply.cjs +42 -0
- package/node_modules/zca-js/dist/cjs/apis/createBankAccount.cjs +37 -0
- package/node_modules/zca-js/dist/cjs/apis/createCatalog.cjs +34 -0
- package/node_modules/zca-js/dist/cjs/apis/createGroup.cjs +48 -0
- package/node_modules/zca-js/dist/cjs/apis/createNote.cjs +52 -0
- package/node_modules/zca-js/dist/cjs/apis/createPoll.cjs +45 -0
- package/node_modules/zca-js/dist/cjs/apis/createProductCatalog.cjs +55 -0
- package/node_modules/zca-js/dist/cjs/apis/createReminder.cjs +77 -0
- package/node_modules/zca-js/dist/cjs/apis/custom.cjs +19 -0
- package/node_modules/zca-js/dist/cjs/apis/deleteAutoReply.cjs +34 -0
- package/node_modules/zca-js/dist/cjs/apis/deleteAvatar.cjs +32 -0
- package/node_modules/zca-js/dist/cjs/apis/deleteBankAccount.cjs +37 -0
- package/node_modules/zca-js/dist/cjs/apis/deleteCatalog.cjs +33 -0
- package/node_modules/zca-js/dist/cjs/apis/deleteChat.cjs +64 -0
- package/node_modules/zca-js/dist/cjs/apis/deleteGroupInviteBox.cjs +32 -0
- package/node_modules/zca-js/dist/cjs/apis/deleteMessage.cjs +66 -0
- package/node_modules/zca-js/dist/cjs/apis/deleteProductCatalog.cjs +36 -0
- package/node_modules/zca-js/dist/cjs/apis/deleteSnapshotMobileMsg.cjs +22 -0
- package/node_modules/zca-js/dist/cjs/apis/disableGroupLink.cjs +29 -0
- package/node_modules/zca-js/dist/cjs/apis/disperseGroup.cjs +33 -0
- package/node_modules/zca-js/dist/cjs/apis/editNote.cjs +51 -0
- package/node_modules/zca-js/dist/cjs/apis/editReminder.cjs +75 -0
- package/node_modules/zca-js/dist/cjs/apis/enableGroupLink.cjs +30 -0
- package/node_modules/zca-js/dist/cjs/apis/fetchAccountInfo.cjs +15 -0
- package/node_modules/zca-js/dist/cjs/apis/findUser.cjs +56 -0
- package/node_modules/zca-js/dist/cjs/apis/findUserByUsername.cjs +41 -0
- package/node_modules/zca-js/dist/cjs/apis/forwardMessage.cjs +129 -0
- package/node_modules/zca-js/dist/cjs/apis/getAliasList.cjs +32 -0
- package/node_modules/zca-js/dist/cjs/apis/getAllFriends.cjs +48 -0
- package/node_modules/zca-js/dist/cjs/apis/getAllGroups.cjs +15 -0
- package/node_modules/zca-js/dist/cjs/apis/getArchivedChatList.cjs +28 -0
- package/node_modules/zca-js/dist/cjs/apis/getAutoDeleteChat.cjs +26 -0
- package/node_modules/zca-js/dist/cjs/apis/getAutoReplyList.cjs +29 -0
- package/node_modules/zca-js/dist/cjs/apis/getAvatarList.cjs +33 -0
- package/node_modules/zca-js/dist/cjs/apis/getAvatarUrlProfile.cjs +44 -0
- package/node_modules/zca-js/dist/cjs/apis/getBizAccount.cjs +32 -0
- package/node_modules/zca-js/dist/cjs/apis/getCatalogList.cjs +37 -0
- package/node_modules/zca-js/dist/cjs/apis/getCloseFriends.cjs +25 -0
- package/node_modules/zca-js/dist/cjs/apis/getContext.cjs +9 -0
- package/node_modules/zca-js/dist/cjs/apis/getCookie.cjs +14 -0
- package/node_modules/zca-js/dist/cjs/apis/getCrossDB.cjs +22 -0
- package/node_modules/zca-js/dist/cjs/apis/getFriendBoardList.cjs +31 -0
- package/node_modules/zca-js/dist/cjs/apis/getFriendOnlines.cjs +40 -0
- package/node_modules/zca-js/dist/cjs/apis/getFriendRecommendations.cjs +32 -0
- package/node_modules/zca-js/dist/cjs/apis/getFriendRequestStatus.cjs +30 -0
- package/node_modules/zca-js/dist/cjs/apis/getFullAvatar.cjs +30 -0
- package/node_modules/zca-js/dist/cjs/apis/getGroupBlockedMember.cjs +34 -0
- package/node_modules/zca-js/dist/cjs/apis/getGroupChatHistory.cjs +51 -0
- package/node_modules/zca-js/dist/cjs/apis/getGroupInfo.cjs +37 -0
- package/node_modules/zca-js/dist/cjs/apis/getGroupInviteBoxInfo.cjs +43 -0
- package/node_modules/zca-js/dist/cjs/apis/getGroupInviteBoxList.cjs +36 -0
- package/node_modules/zca-js/dist/cjs/apis/getGroupLinkDetail.cjs +30 -0
- package/node_modules/zca-js/dist/cjs/apis/getGroupLinkInfo.cjs +33 -0
- package/node_modules/zca-js/dist/cjs/apis/getGroupMembersInfo.cjs +29 -0
- package/node_modules/zca-js/dist/cjs/apis/getHiddenConversations.cjs +28 -0
- package/node_modules/zca-js/dist/cjs/apis/getLabels.cjs +33 -0
- package/node_modules/zca-js/dist/cjs/apis/getListBank.cjs +25 -0
- package/node_modules/zca-js/dist/cjs/apis/getListBankAccount.cjs +32 -0
- package/node_modules/zca-js/dist/cjs/apis/getListBoard.cjs +59 -0
- package/node_modules/zca-js/dist/cjs/apis/getListDevice.cjs +27 -0
- package/node_modules/zca-js/dist/cjs/apis/getListReminder.cjs +61 -0
- package/node_modules/zca-js/dist/cjs/apis/getMultiUsersByPhones.cjs +53 -0
- package/node_modules/zca-js/dist/cjs/apis/getMute.cjs +27 -0
- package/node_modules/zca-js/dist/cjs/apis/getOwnId.cjs +9 -0
- package/node_modules/zca-js/dist/cjs/apis/getPendingGroupMembers.cjs +32 -0
- package/node_modules/zca-js/dist/cjs/apis/getPinConversations.cjs +27 -0
- package/node_modules/zca-js/dist/cjs/apis/getPollDetail.cjs +35 -0
- package/node_modules/zca-js/dist/cjs/apis/getProductCatalogList.cjs +38 -0
- package/node_modules/zca-js/dist/cjs/apis/getQR.cjs +34 -0
- package/node_modules/zca-js/dist/cjs/apis/getQuickMessageList.cjs +29 -0
- package/node_modules/zca-js/dist/cjs/apis/getRelatedFriendGroup.cjs +35 -0
- package/node_modules/zca-js/dist/cjs/apis/getReminder.cjs +30 -0
- package/node_modules/zca-js/dist/cjs/apis/getReminderResponses.cjs +29 -0
- package/node_modules/zca-js/dist/cjs/apis/getSentFriendRequest.cjs +29 -0
- package/node_modules/zca-js/dist/cjs/apis/getSettings.cjs +25 -0
- package/node_modules/zca-js/dist/cjs/apis/getStickerCategoryDetail.cjs +29 -0
- package/node_modules/zca-js/dist/cjs/apis/getStickers.cjs +45 -0
- package/node_modules/zca-js/dist/cjs/apis/getStickersDetail.cjs +45 -0
- package/node_modules/zca-js/dist/cjs/apis/getUnreadMark.cjs +35 -0
- package/node_modules/zca-js/dist/cjs/apis/getUserInfo.cjs +58 -0
- package/node_modules/zca-js/dist/cjs/apis/inviteUserToGroups.cjs +35 -0
- package/node_modules/zca-js/dist/cjs/apis/joinGroupInviteBox.cjs +30 -0
- package/node_modules/zca-js/dist/cjs/apis/joinGroupLink.cjs +32 -0
- package/node_modules/zca-js/dist/cjs/apis/keepAlive.cjs +27 -0
- package/node_modules/zca-js/dist/cjs/apis/lastOnline.cjs +31 -0
- package/node_modules/zca-js/dist/cjs/apis/leaveGroup.cjs +38 -0
- package/node_modules/zca-js/dist/cjs/apis/listen.cjs +440 -0
- package/node_modules/zca-js/dist/cjs/apis/lockPoll.cjs +33 -0
- package/node_modules/zca-js/dist/cjs/apis/login.cjs +102 -0
- package/node_modules/zca-js/dist/cjs/apis/loginQR.cjs +368 -0
- package/node_modules/zca-js/dist/cjs/apis/logoutV2.cjs +83 -0
- package/node_modules/zca-js/dist/cjs/apis/lostFocus.cjs +28 -0
- package/node_modules/zca-js/dist/cjs/apis/parseLink.cjs +32 -0
- package/node_modules/zca-js/dist/cjs/apis/pullMobileMsg.cjs +26 -0
- package/node_modules/zca-js/dist/cjs/apis/registerCatalog.cjs +32 -0
- package/node_modules/zca-js/dist/cjs/apis/rejectFriendRequest.cjs +32 -0
- package/node_modules/zca-js/dist/cjs/apis/removeFriend.cjs +33 -0
- package/node_modules/zca-js/dist/cjs/apis/removeFriendAlias.cjs +29 -0
- package/node_modules/zca-js/dist/cjs/apis/removeGroupBlockedMember.cjs +33 -0
- package/node_modules/zca-js/dist/cjs/apis/removeGroupDeputy.cjs +35 -0
- package/node_modules/zca-js/dist/cjs/apis/removeQuickMessage.cjs +32 -0
- package/node_modules/zca-js/dist/cjs/apis/removeReminder.cjs +54 -0
- package/node_modules/zca-js/dist/cjs/apis/removeUnreadMark.cjs +64 -0
- package/node_modules/zca-js/dist/cjs/apis/removeUserFromGroup.cjs +39 -0
- package/node_modules/zca-js/dist/cjs/apis/requestSyncMessage.cjs +22 -0
- package/node_modules/zca-js/dist/cjs/apis/resetHiddenConversPin.cjs +25 -0
- package/node_modules/zca-js/dist/cjs/apis/reuseAvatar.cjs +31 -0
- package/node_modules/zca-js/dist/cjs/apis/reviewPendingMemberRequest.cjs +43 -0
- package/node_modules/zca-js/dist/cjs/apis/scanURL.cjs +33 -0
- package/node_modules/zca-js/dist/cjs/apis/searchSticker.cjs +33 -0
- package/node_modules/zca-js/dist/cjs/apis/sendBankCard.cjs +68 -0
- package/node_modules/zca-js/dist/cjs/apis/sendCard.cjs +89 -0
- package/node_modules/zca-js/dist/cjs/apis/sendDeliveredEvent.cjs +69 -0
- package/node_modules/zca-js/dist/cjs/apis/sendFriendRequest.cjs +44 -0
- package/node_modules/zca-js/dist/cjs/apis/sendLink.cjs +92 -0
- package/node_modules/zca-js/dist/cjs/apis/sendMessage.cjs +500 -0
- package/node_modules/zca-js/dist/cjs/apis/sendReport.cjs +67 -0
- package/node_modules/zca-js/dist/cjs/apis/sendSeenEvent.cjs +77 -0
- package/node_modules/zca-js/dist/cjs/apis/sendSticker.cjs +88 -0
- package/node_modules/zca-js/dist/cjs/apis/sendTypingEvent.cjs +47 -0
- package/node_modules/zca-js/dist/cjs/apis/sendVideo.cjs +148 -0
- package/node_modules/zca-js/dist/cjs/apis/sendVoice.cjs +103 -0
- package/node_modules/zca-js/dist/cjs/apis/setHiddenConversations.cjs +53 -0
- package/node_modules/zca-js/dist/cjs/apis/setMute.cjs +81 -0
- package/node_modules/zca-js/dist/cjs/apis/setPinnedConversations.cjs +48 -0
- package/node_modules/zca-js/dist/cjs/apis/sharePoll.cjs +33 -0
- package/node_modules/zca-js/dist/cjs/apis/unblockUser.cjs +33 -0
- package/node_modules/zca-js/dist/cjs/apis/undo.cjs +56 -0
- package/node_modules/zca-js/dist/cjs/apis/undoFriendRequest.cjs +32 -0
- package/node_modules/zca-js/dist/cjs/apis/updateActiveStatus.cjs +32 -0
- package/node_modules/zca-js/dist/cjs/apis/updateArchivedChatList.cjs +39 -0
- package/node_modules/zca-js/dist/cjs/apis/updateAutoDeleteChat.cjs +54 -0
- package/node_modules/zca-js/dist/cjs/apis/updateAutoReply.cjs +43 -0
- package/node_modules/zca-js/dist/cjs/apis/updateBankAccount.cjs +36 -0
- package/node_modules/zca-js/dist/cjs/apis/updateCatalog.cjs +35 -0
- package/node_modules/zca-js/dist/cjs/apis/updateGroupSettings.cjs +48 -0
- package/node_modules/zca-js/dist/cjs/apis/updateHiddenConversPin.cjs +35 -0
- package/node_modules/zca-js/dist/cjs/apis/updateLabels.cjs +39 -0
- package/node_modules/zca-js/dist/cjs/apis/updateLang.cjs +35 -0
- package/node_modules/zca-js/dist/cjs/apis/updateProductCatalog.cjs +56 -0
- package/node_modules/zca-js/dist/cjs/apis/updateProfile.cjs +48 -0
- package/node_modules/zca-js/dist/cjs/apis/updateProfileBio.cjs +32 -0
- package/node_modules/zca-js/dist/cjs/apis/updateQuickMessage.cjs +66 -0
- package/node_modules/zca-js/dist/cjs/apis/updateSettings.cjs +95 -0
- package/node_modules/zca-js/dist/cjs/apis/upgradeGroupToCommunity.cjs +32 -0
- package/node_modules/zca-js/dist/cjs/apis/uploadAttachment.cjs +211 -0
- package/node_modules/zca-js/dist/cjs/apis/uploadProductPhoto.cjs +55 -0
- package/node_modules/zca-js/dist/cjs/apis/votePoll.cjs +34 -0
- package/node_modules/zca-js/dist/cjs/apis.cjs +332 -0
- package/node_modules/zca-js/dist/cjs/context.cjs +34 -0
- package/node_modules/zca-js/dist/cjs/index.cjs +159 -0
- package/node_modules/zca-js/dist/cjs/models/AutoReply.cjs +9 -0
- package/node_modules/zca-js/dist/cjs/models/Bank.cjs +263 -0
- package/node_modules/zca-js/dist/cjs/models/Board.cjs +8 -0
- package/node_modules/zca-js/dist/cjs/models/DeliveredMessage.cjs +23 -0
- package/node_modules/zca-js/dist/cjs/models/Enum.cjs +27 -0
- package/node_modules/zca-js/dist/cjs/models/FriendEvent.cjs +87 -0
- package/node_modules/zca-js/dist/cjs/models/Group.cjs +13 -0
- package/node_modules/zca-js/dist/cjs/models/GroupEvent.cjs +94 -0
- package/node_modules/zca-js/dist/cjs/models/Message.cjs +35 -0
- package/node_modules/zca-js/dist/cjs/models/Reaction.cjs +74 -0
- package/node_modules/zca-js/dist/cjs/models/Reminder.cjs +9 -0
- package/node_modules/zca-js/dist/cjs/models/SeenMessage.cjs +23 -0
- package/node_modules/zca-js/dist/cjs/models/Typing.cjs +23 -0
- package/node_modules/zca-js/dist/cjs/models/Undo.cjs +16 -0
- package/node_modules/zca-js/dist/cjs/models/ZBusiness.cjs +39 -0
- package/node_modules/zca-js/dist/cjs/update.cjs +34 -0
- package/node_modules/zca-js/dist/cjs/utils.cjs +703 -0
- package/node_modules/zca-js/dist/cjs/zalo.cjs +112 -0
- package/node_modules/zca-js/dist/context.d.ts +179 -0
- package/node_modules/zca-js/dist/context.js +28 -0
- package/node_modules/zca-js/dist/index.d.ts +166 -0
- package/node_modules/zca-js/dist/index.js +14 -0
- package/node_modules/zca-js/dist/models/Attachment.d.ts +9 -0
- package/node_modules/zca-js/dist/models/Attachment.js +1 -0
- package/node_modules/zca-js/dist/models/AutoReply.d.ts +20 -0
- package/node_modules/zca-js/dist/models/AutoReply.js +7 -0
- package/node_modules/zca-js/dist/models/Bank.d.ts +291 -0
- package/node_modules/zca-js/dist/models/Bank.js +262 -0
- package/node_modules/zca-js/dist/models/Board.d.ts +60 -0
- package/node_modules/zca-js/dist/models/Board.js +6 -0
- package/node_modules/zca-js/dist/models/Catalog.d.ts +16 -0
- package/node_modules/zca-js/dist/models/Catalog.js +1 -0
- package/node_modules/zca-js/dist/models/DeliveredMessage.d.ts +27 -0
- package/node_modules/zca-js/dist/models/DeliveredMessage.js +17 -0
- package/node_modules/zca-js/dist/models/Enum.d.ts +21 -0
- package/node_modules/zca-js/dist/models/Enum.js +25 -0
- package/node_modules/zca-js/dist/models/FriendEvent.d.ts +107 -0
- package/node_modules/zca-js/dist/models/FriendEvent.js +83 -0
- package/node_modules/zca-js/dist/models/Group.d.ts +125 -0
- package/node_modules/zca-js/dist/models/Group.js +11 -0
- package/node_modules/zca-js/dist/models/GroupEvent.d.ts +178 -0
- package/node_modules/zca-js/dist/models/GroupEvent.js +90 -0
- package/node_modules/zca-js/dist/models/Label.d.ts +10 -0
- package/node_modules/zca-js/dist/models/Label.js +1 -0
- package/node_modules/zca-js/dist/models/Message.d.ts +91 -0
- package/node_modules/zca-js/dist/models/Message.js +29 -0
- package/node_modules/zca-js/dist/models/ProductCatalog.d.ts +17 -0
- package/node_modules/zca-js/dist/models/ProductCatalog.js +1 -0
- package/node_modules/zca-js/dist/models/QuickMessage.d.ts +25 -0
- package/node_modules/zca-js/dist/models/QuickMessage.js +1 -0
- package/node_modules/zca-js/dist/models/Reaction.d.ts +85 -0
- package/node_modules/zca-js/dist/models/Reaction.js +70 -0
- package/node_modules/zca-js/dist/models/Reminder.d.ts +51 -0
- package/node_modules/zca-js/dist/models/Reminder.js +7 -0
- package/node_modules/zca-js/dist/models/SeenMessage.d.ts +26 -0
- package/node_modules/zca-js/dist/models/SeenMessage.js +17 -0
- package/node_modules/zca-js/dist/models/Sticker.d.ts +27 -0
- package/node_modules/zca-js/dist/models/Sticker.js +1 -0
- package/node_modules/zca-js/dist/models/Typing.d.ts +24 -0
- package/node_modules/zca-js/dist/models/Typing.js +17 -0
- package/node_modules/zca-js/dist/models/Undo.d.ts +34 -0
- package/node_modules/zca-js/dist/models/Undo.js +12 -0
- package/node_modules/zca-js/dist/models/User.d.ts +70 -0
- package/node_modules/zca-js/dist/models/User.js +1 -0
- package/node_modules/zca-js/dist/models/ZBusiness.d.ts +22 -0
- package/node_modules/zca-js/dist/models/ZBusiness.js +35 -0
- package/node_modules/zca-js/dist/models/index.d.ts +22 -0
- package/node_modules/zca-js/dist/models/index.js +22 -0
- package/node_modules/zca-js/dist/update.d.ts +2 -0
- package/node_modules/zca-js/dist/update.js +29 -0
- package/node_modules/zca-js/dist/utils.d.ts +167 -0
- package/node_modules/zca-js/dist/utils.js +719 -0
- package/node_modules/zca-js/dist/zalo.d.ts +41 -0
- package/node_modules/zca-js/dist/zalo.js +107 -0
- package/node_modules/zca-js/eslint.config.js +21 -0
- package/node_modules/zca-js/index.d.ts +2 -0
- package/node_modules/zca-js/package.json +78 -0
- package/node_modules/zca-js/rollup.config.js +28 -0
- package/package.json +79 -62
- package/patches/zca-js+2.2.0.patch +1677 -0
- package/src/cli.test.js +34 -5
- package/src/commands/account.js +98 -5
- package/src/commands/auto-reply.js +30 -10
- package/src/commands/catalog.js +5 -4
- package/src/commands/conv.js +551 -14
- package/src/commands/friend.js +19 -7
- package/src/commands/group.js +82 -31
- package/src/commands/listen.js +607 -65
- package/src/commands/login.js +179 -20
- package/src/commands/mcp.js +392 -41
- package/src/commands/msg.js +1278 -139
- package/src/commands/oa-listen.js +130 -20
- package/src/commands/oa.js +26 -5
- package/src/commands/poll.js +7 -2
- package/src/commands/profile.js +3 -2
- package/src/commands/sync.js +2052 -0
- package/src/core/accounts.js +69 -6
- package/src/core/cached-message.js +200 -0
- package/src/core/coverage.js +90 -0
- package/src/core/daemon-channel.js +638 -0
- package/src/core/daemon-sync.js +181 -0
- package/src/core/db.js +1610 -0
- package/src/core/forward.js +112 -0
- package/src/core/group-history.js +248 -0
- package/src/core/group-members.js +68 -0
- package/src/core/group-settings.js +250 -0
- package/src/core/history-fetch.js +208 -0
- package/src/core/listener-lifecycle.js +90 -0
- package/src/core/live-api.js +47 -0
- package/src/core/live-store.js +733 -0
- package/src/core/lock.js +129 -0
- package/src/core/logout.js +289 -0
- package/src/core/offline-queue.js +194 -0
- package/src/core/pin.js +222 -0
- package/src/core/read-state.js +318 -0
- package/src/core/receipts.js +679 -0
- package/src/core/recent-conversations.js +30 -0
- package/src/core/self-heal.js +522 -0
- package/src/core/socket-tap.js +154 -0
- package/src/core/sync-v2/assets.js +181 -0
- package/src/core/sync-v2/board.js +338 -0
- package/src/core/sync-v2/conv-state.js +152 -0
- package/src/core/sync-v2/gap-advice.js +110 -0
- package/src/core/sync-v2/gid.js +103 -0
- package/src/core/sync-v2/index.js +1208 -0
- package/src/core/sync-v2/keepalive.js +177 -0
- package/src/core/sync-v2/media.js +704 -0
- package/src/core/sync-v2/message-types.js +522 -0
- package/src/core/sync-v2/plan.js +95 -0
- package/src/core/sync-v2/reactions.js +236 -0
- package/src/core/sync-v2/renewlink.js +124 -0
- package/src/core/sync-v2/zcloud-cipher.js +88 -0
- package/src/core/sync-v2/zcloud.js +675 -0
- package/src/core/sync.js +540 -0
- package/src/core/zalo-client.js +179 -61
- package/src/core/zca-custom.js +78 -0
- package/src/index.js +14 -3
- package/src/mcp/mcp-config.js +40 -3
- package/src/mcp/mcp-http-transport.js +11 -2
- package/src/mcp/mcp-server.js +4 -2
- package/src/mcp/mcp-tools.js +837 -97
- package/src/mcp/message-buffer.js +38 -8
- package/src/mcp/message-buffer.test.js +67 -15
- package/src/mcp/notifier.js +17 -1
- package/src/mcp/notifier.test.js +6 -0
- package/src/utils/bank-helpers.js +8 -3
- package/src/utils/device-fingerprint.js +72 -0
- package/src/utils/mentions.js +140 -0
- package/src/utils/my-documents.js +95 -0
- package/src/utils/open-file.js +49 -0
- package/src/utils/output.js +75 -4
- package/src/utils/parse-options.js +56 -0
- package/src/utils/qr-http-server.js +44 -7
- package/src/utils/quote.js +203 -0
- package/src/utils/thread-type.js +72 -0
- package/src/utils/update-check.js +42 -1
- package/src/utils/urgency.js +29 -0
- package/src/mcp/media-downloader.js +0 -191
- package/src/mcp/media-downloader.test.js +0 -45
- package/src/utils/qr-display.test.js +0 -97
package/src/commands/listen.js
CHANGED
|
@@ -7,6 +7,30 @@ import { appendFileSync, mkdirSync, existsSync } from "fs";
|
|
|
7
7
|
import { resolve, join } from "path";
|
|
8
8
|
import { getApi, autoLogin, clearSession } from "../core/zalo-client.js";
|
|
9
9
|
import { success, error, info, warning } from "../utils/output.js";
|
|
10
|
+
import { getActive } from "../core/accounts.js";
|
|
11
|
+
import { CONFIG_DIR } from "../core/credentials.js";
|
|
12
|
+
import { acquireLock, releaseLock } from "../core/lock.js";
|
|
13
|
+
import { createStageLock, startDaemonChannel } from "../core/daemon-channel.js";
|
|
14
|
+
import { createSyncRunners } from "../core/daemon-sync.js";
|
|
15
|
+
import { createSocketTap } from "../core/socket-tap.js";
|
|
16
|
+
import { createSelfHeal } from "../core/self-heal.js";
|
|
17
|
+
import { createReadStateSync, readStateEvent } from "../core/read-state.js";
|
|
18
|
+
import { initDb, getPendingSyncGaps } from "../core/db.js";
|
|
19
|
+
import {
|
|
20
|
+
storeLiveMessage,
|
|
21
|
+
storeLiveDelete,
|
|
22
|
+
storeLiveReaction,
|
|
23
|
+
storeLiveUndo,
|
|
24
|
+
storeGroupEvent,
|
|
25
|
+
storeGroupEventRow,
|
|
26
|
+
noteBoardChange,
|
|
27
|
+
storeReceipts,
|
|
28
|
+
isRemovalMessage,
|
|
29
|
+
} from "../core/live-store.js";
|
|
30
|
+
import { downloadSyncedMedia } from "../core/sync-v2/media.js";
|
|
31
|
+
import { SyncManager } from "../core/sync.js";
|
|
32
|
+
import { describeGap } from "../core/sync-v2/gap-advice.js";
|
|
33
|
+
import { createDeliveredReceipts } from "../core/receipts.js";
|
|
10
34
|
|
|
11
35
|
/** Thread types matching zca-js ThreadType enum */
|
|
12
36
|
const THREAD_USER = 0;
|
|
@@ -36,7 +60,7 @@ export function registerListenCommand(program) {
|
|
|
36
60
|
)
|
|
37
61
|
.option(
|
|
38
62
|
"-e, --events <types>",
|
|
39
|
-
"Comma-separated event types: message,friend,group,reaction (default: message,friend)",
|
|
63
|
+
"Comma-separated event types: message,friend,group,reaction,read (default: message,friend)",
|
|
40
64
|
"message,friend",
|
|
41
65
|
)
|
|
42
66
|
.option("-f, --filter <type>", "Message filter: user (DM only), group (groups only), all", "all")
|
|
@@ -44,13 +68,223 @@ export function registerListenCommand(program) {
|
|
|
44
68
|
.option("--no-self", "Exclude self-sent messages")
|
|
45
69
|
.option("--auto-accept", "Auto-accept incoming friend requests")
|
|
46
70
|
.option("--save <dir>", "Save messages locally as JSONL files (one file per thread, e.g. --save ./zalo-logs)")
|
|
71
|
+
.option(
|
|
72
|
+
"--no-delivered-receipts",
|
|
73
|
+
"Do not acknowledge received messages as delivered (every Zalo client does; seen receipts are never sent)",
|
|
74
|
+
)
|
|
75
|
+
.option(
|
|
76
|
+
"--no-self-heal",
|
|
77
|
+
"Do not pull what a dropped socket missed from Zalo's offline queue on reconnect (the default does, as Zalo Web does, on this socket and with no phone tap)",
|
|
78
|
+
)
|
|
47
79
|
.action(async (opts) => {
|
|
80
|
+
const activeAcc = getActive();
|
|
81
|
+
if (!activeAcc) {
|
|
82
|
+
error("No active account. Please login first.");
|
|
83
|
+
process.exit(1);
|
|
84
|
+
}
|
|
85
|
+
const accountDir = join(CONFIG_DIR, "accounts", activeAcc.ownId);
|
|
86
|
+
if (!acquireLock(accountDir)) {
|
|
87
|
+
error(`Another listen daemon is already running for account ${activeAcc.ownId}.`);
|
|
88
|
+
process.exit(1);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Stop the daemon channel and release the lock before an exit that
|
|
92
|
+
* skips the SIGINT path, as `mcp start`'s dropLock() does -- so no
|
|
93
|
+
* channel file or lock is left for the next start to reclaim.
|
|
94
|
+
*/
|
|
95
|
+
const dropLock = () => {
|
|
96
|
+
try {
|
|
97
|
+
channel?.stop();
|
|
98
|
+
} catch {
|
|
99
|
+
/* not started yet: the socket closed during start-up */
|
|
100
|
+
}
|
|
101
|
+
try {
|
|
102
|
+
releaseLock(accountDir);
|
|
103
|
+
} catch (e) {
|
|
104
|
+
console.error(`[listen] Failed to release lock: ${e.message}`);
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
try {
|
|
108
|
+
initDb(join(accountDir, "zalo.db"));
|
|
109
|
+
info(`Local database initialized at ${accountDir}/zalo.db`);
|
|
110
|
+
} catch (err) {
|
|
111
|
+
releaseLock(accountDir);
|
|
112
|
+
error(`Failed to initialize local DB: ${err.message}`);
|
|
113
|
+
process.exit(1);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Gap tracking: a small per-account SyncManager shares zalo.db with
|
|
117
|
+
// this listener so a crash, manual close, or WS drop gets its window
|
|
118
|
+
// recorded, and the owner is told which `sync` run closes it —
|
|
119
|
+
// instead of silently losing whatever arrived while we weren't
|
|
120
|
+
// connected. See reportGap() for why the daemon reports rather than
|
|
121
|
+
// backfilling on its own.
|
|
122
|
+
const syncManager = new SyncManager(getApi(), activeAcc.ownId);
|
|
123
|
+
const HEARTBEAT_MS = 60 * 1000;
|
|
124
|
+
let lastHeartbeatAt = 0;
|
|
125
|
+
// The one place that knows whether the socket is actually up. The
|
|
126
|
+
// `connected`/`disconnected` handlers below own it; everything else
|
|
127
|
+
// reads it. Starts null: nothing is claimed before the first connect.
|
|
128
|
+
let downSince = null;
|
|
129
|
+
// Set by SIGINT before anything is torn down. listener.stop() emits
|
|
130
|
+
// closed(1000), which is indistinguishable from a real drop, so
|
|
131
|
+
// without this the shutdown path runs the RECOVERY path: five
|
|
132
|
+
// seconds after the user sees "Stopped", the process re-logged in
|
|
133
|
+
// and opened a fresh socket -- with daemon.lock already released and
|
|
134
|
+
// daemon-channel.json already deleted. The next listen/mcp/sync then
|
|
135
|
+
// took the free lock and the two sessions flapped over code 3000.
|
|
136
|
+
let stopping = false;
|
|
137
|
+
function heartbeat() {
|
|
138
|
+
const now = Date.now();
|
|
139
|
+
if (now - lastHeartbeatAt < HEARTBEAT_MS) return;
|
|
140
|
+
lastHeartbeatAt = now;
|
|
141
|
+
// markConnected() means "coverage is good up to now". Stamping
|
|
142
|
+
// that on a timer with no liveness check kept advancing
|
|
143
|
+
// lastConnectedAt while the socket was down -- through zca-js's
|
|
144
|
+
// internal retry, the 5s re-login wait and the 30s retry wait --
|
|
145
|
+
// so a crash mid-outage made the NEXT launch compute its
|
|
146
|
+
// startup-gap from a moment we were not actually connected, and
|
|
147
|
+
// the outage vanished.
|
|
148
|
+
if (downSince !== null) return;
|
|
149
|
+
syncManager.markConnected();
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Record a window we were not connected for, and tell the owner how
|
|
154
|
+
* to close it.
|
|
155
|
+
*
|
|
156
|
+
* How the daemon self-heals
|
|
157
|
+
* -------------------------
|
|
158
|
+
* A window the socket was down for is first RECORDED here, then
|
|
159
|
+
* closed from Zalo's offline queue -- the way Zalo Web closes it on
|
|
160
|
+
* every connect. After each handshake the daemon asks each message
|
|
161
|
+
* queue (510_1, 511_1) for everything after the last message it
|
|
162
|
+
* stored, pages until the server says there is no more, and writes
|
|
163
|
+
* what comes back insert-if-absent (src/core/self-heal.js). The gap
|
|
164
|
+
* is resolved only for the window that pull covered; whatever it
|
|
165
|
+
* could not reach stays pending, named with the `sync` command that
|
|
166
|
+
* closes it.
|
|
167
|
+
*
|
|
168
|
+
* Three facts shape it:
|
|
169
|
+
*
|
|
170
|
+
* - The socket is shared fine. The catch-up runs on this daemon's
|
|
171
|
+
* own socket while live traffic keeps arriving and being stored;
|
|
172
|
+
* nothing is stopped or reopened.
|
|
173
|
+
* - One of OUR stages at a time. It holds the daemon channel's
|
|
174
|
+
* stage lock, so it waits behind a running `zalo-agent sync`
|
|
175
|
+
* stage or `msg history` fetch, and a stage arriving meanwhile is
|
|
176
|
+
* refused (409) rather than run beside it. Two stages sharing the
|
|
177
|
+
* socket is what is measured to break the restore (the ordering
|
|
178
|
+
* note in src/commands/sync.js).
|
|
179
|
+
* - The phone tap is only for the full restore. The offline queue
|
|
180
|
+
* is served by Zalo's servers; `transfer-sync-v2` (cmd 590) is
|
|
181
|
+
* the one step that needs "ĐỒNG BỘ NGAY" on the owner's phone,
|
|
182
|
+
* and the daemon never starts it on its own -- only a
|
|
183
|
+
* `zalo-agent sync` someone typed does. (The self-heal this
|
|
184
|
+
* replaces called the retired pullMobileMsg/getCrossDB pair,
|
|
185
|
+
* MEASURED 2026-09-20 to have zero call sites in Zalo Web: it
|
|
186
|
+
* announced an attempt, said nothing more, and the gap stayed
|
|
187
|
+
* pending forever.)
|
|
188
|
+
*
|
|
189
|
+
* With `--no-self-heal` a gap is recorded and reported as before,
|
|
190
|
+
* and closes only when a `sync` run does, via
|
|
191
|
+
* `recordRestoreSuccess(win, {resolveGaps: true})`.
|
|
192
|
+
*/
|
|
193
|
+
/** @returns {number|null} the recorded gap's id, or null when none was filed. */
|
|
194
|
+
function reportGap(fromTs, reason) {
|
|
195
|
+
if (!fromTs) return null;
|
|
196
|
+
const toTs = Date.now();
|
|
197
|
+
const gapId = syncManager.recordGap(fromTs, toTs, reason);
|
|
198
|
+
if (!gapId) return null; // under recordGap's 1-second floor
|
|
199
|
+
let pendingGaps = [];
|
|
200
|
+
try {
|
|
201
|
+
pendingGaps = getPendingSyncGaps();
|
|
202
|
+
} catch {
|
|
203
|
+
// Advice degrades to this gap alone — never worth crashing a listener.
|
|
204
|
+
}
|
|
205
|
+
// recordGap() clamps to MAX_GAP_MS, so re-read the stored row
|
|
206
|
+
// rather than trusting fromTs: a 30-day-old lastConnectedAt is
|
|
207
|
+
// filed as a 14-day gap, and `--from` must match what was filed.
|
|
208
|
+
const stored = pendingGaps.find((g) => String(g.id) === String(gapId));
|
|
209
|
+
const advice = describeGap({
|
|
210
|
+
fromTs: stored ? Number(stored.fromTs) : fromTs,
|
|
211
|
+
toTs: stored ? Number(stored.toTs) : toTs,
|
|
212
|
+
reason,
|
|
213
|
+
pendingGaps,
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
warning(`Coverage gap (${advice.reason}, ${advice.span}): ${advice.from} → ${advice.to}`);
|
|
217
|
+
if (opts.selfHeal !== false) {
|
|
218
|
+
// The self-heal runs on the next handshake and reports what
|
|
219
|
+
// it recovered, and what it could not, on its own.
|
|
220
|
+
info(" Recovering it now from Zalo's offline queue on this socket (no phone tap needed).");
|
|
221
|
+
info(` Whatever that cannot reach stays pending for: ${advice.command}`);
|
|
222
|
+
return gapId;
|
|
223
|
+
}
|
|
224
|
+
info(" Messages that arrived in that window are not in the local cache.");
|
|
225
|
+
info(` To restore them: ${advice.command}`);
|
|
226
|
+
// No longer "stop this daemon first". That run asks this daemon
|
|
227
|
+
// to perform the restore on the socket it already holds, so
|
|
228
|
+
// nothing is torn down -- which matters here more than anywhere,
|
|
229
|
+
// because the stop/start recipe opened a fresh gap of its own
|
|
230
|
+
// while closing this one. The phone tap is NOT removed by that;
|
|
231
|
+
// only the second WebSocket is.
|
|
232
|
+
info(" That run uses this daemon's own socket while it keeps listening, so nothing");
|
|
233
|
+
info(' needs stopping. It does need a tap on "ĐỒNG BỘ NGAY" on your phone.');
|
|
234
|
+
// Load-bearing: recordRestoreSuccess() only clears a gap lying
|
|
235
|
+
// wholly inside the restored window, so a run started from a
|
|
236
|
+
// later date succeeds and leaves this gap pending anyway.
|
|
237
|
+
info(" The gap stays pending until such a run completes.");
|
|
238
|
+
if (advice.allCommand) {
|
|
239
|
+
info(
|
|
240
|
+
` ${advice.otherPending} other gap(s) are also pending — ` +
|
|
241
|
+
`${advice.allCommand} covers all ${advice.pendingCount}.`,
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
return gapId;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// On startup, report whatever window we were not connected for.
|
|
248
|
+
//
|
|
249
|
+
// This used to fire only when the process had been down longer than
|
|
250
|
+
// ~30s, on the theory that a quick restart is not worth reporting.
|
|
251
|
+
// That theory is wrong in the one case that matters: a crash under a
|
|
252
|
+
// supervisor restarts in seconds, lands inside the old threshold,
|
|
253
|
+
// and the listener then called markConnected() -- asserting it was
|
|
254
|
+
// caught up over a window it never saw. Messages lost to a 5-second
|
|
255
|
+
// restart are just as lost as messages lost to a 5-minute one, and
|
|
256
|
+
// nothing else would ever have flagged them.
|
|
257
|
+
//
|
|
258
|
+
// The reconnect path never had this gate. recordGap's own 1-second
|
|
259
|
+
// floor is the only threshold worth keeping, so use it here too.
|
|
260
|
+
// Deliberate restarts stay quiet on their own merits: SIGINT stamps
|
|
261
|
+
// markConnected() on the way out, so a clean stop/start reports the
|
|
262
|
+
// true downtime rather than a heartbeat-rounded guess.
|
|
263
|
+
const lastConnectedAt = syncManager.getLastConnectedAt();
|
|
264
|
+
if (!reportGap(lastConnectedAt, "startup-gap")) {
|
|
265
|
+
// Nothing filed -- no prior connection on record, or a gap under
|
|
266
|
+
// the floor. Either way we are caught up as of now.
|
|
267
|
+
syncManager.markConnected();
|
|
268
|
+
}
|
|
269
|
+
const heartbeatTimer = setInterval(heartbeat, HEARTBEAT_MS);
|
|
270
|
+
|
|
48
271
|
const jsonMode = program.opts().json;
|
|
49
272
|
const startTime = Date.now();
|
|
50
273
|
let reconnectCount = 0;
|
|
51
274
|
let eventCount = 0;
|
|
52
275
|
const enabledEvents = new Set(opts.events.split(",").map((e) => e.trim()));
|
|
53
276
|
|
|
277
|
+
// Delivered receipts (deliveredv2): what every Zalo client sends when a
|
|
278
|
+
// message arrives -- Zalo Web included, for our own echoes too. Built
|
|
279
|
+
// once and shared with `mcp start` through src/core/receipts.js, so the
|
|
280
|
+
// two listeners cannot drift apart (AGENTS.md §13). `getApi`, not an
|
|
281
|
+
// api: a re-login replaces it. Seen receipts are never sent from here.
|
|
282
|
+
const deliveredReceipts = createDeliveredReceipts({
|
|
283
|
+
getApi,
|
|
284
|
+
enabled: opts.deliveredReceipts !== false,
|
|
285
|
+
log: (line) => console.error(`[listen] ${line}`),
|
|
286
|
+
});
|
|
287
|
+
|
|
54
288
|
function uptime() {
|
|
55
289
|
const s = Math.floor((Date.now() - startTime) / 1000);
|
|
56
290
|
const h = Math.floor(s / 3600);
|
|
@@ -104,51 +338,189 @@ export function registerListenCommand(program) {
|
|
|
104
338
|
postWebhook(data);
|
|
105
339
|
}
|
|
106
340
|
|
|
341
|
+
/** Whether --events, --filter or --no-self keep a message off stdout, the webhook and the JSONL. */
|
|
342
|
+
function isMuted(msg) {
|
|
343
|
+
const filteredOut =
|
|
344
|
+
(opts.filter === "user" && msg.type !== THREAD_USER) ||
|
|
345
|
+
(opts.filter === "group" && msg.type !== THREAD_GROUP);
|
|
346
|
+
// --no-self hides our own messages from stdout, the
|
|
347
|
+
// webhook and the JSONL -- it does not delete them from
|
|
348
|
+
// the cache. They are half of every conversation.
|
|
349
|
+
return !enabledEvents.has("message") || filteredOut || (!opts.self && msg.isSelf);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* A message as `listen` reports it: the event object, and its one-line human form.
|
|
354
|
+
*
|
|
355
|
+
* @param {object} msg - the zca-js message event
|
|
356
|
+
* @param {object} [extra] - fields to add, e.g. `{catchUp: true}`
|
|
357
|
+
* @returns {{data: object, human: string}}
|
|
358
|
+
*/
|
|
359
|
+
function messageEvent(msg, extra = {}) {
|
|
360
|
+
const rawContent = msg.data.content;
|
|
361
|
+
const isText = typeof rawContent === "string";
|
|
362
|
+
const msgType = msg.data.msgType || null;
|
|
363
|
+
// Build readable display: show type + title/href for non-text
|
|
364
|
+
let displayContent;
|
|
365
|
+
if (isText) {
|
|
366
|
+
displayContent = rawContent;
|
|
367
|
+
} else if (rawContent && typeof rawContent === "object") {
|
|
368
|
+
const parts = [msgType || "attachment"];
|
|
369
|
+
if (rawContent.title) parts.push(`"${rawContent.title}"`);
|
|
370
|
+
if (rawContent.href) parts.push(rawContent.href);
|
|
371
|
+
displayContent = `[${parts.join(" | ")}]`;
|
|
372
|
+
} else {
|
|
373
|
+
displayContent = `[${msgType || "non-text"}]`;
|
|
374
|
+
}
|
|
375
|
+
const data = {
|
|
376
|
+
event: "message",
|
|
377
|
+
msgId: msg.data.msgId,
|
|
378
|
+
cliMsgId: msg.data.cliMsgId,
|
|
379
|
+
threadId: msg.threadId,
|
|
380
|
+
type: msg.type,
|
|
381
|
+
isSelf: msg.isSelf,
|
|
382
|
+
uidFrom: msg.data.uidFrom || null,
|
|
383
|
+
dName: msg.data.dName || null,
|
|
384
|
+
msgType,
|
|
385
|
+
content: rawContent,
|
|
386
|
+
...extra,
|
|
387
|
+
};
|
|
388
|
+
const dir = msg.isSelf ? "→" : "←";
|
|
389
|
+
const typeLabel = msg.type === THREAD_USER ? "DM" : "GR";
|
|
390
|
+
const tag = extra.catchUp ? " [catch-up]" : "";
|
|
391
|
+
return {
|
|
392
|
+
data,
|
|
393
|
+
human: `${dir} [${typeLabel}]${tag} [${msg.threadId}] ${displayContent} (msgId: ${msg.data.msgId})`,
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
// One stage at a time on this socket -- the lock the daemon
|
|
398
|
+
// channel's routes hold, shared with this daemon's own catch-up --
|
|
399
|
+
// and one raw reader on the socket for the fields zca-js drops.
|
|
400
|
+
// Built once, like the receipter: they outlive every re-login.
|
|
401
|
+
const stageLock = createStageLock();
|
|
402
|
+
const socketTap = createSocketTap({ log: (line) => console.error(`[listen] ${line}`) });
|
|
403
|
+
// Read state other devices report -- a conversation read on the
|
|
404
|
+
// phone, an unread mark set or cleared there -- which zca-js
|
|
405
|
+
// drops. Stored always, like reactions; printed only with
|
|
406
|
+
// `--events read`. It rides the tap, which re-arms on every socket.
|
|
407
|
+
createReadStateSync({
|
|
408
|
+
tap: socketTap,
|
|
409
|
+
log: (line) => console.error(`[listen] ${line}`),
|
|
410
|
+
onChange: (change) => {
|
|
411
|
+
if (!enabledEvents.has("read")) return;
|
|
412
|
+
const { data, human } = readStateEvent(change);
|
|
413
|
+
emitEvent(data, human);
|
|
414
|
+
},
|
|
415
|
+
});
|
|
416
|
+
const selfHeal = createSelfHeal({
|
|
417
|
+
getApi,
|
|
418
|
+
tap: socketTap,
|
|
419
|
+
lock: stageLock,
|
|
420
|
+
enabled: opts.selfHeal !== false,
|
|
421
|
+
log: (line) => console.error(`[listen] ${line}`),
|
|
422
|
+
// A message recovered after a drop reaches stdout, the JSONL and
|
|
423
|
+
// the webhook as a live one would, marked so a consumer can tell.
|
|
424
|
+
onRecovered: (items) => {
|
|
425
|
+
for (const { msg } of items) {
|
|
426
|
+
if (isMuted(msg)) continue;
|
|
427
|
+
const { data, human } = messageEvent(msg, { catchUp: true });
|
|
428
|
+
emitEvent(data, human);
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
});
|
|
432
|
+
|
|
107
433
|
/** Attach ALL handlers (data + lifecycle) to current API listener */
|
|
108
434
|
function attachAllHandlers(api) {
|
|
109
435
|
// --- Message events ---
|
|
110
|
-
|
|
436
|
+
// Registered unconditionally. --events, --filter and --no-self
|
|
437
|
+
// decide what is PRINTED, forwarded and saved as JSONL -- never
|
|
438
|
+
// what is stored. They used to gate the handler itself, so
|
|
439
|
+
// `listen --filter group` silently kept every DM out of the
|
|
440
|
+
// cache and `listen --events group` stored no messages at all,
|
|
441
|
+
// while the docs promised the flags only shaped the output.
|
|
442
|
+
// A message missed live has no reliable way back: the phone
|
|
443
|
+
// hands a transfer sync only what a web session was NOT
|
|
444
|
+
// connected for.
|
|
445
|
+
{
|
|
111
446
|
api.listener.on("message", async (msg) => {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
447
|
+
const mute = isMuted(msg);
|
|
448
|
+
|
|
449
|
+
// A "delete for me" frame rides the message channel but
|
|
450
|
+
// removes a message rather than adding one, so it is
|
|
451
|
+
// reported as the removal it is -- never as an incoming
|
|
452
|
+
// message, which would have a webhook receiver acting on
|
|
453
|
+
// a msgId that names only the notification.
|
|
454
|
+
if (isRemovalMessage(msg.data)) {
|
|
455
|
+
const r = storeLiveDelete(msg);
|
|
456
|
+
if (!mute) {
|
|
457
|
+
emitEvent(
|
|
458
|
+
{
|
|
459
|
+
event: "deleted_for_me",
|
|
460
|
+
threadId: msg.threadId,
|
|
461
|
+
msgId: r.msgId ?? null,
|
|
462
|
+
applied: r.stored,
|
|
463
|
+
},
|
|
464
|
+
r.stored
|
|
465
|
+
? `Deleted for me: ${r.msgId} in ${msg.threadId}` +
|
|
466
|
+
(r.mediaRemoved ? " (media removed)" : "")
|
|
467
|
+
: `Delete for me could not be applied: ${r.reason}`,
|
|
468
|
+
);
|
|
469
|
+
}
|
|
470
|
+
if (!r.stored) console.error(`[listen] delete-for-me not applied: ${r.reason}`);
|
|
471
|
+
heartbeat();
|
|
472
|
+
return;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
if (!mute) {
|
|
476
|
+
const { data, human } = messageEvent(msg);
|
|
477
|
+
emitEvent(data, human);
|
|
478
|
+
}
|
|
479
|
+
heartbeat();
|
|
480
|
+
|
|
481
|
+
// One writer for live traffic: storeLiveMessage is the
|
|
482
|
+
// same function a running mobile sync uses, so a row
|
|
483
|
+
// written here is indistinguishable from a restored one,
|
|
484
|
+
// and the type vocabulary (photo, not chat.photo) is
|
|
485
|
+
// shared with it.
|
|
486
|
+
const stored = storeLiveMessage(msg);
|
|
487
|
+
if (!stored.stored) {
|
|
488
|
+
console.error(`[listen] message not stored: ${stored.reason}`);
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
// Fetch through the SAME downloader the mobile sync
|
|
492
|
+
// uses: it brings the request deadline, the
|
|
493
|
+
// expiry-vs-throttling classification and the shared
|
|
494
|
+
// per-conversation folders. The row is already stored
|
|
495
|
+
// with has_attachment, so the downloader finds it by
|
|
496
|
+
// query. Fire and forget -- a slow CDN must never stall
|
|
497
|
+
// event processing.
|
|
498
|
+
if (stored.info.hasAttachment) {
|
|
499
|
+
downloadSyncedMedia({
|
|
500
|
+
api,
|
|
501
|
+
accountDir,
|
|
502
|
+
threadId: String(msg.threadId),
|
|
503
|
+
limit: 5,
|
|
504
|
+
concurrency: 2,
|
|
505
|
+
}).catch((err) => console.error(`[listen] media download failed: ${err.message}`));
|
|
130
506
|
}
|
|
131
|
-
const data = {
|
|
132
|
-
event: "message",
|
|
133
|
-
msgId: msg.data.msgId,
|
|
134
|
-
cliMsgId: msg.data.cliMsgId,
|
|
135
|
-
threadId: msg.threadId,
|
|
136
|
-
type: msg.type,
|
|
137
|
-
isSelf: msg.isSelf,
|
|
138
|
-
uidFrom: msg.data.uidFrom || null,
|
|
139
|
-
dName: msg.data.dName || null,
|
|
140
|
-
msgType,
|
|
141
|
-
content: rawContent,
|
|
142
|
-
};
|
|
143
|
-
const dir = msg.isSelf ? "→" : "←";
|
|
144
|
-
const typeLabel = msg.type === THREAD_USER ? "DM" : "GR";
|
|
145
|
-
emitEvent(
|
|
146
|
-
data,
|
|
147
|
-
`${dir} [${typeLabel}] [${msg.threadId}] ${displayContent} (msgId: ${msg.data.msgId})`,
|
|
148
|
-
);
|
|
149
507
|
});
|
|
150
508
|
}
|
|
151
509
|
|
|
510
|
+
// Subscribed AFTER the storing handler above, so the write has
|
|
511
|
+
// always happened first; the receipt handler only queues, and
|
|
512
|
+
// can neither throw into the socket loop nor hold the write up.
|
|
513
|
+
// Here rather than at start-up because re-login calls this
|
|
514
|
+
// function again with a new listener.
|
|
515
|
+
deliveredReceipts.attach(api.listener);
|
|
516
|
+
|
|
517
|
+
// Also after the storing handler, and here for the same reason:
|
|
518
|
+
// the tap reads the envelope fields zca-js drops, and the
|
|
519
|
+
// self-heal moves its cursor only past a row already written,
|
|
520
|
+
// then catches up on every handshake this listener makes.
|
|
521
|
+
socketTap.attach(api.listener);
|
|
522
|
+
selfHeal.attach(api.listener);
|
|
523
|
+
|
|
152
524
|
// --- Friend events ---
|
|
153
525
|
if (enabledEvents.has("friend")) {
|
|
154
526
|
api.listener.on("friend_event", async (event) => {
|
|
@@ -178,62 +550,166 @@ export function registerListenCommand(program) {
|
|
|
178
550
|
}
|
|
179
551
|
|
|
180
552
|
// --- Group events ---
|
|
181
|
-
|
|
182
|
-
|
|
553
|
+
// Also ungated for storage, for the same reason: with the
|
|
554
|
+
// default --events, being removed from a group was never
|
|
555
|
+
// recorded, so its local copy stayed invisible to `conv forget
|
|
556
|
+
// --orphans`, and a pin or note change never marked its board
|
|
557
|
+
// stale. Both are durable state; only the printing is optional.
|
|
558
|
+
api.listener.on("group_event", (event) => {
|
|
559
|
+
// Pin, unpin, note, poll and reminder changes: flag the
|
|
560
|
+
// board stale so the next sync-boards refetches it. The
|
|
561
|
+
// event carries a delta, not the item's full shape.
|
|
562
|
+
const board = noteBoardChange(event);
|
|
563
|
+
// Leaving or being removed means this conversation is no
|
|
564
|
+
// longer ours. Flag it so it surfaces as an orphan;
|
|
565
|
+
// deleting the local copy stays an explicit decision. Any
|
|
566
|
+
// later event about it (a rejoin) clears the flag. Our uid
|
|
567
|
+
// is what tells being removed from removing someone else
|
|
568
|
+
// -- mcp.js passes it too.
|
|
569
|
+
const gone = storeGroupEvent(event, { ownId: activeAcc.ownId });
|
|
570
|
+
// The system line itself, as the row a sync would restore.
|
|
571
|
+
// Stored whatever --events says: output flags never gate storage.
|
|
572
|
+
const row = storeGroupEventRow(event);
|
|
573
|
+
if (!row.stored && row.reason && row.reason !== "not a system-line event") {
|
|
574
|
+
console.error(`[listen] group event not stored: ${row.reason}`);
|
|
575
|
+
}
|
|
576
|
+
if (!enabledEvents.has("group")) return;
|
|
577
|
+
emitEvent(
|
|
578
|
+
{
|
|
579
|
+
event: `group_${event.type}`,
|
|
580
|
+
threadId: event.threadId,
|
|
581
|
+
isSelf: event.isSelf,
|
|
582
|
+
data: event.data,
|
|
583
|
+
},
|
|
584
|
+
`Group: ${event.type} — ${event.threadId}`,
|
|
585
|
+
);
|
|
586
|
+
if (board.stale) {
|
|
183
587
|
emitEvent(
|
|
184
|
-
{
|
|
185
|
-
|
|
186
|
-
threadId: event.threadId,
|
|
187
|
-
isSelf: event.isSelf,
|
|
188
|
-
data: event.data,
|
|
189
|
-
},
|
|
190
|
-
`Group: ${event.type} — ${event.threadId}`,
|
|
588
|
+
{ event: "board_changed", threadId: board.threadId, type: event.type },
|
|
589
|
+
`Board changed in ${board.threadId} (${event.type}) — run sync-boards to refresh`,
|
|
191
590
|
);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
// --- Reaction events ---
|
|
196
|
-
if (enabledEvents.has("reaction")) {
|
|
197
|
-
api.listener.on("reaction", (reaction) => {
|
|
198
|
-
if (!opts.self && reaction.isSelf) return;
|
|
591
|
+
}
|
|
592
|
+
if (gone.gone) {
|
|
199
593
|
emitEvent(
|
|
200
|
-
{
|
|
201
|
-
|
|
202
|
-
threadId: reaction.threadId,
|
|
203
|
-
isSelf: reaction.isSelf,
|
|
204
|
-
isGroup: reaction.isGroup,
|
|
205
|
-
data: reaction.data,
|
|
206
|
-
},
|
|
207
|
-
`Reaction in ${reaction.threadId}`,
|
|
594
|
+
{ event: "thread_gone", threadId: gone.threadId },
|
|
595
|
+
`No longer in ${gone.threadId} — its local history is now orphaned (see \`conv forget\`)`,
|
|
208
596
|
);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
597
|
+
}
|
|
598
|
+
});
|
|
599
|
+
|
|
600
|
+
// --- Reaction events ---
|
|
601
|
+
// Storage is NOT gated on --events. Reactions exist only on
|
|
602
|
+
// this socket -- the mobile sync payload has no reaction field
|
|
603
|
+
// -- and the default
|
|
604
|
+
// --events value does not include them, so gating the write
|
|
605
|
+
// meant a plain `zalo-agent listen` permanently lost every
|
|
606
|
+
// reaction it watched go past. --events decides what you SEE.
|
|
607
|
+
api.listener.on("reaction", (reaction) => {
|
|
608
|
+
const r = storeLiveReaction(reaction);
|
|
609
|
+
if (!r.stored && r.reason) console.error(`[listen] reaction not stored: ${r.reason}`);
|
|
610
|
+
if (!enabledEvents.has("reaction")) return;
|
|
611
|
+
if (!opts.self && reaction.isSelf) return;
|
|
612
|
+
// Name the icon and the message. "Reaction in <thread>" was
|
|
613
|
+
// true of a reaction stored against the wrong message, a
|
|
614
|
+
// removal that deleted nothing, and a working one alike.
|
|
615
|
+
const on = r.msgIds?.filter(Boolean).join(",") || "?";
|
|
616
|
+
const what = r.removing
|
|
617
|
+
? `Reactions cleared on ${on} (${r.changed} removed)`
|
|
618
|
+
: `Reaction ${r.icon} on ${on}`;
|
|
619
|
+
emitEvent(
|
|
620
|
+
{
|
|
621
|
+
event: "reaction",
|
|
622
|
+
threadId: reaction.threadId,
|
|
623
|
+
isSelf: reaction.isSelf,
|
|
624
|
+
isGroup: reaction.isGroup,
|
|
625
|
+
removing: r.removing ?? null,
|
|
626
|
+
changed: r.changed ?? null,
|
|
627
|
+
data: reaction.data,
|
|
628
|
+
},
|
|
629
|
+
`${what} in ${reaction.threadId}`,
|
|
630
|
+
);
|
|
631
|
+
});
|
|
632
|
+
|
|
633
|
+
// --- Delivery receipts ---
|
|
634
|
+
// The sync establishes msgStatus per message; without these it
|
|
635
|
+
// goes stale the moment the restore finishes. Always on: this is
|
|
636
|
+
// durable state, not the typing/presence noise it resembles.
|
|
637
|
+
api.listener.on("delivered_messages", (m) => storeReceipts(m, 4));
|
|
638
|
+
api.listener.on("seen_messages", (m) => storeReceipts(m, 5));
|
|
639
|
+
|
|
640
|
+
// --- Undo / recall ---
|
|
641
|
+
// Always on, regardless of --events. A recall is the sender
|
|
642
|
+
// withdrawing a message; a cache that keeps the text readable
|
|
643
|
+
// afterwards is retaining something they took back. This is the
|
|
644
|
+
// one event that must never be opt-in.
|
|
645
|
+
api.listener.on("undo", (u) => {
|
|
646
|
+
const r = storeLiveUndo(u);
|
|
647
|
+
// The recalled id comes from content, not from the
|
|
648
|
+
// notification's own msgId -- printing the latter named a
|
|
649
|
+
// message nobody had ever seen.
|
|
650
|
+
const target = r.msgId ?? String(u?.data?.content?.globalMsgId ?? "");
|
|
651
|
+
emitEvent(
|
|
652
|
+
{ event: "undo", threadId: u?.threadId, isSelf: u?.isSelf, msgId: target, applied: r.stored },
|
|
653
|
+
`Recalled message ${target} in ${u?.threadId}${r.mediaRemoved ? " (media removed)" : ""}`,
|
|
654
|
+
);
|
|
655
|
+
if (!r.stored && r.reason) console.error(`[listen] recall not applied: ${r.reason}`);
|
|
656
|
+
});
|
|
211
657
|
|
|
212
658
|
// --- Lifecycle events (MUST be on same listener for reconnect to work) ---
|
|
213
659
|
api.listener.on("connected", () => {
|
|
214
660
|
if (reconnectCount > 0) {
|
|
215
661
|
info(`Reconnected (#${reconnectCount}, uptime: ${uptime()}, events: ${eventCount})`);
|
|
216
662
|
}
|
|
663
|
+
// Driven by observed socket state, NOT by reconnectCount.
|
|
664
|
+
// reconnectCount is incremented only in the `closed` handler,
|
|
665
|
+
// and `closed` never fires for a code on the server's
|
|
666
|
+
// close_and_retry_codes list -- zca-js emits `disconnected`,
|
|
667
|
+
// retries internally, then emits `connected`. Those codes ARE
|
|
668
|
+
// the recoverable ones, so on the common drop path the old
|
|
669
|
+
// guard was always false: no gap was filed, and markConnected()
|
|
670
|
+
// below then asserted coverage over the whole outage. Messages
|
|
671
|
+
// lost to an ordinary reconnect were lost silently and for
|
|
672
|
+
// good, because `sync` is driven off exactly this advice.
|
|
673
|
+
if (downSince !== null) {
|
|
674
|
+
reportGap(downSince, "reconnect-gap");
|
|
675
|
+
downSince = null;
|
|
676
|
+
}
|
|
677
|
+
syncManager.markConnected();
|
|
217
678
|
});
|
|
218
679
|
|
|
219
680
|
api.listener.on("disconnected", (code, _reason) => {
|
|
681
|
+
if (stopping) return;
|
|
220
682
|
warning(`Disconnected (code: ${code}). Auto-retrying...`);
|
|
683
|
+
// First drop wins: a flapping socket that emits several
|
|
684
|
+
// `disconnected` before one `connected` is ONE outage, and the
|
|
685
|
+
// gap must span from the start of it.
|
|
686
|
+
if (downSince === null) downSince = Date.now();
|
|
687
|
+
syncManager.markDisconnected();
|
|
221
688
|
});
|
|
222
689
|
|
|
223
690
|
api.listener.on("closed", async (code, _reason) => {
|
|
691
|
+
// A deliberate stop closes with 1000 and must not be treated
|
|
692
|
+
// as a failure to recover from.
|
|
693
|
+
if (stopping) return;
|
|
224
694
|
if (code === CLOSE_DUPLICATE) {
|
|
225
695
|
error("Another Zalo Web session opened. Listener stopped.");
|
|
696
|
+
dropLock();
|
|
226
697
|
process.exit(1);
|
|
227
698
|
}
|
|
228
699
|
reconnectCount++;
|
|
700
|
+
if (downSince === null) downSince = Date.now();
|
|
701
|
+
syncManager.markDisconnected();
|
|
229
702
|
warning(`Connection closed (code: ${code}). Re-login in 5s... (uptime: ${uptime()})`);
|
|
230
703
|
await new Promise((r) => setTimeout(r, 5000));
|
|
231
704
|
try {
|
|
232
705
|
clearSession();
|
|
233
706
|
await autoLogin(jsonMode);
|
|
234
707
|
info("Re-login successful. Restarting listener...");
|
|
235
|
-
// Attach ALL handlers to the NEW api (including lifecycle)
|
|
708
|
+
// Attach ALL handlers to the NEW api (including lifecycle),
|
|
709
|
+
// and repoint the SyncManager at it so its bookkeeping
|
|
710
|
+
// runs against a live, authenticated client.
|
|
236
711
|
const newApi = getApi();
|
|
712
|
+
syncManager.api = newApi;
|
|
237
713
|
attachAllHandlers(newApi);
|
|
238
714
|
newApi.listener.start({ retryOnClose: true });
|
|
239
715
|
} catch (e) {
|
|
@@ -243,6 +719,7 @@ export function registerListenCommand(program) {
|
|
|
243
719
|
clearSession();
|
|
244
720
|
await autoLogin(jsonMode);
|
|
245
721
|
const retryApi = getApi();
|
|
722
|
+
syncManager.api = retryApi;
|
|
246
723
|
attachAllHandlers(retryApi);
|
|
247
724
|
retryApi.listener.start({ retryOnClose: true });
|
|
248
725
|
info("Re-login successful on retry.");
|
|
@@ -271,22 +748,87 @@ export function registerListenCommand(program) {
|
|
|
271
748
|
if (opts.webhook) info(`Webhook: ${opts.webhook}`);
|
|
272
749
|
if (saveDir) info(`Save dir: ${saveDir} (JSONL per thread)`);
|
|
273
750
|
if (opts.autoAccept) info("Auto-accept friend requests: ON");
|
|
751
|
+
info(
|
|
752
|
+
opts.deliveredReceipts !== false
|
|
753
|
+
? "Delivered receipts: ON (opt out with --no-delivered-receipts). Seen receipts: never sent."
|
|
754
|
+
: "Delivered receipts: OFF. Seen receipts: never sent.",
|
|
755
|
+
);
|
|
756
|
+
info(
|
|
757
|
+
opts.selfHeal !== false
|
|
758
|
+
? "Self-heal: ON — after a drop or restart, missed messages come back from Zalo's offline queue on this socket, no phone tap (opt out with --no-self-heal)."
|
|
759
|
+
: "Self-heal: OFF — a coverage gap stays pending until `zalo-agent sync` closes it.",
|
|
760
|
+
);
|
|
274
761
|
} catch (e) {
|
|
275
762
|
error(`Listen failed: ${e.message}`);
|
|
276
763
|
process.exit(1);
|
|
277
764
|
}
|
|
278
765
|
|
|
766
|
+
// This daemon owns the account's one permitted WebSocket, so it
|
|
767
|
+
// also does the work that needs one: a `msg send-file` in another
|
|
768
|
+
// terminal, or the socket stages of `zalo-agent sync`, would
|
|
769
|
+
// otherwise open a second session and Zalo would evict this one
|
|
770
|
+
// mid-conversation. The sync stages are the reason the gap advice
|
|
771
|
+
// above no longer says "stop this daemon first".
|
|
772
|
+
//
|
|
773
|
+
// Failing to open the channel is not fatal, but it is not free
|
|
774
|
+
// either: senders fall back to their own socket as before, and a
|
|
775
|
+
// sync goes back to refusing to run while this daemon is up.
|
|
776
|
+
//
|
|
777
|
+
// `createSyncRunners` is handed `getApi`, not an api: this daemon
|
|
778
|
+
// rebuilds one on a duplicate-session close, and a stage bound to
|
|
779
|
+
// the old object would tap a socket zca-js has already nulled.
|
|
780
|
+
let channel = null;
|
|
781
|
+
try {
|
|
782
|
+
channel = await startDaemonChannel({
|
|
783
|
+
getApi,
|
|
784
|
+
accountDir,
|
|
785
|
+
onLog: (m) => info(m),
|
|
786
|
+
runners: createSyncRunners({ getApi, accountName: activeAcc.ownId }),
|
|
787
|
+
// The self-heal's lock: a stage and a catch-up never share the socket.
|
|
788
|
+
lock: stageLock,
|
|
789
|
+
});
|
|
790
|
+
info(`Sync & upload channel ready on 127.0.0.1:${channel.port} — this socket is reused for both.`);
|
|
791
|
+
info("`zalo-agent sync` will run its socket stages here; it still needs your phone tap.");
|
|
792
|
+
} catch (e) {
|
|
793
|
+
warning(`Daemon channel unavailable (${e.message}).`);
|
|
794
|
+
warning("Attachment sends will open their own session, and `zalo-agent sync` will refuse to run.");
|
|
795
|
+
}
|
|
796
|
+
|
|
279
797
|
// Keep alive until Ctrl+C
|
|
280
798
|
await new Promise((resolve) => {
|
|
281
799
|
process.on("SIGINT", () => {
|
|
800
|
+
// First, before anything can emit a close event.
|
|
801
|
+
stopping = true;
|
|
802
|
+
channel?.stop();
|
|
803
|
+
deliveredReceipts.stop();
|
|
282
804
|
try {
|
|
283
805
|
getApi().listener.stop();
|
|
284
806
|
} catch (e) {
|
|
285
807
|
console.error(`[listen] Stop failed: ${e.message}`);
|
|
286
808
|
}
|
|
809
|
+
clearInterval(heartbeatTimer);
|
|
810
|
+
// Stamp "last known connected" at the moment we stop, so a
|
|
811
|
+
// deliberate close (or the process simply exiting) gives
|
|
812
|
+
// the NEXT launch an accurate window to backfill from,
|
|
813
|
+
// rather than treating this whole downtime as unknown.
|
|
814
|
+
try {
|
|
815
|
+
syncManager.markConnected();
|
|
816
|
+
} catch (e) {
|
|
817
|
+
console.error(`[listen] Failed to stamp shutdown state: ${e.message}`);
|
|
818
|
+
}
|
|
819
|
+
releaseLock(accountDir);
|
|
287
820
|
info(`Stopped. Uptime: ${uptime()}, events: ${eventCount}, reconnects: ${reconnectCount}`);
|
|
821
|
+
const receipts = deliveredReceipts.stats();
|
|
822
|
+
if (receipts.calls) {
|
|
823
|
+
info(`Delivered receipts: ${receipts.sent} acknowledged, ${receipts.failed} failed`);
|
|
824
|
+
}
|
|
288
825
|
if (saveDir) info(`Messages saved to: ${saveDir}`);
|
|
289
826
|
resolve();
|
|
827
|
+
// Resolving the keep-alive promise is not enough: an async
|
|
828
|
+
// `closed` handler already in flight resumes after the action
|
|
829
|
+
// function has returned and keeps the process alive. mcp.js
|
|
830
|
+
// already exits explicitly here for the same reason.
|
|
831
|
+
process.exit(0);
|
|
290
832
|
});
|
|
291
833
|
});
|
|
292
834
|
});
|