@larksuiteoapi/node-sdk 1.6.2 → 1.6.3
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/es/index.js +5 -4
- package/lib/index.js +5 -4
- package/package.json +1 -1
package/es/index.js
CHANGED
|
@@ -19746,16 +19746,17 @@ class RequestHandle {
|
|
|
19746
19746
|
parse(data) {
|
|
19747
19747
|
const targetData = (() => {
|
|
19748
19748
|
var _a;
|
|
19749
|
-
|
|
19749
|
+
const _b = data || {}, { encrypt } = _b, rest = __rest(_b, ["encrypt"]);
|
|
19750
|
+
if (encrypt) {
|
|
19750
19751
|
try {
|
|
19751
|
-
return JSON.parse((_a = this.aesCipher) === null || _a === void 0 ? void 0 : _a.decrypt(
|
|
19752
|
+
return Object.assign(Object.assign({}, JSON.parse((_a = this.aesCipher) === null || _a === void 0 ? void 0 : _a.decrypt(encrypt))), rest);
|
|
19752
19753
|
}
|
|
19753
19754
|
catch (e) {
|
|
19754
19755
|
this.logger.error('parse encrypt data failed');
|
|
19755
|
-
return
|
|
19756
|
+
return {};
|
|
19756
19757
|
}
|
|
19757
19758
|
}
|
|
19758
|
-
return
|
|
19759
|
+
return rest;
|
|
19759
19760
|
})();
|
|
19760
19761
|
// v1和v2版事件的区别:https://open.feishu.cn/document/ukTMukTMukTM/uUTNz4SN1MjL1UzM
|
|
19761
19762
|
if ('schema' in targetData) {
|
package/lib/index.js
CHANGED
|
@@ -19761,16 +19761,17 @@ class RequestHandle {
|
|
|
19761
19761
|
parse(data) {
|
|
19762
19762
|
const targetData = (() => {
|
|
19763
19763
|
var _a;
|
|
19764
|
-
|
|
19764
|
+
const _b = data || {}, { encrypt } = _b, rest = __rest(_b, ["encrypt"]);
|
|
19765
|
+
if (encrypt) {
|
|
19765
19766
|
try {
|
|
19766
|
-
return JSON.parse((_a = this.aesCipher) === null || _a === void 0 ? void 0 : _a.decrypt(
|
|
19767
|
+
return Object.assign(Object.assign({}, JSON.parse((_a = this.aesCipher) === null || _a === void 0 ? void 0 : _a.decrypt(encrypt))), rest);
|
|
19767
19768
|
}
|
|
19768
19769
|
catch (e) {
|
|
19769
19770
|
this.logger.error('parse encrypt data failed');
|
|
19770
|
-
return
|
|
19771
|
+
return {};
|
|
19771
19772
|
}
|
|
19772
19773
|
}
|
|
19773
|
-
return
|
|
19774
|
+
return rest;
|
|
19774
19775
|
})();
|
|
19775
19776
|
// v1和v2版事件的区别:https://open.feishu.cn/document/ukTMukTMukTM/uUTNz4SN1MjL1UzM
|
|
19776
19777
|
if ('schema' in targetData) {
|