@webiny/api-headless-cms-ddb-es 0.0.0-unstable.e6f0dc8ca7 → 0.0.0-unstable.eb81deee7e
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/definitions/entry.js +7 -9
- package/definitions/entry.js.map +1 -1
- package/definitions/group.js +7 -9
- package/definitions/group.js.map +1 -1
- package/definitions/model.js +7 -9
- package/definitions/model.js.map +1 -1
- package/definitions/types.d.ts +4 -0
- package/definitions/types.js +0 -3
- package/feature.d.ts +9 -1
- package/feature.js +46 -179
- package/feature.js.map +1 -1
- package/index.d.ts +2 -1
- package/index.js +2 -3
- 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 +76 -0
- package/operations/entry/DdbEsGetUniqueFieldValues.js.map +1 -0
- package/operations/entry/DdbEsListEntries.d.ts +25 -0
- package/operations/entry/DdbEsListEntries.js +91 -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/dataLoader/DataLoaderCache.js +22 -26
- package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -1
- package/operations/entry/dataLoader/constants.js +2 -1
- package/operations/entry/dataLoader/constants.js.map +1 -1
- package/operations/entry/dataLoader/createBatchScheduleFn.js +6 -15
- package/operations/entry/dataLoader/createBatchScheduleFn.js.map +1 -1
- package/operations/entry/dataLoader/getAllEntryRevisions.js +18 -29
- package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -1
- package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +27 -37
- package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -1
- package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +27 -37
- package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -1
- package/operations/entry/dataLoader/getRevisionById.js +32 -46
- package/operations/entry/dataLoader/getRevisionById.js.map +1 -1
- package/operations/entry/dataLoader/index.js +8 -9
- package/operations/entry/dataLoader/index.js.map +1 -1
- package/operations/entry/dataLoader/types.js +0 -3
- package/operations/entry/dataLoaders.d.ts +5 -5
- package/operations/entry/dataLoaders.js +89 -99
- package/operations/entry/dataLoaders.js.map +1 -1
- package/{features/CmsEntryOpenSearchIndex → operations/entry}/feature.d.ts +1 -1
- package/operations/entry/feature.js +53 -0
- package/operations/entry/feature.js.map +1 -0
- package/operations/entry/keys.js +43 -63
- package/operations/entry/keys.js.map +1 -1
- package/operations/entry/recordType.js +4 -9
- package/operations/entry/recordType.js.map +1 -1
- 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/convertEntryKeys.js +21 -26
- package/operations/entry/transformations/convertEntryKeys.js.map +1 -1
- package/operations/entry/transformations/index.d.ts +2 -5
- package/operations/entry/transformations/index.js +85 -115
- package/operations/entry/transformations/index.js.map +1 -1
- package/operations/entry/transformations/modifyEntryValues.d.ts +3 -3
- package/operations/entry/transformations/modifyEntryValues.js +12 -17
- package/operations/entry/transformations/modifyEntryValues.js.map +1 -1
- package/operations/entry/transformations/transformEntryKeys.js +13 -16
- package/operations/entry/transformations/transformEntryKeys.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 +33 -27
- package/requestFeature.d.ts +20 -0
- package/requestFeature.js +54 -0
- package/requestFeature.js.map +1 -0
- package/tasks/CreateElasticsearchIndexTask.d.ts +13 -0
- package/tasks/CreateElasticsearchIndexTask.js +40 -0
- package/tasks/CreateElasticsearchIndexTask.js.map +1 -0
- package/types.d.ts +11 -50
- package/types.js +7 -13
- package/types.js.map +1 -1
- package/configurations.d.ts +0 -19
- package/configurations.js +0 -39
- package/configurations.js.map +0 -1
- package/definitions/types.js.map +0 -1
- package/elasticsearch/createElasticsearchIndex.d.ts +0 -9
- package/elasticsearch/createElasticsearchIndex.js +0 -74
- package/elasticsearch/createElasticsearchIndex.js.map +0 -1
- package/elasticsearch/deleteElasticsearchIndex.d.ts +0 -8
- package/elasticsearch/deleteElasticsearchIndex.js +0 -31
- package/elasticsearch/deleteElasticsearchIndex.js.map +0 -1
- package/exports/api/cms/opensearch.d.ts +0 -9
- package/exports/api/cms/opensearch.js +0 -11
- package/exports/api/cms/opensearch.js.map +0 -1
- package/features/CmsEntryOpenSearchBodyModifier/abstractions.d.ts +0 -16
- package/features/CmsEntryOpenSearchBodyModifier/abstractions.js +0 -4
- package/features/CmsEntryOpenSearchBodyModifier/abstractions.js.map +0 -1
- package/features/CmsEntryOpenSearchBodyModifier/index.d.ts +0 -1
- package/features/CmsEntryOpenSearchBodyModifier/index.js +0 -3
- package/features/CmsEntryOpenSearchBodyModifier/index.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.d.ts +0 -13
- package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js +0 -36
- package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.d.ts +0 -35
- package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js +0 -4
- 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 -4
- package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/constants.d.ts +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/constants.js +0 -3
- package/features/CmsEntryOpenSearchFieldIndex/constants.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/feature.js +0 -24
- package/features/CmsEntryOpenSearchFieldIndex/feature.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.d.ts +0 -11
- package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js +0 -77
- package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.d.ts +0 -10
- package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.js +0 -39
- 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 -22
- 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 -25
- 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 -37
- package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.d.ts +0 -10
- package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js +0 -158
- 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 -22
- package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/index.d.ts +0 -3
- package/features/CmsEntryOpenSearchFieldIndex/index.js +0 -5
- package/features/CmsEntryOpenSearchFieldIndex/index.js.map +0 -1
- package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.d.ts +0 -11
- package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js +0 -38
- package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js.map +0 -1
- package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.d.ts +0 -37
- package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js +0 -4
- 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 -4
- package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js.map +0 -1
- package/features/CmsEntryOpenSearchFilter/constants.d.ts +0 -1
- package/features/CmsEntryOpenSearchFilter/constants.js +0 -3
- package/features/CmsEntryOpenSearchFilter/constants.js.map +0 -1
- package/features/CmsEntryOpenSearchFilter/feature.js +0 -16
- package/features/CmsEntryOpenSearchFilter/feature.js.map +0 -1
- package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.d.ts +0 -9
- package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js +0 -23
- 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 -61
- 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 -49
- package/features/CmsEntryOpenSearchFilter/fields/RefFilter.js.map +0 -1
- package/features/CmsEntryOpenSearchFilter/index.d.ts +0 -3
- package/features/CmsEntryOpenSearchFilter/index.js +0 -5
- package/features/CmsEntryOpenSearchFilter/index.js.map +0 -1
- package/features/CmsEntryOpenSearchFullTextSearch/abstractions.d.ts +0 -20
- package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js +0 -4
- package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js.map +0 -1
- package/features/CmsEntryOpenSearchFullTextSearch/index.d.ts +0 -1
- package/features/CmsEntryOpenSearchFullTextSearch/index.js +0 -3
- package/features/CmsEntryOpenSearchFullTextSearch/index.js.map +0 -1
- package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.d.ts +0 -11
- package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.js +0 -16
- package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.js.map +0 -1
- package/features/CmsEntryOpenSearchIndex/abstractions.d.ts +0 -14
- package/features/CmsEntryOpenSearchIndex/abstractions.js +0 -4
- package/features/CmsEntryOpenSearchIndex/abstractions.js.map +0 -1
- package/features/CmsEntryOpenSearchIndex/feature.js +0 -10
- package/features/CmsEntryOpenSearchIndex/feature.js.map +0 -1
- package/features/CmsEntryOpenSearchIndex/index.d.ts +0 -3
- package/features/CmsEntryOpenSearchIndex/index.js +0 -5
- package/features/CmsEntryOpenSearchIndex/index.js.map +0 -1
- package/features/CmsEntryOpenSearchQueryModifier/abstractions.d.ts +0 -16
- package/features/CmsEntryOpenSearchQueryModifier/abstractions.js +0 -4
- package/features/CmsEntryOpenSearchQueryModifier/abstractions.js.map +0 -1
- package/features/CmsEntryOpenSearchQueryModifier/index.d.ts +0 -1
- package/features/CmsEntryOpenSearchQueryModifier/index.js +0 -3
- package/features/CmsEntryOpenSearchQueryModifier/index.js.map +0 -1
- package/features/CmsEntryOpenSearchSortModifier/abstractions.d.ts +0 -15
- package/features/CmsEntryOpenSearchSortModifier/abstractions.js +0 -4
- package/features/CmsEntryOpenSearchSortModifier/abstractions.js.map +0 -1
- package/features/CmsEntryOpenSearchSortModifier/index.d.ts +0 -1
- package/features/CmsEntryOpenSearchSortModifier/index.js +0 -3
- package/features/CmsEntryOpenSearchSortModifier/index.js.map +0 -1
- package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.d.ts +0 -12
- package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js +0 -27
- package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js.map +0 -1
- package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.d.ts +0 -22
- package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js +0 -4
- 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 -4
- package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js.map +0 -1
- package/features/CmsEntryOpenSearchValueSearch/feature.d.ts +0 -4
- package/features/CmsEntryOpenSearchValueSearch/feature.js +0 -16
- package/features/CmsEntryOpenSearchValueSearch/feature.js.map +0 -1
- package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.d.ts +0 -10
- package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js +0 -23
- 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 -55
- 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 -24
- package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js.map +0 -1
- package/features/CmsEntryOpenSearchValueSearch/index.d.ts +0 -3
- package/features/CmsEntryOpenSearchValueSearch/index.js +0 -5
- package/features/CmsEntryOpenSearchValueSearch/index.js.map +0 -1
- package/features/CmsEntryOpenSearchValuesModifier/abstractions.d.ts +0 -23
- package/features/CmsEntryOpenSearchValuesModifier/abstractions.js +0 -4
- package/features/CmsEntryOpenSearchValuesModifier/abstractions.js.map +0 -1
- package/features/CmsEntryOpenSearchValuesModifier/index.d.ts +0 -1
- package/features/CmsEntryOpenSearchValuesModifier/index.js +0 -3
- package/features/CmsEntryOpenSearchValuesModifier/index.js.map +0 -1
- package/helpers/entryIndexHelpers.d.ts +0 -20
- package/helpers/entryIndexHelpers.js +0 -134
- package/helpers/entryIndexHelpers.js.map +0 -1
- package/helpers/fieldIdentifier.d.ts +0 -6
- package/helpers/fieldIdentifier.js +0 -35
- package/helpers/fieldIdentifier.js.map +0 -1
- package/helpers/index.d.ts +0 -2
- package/helpers/index.js +0 -4
- package/helpers/index.js.map +0 -1
- package/index.js.map +0 -1
- package/operations/entry/dataLoader/types.js.map +0 -1
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.d.ts +0 -18
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js +0 -27
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js.map +0 -1
- package/operations/entry/elasticsearch/body.d.ts +0 -29
- package/operations/entry/elasticsearch/body.js +0 -138
- 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 -10
- 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 -45
- 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 -45
- 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 -93
- 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 -231
- 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 -52
- 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 -125
- 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 -3
- package/operations/entry/elasticsearch/filtering/index.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/path.d.ts +0 -17
- package/operations/entry/elasticsearch/filtering/path.js +0 -36
- 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 -18
- 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 -16
- 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 -88
- 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 -20
- package/operations/entry/elasticsearch/fullTextSearchFields.js.map +0 -1
- package/operations/entry/elasticsearch/initialQuery.d.ts +0 -17
- package/operations/entry/elasticsearch/initialQuery.js +0 -88
- 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 -31
- 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 -24
- 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 -6
- package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js.map +0 -1
- package/operations/entry/elasticsearch/sort.d.ts +0 -12
- package/operations/entry/elasticsearch/sort.js +0 -103
- 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 -17
- package/operations/entry/elasticsearch/transformValueForSearch.js.map +0 -1
- package/operations/entry/elasticsearch/types.d.ts +0 -34
- package/operations/entry/elasticsearch/types.js +0 -3
- package/operations/entry/elasticsearch/types.js.map +0 -1
- package/operations/entry/index.d.ts +0 -32
- package/operations/entry/index.js +0 -1761
- package/operations/entry/index.js.map +0 -1
- package/operations/entry/transformations/transformEntryToIndex.d.ts +0 -12
- package/operations/entry/transformations/transformEntryToIndex.js +0 -26
- package/operations/entry/transformations/transformEntryToIndex.js.map +0 -1
- package/operations/group/index.d.ts +0 -9
- package/operations/group/index.js +0 -142
- package/operations/group/index.js.map +0 -1
- package/operations/model/index.d.ts +0 -8
- package/operations/model/index.js +0 -163
- package/operations/model/index.js.map +0 -1
- package/tasks/createIndexTaskPlugin.d.ts +0 -2
- package/tasks/createIndexTaskPlugin.js +0 -48
- package/tasks/createIndexTaskPlugin.js.map +0 -1
- package/values/NoValueContainer.d.ts +0 -5
- package/values/NoValueContainer.js +0 -13
- package/values/NoValueContainer.js.map +0 -1
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { CmsEntryOpenSearchValueSearch } from "../abstractions/CmsEntryOpenSearchValueSearch.js";
|
|
2
|
-
class RefSearchImpl {
|
|
3
|
-
fieldType = "ref";
|
|
4
|
-
transform(params) {
|
|
5
|
-
return params.value;
|
|
6
|
-
}
|
|
7
|
-
createPath(params) {
|
|
8
|
-
const {
|
|
9
|
-
field,
|
|
10
|
-
key
|
|
11
|
-
} = params;
|
|
12
|
-
if (key && key.match("entryId") === null) {
|
|
13
|
-
return `${field.storageId}.id`;
|
|
14
|
-
}
|
|
15
|
-
return `${field.storageId}.entryId`;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
export const RefSearch = CmsEntryOpenSearchValueSearch.createImplementation({
|
|
19
|
-
implementation: RefSearchImpl,
|
|
20
|
-
dependencies: []
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
//# sourceMappingURL=RefSearch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryOpenSearchValueSearch","RefSearchImpl","fieldType","transform","params","value","createPath","field","key","match","storageId","RefSearch","createImplementation","implementation","dependencies"],"sources":["RefSearch.ts"],"sourcesContent":["import { CmsEntryOpenSearchValueSearch } from \"../abstractions/CmsEntryOpenSearchValueSearch.js\";\n\nclass RefSearchImpl implements CmsEntryOpenSearchValueSearch.Interface {\n public readonly fieldType = \"ref\";\n\n public transform(params: CmsEntryOpenSearchValueSearch.Transform): any {\n return params.value;\n }\n\n public createPath(params: CmsEntryOpenSearchValueSearch.CreatePath): string | null {\n const { field, key } = params;\n if (key && key.match(\"entryId\") === null) {\n return `${field.storageId}.id`;\n }\n return `${field.storageId}.entryId`;\n }\n}\n\nexport const RefSearch = CmsEntryOpenSearchValueSearch.createImplementation({\n implementation: RefSearchImpl,\n dependencies: []\n});\n"],"mappings":"AAAA,SAASA,6BAA6B;AAEtC,MAAMC,aAAa,CAAoD;EACnDC,SAAS,GAAG,KAAK;EAE1BC,SAASA,CAACC,MAA+C,EAAO;IACnE,OAAOA,MAAM,CAACC,KAAK;EACvB;EAEOC,UAAUA,CAACF,MAAgD,EAAiB;IAC/E,MAAM;MAAEG,KAAK;MAAEC;IAAI,CAAC,GAAGJ,MAAM;IAC7B,IAAII,GAAG,IAAIA,GAAG,CAACC,KAAK,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;MACtC,OAAO,GAAGF,KAAK,CAACG,SAAS,KAAK;IAClC;IACA,OAAO,GAAGH,KAAK,CAACG,SAAS,UAAU;EACvC;AACJ;AAEA,OAAO,MAAMC,SAAS,GAAGX,6BAA6B,CAACY,oBAAoB,CAAC;EACxEC,cAAc,EAAEZ,aAAa;EAC7Ba,YAAY,EAAE;AAClB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { CmsEntryOpenSearchValueSearch } from "../abstractions/CmsEntryOpenSearchValueSearch.js";
|
|
2
|
-
declare class SearchableJsonSearchImpl implements CmsEntryOpenSearchValueSearch.Interface {
|
|
3
|
-
readonly fieldType = "searchable-json";
|
|
4
|
-
transform(params: CmsEntryOpenSearchValueSearch.Transform): any;
|
|
5
|
-
createPath(params: CmsEntryOpenSearchValueSearch.CreatePath): string | null;
|
|
6
|
-
}
|
|
7
|
-
export declare const SearchableJsonSearch: typeof SearchableJsonSearchImpl & {
|
|
8
|
-
__abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchValueSearch.js").ICmsEntryOpenSearchValueSearch>;
|
|
9
|
-
};
|
|
10
|
-
export {};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { CmsEntryOpenSearchValueSearch } from "../abstractions/CmsEntryOpenSearchValueSearch.js";
|
|
2
|
-
import { WebinyError } from "@webiny/error";
|
|
3
|
-
import { NoValueContainer } from "../../../values/NoValueContainer.js";
|
|
4
|
-
const getKey = params => {
|
|
5
|
-
const {
|
|
6
|
-
field,
|
|
7
|
-
value
|
|
8
|
-
} = params;
|
|
9
|
-
const keys = Object.keys(value);
|
|
10
|
-
if (keys.length === 0) {
|
|
11
|
-
throw new WebinyError(`Searchable JSON field "${field.fieldId}" cannot be empty.`, "EMPTY_SEARCHABLE_JSON_FIELD", {
|
|
12
|
-
field,
|
|
13
|
-
value
|
|
14
|
-
});
|
|
15
|
-
} else if (keys.length > 1) {
|
|
16
|
-
throw new WebinyError(`Searchable JSON field "${field.fieldId}" can only have one key.`, "MULTIPLE_KEYS_IN_SEARCHABLE_JSON_FIELD", {
|
|
17
|
-
field,
|
|
18
|
-
value,
|
|
19
|
-
keys
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
return keys[0];
|
|
23
|
-
};
|
|
24
|
-
class SearchableJsonSearchImpl {
|
|
25
|
-
fieldType = "searchable-json";
|
|
26
|
-
transform(params) {
|
|
27
|
-
const {
|
|
28
|
-
value
|
|
29
|
-
} = params;
|
|
30
|
-
if (NoValueContainer.is(value)) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
const key = getKey(params);
|
|
34
|
-
return value[key] || null;
|
|
35
|
-
}
|
|
36
|
-
createPath(params) {
|
|
37
|
-
const {
|
|
38
|
-
field
|
|
39
|
-
} = params;
|
|
40
|
-
if (NoValueContainer.is(params.originalValue)) {
|
|
41
|
-
return `${field.storageId}.unknown`;
|
|
42
|
-
}
|
|
43
|
-
const key = getKey({
|
|
44
|
-
field,
|
|
45
|
-
value: params.originalValue
|
|
46
|
-
});
|
|
47
|
-
return `${field.storageId}.${key}`;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
export const SearchableJsonSearch = CmsEntryOpenSearchValueSearch.createImplementation({
|
|
51
|
-
implementation: SearchableJsonSearchImpl,
|
|
52
|
-
dependencies: []
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
//# sourceMappingURL=SearchableJsonSearch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryOpenSearchValueSearch","WebinyError","NoValueContainer","getKey","params","field","value","keys","Object","length","fieldId","SearchableJsonSearchImpl","fieldType","transform","is","key","createPath","originalValue","storageId","SearchableJsonSearch","createImplementation","implementation","dependencies"],"sources":["SearchableJsonSearch.ts"],"sourcesContent":["import { CmsModelField } from \"@webiny/api-headless-cms/types/index.js\";\nimport { CmsEntryOpenSearchValueSearch } from \"../abstractions/CmsEntryOpenSearchValueSearch.js\";\nimport { WebinyError } from \"@webiny/error\";\nimport { NoValueContainer } from \"~/values/NoValueContainer.js\";\n\ninterface IGetKeyParams {\n field: CmsModelField;\n value: {\n [key: string]: any;\n };\n}\n\nconst getKey = (params: IGetKeyParams): string => {\n const { field, value } = params;\n const keys = Object.keys(value);\n if (keys.length === 0) {\n throw new WebinyError(\n `Searchable JSON field \"${field.fieldId}\" cannot be empty.`,\n \"EMPTY_SEARCHABLE_JSON_FIELD\",\n {\n field,\n value\n }\n );\n } else if (keys.length > 1) {\n throw new WebinyError(\n `Searchable JSON field \"${field.fieldId}\" can only have one key.`,\n \"MULTIPLE_KEYS_IN_SEARCHABLE_JSON_FIELD\",\n {\n field,\n value,\n keys\n }\n );\n }\n return keys[0];\n};\n\nclass SearchableJsonSearchImpl implements CmsEntryOpenSearchValueSearch.Interface {\n public readonly fieldType = \"searchable-json\";\n\n public transform(params: CmsEntryOpenSearchValueSearch.Transform): any {\n const { value } = params;\n\n if (NoValueContainer.is(value)) {\n return null;\n }\n\n const key = getKey(params);\n return value[key] || null;\n }\n\n public createPath(params: CmsEntryOpenSearchValueSearch.CreatePath): string | null {\n const { field } = params;\n\n if (NoValueContainer.is(params.originalValue)) {\n return `${field.storageId}.unknown`;\n }\n\n const key = getKey({\n field,\n value: params.originalValue\n });\n\n return `${field.storageId}.${key}`;\n }\n}\n\nexport const SearchableJsonSearch = CmsEntryOpenSearchValueSearch.createImplementation({\n implementation: SearchableJsonSearchImpl,\n dependencies: []\n});\n"],"mappings":"AACA,SAASA,6BAA6B;AACtC,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,gBAAgB;AASzB,MAAMC,MAAM,GAAIC,MAAqB,IAAa;EAC9C,MAAM;IAAEC,KAAK;IAAEC;EAAM,CAAC,GAAGF,MAAM;EAC/B,MAAMG,IAAI,GAAGC,MAAM,CAACD,IAAI,CAACD,KAAK,CAAC;EAC/B,IAAIC,IAAI,CAACE,MAAM,KAAK,CAAC,EAAE;IACnB,MAAM,IAAIR,WAAW,CACjB,0BAA0BI,KAAK,CAACK,OAAO,oBAAoB,EAC3D,6BAA6B,EAC7B;MACIL,KAAK;MACLC;IACJ,CACJ,CAAC;EACL,CAAC,MAAM,IAAIC,IAAI,CAACE,MAAM,GAAG,CAAC,EAAE;IACxB,MAAM,IAAIR,WAAW,CACjB,0BAA0BI,KAAK,CAACK,OAAO,0BAA0B,EACjE,wCAAwC,EACxC;MACIL,KAAK;MACLC,KAAK;MACLC;IACJ,CACJ,CAAC;EACL;EACA,OAAOA,IAAI,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,MAAMI,wBAAwB,CAAoD;EAC9DC,SAAS,GAAG,iBAAiB;EAEtCC,SAASA,CAACT,MAA+C,EAAO;IACnE,MAAM;MAAEE;IAAM,CAAC,GAAGF,MAAM;IAExB,IAAIF,gBAAgB,CAACY,EAAE,CAACR,KAAK,CAAC,EAAE;MAC5B,OAAO,IAAI;IACf;IAEA,MAAMS,GAAG,GAAGZ,MAAM,CAACC,MAAM,CAAC;IAC1B,OAAOE,KAAK,CAACS,GAAG,CAAC,IAAI,IAAI;EAC7B;EAEOC,UAAUA,CAACZ,MAAgD,EAAiB;IAC/E,MAAM;MAAEC;IAAM,CAAC,GAAGD,MAAM;IAExB,IAAIF,gBAAgB,CAACY,EAAE,CAACV,MAAM,CAACa,aAAa,CAAC,EAAE;MAC3C,OAAO,GAAGZ,KAAK,CAACa,SAAS,UAAU;IACvC;IAEA,MAAMH,GAAG,GAAGZ,MAAM,CAAC;MACfE,KAAK;MACLC,KAAK,EAAEF,MAAM,CAACa;IAClB,CAAC,CAAC;IAEF,OAAO,GAAGZ,KAAK,CAACa,SAAS,IAAIH,GAAG,EAAE;EACtC;AACJ;AAEA,OAAO,MAAMI,oBAAoB,GAAGnB,6BAA6B,CAACoB,oBAAoB,CAAC;EACnFC,cAAc,EAAEV,wBAAwB;EACxCW,YAAY,EAAE;AAClB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { CmsEntryOpenSearchValueSearch } from "../abstractions/CmsEntryOpenSearchValueSearch.js";
|
|
2
|
-
declare class TimeSearchImpl implements CmsEntryOpenSearchValueSearch.Interface {
|
|
3
|
-
readonly fieldType = "datetime";
|
|
4
|
-
transform(params: CmsEntryOpenSearchValueSearch.Transform): any;
|
|
5
|
-
createPath(): string | null;
|
|
6
|
-
}
|
|
7
|
-
export declare const TimeSearch: typeof TimeSearchImpl & {
|
|
8
|
-
__abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchValueSearch.js").ICmsEntryOpenSearchValueSearch>;
|
|
9
|
-
};
|
|
10
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { CmsEntryOpenSearchValueSearch } from "../abstractions/CmsEntryOpenSearchValueSearch.js";
|
|
2
|
-
class TimeSearchImpl {
|
|
3
|
-
fieldType = "datetime";
|
|
4
|
-
transform(params) {
|
|
5
|
-
const {
|
|
6
|
-
field,
|
|
7
|
-
value
|
|
8
|
-
} = params;
|
|
9
|
-
if (!value || field.settings?.type !== "time") {
|
|
10
|
-
return value;
|
|
11
|
-
}
|
|
12
|
-
const [hours, minutes, seconds = 0] = value.split(":").map(Number);
|
|
13
|
-
return hours * 60 * 60 + minutes * 60 + seconds;
|
|
14
|
-
}
|
|
15
|
-
createPath() {
|
|
16
|
-
return null;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
export const TimeSearch = CmsEntryOpenSearchValueSearch.createImplementation({
|
|
20
|
-
implementation: TimeSearchImpl,
|
|
21
|
-
dependencies: []
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
//# sourceMappingURL=TimeSearch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryOpenSearchValueSearch","TimeSearchImpl","fieldType","transform","params","field","value","settings","type","hours","minutes","seconds","split","map","Number","createPath","TimeSearch","createImplementation","implementation","dependencies"],"sources":["TimeSearch.ts"],"sourcesContent":["import { CmsEntryOpenSearchValueSearch } from \"../abstractions/CmsEntryOpenSearchValueSearch.js\";\n\nclass TimeSearchImpl implements CmsEntryOpenSearchValueSearch.Interface {\n public readonly fieldType = \"datetime\";\n\n public transform(params: CmsEntryOpenSearchValueSearch.Transform): any {\n const { field, value } = params;\n if (!value || field.settings?.type !== \"time\") {\n return value;\n }\n const [hours, minutes, seconds = 0] = value.split(\":\").map(Number);\n return hours * 60 * 60 + minutes * 60 + seconds;\n }\n\n public createPath(): string | null {\n return null;\n }\n}\n\nexport const TimeSearch = CmsEntryOpenSearchValueSearch.createImplementation({\n implementation: TimeSearchImpl,\n dependencies: []\n});\n"],"mappings":"AAAA,SAASA,6BAA6B;AAEtC,MAAMC,cAAc,CAAoD;EACpDC,SAAS,GAAG,UAAU;EAE/BC,SAASA,CAACC,MAA+C,EAAO;IACnE,MAAM;MAAEC,KAAK;MAAEC;IAAM,CAAC,GAAGF,MAAM;IAC/B,IAAI,CAACE,KAAK,IAAID,KAAK,CAACE,QAAQ,EAAEC,IAAI,KAAK,MAAM,EAAE;MAC3C,OAAOF,KAAK;IAChB;IACA,MAAM,CAACG,KAAK,EAAEC,OAAO,EAAEC,OAAO,GAAG,CAAC,CAAC,GAAGL,KAAK,CAACM,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,CAACC,MAAM,CAAC;IAClE,OAAOL,KAAK,GAAG,EAAE,GAAG,EAAE,GAAGC,OAAO,GAAG,EAAE,GAAGC,OAAO;EACnD;EAEOI,UAAUA,CAAA,EAAkB;IAC/B,OAAO,IAAI;EACf;AACJ;AAEA,OAAO,MAAMC,UAAU,GAAGhB,6BAA6B,CAACiB,oBAAoB,CAAC;EACzEC,cAAc,EAAEjB,cAAc;EAC9BkB,YAAY,EAAE;AAClB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { CmsEntryOpenSearchValueSearch } from "./abstractions/CmsEntryOpenSearchValueSearch.js";
|
|
2
|
-
export { CmsEntryOpenSearchValueSearchRegistry } from "./abstractions/CmsEntryOpenSearchValueSearchRegistry.js";
|
|
3
|
-
export { CmsEntryOpenSearchValueSearchFeature } from "./feature.js";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { CmsEntryOpenSearchValueSearch } from "./abstractions/CmsEntryOpenSearchValueSearch.js";
|
|
2
|
-
export { CmsEntryOpenSearchValueSearchRegistry } from "./abstractions/CmsEntryOpenSearchValueSearchRegistry.js";
|
|
3
|
-
export { CmsEntryOpenSearchValueSearchFeature } from "./feature.js";
|
|
4
|
-
|
|
5
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryOpenSearchValueSearch","CmsEntryOpenSearchValueSearchRegistry","CmsEntryOpenSearchValueSearchFeature"],"sources":["index.ts"],"sourcesContent":["export { CmsEntryOpenSearchValueSearch } from \"./abstractions/CmsEntryOpenSearchValueSearch.js\";\nexport { CmsEntryOpenSearchValueSearchRegistry } from \"./abstractions/CmsEntryOpenSearchValueSearchRegistry.js\";\nexport { CmsEntryOpenSearchValueSearchFeature } from \"./feature.js\";\n"],"mappings":"AAAA,SAASA,6BAA6B;AACtC,SAASC,qCAAqC;AAC9C,SAASC,oCAAoC","ignoreList":[]}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { CmsEntry, CmsEntryValues, CmsModel } from "@webiny/api-headless-cms/types/index.js";
|
|
2
|
-
export interface SetValuesCb<T extends CmsEntryValues = CmsEntryValues> {
|
|
3
|
-
(prev: T): T;
|
|
4
|
-
}
|
|
5
|
-
export interface ModifyValuesParams<T extends CmsEntryValues = CmsEntryValues> {
|
|
6
|
-
model: CmsModel;
|
|
7
|
-
entry: CmsEntry<T>;
|
|
8
|
-
values: T;
|
|
9
|
-
setValues: (cb: SetValuesCb<T>) => void;
|
|
10
|
-
}
|
|
11
|
-
export interface ICmsEntryOpenSearchValuesModifier {
|
|
12
|
-
canModify(modelId: string): boolean;
|
|
13
|
-
modify<T extends CmsEntryValues = CmsEntryValues>(params: {
|
|
14
|
-
model: CmsModel;
|
|
15
|
-
entry: CmsEntry<T>;
|
|
16
|
-
values: T;
|
|
17
|
-
}): T;
|
|
18
|
-
}
|
|
19
|
-
export declare const CmsEntryOpenSearchValuesModifier: import("@webiny/di").Abstraction<ICmsEntryOpenSearchValuesModifier>;
|
|
20
|
-
export declare namespace CmsEntryOpenSearchValuesModifier {
|
|
21
|
-
type Interface = ICmsEntryOpenSearchValuesModifier;
|
|
22
|
-
type Params<T extends CmsEntryValues = CmsEntryValues> = ModifyValuesParams<T>;
|
|
23
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["createAbstraction","CmsEntryOpenSearchValuesModifier"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { CmsEntry, CmsEntryValues, CmsModel } from \"@webiny/api-headless-cms/types/index.js\";\n\nexport interface SetValuesCb<T extends CmsEntryValues = CmsEntryValues> {\n (prev: T): T;\n}\n\nexport interface ModifyValuesParams<T extends CmsEntryValues = CmsEntryValues> {\n model: CmsModel;\n entry: CmsEntry<T>;\n values: T;\n setValues: (cb: SetValuesCb<T>) => void;\n}\n\nexport interface ICmsEntryOpenSearchValuesModifier {\n canModify(modelId: string): boolean;\n modify<T extends CmsEntryValues = CmsEntryValues>(params: {\n model: CmsModel;\n entry: CmsEntry<T>;\n values: T;\n }): T;\n}\n\nexport const CmsEntryOpenSearchValuesModifier =\n createAbstraction<ICmsEntryOpenSearchValuesModifier>(\"Cms/Entry/OpenSearch/ValuesModifier\");\n\nexport namespace CmsEntryOpenSearchValuesModifier {\n export type Interface = ICmsEntryOpenSearchValuesModifier;\n export type Params<T extends CmsEntryValues = CmsEntryValues> = ModifyValuesParams<T>;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AAuBvD,OAAO,MAAMC,gCAAgC,GACzCD,iBAAiB,CAAoC,qCAAqC,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CmsEntryOpenSearchValuesModifier } from "./abstractions.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryOpenSearchValuesModifier"],"sources":["index.ts"],"sourcesContent":["export { CmsEntryOpenSearchValuesModifier } from \"./abstractions.js\";\n"],"mappings":"AAAA,SAASA,gCAAgC","ignoreList":[]}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { CmsEntry, CmsEntryValues, CmsModel } from "@webiny/api-headless-cms/types/index.js";
|
|
2
|
-
import type { CmsIndexEntry } from "../types.js";
|
|
3
|
-
import type { CmsModelFieldToGraphQLRegistry } from "@webiny/api-headless-cms/exports/api/cms/graphql.js";
|
|
4
|
-
import type { CmsEntryOpenSearchFieldIndexRegistry } from "../features/CmsEntryOpenSearchFieldIndex/index.js";
|
|
5
|
-
interface SetupEntriesIndexHelpersParams {
|
|
6
|
-
fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface;
|
|
7
|
-
fieldIndexRegistry: CmsEntryOpenSearchFieldIndexRegistry.Interface;
|
|
8
|
-
}
|
|
9
|
-
interface ExtractEntriesFromIndexParams<T extends CmsEntryValues = CmsEntryValues> extends SetupEntriesIndexHelpersParams {
|
|
10
|
-
model: CmsModel;
|
|
11
|
-
entries: CmsIndexEntry<T>[];
|
|
12
|
-
}
|
|
13
|
-
interface PrepareElasticsearchDataParams<T extends CmsEntryValues = CmsEntryValues> extends SetupEntriesIndexHelpersParams {
|
|
14
|
-
model: CmsModel;
|
|
15
|
-
entry: CmsEntry<T>;
|
|
16
|
-
storageEntry: CmsEntry<T>;
|
|
17
|
-
}
|
|
18
|
-
export declare const prepareEntryToIndex: <T extends CmsEntryValues = CmsEntryValues>(params: PrepareElasticsearchDataParams<T>) => CmsIndexEntry<T>;
|
|
19
|
-
export declare const extractEntriesFromIndex: <T extends CmsEntryValues = CmsEntryValues>({ fieldRegistry, fieldIndexRegistry, entries, model }: ExtractEntriesFromIndexParams<T>) => CmsEntry<T>[];
|
|
20
|
-
export {};
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { WebinyError } from "@webiny/error";
|
|
2
|
-
import { getFieldIdentifier, getFieldIdentifiers } from "./fieldIdentifier.js";
|
|
3
|
-
export const prepareEntryToIndex = params => {
|
|
4
|
-
const {
|
|
5
|
-
fieldRegistry,
|
|
6
|
-
fieldIndexRegistry,
|
|
7
|
-
storageEntry,
|
|
8
|
-
entry,
|
|
9
|
-
model
|
|
10
|
-
} = params;
|
|
11
|
-
function getFieldIndex(type) {
|
|
12
|
-
const fieldIndexing = fieldIndexRegistry.get(type);
|
|
13
|
-
if (fieldIndexing) {
|
|
14
|
-
return fieldIndexing;
|
|
15
|
-
}
|
|
16
|
-
return fieldIndexRegistry.getDefault();
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// These objects will contain values processed by field index implementations
|
|
20
|
-
const values = {};
|
|
21
|
-
const rawValues = {};
|
|
22
|
-
|
|
23
|
-
// We're only interested in current model fields.
|
|
24
|
-
for (const field of model.fields) {
|
|
25
|
-
const identifier = getFieldIdentifier(storageEntry.values, field);
|
|
26
|
-
if (!identifier) {
|
|
27
|
-
continue;
|
|
28
|
-
}
|
|
29
|
-
const fieldIndex = getFieldIndex(field.type);
|
|
30
|
-
const {
|
|
31
|
-
value,
|
|
32
|
-
rawValue
|
|
33
|
-
} = fieldIndex.toIndex({
|
|
34
|
-
fieldRegistry,
|
|
35
|
-
model,
|
|
36
|
-
field,
|
|
37
|
-
rawValue: entry.values[identifier],
|
|
38
|
-
value: storageEntry.values[identifier],
|
|
39
|
-
getFieldIndex
|
|
40
|
-
});
|
|
41
|
-
if (typeof value !== "undefined") {
|
|
42
|
-
values[identifier] = value;
|
|
43
|
-
}
|
|
44
|
-
if (typeof rawValue !== "undefined") {
|
|
45
|
-
rawValues[identifier] = rawValue;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return {
|
|
49
|
-
...storageEntry,
|
|
50
|
-
values,
|
|
51
|
-
rawValues
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
export const extractEntriesFromIndex = ({
|
|
55
|
-
fieldRegistry,
|
|
56
|
-
fieldIndexRegistry,
|
|
57
|
-
entries,
|
|
58
|
-
model
|
|
59
|
-
}) => {
|
|
60
|
-
function getFieldIndex(type) {
|
|
61
|
-
const fieldIndex = fieldIndexRegistry.get(type);
|
|
62
|
-
if (fieldIndex) {
|
|
63
|
-
return fieldIndex;
|
|
64
|
-
}
|
|
65
|
-
return fieldIndexRegistry.getDefault();
|
|
66
|
-
}
|
|
67
|
-
const list = [];
|
|
68
|
-
for (const entry of entries) {
|
|
69
|
-
// This object will contain values processed by field index plugins
|
|
70
|
-
const indexValues = {};
|
|
71
|
-
|
|
72
|
-
// We only consider fields that are present in the model
|
|
73
|
-
for (const field of model.fields) {
|
|
74
|
-
const fieldType = fieldRegistry.get(field.type);
|
|
75
|
-
if (!fieldType) {
|
|
76
|
-
throw new WebinyError(`Missing field type "${field.type}". Extract entries from index.`);
|
|
77
|
-
}
|
|
78
|
-
const fieldIndex = getFieldIndex(field.type);
|
|
79
|
-
/**
|
|
80
|
-
* We can safely cast as the code will not continue in case of no identifiers.
|
|
81
|
-
*/
|
|
82
|
-
const identifiers = getFieldIdentifiers(entry.values, entry.rawValues, field);
|
|
83
|
-
if (!identifiers) {
|
|
84
|
-
continue;
|
|
85
|
-
}
|
|
86
|
-
try {
|
|
87
|
-
const key = identifiers.valueIdentifier;
|
|
88
|
-
const rawKey = identifiers.rawValueIdentifier;
|
|
89
|
-
indexValues[key] = fieldIndex.fromIndex({
|
|
90
|
-
fieldRegistry,
|
|
91
|
-
model,
|
|
92
|
-
field,
|
|
93
|
-
getFieldIndex,
|
|
94
|
-
value: entry.values[key || rawKey],
|
|
95
|
-
/**
|
|
96
|
-
* Possibly no rawValues so we must check for the existence of the field.
|
|
97
|
-
*/
|
|
98
|
-
rawValue: entry.rawValues ? entry.rawValues[rawKey || key] : null
|
|
99
|
-
});
|
|
100
|
-
} catch (ex) {
|
|
101
|
-
throw new WebinyError(ex.message || "Could not transform entry field from index.", ex.code || "FIELD_FROM_INDEX_ERROR", {
|
|
102
|
-
field,
|
|
103
|
-
entry
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Let's have a new entry so we do not modify the original one.
|
|
109
|
-
*/
|
|
110
|
-
const newEntry = {
|
|
111
|
-
...entry,
|
|
112
|
-
values: indexValues
|
|
113
|
-
};
|
|
114
|
-
/**
|
|
115
|
-
* If we want to remove the rawValues, TYPE, latest, published and __type, we must make them optional or ignore them.
|
|
116
|
-
*/
|
|
117
|
-
// @ts-expect-error
|
|
118
|
-
delete newEntry["rawValues"];
|
|
119
|
-
// @ts-expect-error
|
|
120
|
-
delete newEntry["TYPE"];
|
|
121
|
-
// @ts-expect-error
|
|
122
|
-
delete newEntry["__type"];
|
|
123
|
-
// @ts-expect-error
|
|
124
|
-
delete newEntry["latest"];
|
|
125
|
-
// @ts-expect-error
|
|
126
|
-
delete newEntry["published"];
|
|
127
|
-
list.push({
|
|
128
|
-
...newEntry
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
return list;
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
//# sourceMappingURL=entryIndexHelpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["WebinyError","getFieldIdentifier","getFieldIdentifiers","prepareEntryToIndex","params","fieldRegistry","fieldIndexRegistry","storageEntry","entry","model","getFieldIndex","type","fieldIndexing","get","getDefault","values","rawValues","field","fields","identifier","fieldIndex","value","rawValue","toIndex","extractEntriesFromIndex","entries","list","indexValues","fieldType","identifiers","key","valueIdentifier","rawKey","rawValueIdentifier","fromIndex","ex","message","code","newEntry","push"],"sources":["entryIndexHelpers.ts"],"sourcesContent":["import { WebinyError } from \"@webiny/error\";\nimport type { CmsEntry, CmsEntryValues, CmsModel } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { CmsIndexEntry } from \"~/types.js\";\nimport { getFieldIdentifier, getFieldIdentifiers } from \"~/helpers/fieldIdentifier.js\";\nimport type { CmsModelFieldToGraphQLRegistry } from \"@webiny/api-headless-cms/exports/api/cms/graphql.js\";\nimport type {\n CmsEntryOpenSearchFieldIndex,\n CmsEntryOpenSearchFieldIndexRegistry\n} from \"~/features/CmsEntryOpenSearchFieldIndex/index.js\";\n\ninterface SetupEntriesIndexHelpersParams {\n fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface;\n fieldIndexRegistry: CmsEntryOpenSearchFieldIndexRegistry.Interface;\n}\n\ninterface ExtractEntriesFromIndexParams<\n T extends CmsEntryValues = CmsEntryValues\n> extends SetupEntriesIndexHelpersParams {\n model: CmsModel;\n entries: CmsIndexEntry<T>[];\n}\n\ninterface PrepareElasticsearchDataParams<\n T extends CmsEntryValues = CmsEntryValues\n> extends SetupEntriesIndexHelpersParams {\n model: CmsModel;\n entry: CmsEntry<T>;\n storageEntry: CmsEntry<T>;\n}\n\nexport const prepareEntryToIndex = <T extends CmsEntryValues = CmsEntryValues>(\n params: PrepareElasticsearchDataParams<T>\n): CmsIndexEntry<T> => {\n const { fieldRegistry, fieldIndexRegistry, storageEntry, entry, model } = params;\n\n function getFieldIndex(type: string): CmsEntryOpenSearchFieldIndex.Interface {\n const fieldIndexing = fieldIndexRegistry.get(type);\n if (fieldIndexing) {\n return fieldIndexing;\n }\n return fieldIndexRegistry.getDefault();\n }\n\n // These objects will contain values processed by field index implementations\n const values: T = {} as T;\n const rawValues: T = {} as T;\n\n // We're only interested in current model fields.\n for (const field of model.fields) {\n const identifier = getFieldIdentifier(storageEntry.values, field) as keyof T;\n if (!identifier) {\n continue;\n }\n\n const fieldIndex = getFieldIndex(field.type);\n\n const { value, rawValue } = fieldIndex.toIndex({\n fieldRegistry,\n model,\n field,\n rawValue: entry.values[identifier],\n value: storageEntry.values[identifier],\n getFieldIndex\n });\n\n if (typeof value !== \"undefined\") {\n values[identifier] = value;\n }\n\n if (typeof rawValue !== \"undefined\") {\n rawValues[identifier] = rawValue;\n }\n }\n return {\n ...storageEntry,\n values,\n rawValues\n };\n};\n\nexport const extractEntriesFromIndex = <T extends CmsEntryValues = CmsEntryValues>({\n fieldRegistry,\n fieldIndexRegistry,\n entries,\n model\n}: ExtractEntriesFromIndexParams<T>): CmsEntry<T>[] => {\n function getFieldIndex(type: string): CmsEntryOpenSearchFieldIndex.Interface {\n const fieldIndex = fieldIndexRegistry.get(type);\n if (fieldIndex) {\n return fieldIndex;\n }\n return fieldIndexRegistry.getDefault();\n }\n\n const list: CmsEntry<T>[] = [];\n\n for (const entry of entries) {\n // This object will contain values processed by field index plugins\n const indexValues: T = {} as T;\n\n // We only consider fields that are present in the model\n for (const field of model.fields) {\n const fieldType = fieldRegistry.get(field.type);\n if (!fieldType) {\n throw new WebinyError(\n `Missing field type \"${field.type}\". Extract entries from index.`\n );\n }\n\n const fieldIndex = getFieldIndex(field.type);\n /**\n * We can safely cast as the code will not continue in case of no identifiers.\n */\n const identifiers = getFieldIdentifiers(entry.values, entry.rawValues, field);\n if (!identifiers) {\n continue;\n }\n try {\n const key = identifiers.valueIdentifier as keyof T;\n const rawKey = identifiers.rawValueIdentifier as keyof T;\n indexValues[key] = fieldIndex.fromIndex({\n fieldRegistry,\n model,\n field,\n getFieldIndex,\n value: entry.values[key || rawKey],\n /**\n * Possibly no rawValues so we must check for the existence of the field.\n */\n rawValue: entry.rawValues ? entry.rawValues[rawKey || key] : null\n });\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not transform entry field from index.\",\n ex.code || \"FIELD_FROM_INDEX_ERROR\",\n {\n field,\n entry\n }\n );\n }\n }\n /**\n * Let's have a new entry so we do not modify the original one.\n */\n const newEntry: CmsEntry<T> = {\n ...entry,\n values: indexValues\n };\n /**\n * If we want to remove the rawValues, TYPE, latest, published and __type, we must make them optional or ignore them.\n */\n // @ts-expect-error\n delete newEntry[\"rawValues\"];\n // @ts-expect-error\n delete newEntry[\"TYPE\"];\n // @ts-expect-error\n delete newEntry[\"__type\"];\n // @ts-expect-error\n delete newEntry[\"latest\"];\n // @ts-expect-error\n delete newEntry[\"published\"];\n list.push({\n ...newEntry\n });\n }\n\n return list;\n};\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,eAAe;AAG3C,SAASC,kBAAkB,EAAEC,mBAAmB;AA2BhD,OAAO,MAAMC,mBAAmB,GAC5BC,MAAyC,IACtB;EACnB,MAAM;IAAEC,aAAa;IAAEC,kBAAkB;IAAEC,YAAY;IAAEC,KAAK;IAAEC;EAAM,CAAC,GAAGL,MAAM;EAEhF,SAASM,aAAaA,CAACC,IAAY,EAA0C;IACzE,MAAMC,aAAa,GAAGN,kBAAkB,CAACO,GAAG,CAACF,IAAI,CAAC;IAClD,IAAIC,aAAa,EAAE;MACf,OAAOA,aAAa;IACxB;IACA,OAAON,kBAAkB,CAACQ,UAAU,CAAC,CAAC;EAC1C;;EAEA;EACA,MAAMC,MAAS,GAAG,CAAC,CAAM;EACzB,MAAMC,SAAY,GAAG,CAAC,CAAM;;EAE5B;EACA,KAAK,MAAMC,KAAK,IAAIR,KAAK,CAACS,MAAM,EAAE;IAC9B,MAAMC,UAAU,GAAGlB,kBAAkB,CAACM,YAAY,CAACQ,MAAM,EAAEE,KAAK,CAAY;IAC5E,IAAI,CAACE,UAAU,EAAE;MACb;IACJ;IAEA,MAAMC,UAAU,GAAGV,aAAa,CAACO,KAAK,CAACN,IAAI,CAAC;IAE5C,MAAM;MAAEU,KAAK;MAAEC;IAAS,CAAC,GAAGF,UAAU,CAACG,OAAO,CAAC;MAC3ClB,aAAa;MACbI,KAAK;MACLQ,KAAK;MACLK,QAAQ,EAAEd,KAAK,CAACO,MAAM,CAACI,UAAU,CAAC;MAClCE,KAAK,EAAEd,YAAY,CAACQ,MAAM,CAACI,UAAU,CAAC;MACtCT;IACJ,CAAC,CAAC;IAEF,IAAI,OAAOW,KAAK,KAAK,WAAW,EAAE;MAC9BN,MAAM,CAACI,UAAU,CAAC,GAAGE,KAAK;IAC9B;IAEA,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;MACjCN,SAAS,CAACG,UAAU,CAAC,GAAGG,QAAQ;IACpC;EACJ;EACA,OAAO;IACH,GAAGf,YAAY;IACfQ,MAAM;IACNC;EACJ,CAAC;AACL,CAAC;AAED,OAAO,MAAMQ,uBAAuB,GAAGA,CAA4C;EAC/EnB,aAAa;EACbC,kBAAkB;EAClBmB,OAAO;EACPhB;AAC8B,CAAC,KAAoB;EACnD,SAASC,aAAaA,CAACC,IAAY,EAA0C;IACzE,MAAMS,UAAU,GAAGd,kBAAkB,CAACO,GAAG,CAACF,IAAI,CAAC;IAC/C,IAAIS,UAAU,EAAE;MACZ,OAAOA,UAAU;IACrB;IACA,OAAOd,kBAAkB,CAACQ,UAAU,CAAC,CAAC;EAC1C;EAEA,MAAMY,IAAmB,GAAG,EAAE;EAE9B,KAAK,MAAMlB,KAAK,IAAIiB,OAAO,EAAE;IACzB;IACA,MAAME,WAAc,GAAG,CAAC,CAAM;;IAE9B;IACA,KAAK,MAAMV,KAAK,IAAIR,KAAK,CAACS,MAAM,EAAE;MAC9B,MAAMU,SAAS,GAAGvB,aAAa,CAACQ,GAAG,CAACI,KAAK,CAACN,IAAI,CAAC;MAC/C,IAAI,CAACiB,SAAS,EAAE;QACZ,MAAM,IAAI5B,WAAW,CACjB,uBAAuBiB,KAAK,CAACN,IAAI,gCACrC,CAAC;MACL;MAEA,MAAMS,UAAU,GAAGV,aAAa,CAACO,KAAK,CAACN,IAAI,CAAC;MAC5C;AACZ;AACA;MACY,MAAMkB,WAAW,GAAG3B,mBAAmB,CAACM,KAAK,CAACO,MAAM,EAAEP,KAAK,CAACQ,SAAS,EAAEC,KAAK,CAAC;MAC7E,IAAI,CAACY,WAAW,EAAE;QACd;MACJ;MACA,IAAI;QACA,MAAMC,GAAG,GAAGD,WAAW,CAACE,eAA0B;QAClD,MAAMC,MAAM,GAAGH,WAAW,CAACI,kBAA6B;QACxDN,WAAW,CAACG,GAAG,CAAC,GAAGV,UAAU,CAACc,SAAS,CAAC;UACpC7B,aAAa;UACbI,KAAK;UACLQ,KAAK;UACLP,aAAa;UACbW,KAAK,EAAEb,KAAK,CAACO,MAAM,CAACe,GAAG,IAAIE,MAAM,CAAC;UAClC;AACpB;AACA;UACoBV,QAAQ,EAAEd,KAAK,CAACQ,SAAS,GAAGR,KAAK,CAACQ,SAAS,CAACgB,MAAM,IAAIF,GAAG,CAAC,GAAG;QACjE,CAAC,CAAC;MACN,CAAC,CAAC,OAAOK,EAAE,EAAE;QACT,MAAM,IAAInC,WAAW,CACjBmC,EAAE,CAACC,OAAO,IAAI,6CAA6C,EAC3DD,EAAE,CAACE,IAAI,IAAI,wBAAwB,EACnC;UACIpB,KAAK;UACLT;QACJ,CACJ,CAAC;MACL;IACJ;IACA;AACR;AACA;IACQ,MAAM8B,QAAqB,GAAG;MAC1B,GAAG9B,KAAK;MACRO,MAAM,EAAEY;IACZ,CAAC;IACD;AACR;AACA;IACQ;IACA,OAAOW,QAAQ,CAAC,WAAW,CAAC;IAC5B;IACA,OAAOA,QAAQ,CAAC,MAAM,CAAC;IACvB;IACA,OAAOA,QAAQ,CAAC,QAAQ,CAAC;IACzB;IACA,OAAOA,QAAQ,CAAC,QAAQ,CAAC;IACzB;IACA,OAAOA,QAAQ,CAAC,WAAW,CAAC;IAC5BZ,IAAI,CAACa,IAAI,CAAC;MACN,GAAGD;IACP,CAAC,CAAC;EACN;EAEA,OAAOZ,IAAI;AACf,CAAC","ignoreList":[]}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { CmsEntryValues, CmsModelField } from "@webiny/api-headless-cms/types/index.js";
|
|
2
|
-
export declare const getFieldIdentifier: (values: CmsEntryValues | null | undefined, field: CmsModelField) => string | undefined;
|
|
3
|
-
export declare const getFieldIdentifiers: (values: CmsEntryValues, rawValues: CmsEntryValues | null | undefined, field: CmsModelField) => {
|
|
4
|
-
valueIdentifier: string;
|
|
5
|
-
rawValueIdentifier: string;
|
|
6
|
-
} | null;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
const hasOwnProperty = (values = {}, property) => {
|
|
2
|
-
if (!values) {
|
|
3
|
-
return false;
|
|
4
|
-
} else if (values.hasOwnProperty) {
|
|
5
|
-
return values.hasOwnProperty(property);
|
|
6
|
-
}
|
|
7
|
-
return values[property] !== undefined;
|
|
8
|
-
};
|
|
9
|
-
export const getFieldIdentifier = (values, field) => {
|
|
10
|
-
if (field.storageId && hasOwnProperty(values, field.storageId)) {
|
|
11
|
-
return field.storageId;
|
|
12
|
-
} else if (hasOwnProperty(values, field.fieldId)) {
|
|
13
|
-
return field.fieldId;
|
|
14
|
-
}
|
|
15
|
-
return undefined;
|
|
16
|
-
};
|
|
17
|
-
export const getFieldIdentifiers = (values, rawValues, field) => {
|
|
18
|
-
let valueIdentifier = getFieldIdentifier(values, field);
|
|
19
|
-
let rawValueIdentifier = getFieldIdentifier(rawValues, field);
|
|
20
|
-
if (!valueIdentifier && !rawValueIdentifier) {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
if (!valueIdentifier) {
|
|
24
|
-
valueIdentifier = rawValueIdentifier;
|
|
25
|
-
}
|
|
26
|
-
if (!rawValueIdentifier) {
|
|
27
|
-
rawValueIdentifier = valueIdentifier;
|
|
28
|
-
}
|
|
29
|
-
return {
|
|
30
|
-
valueIdentifier,
|
|
31
|
-
rawValueIdentifier
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
//# sourceMappingURL=fieldIdentifier.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["hasOwnProperty","values","property","undefined","getFieldIdentifier","field","storageId","fieldId","getFieldIdentifiers","rawValues","valueIdentifier","rawValueIdentifier"],"sources":["fieldIdentifier.ts"],"sourcesContent":["import type { CmsEntryValues, CmsModelField } from \"@webiny/api-headless-cms/types/index.js\";\n\nconst hasOwnProperty = (\n values: CmsEntryValues | null | undefined = {},\n property: string\n): boolean => {\n if (!values) {\n return false;\n } else if (values.hasOwnProperty) {\n return values.hasOwnProperty(property);\n }\n return values[property] !== undefined;\n};\n\nexport const getFieldIdentifier = (\n values: CmsEntryValues | null | undefined,\n field: CmsModelField\n): string | undefined => {\n if (field.storageId && hasOwnProperty(values, field.storageId)) {\n return field.storageId;\n } else if (hasOwnProperty(values, field.fieldId)) {\n return field.fieldId;\n }\n return undefined;\n};\n\nexport const getFieldIdentifiers = (\n values: CmsEntryValues,\n rawValues: CmsEntryValues | null | undefined,\n field: CmsModelField\n) => {\n let valueIdentifier = getFieldIdentifier(values, field);\n let rawValueIdentifier = getFieldIdentifier(rawValues, field);\n if (!valueIdentifier && !rawValueIdentifier) {\n return null;\n }\n if (!valueIdentifier) {\n valueIdentifier = rawValueIdentifier as string;\n }\n if (!rawValueIdentifier) {\n rawValueIdentifier = valueIdentifier as string;\n }\n return {\n valueIdentifier,\n rawValueIdentifier\n };\n};\n"],"mappings":"AAEA,MAAMA,cAAc,GAAGA,CACnBC,MAAyC,GAAG,CAAC,CAAC,EAC9CC,QAAgB,KACN;EACV,IAAI,CAACD,MAAM,EAAE;IACT,OAAO,KAAK;EAChB,CAAC,MAAM,IAAIA,MAAM,CAACD,cAAc,EAAE;IAC9B,OAAOC,MAAM,CAACD,cAAc,CAACE,QAAQ,CAAC;EAC1C;EACA,OAAOD,MAAM,CAACC,QAAQ,CAAC,KAAKC,SAAS;AACzC,CAAC;AAED,OAAO,MAAMC,kBAAkB,GAAGA,CAC9BH,MAAyC,EACzCI,KAAoB,KACC;EACrB,IAAIA,KAAK,CAACC,SAAS,IAAIN,cAAc,CAACC,MAAM,EAAEI,KAAK,CAACC,SAAS,CAAC,EAAE;IAC5D,OAAOD,KAAK,CAACC,SAAS;EAC1B,CAAC,MAAM,IAAIN,cAAc,CAACC,MAAM,EAAEI,KAAK,CAACE,OAAO,CAAC,EAAE;IAC9C,OAAOF,KAAK,CAACE,OAAO;EACxB;EACA,OAAOJ,SAAS;AACpB,CAAC;AAED,OAAO,MAAMK,mBAAmB,GAAGA,CAC/BP,MAAsB,EACtBQ,SAA4C,EAC5CJ,KAAoB,KACnB;EACD,IAAIK,eAAe,GAAGN,kBAAkB,CAACH,MAAM,EAAEI,KAAK,CAAC;EACvD,IAAIM,kBAAkB,GAAGP,kBAAkB,CAACK,SAAS,EAAEJ,KAAK,CAAC;EAC7D,IAAI,CAACK,eAAe,IAAI,CAACC,kBAAkB,EAAE;IACzC,OAAO,IAAI;EACf;EACA,IAAI,CAACD,eAAe,EAAE;IAClBA,eAAe,GAAGC,kBAA4B;EAClD;EACA,IAAI,CAACA,kBAAkB,EAAE;IACrBA,kBAAkB,GAAGD,eAAyB;EAClD;EACA,OAAO;IACHA,eAAe;IACfC;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
|
package/helpers/index.d.ts
DELETED
package/helpers/index.js
DELETED
package/helpers/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./entryIndexHelpers.js\";\nexport * from \"./fieldIdentifier.js\";\n"],"mappings":"AAAA;AACA","ignoreList":[]}
|
package/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["registerCmsOpenSearchStorageOperations"],"sources":["index.ts"],"sourcesContent":["export { registerCmsOpenSearchStorageOperations } from \"./feature.js\";\n"],"mappings":"AAAA,SAASA,sCAAsC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { IEntryEntity } from \"~/definitions/types.js\";\n\nexport interface IDataLoaderParams {\n entity: IEntryEntity;\n tenant: string;\n modelId: string;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { QueryDslBoolQuery as BoolQueryConfig } from "@webiny/api-opensearch/types.js";
|
|
2
|
-
/**
|
|
3
|
-
* This function will assign a minimum_should_match for the query if conditions are met:
|
|
4
|
-
* * should is an array
|
|
5
|
-
* * it is not empty
|
|
6
|
-
* * minimum_should_match is not already set
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* By the default we set it to 1 as we want at least one OR condition to produce results.
|
|
10
|
-
*
|
|
11
|
-
* Users can modify minimum_should_match value via the body or query modification plugins.
|
|
12
|
-
*/
|
|
13
|
-
interface Params {
|
|
14
|
-
query: BoolQueryConfig;
|
|
15
|
-
value?: number;
|
|
16
|
-
}
|
|
17
|
-
export declare const assignMinimumShouldMatchToQuery: ({ query, value }: Params) => void;
|
|
18
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This function will assign a minimum_should_match for the query if conditions are met:
|
|
3
|
-
* * should is an array
|
|
4
|
-
* * it is not empty
|
|
5
|
-
* * minimum_should_match is not already set
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* By the default we set it to 1 as we want at least one OR condition to produce results.
|
|
9
|
-
*
|
|
10
|
-
* Users can modify minimum_should_match value via the body or query modification plugins.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
export const assignMinimumShouldMatchToQuery = ({
|
|
14
|
-
query,
|
|
15
|
-
value = 1
|
|
16
|
-
}) => {
|
|
17
|
-
if (!Array.isArray(query.should)) {
|
|
18
|
-
return;
|
|
19
|
-
} else if (query.should.length === 0) {
|
|
20
|
-
return;
|
|
21
|
-
} else if (query.minimum_should_match) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
query.minimum_should_match = value > 0 ? value : 1;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
//# sourceMappingURL=assignMinimumShouldMatchToQuery.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["assignMinimumShouldMatchToQuery","query","value","Array","isArray","should","length","minimum_should_match"],"sources":["assignMinimumShouldMatchToQuery.ts"],"sourcesContent":["import type { QueryDslBoolQuery as BoolQueryConfig } from \"@webiny/api-opensearch/types.js\";\n\n/**\n * This function will assign a minimum_should_match for the query if conditions are met:\n * * should is an array\n * * it is not empty\n * * minimum_should_match is not already set\n *\n *\n * By the default we set it to 1 as we want at least one OR condition to produce results.\n *\n * Users can modify minimum_should_match value via the body or query modification plugins.\n */\ninterface Params {\n query: BoolQueryConfig;\n value?: number;\n}\nexport const assignMinimumShouldMatchToQuery = ({ query, value = 1 }: Params): void => {\n if (!Array.isArray(query.should)) {\n return;\n } else if (query.should.length === 0) {\n return;\n } else if (query.minimum_should_match) {\n return;\n }\n query.minimum_should_match = value > 0 ? value : 1;\n};\n"],"mappings":"AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,OAAO,MAAMA,+BAA+B,GAAGA,CAAC;EAAEC,KAAK;EAAEC,KAAK,GAAG;AAAU,CAAC,KAAW;EACnF,IAAI,CAACC,KAAK,CAACC,OAAO,CAACH,KAAK,CAACI,MAAM,CAAC,EAAE;IAC9B;EACJ,CAAC,MAAM,IAAIJ,KAAK,CAACI,MAAM,CAACC,MAAM,KAAK,CAAC,EAAE;IAClC;EACJ,CAAC,MAAM,IAAIL,KAAK,CAACM,oBAAoB,EAAE;IACnC;EACJ;EACAN,KAAK,CAACM,oBAAoB,GAAGL,KAAK,GAAG,CAAC,GAAGA,KAAK,GAAG,CAAC;AACtD,CAAC","ignoreList":[]}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { PluginsContainer } from "@webiny/plugins";
|
|
2
|
-
import type { CmsEntryListParams, CmsEntryListWhere, CmsModel } from "@webiny/api-headless-cms/types/index.js";
|
|
3
|
-
import type { CmsEntryOpenSearchBodyModifier } from "../../../features/CmsEntryOpenSearchBodyModifier/index.js";
|
|
4
|
-
import type { CmsEntryOpenSearchSortModifier } from "../../../features/CmsEntryOpenSearchSortModifier/index.js";
|
|
5
|
-
import type { CmsEntryOpenSearchQueryModifier } from "../../../features/CmsEntryOpenSearchQueryModifier/index.js";
|
|
6
|
-
import type { CmsEntryOpenSearchValueSearchRegistry } from "../../../features/CmsEntryOpenSearchValueSearch/index.js";
|
|
7
|
-
import type { CmsEntryOpenSearchFullTextSearch } from "../../../features/CmsEntryOpenSearchFullTextSearch/index.js";
|
|
8
|
-
import type { PrimitiveValue, SearchBody } from "@webiny/api-opensearch/types.js";
|
|
9
|
-
import { CmsModelFieldToGraphQLRegistry } from "@webiny/api-headless-cms/features/graphql/index.js";
|
|
10
|
-
import { CmsEntryOpenSearchFieldIndexRegistry } from "../../../features/CmsEntryOpenSearchFieldIndex/index.js";
|
|
11
|
-
import type { CmsEntryOpenSearchFilterRegistry } from "../../../features/CmsEntryOpenSearchFilter/index.js";
|
|
12
|
-
interface ICreateElasticsearchBodyParams {
|
|
13
|
-
plugins: PluginsContainer;
|
|
14
|
-
model: CmsModel;
|
|
15
|
-
fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface;
|
|
16
|
-
fieldIndexRegistry: CmsEntryOpenSearchFieldIndexRegistry.Interface;
|
|
17
|
-
bodyModifiers: CmsEntryOpenSearchBodyModifier.Interface[];
|
|
18
|
-
sortModifiers: CmsEntryOpenSearchSortModifier.Interface[];
|
|
19
|
-
queryModifiers: CmsEntryOpenSearchQueryModifier.Interface[];
|
|
20
|
-
valueSearchRegistry: CmsEntryOpenSearchValueSearchRegistry.Interface;
|
|
21
|
-
fullTextSearches: CmsEntryOpenSearchFullTextSearch.Interface[];
|
|
22
|
-
filterRegistry: CmsEntryOpenSearchFilterRegistry.Interface;
|
|
23
|
-
params: Omit<CmsEntryListParams, "where" | "after"> & {
|
|
24
|
-
where: CmsEntryListWhere;
|
|
25
|
-
after?: PrimitiveValue[];
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
export declare const createElasticsearchBody: ({ plugins, model, params, fieldRegistry, fieldIndexRegistry, bodyModifiers, sortModifiers, queryModifiers, valueSearchRegistry, fullTextSearches, filterRegistry }: ICreateElasticsearchBodyParams) => SearchBody;
|
|
29
|
-
export {};
|