@etainabl/nodejs-sdk 1.3.162 → 1.3.164

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/index.d.cts CHANGED
@@ -708,7 +708,7 @@ interface AccountResult<IDType = ObjectId | string, DateType = Date | string> {
708
708
  expectedFormat?: string;
709
709
  }[];
710
710
  }
711
- type ProblemCodes = 'ACCOUNT_NOT_FOUND' | 'INVALID_DATE_FORMAT' | 'INVALID_TIME_FORMAT' | 'COLUMN_LIMIT_EXCEEDED' | 'INVALID_TIMESTAMP' | 'MISSING_DEVICE_ID' | 'UNSUPPORTED_UTILITY_TYPE' | 'VALIDATION_ERROR' | 'METER_READS_ZERO';
711
+ type ProblemCodes = 'ACCOUNT_NOT_FOUND' | 'INVALID_DATE_FORMAT' | 'INVALID_TIME_FORMAT' | 'COLUMN_LIMIT_EXCEEDED' | 'INVALID_TIMESTAMP' | 'MISSING_DEVICE_ID' | 'UNSUPPORTED_UTILITY_TYPE' | 'VALIDATION_ERROR' | 'METER_READS_ZERO' | 'NO_DATA';
712
712
  type ProblemDetails = {
713
713
  deviceId?: string;
714
714
  row?: number;
@@ -1523,6 +1523,7 @@ declare const _default$4: (auth: AuthOptions, instanceOptions?: CreateAxiosDefau
1523
1523
  listLogs: <P = Log<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
1524
1524
  updateLog: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Log<string>>;
1525
1525
  createLog: (data: any, options?: AxiosRequestConfig) => Promise<Log<string>>;
1526
+ createLogBulk: (data: any, options?: AxiosRequestConfig) => Promise<Log<string>[]>;
1526
1527
  removeLog: (id: string, options?: AxiosRequestConfig) => Promise<Log<string>>;
1527
1528
  getReading: (id: string, options?: AxiosRequestConfig) => Promise<Reading<string, Date>>;
1528
1529
  listReadings: <P = Reading<string, Date>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
package/dist/index.d.ts CHANGED
@@ -708,7 +708,7 @@ interface AccountResult<IDType = ObjectId | string, DateType = Date | string> {
708
708
  expectedFormat?: string;
709
709
  }[];
710
710
  }
711
- type ProblemCodes = 'ACCOUNT_NOT_FOUND' | 'INVALID_DATE_FORMAT' | 'INVALID_TIME_FORMAT' | 'COLUMN_LIMIT_EXCEEDED' | 'INVALID_TIMESTAMP' | 'MISSING_DEVICE_ID' | 'UNSUPPORTED_UTILITY_TYPE' | 'VALIDATION_ERROR' | 'METER_READS_ZERO';
711
+ type ProblemCodes = 'ACCOUNT_NOT_FOUND' | 'INVALID_DATE_FORMAT' | 'INVALID_TIME_FORMAT' | 'COLUMN_LIMIT_EXCEEDED' | 'INVALID_TIMESTAMP' | 'MISSING_DEVICE_ID' | 'UNSUPPORTED_UTILITY_TYPE' | 'VALIDATION_ERROR' | 'METER_READS_ZERO' | 'NO_DATA';
712
712
  type ProblemDetails = {
713
713
  deviceId?: string;
714
714
  row?: number;
@@ -1523,6 +1523,7 @@ declare const _default$4: (auth: AuthOptions, instanceOptions?: CreateAxiosDefau
1523
1523
  listLogs: <P = Log<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
1524
1524
  updateLog: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Log<string>>;
1525
1525
  createLog: (data: any, options?: AxiosRequestConfig) => Promise<Log<string>>;
1526
+ createLogBulk: (data: any, options?: AxiosRequestConfig) => Promise<Log<string>[]>;
1526
1527
  removeLog: (id: string, options?: AxiosRequestConfig) => Promise<Log<string>>;
1527
1528
  getReading: (id: string, options?: AxiosRequestConfig) => Promise<Reading<string, Date>>;
1528
1529
  listReadings: <P = Reading<string, Date>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
package/dist/index.js CHANGED
@@ -16492,6 +16492,7 @@ var api_default = (auth, instanceOptions = {}) => {
16492
16492
  listLogs: factory.list(etainablApi, "logs"),
16493
16493
  updateLog: factory.update(etainablApi, "logs"),
16494
16494
  createLog: factory.create(etainablApi, "logs"),
16495
+ createLogBulk: factory.create(etainablApi, "logs", "bulk"),
16495
16496
  removeLog: factory.remove(etainablApi, "logs"),
16496
16497
  // readings
16497
16498
  getReading: factory.getWithId(etainablApi, "readings"),
@@ -25418,7 +25419,8 @@ var errorCodes = [
25418
25419
  "MISSING_DEVICE_ID",
25419
25420
  "UNSUPPORTED_UTILITY_TYPE",
25420
25421
  "VALIDATION_ERROR",
25421
- "METER_READS_ZERO"
25422
+ "METER_READS_ZERO",
25423
+ "NO_DATA"
25422
25424
  ];
25423
25425
  var errorCodeMap = {
25424
25426
  ACCOUNT_NOT_FOUND: {
@@ -25428,6 +25430,10 @@ var errorCodeMap = {
25428
25430
  return !problems.some((p7) => p7.code === "ACCOUNT_NOT_FOUND" && p7.details?.value === details?.value);
25429
25431
  }
25430
25432
  },
25433
+ NO_DATA: {
25434
+ status: "error",
25435
+ message: `No data found for this account in the file`
25436
+ },
25431
25437
  INVALID_DATE_FORMAT: {
25432
25438
  status: "error",
25433
25439
  message: "The date format in the file is invalid"