UNPKG

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

Version:

The DynamoDB storage operations Webiny Page Builder API.

63 lines (61 loc) 1.13 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createPageElementEntity = void 0; var _toolbox = require("@webiny/db-dynamodb/toolbox"); const createPageElementEntity = params => { const { entityName, attributes, table } = params; return new _toolbox.Entity({ name: entityName, table, attributes: { PK: { partitionKey: true }, SK: { sortKey: true }, TYPE: { type: "string" }, id: { type: "string" }, name: { type: "string" }, type: { type: "string" }, category: { type: "string" }, content: { type: "map" }, preview: { type: "map" }, createdOn: { type: "string" }, createdBy: { type: "map" }, tenant: { type: "string" }, locale: { type: "string" }, ...(attributes || {}) } }); }; exports.createPageElementEntity = createPageElementEntity; //# sourceMappingURL=pageElementEntity.js.map