@webiny/api-headless-cms-ddb-es 6.0.0 → 6.1.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/configurations.d.ts +2 -2
  2. package/configurations.js +2 -2
  3. package/configurations.js.map +1 -1
  4. package/elasticsearch/createElasticsearchIndex.d.ts +1 -1
  5. package/elasticsearch/createElasticsearchIndex.js +1 -1
  6. package/elasticsearch/createElasticsearchIndex.js.map +1 -1
  7. package/elasticsearch/deleteElasticsearchIndex.d.ts +1 -1
  8. package/elasticsearch/deleteElasticsearchIndex.js.map +1 -1
  9. package/elasticsearch/indexing/dateTimeIndexing.js +0 -6
  10. package/elasticsearch/indexing/dateTimeIndexing.js.map +1 -1
  11. package/elasticsearch/indices/base.js +1 -1
  12. package/elasticsearch/indices/base.js.map +1 -1
  13. package/index.js +6 -6
  14. package/index.js.map +1 -1
  15. package/operations/entry/dataLoader/DataLoaderCache.d.ts +1 -0
  16. package/operations/entry/dataLoader/DataLoaderCache.js +2 -5
  17. package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -1
  18. package/operations/entry/dataLoader/getAllEntryRevisions.js +5 -2
  19. package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -1
  20. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +5 -1
  21. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -1
  22. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +5 -1
  23. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -1
  24. package/operations/entry/dataLoader/getRevisionById.js +5 -1
  25. package/operations/entry/dataLoader/getRevisionById.js.map +1 -1
  26. package/operations/entry/dataLoader/types.d.ts +1 -0
  27. package/operations/entry/dataLoader/types.js.map +1 -1
  28. package/operations/entry/dataLoaders.js +3 -1
  29. package/operations/entry/dataLoaders.js.map +1 -1
  30. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.d.ts +1 -1
  31. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js.map +1 -1
  32. package/operations/entry/elasticsearch/body.d.ts +1 -1
  33. package/operations/entry/elasticsearch/body.js.map +1 -1
  34. package/operations/entry/elasticsearch/filtering/applyFiltering.d.ts +3 -3
  35. package/operations/entry/elasticsearch/filtering/applyFiltering.js.map +1 -1
  36. package/operations/entry/elasticsearch/filtering/exec.d.ts +2 -2
  37. package/operations/entry/elasticsearch/filtering/exec.js +1 -1
  38. package/operations/entry/elasticsearch/filtering/exec.js.map +1 -1
  39. package/operations/entry/elasticsearch/filtering/path.d.ts +2 -2
  40. package/operations/entry/elasticsearch/filtering/path.js.map +1 -1
  41. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js +1 -1
  42. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js.map +1 -1
  43. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js +1 -1
  44. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js.map +1 -1
  45. package/operations/entry/elasticsearch/filtering/populated.d.ts +2 -2
  46. package/operations/entry/elasticsearch/filtering/populated.js.map +1 -1
  47. package/operations/entry/elasticsearch/fullTextSearch.d.ts +2 -2
  48. package/operations/entry/elasticsearch/fullTextSearch.js +1 -1
  49. package/operations/entry/elasticsearch/fullTextSearch.js.map +1 -1
  50. package/operations/entry/elasticsearch/initialQuery.d.ts +3 -3
  51. package/operations/entry/elasticsearch/initialQuery.js +1 -1
  52. package/operations/entry/elasticsearch/initialQuery.js.map +1 -1
  53. package/operations/entry/elasticsearch/plugins/operator.d.ts +2 -2
  54. package/operations/entry/elasticsearch/plugins/operator.js +2 -2
  55. package/operations/entry/elasticsearch/plugins/operator.js.map +1 -1
  56. package/operations/entry/elasticsearch/plugins/search.d.ts +2 -2
  57. package/operations/entry/elasticsearch/plugins/search.js.map +1 -1
  58. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js +1 -1
  59. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js.map +1 -1
  60. package/operations/entry/elasticsearch/sort.d.ts +2 -2
  61. package/operations/entry/elasticsearch/sort.js +4 -4
  62. package/operations/entry/elasticsearch/sort.js.map +1 -1
  63. package/operations/entry/elasticsearch/transformValueForSearch.d.ts +2 -2
  64. package/operations/entry/elasticsearch/transformValueForSearch.js.map +1 -1
  65. package/operations/entry/elasticsearch/types.d.ts +4 -4
  66. package/operations/entry/elasticsearch/types.js.map +1 -1
  67. package/operations/entry/index.d.ts +2 -2
  68. package/operations/entry/index.js +1 -1
  69. package/operations/entry/index.js.map +1 -1
  70. package/operations/entry/transformations/index.js +1 -1
  71. package/operations/entry/transformations/index.js.map +1 -1
  72. package/operations/model/index.d.ts +1 -1
  73. package/operations/model/index.js.map +1 -1
  74. package/package.json +22 -23
  75. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.d.ts +3 -3
  76. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +2 -2
  77. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js.map +1 -1
  78. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.d.ts +2 -2
  79. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js.map +1 -1
  80. package/plugins/CmsEntryElasticsearchIndexPlugin.d.ts +2 -2
  81. package/plugins/CmsEntryElasticsearchIndexPlugin.js +2 -2
  82. package/plugins/CmsEntryElasticsearchIndexPlugin.js.map +1 -1
  83. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.d.ts +3 -3
  84. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +2 -2
  85. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js.map +1 -1
  86. package/plugins/CmsEntryElasticsearchSortModifierPlugin.d.ts +3 -3
  87. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +2 -2
  88. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js.map +1 -1
  89. package/plugins/CmsEntryFilterPlugin.d.ts +3 -3
  90. package/plugins/CmsEntryFilterPlugin.js.map +1 -1
  91. package/types.d.ts +2 -2
  92. 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 { ElasticsearchQuerySearchValuePlugins } from \"./types.js\";\nimport { getBaseFieldType } from \"@webiny/api-headless-cms/utils/getBaseFieldType.js\";\n\ninterface Params {\n plugins: ElasticsearchQuerySearchValuePlugins;\n field: CmsModelField;\n value: any;\n}\n\n/**\n * Transformed value can be anything.\n */\nexport const transformValueForSearch = (params: Params): any => {\n const { field, plugins, value } = params;\n const 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
