@xuda.io/xuda-worker-bundle-min 1.3.696 → 1.3.698
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/index.js +34 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1048,6 +1048,40 @@ func.api.call_project_api = async function (prog_id, params) {
|
|
|
1048
1048
|
|
|
1049
1049
|
return await api_utils.call_project_api(prog_id, params, null);
|
|
1050
1050
|
};
|
|
1051
|
+
func.api.call_system_api = async function (api_method, payload) {
|
|
1052
|
+
const SESSION_ID = Object.keys(SESSION_OBJ)[0];
|
|
1053
|
+
const api_utils = await func.common.get_module(
|
|
1054
|
+
SESSION_ID,
|
|
1055
|
+
"xuda-api-library.mjs",
|
|
1056
|
+
{
|
|
1057
|
+
func,
|
|
1058
|
+
glb,
|
|
1059
|
+
SESSION_OBJ,
|
|
1060
|
+
SESSION_ID,
|
|
1061
|
+
APP_OBJ,
|
|
1062
|
+
dsSession: Object.keys(SESSION_OBJ[SESSION_ID].DS_GLB).length - 1,
|
|
1063
|
+
}
|
|
1064
|
+
);
|
|
1065
|
+
|
|
1066
|
+
return await api_utils.call_system_api(api_method, payload, null);
|
|
1067
|
+
};
|
|
1068
|
+
func.api.call_external_api = async function (method, url, payload) {
|
|
1069
|
+
const SESSION_ID = Object.keys(SESSION_OBJ)[0];
|
|
1070
|
+
const api_utils = await func.common.get_module(
|
|
1071
|
+
SESSION_ID,
|
|
1072
|
+
"xuda-api-library.mjs",
|
|
1073
|
+
{
|
|
1074
|
+
func,
|
|
1075
|
+
glb,
|
|
1076
|
+
SESSION_OBJ,
|
|
1077
|
+
SESSION_ID,
|
|
1078
|
+
APP_OBJ,
|
|
1079
|
+
dsSession: Object.keys(SESSION_OBJ[SESSION_ID].DS_GLB).length - 1,
|
|
1080
|
+
}
|
|
1081
|
+
);
|
|
1082
|
+
|
|
1083
|
+
return await api_utils.call_external_api(method, url, payload, null);
|
|
1084
|
+
};
|
|
1051
1085
|
glb.rpi_request_queue_num = 0;
|
|
1052
1086
|
func.common.perform_rpi_request = async function (
|
|
1053
1087
|
SESSION_ID,
|