@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
|
@@ -0,0 +1,522 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Classify and unpack messages coming out of the transfer-sync-v2 protobuf.
|
|
3
|
+
*
|
|
4
|
+
* The sync payload is NOT the same shape as a live listener event. `Message`
|
|
5
|
+
* carries a numeric `msgType` and a **string** `content` (protobuf field 7),
|
|
6
|
+
* with everything else — attachments, quote, mentions, TTL, bubble styling —
|
|
7
|
+
* hanging off `meta` (field 8). Media is present only as CDN references:
|
|
8
|
+
* `attach.href` / `attach.thumb` plus a JSON `attach.params` blob. No file
|
|
9
|
+
* bytes ever travel in the sync stream.
|
|
10
|
+
*
|
|
11
|
+
* Because `content` is always a string, a `typeof content === "string"` test
|
|
12
|
+
* can't tell text from a photo — the numeric `msgType` and the attachment
|
|
13
|
+
* shape are the only real signals, which is what this module reads.
|
|
14
|
+
*
|
|
15
|
+
* msgType numbers were recovered empirically from a decoded sync capture and
|
|
16
|
+
* cross-checked against Zalo Web's own switch statements (MSG_PHOTO /
|
|
17
|
+
* MSG_PHOTO_2 / MSG_VIDEO / MSG_FILE / MSG_CONTACT). Zalo adds types over
|
|
18
|
+
* time, so an unknown number degrades to `type_<n>` and — critically — still
|
|
19
|
+
* keeps its full `meta`, rather than being silently flattened to text.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/** Numeric sync msgType -> stable CLI type name. */
|
|
23
|
+
export const SYNC_MSG_TYPES = {
|
|
24
|
+
0: "text",
|
|
25
|
+
// A doodle (hand drawing). Measured: the same doodle arrives live as
|
|
26
|
+
// chat.doodle and from a sync as msgType 2 with a photo-CDN .jpg, which
|
|
27
|
+
// unmapped was stored as type_2.
|
|
28
|
+
2: "doodle",
|
|
29
|
+
3: "photo", // MSG_PHOTO
|
|
30
|
+
4: "photo", // MSG_PHOTO_2 (jxl-capable variant)
|
|
31
|
+
// A voice note. Measured: attach href on f2-voice-aac-dl.zdn.vn (.aac),
|
|
32
|
+
// params m4a/duration/waveformSamples. Unmapped, it was stored as type_6
|
|
33
|
+
// with a non-media kind, so has_attachment stayed 0 and the audio was
|
|
34
|
+
// silently never downloaded.
|
|
35
|
+
6: "voice",
|
|
36
|
+
10: "sticker",
|
|
37
|
+
12: "link", // link/media preview, action "recommened.link"
|
|
38
|
+
15: "card", // OA / system rich card, attach.type "l.a.*"
|
|
39
|
+
18: "location", // shared location; attach params carry latitude/longitude
|
|
40
|
+
19: "video", // MSG_VIDEO
|
|
41
|
+
20: "group_event", // action "msginfo.actionlist"
|
|
42
|
+
21: "profile_card", // action "show.profile"
|
|
43
|
+
22: "file", // MSG_FILE
|
|
44
|
+
23: "gif",
|
|
45
|
+
24: "event", // zinstant template event (reminders, todos, ...)
|
|
46
|
+
26: "poll_event",
|
|
47
|
+
36: "deleted", // undone/recalled; content empty, params.is_deleted
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* CDN host families, used to classify media when `msgType` is unknown.
|
|
52
|
+
* Zalo shards these numerically (photo-stal-10, photo-stal-35, ...), so the
|
|
53
|
+
* patterns match the family rather than a specific host.
|
|
54
|
+
*/
|
|
55
|
+
const HOST_KINDS = [
|
|
56
|
+
[/(^|\.)photo-stal-\d+\./i, "photo"],
|
|
57
|
+
[/(^|\.)video-stal-\d+\./i, "video"],
|
|
58
|
+
[/(^|\.)file-stal-\d+\./i, "file"],
|
|
59
|
+
[/(^|\.)zalo-gif\./i, "gif"],
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
/** Types whose payload points at a downloadable binary. */
|
|
63
|
+
export const MEDIA_TYPES = new Set(["photo", "video", "file", "gif", "voice", "audio", "doodle"]);
|
|
64
|
+
|
|
65
|
+
/** Parse a JSON string field that Zalo sometimes leaves empty or malformed. */
|
|
66
|
+
function parseJson(value) {
|
|
67
|
+
if (!value || typeof value !== "string") return null;
|
|
68
|
+
try {
|
|
69
|
+
return JSON.parse(value);
|
|
70
|
+
} catch {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** Classify a single attachment by the URL it points at. */
|
|
76
|
+
function kindFromUrl(url) {
|
|
77
|
+
if (!url) return null;
|
|
78
|
+
let host;
|
|
79
|
+
try {
|
|
80
|
+
host = new URL(url).host;
|
|
81
|
+
} catch {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
for (const [re, kind] of HOST_KINDS) if (re.test(host)) return kind;
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** First non-empty value among the given params keys. */
|
|
89
|
+
function pick(params, ...keys) {
|
|
90
|
+
if (!params) return undefined;
|
|
91
|
+
for (const k of keys) {
|
|
92
|
+
const v = params[k];
|
|
93
|
+
if (v !== undefined && v !== null && v !== "" && v !== 0) return v;
|
|
94
|
+
}
|
|
95
|
+
return undefined;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Unpack `meta.attachsList` into a flat, download-ready shape.
|
|
100
|
+
*
|
|
101
|
+
* Kind resolution is deliberately belt-and-braces: the message's own type
|
|
102
|
+
* wins, but a recognised CDN host can still classify an attachment hanging
|
|
103
|
+
* off a msgType this build has never seen.
|
|
104
|
+
*
|
|
105
|
+
* @param {object} msg - a decoded Sync2.Message.Message (jspb toObject form)
|
|
106
|
+
* @param {string} [msgTypeName] - resolved type name, if already computed
|
|
107
|
+
* @returns {Array<object>} one entry per attachment that carries something useful
|
|
108
|
+
*/
|
|
109
|
+
export function extractSyncAttachments(msg, msgTypeName) {
|
|
110
|
+
const type = msgTypeName || SYNC_MSG_TYPES[msg?.msgType] || `type_${msg?.msgType}`;
|
|
111
|
+
const out = [];
|
|
112
|
+
for (const a of msg?.meta?.attachsList || []) {
|
|
113
|
+
const params = parseJson(a.params) || {};
|
|
114
|
+
const extInfo = parseJson(a.extInfo);
|
|
115
|
+
const kind = kindFromUrl(a.href) || (MEDIA_TYPES.has(type) ? type : null) || (a.catId ? "sticker" : null);
|
|
116
|
+
|
|
117
|
+
// Fields the normalized shape below does not otherwise name. Carried
|
|
118
|
+
// verbatim so nothing the phone sent is lost: a later build must be
|
|
119
|
+
// able to read what this one does not understand, and `params` in
|
|
120
|
+
// particular holds per-type detail (OCR status, content ids, video
|
|
121
|
+
// codec settings) that no fixed field list would keep up with.
|
|
122
|
+
const verbatim = {
|
|
123
|
+
attachType: a.type || undefined,
|
|
124
|
+
childNumber: a.childNumber || undefined,
|
|
125
|
+
extInfo: extInfo || a.extInfo || undefined,
|
|
126
|
+
params: Object.keys(params).length ? params : a.params || undefined,
|
|
127
|
+
remains: parseJson(a.remains) || a.remains || undefined,
|
|
128
|
+
zinstantData: a.zinstantData || undefined,
|
|
129
|
+
zinstantMsg: a.zinstantMsg || undefined,
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
// A sticker is identified by catalogue + id, not a URL.
|
|
133
|
+
if (kind === "sticker" || (type === "sticker" && a.catId)) {
|
|
134
|
+
out.push({
|
|
135
|
+
kind: "sticker",
|
|
136
|
+
catId: a.catId ?? null,
|
|
137
|
+
stickerId: a.id ?? null,
|
|
138
|
+
stickerType: a.type ?? null,
|
|
139
|
+
...verbatim,
|
|
140
|
+
});
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const url = a.href || undefined;
|
|
145
|
+
const thumbUrl = a.thumb || undefined;
|
|
146
|
+
if (!url && !thumbUrl) {
|
|
147
|
+
// Pure action/system attachment (group events, zinstant templates).
|
|
148
|
+
// Keep it only when it carries a payload worth reading back.
|
|
149
|
+
if (a.action || a.title || Object.keys(params).length) {
|
|
150
|
+
out.push({
|
|
151
|
+
kind: kind || "meta",
|
|
152
|
+
action: a.action || undefined,
|
|
153
|
+
title: a.title || undefined,
|
|
154
|
+
description: a.description || undefined,
|
|
155
|
+
catId: a.catId || undefined,
|
|
156
|
+
itemId: a.id || undefined,
|
|
157
|
+
...verbatim,
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
out.push({
|
|
164
|
+
// Fall back to the message's own type, NOT a blanket "link": an OA
|
|
165
|
+
// notification card and a profile card both carry an href, and
|
|
166
|
+
// calling them links makes "show me the links in this thread"
|
|
167
|
+
// return mostly notifications. Zalo Web is equally narrow — its
|
|
168
|
+
// Link store takes only action "recommened.link".
|
|
169
|
+
kind: kind || type,
|
|
170
|
+
url,
|
|
171
|
+
thumbUrl,
|
|
172
|
+
// Photos carry a separate full-resolution URL in params.hd.
|
|
173
|
+
hdUrl: typeof params.hd === "string" && params.hd ? params.hd : undefined,
|
|
174
|
+
title: a.title || undefined,
|
|
175
|
+
description: a.description || undefined,
|
|
176
|
+
action: a.action || undefined,
|
|
177
|
+
fileName: type === "file" ? a.title || undefined : undefined,
|
|
178
|
+
ext: params.fileExt || undefined,
|
|
179
|
+
size: Number(pick(params, "fileSize", "video_file_size")) || undefined,
|
|
180
|
+
checksum: params.checksum || undefined,
|
|
181
|
+
width: Number(pick(params, "width", "video_width", "tWidth")) || undefined,
|
|
182
|
+
height: Number(pick(params, "height", "video_height", "tHeight")) || undefined,
|
|
183
|
+
duration: Number(pick(params, "duration")) || undefined,
|
|
184
|
+
// Mobile-only renewal hints. Zalo Web never sends these; the phone
|
|
185
|
+
// uses them to re-upload media whose CDN copy has aged out.
|
|
186
|
+
urlToRenew: pick(params, "fileUrlToRenew", "video_url_to_renew") || undefined,
|
|
187
|
+
thumbUrlToRenew: pick(params, "thumbUrlToRenew", "thumb_url_to_renew") || undefined,
|
|
188
|
+
catId: a.catId || undefined,
|
|
189
|
+
itemId: a.id || undefined,
|
|
190
|
+
...verbatim,
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
return out;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// A template placeholder Zalo left for us to fill: `%1$s`, `%2$s`, …
|
|
197
|
+
// Two constants on purpose: `.test()` on a /g regex advances lastIndex and so
|
|
198
|
+
// answers differently on identical input depending on call order.
|
|
199
|
+
const POSITIONAL = /%\d+\$s/;
|
|
200
|
+
const POSITIONAL_ALL = /%(\d+)\$s/g;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* The values a system-event template interpolates, in `%1$s`, `%2$s` order.
|
|
204
|
+
*
|
|
205
|
+
* Group events carry them as a highlight list — one entry per placeholder, the
|
|
206
|
+
* actor first. Poll events carry no list at all: the actor and the poll are
|
|
207
|
+
* named fields, used in that order by every poll template Zalo sends.
|
|
208
|
+
*/
|
|
209
|
+
function systemEventArgs(source, params = source) {
|
|
210
|
+
const highlights = source?.highLightsV2 ?? source?.highLights ?? params?.highLightsV2 ?? params?.highLights;
|
|
211
|
+
if (Array.isArray(highlights) && highlights.length) {
|
|
212
|
+
return highlights.map((h) => (typeof h?.dpn === "string" ? h.dpn : ""));
|
|
213
|
+
}
|
|
214
|
+
return [params?.dName, params?.question].filter((v) => typeof v === "string");
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/** Substitute a template's positional placeholders, leaving any it cannot fill. */
|
|
218
|
+
function fillTemplate(template, args) {
|
|
219
|
+
return template.replace(POSITIONAL_ALL, (placeholder, position) => {
|
|
220
|
+
const value = args[Number(position) - 1];
|
|
221
|
+
return typeof value === "string" && value !== "" ? value : placeholder;
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Localised system-event sentence, preferring Vietnamese then English.
|
|
227
|
+
*
|
|
228
|
+
* Zalo sends the template in two places. The phone nests it under
|
|
229
|
+
* `params.customMsg.msg`; the live socket puts it straight on `params.msg`, and
|
|
230
|
+
* reading only the nested form meant every reminder, poll and membership event
|
|
231
|
+
* captured live fell through to a bare `[poll_event]`.
|
|
232
|
+
*
|
|
233
|
+
* Either way the template is printf-positional — "%1$s khóa bình chọn: %2$s" —
|
|
234
|
+
* so returning it unfilled would store the placeholders verbatim.
|
|
235
|
+
*/
|
|
236
|
+
function customMsgText(params) {
|
|
237
|
+
// The template and the values it interpolates travel together: the phone
|
|
238
|
+
// nests BOTH under `customMsg`, the live socket puts both at the top of
|
|
239
|
+
// `params`. Taking the template from one and the highlights from the other
|
|
240
|
+
// is what left nine cached rows reading "%1$s tạo nhắc hẹn mới %2$s – %3$s".
|
|
241
|
+
const source = params?.customMsg?.msg ? params.customMsg : params;
|
|
242
|
+
const msg = source?.msg;
|
|
243
|
+
if (!msg) return null;
|
|
244
|
+
const template = typeof msg === "string" ? msg : msg.vi || msg.en || Object.values(msg)[0];
|
|
245
|
+
if (typeof template !== "string" || !template) return null;
|
|
246
|
+
return fillTemplate(template, systemEventArgs(source, params));
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Best-effort human-readable text for a synced message.
|
|
251
|
+
*
|
|
252
|
+
* For media the caption lives in `content` and is frequently empty, so the
|
|
253
|
+
* fallback is a type marker plus whatever identifying detail the attachment
|
|
254
|
+
* carries (a filename, a link title). That keeps `text` searchable instead of
|
|
255
|
+
* leaving a blank row, which is what the previous implementation produced for
|
|
256
|
+
* roughly one row in seven.
|
|
257
|
+
*
|
|
258
|
+
* @param {object} msg - decoded sync message
|
|
259
|
+
* @param {string} type - resolved type name
|
|
260
|
+
* @param {Array<object>} attachments - from extractSyncAttachments()
|
|
261
|
+
* @returns {string}
|
|
262
|
+
*/
|
|
263
|
+
export function extractSyncText(msg, type, attachments = []) {
|
|
264
|
+
const content = typeof msg?.content === "string" ? msg.content.trim() : "";
|
|
265
|
+
const a = attachments[0] || {};
|
|
266
|
+
const params = parseJson(msg?.meta?.attachsList?.[0]?.params) || {};
|
|
267
|
+
|
|
268
|
+
// A styled message (`action: "rtf"`) is ordinary text whose body Zalo moves
|
|
269
|
+
// into the attachment title so the style ranges have something to index.
|
|
270
|
+
// Returning `content` alone stored the literal string "[text]" for it.
|
|
271
|
+
if (type === "text") return content || a.title || "";
|
|
272
|
+
if (content && type !== "deleted") {
|
|
273
|
+
// A real caption / body — keep it verbatim.
|
|
274
|
+
if (type !== "event" && type !== "group_event" && type !== "poll_event") return content;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
switch (type) {
|
|
278
|
+
case "deleted":
|
|
279
|
+
return "[deleted]";
|
|
280
|
+
case "sticker":
|
|
281
|
+
return a.catId ? `[sticker ${a.catId}/${a.stickerId}]` : "[sticker]";
|
|
282
|
+
case "file":
|
|
283
|
+
return a.fileName ? `[file] ${a.fileName}` : "[file]";
|
|
284
|
+
case "photo":
|
|
285
|
+
case "video":
|
|
286
|
+
case "gif":
|
|
287
|
+
return a.title ? `[${type}] ${a.title}` : `[${type}]`;
|
|
288
|
+
case "link":
|
|
289
|
+
case "card":
|
|
290
|
+
case "profile_card":
|
|
291
|
+
return [a.title, a.description, a.url].filter(Boolean).join(" — ") || `[${type}]`;
|
|
292
|
+
case "event":
|
|
293
|
+
case "group_event":
|
|
294
|
+
case "poll_event": {
|
|
295
|
+
// Zalo also ships the sentence pre-rendered in the attachment title
|
|
296
|
+
// for some events. Prefer our own fill, but when the payload did not
|
|
297
|
+
// carry every value the template asks for, that title is the better
|
|
298
|
+
// reading than a sentence with "%2$s" left in it.
|
|
299
|
+
const rendered = customMsgText(params);
|
|
300
|
+
if (rendered && !POSITIONAL.test(rendered)) return rendered;
|
|
301
|
+
// A half-filled template reads as a bug to anyone scrolling history,
|
|
302
|
+
// so it is never stored: Zalo's pre-rendered title, the body, or an
|
|
303
|
+
// honest type marker all beat leaking "%2$s" into the text column.
|
|
304
|
+
return a.title || content || `[${type}]`;
|
|
305
|
+
}
|
|
306
|
+
default:
|
|
307
|
+
return content || (a.title ? `[${type}] ${a.title}` : `[${type}]`);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Turn one decoded sync message into the row this CLI stores.
|
|
313
|
+
*
|
|
314
|
+
* `raw_data` keeps the whole payload — including `cliMsgId`, which makes a
|
|
315
|
+
* synced row usable as a reply/forward anchor the way a listener-captured row
|
|
316
|
+
* already is.
|
|
317
|
+
*
|
|
318
|
+
* @param {object} msg - decoded Sync2.Message.Message (jspb toObject form)
|
|
319
|
+
* @returns {{type: string, text: string, hasAttachment: boolean, attachments: Array<object>, raw: object}}
|
|
320
|
+
*/
|
|
321
|
+
export function classifySyncMessage(msg) {
|
|
322
|
+
const type = SYNC_MSG_TYPES[msg?.msgType] ?? `type_${msg?.msgType}`;
|
|
323
|
+
const attachments = extractSyncAttachments(msg, type);
|
|
324
|
+
const text = extractSyncText(msg, type, attachments);
|
|
325
|
+
const meta = msg?.meta || {};
|
|
326
|
+
// "Has an attachment" means "has a file worth fetching". A link-preview
|
|
327
|
+
// card carries a URL too, but it points at a web page, so counting it
|
|
328
|
+
// would make the pending-media figure disagree with what can actually be
|
|
329
|
+
// downloaded — and `has_attachment` is exactly what the downloader reads.
|
|
330
|
+
const downloadable = attachments.filter((a) => (a.url || a.thumbUrl) && MEDIA_TYPES.has(a.kind));
|
|
331
|
+
|
|
332
|
+
return {
|
|
333
|
+
type,
|
|
334
|
+
text,
|
|
335
|
+
hasAttachment: downloadable.length > 0,
|
|
336
|
+
attachments,
|
|
337
|
+
raw: {
|
|
338
|
+
src: "sync-v2",
|
|
339
|
+
msgType: msg?.msgType,
|
|
340
|
+
msgStatus: msg?.msgStatus,
|
|
341
|
+
cliMsgId: msg?.clientId === undefined || msg?.clientId === null ? undefined : String(msg.clientId),
|
|
342
|
+
content: typeof msg?.content === "string" && msg.content ? msg.content : undefined,
|
|
343
|
+
attachments: attachments.length ? attachments : undefined,
|
|
344
|
+
// Everything else the payload carried, kept verbatim so a later
|
|
345
|
+
// build can read fields this one doesn't understand yet.
|
|
346
|
+
quote: meta.quote || undefined,
|
|
347
|
+
mentions: meta.mentionsList?.length ? meta.mentionsList : undefined,
|
|
348
|
+
reference: meta.reference || undefined,
|
|
349
|
+
property: meta.property || undefined,
|
|
350
|
+
ttl: meta.ttl ? Number(meta.ttl) : undefined,
|
|
351
|
+
},
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* zca-js live-event msgType -> the SAME vocabulary the sync path uses.
|
|
357
|
+
*
|
|
358
|
+
* The listener and the mobile sync describe identical things in different
|
|
359
|
+
* words: a photo arrives as `chat.photo` live and as numeric msgType 3 from the
|
|
360
|
+
* phone. Stored verbatim, `WHERE type = 'photo'` silently misses every
|
|
361
|
+
* listener-captured row and `WHERE type = 'chat.photo'` misses every synced
|
|
362
|
+
* one. One vocabulary, one set of queries.
|
|
363
|
+
*/
|
|
364
|
+
export const LIVE_MSG_TYPES = {
|
|
365
|
+
webchat: "text",
|
|
366
|
+
"chat.photo": "photo",
|
|
367
|
+
"chat.video.msg": "video",
|
|
368
|
+
"share.file": "file",
|
|
369
|
+
"chat.gif": "gif",
|
|
370
|
+
"chat.sticker": "sticker",
|
|
371
|
+
"chat.voice": "voice",
|
|
372
|
+
"chat.doodle": "doodle",
|
|
373
|
+
"chat.link": "link",
|
|
374
|
+
"chat.recommended": "link",
|
|
375
|
+
"chat.zalo.me": "link",
|
|
376
|
+
"chat.location.new": "location",
|
|
377
|
+
"chat.todo": "event",
|
|
378
|
+
// Zalo's "zinstant" rich content -- a bank card is one. Measured: the same
|
|
379
|
+
// action zinstant.bankcard arrives as chat.webcontent live and as msgType 24
|
|
380
|
+
// from a sync, so unmapped it was stored under the raw spelling live.
|
|
381
|
+
"chat.webcontent": "event",
|
|
382
|
+
"group.poll": "poll_event",
|
|
383
|
+
"chat.undo": "deleted",
|
|
384
|
+
"chat.delete": "deleted",
|
|
385
|
+
"chat.ecard": "card",
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
/** Read `params` from a live payload, which may be an object or a JSON string. */
|
|
389
|
+
function liveParams(content) {
|
|
390
|
+
const p = content?.params;
|
|
391
|
+
if (!p) return {};
|
|
392
|
+
if (typeof p === "object") return p;
|
|
393
|
+
try {
|
|
394
|
+
return JSON.parse(p);
|
|
395
|
+
} catch {
|
|
396
|
+
return {};
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Classify a live listener message into the same shape as a synced one.
|
|
402
|
+
*
|
|
403
|
+
* The payload differs from the protobuf: here `content` really is an object for
|
|
404
|
+
* media, URLs are named `href`/`oriUrl`/`normalUrl`/`hdUrl`, and there is no
|
|
405
|
+
* `meta` wrapper. What comes out is deliberately identical to
|
|
406
|
+
* {@link classifySyncMessage} so both paths write interchangeable rows and one
|
|
407
|
+
* downloader serves both.
|
|
408
|
+
*
|
|
409
|
+
* @param {{msgType?: string, content?: object|string, msgId?: string|number, cliMsgId?: string|number}} data
|
|
410
|
+
* the zca-js `msg.data` object
|
|
411
|
+
* @returns {{type: string, text: string, hasAttachment: boolean, attachments: Array<object>, raw: object}}
|
|
412
|
+
*/
|
|
413
|
+
export function classifyLiveMessage(data) {
|
|
414
|
+
const rawType = data?.msgType || "";
|
|
415
|
+
const content = data?.content;
|
|
416
|
+
let type = LIVE_MSG_TYPES[rawType] || (typeof content === "string" ? "text" : rawType || "attachment");
|
|
417
|
+
// `webchat` carries two different things: a real text message, whose content
|
|
418
|
+
// is a string, and a group system event (a member added, a reminder
|
|
419
|
+
// deleted), whose content is an object with this action. The phone reports
|
|
420
|
+
// the latter as msgType 20 -> group_event, so classifying on msgType alone
|
|
421
|
+
// filed the same event as `text` live and as `group_event` from a sync —
|
|
422
|
+
// and the text path, seeing no string body, stored the literal "[text]".
|
|
423
|
+
if (type === "text" && content && typeof content === "object" && content.action === "msginfo.actionlist") {
|
|
424
|
+
type = "group_event";
|
|
425
|
+
}
|
|
426
|
+
const attachments = [];
|
|
427
|
+
|
|
428
|
+
if (content && typeof content === "object") {
|
|
429
|
+
const params = liveParams(content);
|
|
430
|
+
const url = content.href || content.oriUrl || content.normalUrl || undefined;
|
|
431
|
+
const thumbUrl = content.thumb || content.thumbUrl || undefined;
|
|
432
|
+
const kind = kindFromUrl(url) || (MEDIA_TYPES.has(type) ? type : type);
|
|
433
|
+
// A sticker is identified by catalogue + id, not a URL, so the generic
|
|
434
|
+
// test below never fired for one: the same sticker produced one
|
|
435
|
+
// attachment from a sync and zero from the listener, and its text read
|
|
436
|
+
// "[sticker]" instead of "[sticker <cat>/<id>]". Mirrors the sync
|
|
437
|
+
// branch in extractSyncAttachments.
|
|
438
|
+
if (type === "sticker") {
|
|
439
|
+
attachments.push({
|
|
440
|
+
kind: "sticker",
|
|
441
|
+
catId: content.catId ?? content.cat_id ?? null,
|
|
442
|
+
stickerId: content.id ?? content.stickerId ?? null,
|
|
443
|
+
stickerType: content.type ?? null,
|
|
444
|
+
params: Object.keys(params).length ? params : undefined,
|
|
445
|
+
});
|
|
446
|
+
} else if (url || thumbUrl || content.title || Object.keys(params).length) {
|
|
447
|
+
attachments.push({
|
|
448
|
+
kind,
|
|
449
|
+
url,
|
|
450
|
+
thumbUrl,
|
|
451
|
+
hdUrl: content.hdUrl || (typeof params.hd === "string" ? params.hd : undefined),
|
|
452
|
+
title: content.title || undefined,
|
|
453
|
+
description: content.description || undefined,
|
|
454
|
+
action: content.action || undefined,
|
|
455
|
+
fileName: type === "file" ? content.title || undefined : undefined,
|
|
456
|
+
ext: params.fileExt || content.fileExt || undefined,
|
|
457
|
+
size: Number(pick(params, "fileSize", "video_file_size")) || Number(content.fileSize) || undefined,
|
|
458
|
+
checksum: params.checksum || content.checksum || undefined,
|
|
459
|
+
width: Number(pick(params, "width", "video_width", "tWidth")) || undefined,
|
|
460
|
+
height: Number(pick(params, "height", "video_height", "tHeight")) || undefined,
|
|
461
|
+
duration: Number(pick(params, "duration")) || undefined,
|
|
462
|
+
params: Object.keys(params).length ? params : undefined,
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
const downloadable = attachments.filter((a) => (a.url || a.thumbUrl) && MEDIA_TYPES.has(a.kind));
|
|
468
|
+
// Hand extractSyncText the SAME shape the sync path gives it. It reads the
|
|
469
|
+
// first attachment's params to build an event/poll sentence, so passing a
|
|
470
|
+
// synthetic empty meta made every system event read as a bare "[event]"
|
|
471
|
+
// when captured live and as its real text when restored from the phone.
|
|
472
|
+
const liveMeta =
|
|
473
|
+
attachments.length && attachments[0].params
|
|
474
|
+
? { attachsList: [{ params: JSON.stringify(attachments[0].params) }] }
|
|
475
|
+
: {};
|
|
476
|
+
const text =
|
|
477
|
+
typeof content === "string"
|
|
478
|
+
? content.trim()
|
|
479
|
+
: extractSyncText({ content: "", meta: liveMeta }, type, attachments) || `[${type}]`;
|
|
480
|
+
|
|
481
|
+
return {
|
|
482
|
+
type,
|
|
483
|
+
text,
|
|
484
|
+
hasAttachment: downloadable.length > 0,
|
|
485
|
+
attachments,
|
|
486
|
+
raw: {
|
|
487
|
+
src: "listen",
|
|
488
|
+
msgType: rawType || undefined,
|
|
489
|
+
cliMsgId: data?.cliMsgId === undefined || data?.cliMsgId === null ? undefined : String(data.cliMsgId),
|
|
490
|
+
content: typeof content === "string" ? content || undefined : content,
|
|
491
|
+
attachments: attachments.length ? attachments : undefined,
|
|
492
|
+
// The sync path records these; the live path dropped them, so the
|
|
493
|
+
// same message was richer or poorer depending on how it was
|
|
494
|
+
// captured. zca-js supplies all of them on a live event.
|
|
495
|
+
quote: data?.quote || undefined,
|
|
496
|
+
mentions: data?.mentions?.length ? data.mentions : undefined,
|
|
497
|
+
ttl: data?.ttl ? Number(data.ttl) : undefined,
|
|
498
|
+
property: data?.propertyExt || undefined,
|
|
499
|
+
// A seen or delivered receipt names its message by these three, and
|
|
500
|
+
// they exist nowhere but on the socket frame: Zalo Web echoes them
|
|
501
|
+
// back verbatim (captured `"st":3,"at":9,"cmd":501`), and `at`
|
|
502
|
+
// differs per message, so they cannot be rebuilt later -- only kept.
|
|
503
|
+
// 0 is a real value (card receipts carry "at":0), so only an absent
|
|
504
|
+
// field is left out. See src/core/receipts.js.
|
|
505
|
+
st: frameNumber(data?.st),
|
|
506
|
+
at: frameNumber(data?.at),
|
|
507
|
+
cmd: frameNumber(data?.cmd),
|
|
508
|
+
},
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* A numeric socket-frame field, or undefined when the frame did not carry one.
|
|
514
|
+
*
|
|
515
|
+
* @param {unknown} v
|
|
516
|
+
* @returns {number|undefined}
|
|
517
|
+
*/
|
|
518
|
+
function frameNumber(v) {
|
|
519
|
+
if (v === undefined || v === null || v === "") return undefined;
|
|
520
|
+
const n = Number(v);
|
|
521
|
+
return Number.isFinite(n) ? n : undefined;
|
|
522
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decide what one `zalo-agent sync` run does, before it touches the network.
|
|
3
|
+
*
|
|
4
|
+
* Kept pure -- flags, freshness and lock state in, a stage list out -- so the
|
|
5
|
+
* rules that matter most are checkable offline:
|
|
6
|
+
*
|
|
7
|
+
* - at most ONE stage wakes the phone (the message restore), so a run never
|
|
8
|
+
* asks the owner to confirm twice. This holds whichever socket the stage
|
|
9
|
+
* runs on: handing it to a daemon removes the second WebSocket, not the
|
|
10
|
+
* confirmation;
|
|
11
|
+
* - the socket opens at most once. zca-js's stop() resets the listener, and
|
|
12
|
+
* the socket's own onclose resets it AGAIN, asynchronously, after stop()
|
|
13
|
+
* has returned -- so a stage that stops the listener and a later stage that
|
|
14
|
+
* restarts it race, and the late reset nulls the new socket. Every socket
|
|
15
|
+
* stage therefore shares one window, opened first and closed once;
|
|
16
|
+
* - REST stages never wait on the socket and run after it closes, so the
|
|
17
|
+
* account's one web session is held no longer than the socket work needs.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/** Stage order. Socket stages first, in one window; REST after it closes. */
|
|
21
|
+
export const STAGES = [
|
|
22
|
+
{ name: "messages", transport: "socket", phone: true, label: "message history (cmd 590/591)" },
|
|
23
|
+
{ name: "reactions", transport: "socket", phone: false, label: "reaction backlog (cmd 610/611)" },
|
|
24
|
+
{ name: "convState", transport: "rest", phone: false, label: "pinned & unread conversations" },
|
|
25
|
+
{ name: "boards", transport: "rest", phone: false, label: "notes, pins, polls, reminders" },
|
|
26
|
+
{ name: "cloud", transport: "rest", phone: false, label: "zCloud media index" },
|
|
27
|
+
{ name: "media", transport: "http", phone: false, label: "attachment downloads" },
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @param {object} args
|
|
32
|
+
* @param {Record<string, boolean>} args.want - which stages were asked for (all true by default)
|
|
33
|
+
* @param {{skip: boolean, reason: string}} args.freshness - SyncManager.checkSyncFreshness()
|
|
34
|
+
* @param {boolean} args.lockOk - whether this process holds daemon.lock
|
|
35
|
+
* @param {boolean} [args.daemonChannel=false] - whether the daemon holding the lock
|
|
36
|
+
* publishes a usable channel (getDaemonChannel() !== null). When it does, a
|
|
37
|
+
* socket stage runs ON that daemon instead of being skipped — the daemon
|
|
38
|
+
* already has the account's one web session open and keeps capturing live
|
|
39
|
+
* traffic while the stage runs. See src/core/daemon-channel.js.
|
|
40
|
+
* @returns {{openSocket: boolean, viaDaemon: boolean, stages: Array<{name: string,
|
|
41
|
+
* transport: string, label: string, phone: boolean, run: boolean, via: string, why: string}>}}
|
|
42
|
+
* `openSocket` is true only when THIS process must open one; a run that goes
|
|
43
|
+
* through the daemon opens nothing and sets `viaDaemon` instead.
|
|
44
|
+
*/
|
|
45
|
+
export function planSyncRun({
|
|
46
|
+
want = {},
|
|
47
|
+
freshness = { skip: false, reason: "" },
|
|
48
|
+
lockOk = true,
|
|
49
|
+
daemonChannel = false,
|
|
50
|
+
} = {}) {
|
|
51
|
+
const stages = STAGES.map((s) => {
|
|
52
|
+
const wanted = want[s.name] !== false;
|
|
53
|
+
let run = wanted;
|
|
54
|
+
let via = "local";
|
|
55
|
+
let why = wanted ? "" : `--no-${kebab(s.name)}`;
|
|
56
|
+
|
|
57
|
+
if (run && s.transport === "socket" && !lockOk) {
|
|
58
|
+
if (daemonChannel) {
|
|
59
|
+
// The daemon owns the one web session AND will run the stage on
|
|
60
|
+
// it. Nothing is stopped and nothing is evicted, so this is the
|
|
61
|
+
// strictly better outcome: the old answer -- stop the daemon,
|
|
62
|
+
// sync, start it again -- opened a fresh coverage gap between
|
|
63
|
+
// the restore's snapshot and the daemon coming back, and that
|
|
64
|
+
// gap has no repair path.
|
|
65
|
+
via = "daemon";
|
|
66
|
+
} else {
|
|
67
|
+
run = false;
|
|
68
|
+
// A running listen/mcp daemon owns the one web session. It is
|
|
69
|
+
// capturing live traffic already; opening a second session here
|
|
70
|
+
// would evict it and lose messages.
|
|
71
|
+
why = "a listen/mcp daemon holds the account's socket";
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (run && s.name === "messages" && freshness.skip) {
|
|
75
|
+
run = false;
|
|
76
|
+
via = "local";
|
|
77
|
+
why = `synced recently (${freshness.reason}); --force to re-ping the phone`;
|
|
78
|
+
}
|
|
79
|
+
// A running messages stage says why it is not skipped (stale, pending
|
|
80
|
+
// gap, never synced, forced); nothing else depends on freshness.
|
|
81
|
+
return { ...s, run, via, why: run ? (s.name === "messages" ? freshness.reason || "" : "") : why };
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
const socketStages = stages.filter((s) => s.run && s.transport === "socket");
|
|
85
|
+
return {
|
|
86
|
+
openSocket: socketStages.some((s) => s.via === "local"),
|
|
87
|
+
viaDaemon: socketStages.some((s) => s.via === "daemon"),
|
|
88
|
+
stages,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/** "convState" -> "conv-state", for the matching --no-<stage> flag. */
|
|
93
|
+
function kebab(s) {
|
|
94
|
+
return s.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
|
|
95
|
+
}
|