@etainabl/nodejs-sdk 1.3.180 → 1.3.184
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/{chunk-6BNC5PQJ.js → chunk-4QSQRVYQ.js} +2 -2
- package/dist/esm/chunk-G3PMV62Z.js +36 -0
- package/dist/esm/{chunk-CYEJQKHM.js → chunk-MCSCBMNG.js} +2 -2
- package/dist/esm/{chunk-ZVH2Y6V4.js → chunk-YCRW5ZB7.js} +2 -2
- package/dist/esm/{dist-es-EM5SA7AO.js → dist-es-4VSEUPMG.js} +2 -2
- package/dist/esm/{dist-es-PBAHWT55.js → dist-es-5G2D4IRG.js} +2 -2
- package/dist/esm/{dist-es-LSROX74N.js → dist-es-6PYQFA7S.js} +3 -3
- package/dist/esm/{dist-es-VIU7EGUF.js → dist-es-O7YXE2TO.js} +2 -2
- package/dist/esm/{dist-es-TSVTHZDR.js → dist-es-RVUNLU7U.js} +5 -5
- package/dist/esm/{dist-es-LYHTN6K2.js → dist-es-UEBBJXWA.js} +2 -2
- package/dist/esm/{dist-es-OWRG5OLF.js → dist-es-XS4DOSVC.js} +10 -10
- package/dist/esm/{event-streams-3KTXW2E2.js → event-streams-OE4R7Y65.js} +2 -2
- package/dist/esm/index.js +5906 -140
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/{loadSso-Z2JES2SV.js → loadSso-3FHKR3DN.js} +4 -4
- package/dist/esm/{sso-oidc-SOLKVNEY.js → sso-oidc-EORQ3JVU.js} +4 -4
- package/dist/esm/{sts-HFQS3IP5.js → sts-VPLY2J63.js} +4 -4
- package/dist/index.d.cts +189 -103
- package/dist/index.d.ts +189 -103
- package/dist/index.js +6116 -345
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/esm/chunk-PZ5AY32C.js +0 -10
- /package/dist/esm/{chunk-6BNC5PQJ.js.map → chunk-4QSQRVYQ.js.map} +0 -0
- /package/dist/esm/{chunk-PZ5AY32C.js.map → chunk-G3PMV62Z.js.map} +0 -0
- /package/dist/esm/{chunk-CYEJQKHM.js.map → chunk-MCSCBMNG.js.map} +0 -0
- /package/dist/esm/{chunk-ZVH2Y6V4.js.map → chunk-YCRW5ZB7.js.map} +0 -0
- /package/dist/esm/{dist-es-EM5SA7AO.js.map → dist-es-4VSEUPMG.js.map} +0 -0
- /package/dist/esm/{dist-es-PBAHWT55.js.map → dist-es-5G2D4IRG.js.map} +0 -0
- /package/dist/esm/{dist-es-LSROX74N.js.map → dist-es-6PYQFA7S.js.map} +0 -0
- /package/dist/esm/{dist-es-VIU7EGUF.js.map → dist-es-O7YXE2TO.js.map} +0 -0
- /package/dist/esm/{dist-es-TSVTHZDR.js.map → dist-es-RVUNLU7U.js.map} +0 -0
- /package/dist/esm/{dist-es-LYHTN6K2.js.map → dist-es-UEBBJXWA.js.map} +0 -0
- /package/dist/esm/{dist-es-OWRG5OLF.js.map → dist-es-XS4DOSVC.js.map} +0 -0
- /package/dist/esm/{event-streams-3KTXW2E2.js.map → event-streams-OE4R7Y65.js.map} +0 -0
- /package/dist/esm/{loadSso-Z2JES2SV.js.map → loadSso-3FHKR3DN.js.map} +0 -0
- /package/dist/esm/{sso-oidc-SOLKVNEY.js.map → sso-oidc-EORQ3JVU.js.map} +0 -0
- /package/dist/esm/{sts-HFQS3IP5.js.map → sts-VPLY2J63.js.map} +0 -0
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
parseJsonErrorBody,
|
|
13
13
|
requestBuilder,
|
|
14
14
|
take
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-YCRW5ZB7.js";
|
|
16
16
|
import {
|
|
17
17
|
AwsSdkSigV4Signer,
|
|
18
18
|
Client,
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
resolveRetryConfig,
|
|
68
68
|
resolveUserAgentConfig,
|
|
69
69
|
withBaseException
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-4QSQRVYQ.js";
|
|
71
71
|
import {
|
|
72
72
|
loadConfig,
|
|
73
73
|
parseUrl
|
|
@@ -89,7 +89,7 @@ import {
|
|
|
89
89
|
import "./chunk-CRX53WMM.js";
|
|
90
90
|
import "./chunk-UZGMBQZB.js";
|
|
91
91
|
import "./chunk-IX2LY325.js";
|
|
92
|
-
import "./chunk-
|
|
92
|
+
import "./chunk-G3PMV62Z.js";
|
|
93
93
|
|
|
94
94
|
// node_modules/@aws-sdk/client-sso/dist-es/auth/httpAuthSchemeProvider.js
|
|
95
95
|
var defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
@@ -659,4 +659,4 @@ export {
|
|
|
659
659
|
GetRoleCredentialsCommand,
|
|
660
660
|
SSOClient
|
|
661
661
|
};
|
|
662
|
-
//# sourceMappingURL=loadSso-
|
|
662
|
+
//# sourceMappingURL=loadSso-3FHKR3DN.js.map
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
parseJsonErrorBody,
|
|
14
14
|
requestBuilder,
|
|
15
15
|
take
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-YCRW5ZB7.js";
|
|
17
17
|
import {
|
|
18
18
|
AwsSdkSigV4Signer,
|
|
19
19
|
Client,
|
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
resolveRetryConfig,
|
|
69
69
|
resolveUserAgentConfig,
|
|
70
70
|
withBaseException
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-4QSQRVYQ.js";
|
|
72
72
|
import {
|
|
73
73
|
loadConfig,
|
|
74
74
|
parseUrl
|
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
import "./chunk-CRX53WMM.js";
|
|
92
92
|
import "./chunk-UZGMBQZB.js";
|
|
93
93
|
import "./chunk-IX2LY325.js";
|
|
94
|
-
import "./chunk-
|
|
94
|
+
import "./chunk-G3PMV62Z.js";
|
|
95
95
|
|
|
96
96
|
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js
|
|
97
97
|
var defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
@@ -829,4 +829,4 @@ export {
|
|
|
829
829
|
UnsupportedGrantTypeException,
|
|
830
830
|
Client as __Client
|
|
831
831
|
};
|
|
832
|
-
//# sourceMappingURL=sso-oidc-
|
|
832
|
+
//# sourceMappingURL=sso-oidc-EORQ3JVU.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseXmlBody,
|
|
3
3
|
parseXmlErrorBody
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MCSCBMNG.js";
|
|
5
5
|
import {
|
|
6
6
|
parseRfc3339DateTimeWithOffset
|
|
7
7
|
} from "./chunk-YLT3BSXS.js";
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
resolveRetryConfig,
|
|
68
68
|
resolveUserAgentConfig,
|
|
69
69
|
withBaseException
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-4QSQRVYQ.js";
|
|
71
71
|
import {
|
|
72
72
|
loadConfig,
|
|
73
73
|
parseUrl
|
|
@@ -92,7 +92,7 @@ import {
|
|
|
92
92
|
setCredentialFeature
|
|
93
93
|
} from "./chunk-UZGMBQZB.js";
|
|
94
94
|
import "./chunk-IX2LY325.js";
|
|
95
|
-
import "./chunk-
|
|
95
|
+
import "./chunk-G3PMV62Z.js";
|
|
96
96
|
|
|
97
97
|
// node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthSchemeProvider.js
|
|
98
98
|
var defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
@@ -1166,4 +1166,4 @@ export {
|
|
|
1166
1166
|
getDefaultRoleAssumer2 as getDefaultRoleAssumer,
|
|
1167
1167
|
getDefaultRoleAssumerWithWebIdentity2 as getDefaultRoleAssumerWithWebIdentity
|
|
1168
1168
|
};
|
|
1169
|
-
//# sourceMappingURL=sts-
|
|
1169
|
+
//# sourceMappingURL=sts-VPLY2J63.js.map
|
package/dist/index.d.cts
CHANGED
|
@@ -487,13 +487,14 @@ interface CustomAlertTrigger<ID = string, DateType = Date | string, metadataType
|
|
|
487
487
|
email: boolean;
|
|
488
488
|
sms: boolean;
|
|
489
489
|
};
|
|
490
|
-
severity: 'error' | 'warning' | 'info' | 'success'
|
|
490
|
+
severity: 'error' | 'warning' | 'info' | 'success';
|
|
491
491
|
audience?: 'me' | 'allCompanyUsers' | 'userGroup';
|
|
492
492
|
userGroupId?: ID;
|
|
493
493
|
processedAt?: DateType;
|
|
494
494
|
lastTriggeredEvent?: DateType;
|
|
495
495
|
companyId: ID;
|
|
496
496
|
userSub: string;
|
|
497
|
+
recipientUserSubs?: string[];
|
|
497
498
|
active: boolean;
|
|
498
499
|
createdAt?: DateType;
|
|
499
500
|
updatedAt?: DateType;
|
|
@@ -795,10 +796,11 @@ interface AutomationRunSummary {
|
|
|
795
796
|
interface AutomationRun<IDType = ObjectId | string, DateType = Date | string> {
|
|
796
797
|
_id: IDType;
|
|
797
798
|
automationId: IDType;
|
|
799
|
+
jobId?: IDType;
|
|
798
800
|
companyId: IDType;
|
|
799
801
|
active: boolean;
|
|
800
802
|
category: 'account' | 'company';
|
|
801
|
-
status: 'running' | 'success' | '
|
|
803
|
+
status: 'running' | 'success' | 'error' | 'warning';
|
|
802
804
|
collectionType?: CollectionType;
|
|
803
805
|
source?: SourceMetadata;
|
|
804
806
|
summary?: AutomationRunSummary;
|
|
@@ -1374,7 +1376,7 @@ interface Notification<ID = string, DateType = Date | string> {
|
|
|
1374
1376
|
isAcknowledged?: boolean;
|
|
1375
1377
|
acknowledgedAt?: DateType;
|
|
1376
1378
|
customAlertTriggerId?: ID;
|
|
1377
|
-
|
|
1379
|
+
details?: Record<string, any>;
|
|
1378
1380
|
route?: {
|
|
1379
1381
|
name: string;
|
|
1380
1382
|
params?: Record<string, any>;
|
|
@@ -1397,6 +1399,7 @@ interface Notification<ID = string, DateType = Date | string> {
|
|
|
1397
1399
|
messageId?: string;
|
|
1398
1400
|
};
|
|
1399
1401
|
};
|
|
1402
|
+
idempotencyKey?: string;
|
|
1400
1403
|
createdAt?: DateType;
|
|
1401
1404
|
updatedAt?: DateType;
|
|
1402
1405
|
deleted?: boolean;
|
|
@@ -1405,24 +1408,118 @@ interface Notification<ID = string, DateType = Date | string> {
|
|
|
1405
1408
|
companyId?: ID;
|
|
1406
1409
|
}
|
|
1407
1410
|
|
|
1411
|
+
type NotificationContextMap = {
|
|
1412
|
+
reportSuccess: {
|
|
1413
|
+
report: {
|
|
1414
|
+
fileName: string;
|
|
1415
|
+
_id: string;
|
|
1416
|
+
};
|
|
1417
|
+
};
|
|
1418
|
+
reportFailed: {
|
|
1419
|
+
report: {
|
|
1420
|
+
fileName: string;
|
|
1421
|
+
_id: string;
|
|
1422
|
+
};
|
|
1423
|
+
};
|
|
1424
|
+
alertTrigger: {
|
|
1425
|
+
summary: string;
|
|
1426
|
+
metadata: {
|
|
1427
|
+
items: {
|
|
1428
|
+
message: string;
|
|
1429
|
+
route: {
|
|
1430
|
+
name: string;
|
|
1431
|
+
query?: {
|
|
1432
|
+
[key: string]: any;
|
|
1433
|
+
};
|
|
1434
|
+
params?: {
|
|
1435
|
+
[key: string]: any;
|
|
1436
|
+
};
|
|
1437
|
+
};
|
|
1438
|
+
}[];
|
|
1439
|
+
};
|
|
1440
|
+
};
|
|
1441
|
+
newDiscussionReply: {
|
|
1442
|
+
message: {
|
|
1443
|
+
_id: string;
|
|
1444
|
+
title: string;
|
|
1445
|
+
parentType: string;
|
|
1446
|
+
parentId: string;
|
|
1447
|
+
};
|
|
1448
|
+
reply: {
|
|
1449
|
+
content: string;
|
|
1450
|
+
userSub: string;
|
|
1451
|
+
};
|
|
1452
|
+
actionUserSub: string;
|
|
1453
|
+
};
|
|
1454
|
+
userAssignedToDiscussion: {
|
|
1455
|
+
message: {
|
|
1456
|
+
_id: string;
|
|
1457
|
+
title: string;
|
|
1458
|
+
parentType: string;
|
|
1459
|
+
parentId: string;
|
|
1460
|
+
};
|
|
1461
|
+
assignedBy: string;
|
|
1462
|
+
};
|
|
1463
|
+
discussionMessageDue: {
|
|
1464
|
+
message: {
|
|
1465
|
+
_id: string;
|
|
1466
|
+
title: string;
|
|
1467
|
+
parentType: string;
|
|
1468
|
+
parentId: string;
|
|
1469
|
+
dueDate: string;
|
|
1470
|
+
};
|
|
1471
|
+
scheduledBy: string;
|
|
1472
|
+
};
|
|
1473
|
+
newUserSignIn: {
|
|
1474
|
+
user: {
|
|
1475
|
+
_id: string;
|
|
1476
|
+
name: string;
|
|
1477
|
+
email: string;
|
|
1478
|
+
userSub: string;
|
|
1479
|
+
};
|
|
1480
|
+
company: {
|
|
1481
|
+
_id: string;
|
|
1482
|
+
name: string;
|
|
1483
|
+
};
|
|
1484
|
+
loginTime: string;
|
|
1485
|
+
};
|
|
1486
|
+
};
|
|
1487
|
+
type NotificationEventType = keyof NotificationContextMap;
|
|
1488
|
+
interface NotificationSQSMessage<E extends NotificationEventType = NotificationEventType> {
|
|
1489
|
+
eventName: E;
|
|
1490
|
+
timestamp: string;
|
|
1491
|
+
companyId: string;
|
|
1492
|
+
userSub: string;
|
|
1493
|
+
alertTriggerId?: string;
|
|
1494
|
+
notificationTemplateId?: string;
|
|
1495
|
+
context: NotificationContextMap[E];
|
|
1496
|
+
}
|
|
1497
|
+
interface SendNotificationMessageInput<E extends NotificationEventType> {
|
|
1498
|
+
companyId: string;
|
|
1499
|
+
userSub: string;
|
|
1500
|
+
alertTriggerId?: string;
|
|
1501
|
+
timestamp?: string;
|
|
1502
|
+
notificationTemplateId?: string;
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1408
1505
|
declare const NotificationTemplateCategories: readonly ["automation", "report", "team", "dataQuality", "discussion", "scraper"];
|
|
1409
|
-
type NotificationTemplateCategory = typeof NotificationTemplateCategories[number];
|
|
1506
|
+
type NotificationTemplateCategory = (typeof NotificationTemplateCategories)[number];
|
|
1410
1507
|
declare const EventNamesByCategory: {
|
|
1411
|
-
readonly automation: readonly ["automationFailed", "
|
|
1508
|
+
readonly automation: readonly ["automationFailed", "automationCompleted", "automationOverdue", "automationExtractorOverdue"];
|
|
1412
1509
|
readonly report: readonly ["reportSuccess", "reportFailed"];
|
|
1413
1510
|
readonly team: readonly ["newUserSignIn"];
|
|
1414
|
-
readonly dataQuality: readonly ["
|
|
1415
|
-
readonly discussion: readonly ["
|
|
1416
|
-
readonly scraper: readonly ["scraperLoginError", "
|
|
1511
|
+
readonly dataQuality: readonly ["invoiceOverdue", "contractOverdue", "contractDueSoon", "readingOverdue", "readingDueSoon"];
|
|
1512
|
+
readonly discussion: readonly ["newDiscussionReply", "userAssignedToDiscussion", "discussionMessageDue"];
|
|
1513
|
+
readonly scraper: readonly ["scraperLoginError", "scraperHasNotRun", "scraperRunCompleted"];
|
|
1417
1514
|
};
|
|
1418
|
-
type AutomationEventName = typeof EventNamesByCategory.automation[number];
|
|
1419
|
-
type ReportEventName = typeof EventNamesByCategory.report[number];
|
|
1420
|
-
type TeamEventName = typeof EventNamesByCategory.team[number];
|
|
1421
|
-
type DataQualityEventName = typeof EventNamesByCategory.dataQuality[number];
|
|
1422
|
-
type DiscussionEventName = typeof EventNamesByCategory.discussion[number];
|
|
1423
|
-
type ScraperEventName = typeof EventNamesByCategory.scraper[number];
|
|
1424
|
-
type NotificationEventName =
|
|
1425
|
-
type NotificationTemplateSeverity = 'error' | 'warning' | 'info' | 'success'
|
|
1515
|
+
type AutomationEventName = (typeof EventNamesByCategory.automation)[number];
|
|
1516
|
+
type ReportEventName = (typeof EventNamesByCategory.report)[number];
|
|
1517
|
+
type TeamEventName = (typeof EventNamesByCategory.team)[number];
|
|
1518
|
+
type DataQualityEventName = (typeof EventNamesByCategory.dataQuality)[number];
|
|
1519
|
+
type DiscussionEventName = (typeof EventNamesByCategory.discussion)[number];
|
|
1520
|
+
type ScraperEventName = (typeof EventNamesByCategory.scraper)[number];
|
|
1521
|
+
type NotificationEventName = NotificationEventType;
|
|
1522
|
+
type NotificationTemplateSeverity = 'error' | 'warning' | 'info' | 'success';
|
|
1426
1523
|
type NotificationTemplateDefaultChannel = 'off' | 'inApp' | 'email' | 'sms';
|
|
1427
1524
|
type NotificationTemplateConfigType = 'text' | 'number' | 'password' | 'textarea' | 'radio' | 'select' | 'select2' | 'select-old' | 'select-multiple' | 'select-array' | 'select-array-list' | 'select-array-search' | 'multi-check-options' | 'tag-manager' | 'datePicker' | 'dateTimePicker' | 'dateRangePicker' | 'file' | 'slider';
|
|
1428
1525
|
interface NotificationTemplateConfigOption {
|
|
@@ -1445,81 +1542,21 @@ interface NotificationTemplate<ID = string, DateType = Date | string> {
|
|
|
1445
1542
|
_id: ID;
|
|
1446
1543
|
name: string;
|
|
1447
1544
|
description?: string;
|
|
1545
|
+
triggerDescription?: string;
|
|
1448
1546
|
category: NotificationTemplateCategory;
|
|
1449
1547
|
eventName: NotificationEventName;
|
|
1450
1548
|
severity: NotificationTemplateSeverity;
|
|
1451
1549
|
isSystem?: boolean;
|
|
1452
1550
|
default: NotificationTemplateDefaultChannel;
|
|
1453
|
-
|
|
1454
|
-
|
|
1551
|
+
messageTemplate?: string;
|
|
1552
|
+
routeTemplate?: NotificationTemplateRoute;
|
|
1455
1553
|
icon?: string;
|
|
1456
1554
|
config?: Map<string, NotificationTemplateConfig> | Record<string, NotificationTemplateConfig>;
|
|
1555
|
+
active: boolean;
|
|
1457
1556
|
createdAt?: DateType;
|
|
1458
1557
|
updatedAt?: DateType;
|
|
1459
1558
|
}
|
|
1460
1559
|
|
|
1461
|
-
type NotificationContextMap = {
|
|
1462
|
-
reportSuccess: {
|
|
1463
|
-
report: {
|
|
1464
|
-
fileName: string;
|
|
1465
|
-
_id: string;
|
|
1466
|
-
};
|
|
1467
|
-
};
|
|
1468
|
-
reportFailed: {
|
|
1469
|
-
report: {
|
|
1470
|
-
fileName: string;
|
|
1471
|
-
_id: string;
|
|
1472
|
-
};
|
|
1473
|
-
};
|
|
1474
|
-
automationFailed: {
|
|
1475
|
-
context: {
|
|
1476
|
-
message: string;
|
|
1477
|
-
metadata: {
|
|
1478
|
-
items: {
|
|
1479
|
-
message: string;
|
|
1480
|
-
route: {
|
|
1481
|
-
name: string;
|
|
1482
|
-
query: {
|
|
1483
|
-
id: string;
|
|
1484
|
-
};
|
|
1485
|
-
};
|
|
1486
|
-
}[];
|
|
1487
|
-
};
|
|
1488
|
-
};
|
|
1489
|
-
};
|
|
1490
|
-
readingOverdue: {
|
|
1491
|
-
context: {
|
|
1492
|
-
message: string;
|
|
1493
|
-
metadata: {
|
|
1494
|
-
items: {
|
|
1495
|
-
message: string;
|
|
1496
|
-
route: {
|
|
1497
|
-
name: string;
|
|
1498
|
-
params: {
|
|
1499
|
-
id: string;
|
|
1500
|
-
};
|
|
1501
|
-
};
|
|
1502
|
-
}[];
|
|
1503
|
-
};
|
|
1504
|
-
};
|
|
1505
|
-
};
|
|
1506
|
-
};
|
|
1507
|
-
type NotificationEventType = keyof NotificationContextMap;
|
|
1508
|
-
interface NotificationSQSMessage<E extends NotificationEventType = NotificationEventType> {
|
|
1509
|
-
eventName: E;
|
|
1510
|
-
timestamp: string;
|
|
1511
|
-
companyId: string;
|
|
1512
|
-
userSub: string;
|
|
1513
|
-
alertTriggerId?: string;
|
|
1514
|
-
context: NotificationContextMap[E];
|
|
1515
|
-
}
|
|
1516
|
-
interface SendNotificationMessageInput<E extends NotificationEventType> {
|
|
1517
|
-
companyId: string;
|
|
1518
|
-
userSub: string;
|
|
1519
|
-
alertTriggerId?: string;
|
|
1520
|
-
timestamp?: string;
|
|
1521
|
-
}
|
|
1522
|
-
|
|
1523
1560
|
interface Log<IDType = ObjectId | string> {
|
|
1524
1561
|
_id: IDType;
|
|
1525
1562
|
message: string;
|
|
@@ -1782,24 +1819,6 @@ declare const _default$5: (auth: AuthOptions, instanceOptions?: CreateAxiosDefau
|
|
|
1782
1819
|
removeAccount: (id: string, options?: AxiosRequestConfig) => Promise<Account<string>>;
|
|
1783
1820
|
getAccountSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1784
1821
|
invalidateAccountCache: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1785
|
-
getAlertTrigger: (id: string, options?: AxiosRequestConfig) => Promise<CustomAlertTrigger<string, string, {
|
|
1786
|
-
[key: string]: any;
|
|
1787
|
-
}>>;
|
|
1788
|
-
listAlertTriggers: <P = CustomAlertTrigger<string, string, {
|
|
1789
|
-
[key: string]: any;
|
|
1790
|
-
}>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1791
|
-
updateAlertTrigger: (id: string, data: any, options?: AxiosRequestConfig) => Promise<CustomAlertTrigger<string, string | Date, {
|
|
1792
|
-
[key: string]: any;
|
|
1793
|
-
}>>;
|
|
1794
|
-
createAlertTrigger: (data: any, options?: AxiosRequestConfig) => Promise<CustomAlertTrigger<string, string | Date, {
|
|
1795
|
-
[key: string]: any;
|
|
1796
|
-
}>>;
|
|
1797
|
-
removeAlertTrigger: (id: string, options?: AxiosRequestConfig) => Promise<CustomAlertTrigger<string, string | Date, {
|
|
1798
|
-
[key: string]: any;
|
|
1799
|
-
}>>;
|
|
1800
|
-
bulkUpdateAlertTriggers: (data: BulkUpdateCustomAlertTriggersRequest, options?: AxiosRequestConfig) => Promise<ETNBulkUpdateResult>;
|
|
1801
|
-
retryAlertTrigger: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1802
|
-
cancelAlertTrigger: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1803
1822
|
getCustomAlertTrigger: (id: string, options?: AxiosRequestConfig) => Promise<CustomAlertTrigger<string, string, {
|
|
1804
1823
|
[key: string]: any;
|
|
1805
1824
|
}>>;
|
|
@@ -1973,7 +1992,7 @@ declare const _default$4: (options: EmailTemplateOptions) => string;
|
|
|
1973
1992
|
interface NotificationEmailOptions {
|
|
1974
1993
|
title: string;
|
|
1975
1994
|
message: string;
|
|
1976
|
-
severity?:
|
|
1995
|
+
severity?: NotificationTemplateSeverity;
|
|
1977
1996
|
category?: string;
|
|
1978
1997
|
userName?: string;
|
|
1979
1998
|
actions?: Array<{
|
|
@@ -1981,6 +2000,9 @@ interface NotificationEmailOptions {
|
|
|
1981
2000
|
url?: string;
|
|
1982
2001
|
}>;
|
|
1983
2002
|
metadata?: Record<string, any>;
|
|
2003
|
+
items?: Array<{
|
|
2004
|
+
message: string;
|
|
2005
|
+
}>;
|
|
1984
2006
|
}
|
|
1985
2007
|
declare function generateNotificationEmail(options: NotificationEmailOptions): string;
|
|
1986
2008
|
declare const _default$3: {
|
|
@@ -2014,21 +2036,33 @@ interface SendNotificationMessageOptions {
|
|
|
2014
2036
|
sqsClient?: SQSClient;
|
|
2015
2037
|
}
|
|
2016
2038
|
type NotificationType = keyof NotificationContextMap;
|
|
2017
|
-
declare function createNotificationMessage<T extends NotificationType>(eventName: T, context: NotificationContextMap[T], input: SendNotificationMessageInput<T>): NotificationSQSMessage<T>;
|
|
2018
2039
|
type SendNotificationParams<T extends NotificationType> = {
|
|
2019
2040
|
eventName: T;
|
|
2020
2041
|
context: NotificationContextMap[T];
|
|
2021
2042
|
input: SendNotificationMessageInput<T>;
|
|
2022
2043
|
options?: SendNotificationMessageOptions;
|
|
2023
2044
|
};
|
|
2045
|
+
type SendNotificationBatchParams<T extends NotificationType> = {
|
|
2046
|
+
messages: Array<{
|
|
2047
|
+
eventName: T;
|
|
2048
|
+
context: NotificationContextMap[T];
|
|
2049
|
+
input: SendNotificationMessageInput<T>;
|
|
2050
|
+
}>;
|
|
2051
|
+
options?: SendNotificationMessageOptions;
|
|
2052
|
+
};
|
|
2053
|
+
declare function createNotificationMessage<T extends NotificationType>(eventName: T, context: NotificationContextMap[T], input: SendNotificationMessageInput<T>): NotificationSQSMessage<T>;
|
|
2024
2054
|
declare function sendNotificationMessage<T extends NotificationType>({ eventName, context, input, options }: SendNotificationParams<T>): Promise<{
|
|
2025
2055
|
messageId: string;
|
|
2026
2056
|
}>;
|
|
2057
|
+
declare function sendNotificationMessageBatch<T extends NotificationType>({ messages, options }: SendNotificationBatchParams<T>): Promise<{
|
|
2058
|
+
messageIds: string[];
|
|
2059
|
+
}>;
|
|
2027
2060
|
|
|
2028
2061
|
declare const notificationQueue_createNotificationMessage: typeof createNotificationMessage;
|
|
2029
2062
|
declare const notificationQueue_sendNotificationMessage: typeof sendNotificationMessage;
|
|
2063
|
+
declare const notificationQueue_sendNotificationMessageBatch: typeof sendNotificationMessageBatch;
|
|
2030
2064
|
declare namespace notificationQueue {
|
|
2031
|
-
export { notificationQueue_createNotificationMessage as createNotificationMessage, notificationQueue_sendNotificationMessage as sendNotificationMessage };
|
|
2065
|
+
export { notificationQueue_createNotificationMessage as createNotificationMessage, notificationQueue_sendNotificationMessage as sendNotificationMessage, notificationQueue_sendNotificationMessageBatch as sendNotificationMessageBatch };
|
|
2032
2066
|
}
|
|
2033
2067
|
|
|
2034
2068
|
interface ConsumptionData {
|
|
@@ -2073,6 +2107,14 @@ declare const automationServices: {
|
|
|
2073
2107
|
category: AutomationServiceCategory;
|
|
2074
2108
|
}[];
|
|
2075
2109
|
|
|
2110
|
+
declare function updateBatchJobStatus({ etnApi, automationRun, accountKey, status, errorMessage }: {
|
|
2111
|
+
etnApi: ReturnType<typeof _default$5>;
|
|
2112
|
+
automationRun: AutomationRun<string>;
|
|
2113
|
+
accountKey?: string;
|
|
2114
|
+
status: 'completed' | 'failed';
|
|
2115
|
+
errorMessage?: string;
|
|
2116
|
+
}): Promise<void>;
|
|
2117
|
+
|
|
2076
2118
|
interface StepFunctionEvent {
|
|
2077
2119
|
params: any;
|
|
2078
2120
|
input: {
|
|
@@ -2111,16 +2153,60 @@ declare class IngestHandler {
|
|
|
2111
2153
|
*/
|
|
2112
2154
|
declare function isTransientError(error: any): boolean;
|
|
2113
2155
|
|
|
2156
|
+
type PaginatedResponse<T> = {
|
|
2157
|
+
data: T[];
|
|
2158
|
+
};
|
|
2159
|
+
type FetchPage<T> = (params: {
|
|
2160
|
+
$limit: number;
|
|
2161
|
+
$skip: number;
|
|
2162
|
+
}) => Promise<PaginatedResponse<T>>;
|
|
2163
|
+
type PaginatedFetchOptions = {
|
|
2164
|
+
pageSize?: number;
|
|
2165
|
+
};
|
|
2166
|
+
declare const paginatedFetch: <T>(fetchPage: FetchPage<T>, options?: PaginatedFetchOptions) => Promise<T[]>;
|
|
2167
|
+
|
|
2168
|
+
type SqsMessageAttribute = {
|
|
2169
|
+
DataType: 'String' | 'Number' | 'Binary';
|
|
2170
|
+
StringValue?: string;
|
|
2171
|
+
BinaryValue?: Uint8Array;
|
|
2172
|
+
};
|
|
2173
|
+
type SqsBatchMessage<T> = {
|
|
2174
|
+
body: T;
|
|
2175
|
+
id?: string;
|
|
2176
|
+
attributes?: Record<string, SqsMessageAttribute>;
|
|
2177
|
+
};
|
|
2178
|
+
type SendToSqsBatchedOptions = {
|
|
2179
|
+
queueUrl: string;
|
|
2180
|
+
sqsClient?: SQSClient;
|
|
2181
|
+
concurrency?: number;
|
|
2182
|
+
batchSize?: number;
|
|
2183
|
+
};
|
|
2184
|
+
type SendToSqsBatchedResult = {
|
|
2185
|
+
successful: number;
|
|
2186
|
+
failed: number;
|
|
2187
|
+
};
|
|
2188
|
+
declare const sendToSqsBatched: <T>(messages: SqsBatchMessage<T>[], options: SendToSqsBatchedOptions) => Promise<SendToSqsBatchedResult>;
|
|
2189
|
+
|
|
2190
|
+
type index$1_FetchPage<T> = FetchPage<T>;
|
|
2114
2191
|
type index$1_IngestHandler = IngestHandler;
|
|
2115
2192
|
declare const index$1_IngestHandler: typeof IngestHandler;
|
|
2193
|
+
type index$1_PaginatedFetchOptions = PaginatedFetchOptions;
|
|
2194
|
+
type index$1_PaginatedResponse<T> = PaginatedResponse<T>;
|
|
2195
|
+
type index$1_SendToSqsBatchedOptions = SendToSqsBatchedOptions;
|
|
2196
|
+
type index$1_SendToSqsBatchedResult = SendToSqsBatchedResult;
|
|
2197
|
+
type index$1_SqsBatchMessage<T> = SqsBatchMessage<T>;
|
|
2198
|
+
type index$1_SqsMessageAttribute = SqsMessageAttribute;
|
|
2116
2199
|
declare const index$1_automationServices: typeof automationServices;
|
|
2117
2200
|
declare const index$1_automationSources: typeof automationSources;
|
|
2118
2201
|
declare const index$1_getMeterPointNumberBottomLine: typeof getMeterPointNumberBottomLine;
|
|
2119
2202
|
declare const index$1_isTransientError: typeof isTransientError;
|
|
2203
|
+
declare const index$1_paginatedFetch: typeof paginatedFetch;
|
|
2204
|
+
declare const index$1_sendToSqsBatched: typeof sendToSqsBatched;
|
|
2205
|
+
declare const index$1_updateBatchJobStatus: typeof updateBatchJobStatus;
|
|
2120
2206
|
declare const index$1_utilityTypes: typeof utilityTypes;
|
|
2121
2207
|
declare const index$1_wasteCategories: typeof wasteCategories;
|
|
2122
2208
|
declare namespace index$1 {
|
|
2123
|
-
export { index$1_IngestHandler as IngestHandler, index$1_automationServices as automationServices, index$1_automationSources as automationSources, index$1_getMeterPointNumberBottomLine as getMeterPointNumberBottomLine, index$1_isTransientError as isTransientError, units$1 as units, index$1_utilityTypes as utilityTypes, index$1_wasteCategories as wasteCategories };
|
|
2209
|
+
export { type index$1_FetchPage as FetchPage, index$1_IngestHandler as IngestHandler, type index$1_PaginatedFetchOptions as PaginatedFetchOptions, type index$1_PaginatedResponse as PaginatedResponse, type index$1_SendToSqsBatchedOptions as SendToSqsBatchedOptions, type index$1_SendToSqsBatchedResult as SendToSqsBatchedResult, type index$1_SqsBatchMessage as SqsBatchMessage, type index$1_SqsMessageAttribute as SqsMessageAttribute, index$1_automationServices as automationServices, index$1_automationSources as automationSources, index$1_getMeterPointNumberBottomLine as getMeterPointNumberBottomLine, index$1_isTransientError as isTransientError, index$1_paginatedFetch as paginatedFetch, index$1_sendToSqsBatched as sendToSqsBatched, units$1 as units, index$1_updateBatchJobStatus as updateBatchJobStatus, index$1_utilityTypes as utilityTypes, index$1_wasteCategories as wasteCategories };
|
|
2124
2210
|
}
|
|
2125
2211
|
|
|
2126
2212
|
interface ETNModel {
|
|
@@ -2247,4 +2333,4 @@ declare namespace scrapers {
|
|
|
2247
2333
|
export type { scrapers_ETNAccount as ETNAccount };
|
|
2248
2334
|
}
|
|
2249
2335
|
|
|
2250
|
-
export { type AccessLevel, type Account, type AccountResult, type Action, type ActionType, type Asset, type Automation, type AutomationEventName, 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 DataQualityEventName, type DefaultField, type DeliveryStatus, type DiscussionEventName, 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, type NotificationCategoryKey, NotificationCategoryList, type NotificationCategoryPreferences, type NotificationChannels, type NotificationContextMap, NotificationDefaultChannels, type NotificationEventName, type NotificationEventType, type NotificationPreferences, type NotificationSQSMessage, type NotificationTemplate,
|
|
2336
|
+
export { type AccessLevel, type Account, type AccountResult, type Action, type ActionType, type Asset, type Automation, type AutomationEventName, 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 DataQualityEventName, type DefaultField, type DeliveryStatus, type DiscussionEventName, 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, type NotificationCategoryKey, NotificationCategoryList, type NotificationCategoryPreferences, type NotificationChannels, type NotificationContextMap, NotificationDefaultChannels, type NotificationEventName, type NotificationEventType, type NotificationPreferences, type NotificationSQSMessage, type NotificationTemplate, type NotificationTemplateCategory, 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 ReportEventName, type ReportMetadata, type ReportSource, type ReportSourceIdItem, type ReportTemplate, type ReportType, type ScraperEventName, type ScraperRun, type SendNotificationMessageInput, type Setting, type SourceType, type Supplier, type TeamEventName, type User, type UtilityType, type WasteCategories, type WasteTypes, _default$5 as api, consumption, _default$1 as db, _default$4 as emailTemplate, integrations, _default$2 as logger, monitoring, notification, _default$3 as notificationEmailTemplate, notificationQueue, index as openai, reporting, scrapers, _default as slack, units, index$1 as utils };
|