diff --git a/.DS_Store b/.DS_Store index a738d68..b25ce27 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/package-lock.json b/package-lock.json index b9b5459..160f49d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6895,92 +6895,6 @@ } } }, - "node_modules/@sourceloop/ctrl-plane-subscription-service": { - "version": "0.2.0", - "resolved": "file:services/subscription-service/sourceloop-ctrl-plane-subscription-service-0.2.0.tgz", - "integrity": "sha512-kPJBxU3dhf1/IkPEyWS+4hWcClnohGzLRH7avfAJuyXPgd2z6108bwIDlZ3V52pMefwFAC6ZapK7PZwOn/OjeA==", - "dependencies": { - "@loopback/boot": "^7.0.2", - "@loopback/context": "^7.0.2", - "@loopback/core": "^6.0.2", - "@loopback/openapi-v3": "^10.0.2", - "@loopback/repository": "^7.0.2", - "@loopback/rest": "^14.0.2", - "@loopback/rest-explorer": "^7.0.2", - "@loopback/service-proxy": "^7.0.2", - "@opentelemetry/exporter-jaeger": "^1.15.0", - "@opentelemetry/plugin-dns": "^0.15.0", - "@opentelemetry/plugin-http": "^0.18.2", - "@opentelemetry/plugin-https": "^0.18.2", - "@opentelemetry/plugin-pg": "^0.15.0", - "@opentelemetry/plugin-pg-pool": "^0.15.0", - "@opentelemetry/sdk-trace-base": "^1.15.0", - "@opentelemetry/sdk-trace-node": "^1.15.0", - "@sourceloop/core": "^14.1.0", - "@sourceloop/feature-toggle-service": "^3.0.0", - "@types/jsonwebtoken": "^9.0.5", - "dotenv": "^16.0.3", - "dotenv-extended": "^2.9.0", - "loopback-connector-postgresql": "^7.1.1", - "loopback4-authentication": "^12.0.2", - "loopback4-authorization": "^7.0.2", - "swagger-stats": "^0.99.5", - "symlink-resolver": "0.2.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@sourceloop/ctrl-plane-subscription-service/node_modules/@sourceloop/core": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/@sourceloop/core/-/core-14.1.1.tgz", - "integrity": "sha512-nc13D5UMbF1dU9qsLMkDupaQLsCOrNnT0angXTApIc5DmoB+7vwIHFBpm8Q7RHXh18+e7TSMmgPpFNSttpV6+w==", - "dependencies": { - "@loopback/boot": "^7.0.2", - "@loopback/context": "^7.0.2", - "@loopback/core": "^6.0.2", - "@loopback/express": "^7.0.2", - "@loopback/openapi-v3": "^10.0.2", - "@loopback/repository": "^7.0.2", - "@loopback/rest": "^14.0.2", - "@loopback/rest-explorer": "^7.0.2", - "@loopback/service-proxy": "^7.0.2", - "i18n": "^0.15.1", - "jsonwebtoken": "^9.0.0", - "lodash": "^4.17.21", - "logform": "^2.4.0", - "loopback-datasource-juggler": "^5.0.9", - "loopback4-authentication": "^12.0.2", - "loopback4-authorization": "^7.0.2", - "loopback4-dynamic-datasource": "^2.0.1", - "loopback4-helmet": "^7.0.2", - "loopback4-ratelimiter": "^7.0.2", - "loopback4-soft-delete": "^10.0.2", - "moment": "^2.29.4", - "moment-timezone": "^0.5.34", - "openapi3-ts": "^2.0.2", - "request-ip": "^3.3.0", - "swagger-stats": "^0.99.5", - "tslib": "^2.6.2", - "winston": "^3.7.2" - }, - "engines": { - "node": "18 || 20" - }, - "optionalDependencies": { - "crypto-js": "^4.2.0" - }, - "peerDependencies": { - "@loopback/sequelize": "^0.6.2", - "loopback-connector-rest": "^5.0.1" - }, - "peerDependenciesMeta": { - "@loopback/sequelize": { - "optional": true - } - } - }, "node_modules/@sourceloop/ctrl-plane-tenant-management-service": { "version": "0.2.0", "resolved": "file:services/tenant-mgmt-service/sourceloop-ctrl-plane-tenant-management-service-0.2.0.tgz", @@ -26017,9 +25931,10 @@ "services/orchestrator-service": { "version": "0.0.1", "dependencies": { - "@arc-saas/orchestrator-service": "file:arc-saas-orchestrator-service-0.0.1.tgz", + "@arc-saas/orchestrator-service": "file:arc-saas-orchestrator-service-0.1.0.tgz", "@aws-sdk/client-codebuild": "^3.616.0", "@aws-sdk/client-dynamodb": "^3.616.0", + "@aws-sdk/client-eventbridge": "^3.626.0", "@aws-sdk/util-dynamodb": "^3.616.0", "@loopback/boot": "^7.0.4", "@loopback/core": "^6.1.1", @@ -26047,17 +25962,17 @@ } }, "services/orchestrator-service/node_modules/@arc-saas/orchestrator-service": { - "version": "0.0.1", - "resolved": "file:services/orchestrator-service/arc-saas-orchestrator-service-0.0.1.tgz", - "integrity": "sha512-ivS2DDcLd0eVZZHyiPGqlqjgm3Q23s7osfFpEmgAN9aqsODxUv+S1jqbZoVxPOUXjpyIbdlr7DYPt6BsnbSKEw==", + "version": "0.1.0", + "resolved": "file:services/orchestrator-service/arc-saas-orchestrator-service-0.1.0.tgz", + "integrity": "sha512-YzXDBQ/FZO0BWfpKnrFFAlhMgvqECNxWjRnAATjZ06JBqVturPvMFj5+aZ7TSK6KvrnmAvFJm5bUJDLdbLob5g==", "dependencies": { - "tslib": "^2.0.0" + "tslib": "^2.6.2" }, "engines": { "node": ">=18" }, "peerDependencies": { - "@loopback/core": ">=6" + "@loopback/core": "^6.0.2" } }, "services/orchestrator-service/node_modules/@aws-crypto/sha256-browser": { @@ -26226,44 +26141,48 @@ "node": ">=16.0.0" } }, - "services/orchestrator-service/node_modules/@aws-sdk/client-sso": { - "version": "3.616.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.616.0.tgz", - "integrity": "sha512-hwW0u1f8U4dSloAe61/eupUiGd5Q13B72BuzGxvRk0cIpYX/2m0KBG8DDl7jW1b2QQ+CflTLpG2XUf2+vRJxGA==", + "services/orchestrator-service/node_modules/@aws-sdk/client-eventbridge": { + "version": "3.626.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-eventbridge/-/client-eventbridge-3.626.0.tgz", + "integrity": "sha512-xQKP7zzRVmrkVnSdXOzble63hckof0cDzBlYD27dtM7hsLK2DIWyTgqbX08hLzjMaTOofNGfFBRFu8Fao0JfZQ==", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.616.0", - "@aws-sdk/middleware-host-header": "3.616.0", + "@aws-sdk/client-sso-oidc": "3.624.0", + "@aws-sdk/client-sts": "3.624.0", + "@aws-sdk/core": "3.624.0", + "@aws-sdk/credential-provider-node": "3.624.0", + "@aws-sdk/middleware-host-header": "3.620.0", "@aws-sdk/middleware-logger": "3.609.0", - "@aws-sdk/middleware-recursion-detection": "3.616.0", - "@aws-sdk/middleware-user-agent": "3.616.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.620.0", "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/signature-v4-multi-region": "3.626.0", "@aws-sdk/types": "3.609.0", "@aws-sdk/util-endpoints": "3.614.0", "@aws-sdk/util-user-agent-browser": "3.609.0", "@aws-sdk/util-user-agent-node": "3.614.0", "@smithy/config-resolver": "^3.0.5", - "@smithy/core": "^2.2.7", - "@smithy/fetch-http-handler": "^3.2.2", + "@smithy/core": "^2.3.2", + "@smithy/fetch-http-handler": "^3.2.4", "@smithy/hash-node": "^3.0.3", "@smithy/invalid-dependency": "^3.0.3", - "@smithy/middleware-content-length": "^3.0.4", - "@smithy/middleware-endpoint": "^3.0.5", - "@smithy/middleware-retry": "^3.0.10", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.14", "@smithy/middleware-serde": "^3.0.3", "@smithy/middleware-stack": "^3.0.3", "@smithy/node-config-provider": "^3.1.4", - "@smithy/node-http-handler": "^3.1.3", - "@smithy/protocol-http": "^4.0.4", - "@smithy/smithy-client": "^3.1.8", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", "@smithy/types": "^3.3.0", "@smithy/url-parser": "^3.0.3", "@smithy/util-base64": "^3.0.0", "@smithy/util-body-length-browser": "^3.0.0", "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.10", - "@smithy/util-defaults-mode-node": "^3.0.10", + "@smithy/util-defaults-mode-browser": "^3.0.14", + "@smithy/util-defaults-mode-node": "^3.0.14", "@smithy/util-endpoints": "^2.0.5", "@smithy/util-middleware": "^3.0.3", "@smithy/util-retry": "^3.0.3", @@ -26274,45 +26193,93 @@ "node": ">=16.0.0" } }, - "services/orchestrator-service/node_modules/@aws-sdk/client-sso-oidc": { - "version": "3.616.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.616.0.tgz", - "integrity": "sha512-YY1hpYS/G1uRGjQf88dL8VLHkP/IjGxKeXdhy+JnzMdCkAWl3V9j0fEALw40NZe0x79gr6R2KUOUH/IKYQfUmg==", + "services/orchestrator-service/node_modules/@aws-sdk/client-eventbridge/node_modules/@aws-sdk/client-sso": { + "version": "3.624.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.624.0.tgz", + "integrity": "sha512-EX6EF+rJzMPC5dcdsu40xSi2To7GSvdGQNIpe97pD9WvZwM9tRNQnNM4T6HA4gjV1L6Jwk8rBlG/CnveXtLEMw==", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.616.0", - "@aws-sdk/credential-provider-node": "3.616.0", - "@aws-sdk/middleware-host-header": "3.616.0", + "@aws-sdk/core": "3.624.0", + "@aws-sdk/middleware-host-header": "3.620.0", "@aws-sdk/middleware-logger": "3.609.0", - "@aws-sdk/middleware-recursion-detection": "3.616.0", - "@aws-sdk/middleware-user-agent": "3.616.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.620.0", "@aws-sdk/region-config-resolver": "3.614.0", "@aws-sdk/types": "3.609.0", "@aws-sdk/util-endpoints": "3.614.0", "@aws-sdk/util-user-agent-browser": "3.609.0", "@aws-sdk/util-user-agent-node": "3.614.0", "@smithy/config-resolver": "^3.0.5", - "@smithy/core": "^2.2.7", - "@smithy/fetch-http-handler": "^3.2.2", + "@smithy/core": "^2.3.2", + "@smithy/fetch-http-handler": "^3.2.4", "@smithy/hash-node": "^3.0.3", "@smithy/invalid-dependency": "^3.0.3", - "@smithy/middleware-content-length": "^3.0.4", - "@smithy/middleware-endpoint": "^3.0.5", - "@smithy/middleware-retry": "^3.0.10", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.14", "@smithy/middleware-serde": "^3.0.3", "@smithy/middleware-stack": "^3.0.3", "@smithy/node-config-provider": "^3.1.4", - "@smithy/node-http-handler": "^3.1.3", - "@smithy/protocol-http": "^4.0.4", - "@smithy/smithy-client": "^3.1.8", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", "@smithy/types": "^3.3.0", "@smithy/url-parser": "^3.0.3", "@smithy/util-base64": "^3.0.0", "@smithy/util-body-length-browser": "^3.0.0", "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.10", - "@smithy/util-defaults-mode-node": "^3.0.10", + "@smithy/util-defaults-mode-browser": "^3.0.14", + "@smithy/util-defaults-mode-node": "^3.0.14", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "services/orchestrator-service/node_modules/@aws-sdk/client-eventbridge/node_modules/@aws-sdk/client-sso-oidc": { + "version": "3.624.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.624.0.tgz", + "integrity": "sha512-Ki2uKYJKKtfHxxZsiMTOvJoVRP6b2pZ1u3rcUb2m/nVgBPUfLdl8ZkGpqE29I+t5/QaS/sEdbn6cgMUZwl+3Dg==", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.624.0", + "@aws-sdk/credential-provider-node": "3.624.0", + "@aws-sdk/middleware-host-header": "3.620.0", + "@aws-sdk/middleware-logger": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.620.0", + "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.614.0", + "@aws-sdk/util-user-agent-browser": "3.609.0", + "@aws-sdk/util-user-agent-node": "3.614.0", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.3.2", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/hash-node": "^3.0.3", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.14", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.14", + "@smithy/util-defaults-mode-node": "^3.0.14", "@smithy/util-endpoints": "^2.0.5", "@smithy/util-middleware": "^3.0.3", "@smithy/util-retry": "^3.0.3", @@ -26323,49 +26290,49 @@ "node": ">=16.0.0" }, "peerDependencies": { - "@aws-sdk/client-sts": "^3.616.0" + "@aws-sdk/client-sts": "^3.624.0" } }, - "services/orchestrator-service/node_modules/@aws-sdk/client-sts": { - "version": "3.616.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.616.0.tgz", - "integrity": "sha512-FP7i7hS5FpReqnysQP1ukQF1OUWy8lkomaOnbu15H415YUrfCp947SIx6+BItjmx+esKxPkEjh/fbCVzw2D6hQ==", + "services/orchestrator-service/node_modules/@aws-sdk/client-eventbridge/node_modules/@aws-sdk/client-sts": { + "version": "3.624.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.624.0.tgz", + "integrity": "sha512-k36fLZCb2nfoV/DKK3jbRgO/Yf7/R80pgYfMiotkGjnZwDmRvNN08z4l06L9C+CieazzkgRxNUzyppsYcYsQaw==", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/client-sso-oidc": "3.616.0", - "@aws-sdk/core": "3.616.0", - "@aws-sdk/credential-provider-node": "3.616.0", - "@aws-sdk/middleware-host-header": "3.616.0", + "@aws-sdk/client-sso-oidc": "3.624.0", + "@aws-sdk/core": "3.624.0", + "@aws-sdk/credential-provider-node": "3.624.0", + "@aws-sdk/middleware-host-header": "3.620.0", "@aws-sdk/middleware-logger": "3.609.0", - "@aws-sdk/middleware-recursion-detection": "3.616.0", - "@aws-sdk/middleware-user-agent": "3.616.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.620.0", "@aws-sdk/region-config-resolver": "3.614.0", "@aws-sdk/types": "3.609.0", "@aws-sdk/util-endpoints": "3.614.0", "@aws-sdk/util-user-agent-browser": "3.609.0", "@aws-sdk/util-user-agent-node": "3.614.0", "@smithy/config-resolver": "^3.0.5", - "@smithy/core": "^2.2.7", - "@smithy/fetch-http-handler": "^3.2.2", + "@smithy/core": "^2.3.2", + "@smithy/fetch-http-handler": "^3.2.4", "@smithy/hash-node": "^3.0.3", "@smithy/invalid-dependency": "^3.0.3", - "@smithy/middleware-content-length": "^3.0.4", - "@smithy/middleware-endpoint": "^3.0.5", - "@smithy/middleware-retry": "^3.0.10", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.14", "@smithy/middleware-serde": "^3.0.3", "@smithy/middleware-stack": "^3.0.3", "@smithy/node-config-provider": "^3.1.4", - "@smithy/node-http-handler": "^3.1.3", - "@smithy/protocol-http": "^4.0.4", - "@smithy/smithy-client": "^3.1.8", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", "@smithy/types": "^3.3.0", "@smithy/url-parser": "^3.0.3", "@smithy/util-base64": "^3.0.0", "@smithy/util-body-length-browser": "^3.0.0", "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.10", - "@smithy/util-defaults-mode-node": "^3.0.10", + "@smithy/util-defaults-mode-browser": "^3.0.14", + "@smithy/util-defaults-mode-node": "^3.0.14", "@smithy/util-endpoints": "^2.0.5", "@smithy/util-middleware": "^3.0.3", "@smithy/util-retry": "^3.0.3", @@ -26376,27 +26343,29 @@ "node": ">=16.0.0" } }, - "services/orchestrator-service/node_modules/@aws-sdk/core": { - "version": "3.616.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.616.0.tgz", - "integrity": "sha512-O/urkh2kECs/IqZIVZxyeyHZ7OR2ZWhLNK7btsVQBQvJKrEspLrk/Fp20Qfg5JDerQfBN83ZbyRXLJOOucdZpw==", + "services/orchestrator-service/node_modules/@aws-sdk/client-eventbridge/node_modules/@aws-sdk/core": { + "version": "3.624.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.624.0.tgz", + "integrity": "sha512-WyFmPbhRIvtWi7hBp8uSFy+iPpj8ccNV/eX86hwF4irMjfc/FtsGVIAeBXxXM/vGCjkdfEzOnl+tJ2XACD4OXg==", "dependencies": { - "@smithy/core": "^2.2.7", - "@smithy/protocol-http": "^4.0.4", - "@smithy/signature-v4": "^4.0.0", - "@smithy/smithy-client": "^3.1.8", + "@smithy/core": "^2.3.2", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/signature-v4": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", "@smithy/types": "^3.3.0", - "fast-xml-parser": "4.2.5", + "@smithy/util-middleware": "^3.0.3", + "fast-xml-parser": "4.4.1", "tslib": "^2.6.2" }, "engines": { "node": ">=16.0.0" } }, - "services/orchestrator-service/node_modules/@aws-sdk/credential-provider-env": { - "version": "3.609.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.609.0.tgz", - "integrity": "sha512-v69ZCWcec2iuV9vLVJMa6fAb5xwkzN4jYIT8yjo2c4Ia/j976Q+TPf35Pnz5My48Xr94EFcaBazrWedF+kwfuQ==", + "services/orchestrator-service/node_modules/@aws-sdk/client-eventbridge/node_modules/@aws-sdk/credential-provider-env": { + "version": "3.620.1", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.620.1.tgz", + "integrity": "sha512-ExuILJ2qLW5ZO+rgkNRj0xiAipKT16Rk77buvPP8csR7kkCflT/gXTyzRe/uzIiETTxM7tr8xuO9MP/DQXqkfg==", "dependencies": { "@aws-sdk/types": "3.609.0", "@smithy/property-provider": "^3.1.3", @@ -26407,37 +26376,37 @@ "node": ">=16.0.0" } }, - "services/orchestrator-service/node_modules/@aws-sdk/credential-provider-http": { - "version": "3.616.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.616.0.tgz", - "integrity": "sha512-1rgCkr7XvEMBl7qWCo5BKu3yAxJs71dRaZ55Xnjte/0ZHH6Oc93ZrHzyYy6UH6t0nZrH+FAuw7Yko2YtDDwDeg==", + "services/orchestrator-service/node_modules/@aws-sdk/client-eventbridge/node_modules/@aws-sdk/credential-provider-http": { + "version": "3.622.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.622.0.tgz", + "integrity": "sha512-VUHbr24Oll1RK3WR8XLUugLpgK9ZuxEm/NVeVqyFts1Ck9gsKpRg1x4eH7L7tW3SJ4TDEQNMbD7/7J+eoL2svg==", "dependencies": { "@aws-sdk/types": "3.609.0", - "@smithy/fetch-http-handler": "^3.2.2", - "@smithy/node-http-handler": "^3.1.3", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/node-http-handler": "^3.1.4", "@smithy/property-provider": "^3.1.3", - "@smithy/protocol-http": "^4.0.4", - "@smithy/smithy-client": "^3.1.8", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.1.0", + "@smithy/util-stream": "^3.1.3", "tslib": "^2.6.2" }, "engines": { "node": ">=16.0.0" } }, - "services/orchestrator-service/node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.616.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.616.0.tgz", - "integrity": "sha512-5gQdMr9cca3xV7FF2SxpxWGH2t6+t4o+XBGiwsHm8muEjf4nUmw7Ij863x25Tjt2viPYV0UStczSb5Sihp7bkA==", + "services/orchestrator-service/node_modules/@aws-sdk/client-eventbridge/node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.624.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.624.0.tgz", + "integrity": "sha512-mMoNIy7MO2WTBbdqMyLpbt6SZpthE6e0GkRYpsd0yozPt0RZopcBhEh+HG1U9Y1PVODo+jcMk353vAi61CfnhQ==", "dependencies": { - "@aws-sdk/credential-provider-env": "3.609.0", - "@aws-sdk/credential-provider-http": "3.616.0", - "@aws-sdk/credential-provider-process": "3.614.0", - "@aws-sdk/credential-provider-sso": "3.616.0", - "@aws-sdk/credential-provider-web-identity": "3.609.0", + "@aws-sdk/credential-provider-env": "3.620.1", + "@aws-sdk/credential-provider-http": "3.622.0", + "@aws-sdk/credential-provider-process": "3.620.1", + "@aws-sdk/credential-provider-sso": "3.624.0", + "@aws-sdk/credential-provider-web-identity": "3.621.0", "@aws-sdk/types": "3.609.0", - "@smithy/credential-provider-imds": "^3.1.4", + "@smithy/credential-provider-imds": "^3.2.0", "@smithy/property-provider": "^3.1.3", "@smithy/shared-ini-file-loader": "^3.1.4", "@smithy/types": "^3.3.0", @@ -26447,22 +26416,22 @@ "node": ">=16.0.0" }, "peerDependencies": { - "@aws-sdk/client-sts": "^3.616.0" + "@aws-sdk/client-sts": "^3.624.0" } }, - "services/orchestrator-service/node_modules/@aws-sdk/credential-provider-node": { - "version": "3.616.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.616.0.tgz", - "integrity": "sha512-Se+u6DAxjDPjKE3vX1X2uxjkWgGq69BTo0uTB0vDUiWwBVgh16s9BsBhSAlKEH1CCbbJHvOg4YdTrzjwzqyClg==", + "services/orchestrator-service/node_modules/@aws-sdk/client-eventbridge/node_modules/@aws-sdk/credential-provider-node": { + "version": "3.624.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.624.0.tgz", + "integrity": "sha512-vYyGK7oNpd81BdbH5IlmQ6zfaQqU+rPwsKTDDBeLRjshtrGXOEpfoahVpG9PX0ibu32IOWp4ZyXBNyVrnvcMOw==", "dependencies": { - "@aws-sdk/credential-provider-env": "3.609.0", - "@aws-sdk/credential-provider-http": "3.616.0", - "@aws-sdk/credential-provider-ini": "3.616.0", - "@aws-sdk/credential-provider-process": "3.614.0", - "@aws-sdk/credential-provider-sso": "3.616.0", - "@aws-sdk/credential-provider-web-identity": "3.609.0", + "@aws-sdk/credential-provider-env": "3.620.1", + "@aws-sdk/credential-provider-http": "3.622.0", + "@aws-sdk/credential-provider-ini": "3.624.0", + "@aws-sdk/credential-provider-process": "3.620.1", + "@aws-sdk/credential-provider-sso": "3.624.0", + "@aws-sdk/credential-provider-web-identity": "3.621.0", "@aws-sdk/types": "3.609.0", - "@smithy/credential-provider-imds": "^3.1.4", + "@smithy/credential-provider-imds": "^3.2.0", "@smithy/property-provider": "^3.1.3", "@smithy/shared-ini-file-loader": "^3.1.4", "@smithy/types": "^3.3.0", @@ -26472,10 +26441,10 @@ "node": ">=16.0.0" } }, - "services/orchestrator-service/node_modules/@aws-sdk/credential-provider-process": { - "version": "3.614.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.614.0.tgz", - "integrity": "sha512-Q0SI0sTRwi8iNODLs5+bbv8vgz8Qy2QdxbCHnPk/6Cx6LMf7i3dqmWquFbspqFRd8QiqxStrblwxrUYZi09tkA==", + "services/orchestrator-service/node_modules/@aws-sdk/client-eventbridge/node_modules/@aws-sdk/credential-provider-process": { + "version": "3.620.1", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.620.1.tgz", + "integrity": "sha512-hWqFMidqLAkaV9G460+1at6qa9vySbjQKKc04p59OT7lZ5cO5VH5S4aI05e+m4j364MBROjjk2ugNvfNf/8ILg==", "dependencies": { "@aws-sdk/types": "3.609.0", "@smithy/property-provider": "^3.1.3", @@ -26487,12 +26456,12 @@ "node": ">=16.0.0" } }, - "services/orchestrator-service/node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.616.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.616.0.tgz", - "integrity": "sha512-3rsWs9GBi8Z8Gps5ROwqguxtw+J6OIg1vawZMLRNMqqZoBvbOToe9wEnpid8ylU+27+oG8uibJNlNuRyXApUjw==", + "services/orchestrator-service/node_modules/@aws-sdk/client-eventbridge/node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.624.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.624.0.tgz", + "integrity": "sha512-A02bayIjU9APEPKr3HudrFHEx0WfghoSPsPopckDkW7VBqO4wizzcxr75Q9A3vNX+cwg0wCN6UitTNe6pVlRaQ==", "dependencies": { - "@aws-sdk/client-sso": "3.616.0", + "@aws-sdk/client-sso": "3.624.0", "@aws-sdk/token-providers": "3.614.0", "@aws-sdk/types": "3.609.0", "@smithy/property-provider": "^3.1.3", @@ -26504,10 +26473,10 @@ "node": ">=16.0.0" } }, - "services/orchestrator-service/node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.609.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.609.0.tgz", - "integrity": "sha512-U+PG8NhlYYF45zbr1km3ROtBMYqyyj/oK8NRp++UHHeuavgrP+4wJ4wQnlEaKvJBjevfo3+dlIBcaeQ7NYejWg==", + "services/orchestrator-service/node_modules/@aws-sdk/client-eventbridge/node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.621.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.621.0.tgz", + "integrity": "sha512-w7ASSyfNvcx7+bYGep3VBgC3K6vEdLmlpjT7nSIHxxQf+WSdvy+HynwJosrpZax0sK5q0D1Jpn/5q+r5lwwW6w==", "dependencies": { "@aws-sdk/types": "3.609.0", "@smithy/property-provider": "^3.1.3", @@ -26518,16 +26487,16 @@ "node": ">=16.0.0" }, "peerDependencies": { - "@aws-sdk/client-sts": "^3.609.0" + "@aws-sdk/client-sts": "^3.621.0" } }, - "services/orchestrator-service/node_modules/@aws-sdk/middleware-host-header": { - "version": "3.616.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.616.0.tgz", - "integrity": "sha512-mhNfHuGhCDZwYCABebaOvTgOM44UCZZRq2cBpgPZLVKP0ydAv5aFHXv01goexxXHqgHoEGx0uXWxlw0s2EpFDg==", + "services/orchestrator-service/node_modules/@aws-sdk/client-eventbridge/node_modules/@aws-sdk/middleware-host-header": { + "version": "3.620.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.620.0.tgz", + "integrity": "sha512-VMtPEZwqYrII/oUkffYsNWY9PZ9xpNJpMgmyU0rlDQ25O1c0Hk3fJmZRe6pEkAJ0omD7kLrqGl1DUjQVxpd/Rg==", "dependencies": { "@aws-sdk/types": "3.609.0", - "@smithy/protocol-http": "^4.0.4", + "@smithy/protocol-http": "^4.1.0", "@smithy/types": "^3.3.0", "tslib": "^2.6.2" }, @@ -26535,12 +26504,13 @@ "node": ">=16.0.0" } }, - "services/orchestrator-service/node_modules/@aws-sdk/middleware-logger": { - "version": "3.609.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.609.0.tgz", - "integrity": "sha512-S62U2dy4jMDhDFDK5gZ4VxFdWzCtLzwbYyFZx2uvPYTECkepLUfzLic2BHg2Qvtu4QjX+oGE3P/7fwaGIsGNuQ==", + "services/orchestrator-service/node_modules/@aws-sdk/client-eventbridge/node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.620.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.620.0.tgz", + "integrity": "sha512-nh91S7aGK3e/o1ck64sA/CyoFw+gAYj2BDOnoNa6ouyCrVJED96ZXWbhye/fz9SgmNUZR2g7GdVpiLpMKZoI5w==", "dependencies": { "@aws-sdk/types": "3.609.0", + "@smithy/protocol-http": "^4.1.0", "@smithy/types": "^3.3.0", "tslib": "^2.6.2" }, @@ -26548,13 +26518,14 @@ "node": ">=16.0.0" } }, - "services/orchestrator-service/node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.616.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.616.0.tgz", - "integrity": "sha512-LQKAcrZRrR9EGez4fdCIVjdn0Ot2HMN12ChnoMGEU6oIxnQ2aSC7iASFFCV39IYfeMh7iSCPj7Wopqw8rAouzg==", + "services/orchestrator-service/node_modules/@aws-sdk/client-eventbridge/node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.620.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.620.0.tgz", + "integrity": "sha512-bvS6etn+KsuL32ubY5D3xNof1qkenpbJXf/ugGXbg0n98DvDFQ/F+SMLxHgbnER5dsKYchNnhmtI6/FC3HFu/A==", "dependencies": { "@aws-sdk/types": "3.609.0", - "@smithy/protocol-http": "^4.0.4", + "@aws-sdk/util-endpoints": "3.614.0", + "@smithy/protocol-http": "^4.1.0", "@smithy/types": "^3.3.0", "tslib": "^2.6.2" }, @@ -26562,12 +26533,433 @@ "node": ">=16.0.0" } }, - "services/orchestrator-service/node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.616.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.616.0.tgz", - "integrity": "sha512-iMcAb4E+Z3vuEcrDsG6T2OBNiqWAquwahP9qepHqfmnmJqHr1mSHtXDYTGBNid31+621sUQmneUQ+fagpGAe4w==", - "dependencies": { - "@aws-sdk/types": "3.609.0", + "services/orchestrator-service/node_modules/@aws-sdk/client-eventbridge/node_modules/fast-xml-parser": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.1.tgz", + "integrity": "sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + }, + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + } + ], + "dependencies": { + "strnum": "^1.0.5" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, + "services/orchestrator-service/node_modules/@aws-sdk/client-sso": { + "version": "3.616.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.616.0.tgz", + "integrity": "sha512-hwW0u1f8U4dSloAe61/eupUiGd5Q13B72BuzGxvRk0cIpYX/2m0KBG8DDl7jW1b2QQ+CflTLpG2XUf2+vRJxGA==", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.616.0", + "@aws-sdk/middleware-host-header": "3.616.0", + "@aws-sdk/middleware-logger": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.616.0", + "@aws-sdk/middleware-user-agent": "3.616.0", + "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.614.0", + "@aws-sdk/util-user-agent-browser": "3.609.0", + "@aws-sdk/util-user-agent-node": "3.614.0", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.2.7", + "@smithy/fetch-http-handler": "^3.2.2", + "@smithy/hash-node": "^3.0.3", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.4", + "@smithy/middleware-endpoint": "^3.0.5", + "@smithy/middleware-retry": "^3.0.10", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.3", + "@smithy/protocol-http": "^4.0.4", + "@smithy/smithy-client": "^3.1.8", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.10", + "@smithy/util-defaults-mode-node": "^3.0.10", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "services/orchestrator-service/node_modules/@aws-sdk/client-sso-oidc": { + "version": "3.616.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.616.0.tgz", + "integrity": "sha512-YY1hpYS/G1uRGjQf88dL8VLHkP/IjGxKeXdhy+JnzMdCkAWl3V9j0fEALw40NZe0x79gr6R2KUOUH/IKYQfUmg==", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.616.0", + "@aws-sdk/credential-provider-node": "3.616.0", + "@aws-sdk/middleware-host-header": "3.616.0", + "@aws-sdk/middleware-logger": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.616.0", + "@aws-sdk/middleware-user-agent": "3.616.0", + "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.614.0", + "@aws-sdk/util-user-agent-browser": "3.609.0", + "@aws-sdk/util-user-agent-node": "3.614.0", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.2.7", + "@smithy/fetch-http-handler": "^3.2.2", + "@smithy/hash-node": "^3.0.3", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.4", + "@smithy/middleware-endpoint": "^3.0.5", + "@smithy/middleware-retry": "^3.0.10", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.3", + "@smithy/protocol-http": "^4.0.4", + "@smithy/smithy-client": "^3.1.8", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.10", + "@smithy/util-defaults-mode-node": "^3.0.10", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.616.0" + } + }, + "services/orchestrator-service/node_modules/@aws-sdk/client-sts": { + "version": "3.616.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.616.0.tgz", + "integrity": "sha512-FP7i7hS5FpReqnysQP1ukQF1OUWy8lkomaOnbu15H415YUrfCp947SIx6+BItjmx+esKxPkEjh/fbCVzw2D6hQ==", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/client-sso-oidc": "3.616.0", + "@aws-sdk/core": "3.616.0", + "@aws-sdk/credential-provider-node": "3.616.0", + "@aws-sdk/middleware-host-header": "3.616.0", + "@aws-sdk/middleware-logger": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.616.0", + "@aws-sdk/middleware-user-agent": "3.616.0", + "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.614.0", + "@aws-sdk/util-user-agent-browser": "3.609.0", + "@aws-sdk/util-user-agent-node": "3.614.0", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.2.7", + "@smithy/fetch-http-handler": "^3.2.2", + "@smithy/hash-node": "^3.0.3", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.4", + "@smithy/middleware-endpoint": "^3.0.5", + "@smithy/middleware-retry": "^3.0.10", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.3", + "@smithy/protocol-http": "^4.0.4", + "@smithy/smithy-client": "^3.1.8", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.10", + "@smithy/util-defaults-mode-node": "^3.0.10", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "services/orchestrator-service/node_modules/@aws-sdk/core": { + "version": "3.616.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.616.0.tgz", + "integrity": "sha512-O/urkh2kECs/IqZIVZxyeyHZ7OR2ZWhLNK7btsVQBQvJKrEspLrk/Fp20Qfg5JDerQfBN83ZbyRXLJOOucdZpw==", + "dependencies": { + "@smithy/core": "^2.2.7", + "@smithy/protocol-http": "^4.0.4", + "@smithy/signature-v4": "^4.0.0", + "@smithy/smithy-client": "^3.1.8", + "@smithy/types": "^3.3.0", + "fast-xml-parser": "4.2.5", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "services/orchestrator-service/node_modules/@aws-sdk/credential-provider-env": { + "version": "3.609.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.609.0.tgz", + "integrity": "sha512-v69ZCWcec2iuV9vLVJMa6fAb5xwkzN4jYIT8yjo2c4Ia/j976Q+TPf35Pnz5My48Xr94EFcaBazrWedF+kwfuQ==", + "dependencies": { + "@aws-sdk/types": "3.609.0", + "@smithy/property-provider": "^3.1.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "services/orchestrator-service/node_modules/@aws-sdk/credential-provider-http": { + "version": "3.616.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.616.0.tgz", + "integrity": "sha512-1rgCkr7XvEMBl7qWCo5BKu3yAxJs71dRaZ55Xnjte/0ZHH6Oc93ZrHzyYy6UH6t0nZrH+FAuw7Yko2YtDDwDeg==", + "dependencies": { + "@aws-sdk/types": "3.609.0", + "@smithy/fetch-http-handler": "^3.2.2", + "@smithy/node-http-handler": "^3.1.3", + "@smithy/property-provider": "^3.1.3", + "@smithy/protocol-http": "^4.0.4", + "@smithy/smithy-client": "^3.1.8", + "@smithy/types": "^3.3.0", + "@smithy/util-stream": "^3.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "services/orchestrator-service/node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.616.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.616.0.tgz", + "integrity": "sha512-5gQdMr9cca3xV7FF2SxpxWGH2t6+t4o+XBGiwsHm8muEjf4nUmw7Ij863x25Tjt2viPYV0UStczSb5Sihp7bkA==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.609.0", + "@aws-sdk/credential-provider-http": "3.616.0", + "@aws-sdk/credential-provider-process": "3.614.0", + "@aws-sdk/credential-provider-sso": "3.616.0", + "@aws-sdk/credential-provider-web-identity": "3.609.0", + "@aws-sdk/types": "3.609.0", + "@smithy/credential-provider-imds": "^3.1.4", + "@smithy/property-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.616.0" + } + }, + "services/orchestrator-service/node_modules/@aws-sdk/credential-provider-node": { + "version": "3.616.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.616.0.tgz", + "integrity": "sha512-Se+u6DAxjDPjKE3vX1X2uxjkWgGq69BTo0uTB0vDUiWwBVgh16s9BsBhSAlKEH1CCbbJHvOg4YdTrzjwzqyClg==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.609.0", + "@aws-sdk/credential-provider-http": "3.616.0", + "@aws-sdk/credential-provider-ini": "3.616.0", + "@aws-sdk/credential-provider-process": "3.614.0", + "@aws-sdk/credential-provider-sso": "3.616.0", + "@aws-sdk/credential-provider-web-identity": "3.609.0", + "@aws-sdk/types": "3.609.0", + "@smithy/credential-provider-imds": "^3.1.4", + "@smithy/property-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "services/orchestrator-service/node_modules/@aws-sdk/credential-provider-process": { + "version": "3.614.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.614.0.tgz", + "integrity": "sha512-Q0SI0sTRwi8iNODLs5+bbv8vgz8Qy2QdxbCHnPk/6Cx6LMf7i3dqmWquFbspqFRd8QiqxStrblwxrUYZi09tkA==", + "dependencies": { + "@aws-sdk/types": "3.609.0", + "@smithy/property-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "services/orchestrator-service/node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.616.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.616.0.tgz", + "integrity": "sha512-3rsWs9GBi8Z8Gps5ROwqguxtw+J6OIg1vawZMLRNMqqZoBvbOToe9wEnpid8ylU+27+oG8uibJNlNuRyXApUjw==", + "dependencies": { + "@aws-sdk/client-sso": "3.616.0", + "@aws-sdk/token-providers": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@smithy/property-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "services/orchestrator-service/node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.609.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.609.0.tgz", + "integrity": "sha512-U+PG8NhlYYF45zbr1km3ROtBMYqyyj/oK8NRp++UHHeuavgrP+4wJ4wQnlEaKvJBjevfo3+dlIBcaeQ7NYejWg==", + "dependencies": { + "@aws-sdk/types": "3.609.0", + "@smithy/property-provider": "^3.1.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.609.0" + } + }, + "services/orchestrator-service/node_modules/@aws-sdk/middleware-host-header": { + "version": "3.616.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.616.0.tgz", + "integrity": "sha512-mhNfHuGhCDZwYCABebaOvTgOM44UCZZRq2cBpgPZLVKP0ydAv5aFHXv01goexxXHqgHoEGx0uXWxlw0s2EpFDg==", + "dependencies": { + "@aws-sdk/types": "3.609.0", + "@smithy/protocol-http": "^4.0.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "services/orchestrator-service/node_modules/@aws-sdk/middleware-logger": { + "version": "3.609.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.609.0.tgz", + "integrity": "sha512-S62U2dy4jMDhDFDK5gZ4VxFdWzCtLzwbYyFZx2uvPYTECkepLUfzLic2BHg2Qvtu4QjX+oGE3P/7fwaGIsGNuQ==", + "dependencies": { + "@aws-sdk/types": "3.609.0", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "services/orchestrator-service/node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.616.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.616.0.tgz", + "integrity": "sha512-LQKAcrZRrR9EGez4fdCIVjdn0Ot2HMN12ChnoMGEU6oIxnQ2aSC7iASFFCV39IYfeMh7iSCPj7Wopqw8rAouzg==", + "dependencies": { + "@aws-sdk/types": "3.609.0", + "@smithy/protocol-http": "^4.0.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "services/orchestrator-service/node_modules/@aws-sdk/middleware-sdk-s3": { + "version": "3.626.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.626.0.tgz", + "integrity": "sha512-frFh6GQ1OEGueB0fL6Ft5rdHF+eu8JZUREjeBNEcg1qRqtMpPOlYkKzJ434d4zo+JHSK5xKFeb/Gu/kvB4LxEA==", + "dependencies": { + "@aws-sdk/core": "3.624.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-arn-parser": "3.568.0", + "@smithy/core": "^2.3.2", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/signature-v4": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "@smithy/util-config-provider": "^3.0.0", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-stream": "^3.1.3", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "services/orchestrator-service/node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@aws-sdk/core": { + "version": "3.624.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.624.0.tgz", + "integrity": "sha512-WyFmPbhRIvtWi7hBp8uSFy+iPpj8ccNV/eX86hwF4irMjfc/FtsGVIAeBXxXM/vGCjkdfEzOnl+tJ2XACD4OXg==", + "dependencies": { + "@smithy/core": "^2.3.2", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/signature-v4": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "@smithy/util-middleware": "^3.0.3", + "fast-xml-parser": "4.4.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "services/orchestrator-service/node_modules/@aws-sdk/middleware-sdk-s3/node_modules/fast-xml-parser": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.1.tgz", + "integrity": "sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + }, + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + } + ], + "dependencies": { + "strnum": "^1.0.5" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, + "services/orchestrator-service/node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.616.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.616.0.tgz", + "integrity": "sha512-iMcAb4E+Z3vuEcrDsG6T2OBNiqWAquwahP9qepHqfmnmJqHr1mSHtXDYTGBNid31+621sUQmneUQ+fagpGAe4w==", + "dependencies": { + "@aws-sdk/types": "3.609.0", "@aws-sdk/util-endpoints": "3.614.0", "@smithy/protocol-http": "^4.0.4", "@smithy/types": "^3.3.0", @@ -26593,6 +26985,22 @@ "node": ">=16.0.0" } }, + "services/orchestrator-service/node_modules/@aws-sdk/signature-v4-multi-region": { + "version": "3.626.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.626.0.tgz", + "integrity": "sha512-n3yN668b2XLY6155y2KRCCDfA67Acxf/wUS60wGPNrJKk9O5AZzGQzZF8tLfMSng5YBS/CCHN40ooMhRwSLWUg==", + "dependencies": { + "@aws-sdk/middleware-sdk-s3": "3.626.0", + "@aws-sdk/types": "3.609.0", + "@smithy/protocol-http": "^4.1.0", + "@smithy/signature-v4": "^4.1.0", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, "services/orchestrator-service/node_modules/@aws-sdk/token-providers": { "version": "3.614.0", "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.614.0.tgz", @@ -27028,12 +27436,134 @@ "node": "18 || 20 || 22" } }, + "services/orchestrator-service/node_modules/@smithy/core": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-2.3.2.tgz", + "integrity": "sha512-in5wwt6chDBcUv1Lw1+QzZxN9fBffi+qOixfb65yK4sDuKG7zAUO9HAFqmVzsZM3N+3tTyvZjtnDXePpvp007Q==", + "dependencies": { + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.14", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "@smithy/util-middleware": "^3.0.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "services/orchestrator-service/node_modules/@smithy/credential-provider-imds": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-3.2.0.tgz", + "integrity": "sha512-0SCIzgd8LYZ9EJxUjLXBmEKSZR/P/w6l7Rz/pab9culE/RWuqelAKGJvn5qUOl8BgX8Yj5HWM50A5hiB/RzsgA==", + "dependencies": { + "@smithy/node-config-provider": "^3.1.4", + "@smithy/property-provider": "^3.1.3", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "services/orchestrator-service/node_modules/@smithy/fetch-http-handler": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.4.tgz", + "integrity": "sha512-kBprh5Gs5h7ug4nBWZi1FZthdqSM+T7zMmsZxx0IBvWUn7dK3diz2SHn7Bs4dQGFDk8plDv375gzenDoNwrXjg==", + "dependencies": { + "@smithy/protocol-http": "^4.1.0", + "@smithy/querystring-builder": "^3.0.3", + "@smithy/types": "^3.3.0", + "@smithy/util-base64": "^3.0.0", + "tslib": "^2.6.2" + } + }, + "services/orchestrator-service/node_modules/@smithy/middleware-content-length": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-3.0.5.tgz", + "integrity": "sha512-ILEzC2eyxx6ncej3zZSwMpB5RJ0zuqH7eMptxC4KN3f+v9bqT8ohssKbhNR78k/2tWW+KS5Spw+tbPF4Ejyqvw==", + "dependencies": { + "@smithy/protocol-http": "^4.1.0", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "services/orchestrator-service/node_modules/@smithy/middleware-endpoint": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-3.1.0.tgz", + "integrity": "sha512-5y5aiKCEwg9TDPB4yFE7H6tYvGFf1OJHNczeY10/EFF8Ir8jZbNntQJxMWNfeQjC1mxPsaQ6mR9cvQbf+0YeMw==", + "dependencies": { + "@smithy/middleware-serde": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/shared-ini-file-loader": "^3.1.4", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-middleware": "^3.0.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "services/orchestrator-service/node_modules/@smithy/middleware-retry": { + "version": "3.0.14", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-3.0.14.tgz", + "integrity": "sha512-7ZaWZJOjUxa5hgmuMspyt8v/zVsh0GXYuF7OvCmdcbVa/xbnKQoYC+uYKunAqRGTkxjOyuOCw9rmFUFOqqC0eQ==", + "dependencies": { + "@smithy/node-config-provider": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/service-error-classification": "^3.0.3", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "tslib": "^2.6.2", + "uuid": "^9.0.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "services/orchestrator-service/node_modules/@smithy/node-http-handler": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-3.1.4.tgz", + "integrity": "sha512-+UmxgixgOr/yLsUxcEKGH0fMNVteJFGkmRltYFHnBMlogyFdpzn2CwqWmxOrfJELhV34v0WSlaqG1UtE1uXlJg==", + "dependencies": { + "@smithy/abort-controller": "^3.1.1", + "@smithy/protocol-http": "^4.1.0", + "@smithy/querystring-builder": "^3.0.3", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "services/orchestrator-service/node_modules/@smithy/protocol-http": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", + "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", + "dependencies": { + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, "services/orchestrator-service/node_modules/@smithy/signature-v4": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-4.0.0.tgz", - "integrity": "sha512-ervYjQ+ZvmNG51Ui77IOTPri7nOyo8Kembzt9uwwlmtXJPmFXvslOahbA1blvAVs7G0KlYMiOBog1rAt7RVXxg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-4.1.0.tgz", + "integrity": "sha512-aRryp2XNZeRcOtuJoxjydO6QTaVhxx/vjaR+gx7ZjaFgrgPRyZ3HCTbfwqYj6ZWEBHkCSUfcaymKPURaByukag==", "dependencies": { "@smithy/is-array-buffer": "^3.0.0", + "@smithy/protocol-http": "^4.1.0", "@smithy/types": "^3.3.0", "@smithy/util-hex-encoding": "^3.0.0", "@smithy/util-middleware": "^3.0.3", @@ -27045,6 +27575,72 @@ "node": ">=16.0.0" } }, + "services/orchestrator-service/node_modules/@smithy/smithy-client": { + "version": "3.1.12", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.12.tgz", + "integrity": "sha512-wtm8JtsycthkHy1YA4zjIh2thJgIQ9vGkoR639DBx5lLlLNU0v4GARpQZkr2WjXue74nZ7MiTSWfVrLkyD8RkA==", + "dependencies": { + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/protocol-http": "^4.1.0", + "@smithy/types": "^3.3.0", + "@smithy/util-stream": "^3.1.3", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "services/orchestrator-service/node_modules/@smithy/util-defaults-mode-browser": { + "version": "3.0.14", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-3.0.14.tgz", + "integrity": "sha512-0iwTgKKmAIf+vFLV8fji21Jb2px11ktKVxbX6LIDPAUJyWQqGqBVfwba7xwa1f2FZUoolYQgLvxQEpJycXuQ5w==", + "dependencies": { + "@smithy/property-provider": "^3.1.3", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "bowser": "^2.11.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "services/orchestrator-service/node_modules/@smithy/util-defaults-mode-node": { + "version": "3.0.14", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-3.0.14.tgz", + "integrity": "sha512-e9uQarJKfXApkTMMruIdxHprhcXivH1flYCe8JRDTzkkLx8dA3V5J8GZlST9yfDiRWkJpZJlUXGN9Rc9Ade3OQ==", + "dependencies": { + "@smithy/config-resolver": "^3.0.5", + "@smithy/credential-provider-imds": "^3.2.0", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/property-provider": "^3.1.3", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "services/orchestrator-service/node_modules/@smithy/util-stream": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.1.3.tgz", + "integrity": "sha512-FIv/bRhIlAxC0U7xM1BCnF2aDRPq0UaelqBHkM2lsCp26mcBbgI0tCVTv+jGdsQLUmAMybua/bjDsSu8RQHbmw==", + "dependencies": { + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/types": "^3.3.0", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-buffer-from": "^3.0.0", + "@smithy/util-hex-encoding": "^3.0.0", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, "services/orchestrator-service/node_modules/@types/mocha": { "version": "10.0.7", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.7.tgz", @@ -27715,7 +28311,7 @@ "@opentelemetry/sdk-trace-base": "^1.15.0", "@opentelemetry/sdk-trace-node": "^1.15.0", "@sourceloop/core": "^13.1.0", - "@sourceloop/ctrl-plane-subscription-service": "file:sourceloop-ctrl-plane-subscription-service-0.2.0.tgz", + "@sourceloop/ctrl-plane-subscription-service": "file:sourceloop-ctrl-plane-subscription-service-0.2.1.tgz", "dotenv": "^16.0.3", "dotenv-extended": "^2.9.0", "loopback-connector-postgresql": "^7.0.4", @@ -27741,6 +28337,92 @@ "node": ">=18" } }, + "services/subscription-service/node_modules/@sourceloop/ctrl-plane-subscription-service": { + "version": "0.2.1", + "resolved": "file:services/subscription-service/sourceloop-ctrl-plane-subscription-service-0.2.1.tgz", + "integrity": "sha512-6ypUwwSM+P6hc21DJW2crIwnRSjkBLCKamRZMIQ9mnhmXGhcxSGqH3FS/NNXZtm13OtwB6K5Iz+hcHrByN9XLw==", + "dependencies": { + "@loopback/boot": "^7.0.2", + "@loopback/context": "^7.0.2", + "@loopback/core": "^6.0.2", + "@loopback/openapi-v3": "^10.0.2", + "@loopback/repository": "^7.0.2", + "@loopback/rest": "^14.0.2", + "@loopback/rest-explorer": "^7.0.2", + "@loopback/service-proxy": "^7.0.2", + "@opentelemetry/exporter-jaeger": "^1.15.0", + "@opentelemetry/plugin-dns": "^0.15.0", + "@opentelemetry/plugin-http": "^0.18.2", + "@opentelemetry/plugin-https": "^0.18.2", + "@opentelemetry/plugin-pg": "^0.15.0", + "@opentelemetry/plugin-pg-pool": "^0.15.0", + "@opentelemetry/sdk-trace-base": "^1.15.0", + "@opentelemetry/sdk-trace-node": "^1.15.0", + "@sourceloop/core": "^14.1.0", + "@sourceloop/feature-toggle-service": "^3.0.0", + "@types/jsonwebtoken": "^9.0.5", + "dotenv": "^16.0.3", + "dotenv-extended": "^2.9.0", + "loopback-connector-postgresql": "^7.1.1", + "loopback4-authentication": "^12.0.2", + "loopback4-authorization": "^7.0.2", + "swagger-stats": "^0.99.5", + "symlink-resolver": "0.2.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "services/subscription-service/node_modules/@sourceloop/ctrl-plane-subscription-service/node_modules/@sourceloop/core": { + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/@sourceloop/core/-/core-14.1.1.tgz", + "integrity": "sha512-nc13D5UMbF1dU9qsLMkDupaQLsCOrNnT0angXTApIc5DmoB+7vwIHFBpm8Q7RHXh18+e7TSMmgPpFNSttpV6+w==", + "dependencies": { + "@loopback/boot": "^7.0.2", + "@loopback/context": "^7.0.2", + "@loopback/core": "^6.0.2", + "@loopback/express": "^7.0.2", + "@loopback/openapi-v3": "^10.0.2", + "@loopback/repository": "^7.0.2", + "@loopback/rest": "^14.0.2", + "@loopback/rest-explorer": "^7.0.2", + "@loopback/service-proxy": "^7.0.2", + "i18n": "^0.15.1", + "jsonwebtoken": "^9.0.0", + "lodash": "^4.17.21", + "logform": "^2.4.0", + "loopback-datasource-juggler": "^5.0.9", + "loopback4-authentication": "^12.0.2", + "loopback4-authorization": "^7.0.2", + "loopback4-dynamic-datasource": "^2.0.1", + "loopback4-helmet": "^7.0.2", + "loopback4-ratelimiter": "^7.0.2", + "loopback4-soft-delete": "^10.0.2", + "moment": "^2.29.4", + "moment-timezone": "^0.5.34", + "openapi3-ts": "^2.0.2", + "request-ip": "^3.3.0", + "swagger-stats": "^0.99.5", + "tslib": "^2.6.2", + "winston": "^3.7.2" + }, + "engines": { + "node": "18 || 20" + }, + "optionalDependencies": { + "crypto-js": "^4.2.0" + }, + "peerDependencies": { + "@loopback/sequelize": "^0.6.2", + "loopback-connector-rest": "^5.0.1" + }, + "peerDependenciesMeta": { + "@loopback/sequelize": { + "optional": true + } + } + }, "services/subscription-service/node_modules/@types/node": { "version": "18.19.33", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.33.tgz", diff --git a/packages/migrations/Dockerfile b/packages/migrations/Dockerfile index e30e195..3b425d9 100644 --- a/packages/migrations/Dockerfile +++ b/packages/migrations/Dockerfile @@ -1,5 +1,5 @@ # Check out https://hub.docker.com/_/node to select a new base image -FROM public.ecr.aws/docker/library/node:18-alpine +FROM node:18-alpine # Bundle app source code COPY . ./migrations diff --git a/services/orchestrator-service/arc-saas-orchestrator-service-0.0.1.tgz b/services/orchestrator-service/arc-saas-orchestrator-service-0.0.1.tgz deleted file mode 100644 index 79cdd30..0000000 Binary files a/services/orchestrator-service/arc-saas-orchestrator-service-0.0.1.tgz and /dev/null differ diff --git a/services/orchestrator-service/arc-saas-orchestrator-service-0.1.0.tgz b/services/orchestrator-service/arc-saas-orchestrator-service-0.1.0.tgz new file mode 100644 index 0000000..34a794f Binary files /dev/null and b/services/orchestrator-service/arc-saas-orchestrator-service-0.1.0.tgz differ diff --git a/services/orchestrator-service/object-to-json.js b/services/orchestrator-service/object-to-json.js new file mode 100644 index 0000000..eddea5f --- /dev/null +++ b/services/orchestrator-service/object-to-json.js @@ -0,0 +1,191 @@ +/* eslint-disable @typescript-eslint/naming-convention */ +const format = [ + { + Source: 'shubham-manual', + Detail: JSON.stringify({ + CODEBUILD_VPC_AZ: 'us-west-2a', + PYTHON_312_VERSION: '3.12.2', + CLIENT_ID: 'aug14feat-f859-bd99-91eb-b0553032d95e-gwpeu1', + CODEBUILD_LAST_EXIT: '0', + TF_VAR_user_callback_secret: '', + CODEBUILD_START_TIME: '1723631794739', + NODE_20_VERSION: '20.11.1', + PHP_BUILD_EXTRA_MAKE_ARGUMENTS: '-j4', + DOMAIN_NAME: 'arc-saas.net', + CLIENT_SECRET: 'f859-bd99-91eb-b0553032d95e-bnhbb7', + TF_VAR_karpenter_instance_category: 't', + CODEBUILD_BMR_URL: 'https://CODEBUILD_AGENT:3000', + JRE_8_HOME: '/usr/lib/jvm/java-1.8.0-amazon-corretto', + TENANT_NAME: 'as', + TF_VAR_tenant_name: 'as', + CODEBUILD_SOURCE_VERSION: 'refs/heads/main', + JDK_17_HOME: '/usr/lib/jvm/java-17-amazon-corretto', + CODEBUILD_AGENT_ENDPOINT: 'http://127.0.0.1:7831', + HOSTNAME: 'ip-10-0-142-68.us-west-2.compute.internal', + CODEBUILD_BUILD_ID: + 'sf-arc-saas-dev-premium-codebuild-project:8f168599-17ae-4752-8a58-d14d6538a754', + CODEBUILD_KMS_KEY_ID: 'arn:aws:kms:us-west-2:471112653618:alias/aws/s3', + CTS_LINK_LOCAL_ADDR: '169.254.170.3', + PYTHON_PIP_VERSION: '24.0', + JRE_11_HOME: '/usr/lib/jvm/java-11-amazon-corretto', + TF_VAR_cluster_name: 'sf-arc-saas-dev-eks-cluster', + PHP_BUILD_CONFIGURE_OPTS: + '--with-curl --with-password-argon2 --with-pdo-pgsql --with-libedit', + JRE_21_HOME: '/usr/lib/jvm/java-21-amazon-corretto', + HOME: '/root', + TENANT_CLIENT_ID: 'gwpeu1', + OLDPWD: + '/codebuild/output/src1062924985/src/git-codecommit.us-west-2.amazonaws.com/v1/repos/sf-arc-saas-dev-premium-plan-repository/terraform/bootstrap', + TF_VAR_alb_url: + 'alb-external-ingress-201954913.us-west-2.elb.amazonaws.com', + TF_VAR_environment: 'dev', + JRE_HOME: '/usr/lib/jvm/java-17-amazon-corretto', + CODEBUILD_GOPATH: '/codebuild/output/src1062924985', + CB_ROLE: + 'arn:aws:iam::471112653618:role/sf-arc-saas-dev-codebuild-iam-role', + ENVIRONMENT: 'dev', + TENANT_CLIENT_SECRET: 'bnhbb7', + CODEBUILD_CI: 'true', + NODE_18_VERSION: '18.19.1', + GOENV_DISABLE_GOPATH: '1', + CODEBUILD_RESOLVED_SOURCE_VERSION: + 'de960431b80a8dcf96df13ec9aeee3470d0037a5', + CODEBUILD_BUILD_NUMBER: '102', + CODEBUILD_BUILD_SUCCEEDING: '1', + INSTANCE_CATEGORY: 't', + APP_PLANE_ENDPOINT_FEATURE_SERVICE: + 'https://aug14feat.arc-saas.net/feature-service', + RANDOM_SECRET: '', + AWS_CONTAINER_CREDENTIALS_RELATIVE_URI: + '/v2/credentials/cd9fc734-99e0-4f67-9eb1-45a132005835', + CODEBUILD_BUILD_ARN: + 'arn:aws:codebuild:us-west-2:471112653618:build/sf-arc-saas-dev-premium-codebuild-project:8f168599-17ae-4752-8a58-d14d6538a754', + LC_CTYPE: 'C.UTF-8', + tenant: + '{"deleted":false,"deletedOn":null,"deletedBy":null,"createdOn":"2024-08-14T10:36:33.839Z","modifiedOn":"2024-08-14T10:36:33.839Z","createdBy":"b439829b-57e7-49d8-bb23-8ccb2ca97127","modifiedBy":"b439829b-57e7-49d8-bb23-8ccb2ca97127","id":"afb2c17f-f859-bd99-91eb-b0553032d95e","name":"as","status":1,"key":"aug14feat","spocUserId":null,"domains":["sourcefuse.com"],"leadId":null,"addressId":"64c23117-7b63-5232-caaf-518c2c92734a","contacts":[{"deleted":false,"deletedOn":null,"deletedBy":null,"createdOn":"2024-08-14T10:36:33.842Z","modifiedOn":"2024-08-14T10:36:33.842Z","createdBy":"b439829b-57e7-49d8-bb23-8ccb2ca97127","modifiedBy":"b439829b-57e7-49d8-bb23-8ccb2ca97127","id":"ceb2f082-d258-fde3-bb67-39a0da837c3e","firstName":"as","lastName":"as","email":"shubham.prajapat+aug14feat@sourcefuse.com","isPrimary":true,"type":null,"tenantId":"afb2c17f-f859-bd99-91eb-b0553032d95e"}],"address":{"deleted":false,"deletedOn":null,"deletedBy":null,"createdOn":"2024-08-14T10:36:33.829Z","modifiedOn":"2024-08-14T10:36:33.829Z","createdBy":"b439829b-57e7-49d8-bb23-8ccb2ca97127","modifiedBy":"b439829b-57e7-49d8-bb23-8ccb2ca97127","id":"64c23117-7b63-5232-caaf-518c2c92734a","address":"l","city":null,"state":null,"zip":"l","country":"l"}}', + TENANT_ID: 'afb2c17f-f859-bd99-91eb-b0553032d95e', + AWS_EXECUTION_ENV: 'AWS_ECS_EC2', + JRE_17_HOME: '/usr/lib/jvm/java-17-amazon-corretto', + ALB_DNS: 'alb-external-ingress-201954913.us-west-2.elb.amazonaws.com', + CODEBUILD_BUILD_POSTBUILD: '1', + CREATE_USER: '0', + PARAMETER_VALUE: '', + CODEBUILD_ACTION_RUNNER_URL: + 'https://codefactory-us-west-2-prod-default-build-agent-executor.s3.us-west-2.amazonaws.com/cawsrunner.zip', + RUBY_BUILD_SRC_DIR: '/usr/local/rbenv/plugins/ruby-build', + ACCESS_TOKEN_EXPIRATION: '3600', + VPC_ID: 'vpc-0c000dd15b500b2fb', + API_ENDPOINT: 'https://arc-saas.net/tenant-mgmt-facade/webhook', + TF_VAR_rds_instance_allocated_storage: '20', + CODEBUILD_INITIATOR: + 'sf-arc-saas-dev-decoupling-orchestrator-function/sf-arc-saas-dev-decoupling-orchestrator-function', + DOTNET_6_SDK_VERSION: '6.0.420', + DOTNET_6_GLOBAL_JSON_SDK_VERSION: '6.0.0', + WEBHOOK_PATH: 'webhook.js', + DOTNET_8_SDK_VERSION: '8.0.203', + TF_STATE_TABLE: 'sf-arc-saas-dev-aug14feat-terraform-state-lock', + TF_VAR_namespace: 'sf-arc-saas', + AWS_DEFAULT_REGION: 'us-west-2', + DOTNET_8_GLOBAL_JSON_SDK_VERSION: '8.0.0', + AUTH_CODE_EXPIRATION: '3600', + EKS_CLUSTER_NAME: 'sf-arc-saas-dev-eks-cluster', + RUBY_31_VERSION: '3.1.4', + context: 'bf338f61-c371-4437-8252-c70ddb8992ea', + jobName: 'sf-arc-saas-dev-premium-codebuild-project', + COGNITO_AUTH_ID: '38419370-9091-7001-2196-8199fca8e57d', + TF_VAR_tenant_client_id: 'aug14feat-f859-bd99-91eb-b0553032d95e-gwpeu1', + TF_VAR_tenant_host_domain: 'aug14feat.arc-saas.net', + ECS_CONTAINER_METADATA_URI_V4: + 'http://169.254.170.2/v4/2eff8e15-13a1-4751-b0f5-2b9a75ebaf2f', + RUBY_32_VERSION: '3.2.3', + PHP_82_VERSION: '8.2.17', + USERNAME: 'aug14feat', + ECS_CONTAINER_METADATA_URI: + 'http://169.254.170.2/v3/2eff8e15-13a1-4751-b0f5-2b9a75ebaf2f', + DOTNET_ROOT: '/root/.dotnet', + RUBY_33_VERSION: '3.3.0', + PHP_83_VERSION: '8.3.4', + EVENT_BUS_NAME: 'sf-arc-saas-dev-DecouplingEventBus', + CODEBUILD_EXECUTION_ROLE_BUILD: 'true', + POSTGRES_SIZE: '20', + PATH: '/codebuild/output/src1062924985/src/git-codecommit.us-west-2.amazonaws.com/v1/repos/sf-arc-saas-dev-premium-plan-repository/:/usr/local/bin/sbt/bin:/root/.goenv/shims:/root/.goenv/bin:/go/bin:/root/.phpenv/shims:/root/.phpenv/bin:/root/.pyenv/shims:/root/.pyenv/bin:/root/.rbenv/shims:/usr/local/rbenv/bin:/usr/local/rbenv/shims:/root/.dotnet/:/root/.dotnet/tools/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/tools:/codebuild/user/bin', + FE_REPORT_LINK_LOCAL_ADDR: '169.254.170.8', + REDIRECT_URL: 'https://arc-saas.net/main/home', + TF_VAR_jwt_issuer: 'aug14feat', + CODEBUILD_LOG_PATH: 'log-stream/8f168599-17ae-4752-8a58-d14d6538a754', + PYYAML_VERSION: '5.4.1', + KUBECONFIG: '/root/.kube/config', + TENANT_ADMIN_EMAIL: 'shubham.prajapat+aug14feat@sourcefuse.com', + CODEBUILD_BUILD_IMAGE: 'aws/codebuild/standard:7.0', + CODEBUILD_SOURCE_REPO_URL: + 'https://git-codecommit.us-west-2.amazonaws.com/v1/repos/sf-arc-saas-dev-premium-plan-repository', + KARPENTER_ROLE: + 'karpenter-sf-arc-saas-dev-eks-cluster-20240620060226029000000005', + TF_STATE_BUCKET: 'sf-arc-saas-dev-aug14feat-terraform-state-paf40c', + TF_VAR_domain_name: 'arc-saas.net', + TF_VAR_tenant_id: 'afb2c17f-f859-bd99-91eb-b0553032d95e', + AWS_ACCOUNT_ID: '471112653618', + APP_PLANE_REDIRECT_URL: 'https://aug14feat.arc-saas.net/main/home', + REFRESH_TOKEN_EXPIRATION: '3600', + PYTHON_CONFIGURE_OPTS: + '--enable-shared --enable-loadable-sqlite-extensions', + GOPATH: '/go:/codebuild/output/src1062924985', + TF_VAR_tenant_email: 'shubham.prajapat+aug14feat@sourcefuse.com', + CODEBUILD_BUILD_URL: + 'https://us-west-2.console.aws.amazon.com/codebuild/home?region=us-west-2#/builds/sf-arc-saas-dev-premium-codebuild-project:8f168599-17ae-4752-8a58-d14d6538a754/view/new', + JAVA_8_HOME: '/usr/lib/jvm/java-1.8.0-amazon-corretto', + CODEBUILD_SRC_DIR: + '/codebuild/output/src1062924985/src/git-codecommit.us-west-2.amazonaws.com/v1/repos/sf-arc-saas-dev-premium-plan-repository', + AWS_REGION: 'us-west-2', + AWS_ACCESS_KEY_ID: 'ASIAW3MEATMZLTRRZZ4N', + CODEBUILD_PROJECT_UUID: 'e88531cf-2f68-4663-a190-2f0b7b81c550', + NAMESPACE: 'sf-arc-saas', + secret: '1e77e98e72f20561209aae2983e8f397', + KEY: 'aug14feat', + TF_VAR_karpenter_role: + 'karpenter-sf-arc-saas-dev-eks-cluster-20240620060226029000000005', + TF_VAR_tenant_client_secret: 'f859-bd99-91eb-b0553032d95e-bnhbb7', + CODEBUILD_AUTH_TOKEN: 'fd60e83e-60b0-4e0f-9836-2e3de74fe32b', + CODEBUILD_CONTAINER_NAME: 'default', + tier: 'PREMIUM', + TF_VAR_region: 'us-west-2', + JAVA_11_HOME: '/usr/lib/jvm/java-11-amazon-corretto', + JAVA_21_HOME: '/usr/lib/jvm/java-21-amazon-corretto', + TF_KEY: 'aug14feat/aug14feat.tfstate', + USER_CALLBACK_ENDPOINT: + 'https://aug14feat.arc-saas.net/user-tenant-service/user-callback', + JDK_8_HOME: '/usr/lib/jvm/java-1.8.0-amazon-corretto', + JAVA_HOME: '/usr/lib/jvm/java-17-amazon-corretto', + PWD: '/codebuild/output/src1062924985/src/git-codecommit.us-west-2.amazonaws.com/v1/repos/sf-arc-saas-dev-premium-plan-repository/terraform', + TF_VAR_user_name: 'aug14feat', + is_bootstrap_creation: '1', + CODEBUILD_FE_REPORT_ENDPOINT: + 'https://codebuild.us-west-2.amazonaws.com/', + VPC_CIDR_BLOCK: '10.0.0.0/16', + GOLANG_20_VERSION: '1.20.13', + plan: `{"deleted":false,"deletedOn":null,"deletedBy":null,"createdOn":"2024-08-13T14:01:41.899Z","modifiedOn":"2024-08-13T14:01:41.899Z","createdBy":"b439829b-57e7-49d8-bb23-8ccb2ca97127","modifiedBy":"b439829b-57e7-49d8-bb23-8ccb2ca97127","id":"b29c3a1f-2609-2551-e110-7a6c8392332f","name":"Plan test","description":"hit test plan","tier":"PREMIUM","size":"SMALL","price":"200.00","metaData":null,"billingCycleId":"4d6d0d74-37ab-b627-e8b1-947d7247dc27","currencyId":"9061d3e8-3c09-7ee3-045b-c10270bf8b3b","sizeConfig":{"POSTGRES_SIZE":"20","INSTANCE_CATEGORY":"t"},"features":[{"id":"435ce575-1e7f-6a1c-a815-6716012fcd68","name":"Video Call","key":"VIDEO_CALL","description":"Whether to allow video call facility in the application.","defaultValue":"false","type":"boolean","metadata":{},"value":{"id":"482ce235-9099-6c37-7e02-5bdf74fb82f4","featureKey":"435ce575-1e7f-6a1c-a815-6716012fcd68","strategyKey":"Plan","strategyEntityId":"b29c3a1f-2609-2551-e110-7a6c8392332f","status":true,"value":"true"}},{"id":"cc804f47-b851-2664-8a9b-4f605bcfbeb8","name":"Commission Rate","key":"COMMISSION","description":"% Commission that goes to the SaaS Provider, for each call paid call that gets scheduled via the tenant's application.","defaultValue":"0.5","type":"number","metadata":{},"value":{"id":"2152da2b-6c14-7907-80d6-6ed6a824ccce","featureKey":"cc804f47-b851-2664-8a9b-4f605bcfbeb8","strategyKey":"Plan","strategyEntityId":"b29c3a1f-2609-2551-e110-7a6c8392332f","status":true,"value":"20"}},{"id":"f7966749-0f33-5332-5fd5-1051e8a8fbe2","name":"Monthly Consultation Limit","key":"MONTHLY_CONSULTATION","description":"Number of consultation that can be scheduled in a month across customers.","defaultValue":null,"type":"number","metadata":{},"value":{"id":"0df4b98f-2c52-9578-5f51-6c4c273b7d31","featureKey":"f7966749-0f33-5332-5fd5-1051e8a8fbe2","strategyKey":"Plan","strategyEntityId":"b29c3a1f-2609-2551-e110-7a6c8392332f","status":true,"value":"20"}},{"id":"fd12ffe7-86e2-4d26-25b4-47f7ad3147fb","name":"Online Medicine Store","key":"MEDICINE_STORE","description":"Feature to publish a medicine store page in the app.","defaultValue":"false","type":"boolean","metadata":{},"value":{"id":"bde67b43-669f-f4c8-b940-82b20f2e3f7f","featureKey":"fd12ffe7-86e2-4d26-25b4-47f7ad3147fb","strategyKey":"Plan","strategyEntityId":"b29c3a1f-2609-2551-e110-7a6c8392332f","status":true,"value":"true"}}]}`, + AWS_EXPIRATION: '2024-08-14T11:38:16+00:00', + PYTHON_39_VERSION: '3.9.18', + GOLANG_21_VERSION: '1.21.8', + JDK_11_HOME: '/usr/lib/jvm/java-11-amazon-corretto', + CONTROL_PLANE_HOST: 'https://arc-saas.net', + TF_VAR_tenant: 'aug14feat', + TF_VAR_tenant_secret: '', + RBENV_SRC_DIR: '/usr/local/rbenv', + PYTHON_310_VERSION: '3.10.13', + GOLANG_22_VERSION: '1.22.1', + JAVA_17_HOME: '/usr/lib/jvm/java-17-amazon-corretto', + JDK_21_HOME: '/usr/lib/jvm/java-21-amazon-corretto', + NUGET_XMLDOC_MODE: 'skip', + PYTHON_311_VERSION: '3.11.8', + JDK_HOME: '/usr/lib/jvm/java-17-amazon-corretto', + }), + Resources: ['resource1', 'resource2'], + EventBusName: 'sf-arc-saas-dev-DecouplingEventBus', + DetailType: 'TENANT_DEPROVISIONING', + }, +]; + +// save the format object to a file called putevent.json +const fs = require('fs'); +fs.writeFileSync('putEvent.json', JSON.stringify(format, null, 2)); diff --git a/services/orchestrator-service/package.json b/services/orchestrator-service/package.json index 4c9ab0b..0d784d9 100644 --- a/services/orchestrator-service/package.json +++ b/services/orchestrator-service/package.json @@ -49,9 +49,10 @@ "!*/__tests__" ], "dependencies": { - "@arc-saas/orchestrator-service": "file:arc-saas-orchestrator-service-0.0.1.tgz", + "@arc-saas/orchestrator-service": "file:arc-saas-orchestrator-service-0.1.0.tgz", "@aws-sdk/client-codebuild": "^3.616.0", "@aws-sdk/client-dynamodb": "^3.616.0", + "@aws-sdk/client-eventbridge": "^3.626.0", "@aws-sdk/util-dynamodb": "^3.616.0", "@loopback/boot": "^7.0.4", "@loopback/core": "^6.1.1", diff --git a/services/orchestrator-service/putevents.json b/services/orchestrator-service/putevents.json new file mode 100644 index 0000000..9a3a644 --- /dev/null +++ b/services/orchestrator-service/putevents.json @@ -0,0 +1,8 @@ +[ + { + "Source": "shubham.manual", + "Detail": "{\"CODEBUILD_VPC_AZ\":\"us-west-2a\",\"PYTHON_312_VERSION\":\"3.12.2\",\"CLIENT_ID\":\"aug14feat-f859-bd99-91eb-b0553032d95e-gwpeu1\",\"CODEBUILD_LAST_EXIT\":\"0\",\"TF_VAR_user_callback_secret\":\"\",\"CODEBUILD_START_TIME\":\"1723631794739\",\"NODE_20_VERSION\":\"20.11.1\",\"PHP_BUILD_EXTRA_MAKE_ARGUMENTS\":\"-j4\",\"DOMAIN_NAME\":\"arc-saas.net\",\"CLIENT_SECRET\":\"f859-bd99-91eb-b0553032d95e-bnhbb7\",\"TF_VAR_karpenter_instance_category\":\"t\",\"CODEBUILD_BMR_URL\":\"https://CODEBUILD_AGENT:3000\",\"JRE_8_HOME\":\"/usr/lib/jvm/java-1.8.0-amazon-corretto\",\"TENANT_NAME\":\"as\",\"TF_VAR_tenant_name\":\"as\",\"CODEBUILD_SOURCE_VERSION\":\"refs/heads/main\",\"JDK_17_HOME\":\"/usr/lib/jvm/java-17-amazon-corretto\",\"CODEBUILD_AGENT_ENDPOINT\":\"http://127.0.0.1:7831\",\"HOSTNAME\":\"ip-10-0-142-68.us-west-2.compute.internal\",\"CODEBUILD_BUILD_ID\":\"sf-arc-saas-dev-premium-codebuild-project:8f168599-17ae-4752-8a58-d14d6538a754\",\"CODEBUILD_KMS_KEY_ID\":\"arn:aws:kms:us-west-2:471112653618:alias/aws/s3\",\"CTS_LINK_LOCAL_ADDR\":\"169.254.170.3\",\"PYTHON_PIP_VERSION\":\"24.0\",\"JRE_11_HOME\":\"/usr/lib/jvm/java-11-amazon-corretto\",\"TF_VAR_cluster_name\":\"sf-arc-saas-dev-eks-cluster\",\"PHP_BUILD_CONFIGURE_OPTS\":\"--with-curl --with-password-argon2 --with-pdo-pgsql --with-libedit\",\"JRE_21_HOME\":\"/usr/lib/jvm/java-21-amazon-corretto\",\"HOME\":\"/root\",\"TENANT_CLIENT_ID\":\"gwpeu1\",\"OLDPWD\":\"/codebuild/output/src1062924985/src/git-codecommit.us-west-2.amazonaws.com/v1/repos/sf-arc-saas-dev-premium-plan-repository/terraform/bootstrap\",\"TF_VAR_alb_url\":\"alb-external-ingress-201954913.us-west-2.elb.amazonaws.com\",\"TF_VAR_environment\":\"dev\",\"JRE_HOME\":\"/usr/lib/jvm/java-17-amazon-corretto\",\"CODEBUILD_GOPATH\":\"/codebuild/output/src1062924985\",\"CB_ROLE\":\"arn:aws:iam::471112653618:role/sf-arc-saas-dev-codebuild-iam-role\",\"ENVIRONMENT\":\"dev\",\"TENANT_CLIENT_SECRET\":\"bnhbb7\",\"CODEBUILD_CI\":\"true\",\"NODE_18_VERSION\":\"18.19.1\",\"GOENV_DISABLE_GOPATH\":\"1\",\"CODEBUILD_RESOLVED_SOURCE_VERSION\":\"de960431b80a8dcf96df13ec9aeee3470d0037a5\",\"CODEBUILD_BUILD_NUMBER\":\"102\",\"CODEBUILD_BUILD_SUCCEEDING\":\"1\",\"INSTANCE_CATEGORY\":\"t\",\"APP_PLANE_ENDPOINT_FEATURE_SERVICE\":\"https://aug14feat.arc-saas.net/feature-service\",\"RANDOM_SECRET\":\"\",\"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\":\"/v2/credentials/cd9fc734-99e0-4f67-9eb1-45a132005835\",\"CODEBUILD_BUILD_ARN\":\"arn:aws:codebuild:us-west-2:471112653618:build/sf-arc-saas-dev-premium-codebuild-project:8f168599-17ae-4752-8a58-d14d6538a754\",\"LC_CTYPE\":\"C.UTF-8\",\"tenant\":\"{\\\"deleted\\\":false,\\\"deletedOn\\\":null,\\\"deletedBy\\\":null,\\\"createdOn\\\":\\\"2024-08-14T10:36:33.839Z\\\",\\\"modifiedOn\\\":\\\"2024-08-14T10:36:33.839Z\\\",\\\"createdBy\\\":\\\"b439829b-57e7-49d8-bb23-8ccb2ca97127\\\",\\\"modifiedBy\\\":\\\"b439829b-57e7-49d8-bb23-8ccb2ca97127\\\",\\\"id\\\":\\\"afb2c17f-f859-bd99-91eb-b0553032d95e\\\",\\\"name\\\":\\\"as\\\",\\\"status\\\":1,\\\"key\\\":\\\"aug14feat\\\",\\\"spocUserId\\\":null,\\\"domains\\\":[\\\"sourcefuse.com\\\"],\\\"leadId\\\":null,\\\"addressId\\\":\\\"64c23117-7b63-5232-caaf-518c2c92734a\\\",\\\"contacts\\\":[{\\\"deleted\\\":false,\\\"deletedOn\\\":null,\\\"deletedBy\\\":null,\\\"createdOn\\\":\\\"2024-08-14T10:36:33.842Z\\\",\\\"modifiedOn\\\":\\\"2024-08-14T10:36:33.842Z\\\",\\\"createdBy\\\":\\\"b439829b-57e7-49d8-bb23-8ccb2ca97127\\\",\\\"modifiedBy\\\":\\\"b439829b-57e7-49d8-bb23-8ccb2ca97127\\\",\\\"id\\\":\\\"ceb2f082-d258-fde3-bb67-39a0da837c3e\\\",\\\"firstName\\\":\\\"as\\\",\\\"lastName\\\":\\\"as\\\",\\\"email\\\":\\\"shubham.prajapat+aug14feat@sourcefuse.com\\\",\\\"isPrimary\\\":true,\\\"type\\\":null,\\\"tenantId\\\":\\\"afb2c17f-f859-bd99-91eb-b0553032d95e\\\"}],\\\"address\\\":{\\\"deleted\\\":false,\\\"deletedOn\\\":null,\\\"deletedBy\\\":null,\\\"createdOn\\\":\\\"2024-08-14T10:36:33.829Z\\\",\\\"modifiedOn\\\":\\\"2024-08-14T10:36:33.829Z\\\",\\\"createdBy\\\":\\\"b439829b-57e7-49d8-bb23-8ccb2ca97127\\\",\\\"modifiedBy\\\":\\\"b439829b-57e7-49d8-bb23-8ccb2ca97127\\\",\\\"id\\\":\\\"64c23117-7b63-5232-caaf-518c2c92734a\\\",\\\"address\\\":\\\"l\\\",\\\"city\\\":null,\\\"state\\\":null,\\\"zip\\\":\\\"l\\\",\\\"country\\\":\\\"l\\\"}}\",\"TENANT_ID\":\"afb2c17f-f859-bd99-91eb-b0553032d95e\",\"AWS_EXECUTION_ENV\":\"AWS_ECS_EC2\",\"JRE_17_HOME\":\"/usr/lib/jvm/java-17-amazon-corretto\",\"ALB_DNS\":\"alb-external-ingress-201954913.us-west-2.elb.amazonaws.com\",\"CODEBUILD_BUILD_POSTBUILD\":\"1\",\"CREATE_USER\":\"0\",\"PARAMETER_VALUE\":\"\",\"CODEBUILD_ACTION_RUNNER_URL\":\"https://codefactory-us-west-2-prod-default-build-agent-executor.s3.us-west-2.amazonaws.com/cawsrunner.zip\",\"RUBY_BUILD_SRC_DIR\":\"/usr/local/rbenv/plugins/ruby-build\",\"ACCESS_TOKEN_EXPIRATION\":\"3600\",\"VPC_ID\":\"vpc-0c000dd15b500b2fb\",\"API_ENDPOINT\":\"https://arc-saas.net/tenant-mgmt-facade/webhook\",\"TF_VAR_rds_instance_allocated_storage\":\"20\",\"CODEBUILD_INITIATOR\":\"sf-arc-saas-dev-decoupling-orchestrator-function/sf-arc-saas-dev-decoupling-orchestrator-function\",\"DOTNET_6_SDK_VERSION\":\"6.0.420\",\"DOTNET_6_GLOBAL_JSON_SDK_VERSION\":\"6.0.0\",\"WEBHOOK_PATH\":\"webhook.js\",\"DOTNET_8_SDK_VERSION\":\"8.0.203\",\"TF_STATE_TABLE\":\"sf-arc-saas-dev-aug14feat-terraform-state-lock\",\"TF_VAR_namespace\":\"sf-arc-saas\",\"AWS_DEFAULT_REGION\":\"us-west-2\",\"DOTNET_8_GLOBAL_JSON_SDK_VERSION\":\"8.0.0\",\"AUTH_CODE_EXPIRATION\":\"3600\",\"EKS_CLUSTER_NAME\":\"sf-arc-saas-dev-eks-cluster\",\"RUBY_31_VERSION\":\"3.1.4\",\"context\":\"bf338f61-c371-4437-8252-c70ddb8992ea\",\"jobName\":\"sf-arc-saas-dev-premium-codebuild-project\",\"COGNITO_AUTH_ID\":\"38419370-9091-7001-2196-8199fca8e57d\",\"TF_VAR_tenant_client_id\":\"aug14feat-f859-bd99-91eb-b0553032d95e-gwpeu1\",\"TF_VAR_tenant_host_domain\":\"aug14feat.arc-saas.net\",\"ECS_CONTAINER_METADATA_URI_V4\":\"http://169.254.170.2/v4/2eff8e15-13a1-4751-b0f5-2b9a75ebaf2f\",\"RUBY_32_VERSION\":\"3.2.3\",\"PHP_82_VERSION\":\"8.2.17\",\"USERNAME\":\"aug14feat\",\"ECS_CONTAINER_METADATA_URI\":\"http://169.254.170.2/v3/2eff8e15-13a1-4751-b0f5-2b9a75ebaf2f\",\"DOTNET_ROOT\":\"/root/.dotnet\",\"RUBY_33_VERSION\":\"3.3.0\",\"PHP_83_VERSION\":\"8.3.4\",\"EVENT_BUS_NAME\":\"sf-arc-saas-dev-DecouplingEventBus\",\"CODEBUILD_EXECUTION_ROLE_BUILD\":\"true\",\"POSTGRES_SIZE\":\"20\",\"PATH\":\"/codebuild/output/src1062924985/src/git-codecommit.us-west-2.amazonaws.com/v1/repos/sf-arc-saas-dev-premium-plan-repository/:/usr/local/bin/sbt/bin:/root/.goenv/shims:/root/.goenv/bin:/go/bin:/root/.phpenv/shims:/root/.phpenv/bin:/root/.pyenv/shims:/root/.pyenv/bin:/root/.rbenv/shims:/usr/local/rbenv/bin:/usr/local/rbenv/shims:/root/.dotnet/:/root/.dotnet/tools/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/tools:/codebuild/user/bin\",\"FE_REPORT_LINK_LOCAL_ADDR\":\"169.254.170.8\",\"REDIRECT_URL\":\"https://arc-saas.net/main/home\",\"TF_VAR_jwt_issuer\":\"aug14feat\",\"CODEBUILD_LOG_PATH\":\"log-stream/8f168599-17ae-4752-8a58-d14d6538a754\",\"PYYAML_VERSION\":\"5.4.1\",\"KUBECONFIG\":\"/root/.kube/config\",\"TENANT_ADMIN_EMAIL\":\"shubham.prajapat+aug14feat@sourcefuse.com\",\"CODEBUILD_BUILD_IMAGE\":\"aws/codebuild/standard:7.0\",\"CODEBUILD_SOURCE_REPO_URL\":\"https://git-codecommit.us-west-2.amazonaws.com/v1/repos/sf-arc-saas-dev-premium-plan-repository\",\"KARPENTER_ROLE\":\"karpenter-sf-arc-saas-dev-eks-cluster-20240620060226029000000005\",\"TF_STATE_BUCKET\":\"sf-arc-saas-dev-aug14feat-terraform-state-paf40c\",\"TF_VAR_domain_name\":\"arc-saas.net\",\"TF_VAR_tenant_id\":\"afb2c17f-f859-bd99-91eb-b0553032d95e\",\"AWS_ACCOUNT_ID\":\"471112653618\",\"APP_PLANE_REDIRECT_URL\":\"https://aug14feat.arc-saas.net/main/home\",\"REFRESH_TOKEN_EXPIRATION\":\"3600\",\"PYTHON_CONFIGURE_OPTS\":\"--enable-shared --enable-loadable-sqlite-extensions\",\"GOPATH\":\"/go:/codebuild/output/src1062924985\",\"TF_VAR_tenant_email\":\"shubham.prajapat+aug14feat@sourcefuse.com\",\"CODEBUILD_BUILD_URL\":\"https://us-west-2.console.aws.amazon.com/codebuild/home?region=us-west-2#/builds/sf-arc-saas-dev-premium-codebuild-project:8f168599-17ae-4752-8a58-d14d6538a754/view/new\",\"JAVA_8_HOME\":\"/usr/lib/jvm/java-1.8.0-amazon-corretto\",\"CODEBUILD_SRC_DIR\":\"/codebuild/output/src1062924985/src/git-codecommit.us-west-2.amazonaws.com/v1/repos/sf-arc-saas-dev-premium-plan-repository\",\"AWS_REGION\":\"us-west-2\",\"AWS_ACCESS_KEY_ID\":\"ASIAW3MEATMZLTRRZZ4N\",\"CODEBUILD_PROJECT_UUID\":\"e88531cf-2f68-4663-a190-2f0b7b81c550\",\"NAMESPACE\":\"sf-arc-saas\",\"secret\":\"1e77e98e72f20561209aae2983e8f397\",\"KEY\":\"aug14feat\",\"TF_VAR_karpenter_role\":\"karpenter-sf-arc-saas-dev-eks-cluster-20240620060226029000000005\",\"TF_VAR_tenant_client_secret\":\"f859-bd99-91eb-b0553032d95e-bnhbb7\",\"CODEBUILD_AUTH_TOKEN\":\"fd60e83e-60b0-4e0f-9836-2e3de74fe32b\",\"CODEBUILD_CONTAINER_NAME\":\"default\",\"tier\":\"PREMIUM\",\"TF_VAR_region\":\"us-west-2\",\"JAVA_11_HOME\":\"/usr/lib/jvm/java-11-amazon-corretto\",\"JAVA_21_HOME\":\"/usr/lib/jvm/java-21-amazon-corretto\",\"TF_KEY\":\"aug14feat/aug14feat.tfstate\",\"USER_CALLBACK_ENDPOINT\":\"https://aug14feat.arc-saas.net/user-tenant-service/user-callback\",\"JDK_8_HOME\":\"/usr/lib/jvm/java-1.8.0-amazon-corretto\",\"JAVA_HOME\":\"/usr/lib/jvm/java-17-amazon-corretto\",\"PWD\":\"/codebuild/output/src1062924985/src/git-codecommit.us-west-2.amazonaws.com/v1/repos/sf-arc-saas-dev-premium-plan-repository/terraform\",\"TF_VAR_user_name\":\"aug14feat\",\"is_bootstrap_creation\":\"1\",\"CODEBUILD_FE_REPORT_ENDPOINT\":\"https://codebuild.us-west-2.amazonaws.com/\",\"VPC_CIDR_BLOCK\":\"10.0.0.0/16\",\"GOLANG_20_VERSION\":\"1.20.13\",\"plan\":\"{\\\"deleted\\\":false,\\\"deletedOn\\\":null,\\\"deletedBy\\\":null,\\\"createdOn\\\":\\\"2024-08-13T14:01:41.899Z\\\",\\\"modifiedOn\\\":\\\"2024-08-13T14:01:41.899Z\\\",\\\"createdBy\\\":\\\"b439829b-57e7-49d8-bb23-8ccb2ca97127\\\",\\\"modifiedBy\\\":\\\"b439829b-57e7-49d8-bb23-8ccb2ca97127\\\",\\\"id\\\":\\\"b29c3a1f-2609-2551-e110-7a6c8392332f\\\",\\\"name\\\":\\\"Plan test\\\",\\\"description\\\":\\\"hit test plan\\\",\\\"tier\\\":\\\"PREMIUM\\\",\\\"size\\\":\\\"SMALL\\\",\\\"price\\\":\\\"200.00\\\",\\\"metaData\\\":null,\\\"billingCycleId\\\":\\\"4d6d0d74-37ab-b627-e8b1-947d7247dc27\\\",\\\"currencyId\\\":\\\"9061d3e8-3c09-7ee3-045b-c10270bf8b3b\\\",\\\"sizeConfig\\\":{\\\"POSTGRES_SIZE\\\":\\\"20\\\",\\\"INSTANCE_CATEGORY\\\":\\\"t\\\"},\\\"features\\\":[{\\\"id\\\":\\\"435ce575-1e7f-6a1c-a815-6716012fcd68\\\",\\\"name\\\":\\\"Video Call\\\",\\\"key\\\":\\\"VIDEO_CALL\\\",\\\"description\\\":\\\"Whether to allow video call facility in the application.\\\",\\\"defaultValue\\\":\\\"false\\\",\\\"type\\\":\\\"boolean\\\",\\\"metadata\\\":{},\\\"value\\\":{\\\"id\\\":\\\"482ce235-9099-6c37-7e02-5bdf74fb82f4\\\",\\\"featureKey\\\":\\\"435ce575-1e7f-6a1c-a815-6716012fcd68\\\",\\\"strategyKey\\\":\\\"Plan\\\",\\\"strategyEntityId\\\":\\\"b29c3a1f-2609-2551-e110-7a6c8392332f\\\",\\\"status\\\":true,\\\"value\\\":\\\"true\\\"}},{\\\"id\\\":\\\"cc804f47-b851-2664-8a9b-4f605bcfbeb8\\\",\\\"name\\\":\\\"Commission Rate\\\",\\\"key\\\":\\\"COMMISSION\\\",\\\"description\\\":\\\"% Commission that goes to the SaaS Provider, for each call paid call that gets scheduled via the tenant's application.\\\",\\\"defaultValue\\\":\\\"0.5\\\",\\\"type\\\":\\\"number\\\",\\\"metadata\\\":{},\\\"value\\\":{\\\"id\\\":\\\"2152da2b-6c14-7907-80d6-6ed6a824ccce\\\",\\\"featureKey\\\":\\\"cc804f47-b851-2664-8a9b-4f605bcfbeb8\\\",\\\"strategyKey\\\":\\\"Plan\\\",\\\"strategyEntityId\\\":\\\"b29c3a1f-2609-2551-e110-7a6c8392332f\\\",\\\"status\\\":true,\\\"value\\\":\\\"20\\\"}},{\\\"id\\\":\\\"f7966749-0f33-5332-5fd5-1051e8a8fbe2\\\",\\\"name\\\":\\\"Monthly Consultation Limit\\\",\\\"key\\\":\\\"MONTHLY_CONSULTATION\\\",\\\"description\\\":\\\"Number of consultation that can be scheduled in a month across customers.\\\",\\\"defaultValue\\\":null,\\\"type\\\":\\\"number\\\",\\\"metadata\\\":{},\\\"value\\\":{\\\"id\\\":\\\"0df4b98f-2c52-9578-5f51-6c4c273b7d31\\\",\\\"featureKey\\\":\\\"f7966749-0f33-5332-5fd5-1051e8a8fbe2\\\",\\\"strategyKey\\\":\\\"Plan\\\",\\\"strategyEntityId\\\":\\\"b29c3a1f-2609-2551-e110-7a6c8392332f\\\",\\\"status\\\":true,\\\"value\\\":\\\"20\\\"}},{\\\"id\\\":\\\"fd12ffe7-86e2-4d26-25b4-47f7ad3147fb\\\",\\\"name\\\":\\\"Online Medicine Store\\\",\\\"key\\\":\\\"MEDICINE_STORE\\\",\\\"description\\\":\\\"Feature to publish a medicine store page in the app.\\\",\\\"defaultValue\\\":\\\"false\\\",\\\"type\\\":\\\"boolean\\\",\\\"metadata\\\":{},\\\"value\\\":{\\\"id\\\":\\\"bde67b43-669f-f4c8-b940-82b20f2e3f7f\\\",\\\"featureKey\\\":\\\"fd12ffe7-86e2-4d26-25b4-47f7ad3147fb\\\",\\\"strategyKey\\\":\\\"Plan\\\",\\\"strategyEntityId\\\":\\\"b29c3a1f-2609-2551-e110-7a6c8392332f\\\",\\\"status\\\":true,\\\"value\\\":\\\"true\\\"}}]}\",\"AWS_EXPIRATION\":\"2024-08-14T11:38:16+00:00\",\"PYTHON_39_VERSION\":\"3.9.18\",\"GOLANG_21_VERSION\":\"1.21.8\",\"JDK_11_HOME\":\"/usr/lib/jvm/java-11-amazon-corretto\",\"CONTROL_PLANE_HOST\":\"https://arc-saas.net\",\"TF_VAR_tenant\":\"aug14feat\",\"TF_VAR_tenant_secret\":\"\",\"RBENV_SRC_DIR\":\"/usr/local/rbenv\",\"PYTHON_310_VERSION\":\"3.10.13\",\"GOLANG_22_VERSION\":\"1.22.1\",\"JAVA_17_HOME\":\"/usr/lib/jvm/java-17-amazon-corretto\",\"JDK_21_HOME\":\"/usr/lib/jvm/java-21-amazon-corretto\",\"NUGET_XMLDOC_MODE\":\"skip\",\"PYTHON_311_VERSION\":\"3.11.8\",\"JDK_HOME\":\"/usr/lib/jvm/java-17-amazon-corretto\"}", + "EventBusName": "sf-arc-saas-dev-DecouplingEventBus", + "DetailType": "TENANT_DEPLOYMENT" + } +] diff --git a/services/orchestrator-service/src/application.ts b/services/orchestrator-service/src/application.ts index ae63128..765da5a 100644 --- a/services/orchestrator-service/src/application.ts +++ b/services/orchestrator-service/src/application.ts @@ -14,6 +14,8 @@ import { OrchestratorServiceBindings, TenantProvisioningHandler, TenantProvisioningSuccessHandler, + TenantProvisioningFailureHandler, + TenantDeploymentHandler, } from '@arc-saas/orchestrator-service'; import { AwsCodeBuildService, @@ -22,6 +24,7 @@ import { TenantProvisioningHandlerProvider, TenantProvisioningSuccessHandlerProvider, TierDetailsProvider, + TenantDeploymentProvider, } from './services'; export {ApplicationConfig}; @@ -36,10 +39,19 @@ export class OrchestratorServiceApplication extends BootMixin( this.bind>( OrchestratorServiceBindings.TENANT_PROVISIONING_HANDLER, ).toProvider(TenantProvisioningHandlerProvider); + this.bind( OrchestratorServiceBindings.TENANT_PROVISIONING_SUCCESS_HANDLER, ).toProvider(TenantProvisioningSuccessHandlerProvider); + this.bind( + OrchestratorServiceBindings.TENANT_PROVISIONING_FAILURE_HANDLER, + ).toProvider(TenantProvisioningSuccessHandlerProvider); + + this.bind( + OrchestratorServiceBindings.TENANT_DEPLOYMENT_HANDLER, + ).toProvider(TenantDeploymentProvider); + this.bind(OrchestratorServiceBindings.TIER_DETAILS_PROVIDER).toProvider( TierDetailsProvider, ); diff --git a/services/orchestrator-service/src/services/data-store.service.ts b/services/orchestrator-service/src/services/data-store.service.ts new file mode 100644 index 0000000..7c264ff --- /dev/null +++ b/services/orchestrator-service/src/services/data-store.service.ts @@ -0,0 +1,80 @@ +import {BindingScope, injectable} from '@loopback/core'; +import { + DynamoDBClient, + PutItemCommand, + PutItemCommandInput, + QueryCommand, +} from '@aws-sdk/client-dynamodb'; +import {marshall, unmarshall} from '@aws-sdk/util-dynamodb'; +import {AnyObject} from '@loopback/repository'; + +@injectable({scope: BindingScope.SINGLETON}) +export class DataStoreService { + private client: DynamoDBClient; + + constructor() { + this.client = new DynamoDBClient({region: process.env.DYNAMO_DB_REGION}); + } + + async retrieveDataFromDynamoDB( + filterValue: string, + identifier: string = 'tenantId', + ): Promise<{tenantId: string; planConfig: AnyObject} & AnyObject> { + const params = { + TableName: process.env.DATA_STORE_TABLE, + KeyConditionExpression: `${identifier} = :${identifier}`, + ExpressionAttributeValues: marshall({ + [`:${identifier}`]: filterValue, + }), + }; + + try { + const command = new QueryCommand(params); + const response = await this.client.send(command); + if (!response.Items) { + throw Error('Items not found.'); + } + const items = response.Items.map(item => unmarshall(item)); + console.log('DataStore Query results:', items); + + if (items.length === 0) { + throw new Error( + 'Provided provisioning details not found in data store table.', + ); + } + + const provisioningRequest = items[0]; + return { + ...provisioningRequest, + planConfig: provisioningRequest.planConfig, + tenantId: provisioningRequest.tenantId as string, + }; + } catch (error) { + console.error( + `Error fetching data from data store for the tenantId: ${filterValue}:`, + error, + ); + throw error; + } + } + + async storeDataInDynamoDB( + data: {tenantId: string} & AnyObject, + ): Promise { + const params: PutItemCommandInput = { + TableName: process.env.DATA_STORE_TABLE, + Item: marshall(data), + }; + + try { + const command = new PutItemCommand(params); + await this.client.send(command); + console.log( + `Data stored successfully in DynamoDB table.${params.TableName} `, + ); + } catch (error) { + console.error('Error storing data in DynamoDB:', error); + throw error; + } + } +} diff --git a/services/orchestrator-service/src/services/index.ts b/services/orchestrator-service/src/services/index.ts index 71a39bc..72204ad 100644 --- a/services/orchestrator-service/src/services/index.ts +++ b/services/orchestrator-service/src/services/index.ts @@ -3,3 +3,5 @@ export * from './tier-details.service'; export * from './aws-code-build.service'; export * from './orchestrator.service'; export * from './tenant-provisioning-success.handler'; +export * from './tenant-deployment.handler'; +export * from './data-store.service'; diff --git a/services/orchestrator-service/src/services/orchestrator.service.ts b/services/orchestrator-service/src/services/orchestrator.service.ts index 4382915..1f6155e 100644 --- a/services/orchestrator-service/src/services/orchestrator.service.ts +++ b/services/orchestrator-service/src/services/orchestrator.service.ts @@ -4,6 +4,7 @@ import { DefaultEventTypes, OrchestratorServiceBindings, OrchestratorServiceInterface, + TenantDeploymentHandler, TenantDeprovisioningHandler, TenantProvisioningFailureHandler, TenantProvisioningHandler, @@ -34,6 +35,8 @@ export class OrchestratorService implements OrchestratorServiceInterface { private handleTenantProvisioningSuccess: TenantProvisioningSuccessHandler, @inject(OrchestratorServiceBindings.TENANT_PROVISIONING_FAILURE_HANDLER) private handleTenantProvisioningFailure: TenantProvisioningFailureHandler, + @inject(OrchestratorServiceBindings.TENANT_DEPLOYMENT_HANDLER) + private handleTenantDeployment: TenantDeploymentHandler, ) {} handleEvent( @@ -47,8 +50,10 @@ export class OrchestratorService implements OrchestratorServiceInterface { return this.handleTenantDeprovisioning(eventBody.detail); case DefaultEventTypes.TENANT_PROVISIONING_SUCCESS: return this.handleTenantProvisioningSuccess(eventBody.detail); - case DefaultEventTypes.TENANT_PROVISIONING_FAILED: + case DefaultEventTypes.TENANT_PROVISIONING_FAILURE: return this.handleTenantProvisioningFailure(eventBody.detail); + case DefaultEventTypes.TENANT_DEPLOYMENT: + return this.handleTenantDeployment(eventBody.detail); default: throw new Error(`Unsupported event type: ${eventType}`); } diff --git a/services/orchestrator-service/src/services/tenant-deployment.handler.ts b/services/orchestrator-service/src/services/tenant-deployment.handler.ts new file mode 100644 index 0000000..ce3944d --- /dev/null +++ b/services/orchestrator-service/src/services/tenant-deployment.handler.ts @@ -0,0 +1,268 @@ +import {TenantDeploymentHandler} from '@arc-saas/orchestrator-service'; +import {injectable, BindingScope, Provider, service} from '@loopback/core'; +import {AnyObject} from '@loopback/repository'; +import {IncomingMessage} from 'http'; +import * as https from 'https'; +import * as http from 'http'; +import * as crypto from 'crypto'; +import {DataStoreService} from './data-store.service'; + +@injectable({scope: BindingScope.TRANSIENT}) +export class TenantDeploymentProvider + implements Provider +{ + constructor( + @service(DataStoreService) + private readonly dataStoreService: DataStoreService, + ) {} + + value() { + return async (body: AnyObject) => this.handler(body); + } + + private async handler(detail: AnyObject): Promise { + console.log('Tenant Deployment: ', detail); + + const httpModule = this.getHttpModule(detail.API_ENDPOINT); + const getTimestamp = () => { + return Date.now(); + }; + const secret = detail.secret; + const context = detail.context; + + const tenantData = JSON.parse(detail.tenant); + const contact = tenantData.contacts[0]; + + const provisioningRecord = + await this.dataStoreService.retrieveDataFromDynamoDB( + tenantData.id, + 'tenantId', + ); + + console.log( + `Provisioning record for the tenant: ${tenantData.id}`, + provisioningRecord, + ); + + const tenantContextPayload = this.createTenantContextPayload( + detail, + provisioningRecord.planConfig, + ); + console.log('tenantContextPayload', tenantContextPayload); + + console.log( + 'detail.APP_PLANE_ENDPOINT_FEATURE_SERVICE', + detail.APP_PLANE_ENDPOINT_FEATURE_SERVICE, + ); + if (detail.APP_PLANE_ENDPOINT_FEATURE_SERVICE) { + console.log('Triggering APP_PLANE_ENDPOINT_FEATURE_SERVICE'); + await this.makeCall( + httpModule, + detail.APP_PLANE_ENDPOINT_FEATURE_SERVICE.concat('/bootstrap'), + tenantContextPayload, + 'service-callback', + secret, + getTimestamp(), + context, + ).catch(err => { + console.log('Error in APP_PLANE_ENDPOINT_FEATURE_SERVICE call', err); + }); + } else { + console.log( + '🟥 APP_PLANE_ENDPOINT_FEATURE_SERVICE is not available in the detail object.', + ); + } + + const tenantPayload = this.createTenantPayload( + detail, + tenantData, + contact, + secret, + ); + + try { + if (detail.CODEBUILD_BUILD_SUCCEEDING === '0') { + await this.makeCall( + httpModule, + detail.API_ENDPOINT, + this.createPayload(detail, tenantData), + 'webhook', + secret, + getTimestamp(), + context, + ).catch(err => { + console.log('Error in API_ENDPOINT call', err); + }); + } else if (detail.CODEBUILD_BUILD_POSTBUILD === '1') { + // if (detail.CREATE_USER === '1') { + await this.makeCall( + httpModule, + detail.USER_CALLBACK_ENDPOINT.replace('user-callback', 'bootstrap'), + tenantPayload, + 'service-callback', + secret, + getTimestamp(), + context, + ).catch(err => { + console.log( + `Error in ${detail.USER_CALLBACK_ENDPOINT.replace('user-callback', 'bootstrap')} call`, + err, + ); + }); + // } + await this.makeCall( + httpModule, + detail.API_ENDPOINT, + this.createPayload(detail, tenantData), + 'webhook', + secret, + getTimestamp(), + context, + ).catch(err => { + console.log(`Error in ${detail.API_ENDPOINT} call:`, err); + }); + } else { + console.log('No call made'); + } + } catch (e) { + console.error(e); + detail.CODEBUILD_BUILD_SUCCEEDING = '0'; + await this.makeCall( + httpModule, + detail.API_ENDPOINT, + this.createPayload(detail, tenantData), + 'webhook', + secret, + getTimestamp(), + context, + ); + } + } + + private getHttpModule(endpoint: string): typeof https | typeof http { + return endpoint.split('://')[0] === 'https' ? https : http; + } + + private createTenantContextPayload(detail: AnyObject, plan: AnyObject) { + return JSON.stringify({ + tenant: JSON.parse(detail.tenant), + plan: plan, + }); + } + + private createPayload(detail: AnyObject, tenantData: AnyObject) { + return JSON.stringify({ + initiatorId: tenantData.id, + type: 0, + data: { + status: Number(`${detail.CODEBUILD_BUILD_SUCCEEDING}`), + resources: [ + { + type: 's3', + metadata: { + bucket: detail.TF_STATE_BUCKET, + path: detail.TF_KEY, + }, + }, + ], + appPlaneUrl: detail.APP_PLANE_REDIRECT_URL, + }, + }); + } + + private createTenantPayload( + detail: AnyObject, + tenantData: AnyObject, + contact: AnyObject, + secret: string, + ) { + return JSON.stringify({ + tenant: tenantData, + email: contact?.email, + phone: contact?.phone, + username: contact?.username, + tenantName: tenantData.name, + tenantKey: tenantData.key, + firstName: contact?.firstName, + lastName: contact?.lastName, + middleName: contact?.middleName, + cognitoAuthId: detail.COGNITO_AUTH_ID, + authClient: { + clientId: detail.CLIENT_ID, + clientSecret: detail.CLIENT_SECRET, + redirectUrl: detail.APP_PLANE_REDIRECT_URL, + secret: secret, + accessTokenExpiration: Number(detail.ACCESS_TOKEN_EXPIRATION), + refreshTokenExpiration: Number(detail.REFRESH_TOKEN_EXPIRATION), + authCodeExpiration: Number(detail.AUTH_CODE_EXPIRATION), + }, + // excluding address temporarily because the user tenant service in the new app plane does not support address + /* address: { + address: tenantData.address?.address, + city: tenantData.address?.city, + state: tenantData.address?.state, + zip: tenantData.address?.zip, + country: tenantData.address?.country, + }, */ + }); + } + + private makeCall( + httpModule: AnyObject, + endpoint: string, + payload: string, + name: 'service-callback' | 'webhook', + secret: string, + timestamp: number, + context: string, + ) { + console.log('Make call', endpoint, payload, secret, timestamp, context); + return new Promise((resolve, reject) => { + const str = + name === 'service-callback' + ? `${payload}${timestamp}` + : `${payload}${context}${timestamp}`; + const signature = crypto + .createHmac('sha256', secret) + .update(str) + .digest('hex'); + const options = { + method: 'POST', + headers: { + 'content-type': 'application/json', + 'x-timestamp': timestamp, + 'x-signature': signature, + 'bypass-tunnel-reminder': true, + }, + }; + + console.log(`${endpoint} Options: `, options); + + console.log('Endpoint', endpoint); + const req = httpModule.request( + endpoint, + options, + (res: IncomingMessage) => { + console.log('statusCode:', res.statusCode); + res.on('data', chunk => { + console.log(`BODY: ${endpoint}` + chunk); + }); + + if (res.statusCode !== 204) { + reject(`Call failed for ${name}`); + return; + } + resolve(`Call succeeded for ${name}`); + }, + ); + + req.on('error', (e: Error) => { + console.error(e); + reject(e); + }); + + req.write(payload); + req.end(); + }); + } +} diff --git a/services/orchestrator-service/src/services/tenant-provisioning-handler.service.ts b/services/orchestrator-service/src/services/tenant-provisioning-handler.service.ts index 2ae32f5..749d4a4 100644 --- a/services/orchestrator-service/src/services/tenant-provisioning-handler.service.ts +++ b/services/orchestrator-service/src/services/tenant-provisioning-handler.service.ts @@ -1,4 +1,10 @@ -import {injectable, BindingScope, Provider, inject} from '@loopback/core'; +import { + injectable, + BindingScope, + Provider, + inject, + service, +} from '@loopback/core'; import {AnyObject} from '@loopback/repository'; import { BuilderService, @@ -6,11 +12,39 @@ import { TierDetailsFn, OrchestratorServiceBindings, } from '@arc-saas/orchestrator-service'; +import {DataStoreService} from './data-store.service'; -export type ProvisioningInputs = { +export interface ProvisioningInputs { planConfig: AnyObject; builderConfig: AnyObject; -}; + tenant: { + id: string; + name: string; + status: number; + key: string; + spocUserId: string | null; + domains: string[]; + leadId: string | null; + addressId: string; + contacts: { + id: string; + firstName: string; + lastName: string; + email: string; + isPrimary: boolean; + type: string | null; + tenantId: string; + }[]; + address: { + id: string; + address: string; + city: string | null; + state: string | null; + zip: string; + country: string; + }; + }; +} @injectable({scope: BindingScope.TRANSIENT}) export class TenantProvisioningHandlerProvider @@ -21,6 +55,9 @@ export class TenantProvisioningHandlerProvider private tierDetails: TierDetailsFn, @inject(OrchestratorServiceBindings.BUILDER_SERVICE) private builderService: BuilderService, + + @service(DataStoreService) + private readonly dataStoreService: DataStoreService, ) {} value() { @@ -29,6 +66,12 @@ export class TenantProvisioningHandlerProvider const planConfig = body.planConfig; const builder = body.builderConfig; const tier = planConfig.tier; + const tenant = body.tenant; + + await this.dataStoreService.storeDataInDynamoDB({ + tenantId: tenant.id, + ...body, + }); try { // Fetch tier details based on the provided tier diff --git a/services/orchestrator-service/src/services/tenant-provisioning-success.handler.ts b/services/orchestrator-service/src/services/tenant-provisioning-success.handler.ts index 3f261a4..51f3627 100644 --- a/services/orchestrator-service/src/services/tenant-provisioning-success.handler.ts +++ b/services/orchestrator-service/src/services/tenant-provisioning-success.handler.ts @@ -1,7 +1,10 @@ -import {TenantProvisioningSuccessHandler} from '@arc-saas/orchestrator-service'; +import { + DefaultEventTypes, + TenantProvisioningSuccessHandler, +} from '@arc-saas/orchestrator-service'; import {injectable, BindingScope, Provider} from '@loopback/core'; import {AnyObject} from '@loopback/repository'; -import {IncomingMessage} from 'http'; +import {EventBridgeClient, PutEventsCommand} from '@aws-sdk/client-eventbridge'; @injectable({scope: BindingScope.TRANSIENT}) export class TenantProvisioningSuccessHandlerProvider @@ -14,131 +17,33 @@ export class TenantProvisioningSuccessHandlerProvider } private async handler(detail: AnyObject): Promise { - console.log('Detail Received', detail); - const http = - detail.API_ENDPOINT.split('://')[0] === 'https' - ? require('https') - : require('http'); - const crypto = require('crypto'); + console.log('Provisioning Success Handler Detail Received:', detail); - const timestamp = Date.now(); - const secret = detail.secret; - const context = detail.context; - - const tenantData = JSON.parse(detail.tenant); - const contact = tenantData.contacts[0]; - - const getPayload = () => - JSON.stringify({ - initiatorId: tenantData.id, - type: 0, - data: { - status: Number(`${detail.CODEBUILD_BUILD_SUCCEEDING}`), - resources: [ - { - type: 's3', - metadata: { - bucket: detail.TF_STATE_BUCKET, - path: detail.TF_KEY, - }, - }, - ], - appPlaneUrl: detail.APP_PLANE_REDIRECT_URL, - }, - }); - - const tenantPayload = JSON.stringify({ - email: contact?.email, - phone: contact?.phone, - username: contact?.username, - tenantName: tenantData.name, - tenantKey: tenantData.key, - firstName: contact?.firstName, - lastName: contact?.lastName, - middleName: contact?.middleName, - cognitoAuthId: detail.COGNITO_AUTH_ID, - authClient: { - clientId: detail.CLIENT_ID, - clientSecret: detail.CLIENT_SECRET, - redirectUrl: detail.APP_PLANE_REDIRECT_URL, - secret: secret, - accessTokenExpiration: Number(detail.ACCESS_TOKEN_EXPIRATION), - refreshTokenExpiration: Number(detail.REFRESH_TOKEN_EXPIRATION), - authCodeExpiration: Number(detail.AUTH_CODE_EXPIRATION), - }, - address: { - address: tenantData.address?.address, - city: tenantData.address?.city, - state: tenantData.address?.state, - zip: tenantData.address?.zip, - country: tenantData.address?.country, - }, + const eventBridgeClient = new EventBridgeClient({ + region: process.env.EVENT_BUS_AWS_REGION, }); - function makeCall(endpoint: string, payload: string, name: string) { - return new Promise((resolve, reject) => { - let str = ''; - if (name === 'user-callback') { - str = `${payload}${timestamp}`; - } else { - str = `${payload}${context}${timestamp}`; - } - const signature = crypto - .createHmac('sha256', secret) - .update(str) - .digest('hex'); - const options = { - method: 'POST', - headers: { - 'content-type': 'application/json', - 'x-timestamp': timestamp, - 'x-signature': signature, - 'bypass-tunnel-reminder': true, - }, - }; - - console.log('Endpoint', endpoint); - const req = http.request(endpoint, options, (res: IncomingMessage) => { - console.log('statusCode:', res.statusCode); - res.on('data', function (chunk) { - console.log('BODY: ' + chunk); - }); + const eventDetail = {...detail}; - if (res.statusCode !== 204) { - reject(`Call failed for ${name}`); - return; - } - resolve(`Call succeeded for ${name}`); - }); - - req.on('error', (e: Error) => { - console.error(e); - throw e; - }); - - req.write(payload); - req.end(); - }); - } - - if (detail.CODEBUILD_BUILD_SUCCEEDING === '0') { - await makeCall(detail.API_ENDPOINT, getPayload(), 'webhook'); - } else if (detail.CODEBUILD_BUILD_POSTBUILD === '1') { - try { - if (detail.CREATE_USER === '1') { - await makeCall( - detail.USER_CALLBACK_ENDPOINT, - tenantPayload, - 'user-callback', - ); - } - } catch (e) { - detail.CODEBUILD_BUILD_SUCCEEDING = '0'; - } finally { - await makeCall(detail.API_ENDPOINT, getPayload(), 'webhook'); - } - } else { - console.log('No call made'); + const params = { + Entries: [ + { + Source: 'saas.tenant.provisioning.success.handler', + DetailType: DefaultEventTypes.TENANT_DEPLOYMENT, + Detail: JSON.stringify(eventDetail), + EventBusName: process.env.EVENT_BUS_NAME || 'default', + Time: new Date(), + }, + ], + }; + + try { + const command = new PutEventsCommand(params); + const response = await eventBridgeClient.send(command); + console.log('Tenant Deployment event sent successfully:', response); + } catch (error) { + console.error('Failed to send the tenant deployment event:', error); + throw error; } } } diff --git a/services/subscription-service/Dockerfile b/services/subscription-service/Dockerfile index 62b7202..49291c8 100644 --- a/services/subscription-service/Dockerfile +++ b/services/subscription-service/Dockerfile @@ -2,7 +2,7 @@ ARG nodeVer=18-alpine # select a base image to build from -FROM node:$nodeVer AS BASE +FROM --platform=amd64 node:$nodeVer AS BASE # Take the build variables for image base ARG SERVICE_NAME @@ -31,7 +31,7 @@ WORKDIR /home/node/app # Install app dependencies # A wildcard is used to ensure both package.json AND package-lock.json are copied # where available (npm@5+) -COPY --chown=node sourceloop-ctrl-plane-subscription-service-0.2.0.tgz ./ +COPY --chown=node *.tgz ./ COPY --chown=node package*.json ./ # The following two commands is used to copy the `packages`,`service` directory from the local file system to the Docker image. diff --git a/services/subscription-service/package.json b/services/subscription-service/package.json index 1ac8061..6161e87 100644 --- a/services/subscription-service/package.json +++ b/services/subscription-service/package.json @@ -72,7 +72,7 @@ "@opentelemetry/sdk-trace-base": "^1.15.0", "@opentelemetry/sdk-trace-node": "^1.15.0", "@sourceloop/core": "^13.1.0", - "@sourceloop/ctrl-plane-subscription-service": "file:sourceloop-ctrl-plane-subscription-service-0.2.0.tgz", + "@sourceloop/ctrl-plane-subscription-service": "file:sourceloop-ctrl-plane-subscription-service-0.2.1.tgz", "dotenv": "^16.0.3", "dotenv-extended": "^2.9.0", "loopback-connector-postgresql": "^7.0.4", diff --git a/services/subscription-service/sourceloop-ctrl-plane-subscription-service-0.2.0.tgz b/services/subscription-service/sourceloop-ctrl-plane-subscription-service-0.2.0.tgz deleted file mode 100644 index 9b0e7bd..0000000 Binary files a/services/subscription-service/sourceloop-ctrl-plane-subscription-service-0.2.0.tgz and /dev/null differ diff --git a/services/subscription-service/sourceloop-ctrl-plane-subscription-service-0.2.1.tgz b/services/subscription-service/sourceloop-ctrl-plane-subscription-service-0.2.1.tgz new file mode 100644 index 0000000..b8f6786 Binary files /dev/null and b/services/subscription-service/sourceloop-ctrl-plane-subscription-service-0.2.1.tgz differ diff --git a/services/subscription-service/src/openapi.json b/services/subscription-service/src/openapi.json index 86719d9..6f44376 100644 --- a/services/subscription-service/src/openapi.json +++ b/services/subscription-service/src/openapi.json @@ -1774,6 +1774,58 @@ }, "operationId": "PlanFeaturesController.setPlanFeatures" }, + "patch": { + "x-controller-name": "PlanFeaturesController", + "x-operation-name": "updatePlanFeatures", + "tags": [ + "PlanFeaturesController" + ], + "security": [ + { + "HTTPBearer": [] + } + ], + "responses": { + "200": { + "description": "Plan Features", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureValues" + } + } + } + } + } + }, + "description": "\n\n| Permissions |\n| ------- |\n| 7035 |\n", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FeatureValuesPartial" + } + } + } + }, + "x-parameter-index": 1 + }, + "operationId": "PlanFeaturesController.updatePlanFeatures" + }, "get": { "x-controller-name": "PlanFeaturesController", "x-operation-name": "getPlanFeatures", diff --git a/services/tenant-mgmt-service/Dockerfile b/services/tenant-mgmt-service/Dockerfile index e44152c..0f63513 100644 --- a/services/tenant-mgmt-service/Dockerfile +++ b/services/tenant-mgmt-service/Dockerfile @@ -2,7 +2,8 @@ ARG nodeVer=18-alpine # select a base image to build from -FROM node:$nodeVer AS BASE +FROM public.ecr.aws/docker/library/node:$nodeVer AS BASE + # Take the build variables for image base ARG SERVICE_NAME @@ -57,7 +58,7 @@ RUN npm prune --production RUN /usr/local/bin/node-prune # Start fresh for a smaller image size -FROM node:$nodeVer +FROM public.ecr.aws/docker/library/node:$nodeVer # Take the build variables for image stage ARG SERVICE_NAME diff --git a/services/tenant-mgmt-service/src/services/event.service.ts b/services/tenant-mgmt-service/src/services/event.service.ts index 3c16904..44ecf63 100644 --- a/services/tenant-mgmt-service/src/services/event.service.ts +++ b/services/tenant-mgmt-service/src/services/event.service.ts @@ -60,7 +60,6 @@ export class EventConnector implements IEventConnector { config: { environmentOverride: { ...extraPlanConfig, - plan: JSON.stringify(data.subscription.plan), tenant: JSON.stringify(data.tenant), secret: secret, context: context,