@etainabl/nodejs-sdk 1.3.140 → 1.3.142
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 +7 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.cts +41 -26
- package/dist/index.d.ts +41 -26
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -6,6 +6,7 @@ import * as _aws_sdk_client_ses from '@aws-sdk/client-ses';
|
|
|
6
6
|
import { S3Client } from '@aws-sdk/client-s3';
|
|
7
7
|
import { Context, SQSEvent, SNSEvent, APIGatewayEvent, S3Event } from 'aws-lambda';
|
|
8
8
|
import { SQSClient } from '@aws-sdk/client-sqs';
|
|
9
|
+
import { SoftDeleteDocument } from 'mongoose-delete';
|
|
9
10
|
import winston from 'winston';
|
|
10
11
|
import moment from 'moment';
|
|
11
12
|
import { ZodObject } from 'zod';
|
|
@@ -305,12 +306,12 @@ declare namespace units {
|
|
|
305
306
|
export { type units_AccountType as AccountType, type units_BaseUnit as BaseUnit, type units_ETNUnit as ETNUnit, units_accountTypeMap as accountTypeMap, units_accountTypeUnitMap as accountTypeUnitMap, units_checkAccountTypeVsUnits as checkAccountTypeVsUnits, units_convertItems as convertItems, units_simpleConvert as simpleConvert };
|
|
306
307
|
}
|
|
307
308
|
|
|
308
|
-
interface Portal
|
|
309
|
+
interface Portal {
|
|
309
310
|
username?: string;
|
|
310
311
|
password?: string;
|
|
311
312
|
scraperEnabled?: boolean;
|
|
312
313
|
url?: string;
|
|
313
|
-
scraperId?:
|
|
314
|
+
scraperId?: string;
|
|
314
315
|
scraperStartDate?: Date;
|
|
315
316
|
}
|
|
316
317
|
|
|
@@ -1073,7 +1074,7 @@ interface InvoiceRate {
|
|
|
1073
1074
|
type InvoiceStatus = 'processing' | 'pending' | 'uploading' | 'queued' | 'captured' | 'error' | 'completed';
|
|
1074
1075
|
type FinancialStatus = 'approved' | 'new' | 'not-approved' | 'paid' | 'sent-for-payment';
|
|
1075
1076
|
type InvoiceRateType = 'unitRate' | 'daily' | 'levy' | 'tax' | 'kva' | 'waterRate' | 'wasteRate' | 'discount' | 'misc' | 'feedInTariff' | 'latePaymentCharge';
|
|
1076
|
-
interface Invoice<IDType = ObjectId | string, DateType = Date> {
|
|
1077
|
+
interface Invoice<IDType = ObjectId | string, DateType = Date> extends SoftDeleteDocument {
|
|
1077
1078
|
_id: IDType;
|
|
1078
1079
|
jobId?: string | null;
|
|
1079
1080
|
startTime?: DateType;
|
|
@@ -1414,27 +1415,27 @@ interface AuthOptions {
|
|
|
1414
1415
|
declare const _default$4: (auth: AuthOptions, instanceOptions?: CreateAxiosDefaults) => {
|
|
1415
1416
|
instance: AxiosInstance;
|
|
1416
1417
|
getAccount: (id: string, options?: AxiosRequestConfig) => Promise<Account<string>>;
|
|
1417
|
-
listAccounts: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1418
|
+
listAccounts: <P = Account<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1418
1419
|
updateAccount: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Account<string>>;
|
|
1419
1420
|
createAccount: (data: any, options?: AxiosRequestConfig) => Promise<Account<string>>;
|
|
1420
1421
|
removeAccount: (id: string, options?: AxiosRequestConfig) => Promise<Account<string>>;
|
|
1421
1422
|
getAccountSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1422
1423
|
invalidateAccountCache: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1423
1424
|
getAsset: (id: string, options?: AxiosRequestConfig) => Promise<Asset<string>>;
|
|
1424
|
-
listAssets: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1425
|
+
listAssets: <P = Asset<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1425
1426
|
updateAsset: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Asset<string>>;
|
|
1426
1427
|
createAsset: (data: any, options?: AxiosRequestConfig) => Promise<Asset<string>>;
|
|
1427
1428
|
removeAsset: (id: string, options?: AxiosRequestConfig) => Promise<Asset<string>>;
|
|
1428
1429
|
getAssetSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1429
1430
|
getAssetGroup: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1430
|
-
listAssetGroups: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1431
|
+
listAssetGroups: <P = any>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1431
1432
|
updateAssetGroup: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1432
1433
|
createAssetGroup: (data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1433
1434
|
removeAssetGroup: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1434
1435
|
getAssetGroupAssets: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1435
1436
|
getAssetGroupSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1436
1437
|
getAutomation: (id: string, options?: AxiosRequestConfig) => Promise<Automation<string>>;
|
|
1437
|
-
listAutomations: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1438
|
+
listAutomations: <P = Automation<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1438
1439
|
updateAutomation: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Automation<string>>;
|
|
1439
1440
|
createAutomation: (data: any, options?: AxiosRequestConfig) => Promise<Automation<string>>;
|
|
1440
1441
|
removeAutomation: (id: string, options?: AxiosRequestConfig) => Promise<Automation<string>>;
|
|
@@ -1444,97 +1445,99 @@ declare const _default$4: (auth: AuthOptions, instanceOptions?: CreateAxiosDefau
|
|
|
1444
1445
|
updateAccountStatusForAutomation: (id: string, subId: string, data: any, options?: AxiosRequestConfig) => Promise<Automation<string>>;
|
|
1445
1446
|
getCompany: (id: string, options?: AxiosRequestConfig) => Promise<Company<string>>;
|
|
1446
1447
|
getCompanyInvoiceValidationRules: (id: string, options?: AxiosRequestConfig) => Promise<CompanyInvoiceValidationRule<string>[]>;
|
|
1447
|
-
listCompanies: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1448
|
+
listCompanies: <P = Company<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1448
1449
|
updateCompany: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Company<string>>;
|
|
1449
1450
|
getConsumption: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1450
|
-
listConsumptions: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1451
|
+
listConsumptions: <P = any>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1451
1452
|
updateConsumption: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1452
1453
|
createConsumption: (data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1453
1454
|
removeConsumption: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1454
1455
|
getConsumptionSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1455
1456
|
getEmail: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1456
|
-
listEmails: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1457
|
+
listEmails: <P = any>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1457
1458
|
updateEmail: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1458
1459
|
createEmail: (data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1459
1460
|
removeEmail: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1460
1461
|
getEmissionFactor: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1461
|
-
listEmissionFactors: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1462
|
+
listEmissionFactors: <P = any>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1462
1463
|
updateEmissionFactor: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1463
1464
|
createEmissionFactor: (data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1464
1465
|
removeEmissionFactor: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1465
1466
|
getEntity: (id: string, options?: AxiosRequestConfig) => Promise<Entity<string>>;
|
|
1466
|
-
listEntities: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1467
|
+
listEntities: <P = Entity<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1467
1468
|
updateEntity: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Entity<string>>;
|
|
1468
1469
|
createEntity: (data: any, options?: AxiosRequestConfig) => Promise<Entity<string>>;
|
|
1469
1470
|
removeEntity: (id: string, options?: AxiosRequestConfig) => Promise<Entity<string>>;
|
|
1470
1471
|
getEntitiesSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1471
1472
|
getEntityStructure: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1472
1473
|
getLog: (id: string, options?: AxiosRequestConfig) => Promise<Log<string>>;
|
|
1473
|
-
listLogs: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1474
|
+
listLogs: <P = Log<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1474
1475
|
updateLog: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Log<string>>;
|
|
1475
1476
|
createLog: (data: any, options?: AxiosRequestConfig) => Promise<Log<string>>;
|
|
1476
1477
|
removeLog: (id: string, options?: AxiosRequestConfig) => Promise<Log<string>>;
|
|
1477
1478
|
getReading: (id: string, options?: AxiosRequestConfig) => Promise<Reading<string, Date>>;
|
|
1478
|
-
listReadings: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1479
|
+
listReadings: <P = Reading<string, Date>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1479
1480
|
updateReading: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Reading<string, Date>>;
|
|
1480
1481
|
createReading: (data: any, options?: AxiosRequestConfig) => Promise<Reading<string, Date>>;
|
|
1481
1482
|
removeReading: (id: string, options?: AxiosRequestConfig) => Promise<Reading<string, Date>>;
|
|
1482
1483
|
getReadingSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1483
1484
|
getReport: (id: string, options?: AxiosRequestConfig) => Promise<Report<string>>;
|
|
1484
|
-
listReports: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1485
|
+
listReports: <P = Report<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1485
1486
|
updateReport: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Report<string>>;
|
|
1486
1487
|
createReport: (data: any, options?: AxiosRequestConfig) => Promise<Report<string>>;
|
|
1487
1488
|
removeReport: (id: string, options?: AxiosRequestConfig) => Promise<Report<string>>;
|
|
1488
1489
|
sendReport: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1489
1490
|
getReportTemplate: (id: string, options?: AxiosRequestConfig) => Promise<ReportTemplate<string>>;
|
|
1490
|
-
listReportTemplates: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1491
|
+
listReportTemplates: <P = ReportTemplate<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1491
1492
|
updateReportTemplate: (id: string, data: any, options?: AxiosRequestConfig) => Promise<ReportTemplate<string>>;
|
|
1492
1493
|
createReportTemplate: (data: any, options?: AxiosRequestConfig) => Promise<ReportTemplate<string>>;
|
|
1493
1494
|
removeReportTemplate: (id: string, options?: AxiosRequestConfig) => Promise<ReportTemplate<string>>;
|
|
1494
1495
|
getScheduledReport: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1495
|
-
listScheduledReports: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1496
|
+
listScheduledReports: <P = any>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1496
1497
|
updateScheduledReport: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1497
1498
|
createScheduledReport: (data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1498
1499
|
removeScheduledReport: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1499
1500
|
sendScheduledReport: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1500
1501
|
getInvoice: (id: string, options?: AxiosRequestConfig) => Promise<Invoice<string, Date>>;
|
|
1501
|
-
listInvoices: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1502
|
+
listInvoices: <P = Invoice<string, string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1502
1503
|
updateInvoice: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Invoice<string, Date>>;
|
|
1503
1504
|
createInvoice: (data: any, options?: AxiosRequestConfig) => Promise<Invoice<string, Date>>;
|
|
1504
1505
|
removeInvoice: (id: string, options?: AxiosRequestConfig) => Promise<Invoice<string, Date>>;
|
|
1505
1506
|
getInvoiceSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1506
1507
|
downloadInvoice: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1507
1508
|
getInvoiceCapture: (id: string, options?: AxiosRequestConfig) => Promise<InvoiceCapture<string>>;
|
|
1508
|
-
listInvoicesCapture: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1509
|
+
listInvoicesCapture: <P = InvoiceCapture<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1509
1510
|
updateInvoiceCapture: (id: string, data: any, options?: AxiosRequestConfig) => Promise<InvoiceCapture<string>>;
|
|
1510
1511
|
createInvoiceCapture: (data: any, options?: AxiosRequestConfig) => Promise<InvoiceCapture<string>>;
|
|
1511
1512
|
removeInvoiceCapture: (id: string, options?: AxiosRequestConfig) => Promise<InvoiceCapture<string>>;
|
|
1512
1513
|
getInvoiceCaptureSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1513
1514
|
startInvoiceCaptureValidation: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1514
1515
|
getInvoiceValidation: (id: string, options?: AxiosRequestConfig) => Promise<InvoiceValidation<string>>;
|
|
1515
|
-
listInvoicesValidation: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1516
|
+
listInvoicesValidation: <P = InvoiceValidation<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1516
1517
|
updateInvoiceValidation: (id: string, data: any, options?: AxiosRequestConfig) => Promise<InvoiceValidation<string>>;
|
|
1517
1518
|
createInvoiceValidation: (data: any, options?: AxiosRequestConfig) => Promise<InvoiceValidation<string>>;
|
|
1518
1519
|
removeInvoiceValidation: (id: string, options?: AxiosRequestConfig) => Promise<InvoiceValidation<string>>;
|
|
1519
1520
|
getInvoiceValidationSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1520
1521
|
restartInvoiceValidation: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1521
1522
|
getSupplier: (id: string, options?: AxiosRequestConfig) => Promise<Supplier<string>>;
|
|
1522
|
-
listSuppliers: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1523
|
+
listSuppliers: <P = Supplier<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1523
1524
|
getSupplierSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1524
1525
|
updateSupplier: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Supplier<string>>;
|
|
1525
1526
|
getImportTemplate: (id: string, options?: AxiosRequestConfig) => Promise<ImportTemplate<string, Record<string, any>, Record<string, any>, Record<string, any>>>;
|
|
1526
|
-
listDataIngest: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1527
|
+
listDataIngest: <P = DataIngest<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1527
1528
|
updateDataIngest: (id: string, data: any, options?: AxiosRequestConfig) => Promise<DataIngest<string>>;
|
|
1528
1529
|
createDataIngest: (data: any, options?: AxiosRequestConfig) => Promise<DataIngest<string>>;
|
|
1529
|
-
listUsers: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1530
|
+
listUsers: <P = User<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1530
1531
|
getUser: (id: string, options?: AxiosRequestConfig) => Promise<User<string>>;
|
|
1531
1532
|
getUserSelf: (options?: AxiosRequestConfig) => Promise<User<string>>;
|
|
1532
1533
|
socketConnect: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1533
1534
|
socketDisconnect: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1534
|
-
listScraperRuns: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1535
|
+
listScraperRuns: <P = ScraperRun<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1535
1536
|
updateScraperRun: (id: string, data: any, options?: AxiosRequestConfig) => Promise<ScraperRun<string>>;
|
|
1537
|
+
createScraperRun: (data: any, options?: AxiosRequestConfig) => Promise<ScraperRun<string>>;
|
|
1538
|
+
createScraperRunLog: (id: string, data: any, options?: AxiosRequestConfig) => Promise<ScraperRun<string>>;
|
|
1536
1539
|
createAutomationRun: (data: Omit<AutomationRun<string, string>, "_id">, options?: AxiosRequestConfig) => Promise<AutomationRun<string, string | Date>>;
|
|
1537
|
-
listAutomationRun: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1540
|
+
listAutomationRun: <P = AutomationRun<string, string | Date>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1538
1541
|
getAutomationRun: (id: string, options?: AxiosRequestConfig) => Promise<AutomationRun<string, string | Date>>;
|
|
1539
1542
|
updateAutomationRun: (id: string, data: any, options?: AxiosRequestConfig) => Promise<AutomationRun<string, string>>;
|
|
1540
1543
|
createAutomationRunLog: (id: string, data: Omit<AutomationRunLog<string>, "date">, options?: AxiosRequestConfig) => Promise<AutomationRun<string, string | Date>>;
|
|
@@ -1762,4 +1765,16 @@ declare namespace index {
|
|
|
1762
1765
|
export { index_Prompt as Prompt, type index_PromptInput as PromptInput, type index_PromptOptions as PromptOptions, type index_PromptResponse as PromptResponse };
|
|
1763
1766
|
}
|
|
1764
1767
|
|
|
1765
|
-
|
|
1768
|
+
type ETNAccount = Account<string> & {
|
|
1769
|
+
scraperSettings: PortalSupplierSchema & Portal & {
|
|
1770
|
+
schedule?: string;
|
|
1771
|
+
};
|
|
1772
|
+
sharedSupplierRef?: boolean;
|
|
1773
|
+
};
|
|
1774
|
+
|
|
1775
|
+
type scrapers_ETNAccount = ETNAccount;
|
|
1776
|
+
declare namespace scrapers {
|
|
1777
|
+
export type { scrapers_ETNAccount as ETNAccount };
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
export { type AccessLevel, type Account, type AccountResult, 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 ETNEvent, type ETNPagedResponse$1 as ETNPagedResponse, type Email, type Entity, 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 Log, 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 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, _default$2 as logger, monitoring, index as openai, reporting, scrapers, _default as slack, units, index$1 as utils };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import * as _aws_sdk_client_ses from '@aws-sdk/client-ses';
|
|
|
6
6
|
import { S3Client } from '@aws-sdk/client-s3';
|
|
7
7
|
import { Context, SQSEvent, SNSEvent, APIGatewayEvent, S3Event } from 'aws-lambda';
|
|
8
8
|
import { SQSClient } from '@aws-sdk/client-sqs';
|
|
9
|
+
import { SoftDeleteDocument } from 'mongoose-delete';
|
|
9
10
|
import winston from 'winston';
|
|
10
11
|
import moment from 'moment';
|
|
11
12
|
import { ZodObject } from 'zod';
|
|
@@ -305,12 +306,12 @@ declare namespace units {
|
|
|
305
306
|
export { type units_AccountType as AccountType, type units_BaseUnit as BaseUnit, type units_ETNUnit as ETNUnit, units_accountTypeMap as accountTypeMap, units_accountTypeUnitMap as accountTypeUnitMap, units_checkAccountTypeVsUnits as checkAccountTypeVsUnits, units_convertItems as convertItems, units_simpleConvert as simpleConvert };
|
|
306
307
|
}
|
|
307
308
|
|
|
308
|
-
interface Portal
|
|
309
|
+
interface Portal {
|
|
309
310
|
username?: string;
|
|
310
311
|
password?: string;
|
|
311
312
|
scraperEnabled?: boolean;
|
|
312
313
|
url?: string;
|
|
313
|
-
scraperId?:
|
|
314
|
+
scraperId?: string;
|
|
314
315
|
scraperStartDate?: Date;
|
|
315
316
|
}
|
|
316
317
|
|
|
@@ -1073,7 +1074,7 @@ interface InvoiceRate {
|
|
|
1073
1074
|
type InvoiceStatus = 'processing' | 'pending' | 'uploading' | 'queued' | 'captured' | 'error' | 'completed';
|
|
1074
1075
|
type FinancialStatus = 'approved' | 'new' | 'not-approved' | 'paid' | 'sent-for-payment';
|
|
1075
1076
|
type InvoiceRateType = 'unitRate' | 'daily' | 'levy' | 'tax' | 'kva' | 'waterRate' | 'wasteRate' | 'discount' | 'misc' | 'feedInTariff' | 'latePaymentCharge';
|
|
1076
|
-
interface Invoice<IDType = ObjectId | string, DateType = Date> {
|
|
1077
|
+
interface Invoice<IDType = ObjectId | string, DateType = Date> extends SoftDeleteDocument {
|
|
1077
1078
|
_id: IDType;
|
|
1078
1079
|
jobId?: string | null;
|
|
1079
1080
|
startTime?: DateType;
|
|
@@ -1414,27 +1415,27 @@ interface AuthOptions {
|
|
|
1414
1415
|
declare const _default$4: (auth: AuthOptions, instanceOptions?: CreateAxiosDefaults) => {
|
|
1415
1416
|
instance: AxiosInstance;
|
|
1416
1417
|
getAccount: (id: string, options?: AxiosRequestConfig) => Promise<Account<string>>;
|
|
1417
|
-
listAccounts: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1418
|
+
listAccounts: <P = Account<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1418
1419
|
updateAccount: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Account<string>>;
|
|
1419
1420
|
createAccount: (data: any, options?: AxiosRequestConfig) => Promise<Account<string>>;
|
|
1420
1421
|
removeAccount: (id: string, options?: AxiosRequestConfig) => Promise<Account<string>>;
|
|
1421
1422
|
getAccountSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1422
1423
|
invalidateAccountCache: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1423
1424
|
getAsset: (id: string, options?: AxiosRequestConfig) => Promise<Asset<string>>;
|
|
1424
|
-
listAssets: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1425
|
+
listAssets: <P = Asset<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1425
1426
|
updateAsset: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Asset<string>>;
|
|
1426
1427
|
createAsset: (data: any, options?: AxiosRequestConfig) => Promise<Asset<string>>;
|
|
1427
1428
|
removeAsset: (id: string, options?: AxiosRequestConfig) => Promise<Asset<string>>;
|
|
1428
1429
|
getAssetSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1429
1430
|
getAssetGroup: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1430
|
-
listAssetGroups: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1431
|
+
listAssetGroups: <P = any>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1431
1432
|
updateAssetGroup: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1432
1433
|
createAssetGroup: (data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1433
1434
|
removeAssetGroup: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1434
1435
|
getAssetGroupAssets: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1435
1436
|
getAssetGroupSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1436
1437
|
getAutomation: (id: string, options?: AxiosRequestConfig) => Promise<Automation<string>>;
|
|
1437
|
-
listAutomations: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1438
|
+
listAutomations: <P = Automation<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1438
1439
|
updateAutomation: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Automation<string>>;
|
|
1439
1440
|
createAutomation: (data: any, options?: AxiosRequestConfig) => Promise<Automation<string>>;
|
|
1440
1441
|
removeAutomation: (id: string, options?: AxiosRequestConfig) => Promise<Automation<string>>;
|
|
@@ -1444,97 +1445,99 @@ declare const _default$4: (auth: AuthOptions, instanceOptions?: CreateAxiosDefau
|
|
|
1444
1445
|
updateAccountStatusForAutomation: (id: string, subId: string, data: any, options?: AxiosRequestConfig) => Promise<Automation<string>>;
|
|
1445
1446
|
getCompany: (id: string, options?: AxiosRequestConfig) => Promise<Company<string>>;
|
|
1446
1447
|
getCompanyInvoiceValidationRules: (id: string, options?: AxiosRequestConfig) => Promise<CompanyInvoiceValidationRule<string>[]>;
|
|
1447
|
-
listCompanies: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1448
|
+
listCompanies: <P = Company<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1448
1449
|
updateCompany: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Company<string>>;
|
|
1449
1450
|
getConsumption: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1450
|
-
listConsumptions: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1451
|
+
listConsumptions: <P = any>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1451
1452
|
updateConsumption: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1452
1453
|
createConsumption: (data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1453
1454
|
removeConsumption: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1454
1455
|
getConsumptionSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1455
1456
|
getEmail: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1456
|
-
listEmails: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1457
|
+
listEmails: <P = any>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1457
1458
|
updateEmail: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1458
1459
|
createEmail: (data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1459
1460
|
removeEmail: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1460
1461
|
getEmissionFactor: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1461
|
-
listEmissionFactors: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1462
|
+
listEmissionFactors: <P = any>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1462
1463
|
updateEmissionFactor: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1463
1464
|
createEmissionFactor: (data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1464
1465
|
removeEmissionFactor: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1465
1466
|
getEntity: (id: string, options?: AxiosRequestConfig) => Promise<Entity<string>>;
|
|
1466
|
-
listEntities: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1467
|
+
listEntities: <P = Entity<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1467
1468
|
updateEntity: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Entity<string>>;
|
|
1468
1469
|
createEntity: (data: any, options?: AxiosRequestConfig) => Promise<Entity<string>>;
|
|
1469
1470
|
removeEntity: (id: string, options?: AxiosRequestConfig) => Promise<Entity<string>>;
|
|
1470
1471
|
getEntitiesSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1471
1472
|
getEntityStructure: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1472
1473
|
getLog: (id: string, options?: AxiosRequestConfig) => Promise<Log<string>>;
|
|
1473
|
-
listLogs: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1474
|
+
listLogs: <P = Log<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1474
1475
|
updateLog: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Log<string>>;
|
|
1475
1476
|
createLog: (data: any, options?: AxiosRequestConfig) => Promise<Log<string>>;
|
|
1476
1477
|
removeLog: (id: string, options?: AxiosRequestConfig) => Promise<Log<string>>;
|
|
1477
1478
|
getReading: (id: string, options?: AxiosRequestConfig) => Promise<Reading<string, Date>>;
|
|
1478
|
-
listReadings: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1479
|
+
listReadings: <P = Reading<string, Date>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1479
1480
|
updateReading: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Reading<string, Date>>;
|
|
1480
1481
|
createReading: (data: any, options?: AxiosRequestConfig) => Promise<Reading<string, Date>>;
|
|
1481
1482
|
removeReading: (id: string, options?: AxiosRequestConfig) => Promise<Reading<string, Date>>;
|
|
1482
1483
|
getReadingSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1483
1484
|
getReport: (id: string, options?: AxiosRequestConfig) => Promise<Report<string>>;
|
|
1484
|
-
listReports: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1485
|
+
listReports: <P = Report<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1485
1486
|
updateReport: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Report<string>>;
|
|
1486
1487
|
createReport: (data: any, options?: AxiosRequestConfig) => Promise<Report<string>>;
|
|
1487
1488
|
removeReport: (id: string, options?: AxiosRequestConfig) => Promise<Report<string>>;
|
|
1488
1489
|
sendReport: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1489
1490
|
getReportTemplate: (id: string, options?: AxiosRequestConfig) => Promise<ReportTemplate<string>>;
|
|
1490
|
-
listReportTemplates: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1491
|
+
listReportTemplates: <P = ReportTemplate<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1491
1492
|
updateReportTemplate: (id: string, data: any, options?: AxiosRequestConfig) => Promise<ReportTemplate<string>>;
|
|
1492
1493
|
createReportTemplate: (data: any, options?: AxiosRequestConfig) => Promise<ReportTemplate<string>>;
|
|
1493
1494
|
removeReportTemplate: (id: string, options?: AxiosRequestConfig) => Promise<ReportTemplate<string>>;
|
|
1494
1495
|
getScheduledReport: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1495
|
-
listScheduledReports: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1496
|
+
listScheduledReports: <P = any>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1496
1497
|
updateScheduledReport: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1497
1498
|
createScheduledReport: (data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1498
1499
|
removeScheduledReport: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1499
1500
|
sendScheduledReport: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1500
1501
|
getInvoice: (id: string, options?: AxiosRequestConfig) => Promise<Invoice<string, Date>>;
|
|
1501
|
-
listInvoices: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1502
|
+
listInvoices: <P = Invoice<string, string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1502
1503
|
updateInvoice: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Invoice<string, Date>>;
|
|
1503
1504
|
createInvoice: (data: any, options?: AxiosRequestConfig) => Promise<Invoice<string, Date>>;
|
|
1504
1505
|
removeInvoice: (id: string, options?: AxiosRequestConfig) => Promise<Invoice<string, Date>>;
|
|
1505
1506
|
getInvoiceSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1506
1507
|
downloadInvoice: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1507
1508
|
getInvoiceCapture: (id: string, options?: AxiosRequestConfig) => Promise<InvoiceCapture<string>>;
|
|
1508
|
-
listInvoicesCapture: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1509
|
+
listInvoicesCapture: <P = InvoiceCapture<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1509
1510
|
updateInvoiceCapture: (id: string, data: any, options?: AxiosRequestConfig) => Promise<InvoiceCapture<string>>;
|
|
1510
1511
|
createInvoiceCapture: (data: any, options?: AxiosRequestConfig) => Promise<InvoiceCapture<string>>;
|
|
1511
1512
|
removeInvoiceCapture: (id: string, options?: AxiosRequestConfig) => Promise<InvoiceCapture<string>>;
|
|
1512
1513
|
getInvoiceCaptureSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1513
1514
|
startInvoiceCaptureValidation: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1514
1515
|
getInvoiceValidation: (id: string, options?: AxiosRequestConfig) => Promise<InvoiceValidation<string>>;
|
|
1515
|
-
listInvoicesValidation: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1516
|
+
listInvoicesValidation: <P = InvoiceValidation<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1516
1517
|
updateInvoiceValidation: (id: string, data: any, options?: AxiosRequestConfig) => Promise<InvoiceValidation<string>>;
|
|
1517
1518
|
createInvoiceValidation: (data: any, options?: AxiosRequestConfig) => Promise<InvoiceValidation<string>>;
|
|
1518
1519
|
removeInvoiceValidation: (id: string, options?: AxiosRequestConfig) => Promise<InvoiceValidation<string>>;
|
|
1519
1520
|
getInvoiceValidationSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1520
1521
|
restartInvoiceValidation: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1521
1522
|
getSupplier: (id: string, options?: AxiosRequestConfig) => Promise<Supplier<string>>;
|
|
1522
|
-
listSuppliers: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1523
|
+
listSuppliers: <P = Supplier<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1523
1524
|
getSupplierSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1524
1525
|
updateSupplier: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Supplier<string>>;
|
|
1525
1526
|
getImportTemplate: (id: string, options?: AxiosRequestConfig) => Promise<ImportTemplate<string, Record<string, any>, Record<string, any>, Record<string, any>>>;
|
|
1526
|
-
listDataIngest: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1527
|
+
listDataIngest: <P = DataIngest<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1527
1528
|
updateDataIngest: (id: string, data: any, options?: AxiosRequestConfig) => Promise<DataIngest<string>>;
|
|
1528
1529
|
createDataIngest: (data: any, options?: AxiosRequestConfig) => Promise<DataIngest<string>>;
|
|
1529
|
-
listUsers: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1530
|
+
listUsers: <P = User<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1530
1531
|
getUser: (id: string, options?: AxiosRequestConfig) => Promise<User<string>>;
|
|
1531
1532
|
getUserSelf: (options?: AxiosRequestConfig) => Promise<User<string>>;
|
|
1532
1533
|
socketConnect: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1533
1534
|
socketDisconnect: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1534
|
-
listScraperRuns: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1535
|
+
listScraperRuns: <P = ScraperRun<string>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1535
1536
|
updateScraperRun: (id: string, data: any, options?: AxiosRequestConfig) => Promise<ScraperRun<string>>;
|
|
1537
|
+
createScraperRun: (data: any, options?: AxiosRequestConfig) => Promise<ScraperRun<string>>;
|
|
1538
|
+
createScraperRunLog: (id: string, data: any, options?: AxiosRequestConfig) => Promise<ScraperRun<string>>;
|
|
1536
1539
|
createAutomationRun: (data: Omit<AutomationRun<string, string>, "_id">, options?: AxiosRequestConfig) => Promise<AutomationRun<string, string | Date>>;
|
|
1537
|
-
listAutomationRun: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<
|
|
1540
|
+
listAutomationRun: <P = AutomationRun<string, string | Date>>(options?: AxiosRequestConfig) => Promise<ETNPagedResponse<P>>;
|
|
1538
1541
|
getAutomationRun: (id: string, options?: AxiosRequestConfig) => Promise<AutomationRun<string, string | Date>>;
|
|
1539
1542
|
updateAutomationRun: (id: string, data: any, options?: AxiosRequestConfig) => Promise<AutomationRun<string, string>>;
|
|
1540
1543
|
createAutomationRunLog: (id: string, data: Omit<AutomationRunLog<string>, "date">, options?: AxiosRequestConfig) => Promise<AutomationRun<string, string | Date>>;
|
|
@@ -1762,4 +1765,16 @@ declare namespace index {
|
|
|
1762
1765
|
export { index_Prompt as Prompt, type index_PromptInput as PromptInput, type index_PromptOptions as PromptOptions, type index_PromptResponse as PromptResponse };
|
|
1763
1766
|
}
|
|
1764
1767
|
|
|
1765
|
-
|
|
1768
|
+
type ETNAccount = Account<string> & {
|
|
1769
|
+
scraperSettings: PortalSupplierSchema & Portal & {
|
|
1770
|
+
schedule?: string;
|
|
1771
|
+
};
|
|
1772
|
+
sharedSupplierRef?: boolean;
|
|
1773
|
+
};
|
|
1774
|
+
|
|
1775
|
+
type scrapers_ETNAccount = ETNAccount;
|
|
1776
|
+
declare namespace scrapers {
|
|
1777
|
+
export type { scrapers_ETNAccount as ETNAccount };
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
export { type AccessLevel, type Account, type AccountResult, 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 ETNEvent, type ETNPagedResponse$1 as ETNPagedResponse, type Email, type Entity, 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 Log, 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 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, _default$2 as logger, monitoring, index as openai, reporting, scrapers, _default as slack, units, index$1 as utils };
|
package/dist/index.js
CHANGED
|
@@ -16181,6 +16181,7 @@ __export(index_exports, {
|
|
|
16181
16181
|
monitoring: () => monitoring_exports,
|
|
16182
16182
|
openai: () => openai_exports,
|
|
16183
16183
|
reporting: () => reporting_exports,
|
|
16184
|
+
scrapers: () => scrapers_exports,
|
|
16184
16185
|
slack: () => slack_default,
|
|
16185
16186
|
units: () => units_exports,
|
|
16186
16187
|
utils: () => utils_exports
|
|
@@ -16531,6 +16532,8 @@ var api_default = (auth, instanceOptions = {}) => {
|
|
|
16531
16532
|
// scraper runs
|
|
16532
16533
|
listScraperRuns: factory.list(etainablApi, "scraper-runs"),
|
|
16533
16534
|
updateScraperRun: factory.update(etainablApi, "scraper-runs"),
|
|
16535
|
+
createScraperRun: factory.create(etainablApi, "scraper-runs"),
|
|
16536
|
+
createScraperRunLog: subFactory.create(etainablApi, "scraper-runs", "logs"),
|
|
16534
16537
|
// automation runs
|
|
16535
16538
|
createAutomationRun: factory.create(etainablApi, "automation-runs"),
|
|
16536
16539
|
listAutomationRun: factory.list(etainablApi, "automation-runs"),
|
|
@@ -16930,7 +16933,7 @@ var convertItems = (items, type, defaultUnits, accountFactor) => {
|
|
|
16930
16933
|
return convertedItems;
|
|
16931
16934
|
};
|
|
16932
16935
|
var simpleConvert = (value, fromUnit, toUnit) => {
|
|
16933
|
-
if (
|
|
16936
|
+
if (typeof value !== "number" || isNaN(value)) throw new Error("Value must be a valid number");
|
|
16934
16937
|
if (!fromUnit) throw new Error("From unit is required");
|
|
16935
16938
|
if (!toUnit) throw new Error("To unit is required");
|
|
16936
16939
|
const conversionFactor = _getConversionFactor(fromUnit, toUnit);
|
|
@@ -22326,6 +22329,9 @@ async function deleteMessage(queueUrl, receiptHandle, sqsClient) {
|
|
|
22326
22329
|
console.log("Deleted SQS message", { ReceiptHandle: receiptHandle });
|
|
22327
22330
|
}
|
|
22328
22331
|
|
|
22332
|
+
// src/scrapers.ts
|
|
22333
|
+
var scrapers_exports = {};
|
|
22334
|
+
|
|
22329
22335
|
// src/types/index.ts
|
|
22330
22336
|
var import_mongodb2 = require("mongodb");
|
|
22331
22337
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -22340,6 +22346,7 @@ var import_mongodb2 = require("mongodb");
|
|
|
22340
22346
|
monitoring,
|
|
22341
22347
|
openai,
|
|
22342
22348
|
reporting,
|
|
22349
|
+
scrapers,
|
|
22343
22350
|
slack,
|
|
22344
22351
|
units,
|
|
22345
22352
|
utils
|