@etainabl/nodejs-sdk 1.3.187 → 1.3.188

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
@@ -474,7 +474,7 @@ interface Action {
474
474
  icon?: string;
475
475
  }
476
476
 
477
- interface CustomAlertTrigger<ID = string, DateType = Date | string, metadataType = {
477
+ interface AlertTriggerRule<ID = string, DateType = Date | string, metadataType = {
478
478
  [key: string]: any;
479
479
  }> {
480
480
  _id: ID;
@@ -503,7 +503,7 @@ interface CustomAlertTrigger<ID = string, DateType = Date | string, metadataType
503
503
  deletedBy?: string;
504
504
  }
505
505
 
506
- interface CustomAlertTriggerQueueMessage {
506
+ interface AlertTriggerQueueMessage {
507
507
  triggerId: string;
508
508
  jobId: string;
509
509
  windowStart?: string;
@@ -1373,7 +1373,7 @@ interface Notification<ID = string, DateType = Date | string> {
1373
1373
  status: string;
1374
1374
  isAcknowledged?: boolean;
1375
1375
  acknowledgedAt?: DateType;
1376
- customAlertTriggerId?: ID;
1376
+ alertTriggerRuleId?: ID;
1377
1377
  details?: Record<string, any>;
1378
1378
  route?: {
1379
1379
  name: string;
@@ -1788,13 +1788,13 @@ interface ETNBulkUpdateResult {
1788
1788
  modifiedCount: number;
1789
1789
  matchedCount: number;
1790
1790
  }
1791
- interface BulkUpdateCustomAlertTriggerItem {
1791
+ interface BulkUpdateAlertTriggerRuleItem {
1792
1792
  id: string;
1793
1793
  processedAt?: Date | string;
1794
1794
  lastTriggeredEvent?: Date | string;
1795
1795
  }
1796
- interface BulkUpdateCustomAlertTriggersRequest {
1797
- updates: BulkUpdateCustomAlertTriggerItem[];
1796
+ interface BulkUpdateAlertTriggerRulesRequest {
1797
+ updates: BulkUpdateAlertTriggerRuleItem[];
1798
1798
  }
1799
1799
  interface AuthOptions {
1800
1800
  key?: string;
@@ -1810,16 +1810,16 @@ declare const _default$4: (auth: AuthOptions, instanceOptions?: CreateAxiosDefau
1810
1810
  removeAccount: (id: string, options?: AxiosRequestConfig) => Promise<Account<string>>;
1811
1811
  getAccountSchema: (options?: AxiosRequestConfig) => Promise<any>;
1812
1812
  invalidateAccountCache: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
1813
- getCustomAlertTrigger: (id: string, options?: AxiosRequestConfig) => Promise<CustomAlertTrigger<string, string, {
1813
+ getAlertTriggerRule: (id: string, options?: AxiosRequestConfig) => Promise<AlertTriggerRule<string, string, {
1814
1814
  [key: string]: any;
1815
1815
  }>>;
1816
- listCustomAlertTriggers: <P = CustomAlertTrigger<string, string, {
1816
+ listAlertTriggerRules: <P = AlertTriggerRule<string, string, {
1817
1817
  [key: string]: any;
1818
1818
  }>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
1819
- updateCustomAlertTrigger: (id: string, data: any, options?: AxiosRequestConfig) => Promise<CustomAlertTrigger<string, string | Date, {
1819
+ updateAlertTriggerRule: (id: string, data: any, options?: AxiosRequestConfig) => Promise<AlertTriggerRule<string, string | Date, {
1820
1820
  [key: string]: any;
1821
1821
  }>>;
1822
- bulkUpdateCustomAlertTriggers: (data: BulkUpdateCustomAlertTriggersRequest, options?: AxiosRequestConfig) => Promise<ETNBulkUpdateResult>;
1822
+ bulkUpdateAlertTriggerRules: (data: BulkUpdateAlertTriggerRulesRequest, options?: AxiosRequestConfig) => Promise<ETNBulkUpdateResult>;
1823
1823
  getAsset: (id: string, options?: AxiosRequestConfig) => Promise<Asset<string>>;
1824
1824
  listAssets: <P = Asset<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
1825
1825
  updateAsset: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Asset<string>>;
@@ -2334,4 +2334,4 @@ declare namespace scrapers {
2334
2334
  export type { scrapers_ETNAccount as ETNAccount };
2335
2335
  }
2336
2336
 
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 };
2337
+ 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
@@ -474,7 +474,7 @@ interface Action {
474
474
  icon?: string;
475
475
  }
476
476
 
477
- interface CustomAlertTrigger<ID = string, DateType = Date | string, metadataType = {
477
+ interface AlertTriggerRule<ID = string, DateType = Date | string, metadataType = {
478
478
  [key: string]: any;
479
479
  }> {
480
480
  _id: ID;
@@ -503,7 +503,7 @@ interface CustomAlertTrigger<ID = string, DateType = Date | string, metadataType
503
503
  deletedBy?: string;
504
504
  }
505
505
 
506
- interface CustomAlertTriggerQueueMessage {
506
+ interface AlertTriggerQueueMessage {
507
507
  triggerId: string;
508
508
  jobId: string;
509
509
  windowStart?: string;
@@ -1373,7 +1373,7 @@ interface Notification<ID = string, DateType = Date | string> {
1373
1373
  status: string;
1374
1374
  isAcknowledged?: boolean;
1375
1375
  acknowledgedAt?: DateType;
1376
- customAlertTriggerId?: ID;
1376
+ alertTriggerRuleId?: ID;
1377
1377
  details?: Record<string, any>;
1378
1378
  route?: {
1379
1379
  name: string;
@@ -1788,13 +1788,13 @@ interface ETNBulkUpdateResult {
1788
1788
  modifiedCount: number;
1789
1789
  matchedCount: number;
1790
1790
  }
1791
- interface BulkUpdateCustomAlertTriggerItem {
1791
+ interface BulkUpdateAlertTriggerRuleItem {
1792
1792
  id: string;
1793
1793
  processedAt?: Date | string;
1794
1794
  lastTriggeredEvent?: Date | string;
1795
1795
  }
1796
- interface BulkUpdateCustomAlertTriggersRequest {
1797
- updates: BulkUpdateCustomAlertTriggerItem[];
1796
+ interface BulkUpdateAlertTriggerRulesRequest {
1797
+ updates: BulkUpdateAlertTriggerRuleItem[];
1798
1798
  }
1799
1799
  interface AuthOptions {
1800
1800
  key?: string;
@@ -1810,16 +1810,16 @@ declare const _default$4: (auth: AuthOptions, instanceOptions?: CreateAxiosDefau
1810
1810
  removeAccount: (id: string, options?: AxiosRequestConfig) => Promise<Account<string>>;
1811
1811
  getAccountSchema: (options?: AxiosRequestConfig) => Promise<any>;
1812
1812
  invalidateAccountCache: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
1813
- getCustomAlertTrigger: (id: string, options?: AxiosRequestConfig) => Promise<CustomAlertTrigger<string, string, {
1813
+ getAlertTriggerRule: (id: string, options?: AxiosRequestConfig) => Promise<AlertTriggerRule<string, string, {
1814
1814
  [key: string]: any;
1815
1815
  }>>;
1816
- listCustomAlertTriggers: <P = CustomAlertTrigger<string, string, {
1816
+ listAlertTriggerRules: <P = AlertTriggerRule<string, string, {
1817
1817
  [key: string]: any;
1818
1818
  }>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
1819
- updateCustomAlertTrigger: (id: string, data: any, options?: AxiosRequestConfig) => Promise<CustomAlertTrigger<string, string | Date, {
1819
+ updateAlertTriggerRule: (id: string, data: any, options?: AxiosRequestConfig) => Promise<AlertTriggerRule<string, string | Date, {
1820
1820
  [key: string]: any;
1821
1821
  }>>;
1822
- bulkUpdateCustomAlertTriggers: (data: BulkUpdateCustomAlertTriggersRequest, options?: AxiosRequestConfig) => Promise<ETNBulkUpdateResult>;
1822
+ bulkUpdateAlertTriggerRules: (data: BulkUpdateAlertTriggerRulesRequest, options?: AxiosRequestConfig) => Promise<ETNBulkUpdateResult>;
1823
1823
  getAsset: (id: string, options?: AxiosRequestConfig) => Promise<Asset<string>>;
1824
1824
  listAssets: <P = Asset<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
1825
1825
  updateAsset: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Asset<string>>;
@@ -2334,4 +2334,4 @@ declare namespace scrapers {
2334
2334
  export type { scrapers_ETNAccount as ETNAccount };
2335
2335
  }
2336
2336
 
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 };
2337
+ 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