@webiny/api-headless-cms-ddb-es 0.0.0-unstable.06b2ede40f → 0.0.0-unstable.0d717d18dd
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/README.md +6 -30
- 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/configurations.d.ts +5 -15
- package/configurations.js +14 -46
- package/configurations.js.map +1 -1
- package/definitions/entry.d.ts +4 -6
- package/definitions/entry.js +8 -179
- package/definitions/entry.js.map +1 -1
- package/definitions/group.d.ts +6 -7
- package/definitions/group.js +8 -63
- package/definitions/group.js.map +1 -1
- package/definitions/model.d.ts +6 -7
- package/definitions/model.js +8 -107
- package/definitions/model.js.map +1 -1
- package/definitions/types.d.ts +65 -0
- package/definitions/types.js +0 -0
- package/feature.d.ts +4 -0
- package/feature.js +89 -0
- package/feature.js.map +1 -0
- package/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.d.ts +13 -0
- package/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.js +35 -0
- package/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.js.map +1 -0
- package/features/CmsModelOpenSearchIndex/DefaultCmsModelOpenSearchIndex.d.ts +8 -0
- package/features/CmsModelOpenSearchIndex/DefaultCmsModelOpenSearchIndex.js +17 -0
- package/features/CmsModelOpenSearchIndex/DefaultCmsModelOpenSearchIndex.js.map +1 -0
- package/features/CmsModelOpenSearchIndex/abstractions.d.ts +1 -0
- package/features/CmsModelOpenSearchIndex/abstractions.js +1 -0
- package/features/CmsModelOpenSearchIndex/feature.d.ts +4 -0
- package/features/CmsModelOpenSearchIndex/feature.js +13 -0
- package/features/CmsModelOpenSearchIndex/feature.js.map +1 -0
- package/features/CmsModelOpenSearchIndex/index.d.ts +3 -0
- package/features/CmsModelOpenSearchIndex/index.js +3 -0
- package/index.d.ts +1 -3
- package/index.js +1 -225
- package/operations/entry/DdbEsCreateEntry.d.ts +23 -0
- package/operations/entry/DdbEsCreateEntry.js +131 -0
- package/operations/entry/DdbEsCreateEntry.js.map +1 -0
- package/operations/entry/DdbEsCreateEntryRevisionFrom.d.ts +23 -0
- package/operations/entry/DdbEsCreateEntryRevisionFrom.js +136 -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 +23 -0
- package/operations/entry/DdbEsDeleteEntryRevision.js +133 -0
- package/operations/entry/DdbEsDeleteEntryRevision.js.map +1 -0
- package/operations/entry/DdbEsDeleteMultipleEntries.d.ts +18 -0
- package/operations/entry/DdbEsDeleteMultipleEntries.js +77 -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 +17 -0
- package/operations/entry/DdbEsGetUniqueFieldValues.js +73 -0
- package/operations/entry/DdbEsGetUniqueFieldValues.js.map +1 -0
- package/operations/entry/DdbEsListEntries.d.ts +24 -0
- package/operations/entry/DdbEsListEntries.js +88 -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 +23 -0
- package/operations/entry/DdbEsPublishEntry.js +228 -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 +23 -0
- package/operations/entry/DdbEsUnpublishEntry.js +124 -0
- package/operations/entry/DdbEsUnpublishEntry.js.map +1 -0
- package/operations/entry/DdbEsUpdateEntry.d.ts +23 -0
- package/operations/entry/DdbEsUpdateEntry.js +172 -0
- package/operations/entry/DdbEsUpdateEntry.js.map +1 -0
- package/operations/entry/dataLoader/DataLoaderCache.d.ts +1 -2
- package/operations/entry/dataLoader/DataLoaderCache.js +21 -35
- package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -1
- package/operations/entry/dataLoader/constants.js +2 -7
- package/operations/entry/dataLoader/constants.js.map +1 -1
- package/operations/entry/dataLoader/createBatchScheduleFn.js +7 -22
- package/operations/entry/dataLoader/createBatchScheduleFn.js.map +1 -1
- package/operations/entry/dataLoader/getAllEntryRevisions.d.ts +3 -3
- package/operations/entry/dataLoader/getAllEntryRevisions.js +20 -41
- package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -1
- package/operations/entry/dataLoader/getLatestRevisionByEntryId.d.ts +3 -3
- package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +30 -48
- package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -1
- package/operations/entry/dataLoader/getPublishedRevisionByEntryId.d.ts +3 -3
- package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +30 -48
- package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -1
- package/operations/entry/dataLoader/getRevisionById.d.ts +3 -3
- package/operations/entry/dataLoader/getRevisionById.js +36 -58
- package/operations/entry/dataLoader/getRevisionById.js.map +1 -1
- package/operations/entry/dataLoader/index.d.ts +3 -3
- package/operations/entry/dataLoader/index.js +13 -35
- package/operations/entry/dataLoader/index.js.map +1 -1
- package/operations/entry/dataLoader/types.d.ts +4 -4
- package/operations/entry/dataLoader/types.js +0 -7
- package/operations/entry/dataLoaders.d.ts +14 -14
- package/operations/entry/dataLoaders.js +92 -110
- package/operations/entry/dataLoaders.js.map +1 -1
- package/operations/entry/feature.d.ts +4 -0
- package/operations/entry/feature.js +55 -0
- package/operations/entry/feature.js.map +1 -0
- package/operations/entry/keys.d.ts +31 -1
- package/operations/entry/keys.js +44 -27
- package/operations/entry/keys.js.map +1 -1
- package/operations/entry/recordType.js +4 -18
- 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.d.ts +6 -6
- package/operations/entry/transformations/convertEntryKeys.js +21 -34
- package/operations/entry/transformations/convertEntryKeys.js.map +1 -1
- package/operations/entry/transformations/index.d.ts +21 -18
- package/operations/entry/transformations/index.js +87 -123
- package/operations/entry/transformations/index.js.map +1 -1
- package/operations/entry/transformations/modifyEntryValues.d.ts +30 -35
- package/operations/entry/transformations/modifyEntryValues.js +12 -24
- package/operations/entry/transformations/modifyEntryValues.js.map +1 -1
- package/operations/entry/transformations/transformEntryKeys.d.ts +8 -8
- package/operations/entry/transformations/transformEntryKeys.js +14 -24
- 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/operations/group/feature.d.ts +4 -0
- 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 +14 -0
- package/operations/model/DdbEsCreateModel.js +52 -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/operations/model/feature.d.ts +4 -0
- 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 +40 -36
- package/tasks/CreateElasticsearchIndexTask.d.ts +13 -0
- package/tasks/CreateElasticsearchIndexTask.js +40 -0
- package/tasks/CreateElasticsearchIndexTask.js.map +1 -0
- package/types.d.ts +12 -159
- package/types.js +7 -39
- package/types.js.map +1 -1
- package/definitions/entryElasticsearch.d.ts +0 -9
- package/definitions/entryElasticsearch.js +0 -41
- package/definitions/entryElasticsearch.js.map +0 -1
- package/definitions/system.d.ts +0 -9
- package/definitions/system.js +0 -42
- package/definitions/system.js.map +0 -1
- package/definitions/table.d.ts +0 -8
- package/definitions/table.js +0 -25
- package/definitions/table.js.map +0 -1
- package/definitions/tableElasticsearch.d.ts +0 -8
- package/definitions/tableElasticsearch.js +0 -25
- package/definitions/tableElasticsearch.js.map +0 -1
- package/dynamoDb/index.d.ts +0 -3
- package/dynamoDb/index.js +0 -16
- package/dynamoDb/index.js.map +0 -1
- package/dynamoDb/storage/longText.d.ts +0 -10
- package/dynamoDb/storage/longText.js +0 -96
- package/dynamoDb/storage/longText.js.map +0 -1
- package/dynamoDb/storage/richText.d.ts +0 -2
- package/dynamoDb/storage/richText.js +0 -59
- package/dynamoDb/storage/richText.js.map +0 -1
- package/elasticsearch/createElasticsearchIndex.d.ts +0 -9
- package/elasticsearch/createElasticsearchIndex.js +0 -40
- package/elasticsearch/createElasticsearchIndex.js.map +0 -1
- package/elasticsearch/deleteElasticsearchIndex.d.ts +0 -8
- package/elasticsearch/deleteElasticsearchIndex.js +0 -38
- package/elasticsearch/deleteElasticsearchIndex.js.map +0 -1
- package/elasticsearch/index.d.ts +0 -2
- package/elasticsearch/index.js +0 -13
- package/elasticsearch/index.js.map +0 -1
- package/elasticsearch/indexing/dateTimeIndexing.d.ts +0 -3
- package/elasticsearch/indexing/dateTimeIndexing.js +0 -88
- package/elasticsearch/indexing/dateTimeIndexing.js.map +0 -1
- package/elasticsearch/indexing/defaultFieldIndexing.d.ts +0 -3
- package/elasticsearch/indexing/defaultFieldIndexing.js +0 -54
- package/elasticsearch/indexing/defaultFieldIndexing.js.map +0 -1
- package/elasticsearch/indexing/index.d.ts +0 -2
- package/elasticsearch/indexing/index.js +0 -18
- package/elasticsearch/indexing/index.js.map +0 -1
- package/elasticsearch/indexing/jsonIndexing.d.ts +0 -2
- package/elasticsearch/indexing/jsonIndexing.js +0 -28
- package/elasticsearch/indexing/jsonIndexing.js.map +0 -1
- package/elasticsearch/indexing/longTextIndexing.d.ts +0 -7
- package/elasticsearch/indexing/longTextIndexing.js +0 -42
- package/elasticsearch/indexing/longTextIndexing.js.map +0 -1
- package/elasticsearch/indexing/numberIndexing.d.ts +0 -3
- package/elasticsearch/indexing/numberIndexing.js +0 -41
- package/elasticsearch/indexing/numberIndexing.js.map +0 -1
- package/elasticsearch/indexing/objectIndexing.d.ts +0 -12
- package/elasticsearch/indexing/objectIndexing.js +0 -201
- package/elasticsearch/indexing/objectIndexing.js.map +0 -1
- package/elasticsearch/indexing/richTextIndexing.d.ts +0 -3
- package/elasticsearch/indexing/richTextIndexing.js +0 -31
- package/elasticsearch/indexing/richTextIndexing.js.map +0 -1
- package/elasticsearch/indices/base.d.ts +0 -2
- package/elasticsearch/indices/base.js +0 -13
- package/elasticsearch/indices/base.js.map +0 -1
- package/elasticsearch/indices/index.d.ts +0 -1
- package/elasticsearch/indices/index.js +0 -14
- package/elasticsearch/indices/index.js.map +0 -1
- package/elasticsearch/indices/japanese.d.ts +0 -2
- package/elasticsearch/indices/japanese.js +0 -14
- package/elasticsearch/indices/japanese.js.map +0 -1
- package/elasticsearch/search/index.d.ts +0 -3
- package/elasticsearch/search/index.js +0 -13
- package/elasticsearch/search/index.js.map +0 -1
- package/elasticsearch/search/refSearch.d.ts +0 -2
- package/elasticsearch/search/refSearch.js +0 -31
- package/elasticsearch/search/refSearch.js.map +0 -1
- package/elasticsearch/search/searchableJson.d.ts +0 -2
- package/elasticsearch/search/searchableJson.js +0 -60
- package/elasticsearch/search/searchableJson.js.map +0 -1
- package/elasticsearch/search/timeSearch.d.ts +0 -2
- package/elasticsearch/search/timeSearch.js +0 -27
- package/elasticsearch/search/timeSearch.js.map +0 -1
- package/helpers/entryIndexHelpers.d.ts +0 -18
- package/helpers/entryIndexHelpers.js +0 -190
- package/helpers/entryIndexHelpers.js.map +0 -1
- package/helpers/fieldIdentifier.d.ts +0 -6
- package/helpers/fieldIdentifier.js +0 -43
- package/helpers/fieldIdentifier.js.map +0 -1
- package/helpers/index.d.ts +0 -2
- package/helpers/index.js +0 -29
- 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 -34
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js.map +0 -1
- package/operations/entry/elasticsearch/body.d.ts +0 -13
- package/operations/entry/elasticsearch/body.js +0 -142
- package/operations/entry/elasticsearch/body.js.map +0 -1
- package/operations/entry/elasticsearch/fields.d.ts +0 -10
- package/operations/entry/elasticsearch/fields.js +0 -315
- package/operations/entry/elasticsearch/fields.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/applyFiltering.d.ts +0 -8
- package/operations/entry/elasticsearch/filtering/applyFiltering.js +0 -60
- package/operations/entry/elasticsearch/filtering/applyFiltering.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/exec.d.ts +0 -17
- package/operations/entry/elasticsearch/filtering/exec.js +0 -175
- 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 -18
- package/operations/entry/elasticsearch/filtering/index.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/path.d.ts +0 -16
- package/operations/entry/elasticsearch/filtering/path.js +0 -48
- package/operations/entry/elasticsearch/filtering/path.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.d.ts +0 -2
- package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js +0 -30
- package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/plugins/index.d.ts +0 -1
- package/operations/entry/elasticsearch/filtering/plugins/index.js +0 -15
- package/operations/entry/elasticsearch/filtering/plugins/index.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.d.ts +0 -2
- package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js +0 -69
- package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.d.ts +0 -2
- package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js +0 -57
- package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/populated.d.ts +0 -2
- package/operations/entry/elasticsearch/filtering/populated.js +0 -25
- 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 -24
- package/operations/entry/elasticsearch/filtering/values.js.map +0 -1
- package/operations/entry/elasticsearch/fullTextSearch.d.ts +0 -12
- package/operations/entry/elasticsearch/fullTextSearch.js +0 -91
- 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 -27
- 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 -106
- 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 -36
- package/operations/entry/elasticsearch/keyword.js.map +0 -1
- package/operations/entry/elasticsearch/logIgnoredEsResponseError.d.ts +0 -9
- package/operations/entry/elasticsearch/logIgnoredEsResponseError.js +0 -26
- package/operations/entry/elasticsearch/logIgnoredEsResponseError.js.map +0 -1
- package/operations/entry/elasticsearch/plugins/bodyModifier.d.ts +0 -9
- package/operations/entry/elasticsearch/plugins/bodyModifier.js +0 -18
- package/operations/entry/elasticsearch/plugins/bodyModifier.js.map +0 -1
- package/operations/entry/elasticsearch/plugins/operator.d.ts +0 -8
- package/operations/entry/elasticsearch/plugins/operator.js +0 -39
- package/operations/entry/elasticsearch/plugins/operator.js.map +0 -1
- package/operations/entry/elasticsearch/plugins/queryModifier.d.ts +0 -9
- package/operations/entry/elasticsearch/plugins/queryModifier.js +0 -18
- package/operations/entry/elasticsearch/plugins/queryModifier.js.map +0 -1
- package/operations/entry/elasticsearch/plugins/search.d.ts +0 -7
- package/operations/entry/elasticsearch/plugins/search.js +0 -26
- package/operations/entry/elasticsearch/plugins/search.js.map +0 -1
- package/operations/entry/elasticsearch/plugins/sortModifier.d.ts +0 -9
- package/operations/entry/elasticsearch/plugins/sortModifier.js +0 -18
- package/operations/entry/elasticsearch/plugins/sortModifier.js.map +0 -1
- package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.d.ts +0 -2
- package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js +0 -13
- 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 -89
- package/operations/entry/elasticsearch/sort.js.map +0 -1
- package/operations/entry/elasticsearch/transformValueForSearch.d.ts +0 -16
- package/operations/entry/elasticsearch/transformValueForSearch.js +0 -32
- package/operations/entry/elasticsearch/transformValueForSearch.js.map +0 -1
- package/operations/entry/elasticsearch/types.d.ts +0 -41
- package/operations/entry/elasticsearch/types.js +0 -7
- package/operations/entry/elasticsearch/types.js.map +0 -1
- package/operations/entry/index.d.ts +0 -11
- package/operations/entry/index.js +0 -1881
- package/operations/entry/index.js.map +0 -1
- package/operations/entry/transformations/transformEntryToIndex.d.ts +0 -10
- package/operations/entry/transformations/transformEntryToIndex.js +0 -31
- package/operations/entry/transformations/transformEntryToIndex.js.map +0 -1
- package/operations/group/index.d.ts +0 -8
- package/operations/group/index.js +0 -179
- package/operations/group/index.js.map +0 -1
- package/operations/model/index.d.ts +0 -8
- package/operations/model/index.js +0 -183
- package/operations/model/index.js.map +0 -1
- package/operations/system/index.d.ts +0 -6
- package/operations/system/index.js +0 -94
- package/operations/system/index.js.map +0 -1
- package/operations/system/indexes.d.ts +0 -10
- package/operations/system/indexes.js +0 -41
- package/operations/system/indexes.js.map +0 -1
- package/plugins/CmsElasticsearchModelFieldPlugin.d.ts +0 -69
- package/plugins/CmsElasticsearchModelFieldPlugin.js +0 -52
- package/plugins/CmsElasticsearchModelFieldPlugin.js.map +0 -1
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.d.ts +0 -22
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +0 -21
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js.map +0 -1
- package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.d.ts +0 -23
- package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js +0 -27
- package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js.map +0 -1
- package/plugins/CmsEntryElasticsearchIndexPlugin.d.ts +0 -4
- package/plugins/CmsEntryElasticsearchIndexPlugin.js +0 -13
- package/plugins/CmsEntryElasticsearchIndexPlugin.js.map +0 -1
- package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.d.ts +0 -32
- package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js +0 -40
- package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js.map +0 -1
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.d.ts +0 -19
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +0 -21
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js.map +0 -1
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.d.ts +0 -19
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +0 -21
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.js.map +0 -1
- package/plugins/CmsEntryElasticsearchValuesModifier.d.ts +0 -33
- package/plugins/CmsEntryElasticsearchValuesModifier.js +0 -50
- package/plugins/CmsEntryElasticsearchValuesModifier.js.map +0 -1
- package/plugins/CmsEntryFilterPlugin.d.ts +0 -49
- package/plugins/CmsEntryFilterPlugin.js +0 -22
- package/plugins/CmsEntryFilterPlugin.js.map +0 -1
- package/plugins/index.d.ts +0 -8
- package/plugins/index.js +0 -95
- package/plugins/index.js.map +0 -1
- package/tasks/createIndexTaskPlugin.d.ts +0 -2
- package/tasks/createIndexTaskPlugin.js +0 -67
- package/tasks/createIndexTaskPlugin.js.map +0 -1
- package/values/NoValueContainer.d.ts +0 -5
- package/values/NoValueContainer.js +0 -20
- package/values/NoValueContainer.js.map +0 -1
package/definitions/model.js
CHANGED
|
@@ -1,110 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const createModelEntity = params => {
|
|
9
|
-
const {
|
|
10
|
-
table,
|
|
11
|
-
attributes,
|
|
12
|
-
entityName
|
|
13
|
-
} = params;
|
|
14
|
-
return new _toolbox.Entity({
|
|
15
|
-
name: entityName,
|
|
16
|
-
table,
|
|
17
|
-
attributes: {
|
|
18
|
-
PK: {
|
|
19
|
-
partitionKey: true
|
|
20
|
-
},
|
|
21
|
-
SK: {
|
|
22
|
-
sortKey: true
|
|
23
|
-
},
|
|
24
|
-
TYPE: {
|
|
25
|
-
type: "string",
|
|
26
|
-
required: true
|
|
27
|
-
},
|
|
28
|
-
webinyVersion: {
|
|
29
|
-
type: "string",
|
|
30
|
-
required: true
|
|
31
|
-
},
|
|
32
|
-
name: {
|
|
33
|
-
type: "string",
|
|
34
|
-
required: true
|
|
35
|
-
},
|
|
36
|
-
modelId: {
|
|
37
|
-
type: "string",
|
|
38
|
-
required: true
|
|
39
|
-
},
|
|
40
|
-
singularApiName: {
|
|
41
|
-
type: "string",
|
|
42
|
-
required: true
|
|
43
|
-
},
|
|
44
|
-
pluralApiName: {
|
|
45
|
-
type: "string",
|
|
46
|
-
required: true
|
|
47
|
-
},
|
|
48
|
-
locale: {
|
|
49
|
-
type: "string",
|
|
50
|
-
required: true
|
|
51
|
-
},
|
|
52
|
-
group: {
|
|
53
|
-
type: "map",
|
|
54
|
-
required: true
|
|
55
|
-
},
|
|
56
|
-
icon: {
|
|
57
|
-
type: "string"
|
|
58
|
-
},
|
|
59
|
-
description: {
|
|
60
|
-
type: "string"
|
|
61
|
-
},
|
|
62
|
-
createdOn: {
|
|
63
|
-
type: "string",
|
|
64
|
-
required: true
|
|
65
|
-
},
|
|
66
|
-
savedOn: {
|
|
67
|
-
type: "string",
|
|
68
|
-
required: true
|
|
69
|
-
},
|
|
70
|
-
createdBy: {
|
|
71
|
-
type: "map",
|
|
72
|
-
required: true
|
|
73
|
-
},
|
|
74
|
-
fields: {
|
|
75
|
-
type: "list",
|
|
76
|
-
required: true
|
|
77
|
-
},
|
|
78
|
-
layout: {
|
|
79
|
-
type: "list",
|
|
80
|
-
required: true
|
|
81
|
-
},
|
|
82
|
-
tags: {
|
|
83
|
-
type: "list",
|
|
84
|
-
required: false,
|
|
85
|
-
default: []
|
|
86
|
-
},
|
|
87
|
-
lockedFields: {
|
|
88
|
-
type: "list",
|
|
89
|
-
required: true
|
|
90
|
-
},
|
|
91
|
-
titleFieldId: {
|
|
92
|
-
type: "string"
|
|
93
|
-
},
|
|
94
|
-
descriptionFieldId: {
|
|
95
|
-
type: "string"
|
|
96
|
-
},
|
|
97
|
-
imageFieldId: {
|
|
98
|
-
type: "string"
|
|
99
|
-
},
|
|
100
|
-
tenant: {
|
|
101
|
-
type: "string",
|
|
102
|
-
required: true
|
|
103
|
-
},
|
|
104
|
-
...(attributes || {})
|
|
105
|
-
}
|
|
106
|
-
});
|
|
1
|
+
import { createStandardEntity } from "@webiny/db-dynamodb";
|
|
2
|
+
const createModelEntity = (params)=>{
|
|
3
|
+
const { table, entityName } = params;
|
|
4
|
+
return createStandardEntity({
|
|
5
|
+
table: table.table,
|
|
6
|
+
name: entityName
|
|
7
|
+
});
|
|
107
8
|
};
|
|
108
|
-
|
|
9
|
+
export { createModelEntity };
|
|
109
10
|
|
|
110
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"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { IEntity, IStandardEntityAttributes } from "@webiny/db-dynamodb";
|
|
2
|
+
import type { GenericRecord } from "@webiny/api/types.js";
|
|
3
|
+
import type { CmsEntryStatus, CmsGroup, CmsIdentity, ICmsEntryLive, ICmsEntryLocation, ICmsEntrySystem, StorageCmsModel } from "@webiny/api-headless-cms/types/index.js";
|
|
4
|
+
export interface IEntryEntityAttributesData {
|
|
5
|
+
tenant: string;
|
|
6
|
+
entryId: string;
|
|
7
|
+
id: string;
|
|
8
|
+
modelId: string;
|
|
9
|
+
/**
|
|
10
|
+
* Revision-level meta fields. 👇
|
|
11
|
+
*/
|
|
12
|
+
revisionCreatedOn: string;
|
|
13
|
+
revisionModifiedOn: string | null;
|
|
14
|
+
revisionSavedOn: string;
|
|
15
|
+
revisionDeletedOn: string | null;
|
|
16
|
+
revisionRestoredOn: string | null;
|
|
17
|
+
revisionFirstPublishedOn: string | null;
|
|
18
|
+
revisionLastPublishedOn: string | null;
|
|
19
|
+
revisionCreatedBy: CmsIdentity;
|
|
20
|
+
revisionModifiedBy: CmsIdentity | null;
|
|
21
|
+
revisionSavedBy: CmsIdentity;
|
|
22
|
+
revisionDeletedBy: CmsIdentity | null;
|
|
23
|
+
revisionRestoredBy: CmsIdentity | null;
|
|
24
|
+
revisionFirstPublishedBy: CmsIdentity | null;
|
|
25
|
+
revisionLastPublishedBy: CmsIdentity | null;
|
|
26
|
+
/**
|
|
27
|
+
* Entry-level meta fields. 👇
|
|
28
|
+
*/
|
|
29
|
+
createdOn: string;
|
|
30
|
+
modifiedOn: string | null;
|
|
31
|
+
savedOn: string;
|
|
32
|
+
deletedOn: string | null;
|
|
33
|
+
restoredOn: string | null;
|
|
34
|
+
firstPublishedOn: string | null;
|
|
35
|
+
lastPublishedOn: string | null;
|
|
36
|
+
createdBy: CmsIdentity;
|
|
37
|
+
modifiedBy: CmsIdentity | null;
|
|
38
|
+
savedBy: CmsIdentity;
|
|
39
|
+
deletedBy: CmsIdentity | null;
|
|
40
|
+
restoredBy: CmsIdentity | null;
|
|
41
|
+
firstPublishedBy: CmsIdentity | null;
|
|
42
|
+
lastPublishedBy: CmsIdentity | null;
|
|
43
|
+
/**
|
|
44
|
+
* The rest. 👇
|
|
45
|
+
*/
|
|
46
|
+
version: number;
|
|
47
|
+
locked: boolean;
|
|
48
|
+
status: CmsEntryStatus;
|
|
49
|
+
location?: ICmsEntryLocation;
|
|
50
|
+
wbyDeleted?: boolean | null;
|
|
51
|
+
binOriginalFolderId?: string;
|
|
52
|
+
values: GenericRecord;
|
|
53
|
+
meta?: GenericRecord;
|
|
54
|
+
system?: ICmsEntrySystem;
|
|
55
|
+
live: ICmsEntryLive | null;
|
|
56
|
+
revisionDescription: string | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* A timestamp of when the entry should be automatically deleted from the database.
|
|
59
|
+
*/
|
|
60
|
+
expiresAt: number | null;
|
|
61
|
+
}
|
|
62
|
+
export type IEntryEntityAttributes = IStandardEntityAttributes<IEntryEntityAttributesData>;
|
|
63
|
+
export type IModelEntity = IEntity<IStandardEntityAttributes<StorageCmsModel>>;
|
|
64
|
+
export type IGroupEntity = IEntity<IStandardEntityAttributes<CmsGroup>>;
|
|
65
|
+
export type IEntryEntity = IEntity<IEntryEntityAttributes>;
|
|
File without changes
|
package/feature.d.ts
ADDED
package/feature.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { DynamoDBClient, createTable } from "@webiny/db-dynamodb";
|
|
2
|
+
import { ENTITIES } from "./types.js";
|
|
3
|
+
import { createFeature } from "@webiny/feature/api/index.js";
|
|
4
|
+
import { CmsEntryOpenSearchUtilsFeature } from "@webiny/api-headless-cms-utils-os";
|
|
5
|
+
import { CmsModelOpenSearchIndexFeature } from "./features/CmsModelOpenSearchIndex/index.js";
|
|
6
|
+
import { createGroupEntity } from "./definitions/group.js";
|
|
7
|
+
import { createModelEntity } from "./definitions/model.js";
|
|
8
|
+
import { createEntryEntity } from "./definitions/entry.js";
|
|
9
|
+
import { createOpenSearchEntity, createOpenSearchTable } from "@webiny/api-opensearch";
|
|
10
|
+
import { CreateElasticsearchIndexTask } from "./tasks/CreateElasticsearchIndexTask.js";
|
|
11
|
+
import { FilterRegistriesFeature } from "@webiny/api-headless-cms-storage";
|
|
12
|
+
import { FilterUtilFeature } from "@webiny/db-dynamodb/feature/FilterUtil/feature.js";
|
|
13
|
+
import { DbRegistry } from "@webiny/db/exports/api/db.js";
|
|
14
|
+
import { CmsDdbEsTable } from "./abstractions/CmsDdbEsTable.js";
|
|
15
|
+
import { CmsDdbEsOsTable } from "./abstractions/CmsDdbEsOsTable.js";
|
|
16
|
+
import { CmsDdbEsGroupEntity } from "./abstractions/CmsDdbEsGroupEntity.js";
|
|
17
|
+
import { CmsDdbEsModelEntity } from "./abstractions/CmsDdbEsModelEntity.js";
|
|
18
|
+
import { CmsDdbEsEntryEntity } from "./abstractions/CmsDdbEsEntryEntity.js";
|
|
19
|
+
import { CmsDdbEsEntriesEsEntity } from "./abstractions/CmsDdbEsEntriesEsEntity.js";
|
|
20
|
+
import { DdbEsGroupStorageOpsFeature } from "./operations/group/feature.js";
|
|
21
|
+
import { DdbEsModelStorageOpsFeature } from "./operations/model/feature.js";
|
|
22
|
+
import { DdbEsEntryStorageOpsFeature } from "./operations/entry/feature.js";
|
|
23
|
+
const HeadlessCmsDdbEsFeature = createFeature({
|
|
24
|
+
name: "cms.storageOperations.openSearch",
|
|
25
|
+
register: (container)=>{
|
|
26
|
+
CmsEntryOpenSearchUtilsFeature.register(container);
|
|
27
|
+
CmsModelOpenSearchIndexFeature.register(container);
|
|
28
|
+
FilterRegistriesFeature.register(container);
|
|
29
|
+
FilterUtilFeature.register(container);
|
|
30
|
+
container.register(CreateElasticsearchIndexTask);
|
|
31
|
+
const db = container.resolve(DynamoDBClient);
|
|
32
|
+
const documentClient = db.client;
|
|
33
|
+
const tableInstance = createTable({
|
|
34
|
+
name: process.env.DB_TABLE,
|
|
35
|
+
documentClient
|
|
36
|
+
});
|
|
37
|
+
const tableElasticsearchInstance = createOpenSearchTable({
|
|
38
|
+
name: process.env.DB_TABLE_OPENSEARCH,
|
|
39
|
+
documentClient
|
|
40
|
+
});
|
|
41
|
+
const groupEntity = createGroupEntity({
|
|
42
|
+
entityName: ENTITIES.GROUPS,
|
|
43
|
+
table: tableInstance
|
|
44
|
+
});
|
|
45
|
+
const modelEntity = createModelEntity({
|
|
46
|
+
entityName: ENTITIES.MODELS,
|
|
47
|
+
table: tableInstance
|
|
48
|
+
});
|
|
49
|
+
const entryEntity = createEntryEntity({
|
|
50
|
+
entityName: ENTITIES.ENTRIES,
|
|
51
|
+
table: tableInstance
|
|
52
|
+
});
|
|
53
|
+
const entriesEsEntity = createOpenSearchEntity({
|
|
54
|
+
entityName: ENTITIES.ENTRIES_ES,
|
|
55
|
+
table: tableElasticsearchInstance
|
|
56
|
+
});
|
|
57
|
+
container.registerInstance(CmsDdbEsTable, tableInstance);
|
|
58
|
+
container.registerInstance(CmsDdbEsOsTable, tableElasticsearchInstance);
|
|
59
|
+
container.registerInstance(CmsDdbEsGroupEntity, groupEntity);
|
|
60
|
+
container.registerInstance(CmsDdbEsModelEntity, modelEntity);
|
|
61
|
+
container.registerInstance(CmsDdbEsEntryEntity, entryEntity);
|
|
62
|
+
container.registerInstance(CmsDdbEsEntriesEsEntity, entriesEsEntity);
|
|
63
|
+
try {
|
|
64
|
+
const dbRegistry = container.resolve(DbRegistry);
|
|
65
|
+
dbRegistry.register({
|
|
66
|
+
item: entryEntity,
|
|
67
|
+
app: "cms",
|
|
68
|
+
tags: [
|
|
69
|
+
"regular",
|
|
70
|
+
entryEntity.name
|
|
71
|
+
]
|
|
72
|
+
});
|
|
73
|
+
dbRegistry.register({
|
|
74
|
+
item: entriesEsEntity,
|
|
75
|
+
app: "cms",
|
|
76
|
+
tags: [
|
|
77
|
+
"es",
|
|
78
|
+
entriesEsEntity.name
|
|
79
|
+
]
|
|
80
|
+
});
|
|
81
|
+
} catch {}
|
|
82
|
+
DdbEsGroupStorageOpsFeature.register(container);
|
|
83
|
+
DdbEsModelStorageOpsFeature.register(container);
|
|
84
|
+
DdbEsEntryStorageOpsFeature.register(container);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
export { HeadlessCmsDdbEsFeature };
|
|
88
|
+
|
|
89
|
+
//# sourceMappingURL=feature.js.map
|
package/feature.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
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 { CmsEntryOpenSearchUtilsFeature } from \"@webiny/api-headless-cms-utils-os\";\nimport { CmsModelOpenSearchIndexFeature } from \"~/features/CmsModelOpenSearchIndex/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\";\nimport { CreateElasticsearchIndexTask } from \"~/tasks/CreateElasticsearchIndexTask.js\";\nimport { FilterRegistriesFeature } from \"@webiny/api-headless-cms-storage\";\nimport { FilterUtilFeature } from \"@webiny/db-dynamodb/feature/FilterUtil/feature.js\";\nimport { DbRegistry } from \"@webiny/db/exports/api/db.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\";\nimport { DdbEsGroupStorageOpsFeature } from \"~/operations/group/feature.js\";\nimport { DdbEsModelStorageOpsFeature } from \"~/operations/model/feature.js\";\nimport { DdbEsEntryStorageOpsFeature } from \"~/operations/entry/feature.js\";\n\nexport const HeadlessCmsDdbEsFeature = createFeature({\n name: \"cms.storageOperations.openSearch\",\n register: container => {\n CmsEntryOpenSearchUtilsFeature.register(container);\n CmsModelOpenSearchIndexFeature.register(container);\n FilterRegistriesFeature.register(container);\n FilterUtilFeature.register(container);\n\n container.register(CreateElasticsearchIndexTask);\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 // Register entities in DbRegistry (optional — may not be available in all contexts)\n try {\n const dbRegistry = container.resolve(DbRegistry);\n dbRegistry.register({\n item: entryEntity,\n app: \"cms\",\n tags: [\"regular\", entryEntity.name]\n });\n dbRegistry.register({\n item: entriesEsEntity,\n app: \"cms\",\n tags: [\"es\", entriesEsEntity.name]\n });\n } catch {\n // DbRegistry not registered — skip entity registration\n }\n\n DdbEsGroupStorageOpsFeature.register(container);\n DdbEsModelStorageOpsFeature.register(container);\n DdbEsEntryStorageOpsFeature.register(container);\n }\n});\n"],"names":["HeadlessCmsDdbEsFeature","createFeature","container","CmsEntryOpenSearchUtilsFeature","CmsModelOpenSearchIndexFeature","FilterRegistriesFeature","FilterUtilFeature","CreateElasticsearchIndexTask","db","DynamoDBClient","documentClient","tableInstance","createTable","process","tableElasticsearchInstance","createOpenSearchTable","groupEntity","createGroupEntity","ENTITIES","modelEntity","createModelEntity","entryEntity","createEntryEntity","entriesEsEntity","createOpenSearchEntity","CmsDdbEsTable","CmsDdbEsOsTable","CmsDdbEsGroupEntity","CmsDdbEsModelEntity","CmsDdbEsEntryEntity","CmsDdbEsEntriesEsEntity","dbRegistry","DbRegistry","DdbEsGroupStorageOpsFeature","DdbEsModelStorageOpsFeature","DdbEsEntryStorageOpsFeature"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuBO,MAAMA,0BAA0BC,cAAc;IACjD,MAAM;IACN,UAAUC,CAAAA;QACNC,+BAA+B,QAAQ,CAACD;QACxCE,+BAA+B,QAAQ,CAACF;QACxCG,wBAAwB,QAAQ,CAACH;QACjCI,kBAAkB,QAAQ,CAACJ;QAE3BA,UAAU,QAAQ,CAACK;QAEnB,MAAMC,KAAKN,UAAU,OAAO,CAACO;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;QAGAZ,UAAU,gBAAgB,CAACuB,eAAed;QAC1CT,UAAU,gBAAgB,CAACwB,iBAAiBZ;QAC5CZ,UAAU,gBAAgB,CAACyB,qBAAqBX;QAChDd,UAAU,gBAAgB,CAAC0B,qBAAqBT;QAChDjB,UAAU,gBAAgB,CAAC2B,qBAAqBR;QAChDnB,UAAU,gBAAgB,CAAC4B,yBAAyBP;QAGpD,IAAI;YACA,MAAMQ,aAAa7B,UAAU,OAAO,CAAC8B;YACrCD,WAAW,QAAQ,CAAC;gBAChB,MAAMV;gBACN,KAAK;gBACL,MAAM;oBAAC;oBAAWA,YAAY,IAAI;iBAAC;YACvC;YACAU,WAAW,QAAQ,CAAC;gBAChB,MAAMR;gBACN,KAAK;gBACL,MAAM;oBAAC;oBAAMA,gBAAgB,IAAI;iBAAC;YACtC;QACJ,EAAE,OAAM,CAER;QAEAU,4BAA4B,QAAQ,CAAC/B;QACrCgC,4BAA4B,QAAQ,CAAChC;QACrCiC,4BAA4B,QAAQ,CAACjC;IACzC;AACJ"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { CmsModelOpenSearchIndexProvider, type ICmsModelOpenSearchIndexProvider, type ICmsModelOpenSearchIndexProviderResult } from "@webiny/api-headless-cms-utils-os/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.js";
|
|
2
|
+
import { CmsModelOpenSearchIndexProvider } from "@webiny/api-headless-cms-utils-os/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.js";
|
|
3
|
+
import type { ICmsModelOpenSearchIndexProviderResult } from "@webiny/api-headless-cms-utils-os/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.js";
|
|
4
|
+
import { CmsModelOpenSearchIndex } from "./abstractions.js";
|
|
5
|
+
declare class CmsModelOpenSearchIndexProviderImpl implements CmsModelOpenSearchIndexProvider.Interface {
|
|
6
|
+
private readonly indexConfig;
|
|
7
|
+
private readonly cache;
|
|
8
|
+
constructor(indexConfig: CmsModelOpenSearchIndex.Interface);
|
|
9
|
+
execute(params: CmsModelOpenSearchIndex.Params): Promise<ICmsModelOpenSearchIndexProviderResult>;
|
|
10
|
+
}
|
|
11
|
+
export declare const DefaultCmsModelOpenSearchIndexProvider: typeof CmsModelOpenSearchIndexProviderImpl & {
|
|
12
|
+
__abstraction: import("@webiny/di").Abstraction<import("@webiny/api-headless-cms-utils-os/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.js").ICmsModelOpenSearchIndexProvider>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { CmsModelOpenSearchIndexProvider } from "@webiny/api-headless-cms-utils-os/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.js";
|
|
2
|
+
import { CmsModelOpenSearchIndex } from "./abstractions.js";
|
|
3
|
+
class CmsModelOpenSearchIndexProviderImpl {
|
|
4
|
+
constructor(indexConfig){
|
|
5
|
+
this.indexConfig = indexConfig;
|
|
6
|
+
this.cache = new Map();
|
|
7
|
+
}
|
|
8
|
+
async execute(params) {
|
|
9
|
+
const key = `${params.model.tenant}:${params.model.modelId}`;
|
|
10
|
+
const cached = this.cache.get(key);
|
|
11
|
+
if (cached) return cached;
|
|
12
|
+
const { shared, settings } = await this.indexConfig.execute(params);
|
|
13
|
+
const index = [
|
|
14
|
+
shared ? "root" : params.model.tenant,
|
|
15
|
+
"headless-cms",
|
|
16
|
+
params.model.modelId
|
|
17
|
+
].join("-").toLowerCase();
|
|
18
|
+
const result = {
|
|
19
|
+
index,
|
|
20
|
+
settings,
|
|
21
|
+
shared
|
|
22
|
+
};
|
|
23
|
+
this.cache.set(key, result);
|
|
24
|
+
return result;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const DefaultCmsModelOpenSearchIndexProvider = CmsModelOpenSearchIndexProvider.createImplementation({
|
|
28
|
+
implementation: CmsModelOpenSearchIndexProviderImpl,
|
|
29
|
+
dependencies: [
|
|
30
|
+
CmsModelOpenSearchIndex
|
|
31
|
+
]
|
|
32
|
+
});
|
|
33
|
+
export { CmsModelOpenSearchIndexProvider, DefaultCmsModelOpenSearchIndexProvider };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=CmsModelOpenSearchIndexProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.js","sources":["../../../src/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.ts"],"sourcesContent":["export {\n CmsModelOpenSearchIndexProvider,\n type ICmsModelOpenSearchIndexProvider,\n type ICmsModelOpenSearchIndexProviderResult\n} from \"@webiny/api-headless-cms-utils-os/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.js\";\nimport { CmsModelOpenSearchIndexProvider } from \"@webiny/api-headless-cms-utils-os/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.js\";\nimport type { ICmsModelOpenSearchIndexProviderResult } from \"@webiny/api-headless-cms-utils-os/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.js\";\nimport { CmsModelOpenSearchIndex } from \"./abstractions.js\";\n\nclass CmsModelOpenSearchIndexProviderImpl implements CmsModelOpenSearchIndexProvider.Interface {\n private readonly cache = new Map<string, ICmsModelOpenSearchIndexProviderResult>();\n\n public constructor(private readonly indexConfig: CmsModelOpenSearchIndex.Interface) {}\n\n public async execute(\n params: CmsModelOpenSearchIndex.Params\n ): Promise<ICmsModelOpenSearchIndexProviderResult> {\n const key = `${params.model.tenant}:${params.model.modelId}`;\n const cached = this.cache.get(key);\n if (cached) {\n return cached;\n }\n\n const { shared, settings } = await this.indexConfig.execute(params);\n\n const index = [shared ? \"root\" : params.model.tenant, \"headless-cms\", params.model.modelId]\n .join(\"-\")\n .toLowerCase();\n\n const result: ICmsModelOpenSearchIndexProviderResult = { index, settings, shared };\n this.cache.set(key, result);\n return result;\n }\n}\n\nexport const DefaultCmsModelOpenSearchIndexProvider =\n CmsModelOpenSearchIndexProvider.createImplementation({\n implementation: CmsModelOpenSearchIndexProviderImpl,\n dependencies: [CmsModelOpenSearchIndex]\n });\n"],"names":["CmsModelOpenSearchIndexProviderImpl","indexConfig","Map","params","key","cached","shared","settings","index","result","DefaultCmsModelOpenSearchIndexProvider","CmsModelOpenSearchIndexProvider","CmsModelOpenSearchIndex"],"mappings":";;AASA,MAAMA;IAGF,YAAoCC,WAA8C,CAAE;aAAhDA,WAAW,GAAXA;aAFnB,KAAK,GAAG,IAAIC;IAEwD;IAErF,MAAa,QACTC,MAAsC,EACS;QAC/C,MAAMC,MAAM,GAAGD,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,EAAEA,OAAO,KAAK,CAAC,OAAO,EAAE;QAC5D,MAAME,SAAS,IAAI,CAAC,KAAK,CAAC,GAAG,CAACD;QAC9B,IAAIC,QACA,OAAOA;QAGX,MAAM,EAAEC,MAAM,EAAEC,QAAQ,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAACJ;QAE5D,MAAMK,QAAQ;YAACF,SAAS,SAASH,OAAO,KAAK,CAAC,MAAM;YAAE;YAAgBA,OAAO,KAAK,CAAC,OAAO;SAAC,CACtF,IAAI,CAAC,KACL,WAAW;QAEhB,MAAMM,SAAiD;YAAED;YAAOD;YAAUD;QAAO;QACjF,IAAI,CAAC,KAAK,CAAC,GAAG,CAACF,KAAKK;QACpB,OAAOA;IACX;AACJ;AAEO,MAAMC,yCACTC,gCAAgC,oBAAoB,CAAC;IACjD,gBAAgBX;IAChB,cAAc;QAACY;KAAwB;AAC3C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CmsModelOpenSearchIndex } from "./abstractions.js";
|
|
2
|
+
declare class DefaultCmsModelOpenSearchIndexImpl implements CmsModelOpenSearchIndex.Interface {
|
|
3
|
+
execute(): Promise<CmsModelOpenSearchIndex.Result>;
|
|
4
|
+
}
|
|
5
|
+
export declare const DefaultCmsModelOpenSearchIndex: typeof DefaultCmsModelOpenSearchIndexImpl & {
|
|
6
|
+
__abstraction: import("@webiny/di").Abstraction<import("@webiny/api-headless-cms-utils-os/features/CmsModelOpenSearchIndex/abstractions.js").ICmsModelOpenSearchIndex>;
|
|
7
|
+
};
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { getBaseConfiguration, isSharedOpenSearchIndex } from "@webiny/api-opensearch";
|
|
2
|
+
import { CmsModelOpenSearchIndex } from "./abstractions.js";
|
|
3
|
+
class DefaultCmsModelOpenSearchIndexImpl {
|
|
4
|
+
async execute() {
|
|
5
|
+
return {
|
|
6
|
+
settings: getBaseConfiguration(),
|
|
7
|
+
shared: isSharedOpenSearchIndex()
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
const DefaultCmsModelOpenSearchIndex = CmsModelOpenSearchIndex.createImplementation({
|
|
12
|
+
implementation: DefaultCmsModelOpenSearchIndexImpl,
|
|
13
|
+
dependencies: []
|
|
14
|
+
});
|
|
15
|
+
export { DefaultCmsModelOpenSearchIndex };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=DefaultCmsModelOpenSearchIndex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/CmsModelOpenSearchIndex/DefaultCmsModelOpenSearchIndex.js","sources":["../../../src/features/CmsModelOpenSearchIndex/DefaultCmsModelOpenSearchIndex.ts"],"sourcesContent":["import { getBaseConfiguration, isSharedOpenSearchIndex } from \"@webiny/api-opensearch\";\nimport { CmsModelOpenSearchIndex } from \"./abstractions.js\";\n\nclass DefaultCmsModelOpenSearchIndexImpl implements CmsModelOpenSearchIndex.Interface {\n public async execute(): Promise<CmsModelOpenSearchIndex.Result> {\n return {\n settings: getBaseConfiguration(),\n shared: isSharedOpenSearchIndex()\n };\n }\n}\n\nexport const DefaultCmsModelOpenSearchIndex = CmsModelOpenSearchIndex.createImplementation({\n implementation: DefaultCmsModelOpenSearchIndexImpl,\n dependencies: []\n});\n"],"names":["DefaultCmsModelOpenSearchIndexImpl","getBaseConfiguration","isSharedOpenSearchIndex","DefaultCmsModelOpenSearchIndex","CmsModelOpenSearchIndex"],"mappings":";;AAGA,MAAMA;IACF,MAAa,UAAmD;QAC5D,OAAO;YACH,UAAUC;YACV,QAAQC;QACZ;IACJ;AACJ;AAEO,MAAMC,iCAAiCC,wBAAwB,oBAAoB,CAAC;IACvF,gBAAgBJ;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CmsModelOpenSearchIndex, type ICmsModelOpenSearchIndex, type ICmsModelOpenSearchIndexParams, type ICmsModelOpenSearchIndexResult, type StorageCmsModel } from "@webiny/api-headless-cms-utils-os/features/CmsModelOpenSearchIndex/abstractions.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CmsModelOpenSearchIndex } from "@webiny/api-headless-cms-utils-os/features/CmsModelOpenSearchIndex/abstractions.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createFeature } from "@webiny/feature/api/index.js";
|
|
2
|
+
import { DefaultCmsModelOpenSearchIndex } from "./DefaultCmsModelOpenSearchIndex.js";
|
|
3
|
+
import { DefaultCmsModelOpenSearchIndexProvider } from "./CmsModelOpenSearchIndexProvider.js";
|
|
4
|
+
const CmsModelOpenSearchIndexFeature = createFeature({
|
|
5
|
+
name: "Cms/Model/OpenSearch/IndexFeature",
|
|
6
|
+
register: (container)=>{
|
|
7
|
+
container.register(DefaultCmsModelOpenSearchIndex);
|
|
8
|
+
container.register(DefaultCmsModelOpenSearchIndexProvider).inSingletonScope();
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
export { CmsModelOpenSearchIndexFeature };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/CmsModelOpenSearchIndex/feature.js","sources":["../../../src/features/CmsModelOpenSearchIndex/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api/index.js\";\nimport { DefaultCmsModelOpenSearchIndex } from \"./DefaultCmsModelOpenSearchIndex.js\";\nimport { DefaultCmsModelOpenSearchIndexProvider } from \"./CmsModelOpenSearchIndexProvider.js\";\n\nexport const CmsModelOpenSearchIndexFeature = createFeature({\n name: \"Cms/Model/OpenSearch/IndexFeature\",\n register: container => {\n container.register(DefaultCmsModelOpenSearchIndex);\n container.register(DefaultCmsModelOpenSearchIndexProvider).inSingletonScope();\n }\n});\n"],"names":["CmsModelOpenSearchIndexFeature","createFeature","container","DefaultCmsModelOpenSearchIndex","DefaultCmsModelOpenSearchIndexProvider"],"mappings":";;;AAIO,MAAMA,iCAAiCC,cAAc;IACxD,MAAM;IACN,UAAUC,CAAAA;QACNA,UAAU,QAAQ,CAACC;QACnBD,UAAU,QAAQ,CAACE,wCAAwC,gBAAgB;IAC/E;AACJ"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { CmsModelOpenSearchIndexFeature } from "./feature.js";
|
|
2
|
+
export { CmsModelOpenSearchIndex } from "./abstractions.js";
|
|
3
|
+
export { CmsModelOpenSearchIndexProvider, DefaultCmsModelOpenSearchIndexProvider, type ICmsModelOpenSearchIndexProviderResult } from "./CmsModelOpenSearchIndexProvider.js";
|
package/index.d.ts
CHANGED