+ {"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 { ElasticsearchQueryBuilderOperatorPlugin } from "@webiny/api-elasticsearch";
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 ElasticsearchQueryBuilderOperatorPlugins {
33
- [key: string]: ElasticsearchQueryBuilderOperatorPlugin;
32
+ export interface OpenSearchQueryBuilderOperatorPlugins {
33
+ [key: string]: OpenSearchQueryBuilderOperatorPlugin;
34
34
  }
35
35
  /**
36
36
  * ./plugins/search
37
37
  */
38
- export interface ElasticsearchQuerySearchValuePlugins {
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 { ElasticsearchQueryBuilderOperatorPlugin } from \"@webiny/api-elasticsearch\";\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 ElasticsearchQueryBuilderOperatorPlugins {\n [key: string]: ElasticsearchQueryBuilderOperatorPlugin;\n}\n/**\n * ./plugins/search\n */\nexport interface ElasticsearchQuerySearchValuePlugins {\n [fieldType: string]: CmsEntryElasticsearchQueryBuilderValueSearchPlugin;\n}\n"],"mappings":"","ignoreList":[]}
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 "@elastic/elasticsearch";
1
+ import type { Client } from "@webiny/api-opensearch";
2
2
  import type { PluginsContainer } from "@webiny/plugins";
3
- import { type IElasticsearchEntity } from "@webiny/api-elasticsearch";
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-elasticsearch";
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";