@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,116 +0,0 @@
|
|
|
1
|
-
import { getFieldIdentifiers } from "../../../helpers/index.js";
|
|
2
|
-
import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
3
|
-
class ObjectFieldIndexImpl {
|
|
4
|
-
toIndex({ model, field, value: initialValue, rawValue: initialRawValue, getFieldIndex }) {
|
|
5
|
-
if (!initialValue) return {
|
|
6
|
-
value: null
|
|
7
|
-
};
|
|
8
|
-
const fields = field.settings?.fields || [];
|
|
9
|
-
if (field.list) {
|
|
10
|
-
const result = {
|
|
11
|
-
value: [],
|
|
12
|
-
rawValue: []
|
|
13
|
-
};
|
|
14
|
-
for(const key in initialValue){
|
|
15
|
-
const { value, rawValue } = this.processToIndex({
|
|
16
|
-
value: initialValue[key],
|
|
17
|
-
rawValue: initialRawValue[key],
|
|
18
|
-
getFieldIndex,
|
|
19
|
-
model,
|
|
20
|
-
fields
|
|
21
|
-
});
|
|
22
|
-
if (initialValue[key]?._id) {
|
|
23
|
-
value._id = initialValue[key]._id;
|
|
24
|
-
rawValue._id = initialValue[key]._id;
|
|
25
|
-
}
|
|
26
|
-
result.value.push(value);
|
|
27
|
-
result.rawValue.push(rawValue);
|
|
28
|
-
}
|
|
29
|
-
return {
|
|
30
|
-
value: result.value.length > 0 ? result.value : void 0,
|
|
31
|
-
rawValue: result.rawValue.length > 0 ? result.rawValue : void 0
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
return this.processToIndex({
|
|
35
|
-
value: initialValue,
|
|
36
|
-
rawValue: initialRawValue,
|
|
37
|
-
getFieldIndex,
|
|
38
|
-
model,
|
|
39
|
-
fields
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
fromIndex({ field, value, rawValue, model, getFieldIndex }) {
|
|
43
|
-
if (!value) return null;
|
|
44
|
-
const fields = field.settings?.fields || [];
|
|
45
|
-
if (field.list) {
|
|
46
|
-
const source = value || rawValue || [];
|
|
47
|
-
return source.map((_, index)=>{
|
|
48
|
-
const processed = this.processFromIndex({
|
|
49
|
-
value: value ? value[index] || {} : {},
|
|
50
|
-
rawValue: rawValue ? rawValue[index] || {} : {},
|
|
51
|
-
getFieldIndex,
|
|
52
|
-
model,
|
|
53
|
-
fields
|
|
54
|
-
});
|
|
55
|
-
const sourceItem = value ? value[index] : rawValue ? rawValue[index] : null;
|
|
56
|
-
if (sourceItem?._id) processed._id = sourceItem._id;
|
|
57
|
-
return processed;
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
return this.processFromIndex({
|
|
61
|
-
value,
|
|
62
|
-
rawValue,
|
|
63
|
-
getFieldIndex,
|
|
64
|
-
model,
|
|
65
|
-
fields
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
processToIndex(params) {
|
|
69
|
-
const { fields, value: sourceValue, rawValue: sourceRawValue, getFieldIndex, model } = params;
|
|
70
|
-
return fields.reduce((values, field)=>{
|
|
71
|
-
const plugin = getFieldIndex(field.type);
|
|
72
|
-
const identifiers = getFieldIdentifiers(sourceValue, sourceRawValue, field);
|
|
73
|
-
if (!identifiers) return values;
|
|
74
|
-
const { value, rawValue } = plugin.toIndex({
|
|
75
|
-
model,
|
|
76
|
-
field,
|
|
77
|
-
value: sourceValue[identifiers.valueIdentifier || identifiers.rawValueIdentifier],
|
|
78
|
-
rawValue: sourceRawValue[identifiers.rawValueIdentifier || identifiers.valueIdentifier],
|
|
79
|
-
getFieldIndex
|
|
80
|
-
});
|
|
81
|
-
if (void 0 !== value) values.value[identifiers.valueIdentifier || identifiers.rawValueIdentifier] = value;
|
|
82
|
-
if (void 0 !== rawValue) values.rawValue[identifiers.rawValueIdentifier || identifiers.valueIdentifier] = rawValue;
|
|
83
|
-
return values;
|
|
84
|
-
}, {
|
|
85
|
-
value: {},
|
|
86
|
-
rawValue: {}
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
constructor(){
|
|
90
|
-
this.fieldType = "object";
|
|
91
|
-
this.processFromIndex = (params)=>{
|
|
92
|
-
const { fields, value: sourceValue, rawValue: sourceRawValue, getFieldIndex, model } = params;
|
|
93
|
-
return fields.reduce((values, field)=>{
|
|
94
|
-
const plugin = getFieldIndex(field.type);
|
|
95
|
-
const identifiers = getFieldIdentifiers(sourceValue, sourceRawValue, field);
|
|
96
|
-
if (!identifiers) return values;
|
|
97
|
-
const value = plugin.fromIndex({
|
|
98
|
-
model,
|
|
99
|
-
field,
|
|
100
|
-
value: sourceValue[identifiers.valueIdentifier || identifiers.rawValueIdentifier],
|
|
101
|
-
rawValue: sourceRawValue ? sourceRawValue[identifiers.rawValueIdentifier || identifiers.valueIdentifier] : null,
|
|
102
|
-
getFieldIndex
|
|
103
|
-
});
|
|
104
|
-
if (void 0 !== value) values[identifiers.valueIdentifier || identifiers.rawValueIdentifier] = value;
|
|
105
|
-
return values;
|
|
106
|
-
}, {});
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
const ObjectFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({
|
|
111
|
-
implementation: ObjectFieldIndexImpl,
|
|
112
|
-
dependencies: []
|
|
113
|
-
});
|
|
114
|
-
export { ObjectFieldIndex };
|
|
115
|
-
|
|
116
|
-
//# sourceMappingURL=ObjectFieldIndex.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js","sources":["../../../../src/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.ts"],"sourcesContent":["import type { CmsModel, CmsModelField } from \"@webiny/api-headless-cms/types/index.js\";\nimport { getFieldIdentifiers } from \"~/helpers/index.js\";\nimport { CmsEntryOpenSearchFieldIndex } from \"../abstractions/CmsEntryOpenSearchFieldIndex.js\";\n\ninterface ProcessToIndexParams {\n fields: CmsModelField[];\n value: Record<string, any>;\n rawValue: Record<string, any>;\n getFieldIndex: (fieldType: string) => CmsEntryOpenSearchFieldIndex.Interface;\n model: CmsModel;\n}\n\ninterface ReducerValue {\n value: Record<string, any>;\n rawValue: Record<string, any>;\n}\n\ninterface ProcessFromIndexParams {\n fields: CmsModelField[];\n value: Record<string, any>;\n rawValue?: Record<string, any> | null;\n getFieldIndex: (fieldType: string) => CmsEntryOpenSearchFieldIndex.Interface;\n model: CmsModel;\n}\n\nclass ObjectFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {\n public readonly fieldType = \"object\";\n\n public toIndex({\n model,\n field,\n value: initialValue,\n rawValue: initialRawValue,\n getFieldIndex\n }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue {\n if (!initialValue) {\n return { value: null };\n }\n\n const fields = (field.settings?.fields || []) as CmsModelField[];\n\n if (field.list) {\n const result: { value: Record<string, any>[]; rawValue: Record<string, any>[] } = {\n value: [],\n rawValue: []\n };\n for (const key in initialValue) {\n const { value, rawValue } = this.processToIndex({\n value: initialValue[key],\n rawValue: initialRawValue[key],\n getFieldIndex,\n model,\n fields\n });\n\n if (initialValue[key]?._id) {\n value._id = initialValue[key]._id;\n rawValue._id = initialValue[key]._id;\n }\n\n result.value.push(value);\n result.rawValue.push(rawValue);\n }\n\n return {\n value: result.value.length > 0 ? result.value : undefined,\n rawValue: result.rawValue.length > 0 ? result.rawValue : undefined\n };\n }\n\n return this.processToIndex({\n value: initialValue,\n rawValue: initialRawValue,\n getFieldIndex,\n model,\n fields\n });\n }\n\n public fromIndex({\n field,\n value,\n rawValue,\n model,\n getFieldIndex\n }: CmsEntryOpenSearchFieldIndex.FromIndex): any {\n if (!value) {\n return null;\n }\n\n const fields = field.settings?.fields || [];\n\n if (field.list) {\n const source = value || rawValue || [];\n\n return source.map((_: any, index: number) => {\n const processed = this.processFromIndex({\n value: value ? value[index] || {} : {},\n rawValue: rawValue ? rawValue[index] || {} : {},\n getFieldIndex,\n model,\n fields\n });\n const sourceItem = value ? value[index] : rawValue ? rawValue[index] : null;\n if (sourceItem?._id) {\n processed._id = sourceItem._id;\n }\n return processed;\n });\n }\n\n return this.processFromIndex({\n value,\n rawValue,\n getFieldIndex,\n model,\n fields\n });\n }\n\n private processToIndex(params: ProcessToIndexParams): ReducerValue {\n const {\n fields,\n value: sourceValue,\n rawValue: sourceRawValue,\n getFieldIndex,\n model\n } = params;\n\n return fields.reduce<ReducerValue>(\n (values, field) => {\n const plugin = getFieldIndex(field.type);\n\n const identifiers = getFieldIdentifiers(sourceValue, sourceRawValue, field);\n if (!identifiers) {\n return values;\n }\n\n const { value, rawValue } = plugin.toIndex({\n model,\n field,\n value: sourceValue[\n identifiers.valueIdentifier || identifiers.rawValueIdentifier\n ],\n rawValue:\n sourceRawValue[\n identifiers.rawValueIdentifier || identifiers.valueIdentifier\n ],\n getFieldIndex\n });\n\n if (value !== undefined) {\n values.value[identifiers.valueIdentifier || identifiers.rawValueIdentifier] =\n value;\n }\n if (rawValue !== undefined) {\n values.rawValue[identifiers.rawValueIdentifier || identifiers.valueIdentifier] =\n rawValue;\n }\n\n return values;\n },\n { value: {}, rawValue: {} }\n );\n }\n\n private processFromIndex = (params: ProcessFromIndexParams): Record<string, any> => {\n const {\n fields,\n value: sourceValue,\n rawValue: sourceRawValue,\n getFieldIndex,\n model\n } = params;\n\n return fields.reduce<Record<string, any>>((values, field) => {\n const plugin = getFieldIndex(field.type);\n\n const identifiers = getFieldIdentifiers(sourceValue, sourceRawValue, field);\n if (!identifiers) {\n return values;\n }\n\n const value = plugin.fromIndex({\n model,\n field,\n value: sourceValue[identifiers.valueIdentifier || identifiers.rawValueIdentifier],\n rawValue: sourceRawValue\n ? sourceRawValue[identifiers.rawValueIdentifier || identifiers.valueIdentifier]\n : null,\n getFieldIndex\n });\n\n if (value !== undefined) {\n values[identifiers.valueIdentifier || identifiers.rawValueIdentifier] = value;\n }\n\n return values;\n }, {});\n };\n}\n\nexport const ObjectFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({\n implementation: ObjectFieldIndexImpl,\n dependencies: []\n});\n"],"names":["ObjectFieldIndexImpl","model","field","initialValue","initialRawValue","getFieldIndex","fields","result","key","value","rawValue","undefined","source","_","index","processed","sourceItem","params","sourceValue","sourceRawValue","values","plugin","identifiers","getFieldIdentifiers","ObjectFieldIndex","CmsEntryOpenSearchFieldIndex"],"mappings":";;AAyBA,MAAMA;IAGK,QAAQ,EACXC,KAAK,EACLC,KAAK,EACL,OAAOC,YAAY,EACnB,UAAUC,eAAe,EACzBC,aAAa,EACsB,EAAwC;QAC3E,IAAI,CAACF,cACD,OAAO;YAAE,OAAO;QAAK;QAGzB,MAAMG,SAAUJ,MAAM,QAAQ,EAAE,UAAU,EAAE;QAE5C,IAAIA,MAAM,IAAI,EAAE;YACZ,MAAMK,SAA4E;gBAC9E,OAAO,EAAE;gBACT,UAAU,EAAE;YAChB;YACA,IAAK,MAAMC,OAAOL,aAAc;gBAC5B,MAAM,EAAEM,KAAK,EAAEC,QAAQ,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC;oBAC5C,OAAOP,YAAY,CAACK,IAAI;oBACxB,UAAUJ,eAAe,CAACI,IAAI;oBAC9BH;oBACAJ;oBACAK;gBACJ;gBAEA,IAAIH,YAAY,CAACK,IAAI,EAAE,KAAK;oBACxBC,MAAM,GAAG,GAAGN,YAAY,CAACK,IAAI,CAAC,GAAG;oBACjCE,SAAS,GAAG,GAAGP,YAAY,CAACK,IAAI,CAAC,GAAG;gBACxC;gBAEAD,OAAO,KAAK,CAAC,IAAI,CAACE;gBAClBF,OAAO,QAAQ,CAAC,IAAI,CAACG;YACzB;YAEA,OAAO;gBACH,OAAOH,OAAO,KAAK,CAAC,MAAM,GAAG,IAAIA,OAAO,KAAK,GAAGI;gBAChD,UAAUJ,OAAO,QAAQ,CAAC,MAAM,GAAG,IAAIA,OAAO,QAAQ,GAAGI;YAC7D;QACJ;QAEA,OAAO,IAAI,CAAC,cAAc,CAAC;YACvB,OAAOR;YACP,UAAUC;YACVC;YACAJ;YACAK;QACJ;IACJ;IAEO,UAAU,EACbJ,KAAK,EACLO,KAAK,EACLC,QAAQ,EACRT,KAAK,EACLI,aAAa,EACwB,EAAO;QAC5C,IAAI,CAACI,OACD,OAAO;QAGX,MAAMH,SAASJ,MAAM,QAAQ,EAAE,UAAU,EAAE;QAE3C,IAAIA,MAAM,IAAI,EAAE;YACZ,MAAMU,SAASH,SAASC,YAAY,EAAE;YAEtC,OAAOE,OAAO,GAAG,CAAC,CAACC,GAAQC;gBACvB,MAAMC,YAAY,IAAI,CAAC,gBAAgB,CAAC;oBACpC,OAAON,QAAQA,KAAK,CAACK,MAAM,IAAI,CAAC,IAAI,CAAC;oBACrC,UAAUJ,WAAWA,QAAQ,CAACI,MAAM,IAAI,CAAC,IAAI,CAAC;oBAC9CT;oBACAJ;oBACAK;gBACJ;gBACA,MAAMU,aAAaP,QAAQA,KAAK,CAACK,MAAM,GAAGJ,WAAWA,QAAQ,CAACI,MAAM,GAAG;gBACvE,IAAIE,YAAY,KACZD,UAAU,GAAG,GAAGC,WAAW,GAAG;gBAElC,OAAOD;YACX;QACJ;QAEA,OAAO,IAAI,CAAC,gBAAgB,CAAC;YACzBN;YACAC;YACAL;YACAJ;YACAK;QACJ;IACJ;IAEQ,eAAeW,MAA4B,EAAgB;QAC/D,MAAM,EACFX,MAAM,EACN,OAAOY,WAAW,EAClB,UAAUC,cAAc,EACxBd,aAAa,EACbJ,KAAK,EACR,GAAGgB;QAEJ,OAAOX,OAAO,MAAM,CAChB,CAACc,QAAQlB;YACL,MAAMmB,SAAShB,cAAcH,MAAM,IAAI;YAEvC,MAAMoB,cAAcC,oBAAoBL,aAAaC,gBAAgBjB;YACrE,IAAI,CAACoB,aACD,OAAOF;YAGX,MAAM,EAAEX,KAAK,EAAEC,QAAQ,EAAE,GAAGW,OAAO,OAAO,CAAC;gBACvCpB;gBACAC;gBACA,OAAOgB,WAAW,CACdI,YAAY,eAAe,IAAIA,YAAY,kBAAkB,CAChE;gBACD,UACIH,cAAc,CACVG,YAAY,kBAAkB,IAAIA,YAAY,eAAe,CAChE;gBACLjB;YACJ;YAEA,IAAII,AAAUE,WAAVF,OACAW,OAAO,KAAK,CAACE,YAAY,eAAe,IAAIA,YAAY,kBAAkB,CAAC,GACvEb;YAER,IAAIC,AAAaC,WAAbD,UACAU,OAAO,QAAQ,CAACE,YAAY,kBAAkB,IAAIA,YAAY,eAAe,CAAC,GAC1EZ;YAGR,OAAOU;QACX,GACA;YAAE,OAAO,CAAC;YAAG,UAAU,CAAC;QAAE;IAElC;;aA1IgB,SAAS,GAAG;aA4IpB,gBAAgB,GAAG,CAACH;YACxB,MAAM,EACFX,MAAM,EACN,OAAOY,WAAW,EAClB,UAAUC,cAAc,EACxBd,aAAa,EACbJ,KAAK,EACR,GAAGgB;YAEJ,OAAOX,OAAO,MAAM,CAAsB,CAACc,QAAQlB;gBAC/C,MAAMmB,SAAShB,cAAcH,MAAM,IAAI;gBAEvC,MAAMoB,cAAcC,oBAAoBL,aAAaC,gBAAgBjB;gBACrE,IAAI,CAACoB,aACD,OAAOF;gBAGX,MAAMX,QAAQY,OAAO,SAAS,CAAC;oBAC3BpB;oBACAC;oBACA,OAAOgB,WAAW,CAACI,YAAY,eAAe,IAAIA,YAAY,kBAAkB,CAAC;oBACjF,UAAUH,iBACJA,cAAc,CAACG,YAAY,kBAAkB,IAAIA,YAAY,eAAe,CAAC,GAC7E;oBACNjB;gBACJ;gBAEA,IAAII,AAAUE,WAAVF,OACAW,MAAM,CAACE,YAAY,eAAe,IAAIA,YAAY,kBAAkB,CAAC,GAAGb;gBAG5E,OAAOW;YACX,GAAG,CAAC;QACR;;AACJ;AAEO,MAAMI,mBAAmBC,6BAA6B,oBAAoB,CAAC;IAC9E,gBAAgBzB;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
2
|
-
declare class RichTextFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {
|
|
3
|
-
readonly fieldType = "rich-text";
|
|
4
|
-
toIndex({ value }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue;
|
|
5
|
-
fromIndex({ rawValue }: CmsEntryOpenSearchFieldIndex.FromIndex): any;
|
|
6
|
-
}
|
|
7
|
-
export declare const RichTextFieldIndex: typeof RichTextFieldIndexImpl & {
|
|
8
|
-
__abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFieldIndex.js").ICmsEntryOpenSearchFieldIndex>;
|
|
9
|
-
};
|
|
10
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
2
|
-
class RichTextFieldIndexImpl {
|
|
3
|
-
toIndex({ value }) {
|
|
4
|
-
return {
|
|
5
|
-
rawValue: value
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
fromIndex({ rawValue }) {
|
|
9
|
-
return rawValue;
|
|
10
|
-
}
|
|
11
|
-
constructor(){
|
|
12
|
-
this.fieldType = "rich-text";
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
const RichTextFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({
|
|
16
|
-
implementation: RichTextFieldIndexImpl,
|
|
17
|
-
dependencies: []
|
|
18
|
-
});
|
|
19
|
-
export { RichTextFieldIndex };
|
|
20
|
-
|
|
21
|
-
//# sourceMappingURL=RichTextFieldIndex.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js","sources":["../../../../src/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.ts"],"sourcesContent":["import { CmsEntryOpenSearchFieldIndex } from \"../abstractions/CmsEntryOpenSearchFieldIndex.js\";\n\nclass RichTextFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {\n public readonly fieldType = \"rich-text\";\n\n public toIndex({\n value\n }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue {\n return {\n rawValue: value\n };\n }\n\n public fromIndex({ rawValue }: CmsEntryOpenSearchFieldIndex.FromIndex): any {\n return rawValue;\n }\n}\n\nexport const RichTextFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({\n implementation: RichTextFieldIndexImpl,\n dependencies: []\n});\n"],"names":["RichTextFieldIndexImpl","value","rawValue","RichTextFieldIndex","CmsEntryOpenSearchFieldIndex"],"mappings":";AAEA,MAAMA;IAGK,QAAQ,EACXC,KAAK,EAC8B,EAAwC;QAC3E,OAAO;YACH,UAAUA;QACd;IACJ;IAEO,UAAU,EAAEC,QAAQ,EAA0C,EAAO;QACxE,OAAOA;IACX;;aAZgB,SAAS,GAAG;;AAahC;AAEO,MAAMC,qBAAqBC,6BAA6B,oBAAoB,CAAC;IAChF,gBAAgBJ;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
2
|
-
import { CmsModelFieldToGraphQLRegistry } from "@webiny/api-headless-cms/exports/api/cms/graphql.js";
|
|
3
|
-
import { TextFieldTypes } from "@webiny/api-headless-cms/features/modelBuilder/index.js";
|
|
4
|
-
declare class TextCompressedFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {
|
|
5
|
-
private readonly fieldRegistry;
|
|
6
|
-
readonly fieldType = TextFieldTypes.COMPRESSED;
|
|
7
|
-
constructor(fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface);
|
|
8
|
-
toIndex(params: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue;
|
|
9
|
-
fromIndex(params: CmsEntryOpenSearchFieldIndex.FromIndex): any;
|
|
10
|
-
private isSearchable;
|
|
11
|
-
}
|
|
12
|
-
export declare const TextCompressedFieldIndex: typeof TextCompressedFieldIndexImpl & {
|
|
13
|
-
__abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFieldIndex.js").ICmsEntryOpenSearchFieldIndex>;
|
|
14
|
-
};
|
|
15
|
-
export {};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
2
|
-
import { CmsModelFieldToGraphQLRegistry } from "@webiny/api-headless-cms/exports/api/cms/graphql.js";
|
|
3
|
-
import { TextFieldTypes } from "@webiny/api-headless-cms/features/modelBuilder/index.js";
|
|
4
|
-
class TextCompressedFieldIndexImpl {
|
|
5
|
-
constructor(fieldRegistry){
|
|
6
|
-
this.fieldRegistry = fieldRegistry;
|
|
7
|
-
this.fieldType = TextFieldTypes.COMPRESSED;
|
|
8
|
-
}
|
|
9
|
-
toIndex(params) {
|
|
10
|
-
const { field, value } = params;
|
|
11
|
-
const isSearchable = this.isSearchable(field);
|
|
12
|
-
if (isSearchable) return {
|
|
13
|
-
value
|
|
14
|
-
};
|
|
15
|
-
return {
|
|
16
|
-
rawValue: value
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
fromIndex(params) {
|
|
20
|
-
const { field, value, rawValue } = params;
|
|
21
|
-
const isSearchable = this.isSearchable(field);
|
|
22
|
-
if (isSearchable) return void 0 === value ? rawValue : value;
|
|
23
|
-
return void 0 === rawValue ? value : rawValue;
|
|
24
|
-
}
|
|
25
|
-
isSearchable(field) {
|
|
26
|
-
const fieldType = this.fieldRegistry.get(field.type);
|
|
27
|
-
if (!fieldType?.isSearchable) return false;
|
|
28
|
-
if (field.settings?.disableFullTextSearch === true) return false;
|
|
29
|
-
return true;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
const TextCompressedFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({
|
|
33
|
-
implementation: TextCompressedFieldIndexImpl,
|
|
34
|
-
dependencies: [
|
|
35
|
-
CmsModelFieldToGraphQLRegistry
|
|
36
|
-
]
|
|
37
|
-
});
|
|
38
|
-
export { TextCompressedFieldIndex };
|
|
39
|
-
|
|
40
|
-
//# sourceMappingURL=TextCompressedFieldIndex.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.js","sources":["../../../../src/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.ts"],"sourcesContent":["import { CmsEntryOpenSearchFieldIndex } from \"../abstractions/CmsEntryOpenSearchFieldIndex.js\";\nimport type { CmsModelField } from \"@webiny/api-headless-cms/types/index.js\";\nimport { CmsModelFieldToGraphQLRegistry } from \"@webiny/api-headless-cms/exports/api/cms/graphql.js\";\nimport { TextFieldTypes } from \"@webiny/api-headless-cms/features/modelBuilder/index.js\";\n\nclass TextCompressedFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {\n public readonly fieldType = TextFieldTypes.COMPRESSED;\n\n public constructor(private readonly fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface) {}\n\n public toIndex(\n params: CmsEntryOpenSearchFieldIndex.ToIndex\n ): CmsEntryOpenSearchFieldIndex.ToValue {\n const { field, value } = params;\n const isSearchable = this.isSearchable(field);\n\n if (isSearchable) {\n return { value };\n }\n\n return {\n rawValue: value\n };\n }\n\n public fromIndex(params: CmsEntryOpenSearchFieldIndex.FromIndex): any {\n const { field, value, rawValue } = params;\n const isSearchable = this.isSearchable(field);\n\n if (isSearchable) {\n return value === undefined ? rawValue : value;\n }\n return rawValue === undefined ? value : rawValue;\n }\n\n private isSearchable(field: CmsModelField): boolean {\n const fieldType = this.fieldRegistry.get(field.type);\n if (!fieldType?.isSearchable) {\n return false;\n } else if (field.settings?.disableFullTextSearch === true) {\n return false;\n }\n return true;\n }\n}\n\nexport const TextCompressedFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({\n implementation: TextCompressedFieldIndexImpl,\n dependencies: [CmsModelFieldToGraphQLRegistry]\n});\n"],"names":["TextCompressedFieldIndexImpl","fieldRegistry","TextFieldTypes","params","field","value","isSearchable","rawValue","undefined","fieldType","TextCompressedFieldIndex","CmsEntryOpenSearchFieldIndex","CmsModelFieldToGraphQLRegistry"],"mappings":";;;AAKA,MAAMA;IAGF,YAAoCC,aAAuD,CAAE;aAAzDA,aAAa,GAAbA;aAFpB,SAAS,GAAGC,eAAe,UAAU;IAEyC;IAEvF,QACHC,MAA4C,EACR;QACpC,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAE,GAAGF;QACzB,MAAMG,eAAe,IAAI,CAAC,YAAY,CAACF;QAEvC,IAAIE,cACA,OAAO;YAAED;QAAM;QAGnB,OAAO;YACH,UAAUA;QACd;IACJ;IAEO,UAAUF,MAA8C,EAAO;QAClE,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAEE,QAAQ,EAAE,GAAGJ;QACnC,MAAMG,eAAe,IAAI,CAAC,YAAY,CAACF;QAEvC,IAAIE,cACA,OAAOD,AAAUG,WAAVH,QAAsBE,WAAWF;QAE5C,OAAOE,AAAaC,WAAbD,WAAyBF,QAAQE;IAC5C;IAEQ,aAAaH,KAAoB,EAAW;QAChD,MAAMK,YAAY,IAAI,CAAC,aAAa,CAAC,GAAG,CAACL,MAAM,IAAI;QACnD,IAAI,CAACK,WAAW,cACZ,OAAO;QACJ,IAAIL,MAAM,QAAQ,EAAE,0BAA0B,MACjD,OAAO;QAEX,OAAO;IACX;AACJ;AAEO,MAAMM,2BAA2BC,6BAA6B,oBAAoB,CAAC;IACtF,gBAAgBX;IAChB,cAAc;QAACY;KAA+B;AAClD"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
2
|
-
import { CmsModelFieldToGraphQLRegistry } from "@webiny/api-headless-cms/exports/api/cms/graphql.js";
|
|
3
|
-
import { TextFieldTypes } from "@webiny/api-headless-cms/features/modelBuilder/index.js";
|
|
4
|
-
declare class TextEncryptedFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {
|
|
5
|
-
private readonly fieldRegistry;
|
|
6
|
-
readonly fieldType = TextFieldTypes.ENCRYPTED;
|
|
7
|
-
constructor(fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface);
|
|
8
|
-
toIndex(params: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue;
|
|
9
|
-
fromIndex(params: CmsEntryOpenSearchFieldIndex.FromIndex): any;
|
|
10
|
-
private isSearchable;
|
|
11
|
-
}
|
|
12
|
-
export declare const TextEncryptedFieldIndex: typeof TextEncryptedFieldIndexImpl & {
|
|
13
|
-
__abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFieldIndex.js").ICmsEntryOpenSearchFieldIndex>;
|
|
14
|
-
};
|
|
15
|
-
export {};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
2
|
-
import { CmsModelFieldToGraphQLRegistry } from "@webiny/api-headless-cms/exports/api/cms/graphql.js";
|
|
3
|
-
import { TextFieldTypes } from "@webiny/api-headless-cms/features/modelBuilder/index.js";
|
|
4
|
-
class TextEncryptedFieldIndexImpl {
|
|
5
|
-
constructor(fieldRegistry){
|
|
6
|
-
this.fieldRegistry = fieldRegistry;
|
|
7
|
-
this.fieldType = TextFieldTypes.ENCRYPTED;
|
|
8
|
-
}
|
|
9
|
-
toIndex(params) {
|
|
10
|
-
const { field, value } = params;
|
|
11
|
-
const isSearchable = this.isSearchable(field);
|
|
12
|
-
if (isSearchable) return {
|
|
13
|
-
value
|
|
14
|
-
};
|
|
15
|
-
return {
|
|
16
|
-
rawValue: value
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
fromIndex(params) {
|
|
20
|
-
const { field, value, rawValue } = params;
|
|
21
|
-
const isSearchable = this.isSearchable(field);
|
|
22
|
-
if (isSearchable) return void 0 === value ? rawValue : value;
|
|
23
|
-
return void 0 === rawValue ? value : rawValue;
|
|
24
|
-
}
|
|
25
|
-
isSearchable(field) {
|
|
26
|
-
const fieldType = this.fieldRegistry.get(field.type);
|
|
27
|
-
if (!fieldType?.isSearchable) return false;
|
|
28
|
-
if (field.settings?.disableFullTextSearch === true) return false;
|
|
29
|
-
return true;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
const TextEncryptedFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({
|
|
33
|
-
implementation: TextEncryptedFieldIndexImpl,
|
|
34
|
-
dependencies: [
|
|
35
|
-
CmsModelFieldToGraphQLRegistry
|
|
36
|
-
]
|
|
37
|
-
});
|
|
38
|
-
export { TextEncryptedFieldIndex };
|
|
39
|
-
|
|
40
|
-
//# sourceMappingURL=TextEncryptedFieldIndex.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.js","sources":["../../../../src/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.ts"],"sourcesContent":["import { CmsEntryOpenSearchFieldIndex } from \"../abstractions/CmsEntryOpenSearchFieldIndex.js\";\nimport type { CmsModelField } from \"@webiny/api-headless-cms/types/index.js\";\nimport { CmsModelFieldToGraphQLRegistry } from \"@webiny/api-headless-cms/exports/api/cms/graphql.js\";\nimport { TextFieldTypes } from \"@webiny/api-headless-cms/features/modelBuilder/index.js\";\n\nclass TextEncryptedFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {\n public readonly fieldType = TextFieldTypes.ENCRYPTED;\n\n public constructor(private readonly fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface) {}\n\n public toIndex(\n params: CmsEntryOpenSearchFieldIndex.ToIndex\n ): CmsEntryOpenSearchFieldIndex.ToValue {\n const { field, value } = params;\n const isSearchable = this.isSearchable(field);\n\n if (isSearchable) {\n return { value };\n }\n\n return {\n rawValue: value\n };\n }\n\n public fromIndex(params: CmsEntryOpenSearchFieldIndex.FromIndex): any {\n const { field, value, rawValue } = params;\n const isSearchable = this.isSearchable(field);\n\n if (isSearchable) {\n return value === undefined ? rawValue : value;\n }\n return rawValue === undefined ? value : rawValue;\n }\n\n private isSearchable(field: CmsModelField): boolean {\n const fieldType = this.fieldRegistry.get(field.type);\n if (!fieldType?.isSearchable) {\n return false;\n } else if (field.settings?.disableFullTextSearch === true) {\n return false;\n }\n return true;\n }\n}\n\nexport const TextEncryptedFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({\n implementation: TextEncryptedFieldIndexImpl,\n dependencies: [CmsModelFieldToGraphQLRegistry]\n});\n"],"names":["TextEncryptedFieldIndexImpl","fieldRegistry","TextFieldTypes","params","field","value","isSearchable","rawValue","undefined","fieldType","TextEncryptedFieldIndex","CmsEntryOpenSearchFieldIndex","CmsModelFieldToGraphQLRegistry"],"mappings":";;;AAKA,MAAMA;IAGF,YAAoCC,aAAuD,CAAE;aAAzDA,aAAa,GAAbA;aAFpB,SAAS,GAAGC,eAAe,SAAS;IAE0C;IAEvF,QACHC,MAA4C,EACR;QACpC,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAE,GAAGF;QACzB,MAAMG,eAAe,IAAI,CAAC,YAAY,CAACF;QAEvC,IAAIE,cACA,OAAO;YAAED;QAAM;QAGnB,OAAO;YACH,UAAUA;QACd;IACJ;IAEO,UAAUF,MAA8C,EAAO;QAClE,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAEE,QAAQ,EAAE,GAAGJ;QACnC,MAAMG,eAAe,IAAI,CAAC,YAAY,CAACF;QAEvC,IAAIE,cACA,OAAOD,AAAUG,WAAVH,QAAsBE,WAAWF;QAE5C,OAAOE,AAAaC,WAAbD,WAAyBF,QAAQE;IAC5C;IAEQ,aAAaH,KAAoB,EAAW;QAChD,MAAMK,YAAY,IAAI,CAAC,aAAa,CAAC,GAAG,CAACL,MAAM,IAAI;QACnD,IAAI,CAACK,WAAW,cACZ,OAAO;QACJ,IAAIL,MAAM,QAAQ,EAAE,0BAA0B,MACjD,OAAO;QAEX,OAAO;IACX;AACJ;AAEO,MAAMM,0BAA0BC,6BAA6B,oBAAoB,CAAC;IACrF,gBAAgBX;IAChB,cAAc;QAACY;KAA+B;AAClD"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { CmsEntryOpenSearchFieldIndexFeature } from "../../features/CmsEntryOpenSearchFieldIndex/feature.js";
|
|
2
|
-
export { CmsEntryOpenSearchFieldIndex } from "./abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
3
|
-
export { CmsEntryOpenSearchFieldIndexRegistry } from "./abstractions/CmsEntryOpenSearchFieldIndexRegistry.js";
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { CmsEntryOpenSearchFieldIndexFeature } from "./feature.js";
|
|
2
|
-
export { CmsEntryOpenSearchFieldIndex } from "./abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
3
|
-
export { CmsEntryOpenSearchFieldIndexRegistry } from "./abstractions/CmsEntryOpenSearchFieldIndexRegistry.js";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CmsEntryOpenSearchFilterRegistry as Abstraction } from "./abstractions/CmsEntryOpenSearchFilterRegistry.js";
|
|
2
|
-
import { CmsEntryOpenSearchFilter } from "./abstractions/CmsEntryOpenSearchFilter.js";
|
|
3
|
-
declare class CmsEntryOpenSearchFilterRegistryImpl implements Abstraction.Interface {
|
|
4
|
-
private readonly filters;
|
|
5
|
-
constructor(filters: CmsEntryOpenSearchFilter.Interface[]);
|
|
6
|
-
get(type: string): CmsEntryOpenSearchFilter.Interface;
|
|
7
|
-
}
|
|
8
|
-
export declare const CmsEntryOpenSearchFilterRegistry: typeof CmsEntryOpenSearchFilterRegistryImpl & {
|
|
9
|
-
__abstraction: import("@webiny/di").Abstraction<import("./abstractions/CmsEntryOpenSearchFilterRegistry.js").ICmsEntryOpenSearchFilterRegistry>;
|
|
10
|
-
};
|
|
11
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import error from "@webiny/error";
|
|
2
|
-
import { CmsEntryOpenSearchFilterRegistry } from "./abstractions/CmsEntryOpenSearchFilterRegistry.js";
|
|
3
|
-
import { CmsEntryOpenSearchFilter } from "./abstractions/CmsEntryOpenSearchFilter.js";
|
|
4
|
-
import { getBaseFieldType } from "@webiny/api-headless-cms/utils/getBaseFieldType.js";
|
|
5
|
-
import { FILTER_DEFAULT } from "./constants.js";
|
|
6
|
-
class CmsEntryOpenSearchFilterRegistryImpl {
|
|
7
|
-
constructor(filters){
|
|
8
|
-
this.filters = filters;
|
|
9
|
-
}
|
|
10
|
-
get(type) {
|
|
11
|
-
const fieldType = getBaseFieldType({
|
|
12
|
-
type
|
|
13
|
-
});
|
|
14
|
-
const filter = this.filters.find((f)=>f.fieldType === fieldType);
|
|
15
|
-
if (filter) return filter;
|
|
16
|
-
const fallback = this.filters.find((f)=>f.fieldType === FILTER_DEFAULT);
|
|
17
|
-
if (fallback) return fallback;
|
|
18
|
-
throw new error(`There is no filter for the given field type "${fieldType}".`, "FILTER_REGISTRY_ERROR", {
|
|
19
|
-
fieldType
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
const CmsEntryOpenSearchFilterRegistry_CmsEntryOpenSearchFilterRegistry = CmsEntryOpenSearchFilterRegistry.createImplementation({
|
|
24
|
-
implementation: CmsEntryOpenSearchFilterRegistryImpl,
|
|
25
|
-
dependencies: [
|
|
26
|
-
[
|
|
27
|
-
CmsEntryOpenSearchFilter,
|
|
28
|
-
{
|
|
29
|
-
multiple: true
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
]
|
|
33
|
-
});
|
|
34
|
-
export { CmsEntryOpenSearchFilterRegistry_CmsEntryOpenSearchFilterRegistry as CmsEntryOpenSearchFilterRegistry };
|
|
35
|
-
|
|
36
|
-
//# sourceMappingURL=CmsEntryOpenSearchFilterRegistry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js","sources":["../../../src/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { CmsEntryOpenSearchFilterRegistry as Abstraction } from \"./abstractions/CmsEntryOpenSearchFilterRegistry.js\";\nimport { CmsEntryOpenSearchFilter } from \"./abstractions/CmsEntryOpenSearchFilter.js\";\nimport { getBaseFieldType } from \"@webiny/api-headless-cms/utils/getBaseFieldType.js\";\nimport { FILTER_DEFAULT } from \"./constants.js\";\n\nclass CmsEntryOpenSearchFilterRegistryImpl implements Abstraction.Interface {\n public constructor(private readonly filters: CmsEntryOpenSearchFilter.Interface[]) {}\n\n public get(type: string): CmsEntryOpenSearchFilter.Interface {\n const fieldType = getBaseFieldType({ type });\n const filter = this.filters.find(f => {\n return f.fieldType === fieldType;\n });\n if (filter) {\n return filter;\n }\n const fallback = this.filters.find(f => {\n return f.fieldType === FILTER_DEFAULT;\n });\n if (fallback) {\n return fallback;\n }\n throw new WebinyError(\n `There is no filter for the given field type \"${fieldType}\".`,\n \"FILTER_REGISTRY_ERROR\",\n {\n fieldType\n }\n );\n }\n}\n\nexport const CmsEntryOpenSearchFilterRegistry = Abstraction.createImplementation({\n implementation: CmsEntryOpenSearchFilterRegistryImpl,\n dependencies: [[CmsEntryOpenSearchFilter, { multiple: true }]]\n});\n"],"names":["CmsEntryOpenSearchFilterRegistryImpl","filters","type","fieldType","getBaseFieldType","filter","f","fallback","FILTER_DEFAULT","WebinyError","CmsEntryOpenSearchFilterRegistry","Abstraction","CmsEntryOpenSearchFilter"],"mappings":";;;;;AAMA,MAAMA;IACF,YAAoCC,OAA6C,CAAE;aAA/CA,OAAO,GAAPA;IAAgD;IAE7E,IAAIC,IAAY,EAAsC;QACzD,MAAMC,YAAYC,iBAAiB;YAAEF;QAAK;QAC1C,MAAMG,SAAS,IAAI,CAAC,OAAO,CAAC,IAAI,CAACC,CAAAA,IACtBA,EAAE,SAAS,KAAKH;QAE3B,IAAIE,QACA,OAAOA;QAEX,MAAME,WAAW,IAAI,CAAC,OAAO,CAAC,IAAI,CAACD,CAAAA,IACxBA,EAAE,SAAS,KAAKE;QAE3B,IAAID,UACA,OAAOA;QAEX,MAAM,IAAIE,MACN,CAAC,6CAA6C,EAAEN,UAAU,EAAE,CAAC,EAC7D,yBACA;YACIA;QACJ;IAER;AACJ;AAEO,MAAMO,oEAAmCC,iCAAAA,oBAAgC,CAAC;IAC7E,gBAAgBX;IAChB,cAAc;QAAC;YAACY;YAA0B;gBAAE,UAAU;YAAK;SAAE;KAAC;AAClE"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { ModelField, ModelFields } from "../../../operations/entry/elasticsearch/types.js";
|
|
2
|
-
import type { OpenSearchBoolQueryConfig } from "@webiny/api-opensearch/types.js";
|
|
3
|
-
interface ApplyParams {
|
|
4
|
-
key: string;
|
|
5
|
-
value: any;
|
|
6
|
-
query: OpenSearchBoolQueryConfig;
|
|
7
|
-
operator: string;
|
|
8
|
-
field: ModelField;
|
|
9
|
-
}
|
|
10
|
-
export interface ApplyFilteringCb {
|
|
11
|
-
(params: ApplyParams): void;
|
|
12
|
-
}
|
|
13
|
-
export interface GetFilterCb {
|
|
14
|
-
(type: string): CmsEntryOpenSearchFilter.Interface;
|
|
15
|
-
}
|
|
16
|
-
export interface IExecParams {
|
|
17
|
-
applyFiltering: ApplyFilteringCb;
|
|
18
|
-
getFilter: GetFilterCb;
|
|
19
|
-
key: string;
|
|
20
|
-
value: any;
|
|
21
|
-
operator: string;
|
|
22
|
-
field: ModelField;
|
|
23
|
-
fields: ModelFields;
|
|
24
|
-
query: OpenSearchBoolQueryConfig;
|
|
25
|
-
}
|
|
26
|
-
export interface ICmsEntryOpenSearchFilter {
|
|
27
|
-
readonly fieldType: string;
|
|
28
|
-
exec(params: IExecParams): void;
|
|
29
|
-
}
|
|
30
|
-
export declare const CmsEntryOpenSearchFilter: import("@webiny/di").Abstraction<ICmsEntryOpenSearchFilter>;
|
|
31
|
-
export declare namespace CmsEntryOpenSearchFilter {
|
|
32
|
-
type Interface = ICmsEntryOpenSearchFilter;
|
|
33
|
-
type ExecParams = IExecParams;
|
|
34
|
-
type ApplyFiltering = ApplyFilteringCb;
|
|
35
|
-
type GetFilter = GetFilterCb;
|
|
36
|
-
}
|
|
37
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js","sources":["../../../../src/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { ModelField, ModelFields } from \"~/operations/entry/elasticsearch/types.js\";\nimport type { OpenSearchBoolQueryConfig } from \"@webiny/api-opensearch/types.js\";\n\ninterface ApplyParams {\n key: string;\n value: any;\n query: OpenSearchBoolQueryConfig;\n operator: string;\n field: ModelField;\n}\n\nexport interface ApplyFilteringCb {\n (params: ApplyParams): void;\n}\n\nexport interface GetFilterCb {\n (type: string): CmsEntryOpenSearchFilter.Interface;\n}\n\nexport interface IExecParams {\n applyFiltering: ApplyFilteringCb;\n getFilter: GetFilterCb;\n key: string;\n value: any;\n operator: string;\n field: ModelField;\n fields: ModelFields;\n query: OpenSearchBoolQueryConfig;\n}\n\nexport interface ICmsEntryOpenSearchFilter {\n readonly fieldType: string;\n exec(params: IExecParams): void;\n}\n\nexport const CmsEntryOpenSearchFilter = createAbstraction<ICmsEntryOpenSearchFilter>(\n \"Cms/Entry/OpenSearch/Filter\"\n);\n\nexport namespace CmsEntryOpenSearchFilter {\n export type Interface = ICmsEntryOpenSearchFilter;\n export type ExecParams = IExecParams;\n export type ApplyFiltering = ApplyFilteringCb;\n export type GetFilter = GetFilterCb;\n}\n"],"names":["CmsEntryOpenSearchFilter","createAbstraction"],"mappings":";AAoCO,MAAMA,2BAA2BC,kBACpC"}
|
package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { CmsEntryOpenSearchFilter } from "./CmsEntryOpenSearchFilter.js";
|
|
2
|
-
export interface ICmsEntryOpenSearchFilterRegistry {
|
|
3
|
-
get(fieldType: string): CmsEntryOpenSearchFilter.Interface;
|
|
4
|
-
}
|
|
5
|
-
export declare const CmsEntryOpenSearchFilterRegistry: import("@webiny/di").Abstraction<ICmsEntryOpenSearchFilterRegistry>;
|
|
6
|
-
export declare namespace CmsEntryOpenSearchFilterRegistry {
|
|
7
|
-
type Interface = ICmsEntryOpenSearchFilterRegistry;
|
|
8
|
-
type Filter = CmsEntryOpenSearchFilter.Interface;
|
|
9
|
-
}
|
package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js","sources":["../../../../src/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { CmsEntryOpenSearchFilter } from \"./CmsEntryOpenSearchFilter.js\";\n\nexport interface ICmsEntryOpenSearchFilterRegistry {\n get(fieldType: string): CmsEntryOpenSearchFilter.Interface;\n}\n\nexport const CmsEntryOpenSearchFilterRegistry =\n createAbstraction<ICmsEntryOpenSearchFilterRegistry>(\"Cms/Entry/OpenSearch/FilterRegistry\");\n\nexport namespace CmsEntryOpenSearchFilterRegistry {\n export type Interface = ICmsEntryOpenSearchFilterRegistry;\n export type Filter = CmsEntryOpenSearchFilter.Interface;\n}\n"],"names":["CmsEntryOpenSearchFilterRegistry","createAbstraction"],"mappings":";AAOO,MAAMA,mCACTC,kBAAqD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const FILTER_DEFAULT: "*";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features/CmsEntryOpenSearchFilter/constants.js","sources":["../../../src/features/CmsEntryOpenSearchFilter/constants.ts"],"sourcesContent":["export const FILTER_DEFAULT = \"*\" as const;\n"],"names":["FILTER_DEFAULT"],"mappings":"AAAO,MAAMA,iBAAiB"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { createFeature } from "@webiny/feature/api";
|
|
2
|
-
import { DefaultFilter } from "./fields/DefaultFilter.js";
|
|
3
|
-
import { RefFilter } from "./fields/RefFilter.js";
|
|
4
|
-
import { ObjectFilter } from "./fields/ObjectFilter.js";
|
|
5
|
-
import { CmsEntryOpenSearchFilterRegistry } from "./CmsEntryOpenSearchFilterRegistry.js";
|
|
6
|
-
const CmsEntryOpenSearchFilterFeature = createFeature({
|
|
7
|
-
name: "Cms/Entry/OpenSearch/FilterFeature",
|
|
8
|
-
register: (container)=>{
|
|
9
|
-
container.register(DefaultFilter);
|
|
10
|
-
container.register(RefFilter);
|
|
11
|
-
container.register(ObjectFilter);
|
|
12
|
-
container.register(CmsEntryOpenSearchFilterRegistry);
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
export { CmsEntryOpenSearchFilterFeature };
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=feature.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features/CmsEntryOpenSearchFilter/feature.js","sources":["../../../src/features/CmsEntryOpenSearchFilter/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api\";\nimport { DefaultFilter } from \"./fields/DefaultFilter.js\";\nimport { RefFilter } from \"./fields/RefFilter.js\";\nimport { ObjectFilter } from \"./fields/ObjectFilter.js\";\nimport { CmsEntryOpenSearchFilterRegistry } from \"./CmsEntryOpenSearchFilterRegistry.js\";\n\nexport const CmsEntryOpenSearchFilterFeature = createFeature({\n name: \"Cms/Entry/OpenSearch/FilterFeature\",\n register: container => {\n container.register(DefaultFilter);\n container.register(RefFilter);\n container.register(ObjectFilter);\n container.register(CmsEntryOpenSearchFilterRegistry);\n }\n});\n"],"names":["CmsEntryOpenSearchFilterFeature","createFeature","container","DefaultFilter","RefFilter","ObjectFilter","CmsEntryOpenSearchFilterRegistry"],"mappings":";;;;;AAMO,MAAMA,kCAAkCC,cAAc;IACzD,MAAM;IACN,UAAUC,CAAAA;QACNA,UAAU,QAAQ,CAACC;QACnBD,UAAU,QAAQ,CAACE;QACnBF,UAAU,QAAQ,CAACG;QACnBH,UAAU,QAAQ,CAACI;IACvB;AACJ"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { CmsEntryOpenSearchFilter } from "../abstractions/CmsEntryOpenSearchFilter.js";
|
|
2
|
-
declare class DefaultFilterImpl implements CmsEntryOpenSearchFilter.Interface {
|
|
3
|
-
readonly fieldType: "*";
|
|
4
|
-
exec(params: CmsEntryOpenSearchFilter.ExecParams): void;
|
|
5
|
-
}
|
|
6
|
-
export declare const DefaultFilter: typeof DefaultFilterImpl & {
|
|
7
|
-
__abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFilter.js").ICmsEntryOpenSearchFilter>;
|
|
8
|
-
};
|
|
9
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import error from "@webiny/error";
|
|
2
|
-
import { CmsEntryOpenSearchFilter } from "../abstractions/CmsEntryOpenSearchFilter.js";
|
|
3
|
-
import { FILTER_DEFAULT } from "../constants.js";
|
|
4
|
-
class DefaultFilterImpl {
|
|
5
|
-
exec(params) {
|
|
6
|
-
const { applyFiltering, field } = params;
|
|
7
|
-
if (!field.searchable) {
|
|
8
|
-
const identifier = [
|
|
9
|
-
...field.parents.map((p)=>p.fieldId),
|
|
10
|
-
field.field.fieldId
|
|
11
|
-
].join(".");
|
|
12
|
-
throw new error(`Field "${identifier}" is not searchable.`);
|
|
13
|
-
}
|
|
14
|
-
applyFiltering(params);
|
|
15
|
-
}
|
|
16
|
-
constructor(){
|
|
17
|
-
this.fieldType = FILTER_DEFAULT;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
const DefaultFilter = CmsEntryOpenSearchFilter.createImplementation({
|
|
21
|
-
implementation: DefaultFilterImpl,
|
|
22
|
-
dependencies: []
|
|
23
|
-
});
|
|
24
|
-
export { DefaultFilter };
|
|
25
|
-
|
|
26
|
-
//# sourceMappingURL=DefaultFilter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js","sources":["../../../../src/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { CmsEntryOpenSearchFilter } from \"../abstractions/CmsEntryOpenSearchFilter.js\";\nimport { FILTER_DEFAULT } from \"../constants.js\";\n\nclass DefaultFilterImpl implements CmsEntryOpenSearchFilter.Interface {\n public readonly fieldType = FILTER_DEFAULT;\n\n public exec(params: CmsEntryOpenSearchFilter.ExecParams): void {\n const { applyFiltering, field } = params;\n if (!field.searchable) {\n const identifier = [...field.parents.map(p => p.fieldId), field.field.fieldId].join(\n \".\"\n );\n throw new WebinyError(`Field \"${identifier}\" is not searchable.`);\n }\n applyFiltering(params);\n }\n}\n\nexport const DefaultFilter = CmsEntryOpenSearchFilter.createImplementation({\n implementation: DefaultFilterImpl,\n dependencies: []\n});\n"],"names":["DefaultFilterImpl","params","applyFiltering","field","identifier","p","WebinyError","FILTER_DEFAULT","DefaultFilter","CmsEntryOpenSearchFilter"],"mappings":";;;AAIA,MAAMA;IAGK,KAAKC,MAA2C,EAAQ;QAC3D,MAAM,EAAEC,cAAc,EAAEC,KAAK,EAAE,GAAGF;QAClC,IAAI,CAACE,MAAM,UAAU,EAAE;YACnB,MAAMC,aAAa;mBAAID,MAAM,OAAO,CAAC,GAAG,CAACE,CAAAA,IAAKA,EAAE,OAAO;gBAAGF,MAAM,KAAK,CAAC,OAAO;aAAC,CAAC,IAAI,CAC/E;YAEJ,MAAM,IAAIG,MAAY,CAAC,OAAO,EAAEF,WAAW,oBAAoB,CAAC;QACpE;QACAF,eAAeD;IACnB;;aAXgB,SAAS,GAAGM;;AAYhC;AAEO,MAAMC,gBAAgBC,yBAAyB,oBAAoB,CAAC;IACvE,gBAAgBT;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { CmsEntryOpenSearchFilter } from "../abstractions/CmsEntryOpenSearchFilter.js";
|
|
2
|
-
declare class ObjectFilterImpl implements CmsEntryOpenSearchFilter.Interface {
|
|
3
|
-
readonly fieldType = "object";
|
|
4
|
-
exec(params: CmsEntryOpenSearchFilter.ExecParams): void;
|
|
5
|
-
}
|
|
6
|
-
export declare const ObjectFilter: typeof ObjectFilterImpl & {
|
|
7
|
-
__abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFilter.js").ICmsEntryOpenSearchFilter>;
|
|
8
|
-
};
|
|
9
|
-
export {};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import error from "@webiny/error";
|
|
2
|
-
import { CmsEntryOpenSearchFilter } from "../abstractions/CmsEntryOpenSearchFilter.js";
|
|
3
|
-
import { parseWhereKey } from "@webiny/api-opensearch";
|
|
4
|
-
class ObjectFilterImpl {
|
|
5
|
-
exec(params) {
|
|
6
|
-
const { applyFiltering, value: where, fields, field: parentField, getFilter, query } = params;
|
|
7
|
-
for(const key in where){
|
|
8
|
-
const value = where[key];
|
|
9
|
-
if (void 0 === value) continue;
|
|
10
|
-
const { field: whereFieldId, operator } = parseWhereKey(key);
|
|
11
|
-
const identifier = [
|
|
12
|
-
...parentField.parents.map((p)=>p.fieldId),
|
|
13
|
-
parentField.field.fieldId,
|
|
14
|
-
whereFieldId
|
|
15
|
-
].join(".");
|
|
16
|
-
const field = fields[identifier];
|
|
17
|
-
if (!field) throw new error(`There is no field "${identifier}".`, "OBJECT_FILTER_FIELD_ERROR", {
|
|
18
|
-
fields: Object.keys(fields)
|
|
19
|
-
});
|
|
20
|
-
const filter = getFilter(field.type);
|
|
21
|
-
filter.exec({
|
|
22
|
-
applyFiltering,
|
|
23
|
-
getFilter,
|
|
24
|
-
key,
|
|
25
|
-
value,
|
|
26
|
-
operator,
|
|
27
|
-
field,
|
|
28
|
-
fields,
|
|
29
|
-
query
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
constructor(){
|
|
34
|
-
this.fieldType = "object";
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
const ObjectFilter = CmsEntryOpenSearchFilter.createImplementation({
|
|
38
|
-
implementation: ObjectFilterImpl,
|
|
39
|
-
dependencies: []
|
|
40
|
-
});
|
|
41
|
-
export { ObjectFilter };
|
|
42
|
-
|
|
43
|
-
//# sourceMappingURL=ObjectFilter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js","sources":["../../../../src/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { CmsEntryOpenSearchFilter } from \"../abstractions/CmsEntryOpenSearchFilter.js\";\nimport { parseWhereKey } from \"@webiny/api-opensearch\";\n\nclass ObjectFilterImpl implements CmsEntryOpenSearchFilter.Interface {\n public readonly fieldType = \"object\";\n\n public exec(params: CmsEntryOpenSearchFilter.ExecParams): void {\n const {\n applyFiltering,\n value: where,\n fields,\n field: parentField,\n getFilter,\n query\n } = params;\n /**\n * Because this is an object field, we must construct filters based on the value property.\n * Value property is actually a where condition.\n */\n for (const key in where) {\n const value = where[key];\n if (value === undefined) {\n continue;\n }\n const { field: whereFieldId, operator } = parseWhereKey(key);\n\n const identifier = [\n ...parentField.parents.map(p => p.fieldId),\n parentField.field.fieldId,\n whereFieldId\n ].join(\".\");\n const field = fields[identifier];\n if (!field) {\n throw new WebinyError(\n `There is no field \"${identifier}\".`,\n \"OBJECT_FILTER_FIELD_ERROR\",\n {\n fields: Object.keys(fields)\n }\n );\n }\n /**\n * We need to find the filter for the child field.\n * This will throw error if no filter can be found.\n */\n const filter = getFilter(field.type);\n /**\n * Basically this allows us to go into depth as much as we want with the object fields.\n */\n filter.exec({\n applyFiltering,\n getFilter,\n key,\n value,\n operator,\n field,\n fields,\n query\n });\n }\n }\n}\n\nexport const ObjectFilter = CmsEntryOpenSearchFilter.createImplementation({\n implementation: ObjectFilterImpl,\n dependencies: []\n});\n"],"names":["ObjectFilterImpl","params","applyFiltering","where","fields","parentField","getFilter","query","key","value","undefined","whereFieldId","operator","parseWhereKey","identifier","p","field","WebinyError","Object","filter","ObjectFilter","CmsEntryOpenSearchFilter"],"mappings":";;;AAIA,MAAMA;IAGK,KAAKC,MAA2C,EAAQ;QAC3D,MAAM,EACFC,cAAc,EACd,OAAOC,KAAK,EACZC,MAAM,EACN,OAAOC,WAAW,EAClBC,SAAS,EACTC,KAAK,EACR,GAAGN;QAKJ,IAAK,MAAMO,OAAOL,MAAO;YACrB,MAAMM,QAAQN,KAAK,CAACK,IAAI;YACxB,IAAIC,AAAUC,WAAVD,OACA;YAEJ,MAAM,EAAE,OAAOE,YAAY,EAAEC,QAAQ,EAAE,GAAGC,cAAcL;YAExD,MAAMM,aAAa;mBACZT,YAAY,OAAO,CAAC,GAAG,CAACU,CAAAA,IAAKA,EAAE,OAAO;gBACzCV,YAAY,KAAK,CAAC,OAAO;gBACzBM;aACH,CAAC,IAAI,CAAC;YACP,MAAMK,QAAQZ,MAAM,CAACU,WAAW;YAChC,IAAI,CAACE,OACD,MAAM,IAAIC,MACN,CAAC,mBAAmB,EAAEH,WAAW,EAAE,CAAC,EACpC,6BACA;gBACI,QAAQI,OAAO,IAAI,CAACd;YACxB;YAOR,MAAMe,SAASb,UAAUU,MAAM,IAAI;YAInCG,OAAO,IAAI,CAAC;gBACRjB;gBACAI;gBACAE;gBACAC;gBACAG;gBACAI;gBACAZ;gBACAG;YACJ;QACJ;IACJ;;aAxDgB,SAAS,GAAG;;AAyDhC;AAEO,MAAMa,eAAeC,yBAAyB,oBAAoB,CAAC;IACtE,gBAAgBrB;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { CmsEntryOpenSearchFilter } from "../abstractions/CmsEntryOpenSearchFilter.js";
|
|
2
|
-
declare class RefFilterImpl implements CmsEntryOpenSearchFilter.Interface {
|
|
3
|
-
readonly fieldType = "ref";
|
|
4
|
-
exec(params: CmsEntryOpenSearchFilter.ExecParams): void;
|
|
5
|
-
}
|
|
6
|
-
export declare const RefFilter: typeof RefFilterImpl & {
|
|
7
|
-
__abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFilter.js").ICmsEntryOpenSearchFilter>;
|
|
8
|
-
};
|
|
9
|
-
export {};
|