@webiny/api-headless-cms-ddb-es 0.0.0-unstable.a4f3e4ea8b → 0.0.0-unstable.a85ef555b2
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/abstractions/CmsDdbEsDataLoaders.d.ts +5 -0
- package/abstractions/CmsDdbEsDataLoaders.js +5 -0
- package/abstractions/CmsDdbEsDataLoaders.js.map +1 -0
- package/abstractions/CmsDdbEsEntriesEsEntity.d.ts +5 -0
- package/abstractions/CmsDdbEsEntriesEsEntity.js +5 -0
- package/abstractions/CmsDdbEsEntriesEsEntity.js.map +1 -0
- package/abstractions/CmsDdbEsEntryEntity.d.ts +5 -0
- package/abstractions/CmsDdbEsEntryEntity.js +5 -0
- package/abstractions/CmsDdbEsEntryEntity.js.map +1 -0
- package/abstractions/CmsDdbEsGroupEntity.d.ts +5 -0
- package/abstractions/CmsDdbEsGroupEntity.js +5 -0
- package/abstractions/CmsDdbEsGroupEntity.js.map +1 -0
- package/abstractions/CmsDdbEsModelEntity.d.ts +5 -0
- package/abstractions/CmsDdbEsModelEntity.js +5 -0
- package/abstractions/CmsDdbEsModelEntity.js.map +1 -0
- package/abstractions/CmsDdbEsOsTable.d.ts +5 -0
- package/abstractions/CmsDdbEsOsTable.js +5 -0
- package/abstractions/CmsDdbEsOsTable.js.map +1 -0
- package/abstractions/CmsDdbEsTable.d.ts +5 -0
- package/abstractions/CmsDdbEsTable.js +5 -0
- package/abstractions/CmsDdbEsTable.js.map +1 -0
- package/debuggerNamespaces.d.ts +12 -0
- package/feature.d.ts +10 -1
- package/feature.js +48 -180
- package/feature.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/operations/entry/DdbEsCreateEntry.d.ts +24 -0
- package/operations/entry/DdbEsCreateEntry.js +134 -0
- package/operations/entry/DdbEsCreateEntry.js.map +1 -0
- package/operations/entry/DdbEsCreateEntryRevisionFrom.d.ts +24 -0
- package/operations/entry/DdbEsCreateEntryRevisionFrom.js +139 -0
- package/operations/entry/DdbEsCreateEntryRevisionFrom.js.map +1 -0
- package/operations/entry/DdbEsDeleteEntry.d.ts +18 -0
- package/operations/entry/DdbEsDeleteEntry.js +79 -0
- package/operations/entry/DdbEsDeleteEntry.js.map +1 -0
- package/operations/entry/DdbEsDeleteEntryRevision.d.ts +24 -0
- package/operations/entry/DdbEsDeleteEntryRevision.js +136 -0
- package/operations/entry/DdbEsDeleteEntryRevision.js.map +1 -0
- package/operations/entry/DdbEsDeleteMultipleEntries.d.ts +18 -0
- package/operations/entry/DdbEsDeleteMultipleEntries.js +80 -0
- package/operations/entry/DdbEsDeleteMultipleEntries.js.map +1 -0
- package/operations/entry/DdbEsGetEntriesByIds.d.ts +14 -0
- package/operations/entry/DdbEsGetEntriesByIds.js +31 -0
- package/operations/entry/DdbEsGetEntriesByIds.js.map +1 -0
- package/operations/entry/DdbEsGetEntry.d.ts +14 -0
- package/operations/entry/DdbEsGetEntry.js +27 -0
- package/operations/entry/DdbEsGetEntry.js.map +1 -0
- package/operations/entry/DdbEsGetLatestEntriesByIds.d.ts +14 -0
- package/operations/entry/DdbEsGetLatestEntriesByIds.js +31 -0
- package/operations/entry/DdbEsGetLatestEntriesByIds.js.map +1 -0
- package/operations/entry/DdbEsGetLatestRevisionByEntryId.d.ts +14 -0
- package/operations/entry/DdbEsGetLatestRevisionByEntryId.js +34 -0
- package/operations/entry/DdbEsGetLatestRevisionByEntryId.js.map +1 -0
- package/operations/entry/DdbEsGetPreviousRevision.d.ts +14 -0
- package/operations/entry/DdbEsGetPreviousRevision.js +56 -0
- package/operations/entry/DdbEsGetPreviousRevision.js.map +1 -0
- package/operations/entry/DdbEsGetPublishedEntriesByIds.d.ts +14 -0
- package/operations/entry/DdbEsGetPublishedEntriesByIds.js +31 -0
- package/operations/entry/DdbEsGetPublishedEntriesByIds.js.map +1 -0
- package/operations/entry/DdbEsGetPublishedRevisionByEntryId.d.ts +14 -0
- package/operations/entry/DdbEsGetPublishedRevisionByEntryId.js +34 -0
- package/operations/entry/DdbEsGetPublishedRevisionByEntryId.js.map +1 -0
- package/operations/entry/DdbEsGetRevisionById.d.ts +14 -0
- package/operations/entry/DdbEsGetRevisionById.js +34 -0
- package/operations/entry/DdbEsGetRevisionById.js.map +1 -0
- package/operations/entry/DdbEsGetRevisions.d.ts +14 -0
- package/operations/entry/DdbEsGetRevisions.js +33 -0
- package/operations/entry/DdbEsGetRevisions.js.map +1 -0
- package/operations/entry/DdbEsGetUniqueFieldValues.d.ts +18 -0
- package/operations/entry/DdbEsGetUniqueFieldValues.js +77 -0
- package/operations/entry/DdbEsGetUniqueFieldValues.js.map +1 -0
- package/operations/entry/DdbEsListEntries.d.ts +28 -0
- package/operations/entry/DdbEsListEntries.js +110 -0
- package/operations/entry/DdbEsListEntries.js.map +1 -0
- package/operations/entry/DdbEsMoveEntry.d.ts +20 -0
- package/operations/entry/DdbEsMoveEntry.js +113 -0
- package/operations/entry/DdbEsMoveEntry.js.map +1 -0
- package/operations/entry/DdbEsMoveToBin.d.ts +23 -0
- package/operations/entry/DdbEsMoveToBin.js +137 -0
- package/operations/entry/DdbEsMoveToBin.js.map +1 -0
- package/operations/entry/DdbEsPublishEntry.d.ts +24 -0
- package/operations/entry/DdbEsPublishEntry.js +231 -0
- package/operations/entry/DdbEsPublishEntry.js.map +1 -0
- package/operations/entry/DdbEsRestoreFromBin.d.ts +23 -0
- package/operations/entry/DdbEsRestoreFromBin.js +137 -0
- package/operations/entry/DdbEsRestoreFromBin.js.map +1 -0
- package/operations/entry/DdbEsUnpublishEntry.d.ts +24 -0
- package/operations/entry/DdbEsUnpublishEntry.js +127 -0
- package/operations/entry/DdbEsUnpublishEntry.js.map +1 -0
- package/operations/entry/DdbEsUpdateEntry.d.ts +24 -0
- package/operations/entry/DdbEsUpdateEntry.js +175 -0
- package/operations/entry/DdbEsUpdateEntry.js.map +1 -0
- package/operations/entry/dataLoaders.d.ts +5 -5
- package/operations/entry/dataLoaders.js +11 -3
- package/operations/entry/dataLoaders.js.map +1 -1
- package/{features/CmsModelOpenSearchIndex → operations/entry}/feature.d.ts +1 -1
- package/operations/entry/feature.js +55 -0
- package/operations/entry/feature.js.map +1 -0
- package/operations/entry/storageEntryUtils.d.ts +7 -0
- package/operations/entry/storageEntryUtils.js +14 -0
- package/operations/entry/storageEntryUtils.js.map +1 -0
- package/operations/entry/transformations/index.d.ts +2 -3
- package/operations/entry/transformations/index.js +1 -1
- package/operations/entry/transformations/index.js.map +1 -1
- package/operations/entry/transformations/modifyEntryValues.d.ts +1 -1
- package/operations/entry/transformations/modifyEntryValues.js.map +1 -1
- package/operations/group/DdbEsCreateGroup.d.ts +12 -0
- package/operations/group/DdbEsCreateGroup.js +35 -0
- package/operations/group/DdbEsCreateGroup.js.map +1 -0
- package/operations/group/DdbEsDeleteGroup.d.ts +12 -0
- package/operations/group/DdbEsDeleteGroup.js +31 -0
- package/operations/group/DdbEsDeleteGroup.js.map +1 -0
- package/operations/group/DdbEsGetGroup.d.ts +12 -0
- package/operations/group/DdbEsGetGroup.js +31 -0
- package/operations/group/DdbEsGetGroup.js.map +1 -0
- package/operations/group/DdbEsListGroups.d.ts +14 -0
- package/operations/group/DdbEsListGroups.js +52 -0
- package/operations/group/DdbEsListGroups.js.map +1 -0
- package/operations/group/DdbEsUpdateGroup.d.ts +12 -0
- package/operations/group/DdbEsUpdateGroup.js +35 -0
- package/operations/group/DdbEsUpdateGroup.js.map +1 -0
- package/{features/CmsEntryOpenSearchFilter → operations/group}/feature.d.ts +1 -1
- package/operations/group/feature.js +19 -0
- package/operations/group/feature.js.map +1 -0
- package/operations/group/keys.d.ts +15 -0
- package/operations/group/keys.js +17 -0
- package/operations/group/keys.js.map +1 -0
- package/operations/model/DdbEsCreateModel.d.ts +16 -0
- package/operations/model/DdbEsCreateModel.js +56 -0
- package/operations/model/DdbEsCreateModel.js.map +1 -0
- package/operations/model/DdbEsDeleteModel.d.ts +12 -0
- package/operations/model/DdbEsDeleteModel.js +31 -0
- package/operations/model/DdbEsDeleteModel.js.map +1 -0
- package/operations/model/DdbEsGetModel.d.ts +12 -0
- package/operations/model/DdbEsGetModel.js +30 -0
- package/operations/model/DdbEsGetModel.js.map +1 -0
- package/operations/model/DdbEsListModels.d.ts +12 -0
- package/operations/model/DdbEsListModels.js +36 -0
- package/operations/model/DdbEsListModels.js.map +1 -0
- package/operations/model/DdbEsUpdateModel.d.ts +12 -0
- package/operations/model/DdbEsUpdateModel.js +36 -0
- package/operations/model/DdbEsUpdateModel.js.map +1 -0
- package/{features/CmsEntryOpenSearchFieldIndex → operations/model}/feature.d.ts +1 -1
- package/operations/model/feature.js +19 -0
- package/operations/model/feature.js.map +1 -0
- package/operations/model/keys.d.ts +15 -0
- package/operations/model/keys.js +17 -0
- package/operations/model/keys.js.map +1 -0
- package/package.json +27 -23
- package/registry/CmsEntitiesDbRegistryDecorator.d.ts +27 -0
- package/registry/CmsEntitiesDbRegistryDecorator.js +46 -0
- package/registry/CmsEntitiesDbRegistryDecorator.js.map +1 -0
- package/tasks/CreateElasticsearchIndexTask.d.ts +6 -7
- package/tasks/CreateElasticsearchIndexTask.js +14 -12
- package/tasks/CreateElasticsearchIndexTask.js.map +1 -1
- package/types.d.ts +9 -45
- package/types.js.map +1 -1
- package/configurations.d.ts +0 -22
- package/configurations.js +0 -37
- package/configurations.js.map +0 -1
- package/elasticsearch/createElasticsearchIndex.d.ts +0 -9
- package/elasticsearch/createElasticsearchIndex.js +0 -45
- package/elasticsearch/createElasticsearchIndex.js.map +0 -1
- package/elasticsearch/deleteElasticsearchIndex.d.ts +0 -10
- package/elasticsearch/deleteElasticsearchIndex.js +0 -23
- package/elasticsearch/deleteElasticsearchIndex.js.map +0 -1
- package/exports/api/cms/opensearch.d.ts +0 -9
- package/exports/api/cms/opensearch.js +0 -9
- package/features/CmsEntryOpenSearchBodyModifier/abstractions.d.ts +0 -16
- package/features/CmsEntryOpenSearchBodyModifier/abstractions.js +0 -5
- package/features/CmsEntryOpenSearchBodyModifier/abstractions.js.map +0 -1
- package/features/CmsEntryOpenSearchBodyModifier/index.d.ts +0 -1
- package/features/CmsEntryOpenSearchBodyModifier/index.js +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.d.ts +0 -14
- package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js +0 -42
- package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.d.ts +0 -32
- package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js +0 -5
- package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.d.ts +0 -11
- package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.js +0 -5
- package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/constants.d.ts +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/constants.js +0 -4
- package/features/CmsEntryOpenSearchFieldIndex/constants.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/feature.js +0 -29
- package/features/CmsEntryOpenSearchFieldIndex/feature.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.d.ts +0 -11
- package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js +0 -60
- package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.d.ts +0 -13
- package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.js +0 -33
- package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.d.ts +0 -10
- package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.js +0 -21
- package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.d.ts +0 -10
- package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.js +0 -22
- package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.d.ts +0 -11
- package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js +0 -32
- package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.d.ts +0 -12
- package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js +0 -116
- package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.d.ts +0 -10
- package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js +0 -21
- package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.d.ts +0 -15
- package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.js +0 -40
- package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.d.ts +0 -15
- package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.js +0 -40
- package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/index.d.ts +0 -3
- package/features/CmsEntryOpenSearchFieldIndex/index.js +0 -3
- package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.d.ts +0 -11
- package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js +0 -36
- package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js.map +0 -1
- package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.d.ts +0 -37
- package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js +0 -5
- package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js.map +0 -1
- package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.d.ts +0 -9
- package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js +0 -5
- package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js.map +0 -1
- package/features/CmsEntryOpenSearchFilter/constants.d.ts +0 -1
- package/features/CmsEntryOpenSearchFilter/constants.js +0 -4
- package/features/CmsEntryOpenSearchFilter/constants.js.map +0 -1
- package/features/CmsEntryOpenSearchFilter/feature.js +0 -17
- package/features/CmsEntryOpenSearchFilter/feature.js.map +0 -1
- package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.d.ts +0 -9
- package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js +0 -26
- package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js.map +0 -1
- package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.d.ts +0 -9
- package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js +0 -43
- package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js.map +0 -1
- package/features/CmsEntryOpenSearchFilter/fields/RefFilter.d.ts +0 -9
- package/features/CmsEntryOpenSearchFilter/fields/RefFilter.js +0 -36
- package/features/CmsEntryOpenSearchFilter/fields/RefFilter.js.map +0 -1
- package/features/CmsEntryOpenSearchFilter/index.d.ts +0 -3
- package/features/CmsEntryOpenSearchFilter/index.js +0 -3
- package/features/CmsEntryOpenSearchFullTextSearch/abstractions.d.ts +0 -20
- package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js +0 -5
- package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js.map +0 -1
- package/features/CmsEntryOpenSearchFullTextSearch/index.d.ts +0 -1
- package/features/CmsEntryOpenSearchFullTextSearch/index.js +0 -1
- package/features/CmsEntryOpenSearchQueryModifier/abstractions.d.ts +0 -16
- package/features/CmsEntryOpenSearchQueryModifier/abstractions.js +0 -5
- package/features/CmsEntryOpenSearchQueryModifier/abstractions.js.map +0 -1
- package/features/CmsEntryOpenSearchQueryModifier/index.d.ts +0 -1
- package/features/CmsEntryOpenSearchQueryModifier/index.js +0 -1
- package/features/CmsEntryOpenSearchSortModifier/abstractions.d.ts +0 -15
- package/features/CmsEntryOpenSearchSortModifier/abstractions.js +0 -5
- package/features/CmsEntryOpenSearchSortModifier/abstractions.js.map +0 -1
- package/features/CmsEntryOpenSearchSortModifier/index.d.ts +0 -1
- package/features/CmsEntryOpenSearchSortModifier/index.js +0 -1
- package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.d.ts +0 -12
- package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js +0 -31
- package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js.map +0 -1
- package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.d.ts +0 -22
- package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js +0 -5
- package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js.map +0 -1
- package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.d.ts +0 -10
- package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js +0 -5
- package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js.map +0 -1
- package/features/CmsEntryOpenSearchValueSearch/feature.d.ts +0 -4
- package/features/CmsEntryOpenSearchValueSearch/feature.js +0 -17
- package/features/CmsEntryOpenSearchValueSearch/feature.js.map +0 -1
- package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.d.ts +0 -10
- package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js +0 -21
- package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js.map +0 -1
- package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.d.ts +0 -10
- package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js +0 -44
- package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js.map +0 -1
- package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.d.ts +0 -10
- package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js +0 -22
- package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js.map +0 -1
- package/features/CmsEntryOpenSearchValueSearch/index.d.ts +0 -3
- package/features/CmsEntryOpenSearchValueSearch/index.js +0 -3
- package/features/CmsEntryOpenSearchValuesModifier/abstractions.d.ts +0 -23
- package/features/CmsEntryOpenSearchValuesModifier/abstractions.js +0 -5
- package/features/CmsEntryOpenSearchValuesModifier/abstractions.js.map +0 -1
- package/features/CmsEntryOpenSearchValuesModifier/index.d.ts +0 -1
- package/features/CmsEntryOpenSearchValuesModifier/index.js +0 -1
- package/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.d.ts +0 -25
- package/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.js +0 -36
- package/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.js.map +0 -1
- package/features/CmsModelOpenSearchIndex/DefaultCmsModelOpenSearchIndex.d.ts +0 -8
- package/features/CmsModelOpenSearchIndex/DefaultCmsModelOpenSearchIndex.js +0 -17
- package/features/CmsModelOpenSearchIndex/DefaultCmsModelOpenSearchIndex.js.map +0 -1
- package/features/CmsModelOpenSearchIndex/abstractions.d.ts +0 -20
- package/features/CmsModelOpenSearchIndex/abstractions.js +0 -5
- package/features/CmsModelOpenSearchIndex/abstractions.js.map +0 -1
- package/features/CmsModelOpenSearchIndex/feature.js +0 -13
- package/features/CmsModelOpenSearchIndex/feature.js.map +0 -1
- package/features/CmsModelOpenSearchIndex/index.d.ts +0 -3
- package/features/CmsModelOpenSearchIndex/index.js +0 -3
- package/helpers/entryIndexHelpers.d.ts +0 -20
- package/helpers/entryIndexHelpers.js +0 -80
- package/helpers/entryIndexHelpers.js.map +0 -1
- package/helpers/fieldIdentifier.d.ts +0 -6
- package/helpers/fieldIdentifier.js +0 -23
- package/helpers/fieldIdentifier.js.map +0 -1
- package/helpers/index.d.ts +0 -2
- package/helpers/index.js +0 -2
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.d.ts +0 -18
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js +0 -9
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js.map +0 -1
- package/operations/entry/elasticsearch/body.d.ts +0 -32
- package/operations/entry/elasticsearch/body.js +0 -89
- package/operations/entry/elasticsearch/body.js.map +0 -1
- package/operations/entry/elasticsearch/fields/createSystemField.d.ts +0 -4
- package/operations/entry/elasticsearch/fields/createSystemField.js +0 -9
- package/operations/entry/elasticsearch/fields/createSystemField.js.map +0 -1
- package/operations/entry/elasticsearch/fields/live.d.ts +0 -2
- package/operations/entry/elasticsearch/fields/live.js +0 -50
- package/operations/entry/elasticsearch/fields/live.js.map +0 -1
- package/operations/entry/elasticsearch/fields/location.d.ts +0 -2
- package/operations/entry/elasticsearch/fields/location.js +0 -50
- package/operations/entry/elasticsearch/fields/location.js.map +0 -1
- package/operations/entry/elasticsearch/fields/state.d.ts +0 -2
- package/operations/entry/elasticsearch/fields/state.js +0 -104
- package/operations/entry/elasticsearch/fields/state.js.map +0 -1
- package/operations/entry/elasticsearch/fields.d.ts +0 -12
- package/operations/entry/elasticsearch/fields.js +0 -207
- package/operations/entry/elasticsearch/fields.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/applyFiltering.d.ts +0 -9
- package/operations/entry/elasticsearch/filtering/applyFiltering.js +0 -39
- package/operations/entry/elasticsearch/filtering/applyFiltering.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/exec.d.ts +0 -22
- package/operations/entry/elasticsearch/filtering/exec.js +0 -96
- package/operations/entry/elasticsearch/filtering/exec.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/index.d.ts +0 -1
- package/operations/entry/elasticsearch/filtering/index.js +0 -1
- package/operations/entry/elasticsearch/filtering/path.d.ts +0 -17
- package/operations/entry/elasticsearch/filtering/path.js +0 -27
- package/operations/entry/elasticsearch/filtering/path.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/populated.d.ts +0 -2
- package/operations/entry/elasticsearch/filtering/populated.js +0 -12
- package/operations/entry/elasticsearch/filtering/populated.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/values.d.ts +0 -2
- package/operations/entry/elasticsearch/filtering/values.js +0 -15
- package/operations/entry/elasticsearch/filtering/values.js.map +0 -1
- package/operations/entry/elasticsearch/fullTextSearch.d.ts +0 -13
- package/operations/entry/elasticsearch/fullTextSearch.js +0 -53
- package/operations/entry/elasticsearch/fullTextSearch.js.map +0 -1
- package/operations/entry/elasticsearch/fullTextSearchFields.d.ts +0 -8
- package/operations/entry/elasticsearch/fullTextSearchFields.js +0 -10
- package/operations/entry/elasticsearch/fullTextSearchFields.js.map +0 -1
- package/operations/entry/elasticsearch/initialQuery.d.ts +0 -18
- package/operations/entry/elasticsearch/initialQuery.js +0 -43
- package/operations/entry/elasticsearch/initialQuery.js.map +0 -1
- package/operations/entry/elasticsearch/keyword.d.ts +0 -2
- package/operations/entry/elasticsearch/keyword.js +0 -17
- package/operations/entry/elasticsearch/keyword.js.map +0 -1
- package/operations/entry/elasticsearch/plugins/operator.d.ts +0 -7
- package/operations/entry/elasticsearch/plugins/operator.js +0 -10
- package/operations/entry/elasticsearch/plugins/operator.js.map +0 -1
- package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.d.ts +0 -2
- package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js +0 -8
- package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js.map +0 -1
- package/operations/entry/elasticsearch/sort.d.ts +0 -15
- package/operations/entry/elasticsearch/sort.js +0 -80
- package/operations/entry/elasticsearch/sort.js.map +0 -1
- package/operations/entry/elasticsearch/transformValueForSearch.d.ts +0 -9
- package/operations/entry/elasticsearch/transformValueForSearch.js +0 -12
- package/operations/entry/elasticsearch/transformValueForSearch.js.map +0 -1
- package/operations/entry/elasticsearch/types.d.ts +0 -31
- package/operations/entry/index.d.ts +0 -38
- package/operations/entry/index.js +0 -1403
- package/operations/entry/index.js.map +0 -1
- package/operations/entry/transformations/transformEntryToIndex.d.ts +0 -10
- package/operations/entry/transformations/transformEntryToIndex.js +0 -20
- package/operations/entry/transformations/transformEntryToIndex.js.map +0 -1
- package/operations/group/index.d.ts +0 -9
- package/operations/group/index.js +0 -121
- package/operations/group/index.js.map +0 -1
- package/operations/model/index.d.ts +0 -10
- package/operations/model/index.js +0 -119
- package/operations/model/index.js.map +0 -1
- package/values/NoValueContainer.d.ts +0 -5
- package/values/NoValueContainer.js +0 -11
- package/values/NoValueContainer.js.map +0 -1
- /package/{operations/entry/elasticsearch/types.js → debuggerNamespaces.js} +0 -0
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import error from "@webiny/error";
|
|
2
|
-
const getWhereValues = (value, condition)=>{
|
|
3
|
-
const values = value;
|
|
4
|
-
if (Array.isArray(values)) {
|
|
5
|
-
if (0 === values.length) throw new error(`Trying to run filtering with "${condition}", but the value sent is empty array.`, `MALFORMED_${condition}_CONDITION`, {
|
|
6
|
-
value
|
|
7
|
-
});
|
|
8
|
-
} else throw new error(`Trying to run filtering with "${condition}", but the value sent is not an array.`, `MALFORMED_${condition}_CONDITION`, {
|
|
9
|
-
value
|
|
10
|
-
});
|
|
11
|
-
return values;
|
|
12
|
-
};
|
|
13
|
-
export { getWhereValues };
|
|
14
|
-
|
|
15
|
-
//# sourceMappingURL=values.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operations/entry/elasticsearch/filtering/values.js","sources":["../../../../../src/operations/entry/elasticsearch/filtering/values.ts"],"sourcesContent":["import type { CmsEntryListWhere } from \"@webiny/api-headless-cms/types/index.js\";\nimport WebinyError from \"@webiny/error\";\n\nexport const getWhereValues = (value: unknown, condition: \"AND\" | \"OR\") => {\n const values = value as CmsEntryListWhere[] | undefined;\n if (!Array.isArray(values)) {\n throw new WebinyError(\n `Trying to run filtering with \"${condition}\", but the value sent is not an array.`,\n `MALFORMED_${condition}_CONDITION`,\n {\n value\n }\n );\n } else if (values.length === 0) {\n throw new WebinyError(\n `Trying to run filtering with \"${condition}\", but the value sent is empty array.`,\n `MALFORMED_${condition}_CONDITION`,\n {\n value\n }\n );\n }\n return values;\n};\n"],"names":["getWhereValues","value","condition","values","Array","WebinyError"],"mappings":";AAGO,MAAMA,iBAAiB,CAACC,OAAgBC;IAC3C,MAAMC,SAASF;IACf,IAAKG,MAAM,OAAO,CAACD,SAQZ;QAAA,IAAIA,AAAkB,MAAlBA,OAAO,MAAM,EACpB,MAAM,IAAIE,MACN,CAAC,8BAA8B,EAAEH,UAAU,qCAAqC,CAAC,EACjF,CAAC,UAAU,EAAEA,UAAU,UAAU,CAAC,EAClC;YACID;QACJ;IAER,OAfI,MAAM,IAAII,MACN,CAAC,8BAA8B,EAAEH,UAAU,sCAAsC,CAAC,EAClF,CAAC,UAAU,EAAEA,UAAU,UAAU,CAAC,EAClC;QACID;IACJ;IAWR,OAAOE;AACX"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { OpenSearchBoolQueryConfig } from "@webiny/api-opensearch/types.js";
|
|
2
|
-
import type { CmsModel } from "@webiny/api-headless-cms/types/index.js";
|
|
3
|
-
import type { CmsEntryOpenSearchFullTextSearch } from "../../../features/CmsEntryOpenSearchFullTextSearch/index.js";
|
|
4
|
-
import type { ModelFields } from "../../../operations/entry/elasticsearch/types.js";
|
|
5
|
-
interface Params {
|
|
6
|
-
fullTextSearches: CmsEntryOpenSearchFullTextSearch.Interface[];
|
|
7
|
-
model: CmsModel;
|
|
8
|
-
query: OpenSearchBoolQueryConfig;
|
|
9
|
-
term?: string;
|
|
10
|
-
fields: ModelFields;
|
|
11
|
-
}
|
|
12
|
-
export declare const applyFullTextSearch: (params: Params) => void;
|
|
13
|
-
export {};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { normalizeValue } from "@webiny/api-opensearch";
|
|
2
|
-
const defaultFullTextSearch = {
|
|
3
|
-
apply: (params)=>{
|
|
4
|
-
const { query, term, fields, createFieldPath, prepareTerm } = params;
|
|
5
|
-
query.must.push({
|
|
6
|
-
query_string: {
|
|
7
|
-
allow_leading_wildcard: true,
|
|
8
|
-
fields: Object.values(fields).map(createFieldPath),
|
|
9
|
-
query: `*${prepareTerm(term)}*`,
|
|
10
|
-
default_operator: "and"
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
const getFullTextSearch = (params)=>{
|
|
16
|
-
const { fullTextSearches, model } = params;
|
|
17
|
-
const reversed = [
|
|
18
|
-
...fullTextSearches
|
|
19
|
-
].reverse();
|
|
20
|
-
let fallback = null;
|
|
21
|
-
for (const item of reversed){
|
|
22
|
-
const models = item.models || [];
|
|
23
|
-
if (models.includes(model.modelId)) return item;
|
|
24
|
-
if (!fallback && 0 === models.length) fallback = item;
|
|
25
|
-
}
|
|
26
|
-
return fallback || defaultFullTextSearch;
|
|
27
|
-
};
|
|
28
|
-
const applyFullTextSearch = (params)=>{
|
|
29
|
-
const { fullTextSearches, query, term, fields, model } = params;
|
|
30
|
-
const keys = Object.keys(fields);
|
|
31
|
-
if (!term || 0 === term.length || 0 === keys.length) return;
|
|
32
|
-
const fullTextSearch = getFullTextSearch({
|
|
33
|
-
fullTextSearches,
|
|
34
|
-
model
|
|
35
|
-
});
|
|
36
|
-
fullTextSearch.apply({
|
|
37
|
-
model,
|
|
38
|
-
createFieldPath: (field)=>{
|
|
39
|
-
if ("function" == typeof field.path) return field.path(term);
|
|
40
|
-
if (field.systemField) return field.path || field.field.storageId;
|
|
41
|
-
const path = `values.${field.path || field.field.storageId}`;
|
|
42
|
-
if ("searchable-json" === field.type) return `${path}.*`;
|
|
43
|
-
return path;
|
|
44
|
-
},
|
|
45
|
-
fields,
|
|
46
|
-
query,
|
|
47
|
-
term,
|
|
48
|
-
prepareTerm: normalizeValue
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
export { applyFullTextSearch };
|
|
52
|
-
|
|
53
|
-
//# sourceMappingURL=fullTextSearch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operations/entry/elasticsearch/fullTextSearch.js","sources":["../../../../src/operations/entry/elasticsearch/fullTextSearch.ts"],"sourcesContent":["import type { OpenSearchBoolQueryConfig } from \"@webiny/api-opensearch/types.js\";\nimport { normalizeValue } from \"@webiny/api-opensearch\";\nimport type { CmsModel } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { CmsEntryOpenSearchFullTextSearch } from \"~/features/CmsEntryOpenSearchFullTextSearch/index.js\";\nimport type { ModelFields } from \"~/operations/entry/elasticsearch/types.js\";\n\n/**\n * Our default implementation works with the AND operator for the multiple words query string.\n */\nconst defaultFullTextSearch: CmsEntryOpenSearchFullTextSearch.Interface = {\n apply: params => {\n const { query, term, fields, createFieldPath, prepareTerm } = params;\n\n query.must.push({\n query_string: {\n allow_leading_wildcard: true,\n fields: Object.values(fields).map(createFieldPath),\n query: `*${prepareTerm(term)}*`,\n default_operator: \"and\"\n }\n });\n }\n};\n\ninterface GetFullTextSearchParams {\n fullTextSearches: CmsEntryOpenSearchFullTextSearch.Interface[];\n model: CmsModel;\n}\nconst getFullTextSearch = (\n params: GetFullTextSearchParams\n): CmsEntryOpenSearchFullTextSearch.Interface => {\n const { fullTextSearches, model } = params;\n /**\n * We need to reverse the list, so we can take the last one first - possibility to override existing implementations.\n */\n const reversed = [...fullTextSearches].reverse();\n /**\n * We need to find the most specific implementation for the given model.\n * Also, we need to use the first possible implementation if the specific one is not found.\n */\n let fallback: CmsEntryOpenSearchFullTextSearch.Interface | null = null;\n for (const item of reversed) {\n const models = item.models || [];\n /**\n * We take the first available implementation for the given model.\n */\n if (models.includes(model.modelId)) {\n return item;\n } else if (!fallback && models.length === 0) {\n /**\n * Then we set the first possible implementation, which has no models defined, as the default one.\n * It is important not to set the one which has models defined as they are specifically for the targeted model.\n */\n fallback = item;\n }\n }\n\n return fallback || defaultFullTextSearch;\n};\n\ninterface Params {\n fullTextSearches: CmsEntryOpenSearchFullTextSearch.Interface[];\n model: CmsModel;\n query: OpenSearchBoolQueryConfig;\n term?: string;\n fields: ModelFields;\n}\nexport const applyFullTextSearch = (params: Params): void => {\n const { fullTextSearches, query, term, fields, model } = params;\n const keys = Object.keys(fields);\n if (!term || term.length === 0 || keys.length === 0) {\n return;\n }\n\n const fullTextSearch = getFullTextSearch({\n fullTextSearches,\n model\n });\n\n fullTextSearch.apply({\n model,\n createFieldPath: field => {\n if (typeof field.path === \"function\") {\n return field.path(term);\n } else if (field.systemField) {\n return field.path || field.field.storageId;\n }\n const path = `values.${field.path || field.field.storageId}`;\n /**\n * Searchable JSON fields are indexed as objects, so the actual searchable values\n * live on the nested keys. Target them all via a wildcard.\n */\n if (field.type === \"searchable-json\") {\n return `${path}.*`;\n }\n return path;\n },\n fields,\n query,\n term,\n prepareTerm: normalizeValue\n });\n};\n"],"names":["defaultFullTextSearch","params","query","term","fields","createFieldPath","prepareTerm","Object","getFullTextSearch","fullTextSearches","model","reversed","fallback","item","models","applyFullTextSearch","keys","fullTextSearch","field","path","normalizeValue"],"mappings":";AASA,MAAMA,wBAAoE;IACtE,OAAOC,CAAAA;QACH,MAAM,EAAEC,KAAK,EAAEC,IAAI,EAAEC,MAAM,EAAEC,eAAe,EAAEC,WAAW,EAAE,GAAGL;QAE9DC,MAAM,IAAI,CAAC,IAAI,CAAC;YACZ,cAAc;gBACV,wBAAwB;gBACxB,QAAQK,OAAO,MAAM,CAACH,QAAQ,GAAG,CAACC;gBAClC,OAAO,CAAC,CAAC,EAAEC,YAAYH,MAAM,CAAC,CAAC;gBAC/B,kBAAkB;YACtB;QACJ;IACJ;AACJ;AAMA,MAAMK,oBAAoB,CACtBP;IAEA,MAAM,EAAEQ,gBAAgB,EAAEC,KAAK,EAAE,GAAGT;IAIpC,MAAMU,WAAW;WAAIF;KAAiB,CAAC,OAAO;IAK9C,IAAIG,WAA8D;IAClE,KAAK,MAAMC,QAAQF,SAAU;QACzB,MAAMG,SAASD,KAAK,MAAM,IAAI,EAAE;QAIhC,IAAIC,OAAO,QAAQ,CAACJ,MAAM,OAAO,GAC7B,OAAOG;QACJ,IAAI,CAACD,YAAYE,AAAkB,MAAlBA,OAAO,MAAM,EAKjCF,WAAWC;IAEnB;IAEA,OAAOD,YAAYZ;AACvB;AASO,MAAMe,sBAAsB,CAACd;IAChC,MAAM,EAAEQ,gBAAgB,EAAEP,KAAK,EAAEC,IAAI,EAAEC,MAAM,EAAEM,KAAK,EAAE,GAAGT;IACzD,MAAMe,OAAOT,OAAO,IAAI,CAACH;IACzB,IAAI,CAACD,QAAQA,AAAgB,MAAhBA,KAAK,MAAM,IAAUa,AAAgB,MAAhBA,KAAK,MAAM,EACzC;IAGJ,MAAMC,iBAAiBT,kBAAkB;QACrCC;QACAC;IACJ;IAEAO,eAAe,KAAK,CAAC;QACjBP;QACA,iBAAiBQ,CAAAA;YACb,IAAI,AAAsB,cAAtB,OAAOA,MAAM,IAAI,EACjB,OAAOA,MAAM,IAAI,CAACf;YACf,IAAIe,MAAM,WAAW,EACxB,OAAOA,MAAM,IAAI,IAAIA,MAAM,KAAK,CAAC,SAAS;YAE9C,MAAMC,OAAO,CAAC,OAAO,EAAED,MAAM,IAAI,IAAIA,MAAM,KAAK,CAAC,SAAS,EAAE;YAK5D,IAAIA,AAAe,sBAAfA,MAAM,IAAI,EACV,OAAO,GAAGC,KAAK,EAAE,CAAC;YAEtB,OAAOA;QACX;QACAf;QACAF;QACAC;QACA,aAAaiB;IACjB;AACJ"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ModelFields } from "../../../operations/entry/elasticsearch/types.js";
|
|
2
|
-
interface Params {
|
|
3
|
-
fields: ModelFields;
|
|
4
|
-
term?: string;
|
|
5
|
-
targets?: string[];
|
|
6
|
-
}
|
|
7
|
-
export declare const createFullTextSearchFields: (params: Params) => ModelFields;
|
|
8
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
const createFullTextSearchFields = (params)=>{
|
|
2
|
-
const { term, targets, fields } = params;
|
|
3
|
-
if (!targets?.length || !term || 0 === term.trim().length) return {};
|
|
4
|
-
const result = {};
|
|
5
|
-
for(const key in fields)if (false !== targets.includes(key)) result[key] = fields[key];
|
|
6
|
-
return result;
|
|
7
|
-
};
|
|
8
|
-
export { createFullTextSearchFields };
|
|
9
|
-
|
|
10
|
-
//# sourceMappingURL=fullTextSearchFields.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operations/entry/elasticsearch/fullTextSearchFields.js","sources":["../../../../src/operations/entry/elasticsearch/fullTextSearchFields.ts"],"sourcesContent":["import type { ModelFields } from \"~/operations/entry/elasticsearch/types.js\";\n\ninterface Params {\n fields: ModelFields;\n term?: string;\n targets?: string[];\n}\nexport const createFullTextSearchFields = (params: Params): ModelFields => {\n const { term, targets, fields } = params;\n if (!targets?.length || !term || term.trim().length === 0) {\n return {};\n }\n\n const result: ModelFields = {};\n for (const key in fields) {\n if (targets.includes(key) === false) {\n continue;\n }\n result[key] = fields[key];\n }\n return result;\n};\n"],"names":["createFullTextSearchFields","params","term","targets","fields","result","key"],"mappings":"AAOO,MAAMA,6BAA6B,CAACC;IACvC,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,MAAM,EAAE,GAAGH;IAClC,IAAI,CAACE,SAAS,UAAU,CAACD,QAAQA,AAAuB,MAAvBA,KAAK,IAAI,GAAG,MAAM,EAC/C,OAAO,CAAC;IAGZ,MAAMG,SAAsB,CAAC;IAC7B,IAAK,MAAMC,OAAOF,OACd,IAAID,AAA0B,UAA1BA,QAAQ,QAAQ,CAACG,MAGrBD,MAAM,CAACC,IAAI,GAAGF,MAAM,CAACE,IAAI;IAE7B,OAAOD;AACX"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { OpenSearchBoolQueryConfig } from "@webiny/api-opensearch/types.js";
|
|
2
|
-
import type { CmsEntryListWhere, CmsModel } from "@webiny/api-headless-cms/types/index.js";
|
|
3
|
-
export declare const createBaseQuery: () => OpenSearchBoolQueryConfig;
|
|
4
|
-
interface Params {
|
|
5
|
-
model: CmsModel;
|
|
6
|
-
where: CmsEntryListWhere;
|
|
7
|
-
shared: boolean;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Latest and published are specific in Elasticsearch to that extend that they are tagged in the __type property.
|
|
11
|
-
* We allow either published or either latest.
|
|
12
|
-
* Latest is used in the manage API and published in the read API.
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* We add the query.filter terms because we do not need scored search here and it is a bit faster.
|
|
16
|
-
*/
|
|
17
|
-
export declare const createInitialQuery: (params: Params) => OpenSearchBoolQueryConfig;
|
|
18
|
-
export {};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import error from "@webiny/error";
|
|
2
|
-
import { createLatestRecordType, createPublishedRecordType } from "../recordType.js";
|
|
3
|
-
const createBaseQuery = ()=>({
|
|
4
|
-
must: [],
|
|
5
|
-
must_not: [],
|
|
6
|
-
should: [],
|
|
7
|
-
filter: []
|
|
8
|
-
});
|
|
9
|
-
const createInitialQuery = (params)=>{
|
|
10
|
-
const { model, where, shared } = params;
|
|
11
|
-
const query = createBaseQuery();
|
|
12
|
-
if (shared) {
|
|
13
|
-
query.filter.push({
|
|
14
|
-
term: {
|
|
15
|
-
"tenant.keyword": model.tenant
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
query.filter.push({
|
|
19
|
-
term: {
|
|
20
|
-
"modelId.keyword": model.modelId
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
if (true === where.published) query.filter.push({
|
|
25
|
-
term: {
|
|
26
|
-
"__type.keyword": createPublishedRecordType()
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
else if (true === where.latest) query.filter.push({
|
|
30
|
-
term: {
|
|
31
|
-
"__type.keyword": createLatestRecordType()
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
else throw new error('Cannot call Elasticsearch query when not setting "published" or "latest".', "OPENSEARCH_UNSUPPORTED_QUERY", {
|
|
35
|
-
where
|
|
36
|
-
});
|
|
37
|
-
delete where.published;
|
|
38
|
-
delete where.latest;
|
|
39
|
-
return query;
|
|
40
|
-
};
|
|
41
|
-
export { createBaseQuery, createInitialQuery };
|
|
42
|
-
|
|
43
|
-
//# sourceMappingURL=initialQuery.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operations/entry/elasticsearch/initialQuery.js","sources":["../../../../src/operations/entry/elasticsearch/initialQuery.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport type { OpenSearchBoolQueryConfig } from \"@webiny/api-opensearch/types.js\";\nimport type { CmsEntryListWhere, CmsModel } from \"@webiny/api-headless-cms/types/index.js\";\nimport { createLatestRecordType, createPublishedRecordType } from \"../recordType.js\";\n\nexport const createBaseQuery = (): OpenSearchBoolQueryConfig => {\n return {\n must: [],\n must_not: [],\n should: [],\n filter: []\n };\n};\n\ninterface Params {\n model: CmsModel;\n where: CmsEntryListWhere;\n shared: boolean;\n}\n/**\n * Latest and published are specific in Elasticsearch to that extend that they are tagged in the __type property.\n * We allow either published or either latest.\n * Latest is used in the manage API and published in the read API.\n *\n *\n * We add the query.filter terms because we do not need scored search here and it is a bit faster.\n */\nexport const createInitialQuery = (params: Params): OpenSearchBoolQueryConfig => {\n const { model, where, shared } = params;\n\n const query = createBaseQuery();\n\n /**\n * When ES index is shared between tenants, we need to filter records by tenant ID.\n */\n if (shared) {\n query.filter.push({\n term: {\n \"tenant.keyword\": model.tenant\n }\n });\n query.filter.push({\n term: {\n \"modelId.keyword\": model.modelId\n }\n });\n }\n\n /**\n * We must transform published and latest where args into something that is understandable by our Elasticsearch\n */\n if (where.published === true) {\n query.filter.push({\n term: {\n \"__type.keyword\": createPublishedRecordType()\n }\n });\n } else if (where.latest === true) {\n query.filter.push({\n term: {\n \"__type.keyword\": createLatestRecordType()\n }\n });\n }\n //\n /**\n * We do not allow filtering without the published or latest parameter.\n * Also, we do not want to set the default one, as there is a large possibility for user error when filtering.\n */\n else {\n throw new WebinyError(\n `Cannot call Elasticsearch query when not setting \"published\" or \"latest\".`,\n \"OPENSEARCH_UNSUPPORTED_QUERY\",\n {\n where\n }\n );\n }\n /**\n * We need to remove fields that actually do not exist on the record - it will break otherwise.\n * This will modify the original object, which is what we want.\n */\n delete where.published;\n delete where.latest;\n\n return query;\n};\n"],"names":["createBaseQuery","createInitialQuery","params","model","where","shared","query","createPublishedRecordType","createLatestRecordType","WebinyError"],"mappings":";;AAKO,MAAMA,kBAAkB,IACpB;QACH,MAAM,EAAE;QACR,UAAU,EAAE;QACZ,QAAQ,EAAE;QACV,QAAQ,EAAE;IACd;AAgBG,MAAMC,qBAAqB,CAACC;IAC/B,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAEC,MAAM,EAAE,GAAGH;IAEjC,MAAMI,QAAQN;IAKd,IAAIK,QAAQ;QACRC,MAAM,MAAM,CAAC,IAAI,CAAC;YACd,MAAM;gBACF,kBAAkBH,MAAM,MAAM;YAClC;QACJ;QACAG,MAAM,MAAM,CAAC,IAAI,CAAC;YACd,MAAM;gBACF,mBAAmBH,MAAM,OAAO;YACpC;QACJ;IACJ;IAKA,IAAIC,AAAoB,SAApBA,MAAM,SAAS,EACfE,MAAM,MAAM,CAAC,IAAI,CAAC;QACd,MAAM;YACF,kBAAkBC;QACtB;IACJ;SACG,IAAIH,AAAiB,SAAjBA,MAAM,MAAM,EACnBE,MAAM,MAAM,CAAC,IAAI,CAAC;QACd,MAAM;YACF,kBAAkBE;QACtB;IACJ;SAQA,MAAM,IAAIC,MACN,6EACA,gCACA;QACIL;IACJ;IAOR,OAAOA,MAAM,SAAS;IACtB,OAAOA,MAAM,MAAM;IAEnB,OAAOE;AACX"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { getBaseFieldType } from "@webiny/api-headless-cms/utils/getBaseFieldType.js";
|
|
2
|
-
const noKeywordFields = [
|
|
3
|
-
"date",
|
|
4
|
-
"datetime",
|
|
5
|
-
"number",
|
|
6
|
-
"boolean"
|
|
7
|
-
];
|
|
8
|
-
const hasKeyword = (field)=>{
|
|
9
|
-
const fieldType = getBaseFieldType(field);
|
|
10
|
-
if (noKeywordFields.includes(fieldType)) return false;
|
|
11
|
-
if (field.unmappedType) return false;
|
|
12
|
-
if (false === field.keyword) return false;
|
|
13
|
-
return true;
|
|
14
|
-
};
|
|
15
|
-
export { hasKeyword };
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=keyword.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operations/entry/elasticsearch/keyword.js","sources":["../../../../src/operations/entry/elasticsearch/keyword.ts"],"sourcesContent":["import type { ModelField } from \"./types.js\";\nimport { getBaseFieldType } from \"@webiny/api-headless-cms/utils/getBaseFieldType.js\";\n\nconst noKeywordFields: string[] = [\"date\", \"datetime\", \"number\", \"boolean\"];\nexport const hasKeyword = (field: ModelField): boolean => {\n const fieldType = getBaseFieldType(field);\n /**\n * We defined some field types that MUST have no keyword added to the field path\n */\n if (noKeywordFields.includes(fieldType)) {\n return false;\n }\n /**\n * If field has unmapped type defined, do not add keyword.\n */\n //\n else if (field.unmappedType) {\n return false;\n }\n /**\n * And if specifically defined that field has no keyword, do not add it.\n */\n //\n else if (field.keyword === false) {\n return false;\n }\n /**\n * All other fields have keyword added.\n */\n return true;\n};\n"],"names":["noKeywordFields","hasKeyword","field","fieldType","getBaseFieldType"],"mappings":";AAGA,MAAMA,kBAA4B;IAAC;IAAQ;IAAY;IAAU;CAAU;AACpE,MAAMC,aAAa,CAACC;IACvB,MAAMC,YAAYC,iBAAiBF;IAInC,IAAIF,gBAAgB,QAAQ,CAACG,YACzB,OAAO;IAMN,IAAID,MAAM,YAAY,EACvB,OAAO;IAMN,IAAIA,AAAkB,UAAlBA,MAAM,OAAO,EAClB,OAAO;IAKX,OAAO;AACX"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { OpenSearchQueryBuilderOperatorRegistry } from "@webiny/api-opensearch/exports/api/opensearch.js";
|
|
2
|
-
import type { OpenSearchQueryBuilderOperators } from "../types.js";
|
|
3
|
-
interface Params {
|
|
4
|
-
registry: OpenSearchQueryBuilderOperatorRegistry.Interface;
|
|
5
|
-
}
|
|
6
|
-
export declare const createOperatorPluginList: (params: Params) => OpenSearchQueryBuilderOperators;
|
|
7
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
const createOperatorPluginList = (params)=>{
|
|
2
|
-
const { registry } = params;
|
|
3
|
-
return registry.getAll().reduce((acc, operator)=>{
|
|
4
|
-
acc[operator.getOperator()] = operator;
|
|
5
|
-
return acc;
|
|
6
|
-
}, {});
|
|
7
|
-
};
|
|
8
|
-
export { createOperatorPluginList };
|
|
9
|
-
|
|
10
|
-
//# sourceMappingURL=operator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operations/entry/elasticsearch/plugins/operator.js","sources":["../../../../../src/operations/entry/elasticsearch/plugins/operator.ts"],"sourcesContent":["import type { OpenSearchQueryBuilderOperatorRegistry } from \"@webiny/api-opensearch/exports/api/opensearch.js\";\nimport type { OpenSearchQueryBuilderOperators } from \"../types.js\";\n\ninterface Params {\n registry: OpenSearchQueryBuilderOperatorRegistry.Interface;\n}\n\nexport const createOperatorPluginList = (params: Params): OpenSearchQueryBuilderOperators => {\n const { registry } = params;\n return registry.getAll().reduce<OpenSearchQueryBuilderOperators>((acc, operator) => {\n acc[operator.getOperator()] = operator;\n return acc;\n }, {});\n};\n"],"names":["createOperatorPluginList","params","registry","acc","operator"],"mappings":"AAOO,MAAMA,2BAA2B,CAACC;IACrC,MAAM,EAAEC,QAAQ,EAAE,GAAGD;IACrB,OAAOC,SAAS,MAAM,GAAG,MAAM,CAAkC,CAACC,KAAKC;QACnED,GAAG,CAACC,SAAS,WAAW,GAAG,GAAGA;QAC9B,OAAOD;IACX,GAAG,CAAC;AACR"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
const IGNORED_ES_SEARCH_EXCEPTIONS = [
|
|
2
|
-
"index_not_found_exception",
|
|
3
|
-
"search_phase_execution_exception"
|
|
4
|
-
];
|
|
5
|
-
const shouldIgnoreEsResponseError = (error)=>IGNORED_ES_SEARCH_EXCEPTIONS.some((ignoredMessage)=>error.message.includes(ignoredMessage));
|
|
6
|
-
export { shouldIgnoreEsResponseError };
|
|
7
|
-
|
|
8
|
-
//# sourceMappingURL=shouldIgnoreEsResponseError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operations/entry/elasticsearch/shouldIgnoreEsResponseError.js","sources":["../../../../src/operations/entry/elasticsearch/shouldIgnoreEsResponseError.ts"],"sourcesContent":["import type WebinyError from \"@webiny/error\";\n\nconst IGNORED_ES_SEARCH_EXCEPTIONS = [\n \"index_not_found_exception\",\n \"search_phase_execution_exception\"\n];\n\nexport const shouldIgnoreEsResponseError = (error: WebinyError) => {\n return IGNORED_ES_SEARCH_EXCEPTIONS.some(ignoredMessage =>\n error.message.includes(ignoredMessage)\n );\n};\n"],"names":["IGNORED_ES_SEARCH_EXCEPTIONS","shouldIgnoreEsResponseError","error","ignoredMessage"],"mappings":"AAEA,MAAMA,+BAA+B;IACjC;IACA;CACH;AAEM,MAAMC,8BAA8B,CAACC,QACjCF,6BAA6B,IAAI,CAACG,CAAAA,iBACrCD,MAAM,OAAO,CAAC,QAAQ,CAACC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Sort as OpenSearchSort } from "@webiny/api-opensearch/types.js";
|
|
2
|
-
import type { OpenSearchFieldFactory } from "@webiny/api-opensearch/exports/api/opensearch.js";
|
|
3
|
-
import type { CmsEntryListSort } from "@webiny/api-headless-cms/types/index.js";
|
|
4
|
-
import type { CmsModel } from "@webiny/api-headless-cms/types/index.js";
|
|
5
|
-
import type { ModelFields } from "./types.js";
|
|
6
|
-
import type { CmsEntryOpenSearchValueSearchRegistry } from "../../../features/CmsEntryOpenSearchValueSearch/index.js";
|
|
7
|
-
interface Params {
|
|
8
|
-
sort?: CmsEntryListSort;
|
|
9
|
-
modelFields: ModelFields;
|
|
10
|
-
model: CmsModel;
|
|
11
|
-
valueSearchRegistry: CmsEntryOpenSearchValueSearchRegistry.Interface;
|
|
12
|
-
fieldFactory: OpenSearchFieldFactory.Interface;
|
|
13
|
-
}
|
|
14
|
-
export declare const createElasticsearchSort: (params: Params) => OpenSearchSort;
|
|
15
|
-
export {};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { createSort } from "@webiny/api-opensearch";
|
|
2
|
-
import { hasKeyword } from "./keyword.js";
|
|
3
|
-
import { createFieldPathFactory } from "./filtering/path.js";
|
|
4
|
-
import { NoValueContainer } from "../../../values/NoValueContainer.js";
|
|
5
|
-
const matchField = (input)=>{
|
|
6
|
-
const valuesMatch = input.match(/^values_([a-zA-Z-0-9_]+)_(ASC|DESC)$/);
|
|
7
|
-
if (valuesMatch) {
|
|
8
|
-
const [, fieldId, order] = valuesMatch;
|
|
9
|
-
return {
|
|
10
|
-
fieldId,
|
|
11
|
-
isValues: true,
|
|
12
|
-
order: order
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
const nonValues = input.match(/^([a-zA-Z-0-9_]+)_(ASC|DESC)$/);
|
|
16
|
-
if (!nonValues) return null;
|
|
17
|
-
const [, fieldId, order] = nonValues;
|
|
18
|
-
return {
|
|
19
|
-
fieldId,
|
|
20
|
-
isValues: false,
|
|
21
|
-
order: order
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
const createElasticsearchSort = (params)=>{
|
|
25
|
-
const { sort, modelFields, valueSearchRegistry, fieldFactory } = params;
|
|
26
|
-
if (!sort || 0 === sort.length) return [
|
|
27
|
-
{
|
|
28
|
-
["id.keyword"]: {
|
|
29
|
-
order: "asc"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
];
|
|
33
|
-
const createFieldPath = createFieldPathFactory({
|
|
34
|
-
valueSearchRegistry
|
|
35
|
-
});
|
|
36
|
-
const fieldIdToStorageIdIdMap = {};
|
|
37
|
-
const sortPlugins = Object.values(modelFields).reduce((plugins, field)=>{
|
|
38
|
-
const isValues = 1 === field.parents.length && "values" === field.parents[0].fieldId;
|
|
39
|
-
if (field.parents.length > 0 && !isValues) return plugins;
|
|
40
|
-
const fieldId = field.field.fieldId;
|
|
41
|
-
const fieldIdPath = isValues ? `values.${fieldId}` : fieldId;
|
|
42
|
-
fieldIdToStorageIdIdMap[fieldIdPath] = fieldIdPath;
|
|
43
|
-
const { path } = createFieldPath({
|
|
44
|
-
key: field.field.storageId,
|
|
45
|
-
field,
|
|
46
|
-
value: NoValueContainer.create(),
|
|
47
|
-
keyword: false,
|
|
48
|
-
originalValue: NoValueContainer.create()
|
|
49
|
-
});
|
|
50
|
-
plugins[fieldIdPath] = fieldFactory.create({
|
|
51
|
-
unmappedType: field.unmappedType,
|
|
52
|
-
keyword: hasKeyword(field),
|
|
53
|
-
sortable: field.sortable,
|
|
54
|
-
searchable: field.searchable,
|
|
55
|
-
field: fieldId,
|
|
56
|
-
path
|
|
57
|
-
});
|
|
58
|
-
return plugins;
|
|
59
|
-
}, {
|
|
60
|
-
["*"]: fieldFactory.create({
|
|
61
|
-
field: "*",
|
|
62
|
-
keyword: false
|
|
63
|
-
})
|
|
64
|
-
});
|
|
65
|
-
const transformedSort = sort.map((value)=>{
|
|
66
|
-
const matched = matchField(value);
|
|
67
|
-
if (!matched) return null;
|
|
68
|
-
const { fieldId, order, isValues } = matched;
|
|
69
|
-
const key = isValues ? `values.${fieldId}` : fieldId;
|
|
70
|
-
if (fieldIdToStorageIdIdMap[key]) return `${fieldIdToStorageIdIdMap[key]}_${order}`;
|
|
71
|
-
return value;
|
|
72
|
-
}).filter(Boolean);
|
|
73
|
-
return createSort({
|
|
74
|
-
fieldPlugins: sortPlugins,
|
|
75
|
-
sort: transformedSort
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
export { createElasticsearchSort };
|
|
79
|
-
|
|
80
|
-
//# sourceMappingURL=sort.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operations/entry/elasticsearch/sort.js","sources":["../../../../src/operations/entry/elasticsearch/sort.ts"],"sourcesContent":["import type { Sort as OpenSearchSort } from \"@webiny/api-opensearch/types.js\";\nimport { createSort } from \"@webiny/api-opensearch\";\nimport type { OpenSearchField } from \"@webiny/api-opensearch/exports/api/opensearch.js\";\nimport type { OpenSearchFieldFactory } from \"@webiny/api-opensearch/exports/api/opensearch.js\";\nimport type { CmsEntryListSort } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { CmsModel } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { ModelFields } from \"./types.js\";\nimport { hasKeyword } from \"~/operations/entry/elasticsearch/keyword.js\";\nimport { createFieldPathFactory } from \"~/operations/entry/elasticsearch/filtering/path.js\";\nimport { NoValueContainer } from \"~/values/NoValueContainer.js\";\nimport type { CmsEntryOpenSearchValueSearchRegistry } from \"~/features/CmsEntryOpenSearchValueSearch/index.js\";\n\ninterface IMatchFieldResponse {\n fieldId: string;\n isValues: boolean;\n order: \"ASC\" | \"DESC\";\n}\n\nconst matchField = (input: string): IMatchFieldResponse | null => {\n const valuesMatch = input.match(/^values_([a-zA-Z-0-9_]+)_(ASC|DESC)$/);\n if (valuesMatch) {\n const [, fieldId, order] = valuesMatch;\n return {\n fieldId,\n isValues: true,\n order: order as \"ASC\" | \"DESC\"\n };\n }\n const nonValues = input.match(/^([a-zA-Z-0-9_]+)_(ASC|DESC)$/);\n if (!nonValues) {\n return null;\n }\n const [, fieldId, order] = nonValues;\n return {\n fieldId,\n isValues: false,\n order: order as \"ASC\" | \"DESC\"\n };\n};\n\ninterface Params {\n sort?: CmsEntryListSort;\n modelFields: ModelFields;\n model: CmsModel;\n valueSearchRegistry: CmsEntryOpenSearchValueSearchRegistry.Interface;\n fieldFactory: OpenSearchFieldFactory.Interface;\n}\n\nexport const createElasticsearchSort = (params: Params): OpenSearchSort => {\n const { sort, modelFields, valueSearchRegistry, fieldFactory } = params;\n\n if (!sort || sort.length === 0) {\n return [\n {\n [\"id.keyword\"]: {\n order: \"asc\"\n }\n }\n ];\n }\n\n const createFieldPath = createFieldPathFactory({\n valueSearchRegistry\n });\n\n const fieldIdToStorageIdIdMap: Record<string, string> = {};\n\n const sortPlugins = Object.values(modelFields).reduce<\n Record<string, OpenSearchField.Interface>\n >(\n (plugins, field) => {\n const isValues = field.parents.length === 1 && field.parents[0].fieldId === \"values\";\n if (field.parents.length > 0 && !isValues) {\n return plugins;\n }\n\n const fieldId = field.field.fieldId;\n const fieldIdPath = isValues ? `values.${fieldId}` : fieldId;\n\n fieldIdToStorageIdIdMap[fieldIdPath] = fieldIdPath;\n\n const { path } = createFieldPath({\n key: field.field.storageId,\n field,\n value: NoValueContainer.create(),\n keyword: false,\n originalValue: NoValueContainer.create()\n });\n plugins[fieldIdPath] = fieldFactory.create({\n unmappedType: field.unmappedType,\n keyword: hasKeyword(field),\n sortable: field.sortable,\n searchable: field.searchable,\n field: fieldId,\n path\n });\n return plugins;\n },\n {\n [\"*\"]: fieldFactory.create({\n field: \"*\",\n keyword: false\n })\n }\n );\n\n const transformedSort = sort\n .map(value => {\n const matched = matchField(value);\n if (!matched) {\n return null;\n }\n const { fieldId, order, isValues } = matched;\n const key = isValues ? `values.${fieldId}` : fieldId;\n if (fieldIdToStorageIdIdMap[key]) {\n return `${fieldIdToStorageIdIdMap[key]}_${order}`;\n }\n\n return value;\n })\n .filter(Boolean) as string[];\n return createSort({\n fieldPlugins: sortPlugins,\n sort: transformedSort\n });\n};\n"],"names":["matchField","input","valuesMatch","fieldId","order","nonValues","createElasticsearchSort","params","sort","modelFields","valueSearchRegistry","fieldFactory","createFieldPath","createFieldPathFactory","fieldIdToStorageIdIdMap","sortPlugins","Object","plugins","field","isValues","fieldIdPath","path","NoValueContainer","hasKeyword","transformedSort","value","matched","key","Boolean","createSort"],"mappings":";;;;AAkBA,MAAMA,aAAa,CAACC;IAChB,MAAMC,cAAcD,MAAM,KAAK,CAAC;IAChC,IAAIC,aAAa;QACb,MAAM,GAAGC,SAASC,MAAM,GAAGF;QAC3B,OAAO;YACHC;YACA,UAAU;YACV,OAAOC;QACX;IACJ;IACA,MAAMC,YAAYJ,MAAM,KAAK,CAAC;IAC9B,IAAI,CAACI,WACD,OAAO;IAEX,MAAM,GAAGF,SAASC,MAAM,GAAGC;IAC3B,OAAO;QACHF;QACA,UAAU;QACV,OAAOC;IACX;AACJ;AAUO,MAAME,0BAA0B,CAACC;IACpC,MAAM,EAAEC,IAAI,EAAEC,WAAW,EAAEC,mBAAmB,EAAEC,YAAY,EAAE,GAAGJ;IAEjE,IAAI,CAACC,QAAQA,AAAgB,MAAhBA,KAAK,MAAM,EACpB,OAAO;QACH;YACI,CAAC,aAAa,EAAE;gBACZ,OAAO;YACX;QACJ;KACH;IAGL,MAAMI,kBAAkBC,uBAAuB;QAC3CH;IACJ;IAEA,MAAMI,0BAAkD,CAAC;IAEzD,MAAMC,cAAcC,OAAO,MAAM,CAACP,aAAa,MAAM,CAGjD,CAACQ,SAASC;QACN,MAAMC,WAAWD,AAAyB,MAAzBA,MAAM,OAAO,CAAC,MAAM,IAAUA,AAA6B,aAA7BA,MAAM,OAAO,CAAC,EAAE,CAAC,OAAO;QACvE,IAAIA,MAAM,OAAO,CAAC,MAAM,GAAG,KAAK,CAACC,UAC7B,OAAOF;QAGX,MAAMd,UAAUe,MAAM,KAAK,CAAC,OAAO;QACnC,MAAME,cAAcD,WAAW,CAAC,OAAO,EAAEhB,SAAS,GAAGA;QAErDW,uBAAuB,CAACM,YAAY,GAAGA;QAEvC,MAAM,EAAEC,IAAI,EAAE,GAAGT,gBAAgB;YAC7B,KAAKM,MAAM,KAAK,CAAC,SAAS;YAC1BA;YACA,OAAOI,iBAAiB,MAAM;YAC9B,SAAS;YACT,eAAeA,iBAAiB,MAAM;QAC1C;QACAL,OAAO,CAACG,YAAY,GAAGT,aAAa,MAAM,CAAC;YACvC,cAAcO,MAAM,YAAY;YAChC,SAASK,WAAWL;YACpB,UAAUA,MAAM,QAAQ;YACxB,YAAYA,MAAM,UAAU;YAC5B,OAAOf;YACPkB;QACJ;QACA,OAAOJ;IACX,GACA;QACI,CAAC,IAAI,EAAEN,aAAa,MAAM,CAAC;YACvB,OAAO;YACP,SAAS;QACb;IACJ;IAGJ,MAAMa,kBAAkBhB,KACnB,GAAG,CAACiB,CAAAA;QACD,MAAMC,UAAU1B,WAAWyB;QAC3B,IAAI,CAACC,SACD,OAAO;QAEX,MAAM,EAAEvB,OAAO,EAAEC,KAAK,EAAEe,QAAQ,EAAE,GAAGO;QACrC,MAAMC,MAAMR,WAAW,CAAC,OAAO,EAAEhB,SAAS,GAAGA;QAC7C,IAAIW,uBAAuB,CAACa,IAAI,EAC5B,OAAO,GAAGb,uBAAuB,CAACa,IAAI,CAAC,CAAC,EAAEvB,OAAO;QAGrD,OAAOqB;IACX,GACC,MAAM,CAACG;IACZ,OAAOC,WAAW;QACd,cAAcd;QACd,MAAMS;IACV;AACJ"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { CmsModelField } from "@webiny/api-headless-cms/types/index.js";
|
|
2
|
-
import type { CmsEntryOpenSearchValueSearchRegistry } from "../../../features/CmsEntryOpenSearchValueSearch/index.js";
|
|
3
|
-
interface Params {
|
|
4
|
-
valueSearchRegistry: CmsEntryOpenSearchValueSearchRegistry.Interface;
|
|
5
|
-
field: CmsModelField;
|
|
6
|
-
value: any;
|
|
7
|
-
}
|
|
8
|
-
export declare const transformValueForSearch: (params: Params) => any;
|
|
9
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const transformValueForSearch = (params)=>{
|
|
2
|
-
const { field, valueSearchRegistry, value } = params;
|
|
3
|
-
const search = valueSearchRegistry.get(field.type);
|
|
4
|
-
if (!search) return value;
|
|
5
|
-
return search.transform({
|
|
6
|
-
field,
|
|
7
|
-
value
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
export { transformValueForSearch };
|
|
11
|
-
|
|
12
|
-
//# sourceMappingURL=transformValueForSearch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operations/entry/elasticsearch/transformValueForSearch.js","sources":["../../../../src/operations/entry/elasticsearch/transformValueForSearch.ts"],"sourcesContent":["import type { CmsModelField } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { CmsEntryOpenSearchValueSearchRegistry } from \"~/features/CmsEntryOpenSearchValueSearch/index.js\";\n\ninterface Params {\n valueSearchRegistry: CmsEntryOpenSearchValueSearchRegistry.Interface;\n field: CmsModelField;\n value: any;\n}\n\nexport const transformValueForSearch = (params: Params): any => {\n const { field, valueSearchRegistry, value } = params;\n const search = valueSearchRegistry.get(field.type);\n if (!search) {\n return value;\n }\n return search.transform({ field, value });\n};\n"],"names":["transformValueForSearch","params","field","valueSearchRegistry","value","search"],"mappings":"AASO,MAAMA,0BAA0B,CAACC;IACpC,MAAM,EAAEC,KAAK,EAAEC,mBAAmB,EAAEC,KAAK,EAAE,GAAGH;IAC9C,MAAMI,SAASF,oBAAoB,GAAG,CAACD,MAAM,IAAI;IACjD,IAAI,CAACG,QACD,OAAOD;IAEX,OAAOC,OAAO,SAAS,CAAC;QAAEH;QAAOE;IAAM;AAC3C"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { OpenSearchQueryBuilderOperator } from "@webiny/api-opensearch/exports/api/opensearch.js";
|
|
2
|
-
import type { CmsModelField } from "@webiny/api-headless-cms/types/index.js";
|
|
3
|
-
/**
|
|
4
|
-
* ./fields
|
|
5
|
-
*/
|
|
6
|
-
type ModelFieldPath = string | ((value: string) => string);
|
|
7
|
-
export type FieldType = "text" | "date" | "datetime" | "time" | "number" | "boolean" | string;
|
|
8
|
-
export interface ModelFieldParent {
|
|
9
|
-
fieldId: string;
|
|
10
|
-
storageId: string;
|
|
11
|
-
type: FieldType;
|
|
12
|
-
}
|
|
13
|
-
export interface ModelField {
|
|
14
|
-
unmappedType?: string;
|
|
15
|
-
keyword?: boolean;
|
|
16
|
-
searchable: boolean;
|
|
17
|
-
sortable: boolean;
|
|
18
|
-
type: FieldType;
|
|
19
|
-
systemField?: boolean;
|
|
20
|
-
field: CmsModelField;
|
|
21
|
-
path?: ModelFieldPath;
|
|
22
|
-
fullTextSearch?: boolean;
|
|
23
|
-
parents: ModelFieldParent[];
|
|
24
|
-
}
|
|
25
|
-
export interface ModelFields {
|
|
26
|
-
[fieldId: string]: ModelField;
|
|
27
|
-
}
|
|
28
|
-
export interface OpenSearchQueryBuilderOperators {
|
|
29
|
-
[key: string]: OpenSearchQueryBuilderOperator.Interface;
|
|
30
|
-
}
|
|
31
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { Configurations } from "../../configurations.js";
|
|
2
|
-
import type { Client } from "@webiny/api-opensearch";
|
|
3
|
-
import { type IOpenSearchEntity as IElasticsearchEntity } from "@webiny/api-opensearch";
|
|
4
|
-
import type { PluginsContainer } from "@webiny/plugins";
|
|
5
|
-
import type { OpenSearchQueryBuilderOperatorRegistry } from "@webiny/api-opensearch/exports/api/opensearch.js";
|
|
6
|
-
import type { OpenSearchFieldFactory } from "@webiny/api-opensearch/exports/api/opensearch.js";
|
|
7
|
-
import type { CmsEntryStorageOperations } from "../../types.js";
|
|
8
|
-
import type { IEntryEntity } from "../../definitions/types.js";
|
|
9
|
-
import type { CmsModelFieldToGraphQLRegistry } from "@webiny/api-headless-cms/exports/api/cms/graphql.js";
|
|
10
|
-
import { CompressionHandler } from "@webiny/utils/features/compression/abstractions/CompressionHandler.js";
|
|
11
|
-
import type { CmsEntryOpenSearchBodyModifier } from "../../features/CmsEntryOpenSearchBodyModifier/index.js";
|
|
12
|
-
import type { CmsEntryOpenSearchSortModifier } from "../../features/CmsEntryOpenSearchSortModifier/index.js";
|
|
13
|
-
import type { CmsEntryOpenSearchValuesModifier } from "../../features/CmsEntryOpenSearchValuesModifier/index.js";
|
|
14
|
-
import type { CmsEntryOpenSearchQueryModifier } from "../../features/CmsEntryOpenSearchQueryModifier/index.js";
|
|
15
|
-
import type { CmsEntryOpenSearchValueSearchRegistry } from "../../features/CmsEntryOpenSearchValueSearch/index.js";
|
|
16
|
-
import type { CmsEntryOpenSearchFullTextSearch } from "../../features/CmsEntryOpenSearchFullTextSearch/index.js";
|
|
17
|
-
import type { CmsEntryOpenSearchFieldIndexRegistry } from "../../features/CmsEntryOpenSearchFieldIndex/index.js";
|
|
18
|
-
import type { CmsEntryOpenSearchFilterRegistry } from "../../features/CmsEntryOpenSearchFilter/index.js";
|
|
19
|
-
export interface CreateEntriesStorageOperationsParams {
|
|
20
|
-
entity: IEntryEntity;
|
|
21
|
-
esEntity: IElasticsearchEntity;
|
|
22
|
-
elasticsearch: Client;
|
|
23
|
-
plugins: PluginsContainer;
|
|
24
|
-
configurations: Configurations;
|
|
25
|
-
operatorRegistry: OpenSearchQueryBuilderOperatorRegistry.Interface;
|
|
26
|
-
fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface;
|
|
27
|
-
fieldIndexRegistry: CmsEntryOpenSearchFieldIndexRegistry.Interface;
|
|
28
|
-
compressionHandler: CompressionHandler.Interface;
|
|
29
|
-
bodyModifiers: CmsEntryOpenSearchBodyModifier.Interface[];
|
|
30
|
-
sortModifiers: CmsEntryOpenSearchSortModifier.Interface[];
|
|
31
|
-
queryModifiers: CmsEntryOpenSearchQueryModifier.Interface[];
|
|
32
|
-
valueSearchRegistry: CmsEntryOpenSearchValueSearchRegistry.Interface;
|
|
33
|
-
fullTextSearches: CmsEntryOpenSearchFullTextSearch.Interface[];
|
|
34
|
-
valuesModifiers: CmsEntryOpenSearchValuesModifier.Interface[];
|
|
35
|
-
filterRegistry: CmsEntryOpenSearchFilterRegistry.Interface;
|
|
36
|
-
fieldFactory: OpenSearchFieldFactory.Interface;
|
|
37
|
-
}
|
|
38
|
-
export declare const createEntriesStorageOperations: (params: CreateEntriesStorageOperationsParams) => CmsEntryStorageOperations;
|