@webiny/api-headless-cms-ddb-es 6.0.0 → 6.1.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 +2 -2
- package/configurations.js +2 -2
- package/configurations.js.map +1 -1
- package/elasticsearch/createElasticsearchIndex.d.ts +1 -1
- package/elasticsearch/createElasticsearchIndex.js +1 -1
- package/elasticsearch/createElasticsearchIndex.js.map +1 -1
- package/elasticsearch/deleteElasticsearchIndex.d.ts +1 -1
- package/elasticsearch/deleteElasticsearchIndex.js.map +1 -1
- package/elasticsearch/indexing/dateTimeIndexing.js +0 -6
- package/elasticsearch/indexing/dateTimeIndexing.js.map +1 -1
- package/elasticsearch/indices/base.js +1 -1
- package/elasticsearch/indices/base.js.map +1 -1
- package/index.js +6 -6
- package/index.js.map +1 -1
- package/operations/entry/dataLoader/DataLoaderCache.d.ts +1 -0
- package/operations/entry/dataLoader/DataLoaderCache.js +2 -5
- package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -1
- package/operations/entry/dataLoader/getAllEntryRevisions.js +5 -2
- package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -1
- package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +5 -1
- package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -1
- package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +5 -1
- package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -1
- package/operations/entry/dataLoader/getRevisionById.js +5 -1
- package/operations/entry/dataLoader/getRevisionById.js.map +1 -1
- package/operations/entry/dataLoader/types.d.ts +1 -0
- package/operations/entry/dataLoader/types.js.map +1 -1
- package/operations/entry/dataLoaders.js +3 -1
- package/operations/entry/dataLoaders.js.map +1 -1
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.d.ts +1 -1
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js.map +1 -1
- package/operations/entry/elasticsearch/body.d.ts +1 -1
- package/operations/entry/elasticsearch/body.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/applyFiltering.d.ts +3 -3
- package/operations/entry/elasticsearch/filtering/applyFiltering.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/exec.d.ts +2 -2
- package/operations/entry/elasticsearch/filtering/exec.js +1 -1
- package/operations/entry/elasticsearch/filtering/exec.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/path.d.ts +2 -2
- package/operations/entry/elasticsearch/filtering/path.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js +1 -1
- package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js +1 -1
- package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js.map +1 -1
- package/operations/entry/elasticsearch/filtering/populated.d.ts +2 -2
- package/operations/entry/elasticsearch/filtering/populated.js.map +1 -1
- package/operations/entry/elasticsearch/fullTextSearch.d.ts +2 -2
- package/operations/entry/elasticsearch/fullTextSearch.js +1 -1
- package/operations/entry/elasticsearch/fullTextSearch.js.map +1 -1
- package/operations/entry/elasticsearch/initialQuery.d.ts +3 -3
- package/operations/entry/elasticsearch/initialQuery.js +1 -1
- package/operations/entry/elasticsearch/initialQuery.js.map +1 -1
- package/operations/entry/elasticsearch/plugins/operator.d.ts +2 -2
- package/operations/entry/elasticsearch/plugins/operator.js +2 -2
- package/operations/entry/elasticsearch/plugins/operator.js.map +1 -1
- package/operations/entry/elasticsearch/plugins/search.d.ts +2 -2
- package/operations/entry/elasticsearch/plugins/search.js.map +1 -1
- package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js +1 -1
- package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js.map +1 -1
- package/operations/entry/elasticsearch/sort.d.ts +2 -2
- package/operations/entry/elasticsearch/sort.js +4 -4
- package/operations/entry/elasticsearch/sort.js.map +1 -1
- package/operations/entry/elasticsearch/transformValueForSearch.d.ts +2 -2
- package/operations/entry/elasticsearch/transformValueForSearch.js.map +1 -1
- package/operations/entry/elasticsearch/types.d.ts +4 -4
- package/operations/entry/elasticsearch/types.js.map +1 -1
- package/operations/entry/index.d.ts +2 -2
- package/operations/entry/index.js +1 -1
- package/operations/entry/index.js.map +1 -1
- package/operations/entry/transformations/index.js +1 -1
- package/operations/entry/transformations/index.js.map +1 -1
- package/operations/model/index.d.ts +1 -1
- package/operations/model/index.js.map +1 -1
- package/package.json +22 -23
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.d.ts +3 -3
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +2 -2
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js.map +1 -1
- package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.d.ts +2 -2
- package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js.map +1 -1
- package/plugins/CmsEntryElasticsearchIndexPlugin.d.ts +2 -2
- package/plugins/CmsEntryElasticsearchIndexPlugin.js +2 -2
- package/plugins/CmsEntryElasticsearchIndexPlugin.js.map +1 -1
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.d.ts +3 -3
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +2 -2
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js.map +1 -1
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.d.ts +3 -3
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +2 -2
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.js.map +1 -1
- package/plugins/CmsEntryFilterPlugin.d.ts +3 -3
- package/plugins/CmsEntryFilterPlugin.js.map +1 -1
- package/types.d.ts +2 -2
- package/types.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getBaseFieldType","transformValueForSearch","params","field","plugins","value","fieldType","plugin","transform"],"sources":["transformValueForSearch.ts"],"sourcesContent":["/**\n * We use any for input and output because they really can be anything.\n * Plugin, if exists, makes sure that response value is correct.\n */\nimport type { CmsModelField } from \"@webiny/api-headless-cms/types/index.js\";\nimport type {
|
|
1
|
+
{"version":3,"names":["getBaseFieldType","transformValueForSearch","params","field","plugins","value","fieldType","plugin","transform"],"sources":["transformValueForSearch.ts"],"sourcesContent":["/**\n * We use any for input and output because they really can be anything.\n * Plugin, if exists, makes sure that response value is correct.\n */\nimport type { CmsModelField } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { OpenSearchQuerySearchValuePlugins } from \"./types.js\";\nimport { getBaseFieldType } from \"@webiny/api-headless-cms/utils/getBaseFieldType.js\";\n\ninterface Params {\n plugins: OpenSearchQuerySearchValuePlugins;\n field: CmsModelField;\n value: any;\n}\n\n/**\n * Transformed value can be anything.\n */\nexport const transformValueForSearch = (params: Params): any => {\n const { field, plugins, value } = params;\n const fieldType = getBaseFieldType(field);\n const plugin = plugins[fieldType];\n if (!plugin) {\n return value;\n }\n return plugin.transform({ field, value });\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;;AAGA,SAASA,gBAAgB,QAAQ,oDAAoD;AAQrF;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAIC,MAAc,IAAU;EAC5D,MAAM;IAAEC,KAAK;IAAEC,OAAO;IAAEC;EAAM,CAAC,GAAGH,MAAM;EACxC,MAAMI,SAAS,GAAGN,gBAAgB,CAACG,KAAK,CAAC;EACzC,MAAMI,MAAM,GAAGH,OAAO,CAACE,SAAS,CAAC;EACjC,IAAI,CAACC,MAAM,EAAE;IACT,OAAOF,KAAK;EAChB;EACA,OAAOE,MAAM,CAACC,SAAS,CAAC;IAAEL,KAAK;IAAEE;EAAM,CAAC,CAAC;AAC7C,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CmsEntryElasticsearchQueryBuilderValueSearchPlugin } from "../../../plugins/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { OpenSearchQueryBuilderOperatorPlugin } from "@webiny/api-opensearch";
|
|
3
3
|
import type { CmsModelField } from "@webiny/api-headless-cms/types/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* ./fields
|
|
@@ -29,13 +29,13 @@ export interface ModelFields {
|
|
|
29
29
|
/**
|
|
30
30
|
* ./plugins/operator
|
|
31
31
|
*/
|
|
32
|
-
export interface
|
|
33
|
-
[key: string]:
|
|
32
|
+
export interface OpenSearchQueryBuilderOperatorPlugins {
|
|
33
|
+
[key: string]: OpenSearchQueryBuilderOperatorPlugin;
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* ./plugins/search
|
|
37
37
|
*/
|
|
38
|
-
export interface
|
|
38
|
+
export interface OpenSearchQuerySearchValuePlugins {
|
|
39
39
|
[fieldType: string]: CmsEntryElasticsearchQueryBuilderValueSearchPlugin;
|
|
40
40
|
}
|
|
41
41
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { CmsEntryElasticsearchQueryBuilderValueSearchPlugin } from \"~/plugins/index.js\";\nimport type {
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { CmsEntryElasticsearchQueryBuilderValueSearchPlugin } from \"~/plugins/index.js\";\nimport type { OpenSearchQueryBuilderOperatorPlugin } from \"@webiny/api-opensearch\";\nimport type { CmsModelField } from \"@webiny/api-headless-cms/types/index.js\";\n\n/**\n * ./fields\n */\ntype ModelFieldPath = string | ((value: string) => string);\n\nexport type FieldType = \"text\" | \"date\" | \"datetime\" | \"time\" | \"number\" | \"boolean\" | string;\n\nexport interface ModelFieldParent {\n fieldId: string;\n storageId: string;\n type: FieldType;\n}\nexport interface ModelField {\n unmappedType?: string;\n keyword?: boolean;\n searchable: boolean;\n sortable: boolean;\n type: FieldType;\n systemField?: boolean;\n field: CmsModelField;\n path?: ModelFieldPath;\n fullTextSearch?: boolean;\n parents: ModelFieldParent[];\n}\n\nexport interface ModelFields {\n [fieldId: string]: ModelField;\n}\n\n/**\n * ./plugins/operator\n */\nexport interface OpenSearchQueryBuilderOperatorPlugins {\n [key: string]: OpenSearchQueryBuilderOperatorPlugin;\n}\n/**\n * ./plugins/search\n */\nexport interface OpenSearchQuerySearchValuePlugins {\n [fieldType: string]: CmsEntryElasticsearchQueryBuilderValueSearchPlugin;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Client } from "@
|
|
1
|
+
import type { Client } from "@webiny/api-opensearch";
|
|
2
2
|
import type { PluginsContainer } from "@webiny/plugins";
|
|
3
|
-
import { type IElasticsearchEntity } from "@webiny/api-
|
|
3
|
+
import { type IOpenSearchEntity as IElasticsearchEntity } from "@webiny/api-opensearch";
|
|
4
4
|
import type { CmsEntryStorageOperations } from "../../types.js";
|
|
5
5
|
import type { IEntryEntity } from "../../definitions/types.js";
|
|
6
6
|
export interface CreateEntriesStorageOperationsParams {
|
|
@@ -4,7 +4,7 @@ import { extractEntriesFromIndex } from "../../helpers/index.js";
|
|
|
4
4
|
import { configurations } from "../../configurations.js";
|
|
5
5
|
import { DataLoadersHandler } from "./dataLoaders.js";
|
|
6
6
|
import { createEntryLatestKeys, createEntryPublishedKeys, createEntryRevisionKeys, createLatestSortKey, createPartitionKey, createPublishedSortKey, createRevisionSortKey } from "./keys.js";
|
|
7
|
-
import { compress, createLimit, decodeCursor, decompress, encodeCursor } from "@webiny/api-
|
|
7
|
+
import { compress, createLimit, decodeCursor, decompress, encodeCursor } from "@webiny/api-opensearch";
|
|
8
8
|
import { createElasticsearchBody } from "./elasticsearch/body.js";
|
|
9
9
|
import { shouldIgnoreEsResponseError } from "./elasticsearch/shouldIgnoreEsResponseError.js";
|
|
10
10
|
import { StorageOperationsCmsModelPlugin } from "@webiny/api-headless-cms";
|