@openhi/constructs 0.0.76 → 0.0.78
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/lib/chunk-SWSN6GDD.mjs +133 -0
- package/lib/chunk-SWSN6GDD.mjs.map +1 -0
- package/lib/dynamodb-stream-record-CJtV6a1t.d.mts +19 -0
- package/lib/dynamodb-stream-record-CJtV6a1t.d.ts +19 -0
- package/lib/firehose-archive-transform.handler.d.mts +3 -11
- package/lib/firehose-archive-transform.handler.d.ts +3 -11
- package/lib/firehose-archive-transform.handler.js +220 -2
- package/lib/firehose-archive-transform.handler.js.map +1 -1
- package/lib/firehose-archive-transform.handler.mjs +139 -38
- package/lib/firehose-archive-transform.handler.mjs.map +1 -1
- package/lib/index.d.mts +52 -4
- package/lib/index.d.ts +68 -5
- package/lib/index.js +151 -2
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +28 -2
- package/lib/index.mjs.map +1 -1
- package/package.json +5 -3
package/lib/index.mjs
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DATA_STORE_CHANGE_DETAIL_MAX_UTF8_BYTES,
|
|
3
|
+
DATA_STORE_CHANGE_DETAIL_TYPE,
|
|
4
|
+
DATA_STORE_CHANGE_EVENT_SOURCE,
|
|
5
|
+
buildFhirCurrentResourceChangeDetail
|
|
6
|
+
} from "./chunk-SWSN6GDD.mjs";
|
|
1
7
|
import {
|
|
2
8
|
__commonJS,
|
|
3
9
|
__toESM
|
|
@@ -677,17 +683,32 @@ var DataStoreHistoricalArchive = class extends Construct2 {
|
|
|
677
683
|
autoDeleteObjects: props.removalPolicy === RemovalPolicy2.DESTROY,
|
|
678
684
|
versioned: true
|
|
679
685
|
});
|
|
686
|
+
const putEventsFailureDlqBucket = props.dataEventBus ? new s3.Bucket(this, "PutEventsFailureDlq", {
|
|
687
|
+
blockPublicAccess: s3.BlockPublicAccess.BLOCK_ALL,
|
|
688
|
+
encryption: s3.BucketEncryption.S3_MANAGED,
|
|
689
|
+
enforceSSL: true,
|
|
690
|
+
removalPolicy: props.removalPolicy,
|
|
691
|
+
autoDeleteObjects: props.removalPolicy === RemovalPolicy2.DESTROY,
|
|
692
|
+
versioned: false
|
|
693
|
+
}) : void 0;
|
|
694
|
+
this.putEventsFailureDlqBucket = putEventsFailureDlqBucket;
|
|
680
695
|
this.transformFunction = new NodejsFunction2(this, "FirehoseTransform", {
|
|
681
696
|
entry: resolveHandlerEntry2(__dirname),
|
|
682
697
|
runtime: Runtime2.NODEJS_LATEST,
|
|
683
698
|
memorySize: 512,
|
|
684
699
|
timeout: Duration.minutes(1),
|
|
685
|
-
description: "Firehose transform: filter CURRENT resource rows, S3
|
|
700
|
+
description: "Firehose transform: filter CURRENT resource rows, S3 keys, EventBridge PutEvents",
|
|
701
|
+
environment: props.dataEventBus && putEventsFailureDlqBucket ? {
|
|
702
|
+
DATA_EVENT_BUS_NAME: props.dataEventBus.eventBusName,
|
|
703
|
+
DATA_STORE_PUT_EVENTS_DLQ_BUCKET: putEventsFailureDlqBucket.bucketName
|
|
704
|
+
} : void 0,
|
|
686
705
|
bundling: {
|
|
687
706
|
minify: true,
|
|
688
707
|
sourceMap: false
|
|
689
708
|
}
|
|
690
709
|
});
|
|
710
|
+
props.dataEventBus?.grantPutEventsTo(this.transformFunction);
|
|
711
|
+
putEventsFailureDlqBucket?.grantPut(this.transformFunction);
|
|
691
712
|
const processor = new kinesisfirehose.LambdaFunctionProcessor(
|
|
692
713
|
this.transformFunction,
|
|
693
714
|
{
|
|
@@ -1277,7 +1298,8 @@ var _OpenHiDataService = class _OpenHiDataService extends OpenHiService {
|
|
|
1277
1298
|
{
|
|
1278
1299
|
kinesisStream: this.dataStoreChangeStream,
|
|
1279
1300
|
removalPolicy: this.removalPolicy,
|
|
1280
|
-
stackHash: this.stackHash
|
|
1301
|
+
stackHash: this.stackHash,
|
|
1302
|
+
dataEventBus: this.dataEventBus
|
|
1281
1303
|
}
|
|
1282
1304
|
);
|
|
1283
1305
|
}
|
|
@@ -1655,6 +1677,9 @@ export {
|
|
|
1655
1677
|
CognitoUserPoolClient,
|
|
1656
1678
|
CognitoUserPoolDomain,
|
|
1657
1679
|
CognitoUserPoolKmsKey,
|
|
1680
|
+
DATA_STORE_CHANGE_DETAIL_MAX_UTF8_BYTES,
|
|
1681
|
+
DATA_STORE_CHANGE_DETAIL_TYPE,
|
|
1682
|
+
DATA_STORE_CHANGE_EVENT_SOURCE,
|
|
1658
1683
|
DataEventBus,
|
|
1659
1684
|
DataStoreHistoricalArchive,
|
|
1660
1685
|
DiscoverableStringParameter,
|
|
@@ -1677,6 +1702,7 @@ export {
|
|
|
1677
1702
|
RootWildcardCertificate,
|
|
1678
1703
|
STATIC_HOSTING_SERVICE_TYPE,
|
|
1679
1704
|
StaticHosting,
|
|
1705
|
+
buildFhirCurrentResourceChangeDetail,
|
|
1680
1706
|
getDynamoDbDataStoreTableName
|
|
1681
1707
|
};
|
|
1682
1708
|
//# sourceMappingURL=index.mjs.map
|