@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
package/types.js
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export let ENTITIES = /*#__PURE__*/function (ENTITIES) {
|
|
9
|
-
ENTITIES["GROUPS"] = "CmsGroups";
|
|
10
|
-
ENTITIES["MODELS"] = "CmsModels";
|
|
11
|
-
ENTITIES["ENTRIES"] = "CmsEntries";
|
|
12
|
-
ENTITIES["ENTRIES_ES"] = "CmsEntriesElasticsearch";
|
|
13
|
-
return ENTITIES;
|
|
1
|
+
var types_ENTITIES = /*#__PURE__*/ function(ENTITIES) {
|
|
2
|
+
ENTITIES["GROUPS"] = "CmsGroups";
|
|
3
|
+
ENTITIES["MODELS"] = "CmsModels";
|
|
4
|
+
ENTITIES["ENTRIES"] = "CmsEntries";
|
|
5
|
+
ENTITIES["ENTRIES_ES"] = "CmsEntriesElasticsearch";
|
|
6
|
+
return ENTITIES;
|
|
14
7
|
}({});
|
|
8
|
+
export { types_ENTITIES as ENTITIES };
|
|
15
9
|
|
|
16
10
|
//# sourceMappingURL=types.js.map
|
package/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../src/types.ts"],"sourcesContent":["import type {\n CmsContext,\n CmsEntryValues,\n CmsModel,\n CmsStorageEntry\n} from \"@webiny/api-headless-cms/types/index.js\";\n\nexport { CmsContext };\n\nexport enum ENTITIES {\n GROUPS = \"CmsGroups\",\n MODELS = \"CmsModels\",\n ENTRIES = \"CmsEntries\",\n ENTRIES_ES = \"CmsEntriesElasticsearch\"\n}\n\nexport interface DataLoadersHandlerInterfaceClearAllParams {\n tenant: string;\n}\n\nexport interface DataLoadersHandlerDataLoaderParams {\n model: Pick<CmsModel, \"tenant\" | \"modelId\">;\n ids: readonly string[];\n}\n\nexport interface IDataLoadersHandler {\n getAllEntryRevisions<T extends CmsEntryValues = CmsEntryValues>(\n params: DataLoadersHandlerDataLoaderParams\n ): Promise<CmsStorageEntry<T>[]>;\n getRevisionById<T extends CmsEntryValues = CmsEntryValues>(\n params: DataLoadersHandlerDataLoaderParams\n ): Promise<CmsStorageEntry<T>[]>;\n getPublishedRevisionByEntryId<T extends CmsEntryValues = CmsEntryValues>(\n params: DataLoadersHandlerDataLoaderParams\n ): Promise<CmsStorageEntry<T>[]>;\n getLatestRevisionByEntryId<T extends CmsEntryValues = CmsEntryValues>(\n params: DataLoadersHandlerDataLoaderParams\n ): Promise<CmsStorageEntry<T>[]>;\n clearAll: (params?: DataLoadersHandlerInterfaceClearAllParams) => void;\n}\n"],"names":["ENTITIES"],"mappings":"AASO,IAAKA,iBAAQA,WAAAA,GAAAA,SAARA,QAAQ;;;;;WAARA"}
|
package/configurations.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { CmsModel } from "@webiny/api-headless-cms/types/index.js";
|
|
2
|
-
import type { OpenSearchIndexRequestBody } from "@webiny/api-opensearch/types.js";
|
|
3
|
-
import type { CmsEntryOpenSearchIndex } from "./features/CmsEntryOpenSearchIndex/index.js";
|
|
4
|
-
interface ConfigurationsElasticsearch {
|
|
5
|
-
index: string;
|
|
6
|
-
}
|
|
7
|
-
export interface CmsElasticsearchParams {
|
|
8
|
-
model: Pick<CmsModel, "tenant" | "modelId">;
|
|
9
|
-
}
|
|
10
|
-
export interface ConfigurationsIndexSettingsParams {
|
|
11
|
-
indexConfigs: CmsEntryOpenSearchIndex.Interface[];
|
|
12
|
-
model: Pick<CmsModel, "tenant" | "modelId" | "group">;
|
|
13
|
-
}
|
|
14
|
-
export interface Configurations {
|
|
15
|
-
es: (params: CmsElasticsearchParams) => ConfigurationsElasticsearch;
|
|
16
|
-
indexSettings: (params: ConfigurationsIndexSettingsParams) => Partial<OpenSearchIndexRequestBody>;
|
|
17
|
-
}
|
|
18
|
-
export declare const configurations: Configurations;
|
|
19
|
-
export {};
|
package/configurations.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import WebinyError from "@webiny/error";
|
|
2
|
-
import { getOpenSearchIndexPrefix, isSharedOpenSearchIndex as isSharedElasticsearchIndex } from "@webiny/api-opensearch";
|
|
3
|
-
export const configurations = {
|
|
4
|
-
es({
|
|
5
|
-
model
|
|
6
|
-
}) {
|
|
7
|
-
const {
|
|
8
|
-
tenant
|
|
9
|
-
} = model;
|
|
10
|
-
if (!tenant) {
|
|
11
|
-
throw new WebinyError(`Missing "tenant" parameter when trying to create Elasticsearch index name.`, "TENANT_ERROR");
|
|
12
|
-
}
|
|
13
|
-
const sharedIndex = isSharedElasticsearchIndex();
|
|
14
|
-
const index = [sharedIndex ? "root" : tenant, "headless-cms", model.modelId].join("-").toLowerCase();
|
|
15
|
-
const prefix = getOpenSearchIndexPrefix();
|
|
16
|
-
if (!prefix) {
|
|
17
|
-
return {
|
|
18
|
-
index
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
return {
|
|
22
|
-
index: prefix + index
|
|
23
|
-
};
|
|
24
|
-
},
|
|
25
|
-
indexSettings: ({
|
|
26
|
-
indexConfigs,
|
|
27
|
-
model
|
|
28
|
-
}) => {
|
|
29
|
-
const usable = indexConfigs.filter(c => c.canUse({
|
|
30
|
-
model
|
|
31
|
-
}));
|
|
32
|
-
if (usable.length === 0) {
|
|
33
|
-
return {};
|
|
34
|
-
}
|
|
35
|
-
return usable[usable.length - 1].body;
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
//# sourceMappingURL=configurations.js.map
|
package/configurations.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["WebinyError","getOpenSearchIndexPrefix","isSharedOpenSearchIndex","isSharedElasticsearchIndex","configurations","es","model","tenant","sharedIndex","index","modelId","join","toLowerCase","prefix","indexSettings","indexConfigs","usable","filter","c","canUse","length","body"],"sources":["configurations.ts"],"sourcesContent":["import type { CmsModel } from \"@webiny/api-headless-cms/types/index.js\";\nimport WebinyError from \"@webiny/error\";\nimport {\n getOpenSearchIndexPrefix,\n isSharedOpenSearchIndex as isSharedElasticsearchIndex\n} from \"@webiny/api-opensearch\";\nimport type { OpenSearchIndexRequestBody } from \"@webiny/api-opensearch/types.js\";\nimport type { CmsEntryOpenSearchIndex } from \"~/features/CmsEntryOpenSearchIndex/index.js\";\n\ninterface ConfigurationsElasticsearch {\n index: string;\n}\n\nexport interface CmsElasticsearchParams {\n model: Pick<CmsModel, \"tenant\" | \"modelId\">;\n}\n\nexport interface ConfigurationsIndexSettingsParams {\n indexConfigs: CmsEntryOpenSearchIndex.Interface[];\n model: Pick<CmsModel, \"tenant\" | \"modelId\" | \"group\">;\n}\n\nexport interface Configurations {\n es: (params: CmsElasticsearchParams) => ConfigurationsElasticsearch;\n indexSettings: (\n params: ConfigurationsIndexSettingsParams\n ) => Partial<OpenSearchIndexRequestBody>;\n}\n\nexport const configurations: Configurations = {\n es({ model }) {\n const { tenant } = model;\n\n if (!tenant) {\n throw new WebinyError(\n `Missing \"tenant\" parameter when trying to create Elasticsearch index name.`,\n \"TENANT_ERROR\"\n );\n }\n\n const sharedIndex = isSharedElasticsearchIndex();\n const index = [sharedIndex ? \"root\" : tenant, \"headless-cms\", model.modelId]\n .join(\"-\")\n .toLowerCase();\n\n const prefix = getOpenSearchIndexPrefix();\n\n if (!prefix) {\n return {\n index\n };\n }\n return {\n index: prefix + index\n };\n },\n indexSettings: ({ indexConfigs, model }) => {\n const usable = indexConfigs.filter(c => c.canUse({ model }));\n if (usable.length === 0) {\n return {};\n }\n return usable[usable.length - 1].body;\n }\n};\n"],"mappings":"AACA,OAAOA,WAAW,MAAM,eAAe;AACvC,SACIC,wBAAwB,EACxBC,uBAAuB,IAAIC,0BAA0B,QAClD,wBAAwB;AAwB/B,OAAO,MAAMC,cAA8B,GAAG;EAC1CC,EAAEA,CAAC;IAAEC;EAAM,CAAC,EAAE;IACV,MAAM;MAAEC;IAAO,CAAC,GAAGD,KAAK;IAExB,IAAI,CAACC,MAAM,EAAE;MACT,MAAM,IAAIP,WAAW,CACjB,4EAA4E,EAC5E,cACJ,CAAC;IACL;IAEA,MAAMQ,WAAW,GAAGL,0BAA0B,CAAC,CAAC;IAChD,MAAMM,KAAK,GAAG,CAACD,WAAW,GAAG,MAAM,GAAGD,MAAM,EAAE,cAAc,EAAED,KAAK,CAACI,OAAO,CAAC,CACvEC,IAAI,CAAC,GAAG,CAAC,CACTC,WAAW,CAAC,CAAC;IAElB,MAAMC,MAAM,GAAGZ,wBAAwB,CAAC,CAAC;IAEzC,IAAI,CAACY,MAAM,EAAE;MACT,OAAO;QACHJ;MACJ,CAAC;IACL;IACA,OAAO;MACHA,KAAK,EAAEI,MAAM,GAAGJ;IACpB,CAAC;EACL,CAAC;EACDK,aAAa,EAAEA,CAAC;IAAEC,YAAY;IAAET;EAAM,CAAC,KAAK;IACxC,MAAMU,MAAM,GAAGD,YAAY,CAACE,MAAM,CAACC,CAAC,IAAIA,CAAC,CAACC,MAAM,CAAC;MAAEb;IAAM,CAAC,CAAC,CAAC;IAC5D,IAAIU,MAAM,CAACI,MAAM,KAAK,CAAC,EAAE;MACrB,OAAO,CAAC,CAAC;IACb;IACA,OAAOJ,MAAM,CAACA,MAAM,CAACI,MAAM,GAAG,CAAC,CAAC,CAACC,IAAI;EACzC;AACJ,CAAC","ignoreList":[]}
|
package/definitions/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { IEntity, IStandardEntityAttributes } from \"@webiny/db-dynamodb\";\nimport type { GenericRecord } from \"@webiny/api/types.js\";\nimport type {\n CmsEntryStatus,\n CmsGroup,\n CmsIdentity,\n ICmsEntryLive,\n ICmsEntryLocation,\n ICmsEntrySystem,\n StorageCmsModel\n} from \"@webiny/api-headless-cms/types/index.js\";\n\nexport interface IEntryEntityAttributesData {\n tenant: string;\n entryId: string;\n id: string;\n modelId: string;\n\n /**\n * Revision-level meta fields. 👇\n */\n revisionCreatedOn: string;\n revisionModifiedOn: string | null;\n revisionSavedOn: string;\n revisionDeletedOn: string | null;\n revisionRestoredOn: string | null;\n revisionFirstPublishedOn: string | null;\n revisionLastPublishedOn: string | null;\n revisionCreatedBy: CmsIdentity;\n revisionModifiedBy: CmsIdentity | null;\n revisionSavedBy: CmsIdentity;\n revisionDeletedBy: CmsIdentity | null;\n revisionRestoredBy: CmsIdentity | null;\n revisionFirstPublishedBy: CmsIdentity | null;\n revisionLastPublishedBy: CmsIdentity | null;\n\n /**\n * Entry-level meta fields. 👇\n */\n createdOn: string;\n modifiedOn: string | null;\n savedOn: string;\n deletedOn: string | null;\n restoredOn: string | null;\n firstPublishedOn: string | null;\n lastPublishedOn: string | null;\n createdBy: CmsIdentity;\n modifiedBy: CmsIdentity | null;\n savedBy: CmsIdentity;\n deletedBy: CmsIdentity | null;\n restoredBy: CmsIdentity | null;\n firstPublishedBy: CmsIdentity | null;\n lastPublishedBy: CmsIdentity | null;\n\n /**\n * The rest. 👇\n */\n version: number;\n locked: boolean;\n status: CmsEntryStatus;\n location?: ICmsEntryLocation;\n wbyDeleted?: boolean | null;\n binOriginalFolderId?: string;\n values: GenericRecord;\n meta?: GenericRecord;\n system?: ICmsEntrySystem;\n live: ICmsEntryLive | null;\n revisionDescription: string | undefined;\n}\n\nexport type IEntryEntityAttributes = IStandardEntityAttributes<IEntryEntityAttributesData>;\n\nexport type IModelEntity = IEntity<IStandardEntityAttributes<StorageCmsModel>>;\nexport type IGroupEntity = IEntity<IStandardEntityAttributes<CmsGroup>>;\nexport type IEntryEntity = IEntity<IEntryEntityAttributes>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Client } from "@webiny/api-opensearch";
|
|
2
|
-
import type { CmsModel } from "@webiny/api-headless-cms/types/index.js";
|
|
3
|
-
import type { CmsEntryOpenSearchIndex } from "../features/CmsEntryOpenSearchIndex/index.js";
|
|
4
|
-
export interface CreateElasticsearchIndexParams {
|
|
5
|
-
client: Client;
|
|
6
|
-
indexConfigs: CmsEntryOpenSearchIndex.Interface[];
|
|
7
|
-
model: CmsModel;
|
|
8
|
-
}
|
|
9
|
-
export declare const createElasticsearchIndex: (params: CreateElasticsearchIndexParams) => Promise<void>;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import WebinyError from "@webiny/error";
|
|
2
|
-
import { configurations } from "../configurations.js";
|
|
3
|
-
const getLastUsable = params => {
|
|
4
|
-
const {
|
|
5
|
-
configs
|
|
6
|
-
} = params;
|
|
7
|
-
const usable = configs.filter(c => c.canUse(params));
|
|
8
|
-
if (usable.length === 0) {
|
|
9
|
-
throw new WebinyError("Could not find a single usable CmsEntryOpenSearchIndex.", "OPENSEARCH_INDEX_TEMPLATE_ERROR");
|
|
10
|
-
}
|
|
11
|
-
return usable[usable.length - 1];
|
|
12
|
-
};
|
|
13
|
-
export const createElasticsearchIndex = async params => {
|
|
14
|
-
const {
|
|
15
|
-
client,
|
|
16
|
-
indexConfigs,
|
|
17
|
-
model
|
|
18
|
-
} = params;
|
|
19
|
-
const {
|
|
20
|
-
index
|
|
21
|
-
} = configurations.es({
|
|
22
|
-
model
|
|
23
|
-
});
|
|
24
|
-
const config = getLastUsable({
|
|
25
|
-
configs: indexConfigs,
|
|
26
|
-
model
|
|
27
|
-
});
|
|
28
|
-
if (!config) {
|
|
29
|
-
/**
|
|
30
|
-
* This can happen only while development as we have a base index setting that is always usable.
|
|
31
|
-
*/
|
|
32
|
-
throw new Error(`Could not find a usable CmsEntryOpenSearchIndex for the CMS model "${model.name}".`);
|
|
33
|
-
}
|
|
34
|
-
try {
|
|
35
|
-
const response = await client.indices.exists({
|
|
36
|
-
index,
|
|
37
|
-
ignore_unavailable: false,
|
|
38
|
-
allow_no_indices: true,
|
|
39
|
-
include_defaults: true,
|
|
40
|
-
flat_settings: false,
|
|
41
|
-
local: false
|
|
42
|
-
});
|
|
43
|
-
if (response.body) {
|
|
44
|
-
console.log(`Elasticsearch index "${index}" for the CMS model "${model.name}" already exists.`);
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
} catch {
|
|
48
|
-
console.error(`Could not determine if the index "${index}" exists.`);
|
|
49
|
-
}
|
|
50
|
-
try {
|
|
51
|
-
await client.indices.create({
|
|
52
|
-
index,
|
|
53
|
-
body: {
|
|
54
|
-
...config.body
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
} catch (ex) {
|
|
58
|
-
console.error(`Could not create Elasticsearch index "${index}" for the CMS model "${model.name}".`);
|
|
59
|
-
console.error(ex);
|
|
60
|
-
throw new WebinyError(ex.message || "Could not create OpenSearch index for the CMS entry.", ex.code || "CREATE_OPENSEARCH_INDEX_ERROR", {
|
|
61
|
-
error: {
|
|
62
|
-
...ex,
|
|
63
|
-
message: ex.message,
|
|
64
|
-
code: ex.code,
|
|
65
|
-
data: ex.data
|
|
66
|
-
},
|
|
67
|
-
tenant: model.tenant,
|
|
68
|
-
index,
|
|
69
|
-
body: config.body
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
//# sourceMappingURL=createElasticsearchIndex.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["WebinyError","configurations","getLastUsable","params","configs","usable","filter","c","canUse","length","createElasticsearchIndex","client","indexConfigs","model","index","es","config","Error","name","response","indices","exists","ignore_unavailable","allow_no_indices","include_defaults","flat_settings","local","body","console","log","error","create","ex","message","code","data","tenant"],"sources":["createElasticsearchIndex.ts"],"sourcesContent":["import type { Client } from \"@webiny/api-opensearch\";\nimport WebinyError from \"@webiny/error\";\nimport { configurations } from \"~/configurations.js\";\nimport type { CmsModel } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { CmsEntryOpenSearchIndex } from \"~/features/CmsEntryOpenSearchIndex/index.js\";\n\nexport interface CreateElasticsearchIndexParams {\n client: Client;\n indexConfigs: CmsEntryOpenSearchIndex.Interface[];\n model: CmsModel;\n}\n\ninterface IGetLastUsableParams {\n configs: CmsEntryOpenSearchIndex.Interface[];\n model: CmsModel;\n}\n\nconst getLastUsable = (params: IGetLastUsableParams): CmsEntryOpenSearchIndex.Interface => {\n const { configs } = params;\n const usable = configs.filter(c => c.canUse(params));\n if (usable.length === 0) {\n throw new WebinyError(\n \"Could not find a single usable CmsEntryOpenSearchIndex.\",\n \"OPENSEARCH_INDEX_TEMPLATE_ERROR\"\n );\n }\n return usable[usable.length - 1];\n};\n\nexport const createElasticsearchIndex = async (params: CreateElasticsearchIndexParams) => {\n const { client, indexConfigs, model } = params;\n\n const { index } = configurations.es({\n model\n });\n\n const config = getLastUsable({\n configs: indexConfigs,\n model\n });\n if (!config) {\n /**\n * This can happen only while development as we have a base index setting that is always usable.\n */\n throw new Error(\n `Could not find a usable CmsEntryOpenSearchIndex for the CMS model \"${model.name}\".`\n );\n }\n\n try {\n const response = await client.indices.exists({\n index,\n ignore_unavailable: false,\n allow_no_indices: true,\n include_defaults: true,\n flat_settings: false,\n local: false\n });\n if (response.body) {\n console.log(\n `Elasticsearch index \"${index}\" for the CMS model \"${model.name}\" already exists.`\n );\n return;\n }\n } catch {\n console.error(`Could not determine if the index \"${index}\" exists.`);\n }\n\n try {\n await client.indices.create({\n index,\n body: {\n ...config.body\n }\n });\n } catch (ex) {\n console.error(\n `Could not create Elasticsearch index \"${index}\" for the CMS model \"${model.name}\".`\n );\n console.error(ex);\n throw new WebinyError(\n ex.message || \"Could not create OpenSearch index for the CMS entry.\",\n ex.code || \"CREATE_OPENSEARCH_INDEX_ERROR\",\n {\n error: {\n ...ex,\n message: ex.message,\n code: ex.code,\n data: ex.data\n },\n tenant: model.tenant,\n index,\n body: config.body\n }\n );\n }\n};\n"],"mappings":"AACA,OAAOA,WAAW,MAAM,eAAe;AACvC,SAASC,cAAc;AAevB,MAAMC,aAAa,GAAIC,MAA4B,IAAwC;EACvF,MAAM;IAAEC;EAAQ,CAAC,GAAGD,MAAM;EAC1B,MAAME,MAAM,GAAGD,OAAO,CAACE,MAAM,CAACC,CAAC,IAAIA,CAAC,CAACC,MAAM,CAACL,MAAM,CAAC,CAAC;EACpD,IAAIE,MAAM,CAACI,MAAM,KAAK,CAAC,EAAE;IACrB,MAAM,IAAIT,WAAW,CACjB,yDAAyD,EACzD,iCACJ,CAAC;EACL;EACA,OAAOK,MAAM,CAACA,MAAM,CAACI,MAAM,GAAG,CAAC,CAAC;AACpC,CAAC;AAED,OAAO,MAAMC,wBAAwB,GAAG,MAAOP,MAAsC,IAAK;EACtF,MAAM;IAAEQ,MAAM;IAAEC,YAAY;IAAEC;EAAM,CAAC,GAAGV,MAAM;EAE9C,MAAM;IAAEW;EAAM,CAAC,GAAGb,cAAc,CAACc,EAAE,CAAC;IAChCF;EACJ,CAAC,CAAC;EAEF,MAAMG,MAAM,GAAGd,aAAa,CAAC;IACzBE,OAAO,EAAEQ,YAAY;IACrBC;EACJ,CAAC,CAAC;EACF,IAAI,CAACG,MAAM,EAAE;IACT;AACR;AACA;IACQ,MAAM,IAAIC,KAAK,CACX,sEAAsEJ,KAAK,CAACK,IAAI,IACpF,CAAC;EACL;EAEA,IAAI;IACA,MAAMC,QAAQ,GAAG,MAAMR,MAAM,CAACS,OAAO,CAACC,MAAM,CAAC;MACzCP,KAAK;MACLQ,kBAAkB,EAAE,KAAK;MACzBC,gBAAgB,EAAE,IAAI;MACtBC,gBAAgB,EAAE,IAAI;MACtBC,aAAa,EAAE,KAAK;MACpBC,KAAK,EAAE;IACX,CAAC,CAAC;IACF,IAAIP,QAAQ,CAACQ,IAAI,EAAE;MACfC,OAAO,CAACC,GAAG,CACP,wBAAwBf,KAAK,wBAAwBD,KAAK,CAACK,IAAI,mBACnE,CAAC;MACD;IACJ;EACJ,CAAC,CAAC,MAAM;IACJU,OAAO,CAACE,KAAK,CAAC,qCAAqChB,KAAK,WAAW,CAAC;EACxE;EAEA,IAAI;IACA,MAAMH,MAAM,CAACS,OAAO,CAACW,MAAM,CAAC;MACxBjB,KAAK;MACLa,IAAI,EAAE;QACF,GAAGX,MAAM,CAACW;MACd;IACJ,CAAC,CAAC;EACN,CAAC,CAAC,OAAOK,EAAE,EAAE;IACTJ,OAAO,CAACE,KAAK,CACT,yCAAyChB,KAAK,wBAAwBD,KAAK,CAACK,IAAI,IACpF,CAAC;IACDU,OAAO,CAACE,KAAK,CAACE,EAAE,CAAC;IACjB,MAAM,IAAIhC,WAAW,CACjBgC,EAAE,CAACC,OAAO,IAAI,sDAAsD,EACpED,EAAE,CAACE,IAAI,IAAI,+BAA+B,EAC1C;MACIJ,KAAK,EAAE;QACH,GAAGE,EAAE;QACLC,OAAO,EAAED,EAAE,CAACC,OAAO;QACnBC,IAAI,EAAEF,EAAE,CAACE,IAAI;QACbC,IAAI,EAAEH,EAAE,CAACG;MACb,CAAC;MACDC,MAAM,EAAEvB,KAAK,CAACuB,MAAM;MACpBtB,KAAK;MACLa,IAAI,EAAEX,MAAM,CAACW;IACjB,CACJ,CAAC;EACL;AACJ,CAAC","ignoreList":[]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Client } from "@webiny/api-opensearch";
|
|
2
|
-
import type { CmsModel } from "@webiny/api-headless-cms/types/index.js";
|
|
3
|
-
interface DeleteElasticsearchIndexParams {
|
|
4
|
-
client: Client;
|
|
5
|
-
model: CmsModel;
|
|
6
|
-
}
|
|
7
|
-
export declare const deleteElasticsearchIndex: (params: DeleteElasticsearchIndexParams) => Promise<void>;
|
|
8
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { configurations } from "../configurations.js";
|
|
2
|
-
export const deleteElasticsearchIndex = async params => {
|
|
3
|
-
const {
|
|
4
|
-
client,
|
|
5
|
-
model
|
|
6
|
-
} = params;
|
|
7
|
-
const {
|
|
8
|
-
index
|
|
9
|
-
} = configurations.es({
|
|
10
|
-
model
|
|
11
|
-
});
|
|
12
|
-
const {
|
|
13
|
-
body: exists
|
|
14
|
-
} = await client.indices.exists({
|
|
15
|
-
index
|
|
16
|
-
});
|
|
17
|
-
if (!exists) {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
try {
|
|
21
|
-
await client.indices.delete({
|
|
22
|
-
index,
|
|
23
|
-
ignore_unavailable: true
|
|
24
|
-
});
|
|
25
|
-
} catch (ex) {
|
|
26
|
-
console.log(`Could not delete Elasticsearch index "${index}". Please do it manually.`);
|
|
27
|
-
console.log(ex.message);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
//# sourceMappingURL=deleteElasticsearchIndex.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["configurations","deleteElasticsearchIndex","params","client","model","index","es","body","exists","indices","delete","ignore_unavailable","ex","console","log","message"],"sources":["deleteElasticsearchIndex.ts"],"sourcesContent":["import type { Client } from \"@webiny/api-opensearch\";\nimport type { CmsModel } from \"@webiny/api-headless-cms/types/index.js\";\nimport { configurations } from \"~/configurations.js\";\n\ninterface DeleteElasticsearchIndexParams {\n client: Client;\n model: CmsModel;\n}\n\nexport const deleteElasticsearchIndex = async (\n params: DeleteElasticsearchIndexParams\n): Promise<void> => {\n const { client, model } = params;\n\n const { index } = configurations.es({\n model\n });\n const { body: exists } = await client.indices.exists({\n index\n });\n if (!exists) {\n return;\n }\n\n try {\n await client.indices.delete({\n index,\n ignore_unavailable: true\n });\n } catch (ex) {\n console.log(`Could not delete Elasticsearch index \"${index}\". Please do it manually.`);\n console.log(ex.message);\n }\n};\n"],"mappings":"AAEA,SAASA,cAAc;AAOvB,OAAO,MAAMC,wBAAwB,GAAG,MACpCC,MAAsC,IACtB;EAChB,MAAM;IAAEC,MAAM;IAAEC;EAAM,CAAC,GAAGF,MAAM;EAEhC,MAAM;IAAEG;EAAM,CAAC,GAAGL,cAAc,CAACM,EAAE,CAAC;IAChCF;EACJ,CAAC,CAAC;EACF,MAAM;IAAEG,IAAI,EAAEC;EAAO,CAAC,GAAG,MAAML,MAAM,CAACM,OAAO,CAACD,MAAM,CAAC;IACjDH;EACJ,CAAC,CAAC;EACF,IAAI,CAACG,MAAM,EAAE;IACT;EACJ;EAEA,IAAI;IACA,MAAML,MAAM,CAACM,OAAO,CAACC,MAAM,CAAC;MACxBL,KAAK;MACLM,kBAAkB,EAAE;IACxB,CAAC,CAAC;EACN,CAAC,CAAC,OAAOC,EAAE,EAAE;IACTC,OAAO,CAACC,GAAG,CAAC,yCAAyCT,KAAK,2BAA2B,CAAC;IACtFQ,OAAO,CAACC,GAAG,CAACF,EAAE,CAACG,OAAO,CAAC;EAC3B;AACJ,CAAC","ignoreList":[]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { CmsEntryOpenSearchFieldIndexRegistry, CmsEntryOpenSearchFieldIndex } from "../../../features/CmsEntryOpenSearchFieldIndex/index.js";
|
|
2
|
-
export { CmsEntryOpenSearchFilterRegistry, CmsEntryOpenSearchFilter } from "../../../features/CmsEntryOpenSearchFilter/index.js";
|
|
3
|
-
export { CmsEntryOpenSearchBodyModifier } from "../../../features/CmsEntryOpenSearchBodyModifier/index.js";
|
|
4
|
-
export { CmsEntryOpenSearchSortModifier } from "../../../features/CmsEntryOpenSearchSortModifier/index.js";
|
|
5
|
-
export { CmsEntryOpenSearchQueryModifier } from "../../../features/CmsEntryOpenSearchQueryModifier/index.js";
|
|
6
|
-
export { CmsEntryOpenSearchValueSearch, CmsEntryOpenSearchValueSearchRegistry } from "../../../features/CmsEntryOpenSearchValueSearch/index.js";
|
|
7
|
-
export { CmsEntryOpenSearchFullTextSearch } from "../../../features/CmsEntryOpenSearchFullTextSearch/index.js";
|
|
8
|
-
export { CmsEntryOpenSearchIndex } from "../../../features/CmsEntryOpenSearchIndex/index.js";
|
|
9
|
-
export { CmsEntryOpenSearchValuesModifier } from "../../../features/CmsEntryOpenSearchValuesModifier/index.js";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { CmsEntryOpenSearchFieldIndexRegistry, CmsEntryOpenSearchFieldIndex } from "../../../features/CmsEntryOpenSearchFieldIndex/index.js";
|
|
2
|
-
export { CmsEntryOpenSearchFilterRegistry, CmsEntryOpenSearchFilter } from "../../../features/CmsEntryOpenSearchFilter/index.js";
|
|
3
|
-
export { CmsEntryOpenSearchBodyModifier } from "../../../features/CmsEntryOpenSearchBodyModifier/index.js";
|
|
4
|
-
export { CmsEntryOpenSearchSortModifier } from "../../../features/CmsEntryOpenSearchSortModifier/index.js";
|
|
5
|
-
export { CmsEntryOpenSearchQueryModifier } from "../../../features/CmsEntryOpenSearchQueryModifier/index.js";
|
|
6
|
-
export { CmsEntryOpenSearchValueSearch, CmsEntryOpenSearchValueSearchRegistry } from "../../../features/CmsEntryOpenSearchValueSearch/index.js";
|
|
7
|
-
export { CmsEntryOpenSearchFullTextSearch } from "../../../features/CmsEntryOpenSearchFullTextSearch/index.js";
|
|
8
|
-
export { CmsEntryOpenSearchIndex } from "../../../features/CmsEntryOpenSearchIndex/index.js";
|
|
9
|
-
export { CmsEntryOpenSearchValuesModifier } from "../../../features/CmsEntryOpenSearchValuesModifier/index.js";
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=opensearch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryOpenSearchFieldIndexRegistry","CmsEntryOpenSearchFieldIndex","CmsEntryOpenSearchFilterRegistry","CmsEntryOpenSearchFilter","CmsEntryOpenSearchBodyModifier","CmsEntryOpenSearchSortModifier","CmsEntryOpenSearchQueryModifier","CmsEntryOpenSearchValueSearch","CmsEntryOpenSearchValueSearchRegistry","CmsEntryOpenSearchFullTextSearch","CmsEntryOpenSearchIndex","CmsEntryOpenSearchValuesModifier"],"sources":["opensearch.ts"],"sourcesContent":["export {\n CmsEntryOpenSearchFieldIndexRegistry,\n CmsEntryOpenSearchFieldIndex\n} from \"~/features/CmsEntryOpenSearchFieldIndex/index.js\";\nexport {\n CmsEntryOpenSearchFilterRegistry,\n CmsEntryOpenSearchFilter\n} from \"~/features/CmsEntryOpenSearchFilter/index.js\";\nexport { CmsEntryOpenSearchBodyModifier } from \"~/features/CmsEntryOpenSearchBodyModifier/index.js\";\nexport { CmsEntryOpenSearchSortModifier } from \"~/features/CmsEntryOpenSearchSortModifier/index.js\";\nexport { CmsEntryOpenSearchQueryModifier } from \"~/features/CmsEntryOpenSearchQueryModifier/index.js\";\nexport {\n CmsEntryOpenSearchValueSearch,\n CmsEntryOpenSearchValueSearchRegistry\n} from \"~/features/CmsEntryOpenSearchValueSearch/index.js\";\nexport { CmsEntryOpenSearchFullTextSearch } from \"~/features/CmsEntryOpenSearchFullTextSearch/index.js\";\nexport { CmsEntryOpenSearchIndex } from \"~/features/CmsEntryOpenSearchIndex/index.js\";\nexport { CmsEntryOpenSearchValuesModifier } from \"~/features/CmsEntryOpenSearchValuesModifier/index.js\";\n"],"mappings":"AAAA,SACIA,oCAAoC,EACpCC,4BAA4B;AAEhC,SACIC,gCAAgC,EAChCC,wBAAwB;AAE5B,SAASC,8BAA8B;AACvC,SAASC,8BAA8B;AACvC,SAASC,+BAA+B;AACxC,SACIC,6BAA6B,EAC7BC,qCAAqC;AAEzC,SAASC,gCAAgC;AACzC,SAASC,uBAAuB;AAChC,SAASC,gCAAgC","ignoreList":[]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { CmsModel } from "@webiny/api-headless-cms/types/index.js";
|
|
2
|
-
import type { SearchBody } from "@webiny/api-opensearch";
|
|
3
|
-
export interface ModifyBodyParams {
|
|
4
|
-
body: SearchBody;
|
|
5
|
-
model: CmsModel;
|
|
6
|
-
where: Record<string, any>;
|
|
7
|
-
}
|
|
8
|
-
export interface ICmsEntryOpenSearchBodyModifier {
|
|
9
|
-
readonly modelId?: string;
|
|
10
|
-
modifyBody(params: ModifyBodyParams): void;
|
|
11
|
-
}
|
|
12
|
-
export declare const CmsEntryOpenSearchBodyModifier: import("@webiny/di").Abstraction<ICmsEntryOpenSearchBodyModifier>;
|
|
13
|
-
export declare namespace CmsEntryOpenSearchBodyModifier {
|
|
14
|
-
type Interface = ICmsEntryOpenSearchBodyModifier;
|
|
15
|
-
type Params = ModifyBodyParams;
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["createAbstraction","CmsEntryOpenSearchBodyModifier"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { CmsModel } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { SearchBody } from \"@webiny/api-opensearch\";\n\nexport interface ModifyBodyParams {\n body: SearchBody;\n model: CmsModel;\n where: Record<string, any>;\n}\n\nexport interface ICmsEntryOpenSearchBodyModifier {\n readonly modelId?: string;\n modifyBody(params: ModifyBodyParams): void;\n}\n\nexport const CmsEntryOpenSearchBodyModifier = createAbstraction<ICmsEntryOpenSearchBodyModifier>(\n \"Cms/Entry/OpenSearch/BodyModifier\"\n);\n\nexport namespace CmsEntryOpenSearchBodyModifier {\n export type Interface = ICmsEntryOpenSearchBodyModifier;\n export type Params = ModifyBodyParams;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AAevD,OAAO,MAAMC,8BAA8B,GAAGD,iBAAiB,CAC3D,mCACJ,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CmsEntryOpenSearchBodyModifier } from "./abstractions.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryOpenSearchBodyModifier"],"sources":["index.ts"],"sourcesContent":["export { CmsEntryOpenSearchBodyModifier } from \"./abstractions.js\";\n"],"mappings":"AAAA,SAASA,8BAA8B","ignoreList":[]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { CmsEntryOpenSearchFieldIndexRegistry as Abstraction } from "./abstractions/CmsEntryOpenSearchFieldIndexRegistry.js";
|
|
2
|
-
import { CmsEntryOpenSearchFieldIndex } from "./abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
3
|
-
declare class CmsEntryOpenSearchFieldIndexRegistryImpl implements Abstraction.Interface {
|
|
4
|
-
private readonly fieldIndexing;
|
|
5
|
-
constructor(fieldIndexing: CmsEntryOpenSearchFieldIndex.Interface[]);
|
|
6
|
-
get(type: string): CmsEntryOpenSearchFieldIndex.Interface | undefined;
|
|
7
|
-
getDefault(): CmsEntryOpenSearchFieldIndex.Interface;
|
|
8
|
-
getAll(): CmsEntryOpenSearchFieldIndex.Interface[];
|
|
9
|
-
}
|
|
10
|
-
export declare const CmsEntryOpenSearchFieldIndexRegistry: typeof CmsEntryOpenSearchFieldIndexRegistryImpl & {
|
|
11
|
-
__abstraction: import("@webiny/di").Abstraction<import("./abstractions/CmsEntryOpenSearchFieldIndexRegistry.js").ICmsEntryOpenSearchFieldIndexRegistry>;
|
|
12
|
-
};
|
|
13
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { CmsEntryOpenSearchFieldIndexRegistry as Abstraction } from "./abstractions/CmsEntryOpenSearchFieldIndexRegistry.js";
|
|
2
|
-
import { CmsEntryOpenSearchFieldIndex } from "./abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
3
|
-
import { getBaseFieldType } from "@webiny/api-headless-cms/utils/getBaseFieldType.js";
|
|
4
|
-
import { FIELD_INDEXING_DEFAULT } from "./constants.js";
|
|
5
|
-
class CmsEntryOpenSearchFieldIndexRegistryImpl {
|
|
6
|
-
constructor(fieldIndexing) {
|
|
7
|
-
this.fieldIndexing = fieldIndexing;
|
|
8
|
-
}
|
|
9
|
-
get(type) {
|
|
10
|
-
const fieldType = getBaseFieldType({
|
|
11
|
-
type
|
|
12
|
-
});
|
|
13
|
-
return this.fieldIndexing.find(field => field.fieldType === fieldType);
|
|
14
|
-
}
|
|
15
|
-
getDefault() {
|
|
16
|
-
const fieldIndex = this.fieldIndexing.find(field => field.fieldType === FIELD_INDEXING_DEFAULT);
|
|
17
|
-
if (fieldIndex) {
|
|
18
|
-
return fieldIndex;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* This should never happen, as the default field index plugin exists in our code. This can fail during testing.
|
|
22
|
-
*/
|
|
23
|
-
throw new Error(`Missing default field index plugin. Please make sure to register a plugin with "${FIELD_INDEXING_DEFAULT}" field type.`);
|
|
24
|
-
}
|
|
25
|
-
getAll() {
|
|
26
|
-
return this.fieldIndexing;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
export const CmsEntryOpenSearchFieldIndexRegistry = Abstraction.createImplementation({
|
|
30
|
-
implementation: CmsEntryOpenSearchFieldIndexRegistryImpl,
|
|
31
|
-
dependencies: [[CmsEntryOpenSearchFieldIndex, {
|
|
32
|
-
multiple: true
|
|
33
|
-
}]]
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
//# sourceMappingURL=CmsEntryOpenSearchFieldIndexRegistry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryOpenSearchFieldIndexRegistry","Abstraction","CmsEntryOpenSearchFieldIndex","getBaseFieldType","FIELD_INDEXING_DEFAULT","CmsEntryOpenSearchFieldIndexRegistryImpl","constructor","fieldIndexing","get","type","fieldType","find","field","getDefault","fieldIndex","Error","getAll","createImplementation","implementation","dependencies","multiple"],"sources":["CmsEntryOpenSearchFieldIndexRegistry.ts"],"sourcesContent":["import { CmsEntryOpenSearchFieldIndexRegistry as Abstraction } from \"./abstractions/CmsEntryOpenSearchFieldIndexRegistry.js\";\nimport { CmsEntryOpenSearchFieldIndex } from \"./abstractions/CmsEntryOpenSearchFieldIndex.js\";\nimport { getBaseFieldType } from \"@webiny/api-headless-cms/utils/getBaseFieldType.js\";\nimport { FIELD_INDEXING_DEFAULT } from \"./constants.js\";\n\nclass CmsEntryOpenSearchFieldIndexRegistryImpl implements Abstraction.Interface {\n public constructor(private readonly fieldIndexing: CmsEntryOpenSearchFieldIndex.Interface[]) {}\n\n public get(type: string): CmsEntryOpenSearchFieldIndex.Interface | undefined {\n const fieldType = getBaseFieldType({\n type\n });\n return this.fieldIndexing.find(field => field.fieldType === fieldType);\n }\n\n public getDefault(): CmsEntryOpenSearchFieldIndex.Interface {\n const fieldIndex = this.fieldIndexing.find(\n field => field.fieldType === FIELD_INDEXING_DEFAULT\n );\n if (fieldIndex) {\n return fieldIndex;\n }\n /**\n * This should never happen, as the default field index plugin exists in our code. This can fail during testing.\n */\n throw new Error(\n `Missing default field index plugin. Please make sure to register a plugin with \"${FIELD_INDEXING_DEFAULT}\" field type.`\n );\n }\n\n public getAll(): CmsEntryOpenSearchFieldIndex.Interface[] {\n return this.fieldIndexing;\n }\n}\n\nexport const CmsEntryOpenSearchFieldIndexRegistry = Abstraction.createImplementation({\n implementation: CmsEntryOpenSearchFieldIndexRegistryImpl,\n dependencies: [[CmsEntryOpenSearchFieldIndex, { multiple: true }]]\n});\n"],"mappings":"AAAA,SAASA,oCAAoC,IAAIC,WAAW;AAC5D,SAASC,4BAA4B;AACrC,SAASC,gBAAgB,QAAQ,oDAAoD;AACrF,SAASC,sBAAsB;AAE/B,MAAMC,wCAAwC,CAAkC;EACrEC,WAAWA,CAAkBC,aAAuD,EAAE;IAAA,KAAzDA,aAAuD,GAAvDA,aAAuD;EAAG;EAEvFC,GAAGA,CAACC,IAAY,EAAsD;IACzE,MAAMC,SAAS,GAAGP,gBAAgB,CAAC;MAC/BM;IACJ,CAAC,CAAC;IACF,OAAO,IAAI,CAACF,aAAa,CAACI,IAAI,CAACC,KAAK,IAAIA,KAAK,CAACF,SAAS,KAAKA,SAAS,CAAC;EAC1E;EAEOG,UAAUA,CAAA,EAA2C;IACxD,MAAMC,UAAU,GAAG,IAAI,CAACP,aAAa,CAACI,IAAI,CACtCC,KAAK,IAAIA,KAAK,CAACF,SAAS,KAAKN,sBACjC,CAAC;IACD,IAAIU,UAAU,EAAE;MACZ,OAAOA,UAAU;IACrB;IACA;AACR;AACA;IACQ,MAAM,IAAIC,KAAK,CACX,mFAAmFX,sBAAsB,eAC7G,CAAC;EACL;EAEOY,MAAMA,CAAA,EAA6C;IACtD,OAAO,IAAI,CAACT,aAAa;EAC7B;AACJ;AAEA,OAAO,MAAMP,oCAAoC,GAAGC,WAAW,CAACgB,oBAAoB,CAAC;EACjFC,cAAc,EAAEb,wCAAwC;EACxDc,YAAY,EAAE,CAAC,CAACjB,4BAA4B,EAAE;IAAEkB,QAAQ,EAAE;EAAK,CAAC,CAAC;AACrE,CAAC,CAAC","ignoreList":[]}
|
package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { CmsModel, CmsModelField } from "@webiny/api-headless-cms/types/index.js";
|
|
2
|
-
import type { CmsModelFieldToGraphQLRegistry } from "@webiny/api-headless-cms/exports/api/cms/graphql.js";
|
|
3
|
-
export interface ToIndexParams {
|
|
4
|
-
model: CmsModel;
|
|
5
|
-
field: CmsModelField;
|
|
6
|
-
fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface;
|
|
7
|
-
value: any;
|
|
8
|
-
rawValue: any;
|
|
9
|
-
getFieldIndex(fieldType: string): ICmsEntryOpenSearchFieldIndex;
|
|
10
|
-
}
|
|
11
|
-
export interface ToIndexValue {
|
|
12
|
-
value?: any;
|
|
13
|
-
rawValue?: any;
|
|
14
|
-
}
|
|
15
|
-
export interface FromIndexParams {
|
|
16
|
-
model: CmsModel;
|
|
17
|
-
field: CmsModelField;
|
|
18
|
-
fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface;
|
|
19
|
-
value: any;
|
|
20
|
-
rawValue: any;
|
|
21
|
-
getFieldIndex(fieldType: string): ICmsEntryOpenSearchFieldIndex;
|
|
22
|
-
}
|
|
23
|
-
export interface ICmsEntryOpenSearchFieldIndex {
|
|
24
|
-
readonly fieldType: string;
|
|
25
|
-
unmappedType?(field: Pick<CmsModelField, "fieldId" | "type">): string;
|
|
26
|
-
toIndex(params: ToIndexParams): ToIndexValue;
|
|
27
|
-
fromIndex(params: FromIndexParams): any;
|
|
28
|
-
}
|
|
29
|
-
export declare const CmsEntryOpenSearchFieldIndex: import("@webiny/di").Abstraction<ICmsEntryOpenSearchFieldIndex>;
|
|
30
|
-
export declare namespace CmsEntryOpenSearchFieldIndex {
|
|
31
|
-
type Interface = ICmsEntryOpenSearchFieldIndex;
|
|
32
|
-
type ToIndex = ToIndexParams;
|
|
33
|
-
type ToValue = ToIndexValue;
|
|
34
|
-
type FromIndex = FromIndexParams;
|
|
35
|
-
}
|
package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["createAbstraction","CmsEntryOpenSearchFieldIndex"],"sources":["CmsEntryOpenSearchFieldIndex.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { CmsModel, CmsModelField } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { CmsModelFieldToGraphQLRegistry } from \"@webiny/api-headless-cms/exports/api/cms/graphql.js\";\n\nexport interface ToIndexParams {\n model: CmsModel;\n field: CmsModelField;\n fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface;\n value: any;\n rawValue: any;\n getFieldIndex(fieldType: string): ICmsEntryOpenSearchFieldIndex;\n}\n\nexport interface ToIndexValue {\n value?: any;\n rawValue?: any;\n}\n\nexport interface FromIndexParams {\n model: CmsModel;\n field: CmsModelField;\n fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface;\n value: any;\n rawValue: any;\n getFieldIndex(fieldType: string): ICmsEntryOpenSearchFieldIndex;\n}\n\nexport interface ICmsEntryOpenSearchFieldIndex {\n readonly fieldType: string;\n unmappedType?(field: Pick<CmsModelField, \"fieldId\" | \"type\">): string;\n toIndex(params: ToIndexParams): ToIndexValue;\n fromIndex(params: FromIndexParams): any;\n}\n\nexport const CmsEntryOpenSearchFieldIndex = createAbstraction<ICmsEntryOpenSearchFieldIndex>(\n \"Cms/Entry/OpenSearch/FieldIndex\"\n);\n\nexport namespace CmsEntryOpenSearchFieldIndex {\n export type Interface = ICmsEntryOpenSearchFieldIndex;\n export type ToIndex = ToIndexParams;\n export type ToValue = ToIndexValue;\n export type FromIndex = FromIndexParams;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AAkCvD,OAAO,MAAMC,4BAA4B,GAAGD,iBAAiB,CACzD,iCACJ,CAAC","ignoreList":[]}
|
package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { CmsEntryOpenSearchFieldIndex } from "./CmsEntryOpenSearchFieldIndex.js";
|
|
2
|
-
export interface ICmsEntryOpenSearchFieldIndexRegistry {
|
|
3
|
-
get(fieldType: string): CmsEntryOpenSearchFieldIndex.Interface | undefined;
|
|
4
|
-
getDefault(): CmsEntryOpenSearchFieldIndex.Interface;
|
|
5
|
-
getAll(): CmsEntryOpenSearchFieldIndex.Interface[];
|
|
6
|
-
}
|
|
7
|
-
export declare const CmsEntryOpenSearchFieldIndexRegistry: import("@webiny/di").Abstraction<ICmsEntryOpenSearchFieldIndexRegistry>;
|
|
8
|
-
export declare namespace CmsEntryOpenSearchFieldIndexRegistry {
|
|
9
|
-
type Interface = ICmsEntryOpenSearchFieldIndexRegistry;
|
|
10
|
-
type FieldIndex = CmsEntryOpenSearchFieldIndex.Interface;
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["createAbstraction","CmsEntryOpenSearchFieldIndexRegistry"],"sources":["CmsEntryOpenSearchFieldIndexRegistry.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { CmsEntryOpenSearchFieldIndex } from \"./CmsEntryOpenSearchFieldIndex.js\";\n\nexport interface ICmsEntryOpenSearchFieldIndexRegistry {\n get(fieldType: string): CmsEntryOpenSearchFieldIndex.Interface | undefined;\n getDefault(): CmsEntryOpenSearchFieldIndex.Interface;\n getAll(): CmsEntryOpenSearchFieldIndex.Interface[];\n}\n\nexport const CmsEntryOpenSearchFieldIndexRegistry =\n createAbstraction<ICmsEntryOpenSearchFieldIndexRegistry>(\n \"Cms/Entry/OpenSearch/FieldIndexRegistry\"\n );\n\nexport namespace CmsEntryOpenSearchFieldIndexRegistry {\n export type Interface = ICmsEntryOpenSearchFieldIndexRegistry;\n export type FieldIndex = CmsEntryOpenSearchFieldIndex.Interface;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AASvD,OAAO,MAAMC,oCAAoC,GAC7CD,iBAAiB,CACb,yCACJ,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const FIELD_INDEXING_DEFAULT: "*";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["FIELD_INDEXING_DEFAULT"],"sources":["constants.ts"],"sourcesContent":["export const FIELD_INDEXING_DEFAULT = \"*\" as const;\n"],"mappings":"AAAA,OAAO,MAAMA,sBAAsB,GAAG,GAAY","ignoreList":[]}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { createFeature } from "@webiny/feature/api";
|
|
2
|
-
import { CmsEntryOpenSearchFieldIndexRegistry } from "./CmsEntryOpenSearchFieldIndexRegistry.js";
|
|
3
|
-
import { RichTextFieldIndex } from "./fields/RichTextFieldIndex.js";
|
|
4
|
-
import { JsonFieldIndex } from "./fields/JsonFieldIndex.js";
|
|
5
|
-
import { LongTextFieldIndex } from "./fields/LongTextFieldIndex.js";
|
|
6
|
-
import { NumberFieldIndex } from "./fields/NumberFieldIndex.js";
|
|
7
|
-
import { DefaultFieldIndex } from "./fields/DefaultFieldIndex.js";
|
|
8
|
-
import { DateTimeFieldIndex } from "./fields/DateTimeFieldIndex.js";
|
|
9
|
-
import { ObjectFieldIndex } from "./fields/ObjectFieldIndex.js";
|
|
10
|
-
export const CmsEntryOpenSearchFieldIndexFeature = createFeature({
|
|
11
|
-
name: "Cms/Entry/OpenSearch/FieldIndexFeature",
|
|
12
|
-
register: container => {
|
|
13
|
-
container.register(RichTextFieldIndex);
|
|
14
|
-
container.register(JsonFieldIndex);
|
|
15
|
-
container.register(LongTextFieldIndex);
|
|
16
|
-
container.register(NumberFieldIndex);
|
|
17
|
-
container.register(DefaultFieldIndex);
|
|
18
|
-
container.register(DateTimeFieldIndex);
|
|
19
|
-
container.register(ObjectFieldIndex);
|
|
20
|
-
container.register(CmsEntryOpenSearchFieldIndexRegistry);
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
//# sourceMappingURL=feature.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["createFeature","CmsEntryOpenSearchFieldIndexRegistry","RichTextFieldIndex","JsonFieldIndex","LongTextFieldIndex","NumberFieldIndex","DefaultFieldIndex","DateTimeFieldIndex","ObjectFieldIndex","CmsEntryOpenSearchFieldIndexFeature","name","register","container"],"sources":["feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api\";\nimport { CmsEntryOpenSearchFieldIndexRegistry } from \"./CmsEntryOpenSearchFieldIndexRegistry.js\";\nimport { RichTextFieldIndex } from \"./fields/RichTextFieldIndex.js\";\nimport { JsonFieldIndex } from \"./fields/JsonFieldIndex.js\";\nimport { LongTextFieldIndex } from \"./fields/LongTextFieldIndex.js\";\nimport { NumberFieldIndex } from \"./fields/NumberFieldIndex.js\";\nimport { DefaultFieldIndex } from \"./fields/DefaultFieldIndex.js\";\nimport { DateTimeFieldIndex } from \"./fields/DateTimeFieldIndex.js\";\nimport { ObjectFieldIndex } from \"./fields/ObjectFieldIndex.js\";\n\nexport const CmsEntryOpenSearchFieldIndexFeature = createFeature({\n name: \"Cms/Entry/OpenSearch/FieldIndexFeature\",\n register: container => {\n container.register(RichTextFieldIndex);\n container.register(JsonFieldIndex);\n container.register(LongTextFieldIndex);\n container.register(NumberFieldIndex);\n container.register(DefaultFieldIndex);\n container.register(DateTimeFieldIndex);\n container.register(ObjectFieldIndex);\n container.register(CmsEntryOpenSearchFieldIndexRegistry);\n }\n});\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,qBAAqB;AACnD,SAASC,oCAAoC;AAC7C,SAASC,kBAAkB;AAC3B,SAASC,cAAc;AACvB,SAASC,kBAAkB;AAC3B,SAASC,gBAAgB;AACzB,SAASC,iBAAiB;AAC1B,SAASC,kBAAkB;AAC3B,SAASC,gBAAgB;AAEzB,OAAO,MAAMC,mCAAmC,GAAGT,aAAa,CAAC;EAC7DU,IAAI,EAAE,wCAAwC;EAC9CC,QAAQ,EAAEC,SAAS,IAAI;IACnBA,SAAS,CAACD,QAAQ,CAACT,kBAAkB,CAAC;IACtCU,SAAS,CAACD,QAAQ,CAACR,cAAc,CAAC;IAClCS,SAAS,CAACD,QAAQ,CAACP,kBAAkB,CAAC;IACtCQ,SAAS,CAACD,QAAQ,CAACN,gBAAgB,CAAC;IACpCO,SAAS,CAACD,QAAQ,CAACL,iBAAiB,CAAC;IACrCM,SAAS,CAACD,QAAQ,CAACJ,kBAAkB,CAAC;IACtCK,SAAS,CAACD,QAAQ,CAACH,gBAAgB,CAAC;IACpCI,SAAS,CAACD,QAAQ,CAACV,oCAAoC,CAAC;EAC5D;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
2
|
-
declare class DateTimeFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {
|
|
3
|
-
readonly fieldType = "datetime";
|
|
4
|
-
unmappedType(): string;
|
|
5
|
-
toIndex({ field, value }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue;
|
|
6
|
-
fromIndex({ field, value }: CmsEntryOpenSearchFieldIndex.FromIndex): any;
|
|
7
|
-
}
|
|
8
|
-
export declare const DateTimeFieldIndex: typeof DateTimeFieldIndexImpl & {
|
|
9
|
-
__abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFieldIndex.js").ICmsEntryOpenSearchFieldIndex>;
|
|
10
|
-
};
|
|
11
|
-
export {};
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
|
|
2
|
-
const convertTimeToNumber = time => {
|
|
3
|
-
if (!time) {
|
|
4
|
-
return null;
|
|
5
|
-
}
|
|
6
|
-
const [hours, minutes, seconds = 0] = time.split(":").map(Number);
|
|
7
|
-
return hours * 60 * 60 + minutes * 60 + seconds;
|
|
8
|
-
};
|
|
9
|
-
const convertNumberToTime = value => {
|
|
10
|
-
if (value === undefined || value === null) {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
const hours = Math.floor(value / 60 / 60);
|
|
14
|
-
const minutes = Math.floor((value - hours * 60 * 60) / 60);
|
|
15
|
-
const seconds = Math.floor(value - hours * 60 * 60 - minutes * 60);
|
|
16
|
-
return [hours, minutes, seconds].map(v => String(v).padStart(2, "0")).join(":");
|
|
17
|
-
};
|
|
18
|
-
const convertValueToIndex = (value, field) => {
|
|
19
|
-
if (!value) {
|
|
20
|
-
return null;
|
|
21
|
-
} else if (field.settings?.type === "time") {
|
|
22
|
-
return convertTimeToNumber(value);
|
|
23
|
-
}
|
|
24
|
-
return value;
|
|
25
|
-
};
|
|
26
|
-
const convertValueFromIndex = (value, field) => {
|
|
27
|
-
const type = field.settings?.type;
|
|
28
|
-
if (type === "time") {
|
|
29
|
-
return convertNumberToTime(value);
|
|
30
|
-
} else if (!value) {
|
|
31
|
-
return null;
|
|
32
|
-
} else if (type === "dateTimeWithTimezone") {
|
|
33
|
-
return value;
|
|
34
|
-
} else if (type === "date") {
|
|
35
|
-
const dateValue = new Date(value);
|
|
36
|
-
return dateValue.toISOString().slice(0, 10);
|
|
37
|
-
}
|
|
38
|
-
return new Date(value).toISOString();
|
|
39
|
-
};
|
|
40
|
-
class DateTimeFieldIndexImpl {
|
|
41
|
-
fieldType = "datetime";
|
|
42
|
-
unmappedType() {
|
|
43
|
-
return "date";
|
|
44
|
-
}
|
|
45
|
-
toIndex({
|
|
46
|
-
field,
|
|
47
|
-
value
|
|
48
|
-
}) {
|
|
49
|
-
if (Array.isArray(value) === true) {
|
|
50
|
-
return {
|
|
51
|
-
value: value.map(v => {
|
|
52
|
-
return convertValueToIndex(v, field);
|
|
53
|
-
})
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
return {
|
|
57
|
-
value: convertValueToIndex(value, field)
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
fromIndex({
|
|
61
|
-
field,
|
|
62
|
-
value
|
|
63
|
-
}) {
|
|
64
|
-
if (Array.isArray(value) === true) {
|
|
65
|
-
return value.map(v => {
|
|
66
|
-
return convertValueFromIndex(v, field);
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
return convertValueFromIndex(value, field);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
export const DateTimeFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({
|
|
73
|
-
implementation: DateTimeFieldIndexImpl,
|
|
74
|
-
dependencies: []
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
//# sourceMappingURL=DateTimeFieldIndex.js.map
|