UNPKG

@webiny/api-page-builder-so-ddb-es

Version:

The DynamoDB + Elasticsearch storage operations Webiny Page Builder API.

39 lines (37 loc) 774 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createPageElasticsearchEntity = void 0; var _toolbox = require("@webiny/db-dynamodb/toolbox"); const createPageElasticsearchEntity = params => { const { entityName, attributes, table } = params; return new _toolbox.Entity({ name: entityName, table, attributes: { PK: { partitionKey: true }, SK: { sortKey: true }, index: { type: "string" }, data: { type: "map" }, TYPE: { type: "string" }, ...(attributes || {}) } }); }; exports.createPageElasticsearchEntity = createPageElasticsearchEntity; //# sourceMappingURL=pageElasticsearchEntity.js.map