@etainabl/nodejs-sdk 1.3.175 → 1.3.178
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/esm/index.js +45 -8
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.cts +143 -69
- package/dist/index.d.ts +143 -69
- package/dist/index.js +47 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -59663,12 +59663,6 @@ var api_default = (auth, instanceOptions = {}) => {
|
|
|
59663
59663
|
removeAccount: factory.remove(etainablApi, "accounts"),
|
|
59664
59664
|
getAccountSchema: factory.get(etainablApi, "accounts", "schema"),
|
|
59665
59665
|
invalidateAccountCache: factory.customWithId(etainablApi, "put", "accounts", "invalidate-cache"),
|
|
59666
|
-
// alert templates
|
|
59667
|
-
getAlertTemplate: factory.getWithId(etainablApi, "alert-templates"),
|
|
59668
|
-
listAlertTemplates: factory.list(etainablApi, "alert-templates"),
|
|
59669
|
-
updateAlertTemplate: factory.update(etainablApi, "alert-templates"),
|
|
59670
|
-
createAlertTemplate: factory.create(etainablApi, "alert-templates"),
|
|
59671
|
-
removeAlertTemplate: factory.remove(etainablApi, "alert-templates"),
|
|
59672
59666
|
// alert triggers
|
|
59673
59667
|
getAlertTrigger: factory.getWithId(etainablApi, "alert-triggers"),
|
|
59674
59668
|
listAlertTriggers: factory.list(etainablApi, "alert-triggers"),
|
|
@@ -59682,6 +59676,15 @@ var api_default = (auth, instanceOptions = {}) => {
|
|
|
59682
59676
|
),
|
|
59683
59677
|
retryAlertTrigger: factory.customWithId(etainablApi, "post", "alert-triggers", "retry"),
|
|
59684
59678
|
cancelAlertTrigger: factory.customWithId(etainablApi, "post", "alert-triggers", "cancel"),
|
|
59679
|
+
// custom alert triggers
|
|
59680
|
+
getCustomAlertTrigger: factory.getWithId(etainablApi, "custom-alert-triggers"),
|
|
59681
|
+
listCustomAlertTriggers: factory.list(etainablApi, "custom-alert-triggers"),
|
|
59682
|
+
updateCustomAlertTrigger: factory.update(etainablApi, "custom-alert-triggers"),
|
|
59683
|
+
bulkUpdateCustomAlertTriggers: factory.create(
|
|
59684
|
+
etainablApi,
|
|
59685
|
+
"custom-alert-triggers",
|
|
59686
|
+
"bulk-update"
|
|
59687
|
+
),
|
|
59685
59688
|
// assets
|
|
59686
59689
|
getAsset: factory.getWithId(etainablApi, "assets"),
|
|
59687
59690
|
listAssets: factory.list(etainablApi, "assets"),
|
|
@@ -59750,6 +59753,12 @@ var api_default = (auth, instanceOptions = {}) => {
|
|
|
59750
59753
|
createLog: factory.create(etainablApi, "logs"),
|
|
59751
59754
|
createLogBulk: factory.create(etainablApi, "logs", "bulk"),
|
|
59752
59755
|
removeLog: factory.remove(etainablApi, "logs"),
|
|
59756
|
+
getJob: factory.getWithId(etainablApi, "jobs"),
|
|
59757
|
+
listJobs: factory.list(etainablApi, "jobs"),
|
|
59758
|
+
updateJob: factory.update(etainablApi, "jobs"),
|
|
59759
|
+
createJob: factory.create(etainablApi, "jobs"),
|
|
59760
|
+
createJobBulk: factory.create(etainablApi, "jobs", "bulk"),
|
|
59761
|
+
removeJob: factory.remove(etainablApi, "jobs"),
|
|
59753
59762
|
// notifications
|
|
59754
59763
|
getNotification: factory.getWithId(etainablApi, "notifications"),
|
|
59755
59764
|
listNotifications: factory.list(etainablApi, "notifications"),
|
|
@@ -59758,6 +59767,12 @@ var api_default = (auth, instanceOptions = {}) => {
|
|
|
59758
59767
|
bulkCreateNotifications: factory.create(etainablApi, "notifications", "bulk"),
|
|
59759
59768
|
bulkUpdateNotificationDeliveryStatus: factory.create(etainablApi, "notifications", "bulk-delivery-status"),
|
|
59760
59769
|
removeNotification: factory.remove(etainablApi, "notifications"),
|
|
59770
|
+
// notification templates
|
|
59771
|
+
getNotificationTemplate: factory.getWithId(etainablApi, "notification-templates"),
|
|
59772
|
+
listNotificationTemplates: factory.list(etainablApi, "notification-templates"),
|
|
59773
|
+
updateNotificationTemplate: factory.update(etainablApi, "notification-templates"),
|
|
59774
|
+
createNotificationTemplate: factory.create(etainablApi, "notification-templates"),
|
|
59775
|
+
removeNotificationTemplate: factory.remove(etainablApi, "notification-templates"),
|
|
59761
59776
|
// readings
|
|
59762
59777
|
getReading: factory.getWithId(etainablApi, "readings"),
|
|
59763
59778
|
listReadings: factory.list(etainablApi, "readings"),
|
|
@@ -60374,6 +60389,7 @@ var notification_exports = {};
|
|
|
60374
60389
|
// src/notificationQueue.ts
|
|
60375
60390
|
var notificationQueue_exports = {};
|
|
60376
60391
|
__export(notificationQueue_exports, {
|
|
60392
|
+
createNotificationMessage: () => createNotificationMessage,
|
|
60377
60393
|
sendNotificationMessage: () => sendNotificationMessage
|
|
60378
60394
|
});
|
|
60379
60395
|
|
|
@@ -62205,10 +62221,11 @@ var SendMessageCommand = class extends Command.classBuilder().ep(commonParams).m
|
|
|
62205
62221
|
|
|
62206
62222
|
// src/notificationQueue.ts
|
|
62207
62223
|
function createNotificationMessage(eventName, context, input) {
|
|
62224
|
+
const { timestamp, ...payload } = input;
|
|
62208
62225
|
return {
|
|
62209
62226
|
eventName,
|
|
62210
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
62211
|
-
...
|
|
62227
|
+
timestamp: timestamp ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
62228
|
+
...payload,
|
|
62212
62229
|
context
|
|
62213
62230
|
};
|
|
62214
62231
|
}
|
|
@@ -69491,9 +69508,29 @@ var NotificationDefaultChannels = {
|
|
|
69491
69508
|
email: false,
|
|
69492
69509
|
sms: false
|
|
69493
69510
|
};
|
|
69511
|
+
|
|
69512
|
+
// src/types/notificationTemplate.ts
|
|
69513
|
+
var NotificationTemplateCategories = [
|
|
69514
|
+
"automation",
|
|
69515
|
+
"report",
|
|
69516
|
+
"team",
|
|
69517
|
+
"dataQuality",
|
|
69518
|
+
"discussion",
|
|
69519
|
+
"scraper"
|
|
69520
|
+
];
|
|
69521
|
+
var EventNamesByCategory = {
|
|
69522
|
+
automation: ["automationFailed", "runCompleted", "hasnotRun", "fileNotExpected"],
|
|
69523
|
+
report: ["reportSuccess", "reportFailed"],
|
|
69524
|
+
team: ["newUserSignIn"],
|
|
69525
|
+
dataQuality: ["thresholdBreached", "approachingThreshold", "readingOverdue", "readingDueSoon", "contractRenewalUpcoming", "contractRenewalOverdue"],
|
|
69526
|
+
discussion: ["commentAdded", "mentionInComment"],
|
|
69527
|
+
scraper: ["scraperLoginError", "scraperHasnotRun", "scraperRunCompleted"]
|
|
69528
|
+
};
|
|
69494
69529
|
export {
|
|
69530
|
+
EventNamesByCategory,
|
|
69495
69531
|
NotificationCategoryList,
|
|
69496
69532
|
NotificationDefaultChannels,
|
|
69533
|
+
NotificationTemplateCategories,
|
|
69497
69534
|
ObjectId,
|
|
69498
69535
|
api_default as api,
|
|
69499
69536
|
consumption_exports as consumption,
|