@webiny/api-headless-cms-ddb-es 5.34.0-beta.2 → 5.34.1-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/index.js +0 -6
- package/index.js.map +1 -1
- package/operations/entry/elasticsearch/sort.js +6 -1
- package/operations/entry/elasticsearch/sort.js.map +1 -1
- package/package.json +14 -14
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.d.ts +1 -0
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +8 -2
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js.map +1 -1
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.d.ts +1 -0
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +8 -2
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js.map +1 -1
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.d.ts +1 -0
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +8 -2
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.js.map +1 -1
- package/operations/entry/elasticsearchFields.d.ts +0 -2
- package/operations/entry/elasticsearchFields.js +0 -38
- package/operations/entry/elasticsearchFields.js.map +0 -1
package/index.js
CHANGED
|
@@ -50,8 +50,6 @@ var _group2 = require("./operations/group");
|
|
|
50
50
|
|
|
51
51
|
var _apiElasticsearch = require("@webiny/api-elasticsearch");
|
|
52
52
|
|
|
53
|
-
var _elasticsearchFields = require("./operations/entry/elasticsearchFields");
|
|
54
|
-
|
|
55
53
|
var _indices = require("./elasticsearch/indices");
|
|
56
54
|
|
|
57
55
|
var _deleteElasticsearchIndex = require("./elasticsearch/deleteElasticsearchIndex");
|
|
@@ -126,10 +124,6 @@ const createStorageOperations = params => {
|
|
|
126
124
|
* Plugins of type CmsModelFieldToGraphQLPlugin.
|
|
127
125
|
*/
|
|
128
126
|
|
|
129
|
-
/**
|
|
130
|
-
* Elasticsearch field definitions for the entry record.
|
|
131
|
-
*/
|
|
132
|
-
_elasticsearchFields.elasticsearchFields,
|
|
133
127
|
/**
|
|
134
128
|
* DynamoDB filter plugins for the where conditions.
|
|
135
129
|
*/
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createStorageOperations","params","attributes","table","esTable","documentClient","elasticsearch","plugins","userPlugins","tableInstance","createTable","tableElasticsearchInstance","createElasticsearchTable","entities","settings","createSettingsEntity","entityName","ENTITIES","SETTINGS","system","createSystemEntity","SYSTEM","groups","createGroupEntity","GROUPS","models","createModelEntity","MODELS","entries","createEntryEntity","ENTRIES","entriesEs","createEntryElasticsearchEntity","ENTRIES_ES","PluginsContainer","cmsEntryElasticsearchFields","dynamoDbValueFilters","getElasticsearchOperators","dynamoDbPlugins","elasticsearchPlugins","elasticsearchIndexPlugins","createFilterPlugins","name","beforeInit","context","register","fieldPlugins","byType","elasticsearchOperatorPlugins","ElasticsearchQueryBuilderOperatorPlugin","type","queryModifierPlugins","CmsEntryElasticsearchQueryModifierPlugin","sortModifierPlugins","CmsEntryElasticsearchSortModifierPlugin","bodyModifierPlugins","CmsEntryElasticsearchBodyModifierPlugin","init","cms","onModelBeforeCreate","subscribe","model","createElasticsearchIndex","onModelBeforeCreateFrom","onModelAfterDelete","deleteElasticsearchIndex","onModelInitialize","getEntities","getTable","getEsTable","createSystemStorageOperations","entity","createSettingsStorageOperations","createGroupsStorageOperations","createModelsStorageOperations","createEntriesStorageOperations","esEntity"],"sources":["index.ts"],"sourcesContent":["import dynamoDbValueFilters from \"@webiny/db-dynamodb/plugins/filters\";\nimport elasticsearchPlugins from \"./elasticsearch\";\nimport dynamoDbPlugins from \"./dynamoDb\";\nimport { createSettingsStorageOperations } from \"./operations/settings\";\nimport { createSystemStorageOperations } from \"./operations/system\";\nimport { createModelsStorageOperations } from \"./operations/model\";\nimport { createEntriesStorageOperations } from \"./operations/entry\";\nimport { ENTITIES, StorageOperationsFactory } from \"~/types\";\nimport { createTable } from \"~/definitions/table\";\nimport { createElasticsearchTable } from \"~/definitions/tableElasticsearch\";\nimport { createGroupEntity } from \"~/definitions/group\";\nimport { createModelEntity } from \"~/definitions/model\";\nimport { createEntryEntity } from \"~/definitions/entry\";\nimport { createEntryElasticsearchEntity } from \"~/definitions/entryElasticsearch\";\nimport { createSystemEntity } from \"~/definitions/system\";\nimport { createSettingsEntity } from \"~/definitions/settings\";\nimport { createElasticsearchIndex } from \"~/elasticsearch/createElasticsearchIndex\";\nimport { PluginsContainer } from \"@webiny/plugins\";\nimport { createGroupsStorageOperations } from \"~/operations/group\";\nimport {\n ElasticsearchQueryBuilderOperatorPlugin,\n getElasticsearchOperators\n} from \"@webiny/api-elasticsearch\";\nimport { elasticsearchFields as cmsEntryElasticsearchFields } from \"~/operations/entry/elasticsearchFields\";\nimport { elasticsearchIndexPlugins } from \"./elasticsearch/indices\";\nimport { deleteElasticsearchIndex } from \"./elasticsearch/deleteElasticsearchIndex\";\nimport { CmsModelFieldToGraphQLPlugin } from \"@webiny/api-headless-cms/types\";\nimport {\n CmsEntryElasticsearchBodyModifierPlugin,\n CmsEntryElasticsearchQueryModifierPlugin,\n CmsEntryElasticsearchSortModifierPlugin\n} from \"~/plugins\";\nimport { createFilterPlugins } from \"~/operations/entry/elasticsearch/filtering/plugins\";\n\nexport * from \"./plugins\";\n\nexport const createStorageOperations: StorageOperationsFactory = params => {\n const {\n attributes,\n table,\n esTable,\n documentClient,\n elasticsearch,\n plugins: userPlugins\n } = params;\n\n const tableInstance = createTable({\n table,\n documentClient\n });\n const tableElasticsearchInstance = createElasticsearchTable({\n table: esTable,\n documentClient\n });\n\n const entities = {\n settings: createSettingsEntity({\n entityName: ENTITIES.SETTINGS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.SETTINGS] : {}\n }),\n system: createSystemEntity({\n entityName: ENTITIES.SYSTEM,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.SYSTEM] : {}\n }),\n groups: createGroupEntity({\n entityName: ENTITIES.GROUPS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.GROUPS] : {}\n }),\n models: createModelEntity({\n entityName: ENTITIES.MODELS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.MODELS] : {}\n }),\n entries: createEntryEntity({\n entityName: ENTITIES.ENTRIES,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.ENTRIES] : {}\n }),\n entriesEs: createEntryElasticsearchEntity({\n entityName: ENTITIES.ENTRIES_ES,\n table: tableElasticsearchInstance,\n attributes: attributes ? attributes[ENTITIES.ENTRIES_ES] : {}\n })\n };\n\n const plugins = new PluginsContainer([\n /**\n * Plugins of type CmsModelFieldToGraphQLPlugin.\n */\n /**\n * Elasticsearch field definitions for the entry record.\n */\n cmsEntryElasticsearchFields,\n /**\n * DynamoDB filter plugins for the where conditions.\n */\n dynamoDbValueFilters(),\n /**\n * Elasticsearch operators.\n */\n getElasticsearchOperators(),\n /**\n * Field plugins for DynamoDB.\n */\n dynamoDbPlugins(),\n /**\n * Field plugins for Elasticsearch.\n */\n elasticsearchPlugins(),\n /**\n * Built-in Elasticsearch index templates.\n */\n elasticsearchIndexPlugins(),\n /**\n * Filter plugins used to apply filtering from where conditions to Elasticsearch query.\n */\n createFilterPlugins(),\n /**\n * User defined custom plugins.\n * They are at the end because we can then override existing plugins.\n */\n ...(userPlugins || [])\n ]);\n\n return {\n name: \"dynamodb:elasticsearch\",\n beforeInit: async context => {\n /**\n * Attach the elasticsearch into context if it is not already attached.\n */\n if (!context.elasticsearch) {\n context.elasticsearch = elasticsearch;\n }\n /**\n * Pass the plugins to the parent context.\n */\n context.plugins.register([dynamoDbPlugins()]);\n /**\n * Collect all required plugins from parent context.\n */\n const fieldPlugins = context.plugins.byType<CmsModelFieldToGraphQLPlugin>(\n \"cms-model-field-to-graphql\"\n );\n plugins.register(fieldPlugins);\n /**\n * We need to get all the operator plugins from the main plugin container.\n */\n const elasticsearchOperatorPlugins =\n context.plugins.byType<ElasticsearchQueryBuilderOperatorPlugin>(\n ElasticsearchQueryBuilderOperatorPlugin.type\n );\n plugins.register(elasticsearchOperatorPlugins);\n /**\n * We need to get all the query modifier plugins\n */\n const queryModifierPlugins =\n context.plugins.byType<CmsEntryElasticsearchQueryModifierPlugin>(\n CmsEntryElasticsearchQueryModifierPlugin.type\n );\n plugins.register(queryModifierPlugins);\n /**\n * We need to get all the sort modifier plugins\n */\n const sortModifierPlugins =\n context.plugins.byType<CmsEntryElasticsearchSortModifierPlugin>(\n CmsEntryElasticsearchSortModifierPlugin.type\n );\n plugins.register(sortModifierPlugins);\n /**\n * We need to get all the body modifier plugins\n */\n const bodyModifierPlugins =\n context.plugins.byType<CmsEntryElasticsearchBodyModifierPlugin>(\n CmsEntryElasticsearchBodyModifierPlugin.type\n );\n plugins.register(bodyModifierPlugins);\n },\n init: async context => {\n /**\n * We need to create indexes on before model create and on clone (create from).\n * Other apps create indexes on locale creation.\n */\n context.cms.onModelBeforeCreate.subscribe(async ({ model }) => {\n await createElasticsearchIndex({\n elasticsearch,\n model,\n plugins\n });\n });\n context.cms.onModelBeforeCreateFrom.subscribe(async ({ model }) => {\n await createElasticsearchIndex({\n elasticsearch,\n model,\n plugins\n });\n });\n context.cms.onModelAfterDelete.subscribe(async ({ model }) => {\n await deleteElasticsearchIndex({\n elasticsearch,\n model\n });\n });\n\n context.cms.onModelInitialize.subscribe(async ({ model }) => {\n await createElasticsearchIndex({\n elasticsearch,\n model,\n plugins\n });\n });\n },\n getEntities: () => entities,\n getTable: () => tableInstance,\n getEsTable: () => tableElasticsearchInstance,\n system: createSystemStorageOperations({\n entity: entities.system\n }),\n settings: createSettingsStorageOperations({\n entity: entities.settings\n }),\n groups: createGroupsStorageOperations({\n entity: entities.groups,\n plugins\n }),\n models: createModelsStorageOperations({\n entity: entities.models,\n elasticsearch\n }),\n entries: createEntriesStorageOperations({\n entity: entities.entries,\n esEntity: entities.entriesEs,\n plugins,\n elasticsearch\n })\n };\n};\n"],"mappings":";;;;;;;;;;;;AAAA;;AACA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,CAACkB,SAFiB;MAGpCxB,OAHoC;MAIpCD;IAJoC,CAA/B;EAxGN,CAAP;AA+GH,CA1MM"}
|
|
1
|
+
{"version":3,"names":["createStorageOperations","params","attributes","table","esTable","documentClient","elasticsearch","plugins","userPlugins","tableInstance","createTable","tableElasticsearchInstance","createElasticsearchTable","entities","settings","createSettingsEntity","entityName","ENTITIES","SETTINGS","system","createSystemEntity","SYSTEM","groups","createGroupEntity","GROUPS","models","createModelEntity","MODELS","entries","createEntryEntity","ENTRIES","entriesEs","createEntryElasticsearchEntity","ENTRIES_ES","PluginsContainer","dynamoDbValueFilters","getElasticsearchOperators","dynamoDbPlugins","elasticsearchPlugins","elasticsearchIndexPlugins","createFilterPlugins","name","beforeInit","context","register","fieldPlugins","byType","elasticsearchOperatorPlugins","ElasticsearchQueryBuilderOperatorPlugin","type","queryModifierPlugins","CmsEntryElasticsearchQueryModifierPlugin","sortModifierPlugins","CmsEntryElasticsearchSortModifierPlugin","bodyModifierPlugins","CmsEntryElasticsearchBodyModifierPlugin","init","cms","onModelBeforeCreate","subscribe","model","createElasticsearchIndex","onModelBeforeCreateFrom","onModelAfterDelete","deleteElasticsearchIndex","onModelInitialize","getEntities","getTable","getEsTable","createSystemStorageOperations","entity","createSettingsStorageOperations","createGroupsStorageOperations","createModelsStorageOperations","createEntriesStorageOperations","esEntity"],"sources":["index.ts"],"sourcesContent":["import dynamoDbValueFilters from \"@webiny/db-dynamodb/plugins/filters\";\nimport elasticsearchPlugins from \"./elasticsearch\";\nimport dynamoDbPlugins from \"./dynamoDb\";\nimport { createSettingsStorageOperations } from \"./operations/settings\";\nimport { createSystemStorageOperations } from \"./operations/system\";\nimport { createModelsStorageOperations } from \"./operations/model\";\nimport { createEntriesStorageOperations } from \"./operations/entry\";\nimport { ENTITIES, StorageOperationsFactory } from \"~/types\";\nimport { createTable } from \"~/definitions/table\";\nimport { createElasticsearchTable } from \"~/definitions/tableElasticsearch\";\nimport { createGroupEntity } from \"~/definitions/group\";\nimport { createModelEntity } from \"~/definitions/model\";\nimport { createEntryEntity } from \"~/definitions/entry\";\nimport { createEntryElasticsearchEntity } from \"~/definitions/entryElasticsearch\";\nimport { createSystemEntity } from \"~/definitions/system\";\nimport { createSettingsEntity } from \"~/definitions/settings\";\nimport { createElasticsearchIndex } from \"~/elasticsearch/createElasticsearchIndex\";\nimport { PluginsContainer } from \"@webiny/plugins\";\nimport { createGroupsStorageOperations } from \"~/operations/group\";\nimport {\n ElasticsearchQueryBuilderOperatorPlugin,\n getElasticsearchOperators\n} from \"@webiny/api-elasticsearch\";\nimport { elasticsearchIndexPlugins } from \"./elasticsearch/indices\";\nimport { deleteElasticsearchIndex } from \"./elasticsearch/deleteElasticsearchIndex\";\nimport { CmsModelFieldToGraphQLPlugin } from \"@webiny/api-headless-cms/types\";\nimport {\n CmsEntryElasticsearchBodyModifierPlugin,\n CmsEntryElasticsearchQueryModifierPlugin,\n CmsEntryElasticsearchSortModifierPlugin\n} from \"~/plugins\";\nimport { createFilterPlugins } from \"~/operations/entry/elasticsearch/filtering/plugins\";\n\nexport * from \"./plugins\";\n\nexport const createStorageOperations: StorageOperationsFactory = params => {\n const {\n attributes,\n table,\n esTable,\n documentClient,\n elasticsearch,\n plugins: userPlugins\n } = params;\n\n const tableInstance = createTable({\n table,\n documentClient\n });\n const tableElasticsearchInstance = createElasticsearchTable({\n table: esTable,\n documentClient\n });\n\n const entities = {\n settings: createSettingsEntity({\n entityName: ENTITIES.SETTINGS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.SETTINGS] : {}\n }),\n system: createSystemEntity({\n entityName: ENTITIES.SYSTEM,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.SYSTEM] : {}\n }),\n groups: createGroupEntity({\n entityName: ENTITIES.GROUPS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.GROUPS] : {}\n }),\n models: createModelEntity({\n entityName: ENTITIES.MODELS,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.MODELS] : {}\n }),\n entries: createEntryEntity({\n entityName: ENTITIES.ENTRIES,\n table: tableInstance,\n attributes: attributes ? attributes[ENTITIES.ENTRIES] : {}\n }),\n entriesEs: createEntryElasticsearchEntity({\n entityName: ENTITIES.ENTRIES_ES,\n table: tableElasticsearchInstance,\n attributes: attributes ? attributes[ENTITIES.ENTRIES_ES] : {}\n })\n };\n\n const plugins = new PluginsContainer([\n /**\n * Plugins of type CmsModelFieldToGraphQLPlugin.\n */\n /**\n * DynamoDB filter plugins for the where conditions.\n */\n dynamoDbValueFilters(),\n /**\n * Elasticsearch operators.\n */\n getElasticsearchOperators(),\n /**\n * Field plugins for DynamoDB.\n */\n dynamoDbPlugins(),\n /**\n * Field plugins for Elasticsearch.\n */\n elasticsearchPlugins(),\n /**\n * Built-in Elasticsearch index templates.\n */\n elasticsearchIndexPlugins(),\n /**\n * Filter plugins used to apply filtering from where conditions to Elasticsearch query.\n */\n createFilterPlugins(),\n /**\n * User defined custom plugins.\n * They are at the end because we can then override existing plugins.\n */\n ...(userPlugins || [])\n ]);\n\n return {\n name: \"dynamodb:elasticsearch\",\n beforeInit: async context => {\n /**\n * Attach the elasticsearch into context if it is not already attached.\n */\n if (!context.elasticsearch) {\n context.elasticsearch = elasticsearch;\n }\n /**\n * Pass the plugins to the parent context.\n */\n context.plugins.register([dynamoDbPlugins()]);\n /**\n * Collect all required plugins from parent context.\n */\n const fieldPlugins = context.plugins.byType<CmsModelFieldToGraphQLPlugin>(\n \"cms-model-field-to-graphql\"\n );\n plugins.register(fieldPlugins);\n /**\n * We need to get all the operator plugins from the main plugin container.\n */\n const elasticsearchOperatorPlugins =\n context.plugins.byType<ElasticsearchQueryBuilderOperatorPlugin>(\n ElasticsearchQueryBuilderOperatorPlugin.type\n );\n plugins.register(elasticsearchOperatorPlugins);\n /**\n * We need to get all the query modifier plugins\n */\n const queryModifierPlugins =\n context.plugins.byType<CmsEntryElasticsearchQueryModifierPlugin>(\n CmsEntryElasticsearchQueryModifierPlugin.type\n );\n plugins.register(queryModifierPlugins);\n /**\n * We need to get all the sort modifier plugins\n */\n const sortModifierPlugins =\n context.plugins.byType<CmsEntryElasticsearchSortModifierPlugin>(\n CmsEntryElasticsearchSortModifierPlugin.type\n );\n plugins.register(sortModifierPlugins);\n /**\n * We need to get all the body modifier plugins\n */\n const bodyModifierPlugins =\n context.plugins.byType<CmsEntryElasticsearchBodyModifierPlugin>(\n CmsEntryElasticsearchBodyModifierPlugin.type\n );\n plugins.register(bodyModifierPlugins);\n },\n init: async context => {\n /**\n * We need to create indexes on before model create and on clone (create from).\n * Other apps create indexes on locale creation.\n */\n context.cms.onModelBeforeCreate.subscribe(async ({ model }) => {\n await createElasticsearchIndex({\n elasticsearch,\n model,\n plugins\n });\n });\n context.cms.onModelBeforeCreateFrom.subscribe(async ({ model }) => {\n await createElasticsearchIndex({\n elasticsearch,\n model,\n plugins\n });\n });\n context.cms.onModelAfterDelete.subscribe(async ({ model }) => {\n await deleteElasticsearchIndex({\n elasticsearch,\n model\n });\n });\n\n context.cms.onModelInitialize.subscribe(async ({ model }) => {\n await createElasticsearchIndex({\n elasticsearch,\n model,\n plugins\n });\n });\n },\n getEntities: () => entities,\n getTable: () => tableInstance,\n getEsTable: () => tableElasticsearchInstance,\n system: createSystemStorageOperations({\n entity: entities.system\n }),\n settings: createSettingsStorageOperations({\n entity: entities.settings\n }),\n groups: createGroupsStorageOperations({\n entity: entities.groups,\n plugins\n }),\n models: createModelsStorageOperations({\n entity: entities.models,\n elasticsearch\n }),\n entries: createEntriesStorageOperations({\n entity: entities.entries,\n esEntity: entities.entriesEs,\n plugins,\n elasticsearch\n })\n };\n};\n"],"mappings":";;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAIA;;AACA;;AAEA;;AAOA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA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+
["*"]: new _plugins.CmsEntryElasticsearchFieldPlugin({
|
|
72
|
+
field: _plugins.CmsEntryElasticsearchFieldPlugin.ALL,
|
|
73
|
+
keyword: false
|
|
74
|
+
})
|
|
75
|
+
});
|
|
71
76
|
const transformedSort = sort.map(value => {
|
|
72
77
|
const matched = value.match(/^([a-zA-Z-0-9_]+)_(ASC|DESC)$/);
|
|
73
78
|
|
|
@@ -1 +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
|
|
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","ALL","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 >(\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 [\"*\"]: new CmsEntryElasticsearchFieldPlugin({\n field: CmsEntryElasticsearchFieldPlugin.ALL,\n keyword: false\n })\n }\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,CAGhB,CAACV,OAAD,EAAUW,KAAV,KAAoB;IAChB;AACZ;AACA;IACY,IAAIA,KAAK,CAACC,OAAN,CAAcX,MAAd,GAAuB,CAA3B,EAA8B;MAC1B,OAAOD,OAAP;IACH;;IACD,MAAM;MA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ADA;IAEdT,IAAI,EAAE6B;EAFQ,CAAX,CAAP;AAIH,CA5EM"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/api-headless-cms-ddb-es",
|
|
3
|
-
"version": "5.34.
|
|
3
|
+
"version": "5.34.1-beta.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"@webiny/api-headless-cms",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@babel/runtime": "7.19.0",
|
|
26
|
-
"@webiny/api": "5.34.
|
|
27
|
-
"@webiny/api-elasticsearch": "5.34.
|
|
28
|
-
"@webiny/api-headless-cms": "5.34.
|
|
29
|
-
"@webiny/db-dynamodb": "5.34.
|
|
30
|
-
"@webiny/error": "5.34.
|
|
31
|
-
"@webiny/handler-db": "5.34.
|
|
32
|
-
"@webiny/plugins": "5.34.
|
|
33
|
-
"@webiny/utils": "5.34.
|
|
26
|
+
"@webiny/api": "5.34.1-beta.0",
|
|
27
|
+
"@webiny/api-elasticsearch": "5.34.1-beta.0",
|
|
28
|
+
"@webiny/api-headless-cms": "5.34.1-beta.0",
|
|
29
|
+
"@webiny/db-dynamodb": "5.34.1-beta.0",
|
|
30
|
+
"@webiny/error": "5.34.1-beta.0",
|
|
31
|
+
"@webiny/handler-db": "5.34.1-beta.0",
|
|
32
|
+
"@webiny/plugins": "5.34.1-beta.0",
|
|
33
|
+
"@webiny/utils": "5.34.1-beta.0",
|
|
34
34
|
"dataloader": "2.1.0",
|
|
35
35
|
"dynamodb-toolbox": "0.3.5",
|
|
36
36
|
"jsonpack": "1.1.5",
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"@babel/preset-env": "^7.19.4",
|
|
43
43
|
"@elastic/elasticsearch": "7.12.0",
|
|
44
44
|
"@types/jsonpack": "^1.1.0",
|
|
45
|
-
"@webiny/api-dynamodb-to-elasticsearch": "^5.34.
|
|
46
|
-
"@webiny/cli": "^5.34.
|
|
47
|
-
"@webiny/handler-aws": "^5.34.
|
|
48
|
-
"@webiny/project-utils": "^5.34.
|
|
45
|
+
"@webiny/api-dynamodb-to-elasticsearch": "^5.34.1-beta.0",
|
|
46
|
+
"@webiny/cli": "^5.34.1-beta.0",
|
|
47
|
+
"@webiny/handler-aws": "^5.34.1-beta.0",
|
|
48
|
+
"@webiny/project-utils": "^5.34.1-beta.0",
|
|
49
49
|
"jest": "^28.1.0",
|
|
50
50
|
"jest-dynalite": "^3.2.0",
|
|
51
51
|
"jest-environment-node": "^27.2.4",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"build": "yarn webiny run build",
|
|
65
65
|
"watch": "yarn webiny run watch"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "c893b6c771e45d4b2ea13da4f17455abdaef8239"
|
|
68
68
|
}
|
|
@@ -18,3 +18,4 @@ export declare class CmsEntryElasticsearchBodyModifierPlugin extends Elasticsear
|
|
|
18
18
|
readonly modelId?: string;
|
|
19
19
|
constructor(config: CmsEntryElasticsearchBodyModifierPluginConfig);
|
|
20
20
|
}
|
|
21
|
+
export declare const createCmsEntryElasticsearchBodyModifierPlugin: (config: CmsEntryElasticsearchBodyModifierPluginConfig) => CmsEntryElasticsearchBodyModifierPlugin;
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.CmsEntryElasticsearchBodyModifierPlugin = void 0;
|
|
8
|
+
exports.createCmsEntryElasticsearchBodyModifierPlugin = exports.CmsEntryElasticsearchBodyModifierPlugin = void 0;
|
|
9
9
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
|
|
@@ -21,4 +21,10 @@ class CmsEntryElasticsearchBodyModifierPlugin extends _apiElasticsearch.Elastics
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
exports.CmsEntryElasticsearchBodyModifierPlugin = CmsEntryElasticsearchBodyModifierPlugin;
|
|
24
|
-
(0, _defineProperty2.default)(CmsEntryElasticsearchBodyModifierPlugin, "type", "cms.elasticsearch.modifier.body.entry");
|
|
24
|
+
(0, _defineProperty2.default)(CmsEntryElasticsearchBodyModifierPlugin, "type", "cms.elasticsearch.modifier.body.entry");
|
|
25
|
+
|
|
26
|
+
const createCmsEntryElasticsearchBodyModifierPlugin = config => {
|
|
27
|
+
return new CmsEntryElasticsearchBodyModifierPlugin(config);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
exports.createCmsEntryElasticsearchBodyModifierPlugin = createCmsEntryElasticsearchBodyModifierPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryElasticsearchBodyModifierPlugin","ElasticsearchBodyModifierPlugin","constructor","config","modifyBody","modelId"],"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"],"mappings":";;;;;;;;;;;AAAA;;AAsBO,MAAMA,uCAAN,SAAsDC,iDAAtD,CAAwG;EAKpGC,WAAW,CAACC,MAAD,EAAwD;IACtE,MAAMA,MAAM,CAACC,UAAb;IADsE;IAGtE,KAAKC,OAAL,GAAeF,MAAM,CAACE,OAAtB;EACH;;AAT0G;;;8BAAlGL,uC,UACsC,uC"}
|
|
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,uCAAN,SAAsDC,iDAAtD,CAAwG;EAKpGC,WAAW,CAACC,MAAD,EAAwD;IACtE,MAAMA,MAAM,CAACC,UAAb;IADsE;IAGtE,KAAKC,OAAL,GAAeF,MAAM,CAACE,OAAtB;EACH;;AAT0G;;;8BAAlGL,uC,UACsC,uC;;AAW5C,MAAMM,6CAA6C,GACtDH,MADyD,IAExD;EACD,OAAO,IAAIH,uCAAJ,CAA4CG,MAA5C,CAAP;AACH,CAJM"}
|
|
@@ -15,3 +15,4 @@ export declare class CmsEntryElasticsearchQueryModifierPlugin extends Elasticsea
|
|
|
15
15
|
readonly modelId?: string;
|
|
16
16
|
constructor(config: CmsEntryElasticsearchQueryModifierPluginConfig);
|
|
17
17
|
}
|
|
18
|
+
export declare const createCmsEntryElasticsearchQueryModifierPlugin: (config: CmsEntryElasticsearchQueryModifierPluginConfig) => CmsEntryElasticsearchQueryModifierPlugin;
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.CmsEntryElasticsearchQueryModifierPlugin = void 0;
|
|
8
|
+
exports.createCmsEntryElasticsearchQueryModifierPlugin = exports.CmsEntryElasticsearchQueryModifierPlugin = void 0;
|
|
9
9
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
|
|
@@ -21,4 +21,10 @@ class CmsEntryElasticsearchQueryModifierPlugin extends _apiElasticsearch.Elastic
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
exports.CmsEntryElasticsearchQueryModifierPlugin = CmsEntryElasticsearchQueryModifierPlugin;
|
|
24
|
-
(0, _defineProperty2.default)(CmsEntryElasticsearchQueryModifierPlugin, "type", "cms.elasticsearch.modifier.query.entry");
|
|
24
|
+
(0, _defineProperty2.default)(CmsEntryElasticsearchQueryModifierPlugin, "type", "cms.elasticsearch.modifier.query.entry");
|
|
25
|
+
|
|
26
|
+
const createCmsEntryElasticsearchQueryModifierPlugin = config => {
|
|
27
|
+
return new CmsEntryElasticsearchQueryModifierPlugin(config);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
exports.createCmsEntryElasticsearchQueryModifierPlugin = createCmsEntryElasticsearchQueryModifierPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryElasticsearchQueryModifierPlugin","ElasticsearchQueryModifierPlugin","constructor","config","modifyQuery","modelId"],"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"],"mappings":";;;;;;;;;;;AAAA;;AAmBO,MAAMA,wCAAN,SAAuDC,kDAAvD,CAA2G;EAKvGC,WAAW,CAACC,MAAD,EAAyD;IACvE,MAAMA,MAAM,CAACC,WAAb;IADuE;IAGvE,KAAKC,OAAL,GAAeF,MAAM,CAACE,OAAtB;EACH;;AAT6G;;;8BAArGL,wC,UACsC,wC"}
|
|
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,wCAAN,SAAuDC,kDAAvD,CAA2G;EAKvGC,WAAW,CAACC,MAAD,EAAyD;IACvE,MAAMA,MAAM,CAACC,WAAb;IADuE;IAGvE,KAAKC,OAAL,GAAeF,MAAM,CAACE,OAAtB;EACH;;AAT6G;;;8BAArGL,wC,UACsC,wC;;AAW5C,MAAMM,8CAA8C,GACvDH,MAD0D,IAEzD;EACD,OAAO,IAAIH,wCAAJ,CAA6CG,MAA7C,CAAP;AACH,CAJM"}
|
|
@@ -15,3 +15,4 @@ export declare class CmsEntryElasticsearchSortModifierPlugin extends Elasticsear
|
|
|
15
15
|
readonly modelId?: string;
|
|
16
16
|
constructor(config: CmsEntryElasticsearchSortModifierPluginConfig);
|
|
17
17
|
}
|
|
18
|
+
export declare const createCmsEntryElasticsearchSortModifierPlugin: (config: CmsEntryElasticsearchSortModifierPluginConfig) => CmsEntryElasticsearchSortModifierPlugin;
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.CmsEntryElasticsearchSortModifierPlugin = void 0;
|
|
8
|
+
exports.createCmsEntryElasticsearchSortModifierPlugin = exports.CmsEntryElasticsearchSortModifierPlugin = void 0;
|
|
9
9
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
|
|
@@ -21,4 +21,10 @@ class CmsEntryElasticsearchSortModifierPlugin extends _apiElasticsearch.Elastics
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
exports.CmsEntryElasticsearchSortModifierPlugin = CmsEntryElasticsearchSortModifierPlugin;
|
|
24
|
-
(0, _defineProperty2.default)(CmsEntryElasticsearchSortModifierPlugin, "type", "cms.elasticsearch.modifier.sort.entry");
|
|
24
|
+
(0, _defineProperty2.default)(CmsEntryElasticsearchSortModifierPlugin, "type", "cms.elasticsearch.modifier.sort.entry");
|
|
25
|
+
|
|
26
|
+
const createCmsEntryElasticsearchSortModifierPlugin = config => {
|
|
27
|
+
return new CmsEntryElasticsearchSortModifierPlugin(config);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
exports.createCmsEntryElasticsearchSortModifierPlugin = createCmsEntryElasticsearchSortModifierPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryElasticsearchSortModifierPlugin","ElasticsearchSortModifierPlugin","constructor","config","modifySort","modelId"],"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"],"mappings":";;;;;;;;;;;AAAA;;AAmBO,MAAMA,uCAAN,SAAsDC,iDAAtD,CAAwG;EAKpGC,WAAW,CAACC,MAAD,EAAwD;IACtE,MAAMA,MAAM,CAACC,UAAb;IADsE;IAEtE,KAAKC,OAAL,GAAeF,MAAM,CAACE,OAAtB;EACH;;AAR0G;;;8BAAlGL,uC,UACsC,uC"}
|
|
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,uCAAN,SAAsDC,iDAAtD,CAAwG;EAKpGC,WAAW,CAACC,MAAD,EAAwD;IACtE,MAAMA,MAAM,CAACC,UAAb;IADsE;IAEtE,KAAKC,OAAL,GAAeF,MAAM,CAACE,OAAtB;EACH;;AAR0G;;;8BAAlGL,uC,UACsC,uC;;AAU5C,MAAMM,6CAA6C,GACtDH,MADyD,IAExD;EACD,OAAO,IAAIH,uCAAJ,CAA4CG,MAA5C,CAAP;AACH,CAJM"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.elasticsearchFields = void 0;
|
|
7
|
-
|
|
8
|
-
var _CmsEntryElasticsearchFieldPlugin = require("../../plugins/CmsEntryElasticsearchFieldPlugin");
|
|
9
|
-
|
|
10
|
-
const elasticsearchFields = [new _CmsEntryElasticsearchFieldPlugin.CmsEntryElasticsearchFieldPlugin({
|
|
11
|
-
field: "createdOn",
|
|
12
|
-
unmappedType: "date"
|
|
13
|
-
}), new _CmsEntryElasticsearchFieldPlugin.CmsEntryElasticsearchFieldPlugin({
|
|
14
|
-
field: "savedOn",
|
|
15
|
-
unmappedType: "date"
|
|
16
|
-
}), new _CmsEntryElasticsearchFieldPlugin.CmsEntryElasticsearchFieldPlugin({
|
|
17
|
-
field: "publishedOn",
|
|
18
|
-
unmappedType: "date"
|
|
19
|
-
}), new _CmsEntryElasticsearchFieldPlugin.CmsEntryElasticsearchFieldPlugin({
|
|
20
|
-
field: "ownedBy",
|
|
21
|
-
path: "ownedBy.id"
|
|
22
|
-
}), new _CmsEntryElasticsearchFieldPlugin.CmsEntryElasticsearchFieldPlugin({
|
|
23
|
-
field: "createdBy",
|
|
24
|
-
path: "createdBy.id"
|
|
25
|
-
}), new _CmsEntryElasticsearchFieldPlugin.CmsEntryElasticsearchFieldPlugin({
|
|
26
|
-
field: "version",
|
|
27
|
-
path: "version"
|
|
28
|
-
}), new _CmsEntryElasticsearchFieldPlugin.CmsEntryElasticsearchFieldPlugin({
|
|
29
|
-
field: "status",
|
|
30
|
-
path: "status"
|
|
31
|
-
}),
|
|
32
|
-
/**
|
|
33
|
-
* Always add the ALL fields plugin because of the keyword/path build.
|
|
34
|
-
*/
|
|
35
|
-
new _CmsEntryElasticsearchFieldPlugin.CmsEntryElasticsearchFieldPlugin({
|
|
36
|
-
field: _CmsEntryElasticsearchFieldPlugin.CmsEntryElasticsearchFieldPlugin.ALL
|
|
37
|
-
})];
|
|
38
|
-
exports.elasticsearchFields = elasticsearchFields;
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|