@etainabl/nodejs-sdk 1.3.187 → 1.3.190

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
@@ -416,6 +416,8 @@ interface Account<IDType = ObjectId | string> {
416
416
  meterOperatorExpiryDate?: Date;
417
417
  dataCollector?: string;
418
418
  parentAccountId?: IDType;
419
+ isVirtual?: boolean;
420
+ aggregatedMpans?: string[];
419
421
  processingInvoices?: object[];
420
422
  contracts?: ContractSchema[];
421
423
  creditNotes?: CreditNoteSchema[];
@@ -474,7 +476,7 @@ interface Action {
474
476
  icon?: string;
475
477
  }
476
478
 
477
- interface CustomAlertTrigger<ID = string, DateType = Date | string, metadataType = {
479
+ interface AlertTriggerRule<ID = string, DateType = Date | string, metadataType = {
478
480
  [key: string]: any;
479
481
  }> {
480
482
  _id: ID;
@@ -503,7 +505,7 @@ interface CustomAlertTrigger<ID = string, DateType = Date | string, metadataType
503
505
  deletedBy?: string;
504
506
  }
505
507
 
506
- interface CustomAlertTriggerQueueMessage {
508
+ interface AlertTriggerQueueMessage {
507
509
  triggerId: string;
508
510
  jobId: string;
509
511
  windowStart?: string;
@@ -1373,7 +1375,7 @@ interface Notification<ID = string, DateType = Date | string> {
1373
1375
  status: string;
1374
1376
  isAcknowledged?: boolean;
1375
1377
  acknowledgedAt?: DateType;
1376
- customAlertTriggerId?: ID;
1378
+ alertTriggerRuleId?: ID;
1377
1379
  details?: Record<string, any>;
1378
1380
  route?: {
1379
1381
  name: string;
@@ -1788,13 +1790,13 @@ interface ETNBulkUpdateResult {
1788
1790
  modifiedCount: number;
1789
1791
  matchedCount: number;
1790
1792
  }
1791
- interface BulkUpdateCustomAlertTriggerItem {
1793
+ interface BulkUpdateAlertTriggerRuleItem {
1792
1794
  id: string;
1793
1795
  processedAt?: Date | string;
1794
1796
  lastTriggeredEvent?: Date | string;
1795
1797
  }
1796
- interface BulkUpdateCustomAlertTriggersRequest {
1797
- updates: BulkUpdateCustomAlertTriggerItem[];
1798
+ interface BulkUpdateAlertTriggerRulesRequest {
1799
+ updates: BulkUpdateAlertTriggerRuleItem[];
1798
1800
  }
1799
1801
  interface AuthOptions {
1800
1802
  key?: string;
@@ -1810,16 +1812,16 @@ declare const _default$4: (auth: AuthOptions, instanceOptions?: CreateAxiosDefau
1810
1812
  removeAccount: (id: string, options?: AxiosRequestConfig) => Promise<Account<string>>;
1811
1813
  getAccountSchema: (options?: AxiosRequestConfig) => Promise<any>;
1812
1814
  invalidateAccountCache: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
1813
- getCustomAlertTrigger: (id: string, options?: AxiosRequestConfig) => Promise<CustomAlertTrigger<string, string, {
1815
+ getAlertTriggerRule: (id: string, options?: AxiosRequestConfig) => Promise<AlertTriggerRule<string, string, {
1814
1816
  [key: string]: any;
1815
1817
  }>>;
1816
- listCustomAlertTriggers: <P = CustomAlertTrigger<string, string, {
1818
+ listAlertTriggerRules: <P = AlertTriggerRule<string, string, {
1817
1819
  [key: string]: any;
1818
1820
  }>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
1819
- updateCustomAlertTrigger: (id: string, data: any, options?: AxiosRequestConfig) => Promise<CustomAlertTrigger<string, string | Date, {
1821
+ updateAlertTriggerRule: (id: string, data: any, options?: AxiosRequestConfig) => Promise<AlertTriggerRule<string, string | Date, {
1820
1822
  [key: string]: any;
1821
1823
  }>>;
1822
- bulkUpdateCustomAlertTriggers: (data: BulkUpdateCustomAlertTriggersRequest, options?: AxiosRequestConfig) => Promise<ETNBulkUpdateResult>;
1824
+ bulkUpdateAlertTriggerRules: (data: BulkUpdateAlertTriggerRulesRequest, options?: AxiosRequestConfig) => Promise<ETNBulkUpdateResult>;
1823
1825
  getAsset: (id: string, options?: AxiosRequestConfig) => Promise<Asset<string>>;
1824
1826
  listAssets: <P = Asset<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
1825
1827
  updateAsset: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Asset<string>>;
@@ -2334,4 +2336,4 @@ declare namespace scrapers {
2334
2336
  export type { scrapers_ETNAccount as ETNAccount };
2335
2337
  }
2336
2338
 
2337
- export { type AccessLevel, type Account, type AccountResult, type Action, type ActionType, type Asset, type Automation, type AutomationRun, type AutomationRunLog, type AutomationRunSummary, type AutomationService, type AutomationServiceCategory, type AutomationSource, type Company, type CompanyInvoiceValidationRule, type CompanyInvoiceValidationSettings, type Consumption, type CreateScraperRunParams, type CustomAlertTrigger, type CustomAlertTriggerQueueMessage, type DataIngest, type DefaultField, type DeliveryStatus, type ETNEvent, type ETNPagedResponse$1 as ETNPagedResponse, type Email, type Entity, EventNamesByCategory, type FileFormat, type ImportTemplate, type Invoice, type InvoiceCapture, type InvoiceCaptureMetadata, type InvoiceCaptureMetadataResult, type InvoiceRate, type InvoiceRateType, type InvoiceValidation, type InvoiceValidationInvoice, type InvoiceValidationResults, type InvoiceValidationRule, type InvoiceValues, type Job, type JobStatus, type Log, type Notification, type NotificationAction, type NotificationCategory, NotificationCategoryList, type NotificationCategoryPreferences, type NotificationChannels, type NotificationContext, type NotificationContextEventName, type NotificationContextMap, NotificationDefaultChannels, type NotificationEventName, type NotificationPreferences, type NotificationSQSMessage, type NotificationTemplate, type NotificationTemplateConfig, type NotificationTemplateConfigOption, type NotificationTemplateConfigType, type NotificationTemplateDefaultChannel, type NotificationTemplateRoute, type NotificationTemplateSeverity, type NotificationTemplatesMap, type Portal, type PortalSupplierSchema, type Problem, type ProblemCodes, type ProblemDetails, type Reading, type Report, type ReportMetadata, type ReportSource, type ReportSourceIdItem, type ReportTemplate, type ReportType, type ScraperRun, type SendNotificationMessageInput, type Setting, type SourceType, type Supplier, type User, type UtilityType, type WasteCategories, type WasteTypes, _default$4 as api, consumption, _default$1 as db, _default$3 as emailTemplate, integrations, logger, loggerWithBetterStack, monitoring, _default$2 as notificationEmailTemplate, notificationQueue, index as openai, reporting, scrapers, _default as slack, units, index$1 as utils };
2339
+ export { type AccessLevel, type Account, type AccountResult, type Action, type ActionType, type AlertTriggerQueueMessage, type AlertTriggerRule, type Asset, type Automation, type AutomationRun, type AutomationRunLog, type AutomationRunSummary, type AutomationService, type AutomationServiceCategory, type AutomationSource, type Company, type CompanyInvoiceValidationRule, type CompanyInvoiceValidationSettings, type Consumption, type CreateScraperRunParams, type DataIngest, type DefaultField, type DeliveryStatus, type ETNEvent, type ETNPagedResponse$1 as ETNPagedResponse, type Email, type Entity, EventNamesByCategory, type FileFormat, type ImportTemplate, type Invoice, type InvoiceCapture, type InvoiceCaptureMetadata, type InvoiceCaptureMetadataResult, type InvoiceRate, type InvoiceRateType, type InvoiceValidation, type InvoiceValidationInvoice, type InvoiceValidationResults, type InvoiceValidationRule, type InvoiceValues, type Job, type JobStatus, type Log, type Notification, type NotificationAction, type NotificationCategory, NotificationCategoryList, type NotificationCategoryPreferences, type NotificationChannels, type NotificationContext, type NotificationContextEventName, type NotificationContextMap, NotificationDefaultChannels, type NotificationEventName, type NotificationPreferences, type NotificationSQSMessage, type NotificationTemplate, type NotificationTemplateConfig, type NotificationTemplateConfigOption, type NotificationTemplateConfigType, type NotificationTemplateDefaultChannel, type NotificationTemplateRoute, type NotificationTemplateSeverity, type NotificationTemplatesMap, type Portal, type PortalSupplierSchema, type Problem, type ProblemCodes, type ProblemDetails, type Reading, type Report, type ReportMetadata, type ReportSource, type ReportSourceIdItem, type ReportTemplate, type ReportType, type ScraperRun, type SendNotificationMessageInput, type Setting, type SourceType, type Supplier, type User, type UtilityType, type WasteCategories, type WasteTypes, _default$4 as api, consumption, _default$1 as db, _default$3 as emailTemplate, integrations, logger, loggerWithBetterStack, monitoring, _default$2 as notificationEmailTemplate, notificationQueue, index as openai, reporting, scrapers, _default as slack, units, index$1 as utils };
package/dist/index.d.ts CHANGED
@@ -416,6 +416,8 @@ interface Account<IDType = ObjectId | string> {
416
416
  meterOperatorExpiryDate?: Date;
417
417
  dataCollector?: string;
418
418
  parentAccountId?: IDType;
419
+ isVirtual?: boolean;
420
+ aggregatedMpans?: string[];
419
421
  processingInvoices?: object[];
420
422
  contracts?: ContractSchema[];
421
423
  creditNotes?: CreditNoteSchema[];
@@ -474,7 +476,7 @@ interface Action {
474
476
  icon?: string;
475
477
  }
476
478
 
477
- interface CustomAlertTrigger<ID = string, DateType = Date | string, metadataType = {
479
+ interface AlertTriggerRule<ID = string, DateType = Date | string, metadataType = {
478
480
  [key: string]: any;
479
481
  }> {
480
482
  _id: ID;
@@ -503,7 +505,7 @@ interface CustomAlertTrigger<ID = string, DateType = Date | string, metadataType
503
505
  deletedBy?: string;
504
506
  }
505
507
 
506
- interface CustomAlertTriggerQueueMessage {
508
+ interface AlertTriggerQueueMessage {
507
509
  triggerId: string;
508
510
  jobId: string;
509
511
  windowStart?: string;
@@ -1373,7 +1375,7 @@ interface Notification<ID = string, DateType = Date | string> {
1373
1375
  status: string;
1374
1376
  isAcknowledged?: boolean;
1375
1377
  acknowledgedAt?: DateType;
1376
- customAlertTriggerId?: ID;
1378
+ alertTriggerRuleId?: ID;
1377
1379
  details?: Record<string, any>;
1378
1380
  route?: {
1379
1381
  name: string;
@@ -1788,13 +1790,13 @@ interface ETNBulkUpdateResult {
1788
1790
  modifiedCount: number;
1789
1791
  matchedCount: number;
1790
1792
  }
1791
- interface BulkUpdateCustomAlertTriggerItem {
1793
+ interface BulkUpdateAlertTriggerRuleItem {
1792
1794
  id: string;
1793
1795
  processedAt?: Date | string;
1794
1796
  lastTriggeredEvent?: Date | string;
1795
1797
  }
1796
- interface BulkUpdateCustomAlertTriggersRequest {
1797
- updates: BulkUpdateCustomAlertTriggerItem[];
1798
+ interface BulkUpdateAlertTriggerRulesRequest {
1799
+ updates: BulkUpdateAlertTriggerRuleItem[];
1798
1800
  }
1799
1801
  interface AuthOptions {
1800
1802
  key?: string;
@@ -1810,16 +1812,16 @@ declare const _default$4: (auth: AuthOptions, instanceOptions?: CreateAxiosDefau
1810
1812
  removeAccount: (id: string, options?: AxiosRequestConfig) => Promise<Account<string>>;
1811
1813
  getAccountSchema: (options?: AxiosRequestConfig) => Promise<any>;
1812
1814
  invalidateAccountCache: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
1813
- getCustomAlertTrigger: (id: string, options?: AxiosRequestConfig) => Promise<CustomAlertTrigger<string, string, {
1815
+ getAlertTriggerRule: (id: string, options?: AxiosRequestConfig) => Promise<AlertTriggerRule<string, string, {
1814
1816
  [key: string]: any;
1815
1817
  }>>;
1816
- listCustomAlertTriggers: <P = CustomAlertTrigger<string, string, {
1818
+ listAlertTriggerRules: <P = AlertTriggerRule<string, string, {
1817
1819
  [key: string]: any;
1818
1820
  }>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
1819
- updateCustomAlertTrigger: (id: string, data: any, options?: AxiosRequestConfig) => Promise<CustomAlertTrigger<string, string | Date, {
1821
+ updateAlertTriggerRule: (id: string, data: any, options?: AxiosRequestConfig) => Promise<AlertTriggerRule<string, string | Date, {
1820
1822
  [key: string]: any;
1821
1823
  }>>;
1822
- bulkUpdateCustomAlertTriggers: (data: BulkUpdateCustomAlertTriggersRequest, options?: AxiosRequestConfig) => Promise<ETNBulkUpdateResult>;
1824
+ bulkUpdateAlertTriggerRules: (data: BulkUpdateAlertTriggerRulesRequest, options?: AxiosRequestConfig) => Promise<ETNBulkUpdateResult>;
1823
1825
  getAsset: (id: string, options?: AxiosRequestConfig) => Promise<Asset<string>>;
1824
1826
  listAssets: <P = Asset<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
1825
1827
  updateAsset: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Asset<string>>;
@@ -2334,4 +2336,4 @@ declare namespace scrapers {
2334
2336
  export type { scrapers_ETNAccount as ETNAccount };
2335
2337
  }
2336
2338
 
2337
- export { type AccessLevel, type Account, type AccountResult, type Action, type ActionType, type Asset, type Automation, type AutomationRun, type AutomationRunLog, type AutomationRunSummary, type AutomationService, type AutomationServiceCategory, type AutomationSource, type Company, type CompanyInvoiceValidationRule, type CompanyInvoiceValidationSettings, type Consumption, type CreateScraperRunParams, type CustomAlertTrigger, type CustomAlertTriggerQueueMessage, type DataIngest, type DefaultField, type DeliveryStatus, type ETNEvent, type ETNPagedResponse$1 as ETNPagedResponse, type Email, type Entity, EventNamesByCategory, type FileFormat, type ImportTemplate, type Invoice, type InvoiceCapture, type InvoiceCaptureMetadata, type InvoiceCaptureMetadataResult, type InvoiceRate, type InvoiceRateType, type InvoiceValidation, type InvoiceValidationInvoice, type InvoiceValidationResults, type InvoiceValidationRule, type InvoiceValues, type Job, type JobStatus, type Log, type Notification, type NotificationAction, type NotificationCategory, NotificationCategoryList, type NotificationCategoryPreferences, type NotificationChannels, type NotificationContext, type NotificationContextEventName, type NotificationContextMap, NotificationDefaultChannels, type NotificationEventName, type NotificationPreferences, type NotificationSQSMessage, type NotificationTemplate, type NotificationTemplateConfig, type NotificationTemplateConfigOption, type NotificationTemplateConfigType, type NotificationTemplateDefaultChannel, type NotificationTemplateRoute, type NotificationTemplateSeverity, type NotificationTemplatesMap, type Portal, type PortalSupplierSchema, type Problem, type ProblemCodes, type ProblemDetails, type Reading, type Report, type ReportMetadata, type ReportSource, type ReportSourceIdItem, type ReportTemplate, type ReportType, type ScraperRun, type SendNotificationMessageInput, type Setting, type SourceType, type Supplier, type User, type UtilityType, type WasteCategories, type WasteTypes, _default$4 as api, consumption, _default$1 as db, _default$3 as emailTemplate, integrations, logger, loggerWithBetterStack, monitoring, _default$2 as notificationEmailTemplate, notificationQueue, index as openai, reporting, scrapers, _default as slack, units, index$1 as utils };
2339
+ export { type AccessLevel, type Account, type AccountResult, type Action, type ActionType, type AlertTriggerQueueMessage, type AlertTriggerRule, type Asset, type Automation, type AutomationRun, type AutomationRunLog, type AutomationRunSummary, type AutomationService, type AutomationServiceCategory, type AutomationSource, type Company, type CompanyInvoiceValidationRule, type CompanyInvoiceValidationSettings, type Consumption, type CreateScraperRunParams, type DataIngest, type DefaultField, type DeliveryStatus, type ETNEvent, type ETNPagedResponse$1 as ETNPagedResponse, type Email, type Entity, EventNamesByCategory, type FileFormat, type ImportTemplate, type Invoice, type InvoiceCapture, type InvoiceCaptureMetadata, type InvoiceCaptureMetadataResult, type InvoiceRate, type InvoiceRateType, type InvoiceValidation, type InvoiceValidationInvoice, type InvoiceValidationResults, type InvoiceValidationRule, type InvoiceValues, type Job, type JobStatus, type Log, type Notification, type NotificationAction, type NotificationCategory, NotificationCategoryList, type NotificationCategoryPreferences, type NotificationChannels, type NotificationContext, type NotificationContextEventName, type NotificationContextMap, NotificationDefaultChannels, type NotificationEventName, type NotificationPreferences, type NotificationSQSMessage, type NotificationTemplate, type NotificationTemplateConfig, type NotificationTemplateConfigOption, type NotificationTemplateConfigType, type NotificationTemplateDefaultChannel, type NotificationTemplateRoute, type NotificationTemplateSeverity, type NotificationTemplatesMap, type Portal, type PortalSupplierSchema, type Problem, type ProblemCodes, type ProblemDetails, type Reading, type Report, type ReportMetadata, type ReportSource, type ReportSourceIdItem, type ReportTemplate, type ReportType, type ScraperRun, type SendNotificationMessageInput, type Setting, type SourceType, type Supplier, type User, type UtilityType, type WasteCategories, type WasteTypes, _default$4 as api, consumption, _default$1 as db, _default$3 as emailTemplate, integrations, logger, loggerWithBetterStack, monitoring, _default$2 as notificationEmailTemplate, notificationQueue, index as openai, reporting, scrapers, _default as slack, units, index$1 as utils };
package/dist/index.js CHANGED
@@ -22462,13 +22462,13 @@ var api_default = (auth, instanceOptions = {}) => {
22462
22462
  removeAccount: factory.remove(etainablApi, "accounts"),
22463
22463
  getAccountSchema: factory.get(etainablApi, "accounts", "schema"),
22464
22464
  invalidateAccountCache: factory.customWithId(etainablApi, "put", "accounts", "invalidate-cache"),
22465
- // custom alert triggers
22466
- getCustomAlertTrigger: factory.getWithId(etainablApi, "custom-alert-triggers"),
22467
- listCustomAlertTriggers: factory.list(etainablApi, "custom-alert-triggers"),
22468
- updateCustomAlertTrigger: factory.update(etainablApi, "custom-alert-triggers"),
22469
- bulkUpdateCustomAlertTriggers: factory.create(
22465
+ // alert trigger rules
22466
+ getAlertTriggerRule: factory.getWithId(etainablApi, "alert-trigger-rules"),
22467
+ listAlertTriggerRules: factory.list(etainablApi, "alert-trigger-rules"),
22468
+ updateAlertTriggerRule: factory.update(etainablApi, "alert-trigger-rules"),
22469
+ bulkUpdateAlertTriggerRules: factory.create(
22470
22470
  etainablApi,
22471
- "custom-alert-triggers",
22471
+ "alert-trigger-rules",
22472
22472
  "bulk-update"
22473
22473
  ),
22474
22474
  // assets