@etainabl/nodejs-sdk 1.3.129 → 1.3.131
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-XSPB2DRU.js → chunk-6ZE6VFBF.js} +52 -1
- package/dist/esm/{chunk-XSPB2DRU.js.map → chunk-6ZE6VFBF.js.map} +1 -1
- package/dist/esm/{chunk-VSMDPKQT.js → chunk-AFIWRSL2.js} +2 -2
- package/dist/esm/{chunk-EAEPE6LV.js → chunk-GEJJRBZZ.js} +3 -3
- package/dist/esm/{chunk-DDCT4ZYV.js → chunk-JFJBZL6W.js} +2 -2
- package/dist/esm/{chunk-YUPOEH3S.js → chunk-UGK43V2L.js} +2 -2
- package/dist/esm/{dist-es-LEN5TBON.js → dist-es-AV5FKRC6.js} +2 -2
- package/dist/esm/{dist-es-MTQJIBCO.js → dist-es-HQRLUYWI.js} +2 -2
- package/dist/esm/{dist-es-4PZVI2OP.js → dist-es-N5B4V37N.js} +5 -5
- package/dist/esm/{dist-es-43LBWNIP.js → dist-es-T2FMHNMU.js} +4 -4
- package/dist/esm/index.js +689 -203
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/{loadSso-TNKRSJIY.js → loadSso-KRYOAJJX.js} +5 -5
- package/dist/esm/{sso-oidc-LXV5UW7C.js → sso-oidc-RASI2Q3K.js} +5 -5
- package/dist/esm/{sts-7CU5WIQI.js → sts-IERANB7E.js} +4 -4
- package/dist/index.d.cts +46 -9
- package/dist/index.d.ts +46 -9
- package/dist/index.js +747 -212
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- /package/dist/esm/{chunk-VSMDPKQT.js.map → chunk-AFIWRSL2.js.map} +0 -0
- /package/dist/esm/{chunk-EAEPE6LV.js.map → chunk-GEJJRBZZ.js.map} +0 -0
- /package/dist/esm/{chunk-DDCT4ZYV.js.map → chunk-JFJBZL6W.js.map} +0 -0
- /package/dist/esm/{chunk-YUPOEH3S.js.map → chunk-UGK43V2L.js.map} +0 -0
- /package/dist/esm/{dist-es-LEN5TBON.js.map → dist-es-AV5FKRC6.js.map} +0 -0
- /package/dist/esm/{dist-es-MTQJIBCO.js.map → dist-es-HQRLUYWI.js.map} +0 -0
- /package/dist/esm/{dist-es-4PZVI2OP.js.map → dist-es-N5B4V37N.js.map} +0 -0
- /package/dist/esm/{dist-es-43LBWNIP.js.map → dist-es-T2FMHNMU.js.map} +0 -0
- /package/dist/esm/{loadSso-TNKRSJIY.js.map → loadSso-KRYOAJJX.js.map} +0 -0
- /package/dist/esm/{sso-oidc-LXV5UW7C.js.map → sso-oidc-RASI2Q3K.js.map} +0 -0
- /package/dist/esm/{sts-7CU5WIQI.js.map → sts-IERANB7E.js.map} +0 -0
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
loadRestJsonErrorCode,
|
|
3
3
|
parseJsonBody,
|
|
4
4
|
parseJsonErrorBody
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-AFIWRSL2.js";
|
|
6
6
|
import {
|
|
7
7
|
requestBuilder
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UGK43V2L.js";
|
|
9
9
|
import {
|
|
10
10
|
NoAuthSigner
|
|
11
11
|
} from "./chunk-UQAJZJ7E.js";
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
resolveRegionConfig,
|
|
51
51
|
resolveRetryConfig,
|
|
52
52
|
resolveUserAgentConfig
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-JFJBZL6W.js";
|
|
54
54
|
import {
|
|
55
55
|
loadConfig,
|
|
56
56
|
parseUrl
|
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
toBase64,
|
|
83
83
|
toUtf8,
|
|
84
84
|
withBaseException
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-6ZE6VFBF.js";
|
|
86
86
|
import "./chunk-HAEAETXR.js";
|
|
87
87
|
import "./chunk-UZGMBQZB.js";
|
|
88
88
|
import "./chunk-3YGWW265.js";
|
|
@@ -656,4 +656,4 @@ export {
|
|
|
656
656
|
GetRoleCredentialsCommand,
|
|
657
657
|
SSOClient
|
|
658
658
|
};
|
|
659
|
-
//# sourceMappingURL=loadSso-
|
|
659
|
+
//# sourceMappingURL=loadSso-KRYOAJJX.js.map
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
loadRestJsonErrorCode,
|
|
3
3
|
parseJsonBody,
|
|
4
4
|
parseJsonErrorBody
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-AFIWRSL2.js";
|
|
6
6
|
import {
|
|
7
7
|
requestBuilder
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UGK43V2L.js";
|
|
9
9
|
import {
|
|
10
10
|
package_default
|
|
11
11
|
} from "./chunk-V42NON4H.js";
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
resolveRegionConfig,
|
|
54
54
|
resolveRetryConfig,
|
|
55
55
|
resolveUserAgentConfig
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-JFJBZL6W.js";
|
|
57
57
|
import {
|
|
58
58
|
loadConfig,
|
|
59
59
|
parseUrl
|
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
toBase64,
|
|
87
87
|
toUtf8,
|
|
88
88
|
withBaseException
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-6ZE6VFBF.js";
|
|
90
90
|
import "./chunk-HAEAETXR.js";
|
|
91
91
|
import "./chunk-UZGMBQZB.js";
|
|
92
92
|
import "./chunk-3YGWW265.js";
|
|
@@ -828,4 +828,4 @@ export {
|
|
|
828
828
|
UnsupportedGrantTypeException,
|
|
829
829
|
Client as __Client
|
|
830
830
|
};
|
|
831
|
-
//# sourceMappingURL=sso-oidc-
|
|
831
|
+
//# sourceMappingURL=sso-oidc-RASI2Q3K.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseXmlBody,
|
|
3
3
|
parseXmlErrorBody
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GEJJRBZZ.js";
|
|
5
5
|
import {
|
|
6
6
|
package_default
|
|
7
7
|
} from "./chunk-V42NON4H.js";
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
resolveRegionConfig,
|
|
50
50
|
resolveRetryConfig,
|
|
51
51
|
resolveUserAgentConfig
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-JFJBZL6W.js";
|
|
53
53
|
import {
|
|
54
54
|
loadConfig,
|
|
55
55
|
parseUrl
|
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
toBase64,
|
|
82
82
|
toUtf8,
|
|
83
83
|
withBaseException
|
|
84
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-6ZE6VFBF.js";
|
|
85
85
|
import "./chunk-HAEAETXR.js";
|
|
86
86
|
import {
|
|
87
87
|
setCredentialFeature
|
|
@@ -1161,4 +1161,4 @@ export {
|
|
|
1161
1161
|
getDefaultRoleAssumer2 as getDefaultRoleAssumer,
|
|
1162
1162
|
getDefaultRoleAssumerWithWebIdentity2 as getDefaultRoleAssumerWithWebIdentity
|
|
1163
1163
|
};
|
|
1164
|
-
//# sourceMappingURL=sts-
|
|
1164
|
+
//# sourceMappingURL=sts-IERANB7E.js.map
|
package/dist/index.d.cts
CHANGED
|
@@ -4,12 +4,14 @@ import { ObjectId, Db } from 'mongodb';
|
|
|
4
4
|
export { ObjectId } from 'mongodb';
|
|
5
5
|
import * as _aws_sdk_client_ses from '@aws-sdk/client-ses';
|
|
6
6
|
import { S3Client } from '@aws-sdk/client-s3';
|
|
7
|
-
import { Context } from 'aws-lambda';
|
|
7
|
+
import { Context, SQSEvent, SNSEvent, APIGatewayEvent, S3Event } from 'aws-lambda';
|
|
8
8
|
import { SQSClient } from '@aws-sdk/client-sqs';
|
|
9
9
|
import winston from 'winston';
|
|
10
10
|
import moment from 'moment';
|
|
11
11
|
import { ZodObject } from 'zod';
|
|
12
12
|
import OpenAI from 'openai';
|
|
13
|
+
import { ResponseTextConfig } from 'openai/resources/responses/responses';
|
|
14
|
+
import { Reasoning } from 'openai/resources.mjs';
|
|
13
15
|
|
|
14
16
|
declare const wasteCategories: readonly [{
|
|
15
17
|
readonly name: "General Waste";
|
|
@@ -454,7 +456,6 @@ interface Address {
|
|
|
454
456
|
postCode: string;
|
|
455
457
|
province?: string;
|
|
456
458
|
countryCode?: string;
|
|
457
|
-
jurisdictionCode?: string;
|
|
458
459
|
latitude?: string;
|
|
459
460
|
longitude?: string;
|
|
460
461
|
}
|
|
@@ -623,6 +624,7 @@ interface HandleErrorParams {
|
|
|
623
624
|
lambdaSource: string;
|
|
624
625
|
error: Error;
|
|
625
626
|
accountId?: string;
|
|
627
|
+
messageId: string;
|
|
626
628
|
automation: Automation<string>;
|
|
627
629
|
}
|
|
628
630
|
declare const collectionTypes: readonly ["readings", "consumptions", "invoices"];
|
|
@@ -639,7 +641,7 @@ interface UploadCsv {
|
|
|
639
641
|
declare function sendEmail(lambdaSource: string, context: Context, error: Error, destinations: string[]): Promise<_aws_sdk_client_ses.SendEmailCommandOutput>;
|
|
640
642
|
declare function createCsv(data: (FormattedConsumption | FormattedReading | FormattedInvoice)[]): string;
|
|
641
643
|
declare function uploadCsv({ csvContent, automationRun, s3Client, orgFilename, collectionType }: UploadCsv): Promise<string>;
|
|
642
|
-
declare function handleError({ etnApi, automationRun, error, lambdaSource, accountId, automation }: HandleErrorParams): Promise<void>;
|
|
644
|
+
declare function handleError({ etnApi, automationRun, error, lambdaSource, accountId, automation, messageId }: HandleErrorParams): Promise<void>;
|
|
643
645
|
declare function deleteMessage(queueUrl: string, receiptHandle: string, sqsClient?: SQSClient): Promise<void>;
|
|
644
646
|
|
|
645
647
|
type integrations_CollectionType = CollectionType;
|
|
@@ -661,12 +663,12 @@ declare namespace integrations {
|
|
|
661
663
|
interface AutomationRunLog<DateType = Date | string> {
|
|
662
664
|
date: DateType;
|
|
663
665
|
message: string;
|
|
664
|
-
status: 'error' | 'running' | 'success';
|
|
666
|
+
status: 'error' | 'running' | 'success' | 'warning';
|
|
665
667
|
errorMessage?: string;
|
|
666
|
-
lambdaSource
|
|
668
|
+
lambdaSource: string;
|
|
667
669
|
lambdaRequestId?: string;
|
|
668
670
|
lambdaLogStreamName?: string;
|
|
669
|
-
lambdaMessageId
|
|
671
|
+
lambdaMessageId: string;
|
|
670
672
|
}
|
|
671
673
|
interface AccountResult<IDType = ObjectId | string, DateType = Date | string> {
|
|
672
674
|
accountId: IDType;
|
|
@@ -722,7 +724,6 @@ interface SourceMetadata {
|
|
|
722
724
|
}
|
|
723
725
|
interface AutomationRunSummary {
|
|
724
726
|
totalRows?: number;
|
|
725
|
-
processedRows?: number;
|
|
726
727
|
failedRows?: number;
|
|
727
728
|
accountsNotFound?: number;
|
|
728
729
|
accountsFound?: number;
|
|
@@ -735,7 +736,7 @@ interface AutomationRun<IDType = ObjectId | string, DateType = Date | string> {
|
|
|
735
736
|
companyId: IDType;
|
|
736
737
|
active: boolean;
|
|
737
738
|
category: 'dataFetcher' | 'dataExtractor';
|
|
738
|
-
status: 'running' | 'success' | 'failed' | '
|
|
739
|
+
status: 'running' | 'success' | 'failed' | 'warning';
|
|
739
740
|
collectionType?: CollectionType;
|
|
740
741
|
source?: SourceMetadata;
|
|
741
742
|
summary?: AutomationRunSummary;
|
|
@@ -746,6 +747,8 @@ interface AutomationRun<IDType = ObjectId | string, DateType = Date | string> {
|
|
|
746
747
|
s3Bucket: string;
|
|
747
748
|
s3Key: string;
|
|
748
749
|
fileName: string;
|
|
750
|
+
totalRecords: number;
|
|
751
|
+
fileSize: number;
|
|
749
752
|
};
|
|
750
753
|
chunkProcessing?: {
|
|
751
754
|
totalChunks: number;
|
|
@@ -1594,13 +1597,44 @@ declare const automationServices: {
|
|
|
1594
1597
|
category: AutomationServiceCategory;
|
|
1595
1598
|
}[];
|
|
1596
1599
|
|
|
1600
|
+
interface StepFunctionEvent {
|
|
1601
|
+
params: any;
|
|
1602
|
+
input: {
|
|
1603
|
+
companyId: string;
|
|
1604
|
+
userSub: string;
|
|
1605
|
+
[key: string]: any;
|
|
1606
|
+
};
|
|
1607
|
+
name: string;
|
|
1608
|
+
}
|
|
1609
|
+
declare class IngestHandler {
|
|
1610
|
+
protected event: SQSEvent | SNSEvent | APIGatewayEvent | S3Event;
|
|
1611
|
+
protected log: ReturnType<typeof _default$2>;
|
|
1612
|
+
protected sqsReceiptHandle: string | undefined;
|
|
1613
|
+
constructor(event: any);
|
|
1614
|
+
isSQSEvent(event: any): event is SQSEvent;
|
|
1615
|
+
isSNSEvent(event: any): event is SNSEvent;
|
|
1616
|
+
isAPIGatewayEvent(event: any): event is APIGatewayEvent;
|
|
1617
|
+
isS3Event(event: any): event is S3Event;
|
|
1618
|
+
isStepFunction(event: any): event is StepFunctionEvent;
|
|
1619
|
+
handleEvent(): Promise<ETNEvent>;
|
|
1620
|
+
handleSQSEvent(eventType?: ETNEvent['eventType']): Promise<ETNEvent>;
|
|
1621
|
+
handleSNSEvent(eventType?: ETNEvent['eventType']): Promise<ETNEvent>;
|
|
1622
|
+
handleAPIGatewayEvent(): ETNEvent;
|
|
1623
|
+
handleS3Event(eventType?: ETNEvent['eventType']): Promise<ETNEvent>;
|
|
1624
|
+
handleStepFunctionEvent(eventType?: ETNEvent['eventType']): Promise<ETNEvent>;
|
|
1625
|
+
getS3ObjectMetadata(bucket: string, key: string): Promise<Record<string, string>>;
|
|
1626
|
+
deleteMessage(queueUrl?: string | undefined): Promise<void>;
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
type index$1_IngestHandler = IngestHandler;
|
|
1630
|
+
declare const index$1_IngestHandler: typeof IngestHandler;
|
|
1597
1631
|
declare const index$1_automationServices: typeof automationServices;
|
|
1598
1632
|
declare const index$1_automationSources: typeof automationSources;
|
|
1599
1633
|
declare const index$1_getMeterPointNumberBottomLine: typeof getMeterPointNumberBottomLine;
|
|
1600
1634
|
declare const index$1_utilityTypes: typeof utilityTypes;
|
|
1601
1635
|
declare const index$1_wasteCategories: typeof wasteCategories;
|
|
1602
1636
|
declare namespace index$1 {
|
|
1603
|
-
export { index$1_automationServices as automationServices, index$1_automationSources as automationSources, index$1_getMeterPointNumberBottomLine as getMeterPointNumberBottomLine, units$1 as units, index$1_utilityTypes as utilityTypes, index$1_wasteCategories as wasteCategories };
|
|
1637
|
+
export { index$1_IngestHandler as IngestHandler, index$1_automationServices as automationServices, index$1_automationSources as automationSources, index$1_getMeterPointNumberBottomLine as getMeterPointNumberBottomLine, units$1 as units, index$1_utilityTypes as utilityTypes, index$1_wasteCategories as wasteCategories };
|
|
1604
1638
|
}
|
|
1605
1639
|
|
|
1606
1640
|
interface ETNModel {
|
|
@@ -1690,6 +1724,9 @@ interface PromptOptions {
|
|
|
1690
1724
|
model: ETNModels;
|
|
1691
1725
|
instructions: string;
|
|
1692
1726
|
temperature?: number;
|
|
1727
|
+
cacheKey?: string;
|
|
1728
|
+
reasoning?: Reasoning;
|
|
1729
|
+
verbosity?: ResponseTextConfig['verbosity'];
|
|
1693
1730
|
}
|
|
1694
1731
|
interface PromptInput {
|
|
1695
1732
|
type: 'text' | 'file';
|
package/dist/index.d.ts
CHANGED
|
@@ -4,12 +4,14 @@ import { ObjectId, Db } from 'mongodb';
|
|
|
4
4
|
export { ObjectId } from 'mongodb';
|
|
5
5
|
import * as _aws_sdk_client_ses from '@aws-sdk/client-ses';
|
|
6
6
|
import { S3Client } from '@aws-sdk/client-s3';
|
|
7
|
-
import { Context } from 'aws-lambda';
|
|
7
|
+
import { Context, SQSEvent, SNSEvent, APIGatewayEvent, S3Event } from 'aws-lambda';
|
|
8
8
|
import { SQSClient } from '@aws-sdk/client-sqs';
|
|
9
9
|
import winston from 'winston';
|
|
10
10
|
import moment from 'moment';
|
|
11
11
|
import { ZodObject } from 'zod';
|
|
12
12
|
import OpenAI from 'openai';
|
|
13
|
+
import { ResponseTextConfig } from 'openai/resources/responses/responses';
|
|
14
|
+
import { Reasoning } from 'openai/resources.mjs';
|
|
13
15
|
|
|
14
16
|
declare const wasteCategories: readonly [{
|
|
15
17
|
readonly name: "General Waste";
|
|
@@ -454,7 +456,6 @@ interface Address {
|
|
|
454
456
|
postCode: string;
|
|
455
457
|
province?: string;
|
|
456
458
|
countryCode?: string;
|
|
457
|
-
jurisdictionCode?: string;
|
|
458
459
|
latitude?: string;
|
|
459
460
|
longitude?: string;
|
|
460
461
|
}
|
|
@@ -623,6 +624,7 @@ interface HandleErrorParams {
|
|
|
623
624
|
lambdaSource: string;
|
|
624
625
|
error: Error;
|
|
625
626
|
accountId?: string;
|
|
627
|
+
messageId: string;
|
|
626
628
|
automation: Automation<string>;
|
|
627
629
|
}
|
|
628
630
|
declare const collectionTypes: readonly ["readings", "consumptions", "invoices"];
|
|
@@ -639,7 +641,7 @@ interface UploadCsv {
|
|
|
639
641
|
declare function sendEmail(lambdaSource: string, context: Context, error: Error, destinations: string[]): Promise<_aws_sdk_client_ses.SendEmailCommandOutput>;
|
|
640
642
|
declare function createCsv(data: (FormattedConsumption | FormattedReading | FormattedInvoice)[]): string;
|
|
641
643
|
declare function uploadCsv({ csvContent, automationRun, s3Client, orgFilename, collectionType }: UploadCsv): Promise<string>;
|
|
642
|
-
declare function handleError({ etnApi, automationRun, error, lambdaSource, accountId, automation }: HandleErrorParams): Promise<void>;
|
|
644
|
+
declare function handleError({ etnApi, automationRun, error, lambdaSource, accountId, automation, messageId }: HandleErrorParams): Promise<void>;
|
|
643
645
|
declare function deleteMessage(queueUrl: string, receiptHandle: string, sqsClient?: SQSClient): Promise<void>;
|
|
644
646
|
|
|
645
647
|
type integrations_CollectionType = CollectionType;
|
|
@@ -661,12 +663,12 @@ declare namespace integrations {
|
|
|
661
663
|
interface AutomationRunLog<DateType = Date | string> {
|
|
662
664
|
date: DateType;
|
|
663
665
|
message: string;
|
|
664
|
-
status: 'error' | 'running' | 'success';
|
|
666
|
+
status: 'error' | 'running' | 'success' | 'warning';
|
|
665
667
|
errorMessage?: string;
|
|
666
|
-
lambdaSource
|
|
668
|
+
lambdaSource: string;
|
|
667
669
|
lambdaRequestId?: string;
|
|
668
670
|
lambdaLogStreamName?: string;
|
|
669
|
-
lambdaMessageId
|
|
671
|
+
lambdaMessageId: string;
|
|
670
672
|
}
|
|
671
673
|
interface AccountResult<IDType = ObjectId | string, DateType = Date | string> {
|
|
672
674
|
accountId: IDType;
|
|
@@ -722,7 +724,6 @@ interface SourceMetadata {
|
|
|
722
724
|
}
|
|
723
725
|
interface AutomationRunSummary {
|
|
724
726
|
totalRows?: number;
|
|
725
|
-
processedRows?: number;
|
|
726
727
|
failedRows?: number;
|
|
727
728
|
accountsNotFound?: number;
|
|
728
729
|
accountsFound?: number;
|
|
@@ -735,7 +736,7 @@ interface AutomationRun<IDType = ObjectId | string, DateType = Date | string> {
|
|
|
735
736
|
companyId: IDType;
|
|
736
737
|
active: boolean;
|
|
737
738
|
category: 'dataFetcher' | 'dataExtractor';
|
|
738
|
-
status: 'running' | 'success' | 'failed' | '
|
|
739
|
+
status: 'running' | 'success' | 'failed' | 'warning';
|
|
739
740
|
collectionType?: CollectionType;
|
|
740
741
|
source?: SourceMetadata;
|
|
741
742
|
summary?: AutomationRunSummary;
|
|
@@ -746,6 +747,8 @@ interface AutomationRun<IDType = ObjectId | string, DateType = Date | string> {
|
|
|
746
747
|
s3Bucket: string;
|
|
747
748
|
s3Key: string;
|
|
748
749
|
fileName: string;
|
|
750
|
+
totalRecords: number;
|
|
751
|
+
fileSize: number;
|
|
749
752
|
};
|
|
750
753
|
chunkProcessing?: {
|
|
751
754
|
totalChunks: number;
|
|
@@ -1594,13 +1597,44 @@ declare const automationServices: {
|
|
|
1594
1597
|
category: AutomationServiceCategory;
|
|
1595
1598
|
}[];
|
|
1596
1599
|
|
|
1600
|
+
interface StepFunctionEvent {
|
|
1601
|
+
params: any;
|
|
1602
|
+
input: {
|
|
1603
|
+
companyId: string;
|
|
1604
|
+
userSub: string;
|
|
1605
|
+
[key: string]: any;
|
|
1606
|
+
};
|
|
1607
|
+
name: string;
|
|
1608
|
+
}
|
|
1609
|
+
declare class IngestHandler {
|
|
1610
|
+
protected event: SQSEvent | SNSEvent | APIGatewayEvent | S3Event;
|
|
1611
|
+
protected log: ReturnType<typeof _default$2>;
|
|
1612
|
+
protected sqsReceiptHandle: string | undefined;
|
|
1613
|
+
constructor(event: any);
|
|
1614
|
+
isSQSEvent(event: any): event is SQSEvent;
|
|
1615
|
+
isSNSEvent(event: any): event is SNSEvent;
|
|
1616
|
+
isAPIGatewayEvent(event: any): event is APIGatewayEvent;
|
|
1617
|
+
isS3Event(event: any): event is S3Event;
|
|
1618
|
+
isStepFunction(event: any): event is StepFunctionEvent;
|
|
1619
|
+
handleEvent(): Promise<ETNEvent>;
|
|
1620
|
+
handleSQSEvent(eventType?: ETNEvent['eventType']): Promise<ETNEvent>;
|
|
1621
|
+
handleSNSEvent(eventType?: ETNEvent['eventType']): Promise<ETNEvent>;
|
|
1622
|
+
handleAPIGatewayEvent(): ETNEvent;
|
|
1623
|
+
handleS3Event(eventType?: ETNEvent['eventType']): Promise<ETNEvent>;
|
|
1624
|
+
handleStepFunctionEvent(eventType?: ETNEvent['eventType']): Promise<ETNEvent>;
|
|
1625
|
+
getS3ObjectMetadata(bucket: string, key: string): Promise<Record<string, string>>;
|
|
1626
|
+
deleteMessage(queueUrl?: string | undefined): Promise<void>;
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
type index$1_IngestHandler = IngestHandler;
|
|
1630
|
+
declare const index$1_IngestHandler: typeof IngestHandler;
|
|
1597
1631
|
declare const index$1_automationServices: typeof automationServices;
|
|
1598
1632
|
declare const index$1_automationSources: typeof automationSources;
|
|
1599
1633
|
declare const index$1_getMeterPointNumberBottomLine: typeof getMeterPointNumberBottomLine;
|
|
1600
1634
|
declare const index$1_utilityTypes: typeof utilityTypes;
|
|
1601
1635
|
declare const index$1_wasteCategories: typeof wasteCategories;
|
|
1602
1636
|
declare namespace index$1 {
|
|
1603
|
-
export { index$1_automationServices as automationServices, index$1_automationSources as automationSources, index$1_getMeterPointNumberBottomLine as getMeterPointNumberBottomLine, units$1 as units, index$1_utilityTypes as utilityTypes, index$1_wasteCategories as wasteCategories };
|
|
1637
|
+
export { index$1_IngestHandler as IngestHandler, index$1_automationServices as automationServices, index$1_automationSources as automationSources, index$1_getMeterPointNumberBottomLine as getMeterPointNumberBottomLine, units$1 as units, index$1_utilityTypes as utilityTypes, index$1_wasteCategories as wasteCategories };
|
|
1604
1638
|
}
|
|
1605
1639
|
|
|
1606
1640
|
interface ETNModel {
|
|
@@ -1690,6 +1724,9 @@ interface PromptOptions {
|
|
|
1690
1724
|
model: ETNModels;
|
|
1691
1725
|
instructions: string;
|
|
1692
1726
|
temperature?: number;
|
|
1727
|
+
cacheKey?: string;
|
|
1728
|
+
reasoning?: Reasoning;
|
|
1729
|
+
verbosity?: ResponseTextConfig['verbosity'];
|
|
1693
1730
|
}
|
|
1694
1731
|
interface PromptInput {
|
|
1695
1732
|
type: 'text' | 'file';
|