@webiny/api-page-builder-so-ddb-es 5.40.6 → 5.41.0-beta.0
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.js +2 -2
- package/configurations.js.map +1 -1
- package/operations/blockCategory/dataLoader.d.ts +1 -1
- package/operations/category/dataLoader.d.ts +1 -1
- package/operations/pageBlock/dataLoader.d.ts +1 -1
- package/operations/pageTemplate/dataLoader.d.ts +1 -1
- package/operations/pageTemplate/keys.d.ts +2 -2
- package/operations/pages/elasticsearchQueryBody.js +1 -1
- package/operations/pages/elasticsearchQueryBody.js.map +1 -1
- package/package.json +31 -31
- package/types.d.ts +1 -1
package/configurations.js
CHANGED
|
@@ -17,7 +17,7 @@ const configurations = exports.configurations = {
|
|
|
17
17
|
if (!tenant) {
|
|
18
18
|
throw new _error.default(`Missing "tenant" parameter when trying to create Elasticsearch index name.`, "TENANT_ERROR");
|
|
19
19
|
}
|
|
20
|
-
const sharedIndex =
|
|
20
|
+
const sharedIndex = (0, _apiElasticsearch.isSharedElasticsearchIndex)();
|
|
21
21
|
const tenantId = sharedIndex ? "root" : tenant;
|
|
22
22
|
let localeCode = null;
|
|
23
23
|
if (process.env.WEBINY_ELASTICSEARCH_INDEX_LOCALE === "true") {
|
|
@@ -27,7 +27,7 @@ const configurations = exports.configurations = {
|
|
|
27
27
|
localeCode = locale;
|
|
28
28
|
}
|
|
29
29
|
const index = [tenantId, localeCode, "page-builder"].filter(Boolean).join("-").toLowerCase();
|
|
30
|
-
const prefix =
|
|
30
|
+
const prefix = (0, _apiElasticsearch.getElasticsearchIndexPrefix)();
|
|
31
31
|
if (!prefix) {
|
|
32
32
|
return {
|
|
33
33
|
index
|
package/configurations.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_error","_interopRequireDefault","require","_apiElasticsearch","_plugins","configurations","exports","es","params","tenant","locale","WebinyError","sharedIndex","
|
|
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 { PbContext } from \"~/types\";\nimport { 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,CAChB,4EAA2E,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,CAChB,4EAA2E,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":[]}
|
|
@@ -4,7 +4,7 @@ import { DataLoaderInterface } from "../../types";
|
|
|
4
4
|
interface Params {
|
|
5
5
|
entity: Entity<any>;
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
type DataLoaderGetItem = Pick<BlockCategory, "slug" | "tenant" | "locale">;
|
|
8
8
|
export declare class BlockCategoryDataLoader implements DataLoaderInterface {
|
|
9
9
|
private _getDataLoader;
|
|
10
10
|
private readonly entity;
|
|
@@ -4,7 +4,7 @@ import { DataLoaderInterface } from "../../types";
|
|
|
4
4
|
interface Params {
|
|
5
5
|
entity: Entity<any>;
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
type DataLoaderGetItem = Pick<Category, "slug" | "tenant" | "locale">;
|
|
8
8
|
export declare class CategoryDataLoader implements DataLoaderInterface {
|
|
9
9
|
private _getDataLoader;
|
|
10
10
|
private readonly entity;
|
|
@@ -4,7 +4,7 @@ import { DataLoaderInterface } from "../../types";
|
|
|
4
4
|
interface Params {
|
|
5
5
|
entity: Entity<any>;
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
type DataLoaderGetItem = Pick<PageBlock, "id" | "tenant" | "locale">;
|
|
8
8
|
export declare class PageBlockDataLoader implements DataLoaderInterface {
|
|
9
9
|
private _getDataLoader;
|
|
10
10
|
private readonly entity;
|
|
@@ -4,7 +4,7 @@ import { DataLoaderInterface } from "../../types";
|
|
|
4
4
|
interface Params {
|
|
5
5
|
entity: Entity<any>;
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
type DataLoaderGetItem = Pick<PageTemplate, "id" | "tenant" | "locale">;
|
|
8
8
|
export declare class PageTemplateDataLoader implements DataLoaderInterface {
|
|
9
9
|
private _getDataLoader;
|
|
10
10
|
private readonly entity;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PageTemplate } from "@webiny/api-page-builder/types";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type PrimaryPKParams = Pick<PageTemplate, "id" | "tenant" | "locale">;
|
|
3
|
+
export type GSI1Params = Pick<PageTemplate, "tenant" | "locale">;
|
|
4
4
|
export declare const createPrimaryPK: ({ id, tenant, locale }: PrimaryPKParams) => string;
|
|
5
5
|
export declare const createGSI1PK: ({ tenant, locale }: GSI1Params) => string;
|
|
@@ -123,7 +123,7 @@ const createElasticsearchQuery = params => {
|
|
|
123
123
|
*
|
|
124
124
|
* When ES index is shared between tenants, we need to filter records by tenant ID.
|
|
125
125
|
*/
|
|
126
|
-
const sharedIndex =
|
|
126
|
+
const sharedIndex = (0, _apiElasticsearch.isSharedElasticsearchIndex)();
|
|
127
127
|
if (sharedIndex) {
|
|
128
128
|
const tenant = initialWhere.tenant;
|
|
129
129
|
query.must.push({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_error","_interopRequireDefault","require","_apiElasticsearch","_PageElasticsearchFieldPlugin","_PageElasticsearchSortModifierPlugin","_PageElasticsearchQueryModifierPlugin","_PageElasticsearchBodyModifierPlugin","createInitialQueryValue","args","where","query","must","must_not","should","filter","published","push","term","latest","WebinyError","createElasticsearchQuery","params","plugins","initialWhere","fieldPlugins","operatorPlugins","getElasticsearchOperatorPluginsByLocale","locale","tags_in","tags","tags_rule","tagsRule","Array","isArray","length","terms","bool","map","tag","search","query_string","allow_leading_wildcard","fields","sharedIndex","process","env","ELASTICSEARCH_SHARED_INDEXES","tenant","applyWhere","operators","createElasticsearchQueryBody","limit","initialLimit","sort","initialSort","after","byType","PageElasticsearchFieldPlugin","type","reduce","acc","plugin","field","createLimit","createSort","queryModifiers","PageElasticsearchQueryModifierPlugin","modifyQuery","sortModifiers","PageElasticsearchSortModifierPlugin","modifySort","body","constant_score","size","search_after","decodeCursor","bodyModifiers","PageElasticsearchBodyModifierPlugin","modifyBody","exports"],"sources":["elasticsearchQueryBody.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { SearchBody as esSearchBody } from \"elastic-ts\";\nimport {\n applyWhere,\n createLimit,\n createSort,\n decodeCursor,\n getElasticsearchOperatorPluginsByLocale\n} from \"@webiny/api-elasticsearch\";\nimport { ElasticsearchBoolQueryConfig } from \"@webiny/api-elasticsearch/types\";\nimport { PageStorageOperationsListWhere } from \"@webiny/api-page-builder/types\";\nimport { PageElasticsearchFieldPlugin } from \"~/plugins/definitions/PageElasticsearchFieldPlugin\";\nimport { PageElasticsearchSortModifierPlugin } from \"~/plugins/definitions/PageElasticsearchSortModifierPlugin\";\nimport { PageElasticsearchQueryModifierPlugin } from \"~/plugins/definitions/PageElasticsearchQueryModifierPlugin\";\nimport { PageElasticsearchBodyModifierPlugin } from \"~/plugins/definitions/PageElasticsearchBodyModifierPlugin\";\nimport { PluginsContainer } from \"@webiny/plugins\";\n\ninterface CreateElasticsearchQueryArgs {\n where: PageStorageOperationsListWhere;\n}\n\n/**\n * Latest and published are specific in Elasticsearch to that extend that they are tagged in the published or latest property.\n * We allow either published or either latest.\n * Latest is used in the manage API and published in the read API.\n */\nconst createInitialQueryValue = (\n args: CreateElasticsearchQueryArgs\n): ElasticsearchBoolQueryConfig => {\n const { where } = args;\n\n const query: ElasticsearchBoolQueryConfig = {\n must: [],\n must_not: [],\n should: [],\n filter: []\n };\n\n /**\n * We must transform published and latest where args into something that is understandable by our Elasticsearch\n */\n if (where.published === true) {\n query.must.push({\n term: {\n published: true\n }\n });\n } else if (where.latest === true) {\n query.must.push({\n term: {\n latest: true\n }\n });\n }\n // we do not allow not published and not latest\n else if (where.published === false) {\n throw new WebinyError(\n `Cannot call Elasticsearch query with \"published\" set at false.`,\n \"ELASTICSEARCH_UNSUPPORTED_QUERY\",\n {\n where\n }\n );\n } else if (where.latest === false) {\n throw new WebinyError(\n `Cannot call Elasticsearch query with \"latest\" set at false.`,\n \"ELASTICSEARCH_UNSUPPORTED_QUERY\",\n {\n where\n }\n );\n }\n delete where.published;\n delete where.latest;\n //\n return query;\n};\n\ninterface CreateElasticsearchBodyParams {\n plugins: PluginsContainer;\n where: PageStorageOperationsListWhere;\n limit: number;\n after: string | null;\n sort: string[];\n fieldPlugins: Record<string, PageElasticsearchFieldPlugin>;\n}\n\nconst createElasticsearchQuery = (params: CreateElasticsearchBodyParams) => {\n const { plugins, where: initialWhere, fieldPlugins } = params;\n const query = createInitialQueryValue({\n where: initialWhere\n });\n /**\n * Be aware that, if having more registered operator plugins of same type, the last one will be used.\n */\n const operatorPlugins = getElasticsearchOperatorPluginsByLocale(plugins, initialWhere.locale);\n\n const where: Partial<PageStorageOperationsListWhere> = {\n ...initialWhere\n };\n /**\n * Tags are specific so extract them and remove from where.\n */\n const { tags_in: tags, tags_rule: tagsRule } = initialWhere;\n delete where[\"tags_in\"];\n delete where[\"tags_rule\"];\n if (tags && Array.isArray(tags) === true && tags.length > 0) {\n if (tagsRule === \"any\") {\n query.filter.push({\n terms: {\n \"tags.keyword\": tags\n }\n });\n } else {\n query.filter.push({\n bool: {\n must: tags.map(tag => {\n return {\n term: {\n \"tags.keyword\": tag\n }\n };\n })\n }\n });\n }\n }\n /**\n * Specific search parameter\n */\n if (where.search) {\n query.must.push({\n query_string: {\n query: `*${where.search}*`,\n allow_leading_wildcard: true,\n fields: [\"titleLC\", \"snippet\"]\n }\n });\n }\n delete where.search;\n\n /**\n * !!! IMPORTANT !!! There are few specific cases where we hardcode the query conditions.\n *\n * When ES index is shared between tenants, we need to filter records by tenant ID.\n */\n const sharedIndex = process.env.ELASTICSEARCH_SHARED_INDEXES === \"true\";\n if (sharedIndex) {\n const tenant = initialWhere.tenant;\n query.must.push({ term: { \"tenant.keyword\": tenant } });\n /**\n * Remove so it is not applied again later.\n * Possibly tenant is not defined, but just in case, remove it.\n */\n delete where[\"tenant\"];\n }\n /**\n * We apply other conditions as they are passed via the where value.\n */\n applyWhere({\n query,\n where,\n fields: fieldPlugins,\n operators: operatorPlugins\n });\n\n return query;\n};\n\nexport const createElasticsearchQueryBody = (\n params: Omit<CreateElasticsearchBodyParams, \"fieldPlugins\">\n): esSearchBody & Pick<Required<esSearchBody>, \"sort\"> => {\n const { plugins, where, limit: initialLimit, sort: initialSort, after } = params;\n\n const fieldPlugins = plugins\n .byType<PageElasticsearchFieldPlugin>(PageElasticsearchFieldPlugin.type)\n .reduce((acc, plugin) => {\n acc[plugin.field] = plugin;\n return acc;\n }, {} as Record<string, PageElasticsearchFieldPlugin>);\n\n const limit = createLimit(initialLimit, 100);\n\n const query = createElasticsearchQuery({\n ...params,\n fieldPlugins\n });\n\n const sort = createSort({\n sort: initialSort,\n fieldPlugins\n });\n\n const queryModifiers = plugins.byType<PageElasticsearchQueryModifierPlugin>(\n PageElasticsearchQueryModifierPlugin.type\n );\n for (const plugin of queryModifiers) {\n plugin.modifyQuery({\n query,\n where,\n sort,\n limit\n });\n }\n\n const sortModifiers = plugins.byType<PageElasticsearchSortModifierPlugin>(\n PageElasticsearchSortModifierPlugin.type\n );\n for (const plugin of sortModifiers) {\n plugin.modifySort({\n sort,\n where\n });\n }\n\n const body = {\n query: {\n constant_score: {\n filter: {\n bool: {\n ...query\n }\n }\n }\n },\n size: limit + 1,\n search_after: decodeCursor(after),\n sort\n };\n\n const bodyModifiers = plugins.byType<PageElasticsearchBodyModifierPlugin>(\n PageElasticsearchBodyModifierPlugin.type\n );\n for (const plugin of bodyModifiers) {\n plugin.modifyBody({\n body,\n where\n });\n }\n\n return body;\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAD,OAAA;AASA,IAAAE,6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,IACzC,CAAC;EACD,KAAK,MAAMG,MAAM,IAAII,cAAc,EAAE;IACjCJ,MAAM,CAACM,WAAW,CAAC;MACfzD,KAAK;MACLD,KAAK;MACL4C,IAAI;MACJF;IACJ,CAAC,CAAC;EACN;EAEA,MAAMiB,aAAa,GAAG9C,OAAO,CAACkC,MAAM,CAChCa,wEAAmC,CAACX,IACxC,CAAC;EACD,KAAK,MAAMG,MAAM,IAAIO,aAAa,EAAE;IAChCP,MAAM,CAACS,UAAU,CAAC;MACdjB,IAAI;MACJ5C;IACJ,CAAC,CAAC;EACN;EAEA,MAAM8D,IAAI,GAAG;IACT7D,KAAK,EAAE;MACH8D,cAAc,EAAE;QACZ1D,MAAM,EAAE;UACJsB,IAAI,EAAE;YACF,GAAG1B;UACP;QACJ;MACJ;IACJ,CAAC;IACD+D,IAAI,EAAEtB,KAAK,GAAG,CAAC;IACfuB,YAAY,EAAE,IAAAC,8BAAY,EAACpB,KAAK,CAAC;IACjCF;EACJ,CAAC;EAED,MAAMuB,aAAa,GAAGtD,OAAO,CAACkC,MAAM,CAChCqB,wEAAmC,CAACnB,IACxC,CAAC;EACD,KAAK,MAAMG,MAAM,IAAIe,aAAa,EAAE;IAChCf,MAAM,CAACiB,UAAU,CAAC;MACdP,IAAI;MACJ9D;IACJ,CAAC,CAAC;EACN;EAEA,OAAO8D,IAAI;AACf,CAAC;AAACQ,OAAA,CAAA7B,4BAAA,GAAAA,4BAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_error","_interopRequireDefault","require","_apiElasticsearch","_PageElasticsearchFieldPlugin","_PageElasticsearchSortModifierPlugin","_PageElasticsearchQueryModifierPlugin","_PageElasticsearchBodyModifierPlugin","createInitialQueryValue","args","where","query","must","must_not","should","filter","published","push","term","latest","WebinyError","createElasticsearchQuery","params","plugins","initialWhere","fieldPlugins","operatorPlugins","getElasticsearchOperatorPluginsByLocale","locale","tags_in","tags","tags_rule","tagsRule","Array","isArray","length","terms","bool","map","tag","search","query_string","allow_leading_wildcard","fields","sharedIndex","isSharedElasticsearchIndex","tenant","applyWhere","operators","createElasticsearchQueryBody","limit","initialLimit","sort","initialSort","after","byType","PageElasticsearchFieldPlugin","type","reduce","acc","plugin","field","createLimit","createSort","queryModifiers","PageElasticsearchQueryModifierPlugin","modifyQuery","sortModifiers","PageElasticsearchSortModifierPlugin","modifySort","body","constant_score","size","search_after","decodeCursor","bodyModifiers","PageElasticsearchBodyModifierPlugin","modifyBody","exports"],"sources":["elasticsearchQueryBody.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { SearchBody as esSearchBody } from \"elastic-ts\";\nimport {\n applyWhere,\n createLimit,\n createSort,\n decodeCursor,\n getElasticsearchOperatorPluginsByLocale,\n isSharedElasticsearchIndex\n} from \"@webiny/api-elasticsearch\";\nimport { ElasticsearchBoolQueryConfig } from \"@webiny/api-elasticsearch/types\";\nimport { PageStorageOperationsListWhere } from \"@webiny/api-page-builder/types\";\nimport { PageElasticsearchFieldPlugin } from \"~/plugins/definitions/PageElasticsearchFieldPlugin\";\nimport { PageElasticsearchSortModifierPlugin } from \"~/plugins/definitions/PageElasticsearchSortModifierPlugin\";\nimport { PageElasticsearchQueryModifierPlugin } from \"~/plugins/definitions/PageElasticsearchQueryModifierPlugin\";\nimport { PageElasticsearchBodyModifierPlugin } from \"~/plugins/definitions/PageElasticsearchBodyModifierPlugin\";\nimport { PluginsContainer } from \"@webiny/plugins\";\n\ninterface CreateElasticsearchQueryArgs {\n where: PageStorageOperationsListWhere;\n}\n\n/**\n * Latest and published are specific in Elasticsearch to that extend that they are tagged in the published or latest property.\n * We allow either published or either latest.\n * Latest is used in the manage API and published in the read API.\n */\nconst createInitialQueryValue = (\n args: CreateElasticsearchQueryArgs\n): ElasticsearchBoolQueryConfig => {\n const { where } = args;\n\n const query: ElasticsearchBoolQueryConfig = {\n must: [],\n must_not: [],\n should: [],\n filter: []\n };\n\n /**\n * We must transform published and latest where args into something that is understandable by our Elasticsearch\n */\n if (where.published === true) {\n query.must.push({\n term: {\n published: true\n }\n });\n } else if (where.latest === true) {\n query.must.push({\n term: {\n latest: true\n }\n });\n }\n // we do not allow not published and not latest\n else if (where.published === false) {\n throw new WebinyError(\n `Cannot call Elasticsearch query with \"published\" set at false.`,\n \"ELASTICSEARCH_UNSUPPORTED_QUERY\",\n {\n where\n }\n );\n } else if (where.latest === false) {\n throw new WebinyError(\n `Cannot call Elasticsearch query with \"latest\" set at false.`,\n \"ELASTICSEARCH_UNSUPPORTED_QUERY\",\n {\n where\n }\n );\n }\n delete where.published;\n delete where.latest;\n //\n return query;\n};\n\ninterface CreateElasticsearchBodyParams {\n plugins: PluginsContainer;\n where: PageStorageOperationsListWhere;\n limit: number;\n after: string | null;\n sort: string[];\n fieldPlugins: Record<string, PageElasticsearchFieldPlugin>;\n}\n\nconst createElasticsearchQuery = (params: CreateElasticsearchBodyParams) => {\n const { plugins, where: initialWhere, fieldPlugins } = params;\n const query = createInitialQueryValue({\n where: initialWhere\n });\n /**\n * Be aware that, if having more registered operator plugins of same type, the last one will be used.\n */\n const operatorPlugins = getElasticsearchOperatorPluginsByLocale(plugins, initialWhere.locale);\n\n const where: Partial<PageStorageOperationsListWhere> = {\n ...initialWhere\n };\n /**\n * Tags are specific so extract them and remove from where.\n */\n const { tags_in: tags, tags_rule: tagsRule } = initialWhere;\n delete where[\"tags_in\"];\n delete where[\"tags_rule\"];\n if (tags && Array.isArray(tags) === true && tags.length > 0) {\n if (tagsRule === \"any\") {\n query.filter.push({\n terms: {\n \"tags.keyword\": tags\n }\n });\n } else {\n query.filter.push({\n bool: {\n must: tags.map(tag => {\n return {\n term: {\n \"tags.keyword\": tag\n }\n };\n })\n }\n });\n }\n }\n /**\n * Specific search parameter\n */\n if (where.search) {\n query.must.push({\n query_string: {\n query: `*${where.search}*`,\n allow_leading_wildcard: true,\n fields: [\"titleLC\", \"snippet\"]\n }\n });\n }\n delete where.search;\n\n /**\n * !!! IMPORTANT !!! There are few specific cases where we hardcode the query conditions.\n *\n * When ES index is shared between tenants, we need to filter records by tenant ID.\n */\n const sharedIndex = isSharedElasticsearchIndex();\n if (sharedIndex) {\n const tenant = initialWhere.tenant;\n query.must.push({ term: { \"tenant.keyword\": tenant } });\n /**\n * Remove so it is not applied again later.\n * Possibly tenant is not defined, but just in case, remove it.\n */\n delete where[\"tenant\"];\n }\n /**\n * We apply other conditions as they are passed via the where value.\n */\n applyWhere({\n query,\n where,\n fields: fieldPlugins,\n operators: operatorPlugins\n });\n\n return query;\n};\n\nexport const createElasticsearchQueryBody = (\n params: Omit<CreateElasticsearchBodyParams, \"fieldPlugins\">\n): esSearchBody & Pick<Required<esSearchBody>, \"sort\"> => {\n const { plugins, where, limit: initialLimit, sort: initialSort, after } = params;\n\n const fieldPlugins = plugins\n .byType<PageElasticsearchFieldPlugin>(PageElasticsearchFieldPlugin.type)\n .reduce((acc, plugin) => {\n acc[plugin.field] = plugin;\n return acc;\n }, {} as Record<string, PageElasticsearchFieldPlugin>);\n\n const limit = createLimit(initialLimit, 100);\n\n const query = createElasticsearchQuery({\n ...params,\n fieldPlugins\n });\n\n const sort = createSort({\n sort: initialSort,\n fieldPlugins\n });\n\n const queryModifiers = plugins.byType<PageElasticsearchQueryModifierPlugin>(\n PageElasticsearchQueryModifierPlugin.type\n );\n for (const plugin of queryModifiers) {\n plugin.modifyQuery({\n query,\n where,\n sort,\n limit\n });\n }\n\n const sortModifiers = plugins.byType<PageElasticsearchSortModifierPlugin>(\n PageElasticsearchSortModifierPlugin.type\n );\n for (const plugin of sortModifiers) {\n plugin.modifySort({\n sort,\n where\n });\n }\n\n const body = {\n query: {\n constant_score: {\n filter: {\n bool: {\n ...query\n }\n }\n }\n },\n size: limit + 1,\n search_after: decodeCursor(after),\n sort\n };\n\n const bodyModifiers = plugins.byType<PageElasticsearchBodyModifierPlugin>(\n PageElasticsearchBodyModifierPlugin.type\n );\n for (const plugin of bodyModifiers) {\n plugin.modifyBody({\n body,\n where\n });\n }\n\n return body;\n};\n"],"mappings":";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J,CAAC,CAAC;EAEF,MAAMuC,cAAc,GAAGzC,OAAO,CAACgC,MAAM,CACjCU,0EAAoC,CAACR,IACzC,CAAC;EACD,KAAK,MAAMG,MAAM,IAAII,cAAc,EAAE;IACjCJ,MAAM,CAACM,WAAW,CAAC;MACfvD,KAAK;MACLD,KAAK;MACL0C,IAAI;MACJF;IACJ,CAAC,CAAC;EACN;EAEA,MAAMiB,aAAa,GAAG5C,OAAO,CAACgC,MAAM,CAChCa,wEAAmC,CAACX,IACxC,CAAC;EACD,KAAK,MAAMG,MAAM,IAAIO,aAAa,EAAE;IAChCP,MAAM,CAACS,UAAU,CAAC;MACdjB,IAAI;MACJ1C;IACJ,CAAC,CAAC;EACN;EAEA,MAAM4D,IAAI,GAAG;IACT3D,KAAK,EAAE;MACH4D,cAAc,EAAE;QACZxD,MAAM,EAAE;UACJsB,IAAI,EAAE;YACF,GAAG1B;UACP;QACJ;MACJ;IACJ,CAAC;IACD6D,IAAI,EAAEtB,KAAK,GAAG,CAAC;IACfuB,YAAY,EAAE,IAAAC,8BAAY,EAACpB,KAAK,CAAC;IACjCF;EACJ,CAAC;EAED,MAAMuB,aAAa,GAAGpD,OAAO,CAACgC,MAAM,CAChCqB,wEAAmC,CAACnB,IACxC,CAAC;EACD,KAAK,MAAMG,MAAM,IAAIe,aAAa,EAAE;IAChCf,MAAM,CAACiB,UAAU,CAAC;MACdP,IAAI;MACJ5D;IACJ,CAAC,CAAC;EACN;EAEA,OAAO4D,IAAI;AACf,CAAC;AAACQ,OAAA,CAAA7B,4BAAA,GAAAA,4BAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/api-page-builder-so-ddb-es",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.41.0-beta.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"@webiny/api-page-builder",
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@babel/runtime": "7.24.1",
|
|
26
|
-
"@webiny/api-elasticsearch": "5.
|
|
27
|
-
"@webiny/api-elasticsearch-tasks": "5.
|
|
28
|
-
"@webiny/api-page-builder": "5.
|
|
29
|
-
"@webiny/aws-sdk": "5.
|
|
30
|
-
"@webiny/db-dynamodb": "5.
|
|
31
|
-
"@webiny/error": "5.
|
|
32
|
-
"@webiny/handler-db": "5.
|
|
33
|
-
"@webiny/plugins": "5.
|
|
34
|
-
"@webiny/utils": "5.
|
|
26
|
+
"@webiny/api-elasticsearch": "5.41.0-beta.0",
|
|
27
|
+
"@webiny/api-elasticsearch-tasks": "5.41.0-beta.0",
|
|
28
|
+
"@webiny/api-page-builder": "5.41.0-beta.0",
|
|
29
|
+
"@webiny/aws-sdk": "5.41.0-beta.0",
|
|
30
|
+
"@webiny/db-dynamodb": "5.41.0-beta.0",
|
|
31
|
+
"@webiny/error": "5.41.0-beta.0",
|
|
32
|
+
"@webiny/handler-db": "5.41.0-beta.0",
|
|
33
|
+
"@webiny/plugins": "5.41.0-beta.0",
|
|
34
|
+
"@webiny/utils": "5.41.0-beta.0",
|
|
35
35
|
"dataloader": "2.2.1",
|
|
36
36
|
"elastic-ts": "0.8.0",
|
|
37
37
|
"lodash": "4.17.21"
|
|
@@ -43,31 +43,31 @@
|
|
|
43
43
|
"@babel/preset-typescript": "7.24.1",
|
|
44
44
|
"@elastic/elasticsearch": "7.12.0",
|
|
45
45
|
"@elastic/elasticsearch-mock": "0.3.0",
|
|
46
|
-
"@webiny/api": "5.
|
|
47
|
-
"@webiny/api-aco": "5.
|
|
48
|
-
"@webiny/api-dynamodb-to-elasticsearch": "5.
|
|
49
|
-
"@webiny/api-headless-cms": "5.
|
|
50
|
-
"@webiny/api-headless-cms-ddb-es": "5.
|
|
51
|
-
"@webiny/api-i18n": "5.
|
|
52
|
-
"@webiny/api-i18n-ddb": "5.
|
|
53
|
-
"@webiny/api-page-builder-aco": "5.
|
|
54
|
-
"@webiny/api-prerendering-service": "5.
|
|
55
|
-
"@webiny/api-security": "5.
|
|
56
|
-
"@webiny/api-security-so-ddb": "5.
|
|
57
|
-
"@webiny/api-tenancy": "5.
|
|
58
|
-
"@webiny/api-tenancy-so-ddb": "5.
|
|
59
|
-
"@webiny/api-wcp": "5.
|
|
60
|
-
"@webiny/cli": "5.
|
|
61
|
-
"@webiny/handler": "5.
|
|
62
|
-
"@webiny/handler-aws": "5.
|
|
63
|
-
"@webiny/handler-graphql": "5.
|
|
64
|
-
"@webiny/project-utils": "5.
|
|
46
|
+
"@webiny/api": "5.41.0-beta.0",
|
|
47
|
+
"@webiny/api-aco": "5.41.0-beta.0",
|
|
48
|
+
"@webiny/api-dynamodb-to-elasticsearch": "5.41.0-beta.0",
|
|
49
|
+
"@webiny/api-headless-cms": "5.41.0-beta.0",
|
|
50
|
+
"@webiny/api-headless-cms-ddb-es": "5.41.0-beta.0",
|
|
51
|
+
"@webiny/api-i18n": "5.41.0-beta.0",
|
|
52
|
+
"@webiny/api-i18n-ddb": "5.41.0-beta.0",
|
|
53
|
+
"@webiny/api-page-builder-aco": "5.41.0-beta.0",
|
|
54
|
+
"@webiny/api-prerendering-service": "5.41.0-beta.0",
|
|
55
|
+
"@webiny/api-security": "5.41.0-beta.0",
|
|
56
|
+
"@webiny/api-security-so-ddb": "5.41.0-beta.0",
|
|
57
|
+
"@webiny/api-tenancy": "5.41.0-beta.0",
|
|
58
|
+
"@webiny/api-tenancy-so-ddb": "5.41.0-beta.0",
|
|
59
|
+
"@webiny/api-wcp": "5.41.0-beta.0",
|
|
60
|
+
"@webiny/cli": "5.41.0-beta.0",
|
|
61
|
+
"@webiny/handler": "5.41.0-beta.0",
|
|
62
|
+
"@webiny/handler-aws": "5.41.0-beta.0",
|
|
63
|
+
"@webiny/handler-graphql": "5.41.0-beta.0",
|
|
64
|
+
"@webiny/project-utils": "5.41.0-beta.0",
|
|
65
65
|
"graphql": "15.8.0",
|
|
66
66
|
"jest": "29.7.0",
|
|
67
67
|
"jest-dynalite": "3.6.1",
|
|
68
68
|
"rimraf": "5.0.5",
|
|
69
69
|
"ttypescript": "1.5.15",
|
|
70
|
-
"typescript": "4.
|
|
70
|
+
"typescript": "4.9.5"
|
|
71
71
|
},
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"build": "yarn webiny run build",
|
|
78
78
|
"watch": "yarn webiny run watch"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "9ce5e75fc577aa4de2cf08d5ca734b3c98fe65b6"
|
|
81
81
|
}
|
package/types.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { PluginCollection } from "@webiny/plugins/types";
|
|
|
6
6
|
import { TableConstructor } from "@webiny/db-dynamodb/toolbox";
|
|
7
7
|
import { AttributeDefinition } from "@webiny/db-dynamodb/toolbox";
|
|
8
8
|
export { PbContext };
|
|
9
|
-
export
|
|
9
|
+
export type Attributes = Record<string, AttributeDefinition>;
|
|
10
10
|
export declare enum ENTITIES {
|
|
11
11
|
SYSTEM = "PbSystem",
|
|
12
12
|
SETTINGS = "PbSettings",
|