@etainabl/nodejs-sdk 1.3.140 → 1.3.142

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 CHANGED
@@ -469,6 +469,8 @@ var api_default = (auth, instanceOptions = {}) => {
469
469
  // scraper runs
470
470
  listScraperRuns: factory.list(etainablApi, "scraper-runs"),
471
471
  updateScraperRun: factory.update(etainablApi, "scraper-runs"),
472
+ createScraperRun: factory.create(etainablApi, "scraper-runs"),
473
+ createScraperRunLog: subFactory.create(etainablApi, "scraper-runs", "logs"),
472
474
  // automation runs
473
475
  createAutomationRun: factory.create(etainablApi, "automation-runs"),
474
476
  listAutomationRun: factory.list(etainablApi, "automation-runs"),
@@ -868,7 +870,7 @@ var convertItems = (items, type, defaultUnits, accountFactor) => {
868
870
  return convertedItems;
869
871
  };
870
872
  var simpleConvert = (value, fromUnit, toUnit) => {
871
- if (!value) throw new Error("Value is required");
873
+ if (typeof value !== "number" || isNaN(value)) throw new Error("Value must be a valid number");
872
874
  if (!fromUnit) throw new Error("From unit is required");
873
875
  if (!toUnit) throw new Error("To unit is required");
874
876
  const conversionFactor = _getConversionFactor(fromUnit, toUnit);
@@ -6128,6 +6130,9 @@ async function deleteMessage(queueUrl, receiptHandle, sqsClient) {
6128
6130
  console.log("Deleted SQS message", { ReceiptHandle: receiptHandle });
6129
6131
  }
6130
6132
 
6133
+ // src/scrapers.ts
6134
+ var scrapers_exports = {};
6135
+
6131
6136
  // src/types/index.ts
6132
6137
  import { ObjectId } from "mongodb";
6133
6138
  export {
@@ -6141,6 +6146,7 @@ export {
6141
6146
  monitoring_exports as monitoring,
6142
6147
  openai_exports as openai,
6143
6148
  reporting_exports as reporting,
6149
+ scrapers_exports as scrapers,
6144
6150
  slack_default as slack,
6145
6151
  units_exports as units,
6146
6152
  utils_exports as utils