@webiny/api-page-builder-import-export-so-ddb
Version:
The DynamoDB storage operations for import export feature in the Webiny Page Builder API.
71 lines (69 loc) • 1.25 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createImportExportTaskEntity = void 0;
var _toolbox = require("@webiny/db-dynamodb/toolbox");
const createImportExportTaskEntity = ({
entityName,
table,
attributes
}) => {
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"
},
parent: {
type: "string"
},
status: {
type: "string"
},
data: {
type: "map"
},
input: {
type: "map"
},
stats: {
type: "map"
},
error: {
type: "map"
},
createdOn: {
type: "string"
},
createdBy: {
type: "map"
},
tenant: {
type: "string"
},
locale: {
type: "string"
},
...attributes
}
});
};
exports.createImportExportTaskEntity = createImportExportTaskEntity;
//# sourceMappingURL=importExportTaskEntity.js.map