@etainabl/nodejs-sdk 1.3.158 → 1.3.160
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/dist/esm/index.js +19 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.cts +20 -1
- package/dist/index.d.ts +20 -1
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -492,6 +492,7 @@ var api_default = (auth, instanceOptions = {}) => {
|
|
|
492
492
|
createScraperRunLog: subFactory.create(etainablApi, "scraper-runs", "logs"),
|
|
493
493
|
// automation runs
|
|
494
494
|
createAutomationRun: factory.create(etainablApi, "automation-runs"),
|
|
495
|
+
createAutomationFetchRun: factory.create(etainablApi, "automation-runs", "fetch-run"),
|
|
495
496
|
listAutomationRun: factory.list(etainablApi, "automation-runs"),
|
|
496
497
|
getAutomationRun: factory.getWithId(etainablApi, "automation-runs"),
|
|
497
498
|
updateAutomationRun: factory.update(etainablApi, "automation-runs"),
|
|
@@ -1066,6 +1067,7 @@ __export(utils_exports, {
|
|
|
1066
1067
|
automationServices: () => automationServices,
|
|
1067
1068
|
automationSources: () => automationSources,
|
|
1068
1069
|
getMeterPointNumberBottomLine: () => getMeterPointNumberBottomLine,
|
|
1070
|
+
isTransientError: () => isTransientError,
|
|
1069
1071
|
units: () => units,
|
|
1070
1072
|
utilityTypes: () => utilityTypes,
|
|
1071
1073
|
wasteCategories: () => wasteCategories
|
|
@@ -7035,6 +7037,23 @@ var IngestHandler = class {
|
|
|
7035
7037
|
}
|
|
7036
7038
|
};
|
|
7037
7039
|
|
|
7040
|
+
// src/utils/errors.ts
|
|
7041
|
+
function isTransientError(error) {
|
|
7042
|
+
if (error.code === "ETIMEDOUT" || error.code === "ECONNRESET" || error.code === "ENOTFOUND" || error.code === "ECONNREFUSED") {
|
|
7043
|
+
return true;
|
|
7044
|
+
}
|
|
7045
|
+
if (error.message?.includes("timeout") || error.message?.includes("ETIMEDOUT")) {
|
|
7046
|
+
return true;
|
|
7047
|
+
}
|
|
7048
|
+
if (error.response?.status >= 500 && error.response?.status < 600) {
|
|
7049
|
+
return true;
|
|
7050
|
+
}
|
|
7051
|
+
if (error.message?.includes("Cloudflare") || error.message?.includes("522") || error.message?.includes("524")) {
|
|
7052
|
+
return true;
|
|
7053
|
+
}
|
|
7054
|
+
return false;
|
|
7055
|
+
}
|
|
7056
|
+
|
|
7038
7057
|
// src/openai/index.ts
|
|
7039
7058
|
var openai_exports = {};
|
|
7040
7059
|
__export(openai_exports, {
|