@etainabl/nodejs-sdk 1.3.111 → 1.3.113
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-3YGWW265.js +64 -0
- package/dist/esm/chunk-3YGWW265.js.map +1 -0
- package/dist/esm/chunk-BIVFO5LG.js +2476 -0
- package/dist/esm/chunk-BIVFO5LG.js.map +1 -0
- package/dist/esm/chunk-CIKXN3GS.js +64 -0
- package/dist/esm/chunk-CIKXN3GS.js.map +1 -0
- package/dist/esm/chunk-E6O4HVLA.js +121 -0
- package/dist/esm/chunk-E6O4HVLA.js.map +1 -0
- package/dist/esm/chunk-HAEAETXR.js +210 -0
- package/dist/esm/chunk-HAEAETXR.js.map +1 -0
- package/dist/esm/chunk-ITSE4X2J.js +1733 -0
- package/dist/esm/chunk-ITSE4X2J.js.map +1 -0
- package/dist/esm/chunk-OWL7NKW5.js +47 -0
- package/dist/esm/chunk-OWL7NKW5.js.map +1 -0
- package/dist/esm/chunk-R63LRFTI.js +153 -0
- package/dist/esm/chunk-R63LRFTI.js.map +1 -0
- package/dist/esm/chunk-UFTVLHTW.js +114 -0
- package/dist/esm/chunk-UFTVLHTW.js.map +1 -0
- package/dist/esm/chunk-UZGMBQZB.js +13 -0
- package/dist/esm/chunk-UZGMBQZB.js.map +1 -0
- package/dist/esm/chunk-XXAWQ5GA.js +3359 -0
- package/dist/esm/chunk-XXAWQ5GA.js.map +1 -0
- package/dist/esm/dist-es-4ZHJVMJ4.js +21 -0
- package/dist/esm/dist-es-4ZHJVMJ4.js.map +1 -0
- package/dist/esm/dist-es-FD7XXZCE.js +305 -0
- package/dist/esm/dist-es-FD7XXZCE.js.map +1 -0
- package/dist/esm/dist-es-MXGFLXV2.js +379 -0
- package/dist/esm/dist-es-MXGFLXV2.js.map +1 -0
- package/dist/esm/dist-es-QPNGCVTW.js +67 -0
- package/dist/esm/dist-es-QPNGCVTW.js.map +1 -0
- package/dist/esm/dist-es-RHLCSE2G.js +200 -0
- package/dist/esm/dist-es-RHLCSE2G.js.map +1 -0
- package/dist/esm/dist-es-X5IH3XCT.js +88 -0
- package/dist/esm/dist-es-X5IH3XCT.js.map +1 -0
- package/dist/esm/dist-es-XEM2CDDP.js +163 -0
- package/dist/esm/dist-es-XEM2CDDP.js.map +1 -0
- package/dist/esm/index.js +4295 -82
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loadSso-3QBKTJF3.js +655 -0
- package/dist/esm/loadSso-3QBKTJF3.js.map +1 -0
- package/dist/esm/sso-oidc-GZ3LZ3MF.js +827 -0
- package/dist/esm/sso-oidc-GZ3LZ3MF.js.map +1 -0
- package/dist/esm/sts-CIQKG7FB.js +1162 -0
- package/dist/esm/sts-CIQKG7FB.js.map +1 -0
- package/dist/index.d.cts +177 -82
- package/dist/index.d.ts +177 -82
- package/dist/index.js +21936 -1165
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
package/dist/index.d.ts
CHANGED
|
@@ -2,11 +2,12 @@ import * as axios from 'axios';
|
|
|
2
2
|
import { CreateAxiosDefaults, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
3
3
|
import { ObjectId, Db } from 'mongodb';
|
|
4
4
|
export { ObjectId } from 'mongodb';
|
|
5
|
+
import { S3Client } from '@aws-sdk/client-s3';
|
|
6
|
+
import { SQSClient } from '@aws-sdk/client-sqs';
|
|
5
7
|
import winston from 'winston';
|
|
6
8
|
import moment from 'moment';
|
|
7
9
|
import { ZodObject } from 'zod';
|
|
8
10
|
import OpenAI from 'openai';
|
|
9
|
-
import { SQSClient } from '@aws-sdk/client-sqs';
|
|
10
11
|
|
|
11
12
|
declare const wasteCategories: readonly [{
|
|
12
13
|
readonly name: "General Waste";
|
|
@@ -574,10 +575,10 @@ interface Asset<IDType = ObjectId | string> {
|
|
|
574
575
|
gresbId?: string;
|
|
575
576
|
}
|
|
576
577
|
|
|
577
|
-
type AutomationSource = 'ftp' | 'email' | 's3';
|
|
578
|
+
type AutomationSource = 'ftp' | 'email' | 's3' | 'manual';
|
|
578
579
|
type AutomationService = 'accountStatus' | 'autometer' | 'bacnet' | 'beringar' | 'carlogavazzivmuc' | 'carlogavazziuwp' | 'cxgmulticolumn' | 'cxgmultitimecolumn' | 'cxgsinglecolumn' | 'etnsinglecolumn' | 'etnmulticolumn' | 'etnmultitimecolumn' | 'singlecolumn' | 'multicolumn' | 'multitimecolumn' | 'deepki' | '4dmonitoring' | 'crownamr' | 'elogbooks' | 'elveco' | 'elveco2108' | 'gridfetch' | 'imserv' | 'meteruk' | 'mjchurch' | 'msmsolutions' | 'niagaran4' | 'octanise' | 'orsis' | 'schneider' | 'schneideregx' | 'schneidercomx' | 'sentinel' | 'siemens' | 'siemenstem' | 'smartflow' | 'smartvatten' | 'sms' | 'soclean' | 'solarman' | 'solis' | 'sse' | 'stark' | 'synapsys' | 'trendlogs' | 'trio' | 'dataimport';
|
|
579
580
|
type AutomationServiceCategory = 'system' | 'company' | 'account';
|
|
580
|
-
interface Log$
|
|
581
|
+
interface Log$1<IDType = ObjectId | string> {
|
|
581
582
|
_id: IDType;
|
|
582
583
|
message: string;
|
|
583
584
|
timestamp: Date;
|
|
@@ -601,7 +602,7 @@ interface Automation<IDType = ObjectId | string> {
|
|
|
601
602
|
active: boolean;
|
|
602
603
|
status?: 'running' | 'pending';
|
|
603
604
|
lastCollection: LastCollection;
|
|
604
|
-
logs: Log$
|
|
605
|
+
logs: Log$1[];
|
|
605
606
|
data: Record<string, any>;
|
|
606
607
|
sourceData: Record<string, any>;
|
|
607
608
|
frequency?: FrequencyType;
|
|
@@ -611,34 +612,152 @@ interface Automation<IDType = ObjectId | string> {
|
|
|
611
612
|
companyId: IDType;
|
|
612
613
|
}
|
|
613
614
|
|
|
614
|
-
|
|
615
|
-
|
|
615
|
+
type FormattedConsumption = Omit<Consumption<string, string>, '_id'>;
|
|
616
|
+
type FormattedReading = Omit<Reading<string, string>, '_id'>;
|
|
617
|
+
type FormattedInvoice = Omit<Invoice<string, string>, '_id' | 's3Key'>;
|
|
618
|
+
declare const collectionTypes: readonly ["readings", "consumptions", "invoices"];
|
|
619
|
+
declare const errorCodes: readonly ["ACCOUNT_NOT_FOUND", "INVALID_DATE_FORMAT", "INVALID_TIME_FORMAT", "COLUMN_LIMIT_EXCEEDED", "INVALID_TIMESTAMP", "MISSING_DEVICE_ID", "UNSUPPORTED_UTILITY_TYPE", "VALIDATION_ERROR", "METER_READS_ZERO"];
|
|
620
|
+
interface DLQPayload {
|
|
621
|
+
originalMessage: string;
|
|
622
|
+
account?: Account<string>;
|
|
623
|
+
automation: Automation<string>;
|
|
624
|
+
automationRun: AutomationRun<string>;
|
|
625
|
+
error: {
|
|
626
|
+
message: string;
|
|
627
|
+
stack?: string;
|
|
628
|
+
timestamp: string;
|
|
629
|
+
};
|
|
630
|
+
context: {
|
|
631
|
+
messageId: string;
|
|
632
|
+
processingStage?: string;
|
|
633
|
+
};
|
|
634
|
+
}
|
|
635
|
+
type CollectionType = 'readings' | 'consumptions' | 'invoices';
|
|
636
|
+
interface UploadCsv {
|
|
637
|
+
csvContent: string;
|
|
638
|
+
s3Client?: S3Client;
|
|
639
|
+
automationRun: AutomationRun<string>;
|
|
640
|
+
collectionType: CollectionType;
|
|
641
|
+
orgFilename?: string;
|
|
642
|
+
}
|
|
643
|
+
declare function sendToDLQ({ payload, sqsClient }: {
|
|
644
|
+
payload: Partial<DLQPayload>;
|
|
645
|
+
sqsClient?: SQSClient;
|
|
646
|
+
}): Promise<void>;
|
|
647
|
+
declare function createCsv(data: (FormattedConsumption | FormattedReading | FormattedInvoice)[]): string;
|
|
648
|
+
declare function uploadCsv({ csvContent, automationRun, s3Client, orgFilename, collectionType }: UploadCsv): Promise<string>;
|
|
649
|
+
|
|
650
|
+
type integrations_CollectionType = CollectionType;
|
|
651
|
+
type integrations_DLQPayload = DLQPayload;
|
|
652
|
+
type integrations_FormattedConsumption = FormattedConsumption;
|
|
653
|
+
type integrations_FormattedInvoice = FormattedInvoice;
|
|
654
|
+
type integrations_FormattedReading = FormattedReading;
|
|
655
|
+
declare const integrations_collectionTypes: typeof collectionTypes;
|
|
656
|
+
declare const integrations_createCsv: typeof createCsv;
|
|
657
|
+
declare const integrations_errorCodes: typeof errorCodes;
|
|
658
|
+
declare const integrations_sendToDLQ: typeof sendToDLQ;
|
|
659
|
+
declare const integrations_uploadCsv: typeof uploadCsv;
|
|
660
|
+
declare namespace integrations {
|
|
661
|
+
export { type integrations_CollectionType as CollectionType, type integrations_DLQPayload as DLQPayload, type integrations_FormattedConsumption as FormattedConsumption, type integrations_FormattedInvoice as FormattedInvoice, type integrations_FormattedReading as FormattedReading, integrations_collectionTypes as collectionTypes, integrations_createCsv as createCsv, integrations_errorCodes as errorCodes, integrations_sendToDLQ as sendToDLQ, integrations_uploadCsv as uploadCsv };
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
interface AutomationRunLog<DateType = Date | string> {
|
|
665
|
+
date: DateType;
|
|
616
666
|
message: string;
|
|
617
|
-
status:
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
667
|
+
status: 'error' | 'running' | 'success';
|
|
668
|
+
errorMessage?: string;
|
|
669
|
+
lambdaSource?: string;
|
|
670
|
+
lambdaRequestId?: string;
|
|
671
|
+
lambdaLogStreamName?: string;
|
|
672
|
+
lambdaMessageId?: string;
|
|
673
|
+
}
|
|
674
|
+
interface AccountResult<IDType = ObjectId | string, DateType = Date | string> {
|
|
675
|
+
accountId: IDType;
|
|
676
|
+
mpan: string;
|
|
677
|
+
deviceId?: string;
|
|
678
|
+
status: 'success' | 'warning' | 'error' | 'running';
|
|
679
|
+
processedRows?: number;
|
|
680
|
+
failedRows?: number;
|
|
681
|
+
dateRange?: {
|
|
682
|
+
from?: DateType;
|
|
683
|
+
to?: DateType;
|
|
622
684
|
};
|
|
685
|
+
dataIngested?: number;
|
|
686
|
+
warnings?: {
|
|
687
|
+
code: ProblemCodes;
|
|
688
|
+
message: string;
|
|
689
|
+
row?: number;
|
|
690
|
+
field?: string;
|
|
691
|
+
value?: any;
|
|
692
|
+
expectedFormat?: string;
|
|
693
|
+
}[];
|
|
694
|
+
errors?: {
|
|
695
|
+
code: ProblemCodes;
|
|
696
|
+
message: string;
|
|
697
|
+
row?: number;
|
|
698
|
+
field?: string;
|
|
699
|
+
value?: any;
|
|
700
|
+
expectedFormat?: string;
|
|
701
|
+
}[];
|
|
702
|
+
}
|
|
703
|
+
type ProblemCodes = 'ACCOUNT_NOT_FOUND' | 'INVALID_DATE_FORMAT' | 'INVALID_TIME_FORMAT' | 'COLUMN_LIMIT_EXCEEDED' | 'INVALID_TIMESTAMP' | 'MISSING_DEVICE_ID' | 'UNSUPPORTED_UTILITY_TYPE' | 'VALIDATION_ERROR' | 'METER_READS_ZERO';
|
|
704
|
+
type ProblemDetails = {
|
|
705
|
+
deviceId?: string;
|
|
706
|
+
row?: number;
|
|
707
|
+
column?: string;
|
|
708
|
+
field?: string;
|
|
709
|
+
value?: any;
|
|
710
|
+
expectedFormat?: string;
|
|
711
|
+
};
|
|
712
|
+
interface Problem {
|
|
713
|
+
code: ProblemCodes;
|
|
714
|
+
status?: 'warning' | 'error';
|
|
715
|
+
message: string;
|
|
716
|
+
details?: ProblemDetails;
|
|
623
717
|
}
|
|
624
|
-
interface
|
|
718
|
+
interface SourceMetadata {
|
|
719
|
+
fileName: string;
|
|
720
|
+
fileSize: number;
|
|
721
|
+
fileType: string;
|
|
722
|
+
uploadMethod: 'manual' | 'email' | 'ftp' | 's3';
|
|
723
|
+
s3Bucket?: string;
|
|
724
|
+
s3Key?: string;
|
|
725
|
+
}
|
|
726
|
+
interface AutomationRunSummary {
|
|
727
|
+
totalRows?: number;
|
|
728
|
+
processedRows?: number;
|
|
729
|
+
failedRows?: number;
|
|
730
|
+
accountsNotFound?: number;
|
|
731
|
+
accountsFound?: number;
|
|
732
|
+
accountsWithWarnings?: number;
|
|
733
|
+
accountsWithErrors?: number;
|
|
734
|
+
}
|
|
735
|
+
interface AutomationRun<IDType = ObjectId | string, DateType = Date | string> {
|
|
625
736
|
_id: IDType;
|
|
626
|
-
logs: Log$1[];
|
|
627
|
-
companyId: IDType;
|
|
628
737
|
automationId: IDType;
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
738
|
+
companyId: IDType;
|
|
739
|
+
active: boolean;
|
|
740
|
+
category: 'dataFetcher' | 'dataExtractor';
|
|
741
|
+
status: 'running' | 'success' | 'failed' | 'completedWithWarnings';
|
|
742
|
+
collectionType?: CollectionType;
|
|
743
|
+
source?: SourceMetadata;
|
|
744
|
+
summary?: AutomationRunSummary;
|
|
745
|
+
accountResults?: AccountResult<IDType, DateType>[];
|
|
746
|
+
logs?: AutomationRunLog<DateType>[];
|
|
747
|
+
problems?: Problem[];
|
|
748
|
+
ingestFile?: {
|
|
749
|
+
s3Bucket: string;
|
|
750
|
+
s3Key: string;
|
|
751
|
+
fileName: string;
|
|
633
752
|
};
|
|
634
753
|
}
|
|
635
754
|
|
|
636
|
-
interface Consumption<IDType = ObjectId | string> {
|
|
755
|
+
interface Consumption<IDType = ObjectId | string, DateType = Date> {
|
|
637
756
|
_id: IDType;
|
|
638
757
|
value: number;
|
|
639
|
-
startTimestamp:
|
|
640
|
-
endTimestamp:
|
|
641
|
-
timestamp?:
|
|
758
|
+
startTimestamp: DateType;
|
|
759
|
+
endTimestamp: DateType;
|
|
760
|
+
timestamp?: DateType;
|
|
642
761
|
s3Key?: string;
|
|
643
762
|
source?: string;
|
|
644
763
|
category?: string;
|
|
@@ -659,6 +778,8 @@ interface Consumption<IDType = ObjectId | string> {
|
|
|
659
778
|
companyId: IDType;
|
|
660
779
|
metadata?: Record<string, any>;
|
|
661
780
|
batchCorrectionId?: string;
|
|
781
|
+
createdAt?: DateType;
|
|
782
|
+
updatedAt?: DateType;
|
|
662
783
|
}
|
|
663
784
|
|
|
664
785
|
interface InvoiceValidationInvoice {
|
|
@@ -855,7 +976,7 @@ interface ImportTemplate<IDType = ObjectId | string, SpreadConfig = Record<strin
|
|
|
855
976
|
companyId?: IDType;
|
|
856
977
|
}
|
|
857
978
|
|
|
858
|
-
interface InvoiceValues {
|
|
979
|
+
interface InvoiceValues<DateType = Date | string> {
|
|
859
980
|
friendlyInvoiceNumber?: string;
|
|
860
981
|
friendlySupplierRef?: string;
|
|
861
982
|
friendlyStartDate?: string;
|
|
@@ -887,9 +1008,9 @@ interface InvoiceValues {
|
|
|
887
1008
|
friendlyEndRead?: string;
|
|
888
1009
|
invoiceNumber?: string;
|
|
889
1010
|
supplierRef?: string;
|
|
890
|
-
startDate?:
|
|
891
|
-
endDate?:
|
|
892
|
-
invoiceDate?:
|
|
1011
|
+
startDate?: DateType;
|
|
1012
|
+
endDate?: DateType;
|
|
1013
|
+
invoiceDate?: DateType;
|
|
893
1014
|
meterPointNumber?: string;
|
|
894
1015
|
meterPointNumber2?: string;
|
|
895
1016
|
meterSerialNumber?: string;
|
|
@@ -936,11 +1057,11 @@ interface InvoiceRate {
|
|
|
936
1057
|
type InvoiceStatus = 'processing' | 'pending' | 'uploading' | 'queued' | 'captured' | 'error' | 'completed';
|
|
937
1058
|
type FinancialStatus = 'approved' | 'new' | 'not-approved' | 'paid' | 'sent-for-payment';
|
|
938
1059
|
type InvoiceRateType = 'unitRate' | 'daily' | 'levy' | 'tax' | 'kva' | 'waterRate' | 'wasteRate' | 'discount';
|
|
939
|
-
interface Invoice<IDType = ObjectId | string> {
|
|
1060
|
+
interface Invoice<IDType = ObjectId | string, DateType = Date> {
|
|
940
1061
|
_id: IDType;
|
|
941
1062
|
jobId?: string | null;
|
|
942
|
-
startTime?:
|
|
943
|
-
endTime?:
|
|
1063
|
+
startTime?: DateType;
|
|
1064
|
+
endTime?: DateType | null;
|
|
944
1065
|
s3Key: string;
|
|
945
1066
|
s3TextractKey?: string | null;
|
|
946
1067
|
stampedS3Key?: string | null;
|
|
@@ -952,7 +1073,7 @@ interface Invoice<IDType = ObjectId | string> {
|
|
|
952
1073
|
type?: string | null;
|
|
953
1074
|
tags?: string[];
|
|
954
1075
|
manualResults?: Record<string, any>;
|
|
955
|
-
values?: InvoiceValues
|
|
1076
|
+
values?: InvoiceValues<DateType>;
|
|
956
1077
|
rates?: InvoiceRate[];
|
|
957
1078
|
detailedResults?: Record<string, any>;
|
|
958
1079
|
templateVersion?: string | null;
|
|
@@ -967,7 +1088,7 @@ interface Invoice<IDType = ObjectId | string> {
|
|
|
967
1088
|
assignedTo?: string;
|
|
968
1089
|
noScrape?: boolean;
|
|
969
1090
|
scraperInvoiceId?: string;
|
|
970
|
-
confirmedAt?:
|
|
1091
|
+
confirmedAt?: DateType | null;
|
|
971
1092
|
confirmedBy?: string | null;
|
|
972
1093
|
supplierId: IDType;
|
|
973
1094
|
sisterId?: IDType;
|
|
@@ -982,8 +1103,9 @@ interface Invoice<IDType = ObjectId | string> {
|
|
|
982
1103
|
validation?: any[];
|
|
983
1104
|
automationId?: IDType;
|
|
984
1105
|
ingestS3Key?: string;
|
|
985
|
-
updatedAt?:
|
|
986
|
-
createdAt?:
|
|
1106
|
+
updatedAt?: DateType;
|
|
1107
|
+
createdAt?: DateType;
|
|
1108
|
+
automationRunId?: IDType;
|
|
987
1109
|
}
|
|
988
1110
|
|
|
989
1111
|
interface InvoiceCaptureMetadataResult {
|
|
@@ -1052,9 +1174,9 @@ interface Log<IDType = ObjectId | string> {
|
|
|
1052
1174
|
companyId?: IDType;
|
|
1053
1175
|
}
|
|
1054
1176
|
|
|
1055
|
-
interface Reading<IDType = ObjectId | string> {
|
|
1177
|
+
interface Reading<IDType = ObjectId | string, DateType = Date> {
|
|
1056
1178
|
_id: IDType;
|
|
1057
|
-
submittedAt:
|
|
1179
|
+
submittedAt: DateType;
|
|
1058
1180
|
value: number;
|
|
1059
1181
|
units: ETNUnit;
|
|
1060
1182
|
type?: string;
|
|
@@ -1079,6 +1201,8 @@ interface Reading<IDType = ObjectId | string> {
|
|
|
1079
1201
|
batchCorrectionId?: string;
|
|
1080
1202
|
metadata?: Record<string, any>;
|
|
1081
1203
|
automationId?: IDType;
|
|
1204
|
+
createdAt?: DateType;
|
|
1205
|
+
updatedAt?: DateType;
|
|
1082
1206
|
}
|
|
1083
1207
|
|
|
1084
1208
|
type ReportSource = 'assetGroup' | 'asset' | 'account' | 'accountsByRegister';
|
|
@@ -1266,6 +1390,7 @@ declare const _default$4: (auth: AuthOptions, instanceOptions?: CreateAxiosDefau
|
|
|
1266
1390
|
createAutomationLog: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1267
1391
|
updateAutomationLog: (id: string, subId: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1268
1392
|
removeAutomationLog: (id: string, subId: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1393
|
+
updateAccountStatusForAutomation: (id: string, subId: string, data: any, options?: AxiosRequestConfig) => Promise<Automation<string>>;
|
|
1269
1394
|
getCompany: (id: string, options?: AxiosRequestConfig) => Promise<Company<string>>;
|
|
1270
1395
|
getCompanyInvoiceValidationRules: (id: string, options?: AxiosRequestConfig) => Promise<CompanyInvoiceValidationRule<string>[]>;
|
|
1271
1396
|
listCompanies: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<Company<string>>>;
|
|
@@ -1298,11 +1423,11 @@ declare const _default$4: (auth: AuthOptions, instanceOptions?: CreateAxiosDefau
|
|
|
1298
1423
|
updateLog: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Log<string>>;
|
|
1299
1424
|
createLog: (data: any, options?: AxiosRequestConfig) => Promise<Log<string>>;
|
|
1300
1425
|
removeLog: (id: string, options?: AxiosRequestConfig) => Promise<Log<string>>;
|
|
1301
|
-
getReading: (id: string, options?: AxiosRequestConfig) => Promise<Reading<string>>;
|
|
1302
|
-
listReadings: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<Reading<string>>>;
|
|
1303
|
-
updateReading: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Reading<string>>;
|
|
1304
|
-
createReading: (data: any, options?: AxiosRequestConfig) => Promise<Reading<string>>;
|
|
1305
|
-
removeReading: (id: string, options?: AxiosRequestConfig) => Promise<Reading<string>>;
|
|
1426
|
+
getReading: (id: string, options?: AxiosRequestConfig) => Promise<Reading<string, Date>>;
|
|
1427
|
+
listReadings: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<Reading<string, Date>>>;
|
|
1428
|
+
updateReading: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Reading<string, Date>>;
|
|
1429
|
+
createReading: (data: any, options?: AxiosRequestConfig) => Promise<Reading<string, Date>>;
|
|
1430
|
+
removeReading: (id: string, options?: AxiosRequestConfig) => Promise<Reading<string, Date>>;
|
|
1306
1431
|
getReadingSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1307
1432
|
getReport: (id: string, options?: AxiosRequestConfig) => Promise<Report<string>>;
|
|
1308
1433
|
listReports: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<Report<string>>>;
|
|
@@ -1321,11 +1446,11 @@ declare const _default$4: (auth: AuthOptions, instanceOptions?: CreateAxiosDefau
|
|
|
1321
1446
|
createScheduledReport: (data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1322
1447
|
removeScheduledReport: (id: string, options?: AxiosRequestConfig) => Promise<any>;
|
|
1323
1448
|
sendScheduledReport: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1324
|
-
getInvoice: (id: string, options?: AxiosRequestConfig) => Promise<Invoice<string>>;
|
|
1325
|
-
listInvoices: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<Invoice<string>>>;
|
|
1326
|
-
updateInvoice: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Invoice<string>>;
|
|
1327
|
-
createInvoice: (data: any, options?: AxiosRequestConfig) => Promise<Invoice<string>>;
|
|
1328
|
-
removeInvoice: (id: string, options?: AxiosRequestConfig) => Promise<Invoice<string>>;
|
|
1449
|
+
getInvoice: (id: string, options?: AxiosRequestConfig) => Promise<Invoice<string, Date>>;
|
|
1450
|
+
listInvoices: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<Invoice<string, Date>>>;
|
|
1451
|
+
updateInvoice: (id: string, data: any, options?: AxiosRequestConfig) => Promise<Invoice<string, Date>>;
|
|
1452
|
+
createInvoice: (data: any, options?: AxiosRequestConfig) => Promise<Invoice<string, Date>>;
|
|
1453
|
+
removeInvoice: (id: string, options?: AxiosRequestConfig) => Promise<Invoice<string, Date>>;
|
|
1329
1454
|
getInvoiceSchema: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1330
1455
|
downloadInvoice: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1331
1456
|
getInvoiceCapture: (id: string, options?: AxiosRequestConfig) => Promise<InvoiceCapture<string>>;
|
|
@@ -1357,10 +1482,12 @@ declare const _default$4: (auth: AuthOptions, instanceOptions?: CreateAxiosDefau
|
|
|
1357
1482
|
socketDisconnect: (id: string, data: any, options?: AxiosRequestConfig) => Promise<any>;
|
|
1358
1483
|
listScraperRuns: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<ScraperRun<string>>>;
|
|
1359
1484
|
updateScraperRun: (id: string, data: any, options?: AxiosRequestConfig) => Promise<ScraperRun<string>>;
|
|
1360
|
-
createAutomationRun: (data:
|
|
1361
|
-
listAutomationRun: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<AutomationRun<string>>>;
|
|
1362
|
-
|
|
1363
|
-
|
|
1485
|
+
createAutomationRun: (data: Omit<AutomationRun<string, string>, "_id">, options?: AxiosRequestConfig) => Promise<AutomationRun<string, string | Date>>;
|
|
1486
|
+
listAutomationRun: (options?: AxiosRequestConfig) => Promise<ETNPagedResponse<AutomationRun<string, string | Date>>>;
|
|
1487
|
+
getAutomationRun: (id: string, options?: AxiosRequestConfig) => Promise<AutomationRun<string, string | Date>>;
|
|
1488
|
+
updateAutomationRun: (id: string, data: any, options?: AxiosRequestConfig) => Promise<AutomationRun<string, string>>;
|
|
1489
|
+
createAutomationRunLog: (id: string, data: Omit<AutomationRunLog<string>, "date">, options?: AxiosRequestConfig) => Promise<AutomationRun<string, string | Date>>;
|
|
1490
|
+
searchAutomationRun: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1364
1491
|
globalSearch: (options?: AxiosRequestConfig) => Promise<any>;
|
|
1365
1492
|
};
|
|
1366
1493
|
|
|
@@ -1529,36 +1656,4 @@ declare namespace index {
|
|
|
1529
1656
|
export { index_Prompt as Prompt, type index_PromptInput as PromptInput, type index_PromptOptions as PromptOptions, type index_PromptResponse as PromptResponse };
|
|
1530
1657
|
}
|
|
1531
1658
|
|
|
1532
|
-
|
|
1533
|
-
originalMessage: string;
|
|
1534
|
-
account: Account<string>;
|
|
1535
|
-
automation: Automation<string> | null;
|
|
1536
|
-
automationRun: any | null;
|
|
1537
|
-
error: {
|
|
1538
|
-
message: string;
|
|
1539
|
-
stack?: string;
|
|
1540
|
-
timestamp: string;
|
|
1541
|
-
};
|
|
1542
|
-
context: {
|
|
1543
|
-
messageId: string;
|
|
1544
|
-
processingStage: string;
|
|
1545
|
-
};
|
|
1546
|
-
metadata: {
|
|
1547
|
-
service: string;
|
|
1548
|
-
accountName?: string;
|
|
1549
|
-
meterPointNumber?: string;
|
|
1550
|
-
companyId?: string;
|
|
1551
|
-
};
|
|
1552
|
-
}
|
|
1553
|
-
declare function sendToDLQ({ QueueUrl, payload, dlqClient }: {
|
|
1554
|
-
QueueUrl: string;
|
|
1555
|
-
payload: Partial<DLQPayload>;
|
|
1556
|
-
dlqClient: SQSClient;
|
|
1557
|
-
}): Promise<void>;
|
|
1558
|
-
|
|
1559
|
-
declare const integrations_sendToDLQ: typeof sendToDLQ;
|
|
1560
|
-
declare namespace integrations {
|
|
1561
|
-
export { integrations_sendToDLQ as sendToDLQ };
|
|
1562
|
-
}
|
|
1563
|
-
|
|
1564
|
-
export { type AccessLevel, type Account, type Asset, type Automation, type AutomationRun, 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 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, _default as slack, units, index$1 as utils };
|
|
1659
|
+
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 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, _default as slack, units, index$1 as utils };
|