@webiny/api-page-builder-so-ddb-es 0.0.0-mt-2 → 0.0.0-unstable.06b2ede40f
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 +18 -0
- package/configurations.js +53 -0
- package/configurations.js.map +1 -0
- package/definitions/blockCategoryEntity.d.ts +10 -0
- package/definitions/blockCategoryEntity.js +57 -0
- package/definitions/blockCategoryEntity.js.map +1 -0
- package/definitions/categoryEntity.d.ts +10 -6
- package/definitions/categoryEntity.js +12 -23
- package/definitions/categoryEntity.js.map +1 -0
- package/definitions/menuEntity.d.ts +10 -6
- package/definitions/menuEntity.js +12 -23
- package/definitions/menuEntity.js.map +1 -0
- package/definitions/pageBlockEntity.d.ts +10 -0
- package/definitions/pageBlockEntity.js +74 -0
- package/definitions/pageBlockEntity.js.map +1 -0
- package/definitions/pageElasticsearchEntity.d.ts +10 -6
- package/definitions/pageElasticsearchEntity.js +15 -23
- package/definitions/pageElasticsearchEntity.js.map +1 -0
- package/definitions/pageElementEntity.d.ts +10 -6
- package/definitions/pageElementEntity.js +12 -23
- package/definitions/pageElementEntity.js.map +1 -0
- package/definitions/pageEntity.d.ts +10 -6
- package/definitions/pageEntity.js +20 -32
- package/definitions/pageEntity.js.map +1 -0
- package/definitions/pageTemplateEntity.d.ts +10 -0
- package/definitions/pageTemplateEntity.js +42 -0
- package/definitions/pageTemplateEntity.js.map +1 -0
- package/definitions/settingsEntity.d.ts +8 -6
- package/definitions/settingsEntity.js +11 -54
- package/definitions/settingsEntity.js.map +1 -0
- package/definitions/systemEntity.d.ts +10 -6
- package/definitions/systemEntity.js +15 -23
- package/definitions/systemEntity.js.map +1 -0
- package/definitions/table.d.ts +8 -5
- package/definitions/table.js +22 -21
- package/definitions/table.js.map +1 -0
- package/definitions/tableElasticsearch.d.ts +9 -5
- package/definitions/tableElasticsearch.js +16 -28
- package/definitions/tableElasticsearch.js.map +1 -0
- package/elasticsearch/createElasticsearchIndex.d.ts +9 -0
- package/elasticsearch/createElasticsearchIndex.js +41 -0
- package/elasticsearch/createElasticsearchIndex.js.map +1 -0
- package/elasticsearch/indices/base.d.ts +2 -0
- package/elasticsearch/indices/base.js +14 -0
- package/elasticsearch/indices/base.js.map +1 -0
- package/elasticsearch/indices/index.d.ts +1 -0
- package/elasticsearch/indices/index.js +14 -0
- package/elasticsearch/indices/index.js.map +1 -0
- package/elasticsearch/indices/japanese.d.ts +2 -0
- package/elasticsearch/indices/japanese.js +15 -0
- package/elasticsearch/indices/japanese.js.map +1 -0
- package/index.d.ts +3 -8
- package/index.js +246 -16
- package/index.js.map +1 -0
- package/operations/blockCategory/dataLoader.d.ts +17 -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 +27 -0
- package/operations/blockCategory/fields.js.map +1 -0
- package/operations/blockCategory/index.d.ts +8 -0
- package/operations/blockCategory/index.js +192 -0
- package/operations/blockCategory/index.js.map +1 -0
- package/operations/blockCategory/keys.d.ts +9 -0
- package/operations/blockCategory/keys.js +23 -0
- package/operations/blockCategory/keys.js.map +1 -0
- package/operations/category/dataLoader.d.ts +17 -0
- package/operations/category/{CategoryDataLoader.js → dataLoader.js} +13 -27
- package/operations/category/dataLoader.js.map +1 -0
- package/operations/category/fields.d.ts +1 -2
- package/operations/category/fields.js +4 -5
- package/operations/category/fields.js.map +1 -0
- package/operations/category/index.d.ts +7 -4
- package/operations/category/index.js +185 -21
- package/operations/category/index.js.map +1 -0
- package/operations/category/keys.d.ts +9 -0
- package/operations/category/keys.js +23 -0
- package/operations/category/keys.js.map +1 -0
- package/operations/menu/fields.d.ts +1 -2
- package/operations/menu/fields.js +19 -18
- package/operations/menu/fields.js.map +1 -0
- package/operations/menu/index.d.ts +7 -4
- package/operations/menu/index.js +193 -21
- package/operations/menu/index.js.map +1 -0
- package/operations/pageBlock/compression.d.ts +18 -0
- package/operations/pageBlock/compression.js +42 -0
- package/operations/pageBlock/compression.js.map +1 -0
- package/operations/pageBlock/dataLoader.d.ts +17 -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 +24 -0
- package/operations/pageBlock/fields.js.map +1 -0
- package/operations/pageBlock/index.d.ts +8 -0
- package/operations/pageBlock/index.js +219 -0
- package/operations/pageBlock/index.js.map +1 -0
- package/operations/pageBlock/keys.d.ts +20 -0
- package/operations/pageBlock/keys.js +37 -0
- package/operations/pageBlock/keys.js.map +1 -0
- package/operations/pageElement/fields.d.ts +1 -2
- package/operations/pageElement/fields.js +4 -5
- package/operations/pageElement/fields.js.map +1 -0
- package/operations/pageElement/index.d.ts +7 -6
- package/operations/pageElement/index.js +182 -21
- package/operations/pageElement/index.js.map +1 -0
- package/operations/pageTemplate/dataLoader.d.ts +17 -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 +24 -0
- package/operations/pageTemplate/fields.js.map +1 -0
- package/operations/pageTemplate/index.d.ts +8 -0
- package/operations/pageTemplate/index.js +204 -0
- package/operations/pageTemplate/index.js.map +1 -0
- package/operations/pageTemplate/keys.d.ts +5 -0
- package/operations/pageTemplate/keys.js +23 -0
- package/operations/pageTemplate/keys.js.map +1 -0
- package/operations/pages/elasticsearchQueryBody.d.ts +8 -12
- package/operations/pages/elasticsearchQueryBody.js +43 -101
- package/operations/pages/elasticsearchQueryBody.js.map +1 -0
- package/operations/pages/fields.d.ts +3 -2
- package/operations/pages/fields.js +18 -5
- package/operations/pages/fields.js.map +1 -0
- package/operations/pages/helpers.d.ts +10 -18
- package/operations/pages/helpers.js +34 -33
- package/operations/pages/helpers.js.map +1 -0
- package/operations/pages/index.d.ts +10 -4
- package/operations/pages/index.js +785 -18
- package/operations/pages/index.js.map +1 -0
- package/operations/pages/keys.d.ts +24 -0
- package/operations/pages/keys.js +59 -0
- package/operations/pages/keys.js.map +1 -0
- package/operations/pages/logIgnoredEsResponseError.d.ts +7 -0
- package/operations/pages/logIgnoredEsResponseError.js +28 -0
- package/operations/pages/logIgnoredEsResponseError.js.map +1 -0
- package/operations/pages/shouldIgnoreEsResponseError.d.ts +2 -0
- package/operations/pages/shouldIgnoreEsResponseError.js +13 -0
- package/operations/pages/shouldIgnoreEsResponseError.js.map +1 -0
- package/operations/settings/index.d.ts +11 -6
- package/operations/settings/index.js +140 -15
- package/operations/settings/index.js.map +1 -0
- package/operations/system/index.d.ts +5 -4
- package/operations/system/index.js +94 -23
- package/operations/system/index.js.map +1 -0
- package/package.json +44 -36
- package/plugins/definitions/BlockCategoryDynamoDbElasticFieldPlugin.d.ts +4 -0
- package/plugins/definitions/BlockCategoryDynamoDbElasticFieldPlugin.js +13 -0
- package/plugins/definitions/BlockCategoryDynamoDbElasticFieldPlugin.js.map +1 -0
- package/plugins/definitions/CategoryDynamoDbElasticFieldPlugin.js +5 -9
- package/plugins/definitions/CategoryDynamoDbElasticFieldPlugin.js.map +1 -0
- package/plugins/definitions/IndexPageDataPlugin.d.ts +12 -11
- package/plugins/definitions/IndexPageDataPlugin.js +3 -12
- package/plugins/definitions/IndexPageDataPlugin.js.map +1 -0
- package/plugins/definitions/MenuDynamoDbElasticFieldPlugin.js +5 -9
- package/plugins/definitions/MenuDynamoDbElasticFieldPlugin.js.map +1 -0
- package/plugins/definitions/PageBlockDynamoDbFieldPlugin.d.ts +4 -0
- package/plugins/definitions/PageBlockDynamoDbFieldPlugin.js +13 -0
- package/plugins/definitions/PageBlockDynamoDbFieldPlugin.js.map +1 -0
- package/plugins/definitions/PageDynamoDbElasticsearchFieldPlugin.d.ts +4 -0
- package/plugins/definitions/PageDynamoDbElasticsearchFieldPlugin.js +13 -0
- package/plugins/definitions/PageDynamoDbElasticsearchFieldPlugin.js.map +1 -0
- package/plugins/definitions/PageElasticsearchBodyModifierPlugin.d.ts +6 -2
- package/plugins/definitions/PageElasticsearchBodyModifierPlugin.js +6 -10
- package/plugins/definitions/PageElasticsearchBodyModifierPlugin.js.map +1 -0
- package/plugins/definitions/PageElasticsearchFieldPlugin.d.ts +1 -2
- package/plugins/definitions/PageElasticsearchFieldPlugin.js +5 -14
- package/plugins/definitions/PageElasticsearchFieldPlugin.js.map +1 -0
- package/plugins/definitions/PageElasticsearchIndexPlugin.d.ts +4 -0
- package/plugins/definitions/PageElasticsearchIndexPlugin.js +13 -0
- package/plugins/definitions/PageElasticsearchIndexPlugin.js.map +1 -0
- package/plugins/definitions/PageElasticsearchQueryModifierPlugin.d.ts +8 -2
- package/plugins/definitions/PageElasticsearchQueryModifierPlugin.js +6 -10
- package/plugins/definitions/PageElasticsearchQueryModifierPlugin.js.map +1 -0
- package/plugins/definitions/PageElasticsearchSortModifierPlugin.d.ts +6 -2
- package/plugins/definitions/PageElasticsearchSortModifierPlugin.js +6 -10
- package/plugins/definitions/PageElasticsearchSortModifierPlugin.js.map +1 -0
- package/plugins/definitions/PageElementDynamoDbElasticFieldPlugin.js +5 -9
- package/plugins/definitions/PageElementDynamoDbElasticFieldPlugin.js.map +1 -0
- package/plugins/definitions/PageTemplateDynamoDbElasticFieldPlugin.d.ts +4 -0
- package/plugins/definitions/PageTemplateDynamoDbElasticFieldPlugin.js +13 -0
- package/plugins/definitions/PageTemplateDynamoDbElasticFieldPlugin.js.map +1 -0
- package/plugins/definitions/SearchLatestPagesPlugin.d.ts +1 -1
- package/plugins/definitions/SearchLatestPagesPlugin.js +5 -9
- package/plugins/definitions/SearchLatestPagesPlugin.js.map +1 -0
- package/plugins/definitions/SearchPagesPlugin.d.ts +4 -4
- package/plugins/definitions/SearchPagesPlugin.js +2 -13
- package/plugins/definitions/SearchPagesPlugin.js.map +1 -0
- package/plugins/definitions/SearchPublishedPagesPlugin.d.ts +1 -1
- package/plugins/definitions/SearchPublishedPagesPlugin.js +5 -9
- package/plugins/definitions/SearchPublishedPagesPlugin.js.map +1 -0
- package/plugins/definitions/index.d.ts +15 -0
- package/plugins/definitions/index.js +172 -0
- package/plugins/definitions/index.js.map +1 -0
- package/plugins/index.d.ts +1 -0
- package/plugins/index.js +18 -0
- package/plugins/index.js.map +1 -0
- package/tasks/createIndexTaskPlugin.d.ts +2 -0
- package/tasks/createIndexTaskPlugin.js +36 -0
- package/tasks/createIndexTaskPlugin.js.map +1 -0
- package/types.d.ts +63 -0
- package/types.js +21 -0
- package/types.js.map +1 -0
- package/operations/category/CategoryDataLoader.d.ts +0 -20
- 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
- package/upgrades/index.d.ts +0 -2
- package/upgrades/index.js +0 -14
- package/upgrades/v5.15.0/category.d.ts +0 -2
- package/upgrades/v5.15.0/category.js +0 -75
- package/upgrades/v5.15.0/index.d.ts +0 -4
- package/upgrades/v5.15.0/index.js +0 -52
- package/upgrades/v5.15.0/menu.d.ts +0 -2
- package/upgrades/v5.15.0/menu.js +0 -75
- package/upgrades/v5.15.0/pageElement.d.ts +0 -2
- package/upgrades/v5.15.0/pageElement.js +0 -75
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { PbContext } from "./types";
|
|
2
|
+
import type { ElasticsearchIndexRequestBody } from "@webiny/api-elasticsearch/types";
|
|
3
|
+
export interface ConfigurationsElasticsearch {
|
|
4
|
+
index: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ConfigurationsElasticsearchParams {
|
|
7
|
+
tenant: string;
|
|
8
|
+
locale: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ConfigurationsIndexSettingsParams {
|
|
11
|
+
context: PbContext;
|
|
12
|
+
locale: string;
|
|
13
|
+
}
|
|
14
|
+
export interface Configurations {
|
|
15
|
+
es: (params: ConfigurationsElasticsearchParams) => ConfigurationsElasticsearch;
|
|
16
|
+
indexSettings: (params: ConfigurationsIndexSettingsParams) => Partial<ElasticsearchIndexRequestBody>;
|
|
17
|
+
}
|
|
18
|
+
export declare const configurations: Configurations;
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
var _apiElasticsearch = require("@webiny/api-elasticsearch");
|
|
10
|
+
var _plugins = require("./plugins");
|
|
11
|
+
const configurations = exports.configurations = {
|
|
12
|
+
es: params => {
|
|
13
|
+
const {
|
|
14
|
+
tenant,
|
|
15
|
+
locale
|
|
16
|
+
} = params;
|
|
17
|
+
if (!tenant) {
|
|
18
|
+
throw new _error.default(`Missing "tenant" parameter when trying to create Elasticsearch index name.`, "TENANT_ERROR");
|
|
19
|
+
}
|
|
20
|
+
const sharedIndex = (0, _apiElasticsearch.isSharedElasticsearchIndex)();
|
|
21
|
+
const tenantId = sharedIndex ? "root" : tenant;
|
|
22
|
+
let localeCode = null;
|
|
23
|
+
if (process.env.WEBINY_ELASTICSEARCH_INDEX_LOCALE === "true") {
|
|
24
|
+
if (!locale) {
|
|
25
|
+
throw new _error.default(`Missing "locale" parameter when trying to create Elasticsearch index name.`, "LOCALE_ERROR");
|
|
26
|
+
}
|
|
27
|
+
localeCode = locale;
|
|
28
|
+
}
|
|
29
|
+
const index = [tenantId, localeCode, "page-builder"].filter(Boolean).join("-").toLowerCase();
|
|
30
|
+
const prefix = (0, _apiElasticsearch.getElasticsearchIndexPrefix)();
|
|
31
|
+
if (!prefix) {
|
|
32
|
+
return {
|
|
33
|
+
index
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
index: prefix + index
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
indexSettings: ({
|
|
41
|
+
context,
|
|
42
|
+
locale
|
|
43
|
+
}) => {
|
|
44
|
+
const plugin = (0, _apiElasticsearch.getLastAddedIndexPlugin)({
|
|
45
|
+
container: context.plugins,
|
|
46
|
+
type: _plugins.PageElasticsearchIndexPlugin.type,
|
|
47
|
+
locale
|
|
48
|
+
});
|
|
49
|
+
return plugin ? plugin.body : {};
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=configurations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_error","_interopRequireDefault","require","_apiElasticsearch","_plugins","configurations","exports","es","params","tenant","locale","WebinyError","sharedIndex","isSharedElasticsearchIndex","tenantId","localeCode","process","env","WEBINY_ELASTICSEARCH_INDEX_LOCALE","index","filter","Boolean","join","toLowerCase","prefix","getElasticsearchIndexPrefix","indexSettings","context","plugin","getLastAddedIndexPlugin","container","plugins","type","PageElasticsearchIndexPlugin","body"],"sources":["configurations.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport {\n getElasticsearchIndexPrefix,\n getLastAddedIndexPlugin,\n isSharedElasticsearchIndex\n} from \"@webiny/api-elasticsearch\";\nimport { PageElasticsearchIndexPlugin } from \"~/plugins\";\nimport type { PbContext } from \"~/types\";\nimport type { ElasticsearchIndexRequestBody } from \"@webiny/api-elasticsearch/types\";\n\nexport interface ConfigurationsElasticsearch {\n index: string;\n}\n\nexport interface ConfigurationsElasticsearchParams {\n tenant: string;\n locale: string;\n}\n\nexport interface ConfigurationsIndexSettingsParams {\n context: PbContext;\n locale: string;\n}\n\nexport interface Configurations {\n es: (params: ConfigurationsElasticsearchParams) => ConfigurationsElasticsearch;\n indexSettings: (\n params: ConfigurationsIndexSettingsParams\n ) => Partial<ElasticsearchIndexRequestBody>;\n}\n\nexport const configurations: Configurations = {\n es: params => {\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 = isSharedElasticsearchIndex();\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 = getElasticsearchIndexPrefix();\n if (!prefix) {\n return {\n index\n };\n }\n return {\n index: prefix + index\n };\n },\n indexSettings: ({ context, locale }) => {\n const plugin = getLastAddedIndexPlugin<PageElasticsearchIndexPlugin>({\n container: context.plugins,\n type: PageElasticsearchIndexPlugin.type,\n locale\n });\n\n return plugin ? plugin.body : {};\n }\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAKA,IAAAE,QAAA,GAAAF,OAAA;AAyBO,MAAMG,cAA8B,GAAAC,OAAA,CAAAD,cAAA,GAAG;EAC1CE,EAAE,EAAEC,MAAM,IAAI;IACV,MAAM;MAAEC,MAAM;MAAEC;IAAO,CAAC,GAAGF,MAAM;IACjC,IAAI,CAACC,MAAM,EAAE;MACT,MAAM,IAAIE,cAAW,CACjB,4EAA4E,EAC5E,cACJ,CAAC;IACL;IACA,MAAMC,WAAW,GAAG,IAAAC,4CAA0B,EAAC,CAAC;IAEhD,MAAMC,QAAQ,GAAGF,WAAW,GAAG,MAAM,GAAGH,MAAM;IAC9C,IAAIM,UAAyB,GAAG,IAAI;IACpC,IAAIC,OAAO,CAACC,GAAG,CAACC,iCAAiC,KAAK,MAAM,EAAE;MAC1D,IAAI,CAACR,MAAM,EAAE;QACT,MAAM,IAAIC,cAAW,CACjB,4EAA4E,EAC5E,cACJ,CAAC;MACL;MACAI,UAAU,GAAGL,MAAM;IACvB;IAEA,MAAMS,KAAK,GAAG,CAACL,QAAQ,EAAEC,UAAU,EAAE,cAAc,CAAC,CAC/CK,MAAM,CAACC,OAAO,CAAC,CACfC,IAAI,CAAC,GAAG,CAAC,CACTC,WAAW,CAAC,CAAC;IAElB,MAAMC,MAAM,GAAG,IAAAC,6CAA2B,EAAC,CAAC;IAC5C,IAAI,CAACD,MAAM,EAAE;MACT,OAAO;QACHL;MACJ,CAAC;IACL;IACA,OAAO;MACHA,KAAK,EAAEK,MAAM,GAAGL;IACpB,CAAC;EACL,CAAC;EACDO,aAAa,EAAEA,CAAC;IAAEC,OAAO;IAAEjB;EAAO,CAAC,KAAK;IACpC,MAAMkB,MAAM,GAAG,IAAAC,yCAAuB,EAA+B;MACjEC,SAAS,EAAEH,OAAO,CAACI,OAAO;MAC1BC,IAAI,EAAEC,qCAA4B,CAACD,IAAI;MACvCtB;IACJ,CAAC,CAAC;IAEF,OAAOkB,MAAM,GAAGA,MAAM,CAACM,IAAI,GAAG,CAAC,CAAC;EACpC;AACJ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
+
import { Entity } from "@webiny/db-dynamodb/toolbox";
|
|
3
|
+
import type { Attributes } from "../types";
|
|
4
|
+
interface Params {
|
|
5
|
+
table: Table<string, string, string>;
|
|
6
|
+
entityName: string;
|
|
7
|
+
attributes: Attributes;
|
|
8
|
+
}
|
|
9
|
+
export declare const createBlockCategoryEntity: (params: Params) => Entity<any>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createBlockCategoryEntity = void 0;
|
|
7
|
+
var _toolbox = require("@webiny/db-dynamodb/toolbox");
|
|
8
|
+
const createBlockCategoryEntity = params => {
|
|
9
|
+
const {
|
|
10
|
+
entityName,
|
|
11
|
+
attributes,
|
|
12
|
+
table
|
|
13
|
+
} = params;
|
|
14
|
+
return new _toolbox.Entity({
|
|
15
|
+
name: entityName,
|
|
16
|
+
table,
|
|
17
|
+
attributes: {
|
|
18
|
+
PK: {
|
|
19
|
+
partitionKey: true
|
|
20
|
+
},
|
|
21
|
+
SK: {
|
|
22
|
+
sortKey: true
|
|
23
|
+
},
|
|
24
|
+
TYPE: {
|
|
25
|
+
type: "string"
|
|
26
|
+
},
|
|
27
|
+
name: {
|
|
28
|
+
type: "string"
|
|
29
|
+
},
|
|
30
|
+
slug: {
|
|
31
|
+
type: "string"
|
|
32
|
+
},
|
|
33
|
+
icon: {
|
|
34
|
+
type: "string"
|
|
35
|
+
},
|
|
36
|
+
description: {
|
|
37
|
+
type: "string"
|
|
38
|
+
},
|
|
39
|
+
createdOn: {
|
|
40
|
+
type: "string"
|
|
41
|
+
},
|
|
42
|
+
createdBy: {
|
|
43
|
+
type: "map"
|
|
44
|
+
},
|
|
45
|
+
tenant: {
|
|
46
|
+
type: "string"
|
|
47
|
+
},
|
|
48
|
+
locale: {
|
|
49
|
+
type: "string"
|
|
50
|
+
},
|
|
51
|
+
...(attributes || {})
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
exports.createBlockCategoryEntity = createBlockCategoryEntity;
|
|
56
|
+
|
|
57
|
+
//# sourceMappingURL=blockCategoryEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_toolbox","require","createBlockCategoryEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","slug","icon","description","createdOn","createdBy","tenant","locale","exports"],"sources":["blockCategoryEntity.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\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":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,yBAAyB,GAAIC,MAAc,IAAkB;EACtE,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,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,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACiB,OAAA,CAAApB,yBAAA,GAAAA,yBAAA","ignoreList":[]}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
table: Table
|
|
6
|
-
|
|
1
|
+
import type { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
+
import { Entity } from "@webiny/db-dynamodb/toolbox";
|
|
3
|
+
import type { Attributes } from "../types";
|
|
4
|
+
interface Params {
|
|
5
|
+
table: Table<string, string, string>;
|
|
6
|
+
entityName: string;
|
|
7
|
+
attributes: Attributes;
|
|
8
|
+
}
|
|
9
|
+
export declare const createCategoryEntity: (params: Params) => Entity<any>;
|
|
10
|
+
export {};
|
|
@@ -1,33 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
|
-
exports.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
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 => {
|
|
6
|
+
exports.createCategoryEntity = void 0;
|
|
7
|
+
var _toolbox = require("@webiny/db-dynamodb/toolbox");
|
|
8
|
+
const createCategoryEntity = params => {
|
|
21
9
|
const {
|
|
22
|
-
|
|
10
|
+
entityName,
|
|
11
|
+
attributes,
|
|
23
12
|
table
|
|
24
13
|
} = params;
|
|
25
|
-
|
|
26
|
-
const attributes = (0, _attributes.getExtraAttributes)(context, entityName);
|
|
27
|
-
return new _dynamodbToolbox.Entity({
|
|
14
|
+
return new _toolbox.Entity({
|
|
28
15
|
name: entityName,
|
|
29
16
|
table,
|
|
30
|
-
attributes:
|
|
17
|
+
attributes: {
|
|
31
18
|
PK: {
|
|
32
19
|
partitionKey: true
|
|
33
20
|
},
|
|
@@ -60,9 +47,11 @@ const defineCategoryEntity = params => {
|
|
|
60
47
|
},
|
|
61
48
|
locale: {
|
|
62
49
|
type: "string"
|
|
63
|
-
}
|
|
64
|
-
|
|
50
|
+
},
|
|
51
|
+
...(attributes || {})
|
|
52
|
+
}
|
|
65
53
|
});
|
|
66
54
|
};
|
|
55
|
+
exports.createCategoryEntity = createCategoryEntity;
|
|
67
56
|
|
|
68
|
-
|
|
57
|
+
//# sourceMappingURL=categoryEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_toolbox","require","createCategoryEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","slug","url","layout","createdOn","createdBy","tenant","locale","exports"],"sources":["categoryEntity.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\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":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,oBAAoB,GAAIC,MAAc,IAAkB;EACjE,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,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,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACiB,OAAA,CAAApB,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
table: Table
|
|
6
|
-
|
|
1
|
+
import type { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
+
import { Entity } from "@webiny/db-dynamodb/toolbox";
|
|
3
|
+
import type { Attributes } from "../types";
|
|
4
|
+
interface Params {
|
|
5
|
+
table: Table<string, string, string>;
|
|
6
|
+
entityName: string;
|
|
7
|
+
attributes: Attributes;
|
|
8
|
+
}
|
|
9
|
+
export declare const createMenuEntity: (params: Params) => Entity<any>;
|
|
10
|
+
export {};
|
|
@@ -1,33 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
|
-
exports.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
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 => {
|
|
6
|
+
exports.createMenuEntity = void 0;
|
|
7
|
+
var _toolbox = require("@webiny/db-dynamodb/toolbox");
|
|
8
|
+
const createMenuEntity = params => {
|
|
21
9
|
const {
|
|
22
|
-
|
|
10
|
+
entityName,
|
|
11
|
+
attributes,
|
|
23
12
|
table
|
|
24
13
|
} = params;
|
|
25
|
-
|
|
26
|
-
const attributes = (0, _attributes.getExtraAttributes)(context, entityName);
|
|
27
|
-
return new _dynamodbToolbox.Entity({
|
|
14
|
+
return new _toolbox.Entity({
|
|
28
15
|
name: entityName,
|
|
29
16
|
table,
|
|
30
|
-
attributes:
|
|
17
|
+
attributes: {
|
|
31
18
|
PK: {
|
|
32
19
|
partitionKey: true
|
|
33
20
|
},
|
|
@@ -60,9 +47,11 @@ const defineMenuEntity = params => {
|
|
|
60
47
|
},
|
|
61
48
|
locale: {
|
|
62
49
|
type: "string"
|
|
63
|
-
}
|
|
64
|
-
|
|
50
|
+
},
|
|
51
|
+
...(attributes || {})
|
|
52
|
+
}
|
|
65
53
|
});
|
|
66
54
|
};
|
|
55
|
+
exports.createMenuEntity = createMenuEntity;
|
|
67
56
|
|
|
68
|
-
|
|
57
|
+
//# sourceMappingURL=menuEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_toolbox","require","createMenuEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","title","slug","description","items","createdOn","createdBy","tenant","locale","exports"],"sources":["menuEntity.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\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":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,gBAAgB,GAAIC,MAAc,IAAkB;EAC7D,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,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,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACkB,OAAA,CAAArB,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
+
import { Entity } from "@webiny/db-dynamodb/toolbox";
|
|
3
|
+
import type { Attributes } from "../types";
|
|
4
|
+
interface Params {
|
|
5
|
+
table: Table<string, string, string>;
|
|
6
|
+
entityName: string;
|
|
7
|
+
attributes: Attributes;
|
|
8
|
+
}
|
|
9
|
+
export declare const createPageBlockEntity: (params: Params) => Entity<any>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createPageBlockEntity = void 0;
|
|
7
|
+
var _toolbox = require("@webiny/db-dynamodb/toolbox");
|
|
8
|
+
const createPageBlockEntity = params => {
|
|
9
|
+
const {
|
|
10
|
+
entityName,
|
|
11
|
+
attributes,
|
|
12
|
+
table
|
|
13
|
+
} = params;
|
|
14
|
+
return new _toolbox.Entity({
|
|
15
|
+
name: entityName,
|
|
16
|
+
table,
|
|
17
|
+
attributes: {
|
|
18
|
+
PK: {
|
|
19
|
+
partitionKey: true
|
|
20
|
+
},
|
|
21
|
+
SK: {
|
|
22
|
+
sortKey: true
|
|
23
|
+
},
|
|
24
|
+
GSI1_PK: {
|
|
25
|
+
type: "string"
|
|
26
|
+
},
|
|
27
|
+
GSI1_SK: {
|
|
28
|
+
type: "string"
|
|
29
|
+
},
|
|
30
|
+
TYPE: {
|
|
31
|
+
type: "string"
|
|
32
|
+
},
|
|
33
|
+
id: {
|
|
34
|
+
type: "string"
|
|
35
|
+
},
|
|
36
|
+
name: {
|
|
37
|
+
type: "string"
|
|
38
|
+
},
|
|
39
|
+
blockCategory: {
|
|
40
|
+
type: "string"
|
|
41
|
+
},
|
|
42
|
+
content: {
|
|
43
|
+
type: "map"
|
|
44
|
+
},
|
|
45
|
+
preview: {
|
|
46
|
+
type: "map"
|
|
47
|
+
},
|
|
48
|
+
createdOn: {
|
|
49
|
+
type: "string"
|
|
50
|
+
},
|
|
51
|
+
createdBy: {
|
|
52
|
+
type: "map"
|
|
53
|
+
},
|
|
54
|
+
tenant: {
|
|
55
|
+
type: "string"
|
|
56
|
+
},
|
|
57
|
+
locale: {
|
|
58
|
+
type: "string"
|
|
59
|
+
},
|
|
60
|
+
dataSources: {
|
|
61
|
+
type: "list",
|
|
62
|
+
default: []
|
|
63
|
+
},
|
|
64
|
+
dataBindings: {
|
|
65
|
+
type: "list",
|
|
66
|
+
default: []
|
|
67
|
+
},
|
|
68
|
+
...(attributes || {})
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
exports.createPageBlockEntity = createPageBlockEntity;
|
|
73
|
+
|
|
74
|
+
//# sourceMappingURL=pageBlockEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_toolbox","require","createPageBlockEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","GSI1_PK","type","GSI1_SK","TYPE","id","blockCategory","content","preview","createdOn","createdBy","tenant","locale","dataSources","default","dataBindings","exports"],"sources":["pageBlockEntity.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\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 GSI1_PK: {\n type: \"string\"\n },\n GSI1_SK: {\n type: \"string\"\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 dataSources: {\n type: \"list\",\n default: []\n },\n dataBindings: {\n type: \"list\",\n default: []\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,qBAAqB,GAAIC,MAAc,IAAkB;EAClE,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,OAAO,EAAE;QACLC,IAAI,EAAE;MACV,CAAC;MACDC,OAAO,EAAE;QACLD,IAAI,EAAE;MACV,CAAC;MACDE,IAAI,EAAE;QACFF,IAAI,EAAE;MACV,CAAC;MACDG,EAAE,EAAE;QACAH,IAAI,EAAE;MACV,CAAC;MACDN,IAAI,EAAE;QACFM,IAAI,EAAE;MACV,CAAC;MACDI,aAAa,EAAE;QACXJ,IAAI,EAAE;MACV,CAAC;MACDK,OAAO,EAAE;QACLL,IAAI,EAAE;MACV,CAAC;MACDM,OAAO,EAAE;QACLN,IAAI,EAAE;MACV,CAAC;MACDO,SAAS,EAAE;QACPP,IAAI,EAAE;MACV,CAAC;MACDQ,SAAS,EAAE;QACPR,IAAI,EAAE;MACV,CAAC;MACDS,MAAM,EAAE;QACJT,IAAI,EAAE;MACV,CAAC;MACDU,MAAM,EAAE;QACJV,IAAI,EAAE;MACV,CAAC;MACDW,WAAW,EAAE;QACTX,IAAI,EAAE,MAAM;QACZY,OAAO,EAAE;MACb,CAAC;MACDC,YAAY,EAAE;QACVb,IAAI,EAAE,MAAM;QACZY,OAAO,EAAE;MACb,CAAC;MACD,IAAIrB,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACuB,OAAA,CAAA1B,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
table: Table
|
|
6
|
-
|
|
1
|
+
import type { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
+
import { Entity } from "@webiny/db-dynamodb/toolbox";
|
|
3
|
+
import type { Attributes } from "../types";
|
|
4
|
+
interface Params {
|
|
5
|
+
table: Table<string, string, string>;
|
|
6
|
+
entityName: string;
|
|
7
|
+
attributes: Attributes;
|
|
8
|
+
}
|
|
9
|
+
export declare const createPageElasticsearchEntity: (params: Params) => Entity<any>;
|
|
10
|
+
export {};
|
|
@@ -1,33 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
|
-
exports.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
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 => {
|
|
6
|
+
exports.createPageElasticsearchEntity = void 0;
|
|
7
|
+
var _toolbox = require("@webiny/db-dynamodb/toolbox");
|
|
8
|
+
const createPageElasticsearchEntity = params => {
|
|
21
9
|
const {
|
|
22
|
-
|
|
10
|
+
entityName,
|
|
11
|
+
attributes,
|
|
23
12
|
table
|
|
24
13
|
} = params;
|
|
25
|
-
|
|
26
|
-
const attributes = (0, _attributes.getExtraAttributes)(context, entityName);
|
|
27
|
-
return new _dynamodbToolbox.Entity({
|
|
14
|
+
return new _toolbox.Entity({
|
|
28
15
|
name: entityName,
|
|
29
16
|
table,
|
|
30
|
-
attributes:
|
|
17
|
+
attributes: {
|
|
31
18
|
PK: {
|
|
32
19
|
partitionKey: true
|
|
33
20
|
},
|
|
@@ -39,9 +26,14 @@ const definePageElasticsearchEntity = params => {
|
|
|
39
26
|
},
|
|
40
27
|
data: {
|
|
41
28
|
type: "map"
|
|
42
|
-
}
|
|
43
|
-
|
|
29
|
+
},
|
|
30
|
+
TYPE: {
|
|
31
|
+
type: "string"
|
|
32
|
+
},
|
|
33
|
+
...(attributes || {})
|
|
34
|
+
}
|
|
44
35
|
});
|
|
45
36
|
};
|
|
37
|
+
exports.createPageElasticsearchEntity = createPageElasticsearchEntity;
|
|
46
38
|
|
|
47
|
-
|
|
39
|
+
//# sourceMappingURL=pageElasticsearchEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_toolbox","require","createPageElasticsearchEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","index","type","data","TYPE","exports"],"sources":["pageElasticsearchEntity.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\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 TYPE: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,6BAA6B,GAAIC,MAAc,IAAkB;EAC1E,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,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,CAAC;MACDE,IAAI,EAAE;QACFF,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACY,OAAA,CAAAf,6BAAA,GAAAA,6BAAA","ignoreList":[]}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
table: Table
|
|
6
|
-
|
|
1
|
+
import type { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
+
import { Entity } from "@webiny/db-dynamodb/toolbox";
|
|
3
|
+
import type { Attributes } from "../types";
|
|
4
|
+
interface Params {
|
|
5
|
+
table: Table<string, string, string>;
|
|
6
|
+
entityName: string;
|
|
7
|
+
attributes: Attributes;
|
|
8
|
+
}
|
|
9
|
+
export declare const createPageElementEntity: (params: Params) => Entity<any>;
|
|
10
|
+
export {};
|
|
@@ -1,33 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
|
-
exports.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
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 => {
|
|
6
|
+
exports.createPageElementEntity = void 0;
|
|
7
|
+
var _toolbox = require("@webiny/db-dynamodb/toolbox");
|
|
8
|
+
const createPageElementEntity = params => {
|
|
21
9
|
const {
|
|
22
|
-
|
|
10
|
+
entityName,
|
|
11
|
+
attributes,
|
|
23
12
|
table
|
|
24
13
|
} = params;
|
|
25
|
-
|
|
26
|
-
const attributes = (0, _attributes.getExtraAttributes)(context, entityName);
|
|
27
|
-
return new _dynamodbToolbox.Entity({
|
|
14
|
+
return new _toolbox.Entity({
|
|
28
15
|
name: entityName,
|
|
29
16
|
table,
|
|
30
|
-
attributes:
|
|
17
|
+
attributes: {
|
|
31
18
|
PK: {
|
|
32
19
|
partitionKey: true
|
|
33
20
|
},
|
|
@@ -66,9 +53,11 @@ const definePageElementEntity = params => {
|
|
|
66
53
|
},
|
|
67
54
|
locale: {
|
|
68
55
|
type: "string"
|
|
69
|
-
}
|
|
70
|
-
|
|
56
|
+
},
|
|
57
|
+
...(attributes || {})
|
|
58
|
+
}
|
|
71
59
|
});
|
|
72
60
|
};
|
|
61
|
+
exports.createPageElementEntity = createPageElementEntity;
|
|
73
62
|
|
|
74
|
-
|
|
63
|
+
//# sourceMappingURL=pageElementEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_toolbox","require","createPageElementEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","id","category","content","preview","createdOn","createdBy","tenant","locale","exports"],"sources":["pageElementEntity.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\ninterface Params {\n table: Table<string, string, string>;\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":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,uBAAuB,GAAIC,MAAc,IAAkB;EACpE,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,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,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACkB,OAAA,CAAArB,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
table: Table
|
|
6
|
-
|
|
1
|
+
import type { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
+
import { Entity } from "@webiny/db-dynamodb/toolbox";
|
|
3
|
+
import type { Attributes } from "../types";
|
|
4
|
+
interface Params {
|
|
5
|
+
table: Table<string, string, string>;
|
|
6
|
+
entityName: string;
|
|
7
|
+
attributes: Attributes;
|
|
8
|
+
}
|
|
9
|
+
export declare const createPageEntity: (params: Params) => Entity<any>;
|
|
10
|
+
export {};
|