@webiny/api-headless-cms-ddb-es 0.0.0-unstable.e6f0dc8ca7 → 0.0.0-unstable.e9333b3f0b
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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstractions/CmsDdbEsDataLoaders.js","sources":["../../src/abstractions/CmsDdbEsDataLoaders.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { IDataLoadersHandler } from \"~/types.js\";\n\nexport const CmsDdbEsDataLoaders = createAbstraction<IDataLoadersHandler>(\"Cms/DdbEs/DataLoaders\");\n\nexport namespace CmsDdbEsDataLoaders {\n export type Interface = IDataLoadersHandler;\n}\n"],"names":["CmsDdbEsDataLoaders","createAbstraction"],"mappings":";AAGO,MAAMA,sBAAsBC,kBAAuC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstractions/CmsDdbEsEntriesEsEntity.js","sources":["../../src/abstractions/CmsDdbEsEntriesEsEntity.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { IOpenSearchEntity } from \"@webiny/api-opensearch-aws\";\n\nexport const CmsDdbEsEntriesEsEntity = createAbstraction<IOpenSearchEntity>(\n \"Cms/DdbEs/EntriesEsEntity\"\n);\n\nexport namespace CmsDdbEsEntriesEsEntity {\n export type Interface = IOpenSearchEntity;\n}\n"],"names":["CmsDdbEsEntriesEsEntity","createAbstraction"],"mappings":";AAGO,MAAMA,0BAA0BC,kBACnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstractions/CmsDdbEsEntryEntity.js","sources":["../../src/abstractions/CmsDdbEsEntryEntity.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { IEntryEntity } from \"~/definitions/types.js\";\n\nexport const CmsDdbEsEntryEntity = createAbstraction<IEntryEntity>(\"Cms/DdbEs/EntryEntity\");\n\nexport namespace CmsDdbEsEntryEntity {\n export type Interface = IEntryEntity;\n}\n"],"names":["CmsDdbEsEntryEntity","createAbstraction"],"mappings":";AAGO,MAAMA,sBAAsBC,kBAAgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstractions/CmsDdbEsGroupEntity.js","sources":["../../src/abstractions/CmsDdbEsGroupEntity.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { IGroupEntity } from \"~/definitions/types.js\";\n\nexport const CmsDdbEsGroupEntity = createAbstraction<IGroupEntity>(\"Cms/DdbEs/GroupEntity\");\n\nexport namespace CmsDdbEsGroupEntity {\n export type Interface = IGroupEntity;\n}\n"],"names":["CmsDdbEsGroupEntity","createAbstraction"],"mappings":";AAGO,MAAMA,sBAAsBC,kBAAgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstractions/CmsDdbEsModelEntity.js","sources":["../../src/abstractions/CmsDdbEsModelEntity.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { IModelEntity } from \"~/definitions/types.js\";\n\nexport const CmsDdbEsModelEntity = createAbstraction<IModelEntity>(\"Cms/DdbEs/ModelEntity\");\n\nexport namespace CmsDdbEsModelEntity {\n export type Interface = IModelEntity;\n}\n"],"names":["CmsDdbEsModelEntity","createAbstraction"],"mappings":";AAGO,MAAMA,sBAAsBC,kBAAgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstractions/CmsDdbEsOsTable.js","sources":["../../src/abstractions/CmsDdbEsOsTable.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { ITable } from \"@webiny/db-dynamodb\";\n\nexport const CmsDdbEsOsTable = createAbstraction<ITable>(\"Cms/DdbEs/OsTable\");\n\nexport namespace CmsDdbEsOsTable {\n export type Interface = ITable;\n}\n"],"names":["CmsDdbEsOsTable","createAbstraction"],"mappings":";AAGO,MAAMA,kBAAkBC,kBAA0B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstractions/CmsDdbEsTable.js","sources":["../../src/abstractions/CmsDdbEsTable.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { ITable } from \"@webiny/db-dynamodb\";\n\nexport const CmsDdbEsTable = createAbstraction<ITable>(\"Cms/DdbEs/Table\");\n\nexport namespace CmsDdbEsTable {\n export type Interface = ITable;\n}\n"],"names":["CmsDdbEsTable","createAbstraction"],"mappings":";AAGO,MAAMA,gBAAgBC,kBAA0B"}
|
package/definitions/entry.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { createStandardEntity } from "@webiny/db-dynamodb";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
name: entityName,
|
|
9
|
-
table: table.table
|
|
10
|
-
});
|
|
2
|
+
const createEntryEntity = (params)=>{
|
|
3
|
+
const { table, entityName } = params;
|
|
4
|
+
return createStandardEntity({
|
|
5
|
+
name: entityName,
|
|
6
|
+
table: table.table
|
|
7
|
+
});
|
|
11
8
|
};
|
|
9
|
+
export { createEntryEntity };
|
|
12
10
|
|
|
13
11
|
//# sourceMappingURL=entry.js.map
|
package/definitions/entry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"definitions/entry.js","sources":["../../src/definitions/entry.ts"],"sourcesContent":["import { createStandardEntity, type ITable } from \"@webiny/db-dynamodb\";\nimport type { IEntryEntity, IEntryEntityAttributesData } from \"~/definitions/types.js\";\n\nexport interface CreateEntryEntityParams {\n table: ITable;\n entityName: string;\n}\nexport const createEntryEntity = (params: CreateEntryEntityParams): IEntryEntity => {\n const { table, entityName } = params;\n return createStandardEntity<IEntryEntityAttributesData>({\n name: entityName,\n table: table.table\n });\n};\n"],"names":["createEntryEntity","params","table","entityName","createStandardEntity"],"mappings":";AAOO,MAAMA,oBAAoB,CAACC;IAC9B,MAAM,EAAEC,KAAK,EAAEC,UAAU,EAAE,GAAGF;IAC9B,OAAOG,qBAAiD;QACpD,MAAMD;QACN,OAAOD,MAAM,KAAK;IACtB;AACJ"}
|
package/definitions/group.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { createStandardEntity } from "@webiny/db-dynamodb";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
table: table.table,
|
|
9
|
-
name: entityName
|
|
10
|
-
});
|
|
2
|
+
const createGroupEntity = (params)=>{
|
|
3
|
+
const { table, entityName } = params;
|
|
4
|
+
return createStandardEntity({
|
|
5
|
+
table: table.table,
|
|
6
|
+
name: entityName
|
|
7
|
+
});
|
|
11
8
|
};
|
|
9
|
+
export { createGroupEntity };
|
|
12
10
|
|
|
13
11
|
//# sourceMappingURL=group.js.map
|
package/definitions/group.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"definitions/group.js","sources":["../../src/definitions/group.ts"],"sourcesContent":["import { createStandardEntity, type ITable } from \"@webiny/db-dynamodb\";\nimport type { IGroupEntity } from \"~/definitions/types.js\";\nimport type { CmsGroup } from \"@webiny/api-headless-cms/types/index.js\";\n\ninterface Params {\n table: ITable;\n entityName: string;\n}\nexport const createGroupEntity = (params: Params): IGroupEntity => {\n const { table, entityName } = params;\n return createStandardEntity<CmsGroup>({\n table: table.table,\n name: entityName\n });\n};\n"],"names":["createGroupEntity","params","table","entityName","createStandardEntity"],"mappings":";AAQO,MAAMA,oBAAoB,CAACC;IAC9B,MAAM,EAAEC,KAAK,EAAEC,UAAU,EAAE,GAAGF;IAC9B,OAAOG,qBAA+B;QAClC,OAAOF,MAAM,KAAK;QAClB,MAAMC;IACV;AACJ"}
|
package/definitions/model.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { createStandardEntity } from "@webiny/db-dynamodb";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
table: table.table,
|
|
9
|
-
name: entityName
|
|
10
|
-
});
|
|
2
|
+
const createModelEntity = (params)=>{
|
|
3
|
+
const { table, entityName } = params;
|
|
4
|
+
return createStandardEntity({
|
|
5
|
+
table: table.table,
|
|
6
|
+
name: entityName
|
|
7
|
+
});
|
|
11
8
|
};
|
|
9
|
+
export { createModelEntity };
|
|
12
10
|
|
|
13
11
|
//# sourceMappingURL=model.js.map
|
package/definitions/model.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"definitions/model.js","sources":["../../src/definitions/model.ts"],"sourcesContent":["import { createStandardEntity, type ITable } from \"@webiny/db-dynamodb\";\nimport type { IModelEntity } from \"~/definitions/types.js\";\nimport type { StorageCmsModel } from \"@webiny/api-headless-cms/types/index.js\";\n\ninterface Params {\n table: ITable;\n entityName: string;\n}\n\nexport const createModelEntity = (params: Params): IModelEntity => {\n const { table, entityName } = params;\n return createStandardEntity<StorageCmsModel>({\n table: table.table,\n name: entityName\n });\n};\n"],"names":["createModelEntity","params","table","entityName","createStandardEntity"],"mappings":";AASO,MAAMA,oBAAoB,CAACC;IAC9B,MAAM,EAAEC,KAAK,EAAEC,UAAU,EAAE,GAAGF;IAC9B,OAAOG,qBAAsC;QACzC,OAAOF,MAAM,KAAK;QAClB,MAAMC;IACV;AACJ"}
|
package/definitions/types.d.ts
CHANGED
|
@@ -54,6 +54,10 @@ export interface IEntryEntityAttributesData {
|
|
|
54
54
|
system?: ICmsEntrySystem;
|
|
55
55
|
live: ICmsEntryLive | null;
|
|
56
56
|
revisionDescription: string | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* A timestamp of when the entry should be automatically deleted from the database.
|
|
59
|
+
*/
|
|
60
|
+
expiresAt: number | null;
|
|
57
61
|
}
|
|
58
62
|
export type IEntryEntityAttributes = IStandardEntityAttributes<IEntryEntityAttributesData>;
|
|
59
63
|
export type IModelEntity = IEntity<IStandardEntityAttributes<StorageCmsModel>>;
|
package/definitions/types.js
CHANGED
package/feature.d.ts
CHANGED
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Root half of the DynamoDB+OpenSearch CMS storage: the table and entity definitions, built once per
|
|
3
|
+
* process. The storage operations and OpenSearch extension points are per request, in
|
|
4
|
+
* `HeadlessCmsDdbEsRequestFeature`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const HeadlessCmsDdbEsFeature: {
|
|
7
|
+
name: string;
|
|
8
|
+
register(container: import("@webiny/di").Container): void;
|
|
9
|
+
};
|
package/feature.js
CHANGED
|
@@ -1,188 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { StorageOperationsFactory as StorageOperationsFactoryAbstraction } from "@webiny/api-headless-cms/exports/api/cms/storage.js";
|
|
1
|
+
import { DynamoDBClient, createTable } from "@webiny/db-dynamodb";
|
|
3
2
|
import { ENTITIES } from "./types.js";
|
|
4
|
-
import { createRegisterExtensionPlugin } from "@webiny/handler";
|
|
5
3
|
import { createFeature } from "@webiny/feature/api/index.js";
|
|
6
|
-
import { CmsEntryOpenSearchValueSearchFeature, CmsEntryOpenSearchValueSearchRegistry } from "./features/CmsEntryOpenSearchValueSearch/index.js";
|
|
7
|
-
import { CmsEntryOpenSearchIndex, CmsEntryOpenSearchIndexFeature } from "./features/CmsEntryOpenSearchIndex/index.js";
|
|
8
|
-
import { createModelsStorageOperations } from "./operations/model/index.js";
|
|
9
|
-
import { createEntriesStorageOperations } from "./operations/entry/index.js";
|
|
10
4
|
import { createGroupEntity } from "./definitions/group.js";
|
|
11
5
|
import { createModelEntity } from "./definitions/model.js";
|
|
12
6
|
import { createEntryEntity } from "./definitions/entry.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
entityName: ENTITIES.ENTRIES,
|
|
58
|
-
table: tableInstance
|
|
59
|
-
}),
|
|
60
|
-
entriesEs: createOpenSearchEntity({
|
|
61
|
-
entityName: ENTITIES.ENTRIES_ES,
|
|
62
|
-
table: tableElasticsearchInstance
|
|
63
|
-
})
|
|
64
|
-
};
|
|
65
|
-
const fieldRegistry = container.resolve(CmsModelFieldToGraphQLRegistry);
|
|
66
|
-
const fieldIndexRegistry = container.resolve(CmsEntryOpenSearchFieldIndexRegistry);
|
|
67
|
-
const compressionHandler = container.resolve(CompressionHandler);
|
|
68
|
-
const bodyModifiers = container.resolveAll(CmsEntryOpenSearchBodyModifier);
|
|
69
|
-
const sortModifiers = container.resolveAll(CmsEntryOpenSearchSortModifier);
|
|
70
|
-
const queryModifiers = container.resolveAll(CmsEntryOpenSearchQueryModifier);
|
|
71
|
-
const valueSearchRegistry = container.resolve(CmsEntryOpenSearchValueSearchRegistry);
|
|
72
|
-
const fullTextSearches = container.resolveAll(CmsEntryOpenSearchFullTextSearch);
|
|
73
|
-
const valuesModifiers = container.resolveAll(CmsEntryOpenSearchValuesModifier);
|
|
74
|
-
const filterRegistry = container.resolve(CmsEntryOpenSearchFilterRegistry);
|
|
75
|
-
container.registerFactory(ModelAfterCreateEventHandler, () => ({
|
|
76
|
-
async handle(event) {
|
|
77
|
-
const {
|
|
78
|
-
model
|
|
79
|
-
} = event.payload;
|
|
80
|
-
await createElasticsearchIndex({
|
|
81
|
-
client: elasticsearch,
|
|
82
|
-
model,
|
|
83
|
-
indexConfigs: container.resolveAll(CmsEntryOpenSearchIndex)
|
|
84
|
-
});
|
|
7
|
+
import { createOpenSearchEntity, createOpenSearchTable } from "@webiny/api-opensearch-aws";
|
|
8
|
+
import { FilterUtilFeature } from "@webiny/db-dynamodb/feature/FilterUtil/feature.js";
|
|
9
|
+
import { CmsDdbEsTable } from "./abstractions/CmsDdbEsTable.js";
|
|
10
|
+
import { CmsDdbEsOsTable } from "./abstractions/CmsDdbEsOsTable.js";
|
|
11
|
+
import { CmsDdbEsGroupEntity } from "./abstractions/CmsDdbEsGroupEntity.js";
|
|
12
|
+
import { CmsDdbEsModelEntity } from "./abstractions/CmsDdbEsModelEntity.js";
|
|
13
|
+
import { CmsDdbEsEntryEntity } from "./abstractions/CmsDdbEsEntryEntity.js";
|
|
14
|
+
import { CmsDdbEsEntriesEsEntity } from "./abstractions/CmsDdbEsEntriesEsEntity.js";
|
|
15
|
+
const HeadlessCmsDdbEsFeature = createFeature({
|
|
16
|
+
name: "cms.storageOperations.openSearch",
|
|
17
|
+
register: (container)=>{
|
|
18
|
+
FilterUtilFeature.register(container);
|
|
19
|
+
const db = container.resolve(DynamoDBClient);
|
|
20
|
+
const documentClient = db.client;
|
|
21
|
+
const tableInstance = createTable({
|
|
22
|
+
name: process.env.DB_TABLE,
|
|
23
|
+
documentClient
|
|
24
|
+
});
|
|
25
|
+
const tableElasticsearchInstance = createOpenSearchTable({
|
|
26
|
+
name: process.env.DB_TABLE_OPENSEARCH,
|
|
27
|
+
documentClient
|
|
28
|
+
});
|
|
29
|
+
const groupEntity = createGroupEntity({
|
|
30
|
+
entityName: ENTITIES.GROUPS,
|
|
31
|
+
table: tableInstance
|
|
32
|
+
});
|
|
33
|
+
const modelEntity = createModelEntity({
|
|
34
|
+
entityName: ENTITIES.MODELS,
|
|
35
|
+
table: tableInstance
|
|
36
|
+
});
|
|
37
|
+
const entryEntity = createEntryEntity({
|
|
38
|
+
entityName: ENTITIES.ENTRIES,
|
|
39
|
+
table: tableInstance
|
|
40
|
+
});
|
|
41
|
+
const entriesEsEntity = createOpenSearchEntity({
|
|
42
|
+
entityName: ENTITIES.ENTRIES_ES,
|
|
43
|
+
table: tableElasticsearchInstance
|
|
44
|
+
});
|
|
45
|
+
container.registerInstance(CmsDdbEsTable, tableInstance);
|
|
46
|
+
container.registerInstance(CmsDdbEsOsTable, tableElasticsearchInstance);
|
|
47
|
+
container.registerInstance(CmsDdbEsGroupEntity, groupEntity);
|
|
48
|
+
container.registerInstance(CmsDdbEsModelEntity, modelEntity);
|
|
49
|
+
container.registerInstance(CmsDdbEsEntryEntity, entryEntity);
|
|
50
|
+
container.registerInstance(CmsDdbEsEntriesEsEntity, entriesEsEntity);
|
|
85
51
|
}
|
|
86
|
-
}));
|
|
87
|
-
container.registerFactory(ModelAfterCreateFromEventHandler, () => ({
|
|
88
|
-
async handle(event) {
|
|
89
|
-
const {
|
|
90
|
-
model
|
|
91
|
-
} = event.payload;
|
|
92
|
-
await createElasticsearchIndex({
|
|
93
|
-
client: elasticsearch,
|
|
94
|
-
model,
|
|
95
|
-
indexConfigs: container.resolveAll(CmsEntryOpenSearchIndex)
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
}));
|
|
99
|
-
container.registerFactory(ModelAfterDeleteEventHandler, () => ({
|
|
100
|
-
async handle(event) {
|
|
101
|
-
const {
|
|
102
|
-
model
|
|
103
|
-
} = event.payload;
|
|
104
|
-
await deleteElasticsearchIndex({
|
|
105
|
-
client: elasticsearch,
|
|
106
|
-
model
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
}));
|
|
110
|
-
const entries = createEntriesStorageOperations({
|
|
111
|
-
entity: entities.entries,
|
|
112
|
-
esEntity: entities.entriesEs,
|
|
113
|
-
plugins,
|
|
114
|
-
elasticsearch,
|
|
115
|
-
fieldRegistry,
|
|
116
|
-
fieldIndexRegistry,
|
|
117
|
-
compressionHandler,
|
|
118
|
-
bodyModifiers,
|
|
119
|
-
sortModifiers,
|
|
120
|
-
queryModifiers,
|
|
121
|
-
valueSearchRegistry,
|
|
122
|
-
fullTextSearches,
|
|
123
|
-
valuesModifiers,
|
|
124
|
-
filterRegistry
|
|
125
|
-
});
|
|
126
|
-
return {
|
|
127
|
-
name: "dynamodb:opensearch",
|
|
128
|
-
beforeInit: async context => {
|
|
129
|
-
context.db.registry.register({
|
|
130
|
-
item: entities.entries,
|
|
131
|
-
app: "cms",
|
|
132
|
-
tags: ["regular", entities.entries.name]
|
|
133
|
-
});
|
|
134
|
-
context.db.registry.register({
|
|
135
|
-
item: entities.entriesEs,
|
|
136
|
-
app: "cms",
|
|
137
|
-
tags: ["es", entities.entriesEs.name]
|
|
138
|
-
});
|
|
139
|
-
// TODO we know that context is ok, but types are missing elasticsearch/opensearch
|
|
140
|
-
// @ts-expect-error
|
|
141
|
-
createCreateIndexTask(context);
|
|
142
|
-
entries.dataLoaders.clearAll();
|
|
143
|
-
},
|
|
144
|
-
getEntities: () => entities,
|
|
145
|
-
getTable: () => tableInstance,
|
|
146
|
-
getEsTable: () => tableElasticsearchInstance,
|
|
147
|
-
groups: createGroupsStorageOperations({
|
|
148
|
-
entity: entities.groups,
|
|
149
|
-
container
|
|
150
|
-
}),
|
|
151
|
-
models: createModelsStorageOperations({
|
|
152
|
-
entity: entities.models,
|
|
153
|
-
elasticsearch
|
|
154
|
-
}),
|
|
155
|
-
entries
|
|
156
|
-
};
|
|
157
|
-
};
|
|
158
|
-
class OpenSearchStorageOperationsFactoryImpl {
|
|
159
|
-
async create(context) {
|
|
160
|
-
return createOpenSearchStorageOperations({
|
|
161
|
-
documentClient: context.db.driver.getClient(),
|
|
162
|
-
elasticsearch: context.opensearch,
|
|
163
|
-
plugins: context.plugins,
|
|
164
|
-
container: context.container
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
const OpenSearchStorageOperationsFactory = StorageOperationsFactoryAbstraction.createImplementation({
|
|
169
|
-
implementation: OpenSearchStorageOperationsFactoryImpl,
|
|
170
|
-
dependencies: []
|
|
171
|
-
});
|
|
172
|
-
const storageOperationsFeature = createFeature({
|
|
173
|
-
name: "cms.storageOperations.openSearch",
|
|
174
|
-
register: container => {
|
|
175
|
-
CmsEntryOpenSearchFieldIndexFeature.register(container);
|
|
176
|
-
CmsEntryOpenSearchFilterFeature.register(container);
|
|
177
|
-
CmsEntryOpenSearchIndexFeature.register(container);
|
|
178
|
-
CmsEntryOpenSearchValueSearchFeature.register(container);
|
|
179
|
-
container.register(OpenSearchStorageOperationsFactory).inSingletonScope();
|
|
180
|
-
}
|
|
181
52
|
});
|
|
182
|
-
export
|
|
183
|
-
return [registerDynamoDbExtension(), createRegisterExtensionPlugin(context => {
|
|
184
|
-
return storageOperationsFeature.register(context.container);
|
|
185
|
-
})];
|
|
186
|
-
};
|
|
53
|
+
export { HeadlessCmsDdbEsFeature };
|
|
187
54
|
|
|
188
55
|
//# sourceMappingURL=feature.js.map
|
package/feature.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createTable","registerExtension","registerDynamoDbExtension","StorageOperationsFactory","StorageOperationsFactoryAbstraction","ENTITIES","createRegisterExtensionPlugin","createFeature","CmsEntryOpenSearchValueSearchFeature","CmsEntryOpenSearchValueSearchRegistry","CmsEntryOpenSearchIndex","CmsEntryOpenSearchIndexFeature","createModelsStorageOperations","createEntriesStorageOperations","createGroupEntity","createModelEntity","createEntryEntity","createElasticsearchIndex","createGroupsStorageOperations","createOpenSearchEntity","createOpenSearchTable","deleteElasticsearchIndex","createCreateIndexTask","ModelAfterCreateEventHandler","ModelAfterCreateFromEventHandler","ModelAfterDeleteEventHandler","CmsModelFieldToGraphQLRegistry","CompressionHandler","CmsEntryOpenSearchBodyModifier","CmsEntryOpenSearchSortModifier","CmsEntryOpenSearchQueryModifier","CmsEntryOpenSearchFullTextSearch","CmsEntryOpenSearchValuesModifier","CmsEntryOpenSearchFieldIndexFeature","CmsEntryOpenSearchFieldIndexRegistry","CmsEntryOpenSearchFilterFeature","CmsEntryOpenSearchFilterRegistry","createOpenSearchStorageOperations","params","table","esTable","documentClient","elasticsearch","plugins","container","tableInstance","name","process","env","DB_TABLE","tableElasticsearchInstance","entities","groups","entityName","GROUPS","models","MODELS","entries","ENTRIES","entriesEs","ENTRIES_ES","fieldRegistry","resolve","fieldIndexRegistry","compressionHandler","bodyModifiers","resolveAll","sortModifiers","queryModifiers","valueSearchRegistry","fullTextSearches","valuesModifiers","filterRegistry","registerFactory","handle","event","model","payload","client","indexConfigs","entity","esEntity","beforeInit","context","db","registry","register","item","app","tags","dataLoaders","clearAll","getEntities","getTable","getEsTable","OpenSearchStorageOperationsFactoryImpl","create","driver","getClient","opensearch","OpenSearchStorageOperationsFactory","createImplementation","implementation","dependencies","storageOperationsFeature","inSingletonScope","registerCmsOpenSearchStorageOperations"],"sources":["feature.ts"],"sourcesContent":["import { createTable, registerExtension as registerDynamoDbExtension } from \"@webiny/db-dynamodb\";\nimport { StorageOperationsFactory as StorageOperationsFactoryAbstraction } from \"@webiny/api-headless-cms/exports/api/cms/storage.js\";\nimport type { CmsContext, StorageOperationsFactory as IStorageOperationsFactory } from \"~/types.js\";\nimport { ENTITIES } from \"~/types.js\";\nimport type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport { createRegisterExtensionPlugin } from \"@webiny/handler\";\nimport { createFeature } from \"@webiny/feature/api/index.js\";\nimport {\n CmsEntryOpenSearchValueSearchFeature,\n CmsEntryOpenSearchValueSearchRegistry\n} from \"~/features/CmsEntryOpenSearchValueSearch/index.js\";\nimport {\n CmsEntryOpenSearchIndex,\n CmsEntryOpenSearchIndexFeature\n} from \"~/features/CmsEntryOpenSearchIndex/index.js\";\nimport { createModelsStorageOperations } from \"./operations/model/index.js\";\nimport { createEntriesStorageOperations } from \"./operations/entry/index.js\";\nimport { createGroupEntity } from \"~/definitions/group.js\";\nimport { createModelEntity } from \"~/definitions/model.js\";\nimport { createEntryEntity } from \"~/definitions/entry.js\";\nimport { createElasticsearchIndex } from \"~/elasticsearch/createElasticsearchIndex.js\";\nimport { createGroupsStorageOperations } from \"~/operations/group/index.js\";\nimport { createOpenSearchEntity, createOpenSearchTable } from \"@webiny/api-opensearch\";\nimport { deleteElasticsearchIndex } from \"./elasticsearch/deleteElasticsearchIndex.js\";\nimport { createCreateIndexTask } from \"~/tasks/createIndexTaskPlugin.js\";\nimport { ModelAfterCreateEventHandler } from \"@webiny/api-headless-cms/features/contentModel/CreateModel/index.js\";\nimport { ModelAfterCreateFromEventHandler } from \"@webiny/api-headless-cms/features/contentModel/CreateModelFrom/events.js\";\nimport { ModelAfterDeleteEventHandler } from \"@webiny/api-headless-cms/features/contentModel/DeleteModel/events.js\";\nimport { CmsModelFieldToGraphQLRegistry } from \"@webiny/api-headless-cms/exports/api/cms/graphql.js\";\nimport { CompressionHandler } from \"@webiny/utils/exports/api.js\";\nimport { CmsEntryOpenSearchBodyModifier } from \"~/features/CmsEntryOpenSearchBodyModifier/index.js\";\nimport { CmsEntryOpenSearchSortModifier } from \"~/features/CmsEntryOpenSearchSortModifier/index.js\";\nimport { CmsEntryOpenSearchQueryModifier } from \"~/features/CmsEntryOpenSearchQueryModifier/index.js\";\nimport { CmsEntryOpenSearchFullTextSearch } from \"~/features/CmsEntryOpenSearchFullTextSearch/index.js\";\nimport { CmsEntryOpenSearchValuesModifier } from \"~/features/CmsEntryOpenSearchValuesModifier/index.js\";\nimport {\n CmsEntryOpenSearchFieldIndexFeature,\n CmsEntryOpenSearchFieldIndexRegistry\n} from \"~/features/CmsEntryOpenSearchFieldIndex/index.js\";\nimport {\n CmsEntryOpenSearchFilterFeature,\n CmsEntryOpenSearchFilterRegistry\n} from \"~/features/CmsEntryOpenSearchFilter/index.js\";\n\nconst createOpenSearchStorageOperations: IStorageOperationsFactory = params => {\n const { table, esTable, documentClient, elasticsearch, plugins, container } = params;\n\n const tableInstance = createTable({\n name: table || (process.env.DB_TABLE as string),\n documentClient\n });\n const tableElasticsearchInstance = createOpenSearchTable({\n name: esTable,\n documentClient\n });\n\n const entities = {\n groups: createGroupEntity({\n entityName: ENTITIES.GROUPS,\n table: tableInstance\n }),\n models: createModelEntity({\n entityName: ENTITIES.MODELS,\n table: tableInstance\n }),\n entries: createEntryEntity({\n entityName: ENTITIES.ENTRIES,\n table: tableInstance\n }),\n entriesEs: createOpenSearchEntity({\n entityName: ENTITIES.ENTRIES_ES,\n table: tableElasticsearchInstance\n })\n };\n\n const fieldRegistry = container.resolve(CmsModelFieldToGraphQLRegistry);\n const fieldIndexRegistry = container.resolve(CmsEntryOpenSearchFieldIndexRegistry);\n const compressionHandler = container.resolve(CompressionHandler);\n const bodyModifiers = container.resolveAll(CmsEntryOpenSearchBodyModifier);\n const sortModifiers = container.resolveAll(CmsEntryOpenSearchSortModifier);\n const queryModifiers = container.resolveAll(CmsEntryOpenSearchQueryModifier);\n const valueSearchRegistry = container.resolve(CmsEntryOpenSearchValueSearchRegistry);\n const fullTextSearches = container.resolveAll(CmsEntryOpenSearchFullTextSearch);\n const valuesModifiers = container.resolveAll(CmsEntryOpenSearchValuesModifier);\n const filterRegistry = container.resolve(CmsEntryOpenSearchFilterRegistry);\n\n container.registerFactory(ModelAfterCreateEventHandler, () => ({\n async handle(event) {\n const { model } = event.payload;\n await createElasticsearchIndex({\n client: elasticsearch,\n model,\n indexConfigs: container.resolveAll(CmsEntryOpenSearchIndex)\n });\n }\n }));\n\n container.registerFactory(ModelAfterCreateFromEventHandler, () => ({\n async handle(event) {\n const { model } = event.payload;\n await createElasticsearchIndex({\n client: elasticsearch,\n model,\n indexConfigs: container.resolveAll(CmsEntryOpenSearchIndex)\n });\n }\n }));\n\n container.registerFactory(ModelAfterDeleteEventHandler, () => ({\n async handle(event) {\n const { model } = event.payload;\n await deleteElasticsearchIndex({\n client: elasticsearch,\n model\n });\n }\n }));\n\n const entries = createEntriesStorageOperations({\n entity: entities.entries,\n esEntity: entities.entriesEs,\n plugins,\n elasticsearch,\n fieldRegistry,\n fieldIndexRegistry,\n compressionHandler,\n bodyModifiers,\n sortModifiers,\n queryModifiers,\n valueSearchRegistry,\n fullTextSearches,\n valuesModifiers,\n filterRegistry\n });\n\n return {\n name: \"dynamodb:opensearch\",\n beforeInit: async context => {\n context.db.registry.register({\n item: entities.entries,\n app: \"cms\",\n tags: [\"regular\", entities.entries.name]\n });\n context.db.registry.register({\n item: entities.entriesEs,\n app: \"cms\",\n tags: [\"es\", entities.entriesEs.name]\n });\n // TODO we know that context is ok, but types are missing elasticsearch/opensearch\n // @ts-expect-error\n createCreateIndexTask(context);\n\n entries.dataLoaders.clearAll();\n },\n getEntities: () => entities,\n getTable: () => tableInstance,\n getEsTable: () => tableElasticsearchInstance,\n groups: createGroupsStorageOperations({\n entity: entities.groups,\n container\n }),\n models: createModelsStorageOperations({\n entity: entities.models,\n elasticsearch\n }),\n entries\n };\n};\n\nclass OpenSearchStorageOperationsFactoryImpl\n implements StorageOperationsFactoryAbstraction.Interface\n{\n public async create(context: CmsContext) {\n return createOpenSearchStorageOperations({\n documentClient: context.db.driver.getClient() as DynamoDBDocument,\n elasticsearch: context.opensearch,\n plugins: context.plugins,\n container: context.container\n });\n }\n}\n\nconst OpenSearchStorageOperationsFactory = StorageOperationsFactoryAbstraction.createImplementation(\n {\n implementation: OpenSearchStorageOperationsFactoryImpl,\n dependencies: []\n }\n);\n\nconst storageOperationsFeature = createFeature({\n name: \"cms.storageOperations.openSearch\",\n register: container => {\n CmsEntryOpenSearchFieldIndexFeature.register(container);\n CmsEntryOpenSearchFilterFeature.register(container);\n CmsEntryOpenSearchIndexFeature.register(container);\n CmsEntryOpenSearchValueSearchFeature.register(container);\n container.register(OpenSearchStorageOperationsFactory).inSingletonScope();\n }\n});\n\nexport const registerCmsOpenSearchStorageOperations = () => {\n return [\n registerDynamoDbExtension(),\n createRegisterExtensionPlugin(context => {\n return storageOperationsFeature.register(context.container);\n })\n ];\n};\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,iBAAiB,IAAIC,yBAAyB,QAAQ,qBAAqB;AACjG,SAASC,wBAAwB,IAAIC,mCAAmC,QAAQ,qDAAqD;AAErI,SAASC,QAAQ;AAEjB,SAASC,6BAA6B,QAAQ,iBAAiB;AAC/D,SAASC,aAAa,QAAQ,8BAA8B;AAC5D,SACIC,oCAAoC,EACpCC,qCAAqC;AAEzC,SACIC,uBAAuB,EACvBC,8BAA8B;AAElC,SAASC,6BAA6B;AACtC,SAASC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Q,EAAE1C,SAAS,IAAI;IACnBX,mCAAmC,CAACqD,QAAQ,CAAC1C,SAAS,CAAC;IACvDT,+BAA+B,CAACmD,QAAQ,CAAC1C,SAAS,CAAC;IACnDjC,8BAA8B,CAAC2E,QAAQ,CAAC1C,SAAS,CAAC;IAClDpC,oCAAoC,CAAC8E,QAAQ,CAAC1C,SAAS,CAAC;IACxDA,SAAS,CAAC0C,QAAQ,CAACc,kCAAkC,CAAC,CAACK,gBAAgB,CAAC,CAAC;EAC7E;AACJ,CAAC,CAAC;AAEF,OAAO,MAAMC,sCAAsC,GAAGA,CAAA,KAAM;EACxD,OAAO,CACHxG,yBAAyB,CAAC,CAAC,EAC3BI,6BAA6B,CAAC6E,OAAO,IAAI;IACrC,OAAOqB,wBAAwB,CAAClB,QAAQ,CAACH,OAAO,CAACvC,SAAS,CAAC;EAC/D,CAAC,CAAC,CACL;AACL,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"feature.js","sources":["../src/feature.ts"],"sourcesContent":["import { createTable, DynamoDBClient } from \"@webiny/db-dynamodb\";\nimport { ENTITIES } from \"~/types.js\";\nimport { createFeature } from \"@webiny/feature/api/index.js\";\nimport { createGroupEntity } from \"~/definitions/group.js\";\nimport { createModelEntity } from \"~/definitions/model.js\";\nimport { createEntryEntity } from \"~/definitions/entry.js\";\nimport { createOpenSearchEntity, createOpenSearchTable } from \"@webiny/api-opensearch-aws\";\nimport { FilterUtilFeature } from \"@webiny/db-dynamodb/feature/FilterUtil/feature.js\";\nimport { CmsDdbEsTable } from \"~/abstractions/CmsDdbEsTable.js\";\nimport { CmsDdbEsOsTable } from \"~/abstractions/CmsDdbEsOsTable.js\";\nimport { CmsDdbEsGroupEntity } from \"~/abstractions/CmsDdbEsGroupEntity.js\";\nimport { CmsDdbEsModelEntity } from \"~/abstractions/CmsDdbEsModelEntity.js\";\nimport { CmsDdbEsEntryEntity } from \"~/abstractions/CmsDdbEsEntryEntity.js\";\nimport { CmsDdbEsEntriesEsEntity } from \"~/abstractions/CmsDdbEsEntriesEsEntity.js\";\n\n/**\n * Root half of the DynamoDB+OpenSearch CMS storage: the table and entity definitions, built once per\n * process. The storage operations and OpenSearch extension points are per request, in\n * `HeadlessCmsDdbEsRequestFeature`.\n */\nexport const HeadlessCmsDdbEsFeature = createFeature({\n name: \"cms.storageOperations.openSearch\",\n register: container => {\n FilterUtilFeature.register(container);\n\n const db = container.resolve(DynamoDBClient);\n const documentClient = db.client;\n\n const tableInstance = createTable({\n name: process.env.DB_TABLE as string,\n documentClient\n });\n const tableElasticsearchInstance = createOpenSearchTable({\n name: process.env.DB_TABLE_OPENSEARCH as string,\n documentClient\n });\n\n const groupEntity = createGroupEntity({\n entityName: ENTITIES.GROUPS,\n table: tableInstance\n });\n const modelEntity = createModelEntity({\n entityName: ENTITIES.MODELS,\n table: tableInstance\n });\n const entryEntity = createEntryEntity({\n entityName: ENTITIES.ENTRIES,\n table: tableInstance\n });\n const entriesEsEntity = createOpenSearchEntity({\n entityName: ENTITIES.ENTRIES_ES,\n table: tableElasticsearchInstance\n });\n\n // Register infrastructure instances (app-scoped)\n container.registerInstance(CmsDdbEsTable, tableInstance);\n container.registerInstance(CmsDdbEsOsTable, tableElasticsearchInstance);\n container.registerInstance(CmsDdbEsGroupEntity, groupEntity);\n container.registerInstance(CmsDdbEsModelEntity, modelEntity);\n container.registerInstance(CmsDdbEsEntryEntity, entryEntity);\n container.registerInstance(CmsDdbEsEntriesEsEntity, entriesEsEntity);\n }\n});\n"],"names":["HeadlessCmsDdbEsFeature","createFeature","container","FilterUtilFeature","db","DynamoDBClient","documentClient","tableInstance","createTable","process","tableElasticsearchInstance","createOpenSearchTable","groupEntity","createGroupEntity","ENTITIES","modelEntity","createModelEntity","entryEntity","createEntryEntity","entriesEsEntity","createOpenSearchEntity","CmsDdbEsTable","CmsDdbEsOsTable","CmsDdbEsGroupEntity","CmsDdbEsModelEntity","CmsDdbEsEntryEntity","CmsDdbEsEntriesEsEntity"],"mappings":";;;;;;;;;;;;;;AAoBO,MAAMA,0BAA0BC,cAAc;IACjD,MAAM;IACN,UAAUC,CAAAA;QACNC,kBAAkB,QAAQ,CAACD;QAE3B,MAAME,KAAKF,UAAU,OAAO,CAACG;QAC7B,MAAMC,iBAAiBF,GAAG,MAAM;QAEhC,MAAMG,gBAAgBC,YAAY;YAC9B,MAAMC,QAAQ,GAAG,CAAC,QAAQ;YAC1BH;QACJ;QACA,MAAMI,6BAA6BC,sBAAsB;YACrD,MAAMF,QAAQ,GAAG,CAAC,mBAAmB;YACrCH;QACJ;QAEA,MAAMM,cAAcC,kBAAkB;YAClC,YAAYC,SAAS,MAAM;YAC3B,OAAOP;QACX;QACA,MAAMQ,cAAcC,kBAAkB;YAClC,YAAYF,SAAS,MAAM;YAC3B,OAAOP;QACX;QACA,MAAMU,cAAcC,kBAAkB;YAClC,YAAYJ,SAAS,OAAO;YAC5B,OAAOP;QACX;QACA,MAAMY,kBAAkBC,uBAAuB;YAC3C,YAAYN,SAAS,UAAU;YAC/B,OAAOJ;QACX;QAGAR,UAAU,gBAAgB,CAACmB,eAAed;QAC1CL,UAAU,gBAAgB,CAACoB,iBAAiBZ;QAC5CR,UAAU,gBAAgB,CAACqB,qBAAqBX;QAChDV,UAAU,gBAAgB,CAACsB,qBAAqBT;QAChDb,UAAU,gBAAgB,CAACuB,qBAAqBR;QAChDf,UAAU,gBAAgB,CAACwB,yBAAyBP;IACxD;AACJ"}
|
package/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { HeadlessCmsDdbEsFeature } from "./feature.js";
|
|
2
|
+
export { HeadlessCmsDdbEsRequestFeature } from "./requestFeature.js";
|
package/index.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export { HeadlessCmsDdbEsFeature } from "./feature.js";
|
|
2
|
+
export { HeadlessCmsDdbEsRequestFeature } from "./requestFeature.js";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { CmsModel, CmsEntryValues, CmsEntryStorageOperationsCreateParams } from "@webiny/api-headless-cms/types/index.js";
|
|
2
|
+
import { CreateEntryStorageOperation } from "@webiny/api-headless-cms/features/shared/storageOperations/entry/CreateEntryStorageOperation.js";
|
|
3
|
+
import { CmsDdbEsEntryEntity } from "../../abstractions/CmsDdbEsEntryEntity.js";
|
|
4
|
+
import { CmsDdbEsEntriesEsEntity } from "../../abstractions/CmsDdbEsEntriesEsEntity.js";
|
|
5
|
+
import { CmsDdbEsDataLoaders } from "../../abstractions/CmsDdbEsDataLoaders.js";
|
|
6
|
+
import { CmsStorageModelProvider } from "@webiny/api-headless-cms/features/shared/abstractions.js";
|
|
7
|
+
import { CmsEntryOpenSearchFieldIndexRegistry, CmsEntryOpenSearchValuesModifier, CmsModelOpenSearchIndexProvider } from "@webiny/api-headless-cms-utils-os/exports/api/cms/opensearch.js";
|
|
8
|
+
import { CompressionHandler } from "@webiny/utils/exports/api.js";
|
|
9
|
+
declare class DdbEsCreateEntryImpl implements CreateEntryStorageOperation.Interface {
|
|
10
|
+
private entity;
|
|
11
|
+
private esEntity;
|
|
12
|
+
private dataLoaders;
|
|
13
|
+
private storageModelProvider;
|
|
14
|
+
private fieldIndexRegistry;
|
|
15
|
+
private compressionHandler;
|
|
16
|
+
private indexProvider;
|
|
17
|
+
private valuesModifiers;
|
|
18
|
+
constructor(entity: CmsDdbEsEntryEntity.Interface, esEntity: CmsDdbEsEntriesEsEntity.Interface, dataLoaders: CmsDdbEsDataLoaders.Interface, storageModelProvider: CmsStorageModelProvider.Interface, fieldIndexRegistry: CmsEntryOpenSearchFieldIndexRegistry.Interface, compressionHandler: CompressionHandler.Interface, indexProvider: CmsModelOpenSearchIndexProvider.Interface, valuesModifiers: CmsEntryOpenSearchValuesModifier.Interface[]);
|
|
19
|
+
execute<T extends CmsEntryValues = CmsEntryValues>(initialModel: CmsModel, params: CmsEntryStorageOperationsCreateParams<T>): Promise<import("@webiny/api-headless-cms/types/types.js").CmsStorageEntry<T>>;
|
|
20
|
+
}
|
|
21
|
+
export declare const DdbEsCreateEntry: typeof DdbEsCreateEntryImpl & {
|
|
22
|
+
__abstraction: import("@webiny/di").Abstraction<import("@webiny/api-headless-cms/features/shared/storageOperations/entry/CreateEntryStorageOperation.js").ICreateEntryStorageOperation>;
|
|
23
|
+
};
|
|
24
|
+
export {};
|