@webiny/api-page-builder-so-ddb-es 0.0.0-mt-3 → 0.0.0-unstable.2af142b57e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configurations.d.ts +9 -0
- package/configurations.js +39 -0
- package/configurations.js.map +1 -0
- package/definitions/blockCategoryEntity.d.ts +9 -0
- package/definitions/blockCategoryEntity.js +56 -0
- package/definitions/blockCategoryEntity.js.map +1 -0
- package/definitions/categoryEntity.d.ts +7 -4
- package/definitions/categoryEntity.js +9 -21
- package/definitions/categoryEntity.js.map +1 -0
- package/definitions/menuEntity.d.ts +7 -4
- package/definitions/menuEntity.js +9 -21
- package/definitions/menuEntity.js.map +1 -0
- package/definitions/pageBlockEntity.d.ts +9 -0
- package/definitions/pageBlockEntity.js +59 -0
- package/definitions/pageBlockEntity.js.map +1 -0
- package/definitions/pageElasticsearchEntity.d.ts +7 -4
- package/definitions/pageElasticsearchEntity.js +9 -21
- package/definitions/pageElasticsearchEntity.js.map +1 -0
- package/definitions/pageElementEntity.d.ts +7 -4
- package/definitions/pageElementEntity.js +9 -21
- package/definitions/pageElementEntity.js.map +1 -0
- package/definitions/pageEntity.d.ts +7 -4
- package/definitions/pageEntity.js +9 -30
- package/definitions/pageEntity.js.map +1 -0
- package/definitions/pageTemplateEntity.d.ts +9 -0
- package/definitions/pageTemplateEntity.js +41 -0
- package/definitions/pageTemplateEntity.js.map +1 -0
- package/definitions/settingsEntity.d.ts +7 -4
- package/definitions/settingsEntity.js +17 -22
- package/definitions/settingsEntity.js.map +1 -0
- package/definitions/systemEntity.d.ts +7 -4
- package/definitions/systemEntity.js +12 -21
- package/definitions/systemEntity.js.map +1 -0
- package/definitions/table.d.ts +7 -4
- package/definitions/table.js +12 -21
- package/definitions/table.js.map +1 -0
- package/definitions/tableElasticsearch.d.ts +8 -4
- package/definitions/tableElasticsearch.js +12 -28
- package/definitions/tableElasticsearch.js.map +1 -0
- package/elasticsearch/createElasticsearchIndex.d.ts +9 -0
- package/elasticsearch/createElasticsearchIndex.js +49 -0
- package/elasticsearch/createElasticsearchIndex.js.map +1 -0
- package/elasticsearch/indices/base.d.ts +2 -0
- package/elasticsearch/indices/base.js +12 -0
- package/elasticsearch/indices/base.js.map +1 -0
- package/elasticsearch/indices/index.d.ts +1 -0
- package/elasticsearch/indices/index.js +12 -0
- package/elasticsearch/indices/index.js.map +1 -0
- package/elasticsearch/indices/japanese.d.ts +2 -0
- package/elasticsearch/indices/japanese.js +13 -0
- package/elasticsearch/indices/japanese.js.map +1 -0
- package/index.d.ts +2 -8
- package/index.js +206 -17
- package/index.js.map +1 -0
- package/operations/blockCategory/dataLoader.d.ts +16 -0
- package/operations/blockCategory/dataLoader.js +63 -0
- package/operations/blockCategory/dataLoader.js.map +1 -0
- package/operations/blockCategory/fields.d.ts +2 -0
- package/operations/blockCategory/fields.js +25 -0
- package/operations/blockCategory/fields.js.map +1 -0
- package/operations/blockCategory/index.d.ts +8 -0
- package/operations/blockCategory/index.js +178 -0
- package/operations/blockCategory/index.js.map +1 -0
- package/operations/blockCategory/keys.d.ts +9 -0
- package/operations/blockCategory/keys.js +21 -0
- package/operations/blockCategory/keys.js.map +1 -0
- package/operations/category/{CategoryDataLoader.d.ts → dataLoader.d.ts} +4 -8
- package/operations/category/{CategoryDataLoader.js → dataLoader.js} +10 -24
- package/operations/category/dataLoader.js.map +1 -0
- package/operations/category/fields.d.ts +1 -2
- package/operations/category/fields.js +3 -6
- package/operations/category/fields.js.map +1 -0
- package/operations/category/index.d.ts +6 -3
- package/operations/category/index.js +172 -22
- package/operations/category/index.js.map +1 -0
- package/operations/category/keys.d.ts +9 -0
- package/operations/category/keys.js +21 -0
- package/operations/category/keys.js.map +1 -0
- package/operations/menu/fields.d.ts +1 -2
- package/operations/menu/fields.js +18 -19
- package/operations/menu/fields.js.map +1 -0
- package/operations/menu/index.d.ts +6 -3
- package/operations/menu/index.js +182 -21
- package/operations/menu/index.js.map +1 -0
- package/operations/pageBlock/dataLoader.d.ts +16 -0
- package/operations/pageBlock/dataLoader.js +63 -0
- package/operations/pageBlock/dataLoader.js.map +1 -0
- package/operations/pageBlock/fields.d.ts +2 -0
- package/operations/pageBlock/fields.js +22 -0
- package/operations/pageBlock/fields.js.map +1 -0
- package/operations/pageBlock/index.d.ts +8 -0
- package/operations/pageBlock/index.js +178 -0
- package/operations/pageBlock/index.js.map +1 -0
- package/operations/pageBlock/keys.d.ts +9 -0
- package/operations/pageBlock/keys.js +21 -0
- package/operations/pageBlock/keys.js.map +1 -0
- package/operations/pageElement/fields.d.ts +1 -2
- package/operations/pageElement/fields.js +3 -6
- package/operations/pageElement/fields.js.map +1 -0
- package/operations/pageElement/index.d.ts +6 -5
- package/operations/pageElement/index.js +172 -22
- package/operations/pageElement/index.js.map +1 -0
- package/operations/pageTemplate/dataLoader.d.ts +16 -0
- package/operations/pageTemplate/dataLoader.js +62 -0
- package/operations/pageTemplate/dataLoader.js.map +1 -0
- package/operations/pageTemplate/fields.d.ts +2 -0
- package/operations/pageTemplate/fields.js +22 -0
- package/operations/pageTemplate/fields.js.map +1 -0
- package/operations/pageTemplate/index.d.ts +8 -0
- package/operations/pageTemplate/index.js +193 -0
- package/operations/pageTemplate/index.js.map +1 -0
- package/operations/pageTemplate/keys.d.ts +5 -0
- package/operations/pageTemplate/keys.js +21 -0
- package/operations/pageTemplate/keys.js.map +1 -0
- package/operations/pages/elasticsearchQueryBody.d.ts +5 -11
- package/operations/pages/elasticsearchQueryBody.js +28 -91
- package/operations/pages/elasticsearchQueryBody.js.map +1 -0
- package/operations/pages/fields.d.ts +3 -2
- package/operations/pages/fields.js +12 -6
- package/operations/pages/fields.js.map +1 -0
- package/operations/pages/helpers.d.ts +10 -17
- package/operations/pages/helpers.js +13 -32
- package/operations/pages/helpers.js.map +1 -0
- package/operations/pages/index.d.ts +9 -3
- package/operations/pages/index.js +719 -20
- package/operations/pages/index.js.map +1 -0
- package/operations/pages/keys.d.ts +24 -0
- package/operations/pages/keys.js +57 -0
- package/operations/pages/keys.js.map +1 -0
- package/operations/settings/index.d.ts +4 -5
- package/operations/settings/index.js +143 -15
- package/operations/settings/index.js.map +1 -0
- package/operations/system/index.d.ts +4 -3
- package/operations/system/index.js +83 -24
- package/operations/system/index.js.map +1 -0
- package/package.json +28 -28
- package/plugins/definitions/BlockCategoryDynamoDbElasticFieldPlugin.d.ts +4 -0
- package/plugins/definitions/BlockCategoryDynamoDbElasticFieldPlugin.js +12 -0
- package/plugins/definitions/BlockCategoryDynamoDbElasticFieldPlugin.js.map +1 -0
- package/plugins/definitions/CategoryDynamoDbElasticFieldPlugin.js +1 -6
- package/plugins/definitions/CategoryDynamoDbElasticFieldPlugin.js.map +1 -0
- package/plugins/definitions/IndexPageDataPlugin.d.ts +3 -4
- package/plugins/definitions/IndexPageDataPlugin.js +1 -9
- package/plugins/definitions/IndexPageDataPlugin.js.map +1 -0
- package/plugins/definitions/MenuDynamoDbElasticFieldPlugin.js +1 -6
- package/plugins/definitions/MenuDynamoDbElasticFieldPlugin.js.map +1 -0
- package/plugins/definitions/PageBlockDynamoDbFieldPlugin.d.ts +4 -0
- package/plugins/definitions/PageBlockDynamoDbFieldPlugin.js +12 -0
- package/plugins/definitions/PageBlockDynamoDbFieldPlugin.js.map +1 -0
- package/plugins/definitions/PageDynamoDbElasticsearchFieldPlugin.d.ts +4 -0
- package/plugins/definitions/PageDynamoDbElasticsearchFieldPlugin.js +12 -0
- package/plugins/definitions/PageDynamoDbElasticsearchFieldPlugin.js.map +1 -0
- package/plugins/definitions/PageElasticsearchBodyModifierPlugin.d.ts +1 -1
- package/plugins/definitions/PageElasticsearchBodyModifierPlugin.js +3 -8
- package/plugins/definitions/PageElasticsearchBodyModifierPlugin.js.map +1 -0
- package/plugins/definitions/PageElasticsearchFieldPlugin.d.ts +1 -2
- package/plugins/definitions/PageElasticsearchFieldPlugin.js +3 -13
- package/plugins/definitions/PageElasticsearchFieldPlugin.js.map +1 -0
- package/plugins/definitions/PageElasticsearchIndexPlugin.d.ts +4 -0
- package/plugins/definitions/PageElasticsearchIndexPlugin.js +12 -0
- package/plugins/definitions/PageElasticsearchIndexPlugin.js.map +1 -0
- package/plugins/definitions/PageElasticsearchQueryModifierPlugin.d.ts +1 -1
- package/plugins/definitions/PageElasticsearchQueryModifierPlugin.js +3 -8
- package/plugins/definitions/PageElasticsearchQueryModifierPlugin.js.map +1 -0
- package/plugins/definitions/PageElasticsearchSortModifierPlugin.d.ts +1 -1
- package/plugins/definitions/PageElasticsearchSortModifierPlugin.js +3 -8
- package/plugins/definitions/PageElasticsearchSortModifierPlugin.js.map +1 -0
- package/plugins/definitions/PageElementDynamoDbElasticFieldPlugin.js +1 -6
- package/plugins/definitions/PageElementDynamoDbElasticFieldPlugin.js.map +1 -0
- package/plugins/definitions/PageTemplateDynamoDbElasticFieldPlugin.d.ts +4 -0
- package/plugins/definitions/PageTemplateDynamoDbElasticFieldPlugin.js +12 -0
- package/plugins/definitions/PageTemplateDynamoDbElasticFieldPlugin.js.map +1 -0
- package/plugins/definitions/SearchLatestPagesPlugin.d.ts +1 -1
- package/plugins/definitions/SearchLatestPagesPlugin.js +1 -6
- package/plugins/definitions/SearchLatestPagesPlugin.js.map +1 -0
- package/plugins/definitions/SearchPagesPlugin.d.ts +3 -4
- package/plugins/definitions/SearchPagesPlugin.js +1 -11
- package/plugins/definitions/SearchPagesPlugin.js.map +1 -0
- package/plugins/definitions/SearchPublishedPagesPlugin.d.ts +1 -1
- package/plugins/definitions/SearchPublishedPagesPlugin.js +1 -6
- package/plugins/definitions/SearchPublishedPagesPlugin.js.map +1 -0
- package/types.d.ts +46 -0
- package/types.js +20 -0
- package/types.js.map +1 -0
- package/upgrades/index.js +1 -5
- package/upgrades/index.js.map +1 -0
- package/upgrades/v5.15.0/category.js +5 -20
- package/upgrades/v5.15.0/category.js.map +1 -0
- package/upgrades/v5.15.0/index.js +0 -9
- package/upgrades/v5.15.0/index.js.map +1 -0
- package/upgrades/v5.15.0/menu.js +5 -20
- package/upgrades/v5.15.0/menu.js.map +1 -0
- package/upgrades/v5.15.0/pageElement.js +5 -20
- package/upgrades/v5.15.0/pageElement.js.map +1 -0
- package/operations/category/CategoryStorageOperations.d.ts +0 -29
- package/operations/category/CategoryStorageOperations.js +0 -243
- package/operations/configurations.d.ts +0 -36
- package/operations/configurations.js +0 -71
- package/operations/menu/MenuStorageOperations.d.ts +0 -23
- package/operations/menu/MenuStorageOperations.js +0 -235
- package/operations/pageElement/PageElementStorageOperations.d.ts +0 -23
- package/operations/pageElement/PageElementStorageOperations.js +0 -234
- package/operations/pages/PageStorageOperations.d.ts +0 -79
- package/operations/pages/PageStorageOperations.js +0 -1117
- package/operations/settings/SettingsStorageOperations.d.ts +0 -35
- package/operations/settings/SettingsStorageOperations.js +0 -191
- package/operations/system/InstallationDdbEsPlugin.d.ts +0 -2
- package/operations/system/InstallationDdbEsPlugin.js +0 -73
- package/operations/system/SystemStorageOperations.d.ts +0 -16
- package/operations/system/SystemStorageOperations.js +0 -114
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.configurations = void 0;
|
|
8
|
+
var _error = _interopRequireDefault(require("@webiny/error"));
|
|
9
|
+
const configurations = {
|
|
10
|
+
es: params => {
|
|
11
|
+
const {
|
|
12
|
+
tenant,
|
|
13
|
+
locale
|
|
14
|
+
} = params;
|
|
15
|
+
if (!tenant) {
|
|
16
|
+
throw new _error.default(`Missing "tenant" parameter when trying to create Elasticsearch index name.`, "TENANT_ERROR");
|
|
17
|
+
}
|
|
18
|
+
const sharedIndex = process.env.ELASTICSEARCH_SHARED_INDEXES === "true";
|
|
19
|
+
const tenantId = sharedIndex ? "root" : tenant;
|
|
20
|
+
let localeCode = null;
|
|
21
|
+
if (process.env.WEBINY_ELASTICSEARCH_INDEX_LOCALE === "true") {
|
|
22
|
+
if (!locale) {
|
|
23
|
+
throw new _error.default(`Missing "locale" parameter when trying to create Elasticsearch index name.`, "LOCALE_ERROR");
|
|
24
|
+
}
|
|
25
|
+
localeCode = locale;
|
|
26
|
+
}
|
|
27
|
+
const index = [tenantId, localeCode, "page-builder"].filter(Boolean).join("-").toLowerCase();
|
|
28
|
+
const prefix = process.env.ELASTIC_SEARCH_INDEX_PREFIX;
|
|
29
|
+
if (!prefix) {
|
|
30
|
+
return {
|
|
31
|
+
index
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
index: prefix + index
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
exports.configurations = configurations;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["configurations","es","params","tenant","locale","WebinyError","sharedIndex","process","env","ELASTICSEARCH_SHARED_INDEXES","tenantId","localeCode","WEBINY_ELASTICSEARCH_INDEX_LOCALE","index","filter","Boolean","join","toLowerCase","prefix","ELASTIC_SEARCH_INDEX_PREFIX"],"sources":["configurations.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\n\nexport interface ElasticsearchParams {\n tenant: string;\n locale: string;\n}\n\nexport const configurations = {\n es: (params: ElasticsearchParams) => {\n const { tenant, locale } = params;\n if (!tenant) {\n throw new WebinyError(\n `Missing \"tenant\" parameter when trying to create Elasticsearch index name.`,\n \"TENANT_ERROR\"\n );\n }\n const sharedIndex = process.env.ELASTICSEARCH_SHARED_INDEXES === \"true\";\n\n const tenantId = sharedIndex ? \"root\" : tenant;\n let localeCode: string | null = null;\n if (process.env.WEBINY_ELASTICSEARCH_INDEX_LOCALE === \"true\") {\n if (!locale) {\n throw new WebinyError(\n `Missing \"locale\" parameter when trying to create Elasticsearch index name.`,\n \"LOCALE_ERROR\"\n );\n }\n localeCode = locale;\n }\n\n const index = [tenantId, localeCode, \"page-builder\"]\n .filter(Boolean)\n .join(\"-\")\n .toLowerCase();\n\n const prefix = process.env.ELASTIC_SEARCH_INDEX_PREFIX;\n if (!prefix) {\n return {\n index\n };\n }\n return {\n index: prefix + index\n };\n }\n};\n"],"mappings":";;;;;;;AAAA;AAOO,MAAMA,cAAc,GAAG;EAC1BC,EAAE,EAAGC,MAA2B,IAAK;IACjC,MAAM;MAAEC,MAAM;MAAEC;IAAO,CAAC,GAAGF,MAAM;IACjC,IAAI,CAACC,MAAM,EAAE;MACT,MAAM,IAAIE,cAAW,CAChB,4EAA2E,EAC5E,cAAc,CACjB;IACL;IACA,MAAMC,WAAW,GAAGC,OAAO,CAACC,GAAG,CAACC,4BAA4B,KAAK,MAAM;IAEvE,MAAMC,QAAQ,GAAGJ,WAAW,GAAG,MAAM,GAAGH,MAAM;IAC9C,IAAIQ,UAAyB,GAAG,IAAI;IACpC,IAAIJ,OAAO,CAACC,GAAG,CAACI,iCAAiC,KAAK,MAAM,EAAE;MAC1D,IAAI,CAACR,MAAM,EAAE;QACT,MAAM,IAAIC,cAAW,CAChB,4EAA2E,EAC5E,cAAc,CACjB;MACL;MACAM,UAAU,GAAGP,MAAM;IACvB;IAEA,MAAMS,KAAK,GAAG,CAACH,QAAQ,EAAEC,UAAU,EAAE,cAAc,CAAC,CAC/CG,MAAM,CAACC,OAAO,CAAC,CACfC,IAAI,CAAC,GAAG,CAAC,CACTC,WAAW,EAAE;IAElB,MAAMC,MAAM,GAAGX,OAAO,CAACC,GAAG,CAACW,2BAA2B;IACtD,IAAI,CAACD,MAAM,EAAE;MACT,OAAO;QACHL;MACJ,CAAC;IACL;IACA,OAAO;MACHA,KAAK,EAAEK,MAAM,GAAGL;IACpB,CAAC;EACL;AACJ,CAAC;AAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Entity, Table } from "dynamodb-toolbox";
|
|
2
|
+
import { Attributes } from "../types";
|
|
3
|
+
interface Params {
|
|
4
|
+
table: Table;
|
|
5
|
+
entityName: string;
|
|
6
|
+
attributes: Attributes;
|
|
7
|
+
}
|
|
8
|
+
export declare const createBlockCategoryEntity: (params: Params) => Entity<any>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.createBlockCategoryEntity = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
+
var _dynamodbToolbox = require("dynamodb-toolbox");
|
|
10
|
+
const createBlockCategoryEntity = params => {
|
|
11
|
+
const {
|
|
12
|
+
entityName,
|
|
13
|
+
attributes,
|
|
14
|
+
table
|
|
15
|
+
} = params;
|
|
16
|
+
return new _dynamodbToolbox.Entity({
|
|
17
|
+
name: entityName,
|
|
18
|
+
table,
|
|
19
|
+
attributes: (0, _objectSpread2.default)({
|
|
20
|
+
PK: {
|
|
21
|
+
partitionKey: true
|
|
22
|
+
},
|
|
23
|
+
SK: {
|
|
24
|
+
sortKey: true
|
|
25
|
+
},
|
|
26
|
+
TYPE: {
|
|
27
|
+
type: "string"
|
|
28
|
+
},
|
|
29
|
+
name: {
|
|
30
|
+
type: "string"
|
|
31
|
+
},
|
|
32
|
+
slug: {
|
|
33
|
+
type: "string"
|
|
34
|
+
},
|
|
35
|
+
icon: {
|
|
36
|
+
type: "string"
|
|
37
|
+
},
|
|
38
|
+
description: {
|
|
39
|
+
type: "string"
|
|
40
|
+
},
|
|
41
|
+
createdOn: {
|
|
42
|
+
type: "string"
|
|
43
|
+
},
|
|
44
|
+
createdBy: {
|
|
45
|
+
type: "map"
|
|
46
|
+
},
|
|
47
|
+
tenant: {
|
|
48
|
+
type: "string"
|
|
49
|
+
},
|
|
50
|
+
locale: {
|
|
51
|
+
type: "string"
|
|
52
|
+
}
|
|
53
|
+
}, attributes || {})
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
exports.createBlockCategoryEntity = createBlockCategoryEntity;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createBlockCategoryEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","slug","icon","description","createdOn","createdBy","tenant","locale"],"sources":["blockCategoryEntity.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createBlockCategoryEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n name: {\n type: \"string\"\n },\n slug: {\n type: \"string\"\n },\n icon: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n createdOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;AAAA;AASO,MAAMA,yBAAyB,GAAIC,MAAc,IAAkB;EACtE,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,uBAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDN,IAAI,EAAE;QACFM,IAAI,EAAE;MACV,CAAC;MACDC,IAAI,EAAE;QACFD,IAAI,EAAE;MACV,CAAC;MACDE,IAAI,EAAE;QACFF,IAAI,EAAE;MACV,CAAC;MACDG,WAAW,EAAE;QACTH,IAAI,EAAE;MACV,CAAC;MACDI,SAAS,EAAE;QACPJ,IAAI,EAAE;MACV,CAAC;MACDK,SAAS,EAAE;QACPL,IAAI,EAAE;MACV,CAAC;MACDM,MAAM,EAAE;QACJN,IAAI,EAAE;MACV,CAAC;MACDO,MAAM,EAAE;QACJP,IAAI,EAAE;MACV;IAAC,GACGT,UAAU,IAAI,CAAC,CAAC;EAE5B,CAAC,CAAC;AACN,CAAC;AAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Entity, Table } from "dynamodb-toolbox";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
context: PbContext;
|
|
2
|
+
import { Attributes } from "../types";
|
|
3
|
+
interface Params {
|
|
5
4
|
table: Table;
|
|
6
|
-
|
|
5
|
+
entityName: string;
|
|
6
|
+
attributes: Attributes;
|
|
7
|
+
}
|
|
8
|
+
export declare const createCategoryEntity: (params: Params) => Entity<any>;
|
|
9
|
+
export {};
|
|
@@ -1,33 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
exports.
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
7
|
+
exports.createCategoryEntity = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
12
9
|
var _dynamodbToolbox = require("dynamodb-toolbox");
|
|
13
|
-
|
|
14
|
-
var _attributes = require("@webiny/db-dynamodb/utils/attributes");
|
|
15
|
-
|
|
16
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
-
|
|
18
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
19
|
-
|
|
20
|
-
const defineCategoryEntity = params => {
|
|
10
|
+
const createCategoryEntity = params => {
|
|
21
11
|
const {
|
|
22
|
-
|
|
12
|
+
entityName,
|
|
13
|
+
attributes,
|
|
23
14
|
table
|
|
24
15
|
} = params;
|
|
25
|
-
const entityName = "PbCategory";
|
|
26
|
-
const attributes = (0, _attributes.getExtraAttributes)(context, entityName);
|
|
27
16
|
return new _dynamodbToolbox.Entity({
|
|
28
17
|
name: entityName,
|
|
29
18
|
table,
|
|
30
|
-
attributes:
|
|
19
|
+
attributes: (0, _objectSpread2.default)({
|
|
31
20
|
PK: {
|
|
32
21
|
partitionKey: true
|
|
33
22
|
},
|
|
@@ -61,8 +50,7 @@ const defineCategoryEntity = params => {
|
|
|
61
50
|
locale: {
|
|
62
51
|
type: "string"
|
|
63
52
|
}
|
|
64
|
-
}, attributes)
|
|
53
|
+
}, attributes || {})
|
|
65
54
|
});
|
|
66
55
|
};
|
|
67
|
-
|
|
68
|
-
exports.defineCategoryEntity = defineCategoryEntity;
|
|
56
|
+
exports.createCategoryEntity = createCategoryEntity;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createCategoryEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","slug","url","layout","createdOn","createdBy","tenant","locale"],"sources":["categoryEntity.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createCategoryEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n name: {\n type: \"string\"\n },\n slug: {\n type: \"string\"\n },\n url: {\n type: \"string\"\n },\n layout: {\n type: \"string\"\n },\n createdOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;AAAA;AASO,MAAMA,oBAAoB,GAAIC,MAAc,IAAkB;EACjE,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,uBAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDN,IAAI,EAAE;QACFM,IAAI,EAAE;MACV,CAAC;MACDC,IAAI,EAAE;QACFD,IAAI,EAAE;MACV,CAAC;MACDE,GAAG,EAAE;QACDF,IAAI,EAAE;MACV,CAAC;MACDG,MAAM,EAAE;QACJH,IAAI,EAAE;MACV,CAAC;MACDI,SAAS,EAAE;QACPJ,IAAI,EAAE;MACV,CAAC;MACDK,SAAS,EAAE;QACPL,IAAI,EAAE;MACV,CAAC;MACDM,MAAM,EAAE;QACJN,IAAI,EAAE;MACV,CAAC;MACDO,MAAM,EAAE;QACJP,IAAI,EAAE;MACV;IAAC,GACGT,UAAU,IAAI,CAAC,CAAC;EAE5B,CAAC,CAAC;AACN,CAAC;AAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Entity, Table } from "dynamodb-toolbox";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
context: PbContext;
|
|
2
|
+
import { Attributes } from "../types";
|
|
3
|
+
interface Params {
|
|
5
4
|
table: Table;
|
|
6
|
-
|
|
5
|
+
entityName: string;
|
|
6
|
+
attributes: Attributes;
|
|
7
|
+
}
|
|
8
|
+
export declare const createMenuEntity: (params: Params) => Entity<any>;
|
|
9
|
+
export {};
|
|
@@ -1,33 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
exports.
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
7
|
+
exports.createMenuEntity = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
12
9
|
var _dynamodbToolbox = require("dynamodb-toolbox");
|
|
13
|
-
|
|
14
|
-
var _attributes = require("@webiny/db-dynamodb/utils/attributes");
|
|
15
|
-
|
|
16
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
-
|
|
18
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
19
|
-
|
|
20
|
-
const defineMenuEntity = params => {
|
|
10
|
+
const createMenuEntity = params => {
|
|
21
11
|
const {
|
|
22
|
-
|
|
12
|
+
entityName,
|
|
13
|
+
attributes,
|
|
23
14
|
table
|
|
24
15
|
} = params;
|
|
25
|
-
const entityName = "PbMenu";
|
|
26
|
-
const attributes = (0, _attributes.getExtraAttributes)(context, entityName);
|
|
27
16
|
return new _dynamodbToolbox.Entity({
|
|
28
17
|
name: entityName,
|
|
29
18
|
table,
|
|
30
|
-
attributes:
|
|
19
|
+
attributes: (0, _objectSpread2.default)({
|
|
31
20
|
PK: {
|
|
32
21
|
partitionKey: true
|
|
33
22
|
},
|
|
@@ -61,8 +50,7 @@ const defineMenuEntity = params => {
|
|
|
61
50
|
locale: {
|
|
62
51
|
type: "string"
|
|
63
52
|
}
|
|
64
|
-
}, attributes)
|
|
53
|
+
}, attributes || {})
|
|
65
54
|
});
|
|
66
55
|
};
|
|
67
|
-
|
|
68
|
-
exports.defineMenuEntity = defineMenuEntity;
|
|
56
|
+
exports.createMenuEntity = createMenuEntity;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createMenuEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","title","slug","description","items","createdOn","createdBy","tenant","locale"],"sources":["menuEntity.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createMenuEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n title: {\n type: \"string\"\n },\n slug: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n items: {\n type: \"list\"\n },\n createdOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;AAAA;AASO,MAAMA,gBAAgB,GAAIC,MAAc,IAAkB;EAC7D,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,uBAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDC,KAAK,EAAE;QACHD,IAAI,EAAE;MACV,CAAC;MACDE,IAAI,EAAE;QACFF,IAAI,EAAE;MACV,CAAC;MACDG,WAAW,EAAE;QACTH,IAAI,EAAE;MACV,CAAC;MACDI,KAAK,EAAE;QACHJ,IAAI,EAAE;MACV,CAAC;MACDK,SAAS,EAAE;QACPL,IAAI,EAAE;MACV,CAAC;MACDM,SAAS,EAAE;QACPN,IAAI,EAAE;MACV,CAAC;MACDO,MAAM,EAAE;QACJP,IAAI,EAAE;MACV,CAAC;MACDQ,MAAM,EAAE;QACJR,IAAI,EAAE;MACV;IAAC,GACGT,UAAU,IAAI,CAAC,CAAC;EAE5B,CAAC,CAAC;AACN,CAAC;AAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Entity, Table } from "dynamodb-toolbox";
|
|
2
|
+
import { Attributes } from "../types";
|
|
3
|
+
interface Params {
|
|
4
|
+
table: Table;
|
|
5
|
+
entityName: string;
|
|
6
|
+
attributes: Attributes;
|
|
7
|
+
}
|
|
8
|
+
export declare const createPageBlockEntity: (params: Params) => Entity<any>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.createPageBlockEntity = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
+
var _dynamodbToolbox = require("dynamodb-toolbox");
|
|
10
|
+
const createPageBlockEntity = params => {
|
|
11
|
+
const {
|
|
12
|
+
entityName,
|
|
13
|
+
attributes,
|
|
14
|
+
table
|
|
15
|
+
} = params;
|
|
16
|
+
return new _dynamodbToolbox.Entity({
|
|
17
|
+
name: entityName,
|
|
18
|
+
table,
|
|
19
|
+
attributes: (0, _objectSpread2.default)({
|
|
20
|
+
PK: {
|
|
21
|
+
partitionKey: true
|
|
22
|
+
},
|
|
23
|
+
SK: {
|
|
24
|
+
sortKey: true
|
|
25
|
+
},
|
|
26
|
+
TYPE: {
|
|
27
|
+
type: "string"
|
|
28
|
+
},
|
|
29
|
+
id: {
|
|
30
|
+
type: "string"
|
|
31
|
+
},
|
|
32
|
+
name: {
|
|
33
|
+
type: "string"
|
|
34
|
+
},
|
|
35
|
+
blockCategory: {
|
|
36
|
+
type: "string"
|
|
37
|
+
},
|
|
38
|
+
content: {
|
|
39
|
+
type: "map"
|
|
40
|
+
},
|
|
41
|
+
preview: {
|
|
42
|
+
type: "map"
|
|
43
|
+
},
|
|
44
|
+
createdOn: {
|
|
45
|
+
type: "string"
|
|
46
|
+
},
|
|
47
|
+
createdBy: {
|
|
48
|
+
type: "map"
|
|
49
|
+
},
|
|
50
|
+
tenant: {
|
|
51
|
+
type: "string"
|
|
52
|
+
},
|
|
53
|
+
locale: {
|
|
54
|
+
type: "string"
|
|
55
|
+
}
|
|
56
|
+
}, attributes || {})
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
exports.createPageBlockEntity = createPageBlockEntity;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createPageBlockEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","id","blockCategory","content","preview","createdOn","createdBy","tenant","locale"],"sources":["pageBlockEntity.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createPageBlockEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n id: {\n type: \"string\"\n },\n name: {\n type: \"string\"\n },\n blockCategory: {\n type: \"string\"\n },\n content: {\n type: \"map\"\n },\n preview: {\n type: \"map\"\n },\n createdOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;AAAA;AASO,MAAMA,qBAAqB,GAAIC,MAAc,IAAkB;EAClE,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,uBAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDC,EAAE,EAAE;QACAD,IAAI,EAAE;MACV,CAAC;MACDN,IAAI,EAAE;QACFM,IAAI,EAAE;MACV,CAAC;MACDE,aAAa,EAAE;QACXF,IAAI,EAAE;MACV,CAAC;MACDG,OAAO,EAAE;QACLH,IAAI,EAAE;MACV,CAAC;MACDI,OAAO,EAAE;QACLJ,IAAI,EAAE;MACV,CAAC;MACDK,SAAS,EAAE;QACPL,IAAI,EAAE;MACV,CAAC;MACDM,SAAS,EAAE;QACPN,IAAI,EAAE;MACV,CAAC;MACDO,MAAM,EAAE;QACJP,IAAI,EAAE;MACV,CAAC;MACDQ,MAAM,EAAE;QACJR,IAAI,EAAE;MACV;IAAC,GACGT,UAAU,IAAI,CAAC,CAAC;EAE5B,CAAC,CAAC;AACN,CAAC;AAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Entity, Table } from "dynamodb-toolbox";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
context: PbContext;
|
|
2
|
+
import { Attributes } from "../types";
|
|
3
|
+
interface Params {
|
|
5
4
|
table: Table;
|
|
6
|
-
|
|
5
|
+
entityName: string;
|
|
6
|
+
attributes: Attributes;
|
|
7
|
+
}
|
|
8
|
+
export declare const createPageElasticsearchEntity: (params: Params) => Entity<any>;
|
|
9
|
+
export {};
|
|
@@ -1,33 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
exports.
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
7
|
+
exports.createPageElasticsearchEntity = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
12
9
|
var _dynamodbToolbox = require("dynamodb-toolbox");
|
|
13
|
-
|
|
14
|
-
var _attributes = require("@webiny/db-dynamodb/utils/attributes");
|
|
15
|
-
|
|
16
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
-
|
|
18
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
19
|
-
|
|
20
|
-
const definePageElasticsearchEntity = params => {
|
|
10
|
+
const createPageElasticsearchEntity = params => {
|
|
21
11
|
const {
|
|
22
|
-
|
|
12
|
+
entityName,
|
|
13
|
+
attributes,
|
|
23
14
|
table
|
|
24
15
|
} = params;
|
|
25
|
-
const entityName = "PbPageElasticsearch";
|
|
26
|
-
const attributes = (0, _attributes.getExtraAttributes)(context, entityName);
|
|
27
16
|
return new _dynamodbToolbox.Entity({
|
|
28
17
|
name: entityName,
|
|
29
18
|
table,
|
|
30
|
-
attributes:
|
|
19
|
+
attributes: (0, _objectSpread2.default)({
|
|
31
20
|
PK: {
|
|
32
21
|
partitionKey: true
|
|
33
22
|
},
|
|
@@ -40,8 +29,7 @@ const definePageElasticsearchEntity = params => {
|
|
|
40
29
|
data: {
|
|
41
30
|
type: "map"
|
|
42
31
|
}
|
|
43
|
-
}, attributes)
|
|
32
|
+
}, attributes || {})
|
|
44
33
|
});
|
|
45
34
|
};
|
|
46
|
-
|
|
47
|
-
exports.definePageElasticsearchEntity = definePageElasticsearchEntity;
|
|
35
|
+
exports.createPageElasticsearchEntity = createPageElasticsearchEntity;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createPageElasticsearchEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","index","type","data"],"sources":["pageElasticsearchEntity.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createPageElasticsearchEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n index: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;AAAA;AASO,MAAMA,6BAA6B,GAAIC,MAAc,IAAkB;EAC1E,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,uBAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,KAAK,EAAE;QACHC,IAAI,EAAE;MACV,CAAC;MACDC,IAAI,EAAE;QACFD,IAAI,EAAE;MACV;IAAC,GACGT,UAAU,IAAI,CAAC,CAAC;EAE5B,CAAC,CAAC;AACN,CAAC;AAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Entity, Table } from "dynamodb-toolbox";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
context: PbContext;
|
|
2
|
+
import { Attributes } from "../types";
|
|
3
|
+
interface Params {
|
|
5
4
|
table: Table;
|
|
6
|
-
|
|
5
|
+
entityName: string;
|
|
6
|
+
attributes: Attributes;
|
|
7
|
+
}
|
|
8
|
+
export declare const createPageElementEntity: (params: Params) => Entity<any>;
|
|
9
|
+
export {};
|
|
@@ -1,33 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
exports.
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
7
|
+
exports.createPageElementEntity = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
12
9
|
var _dynamodbToolbox = require("dynamodb-toolbox");
|
|
13
|
-
|
|
14
|
-
var _attributes = require("@webiny/db-dynamodb/utils/attributes");
|
|
15
|
-
|
|
16
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
-
|
|
18
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
19
|
-
|
|
20
|
-
const definePageElementEntity = params => {
|
|
10
|
+
const createPageElementEntity = params => {
|
|
21
11
|
const {
|
|
22
|
-
|
|
12
|
+
entityName,
|
|
13
|
+
attributes,
|
|
23
14
|
table
|
|
24
15
|
} = params;
|
|
25
|
-
const entityName = "PbPageElement";
|
|
26
|
-
const attributes = (0, _attributes.getExtraAttributes)(context, entityName);
|
|
27
16
|
return new _dynamodbToolbox.Entity({
|
|
28
17
|
name: entityName,
|
|
29
18
|
table,
|
|
30
|
-
attributes:
|
|
19
|
+
attributes: (0, _objectSpread2.default)({
|
|
31
20
|
PK: {
|
|
32
21
|
partitionKey: true
|
|
33
22
|
},
|
|
@@ -67,8 +56,7 @@ const definePageElementEntity = params => {
|
|
|
67
56
|
locale: {
|
|
68
57
|
type: "string"
|
|
69
58
|
}
|
|
70
|
-
}, attributes)
|
|
59
|
+
}, attributes || {})
|
|
71
60
|
});
|
|
72
61
|
};
|
|
73
|
-
|
|
74
|
-
exports.definePageElementEntity = definePageElementEntity;
|
|
62
|
+
exports.createPageElementEntity = createPageElementEntity;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createPageElementEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","id","category","content","preview","createdOn","createdBy","tenant","locale"],"sources":["pageElementEntity.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createPageElementEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n id: {\n type: \"string\"\n },\n name: {\n type: \"string\"\n },\n type: {\n type: \"string\"\n },\n category: {\n type: \"string\"\n },\n content: {\n type: \"map\"\n },\n preview: {\n type: \"map\"\n },\n createdOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;AAAA;AASO,MAAMA,uBAAuB,GAAIC,MAAc,IAAkB;EACpE,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,uBAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDC,EAAE,EAAE;QACAD,IAAI,EAAE;MACV,CAAC;MACDN,IAAI,EAAE;QACFM,IAAI,EAAE;MACV,CAAC;MACDA,IAAI,EAAE;QACFA,IAAI,EAAE;MACV,CAAC;MACDE,QAAQ,EAAE;QACNF,IAAI,EAAE;MACV,CAAC;MACDG,OAAO,EAAE;QACLH,IAAI,EAAE;MACV,CAAC;MACDI,OAAO,EAAE;QACLJ,IAAI,EAAE;MACV,CAAC;MACDK,SAAS,EAAE;QACPL,IAAI,EAAE;MACV,CAAC;MACDM,SAAS,EAAE;QACPN,IAAI,EAAE;MACV,CAAC;MACDO,MAAM,EAAE;QACJP,IAAI,EAAE;MACV,CAAC;MACDQ,MAAM,EAAE;QACJR,IAAI,EAAE;MACV;IAAC,GACGT,UAAU,IAAI,CAAC,CAAC;EAE5B,CAAC,CAAC;AACN,CAAC;AAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Entity, Table } from "dynamodb-toolbox";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
context: PbContext;
|
|
2
|
+
import { Attributes } from "../types";
|
|
3
|
+
interface Params {
|
|
5
4
|
table: Table;
|
|
6
|
-
|
|
5
|
+
entityName: string;
|
|
6
|
+
attributes: Attributes;
|
|
7
|
+
}
|
|
8
|
+
export declare const createPageEntity: (params: Params) => Entity<any>;
|
|
9
|
+
export {};
|
|
@@ -1,33 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
exports.
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
7
|
+
exports.createPageEntity = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
12
9
|
var _dynamodbToolbox = require("dynamodb-toolbox");
|
|
13
|
-
|
|
14
|
-
var _attributes = require("@webiny/db-dynamodb/utils/attributes");
|
|
15
|
-
|
|
16
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
-
|
|
18
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
19
|
-
|
|
20
|
-
const definePageEntity = params => {
|
|
10
|
+
const createPageEntity = params => {
|
|
21
11
|
const {
|
|
22
|
-
|
|
12
|
+
entityName,
|
|
13
|
+
attributes,
|
|
23
14
|
table
|
|
24
15
|
} = params;
|
|
25
|
-
const entityName = "PbPage";
|
|
26
|
-
const attributes = (0, _attributes.getExtraAttributes)(context, entityName);
|
|
27
16
|
return new _dynamodbToolbox.Entity({
|
|
28
17
|
name: entityName,
|
|
29
18
|
table,
|
|
30
|
-
attributes:
|
|
19
|
+
attributes: (0, _objectSpread2.default)({
|
|
31
20
|
PK: {
|
|
32
21
|
partitionKey: true
|
|
33
22
|
},
|
|
@@ -82,15 +71,6 @@ const definePageEntity = params => {
|
|
|
82
71
|
status: {
|
|
83
72
|
type: "string"
|
|
84
73
|
},
|
|
85
|
-
visibility: {
|
|
86
|
-
type: "map"
|
|
87
|
-
},
|
|
88
|
-
home: {
|
|
89
|
-
type: "boolean"
|
|
90
|
-
},
|
|
91
|
-
notFound: {
|
|
92
|
-
type: "boolean"
|
|
93
|
-
},
|
|
94
74
|
createdOn: {
|
|
95
75
|
type: "string"
|
|
96
76
|
},
|
|
@@ -106,8 +86,7 @@ const definePageEntity = params => {
|
|
|
106
86
|
webinyVersion: {
|
|
107
87
|
type: "string"
|
|
108
88
|
}
|
|
109
|
-
}, attributes)
|
|
89
|
+
}, attributes || {})
|
|
110
90
|
});
|
|
111
91
|
};
|
|
112
|
-
|
|
113
|
-
exports.definePageEntity = definePageEntity;
|
|
92
|
+
exports.createPageEntity = createPageEntity;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createPageEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","id","pid","tenant","locale","title","editor","createdFrom","path","category","content","publishedOn","version","settings","locked","status","createdOn","savedOn","createdBy","ownedBy","webinyVersion"],"sources":["pageEntity.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createPageEntity = (params: Params): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\"\n },\n id: {\n type: \"string\"\n },\n pid: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n title: {\n type: \"string\"\n },\n editor: {\n type: \"string\"\n },\n createdFrom: {\n type: \"string\"\n },\n path: {\n type: \"string\"\n },\n category: {\n type: \"string\"\n },\n content: {\n type: \"map\"\n },\n publishedOn: {\n type: \"string\"\n },\n version: {\n type: \"number\"\n },\n settings: {\n type: \"map\"\n },\n locked: {\n type: \"boolean\"\n },\n status: {\n type: \"string\"\n },\n createdOn: {\n type: \"string\"\n },\n savedOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n ownedBy: {\n type: \"map\"\n },\n webinyVersion: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;AAAA;AASO,MAAMA,gBAAgB,GAAIC,MAAc,IAAkB;EAC7D,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,uBAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDC,EAAE,EAAE;QACAD,IAAI,EAAE;MACV,CAAC;MACDE,GAAG,EAAE;QACDF,IAAI,EAAE;MACV,CAAC;MACDG,MAAM,EAAE;QACJH,IAAI,EAAE;MACV,CAAC;MACDI,MAAM,EAAE;QACJJ,IAAI,EAAE;MACV,CAAC;MACDK,KAAK,EAAE;QACHL,IAAI,EAAE;MACV,CAAC;MACDM,MAAM,EAAE;QACJN,IAAI,EAAE;MACV,CAAC;MACDO,WAAW,EAAE;QACTP,IAAI,EAAE;MACV,CAAC;MACDQ,IAAI,EAAE;QACFR,IAAI,EAAE;MACV,CAAC;MACDS,QAAQ,EAAE;QACNT,IAAI,EAAE;MACV,CAAC;MACDU,OAAO,EAAE;QACLV,IAAI,EAAE;MACV,CAAC;MACDW,WAAW,EAAE;QACTX,IAAI,EAAE;MACV,CAAC;MACDY,OAAO,EAAE;QACLZ,IAAI,EAAE;MACV,CAAC;MACDa,QAAQ,EAAE;QACNb,IAAI,EAAE;MACV,CAAC;MACDc,MAAM,EAAE;QACJd,IAAI,EAAE;MACV,CAAC;MACDe,MAAM,EAAE;QACJf,IAAI,EAAE;MACV,CAAC;MACDgB,SAAS,EAAE;QACPhB,IAAI,EAAE;MACV,CAAC;MACDiB,OAAO,EAAE;QACLjB,IAAI,EAAE;MACV,CAAC;MACDkB,SAAS,EAAE;QACPlB,IAAI,EAAE;MACV,CAAC;MACDmB,OAAO,EAAE;QACLnB,IAAI,EAAE;MACV,CAAC;MACDoB,aAAa,EAAE;QACXpB,IAAI,EAAE;MACV;IAAC,GACGT,UAAU,IAAI,CAAC,CAAC;EAE5B,CAAC,CAAC;AACN,CAAC;AAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Entity, Table } from "dynamodb-toolbox";
|
|
2
|
+
import { Attributes } from "../types";
|
|
3
|
+
interface Params {
|
|
4
|
+
table: Table;
|
|
5
|
+
entityName: string;
|
|
6
|
+
attributes: Attributes;
|
|
7
|
+
}
|
|
8
|
+
export declare const createPageTemplateEntity: (params: Params) => Entity<any>;
|
|
9
|
+
export {};
|