@webiny/api-composition-aws-ddb-os 0.0.0-stage β†’ 0.0.0-unstable.676006d08e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Webiny
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,11 @@
1
- # Temporary Holding Version
1
+ # @webiny/api-composition-aws-ddb-os
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ > [!NOTE]
4
+ > This package is part of the [Webiny](https://www.webiny.com) monorepo.
5
+ > It’s **included in every Webiny project by default** and is not meant to be used as a standalone package.
6
+
7
+ πŸ“˜ **Documentation:** [https://www.webiny.com/docs](https://www.webiny.com/docs)
8
+
9
+ ---
10
+
11
+ _This README file is automatically generated during the publish process._
@@ -0,0 +1,8 @@
1
+ import type { CreateAwsDdbOsApiHandlerConfig } from "./storageConfig.js";
2
+ export type { CreateAwsDdbOsApiHandlerConfig };
3
+ export declare function createAwsDdbOsApiHandler(config: CreateAwsDdbOsApiHandlerConfig): (event: any, context?: import("aws-lambda").Context | undefined) => Promise<any>;
4
+ /**
5
+ * Response-streaming counterpart, for the Lambda function whose Function URL uses
6
+ * `InvokeMode: RESPONSE_STREAM`. Identical storage; only the transport differs.
7
+ */
8
+ export declare function createAwsDdbOsStreamApiHandler(config: CreateAwsDdbOsApiHandlerConfig): import("@webiny/api-kernel-aws/createStreamLambdaHandler.js").StreamLambdaHandler;
@@ -0,0 +1,11 @@
1
+ import { createWebinyApiHandler, createWebinyStreamApiHandler } from "@webiny/api-composition-aws";
2
+ import { storageConfig } from "./storageConfig.js";
3
+ function createAwsDdbOsApiHandler(config) {
4
+ return createWebinyApiHandler(storageConfig(config));
5
+ }
6
+ function createAwsDdbOsStreamApiHandler(config) {
7
+ return createWebinyStreamApiHandler(storageConfig(config));
8
+ }
9
+ export { createAwsDdbOsApiHandler, createAwsDdbOsStreamApiHandler };
10
+
11
+ //# sourceMappingURL=createWebinyApiHandler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createWebinyApiHandler.js","sources":["../src/createWebinyApiHandler.ts"],"sourcesContent":["/**\n * Webiny API handler for AWS Lambda with DynamoDB + OpenSearch storage.\n *\n * Thin variant over the storage-agnostic base (@webiny/api-composition-aws): same DynamoDB storage as the\n * `-ddb` variant for core/audit-logs/ACO/websockets, but CMS uses the DynamoDB+OpenSearch storage\n * (`HeadlessCmsDdbEsStorageFeature`), and the OpenSearch core and `DbRegistryFeature` are registered in\n * the root too. The storage features register in each tenant scope, so every scope gets its own\n * per-request state (the DataLoaders, the OpenSearch field indexes, its DbRegistry).\n */\nimport { createWebinyApiHandler as createBaseHandler } from \"@webiny/api-composition-aws\";\nimport { createWebinyStreamApiHandler as createBaseStreamHandler } from \"@webiny/api-composition-aws\";\nimport { storageConfig } from \"./storageConfig.js\";\nimport type { CreateAwsDdbOsApiHandlerConfig } from \"./storageConfig.js\";\n\nexport type { CreateAwsDdbOsApiHandlerConfig };\n\nexport function createAwsDdbOsApiHandler(config: CreateAwsDdbOsApiHandlerConfig) {\n return createBaseHandler(storageConfig(config));\n}\n\n/**\n * Response-streaming counterpart, for the Lambda function whose Function URL uses\n * `InvokeMode: RESPONSE_STREAM`. Identical storage; only the transport differs.\n */\nexport function createAwsDdbOsStreamApiHandler(config: CreateAwsDdbOsApiHandlerConfig) {\n return createBaseStreamHandler(storageConfig(config));\n}\n"],"names":["createAwsDdbOsApiHandler","config","createBaseHandler","storageConfig","createAwsDdbOsStreamApiHandler","createBaseStreamHandler"],"mappings":";;AAgBO,SAASA,yBAAyBC,MAAsC;IAC3E,OAAOC,uBAAkBC,cAAcF;AAC3C;AAMO,SAASG,+BAA+BH,MAAsC;IACjF,OAAOI,6BAAwBF,cAAcF;AACjD"}
package/index.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export { createAwsDdbOsApiHandler } from "./createWebinyApiHandler.js";
2
+ export { createAwsDdbOsStreamApiHandler } from "./createWebinyApiHandler.js";
3
+ export { startAwsDdbOsWebApi } from "./startAwsDdbOsWebApi.js";
4
+ export type { CreateAwsDdbOsApiHandlerConfig } from "./createWebinyApiHandler.js";
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { createAwsDdbOsApiHandler, createAwsDdbOsStreamApiHandler } from "./createWebinyApiHandler.js";
2
+ export { startAwsDdbOsWebApi } from "./startAwsDdbOsWebApi.js";
package/package.json CHANGED
@@ -1,6 +1,70 @@
1
1
  {
2
- "name": "@webiny/api-composition-aws-ddb-os",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "@webiny/api-composition-aws-ddb-os",
3
+ "version": "0.0.0-unstable.676006d08e",
4
+ "type": "module",
5
+ "main": "index.js",
6
+ "exports": {
7
+ ".": "./index.js",
8
+ "./*": "./*"
9
+ },
10
+ "types": "index.d.ts",
11
+ "description": "Composition layer: Webiny API handler for AWS Lambda with DynamoDB + OpenSearch storage.",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/webiny/webiny-js.git"
15
+ },
16
+ "contributors": [
17
+ "Webiny Team"
18
+ ],
19
+ "license": "MIT",
20
+ "dependencies": {
21
+ "@webiny/api-aco-ddb": "0.0.0-unstable.676006d08e",
22
+ "@webiny/api-audit-logs-ddb": "0.0.0-unstable.676006d08e",
23
+ "@webiny/api-composition-aws": "0.0.0-unstable.676006d08e",
24
+ "@webiny/api-core-ddb": "0.0.0-unstable.676006d08e",
25
+ "@webiny/api-headless-cms-ddb-es": "0.0.0-unstable.676006d08e",
26
+ "@webiny/api-opensearch": "0.0.0-unstable.676006d08e",
27
+ "@webiny/api-opensearch-aws": "0.0.0-unstable.676006d08e",
28
+ "@webiny/api-websockets-aws": "0.0.0-unstable.676006d08e",
29
+ "@webiny/aws-sdk": "0.0.0-unstable.676006d08e",
30
+ "@webiny/db": "0.0.0-unstable.676006d08e",
31
+ "@webiny/db-dynamodb": "0.0.0-unstable.676006d08e"
32
+ },
33
+ "peerDependencies": {
34
+ "@webiny/di": "^2.0.0"
35
+ },
36
+ "devDependencies": {
37
+ "@electric-sql/pglite": "0.5.17",
38
+ "@electric-sql/pglite-socket": "0.2.20",
39
+ "@webiny/api-aco": "0.0.0-unstable.676006d08e",
40
+ "@webiny/api-aco-pg": "0.0.0-unstable.676006d08e",
41
+ "@webiny/api-audit-logs": "0.0.0-unstable.676006d08e",
42
+ "@webiny/api-composition-aws-pg": "0.0.0-unstable.676006d08e",
43
+ "@webiny/api-composition-core": "0.0.0-unstable.676006d08e",
44
+ "@webiny/api-core": "0.0.0-unstable.676006d08e",
45
+ "@webiny/api-core-sql": "0.0.0-unstable.676006d08e",
46
+ "@webiny/api-graphql": "0.0.0-unstable.676006d08e",
47
+ "@webiny/api-headless-cms": "0.0.0-unstable.676006d08e",
48
+ "@webiny/api-headless-cms-pg": "0.0.0-unstable.676006d08e",
49
+ "@webiny/api-kernel-aws": "0.0.0-unstable.676006d08e",
50
+ "@webiny/api-kernel-core": "0.0.0-unstable.676006d08e",
51
+ "@webiny/api-storage-pg": "0.0.0-unstable.676006d08e",
52
+ "@webiny/api-websockets": "0.0.0-unstable.676006d08e",
53
+ "@webiny/build-tools": "0.0.0-unstable.676006d08e",
54
+ "@webiny/cognito": "0.0.0-unstable.676006d08e",
55
+ "@webiny/di": "2.0.0",
56
+ "@webiny/feature": "0.0.0-unstable.676006d08e",
57
+ "@webiny/handler": "0.0.0-unstable.676006d08e",
58
+ "jsonwebtoken": "9.0.3",
59
+ "knex": "3.3.0",
60
+ "rimraf": "6.1.4",
61
+ "typescript": "7.0.2",
62
+ "vitest": "5.1.1"
63
+ },
64
+ "publishConfig": {
65
+ "access": "public"
66
+ },
67
+ "webiny": {
68
+ "publishFrom": "dist"
69
+ }
70
+ }
@@ -0,0 +1,6 @@
1
+ import type { CreateAwsDdbOsApiHandlerConfig } from "./storageConfig.js";
2
+ /**
3
+ * Starts the HTTP server for the Lambda web function. Same storage as the Lambda handlers; only the
4
+ * transport differs.
5
+ */
6
+ export declare function startAwsDdbOsWebApi(config: CreateAwsDdbOsApiHandlerConfig): Promise<void>;
@@ -0,0 +1,9 @@
1
+ import { startWebinyWebApi } from "@webiny/api-composition-aws";
2
+ import { storageConfig } from "./storageConfig.js";
3
+ function startAwsDdbOsWebApi(config) {
4
+ const baseConfig = storageConfig(config);
5
+ return startWebinyWebApi(baseConfig);
6
+ }
7
+ export { startAwsDdbOsWebApi };
8
+
9
+ //# sourceMappingURL=startAwsDdbOsWebApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"startAwsDdbOsWebApi.js","sources":["../src/startAwsDdbOsWebApi.ts"],"sourcesContent":["import { startWebinyWebApi } from \"@webiny/api-composition-aws\";\nimport { storageConfig } from \"./storageConfig.js\";\nimport type { CreateAwsDdbOsApiHandlerConfig } from \"./storageConfig.js\";\n\n/**\n * Starts the HTTP server for the Lambda web function. Same storage as the Lambda handlers; only the\n * transport differs.\n */\nexport function startAwsDdbOsWebApi(config: CreateAwsDdbOsApiHandlerConfig) {\n const baseConfig = storageConfig(config);\n return startWebinyWebApi(baseConfig);\n}\n"],"names":["startAwsDdbOsWebApi","config","baseConfig","storageConfig","startWebinyWebApi"],"mappings":";;AAQO,SAASA,oBAAoBC,MAAsC;IACtE,MAAMC,aAAaC,cAAcF;IACjC,OAAOG,kBAAkBF;AAC7B"}
@@ -0,0 +1,31 @@
1
+ import type { AwsTenantStorages, CreateWebinyApiHandlerConfig as BaseConfig } from "@webiny/api-composition-aws";
2
+ import { type DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb/index.js";
3
+ import { createAwsOpenSearchClient } from "@webiny/api-opensearch-aws";
4
+ export type CreateAwsDdbOsApiHandlerConfig = Pick<BaseConfig, "extensions"> & {
5
+ /**
6
+ * DynamoDB document client. Defaults to the standard AWS client (`getDocumentClient()`).
7
+ * Injectable so integration tests can point the handler at a local (dynalite) DynamoDB.
8
+ */
9
+ documentClient?: DynamoDBDocument;
10
+ /**
11
+ * OpenSearch client. Defaults to one built from `OPENSEARCH_*` env vars. Injectable so
12
+ * integration tests can point the handler at a local OpenSearch.
13
+ */
14
+ openSearchClient?: ReturnType<typeof createAwsOpenSearchClient>;
15
+ /**
16
+ * Extra storages tenants can be placed on, next to DynamoDB, which stays the default storage
17
+ * (root's): `createAwsPgTenantStorages()` from `@webiny/api-composition-aws-pg`, for the
18
+ * storages the deploy declares. Only the tenants whose `settings.storage` names one run on it.
19
+ */
20
+ tenantStorages?: AwsTenantStorages;
21
+ };
22
+ /**
23
+ * The storage half of the composition, shared by the buffered, streaming and web function entry
24
+ * points so they cannot drift.
25
+ *
26
+ * The root gets what the process shares: the DynamoDB and OpenSearch clients, the OpenSearch core,
27
+ * and the CMS tables and entities. Every storage feature registers in each tenant scope on the
28
+ * default storage (`RequestStorage`), so a scope on another storage gets none of these storages'
29
+ * features, decorators or tasks.
30
+ */
31
+ export declare function storageConfig(config: CreateAwsDdbOsApiHandlerConfig): Pick<BaseConfig, "extensions" | "registerRootStorage">;
@@ -0,0 +1,66 @@
1
+ import { getDocumentClient } from "@webiny/aws-sdk/client-dynamodb/index.js";
2
+ import { DynamoDBClientFeature, DynamoDBCoreFeature } from "@webiny/db-dynamodb";
3
+ import { RequestStorage } from "@webiny/api-core";
4
+ import { TenantStorageBackend, createDefaultTenantStorageBackend } from "@webiny/api-core/exports/api/tenancy.js";
5
+ import { ApiCoreDdbFeature } from "@webiny/api-core-ddb";
6
+ import { HeadlessCmsDdbEsStorageFeature, HeadlessCmsDdbEsTablesFeature } from "@webiny/api-headless-cms-ddb-es";
7
+ import { AuditLogsDdbFeature } from "@webiny/api-audit-logs-ddb";
8
+ import { AcoDdbFeature } from "@webiny/api-aco-ddb";
9
+ import { WebsocketsDdbFeature } from "@webiny/api-websockets-aws/ddb/index.js";
10
+ import { DbRegistryFeature } from "@webiny/db/exports/api/db.js";
11
+ import { AwsOpenSearchClientFactoryFeature, createAwsOpenSearchClient } from "@webiny/api-opensearch-aws";
12
+ import { OpenSearchClientFeature } from "@webiny/api-opensearch/features/OpenSearchClient/feature.js";
13
+ import { OpenSearchQueryBuilderOperatorFeature } from "@webiny/api-opensearch/features/OpenSearchQueryBuilderOperator/feature.js";
14
+ import { OpenSearchFieldFeature } from "@webiny/api-opensearch/features/OpenSearchField/feature.js";
15
+ import { OpenSearchIndexFeature } from "@webiny/api-opensearch/features/OpenSearchIndex/feature.js";
16
+ const openSearchClientFromEnv = ()=>{
17
+ const osUsername = process.env.OPENSEARCH_USERNAME;
18
+ const osPassword = process.env.OPENSEARCH_PASSWORD;
19
+ const openSearchClientOptions = {
20
+ endpoint: `https://${process.env.OPENSEARCH_ENDPOINT}`
21
+ };
22
+ if (osUsername && osPassword) openSearchClientOptions.auth = {
23
+ username: osUsername,
24
+ password: osPassword
25
+ };
26
+ return createAwsOpenSearchClient(openSearchClientOptions);
27
+ };
28
+ function storageConfig(config) {
29
+ return {
30
+ extensions: config.extensions,
31
+ registerRootStorage: async (container)=>{
32
+ const documentClient = config.documentClient ?? getDocumentClient();
33
+ const openSearchClient = config.openSearchClient ?? openSearchClientFromEnv();
34
+ DynamoDBClientFeature.register(container, documentClient);
35
+ OpenSearchClientFeature.register(container, openSearchClient);
36
+ AwsOpenSearchClientFactoryFeature.register(container);
37
+ OpenSearchQueryBuilderOperatorFeature.register(container);
38
+ OpenSearchFieldFeature.register(container);
39
+ OpenSearchIndexFeature.register(container);
40
+ DbRegistryFeature.register(container);
41
+ HeadlessCmsDdbEsTablesFeature.register(container);
42
+ container.registerInstance(RequestStorage, {
43
+ register (scope) {
44
+ DynamoDBCoreFeature.register(scope, {
45
+ documentClient
46
+ });
47
+ ApiCoreDdbFeature.register(scope, {
48
+ documentClient
49
+ });
50
+ HeadlessCmsDdbEsStorageFeature.register(scope);
51
+ AuditLogsDdbFeature.register(scope, {});
52
+ AcoDdbFeature.register(scope);
53
+ WebsocketsDdbFeature.register(scope);
54
+ }
55
+ });
56
+ container.registerInstance(TenantStorageBackend, createDefaultTenantStorageBackend({
57
+ type: "dynamodb-opensearch",
58
+ label: "DynamoDB + OpenSearch"
59
+ }));
60
+ await config.tenantStorages?.register(container);
61
+ }
62
+ };
63
+ }
64
+ export { storageConfig };
65
+
66
+ //# sourceMappingURL=storageConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storageConfig.js","sources":["../src/storageConfig.ts"],"sourcesContent":["import type {\n AwsTenantStorages,\n CreateWebinyApiHandlerConfig as BaseConfig\n} from \"@webiny/api-composition-aws\";\nimport { getDocumentClient, type DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport { DynamoDBClientFeature } from \"@webiny/db-dynamodb\";\nimport { DynamoDBCoreFeature } from \"@webiny/db-dynamodb\";\nimport { RequestStorage } from \"@webiny/api-core\";\nimport {\n TenantStorageBackend,\n createDefaultTenantStorageBackend\n} from \"@webiny/api-core/exports/api/tenancy.js\";\nimport { ApiCoreDdbFeature } from \"@webiny/api-core-ddb\";\nimport { HeadlessCmsDdbEsStorageFeature } from \"@webiny/api-headless-cms-ddb-es\";\nimport { HeadlessCmsDdbEsTablesFeature } from \"@webiny/api-headless-cms-ddb-es\";\nimport { AuditLogsDdbFeature } from \"@webiny/api-audit-logs-ddb\";\nimport { AcoDdbFeature } from \"@webiny/api-aco-ddb\";\nimport { WebsocketsDdbFeature } from \"@webiny/api-websockets-aws/ddb/index.js\";\nimport { DbRegistryFeature } from \"@webiny/db/exports/api/db.js\";\nimport { type OpenSearchClientOptions } from \"@webiny/api-opensearch\";\nimport { createAwsOpenSearchClient } from \"@webiny/api-opensearch-aws\";\nimport { AwsOpenSearchClientFactoryFeature } from \"@webiny/api-opensearch-aws\";\nimport { OpenSearchClientFeature } from \"@webiny/api-opensearch/features/OpenSearchClient/feature.js\";\nimport { OpenSearchQueryBuilderOperatorFeature } from \"@webiny/api-opensearch/features/OpenSearchQueryBuilderOperator/feature.js\";\nimport { OpenSearchFieldFeature } from \"@webiny/api-opensearch/features/OpenSearchField/feature.js\";\nimport { OpenSearchIndexFeature } from \"@webiny/api-opensearch/features/OpenSearchIndex/feature.js\";\n\nexport type CreateAwsDdbOsApiHandlerConfig = Pick<BaseConfig, \"extensions\"> & {\n /**\n * DynamoDB document client. Defaults to the standard AWS client (`getDocumentClient()`).\n * Injectable so integration tests can point the handler at a local (dynalite) DynamoDB.\n */\n documentClient?: DynamoDBDocument;\n /**\n * OpenSearch client. Defaults to one built from `OPENSEARCH_*` env vars. Injectable so\n * integration tests can point the handler at a local OpenSearch.\n */\n openSearchClient?: ReturnType<typeof createAwsOpenSearchClient>;\n /**\n * Extra storages tenants can be placed on, next to DynamoDB, which stays the default storage\n * (root's): `createAwsPgTenantStorages()` from `@webiny/api-composition-aws-pg`, for the\n * storages the deploy declares. Only the tenants whose `settings.storage` names one run on it.\n */\n tenantStorages?: AwsTenantStorages;\n};\n\nconst openSearchClientFromEnv = () => {\n const osUsername = process.env.OPENSEARCH_USERNAME;\n const osPassword = process.env.OPENSEARCH_PASSWORD;\n\n const openSearchClientOptions: OpenSearchClientOptions = {\n endpoint: `https://${process.env.OPENSEARCH_ENDPOINT}`\n };\n // Basic auth for local / self-managed OpenSearch; when absent the client falls back to AWS SigV4.\n if (osUsername && osPassword) {\n openSearchClientOptions.auth = {\n username: osUsername,\n password: osPassword\n };\n }\n\n return createAwsOpenSearchClient(openSearchClientOptions);\n};\n\n/**\n * The storage half of the composition, shared by the buffered, streaming and web function entry\n * points so they cannot drift.\n *\n * The root gets what the process shares: the DynamoDB and OpenSearch clients, the OpenSearch core,\n * and the CMS tables and entities. Every storage feature registers in each tenant scope on the\n * default storage (`RequestStorage`), so a scope on another storage gets none of these storages'\n * features, decorators or tasks.\n */\nexport function storageConfig(\n config: CreateAwsDdbOsApiHandlerConfig\n): Pick<BaseConfig, \"extensions\" | \"registerRootStorage\"> {\n return {\n extensions: config.extensions,\n registerRootStorage: async container => {\n // Built here, in `root`, rather than at factory time: one bundle exports both the buffered\n // and the streaming handler, so eager clients would be created twice per cold start.\n const documentClient = config.documentClient ?? getDocumentClient();\n const openSearchClient = config.openSearchClient ?? openSearchClientFromEnv();\n\n DynamoDBClientFeature.register(container, documentClient);\n\n // ── OpenSearch core (client + query-builder operators + fields + index registries) ──\n // The DDB+ES CMS storage resolves all of these.\n OpenSearchClientFeature.register(container, openSearchClient);\n AwsOpenSearchClientFactoryFeature.register(container);\n OpenSearchQueryBuilderOperatorFeature.register(container);\n OpenSearchFieldFeature.register(container);\n OpenSearchIndexFeature.register(container);\n\n // DbRegistry holds the DDB entities the DDB+ES CMS storage stages for OpenSearch sync. It is\n // container scoped; the CMS storage adds its entities to the registry of every scope on it.\n DbRegistryFeature.register(container);\n\n HeadlessCmsDdbEsTablesFeature.register(container);\n\n container.registerInstance(RequestStorage, {\n register(scope) {\n DynamoDBCoreFeature.register(scope, { documentClient });\n ApiCoreDdbFeature.register(scope, { documentClient });\n // CMS uses the DynamoDB+OpenSearch storage; the rest stay DynamoDB-only.\n HeadlessCmsDdbEsStorageFeature.register(scope);\n AuditLogsDdbFeature.register(scope, {});\n AcoDdbFeature.register(scope);\n WebsocketsDdbFeature.register(scope);\n }\n });\n\n // The default storage's family, for the storages a tenant can be placed on.\n container.registerInstance(\n TenantStorageBackend,\n createDefaultTenantStorageBackend({\n type: \"dynamodb-opensearch\",\n label: \"DynamoDB + OpenSearch\"\n })\n );\n\n // After the default storage: an extra storage's backend never replaces its parts.\n await config.tenantStorages?.register(container);\n }\n };\n}\n"],"names":["openSearchClientFromEnv","osUsername","process","osPassword","openSearchClientOptions","createAwsOpenSearchClient","storageConfig","config","container","documentClient","getDocumentClient","openSearchClient","DynamoDBClientFeature","OpenSearchClientFeature","AwsOpenSearchClientFactoryFeature","OpenSearchQueryBuilderOperatorFeature","OpenSearchFieldFeature","OpenSearchIndexFeature","DbRegistryFeature","HeadlessCmsDdbEsTablesFeature","RequestStorage","scope","DynamoDBCoreFeature","ApiCoreDdbFeature","HeadlessCmsDdbEsStorageFeature","AuditLogsDdbFeature","AcoDdbFeature","WebsocketsDdbFeature","TenantStorageBackend","createDefaultTenantStorageBackend"],"mappings":";;;;;;;;;;;;;;;AA8CA,MAAMA,0BAA0B;IAC5B,MAAMC,aAAaC,QAAQ,GAAG,CAAC,mBAAmB;IAClD,MAAMC,aAAaD,QAAQ,GAAG,CAAC,mBAAmB;IAElD,MAAME,0BAAmD;QACrD,UAAU,CAAC,QAAQ,EAAEF,QAAQ,GAAG,CAAC,mBAAmB,EAAE;IAC1D;IAEA,IAAID,cAAcE,YACdC,wBAAwB,IAAI,GAAG;QAC3B,UAAUH;QACV,UAAUE;IACd;IAGJ,OAAOE,0BAA0BD;AACrC;AAWO,SAASE,cACZC,MAAsC;IAEtC,OAAO;QACH,YAAYA,OAAO,UAAU;QAC7B,qBAAqB,OAAMC;YAGvB,MAAMC,iBAAiBF,OAAO,cAAc,IAAIG;YAChD,MAAMC,mBAAmBJ,OAAO,gBAAgB,IAAIP;YAEpDY,sBAAsB,QAAQ,CAACJ,WAAWC;YAI1CI,wBAAwB,QAAQ,CAACL,WAAWG;YAC5CG,kCAAkC,QAAQ,CAACN;YAC3CO,sCAAsC,QAAQ,CAACP;YAC/CQ,uBAAuB,QAAQ,CAACR;YAChCS,uBAAuB,QAAQ,CAACT;YAIhCU,kBAAkB,QAAQ,CAACV;YAE3BW,8BAA8B,QAAQ,CAACX;YAEvCA,UAAU,gBAAgB,CAACY,gBAAgB;gBACvC,UAASC,KAAK;oBACVC,oBAAoB,QAAQ,CAACD,OAAO;wBAAEZ;oBAAe;oBACrDc,kBAAkB,QAAQ,CAACF,OAAO;wBAAEZ;oBAAe;oBAEnDe,+BAA+B,QAAQ,CAACH;oBACxCI,oBAAoB,QAAQ,CAACJ,OAAO,CAAC;oBACrCK,cAAc,QAAQ,CAACL;oBACvBM,qBAAqB,QAAQ,CAACN;gBAClC;YACJ;YAGAb,UAAU,gBAAgB,CACtBoB,sBACAC,kCAAkC;gBAC9B,MAAM;gBACN,OAAO;YACX;YAIJ,MAAMtB,OAAO,cAAc,EAAE,SAASC;QAC1C;IACJ;AACJ"}