@etainabl/nodejs-sdk 1.2.48 → 1.2.50

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
@@ -539,16 +539,37 @@ interface Reading {
539
539
  userSub?: string;
540
540
  }
541
541
 
542
+ type ReportSource = 'assetGroup' | 'asset' | 'account' | 'accountsByRegister';
543
+ interface ReportSourceIdItem {
544
+ _id: string;
545
+ type: ReportSource;
546
+ }
547
+ interface ReportMetadata {
548
+ type: string;
549
+ format: string;
550
+ source: ReportSource;
551
+ startDate?: string;
552
+ endDate?: string;
553
+ subType: string;
554
+ granularity?: string;
555
+ sourceIds?: ReportSourceIdItem[];
556
+ schema?: [string];
557
+ rawUnits?: boolean;
558
+ dayNightSplit: boolean;
559
+ consumptionSource?: 'reading' | 'invoice' | 'combined' | 'hh' | 'reading-hh';
560
+ showSimulated?: boolean;
561
+ chartOptions?: any;
562
+ }
542
563
  interface Report {
543
564
  _id: string;
544
565
  type: 'dynamic' | 'spreadsheet' | 'table' | 'pdf';
545
566
  subType?: string;
546
- fileFormat: 'pdf' | 'xlsx' | 'csv' | 'png' | 'jpg' | 'chart';
567
+ fileFormat: 'pdf' | 'xlsx' | 'csv' | 'json' | 'png' | 'jpg' | 'chart';
547
568
  fileName?: string;
548
569
  status: 'preparing' | 'ready';
549
570
  scheduled?: boolean;
550
571
  version?: number;
551
- metadata?: Record<string, any>;
572
+ metadata?: ReportMetadata;
552
573
  data?: Record<string, any>;
553
574
  requestedAt: Date;
554
575
  availableAt?: Date;
@@ -779,4 +800,4 @@ declare namespace reporting {
779
800
  export { reporting_getScheduledReportRunTimes as getScheduledReportRunTimes };
780
801
  }
781
802
 
782
- export { type Account, type Asset, type Automation, type Company, type CreateScraperRunParams, type DataIngest, type ETNPagedResponse$1 as ETNPagedResponse, type Email, type Entity, type Invoice, type Log, type Reading, type Report, type ScraperRun, type Supplier, _default$3 as api, consumption, _default$1 as db, _default$2 as logger, monitoring, reporting, _default as slack, units };
803
+ export { type Account, type Asset, type Automation, type Company, type CreateScraperRunParams, type DataIngest, type ETNPagedResponse$1 as ETNPagedResponse, type Email, type Entity, type Invoice, type Log, type Reading, type Report, type ReportMetadata, type ReportSource, type ReportSourceIdItem, type ScraperRun, type Supplier, _default$3 as api, consumption, _default$1 as db, _default$2 as logger, monitoring, reporting, _default as slack, units };
package/dist/index.d.ts CHANGED
@@ -539,16 +539,37 @@ interface Reading {
539
539
  userSub?: string;
540
540
  }
541
541
 
542
+ type ReportSource = 'assetGroup' | 'asset' | 'account' | 'accountsByRegister';
543
+ interface ReportSourceIdItem {
544
+ _id: string;
545
+ type: ReportSource;
546
+ }
547
+ interface ReportMetadata {
548
+ type: string;
549
+ format: string;
550
+ source: ReportSource;
551
+ startDate?: string;
552
+ endDate?: string;
553
+ subType: string;
554
+ granularity?: string;
555
+ sourceIds?: ReportSourceIdItem[];
556
+ schema?: [string];
557
+ rawUnits?: boolean;
558
+ dayNightSplit: boolean;
559
+ consumptionSource?: 'reading' | 'invoice' | 'combined' | 'hh' | 'reading-hh';
560
+ showSimulated?: boolean;
561
+ chartOptions?: any;
562
+ }
542
563
  interface Report {
543
564
  _id: string;
544
565
  type: 'dynamic' | 'spreadsheet' | 'table' | 'pdf';
545
566
  subType?: string;
546
- fileFormat: 'pdf' | 'xlsx' | 'csv' | 'png' | 'jpg' | 'chart';
567
+ fileFormat: 'pdf' | 'xlsx' | 'csv' | 'json' | 'png' | 'jpg' | 'chart';
547
568
  fileName?: string;
548
569
  status: 'preparing' | 'ready';
549
570
  scheduled?: boolean;
550
571
  version?: number;
551
- metadata?: Record<string, any>;
572
+ metadata?: ReportMetadata;
552
573
  data?: Record<string, any>;
553
574
  requestedAt: Date;
554
575
  availableAt?: Date;
@@ -779,4 +800,4 @@ declare namespace reporting {
779
800
  export { reporting_getScheduledReportRunTimes as getScheduledReportRunTimes };
780
801
  }
781
802
 
782
- export { type Account, type Asset, type Automation, type Company, type CreateScraperRunParams, type DataIngest, type ETNPagedResponse$1 as ETNPagedResponse, type Email, type Entity, type Invoice, type Log, type Reading, type Report, type ScraperRun, type Supplier, _default$3 as api, consumption, _default$1 as db, _default$2 as logger, monitoring, reporting, _default as slack, units };
803
+ export { type Account, type Asset, type Automation, type Company, type CreateScraperRunParams, type DataIngest, type ETNPagedResponse$1 as ETNPagedResponse, type Email, type Entity, type Invoice, type Log, type Reading, type Report, type ReportMetadata, type ReportSource, type ReportSourceIdItem, type ScraperRun, type Supplier, _default$3 as api, consumption, _default$1 as db, _default$2 as logger, monitoring, reporting, _default as slack, units };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etainabl/nodejs-sdk",
3
- "version": "1.2.48",
3
+ "version": "1.2.50",
4
4
  "type": "module",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.mjs",