@webiny/api-headless-cms-ddb-es 5.33.5-beta.0 → 5.34.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 +1 -1
- package/definitions/entry.js +3 -7
- package/definitions/entry.js.map +1 -1
- package/definitions/entryElasticsearch.js +3 -7
- package/definitions/entryElasticsearch.js.map +1 -1
- package/definitions/group.js +3 -7
- package/definitions/group.js.map +1 -1
- package/definitions/model.js +8 -7
- package/definitions/model.js.map +1 -1
- package/definitions/settings.js +3 -7
- package/definitions/settings.js.map +1 -1
- package/definitions/system.js +3 -7
- package/definitions/system.js.map +1 -1
- package/dynamoDb/index.d.ts +1 -1
- package/dynamoDb/storage/date.d.ts +2 -1
- package/dynamoDb/storage/date.js +1 -1
- package/dynamoDb/storage/date.js.map +1 -1
- package/dynamoDb/storage/longText.d.ts +1 -1
- package/dynamoDb/storage/longText.js +8 -1
- package/dynamoDb/storage/longText.js.map +1 -1
- package/dynamoDb/storage/richText.d.ts +1 -1
- package/dynamoDb/storage/richText.js +1 -1
- package/elasticsearch/createElasticsearchIndex.js +1 -1
- package/elasticsearch/index.js +1 -1
- package/elasticsearch/indexing/index.js +1 -1
- package/elasticsearch/indexing/longTextIndexing.d.ts +4 -0
- package/elasticsearch/indexing/longTextIndexing.js +20 -4
- package/elasticsearch/indexing/longTextIndexing.js.map +1 -1
- package/elasticsearch/search/refSearch.js +4 -2
- package/elasticsearch/search/refSearch.js.map +1 -1
- package/helpers/entryIndexHelpers.js +6 -11
- package/helpers/entryIndexHelpers.js.map +1 -1
- package/helpers/index.d.ts +0 -1
- package/helpers/index.js +0 -13
- package/helpers/index.js.map +1 -1
- package/index.js +17 -10
- package/index.js.map +1 -1
- package/operations/entry/dataLoaders.js +7 -9
- package/operations/entry/dataLoaders.js.map +1 -1
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.d.ts +18 -0
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js +34 -0
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js.map +1 -0
- package/operations/entry/elasticsearch/body.d.ts +13 -0
- package/operations/entry/elasticsearch/body.js +162 -0
- package/operations/entry/elasticsearch/body.js.map +1 -0
- package/operations/entry/elasticsearch/fields.d.ts +9 -0
- package/operations/entry/elasticsearch/fields.js +248 -0
- package/operations/entry/elasticsearch/fields.js.map +1 -0
- package/operations/entry/elasticsearch/filtering/applyFiltering.d.ts +8 -0
- package/operations/entry/elasticsearch/filtering/applyFiltering.js +66 -0
- package/operations/entry/elasticsearch/filtering/applyFiltering.js.map +1 -0
- package/operations/entry/elasticsearch/filtering/exec.d.ts +17 -0
- package/operations/entry/elasticsearch/filtering/exec.js +215 -0
- package/operations/entry/elasticsearch/filtering/exec.js.map +1 -0
- package/operations/entry/elasticsearch/filtering/index.d.ts +1 -0
- package/operations/entry/elasticsearch/filtering/index.js +18 -0
- package/operations/entry/elasticsearch/filtering/index.js.map +1 -0
- package/operations/entry/elasticsearch/filtering/path.d.ts +15 -0
- package/operations/entry/elasticsearch/filtering/path.js +52 -0
- package/operations/entry/elasticsearch/filtering/path.js.map +1 -0
- package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.d.ts +2 -0
- package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js +35 -0
- package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js.map +1 -0
- package/operations/entry/elasticsearch/filtering/plugins/index.d.ts +1 -0
- package/operations/entry/elasticsearch/filtering/plugins/index.js +18 -0
- package/operations/entry/elasticsearch/filtering/plugins/index.js.map +1 -0
- package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.d.ts +2 -0
- package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js +78 -0
- package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js.map +1 -0
- package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.d.ts +2 -0
- package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js +58 -0
- package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js.map +1 -0
- package/operations/entry/elasticsearch/filtering/populated.d.ts +2 -0
- package/operations/entry/elasticsearch/filtering/populated.js +30 -0
- package/operations/entry/elasticsearch/filtering/populated.js.map +1 -0
- package/operations/entry/elasticsearch/filtering/values.d.ts +2 -0
- package/operations/entry/elasticsearch/filtering/values.js +28 -0
- package/operations/entry/elasticsearch/filtering/values.js.map +1 -0
- package/operations/entry/elasticsearch/fullTextSearch.d.ts +9 -0
- package/operations/entry/elasticsearch/fullTextSearch.js +34 -0
- package/operations/entry/elasticsearch/fullTextSearch.js.map +1 -0
- package/operations/entry/elasticsearch/fullTextSearchFields.d.ts +8 -0
- package/operations/entry/elasticsearch/fullTextSearchFields.js +52 -0
- package/operations/entry/elasticsearch/fullTextSearchFields.js.map +1 -0
- package/operations/entry/elasticsearch/initialQuery.d.ts +17 -0
- package/operations/entry/elasticsearch/initialQuery.js +117 -0
- package/operations/entry/elasticsearch/initialQuery.js.map +1 -0
- package/operations/entry/elasticsearch/keyword.d.ts +2 -0
- package/operations/entry/elasticsearch/keyword.js +38 -0
- package/operations/entry/elasticsearch/keyword.js.map +1 -0
- package/operations/entry/elasticsearch/plugins/bodyModifier.d.ts +9 -0
- package/operations/entry/elasticsearch/plugins/bodyModifier.js +19 -0
- package/operations/entry/elasticsearch/plugins/bodyModifier.js.map +1 -0
- package/operations/entry/elasticsearch/plugins/operator.d.ts +8 -0
- package/operations/entry/elasticsearch/plugins/operator.js +45 -0
- package/operations/entry/elasticsearch/plugins/operator.js.map +1 -0
- package/operations/entry/elasticsearch/plugins/queryModifier.d.ts +9 -0
- package/operations/entry/elasticsearch/plugins/queryModifier.js +19 -0
- package/operations/entry/elasticsearch/plugins/queryModifier.js.map +1 -0
- package/operations/entry/elasticsearch/plugins/search.d.ts +7 -0
- package/{helpers/searchPluginsList.js → operations/entry/elasticsearch/plugins/search.js} +9 -5
- package/operations/entry/elasticsearch/plugins/search.js.map +1 -0
- package/operations/entry/elasticsearch/plugins/sortModifier.d.ts +9 -0
- package/operations/entry/elasticsearch/plugins/sortModifier.js +19 -0
- package/operations/entry/elasticsearch/plugins/sortModifier.js.map +1 -0
- package/operations/entry/elasticsearch/sort.d.ts +12 -0
- package/operations/entry/elasticsearch/sort.js +92 -0
- package/operations/entry/elasticsearch/sort.js.map +1 -0
- package/operations/entry/elasticsearch/transformValueForSearch.d.ts +16 -0
- package/{helpers → operations/entry/elasticsearch}/transformValueForSearch.js +8 -3
- package/operations/entry/elasticsearch/transformValueForSearch.js.map +1 -0
- package/operations/entry/elasticsearch/types.d.ts +41 -0
- package/operations/entry/elasticsearch/types.js +5 -0
- package/operations/entry/elasticsearch/types.js.map +1 -0
- package/operations/entry/elasticsearchFields.js +3 -0
- package/operations/entry/elasticsearchFields.js.map +1 -1
- package/operations/entry/index.d.ts +0 -2
- package/operations/entry/index.js +100 -310
- package/operations/entry/index.js.map +1 -1
- package/operations/entry/recordType.d.ts +3 -0
- package/operations/entry/recordType.js +24 -0
- package/operations/entry/recordType.js.map +1 -0
- package/operations/group/index.js +7 -12
- package/operations/group/index.js.map +1 -1
- package/operations/model/index.js +4 -8
- package/operations/model/index.js.map +1 -1
- package/operations/settings/index.js +6 -10
- package/operations/settings/index.js.map +1 -1
- package/operations/system/index.js +4 -8
- package/operations/system/index.js.map +1 -1
- package/package.json +18 -19
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +1 -1
- package/plugins/CmsEntryElasticsearchFieldPlugin.js +1 -1
- package/plugins/CmsEntryElasticsearchIndexPlugin.js +1 -1
- package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js +1 -1
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +1 -1
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +1 -1
- package/plugins/CmsEntryFilterPlugin.d.ts +49 -0
- package/plugins/CmsEntryFilterPlugin.js +31 -0
- package/plugins/CmsEntryFilterPlugin.js.map +1 -0
- package/helpers/createElasticsearchQueryBody.d.ts +0 -11
- package/helpers/createElasticsearchQueryBody.js +0 -618
- package/helpers/createElasticsearchQueryBody.js.map +0 -1
- package/helpers/fields.d.ts +0 -19
- package/helpers/fields.js +0 -196
- package/helpers/fields.js.map +0 -1
- package/helpers/searchPluginsList.d.ts +0 -6
- package/helpers/searchPluginsList.js.map +0 -1
- package/helpers/transformValueForSearch.d.ts +0 -12
- package/helpers/transformValueForSearch.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createElasticsearchSort","params","sort","modelFields","plugins","length","searchPlugins","createSearchPluginList","createFieldPath","createFieldPathFactory","fieldIdToStorageIdIdMap","sortPlugins","Object","values","reduce","field","parents","fieldId","storageId","path","key","value","keyword","CmsEntryElasticsearchFieldPlugin","unmappedType","hasKeyword","sortable","isSortable","searchable","isSearchable","transformedSort","map","matched","match","order","filter","Boolean","createSort","fieldPlugins"],"sources":["sort.ts"],"sourcesContent":["import { Sort as esSort } from \"@webiny/api-elasticsearch/types\";\nimport { CmsEntryElasticsearchFieldPlugin } from \"~/plugins\";\nimport { createSort } from \"@webiny/api-elasticsearch\";\nimport { PluginsContainer } from \"@webiny/plugins\";\nimport { CmsEntryListSort, CmsModel } from \"@webiny/api-headless-cms/types\";\nimport { ModelFields } from \"./types\";\nimport { hasKeyword } from \"~/operations/entry/elasticsearch/keyword\";\nimport { createSearchPluginList } from \"~/operations/entry/elasticsearch/plugins/search\";\nimport { createFieldPathFactory } from \"~/operations/entry/elasticsearch/filtering/path\";\n\ninterface Params {\n plugins: PluginsContainer;\n sort?: CmsEntryListSort;\n modelFields: ModelFields;\n model: CmsModel;\n}\nexport const createElasticsearchSort = (params: Params): esSort => {\n const { sort, modelFields, plugins } = params;\n\n if (!sort || sort.length === 0) {\n return [];\n }\n\n const searchPlugins = createSearchPluginList({\n plugins\n });\n\n const createFieldPath = createFieldPathFactory({\n plugins: searchPlugins\n });\n\n const fieldIdToStorageIdIdMap: Record<string, string> = {};\n\n const sortPlugins = Object.values(modelFields).reduce<\n Record<string, CmsEntryElasticsearchFieldPlugin>\n >((plugins, field) => {\n /**\n * We do not support sorting by nested fields.\n */\n if (field.parents.length > 0) {\n return plugins;\n }\n const { fieldId, storageId } = field.field;\n\n fieldIdToStorageIdIdMap[fieldId] = fieldId;\n\n const { path } = createFieldPath({\n key: storageId,\n field,\n value: \"\",\n keyword: false\n });\n /**\n * Plugins must be stored with fieldId as key because it is later used to find the sorting plugin.\n */\n plugins[fieldId] = new CmsEntryElasticsearchFieldPlugin({\n unmappedType: field.unmappedType,\n keyword: hasKeyword(field),\n sortable: field.isSortable,\n searchable: field.isSearchable,\n field: fieldId,\n path\n });\n return plugins;\n }, {});\n\n const transformedSort = sort\n .map(value => {\n const matched = value.match(/^([a-zA-Z-0-9_]+)_(ASC|DESC)$/);\n if (!matched) {\n return null;\n }\n const [, fieldId, order] = matched;\n if (fieldIdToStorageIdIdMap[fieldId]) {\n return `${fieldIdToStorageIdIdMap[fieldId]}_${order}`;\n }\n\n return value;\n })\n .filter(Boolean) as string[];\n return createSort({\n fieldPlugins: sortPlugins,\n sort: transformedSort\n });\n};\n"],"mappings":";;;;;;;AACA;;AACA;;AAIA;;AACA;;AACA;;AAQO,MAAMA,uBAAuB,GAAIC,MAAD,IAA4B;EAC/D,MAAM;IAAEC,IAAF;IAAQC,WAAR;IAAqBC;EAArB,IAAiCH,MAAvC;;EAEA,IAAI,CAACC,IAAD,IAASA,IAAI,CAACG,MAAL,KAAgB,CAA7B,EAAgC;IAC5B,OAAO,EAAP;EACH;;EAED,MAAMC,aAAa,GAAG,IAAAC,8BAAA,EAAuB;IACzCH;EADyC,CAAvB,CAAtB;EAIA,MAAMI,eAAe,GAAG,IAAAC,4BAAA,EAAuB;IAC3CL,OAAO,EAAEE;EADkC,CAAvB,CAAxB;EAIA,MAAMI,uBAA+C,GAAG,EAAxD;EAEA,MAAMC,WAAW,GAAGC,MAAM,CAACC,MAAP,CAAcV,WAAd,EAA2BW,MAA3B,CAElB,CAACV,OAAD,EAAUW,KAAV,KAAoB;IAClB;AACR;AACA;IACQ,IAAIA,KAAK,CAACC,OAAN,CAAcX,MAAd,GAAuB,CAA3B,EAA8B;MAC1B,OAAOD,OAAP;IACH;;IACD,MAAM;MAAEa,OAAF;MAAWC;IAAX,IAAyBH,KAAK,CAACA,KAArC;IAEAL,uBAAuB,CAACO,OAAD,CAAvB,GAAmCA,OAAnC;IAEA,MAAM;MAAEE;IAAF,IAAWX,eAAe,CAAC;MAC7BY,GAAG,EAAEF,SADwB;MAE7BH,KAF6B;MAG7BM,KAAK,EAAE,EAHsB;MAI7BC,OAAO,EAAE;IAJoB,CAAD,CAAhC;IAMA;AACR;AACA;;IACQlB,OAAO,CAACa,OAAD,CAAP,GAAmB,IAAIM,yCAAJ,CAAqC;MACpDC,YAAY,EAAET,KAAK,CAACS,YADgC;MAEpDF,OAAO,EAAE,IAAAG,mBAAA,EAAWV,KAAX,CAF2C;MAGpDW,QAAQ,EAAEX,KAAK,CAACY,UAHoC;MAIpDC,UAAU,EAAEb,KAAK,CAACc,YAJkC;MAKpDd,KAAK,EAAEE,OAL6C;MAMpDE;IANoD,CAArC,CAAnB;IAQA,OAAOf,OAAP;EACH,CA/BmB,EA+BjB,EA/BiB,CAApB;EAiCA,MAAM0B,eAAe,GAAG5B,IAAI,CACvB6B,GADmB,CACfV,KAAK,IAAI;IACV,MAAMW,OAAO,GAAGX,KAAK,CAACY,KAAN,CAAY,+BAAZ,CAAhB;;IACA,IAAI,CAACD,OAAL,EAAc;MACV,OAAO,IAAP;IACH;;IACD,MAAM,GAAGf,OAAH,EAAYiB,KAAZ,IAAqBF,OAA3B;;IACA,IAAItB,uBAAuB,CAACO,OAAD,CAA3B,EAAsC;MAClC,OAAQ,GAAEP,uBAAuB,CAACO,OAAD,CAAU,IAAGiB,KAAM,EAApD;IACH;;IAED,OAAOb,KAAP;EACH,CAZmB,EAanBc,MAbmB,CAaZC,OAbY,CAAxB;EAcA,OAAO,IAAAC,4BAAA,EAAW;IACdC,YAAY,EAAE3B,WADA;IAEdT,IAAI,EAAE4B;EAFQ,CAAX,CAAP;AAIH,CApEM"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* We use any for input and output because they really can be anything.
|
|
3
|
+
* Plugin, if exists, makes sure that response value is correct.
|
|
4
|
+
*/
|
|
5
|
+
import { CmsModelField } from "@webiny/api-headless-cms/types";
|
|
6
|
+
import { ElasticsearchQuerySearchValuePlugins } from "./types";
|
|
7
|
+
interface Params {
|
|
8
|
+
plugins: ElasticsearchQuerySearchValuePlugins;
|
|
9
|
+
field: CmsModelField;
|
|
10
|
+
value: any;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Transformed value can be anything.
|
|
14
|
+
*/
|
|
15
|
+
export declare const transformValueForSearch: (params: Params) => any;
|
|
16
|
+
export {};
|
|
@@ -6,14 +6,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.transformValueForSearch = void 0;
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* We use any for input and output because they really can be anything.
|
|
10
|
+
* Plugin, if exists, makes sure that response value is correct.
|
|
10
11
|
*/
|
|
11
|
-
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Transformed value can be anything.
|
|
15
|
+
*/
|
|
16
|
+
const transformValueForSearch = params => {
|
|
12
17
|
const {
|
|
13
18
|
field,
|
|
14
19
|
plugins,
|
|
15
20
|
value
|
|
16
|
-
} =
|
|
21
|
+
} = params;
|
|
17
22
|
const plugin = plugins[field.type];
|
|
18
23
|
|
|
19
24
|
if (!plugin) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["transformValueForSearch","params","field","plugins","value","plugin","type","transform"],"sources":["transformValueForSearch.ts"],"sourcesContent":["/**\n * We use any for input and output because they really can be anything.\n * Plugin, if exists, makes sure that response value is correct.\n */\nimport { CmsModelField } from \"@webiny/api-headless-cms/types\";\nimport { ElasticsearchQuerySearchValuePlugins } from \"./types\";\n\ninterface Params {\n plugins: ElasticsearchQuerySearchValuePlugins;\n field: CmsModelField;\n value: any;\n}\n\n/**\n * Transformed value can be anything.\n */\nexport const transformValueForSearch = (params: Params): any => {\n const { field, plugins, value } = params;\n const plugin = plugins[field.type];\n if (!plugin) {\n return value;\n }\n return plugin.transform({ field, value });\n};\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACO,MAAMA,uBAAuB,GAAIC,MAAD,IAAyB;EAC5D,MAAM;IAAEC,KAAF;IAASC,OAAT;IAAkBC;EAAlB,IAA4BH,MAAlC;EACA,MAAMI,MAAM,GAAGF,OAAO,CAACD,KAAK,CAACI,IAAP,CAAtB;;EACA,IAAI,CAACD,MAAL,EAAa;IACT,OAAOD,KAAP;EACH;;EACD,OAAOC,MAAM,CAACE,SAAP,CAAiB;IAAEL,KAAF;IAASE;EAAT,CAAjB,CAAP;AACH,CAPM"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { CmsEntryElasticsearchQueryBuilderValueSearchPlugin } from "../../../plugins";
|
|
2
|
+
import { ElasticsearchQueryBuilderOperatorPlugin } from "@webiny/api-elasticsearch";
|
|
3
|
+
import { CmsModelField } from "@webiny/api-headless-cms/types";
|
|
4
|
+
/**
|
|
5
|
+
* ./fields
|
|
6
|
+
*/
|
|
7
|
+
declare type ModelFieldPath = string | ((value: string) => string);
|
|
8
|
+
export declare type FieldType = "text" | "date" | "datetime" | "time" | "number" | "boolean" | string;
|
|
9
|
+
export interface ModelFieldParent {
|
|
10
|
+
fieldId: string;
|
|
11
|
+
storageId: string;
|
|
12
|
+
type: FieldType;
|
|
13
|
+
}
|
|
14
|
+
export interface ModelField {
|
|
15
|
+
unmappedType?: string;
|
|
16
|
+
keyword?: boolean;
|
|
17
|
+
isSearchable: boolean;
|
|
18
|
+
isSortable: boolean;
|
|
19
|
+
type: FieldType;
|
|
20
|
+
isSystemField?: boolean;
|
|
21
|
+
field: CmsModelField;
|
|
22
|
+
path?: ModelFieldPath;
|
|
23
|
+
fullTextSearch?: boolean;
|
|
24
|
+
parents: ModelFieldParent[];
|
|
25
|
+
}
|
|
26
|
+
export interface ModelFields {
|
|
27
|
+
[fieldId: string]: ModelField;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* ./plugins/operator
|
|
31
|
+
*/
|
|
32
|
+
export interface ElasticsearchQueryBuilderOperatorPlugins {
|
|
33
|
+
[key: string]: ElasticsearchQueryBuilderOperatorPlugin;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* ./plugins/search
|
|
37
|
+
*/
|
|
38
|
+
export interface ElasticsearchQuerySearchValuePlugins {
|
|
39
|
+
[fieldType: string]: CmsEntryElasticsearchQueryBuilderValueSearchPlugin;
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import { CmsEntryElasticsearchQueryBuilderValueSearchPlugin } from \"~/plugins\";\nimport { ElasticsearchQueryBuilderOperatorPlugin } from \"@webiny/api-elasticsearch\";\nimport { CmsModelField } from \"@webiny/api-headless-cms/types\";\n\n/**\n * ./fields\n */\ntype ModelFieldPath = string | ((value: string) => string);\n\nexport type FieldType = \"text\" | \"date\" | \"datetime\" | \"time\" | \"number\" | \"boolean\" | string;\n\nexport interface ModelFieldParent {\n fieldId: string;\n storageId: string;\n type: FieldType;\n}\nexport interface ModelField {\n unmappedType?: string;\n keyword?: boolean;\n isSearchable: boolean;\n isSortable: boolean;\n type: FieldType;\n isSystemField?: boolean;\n field: CmsModelField;\n path?: ModelFieldPath;\n fullTextSearch?: boolean;\n parents: ModelFieldParent[];\n}\n\nexport interface ModelFields {\n [fieldId: string]: ModelField;\n}\n\n/**\n * ./plugins/operator\n */\nexport interface ElasticsearchQueryBuilderOperatorPlugins {\n [key: string]: ElasticsearchQueryBuilderOperatorPlugin;\n}\n/**\n * ./plugins/search\n */\nexport interface ElasticsearchQuerySearchValuePlugins {\n [fieldType: string]: CmsEntryElasticsearchQueryBuilderValueSearchPlugin;\n}\n"],"mappings":""}
|
|
@@ -25,6 +25,9 @@ const elasticsearchFields = [new _CmsEntryElasticsearchFieldPlugin.CmsEntryElast
|
|
|
25
25
|
}), new _CmsEntryElasticsearchFieldPlugin.CmsEntryElasticsearchFieldPlugin({
|
|
26
26
|
field: "version",
|
|
27
27
|
path: "version"
|
|
28
|
+
}), new _CmsEntryElasticsearchFieldPlugin.CmsEntryElasticsearchFieldPlugin({
|
|
29
|
+
field: "status",
|
|
30
|
+
path: "status"
|
|
28
31
|
}),
|
|
29
32
|
/**
|
|
30
33
|
* Always add the ALL fields plugin because of the keyword/path build.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["elasticsearchFields","CmsEntryElasticsearchFieldPlugin","field","unmappedType","path","ALL"],"sources":["elasticsearchFields.ts"],"sourcesContent":["import { CmsEntryElasticsearchFieldPlugin } from \"~/plugins/CmsEntryElasticsearchFieldPlugin\";\n\nexport const elasticsearchFields = [\n new CmsEntryElasticsearchFieldPlugin({\n field: \"createdOn\",\n unmappedType: \"date\"\n }),\n new CmsEntryElasticsearchFieldPlugin({\n field: \"savedOn\",\n unmappedType: \"date\"\n }),\n new CmsEntryElasticsearchFieldPlugin({\n field: \"publishedOn\",\n unmappedType: \"date\"\n }),\n new CmsEntryElasticsearchFieldPlugin({\n field: \"ownedBy\",\n path: \"ownedBy.id\"\n }),\n new CmsEntryElasticsearchFieldPlugin({\n field: \"createdBy\",\n path: \"createdBy.id\"\n }),\n new CmsEntryElasticsearchFieldPlugin({\n field: \"version\",\n path: \"version\"\n }),\n /**\n * Always add the ALL fields plugin because of the keyword/path build.\n */\n new CmsEntryElasticsearchFieldPlugin({\n field: CmsEntryElasticsearchFieldPlugin.ALL\n })\n];\n"],"mappings":";;;;;;;AAAA;;AAEO,MAAMA,mBAAmB,GAAG,CAC/B,IAAIC,kEAAJ,CAAqC;EACjCC,KAAK,EAAE,WAD0B;EAEjCC,YAAY,EAAE;AAFmB,CAArC,CAD+B,EAK/B,IAAIF,kEAAJ,CAAqC;EACjCC,KAAK,EAAE,SAD0B;EAEjCC,YAAY,EAAE;AAFmB,CAArC,CAL+B,EAS/B,IAAIF,kEAAJ,CAAqC;EACjCC,KAAK,EAAE,aAD0B;EAEjCC,YAAY,EAAE;AAFmB,CAArC,CAT+B,EAa/B,IAAIF,kEAAJ,CAAqC;EACjCC,KAAK,EAAE,SAD0B;EAEjCE,IAAI,EAAE;AAF2B,CAArC,CAb+B,EAiB/B,IAAIH,kEAAJ,CAAqC;EACjCC,KAAK,EAAE,WAD0B;EAEjCE,IAAI,EAAE;AAF2B,CAArC,CAjB+B,EAqB/B,IAAIH,kEAAJ,CAAqC;EACjCC,KAAK,EAAE,SAD0B;EAEjCE,IAAI,EAAE;AAF2B,CAArC,CArB+B;
|
|
1
|
+
{"version":3,"names":["elasticsearchFields","CmsEntryElasticsearchFieldPlugin","field","unmappedType","path","ALL"],"sources":["elasticsearchFields.ts"],"sourcesContent":["import { CmsEntryElasticsearchFieldPlugin } from \"~/plugins/CmsEntryElasticsearchFieldPlugin\";\n\nexport const elasticsearchFields = [\n new CmsEntryElasticsearchFieldPlugin({\n field: \"createdOn\",\n unmappedType: \"date\"\n }),\n new CmsEntryElasticsearchFieldPlugin({\n field: \"savedOn\",\n unmappedType: \"date\"\n }),\n new CmsEntryElasticsearchFieldPlugin({\n field: \"publishedOn\",\n unmappedType: \"date\"\n }),\n new CmsEntryElasticsearchFieldPlugin({\n field: \"ownedBy\",\n path: \"ownedBy.id\"\n }),\n new CmsEntryElasticsearchFieldPlugin({\n field: \"createdBy\",\n path: \"createdBy.id\"\n }),\n new CmsEntryElasticsearchFieldPlugin({\n field: \"version\",\n path: \"version\"\n }),\n new CmsEntryElasticsearchFieldPlugin({\n field: \"status\",\n path: \"status\"\n }),\n /**\n * Always add the ALL fields plugin because of the keyword/path build.\n */\n new CmsEntryElasticsearchFieldPlugin({\n field: CmsEntryElasticsearchFieldPlugin.ALL\n })\n];\n"],"mappings":";;;;;;;AAAA;;AAEO,MAAMA,mBAAmB,GAAG,CAC/B,IAAIC,kEAAJ,CAAqC;EACjCC,KAAK,EAAE,WAD0B;EAEjCC,YAAY,EAAE;AAFmB,CAArC,CAD+B,EAK/B,IAAIF,kEAAJ,CAAqC;EACjCC,KAAK,EAAE,SAD0B;EAEjCC,YAAY,EAAE;AAFmB,CAArC,CAL+B,EAS/B,IAAIF,kEAAJ,CAAqC;EACjCC,KAAK,EAAE,aAD0B;EAEjCC,YAAY,EAAE;AAFmB,CAArC,CAT+B,EAa/B,IAAIF,kEAAJ,CAAqC;EACjCC,KAAK,EAAE,SAD0B;EAEjCE,IAAI,EAAE;AAF2B,CAArC,CAb+B,EAiB/B,IAAIH,kEAAJ,CAAqC;EACjCC,KAAK,EAAE,WAD0B;EAEjCE,IAAI,EAAE;AAF2B,CAArC,CAjB+B,EAqB/B,IAAIH,kEAAJ,CAAqC;EACjCC,KAAK,EAAE,SAD0B;EAEjCE,IAAI,EAAE;AAF2B,CAArC,CArB+B,EAyB/B,IAAIH,kEAAJ,CAAqC;EACjCC,KAAK,EAAE,QAD0B;EAEjCE,IAAI,EAAE;AAF2B,CAArC,CAzB+B;AA6B/B;AACJ;AACA;AACI,IAAIH,kEAAJ,CAAqC;EACjCC,KAAK,EAAED,kEAAA,CAAiCI;AADP,CAArC,CAhC+B,CAA5B"}
|
|
@@ -2,8 +2,6 @@ import { CmsEntryStorageOperations } from "@webiny/api-headless-cms/types";
|
|
|
2
2
|
import { Entity } from "dynamodb-toolbox";
|
|
3
3
|
import { Client } from "@elastic/elasticsearch";
|
|
4
4
|
import { PluginsContainer } from "@webiny/plugins";
|
|
5
|
-
export declare const createLatestType: () => string;
|
|
6
|
-
export declare const createPublishedType: () => string;
|
|
7
5
|
export interface CreateEntriesStorageOperationsParams {
|
|
8
6
|
entity: Entity<any>;
|
|
9
7
|
esEntity: Entity<any>;
|