├── .bandit ├── typescript └── packages │ ├── connectors │ ├── csv │ │ ├── README.md │ │ └── tsconfig.json │ ├── sif │ │ ├── README.md │ │ └── tsconfig.json │ ├── connector-utils │ │ ├── README.md │ │ ├── tsconfig.json │ │ ├── src │ │ │ └── index.ts │ │ └── CHANGELOG.md │ ├── kinesis │ │ ├── docs │ │ │ ├── kinesis_connector_infra.drawio.png │ │ │ └── kinesis_connector_data_transformation.drawio.png │ │ ├── CHANGELOG.md │ │ ├── tsconfig.json │ │ └── CHANGELOG.json │ ├── clean-rooms │ │ ├── tsconfig.json │ │ ├── CHANGELOG.md │ │ └── src │ │ │ └── clean-rooms │ │ │ └── cleanRooms.model.ts │ └── data-fabric │ │ └── tsconfig.json │ ├── integrationTests │ ├── src │ │ ├── config │ │ │ ├── .env.defaults │ │ │ └── README.md │ │ ├── @types │ │ │ ├── apickli │ │ │ │ └── index.d.ts │ │ │ └── index.d.ts │ │ └── features │ │ │ ├── step_definitions │ │ │ └── apickli-gherkin.ts │ │ │ └── support │ │ │ ├── impacts_hooks.ts │ │ │ ├── pipelines_hooks.ts │ │ │ ├── calculations_hooks.ts │ │ │ └── referenceDatasets_hooks.ts │ ├── samples │ │ ├── sampleData.csv │ │ ├── sampleDataUpdated.csv │ │ ├── sample_utility_bill_company2.csv │ │ └── sample_utility_bill_company1.csv │ ├── tsconfig.json │ └── README.md │ ├── apps │ ├── platform-resource-manager │ │ ├── src │ │ │ ├── common │ │ │ │ └── model.ts │ │ │ ├── actions │ │ │ │ ├── schema.ts │ │ │ │ └── service.ts │ │ │ ├── resources │ │ │ │ └── schema.ts │ │ │ └── lambda_apiGateway.ts │ │ ├── CHANGELOG.md │ │ ├── tsconfig.json │ │ └── CHANGELOG.json │ ├── concurrency-manager │ │ ├── src │ │ │ └── index.ts │ │ ├── README.md │ │ ├── tsconfig.json │ │ └── CHANGELOG.md │ ├── schema-migrator │ │ ├── README.md │ │ ├── Dockerfile │ │ ├── tsconfig.json │ │ └── CHANGELOG.md │ ├── audit-log-depositor │ │ ├── src │ │ │ ├── models.ts │ │ │ └── depositor.ts │ │ ├── README.md │ │ ├── tsconfig.json │ │ └── CHANGELOG.md │ ├── pipelines │ │ ├── test │ │ │ └── shapes.csv │ │ ├── docs │ │ │ └── images │ │ │ │ ├── sif-connector-integration-workflow.png │ │ │ │ ├── pipelines.hla-physical-runtime.drawio.png │ │ │ │ ├── pipelines.hla-physical-deployment.drawio.png │ │ │ │ ├── guidance-for-sustainability-insights-framework-on-aws-pipelines.png │ │ │ │ ├── pipelines.hla-physical-runtime.drawio.png.license │ │ │ │ └── pipelines.hla-physical-deployment.drawio.png.license │ │ ├── tsconfig.json │ │ └── src │ │ │ ├── utils │ │ │ └── pkUtils.utils.ts │ │ │ ├── plugins │ │ │ └── sensible.ts │ │ │ └── lambda_apiGateway.ts │ ├── impacts │ │ ├── docs │ │ │ └── images │ │ │ │ ├── impacts.hla-physical-runtime.png │ │ │ │ ├── impacts.hla-physical-deployment.png │ │ │ │ ├── impacts.hla.drawio.license │ │ │ │ ├── impacts.hla-physical-runtime.png.license │ │ │ │ └── impacts.hla-physical-deployment.png.license │ │ ├── tsconfig.json │ │ └── src │ │ │ ├── tasks │ │ │ └── workflows │ │ │ │ └── workflows.interfaces.ts │ │ │ ├── common │ │ │ └── pkTypes.ts │ │ │ ├── lambda_apiGateway.ts │ │ │ ├── impacts │ │ │ └── validator.ts │ │ │ ├── activities │ │ │ └── validator.ts │ │ │ ├── components │ │ │ └── validator.ts │ │ │ └── server.ts │ ├── calculations │ │ ├── docs │ │ │ └── images │ │ │ │ ├── calculations.hla-physical-runtime.png │ │ │ │ ├── calculations.hla-physical-deployment.png │ │ │ │ ├── calculations.hla.drawio.license │ │ │ │ ├── calculations.hla-physical-runtime.png.license │ │ │ │ └── calculations.hla-physical-deployment.png.license │ │ ├── tsconfig.json │ │ └── src │ │ │ ├── common │ │ │ └── pkTypes.ts │ │ │ ├── plugins │ │ │ └── sensible.ts │ │ │ └── lambda_apiGateway.ts │ ├── access-management │ │ ├── docs │ │ │ └── images │ │ │ │ ├── access-management.hla-physical-runtime.png │ │ │ │ ├── access-management.hla-physical-deployment.png │ │ │ │ ├── guidance-for-sustainability-insights-framework-on-aws-access-management.png │ │ │ │ ├── access-management.hla-physical-runtime.license │ │ │ │ └── access-management.hla-physical-deployment.license │ │ ├── tsconfig.json │ │ └── src │ │ │ ├── common │ │ │ └── pkTypes.ts │ │ │ └── lambda_apiGateway.ts │ ├── pipeline-processors │ │ ├── docs │ │ │ └── images │ │ │ │ ├── pipeline-processors.hla-physical-runtime.png │ │ │ │ ├── pipeline-processors.hla-physical-deployment.png │ │ │ │ ├── pipeline-processors.hla.drawio.license │ │ │ │ ├── pipeline-processors.hla-physical-runtime.png.license │ │ │ │ └── pipeline-processors.hla-physical-deployment.png.license │ │ ├── local-testing │ │ │ └── aws-stepfunctions-local-credentials.txt.template │ │ ├── tsconfig.json │ │ └── src │ │ │ ├── custom.d.ts │ │ │ ├── common │ │ │ └── pkUtils.ts │ │ │ ├── api │ │ │ └── activities │ │ │ │ └── audits │ │ │ │ └── models.ts │ │ │ ├── lambda_apiGateway.ts │ │ │ └── utils │ │ │ └── s3Export.utils.ts │ └── reference-datasets │ │ ├── docs │ │ └── images │ │ │ ├── reference-datasets.hla-physical-runtime.drawio.png │ │ │ ├── reference-datasets.hla-physical-deployment.drawio.png │ │ │ ├── guidance-for-sustainability-insights-framework-on-aws-reference-datasets.png │ │ │ ├── reference-datasets.hla-physical-runtime.drawio.png.license │ │ │ └── reference-datasets.hla-physical-deployment.drawio.png.license │ │ ├── tsconfig.json │ │ └── src │ │ ├── utils │ │ └── pkTypes.utils.ts │ │ └── lambda_apiGateway.ts │ ├── ide │ ├── images │ │ ├── sif-core-folder.png │ │ └── sif-core-folder.png.license │ └── tsconfig.json │ ├── libraries │ ├── authz │ │ ├── README.md │ │ ├── src │ │ │ ├── utils.ts │ │ │ ├── fastify-plugins │ │ │ │ └── utils.spec.ts │ │ │ └── index.ts │ │ ├── tsconfig.json │ │ └── package.json │ ├── cdk-common │ │ ├── src │ │ │ ├── index.ts │ │ │ └── context │ │ │ │ └── util.ts │ │ ├── CHANGELOG.md │ │ ├── tsconfig.json │ │ └── CHANGELOG.json │ ├── proxy │ │ ├── tsconfig.json │ │ └── src │ │ │ └── index.ts │ ├── clients │ │ ├── tsconfig.json │ │ └── src │ │ │ ├── clients │ │ │ └── sdf │ │ │ │ ├── accessManagement.model.ts │ │ │ │ └── discovery.model.ts │ │ │ └── common │ │ │ └── models.ts │ ├── events │ │ ├── tsconfig.json │ │ ├── src │ │ │ └── index.ts │ │ └── CHANGELOG.md │ ├── dynamodb-utils │ │ ├── tsconfig.json │ │ └── src │ │ │ └── index.ts │ ├── deployment-helper │ │ ├── tsconfig.json │ │ └── src │ │ │ └── customResources │ │ │ ├── customResource.model.ts │ │ │ └── customResource.ts │ ├── lambda-invoker │ │ ├── src │ │ │ └── index.ts │ │ ├── tsconfig.json │ │ └── CHANGELOG.md │ ├── resource-api-base │ │ ├── tsconfig.json │ │ └── src │ │ │ ├── common │ │ │ ├── pkTypes.ts │ │ │ └── models.ts │ │ │ ├── groups │ │ │ └── models.ts │ │ │ └── tags │ │ │ └── models.ts │ └── validators │ │ ├── tsconfig.json │ │ ├── src │ │ └── index.ts │ │ └── package.json │ └── tools │ └── migrator │ ├── CHANGELOG.md │ ├── src │ ├── app.ts │ └── utils │ │ └── common.util.ts │ ├── CHANGELOG.json │ └── tsconfig.json ├── common ├── autoinstallers │ ├── database-migration │ │ ├── autoinstaller#70511.lock │ │ └── package.json │ ├── commitzen │ │ └── package.json │ └── rush-prettier │ │ └── package.json ├── config │ └── rush │ │ ├── repo-state.json │ │ └── rush-plugins.json ├── git-hooks │ ├── pre-commit │ └── commit-msg.sample └── scripts │ └── license-checker-monorepo.bash ├── mkdocs-requirements.txt ├── python └── apps │ └── caml │ ├── requirements.txt │ └── naics_codes.pkl ├── .prettierrc.yaml ├── samples └── typescript │ └── connectors │ └── sample-pipeline-input-connector │ ├── .npmignore │ ├── .gitignore │ ├── src │ └── events.ts │ ├── tsconfig.json │ └── package.json ├── docs ├── images │ ├── sif-layers.png │ ├── sif-hla-conceptual.png │ ├── sif-infra-multi-mode.png │ ├── sif-infra-single-mode.png │ ├── sif-infra-multi-shared-mode.png │ ├── sif.drawio.license │ ├── sif-layers.png.license │ ├── sif-hla-conceptual.png.license │ ├── sif-infra-multi-mode.png.license │ ├── sif-infra-single-mode.png.license │ └── sif-infra-multi-shared-mode.png.license └── events.md ├── java └── apps │ ├── calculator │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── aws │ │ │ │ └── sif │ │ │ │ ├── execution │ │ │ │ ├── PipelineType.java │ │ │ │ ├── output │ │ │ │ │ ├── Activity.java │ │ │ │ │ ├── ActivityStringValue.java │ │ │ │ │ ├── OutputWriter.java │ │ │ │ │ ├── OutputType.java │ │ │ │ │ └── exceptions │ │ │ │ │ │ ├── PipelineOutputException.java │ │ │ │ │ │ ├── TimeoutExpiredException.java │ │ │ │ │ │ └── RecordCouldNotBeSentException.java │ │ │ │ ├── OptionalParamKey.java │ │ │ │ ├── ObjectTypeValue.java │ │ │ │ ├── EvaluatedNode.java │ │ │ │ ├── Calculator.java │ │ │ │ ├── NullValue.java │ │ │ │ ├── BooleanTypeValue.java │ │ │ │ ├── StringTypeValue.java │ │ │ │ ├── ErrorValue.java │ │ │ │ └── EvaluateResponse.java │ │ │ │ ├── DataTypeRecord.java │ │ │ │ ├── resources │ │ │ │ ├── caml │ │ │ │ │ ├── CamlNotEnabledException.java │ │ │ │ │ └── ProductMatch.java │ │ │ │ ├── referenceDatasets │ │ │ │ │ ├── DataDownload.java │ │ │ │ │ ├── ReferenceDatasetNotFoundException.java │ │ │ │ │ ├── DatasetsList.java │ │ │ │ │ └── Dataset.java │ │ │ │ ├── calculations │ │ │ │ │ ├── CalculationsList.java │ │ │ │ │ └── CalculationNotFoundException.java │ │ │ │ ├── users │ │ │ │ │ ├── UserNotFoundException.java │ │ │ │ │ └── User.java │ │ │ │ ├── groups │ │ │ │ │ └── GroupNotFoundException.java │ │ │ │ └── impacts │ │ │ │ │ ├── ActivityNotFoundException.java │ │ │ │ │ └── ActivitiesList.java │ │ │ │ ├── ActivityTypeRecord.java │ │ │ │ ├── CalculatorActionType.java │ │ │ │ ├── DataSourceLocation.java │ │ │ │ ├── lambdaInvoker │ │ │ │ └── LambdaResponse.java │ │ │ │ ├── S3Location.java │ │ │ │ ├── TransformParameter.java │ │ │ │ ├── audits │ │ │ │ ├── AuditMessageResult.java │ │ │ │ └── exceptions │ │ │ │ │ ├── TimeoutExpiredException.java │ │ │ │ │ ├── RecordCouldNotBeSentException.java │ │ │ │ │ └── AuditDeliveryStreamException.java │ │ │ │ ├── S3SourceLocation.java │ │ │ │ ├── Transform.java │ │ │ │ ├── di │ │ │ │ └── CalculatorComponent.java │ │ │ │ └── TransformOutput.java │ │ └── test │ │ │ ├── java │ │ │ └── com │ │ │ │ └── aws │ │ │ │ └── sif │ │ │ │ └── DecodedUserTest.java │ │ │ └── resources │ │ │ └── logback.xml │ ├── docs │ │ ├── images │ │ │ ├── calculator.hla-physical-runtime.drawio.png │ │ │ ├── calculator.hla-physical-deployment.drawio.png │ │ │ ├── guidance-for-sustainability-insights-framework-on-aws-calculator.png │ │ │ ├── calculator.hla-physical-deployment.drawio.png.license │ │ │ └── calculator.hla-physical-runtime.drawio.png.license │ │ └── sample requests │ │ │ └── custom calculation.json │ └── CHANGELOG.md │ └── referencedatasets-indexer │ ├── CHANGELOG.md │ ├── src │ └── main │ │ ├── resources │ │ └── application.conf │ │ └── java │ │ └── com │ │ └── aws │ │ └── sif │ │ ├── IndexerService.java │ │ ├── S3Location.java │ │ ├── di │ │ └── IndexerComponent.java │ │ ├── S3SourceLocation.java │ │ ├── IndexResponse.java │ │ └── CustomAnalyzer.java │ └── docs │ └── sample-requests │ └── referenceDataset.json ├── CODEOWNERS ├── .editorconfig ├── CODE_OF_CONDUCT.md ├── .github ├── solutionid_validator.sh └── workflows │ └── maintainer_workflows.yml ├── infrastructure ├── tenant │ ├── src │ │ ├── calculator │ │ │ └── assets │ │ │ │ └── migrations │ │ │ │ ├── 1695756074551_increase-string-value-size.js │ │ │ │ ├── 1688950800000_add_audit_logs.cjs │ │ │ │ ├── 1683684169000_remove-trigger.cjs │ │ │ │ ├── 1683208822000_metricvalue-index.cjs │ │ │ │ ├── 1679531506238_uuid-audit.cjs │ │ │ │ ├── 1684736280000_add_aws_extension.cjs │ │ │ │ └── 1678257642475_add-row-type.cjs │ │ └── shared │ │ │ ├── customResources │ │ │ └── databaseSeeder.customResource.ts │ │ │ └── stack.utils.ts │ └── tsconfig.json └── platform │ ├── tsconfig.json │ └── src │ └── shared │ └── stack.utils.ts ├── mkdocs-README.md ├── .gitattributes ├── .husky └── commit-msg ├── .semgrepignore ├── package.json ├── license.header.txt └── cicd └── increment_version.bash /.bandit: -------------------------------------------------------------------------------- 1 | [bandit] 2 | exclude: ./layer/* 3 | -------------------------------------------------------------------------------- /typescript/packages/connectors/csv/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /typescript/packages/connectors/sif/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /typescript/packages/connectors/connector-utils/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /typescript/packages/integrationTests/src/config/.env.defaults: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /typescript/packages/apps/platform-resource-manager/src/common/model.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /common/autoinstallers/database-migration/autoinstaller#70511.lock: -------------------------------------------------------------------------------- 1 | Mon Jun 5 10:42:37 2023 -------------------------------------------------------------------------------- /mkdocs-requirements.txt: -------------------------------------------------------------------------------- 1 | mkdocs 2 | mkdocs-material 3 | mkdocs-same-dir 4 | mkdocs-exclude 5 | -------------------------------------------------------------------------------- /typescript/packages/apps/concurrency-manager/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lockService.js'; 2 | -------------------------------------------------------------------------------- /python/apps/caml/requirements.txt: -------------------------------------------------------------------------------- 1 | numpy==1.24.2 2 | pandas==1.5.3 3 | sentence-transformers==2.2.2 4 | -------------------------------------------------------------------------------- /typescript/packages/integrationTests/samples/sampleData.csv: -------------------------------------------------------------------------------- 1 | ZIP,STATE 2 | 80014,CO 3 | 80239,CO 4 | 80015,CO 5 | -------------------------------------------------------------------------------- /typescript/packages/integrationTests/samples/sampleDataUpdated.csv: -------------------------------------------------------------------------------- 1 | STATE,ZIP 2 | WA,11111 3 | WA,22222 4 | WA,33333 5 | -------------------------------------------------------------------------------- /typescript/packages/integrationTests/src/config/README.md: -------------------------------------------------------------------------------- 1 | # Config 2 | 3 | See main [README.md](../../README.md) for config details. 4 | -------------------------------------------------------------------------------- /.prettierrc.yaml: -------------------------------------------------------------------------------- 1 | # parse .editorconfig 2 | editorconfig: true 3 | 4 | # apply what cannot be set in .editorconfig 5 | semi: true 6 | singleQuote: true 7 | -------------------------------------------------------------------------------- /samples/typescript/connectors/sample-pipeline-input-connector/.npmignore: -------------------------------------------------------------------------------- 1 | *.ts 2 | !*.d.ts 3 | 4 | # CDK asset staging directory 5 | .cdk.staging 6 | cdk.out 7 | -------------------------------------------------------------------------------- /docs/images/sif-layers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/docs/images/sif-layers.png -------------------------------------------------------------------------------- /python/apps/caml/naics_codes.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/python/apps/caml/naics_codes.pkl -------------------------------------------------------------------------------- /typescript/packages/apps/schema-migrator/README.md: -------------------------------------------------------------------------------- 1 | # Schema Migrator Overview 2 | 3 | ## Introduction 4 | 5 | This component acquire and release lock to ensure only limited of 6 | -------------------------------------------------------------------------------- /docs/images/sif-hla-conceptual.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/docs/images/sif-hla-conceptual.png -------------------------------------------------------------------------------- /docs/images/sif-infra-multi-mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/docs/images/sif-infra-multi-mode.png -------------------------------------------------------------------------------- /common/autoinstallers/commitzen/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "commitzen", 3 | "version": "1.0.0", 4 | "private": true, 5 | "dependencies": { 6 | "cz-customizable": "7.0.0" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /docs/images/sif-infra-single-mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/docs/images/sif-infra-single-mode.png -------------------------------------------------------------------------------- /samples/typescript/connectors/sample-pipeline-input-connector/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | !jest.config.js 3 | *.d.ts 4 | node_modules 5 | 6 | # CDK asset staging directory 7 | .cdk.staging 8 | cdk.out 9 | -------------------------------------------------------------------------------- /docs/images/sif-infra-multi-shared-mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/docs/images/sif-infra-multi-shared-mode.png -------------------------------------------------------------------------------- /typescript/packages/apps/audit-log-depositor/src/models.ts: -------------------------------------------------------------------------------- 1 | interface AuditMessages { 2 | logs: AuditMessage[]; 3 | } 4 | 5 | interface AuditMessage { 6 | key: string; 7 | auditLog: unknown; 8 | } 9 | -------------------------------------------------------------------------------- /typescript/packages/integrationTests/samples/sample_utility_bill_company2.csv: -------------------------------------------------------------------------------- 1 | date,type,therms 2 | 10/1/2021,natural gas,1200.2 3 | 11/1/2021,natural gas,4600.5 4 | 12/1/2021,natural gas,3000 5 | -------------------------------------------------------------------------------- /typescript/packages/apps/pipelines/test/shapes.csv: -------------------------------------------------------------------------------- 1 | shape_no,shape_type,side_1,side_2,radius 2 | 1,square,10,10,0 3 | 2,circle,0,0,5 4 | 3,square,20,15,0 5 | 4,unknown shape,10,10,0 6 | 5,circle,0,0,15 7 | -------------------------------------------------------------------------------- /common/config/rush/repo-state.json: -------------------------------------------------------------------------------- 1 | // DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. 2 | { 3 | "preferredVersionsHash": "5df2d198beaf93765993d1e24164f2acc54b90e6" 4 | } 5 | -------------------------------------------------------------------------------- /typescript/packages/ide/images/sif-core-folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/typescript/packages/ide/images/sif-core-folder.png -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/execution/PipelineType.java: -------------------------------------------------------------------------------- 1 | package com.aws.sif.execution; 2 | 3 | public enum PipelineType { 4 | activities, 5 | data, 6 | impacts, 7 | referenceDatasets 8 | } 9 | -------------------------------------------------------------------------------- /common/autoinstallers/rush-prettier/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rush-prettier", 3 | "version": "1.0.0", 4 | "private": true, 5 | "dependencies": { 6 | "prettier": "^3.0.0", 7 | "pretty-quick": "^3.1.3" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | CODEOWNERS @aws-solutions-library-samples/maintainers 2 | /.github/workflows/maintainer_workflows.yml @aws-solutions-library-samples/maintainers 3 | /.github/solutionid_validator.sh @aws-solutions-library-samples/maintainers 4 | -------------------------------------------------------------------------------- /common/autoinstallers/database-migration/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "database-migration", 3 | "version": "1.0.0", 4 | "private": true, 5 | "dependencies": { 6 | "pg": "8.11.1", 7 | "node-pg-migrate": "6.2.2" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /typescript/packages/apps/audit-log-depositor/README.md: -------------------------------------------------------------------------------- 1 | # Audit Log Depositor Overview 2 | 3 | ## Introduction 4 | 5 | Acts as a bridge between the Calculator and S3 so can deposit audit logs in S3 while running out of process of the calculator. 6 | -------------------------------------------------------------------------------- /typescript/packages/apps/schema-migrator/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM public.ecr.aws/docker/library/node:18.16.1-alpine3.18 2 | WORKDIR /usr 3 | COPY . /usr 4 | RUN rm -rf node_modules 5 | RUN npm install 6 | RUN npm run build 7 | CMD [ "node", "dist/index.js" ] 8 | -------------------------------------------------------------------------------- /java/apps/calculator/docs/images/calculator.hla-physical-runtime.drawio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/java/apps/calculator/docs/images/calculator.hla-physical-runtime.drawio.png -------------------------------------------------------------------------------- /java/apps/calculator/docs/images/calculator.hla-physical-deployment.drawio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/java/apps/calculator/docs/images/calculator.hla-physical-deployment.drawio.png -------------------------------------------------------------------------------- /typescript/packages/apps/impacts/docs/images/impacts.hla-physical-runtime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/typescript/packages/apps/impacts/docs/images/impacts.hla-physical-runtime.png -------------------------------------------------------------------------------- /typescript/packages/connectors/kinesis/docs/kinesis_connector_infra.drawio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/typescript/packages/connectors/kinesis/docs/kinesis_connector_infra.drawio.png -------------------------------------------------------------------------------- /typescript/packages/apps/impacts/docs/images/impacts.hla-physical-deployment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/typescript/packages/apps/impacts/docs/images/impacts.hla-physical-deployment.png -------------------------------------------------------------------------------- /typescript/packages/libraries/authz/README.md: -------------------------------------------------------------------------------- 1 | # Authz library 2 | 3 | ## Introduction 4 | 5 | The platform allows for groups to be defined by admins that can represent anything from a customer account structure, to a business unit organization, to representing teams. 6 | 7 | -------------------------------------------------------------------------------- /typescript/packages/libraries/authz/src/utils.ts: -------------------------------------------------------------------------------- 1 | import type { GroupRoles } from './scopes.js'; 2 | 3 | export function convertGroupRolesToCognitoGroups (groupRoles: GroupRoles): string { 4 | return Object.entries(groupRoles).map((r)=> `${r[0]}|||${r[1]}`).join(','); 5 | } 6 | -------------------------------------------------------------------------------- /typescript/packages/apps/pipelines/docs/images/sif-connector-integration-workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/typescript/packages/apps/pipelines/docs/images/sif-connector-integration-workflow.png -------------------------------------------------------------------------------- /typescript/packages/apps/calculations/docs/images/calculations.hla-physical-runtime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/typescript/packages/apps/calculations/docs/images/calculations.hla-physical-runtime.png -------------------------------------------------------------------------------- /typescript/packages/apps/pipelines/docs/images/pipelines.hla-physical-runtime.drawio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/typescript/packages/apps/pipelines/docs/images/pipelines.hla-physical-runtime.drawio.png -------------------------------------------------------------------------------- /typescript/packages/apps/calculations/docs/images/calculations.hla-physical-deployment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/typescript/packages/apps/calculations/docs/images/calculations.hla-physical-deployment.png -------------------------------------------------------------------------------- /typescript/packages/apps/pipelines/docs/images/pipelines.hla-physical-deployment.drawio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/typescript/packages/apps/pipelines/docs/images/pipelines.hla-physical-deployment.drawio.png -------------------------------------------------------------------------------- /typescript/packages/connectors/kinesis/docs/kinesis_connector_data_transformation.drawio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/typescript/packages/connectors/kinesis/docs/kinesis_connector_data_transformation.drawio.png -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 4 7 | indent_style = tab 8 | insert_final_newline = true 9 | max_line_length = 240 10 | trim_trailing_whitespace = true 11 | 12 | [{*.yml,*.yaml}] 13 | indent_style = space 14 | indent_size = 2 15 | -------------------------------------------------------------------------------- /typescript/packages/apps/access-management/docs/images/access-management.hla-physical-runtime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/typescript/packages/apps/access-management/docs/images/access-management.hla-physical-runtime.png -------------------------------------------------------------------------------- /java/apps/calculator/docs/images/guidance-for-sustainability-insights-framework-on-aws-calculator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/java/apps/calculator/docs/images/guidance-for-sustainability-insights-framework-on-aws-calculator.png -------------------------------------------------------------------------------- /typescript/packages/apps/access-management/docs/images/access-management.hla-physical-deployment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/typescript/packages/apps/access-management/docs/images/access-management.hla-physical-deployment.png -------------------------------------------------------------------------------- /typescript/packages/apps/pipeline-processors/docs/images/pipeline-processors.hla-physical-runtime.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/typescript/packages/apps/pipeline-processors/docs/images/pipeline-processors.hla-physical-runtime.png -------------------------------------------------------------------------------- /typescript/packages/apps/pipeline-processors/docs/images/pipeline-processors.hla-physical-deployment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/typescript/packages/apps/pipeline-processors/docs/images/pipeline-processors.hla-physical-deployment.png -------------------------------------------------------------------------------- /typescript/packages/apps/reference-datasets/docs/images/reference-datasets.hla-physical-runtime.drawio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/typescript/packages/apps/reference-datasets/docs/images/reference-datasets.hla-physical-runtime.drawio.png -------------------------------------------------------------------------------- /typescript/packages/tools/migrator/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log - @sif/migrator 2 | 3 | This log was last generated on Thu, 17 Aug 2023 02:44:14 GMT and should not be manually modified. 4 | 5 | ## 0.1.0 6 | Thu, 17 Aug 2023 02:44:14 GMT 7 | 8 | ### Minor changes 9 | 10 | - Added capability to migrate executions 11 | 12 | -------------------------------------------------------------------------------- /typescript/packages/apps/reference-datasets/docs/images/reference-datasets.hla-physical-deployment.drawio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/typescript/packages/apps/reference-datasets/docs/images/reference-datasets.hla-physical-deployment.drawio.png -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 4 | opensource-codeofconduct@amazon.com with any additional questions or comments. 5 | -------------------------------------------------------------------------------- /java/apps/calculator/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [sif-calculator-1.0.8] 4 | 2024-04-24 5 | 6 | 7 | 8 | 9 | ## [sif-calculator-1.0.6] 10 | 2024-04-23 11 | 12 | 13 | 14 | 15 | ## [sif-calculator-1.0.4] 16 | 2023-12-19 17 | 18 | 19 | 20 | 21 | ## [sif-calculator-1.0.2] 22 | 2023-10-12 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /java/apps/referencedatasets-indexer/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [sif-indexer-1.0.9] 4 | 2024-04-24 5 | 6 | 7 | 8 | 9 | ## [sif-indexer-1.0.7] 10 | 2024-04-23 11 | 12 | 13 | 14 | 15 | ## [sif-indexer-1.0.5] 16 | 2023-12-19 17 | 18 | 19 | 20 | 21 | ## [sif-indexer-1.0.3] 22 | 2023-10-12 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /typescript/packages/apps/pipelines/docs/images/guidance-for-sustainability-insights-framework-on-aws-pipelines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/typescript/packages/apps/pipelines/docs/images/guidance-for-sustainability-insights-framework-on-aws-pipelines.png -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/DataTypeRecord.java: -------------------------------------------------------------------------------- 1 | package com.aws.sif; 2 | 3 | import com.aws.sif.execution.DynamicTypeValue; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | 7 | import java.util.Map; 8 | 9 | @Builder 10 | @Data 11 | public class DataTypeRecord { 12 | Map values; 13 | } 14 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/execution/output/Activity.java: -------------------------------------------------------------------------------- 1 | package com.aws.sif.execution.output; 2 | 3 | import lombok.Value; 4 | 5 | @Value 6 | public class Activity { 7 | String groupId; 8 | String pipelineId; 9 | int date; 10 | String key1; 11 | String key2; 12 | String key3; 13 | String key4; 14 | String key5; 15 | } 16 | -------------------------------------------------------------------------------- /typescript/packages/connectors/kinesis/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log - @sif/kinesis-pipeline-input-connector 2 | 3 | This log was last generated on Wed, 13 Dec 2023 02:37:37 GMT and should not be manually modified. 4 | 5 | ## 1.1.0 6 | Wed, 13 Dec 2023 02:37:37 GMT 7 | 8 | ### Minor changes 9 | 10 | - Added new functionality for kinesis connector 11 | 12 | -------------------------------------------------------------------------------- /typescript/packages/apps/access-management/docs/images/guidance-for-sustainability-insights-framework-on-aws-access-management.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/typescript/packages/apps/access-management/docs/images/guidance-for-sustainability-insights-framework-on-aws-access-management.png -------------------------------------------------------------------------------- /typescript/packages/libraries/cdk-common/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './facts/lambdaArchitecture.js'; 2 | export * from './facts/facts.utils.js'; 3 | export * from './dynamodb-seeder/dynamodb-seeder.js'; 4 | export * from './dynamodb-seeder/seeds.js'; 5 | export * from './releases/util.js'; 6 | export * from './context/util.js'; 7 | export * from './environment/util.js'; 8 | -------------------------------------------------------------------------------- /typescript/packages/apps/concurrency-manager/README.md: -------------------------------------------------------------------------------- 1 | # Concurrency Manager Overview 2 | 3 | ## Introduction 4 | 5 | The Concurrency Manager queues and throttles resource expensive database queries at the environment level for the Aurora database cluster. The Concurrency Manager is consumed by step functions, and is not a module that is interacted directly with by users. 6 | -------------------------------------------------------------------------------- /typescript/packages/apps/reference-datasets/docs/images/guidance-for-sustainability-insights-framework-on-aws-reference-datasets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-solutions-library-samples/guidance-for-aws-sustainability-insights-framework/HEAD/typescript/packages/apps/reference-datasets/docs/images/guidance-for-sustainability-insights-framework-on-aws-reference-datasets.png -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/execution/OptionalParamKey.java: -------------------------------------------------------------------------------- 1 | package com.aws.sif.execution; 2 | 3 | public enum OptionalParamKey { 4 | version, 5 | versionAsAt, 6 | tenant, 7 | group, 8 | defaultValue, 9 | ignoreCase, 10 | locale, 11 | timezone, 12 | roundDownTo, 13 | quantityKind, 14 | limit, 15 | index, 16 | } 17 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/execution/output/ActivityStringValue.java: -------------------------------------------------------------------------------- 1 | package com.aws.sif.execution.output; 2 | 3 | import lombok.Value; 4 | 5 | @Value 6 | public class ActivityStringValue { 7 | String activityId; 8 | String pipelineId; 9 | int date; 10 | String key1; 11 | String key2; 12 | String key3; 13 | String key4; 14 | String key5; 15 | } 16 | -------------------------------------------------------------------------------- /typescript/packages/apps/platform-resource-manager/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log - @sif/platform-resource-manager 2 | 3 | This log was last generated on Wed, 13 Dec 2023 02:37:37 GMT and should not be manually modified. 4 | 5 | ## 0.1.1 6 | Wed, 13 Dec 2023 02:37:37 GMT 7 | 8 | ### Patches 9 | 10 | - Added ability to manage platform resources shuch as shutting down the database 11 | 12 | -------------------------------------------------------------------------------- /.github/solutionid_validator.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #set -e 3 | 4 | echo "checking solution id $1" 5 | echo "grep -nr --exclude-dir='.github' "$1" ./.." 6 | result=$(grep -nr --exclude-dir='.github' "$1" ./..) 7 | if [ $? -eq 0 ] 8 | then 9 | echo "Solution ID $1 found\n" 10 | echo "$result" 11 | exit 0 12 | else 13 | echo "Solution ID $1 not found" 14 | exit 1 15 | fi 16 | 17 | export result 18 | -------------------------------------------------------------------------------- /samples/typescript/connectors/sample-pipeline-input-connector/src/events.ts: -------------------------------------------------------------------------------- 1 | export const PIPELINE_PROCESSOR_EVENT_SOURCE: string = 'com.aws.sif.pipelineProcessor'; 2 | export const PIPELINE_PROCESSOR_CONNECTOR_REQUEST_EVENT = `SIF>${PIPELINE_PROCESSOR_EVENT_SOURCE}>connectorIntegration>request`; 3 | export const PIPELINE_PROCESSOR_CONNECTOR_RESPONSE_EVENT = `SIF>${PIPELINE_PROCESSOR_EVENT_SOURCE}>connectorIntegration>response`; 4 | -------------------------------------------------------------------------------- /typescript/packages/tools/migrator/src/app.ts: -------------------------------------------------------------------------------- 1 | import { runExit } from 'clipanion'; 2 | import { MetricsMigrator } from './migrators/metrics.migrator.js'; 3 | import { ExecutionsMigrator } from './migrators/executions.migrator.js'; 4 | 5 | const commandsMap = { 6 | 'MetricsMigrator': MetricsMigrator, 7 | 'ExecutionsMigrator': ExecutionsMigrator 8 | }; 9 | 10 | runExit([ 11 | commandsMap[process.env['MODULE']] 12 | ]); 13 | -------------------------------------------------------------------------------- /typescript/packages/tools/migrator/CHANGELOG.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@sif/migrator", 3 | "entries": [ 4 | { 5 | "version": "0.1.0", 6 | "tag": "@sif/migrator_v0.1.0", 7 | "date": "Thu, 17 Aug 2023 02:44:14 GMT", 8 | "comments": { 9 | "minor": [ 10 | { 11 | "comment": "Added capability to migrate executions" 12 | } 13 | ] 14 | } 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/resources/caml/CamlNotEnabledException.java: -------------------------------------------------------------------------------- 1 | package com.aws.sif.resources.caml; 2 | 3 | public class CamlNotEnabledException extends Exception { 4 | public CamlNotEnabledException(String errorMessage) { 5 | super(errorMessage); 6 | } 7 | 8 | public CamlNotEnabledException(String errorMessage, Throwable cause) { 9 | super(errorMessage, cause); 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/execution/ObjectTypeValue.java: -------------------------------------------------------------------------------- 1 | package com.aws.sif.execution; 2 | 3 | import lombok.Data; 4 | import lombok.EqualsAndHashCode; 5 | import lombok.ToString; 6 | import org.jetbrains.annotations.NotNull; 7 | 8 | @Data 9 | @EqualsAndHashCode(callSuper = true) 10 | @ToString(callSuper = true) 11 | public class ObjectTypeValue extends DynamicTypeValue { 12 | private final String value; 13 | } 14 | -------------------------------------------------------------------------------- /infrastructure/tenant/src/calculator/assets/migrations/1695756074551_increase-string-value-size.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable camelcase */ 2 | 3 | exports.shorthands = undefined; 4 | 5 | exports.up = pgm => { 6 | pgm.sql(`ALTER TABLE "ActivityStringValue" ALTER COLUMN "val" TYPE character varying(1024);`); 7 | pgm.sql(`ALTER TABLE "ActivityStringLatestValue" ALTER COLUMN "val" TYPE character varying(1024);`); 8 | }; 9 | 10 | exports.down = pgm => {}; 11 | -------------------------------------------------------------------------------- /typescript/packages/integrationTests/samples/sample_utility_bill_company1.csv: -------------------------------------------------------------------------------- 1 | date,type,therms 2 | 1/1/2021,natural gas,4510 3 | 2/1/2021,natural gas,4715 4 | 3/1/2021,natural gas,5227.5 5 | 4/1/2021,natural gas,5637.5 6 | 5/1/2021,natural gas,5432.5 7 | 6/1/2021,natural gas,4817.5 8 | 7/1/2021,natural gas,5022.5 9 | 8/1/2021,natural gas,3690 10 | 9/1/2021,natural gas,4920 11 | 10/1/2021,natural gas,6252.5 12 | 11/1/2021,natural gas,5330 13 | 12/1/2021,natural gas,4202.5 14 | -------------------------------------------------------------------------------- /typescript/packages/tools/migrator/src/utils/common.util.ts: -------------------------------------------------------------------------------- 1 | import { GetParameterCommand, SSMClient } from '@aws-sdk/client-ssm'; 2 | export const getSSMParameter = async (path: string, context: string): Promise<{context: string, value:string}> => { 3 | const ssm = new SSMClient({}); 4 | const response = await ssm.send( 5 | new GetParameterCommand({ 6 | Name: path, 7 | }) 8 | ); 9 | return { 10 | context, 11 | value: response.Parameter?.Value as string 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /common/git-hooks/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Called by "git commit" with no arguments. The hook should 3 | # exit with non-zero status after issuing an appropriate message if 4 | # it wants to stop the commit. 5 | 6 | # Invoke the "rush prettier" custom command to reformat files whenever they 7 | # are committed. The command is defined in common/config/rush/command-line.json 8 | # and uses the "rush-prettier" autoinstaller. 9 | node common/scripts/install-run-rush.js prettier || exit $? 10 | -------------------------------------------------------------------------------- /typescript/packages/apps/pipeline-processors/local-testing/aws-stepfunctions-local-credentials.txt.template: -------------------------------------------------------------------------------- 1 | AWS_DEFAULT_REGION=AWS_REGION_OF_YOUR_AWS_RESOURCES 2 | AWS_ACCESS_KEY_ID=YOUR_AWS_ACCESS_KEY 3 | AWS_SECRET_ACCESS_KEY=YOUR_AWS_SECRET_KEY 4 | WAIT_TIME_SCALE=VALUE 5 | LAMBDA_ENDPOINT=VALUE 6 | BATCH_ENDPOINT=VALUE 7 | DYNAMODB_ENDPOINT=VALUE 8 | ECS_ENDPOINT=VALUE 9 | GLUE_ENDPOINT=VALUE 10 | SAGE_MAKER_ENDPOINT=VALUE 11 | SQS_ENDPOINT=VALUE 12 | SNS_ENDPOINT=VALUE 13 | STEP_FUNCTIONS_ENDPOINT=VALUE 14 | -------------------------------------------------------------------------------- /java/apps/referencedatasets-indexer/src/main/resources/application.conf: -------------------------------------------------------------------------------- 1 | indexer { 2 | aws.region=${AWS_REGION} 3 | 4 | tenantId=${TENANT_ID} 5 | environment=${ENVIRONMENT} 6 | 7 | temp.location=/tmp 8 | temp.location=${?TEMP_DIR} 9 | 10 | upload.s3.bucket=${BUCKET_NAME} 11 | 12 | upload.s3.output.key="referenceDatasets///index.txt" 13 | upload.s3.errors.key="referenceDatasets///errors.txt" 14 | 15 | executor.threads=10 16 | } -------------------------------------------------------------------------------- /mkdocs-README.md: -------------------------------------------------------------------------------- 1 | # Mkdocs 2 | 3 | The documentation is structured in a way to be navigable from within different repositories (e.g. browsing via github). Mkdocs is an optional way of viewing this documentation by extracting the docs into a browseable site. 4 | 5 | ## Initial setup 6 | 7 | ```shell 8 | > pip install -r mkdocs-requirements.txt 9 | ``` 10 | 11 | ## Running locally 12 | 13 | ```shell 14 | > mkdocs serve 15 | ``` 16 | 17 | ## Building the documentation site 18 | 19 | ```shell 20 | > mkdocs build 21 | ``` 22 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/execution/output/OutputWriter.java: -------------------------------------------------------------------------------- 1 | package com.aws.sif.execution.output; 2 | 3 | import java.io.IOException; 4 | import java.util.Map; 5 | import java.util.concurrent.CompletableFuture; 6 | 7 | public interface OutputWriter { 8 | void init(String pipelineId, String executionId, int chunkNo, Map outputMap) throws IOException; 9 | 10 | CompletableFuture addRecord(T record) throws IOException; 11 | 12 | void submit() throws IOException; 13 | } 14 | -------------------------------------------------------------------------------- /typescript/packages/libraries/proxy/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | "composite": true, 8 | "ignoreDeprecations": "5.0", 9 | "declaration": true, 10 | "declarationMap": true, 11 | "sourceMap": true, 12 | "esModuleInterop": true 13 | }, 14 | "include": ["src/**/*.ts"], 15 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 16 | } 17 | -------------------------------------------------------------------------------- /docs/events.md: -------------------------------------------------------------------------------- 1 | TODO: reference 2 | 3 | # Events 4 | 5 | Async communication between modules is handled via EventBridge acting as the event bus. 6 | 7 | Each stack deployment will include its own custom event bus to ensure tenants are not affected by noisy neighbors, as well as to allow for cost allocation tagging, when deployed in a multi-tenant approach. 8 | 9 | There is a maximum of 100 event buses per AWS Account, which will require the sharding of siloed tenant stacks across multiple AWS Accounts. This sharding will be managed by the Tenant Manager module. 10 | -------------------------------------------------------------------------------- /typescript/packages/libraries/cdk-common/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log - @sif/cdk-common 2 | 3 | This log was last generated on Wed, 13 Dec 2023 02:37:36 GMT and should not be manually modified. 4 | 5 | ## 1.1.0 6 | Wed, 13 Dec 2023 02:37:36 GMT 7 | 8 | ### Minor changes 9 | 10 | - new utility function to list version information based on github releases 11 | 12 | ## 1.0.0 13 | Thu, 17 Aug 2023 02:44:14 GMT 14 | 15 | _Version update only_ 16 | 17 | ## 1.51.0 18 | Thu, 20 Jul 2023 00:30:14 GMT 19 | 20 | ### Minor changes 21 | 22 | - fork the @cloudcomponents/cdk-dynamodb-seeder to sif 23 | 24 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/ActivityTypeRecord.java: -------------------------------------------------------------------------------- 1 | package com.aws.sif; 2 | 3 | import com.aws.sif.execution.DynamicTypeValue; 4 | import com.aws.sif.execution.NumberTypeValue; 5 | import com.aws.sif.execution.StringTypeValue; 6 | import lombok.Builder; 7 | import lombok.Data; 8 | 9 | import java.util.Map; 10 | 11 | @Builder 12 | @Data 13 | public class ActivityTypeRecord { 14 | NumberTypeValue time; 15 | String groupId; 16 | Map uniqueIdColumns; 17 | Map values; 18 | StringTypeValue auditId; 19 | Boolean isDeletion; 20 | } 21 | -------------------------------------------------------------------------------- /typescript/packages/ide/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | 8 | "declaration": true, 9 | "declarationMap": true, 10 | "sourceMap": true, 11 | "esModuleInterop": true, 12 | "ignoreDeprecations": "5.0", 13 | 14 | // overrides of extends 15 | "strict": false, 16 | "exactOptionalPropertyTypes": false 17 | }, 18 | 19 | "include": ["src/**/*.ts"], 20 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 21 | } 22 | -------------------------------------------------------------------------------- /typescript/packages/apps/pipelines/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | 8 | "declaration": true, 9 | "declarationMap": true, 10 | "sourceMap": true, 11 | "esModuleInterop": true, 12 | "ignoreDeprecations": "5.0", 13 | 14 | // overrides of extends 15 | "strict": false, 16 | "exactOptionalPropertyTypes": false 17 | }, 18 | "include": ["src/**/*.ts"], 19 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 20 | } 21 | -------------------------------------------------------------------------------- /typescript/packages/tools/migrator/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | 8 | 9 | "declaration": true, 10 | "declarationMap": true, 11 | "sourceMap": true, 12 | "esModuleInterop": true, 13 | "ignoreDeprecations": "5.0", 14 | // overrides of extends 15 | "strict": false, 16 | "exactOptionalPropertyTypes": false 17 | }, 18 | "include": ["src/**/*.ts"], 19 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 20 | } 21 | -------------------------------------------------------------------------------- /typescript/packages/apps/calculations/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | 8 | "declaration": true, 9 | "declarationMap": true, 10 | "sourceMap": true, 11 | "esModuleInterop": true, 12 | "ignoreDeprecations": "5.0", 13 | 14 | // overrides of extends 15 | "strict": false, 16 | "exactOptionalPropertyTypes": false 17 | }, 18 | "include": ["src/**/*.ts"], 19 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 20 | } 21 | -------------------------------------------------------------------------------- /typescript/packages/apps/reference-datasets/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | "declaration": true, 8 | "declarationMap": true, 9 | "sourceMap": true, 10 | "esModuleInterop": true, 11 | "ignoreDeprecations": "5.0", 12 | 13 | // overrides of extends 14 | "strict": false, 15 | "exactOptionalPropertyTypes": false 16 | }, 17 | "include": ["src/**/*.ts"], 18 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 19 | } 20 | -------------------------------------------------------------------------------- /typescript/packages/apps/schema-migrator/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | 8 | "declaration": true, 9 | "declarationMap": true, 10 | "sourceMap": true, 11 | "esModuleInterop": true, 12 | "ignoreDeprecations": "5.0", 13 | 14 | // overrides of extends 15 | "strict": false, 16 | "exactOptionalPropertyTypes": false 17 | }, 18 | "include": ["src/**/*.ts"], 19 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 20 | } 21 | -------------------------------------------------------------------------------- /typescript/packages/apps/audit-log-depositor/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | 8 | "declaration": true, 9 | "declarationMap": true, 10 | "sourceMap": true, 11 | "esModuleInterop": true, 12 | "ignoreDeprecations": "5.0", 13 | 14 | // overrides of extends 15 | "strict": false, 16 | "exactOptionalPropertyTypes": false 17 | }, 18 | "include": ["src/**/*.ts"], 19 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 20 | } 21 | -------------------------------------------------------------------------------- /typescript/packages/apps/concurrency-manager/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | 8 | "declaration": true, 9 | "declarationMap": true, 10 | "sourceMap": true, 11 | "esModuleInterop": true, 12 | "ignoreDeprecations": "5.0", 13 | 14 | // overrides of extends 15 | "strict": false, 16 | "exactOptionalPropertyTypes": false 17 | }, 18 | "include": ["src/**/*.ts"], 19 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 20 | } 21 | -------------------------------------------------------------------------------- /typescript/packages/apps/platform-resource-manager/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | "declaration": true, 8 | "declarationMap": true, 9 | "sourceMap": true, 10 | "esModuleInterop": true, 11 | "ignoreDeprecations": "5.0", 12 | 13 | // overrides of extends 14 | "strict": false, 15 | "exactOptionalPropertyTypes": false 16 | }, 17 | "include": ["src/**/*.ts"], 18 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 19 | } 20 | -------------------------------------------------------------------------------- /typescript/packages/libraries/authz/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": [ 7 | "node" 8 | ], 9 | "composite": true, 10 | "ignoreDeprecations": "5.0", 11 | "declaration": true, 12 | "declarationMap": true, 13 | "sourceMap": true, 14 | "esModuleInterop": true 15 | }, 16 | "include": [ 17 | "src/**/*.ts" 18 | ], 19 | "exclude": [ 20 | "./**/__mocks__/*.ts", 21 | ".git", 22 | ".history", 23 | ".vscode", 24 | "cdk.out", 25 | "dist", 26 | "lib", 27 | "node_modules" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /docs/images/sif.drawio.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /docs/images/sif-layers.png.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /typescript/packages/apps/pipeline-processors/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | "composite": true, 8 | "declaration": true, 9 | "declarationMap": true, 10 | "sourceMap": true, 11 | "esModuleInterop": true, 12 | "ignoreDeprecations": "5.0", 13 | // overrides of extends 14 | "strict": false, 15 | "exactOptionalPropertyTypes": false 16 | }, 17 | "include": ["src/**/*.ts"], 18 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 19 | } 20 | -------------------------------------------------------------------------------- /docs/images/sif-hla-conceptual.png.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /docs/images/sif-infra-multi-mode.png.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /docs/images/sif-infra-single-mode.png.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /typescript/packages/apps/impacts/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | 8 | "declaration": true, 9 | "declarationMap": true, 10 | "sourceMap": true, 11 | "esModuleInterop": true, 12 | "ignoreDeprecations": "5.0", 13 | "experimentalDecorators": true, 14 | 15 | // overrides of extends 16 | "strict": false, 17 | "exactOptionalPropertyTypes": false 18 | }, 19 | "include": ["src/**/*.ts"], 20 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 21 | } 22 | -------------------------------------------------------------------------------- /docs/images/sif-infra-multi-shared-mode.png.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /.github/workflows/maintainer_workflows.yml: -------------------------------------------------------------------------------- 1 | # Workflows managed by aws-solutions-library-samples maintainers 2 | name: Maintainer Workflows 3 | on: 4 | # Triggers the workflow on push or pull request events but only for the "main" branch 5 | push: 6 | branches: [ "main" ] 7 | pull_request: 8 | branches: [ "main" ] 9 | types: [opened, reopened, edited] 10 | 11 | jobs: 12 | CheckSolutionId: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v4 16 | - name: Run solutionid validator 17 | run: | 18 | chmod u+x ./.github/solutionid_validator.sh 19 | ./.github/solutionid_validator.sh ${{ vars.SOLUTIONID }} -------------------------------------------------------------------------------- /typescript/packages/ide/images/sif-core-folder.png.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /typescript/packages/apps/impacts/docs/images/impacts.hla.drawio.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /typescript/packages/apps/audit-log-depositor/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log - @sif/audit-log-depositor 2 | 3 | This log was last generated on Thu, 20 Jul 2023 00:30:14 GMT and should not be manually modified. 4 | 5 | ## 0.3.0 6 | Thu, 20 Jul 2023 00:30:14 GMT 7 | 8 | ### Minor changes 9 | 10 | - update node version to 18.x 11 | 12 | ### Patches 13 | 14 | - repo cleaning script added 15 | 16 | ## 0.2.0 17 | Mon, 22 May 2023 22:02:58 GMT 18 | 19 | ### Minor changes 20 | 21 | - new module to read audit log from sqs and store it in s3 22 | 23 | ## 0.1.0 24 | Mon, 22 May 2023 18:52:26 GMT 25 | 26 | ### Minor changes 27 | 28 | - new module to read audit log from sqs and store it in s3 29 | 30 | -------------------------------------------------------------------------------- /typescript/packages/apps/calculations/docs/images/calculations.hla.drawio.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /java/apps/calculator/docs/images/calculator.hla-physical-deployment.drawio.png.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /java/apps/calculator/docs/images/calculator.hla-physical-runtime.drawio.png.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /typescript/packages/apps/impacts/docs/images/impacts.hla-physical-runtime.png.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /typescript/packages/connectors/csv/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | 8 | "declaration": true, 9 | "declarationMap": true, 10 | "sourceMap": true, 11 | "esModuleInterop": true, 12 | "ignoreDeprecations": "5.0", 13 | "experimentalDecorators": true, 14 | 15 | // overrides of extends 16 | "strict": false, 17 | "exactOptionalPropertyTypes": false 18 | }, 19 | // "lib": ["dom.iterable"], 20 | "include": ["src/**/*.ts"], 21 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 22 | } 23 | -------------------------------------------------------------------------------- /typescript/packages/connectors/kinesis/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | 8 | "declaration": true, 9 | "declarationMap": true, 10 | "sourceMap": true, 11 | "esModuleInterop": true, 12 | "ignoreDeprecations": "5.0", 13 | "experimentalDecorators": true, 14 | 15 | // overrides of extends 16 | "strict": false, 17 | "exactOptionalPropertyTypes": false 18 | }, 19 | // "lib": ["dom.iterable"], 20 | "include": ["src/**/*.ts"], 21 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 22 | } 23 | -------------------------------------------------------------------------------- /typescript/packages/connectors/sif/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | 8 | "declaration": true, 9 | "declarationMap": true, 10 | "sourceMap": true, 11 | "esModuleInterop": true, 12 | "ignoreDeprecations": "5.0", 13 | "experimentalDecorators": true, 14 | 15 | // overrides of extends 16 | "strict": false, 17 | "exactOptionalPropertyTypes": false 18 | }, 19 | // "lib": ["dom.iterable"], 20 | "include": ["src/**/*.ts"], 21 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 22 | } 23 | -------------------------------------------------------------------------------- /typescript/packages/libraries/cdk-common/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | 8 | "composite": true, 9 | 10 | "declaration": true, 11 | "declarationMap": true, 12 | "sourceMap": true, 13 | "esModuleInterop": true, 14 | "ignoreDeprecations": "5.0", 15 | "experimentalDecorators": true, 16 | 17 | // overrides of extends 18 | "strict": false, 19 | "exactOptionalPropertyTypes": false 20 | }, 21 | "include": ["src/**/*.ts"], 22 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 23 | } 24 | -------------------------------------------------------------------------------- /typescript/packages/libraries/clients/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | 8 | "composite": true, 9 | 10 | "declaration": true, 11 | "declarationMap": true, 12 | "sourceMap": true, 13 | "esModuleInterop": true, 14 | "ignoreDeprecations": "5.0", 15 | "experimentalDecorators": true, 16 | 17 | // overrides of extends 18 | "strict": false, 19 | "exactOptionalPropertyTypes": false 20 | }, 21 | "include": ["src/**/*.ts"], 22 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 23 | } 24 | -------------------------------------------------------------------------------- /typescript/packages/libraries/events/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | 8 | "composite": true, 9 | 10 | "declaration": true, 11 | "declarationMap": true, 12 | "sourceMap": true, 13 | "esModuleInterop": true, 14 | "ignoreDeprecations": "5.0", 15 | "experimentalDecorators": true, 16 | 17 | // overrides of extends 18 | "strict": false, 19 | "exactOptionalPropertyTypes": false 20 | }, 21 | "include": ["src/**/*.ts"], 22 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 23 | } 24 | -------------------------------------------------------------------------------- /typescript/packages/apps/impacts/docs/images/impacts.hla-physical-deployment.png.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /typescript/packages/connectors/clean-rooms/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | 8 | "declaration": true, 9 | "declarationMap": true, 10 | "sourceMap": true, 11 | "esModuleInterop": true, 12 | "ignoreDeprecations": "5.0", 13 | "experimentalDecorators": true, 14 | 15 | // overrides of extends 16 | "strict": false, 17 | "exactOptionalPropertyTypes": false 18 | }, 19 | // "lib": ["dom.iterable"], 20 | "include": ["src/**/*.ts"], 21 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 22 | } 23 | -------------------------------------------------------------------------------- /typescript/packages/connectors/data-fabric/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | 8 | "declaration": true, 9 | "declarationMap": true, 10 | "sourceMap": true, 11 | "esModuleInterop": true, 12 | "ignoreDeprecations": "5.0", 13 | "experimentalDecorators": true, 14 | 15 | // overrides of extends 16 | "strict": false, 17 | "exactOptionalPropertyTypes": false 18 | }, 19 | // "lib": ["dom.iterable"], 20 | "include": ["src/**/*.ts"], 21 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 22 | } 23 | -------------------------------------------------------------------------------- /typescript/packages/libraries/dynamodb-utils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | 8 | "composite": true, 9 | 10 | "declaration": true, 11 | "declarationMap": true, 12 | "sourceMap": true, 13 | "esModuleInterop": true, 14 | "ignoreDeprecations": "5.0", 15 | "experimentalDecorators": true, 16 | 17 | // overrides of extends 18 | "strict": false, 19 | "exactOptionalPropertyTypes": false 20 | }, 21 | "include": ["src/**/*.ts"], 22 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 23 | } 24 | -------------------------------------------------------------------------------- /typescript/packages/apps/calculations/docs/images/calculations.hla-physical-runtime.png.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /typescript/packages/apps/pipeline-processors/docs/images/pipeline-processors.hla.drawio.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /typescript/packages/apps/pipelines/docs/images/pipelines.hla-physical-runtime.drawio.png.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /typescript/packages/connectors/connector-utils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | 8 | "declaration": true, 9 | "declarationMap": true, 10 | "sourceMap": true, 11 | "esModuleInterop": true, 12 | "ignoreDeprecations": "5.0", 13 | "experimentalDecorators": true, 14 | 15 | // overrides of extends 16 | "strict": false, 17 | "exactOptionalPropertyTypes": false 18 | }, 19 | // "lib": ["dom.iterable"], 20 | "include": ["src/**/*.ts"], 21 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 22 | } 23 | -------------------------------------------------------------------------------- /typescript/packages/libraries/deployment-helper/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | 8 | "composite": true, 9 | 10 | "declaration": true, 11 | "declarationMap": true, 12 | "sourceMap": true, 13 | "esModuleInterop": true, 14 | "ignoreDeprecations": "5.0", 15 | "experimentalDecorators": true, 16 | 17 | // overrides of extends 18 | "strict": false, 19 | "exactOptionalPropertyTypes": false 20 | }, 21 | "include": ["src/**/*.ts"], 22 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 23 | } 24 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Don't allow people to merge changes to these generated files, because the result 2 | # may be invalid. You need to run "rush update" again. 3 | pnpm-lock.yaml merge=binary 4 | repo-state.json merge=binary 5 | 6 | # Rush's JSON config files use JavaScript-style code comments. The rule below prevents pedantic 7 | # syntax highlighters such as GitHub's from highlighting these comments as errors. Your text editor 8 | # may also require a special configuration to allow comments in JSON. 9 | # 10 | # For more information, see this issue: https://github.com/microsoft/rushstack/issues/1088 11 | # 12 | *.json linguist-language=JSON-with-Comments 13 | -------------------------------------------------------------------------------- /typescript/packages/apps/access-management/docs/images/access-management.hla-physical-runtime.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /typescript/packages/apps/calculations/docs/images/calculations.hla-physical-deployment.png.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /typescript/packages/apps/pipelines/docs/images/pipelines.hla-physical-deployment.drawio.png.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /typescript/packages/apps/access-management/docs/images/access-management.hla-physical-deployment.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /typescript/packages/apps/pipeline-processors/docs/images/pipeline-processors.hla-physical-runtime.png.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # 3 | # Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 6 | # with the License. A copy of the License is located at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 11 | # OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 12 | # and limitations under the License. 13 | # 14 | . "$(dirname -- "$0")/_/husky.sh" 15 | 16 | npx --no -- commitlint --edit ${1} 17 | -------------------------------------------------------------------------------- /infrastructure/platform/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": [ 7 | "node" 8 | ], 9 | "declaration": true, 10 | "declarationMap": true, 11 | "sourceMap": true, 12 | "esModuleInterop": true, 13 | "ignoreDeprecations": "5.0", 14 | // overrides of extends 15 | "strict": false, 16 | "strictNullChecks": true, 17 | "exactOptionalPropertyTypes": false 18 | }, 19 | "include": [ 20 | "src/**/*.ts" 21 | ], 22 | "exclude": [ 23 | "./**/__mocks__/*.ts", 24 | ".git", 25 | ".history", 26 | ".vscode", 27 | "cdk.out", 28 | "dist", 29 | "lib", 30 | "node_modules" 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /infrastructure/tenant/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": [ 7 | "node" 8 | ], 9 | "declaration": true, 10 | "declarationMap": true, 11 | "sourceMap": true, 12 | "esModuleInterop": true, 13 | "ignoreDeprecations": "5.0", 14 | // overrides of extends 15 | "strict": false, 16 | "exactOptionalPropertyTypes": false, 17 | "strictNullChecks": true, 18 | }, 19 | "include": [ 20 | "src/**/*.ts" 21 | ], 22 | "exclude": [ 23 | "./**/__mocks__/*.ts", 24 | ".git", 25 | ".history", 26 | ".vscode", 27 | "cdk.out", 28 | "dist", 29 | "lib", 30 | "node_modules" 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /samples/typescript/connectors/sample-pipeline-input-connector/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": ".", 6 | "types": [ 7 | "node" 8 | ], 9 | "declaration": true, 10 | "declarationMap": true, 11 | "sourceMap": true, 12 | "esModuleInterop": true, 13 | "ignoreDeprecations": "5.0", 14 | // overrides of extends 15 | "strict": false, 16 | "exactOptionalPropertyTypes": false 17 | }, 18 | "include": [ 19 | "./**/*.ts" 20 | ], 21 | "exclude": [ 22 | "./**/__mocks__/*.ts", 23 | ".git", 24 | ".history", 25 | ".vscode", 26 | "cdk.out", 27 | "dist", 28 | "lib", 29 | "node_modules" 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /typescript/packages/apps/pipeline-processors/docs/images/pipeline-processors.hla-physical-deployment.png.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /typescript/packages/apps/reference-datasets/docs/images/reference-datasets.hla-physical-runtime.drawio.png.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/execution/EvaluatedNode.java: -------------------------------------------------------------------------------- 1 | package com.aws.sif.execution; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | /** 10 | * WIP - not in use yet 11 | */ 12 | public class EvaluatedNode { 13 | 14 | @Setter @Getter int id; 15 | 16 | @Setter @Getter String text; 17 | 18 | @Getter @Setter 19 | DynamicTypeValue result; 20 | 21 | List children; 22 | EvaluatedNode parent; 23 | 24 | EvaluatedNode() { 25 | children = new ArrayList<>(); 26 | } 27 | 28 | public EvaluatedNode addChild(EvaluatedNode node) { 29 | children.add(node); 30 | node.parent = this; 31 | return this; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /typescript/packages/apps/reference-datasets/docs/images/reference-datasets.hla-physical-deployment.drawio.png.license: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | -------------------------------------------------------------------------------- /typescript/packages/apps/platform-resource-manager/src/actions/schema.ts: -------------------------------------------------------------------------------- 1 | import { id } from '@sif/resource-api-base'; 2 | import { Static, Type } from '@sinclair/typebox'; 3 | 4 | export const actionResource = Type.Object( 5 | { 6 | id, 7 | action: Type.String({ description: 'action to be performed on the resource' }) 8 | }, 9 | { $id: 'action_resource' } 10 | ); 11 | 12 | export type ActionResource = Static; 13 | 14 | export interface ActionServiceBase { 15 | validateParameters: (actionResource: ActionResource) => void; 16 | } 17 | 18 | export const STOP_RESOURCE_EVENT_DETAIL_TYPE = 'SIF>com.aws.sif.platformResourceManager>stopResource'; 19 | export const EVENT_SOURCE = 'com.aws.sif.platformResourceManager'; 20 | -------------------------------------------------------------------------------- /typescript/packages/libraries/events/src/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | export * from './publisher.js'; 15 | export * from './models.js'; 16 | -------------------------------------------------------------------------------- /java/apps/referencedatasets-indexer/docs/sample-requests/referenceDataset.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "01gm2jaqkk06g17n3fn16sftgd", 3 | "version": 1, 4 | "name": "ZipcodeToState10", 5 | "groups": [ 6 | "/a/b/c" 7 | ], 8 | "description": "Lookup table to find a state from a zipcode", 9 | "createdAt": "2022-12-12T07:03:33.235Z", 10 | "createdBy": "someone@example.com", 11 | "tags": { 12 | "source": "usgeo" 13 | }, 14 | "state": "disabled", 15 | "status": "in_progress", 16 | "datasetHeaders": [ 17 | "zipcode", 18 | "state" 19 | ], 20 | "s3Location": { 21 | "key": "referenceDatasets/01gm2jaqkk06g17n3fn16sftgd/2/|||a|||b|||c/data_upload.csv", 22 | "bucket": "sif-amz-development-896502536262-us-west-2" 23 | } 24 | } -------------------------------------------------------------------------------- /typescript/packages/libraries/lambda-invoker/src/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | export * from './models.js'; 15 | export * from './invoker.js'; 16 | -------------------------------------------------------------------------------- /typescript/packages/libraries/resource-api-base/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": ["node"], 7 | 8 | "composite": true, 9 | 10 | "declaration": true, 11 | "declarationMap": true, 12 | "sourceMap": true, 13 | "esModuleInterop": true, 14 | "ignoreDeprecations": "5.0", 15 | "experimentalDecorators": true, 16 | 17 | // overrides of extends 18 | "strict": false, 19 | "exactOptionalPropertyTypes": false, 20 | "allowSyntheticDefaultImports": true 21 | }, 22 | "include": ["src/**/*.ts"], 23 | "exclude": ["./**/__mocks__/*.ts", ".git", ".history", ".vscode", "cdk.out", "dist", "lib", "node_modules"] 24 | } 25 | -------------------------------------------------------------------------------- /typescript/packages/libraries/dynamodb-utils/src/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | export * from './dynamoDb.util.js'; 15 | export * from './pkUtils.util.js'; 16 | -------------------------------------------------------------------------------- /typescript/packages/apps/schema-migrator/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log - @sif/schema-migrator 2 | 3 | This log was last generated on Wed, 13 Dec 2023 02:37:37 GMT and should not be manually modified. 4 | 5 | ## 0.4.0 6 | Wed, 13 Dec 2023 02:37:37 GMT 7 | 8 | ### Minor changes 9 | 10 | - should retrieve ca certificate from environment variable 11 | 12 | ## 0.3.1 13 | Thu, 17 Aug 2023 02:44:14 GMT 14 | 15 | ### Patches 16 | 17 | - semgrep fix 18 | 19 | ## 0.3.0 20 | Thu, 20 Jul 2023 00:30:14 GMT 21 | 22 | ### Minor changes 23 | 24 | - update node version to 18.x 25 | 26 | ### Patches 27 | 28 | - repo cleaning script added 29 | 30 | ## 0.2.0 31 | Thu, 08 Jun 2023 01:01:56 GMT 32 | 33 | ### Minor changes 34 | 35 | - node application to run node-pg-migrate 36 | 37 | -------------------------------------------------------------------------------- /typescript/packages/integrationTests/src/@types/apickli/index.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | declare module 'apickli'; 15 | declare module 'apickli/apickli-gherkin'; 16 | -------------------------------------------------------------------------------- /typescript/packages/integrationTests/src/features/step_definitions/apickli-gherkin.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | module.exports = require('apickli/apickli-gherkin'); 15 | -------------------------------------------------------------------------------- /typescript/packages/integrationTests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "module": "CommonJS", 5 | "outDir": "dist", 6 | "rootDir": "src", 7 | "types": [ 8 | "node" 9 | ], 10 | "declaration": true, 11 | "declarationMap": true, 12 | "sourceMap": true, 13 | "esModuleInterop": true, 14 | "noPropertyAccessFromIndexSignature": false, 15 | "ignoreDeprecations": "5.0", 16 | "strict": false, 17 | "exactOptionalPropertyTypes": false 18 | }, 19 | 20 | "include": [ 21 | "src/**/*.ts" 22 | ], 23 | "exclude": [ 24 | "./**/__mocks__/*.ts", 25 | ".git", 26 | ".history", 27 | ".vscode", 28 | "cdk.out", 29 | "dist", 30 | "lib", 31 | "node_modules" 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /.semgrepignore: -------------------------------------------------------------------------------- 1 | 2 | # Items added to this file will be ignored by Semgrep. 3 | # 4 | # This file uses .gitignore syntax: 5 | # 6 | # Some parts of .gitignore syntax are not supported, and patterns 7 | # using this syntax will be dropped from the ignore list: 8 | # - Explicit "include syntax", e.g. "!kept/". 9 | # - Multi-character expansion syntax, e.g. "*.py[cod]" 10 | # 11 | # To include ignore patterns from another file, start a line 12 | # with ':include', followed by the path of the file. E.g. 13 | # ":include path/to/other/ignore/file". 14 | # 15 | # To ignore a file with a literal ':' character, escape it with 16 | # a backslash, e.g. "\:foo". 17 | 18 | :include .gitignore 19 | 20 | ./common/scripts/* 21 | ./layer/* 22 | **/*.jar 23 | **/proxy.client.spec.ts 24 | 25 | -------------------------------------------------------------------------------- /typescript/packages/apps/access-management/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": [ 7 | "node" 8 | ], 9 | "declaration": true, 10 | "declarationMap": true, 11 | "sourceMap": true, 12 | "esModuleInterop": true, 13 | "ignoreDeprecations": "5.0", 14 | "noPropertyAccessFromIndexSignature": false, 15 | // overrides of extends 16 | "strict": false, 17 | "exactOptionalPropertyTypes": false 18 | }, 19 | "include": [ 20 | "src/**/*.ts" 21 | ], 22 | "exclude": [ 23 | "./**/__mocks__/*.ts", 24 | ".git", 25 | ".history", 26 | ".vscode", 27 | "cdk.out", 28 | "dist", 29 | "lib", 30 | "node_modules" 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /typescript/packages/libraries/validators/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist", 5 | "rootDir": "src", 6 | "types": [ 7 | "node" 8 | ], 9 | "composite": true, 10 | "declaration": true, 11 | "declarationMap": true, 12 | "sourceMap": true, 13 | "esModuleInterop": true, 14 | "ignoreDeprecations": "5.0", 15 | "experimentalDecorators": true, 16 | // overrides of extends 17 | "strict": false, 18 | "exactOptionalPropertyTypes": false 19 | }, 20 | "include": [ 21 | "src/**/*.ts" 22 | ], 23 | "exclude": [ 24 | "./**/__mocks__/*.ts", 25 | ".git", 26 | ".history", 27 | ".vscode", 28 | "cdk.out", 29 | "dist", 30 | "lib", 31 | "node_modules" 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /typescript/packages/apps/access-management/src/common/pkTypes.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | export enum PkType { 15 | User = 'u', 16 | Group = 'g', 17 | GroupHierarchy = 'gh', 18 | } 19 | -------------------------------------------------------------------------------- /typescript/packages/connectors/connector-utils/src/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | export * from './connector.events.js'; 15 | export * from './connector.formatter.js'; 16 | 17 | 18 | -------------------------------------------------------------------------------- /common/config/rush/rush-plugins.json: -------------------------------------------------------------------------------- 1 | /** 2 | * This configuration file manages Rush's plugin feature. 3 | */ 4 | { 5 | "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-plugins.schema.json", 6 | "plugins": [ 7 | /** 8 | * Each item defines a plugin configuration used by Rush. 9 | */ 10 | // { 11 | // /** 12 | // * The name of the rush plugin package. 13 | // */ 14 | // "packageName": "@scope/my-rush-plugin", 15 | // /** 16 | // * The name of the plugin provided by rush plugin package 17 | // */ 18 | // "pluginName": "my-plugin-name", 19 | // /** 20 | // * Autoinstaller name used to install the plugin. 21 | // */ 22 | // "autoinstallerName": "plugins" 23 | // } 24 | ] 25 | } -------------------------------------------------------------------------------- /typescript/packages/apps/platform-resource-manager/src/resources/schema.ts: -------------------------------------------------------------------------------- 1 | import { Static, Type } from '@sinclair/typebox'; 2 | import { id } from '@sif/resource-api-base'; 3 | 4 | export const resource = Type.Object( 5 | { 6 | id, 7 | status: Type.String({ description: 'Status of the platform resource.' }) 8 | }, 9 | { $id: 'resource' } 10 | ); 11 | 12 | export const resourceList = Type.Object({ 13 | resources: Type.Array(Type.Ref(resource)) 14 | }, { $id: 'resource_list' }); 15 | 16 | export type Resource = Static; 17 | export type ResourceList = Static; 18 | // Different platform resource will have different state 19 | export type AuroraStatus = 'starting' | 'starting_failed' | 'available' | 'stopping' | 'stopping_failed' | 'stopped'; 20 | 21 | -------------------------------------------------------------------------------- /typescript/packages/libraries/lambda-invoker/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node16-strictest-esm/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "dist/esm", 5 | "rootDir": "src", 6 | "types": [ 7 | "node" 8 | ], 9 | "composite": true, 10 | "declaration": true, 11 | "declarationMap": true, 12 | "sourceMap": true, 13 | "esModuleInterop": true, 14 | "ignoreDeprecations": "5.0", 15 | "experimentalDecorators": true, 16 | // overrides of extends 17 | "strict": false, 18 | "exactOptionalPropertyTypes": false 19 | }, 20 | "include": [ 21 | "src/**/*.ts" 22 | ], 23 | "exclude": [ 24 | "./**/__mocks__/*.ts", 25 | ".git", 26 | ".history", 27 | ".vscode", 28 | "cdk.out", 29 | "dist", 30 | "lib", 31 | "node_modules" 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /java/apps/calculator/docs/sample requests/custom calculation.json: -------------------------------------------------------------------------------- 1 | { 2 | "pipelineId": "abc123", 3 | "executionId": "zyx123", 4 | "groupContextId": "/", 5 | "parameters": [ 6 | { 7 | "key": "left", 8 | "type": "number" 9 | }, 10 | { 11 | "key": "right", 12 | "type": "number" 13 | } 14 | ], 15 | "transforms": [ 16 | { 17 | "index": 0, 18 | "formula": "#custom_add(:left,:right)", 19 | "outputs": [ 20 | { 21 | "index": 0, 22 | "key": "total", 23 | "type": "number" 24 | } 25 | ] 26 | } 27 | ], 28 | "csvHeader": "\"id\",\"left\",\"right\"", 29 | "csvSourceData": [ 30 | "\"item001\",2,34.8", 31 | "\"item002\",1,0.035", 32 | "\"item003\",3,2.5478" 33 | ] 34 | } -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/CalculatorActionType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | package com.aws.sif; 14 | 15 | public enum CalculatorActionType { 16 | create, 17 | delete 18 | } 19 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/DataSourceLocation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif; 15 | 16 | public enum DataSourceLocation { 17 | inline, 18 | s3 19 | } 20 | -------------------------------------------------------------------------------- /typescript/packages/libraries/proxy/src/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | export { default as proxyPlugin } from './fastify-plugins/proxy.js'; 15 | export { ProxyClient } from './proxy.client.js'; 16 | -------------------------------------------------------------------------------- /typescript/packages/apps/calculations/src/common/pkTypes.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | export enum PkType { 15 | Calculation = 'c', 16 | CalculationVersion = 'cv', 17 | CalculationActivationTime = 'ca', 18 | } 19 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sustainability-saas", 3 | "version": "0.2.0", 4 | "description": "Sustainability SaaS", 5 | "author": "Dean Hart ", 6 | "scripts": {}, 7 | "engines": { 8 | "node": ">=18.16.0 <19.0.0", 9 | "pnpm": "=8.6.8" 10 | }, 11 | "private": true, 12 | "devDependencies": { 13 | "@commitlint/cli": "^17.7.1", 14 | "@commitlint/config-conventional": "^17.7.0", 15 | "@rushstack/eslint-config": "^3.3.2", 16 | "commitlint": "17.7.1", 17 | "esbuild": "0.18.14", 18 | "eslint": "8.45.0", 19 | "husky": "8.0.3", 20 | "vite": "^4.4.4" 21 | }, 22 | "husky": { 23 | "hooks": { 24 | "pre-commit": "rush lint", 25 | "prepare-commit-msg": "exec < /dev/tty && git cz --hook || true", 26 | "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /typescript/packages/apps/reference-datasets/src/utils/pkTypes.utils.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | export enum PkType { 15 | ReferenceDataset = 'r', 16 | ReferenceDatasetVersion = 'rv', 17 | ReferenceDatasetActivationTime = 'ra' 18 | } 19 | -------------------------------------------------------------------------------- /typescript/packages/apps/concurrency-manager/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log - @sif/concurrency-manager 2 | 3 | This log was last generated on Wed, 13 Dec 2023 02:37:36 GMT and should not be manually modified. 4 | 5 | ## 0.2.2 6 | Wed, 13 Dec 2023 02:37:36 GMT 7 | 8 | ### Patches 9 | 10 | - minor modificatication including the addition of activityDownload 11 | 12 | ## 0.2.1 13 | Thu, 17 Aug 2023 02:44:14 GMT 14 | 15 | _Version update only_ 16 | 17 | ## 0.2.0 18 | Thu, 20 Jul 2023 00:30:14 GMT 19 | 20 | ### Minor changes 21 | 22 | - update node version to 18.x 23 | 24 | ### Patches 25 | 26 | - repo cleaning script added 27 | 28 | ## 0.1.1 29 | Mon, 19 Jun 2023 02:37:22 GMT 30 | 31 | _Version update only_ 32 | 33 | ## 0.1.0 34 | Mon, 29 May 2023 05:49:43 GMT 35 | 36 | ### Minor changes 37 | 38 | - service to acquire and release lock 39 | 40 | -------------------------------------------------------------------------------- /typescript/packages/libraries/authz/src/fastify-plugins/utils.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, it, expect } from 'vitest'; 2 | import { convertGroupRolesToCognitoGroups } from '../utils.js'; 3 | import { SecurityContext, SecurityScope } from '../scopes.js'; 4 | 5 | 6 | describe('utils', () => { 7 | it('should convert group roles within a security context to cognito groups', () => { 8 | const securityContext: SecurityContext = { 9 | email: 'sif-pipeline-execution', 10 | groupId: '/', 11 | groupRoles: { '/': SecurityScope.contributor, '/a': SecurityScope.contributor, '/a/b': SecurityScope.reader }, 12 | } 13 | 14 | const expected = '/|||contributor,/a|||contributor,/a/b|||reader' 15 | 16 | const actual = convertGroupRolesToCognitoGroups(securityContext.groupRoles); 17 | 18 | expect(actual).toEqual(expected); 19 | 20 | }) 21 | }) 22 | -------------------------------------------------------------------------------- /typescript/packages/libraries/resource-api-base/src/common/pkTypes.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | export enum CommonPkType { 15 | AlternateId = 'aid', 16 | Group = 'g', 17 | TagKey = 'tk', 18 | TagValue = 'tv', 19 | Partition = 'pa', 20 | } 21 | -------------------------------------------------------------------------------- /typescript/packages/apps/impacts/src/tasks/workflows/workflows.interfaces.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import type { TaskBatch } from '../schemas.js'; 15 | 16 | export interface WorkflowAction { 17 | process(task: TaskBatch): Promise; 18 | } 19 | -------------------------------------------------------------------------------- /license.header.txt: -------------------------------------------------------------------------------- 1 | #----------------------------------------------------------------------------------------------------------------------- 2 | # Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | # with the License. A copy of the License is located at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | # OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | # and limitations under the License. 12 | #----------------------------------------------------------------------------------------------------------------------- 13 | -------------------------------------------------------------------------------- /typescript/packages/apps/pipeline-processors/src/custom.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | declare module 'convert-csv-to-array' { 15 | function convertCSVToArray(data: string, options?: { separator?: string; header?: boolean; type?: string }): string[]; 16 | } 17 | -------------------------------------------------------------------------------- /typescript/packages/connectors/connector-utils/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log - @sif/connector-utils 2 | 3 | This log was last generated on Wed, 13 Dec 2023 02:37:36 GMT and should not be manually modified. 4 | 5 | ## 1.2.3 6 | Wed, 13 Dec 2023 02:37:36 GMT 7 | 8 | ### Patches 9 | 10 | - updated logging 11 | 12 | ## 1.2.2 13 | Thu, 17 Aug 2023 02:44:14 GMT 14 | 15 | ### Patches 16 | 17 | - updated pipeline attributes 18 | 19 | ## 1.2.1 20 | Fri, 28 Jul 2023 00:50:20 GMT 21 | 22 | _Version update only_ 23 | 24 | ## 1.2.0 25 | Thu, 20 Jul 2023 00:30:14 GMT 26 | 27 | ### Minor changes 28 | 29 | - update node version to 18.x 30 | 31 | ### Patches 32 | 33 | - fixed unit tests 34 | - repo cleaning script added 35 | 36 | ## 1.1.0 37 | Thu, 15 Jun 2023 23:37:53 GMT 38 | 39 | ### Minor changes 40 | 41 | - utility library shared by multiple connectors 42 | 43 | -------------------------------------------------------------------------------- /typescript/packages/libraries/clients/src/clients/sdf/accessManagement.model.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | export type CredentialsResource = { 15 | AccessKeyId: string; 16 | Expiration: string; 17 | SecretAccessKey: string; 18 | SessionToken: string; 19 | } 20 | -------------------------------------------------------------------------------- /typescript/packages/libraries/authz/src/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | export * from './fgac.js'; 15 | 16 | export { default as authzPlugin, IGroupService } from './fastify-plugins/authz.js'; 17 | export * from './scopes.js'; 18 | export * from './utils.js'; 19 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/execution/Calculator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.execution; 15 | 16 | public interface Calculator { 17 | EvaluateResponse evaluateExpression(CalculatorImpl.EvaluateExpressionRequest req); 18 | } 19 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/execution/output/OutputType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.execution.output; 15 | 16 | public enum OutputType { 17 | time, 18 | uniqueId, 19 | value, 20 | auditId, 21 | groupId 22 | } 23 | -------------------------------------------------------------------------------- /typescript/packages/apps/pipelines/src/utils/pkUtils.utils.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | export enum PkType { 15 | Pipeline = 'p', 16 | PipelineVersion = 'pv', 17 | Metric = 'k', 18 | MetricVersion = 'kv', 19 | PipelineActivationTime = 'pa', 20 | Connector = 'c', 21 | } 22 | -------------------------------------------------------------------------------- /typescript/packages/connectors/kinesis/CHANGELOG.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@sif/kinesis-pipeline-input-connector", 3 | "entries": [ 4 | { 5 | "version": "1.1.0", 6 | "tag": "@sif/kinesis-pipeline-input-connector_v1.1.0", 7 | "date": "Wed, 13 Dec 2023 02:37:37 GMT", 8 | "comments": { 9 | "minor": [ 10 | { 11 | "comment": "Added new functionality for kinesis connector" 12 | } 13 | ], 14 | "dependency": [ 15 | { 16 | "comment": "Updating dependency \"@sif/clients\" to `1.8.0`" 17 | }, 18 | { 19 | "comment": "Updating dependency \"@sif/connector-utils\" to `1.2.3`" 20 | }, 21 | { 22 | "comment": "Updating dependency \"@sif/events\" to `1.2.0`" 23 | } 24 | ] 25 | } 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /typescript/packages/libraries/clients/src/common/models.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | export interface LambdaRequestContext { 15 | authorizer: { 16 | claims: { 17 | email: string; 18 | 'cognito:groups': string; 19 | groupContextId: string; 20 | }; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /common/scripts/license-checker-monorepo.bash: -------------------------------------------------------------------------------- 1 | RESULT_FOLDER=./license-checker 2 | 3 | rm -rf "${RESULT_FOLDER}" 4 | mkdir -p "${RESULT_FOLDER}" 5 | root=$PWD 6 | 7 | find . -name package.json -not -path "*node_modules*" -not -path "*components*" > "${RESULT_FOLDER}"/license-checker.txt 8 | 9 | grep -v '^ *#' < "${RESULT_FOLDER}"/license-checker.txt | while IFS= read -r line 10 | do 11 | fullPath=${line#*./} 12 | dirPath=${fullPath%package.json*} 13 | service=$(basename "$dirPath") 14 | if [ -z "$service" ]; then 15 | service="main" 16 | fi 17 | echo "$service" 18 | cd "$root"/"$dirPath" && license-checker --csv --out "$root"/license-checker/"$service".csv 19 | done 20 | 21 | rm "$root"/license-checker/license-checker.txt 22 | 23 | pushd "${RESULT_FOLDER}" 24 | 25 | cat $(ls -t ) > largefile.csv 26 | 27 | sort largefile.csv | sort | uniq -d 28 | 29 | popd 30 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/lambdaInvoker/LambdaResponse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.lambdaInvoker; 15 | 16 | import lombok.Value; 17 | 18 | @Value 19 | public class LambdaResponse { 20 | int statusCode; 21 | T body; 22 | } 23 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/resources/referenceDatasets/DataDownload.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.resources.referenceDatasets; 15 | 16 | import lombok.Value; 17 | 18 | @Value 19 | public class DataDownload { 20 | String url; 21 | } 22 | -------------------------------------------------------------------------------- /java/apps/referencedatasets-indexer/src/main/java/com/aws/sif/IndexerService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif; 15 | 16 | import java.io.IOException; 17 | 18 | public interface IndexerService { 19 | 20 | IndexResponse process(IndexRequest request); 21 | } 22 | -------------------------------------------------------------------------------- /typescript/packages/connectors/clean-rooms/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log - @sif/clean-rooms-pipeline-input-connector 2 | 3 | This log was last generated on Wed, 13 Dec 2023 02:37:37 GMT and should not be manually modified. 4 | 5 | ## 1.2.3 6 | Wed, 13 Dec 2023 02:37:37 GMT 7 | 8 | _Version update only_ 9 | 10 | ## 1.2.2 11 | Thu, 17 Aug 2023 02:44:14 GMT 12 | 13 | _Version update only_ 14 | 15 | ## 1.2.1 16 | Fri, 28 Jul 2023 00:50:20 GMT 17 | 18 | _Version update only_ 19 | 20 | ## 1.2.0 21 | Thu, 20 Jul 2023 00:30:14 GMT 22 | 23 | ### Minor changes 24 | 25 | - update node version to 18.x 26 | 27 | ### Patches 28 | 29 | - repo cleaning script added 30 | 31 | ## 1.1.1 32 | Mon, 19 Jun 2023 02:37:22 GMT 33 | 34 | _Version update only_ 35 | 36 | ## 1.1.0 37 | Thu, 15 Jun 2023 23:37:53 GMT 38 | 39 | ### Minor changes 40 | 41 | - new connector to query data from AWS CleanRooms 42 | 43 | -------------------------------------------------------------------------------- /typescript/packages/libraries/validators/src/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | export { CalculationValidator } from './validators/calculation-validator.js'; 15 | export { TransformerValidator } from './validators/tranformer-validator.js'; 16 | export * from './validators/general-validators.js'; 17 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/S3Location.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif; 15 | 16 | import lombok.*; 17 | 18 | @Data 19 | @AllArgsConstructor 20 | @NoArgsConstructor 21 | public class S3Location { 22 | private String bucket; 23 | private String key; 24 | } 25 | -------------------------------------------------------------------------------- /typescript/packages/apps/impacts/src/common/pkTypes.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | export enum PkType { 15 | Activity = 'a', 16 | ActivityVersion = 'av', 17 | Impact = 'i', 18 | Factor = 'f', 19 | Component = 'c', 20 | ActivityTask = 'at', 21 | TaskItem = 'ati', 22 | ActivityActivationTime = 'aa' 23 | } 24 | -------------------------------------------------------------------------------- /infrastructure/tenant/src/shared/customResources/databaseSeeder.customResource.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | export const handler = async (event: any): Promise => { 15 | console.log(`databaseSeeder.customResource > handler > in : ${JSON.stringify(event)}, this custom resource does not do anything`); 16 | }; 17 | -------------------------------------------------------------------------------- /java/apps/referencedatasets-indexer/src/main/java/com/aws/sif/S3Location.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif; 15 | 16 | import lombok.*; 17 | 18 | @Data 19 | @AllArgsConstructor 20 | @NoArgsConstructor 21 | public class S3Location { 22 | private String bucket; 23 | private String key; 24 | } 25 | -------------------------------------------------------------------------------- /typescript/packages/apps/pipeline-processors/src/common/pkUtils.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | export enum PkType { 15 | Pipeline = 'p', 16 | Group = 'g', 17 | PipelineExecution = 'pe', 18 | MetricAggregationJob = 'mj', 19 | Metric = 'm', 20 | MetricVersion = 'mv', 21 | TimeUnit = 'tu', 22 | Date = 'd', 23 | } 24 | -------------------------------------------------------------------------------- /typescript/packages/apps/platform-resource-manager/CHANGELOG.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@sif/platform-resource-manager", 3 | "entries": [ 4 | { 5 | "version": "0.1.1", 6 | "tag": "@sif/platform-resource-manager_v0.1.1", 7 | "date": "Wed, 13 Dec 2023 02:37:37 GMT", 8 | "comments": { 9 | "patch": [ 10 | { 11 | "comment": "Added ability to manage platform resources shuch as shutting down the database" 12 | } 13 | ], 14 | "dependency": [ 15 | { 16 | "comment": "Updating dependency \"@sif/events\" to `1.2.0`" 17 | }, 18 | { 19 | "comment": "Updating dependency \"@sif/resource-api-base\" to `3.9.0`" 20 | }, 21 | { 22 | "comment": "Updating dependency \"@sif/concurrency-manager\" to `0.2.2`" 23 | } 24 | ] 25 | } 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /infrastructure/tenant/src/calculator/assets/migrations/1688950800000_add_audit_logs.cjs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | 15 | exports.shorthands = undefined; 16 | 17 | exports.up = pgm => { 18 | 19 | pgm.sql(`ALTER TABLE "Activity" ADD COLUMN "auditVersion" integer DEFAULT '0';`); 20 | }; 21 | 22 | exports.down = pgm => { 23 | }; 24 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/TransformParameter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif; 15 | 16 | import lombok.*; 17 | 18 | @Data 19 | @AllArgsConstructor 20 | @NoArgsConstructor 21 | @Builder 22 | public class TransformParameter { 23 | private String key; 24 | private String type; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /java/apps/calculator/src/test/java/com/aws/sif/DecodedUserTest.java: -------------------------------------------------------------------------------- 1 | package com.aws.sif; 2 | 3 | import lombok.extern.slf4j.Slf4j; 4 | import org.junit.jupiter.api.Test; 5 | 6 | import java.io.IOException; 7 | 8 | import static org.junit.jupiter.api.Assertions.assertEquals; 9 | 10 | @Slf4j 11 | public class DecodedUserTest { 12 | 13 | @Test 14 | public void happyPath() throws IOException { 15 | /* 16 | * Semgrep issue https://sg.run/05N5 17 | * Ignore reason: this is a made up token for unit test purpose 18 | */ 19 | var stringToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI0NjNlODU4YS04MWQyLTRiZTEtYjFkMC1iMTZmNjc3ZDE0YzkiLCJjb2duaXRvOmdyb3VwcyI6WyIvfHx8YWRtaW4iXX0.0GviY_WsV4rccJfDettlTBFM08sxK5VvlOsDHwktlQg"; // nosemgrep 20 | DecodedUser token = DecodedUser.getDecoded(stringToken); 21 | assertEquals("/|||admin", token.cognitoGroups[0]); 22 | assertEquals("admin", token.groups.get("/")); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/audits/AuditMessageResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.audits; 15 | 16 | import lombok.Builder; 17 | import lombok.Data; 18 | 19 | @Data 20 | @Builder 21 | public class AuditMessageResult { 22 | private Throwable exception; 23 | private boolean successful; 24 | } 25 | -------------------------------------------------------------------------------- /typescript/packages/libraries/clients/src/clients/sdf/discovery.model.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | export type AssetType = 'S3' | 'Glue'; 14 | 15 | export type S3AssetDetail = { 16 | arn: string; 17 | region: string; 18 | accountId: string; 19 | } 20 | 21 | export interface AssetMetadataResource { 22 | type: AssetType; 23 | detail: S3AssetDetail; 24 | } 25 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/resources/caml/ProductMatch.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.resources.caml; 15 | 16 | import lombok.Value; 17 | 18 | @Value 19 | public class ProductMatch { 20 | String title; 21 | String naicsCode; 22 | String beaCode; 23 | Double confidence; 24 | Double co2ePerDollar; 25 | } -------------------------------------------------------------------------------- /typescript/packages/libraries/lambda-invoker/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log - @sif/lambda-invoker 2 | 3 | This log was last generated on Thu, 20 Jul 2023 00:30:14 GMT and should not be manually modified. 4 | 5 | ## 1.1.0 6 | Thu, 20 Jul 2023 00:30:14 GMT 7 | 8 | ### Minor changes 9 | 10 | - update node version to 18.x 11 | 12 | ### Patches 13 | 14 | - repo cleaning script added 15 | 16 | ## 1.0.3 17 | Fri, 31 Mar 2023 06:04:14 GMT 18 | 19 | ### Patches 20 | 21 | - add debug logging of status code when invoking lambda 22 | 23 | ## 1.0.2 24 | Tue, 07 Feb 2023 16:06:19 GMT 25 | 26 | ### Patches 27 | 28 | - fix vulnerable dependencies 29 | 30 | ## 1.0.1 31 | Fri, 27 Jan 2023 05:24:10 GMT 32 | 33 | ### Patches 34 | 35 | - Updated AWS dependency versions. 36 | 37 | ## 1.0.0 38 | Thu, 17 Nov 2022 01:00:36 GMT 39 | 40 | ### Breaking changes 41 | 42 | - rename ssaas to sif 43 | 44 | ## 0.2.0 45 | Mon, 31 Oct 2022 16:26:46 GMT 46 | 47 | _Initial release_ 48 | 49 | -------------------------------------------------------------------------------- /infrastructure/platform/src/shared/stack.utils.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import type { App } from 'aws-cdk-lib'; 15 | 16 | export function getOrThrow(app: App, name: string): string { 17 | const attribute = app.node.tryGetContext(name) as string; 18 | if (attribute === undefined) { 19 | throw new Error(`'${name}' is required`); 20 | } 21 | return attribute; 22 | } 23 | -------------------------------------------------------------------------------- /infrastructure/tenant/src/shared/stack.utils.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import type { App } from 'aws-cdk-lib'; 15 | 16 | export function getOrThrow(app: App, name: string): string { 17 | const attribute = app.node.tryGetContext(name) as string; 18 | if (attribute === undefined) { 19 | throw new Error(`'${name}' is required`); 20 | } 21 | return attribute; 22 | } 23 | -------------------------------------------------------------------------------- /typescript/packages/libraries/resource-api-base/src/groups/models.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | export interface Group { 15 | id: string; 16 | } 17 | 18 | export interface GroupListPagination { 19 | fromGroupId: string; 20 | } 21 | 22 | export const groupHierarchyDelimiter = '/'; 23 | export const groupHierarchyDelimiterEncoded = encodeURIComponent(groupHierarchyDelimiter); 24 | -------------------------------------------------------------------------------- /typescript/packages/apps/pipelines/src/plugins/sensible.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import fp from 'fastify-plugin'; 15 | 16 | import sensible, { SensibleOptions } from '@fastify/sensible'; 17 | 18 | import type { FastifyInstance } from 'fastify'; 19 | 20 | export default fp(async (app: FastifyInstance): Promise => { 21 | await app.register(sensible); 22 | }); 23 | -------------------------------------------------------------------------------- /typescript/packages/apps/calculations/src/plugins/sensible.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import fp from 'fastify-plugin'; 15 | 16 | import sensible, { SensibleOptions } from '@fastify/sensible'; 17 | 18 | import type { FastifyInstance } from 'fastify'; 19 | 20 | export default fp(async (app: FastifyInstance): Promise => { 21 | await app.register(sensible); 22 | }); 23 | -------------------------------------------------------------------------------- /typescript/packages/libraries/deployment-helper/src/customResources/customResource.model.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | export interface CustomResourceEvent { 15 | RequestType: string; 16 | ServiceToken: string; 17 | ResponseURL: string; 18 | StackId: string; 19 | RequestId: string; 20 | LogicalResourceId: string; 21 | ResourceType: string; 22 | ResourceProperties: { [key: string]: string }; 23 | } 24 | -------------------------------------------------------------------------------- /java/apps/referencedatasets-indexer/src/main/java/com/aws/sif/di/IndexerComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.di; 15 | 16 | import com.aws.sif.HandlerStream; 17 | import dagger.Component; 18 | 19 | import javax.inject.Singleton; 20 | 21 | @Singleton 22 | @Component(modules = IndexerModule.class) 23 | public interface IndexerComponent { 24 | void inject(HandlerStream handler); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /typescript/packages/apps/pipeline-processors/src/api/activities/audits/models.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | export type obj = Record; 15 | export type Status = 'SUCCEEDED' | 'FAILED' 16 | 17 | export type QueryRequest = { 18 | [auditVersion:number]:ExecutionRequest; 19 | }; 20 | 21 | export type ExecutionRequest = { 22 | pipelineIds: string[]; 23 | executionIds: string[]; 24 | auditIds: string[]; 25 | } 26 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/S3SourceLocation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif; 15 | 16 | import lombok.*; 17 | 18 | @Data() 19 | @EqualsAndHashCode(callSuper = true) 20 | @ToString(callSuper = true) 21 | @AllArgsConstructor 22 | @NoArgsConstructor 23 | public class S3SourceLocation extends S3Location { 24 | // used if chunking only 25 | Long startByte; 26 | Long endByte; 27 | } 28 | -------------------------------------------------------------------------------- /typescript/packages/integrationTests/src/@types/index.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import { Invoker } from '@sif/lambda-invoker'; 15 | 16 | declare global { 17 | var jwts: { 18 | [email: string]: string; 19 | }; 20 | var accessManagementInvoker: Invoker; 21 | var localUserClaims: { [email: string]: string }; 22 | var forceCognitoUsage: boolean; 23 | var apicklis: { [module: string]: any }; 24 | } 25 | 26 | export {}; 27 | -------------------------------------------------------------------------------- /common/git-hooks/commit-msg.sample: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # This is an example Git hook for use with Rush. To enable this hook, rename this file 4 | # to "commit-msg" and then run "rush install", which will copy it from common/git-hooks 5 | # to the .git/hooks folder. 6 | # 7 | # TO LEARN MORE ABOUT GIT HOOKS 8 | # 9 | # The Git documentation is here: https://git-scm.com/docs/githooks 10 | # Some helpful resources: https://githooks.com 11 | # 12 | # ABOUT THIS EXAMPLE 13 | # 14 | # The commit-msg hook is called by "git commit" with one argument, the name of the file 15 | # that has the commit message. The hook should exit with non-zero status after issuing 16 | # an appropriate message if it wants to stop the commit. The hook is allowed to edit 17 | # the commit message file. 18 | 19 | # This example enforces that commit message should contain a minimum amount of 20 | # description text. 21 | if [ `cat $1 | wc -w` -lt 3 ]; then 22 | echo "" 23 | echo "Invalid commit message: The message must contain at least 3 words." 24 | exit 1 25 | fi 26 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/execution/NullValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.execution; 15 | 16 | import lombok.Data; 17 | import lombok.EqualsAndHashCode; 18 | import org.jetbrains.annotations.NotNull; 19 | 20 | @Data 21 | @EqualsAndHashCode(callSuper = true) 22 | public class NullValue extends DynamicTypeValue { 23 | @Override 24 | public String getValue() { 25 | return null; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/audits/exceptions/TimeoutExpiredException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.audits.exceptions; 15 | 16 | public class TimeoutExpiredException extends AuditDeliveryStreamException { 17 | 18 | public TimeoutExpiredException(String msg, Throwable ex) { 19 | super(msg, ex); 20 | } 21 | 22 | public TimeoutExpiredException(String msg) { 23 | super(msg); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/execution/BooleanTypeValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.execution; 15 | 16 | import lombok.Data; 17 | import lombok.EqualsAndHashCode; 18 | import lombok.Getter; 19 | import org.jetbrains.annotations.NotNull; 20 | 21 | @Data 22 | @EqualsAndHashCode(callSuper = true) 23 | public class BooleanTypeValue extends DynamicTypeValue { 24 | 25 | private final Boolean value; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /samples/typescript/connectors/sample-pipeline-input-connector/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sample-pipeline-input-connector", 3 | "description": "SIF: Sample Pipeline Input Connector.", 4 | "version": "0.1.0", 5 | "bin": { 6 | "sample-pipeline-input-connector": "bin/sample-pipeline-input-connector.js" 7 | }, 8 | "type": "module", 9 | "scripts": { 10 | "build": "tsc -b", 11 | "watch": "tsc -w", 12 | "test": "jest", 13 | "cdk": "cdk" 14 | }, 15 | "devDependencies": { 16 | "@esbuild-plugins/node-globals-polyfill": "0.2.3", 17 | "@esbuild-plugins/node-modules-polyfill": "0.2.2", 18 | "@tsconfig/node16-strictest-esm": "1.0.3", 19 | "@types/aws-lambda": "8.10.119", 20 | "@types/node": "20.11.20", 21 | "@types/prettier": "2.7.3", 22 | "aws-cdk": "2.87.0", 23 | "ts-node": "10.9.1", 24 | "typescript": "5.1.6" 25 | }, 26 | "dependencies": { 27 | "@aws-sdk/client-eventbridge": "3.370.0", 28 | "aws-cdk-lib": "2.87.0", 29 | "aws-lambda": "1.0.7", 30 | "constructs": "^10.2.69", 31 | "source-map-support": "^0.5.21" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/resources/calculations/CalculationsList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.resources.calculations; 15 | 16 | import lombok.Value; 17 | 18 | @Value 19 | public class CalculationsList { 20 | Calculation[] calculations; 21 | Pagination pagination; 22 | 23 | @Value 24 | public static class Pagination { 25 | Integer count; 26 | String lastEvaluatedId; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/resources/users/UserNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.resources.users; 15 | 16 | public class UserNotFoundException extends Exception { 17 | public UserNotFoundException(String errorMessage) { 18 | super(errorMessage); 19 | } 20 | 21 | public UserNotFoundException(String errorMessage, Throwable cause) { 22 | super(errorMessage, cause); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /typescript/packages/libraries/deployment-helper/src/customResources/customResource.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import type { CustomResourceEvent } from './customResource.model.js'; 15 | 16 | export interface CustomResource { 17 | create(customResourceEvent: CustomResourceEvent): Promise; 18 | 19 | update(customResourceEvent: CustomResourceEvent): Promise; 20 | 21 | delete(customResourceEvent: CustomResourceEvent): Promise; 22 | } 23 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/audits/exceptions/RecordCouldNotBeSentException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.audits.exceptions; 15 | 16 | public class RecordCouldNotBeSentException extends RuntimeException { 17 | 18 | public RecordCouldNotBeSentException(String msg, Throwable ex) { 19 | super(msg, ex); 20 | } 21 | 22 | public RecordCouldNotBeSentException(String msg) { 23 | super(msg); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/resources/groups/GroupNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.resources.groups; 15 | 16 | public class GroupNotFoundException extends Exception { 17 | public GroupNotFoundException(String errorMessage) { 18 | super(errorMessage); 19 | } 20 | 21 | public GroupNotFoundException(String errorMessage, Throwable cause) { 22 | super(errorMessage, cause); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/execution/output/exceptions/PipelineOutputException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.execution.output.exceptions; 15 | 16 | public class PipelineOutputException extends Exception { 17 | 18 | public PipelineOutputException(final String msg, final Throwable ex) { 19 | super(msg, ex); 20 | } 21 | 22 | public PipelineOutputException(final String msg) { 23 | super(msg); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/execution/output/exceptions/TimeoutExpiredException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.execution.output.exceptions; 15 | 16 | public class TimeoutExpiredException extends PipelineOutputException { 17 | 18 | public TimeoutExpiredException(String msg, Throwable ex) { 19 | super(msg, ex); 20 | } 21 | 22 | public TimeoutExpiredException(String msg) { 23 | super(msg); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/audits/exceptions/AuditDeliveryStreamException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.audits.exceptions; 15 | 16 | public class AuditDeliveryStreamException extends Exception { 17 | 18 | public AuditDeliveryStreamException(final String msg, final Throwable ex) { 19 | super(msg, ex); 20 | } 21 | 22 | public AuditDeliveryStreamException(final String msg) { 23 | super(msg); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/execution/StringTypeValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.execution; 15 | 16 | import lombok.Data; 17 | import lombok.EqualsAndHashCode; 18 | import lombok.ToString; 19 | import org.jetbrains.annotations.NotNull; 20 | 21 | @Data 22 | @EqualsAndHashCode(callSuper = true) 23 | @ToString(callSuper = true) 24 | public class StringTypeValue extends DynamicTypeValue { 25 | private final String value; 26 | } 27 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/resources/impacts/ActivityNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.resources.impacts; 15 | 16 | public class ActivityNotFoundException extends Exception { 17 | public ActivityNotFoundException(String errorMessage) { 18 | super(errorMessage); 19 | } 20 | 21 | public ActivityNotFoundException(String errorMessage, Throwable cause) { 22 | super(errorMessage, cause); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /typescript/packages/integrationTests/README.md: -------------------------------------------------------------------------------- 1 | ## The following env config needs defining per environment: 2 | 3 | Running integration tests locally: 4 | 5 | ```ini 6 | NODE_ENV=local 7 | ``` 8 | 9 | Running integration tests on a live environment: 10 | NOTE: the admin user/pass needs to be confirmed and have password reset for new users. 11 | 12 | ```ini 13 | NODE_ENV= 14 | AWS_REGION= 15 | 16 | ADMIN_USER_PASSWORD= 17 | ADMIN_USER_USERNAME= 18 | COGNITO_CLIENT_ID= 19 | 20 | ACCESS_MANAGEMENT_BASE_URL= 21 | IMPACTS_BASE_URL= 22 | CALCULATIONS_BASE_URL= 23 | PIPELINE_PROCESSOR_BASE_URL= 24 | PIPELINES_BASE_URL= 25 | REFERENCE_DATASETS_BASE_URL= 26 | 27 | ACTIVITIES_TABLE_NAME= 28 | ``` 29 | 30 | Run the following command to run the tests 31 | 32 | ```shell 33 | # if specifying each env var on the command line 34 | > export =; rushx test 35 | 36 | # or if instead having all the env vars stored in env.bash 37 | > . ; rushx test 38 | # or for specific tests... 39 | > . ; rushx test -- dist/features/assetlibrary/ 40 | 41 | ``` 42 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/execution/output/exceptions/RecordCouldNotBeSentException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.execution.output.exceptions; 15 | 16 | public class RecordCouldNotBeSentException extends RuntimeException { 17 | 18 | public RecordCouldNotBeSentException(String msg, Throwable ex) { 19 | super(msg, ex); 20 | } 21 | 22 | public RecordCouldNotBeSentException(String msg) { 23 | super(msg); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /java/apps/referencedatasets-indexer/src/main/java/com/aws/sif/S3SourceLocation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif; 15 | 16 | import lombok.*; 17 | 18 | @Data() 19 | @EqualsAndHashCode(callSuper = true) 20 | @ToString(callSuper = true) 21 | @AllArgsConstructor 22 | @NoArgsConstructor 23 | public class S3SourceLocation extends S3Location { 24 | 25 | boolean containsHeader = false; 26 | 27 | // used if chunking only 28 | Long startByte; 29 | Long endByte; 30 | } 31 | -------------------------------------------------------------------------------- /typescript/packages/apps/pipelines/src/lambda_apiGateway.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import awsLambdaFastify, { PromiseHandler } from '@fastify/aws-lambda'; 15 | import { buildApp } from './app.js'; 16 | import type { FastifyInstance } from 'fastify'; 17 | 18 | const server: FastifyInstance = await buildApp(); 19 | 20 | export const handler: PromiseHandler = awsLambdaFastify(server, { 21 | decorateRequest: false, 22 | serializeLambdaArguments: true, 23 | }); 24 | 25 | await server.ready(); 26 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/Transform.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif; 15 | 16 | import lombok.AllArgsConstructor; 17 | import lombok.Builder; 18 | import lombok.Data; 19 | import lombok.NoArgsConstructor; 20 | 21 | import java.util.List; 22 | 23 | @Data 24 | @AllArgsConstructor 25 | @NoArgsConstructor 26 | @Builder 27 | public class Transform { 28 | private int index; 29 | private String formula; 30 | private List outputs; 31 | } 32 | -------------------------------------------------------------------------------- /typescript/packages/libraries/resource-api-base/src/common/models.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import type { NativeAttributeValue } from '@aws-sdk/util-dynamodb'; 15 | import type { Static } from '@sinclair/typebox'; 16 | import type { configuration, configurationSource } from './schemas'; 17 | 18 | export type DynamoDbItem = Record; 19 | export type Configuration = Static; 20 | export type ConfigurationSource = Static; 21 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/resources/calculations/CalculationNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.resources.calculations; 15 | 16 | public class CalculationNotFoundException extends Exception { 17 | public CalculationNotFoundException(String errorMessage) { 18 | super(errorMessage); 19 | } 20 | 21 | public CalculationNotFoundException(String errorMessage, Throwable cause) { 22 | super(errorMessage, cause); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /typescript/packages/apps/impacts/src/lambda_apiGateway.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import awsLambdaFastify, { PromiseHandler } from '@fastify/aws-lambda'; 15 | 16 | import { buildApp } from './app.js'; 17 | 18 | import type { FastifyInstance } from 'fastify'; 19 | 20 | const server: FastifyInstance = await buildApp(); 21 | 22 | export const handler: PromiseHandler = awsLambdaFastify(server, { 23 | decorateRequest: false, 24 | serializeLambdaArguments: true, 25 | }); 26 | 27 | await server.ready(); 28 | -------------------------------------------------------------------------------- /typescript/packages/apps/pipeline-processors/src/lambda_apiGateway.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import awsLambdaFastify, { PromiseHandler } from '@fastify/aws-lambda'; 15 | import { buildApp } from './app.js'; 16 | import type { FastifyInstance } from 'fastify'; 17 | 18 | const server: FastifyInstance = await buildApp(); 19 | 20 | export const handler: PromiseHandler = awsLambdaFastify(server, { 21 | decorateRequest: false, 22 | serializeLambdaArguments: true, 23 | }); 24 | 25 | await server.ready(); 26 | -------------------------------------------------------------------------------- /typescript/packages/apps/reference-datasets/src/lambda_apiGateway.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import awsLambdaFastify, { PromiseHandler } from '@fastify/aws-lambda'; 15 | import { buildApp } from './app.js'; 16 | import type { FastifyInstance } from 'fastify'; 17 | 18 | const server: FastifyInstance = await buildApp(); 19 | 20 | export const handler: PromiseHandler = awsLambdaFastify(server, { 21 | decorateRequest: false, 22 | serializeLambdaArguments: true, 23 | }); 24 | 25 | await server.ready(); 26 | -------------------------------------------------------------------------------- /typescript/packages/apps/calculations/src/lambda_apiGateway.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import awsLambdaFastify, { PromiseHandler } from '@fastify/aws-lambda'; 15 | 16 | import { buildApp } from './app.js'; 17 | 18 | import type { FastifyInstance } from 'fastify'; 19 | 20 | const server: FastifyInstance = await buildApp(); 21 | 22 | export const handler: PromiseHandler = awsLambdaFastify(server, { 23 | decorateRequest: false, 24 | serializeLambdaArguments: true, 25 | }); 26 | 27 | await server.ready(); 28 | -------------------------------------------------------------------------------- /typescript/packages/apps/platform-resource-manager/src/lambda_apiGateway.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import awsLambdaFastify, { PromiseHandler } from '@fastify/aws-lambda'; 15 | import { buildApp } from './app.js'; 16 | import type { FastifyInstance } from 'fastify'; 17 | 18 | const server: FastifyInstance = await buildApp(); 19 | 20 | export const handler: PromiseHandler = awsLambdaFastify(server, { 21 | decorateRequest: false, 22 | serializeLambdaArguments: true, 23 | }); 24 | 25 | await server.ready(); 26 | -------------------------------------------------------------------------------- /typescript/packages/apps/access-management/src/lambda_apiGateway.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import awsLambdaFastify, { PromiseHandler } from '@fastify/aws-lambda'; 15 | 16 | import { buildApp } from './app.js'; 17 | 18 | import type { FastifyInstance } from 'fastify'; 19 | 20 | const server: FastifyInstance = await buildApp(); 21 | 22 | export const handler: PromiseHandler = awsLambdaFastify(server, { 23 | decorateRequest: false, 24 | serializeLambdaArguments: true, 25 | }); 26 | 27 | await server.ready(); 28 | -------------------------------------------------------------------------------- /infrastructure/tenant/src/calculator/assets/migrations/1683684169000_remove-trigger.cjs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | /* eslint-disable camelcase */ 15 | 16 | exports.shorthands = undefined; 17 | 18 | exports.up = pgm => { 19 | const tables = ['ActivityNumberValue', 'ActivityStringValue', 'ActivityBooleanValue', 'ActivityDateTimeValue']; 20 | tables.forEach(tableName => { 21 | pgm.dropTrigger(tableName, `latest${tableName}Trigger`, { ifExist: true }); 22 | }); 23 | }; 24 | 25 | exports.down = pgm => { 26 | }; 27 | 28 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/execution/ErrorValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.execution; 15 | 16 | import lombok.Data; 17 | import lombok.EqualsAndHashCode; 18 | import org.jetbrains.annotations.NotNull; 19 | 20 | @Data 21 | @EqualsAndHashCode(callSuper = true) 22 | public class ErrorValue extends DynamicTypeValue { 23 | private final String errorMessage; 24 | 25 | @Override 26 | public String getValue() { 27 | return null; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /infrastructure/tenant/src/calculator/assets/migrations/1683208822000_metricvalue-index.cjs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | /* eslint-disable camelcase */ 15 | 16 | exports.shorthands = undefined; 17 | 18 | exports.up = pgm => { 19 | 20 | /* add "executionId" to the MetricValue primary key */ 21 | pgm.sql( 22 | `ALTER TABLE ONLY "MetricValue" DROP CONSTRAINT "MetricValue_pkey";` + 23 | `ALTER TABLE ONLY "MetricValue" ADD CONSTRAINT "MetricValue_pk" PRIMARY KEY ("metricId", "createdAt", "executionId");`); 24 | 25 | }; 26 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/resources/referenceDatasets/ReferenceDatasetNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.resources.referenceDatasets; 15 | 16 | public class ReferenceDatasetNotFoundException extends Exception { 17 | public ReferenceDatasetNotFoundException(String errorMessage) { 18 | super(errorMessage); 19 | } 20 | 21 | public ReferenceDatasetNotFoundException(String errorMessage, Throwable cause) { 22 | super(errorMessage, cause); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/di/CalculatorComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.di; 15 | 16 | import com.aws.sif.HandlerStream; 17 | import com.aws.sif.resources.calculations.CalculationsClient; 18 | import dagger.Component; 19 | 20 | import javax.inject.Singleton; 21 | 22 | @Singleton 23 | @Component(modules = CalculatorModule.class) 24 | public interface CalculatorComponent { 25 | 26 | void inject(HandlerStream handler); 27 | 28 | CalculationsClient buildCalculationsClient(); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/resources/impacts/ActivitiesList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.resources.impacts; 15 | 16 | import lombok.Value; 17 | 18 | @Value 19 | public class ActivitiesList { 20 | Activity[] activities; 21 | Pagination pagination; 22 | 23 | @Value 24 | public static class Pagination { 25 | Integer count; 26 | LastEvaluated lastEvaluated; 27 | } 28 | @Value 29 | public static class LastEvaluated { 30 | String id; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /typescript/packages/apps/impacts/src/impacts/validator.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import { ActivityDefinitionError } from '../common/errors.js'; 15 | 16 | export class ImpactValidator { 17 | 18 | public validateName(name: string): void { 19 | // Validation - ensure that the name is supplied an in correct format 20 | const nameRegex = /[A-Za-z0-9-_:\/]/gm; 21 | if(!name.match(nameRegex)){ 22 | throw new ActivityDefinitionError(`Activity name must us the following chars: ${nameRegex}`); 23 | } 24 | 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /infrastructure/tenant/src/calculator/assets/migrations/1679531506238_uuid-audit.cjs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | /* eslint-disable camelcase */ 15 | 16 | exports.shorthands = undefined; 17 | 18 | exports.up = pgm => { 19 | const tables = ['ActivityNumberValue', 'ActivityStringValue', 'ActivityBooleanValue', 'ActivityDateTimeValue']; 20 | tables.forEach(tableName => { 21 | pgm.addColumns(tableName, { 22 | auditId: { 23 | type: 'uuid', notNull: false, after: 'val' 24 | } 25 | }); 26 | }); 27 | }; 28 | 29 | exports.down = pgm => { 30 | }; 31 | -------------------------------------------------------------------------------- /infrastructure/tenant/src/calculator/assets/migrations/1684736280000_add_aws_extension.cjs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | 15 | exports.shorthands = undefined; 16 | 17 | exports.up = pgm => { 18 | pgm.sql(`CREATE EXTENSION IF NOT EXISTS aws_commons;`); 19 | pgm.sql(`CREATE EXTENSION IF NOT EXISTS aws_s3 CASCADE;`); 20 | pgm.sql(`GRANT USAGE ON schema aws_s3 TO ${process.env['TENANT_USERNAME']};`); 21 | pgm.sql(`GRANT ALL ON ALL FUNCTIONS IN SCHEMA aws_s3 TO ${process.env['TENANT_USERNAME']};`); 22 | }; 23 | 24 | 25 | exports.down = pgm => { 26 | }; 27 | -------------------------------------------------------------------------------- /typescript/packages/apps/impacts/src/activities/validator.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import { ActivityDefinitionError } from '../common/errors.js'; 15 | 16 | export class ActivityValidator { 17 | 18 | public validateName(name: string): void { 19 | // Validation - ensure that the name is supplied an in correct format 20 | const nameRegex = /[A-Za-z0-9-_:\/]/gm; 21 | if(!name.match(nameRegex)){ 22 | throw new ActivityDefinitionError(`Activity name must us the following chars: ${nameRegex}`); 23 | } 24 | 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /typescript/packages/integrationTests/src/features/support/impacts_hooks.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import { Before } from '@cucumber/cucumber'; 15 | import { createApi } from './util.js'; 16 | 17 | Before({ tags: '@setup_impacts' }, async function () { 18 | global.forceCognitoUsage = true; 19 | const baseUrl = process.env.IMPACTS_BASE_URL as string; 20 | 21 | if (!baseUrl) { 22 | throw new Error('ENV VAR: IMPACTS_BASE_URL not defined'); 23 | } 24 | 25 | this['apickli'] = await createApi(process.env.NODE_ENV as string, baseUrl, {}); 26 | }); 27 | -------------------------------------------------------------------------------- /typescript/packages/integrationTests/src/features/support/pipelines_hooks.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import { Before } from '@cucumber/cucumber'; 15 | import { createApi } from './util.js'; 16 | 17 | Before({ tags: '@setup_pipelines' }, async function () { 18 | global.forceCognitoUsage = true; 19 | 20 | if (!process.env.PIPELINES_BASE_URL) { 21 | throw new Error('ENV VAR: PIPELINES_BASE_URL not defined'); 22 | } 23 | 24 | this['apickli'] = await createApi(process.env.NODE_ENV as string, process.env.PIPELINES_BASE_URL as string, {}); 25 | }); 26 | -------------------------------------------------------------------------------- /typescript/packages/apps/impacts/src/components/validator.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import { ActivityDefinitionError } from '../common/errors.js'; 15 | 16 | export class ComponentValidator { 17 | public validateKey(name: string | number): void { 18 | // Validation - ensure that the name is supplied an in correct format 19 | const nameRegex = /[A-Za-z0-9-_:\/]/gm; 20 | if (typeof name === 'string' && !name.match(nameRegex)) { 21 | throw new ActivityDefinitionError(`Activity name must us the following chars: ${nameRegex}`); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /typescript/packages/libraries/cdk-common/CHANGELOG.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@sif/cdk-common", 3 | "entries": [ 4 | { 5 | "version": "1.1.0", 6 | "tag": "@sif/cdk-common_v1.1.0", 7 | "date": "Wed, 13 Dec 2023 02:37:36 GMT", 8 | "comments": { 9 | "minor": [ 10 | { 11 | "comment": "new utility function to list version information based on github releases" 12 | } 13 | ] 14 | } 15 | }, 16 | { 17 | "version": "1.0.0", 18 | "tag": "@sif/cdk-common_v1.0.0", 19 | "date": "Thu, 17 Aug 2023 02:44:14 GMT", 20 | "comments": { 21 | "none": [ 22 | { 23 | "comment": "Initial release with function to select Lambda architecture" 24 | } 25 | ] 26 | } 27 | }, 28 | { 29 | "version": "1.51.0", 30 | "tag": "@sif/dynamodb-seeder_v1.51.0", 31 | "date": "Thu, 20 Jul 2023 00:30:14 GMT", 32 | "comments": { 33 | "minor": [ 34 | { 35 | "comment": "fork the @cloudcomponents/cdk-dynamodb-seeder to sif" 36 | } 37 | ] 38 | } 39 | } 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /cicd/increment_version.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 7 | # with the License. A copy of the License is located at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 12 | # OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 13 | # and limitations under the License. 14 | # 15 | 16 | set -e 17 | 18 | echo increment_version started on `date` 19 | 20 | echo "enforce need for changelog" 21 | rush change -v 22 | 23 | echo "Applying version updates" 24 | rush publish -a 25 | 26 | echo Committing updated files 27 | set +e 28 | git add -A 29 | git update-index --refresh 30 | git diff-index --quiet HEAD -- ; differences=$? 31 | set -e 32 | if [ $differences -eq 1 ]; then 33 | git commit -am 'ci(@sif) buildproject_prebuild [skip ci]' 34 | git push origin HEAD:$BRANCH 35 | fi 36 | 37 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/TransformOutput.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif; 15 | 16 | import lombok.AllArgsConstructor; 17 | import lombok.Builder; 18 | import lombok.Data; 19 | import lombok.NoArgsConstructor; 20 | 21 | @Data 22 | @AllArgsConstructor 23 | @NoArgsConstructor 24 | @Builder 25 | public class TransformOutput { 26 | private int index; 27 | private String key; 28 | private String type; 29 | private Boolean includeAsUnique; 30 | private String _keyMapping; 31 | private String[] metrics; 32 | } 33 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/resources/referenceDatasets/DatasetsList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.resources.referenceDatasets; 15 | 16 | import lombok.Value; 17 | 18 | @Value 19 | public class DatasetsList { 20 | Dataset[] referenceDatasets; 21 | Pagination pagination; 22 | 23 | @Value 24 | public static class Pagination { 25 | Integer count; 26 | LastEvaluated lastEvaluated; 27 | } 28 | @Value 29 | public static class LastEvaluated { 30 | String id; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /typescript/packages/libraries/validators/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@sif/validators", 3 | "version": "1.3.1", 4 | "description": "Validation library to validate calculations and transforms", 5 | "author": "Hassan Khokhar ", 6 | "exports": { 7 | ".": { 8 | "import": "./dist/index.js", 9 | "require": "./dist/index.cjs" 10 | } 11 | }, 12 | "main": "./dist/index.cjs", 13 | "types": "./dist/index.d.js", 14 | "type": "module", 15 | "scripts": { 16 | "clean:package": "npx shx rm -rf dist *.log .rush tsconfig.tsbuildinfo", 17 | "build": "npx tsc -b", 18 | "test": "npm run build && vitest run" 19 | }, 20 | "dependencies": { 21 | "validator": "13.9.0" 22 | }, 23 | "devDependencies": { 24 | "@tsconfig/node16-strictest-esm": "1.0.3", 25 | "@types/node": "20.11.20", 26 | "@types/prettier": "2.7.3", 27 | "@typescript-eslint/eslint-plugin": "6.1.0", 28 | "@typescript-eslint/parser": "6.1.0", 29 | "eslint": "8.45.0", 30 | "pino": "8.14.1", 31 | "shx": "0.3.4", 32 | "ts-node": "10.9.1", 33 | "typescript": "5.1.6", 34 | "vitest-mock-extended": "1.1.4", 35 | "vitest": "0.33.0" 36 | }, 37 | "private": false 38 | } 39 | -------------------------------------------------------------------------------- /typescript/packages/integrationTests/src/features/support/calculations_hooks.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import { Before } from '@cucumber/cucumber'; 15 | 16 | import { createApi } from './util.js'; 17 | 18 | Before({ tags: '@setup_calculations' }, async function () { 19 | global.forceCognitoUsage = true; 20 | 21 | const baseUrl = process.env.CALCULATIONS_BASE_URL as string; 22 | 23 | if (!baseUrl) { 24 | throw new Error('ENV VAR: CALCULATIONS_BASE_URL not defined'); 25 | } 26 | 27 | this['apickli'] = await createApi(process.env.NODE_ENV as string, baseUrl, {}); 28 | }); 29 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/execution/EvaluateResponse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.execution; 15 | 16 | import lombok.Builder; 17 | import lombok.Data; 18 | 19 | import java.util.List; 20 | import java.util.Map; 21 | 22 | @Data 23 | @Builder 24 | public class EvaluateResponse { 25 | private final DynamicTypeValue result; 26 | private Map evaluated; 27 | private List> activities; 28 | private List> calculations; 29 | private List> referenceDatasets; 30 | } 31 | -------------------------------------------------------------------------------- /typescript/packages/libraries/events/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log - @sif/events 2 | 3 | This log was last generated on Wed, 13 Dec 2023 02:37:36 GMT and should not be manually modified. 4 | 5 | ## 1.2.0 6 | Wed, 13 Dec 2023 02:37:36 GMT 7 | 8 | ### Minor changes 9 | 10 | - Added new event type for connector setup 11 | 12 | ## 1.1.0 13 | Thu, 20 Jul 2023 00:30:14 GMT 14 | 15 | ### Minor changes 16 | 17 | - update node version to 18.x 18 | 19 | ### Patches 20 | 21 | - repo cleaning script added 22 | 23 | ## 1.0.3 24 | Fri, 31 Mar 2023 06:04:14 GMT 25 | 26 | ### Patches 27 | 28 | - minor updates 29 | 30 | ## 1.0.2 31 | Tue, 07 Feb 2023 16:06:19 GMT 32 | 33 | ### Patches 34 | 35 | - fix vulnerable dependencies 36 | 37 | ## 1.0.1 38 | Fri, 27 Jan 2023 05:24:10 GMT 39 | 40 | ### Patches 41 | 42 | - Updated AWS dependency versions. 43 | 44 | ## 1.0.0 45 | Thu, 17 Nov 2022 01:00:36 GMT 46 | 47 | ### Breaking changes 48 | 49 | - rename ssaas to sif 50 | 51 | ## 0.2.1 52 | Tue, 08 Nov 2022 23:58:39 GMT 53 | 54 | ### Patches 55 | 56 | - event payload should include error if operation failed 57 | 58 | ## 0.2.0 59 | Mon, 31 Oct 2022 16:26:46 GMT 60 | 61 | _Initial release_ 62 | 63 | -------------------------------------------------------------------------------- /java/apps/referencedatasets-indexer/src/main/java/com/aws/sif/IndexResponse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif; 15 | 16 | import lombok.AllArgsConstructor; 17 | import lombok.Builder; 18 | import lombok.Data; 19 | import lombok.NoArgsConstructor; 20 | 21 | @Builder 22 | @Data 23 | @AllArgsConstructor 24 | @NoArgsConstructor 25 | public class IndexResponse { 26 | protected String id; 27 | 28 | protected String status; 29 | protected String statusMessage; 30 | 31 | protected String groupId; 32 | 33 | protected S3Location indexS3Location; 34 | 35 | 36 | } 37 | -------------------------------------------------------------------------------- /typescript/packages/integrationTests/src/features/support/referenceDatasets_hooks.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import { Before } from '@cucumber/cucumber'; 15 | import { createApi } from './util'; 16 | 17 | Before({ tags: '@setup_referenceDatasets' }, async function () { 18 | global.forceCognitoUsage = true; 19 | const baseUrl = process.env.REFERENCE_DATASETS_BASE_URL as string; 20 | 21 | if (!baseUrl) { 22 | throw new Error('ENV VAR: REFERENCE_DATASETS_BASE_URL not defined'); 23 | } 24 | 25 | this['apickli'] = await createApi(process.env.NODE_ENV as string, baseUrl, {}); 26 | }); 27 | -------------------------------------------------------------------------------- /java/apps/referencedatasets-indexer/src/main/java/com/aws/sif/CustomAnalyzer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif; 15 | 16 | import org.apache.lucene.analysis.*; 17 | import org.apache.lucene.analysis.standard.StandardTokenizer; 18 | 19 | 20 | public class CustomAnalyzer extends Analyzer { 21 | @Override 22 | protected TokenStreamComponents createComponents(String s) { 23 | Tokenizer tokenizer = new StandardTokenizer(); 24 | TokenStream filter = new LowerCaseFilter(tokenizer); 25 | return new TokenStreamComponents(tokenizer, filter); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /typescript/packages/apps/audit-log-depositor/src/depositor.ts: -------------------------------------------------------------------------------- 1 | import { PutObjectCommand, PutObjectCommandOutput, S3Client } from '@aws-sdk/client-s3'; 2 | import type { Logger } from 'pino'; 3 | import pLimit from 'p-limit'; 4 | 5 | export class Depositor { 6 | public constructor(private log: Logger, private s3Client: S3Client, private bucket: string, private concurrencyLimit: number) {} 7 | 8 | public async deposit(messages: AuditMessages): Promise { 9 | this.log.debug(`Depositor> put> in> count:${messages.logs.length}`); 10 | 11 | const futures: Promise[] = []; 12 | const limit = pLimit(this.concurrencyLimit); 13 | for (const message of messages.logs) { 14 | futures.push(limit(() => this.put(message))); 15 | } 16 | await Promise.all(futures); 17 | } 18 | 19 | private async put(message: AuditMessage): Promise { 20 | this.log.debug(`Depositor> put> in> message:${JSON.stringify(message)}`); 21 | 22 | const cmd: PutObjectCommand = new PutObjectCommand({ 23 | Bucket: this.bucket, 24 | Key: message.key, 25 | Body: JSON.stringify(message.auditLog), 26 | }); 27 | return await this.s3Client.send(cmd); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /typescript/packages/connectors/clean-rooms/src/clean-rooms/cleanRooms.model.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import type { Pipeline } from '@sif/clients'; 15 | 16 | export class InvalidQueryError extends Error { 17 | public constructor(message: string) { 18 | super(message); 19 | this.name = 'InvalidQueryError'; 20 | } 21 | } 22 | 23 | export interface ProtectedQueryDetail { 24 | queryId: string; 25 | transformedInputUploadUrl: string; 26 | executionId: string; 27 | pipeline: Pipeline; 28 | membershipId: string; 29 | } 30 | 31 | export enum PkType { 32 | Execution = 'e', 33 | Query = 'q' 34 | } 35 | -------------------------------------------------------------------------------- /typescript/packages/libraries/cdk-common/src/context/util.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | import type { App } from 'aws-cdk-lib'; 14 | 15 | const tryGetBooleanContext = (app: App, contextName: string, defaultValue: boolean): boolean => { 16 | const contextValue = app.node.tryGetContext(contextName); 17 | if (contextValue === undefined) return defaultValue; 18 | // if it's boolean return as it is 19 | if (typeof contextValue === 'boolean') return contextValue; 20 | // if it's string check if its equal to 'true' 21 | return contextValue === 'true'; 22 | }; 23 | 24 | export { 25 | tryGetBooleanContext 26 | }; 27 | -------------------------------------------------------------------------------- /typescript/packages/libraries/resource-api-base/src/tags/models.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | export interface TagListOptions { 15 | count?: number; 16 | exclusiveStart?: TagListPaginationKey; 17 | } 18 | export interface TagListPaginationKey { 19 | key: string; 20 | value: string; 21 | } 22 | 23 | export interface TagValueListOptions { 24 | parentTagValue?: string; 25 | count?: number; 26 | exclusiveStart?: TagValueListPaginationKey; 27 | resourceKeyPrefix: string; 28 | } 29 | export interface TagValueListPaginationKey { 30 | value: string; 31 | } 32 | 33 | export const tagHierarchyDelimiter = '/'; 34 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/resources/users/User.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.resources.users; 15 | 16 | import lombok.AllArgsConstructor; 17 | import lombok.NoArgsConstructor; 18 | import lombok.Value; 19 | import org.joda.time.DateTime; 20 | 21 | import java.util.Map; 22 | 23 | @Value 24 | public class User { 25 | String email; 26 | String state; 27 | Map groups; 28 | Map tags; 29 | String defaultGroup; 30 | String createdBy; 31 | DateTime createdAt; 32 | String updatedBy; 33 | DateTime updatedAt; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /java/apps/calculator/src/main/java/com/aws/sif/resources/referenceDatasets/Dataset.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | package com.aws.sif.resources.referenceDatasets; 15 | 16 | import lombok.Value; 17 | import org.joda.time.DateTime; 18 | 19 | import java.util.Map; 20 | 21 | @Value 22 | public class Dataset { 23 | String id; 24 | String label; 25 | String description; 26 | String[] datasetHeaders; 27 | Integer version; 28 | String state; 29 | String[] groups; 30 | Map tags; 31 | String createdBy; 32 | DateTime createdAt; 33 | String updatedBy; 34 | DateTime updatedAt; 35 | } 36 | -------------------------------------------------------------------------------- /typescript/packages/apps/platform-resource-manager/src/actions/service.ts: -------------------------------------------------------------------------------- 1 | import type { FastifyBaseLogger } from 'fastify'; 2 | import type { ActionResource, ActionServiceBase } from './schema.js'; 3 | import { InvalidRequestError } from '@sif/resource-api-base'; 4 | import { AuroraService } from './aurora.service.js'; 5 | 6 | export class ActionService { 7 | private readonly serviceMap: { [name: string]: ActionServiceBase }; 8 | 9 | constructor(private logger: FastifyBaseLogger, auroraService: AuroraService) { 10 | this.serviceMap = { 11 | [AuroraService.resourceName]: auroraService 12 | }; 13 | } 14 | 15 | public async create(actionResource: ActionResource): Promise { 16 | this.logger.trace(`ActionsService > create > actionResource: ${JSON.stringify(actionResource)}`); 17 | 18 | if (!this.serviceMap?.[actionResource.id]?.[actionResource.action] === undefined) { 19 | throw new InvalidRequestError(`Resource ${actionResource.id} or action ${actionResource.action} does not exists`); 20 | } 21 | this.serviceMap[actionResource.id].validateParameters(actionResource); 22 | await this.serviceMap[actionResource.id][actionResource.action](); 23 | this.logger.trace(`ActionsService > exit >`); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /infrastructure/tenant/src/calculator/assets/migrations/1678257642475_add-row-type.cjs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | /* eslint-disable camelcase */ 15 | exports.shorthands = undefined; 16 | 17 | exports.up = (pgm) => { 18 | pgm.addColumns('Activity', { 19 | type: { 20 | type: 'char(12)', 21 | notNull: true, 22 | default: 'raw', 23 | after: 'date', 24 | }, 25 | }); 26 | pgm.dropConstraint('Activity', 'Activity_ukey'); 27 | 28 | pgm.addConstraint('Activity', 'Activity_ukey', { 29 | unique: ['groupId', 'pipelineId', 'date', 'type', 'key1', 'key2', 'key3', 'key4', 'key5'], 30 | }); 31 | }; 32 | 33 | exports.down = (pgm) => {}; 34 | -------------------------------------------------------------------------------- /typescript/packages/apps/pipeline-processors/src/utils/s3Export.utils.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | 15 | export function exportDataToS3Query(queryString:string, bucket:string, key:string):string { 16 | 17 | const exportQuery = `SELECT * from aws_s3.query_export_to_s3( 18 | '${queryString}', 19 | aws_commons.create_s3_uri( 20 | '${bucket}', 21 | '${key}', 22 | '${process.env['AWS_REGION']}' 23 | ), 24 | options :='format csv , HEADER true' 25 | ); 26 | ` 27 | return exportQuery; 28 | }; 29 | 30 | export function prepareS3ExportQuery(queryString:string):string{ 31 | return queryString.replaceAll('\'','\'\''); 32 | } 33 | -------------------------------------------------------------------------------- /typescript/packages/libraries/authz/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@sif/authz", 3 | "description": "SIF: Common authz related functionality", 4 | "version": "2.2.0", 5 | "author": "Dean Hart ", 6 | "exports": { 7 | ".": { 8 | "import": "./dist/index.js", 9 | "require": "./dist/index.cjs" 10 | } 11 | }, 12 | "main": "./dist/index.cjs", 13 | "types": "./dist/index.d.js", 14 | "type": "module", 15 | "scripts": { 16 | "clean:package": "npx shx rm -rf dist *.log .rush tsconfig.tsbuildinfo", 17 | "build": "npx tsc -b", 18 | "test": "npm run build && vitest run" 19 | }, 20 | "dependencies": { 21 | "@fastify/sensible": "5.2.0", 22 | "fastify-plugin": "4.5.0", 23 | "fastify": "4.20.0", 24 | "jwt-decode": "3.1.2" 25 | }, 26 | "devDependencies": { 27 | "@tsconfig/node16-strictest-esm": "1.0.3", 28 | 29 | "@types/node": "20.11.20", 30 | "@types/prettier": "2.7.3", 31 | "@typescript-eslint/eslint-plugin": "6.1.0", 32 | "@typescript-eslint/parser": "6.1.0", 33 | "eslint": "8.45.0", 34 | "pino": "8.14.1", 35 | "shx": "0.3.4", 36 | "ts-node": "10.9.1", 37 | "typescript": "5.1.6", 38 | "vitest": "0.33.0", 39 | "vitest-mock-extended": "1.1.4" 40 | }, 41 | "private": false 42 | } 43 | -------------------------------------------------------------------------------- /java/apps/calculator/src/test/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | 17 | 18 | 19 | %d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /typescript/packages/apps/impacts/src/server.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance 5 | * with the License. A copy of the License is located at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES 10 | * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions 11 | * and limitations under the License. 12 | */ 13 | 14 | import url from 'url'; 15 | import { buildApp } from './app.js'; 16 | 17 | const startServer = async (): Promise => { 18 | const app = await buildApp(); 19 | try { 20 | await app.listen({ port: app.config.PORT, host: '0.0.0.0' }); 21 | } catch (err) { 22 | app.log.error(err); 23 | process.exit(1); 24 | } 25 | }; 26 | 27 | // if called directly, e.g. local dev, start the fastify server 28 | const path: string = process.argv[1] as string; 29 | const href: string = url.pathToFileURL(path).href; 30 | if (import.meta.url === href) { 31 | await startServer(); 32 | } 33 | --------------------------------------------------------------------------------