UNPKG

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

Version:

[![](https://img.shields.io/npm/dw/@webiny/api-form-builder-so-ddb-es.svg)](https://www.npmjs.com/package/@webiny/api-form-builder-so-ddb-es) [![](https://img.shields.io/npm/v/@webiny/api-form-builder-so-ddb-es.svg)](https://www.npmjs.com/package/@webiny

39 lines (37 loc) 748 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createElasticsearchEntity = void 0; var _toolbox = require("@webiny/db-dynamodb/toolbox"); const createElasticsearchEntity = params => { const { table, entityName, attributes } = 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.createElasticsearchEntity = createElasticsearchEntity; //# sourceMappingURL=elasticsearch.js.map