@webiny/api-headless-cms-ddb-es 5.34.8 → 5.35.0-beta.1
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 +1 -1
- package/configurations.js +0 -8
- package/configurations.js.map +1 -1
- package/definitions/entry.js +3 -5
- package/definitions/entry.js.map +1 -1
- package/definitions/entryElasticsearch.js +0 -5
- package/definitions/entryElasticsearch.js.map +1 -1
- package/definitions/group.js +0 -5
- package/definitions/group.js.map +1 -1
- package/definitions/model.js +17 -5
- package/definitions/model.js.map +1 -1
- package/definitions/settings.js +0 -5
- package/definitions/settings.js.map +1 -1
- package/definitions/system.js +0 -5
- package/definitions/system.js.map +1 -1
- package/definitions/table.js +0 -3
- package/definitions/table.js.map +1 -1
- package/definitions/tableElasticsearch.js +0 -3
- package/definitions/tableElasticsearch.js.map +1 -1
- package/dynamoDb/index.js +0 -5
- package/dynamoDb/index.js.map +1 -1
- package/dynamoDb/storage/date.js +1 -16
- package/dynamoDb/storage/date.js.map +1 -1
- package/dynamoDb/storage/longText.js +1 -18
- package/dynamoDb/storage/longText.js.map +1 -1
- package/dynamoDb/storage/richText.js +0 -24
- package/dynamoDb/storage/richText.js.map +1 -1
- package/elasticsearch/createElasticsearchIndex.js +0 -11
- package/elasticsearch/createElasticsearchIndex.js.map +1 -1
- package/elasticsearch/deleteElasticsearchIndex.js +0 -7
- package/elasticsearch/deleteElasticsearchIndex.js.map +1 -1
- package/elasticsearch/index.js +0 -5
- package/elasticsearch/index.js.map +1 -1
- package/elasticsearch/indexing/dateTimeIndexing.js +4 -21
- package/elasticsearch/indexing/dateTimeIndexing.js.map +1 -1
- package/elasticsearch/indexing/defaultFieldIndexing.js +5 -11
- package/elasticsearch/indexing/defaultFieldIndexing.js.map +1 -1
- package/elasticsearch/indexing/index.js +0 -9
- package/elasticsearch/indexing/index.js.map +1 -1
- package/elasticsearch/indexing/longTextIndexing.js +2 -14
- package/elasticsearch/indexing/longTextIndexing.js.map +1 -1
- package/elasticsearch/indexing/numberIndexing.js +0 -9
- package/elasticsearch/indexing/numberIndexing.js.map +1 -1
- package/elasticsearch/indexing/objectIndexing.js +3 -30
- package/elasticsearch/indexing/objectIndexing.js.map +1 -1
- package/elasticsearch/indexing/richTextIndexing.js +0 -5
- package/elasticsearch/indexing/richTextIndexing.js.map +1 -1
- package/elasticsearch/indices/base.js +0 -3
- package/elasticsearch/indices/base.js.map +1 -1
- package/elasticsearch/indices/index.js +0 -4
- package/elasticsearch/indices/index.js.map +1 -1
- package/elasticsearch/indices/japanese.js +0 -3
- package/elasticsearch/indices/japanese.js.map +1 -1
- package/elasticsearch/search/index.js +0 -4
- package/elasticsearch/search/index.js.map +1 -1
- package/elasticsearch/search/refSearch.js +0 -6
- package/elasticsearch/search/refSearch.js.map +1 -1
- package/elasticsearch/search/timeSearch.js +0 -7
- package/elasticsearch/search/timeSearch.js.map +1 -1
- package/helpers/entryIndexHelpers.js +20 -49
- package/helpers/entryIndexHelpers.js.map +1 -1
- package/helpers/index.js +0 -2
- package/helpers/index.js.map +1 -1
- package/index.js +7 -44
- package/index.js.map +1 -1
- package/operations/entry/dataLoaders.js +0 -52
- package/operations/entry/dataLoaders.js.map +1 -1
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js +1 -3
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js.map +1 -1
- package/operations/entry/elasticsearch/body.js +2 -26
- package/operations/entry/elasticsearch/body.js.map +1 -1
- package/operations/entry/elasticsearch/fields.d.ts +5 -4
- package/operations/entry/elasticsearch/fields.js +73 -60
- package/operations/entry/elasticsearch/fields.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/applyFiltering.js +1 -10
- package/operations/entry/elasticsearch/filtering/applyFiltering.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/exec.js +9 -52
- package/operations/entry/elasticsearch/filtering/exec.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/index.js +0 -2
- package/operations/entry/elasticsearch/filtering/index.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/path.js +1 -9
- package/operations/entry/elasticsearch/filtering/path.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js +1 -8
- package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/plugins/index.js +0 -5
- package/operations/entry/elasticsearch/filtering/plugins/index.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js +0 -13
- package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js +0 -10
- package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/populated.js +0 -7
- package/operations/entry/elasticsearch/filtering/populated.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/values.js +0 -6
- package/operations/entry/elasticsearch/filtering/values.js.map +1 -1
- package/operations/entry/elasticsearch/fullTextSearch.js +0 -13
- package/operations/entry/elasticsearch/fullTextSearch.js.map +1 -1
- package/operations/entry/elasticsearch/fullTextSearchFields.js +0 -6
- package/operations/entry/elasticsearch/fullTextSearchFields.js.map +1 -1
- package/operations/entry/elasticsearch/initialQuery.js +5 -19
- package/operations/entry/elasticsearch/initialQuery.js.map +1 -1
- package/operations/entry/elasticsearch/keyword.js +0 -4
- package/operations/entry/elasticsearch/keyword.js.map +1 -1
- package/operations/entry/elasticsearch/plugins/bodyModifier.js +0 -3
- package/operations/entry/elasticsearch/plugins/bodyModifier.js.map +1 -1
- package/operations/entry/elasticsearch/plugins/operator.js +0 -8
- package/operations/entry/elasticsearch/plugins/operator.js.map +1 -1
- package/operations/entry/elasticsearch/plugins/queryModifier.js +0 -3
- package/operations/entry/elasticsearch/plugins/queryModifier.js.map +1 -1
- package/operations/entry/elasticsearch/plugins/search.js +0 -6
- package/operations/entry/elasticsearch/plugins/search.js.map +1 -1
- package/operations/entry/elasticsearch/plugins/sortModifier.js +0 -3
- package/operations/entry/elasticsearch/plugins/sortModifier.js.map +1 -1
- package/operations/entry/elasticsearch/sort.js +5 -21
- package/operations/entry/elasticsearch/sort.js.map +1 -1
- package/operations/entry/elasticsearch/transformValueForSearch.js +0 -4
- package/operations/entry/elasticsearch/transformValueForSearch.js.map +1 -1
- package/operations/entry/elasticsearch/types.d.ts +3 -3
- package/operations/entry/elasticsearch/types.js.map +1 -1
- package/operations/entry/index.js +54 -147
- package/operations/entry/index.js.map +1 -1
- package/operations/entry/keys.js +0 -9
- package/operations/entry/keys.js.map +1 -1
- package/operations/entry/recordType.js +0 -6
- package/operations/entry/recordType.js.map +1 -1
- package/operations/group/index.js +2 -32
- package/operations/group/index.js.map +1 -1
- package/operations/model/index.js +1 -34
- package/operations/model/index.js.map +1 -1
- package/operations/settings/index.js +0 -24
- package/operations/settings/index.js.map +1 -1
- package/operations/system/index.js +0 -17
- package/operations/system/index.js.map +1 -1
- package/package.json +23 -16
- package/plugins/CmsElasticsearchModelFieldPlugin.d.ts +69 -0
- package/plugins/CmsElasticsearchModelFieldPlugin.js +48 -0
- package/plugins/CmsElasticsearchModelFieldPlugin.js.map +1 -0
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +0 -8
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js.map +1 -1
- package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js +0 -10
- package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js.map +1 -1
- package/plugins/CmsEntryElasticsearchIndexPlugin.js +0 -5
- package/plugins/CmsEntryElasticsearchIndexPlugin.js.map +1 -1
- package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js +0 -12
- package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js.map +1 -1
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +0 -8
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js.map +1 -1
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +0 -8
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.js.map +1 -1
- package/plugins/CmsEntryFilterPlugin.js +0 -7
- package/plugins/CmsEntryFilterPlugin.js.map +1 -1
- package/plugins/index.d.ts +1 -1
- package/plugins/index.js +11 -25
- package/plugins/index.js.map +1 -1
- package/types.d.ts +1 -1
- package/types.js +0 -5
- package/types.js.map +1 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Plugin } from "@webiny/plugins";
|
|
2
|
+
import { CmsModelFieldType } from "@webiny/api-headless-cms/types";
|
|
3
|
+
/**
|
|
4
|
+
* A plugin which allows you to map a custom GraphQL field to an Elasticsearch field.
|
|
5
|
+
*
|
|
6
|
+
* This is useful when you want to create a custom field in the CMS GraphQL Schema, and you want to map it to an Elasticsearch field.
|
|
7
|
+
*/
|
|
8
|
+
export interface CmsModelFieldPluginParams {
|
|
9
|
+
/**
|
|
10
|
+
* The type of the field.
|
|
11
|
+
* Can be something custom, like "my-field-type".
|
|
12
|
+
*/
|
|
13
|
+
fieldType: CmsModelFieldType;
|
|
14
|
+
/**
|
|
15
|
+
* The ID of the field on the GraphQL side
|
|
16
|
+
*/
|
|
17
|
+
fieldId: string;
|
|
18
|
+
/**
|
|
19
|
+
* The path to the field in the Elasticsearch document.
|
|
20
|
+
*/
|
|
21
|
+
path: string;
|
|
22
|
+
/**
|
|
23
|
+
* If the field should be applied only to specific models.
|
|
24
|
+
* Or excluded from the specific models.
|
|
25
|
+
*
|
|
26
|
+
* The default is to apply to all models.
|
|
27
|
+
*/
|
|
28
|
+
models?: {
|
|
29
|
+
include?: string[];
|
|
30
|
+
exclude?: string[];
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* The unmapped type of the field.
|
|
34
|
+
* In most cases, this will be undefined.
|
|
35
|
+
* When does it need to be set?
|
|
36
|
+
*
|
|
37
|
+
* When you are using a custom field type, other than the ones that are defined in the CMS.
|
|
38
|
+
* Let's say you create a field of type `my-field-type`, in which you want to store dates. By the default, it will, in most cases be set as string - if you did not specify the value transformer.
|
|
39
|
+
* If you want to be able to sort/filter properly by this field, you need to specify the unmapped type as "date".
|
|
40
|
+
*/
|
|
41
|
+
unmappedType?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Is this field searchable?
|
|
44
|
+
* If set to false, an error will be thrown when trying to search/filter by this field.
|
|
45
|
+
*/
|
|
46
|
+
searchable?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Is this field sortable?
|
|
49
|
+
* If set to false, an error will be thrown when trying to sort by this field.
|
|
50
|
+
*/
|
|
51
|
+
sortable?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* If the .keyword should be applied when doing the filtering or sorting on the field.
|
|
54
|
+
*/
|
|
55
|
+
keyword?: boolean;
|
|
56
|
+
}
|
|
57
|
+
export declare class CmsElasticsearchModelFieldPlugin extends Plugin {
|
|
58
|
+
static readonly type: string;
|
|
59
|
+
private readonly field;
|
|
60
|
+
get fieldType(): string;
|
|
61
|
+
get fieldId(): string;
|
|
62
|
+
get path(): string;
|
|
63
|
+
get unmappedType(): string | undefined;
|
|
64
|
+
get searchable(): boolean | undefined;
|
|
65
|
+
get sortable(): boolean | undefined;
|
|
66
|
+
get keyword(): boolean | undefined;
|
|
67
|
+
constructor(field: CmsModelFieldPluginParams);
|
|
68
|
+
canBeApplied(modelId: string): boolean;
|
|
69
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.CmsElasticsearchModelFieldPlugin = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _plugins = require("@webiny/plugins");
|
|
10
|
+
class CmsElasticsearchModelFieldPlugin extends _plugins.Plugin {
|
|
11
|
+
get fieldType() {
|
|
12
|
+
return this.field.fieldType;
|
|
13
|
+
}
|
|
14
|
+
get fieldId() {
|
|
15
|
+
return this.field.fieldId;
|
|
16
|
+
}
|
|
17
|
+
get path() {
|
|
18
|
+
return this.field.path;
|
|
19
|
+
}
|
|
20
|
+
get unmappedType() {
|
|
21
|
+
return this.field.unmappedType;
|
|
22
|
+
}
|
|
23
|
+
get searchable() {
|
|
24
|
+
return this.field.searchable;
|
|
25
|
+
}
|
|
26
|
+
get sortable() {
|
|
27
|
+
return this.field.sortable;
|
|
28
|
+
}
|
|
29
|
+
get keyword() {
|
|
30
|
+
return this.field.keyword;
|
|
31
|
+
}
|
|
32
|
+
constructor(field) {
|
|
33
|
+
super();
|
|
34
|
+
(0, _defineProperty2.default)(this, "field", void 0);
|
|
35
|
+
this.field = field;
|
|
36
|
+
}
|
|
37
|
+
canBeApplied(modelId) {
|
|
38
|
+
var _this$field$models, _this$field$models$in, _this$field$models2, _this$field$models2$e;
|
|
39
|
+
if ((_this$field$models = this.field.models) !== null && _this$field$models !== void 0 && (_this$field$models$in = _this$field$models.include) !== null && _this$field$models$in !== void 0 && _this$field$models$in.length) {
|
|
40
|
+
return this.field.models.include.includes(modelId);
|
|
41
|
+
} else if ((_this$field$models2 = this.field.models) !== null && _this$field$models2 !== void 0 && (_this$field$models2$e = _this$field$models2.exclude) !== null && _this$field$models2$e !== void 0 && _this$field$models2$e.length) {
|
|
42
|
+
return this.field.models.exclude.includes(modelId) === false;
|
|
43
|
+
}
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.CmsElasticsearchModelFieldPlugin = CmsElasticsearchModelFieldPlugin;
|
|
48
|
+
(0, _defineProperty2.default)(CmsElasticsearchModelFieldPlugin, "type", "headlessCms.elasticsearch.model.field");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CmsElasticsearchModelFieldPlugin","Plugin","fieldType","field","fieldId","path","unmappedType","searchable","sortable","keyword","constructor","canBeApplied","modelId","models","include","length","includes","exclude"],"sources":["CmsElasticsearchModelFieldPlugin.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins\";\nimport { CmsModelFieldType } from \"@webiny/api-headless-cms/types\";\n\n/**\n * A plugin which allows you to map a custom GraphQL field to an Elasticsearch field.\n *\n * This is useful when you want to create a custom field in the CMS GraphQL Schema, and you want to map it to an Elasticsearch field.\n */\nexport interface CmsModelFieldPluginParams {\n /**\n * The type of the field.\n * Can be something custom, like \"my-field-type\".\n */\n fieldType: CmsModelFieldType;\n /**\n * The ID of the field on the GraphQL side\n */\n fieldId: string;\n /**\n * The path to the field in the Elasticsearch document.\n */\n path: string;\n /**\n * If the field should be applied only to specific models.\n * Or excluded from the specific models.\n *\n * The default is to apply to all models.\n */\n models?: {\n include?: string[];\n exclude?: string[];\n };\n /**\n * The unmapped type of the field.\n * In most cases, this will be undefined.\n * When does it need to be set?\n *\n * When you are using a custom field type, other than the ones that are defined in the CMS.\n * Let's say you create a field of type `my-field-type`, in which you want to store dates. By the default, it will, in most cases be set as string - if you did not specify the value transformer.\n * If you want to be able to sort/filter properly by this field, you need to specify the unmapped type as \"date\".\n */\n unmappedType?: string;\n /**\n * Is this field searchable?\n * If set to false, an error will be thrown when trying to search/filter by this field.\n */\n searchable?: boolean;\n /**\n * Is this field sortable?\n * If set to false, an error will be thrown when trying to sort by this field.\n */\n sortable?: boolean;\n /**\n * If the .keyword should be applied when doing the filtering or sorting on the field.\n */\n keyword?: boolean;\n}\n\nexport class CmsElasticsearchModelFieldPlugin extends Plugin {\n public static override readonly type: string = \"headlessCms.elasticsearch.model.field\";\n\n private readonly field: CmsModelFieldPluginParams;\n\n public get fieldType() {\n return this.field.fieldType;\n }\n public get fieldId() {\n return this.field.fieldId;\n }\n public get path() {\n return this.field.path;\n }\n\n public get unmappedType() {\n return this.field.unmappedType;\n }\n\n public get searchable() {\n return this.field.searchable;\n }\n\n public get sortable() {\n return this.field.sortable;\n }\n\n public get keyword() {\n return this.field.keyword;\n }\n\n public constructor(field: CmsModelFieldPluginParams) {\n super();\n this.field = field;\n }\n\n public canBeApplied(modelId: string): boolean {\n if (this.field.models?.include?.length) {\n return this.field.models.include.includes(modelId);\n } else if (this.field.models?.exclude?.length) {\n return this.field.models.exclude.includes(modelId) === false;\n }\n return true;\n }\n}\n"],"mappings":";;;;;;;;AAAA;AA0DO,MAAMA,gCAAgC,SAASC,eAAM,CAAC;EAKzD,IAAWC,SAAS,GAAG;IACnB,OAAO,IAAI,CAACC,KAAK,CAACD,SAAS;EAC/B;EACA,IAAWE,OAAO,GAAG;IACjB,OAAO,IAAI,CAACD,KAAK,CAACC,OAAO;EAC7B;EACA,IAAWC,IAAI,GAAG;IACd,OAAO,IAAI,CAACF,KAAK,CAACE,IAAI;EAC1B;EAEA,IAAWC,YAAY,GAAG;IACtB,OAAO,IAAI,CAACH,KAAK,CAACG,YAAY;EAClC;EAEA,IAAWC,UAAU,GAAG;IACpB,OAAO,IAAI,CAACJ,KAAK,CAACI,UAAU;EAChC;EAEA,IAAWC,QAAQ,GAAG;IAClB,OAAO,IAAI,CAACL,KAAK,CAACK,QAAQ;EAC9B;EAEA,IAAWC,OAAO,GAAG;IACjB,OAAO,IAAI,CAACN,KAAK,CAACM,OAAO;EAC7B;EAEOC,WAAW,CAACP,KAAgC,EAAE;IACjD,KAAK,EAAE;IAAC;IACR,IAAI,CAACA,KAAK,GAAGA,KAAK;EACtB;EAEOQ,YAAY,CAACC,OAAe,EAAW;IAAA;IAC1C,0BAAI,IAAI,CAACT,KAAK,CAACU,MAAM,wEAAjB,mBAAmBC,OAAO,kDAA1B,sBAA4BC,MAAM,EAAE;MACpC,OAAO,IAAI,CAACZ,KAAK,CAACU,MAAM,CAACC,OAAO,CAACE,QAAQ,CAACJ,OAAO,CAAC;IACtD,CAAC,MAAM,2BAAI,IAAI,CAACT,KAAK,CAACU,MAAM,yEAAjB,oBAAmBI,OAAO,kDAA1B,sBAA4BF,MAAM,EAAE;MAC3C,OAAO,IAAI,CAACZ,KAAK,CAACU,MAAM,CAACI,OAAO,CAACD,QAAQ,CAACJ,OAAO,CAAC,KAAK,KAAK;IAChE;IACA,OAAO,IAAI;EACf;AACJ;AAAC;AAAA,8BA5CYZ,gCAAgC,UACM,uCAAuC"}
|
|
@@ -1,30 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.createCmsEntryElasticsearchBodyModifierPlugin = exports.CmsEntryElasticsearchBodyModifierPlugin = void 0;
|
|
9
|
-
|
|
10
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
9
|
var _apiElasticsearch = require("@webiny/api-elasticsearch");
|
|
13
|
-
|
|
14
10
|
class CmsEntryElasticsearchBodyModifierPlugin extends _apiElasticsearch.ElasticsearchBodyModifierPlugin {
|
|
15
11
|
constructor(config) {
|
|
16
12
|
super(config.modifyBody);
|
|
17
13
|
(0, _defineProperty2.default)(this, "modelId", void 0);
|
|
18
14
|
this.modelId = config.modelId;
|
|
19
15
|
}
|
|
20
|
-
|
|
21
16
|
}
|
|
22
|
-
|
|
23
17
|
exports.CmsEntryElasticsearchBodyModifierPlugin = CmsEntryElasticsearchBodyModifierPlugin;
|
|
24
18
|
(0, _defineProperty2.default)(CmsEntryElasticsearchBodyModifierPlugin, "type", "cms.elasticsearch.modifier.body.entry");
|
|
25
|
-
|
|
26
19
|
const createCmsEntryElasticsearchBodyModifierPlugin = config => {
|
|
27
20
|
return new CmsEntryElasticsearchBodyModifierPlugin(config);
|
|
28
21
|
};
|
|
29
|
-
|
|
30
22
|
exports.createCmsEntryElasticsearchBodyModifierPlugin = createCmsEntryElasticsearchBodyModifierPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryElasticsearchBodyModifierPlugin","ElasticsearchBodyModifierPlugin","constructor","config","modifyBody","modelId","createCmsEntryElasticsearchBodyModifierPlugin"],"sources":["CmsEntryElasticsearchBodyModifierPlugin.ts"],"sourcesContent":["import {\n ElasticsearchBodyModifierPlugin,\n ModifyBodyCallable,\n ModifyBodyParams as BaseModifyBodyParams\n} from \"@webiny/api-elasticsearch\";\nimport { CmsModel } from \"@webiny/api-headless-cms/types\";\n\nexport interface ModifyBodyParams extends BaseModifyBodyParams {\n model: CmsModel;\n where: {\n [key: string]: any;\n };\n}\n\nexport interface CmsEntryElasticsearchBodyModifierPluginConfig {\n modifyBody: ModifyBodyCallable<ModifyBodyParams>;\n /**\n * If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.\n */\n modelId?: string;\n}\n\nexport class CmsEntryElasticsearchBodyModifierPlugin extends ElasticsearchBodyModifierPlugin<ModifyBodyParams> {\n public static override readonly type: string = \"cms.elasticsearch.modifier.body.entry\";\n\n public readonly modelId?: string;\n\n public constructor(config: CmsEntryElasticsearchBodyModifierPluginConfig) {\n super(config.modifyBody);\n\n this.modelId = config.modelId;\n }\n}\n\nexport const createCmsEntryElasticsearchBodyModifierPlugin = (\n config: CmsEntryElasticsearchBodyModifierPluginConfig\n) => {\n return new CmsEntryElasticsearchBodyModifierPlugin(config);\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["CmsEntryElasticsearchBodyModifierPlugin","ElasticsearchBodyModifierPlugin","constructor","config","modifyBody","modelId","createCmsEntryElasticsearchBodyModifierPlugin"],"sources":["CmsEntryElasticsearchBodyModifierPlugin.ts"],"sourcesContent":["import {\n ElasticsearchBodyModifierPlugin,\n ModifyBodyCallable,\n ModifyBodyParams as BaseModifyBodyParams\n} from \"@webiny/api-elasticsearch\";\nimport { CmsModel } from \"@webiny/api-headless-cms/types\";\n\nexport interface ModifyBodyParams extends BaseModifyBodyParams {\n model: CmsModel;\n where: {\n [key: string]: any;\n };\n}\n\nexport interface CmsEntryElasticsearchBodyModifierPluginConfig {\n modifyBody: ModifyBodyCallable<ModifyBodyParams>;\n /**\n * If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.\n */\n modelId?: string;\n}\n\nexport class CmsEntryElasticsearchBodyModifierPlugin extends ElasticsearchBodyModifierPlugin<ModifyBodyParams> {\n public static override readonly type: string = \"cms.elasticsearch.modifier.body.entry\";\n\n public readonly modelId?: string;\n\n public constructor(config: CmsEntryElasticsearchBodyModifierPluginConfig) {\n super(config.modifyBody);\n\n this.modelId = config.modelId;\n }\n}\n\nexport const createCmsEntryElasticsearchBodyModifierPlugin = (\n config: CmsEntryElasticsearchBodyModifierPluginConfig\n) => {\n return new CmsEntryElasticsearchBodyModifierPlugin(config);\n};\n"],"mappings":";;;;;;;;AAAA;AAsBO,MAAMA,uCAAuC,SAASC,iDAA+B,CAAmB;EAKpGC,WAAW,CAACC,MAAqD,EAAE;IACtE,KAAK,CAACA,MAAM,CAACC,UAAU,CAAC;IAAC;IAEzB,IAAI,CAACC,OAAO,GAAGF,MAAM,CAACE,OAAO;EACjC;AACJ;AAAC;AAAA,8BAVYL,uCAAuC,UACD,uCAAuC;AAWnF,MAAMM,6CAA6C,GACtDH,MAAqD,IACpD;EACD,OAAO,IAAIH,uCAAuC,CAACG,MAAM,CAAC;AAC9D,CAAC;AAAC"}
|
|
@@ -1,38 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.createCmsEntryElasticsearchFullTextSearchPlugin = exports.CmsEntryElasticsearchFullTextSearchPlugin = void 0;
|
|
9
|
-
|
|
10
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
9
|
var _plugins = require("@webiny/plugins");
|
|
13
|
-
|
|
14
10
|
class CmsEntryElasticsearchFullTextSearchPlugin extends _plugins.Plugin {
|
|
15
11
|
get models() {
|
|
16
12
|
return this.params.models;
|
|
17
13
|
}
|
|
18
|
-
|
|
19
14
|
constructor(params) {
|
|
20
15
|
super();
|
|
21
16
|
(0, _defineProperty2.default)(this, "params", void 0);
|
|
22
17
|
this.params = params;
|
|
23
18
|
}
|
|
24
|
-
|
|
25
19
|
apply(params) {
|
|
26
20
|
return this.params.apply(params);
|
|
27
21
|
}
|
|
28
|
-
|
|
29
22
|
}
|
|
30
|
-
|
|
31
23
|
exports.CmsEntryElasticsearchFullTextSearchPlugin = CmsEntryElasticsearchFullTextSearchPlugin;
|
|
32
24
|
(0, _defineProperty2.default)(CmsEntryElasticsearchFullTextSearchPlugin, "type", "headless-cms.elasticsearch.entry.fullTextSearch");
|
|
33
|
-
|
|
34
25
|
const createCmsEntryElasticsearchFullTextSearchPlugin = params => {
|
|
35
26
|
return new CmsEntryElasticsearchFullTextSearchPlugin(params);
|
|
36
27
|
};
|
|
37
|
-
|
|
38
28
|
exports.createCmsEntryElasticsearchFullTextSearchPlugin = createCmsEntryElasticsearchFullTextSearchPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryElasticsearchFullTextSearchPlugin","Plugin","models","params","constructor","apply","createCmsEntryElasticsearchFullTextSearchPlugin"],"sources":["CmsEntryElasticsearchFullTextSearchPlugin.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins\";\nimport { ElasticsearchBoolQueryConfig } from \"@webiny/api-elasticsearch/types\";\nimport { CmsModel, CmsModelField } from \"@webiny/api-headless-cms/types\";\n\nexport interface CmsEntryElasticsearchFullTextSearchPluginCbParams {\n model: CmsModel;\n query: ElasticsearchBoolQueryConfig;\n term: string;\n fields: CmsModelField[];\n createFieldPath: (field: CmsModelField) => string;\n prepareTerm: (term: string) => string;\n}\nexport interface CmsEntryElasticsearchFullTextSearchPluginParams {\n models?: string[];\n apply: (params: CmsEntryElasticsearchFullTextSearchPluginCbParams) => void;\n}\nexport class CmsEntryElasticsearchFullTextSearchPlugin extends Plugin {\n public static override readonly type: string =\n \"headless-cms.elasticsearch.entry.fullTextSearch\";\n\n private readonly params: CmsEntryElasticsearchFullTextSearchPluginParams;\n\n public get models() {\n return this.params.models;\n }\n\n public constructor(params: CmsEntryElasticsearchFullTextSearchPluginParams) {\n super();\n this.params = params;\n }\n\n public apply(params: CmsEntryElasticsearchFullTextSearchPluginCbParams): void {\n return this.params.apply(params);\n }\n}\n\nexport const createCmsEntryElasticsearchFullTextSearchPlugin = (\n params: CmsEntryElasticsearchFullTextSearchPluginParams\n) => {\n return new CmsEntryElasticsearchFullTextSearchPlugin(params);\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["CmsEntryElasticsearchFullTextSearchPlugin","Plugin","models","params","constructor","apply","createCmsEntryElasticsearchFullTextSearchPlugin"],"sources":["CmsEntryElasticsearchFullTextSearchPlugin.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins\";\nimport { ElasticsearchBoolQueryConfig } from \"@webiny/api-elasticsearch/types\";\nimport { CmsModel, CmsModelField } from \"@webiny/api-headless-cms/types\";\n\nexport interface CmsEntryElasticsearchFullTextSearchPluginCbParams {\n model: CmsModel;\n query: ElasticsearchBoolQueryConfig;\n term: string;\n fields: CmsModelField[];\n createFieldPath: (field: CmsModelField) => string;\n prepareTerm: (term: string) => string;\n}\nexport interface CmsEntryElasticsearchFullTextSearchPluginParams {\n models?: string[];\n apply: (params: CmsEntryElasticsearchFullTextSearchPluginCbParams) => void;\n}\nexport class CmsEntryElasticsearchFullTextSearchPlugin extends Plugin {\n public static override readonly type: string =\n \"headless-cms.elasticsearch.entry.fullTextSearch\";\n\n private readonly params: CmsEntryElasticsearchFullTextSearchPluginParams;\n\n public get models() {\n return this.params.models;\n }\n\n public constructor(params: CmsEntryElasticsearchFullTextSearchPluginParams) {\n super();\n this.params = params;\n }\n\n public apply(params: CmsEntryElasticsearchFullTextSearchPluginCbParams): void {\n return this.params.apply(params);\n }\n}\n\nexport const createCmsEntryElasticsearchFullTextSearchPlugin = (\n params: CmsEntryElasticsearchFullTextSearchPluginParams\n) => {\n return new CmsEntryElasticsearchFullTextSearchPlugin(params);\n};\n"],"mappings":";;;;;;;;AAAA;AAgBO,MAAMA,yCAAyC,SAASC,eAAM,CAAC;EAMlE,IAAWC,MAAM,GAAG;IAChB,OAAO,IAAI,CAACC,MAAM,CAACD,MAAM;EAC7B;EAEOE,WAAW,CAACD,MAAuD,EAAE;IACxE,KAAK,EAAE;IAAC;IACR,IAAI,CAACA,MAAM,GAAGA,MAAM;EACxB;EAEOE,KAAK,CAACF,MAAyD,EAAQ;IAC1E,OAAO,IAAI,CAACA,MAAM,CAACE,KAAK,CAACF,MAAM,CAAC;EACpC;AACJ;AAAC;AAAA,8BAlBYH,yCAAyC,UAE9C,iDAAiD;AAkBlD,MAAMM,+CAA+C,GACxDH,MAAuD,IACtD;EACD,OAAO,IAAIH,yCAAyC,CAACG,MAAM,CAAC;AAChE,CAAC;AAAC"}
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.CmsEntryElasticsearchIndexPlugin = void 0;
|
|
9
|
-
|
|
10
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
9
|
var _apiElasticsearch = require("@webiny/api-elasticsearch");
|
|
13
|
-
|
|
14
10
|
class CmsEntryElasticsearchIndexPlugin extends _apiElasticsearch.ElasticsearchIndexPlugin {}
|
|
15
|
-
|
|
16
11
|
exports.CmsEntryElasticsearchIndexPlugin = CmsEntryElasticsearchIndexPlugin;
|
|
17
12
|
(0, _defineProperty2.default)(CmsEntryElasticsearchIndexPlugin, "type", "cms.entry.elasticsearch.index");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryElasticsearchIndexPlugin","ElasticsearchIndexPlugin"],"sources":["CmsEntryElasticsearchIndexPlugin.ts"],"sourcesContent":["import { ElasticsearchIndexPlugin } from \"@webiny/api-elasticsearch\";\n\nexport class CmsEntryElasticsearchIndexPlugin extends ElasticsearchIndexPlugin {\n public static override readonly type: string = \"cms.entry.elasticsearch.index\";\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["CmsEntryElasticsearchIndexPlugin","ElasticsearchIndexPlugin"],"sources":["CmsEntryElasticsearchIndexPlugin.ts"],"sourcesContent":["import { ElasticsearchIndexPlugin } from \"@webiny/api-elasticsearch\";\n\nexport class CmsEntryElasticsearchIndexPlugin extends ElasticsearchIndexPlugin {\n public static override readonly type: string = \"cms.entry.elasticsearch.index\";\n}\n"],"mappings":";;;;;;;;AAAA;AAEO,MAAMA,gCAAgC,SAASC,0CAAwB,CAAC;AAE9E;AAAA,8BAFYD,gCAAgC,UACM,+BAA+B"}
|
|
@@ -1,49 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.createCmsEntryElasticsearchQueryBuilderValueSearchPlugin = exports.CmsEntryElasticsearchQueryBuilderValueSearchPlugin = void 0;
|
|
9
|
-
|
|
10
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
9
|
var _Plugin = require("@webiny/plugins/Plugin");
|
|
13
|
-
|
|
14
10
|
class CmsEntryElasticsearchQueryBuilderValueSearchPlugin extends _Plugin.Plugin {
|
|
15
11
|
get fieldType() {
|
|
16
12
|
return this.config.fieldType;
|
|
17
13
|
}
|
|
18
|
-
|
|
19
14
|
constructor(params) {
|
|
20
15
|
super();
|
|
21
16
|
(0, _defineProperty2.default)(this, "config", void 0);
|
|
22
17
|
this.config = params;
|
|
23
18
|
this.name = `${this.constructor.type}-${this.config.fieldType}`;
|
|
24
19
|
}
|
|
25
|
-
|
|
26
20
|
transform(params) {
|
|
27
21
|
return this.config.transform(params);
|
|
28
22
|
}
|
|
29
|
-
|
|
30
23
|
createPath(params) {
|
|
31
24
|
if (typeof this.config.path === "function") {
|
|
32
25
|
return this.config.path(params);
|
|
33
26
|
} else if (typeof this.config.path === "string") {
|
|
34
27
|
return this.config.path;
|
|
35
28
|
}
|
|
36
|
-
|
|
37
29
|
return null;
|
|
38
30
|
}
|
|
39
|
-
|
|
40
31
|
}
|
|
41
|
-
|
|
42
32
|
exports.CmsEntryElasticsearchQueryBuilderValueSearchPlugin = CmsEntryElasticsearchQueryBuilderValueSearchPlugin;
|
|
43
33
|
(0, _defineProperty2.default)(CmsEntryElasticsearchQueryBuilderValueSearchPlugin, "type", "cms-elastic-search-query-builder-value-search");
|
|
44
|
-
|
|
45
34
|
const createCmsEntryElasticsearchQueryBuilderValueSearchPlugin = params => {
|
|
46
35
|
return new CmsEntryElasticsearchQueryBuilderValueSearchPlugin(params);
|
|
47
36
|
};
|
|
48
|
-
|
|
49
37
|
exports.createCmsEntryElasticsearchQueryBuilderValueSearchPlugin = createCmsEntryElasticsearchQueryBuilderValueSearchPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryElasticsearchQueryBuilderValueSearchPlugin","Plugin","fieldType","config","constructor","params","name","type","transform","createPath","path","createCmsEntryElasticsearchQueryBuilderValueSearchPlugin"],"sources":["CmsEntryElasticsearchQueryBuilderValueSearchPlugin.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins/Plugin\";\nimport { CmsModelField } from \"@webiny/api-headless-cms/types\";\n\nexport interface CreatePathCallableParams<T = any> {\n field: CmsModelField;\n key: string;\n value: T;\n}\n\nexport interface CreatePathCallable<T = any> {\n (params: CreatePathCallableParams<T>): string;\n}\n\nexport interface TransformCallableParams<T = any> {\n field: CmsModelField;\n value: T;\n}\nexport interface TransformCallable<T = any> {\n (params: TransformCallableParams<T>): string;\n}\n\nexport interface CmsEntryElasticsearchQueryBuilderValueSearchPluginParams {\n fieldType: string;\n path?: string | CreatePathCallable;\n transform: TransformCallable;\n}\nexport class CmsEntryElasticsearchQueryBuilderValueSearchPlugin extends Plugin {\n public static override readonly type: string = \"cms-elastic-search-query-builder-value-search\";\n\n private readonly config: CmsEntryElasticsearchQueryBuilderValueSearchPluginParams;\n\n public get fieldType(): string {\n return this.config.fieldType;\n }\n\n public constructor(params: CmsEntryElasticsearchQueryBuilderValueSearchPluginParams) {\n super();\n\n this.config = params;\n this.name = `${(this.constructor as any).type}-${this.config.fieldType}`;\n }\n\n public transform(params: TransformCallableParams): any {\n return this.config.transform(params);\n }\n\n public createPath(params: CreatePathCallableParams): string | null {\n if (typeof this.config.path === \"function\") {\n return this.config.path(params);\n } else if (typeof this.config.path === \"string\") {\n return this.config.path;\n }\n return null;\n }\n}\n\nexport const createCmsEntryElasticsearchQueryBuilderValueSearchPlugin = (\n params: CmsEntryElasticsearchQueryBuilderValueSearchPluginParams\n) => {\n return new CmsEntryElasticsearchQueryBuilderValueSearchPlugin(params);\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["CmsEntryElasticsearchQueryBuilderValueSearchPlugin","Plugin","fieldType","config","constructor","params","name","type","transform","createPath","path","createCmsEntryElasticsearchQueryBuilderValueSearchPlugin"],"sources":["CmsEntryElasticsearchQueryBuilderValueSearchPlugin.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins/Plugin\";\nimport { CmsModelField } from \"@webiny/api-headless-cms/types\";\n\nexport interface CreatePathCallableParams<T = any> {\n field: CmsModelField;\n key: string;\n value: T;\n}\n\nexport interface CreatePathCallable<T = any> {\n (params: CreatePathCallableParams<T>): string;\n}\n\nexport interface TransformCallableParams<T = any> {\n field: CmsModelField;\n value: T;\n}\nexport interface TransformCallable<T = any> {\n (params: TransformCallableParams<T>): string;\n}\n\nexport interface CmsEntryElasticsearchQueryBuilderValueSearchPluginParams {\n fieldType: string;\n path?: string | CreatePathCallable;\n transform: TransformCallable;\n}\nexport class CmsEntryElasticsearchQueryBuilderValueSearchPlugin extends Plugin {\n public static override readonly type: string = \"cms-elastic-search-query-builder-value-search\";\n\n private readonly config: CmsEntryElasticsearchQueryBuilderValueSearchPluginParams;\n\n public get fieldType(): string {\n return this.config.fieldType;\n }\n\n public constructor(params: CmsEntryElasticsearchQueryBuilderValueSearchPluginParams) {\n super();\n\n this.config = params;\n this.name = `${(this.constructor as any).type}-${this.config.fieldType}`;\n }\n\n public transform(params: TransformCallableParams): any {\n return this.config.transform(params);\n }\n\n public createPath(params: CreatePathCallableParams): string | null {\n if (typeof this.config.path === \"function\") {\n return this.config.path(params);\n } else if (typeof this.config.path === \"string\") {\n return this.config.path;\n }\n return null;\n }\n}\n\nexport const createCmsEntryElasticsearchQueryBuilderValueSearchPlugin = (\n params: CmsEntryElasticsearchQueryBuilderValueSearchPluginParams\n) => {\n return new CmsEntryElasticsearchQueryBuilderValueSearchPlugin(params);\n};\n"],"mappings":";;;;;;;;AAAA;AA0BO,MAAMA,kDAAkD,SAASC,cAAM,CAAC;EAK3E,IAAWC,SAAS,GAAW;IAC3B,OAAO,IAAI,CAACC,MAAM,CAACD,SAAS;EAChC;EAEOE,WAAW,CAACC,MAAgE,EAAE;IACjF,KAAK,EAAE;IAAC;IAER,IAAI,CAACF,MAAM,GAAGE,MAAM;IACpB,IAAI,CAACC,IAAI,GAAI,GAAG,IAAI,CAACF,WAAW,CAASG,IAAK,IAAG,IAAI,CAACJ,MAAM,CAACD,SAAU,EAAC;EAC5E;EAEOM,SAAS,CAACH,MAA+B,EAAO;IACnD,OAAO,IAAI,CAACF,MAAM,CAACK,SAAS,CAACH,MAAM,CAAC;EACxC;EAEOI,UAAU,CAACJ,MAAgC,EAAiB;IAC/D,IAAI,OAAO,IAAI,CAACF,MAAM,CAACO,IAAI,KAAK,UAAU,EAAE;MACxC,OAAO,IAAI,CAACP,MAAM,CAACO,IAAI,CAACL,MAAM,CAAC;IACnC,CAAC,MAAM,IAAI,OAAO,IAAI,CAACF,MAAM,CAACO,IAAI,KAAK,QAAQ,EAAE;MAC7C,OAAO,IAAI,CAACP,MAAM,CAACO,IAAI;IAC3B;IACA,OAAO,IAAI;EACf;AACJ;AAAC;AAAA,8BA5BYV,kDAAkD,UACZ,+CAA+C;AA6B3F,MAAMW,wDAAwD,GACjEN,MAAgE,IAC/D;EACD,OAAO,IAAIL,kDAAkD,CAACK,MAAM,CAAC;AACzE,CAAC;AAAC"}
|
|
@@ -1,30 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.createCmsEntryElasticsearchQueryModifierPlugin = exports.CmsEntryElasticsearchQueryModifierPlugin = void 0;
|
|
9
|
-
|
|
10
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
9
|
var _apiElasticsearch = require("@webiny/api-elasticsearch");
|
|
13
|
-
|
|
14
10
|
class CmsEntryElasticsearchQueryModifierPlugin extends _apiElasticsearch.ElasticsearchQueryModifierPlugin {
|
|
15
11
|
constructor(config) {
|
|
16
12
|
super(config.modifyQuery);
|
|
17
13
|
(0, _defineProperty2.default)(this, "modelId", void 0);
|
|
18
14
|
this.modelId = config.modelId;
|
|
19
15
|
}
|
|
20
|
-
|
|
21
16
|
}
|
|
22
|
-
|
|
23
17
|
exports.CmsEntryElasticsearchQueryModifierPlugin = CmsEntryElasticsearchQueryModifierPlugin;
|
|
24
18
|
(0, _defineProperty2.default)(CmsEntryElasticsearchQueryModifierPlugin, "type", "cms.elasticsearch.modifier.query.entry");
|
|
25
|
-
|
|
26
19
|
const createCmsEntryElasticsearchQueryModifierPlugin = config => {
|
|
27
20
|
return new CmsEntryElasticsearchQueryModifierPlugin(config);
|
|
28
21
|
};
|
|
29
|
-
|
|
30
22
|
exports.createCmsEntryElasticsearchQueryModifierPlugin = createCmsEntryElasticsearchQueryModifierPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryElasticsearchQueryModifierPlugin","ElasticsearchQueryModifierPlugin","constructor","config","modifyQuery","modelId","createCmsEntryElasticsearchQueryModifierPlugin"],"sources":["CmsEntryElasticsearchQueryModifierPlugin.ts"],"sourcesContent":["import {\n ElasticsearchQueryModifierPlugin,\n ModifyQueryCallable,\n ModifyQueryParams as BaseModifyQueryParams\n} from \"@webiny/api-elasticsearch\";\nimport { CmsModel } from \"@webiny/api-headless-cms/types\";\n\nexport interface ModifyQueryParams extends BaseModifyQueryParams {\n model: CmsModel;\n}\n\nexport interface CmsEntryElasticsearchQueryModifierPluginConfig {\n modifyQuery: ModifyQueryCallable<ModifyQueryParams>;\n /**\n * If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.\n */\n modelId?: string;\n}\n\nexport class CmsEntryElasticsearchQueryModifierPlugin extends ElasticsearchQueryModifierPlugin<ModifyQueryParams> {\n public static override readonly type: string = \"cms.elasticsearch.modifier.query.entry\";\n\n public readonly modelId?: string;\n\n public constructor(config: CmsEntryElasticsearchQueryModifierPluginConfig) {\n super(config.modifyQuery);\n\n this.modelId = config.modelId;\n }\n}\n\nexport const createCmsEntryElasticsearchQueryModifierPlugin = (\n config: CmsEntryElasticsearchQueryModifierPluginConfig\n) => {\n return new CmsEntryElasticsearchQueryModifierPlugin(config);\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["CmsEntryElasticsearchQueryModifierPlugin","ElasticsearchQueryModifierPlugin","constructor","config","modifyQuery","modelId","createCmsEntryElasticsearchQueryModifierPlugin"],"sources":["CmsEntryElasticsearchQueryModifierPlugin.ts"],"sourcesContent":["import {\n ElasticsearchQueryModifierPlugin,\n ModifyQueryCallable,\n ModifyQueryParams as BaseModifyQueryParams\n} from \"@webiny/api-elasticsearch\";\nimport { CmsModel } from \"@webiny/api-headless-cms/types\";\n\nexport interface ModifyQueryParams extends BaseModifyQueryParams {\n model: CmsModel;\n}\n\nexport interface CmsEntryElasticsearchQueryModifierPluginConfig {\n modifyQuery: ModifyQueryCallable<ModifyQueryParams>;\n /**\n * If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.\n */\n modelId?: string;\n}\n\nexport class CmsEntryElasticsearchQueryModifierPlugin extends ElasticsearchQueryModifierPlugin<ModifyQueryParams> {\n public static override readonly type: string = \"cms.elasticsearch.modifier.query.entry\";\n\n public readonly modelId?: string;\n\n public constructor(config: CmsEntryElasticsearchQueryModifierPluginConfig) {\n super(config.modifyQuery);\n\n this.modelId = config.modelId;\n }\n}\n\nexport const createCmsEntryElasticsearchQueryModifierPlugin = (\n config: CmsEntryElasticsearchQueryModifierPluginConfig\n) => {\n return new CmsEntryElasticsearchQueryModifierPlugin(config);\n};\n"],"mappings":";;;;;;;;AAAA;AAmBO,MAAMA,wCAAwC,SAASC,kDAAgC,CAAoB;EAKvGC,WAAW,CAACC,MAAsD,EAAE;IACvE,KAAK,CAACA,MAAM,CAACC,WAAW,CAAC;IAAC;IAE1B,IAAI,CAACC,OAAO,GAAGF,MAAM,CAACE,OAAO;EACjC;AACJ;AAAC;AAAA,8BAVYL,wCAAwC,UACF,wCAAwC;AAWpF,MAAMM,8CAA8C,GACvDH,MAAsD,IACrD;EACD,OAAO,IAAIH,wCAAwC,CAACG,MAAM,CAAC;AAC/D,CAAC;AAAC"}
|
|
@@ -1,30 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.createCmsEntryElasticsearchSortModifierPlugin = exports.CmsEntryElasticsearchSortModifierPlugin = void 0;
|
|
9
|
-
|
|
10
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
9
|
var _apiElasticsearch = require("@webiny/api-elasticsearch");
|
|
13
|
-
|
|
14
10
|
class CmsEntryElasticsearchSortModifierPlugin extends _apiElasticsearch.ElasticsearchSortModifierPlugin {
|
|
15
11
|
constructor(config) {
|
|
16
12
|
super(config.modifySort);
|
|
17
13
|
(0, _defineProperty2.default)(this, "modelId", void 0);
|
|
18
14
|
this.modelId = config.modelId;
|
|
19
15
|
}
|
|
20
|
-
|
|
21
16
|
}
|
|
22
|
-
|
|
23
17
|
exports.CmsEntryElasticsearchSortModifierPlugin = CmsEntryElasticsearchSortModifierPlugin;
|
|
24
18
|
(0, _defineProperty2.default)(CmsEntryElasticsearchSortModifierPlugin, "type", "cms.elasticsearch.modifier.sort.entry");
|
|
25
|
-
|
|
26
19
|
const createCmsEntryElasticsearchSortModifierPlugin = config => {
|
|
27
20
|
return new CmsEntryElasticsearchSortModifierPlugin(config);
|
|
28
21
|
};
|
|
29
|
-
|
|
30
22
|
exports.createCmsEntryElasticsearchSortModifierPlugin = createCmsEntryElasticsearchSortModifierPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryElasticsearchSortModifierPlugin","ElasticsearchSortModifierPlugin","constructor","config","modifySort","modelId","createCmsEntryElasticsearchSortModifierPlugin"],"sources":["CmsEntryElasticsearchSortModifierPlugin.ts"],"sourcesContent":["import {\n ElasticsearchSortModifierPlugin,\n ModifySortCallable,\n ModifySortParams as BaseModifySortParams\n} from \"@webiny/api-elasticsearch\";\nimport { CmsModel } from \"@webiny/api-headless-cms/types\";\n\nexport interface ModifySortParams extends BaseModifySortParams {\n model: CmsModel;\n}\n\nexport interface CmsEntryElasticsearchSortModifierPluginConfig {\n modifySort: ModifySortCallable<ModifySortParams>;\n /**\n * If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.\n */\n modelId?: string;\n}\n\nexport class CmsEntryElasticsearchSortModifierPlugin extends ElasticsearchSortModifierPlugin<ModifySortParams> {\n public static override readonly type: string = \"cms.elasticsearch.modifier.sort.entry\";\n\n public readonly modelId?: string;\n\n public constructor(config: CmsEntryElasticsearchSortModifierPluginConfig) {\n super(config.modifySort);\n this.modelId = config.modelId;\n }\n}\n\nexport const createCmsEntryElasticsearchSortModifierPlugin = (\n config: CmsEntryElasticsearchSortModifierPluginConfig\n) => {\n return new CmsEntryElasticsearchSortModifierPlugin(config);\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["CmsEntryElasticsearchSortModifierPlugin","ElasticsearchSortModifierPlugin","constructor","config","modifySort","modelId","createCmsEntryElasticsearchSortModifierPlugin"],"sources":["CmsEntryElasticsearchSortModifierPlugin.ts"],"sourcesContent":["import {\n ElasticsearchSortModifierPlugin,\n ModifySortCallable,\n ModifySortParams as BaseModifySortParams\n} from \"@webiny/api-elasticsearch\";\nimport { CmsModel } from \"@webiny/api-headless-cms/types\";\n\nexport interface ModifySortParams extends BaseModifySortParams {\n model: CmsModel;\n}\n\nexport interface CmsEntryElasticsearchSortModifierPluginConfig {\n modifySort: ModifySortCallable<ModifySortParams>;\n /**\n * If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.\n */\n modelId?: string;\n}\n\nexport class CmsEntryElasticsearchSortModifierPlugin extends ElasticsearchSortModifierPlugin<ModifySortParams> {\n public static override readonly type: string = \"cms.elasticsearch.modifier.sort.entry\";\n\n public readonly modelId?: string;\n\n public constructor(config: CmsEntryElasticsearchSortModifierPluginConfig) {\n super(config.modifySort);\n this.modelId = config.modelId;\n }\n}\n\nexport const createCmsEntryElasticsearchSortModifierPlugin = (\n config: CmsEntryElasticsearchSortModifierPluginConfig\n) => {\n return new CmsEntryElasticsearchSortModifierPlugin(config);\n};\n"],"mappings":";;;;;;;;AAAA;AAmBO,MAAMA,uCAAuC,SAASC,iDAA+B,CAAmB;EAKpGC,WAAW,CAACC,MAAqD,EAAE;IACtE,KAAK,CAACA,MAAM,CAACC,UAAU,CAAC;IAAC;IACzB,IAAI,CAACC,OAAO,GAAGF,MAAM,CAACE,OAAO;EACjC;AACJ;AAAC;AAAA,8BATYL,uCAAuC,UACD,uCAAuC;AAUnF,MAAMM,6CAA6C,GACtDH,MAAqD,IACpD;EACD,OAAO,IAAIH,uCAAuC,CAACG,MAAM,CAAC;AAC9D,CAAC;AAAC"}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.CmsEntryFilterPlugin = void 0;
|
|
9
|
-
|
|
10
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
9
|
var _plugins = require("@webiny/plugins");
|
|
13
|
-
|
|
14
10
|
class CmsEntryFilterPlugin extends _plugins.Plugin {
|
|
15
11
|
constructor(config) {
|
|
16
12
|
super();
|
|
@@ -19,13 +15,10 @@ class CmsEntryFilterPlugin extends _plugins.Plugin {
|
|
|
19
15
|
this.config = config;
|
|
20
16
|
this.fieldType = this.config.fieldType;
|
|
21
17
|
}
|
|
22
|
-
|
|
23
18
|
exec(params) {
|
|
24
19
|
return this.config.exec(params);
|
|
25
20
|
}
|
|
26
|
-
|
|
27
21
|
}
|
|
28
|
-
|
|
29
22
|
exports.CmsEntryFilterPlugin = CmsEntryFilterPlugin;
|
|
30
23
|
(0, _defineProperty2.default)(CmsEntryFilterPlugin, "type", "cms.elasticsearch.entry.filter");
|
|
31
24
|
(0, _defineProperty2.default)(CmsEntryFilterPlugin, "ALL", "*");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryFilterPlugin","Plugin","constructor","config","fieldType","exec","params"],"sources":["CmsEntryFilterPlugin.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins\";\nimport { ValueFilterPlugin } from \"@webiny/db-dynamodb/plugins/definitions/ValueFilterPlugin\";\nimport { ModelField, ModelFields } from \"~/operations/entry/elasticsearch/types\";\nimport { ElasticsearchBoolQueryConfig } from \"@webiny/api-elasticsearch/types\";\n\ninterface CmsEntryFilterPluginConfig {\n fieldType: string;\n exec: (params: ExecParams) => void;\n}\ninterface ApplyParams {\n key: string;\n value: any;\n query: ElasticsearchBoolQueryConfig;\n operator: string;\n field: ModelField;\n}\nexport interface ApplyFilteringCb {\n (params: ApplyParams): void;\n}\n\nexport interface GetFilterPluginCb {\n (type: string): CmsEntryFilterPlugin;\n}\n\ninterface ExecParams {\n applyFiltering: ApplyFilteringCb;\n getFilterPlugin: GetFilterPluginCb;\n key: string;\n value: any;\n operator: string;\n field: ModelField;\n fields: ModelFields;\n query: ElasticsearchBoolQueryConfig;\n}\n\nexport interface CmsEntryFilterPluginCreateResponse {\n field: ModelField;\n path: string;\n fieldPathId: string;\n plugin: ValueFilterPlugin;\n negate: boolean;\n compareValue: any;\n transformValue: <I = any, O = any>(value: I) => O;\n}\n\nexport class CmsEntryFilterPlugin extends Plugin {\n public static override readonly type: string = \"cms.elasticsearch.entry.filter\";\n public static readonly ALL: string = \"*\";\n\n private readonly config: CmsEntryFilterPluginConfig;\n public readonly fieldType: string;\n\n public constructor(config: CmsEntryFilterPluginConfig) {\n super();\n this.config = config;\n this.fieldType = this.config.fieldType;\n }\n\n public exec(params: ExecParams) {\n return this.config.exec(params);\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["CmsEntryFilterPlugin","Plugin","constructor","config","fieldType","exec","params"],"sources":["CmsEntryFilterPlugin.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins\";\nimport { ValueFilterPlugin } from \"@webiny/db-dynamodb/plugins/definitions/ValueFilterPlugin\";\nimport { ModelField, ModelFields } from \"~/operations/entry/elasticsearch/types\";\nimport { ElasticsearchBoolQueryConfig } from \"@webiny/api-elasticsearch/types\";\n\ninterface CmsEntryFilterPluginConfig {\n fieldType: string;\n exec: (params: ExecParams) => void;\n}\ninterface ApplyParams {\n key: string;\n value: any;\n query: ElasticsearchBoolQueryConfig;\n operator: string;\n field: ModelField;\n}\nexport interface ApplyFilteringCb {\n (params: ApplyParams): void;\n}\n\nexport interface GetFilterPluginCb {\n (type: string): CmsEntryFilterPlugin;\n}\n\ninterface ExecParams {\n applyFiltering: ApplyFilteringCb;\n getFilterPlugin: GetFilterPluginCb;\n key: string;\n value: any;\n operator: string;\n field: ModelField;\n fields: ModelFields;\n query: ElasticsearchBoolQueryConfig;\n}\n\nexport interface CmsEntryFilterPluginCreateResponse {\n field: ModelField;\n path: string;\n fieldPathId: string;\n plugin: ValueFilterPlugin;\n negate: boolean;\n compareValue: any;\n transformValue: <I = any, O = any>(value: I) => O;\n}\n\nexport class CmsEntryFilterPlugin extends Plugin {\n public static override readonly type: string = \"cms.elasticsearch.entry.filter\";\n public static readonly ALL: string = \"*\";\n\n private readonly config: CmsEntryFilterPluginConfig;\n public readonly fieldType: string;\n\n public constructor(config: CmsEntryFilterPluginConfig) {\n super();\n this.config = config;\n this.fieldType = this.config.fieldType;\n }\n\n public exec(params: ExecParams) {\n return this.config.exec(params);\n }\n}\n"],"mappings":";;;;;;;;AAAA;AA6CO,MAAMA,oBAAoB,SAASC,eAAM,CAAC;EAOtCC,WAAW,CAACC,MAAkC,EAAE;IACnD,KAAK,EAAE;IAAC;IAAA;IACR,IAAI,CAACA,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACC,SAAS,GAAG,IAAI,CAACD,MAAM,CAACC,SAAS;EAC1C;EAEOC,IAAI,CAACC,MAAkB,EAAE;IAC5B,OAAO,IAAI,CAACH,MAAM,CAACE,IAAI,CAACC,MAAM,CAAC;EACnC;AACJ;AAAC;AAAA,8BAhBYN,oBAAoB,UACkB,gCAAgC;AAAA,8BADtEA,oBAAoB,SAEQ,GAAG"}
|
package/plugins/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from "./CmsEntryElasticsearchBodyModifierPlugin";
|
|
2
|
-
export * from "./CmsEntryElasticsearchFieldPlugin";
|
|
3
2
|
export * from "./CmsEntryElasticsearchIndexPlugin";
|
|
4
3
|
export * from "./CmsEntryElasticsearchQueryBuilderValueSearchPlugin";
|
|
5
4
|
export * from "./CmsEntryElasticsearchQueryModifierPlugin";
|
|
6
5
|
export * from "./CmsEntryElasticsearchSortModifierPlugin";
|
|
7
6
|
export * from "./CmsEntryElasticsearchFullTextSearchPlugin";
|
|
7
|
+
export * from "./CmsElasticsearchModelFieldPlugin";
|
package/plugins/index.js
CHANGED
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
var _CmsEntryElasticsearchBodyModifierPlugin = require("./CmsEntryElasticsearchBodyModifierPlugin");
|
|
8
|
-
|
|
9
7
|
Object.keys(_CmsEntryElasticsearchBodyModifierPlugin).forEach(function (key) {
|
|
10
8
|
if (key === "default" || key === "__esModule") return;
|
|
11
9
|
if (key in exports && exports[key] === _CmsEntryElasticsearchBodyModifierPlugin[key]) return;
|
|
@@ -16,22 +14,7 @@ Object.keys(_CmsEntryElasticsearchBodyModifierPlugin).forEach(function (key) {
|
|
|
16
14
|
}
|
|
17
15
|
});
|
|
18
16
|
});
|
|
19
|
-
|
|
20
|
-
var _CmsEntryElasticsearchFieldPlugin = require("./CmsEntryElasticsearchFieldPlugin");
|
|
21
|
-
|
|
22
|
-
Object.keys(_CmsEntryElasticsearchFieldPlugin).forEach(function (key) {
|
|
23
|
-
if (key === "default" || key === "__esModule") return;
|
|
24
|
-
if (key in exports && exports[key] === _CmsEntryElasticsearchFieldPlugin[key]) return;
|
|
25
|
-
Object.defineProperty(exports, key, {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
get: function () {
|
|
28
|
-
return _CmsEntryElasticsearchFieldPlugin[key];
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
|
|
33
17
|
var _CmsEntryElasticsearchIndexPlugin = require("./CmsEntryElasticsearchIndexPlugin");
|
|
34
|
-
|
|
35
18
|
Object.keys(_CmsEntryElasticsearchIndexPlugin).forEach(function (key) {
|
|
36
19
|
if (key === "default" || key === "__esModule") return;
|
|
37
20
|
if (key in exports && exports[key] === _CmsEntryElasticsearchIndexPlugin[key]) return;
|
|
@@ -42,9 +25,7 @@ Object.keys(_CmsEntryElasticsearchIndexPlugin).forEach(function (key) {
|
|
|
42
25
|
}
|
|
43
26
|
});
|
|
44
27
|
});
|
|
45
|
-
|
|
46
28
|
var _CmsEntryElasticsearchQueryBuilderValueSearchPlugin = require("./CmsEntryElasticsearchQueryBuilderValueSearchPlugin");
|
|
47
|
-
|
|
48
29
|
Object.keys(_CmsEntryElasticsearchQueryBuilderValueSearchPlugin).forEach(function (key) {
|
|
49
30
|
if (key === "default" || key === "__esModule") return;
|
|
50
31
|
if (key in exports && exports[key] === _CmsEntryElasticsearchQueryBuilderValueSearchPlugin[key]) return;
|
|
@@ -55,9 +36,7 @@ Object.keys(_CmsEntryElasticsearchQueryBuilderValueSearchPlugin).forEach(functio
|
|
|
55
36
|
}
|
|
56
37
|
});
|
|
57
38
|
});
|
|
58
|
-
|
|
59
39
|
var _CmsEntryElasticsearchQueryModifierPlugin = require("./CmsEntryElasticsearchQueryModifierPlugin");
|
|
60
|
-
|
|
61
40
|
Object.keys(_CmsEntryElasticsearchQueryModifierPlugin).forEach(function (key) {
|
|
62
41
|
if (key === "default" || key === "__esModule") return;
|
|
63
42
|
if (key in exports && exports[key] === _CmsEntryElasticsearchQueryModifierPlugin[key]) return;
|
|
@@ -68,9 +47,7 @@ Object.keys(_CmsEntryElasticsearchQueryModifierPlugin).forEach(function (key) {
|
|
|
68
47
|
}
|
|
69
48
|
});
|
|
70
49
|
});
|
|
71
|
-
|
|
72
50
|
var _CmsEntryElasticsearchSortModifierPlugin = require("./CmsEntryElasticsearchSortModifierPlugin");
|
|
73
|
-
|
|
74
51
|
Object.keys(_CmsEntryElasticsearchSortModifierPlugin).forEach(function (key) {
|
|
75
52
|
if (key === "default" || key === "__esModule") return;
|
|
76
53
|
if (key in exports && exports[key] === _CmsEntryElasticsearchSortModifierPlugin[key]) return;
|
|
@@ -81,9 +58,7 @@ Object.keys(_CmsEntryElasticsearchSortModifierPlugin).forEach(function (key) {
|
|
|
81
58
|
}
|
|
82
59
|
});
|
|
83
60
|
});
|
|
84
|
-
|
|
85
61
|
var _CmsEntryElasticsearchFullTextSearchPlugin = require("./CmsEntryElasticsearchFullTextSearchPlugin");
|
|
86
|
-
|
|
87
62
|
Object.keys(_CmsEntryElasticsearchFullTextSearchPlugin).forEach(function (key) {
|
|
88
63
|
if (key === "default" || key === "__esModule") return;
|
|
89
64
|
if (key in exports && exports[key] === _CmsEntryElasticsearchFullTextSearchPlugin[key]) return;
|
|
@@ -93,4 +68,15 @@ Object.keys(_CmsEntryElasticsearchFullTextSearchPlugin).forEach(function (key) {
|
|
|
93
68
|
return _CmsEntryElasticsearchFullTextSearchPlugin[key];
|
|
94
69
|
}
|
|
95
70
|
});
|
|
71
|
+
});
|
|
72
|
+
var _CmsElasticsearchModelFieldPlugin = require("./CmsElasticsearchModelFieldPlugin");
|
|
73
|
+
Object.keys(_CmsElasticsearchModelFieldPlugin).forEach(function (key) {
|
|
74
|
+
if (key === "default" || key === "__esModule") return;
|
|
75
|
+
if (key in exports && exports[key] === _CmsElasticsearchModelFieldPlugin[key]) return;
|
|
76
|
+
Object.defineProperty(exports, key, {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function () {
|
|
79
|
+
return _CmsElasticsearchModelFieldPlugin[key];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
96
82
|
});
|
package/plugins/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./CmsEntryElasticsearchBodyModifierPlugin\";\nexport * from \"./
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./CmsEntryElasticsearchBodyModifierPlugin\";\nexport * from \"./CmsEntryElasticsearchIndexPlugin\";\nexport * from \"./CmsEntryElasticsearchQueryBuilderValueSearchPlugin\";\nexport * from \"./CmsEntryElasticsearchQueryModifierPlugin\";\nexport * from \"./CmsEntryElasticsearchSortModifierPlugin\";\nexport * from \"./CmsEntryElasticsearchFullTextSearchPlugin\";\nexport * from \"./CmsElasticsearchModelFieldPlugin\";\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
package/types.d.ts
CHANGED
|
@@ -102,7 +102,7 @@ export interface CmsModelFieldToElasticsearchPlugin extends Plugin {
|
|
|
102
102
|
* unmappedType: "date"
|
|
103
103
|
* ```
|
|
104
104
|
*/
|
|
105
|
-
unmappedType?: (field: CmsModelField) => string;
|
|
105
|
+
unmappedType?: (field: Pick<CmsModelField, "fieldId" | "type">) => string;
|
|
106
106
|
/**
|
|
107
107
|
* This is meant to do some transformation of the entry, preferably only to fieldType it was defined for. Nothing is stopping you to do anything you want to other fields, but try to separate field transformations.
|
|
108
108
|
* It returns `Partial<CmsContentIndexEntryType>`. Always return a top-level property of the entry since it is merged via spread operator.
|
package/types.js
CHANGED
|
@@ -4,28 +4,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ENTITIES = void 0;
|
|
7
|
-
|
|
8
7
|
/**
|
|
9
8
|
* A definition of the entry that is being prepared for the Elasticsearch.
|
|
10
9
|
*
|
|
11
10
|
* @category Elasticsearch
|
|
12
11
|
* @category CmsEntry
|
|
13
12
|
*/
|
|
14
|
-
|
|
15
13
|
/**
|
|
16
14
|
* Arguments for the method that is transforming content entry in its original form to the one we are storing to the Elasticsearch.
|
|
17
15
|
*
|
|
18
16
|
* @category Elasticsearch
|
|
19
17
|
* @category CmsEntry
|
|
20
18
|
*/
|
|
21
|
-
|
|
22
19
|
/**
|
|
23
20
|
* Arguments for the method that is transforming content entry from Elasticsearch into the original one.
|
|
24
21
|
*
|
|
25
22
|
* @category Elasticsearch
|
|
26
23
|
* @category CmsEntry
|
|
27
24
|
*/
|
|
28
|
-
|
|
29
25
|
/**
|
|
30
26
|
* A plugin defining transformation of entry for Elasticsearch.
|
|
31
27
|
*
|
|
@@ -36,7 +32,6 @@ exports.ENTITIES = void 0;
|
|
|
36
32
|
*/
|
|
37
33
|
let ENTITIES;
|
|
38
34
|
exports.ENTITIES = ENTITIES;
|
|
39
|
-
|
|
40
35
|
(function (ENTITIES) {
|
|
41
36
|
ENTITIES["SYSTEM"] = "CmsSystem";
|
|
42
37
|
ENTITIES["SETTINGS"] = "CmsSettings";
|