@etainabl/nodejs-sdk 1.2.54 → 1.2.56

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
@@ -4,12 +4,12 @@ import { ObjectId, Db } from 'mongodb';
4
4
  import winston from 'winston';
5
5
  import moment from 'moment';
6
6
 
7
- interface Portal {
7
+ interface Portal<IDType = ObjectId | string> {
8
8
  username?: string;
9
9
  password?: string;
10
10
  scraperEnabled?: boolean;
11
11
  url?: string;
12
- scraperId?: ObjectId | string;
12
+ scraperId?: IDType;
13
13
  scraperStartDate?: Date;
14
14
  }
15
15
 
@@ -29,8 +29,8 @@ interface RateSchema {
29
29
  value: number;
30
30
  description: string;
31
31
  }
32
- interface ContractSchema {
33
- _id: ObjectId | string;
32
+ interface ContractSchema<IDType = ObjectId | string> {
33
+ _id: IDType;
34
34
  startDate: Date;
35
35
  endDate: Date;
36
36
  terminationDate?: Date;
@@ -47,13 +47,13 @@ interface ContractSchema {
47
47
  s3Key?: string;
48
48
  rateTypeMapping?: object;
49
49
  batchId?: string;
50
- supplierId?: ObjectId | string;
50
+ supplierId?: IDType;
51
51
  status: 'active' | 'inactive';
52
52
  userSub?: string;
53
53
  deletedOn?: Date;
54
54
  }
55
- interface CreditNoteSchema {
56
- _id: ObjectId | string;
55
+ interface CreditNoteSchema<IDType = ObjectId | string> {
56
+ _id: IDType;
57
57
  name: string;
58
58
  type: string;
59
59
  amount: number;
@@ -66,8 +66,8 @@ interface CreditNoteSchema {
66
66
  fileName: string;
67
67
  invoiceData: object;
68
68
  userSub: string;
69
- readingIds: ObjectId[] | string[];
70
- supplierId: ObjectId | string;
69
+ readingIds: IDType[];
70
+ supplierId: IDType;
71
71
  totalUnits: number;
72
72
  endDate: Date;
73
73
  startDate: Date;
@@ -77,8 +77,8 @@ interface CreditNoteSchema {
77
77
  totalWaterCost: number;
78
78
  totalWasteCost: number;
79
79
  }
80
- interface Account {
81
- _id: ObjectId | string;
80
+ interface Account<IDType = ObjectId | string> {
81
+ _id: IDType;
82
82
  name: string;
83
83
  modifiedBy?: string;
84
84
  siteCode?: string;
@@ -100,7 +100,7 @@ interface Account {
100
100
  meterOperatorType?: 'lease' | 'purchase';
101
101
  meterOperatorExpiryDate?: Date;
102
102
  dataCollector?: string;
103
- parentAccountId?: ObjectId | string;
103
+ parentAccountId?: IDType;
104
104
  processingInvoices?: object[];
105
105
  contracts?: ContractSchema[];
106
106
  creditNotes?: CreditNoteSchema[];
@@ -125,11 +125,11 @@ interface Account {
125
125
  };
126
126
  automationIds?: ObjectId[] | string[];
127
127
  customIntegrations?: object;
128
- supplierId?: ObjectId | string;
128
+ supplierId?: IDType;
129
129
  batchId?: string;
130
- assetId: ObjectId | string;
131
- entityId: ObjectId | string;
132
- companyId: ObjectId | string;
130
+ assetId: IDType;
131
+ entityId: IDType;
132
+ companyId: IDType;
133
133
  userSub: string;
134
134
  }
135
135
 
@@ -208,9 +208,9 @@ interface TimelineEvent {
208
208
  icon?: string;
209
209
  accountIds?: ObjectId[] | string[];
210
210
  }
211
- interface AssetRecommendation {
212
- recommendationId: ObjectId | string;
213
- documentIds?: ObjectId[] | string[];
211
+ interface AssetRecommendation<IDType = ObjectId | string> {
212
+ recommendationId: IDType;
213
+ documentIds?: IDType[];
214
214
  }
215
215
  interface AssetSettings {
216
216
  consumptionSources: {
@@ -220,8 +220,8 @@ interface AssetSettings {
220
220
  water: string;
221
221
  };
222
222
  }
223
- interface Asset {
224
- _id: ObjectId | string;
223
+ interface Asset<IDType = ObjectId | string> {
224
+ _id: IDType;
225
225
  siteName: string;
226
226
  address: Address;
227
227
  assetType: string;
@@ -258,15 +258,15 @@ interface Asset {
258
258
  lastPopulated?: Date;
259
259
  deletedOn?: Date;
260
260
  batchId?: string;
261
- companyId: ObjectId | string;
262
- entityId: ObjectId | string;
261
+ companyId: IDType;
262
+ entityId: IDType;
263
263
  assetGroupIds: ObjectId[] | string[];
264
264
  userSub: string;
265
265
  gresbId?: string;
266
266
  }
267
267
 
268
- interface Log$1 {
269
- _id: ObjectId | string;
268
+ interface Log$1<IDType = ObjectId | string> {
269
+ _id: IDType;
270
270
  message: string;
271
271
  timestamp: Date;
272
272
  batchId?: string;
@@ -280,8 +280,8 @@ interface LastCollection {
280
280
  source: Record<string, any> | null;
281
281
  }
282
282
  type FrequencyType = 'never' | 'trigger' | 'hourly' | 'daily' | 'weekly' | 'monthly';
283
- interface Automation {
284
- _id: ObjectId | string;
283
+ interface Automation<IDType = ObjectId | string> {
284
+ _id: IDType;
285
285
  description?: string;
286
286
  service: string;
287
287
  source: string;
@@ -296,11 +296,11 @@ interface Automation {
296
296
  accountIds?: ObjectId[] | string[];
297
297
  assetIds?: ObjectId[] | string[];
298
298
  userSub: string;
299
- companyId: ObjectId | string;
299
+ companyId: IDType;
300
300
  }
301
301
 
302
- interface SupplierPortals {
303
- supplierId: ObjectId | string;
302
+ interface SupplierPortals<IDType = ObjectId | string> {
303
+ supplierId: IDType;
304
304
  portal: Portal;
305
305
  }
306
306
  interface CustomIntegrations {
@@ -328,8 +328,8 @@ interface CompanySettings {
328
328
  defaultSources?: DefaultSources;
329
329
  scraperCounter?: number;
330
330
  }
331
- interface Company {
332
- _id: ObjectId | string;
331
+ interface Company<IDType = ObjectId | string> {
332
+ _id: IDType;
333
333
  name: string;
334
334
  address?: Address;
335
335
  invoiceEmail?: string;
@@ -339,24 +339,24 @@ interface Company {
339
339
  logoUrl?: string;
340
340
  }
341
341
 
342
- interface CreateScraperRunParams {
343
- supplierId: ObjectId | string;
344
- accountId: ObjectId | string;
345
- companyId: ObjectId | string;
342
+ interface CreateScraperRunParams<IDType = ObjectId | string> {
343
+ supplierId: IDType;
344
+ accountId: IDType;
345
+ companyId: IDType;
346
346
  }
347
- interface ScraperRun {
348
- _id: ObjectId | string;
347
+ interface ScraperRun<IDType = ObjectId | string> {
348
+ _id: IDType;
349
349
  logs?: {}[];
350
- supplierId: ObjectId | string;
351
- accountId: ObjectId | string;
352
- companyId: ObjectId | string;
350
+ supplierId: IDType;
351
+ accountId: IDType;
352
+ companyId: IDType;
353
353
  invoiceData?: [];
354
354
  status: string[];
355
355
  error?: string;
356
356
  }
357
357
 
358
- interface DataIngest {
359
- _id: ObjectId | string;
358
+ interface DataIngest<IDType = ObjectId | string> {
359
+ _id: IDType;
360
360
  messageId: string;
361
361
  status: 'started' | 'processing' | 'importing' | 'completed' | 'failed' | 'dlq';
362
362
  context: any;
@@ -365,16 +365,16 @@ interface DataIngest {
365
365
  }
366
366
 
367
367
  type EntityType = 'fund' | 'company' | 'charity' | 'school/university' | 'council' | 'other';
368
- interface Entity {
369
- _id: ObjectId | string;
368
+ interface Entity<IDType = ObjectId | string> {
369
+ _id: IDType;
370
370
  legalName: string;
371
371
  type: EntityType;
372
372
  companyNumber?: string;
373
373
  companyLogo?: string;
374
374
  billingAddress: Address;
375
- parentEntityId?: ObjectId | string;
376
- ultimateParentEntityId?: ObjectId | string;
377
- companyId: ObjectId | string;
375
+ parentEntityId?: IDType;
376
+ ultimateParentEntityId?: IDType;
377
+ companyId: IDType;
378
378
  batchId?: string;
379
379
  userSub: string;
380
380
  }
@@ -383,8 +383,8 @@ interface Attachment {
383
383
  filename: string;
384
384
  s3Key: string;
385
385
  }
386
- interface Email {
387
- _id: ObjectId | string;
386
+ interface Email<IDType = ObjectId | string> {
387
+ _id: IDType;
388
388
  destinations: string[];
389
389
  service: string;
390
390
  subject: string;
@@ -394,7 +394,7 @@ interface Email {
394
394
  sesMessageId: string;
395
395
  s3Key: string;
396
396
  userSub?: string;
397
- companyId?: ObjectId | string;
397
+ companyId?: IDType;
398
398
  }
399
399
 
400
400
  interface InvoiceValues {
@@ -474,8 +474,8 @@ interface InvoiceRate {
474
474
  type InvoiceStatus = 'processing' | 'pending' | 'uploading' | 'queued' | 'captured' | 'error' | 'completed';
475
475
  type FinancialStatus = 'approved' | 'new' | 'not-approved' | 'paid' | 'sent-for-payment';
476
476
  type InvoiceRateType = 'unitRate' | 'daily' | 'levy' | 'tax' | 'kva' | 'waterRate' | 'wasteRate' | 'discount';
477
- interface Invoice {
478
- _id: ObjectId | string;
477
+ interface Invoice<IDType = ObjectId | string> {
478
+ _id: IDType;
479
479
  jobId?: string | null;
480
480
  startTime?: Date;
481
481
  endTime?: Date | null;
@@ -507,74 +507,74 @@ interface Invoice {
507
507
  confirmedAt?: Date | null;
508
508
  confirmedBy?: string | null;
509
509
  supplierId?: string | null;
510
- sisterId?: ObjectId | string | null;
511
- batchId?: ObjectId | string | null;
512
- accountId?: ObjectId | string | null;
513
- entityId?: ObjectId | string;
510
+ sisterId?: IDType | null;
511
+ batchId?: IDType | null;
512
+ accountId?: IDType | null;
513
+ entityId?: IDType;
514
514
  companyId: string;
515
515
  userSub: string;
516
516
  validation?: any[];
517
517
  }
518
518
 
519
- interface Log {
520
- _id: ObjectId | string;
519
+ interface Log<IDType = ObjectId | string> {
520
+ _id: IDType;
521
521
  message: string;
522
522
  context?: {};
523
- linkedId?: ObjectId | string;
523
+ linkedId?: IDType;
524
524
  linkedType?: string;
525
525
  type: string;
526
526
  userSub?: string;
527
- companyId?: ObjectId | string;
527
+ companyId?: IDType;
528
528
  }
529
529
 
530
- interface Reading {
530
+ interface Reading<IDType = ObjectId | string> {
531
531
  _id: string;
532
532
  submittedAt: Date;
533
533
  value: number;
534
534
  type?: string;
535
535
  invoiceStartRead?: number;
536
536
  source: string;
537
- invoiceId?: ObjectId | string;
538
- rateId?: ObjectId | string;
537
+ invoiceId?: IDType;
538
+ rateId?: IDType;
539
539
  contractRateType?: string;
540
540
  invoiceBatchId?: string;
541
541
  batchId?: string;
542
- accountId: ObjectId | string;
543
- entityId: ObjectId | string;
544
- companyId: ObjectId | string;
542
+ accountId: IDType;
543
+ entityId: IDType;
544
+ companyId: IDType;
545
545
  userSub?: string;
546
546
  }
547
547
 
548
548
  type ReportSource = 'assetGroup' | 'asset' | 'account' | 'accountsByRegister';
549
- interface ReportSourceIdItem<T> {
550
- _id: T;
549
+ interface ReportSourceIdItem<IDType = ObjectId | string> {
550
+ _id: IDType;
551
551
  type: ReportSource;
552
552
  }
553
- interface ReportMetadata {
553
+ interface ReportMetadata<IDType = ObjectId | string> {
554
554
  type: string;
555
555
  format: string;
556
556
  source: ReportSource;
557
+ subType: string;
558
+ filters: Record<string, any>;
559
+ activityType?: string;
560
+ utilityType?: UtilityType;
557
561
  startDate?: string;
558
562
  endDate?: string;
559
- subType: string;
560
563
  granularity?: string;
561
- sourceIds?: ReportSourceIdItem<string>[] | ReportSourceIdItem<ObjectId>[];
564
+ sourceIds?: ReportSourceIdItem<IDType>[];
562
565
  schema?: [string];
563
566
  rawUnits?: boolean;
564
- dayNightSplit: boolean;
567
+ dayNightSplit?: boolean;
565
568
  consumptionSource?: 'reading' | 'invoice' | 'combined' | 'hh' | 'reading-hh';
566
569
  showSimulated?: boolean;
567
570
  chartOptions?: any;
568
- filters: Record<string, any>;
569
- readingSource: Reading['source'];
570
- dateField: 'startDateEndDate' | 'startDate' | 'endDate' | 'confirmedAt';
571
- includeSubMeters: boolean;
572
- utilityType: UtilityType;
573
- accountTag: string;
574
- activityType: string;
575
- }
576
- interface Report {
577
- _id: ObjectId | string;
571
+ readingSource?: Reading['source'];
572
+ dateField?: 'startDateEndDate' | 'startDate' | 'endDate' | 'confirmedAt';
573
+ includeSubMeters?: boolean;
574
+ accountTag?: string;
575
+ }
576
+ interface Report<IDType = ObjectId | string> {
577
+ _id: IDType;
578
578
  type: 'dynamic' | 'spreadsheet' | 'table' | 'pdf';
579
579
  subType?: string;
580
580
  fileFormat: 'pdf' | 'xlsx' | 'csv' | 'json' | 'png' | 'jpg' | 'chart';
@@ -582,16 +582,16 @@ interface Report {
582
582
  status: 'preparing' | 'ready';
583
583
  scheduled?: boolean;
584
584
  version?: number;
585
- metadata?: ReportMetadata;
585
+ metadata?: ReportMetadata<IDType>;
586
586
  data?: Record<string, any>;
587
587
  requestedAt: Date;
588
588
  availableAt?: Date;
589
589
  s3Key: string | null;
590
590
  batchId?: string;
591
- scheduledReportId?: ObjectId | string;
592
- reportTemplateId?: ObjectId | string;
593
- entityId: ObjectId | string;
594
- companyId: ObjectId | string;
591
+ scheduledReportId?: IDType;
592
+ reportTemplateId?: IDType;
593
+ entityId: IDType;
594
+ companyId: IDType;
595
595
  userSub?: string;
596
596
  }
597
597
 
@@ -604,8 +604,8 @@ interface InvoiceOptionsSchema {
604
604
  stampPositionX?: number;
605
605
  stampPositionY?: number;
606
606
  }
607
- interface Supplier {
608
- _id: ObjectId | string;
607
+ interface Supplier<IDType = ObjectId | string> {
608
+ _id: IDType;
609
609
  name: string;
610
610
  logoUrl?: string;
611
611
  websiteUrl?: string;
@@ -628,14 +628,6 @@ interface ETNPagedResponse$1<T = any> {
628
628
  limit: number;
629
629
  skip: number;
630
630
  }
631
- type ToAPIType<T> = T extends (ObjectId | string) ? string : T extends Array<infer U> ? Array<ToAPIType<U>> : T extends object ? {
632
- [K in keyof T]: ToAPIType<T[K]>;
633
- } : T;
634
- type ToMongoType<T> = T extends (ObjectId | string) ? ObjectId : T extends Array<infer U> ? Array<ToMongoType<U>> : T extends object ? {
635
- [K in keyof T]: ToMongoType<T[K]>;
636
- } : T;
637
- type APIResponse<T> = ToAPIType<T>;
638
- type DBResponse<T> = ToMongoType<T>;
639
631
 
640
632
  interface ETNPagedResponse<T = any> {
641
633
  data: T[];
@@ -649,18 +641,18 @@ interface AuthOptions {
649
641
  }
650
642
  declare const _default$3: (auth: AuthOptions, instanceOptions?: CreateAxiosDefaults) => {
651
643
  instance: AxiosInstance;
652
- getAccount: (id: string, options?: AxiosRequestConfig<any>) => Promise<Account>;
653
- listAccounts: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Account>>;
654
- updateAccount: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
655
- createAccount: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
656
- removeAccount: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
644
+ getAccount: (id: string, options?: AxiosRequestConfig<any>) => Promise<Account<string>>;
645
+ listAccounts: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Account<string>>>;
646
+ updateAccount: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<Account<string>>;
647
+ createAccount: (data: any, options?: AxiosRequestConfig<any>) => Promise<Account<string>>;
648
+ removeAccount: (id: string, options?: AxiosRequestConfig<any>) => Promise<Account<string>>;
657
649
  getAccountSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
658
650
  invalidateAccountCache: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
659
- getAsset: (id: string, options?: AxiosRequestConfig<any>) => Promise<Asset>;
660
- listAssets: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Asset>>;
661
- updateAsset: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
662
- createAsset: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
663
- removeAsset: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
651
+ getAsset: (id: string, options?: AxiosRequestConfig<any>) => Promise<Asset<string>>;
652
+ listAssets: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Asset<string>>>;
653
+ updateAsset: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<Asset<string>>;
654
+ createAsset: (data: any, options?: AxiosRequestConfig<any>) => Promise<Asset<string>>;
655
+ removeAsset: (id: string, options?: AxiosRequestConfig<any>) => Promise<Asset<string>>;
664
656
  getAssetSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
665
657
  getAssetGroup: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
666
658
  listAssetGroups: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<any>>;
@@ -669,15 +661,15 @@ declare const _default$3: (auth: AuthOptions, instanceOptions?: CreateAxiosDefau
669
661
  removeAssetGroup: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
670
662
  getAssetGroupAssets: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
671
663
  getAssetGroupSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
672
- getAutomation: (id: string, options?: AxiosRequestConfig<any>) => Promise<Automation>;
673
- listAutomations: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Automation>>;
674
- updateAutomation: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
675
- createAutomation: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
676
- removeAutomation: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
664
+ getAutomation: (id: string, options?: AxiosRequestConfig<any>) => Promise<Automation<string>>;
665
+ listAutomations: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Automation<string>>>;
666
+ updateAutomation: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<Automation<string>>;
667
+ createAutomation: (data: any, options?: AxiosRequestConfig<any>) => Promise<Automation<string>>;
668
+ removeAutomation: (id: string, options?: AxiosRequestConfig<any>) => Promise<Automation<string>>;
677
669
  createAutomationLog: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
678
670
  updateAutomationLog: (id: string, subId: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
679
671
  removeAutomationLog: (id: string, subId: string, options?: AxiosRequestConfig<any>) => Promise<any>;
680
- getCompany: (id: string, options?: AxiosRequestConfig<any>) => Promise<Company>;
672
+ getCompany: (id: string, options?: AxiosRequestConfig<any>) => Promise<Company<string>>;
681
673
  getConsumption: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
682
674
  listConsumptions: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<any>>;
683
675
  updateConsumption: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
@@ -694,28 +686,28 @@ declare const _default$3: (auth: AuthOptions, instanceOptions?: CreateAxiosDefau
694
686
  updateEmissionFactor: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
695
687
  createEmissionFactor: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
696
688
  removeEmissionFactor: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
697
- getEntity: (id: string, options?: AxiosRequestConfig<any>) => Promise<Entity>;
698
- listEntities: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Entity>>;
699
- updateEntity: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
700
- createEntity: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
701
- removeEntity: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
689
+ getEntity: (id: string, options?: AxiosRequestConfig<any>) => Promise<Entity<string>>;
690
+ listEntities: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Entity<string>>>;
691
+ updateEntity: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<Entity<string>>;
692
+ createEntity: (data: any, options?: AxiosRequestConfig<any>) => Promise<Entity<string>>;
693
+ removeEntity: (id: string, options?: AxiosRequestConfig<any>) => Promise<Entity<string>>;
702
694
  getEntitiesSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
703
- getLog: (id: string, options?: AxiosRequestConfig<any>) => Promise<Log>;
704
- listLogs: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Log>>;
705
- updateLog: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
706
- createLog: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
707
- removeLog: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
708
- getReading: (id: string, options?: AxiosRequestConfig<any>) => Promise<Reading>;
709
- listReadings: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Reading>>;
710
- updateReading: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
711
- createReading: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
712
- removeReading: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
695
+ getLog: (id: string, options?: AxiosRequestConfig<any>) => Promise<Log<string>>;
696
+ listLogs: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Log<string>>>;
697
+ updateLog: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<Log<string>>;
698
+ createLog: (data: any, options?: AxiosRequestConfig<any>) => Promise<Log<string>>;
699
+ removeLog: (id: string, options?: AxiosRequestConfig<any>) => Promise<Log<string>>;
700
+ getReading: (id: string, options?: AxiosRequestConfig<any>) => Promise<Reading<string>>;
701
+ listReadings: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Reading<string>>>;
702
+ updateReading: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<Reading<string>>;
703
+ createReading: (data: any, options?: AxiosRequestConfig<any>) => Promise<Reading<string>>;
704
+ removeReading: (id: string, options?: AxiosRequestConfig<any>) => Promise<Reading<string>>;
713
705
  getReadingSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
714
- getReport: (id: string, options?: AxiosRequestConfig<any>) => Promise<Report>;
715
- listReports: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Report>>;
716
- updateReport: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
717
- createReport: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
718
- removeReport: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
706
+ getReport: (id: string, options?: AxiosRequestConfig<any>) => Promise<Report<string>>;
707
+ listReports: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Report<string>>>;
708
+ updateReport: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<Report<string>>;
709
+ createReport: (data: any, options?: AxiosRequestConfig<any>) => Promise<Report<string>>;
710
+ removeReport: (id: string, options?: AxiosRequestConfig<any>) => Promise<Report<string>>;
719
711
  sendReport: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
720
712
  getReportTemplate: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
721
713
  listReportTemplates: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<any>>;
@@ -728,18 +720,18 @@ declare const _default$3: (auth: AuthOptions, instanceOptions?: CreateAxiosDefau
728
720
  createScheduledReport: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
729
721
  removeScheduledReport: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
730
722
  sendScheduledReport: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
731
- getInvoice: (id: string, options?: AxiosRequestConfig<any>) => Promise<Invoice>;
732
- listInvoices: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Invoice>>;
733
- updateInvoice: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
734
- createInvoice: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
735
- removeInvoice: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
723
+ getInvoice: (id: string, options?: AxiosRequestConfig<any>) => Promise<Invoice<string>>;
724
+ listInvoices: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Invoice<string>>>;
725
+ updateInvoice: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<Invoice<string>>;
726
+ createInvoice: (data: any, options?: AxiosRequestConfig<any>) => Promise<Invoice<string>>;
727
+ removeInvoice: (id: string, options?: AxiosRequestConfig<any>) => Promise<Invoice<string>>;
736
728
  getInvoiceSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
737
- listSuppliers: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Supplier>>;
729
+ listSuppliers: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<Supplier<string>>>;
738
730
  getSupplierSchema: (options?: AxiosRequestConfig<any>) => Promise<any>;
739
731
  getImportTemplate: (id: string, options?: AxiosRequestConfig<any>) => Promise<any>;
740
- updateDataIngest: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
741
- createDataIngest: (data: any, options?: AxiosRequestConfig<any>) => Promise<any>;
742
- listDataIngest: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<DataIngest>>;
732
+ listDataIngest: (options?: AxiosRequestConfig<any>) => Promise<ETNPagedResponse<DataIngest<string>>>;
733
+ updateDataIngest: (id: string, data: any, options?: AxiosRequestConfig<any>) => Promise<DataIngest<string>>;
734
+ createDataIngest: (data: any, options?: AxiosRequestConfig<any>) => Promise<DataIngest<string>>;
743
735
  };
744
736
 
745
737
  declare const _default$2: (namespace: string) => winston.Logger;
@@ -821,4 +813,4 @@ declare namespace reporting {
821
813
  export { reporting_getScheduledReportRunTimes as getScheduledReportRunTimes };
822
814
  }
823
815
 
824
- export { type APIResponse, type Account, type Asset, type Automation, type Company, type CreateScraperRunParams, type DBResponse, type DataIngest, type ETNPagedResponse$1 as ETNPagedResponse, type Email, type Entity, type Invoice, type InvoiceRate, type InvoiceRateType, type InvoiceValues, type Log, type Reading, type Report, type ReportMetadata, type ReportSource, type ReportSourceIdItem, type ScraperRun, type Supplier, type ToAPIType, type ToMongoType, type UtilityType, _default$3 as api, consumption, _default$1 as db, _default$2 as logger, monitoring, reporting, _default as slack, units };
816
+ 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 InvoiceRate, type InvoiceRateType, type InvoiceValues, type Log, type Reading, type Report, type ReportMetadata, type ReportSource, type ReportSourceIdItem, type ScraperRun, type Supplier, type UtilityType, _default$3 as api, consumption, _default$1 as db, _default$2 as logger, monitoring, reporting, _default as slack, units };