@webiny/api-page-builder-so-ddb
Version:
The DynamoDB storage operations Webiny Page Builder API.
110 lines (108 loc) • 1.88 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createPageEntity = void 0;
var _toolbox = require("@webiny/db-dynamodb/toolbox");
const createPageEntity = params => {
const {
entityName,
attributes,
table
} = params;
return new _toolbox.Entity({
name: entityName,
table,
attributes: {
PK: {
partitionKey: true
},
SK: {
sortKey: true
},
GSI1_PK: {
type: "string"
},
GSI1_SK: {
type: "string"
},
TYPE: {
type: "string"
},
id: {
type: "string"
},
pid: {
type: "string"
},
tenant: {
type: "string"
},
locale: {
type: "string"
},
title: {
type: "string"
},
titleLC: {
type: "string"
},
editor: {
type: "string"
},
createdFrom: {
type: "string"
},
path: {
type: "string"
},
category: {
type: "string"
},
content: {
type: "map"
},
publishedOn: {
type: "string"
},
version: {
type: "number"
},
settings: {
type: "map"
},
locked: {
type: "boolean"
},
status: {
type: "string"
},
createdOn: {
type: "string"
},
savedOn: {
type: "string"
},
createdBy: {
type: "map"
},
ownedBy: {
type: "map"
},
webinyVersion: {
type: "string"
},
dataSources: {
type: "list",
default: []
},
dataBindings: {
type: "list",
default: []
},
...(attributes || {})
}
});
};
exports.createPageEntity = createPageEntity;
//# sourceMappingURL=pageEntity.js.map