@webiny/api-headless-cms-ddb-es 0.0.0-unstable.496cf268ac → 0.0.0-unstable.5387e5f7c8
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/definitions/entry.d.ts +4 -5
- package/definitions/entry.js +10 -87
- package/definitions/entry.js.map +1 -1
- package/definitions/group.d.ts +6 -6
- package/definitions/group.js +10 -64
- package/definitions/group.js.map +1 -1
- package/definitions/model.d.ts +6 -6
- package/definitions/model.js +10 -108
- package/definitions/model.js.map +1 -1
- package/definitions/types.d.ts +65 -0
- package/definitions/types.js +0 -0
- package/feature.d.ts +10 -0
- package/feature.js +69 -0
- package/feature.js.map +1 -0
- package/index.d.ts +1 -3
- package/index.js +1 -214
- 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.d.ts +16 -0
- package/operations/entry/dataLoader/DataLoaderCache.js +27 -0
- package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -0
- package/operations/entry/dataLoader/constants.d.ts +1 -0
- package/operations/entry/dataLoader/constants.js +5 -0
- package/operations/entry/dataLoader/constants.js.map +1 -0
- package/operations/entry/dataLoader/createBatchScheduleFn.d.ts +8 -0
- package/operations/entry/dataLoader/createBatchScheduleFn.js +10 -0
- package/operations/entry/dataLoader/createBatchScheduleFn.js.map +1 -0
- package/operations/entry/dataLoader/getAllEntryRevisions.d.ts +4 -0
- package/operations/entry/dataLoader/getAllEntryRevisions.js +24 -0
- package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -0
- package/operations/entry/dataLoader/getLatestRevisionByEntryId.d.ts +4 -0
- package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +34 -0
- package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -0
- package/operations/entry/dataLoader/getPublishedRevisionByEntryId.d.ts +4 -0
- package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +34 -0
- package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -0
- package/operations/entry/dataLoader/getRevisionById.d.ts +4 -0
- package/operations/entry/dataLoader/getRevisionById.js +40 -0
- package/operations/entry/dataLoader/getRevisionById.js.map +1 -0
- package/operations/entry/dataLoader/index.d.ts +8 -0
- package/operations/entry/dataLoader/index.js +18 -0
- package/operations/entry/dataLoader/index.js.map +1 -0
- package/operations/entry/dataLoader/types.d.ts +6 -0
- package/operations/entry/dataLoader/types.js +0 -0
- package/operations/entry/dataLoaders.d.ts +18 -39
- package/operations/entry/dataLoaders.js +91 -306
- 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 +46 -27
- package/operations/entry/keys.js.map +1 -1
- package/operations/entry/recordType.js +5 -17
- 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 +8 -0
- package/operations/entry/transformations/convertEntryKeys.js +25 -0
- package/operations/entry/transformations/convertEntryKeys.js.map +1 -0
- package/operations/entry/transformations/index.d.ts +32 -0
- package/operations/entry/transformations/index.js +91 -0
- package/operations/entry/transformations/index.js.map +1 -0
- package/operations/entry/transformations/modifyEntryValues.d.ts +53 -0
- package/operations/entry/transformations/modifyEntryValues.js +16 -0
- package/operations/entry/transformations/modifyEntryValues.js.map +1 -0
- package/operations/entry/transformations/transformEntryKeys.d.ts +11 -0
- package/operations/entry/transformations/transformEntryKeys.js +17 -0
- package/operations/entry/transformations/transformEntryKeys.js.map +1 -0
- 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 +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/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 +48 -41
- package/registry/CmsEntitiesDbRegistryDecorator.d.ts +27 -0
- package/registry/CmsEntitiesDbRegistryDecorator.js +46 -0
- package/registry/CmsEntitiesDbRegistryDecorator.js.map +1 -0
- package/tasks/CreateElasticsearchIndexTask.d.ts +13 -0
- package/tasks/CreateElasticsearchIndexTask.js +40 -0
- package/tasks/CreateElasticsearchIndexTask.js.map +1 -0
- package/types.d.ts +13 -155
- package/types.js +9 -41
- package/types.js.map +1 -1
- package/configurations.d.ts +0 -12
- package/configurations.js +0 -35
- package/configurations.js.map +0 -1
- package/definitions/entryElasticsearch.d.ts +0 -8
- package/definitions/entryElasticsearch.js +0 -37
- package/definitions/entryElasticsearch.js.map +0 -1
- package/definitions/settings.d.ts +0 -8
- package/definitions/settings.js +0 -53
- package/definitions/settings.js.map +0 -1
- package/definitions/system.d.ts +0 -8
- package/definitions/system.js +0 -41
- package/definitions/system.js.map +0 -1
- package/definitions/table.d.ts +0 -8
- package/definitions/table.js +0 -21
- package/definitions/table.js.map +0 -1
- package/definitions/tableElasticsearch.d.ts +0 -8
- package/definitions/tableElasticsearch.js +0 -21
- package/definitions/tableElasticsearch.js.map +0 -1
- package/dynamoDb/index.d.ts +0 -2
- package/dynamoDb/index.js +0 -11
- package/dynamoDb/index.js.map +0 -1
- package/dynamoDb/storage/date.d.ts +0 -3
- package/dynamoDb/storage/date.js +0 -86
- package/dynamoDb/storage/date.js.map +0 -1
- package/dynamoDb/storage/longText.d.ts +0 -10
- package/dynamoDb/storage/longText.js +0 -93
- package/dynamoDb/storage/longText.js.map +0 -1
- package/dynamoDb/storage/richText.d.ts +0 -7
- package/dynamoDb/storage/richText.js +0 -110
- package/dynamoDb/storage/richText.js.map +0 -1
- package/elasticsearch/createElasticsearchIndex.d.ts +0 -9
- package/elasticsearch/createElasticsearchIndex.js +0 -49
- package/elasticsearch/createElasticsearchIndex.js.map +0 -1
- package/elasticsearch/deleteElasticsearchIndex.d.ts +0 -8
- package/elasticsearch/deleteElasticsearchIndex.js +0 -36
- package/elasticsearch/deleteElasticsearchIndex.js.map +0 -1
- package/elasticsearch/index.d.ts +0 -2
- package/elasticsearch/index.js +0 -11
- package/elasticsearch/index.js.map +0 -1
- package/elasticsearch/indexing/dateTimeIndexing.d.ts +0 -3
- package/elasticsearch/indexing/dateTimeIndexing.js +0 -86
- package/elasticsearch/indexing/dateTimeIndexing.js.map +0 -1
- package/elasticsearch/indexing/defaultFieldIndexing.d.ts +0 -3
- package/elasticsearch/indexing/defaultFieldIndexing.js +0 -52
- package/elasticsearch/indexing/defaultFieldIndexing.js.map +0 -1
- package/elasticsearch/indexing/index.d.ts +0 -2
- package/elasticsearch/indexing/index.js +0 -15
- package/elasticsearch/indexing/index.js.map +0 -1
- package/elasticsearch/indexing/longTextIndexing.d.ts +0 -7
- package/elasticsearch/indexing/longTextIndexing.js +0 -46
- package/elasticsearch/indexing/longTextIndexing.js.map +0 -1
- package/elasticsearch/indexing/numberIndexing.d.ts +0 -3
- package/elasticsearch/indexing/numberIndexing.js +0 -39
- package/elasticsearch/indexing/numberIndexing.js.map +0 -1
- package/elasticsearch/indexing/objectIndexing.d.ts +0 -12
- package/elasticsearch/indexing/objectIndexing.js +0 -196
- package/elasticsearch/indexing/objectIndexing.js.map +0 -1
- package/elasticsearch/indexing/richTextIndexing.d.ts +0 -3
- package/elasticsearch/indexing/richTextIndexing.js +0 -29
- package/elasticsearch/indexing/richTextIndexing.js.map +0 -1
- package/elasticsearch/indices/base.d.ts +0 -2
- package/elasticsearch/indices/base.js +0 -12
- package/elasticsearch/indices/base.js.map +0 -1
- package/elasticsearch/indices/index.d.ts +0 -1
- package/elasticsearch/indices/index.js +0 -12
- package/elasticsearch/indices/index.js.map +0 -1
- package/elasticsearch/indices/japanese.d.ts +0 -2
- package/elasticsearch/indices/japanese.js +0 -13
- package/elasticsearch/indices/japanese.js.map +0 -1
- package/elasticsearch/search/index.d.ts +0 -3
- package/elasticsearch/search/index.js +0 -10
- package/elasticsearch/search/index.js.map +0 -1
- package/elasticsearch/search/refSearch.d.ts +0 -2
- package/elasticsearch/search/refSearch.js +0 -29
- package/elasticsearch/search/refSearch.js.map +0 -1
- package/elasticsearch/search/timeSearch.d.ts +0 -2
- package/elasticsearch/search/timeSearch.js +0 -26
- package/elasticsearch/search/timeSearch.js.map +0 -1
- package/helpers/entryIndexHelpers.d.ts +0 -18
- package/helpers/entryIndexHelpers.js +0 -175
- package/helpers/entryIndexHelpers.js.map +0 -1
- package/helpers/index.d.ts +0 -1
- package/helpers/index.js +0 -16
- package/helpers/index.js.map +0 -1
- package/index.js.map +0 -1
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.d.ts +0 -18
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js +0 -32
- 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 -140
- package/operations/entry/elasticsearch/body.js.map +0 -1
- package/operations/entry/elasticsearch/fields.d.ts +0 -9
- package/operations/entry/elasticsearch/fields.js +0 -229
- 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 -57
- 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 -172
- 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 -16
- package/operations/entry/elasticsearch/filtering/index.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/path.d.ts +0 -15
- package/operations/entry/elasticsearch/filtering/path.js +0 -44
- 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 -28
- 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 -13
- 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 -65
- 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 -48
- 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 -23
- 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 -22
- 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 -89
- 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 -25
- 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 -103
- 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 -34
- package/operations/entry/elasticsearch/keyword.js.map +0 -1
- package/operations/entry/elasticsearch/plugins/bodyModifier.d.ts +0 -9
- package/operations/entry/elasticsearch/plugins/bodyModifier.js +0 -16
- 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 -37
- 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 -16
- 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 -24
- 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 -16
- package/operations/entry/elasticsearch/plugins/sortModifier.js.map +0 -1
- package/operations/entry/elasticsearch/sort.d.ts +0 -12
- package/operations/entry/elasticsearch/sort.js +0 -82
- 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 -30
- 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 -5
- package/operations/entry/elasticsearch/types.js.map +0 -1
- package/operations/entry/index.d.ts +0 -11
- package/operations/entry/index.js +0 -1128
- package/operations/entry/index.js.map +0 -1
- package/operations/group/index.d.ts +0 -8
- package/operations/group/index.js +0 -165
- package/operations/group/index.js.map +0 -1
- package/operations/model/index.d.ts +0 -8
- package/operations/model/index.js +0 -171
- package/operations/model/index.js.map +0 -1
- package/operations/settings/index.d.ts +0 -6
- package/operations/settings/index.js +0 -111
- package/operations/settings/index.js.map +0 -1
- package/operations/system/index.d.ts +0 -6
- package/operations/system/index.js +0 -82
- package/operations/system/index.js.map +0 -1
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.d.ts +0 -21
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +0 -22
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js.map +0 -1
- package/plugins/CmsEntryElasticsearchFieldPlugin.d.ts +0 -12
- package/plugins/CmsEntryElasticsearchFieldPlugin.js +0 -18
- package/plugins/CmsEntryElasticsearchFieldPlugin.js.map +0 -1
- package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.d.ts +0 -23
- package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js +0 -28
- package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js.map +0 -1
- package/plugins/CmsEntryElasticsearchIndexPlugin.d.ts +0 -4
- package/plugins/CmsEntryElasticsearchIndexPlugin.js +0 -12
- package/plugins/CmsEntryElasticsearchIndexPlugin.js.map +0 -1
- package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.d.ts +0 -31
- package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js +0 -37
- package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js.map +0 -1
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.d.ts +0 -18
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +0 -22
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js.map +0 -1
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.d.ts +0 -18
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +0 -22
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.js.map +0 -1
- package/plugins/CmsEntryFilterPlugin.d.ts +0 -49
- package/plugins/CmsEntryFilterPlugin.js +0 -24
- package/plugins/CmsEntryFilterPlugin.js.map +0 -1
- package/plugins/index.d.ts +0 -7
- package/plugins/index.js +0 -82
- package/plugins/index.js.map +0 -1
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.createSettingsStorageOperations = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
-
var _get = require("@webiny/db-dynamodb/utils/get");
|
|
10
|
-
var _error = _interopRequireDefault(require("@webiny/error"));
|
|
11
|
-
var _cleanup = require("@webiny/db-dynamodb/utils/cleanup");
|
|
12
|
-
const convertToDbData = settings => {
|
|
13
|
-
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, settings), {}, {
|
|
14
|
-
contentModelLastChange: settings.contentModelLastChange.toISOString()
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
const convertFromDbData = settings => {
|
|
18
|
-
if (!settings) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
let contentModelLastChange;
|
|
22
|
-
try {
|
|
23
|
-
contentModelLastChange = new Date(settings.contentModelLastChange);
|
|
24
|
-
} catch {
|
|
25
|
-
contentModelLastChange = new Date();
|
|
26
|
-
}
|
|
27
|
-
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, settings), {}, {
|
|
28
|
-
contentModelLastChange
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
const createPartitionKey = ({
|
|
32
|
-
tenant,
|
|
33
|
-
locale
|
|
34
|
-
}) => {
|
|
35
|
-
return `T#${tenant}#L#${locale}#CMS#SETTINGS`;
|
|
36
|
-
};
|
|
37
|
-
const createSortKey = () => {
|
|
38
|
-
return "settings";
|
|
39
|
-
};
|
|
40
|
-
const createKeys = params => {
|
|
41
|
-
return {
|
|
42
|
-
PK: createPartitionKey(params),
|
|
43
|
-
SK: createSortKey()
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
const createSettingsStorageOperations = params => {
|
|
47
|
-
const {
|
|
48
|
-
entity
|
|
49
|
-
} = params;
|
|
50
|
-
const create = async params => {
|
|
51
|
-
const {
|
|
52
|
-
settings
|
|
53
|
-
} = params;
|
|
54
|
-
const keys = createKeys(settings);
|
|
55
|
-
const dbSettings = convertToDbData(settings);
|
|
56
|
-
try {
|
|
57
|
-
await entity.put((0, _objectSpread2.default)((0, _objectSpread2.default)({}, dbSettings), keys));
|
|
58
|
-
return settings;
|
|
59
|
-
} catch (ex) {
|
|
60
|
-
throw new _error.default(ex.message || "Could not create settings.", ex.code || "CREATE_SETTINGS_ERROR", {
|
|
61
|
-
error: ex,
|
|
62
|
-
settings,
|
|
63
|
-
dbSettings,
|
|
64
|
-
keys
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
const update = async params => {
|
|
69
|
-
const {
|
|
70
|
-
settings
|
|
71
|
-
} = params;
|
|
72
|
-
const keys = createKeys(settings);
|
|
73
|
-
const dbSettings = convertToDbData(settings);
|
|
74
|
-
try {
|
|
75
|
-
await entity.put((0, _objectSpread2.default)((0, _objectSpread2.default)({}, dbSettings), keys));
|
|
76
|
-
return settings;
|
|
77
|
-
} catch (ex) {
|
|
78
|
-
throw new _error.default(ex.message || "Could not update settings.", ex.code || "UPDATE_SETTINGS_ERROR", {
|
|
79
|
-
error: ex,
|
|
80
|
-
settings,
|
|
81
|
-
dbSettings,
|
|
82
|
-
keys
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
const get = async params => {
|
|
87
|
-
const keys = createKeys(params);
|
|
88
|
-
try {
|
|
89
|
-
const record = await (0, _get.get)({
|
|
90
|
-
entity,
|
|
91
|
-
keys
|
|
92
|
-
});
|
|
93
|
-
if (!record) {
|
|
94
|
-
return null;
|
|
95
|
-
}
|
|
96
|
-
const settings = (0, _cleanup.cleanupItem)(entity, record);
|
|
97
|
-
return convertFromDbData(settings);
|
|
98
|
-
} catch (ex) {
|
|
99
|
-
throw new _error.default(ex.message || "Could not get settings.", ex.code || "GET_SETTINGS_ERROR", {
|
|
100
|
-
error: ex,
|
|
101
|
-
keys
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
return {
|
|
106
|
-
create,
|
|
107
|
-
get,
|
|
108
|
-
update
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
exports.createSettingsStorageOperations = createSettingsStorageOperations;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["convertToDbData","settings","contentModelLastChange","toISOString","convertFromDbData","Date","createPartitionKey","tenant","locale","createSortKey","createKeys","params","PK","SK","createSettingsStorageOperations","entity","create","keys","dbSettings","put","ex","WebinyError","message","code","error","update","get","record","getRecord","cleanupItem"],"sources":["index.ts"],"sourcesContent":["import {\n CmsSettings,\n CmsSettingsStorageOperations,\n CmsSettingsStorageOperationsCreateParams,\n CmsSettingsStorageOperationsGetParams,\n CmsSettingsStorageOperationsUpdateParams\n} from \"@webiny/api-headless-cms/types\";\nimport { Entity } from \"dynamodb-toolbox\";\nimport { get as getRecord } from \"@webiny/db-dynamodb/utils/get\";\nimport WebinyError from \"@webiny/error\";\nimport { cleanupItem } from \"@webiny/db-dynamodb/utils/cleanup\";\n\ninterface CmsSettingsDb extends Omit<CmsSettings, \"contentModelLastChange\"> {\n contentModelLastChange: string;\n}\n\nconst convertToDbData = (settings: CmsSettings): CmsSettingsDb => {\n return {\n ...settings,\n contentModelLastChange: settings.contentModelLastChange.toISOString()\n };\n};\n\nconst convertFromDbData = (settings?: CmsSettingsDb): CmsSettings | null => {\n if (!settings) {\n return null;\n }\n let contentModelLastChange;\n try {\n contentModelLastChange = new Date(settings.contentModelLastChange);\n } catch {\n contentModelLastChange = new Date();\n }\n return {\n ...settings,\n contentModelLastChange\n };\n};\n\ninterface PartitionKeyParams {\n tenant: string;\n locale: string;\n}\n\nconst createPartitionKey = ({ tenant, locale }: PartitionKeyParams): string => {\n return `T#${tenant}#L#${locale}#CMS#SETTINGS`;\n};\n\nconst createSortKey = (): string => {\n return \"settings\";\n};\n\ninterface Keys {\n PK: string;\n SK: string;\n}\nconst createKeys = (params: PartitionKeyParams): Keys => {\n return {\n PK: createPartitionKey(params),\n SK: createSortKey()\n };\n};\n\nexport interface CreateSettingsStorageOperationsParams {\n entity: Entity<any>;\n}\n\nexport const createSettingsStorageOperations = (\n params: CreateSettingsStorageOperationsParams\n): CmsSettingsStorageOperations => {\n const { entity } = params;\n\n const create = async (params: CmsSettingsStorageOperationsCreateParams) => {\n const { settings } = params;\n const keys = createKeys(settings);\n\n const dbSettings: CmsSettingsDb = convertToDbData(settings);\n\n try {\n await entity.put({\n ...dbSettings,\n ...keys\n });\n return settings;\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not create settings.\",\n ex.code || \"CREATE_SETTINGS_ERROR\",\n {\n error: ex,\n settings,\n dbSettings,\n keys\n }\n );\n }\n };\n\n const update = async (params: CmsSettingsStorageOperationsUpdateParams) => {\n const { settings } = params;\n\n const keys = createKeys(settings);\n\n const dbSettings: CmsSettingsDb = convertToDbData(settings);\n\n try {\n await entity.put({\n ...dbSettings,\n ...keys\n });\n return settings;\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not update settings.\",\n ex.code || \"UPDATE_SETTINGS_ERROR\",\n {\n error: ex,\n settings,\n dbSettings,\n keys\n }\n );\n }\n };\n\n const get = async (params: CmsSettingsStorageOperationsGetParams) => {\n const keys = createKeys(params);\n try {\n const record = await getRecord<CmsSettingsDb>({\n entity,\n keys\n });\n if (!record) {\n return null;\n }\n const settings = cleanupItem(entity, record) as CmsSettingsDb;\n return convertFromDbData(settings);\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not get settings.\",\n ex.code || \"GET_SETTINGS_ERROR\",\n {\n error: ex,\n keys\n }\n );\n }\n };\n\n return {\n create,\n get,\n update\n };\n};\n"],"mappings":";;;;;;;;AAQA;AACA;AACA;AAMA,MAAMA,eAAe,GAAIC,QAAqB,IAAoB;EAC9D,mEACOA,QAAQ;IACXC,sBAAsB,EAAED,QAAQ,CAACC,sBAAsB,CAACC,WAAW;EAAE;AAE7E,CAAC;AAED,MAAMC,iBAAiB,GAAIH,QAAwB,IAAyB;EACxE,IAAI,CAACA,QAAQ,EAAE;IACX,OAAO,IAAI;EACf;EACA,IAAIC,sBAAsB;EAC1B,IAAI;IACAA,sBAAsB,GAAG,IAAIG,IAAI,CAACJ,QAAQ,CAACC,sBAAsB,CAAC;EACtE,CAAC,CAAC,MAAM;IACJA,sBAAsB,GAAG,IAAIG,IAAI,EAAE;EACvC;EACA,mEACOJ,QAAQ;IACXC;EAAsB;AAE9B,CAAC;AAOD,MAAMI,kBAAkB,GAAG,CAAC;EAAEC,MAAM;EAAEC;AAA2B,CAAC,KAAa;EAC3E,OAAQ,KAAID,MAAO,MAAKC,MAAO,eAAc;AACjD,CAAC;AAED,MAAMC,aAAa,GAAG,MAAc;EAChC,OAAO,UAAU;AACrB,CAAC;AAMD,MAAMC,UAAU,GAAIC,MAA0B,IAAW;EACrD,OAAO;IACHC,EAAE,EAAEN,kBAAkB,CAACK,MAAM,CAAC;IAC9BE,EAAE,EAAEJ,aAAa;EACrB,CAAC;AACL,CAAC;AAMM,MAAMK,+BAA+B,GACxCH,MAA6C,IACd;EAC/B,MAAM;IAAEI;EAAO,CAAC,GAAGJ,MAAM;EAEzB,MAAMK,MAAM,GAAG,MAAOL,MAAgD,IAAK;IACvE,MAAM;MAAEV;IAAS,CAAC,GAAGU,MAAM;IAC3B,MAAMM,IAAI,GAAGP,UAAU,CAACT,QAAQ,CAAC;IAEjC,MAAMiB,UAAyB,GAAGlB,eAAe,CAACC,QAAQ,CAAC;IAE3D,IAAI;MACA,MAAMc,MAAM,CAACI,GAAG,6DACTD,UAAU,GACVD,IAAI,EACT;MACF,OAAOhB,QAAQ;IACnB,CAAC,CAAC,OAAOmB,EAAE,EAAE;MACT,MAAM,IAAIC,cAAW,CACjBD,EAAE,CAACE,OAAO,IAAI,4BAA4B,EAC1CF,EAAE,CAACG,IAAI,IAAI,uBAAuB,EAClC;QACIC,KAAK,EAAEJ,EAAE;QACTnB,QAAQ;QACRiB,UAAU;QACVD;MACJ,CAAC,CACJ;IACL;EACJ,CAAC;EAED,MAAMQ,MAAM,GAAG,MAAOd,MAAgD,IAAK;IACvE,MAAM;MAAEV;IAAS,CAAC,GAAGU,MAAM;IAE3B,MAAMM,IAAI,GAAGP,UAAU,CAACT,QAAQ,CAAC;IAEjC,MAAMiB,UAAyB,GAAGlB,eAAe,CAACC,QAAQ,CAAC;IAE3D,IAAI;MACA,MAAMc,MAAM,CAACI,GAAG,6DACTD,UAAU,GACVD,IAAI,EACT;MACF,OAAOhB,QAAQ;IACnB,CAAC,CAAC,OAAOmB,EAAE,EAAE;MACT,MAAM,IAAIC,cAAW,CACjBD,EAAE,CAACE,OAAO,IAAI,4BAA4B,EAC1CF,EAAE,CAACG,IAAI,IAAI,uBAAuB,EAClC;QACIC,KAAK,EAAEJ,EAAE;QACTnB,QAAQ;QACRiB,UAAU;QACVD;MACJ,CAAC,CACJ;IACL;EACJ,CAAC;EAED,MAAMS,GAAG,GAAG,MAAOf,MAA6C,IAAK;IACjE,MAAMM,IAAI,GAAGP,UAAU,CAACC,MAAM,CAAC;IAC/B,IAAI;MACA,MAAMgB,MAAM,GAAG,MAAM,IAAAC,QAAS,EAAgB;QAC1Cb,MAAM;QACNE;MACJ,CAAC,CAAC;MACF,IAAI,CAACU,MAAM,EAAE;QACT,OAAO,IAAI;MACf;MACA,MAAM1B,QAAQ,GAAG,IAAA4B,oBAAW,EAACd,MAAM,EAAEY,MAAM,CAAkB;MAC7D,OAAOvB,iBAAiB,CAACH,QAAQ,CAAC;IACtC,CAAC,CAAC,OAAOmB,EAAE,EAAE;MACT,MAAM,IAAIC,cAAW,CACjBD,EAAE,CAACE,OAAO,IAAI,yBAAyB,EACvCF,EAAE,CAACG,IAAI,IAAI,oBAAoB,EAC/B;QACIC,KAAK,EAAEJ,EAAE;QACTH;MACJ,CAAC,CACJ;IACL;EACJ,CAAC;EAED,OAAO;IACHD,MAAM;IACNU,GAAG;IACHD;EACJ,CAAC;AACL,CAAC;AAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { CmsSystemStorageOperations } from "@webiny/api-headless-cms/types";
|
|
2
|
-
import { Entity } from "dynamodb-toolbox";
|
|
3
|
-
export interface CreateSystemStorageOperationsParams {
|
|
4
|
-
entity: Entity<any>;
|
|
5
|
-
}
|
|
6
|
-
export declare const createSystemStorageOperations: (params: CreateSystemStorageOperationsParams) => CmsSystemStorageOperations;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.createSystemStorageOperations = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
-
var _error = _interopRequireDefault(require("@webiny/error"));
|
|
10
|
-
var _get = require("@webiny/db-dynamodb/utils/get");
|
|
11
|
-
var _cleanup = require("@webiny/db-dynamodb/utils/cleanup");
|
|
12
|
-
const createPartitionKey = ({
|
|
13
|
-
tenant
|
|
14
|
-
}) => {
|
|
15
|
-
return `T#${tenant.toLowerCase()}#SYSTEM`;
|
|
16
|
-
};
|
|
17
|
-
const createSortKey = () => {
|
|
18
|
-
return "CMS";
|
|
19
|
-
};
|
|
20
|
-
const createKeys = params => {
|
|
21
|
-
return {
|
|
22
|
-
PK: createPartitionKey(params),
|
|
23
|
-
SK: createSortKey()
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
const createSystemStorageOperations = params => {
|
|
27
|
-
const {
|
|
28
|
-
entity
|
|
29
|
-
} = params;
|
|
30
|
-
const create = async ({
|
|
31
|
-
system
|
|
32
|
-
}) => {
|
|
33
|
-
const keys = createKeys(system);
|
|
34
|
-
try {
|
|
35
|
-
await entity.put((0, _objectSpread2.default)((0, _objectSpread2.default)({}, system), keys));
|
|
36
|
-
return system;
|
|
37
|
-
} catch (ex) {
|
|
38
|
-
throw new _error.default(ex.message || "Could not create system.", ex.code || "CREATE_SYSTEM_ERROR", {
|
|
39
|
-
error: ex,
|
|
40
|
-
system,
|
|
41
|
-
keys
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
const update = async params => {
|
|
46
|
-
const {
|
|
47
|
-
system
|
|
48
|
-
} = params;
|
|
49
|
-
const keys = createKeys(system);
|
|
50
|
-
try {
|
|
51
|
-
await entity.put((0, _objectSpread2.default)((0, _objectSpread2.default)({}, system), keys));
|
|
52
|
-
return system;
|
|
53
|
-
} catch (ex) {
|
|
54
|
-
throw new _error.default(ex.message || "Could not update system.", ex.code || "UPDATE_SYSTEM_ERROR", {
|
|
55
|
-
error: ex,
|
|
56
|
-
system,
|
|
57
|
-
keys
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
const get = async params => {
|
|
62
|
-
const keys = createKeys(params);
|
|
63
|
-
try {
|
|
64
|
-
const system = await (0, _get.get)({
|
|
65
|
-
entity,
|
|
66
|
-
keys
|
|
67
|
-
});
|
|
68
|
-
return (0, _cleanup.cleanupItem)(entity, system);
|
|
69
|
-
} catch (ex) {
|
|
70
|
-
throw new _error.default(ex.message || "Could not get system.", ex.code || "GET_SYSTEM_ERROR", {
|
|
71
|
-
error: ex,
|
|
72
|
-
keys
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
return {
|
|
77
|
-
create,
|
|
78
|
-
update,
|
|
79
|
-
get
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
exports.createSystemStorageOperations = createSystemStorageOperations;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["createPartitionKey","tenant","toLowerCase","createSortKey","createKeys","params","PK","SK","createSystemStorageOperations","entity","create","system","keys","put","ex","WebinyError","message","code","error","update","get","getRecord","cleanupItem"],"sources":["index.ts"],"sourcesContent":["import {\n CmsSystem,\n CmsSystemStorageOperations,\n CmsSystemStorageOperationsCreateParams,\n CmsSystemStorageOperationsGetParams,\n CmsSystemStorageOperationsUpdateParams\n} from \"@webiny/api-headless-cms/types\";\nimport { Entity } from \"dynamodb-toolbox\";\nimport WebinyError from \"@webiny/error\";\nimport { get as getRecord } from \"@webiny/db-dynamodb/utils/get\";\nimport { cleanupItem } from \"@webiny/db-dynamodb/utils/cleanup\";\n\nexport interface CreateSystemStorageOperationsParams {\n entity: Entity<any>;\n}\n\ninterface PartitionKeyParams {\n tenant: string;\n}\nconst createPartitionKey = ({ tenant }: PartitionKeyParams): string => {\n return `T#${tenant.toLowerCase()}#SYSTEM`;\n};\nconst createSortKey = (): string => {\n return \"CMS\";\n};\n\ninterface Keys {\n PK: string;\n SK: string;\n}\nconst createKeys = (params: PartitionKeyParams): Keys => {\n return {\n PK: createPartitionKey(params),\n SK: createSortKey()\n };\n};\n\nexport const createSystemStorageOperations = (\n params: CreateSystemStorageOperationsParams\n): CmsSystemStorageOperations => {\n const { entity } = params;\n\n const create = async ({ system }: CmsSystemStorageOperationsCreateParams) => {\n const keys = createKeys(system);\n try {\n await entity.put({\n ...system,\n ...keys\n });\n return system;\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not create system.\",\n ex.code || \"CREATE_SYSTEM_ERROR\",\n {\n error: ex,\n system,\n keys\n }\n );\n }\n };\n\n const update = async (params: CmsSystemStorageOperationsUpdateParams) => {\n const { system } = params;\n\n const keys = createKeys(system);\n\n try {\n await entity.put({\n ...system,\n ...keys\n });\n return system;\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not update system.\",\n ex.code || \"UPDATE_SYSTEM_ERROR\",\n {\n error: ex,\n system,\n keys\n }\n );\n }\n };\n\n const get = async (params: CmsSystemStorageOperationsGetParams) => {\n const keys = createKeys(params);\n\n try {\n const system = await getRecord<CmsSystem>({\n entity,\n keys\n });\n return cleanupItem(entity, system);\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not get system.\",\n ex.code || \"GET_SYSTEM_ERROR\",\n {\n error: ex,\n keys\n }\n );\n }\n };\n\n return {\n create,\n update,\n get\n };\n};\n"],"mappings":";;;;;;;;AAQA;AACA;AACA;AASA,MAAMA,kBAAkB,GAAG,CAAC;EAAEC;AAA2B,CAAC,KAAa;EACnE,OAAQ,KAAIA,MAAM,CAACC,WAAW,EAAG,SAAQ;AAC7C,CAAC;AACD,MAAMC,aAAa,GAAG,MAAc;EAChC,OAAO,KAAK;AAChB,CAAC;AAMD,MAAMC,UAAU,GAAIC,MAA0B,IAAW;EACrD,OAAO;IACHC,EAAE,EAAEN,kBAAkB,CAACK,MAAM,CAAC;IAC9BE,EAAE,EAAEJ,aAAa;EACrB,CAAC;AACL,CAAC;AAEM,MAAMK,6BAA6B,GACtCH,MAA2C,IACd;EAC7B,MAAM;IAAEI;EAAO,CAAC,GAAGJ,MAAM;EAEzB,MAAMK,MAAM,GAAG,OAAO;IAAEC;EAA+C,CAAC,KAAK;IACzE,MAAMC,IAAI,GAAGR,UAAU,CAACO,MAAM,CAAC;IAC/B,IAAI;MACA,MAAMF,MAAM,CAACI,GAAG,6DACTF,MAAM,GACNC,IAAI,EACT;MACF,OAAOD,MAAM;IACjB,CAAC,CAAC,OAAOG,EAAE,EAAE;MACT,MAAM,IAAIC,cAAW,CACjBD,EAAE,CAACE,OAAO,IAAI,0BAA0B,EACxCF,EAAE,CAACG,IAAI,IAAI,qBAAqB,EAChC;QACIC,KAAK,EAAEJ,EAAE;QACTH,MAAM;QACNC;MACJ,CAAC,CACJ;IACL;EACJ,CAAC;EAED,MAAMO,MAAM,GAAG,MAAOd,MAA8C,IAAK;IACrE,MAAM;MAAEM;IAAO,CAAC,GAAGN,MAAM;IAEzB,MAAMO,IAAI,GAAGR,UAAU,CAACO,MAAM,CAAC;IAE/B,IAAI;MACA,MAAMF,MAAM,CAACI,GAAG,6DACTF,MAAM,GACNC,IAAI,EACT;MACF,OAAOD,MAAM;IACjB,CAAC,CAAC,OAAOG,EAAE,EAAE;MACT,MAAM,IAAIC,cAAW,CACjBD,EAAE,CAACE,OAAO,IAAI,0BAA0B,EACxCF,EAAE,CAACG,IAAI,IAAI,qBAAqB,EAChC;QACIC,KAAK,EAAEJ,EAAE;QACTH,MAAM;QACNC;MACJ,CAAC,CACJ;IACL;EACJ,CAAC;EAED,MAAMQ,GAAG,GAAG,MAAOf,MAA2C,IAAK;IAC/D,MAAMO,IAAI,GAAGR,UAAU,CAACC,MAAM,CAAC;IAE/B,IAAI;MACA,MAAMM,MAAM,GAAG,MAAM,IAAAU,QAAS,EAAY;QACtCZ,MAAM;QACNG;MACJ,CAAC,CAAC;MACF,OAAO,IAAAU,oBAAW,EAACb,MAAM,EAAEE,MAAM,CAAC;IACtC,CAAC,CAAC,OAAOG,EAAE,EAAE;MACT,MAAM,IAAIC,cAAW,CACjBD,EAAE,CAACE,OAAO,IAAI,uBAAuB,EACrCF,EAAE,CAACG,IAAI,IAAI,kBAAkB,EAC7B;QACIC,KAAK,EAAEJ,EAAE;QACTF;MACJ,CAAC,CACJ;IACL;EACJ,CAAC;EAED,OAAO;IACHF,MAAM;IACNS,MAAM;IACNC;EACJ,CAAC;AACL,CAAC;AAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ElasticsearchBodyModifierPlugin, ModifyBodyCallable, ModifyBodyParams as BaseModifyBodyParams } from "@webiny/api-elasticsearch";
|
|
2
|
-
import { CmsModel } from "@webiny/api-headless-cms/types";
|
|
3
|
-
export interface ModifyBodyParams extends BaseModifyBodyParams {
|
|
4
|
-
model: CmsModel;
|
|
5
|
-
where: {
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
export interface CmsEntryElasticsearchBodyModifierPluginConfig {
|
|
10
|
-
modifyBody: ModifyBodyCallable<ModifyBodyParams>;
|
|
11
|
-
/**
|
|
12
|
-
* If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.
|
|
13
|
-
*/
|
|
14
|
-
modelId?: string;
|
|
15
|
-
}
|
|
16
|
-
export declare class CmsEntryElasticsearchBodyModifierPlugin extends ElasticsearchBodyModifierPlugin<ModifyBodyParams> {
|
|
17
|
-
static readonly type: string;
|
|
18
|
-
readonly modelId?: string;
|
|
19
|
-
constructor(config: CmsEntryElasticsearchBodyModifierPluginConfig);
|
|
20
|
-
}
|
|
21
|
-
export declare const createCmsEntryElasticsearchBodyModifierPlugin: (config: CmsEntryElasticsearchBodyModifierPluginConfig) => CmsEntryElasticsearchBodyModifierPlugin;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.createCmsEntryElasticsearchBodyModifierPlugin = exports.CmsEntryElasticsearchBodyModifierPlugin = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _apiElasticsearch = require("@webiny/api-elasticsearch");
|
|
10
|
-
class CmsEntryElasticsearchBodyModifierPlugin extends _apiElasticsearch.ElasticsearchBodyModifierPlugin {
|
|
11
|
-
constructor(config) {
|
|
12
|
-
super(config.modifyBody);
|
|
13
|
-
(0, _defineProperty2.default)(this, "modelId", void 0);
|
|
14
|
-
this.modelId = config.modelId;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.CmsEntryElasticsearchBodyModifierPlugin = CmsEntryElasticsearchBodyModifierPlugin;
|
|
18
|
-
(0, _defineProperty2.default)(CmsEntryElasticsearchBodyModifierPlugin, "type", "cms.elasticsearch.modifier.body.entry");
|
|
19
|
-
const createCmsEntryElasticsearchBodyModifierPlugin = config => {
|
|
20
|
-
return new CmsEntryElasticsearchBodyModifierPlugin(config);
|
|
21
|
-
};
|
|
22
|
-
exports.createCmsEntryElasticsearchBodyModifierPlugin = createCmsEntryElasticsearchBodyModifierPlugin;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryElasticsearchBodyModifierPlugin","ElasticsearchBodyModifierPlugin","constructor","config","modifyBody","modelId","createCmsEntryElasticsearchBodyModifierPlugin"],"sources":["CmsEntryElasticsearchBodyModifierPlugin.ts"],"sourcesContent":["import {\n ElasticsearchBodyModifierPlugin,\n ModifyBodyCallable,\n ModifyBodyParams as BaseModifyBodyParams\n} from \"@webiny/api-elasticsearch\";\nimport { CmsModel } from \"@webiny/api-headless-cms/types\";\n\nexport interface ModifyBodyParams extends BaseModifyBodyParams {\n model: CmsModel;\n where: {\n [key: string]: any;\n };\n}\n\nexport interface CmsEntryElasticsearchBodyModifierPluginConfig {\n modifyBody: ModifyBodyCallable<ModifyBodyParams>;\n /**\n * If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.\n */\n modelId?: string;\n}\n\nexport class CmsEntryElasticsearchBodyModifierPlugin extends ElasticsearchBodyModifierPlugin<ModifyBodyParams> {\n public static override readonly type: string = \"cms.elasticsearch.modifier.body.entry\";\n\n public readonly modelId?: string;\n\n public constructor(config: CmsEntryElasticsearchBodyModifierPluginConfig) {\n super(config.modifyBody);\n\n this.modelId = config.modelId;\n }\n}\n\nexport const createCmsEntryElasticsearchBodyModifierPlugin = (\n config: CmsEntryElasticsearchBodyModifierPluginConfig\n) => {\n return new CmsEntryElasticsearchBodyModifierPlugin(config);\n};\n"],"mappings":";;;;;;;;AAAA;AAsBO,MAAMA,uCAAuC,SAASC,iDAA+B,CAAmB;EAKpGC,WAAW,CAACC,MAAqD,EAAE;IACtE,KAAK,CAACA,MAAM,CAACC,UAAU,CAAC;IAAC;IAEzB,IAAI,CAACC,OAAO,GAAGF,MAAM,CAACE,OAAO;EACjC;AACJ;AAAC;AAAA,8BAVYL,uCAAuC,UACD,uCAAuC;AAWnF,MAAMM,6CAA6C,GACtDH,MAAqD,IACpD;EACD,OAAO,IAAIH,uCAAuC,CAACG,MAAM,CAAC;AAC9D,CAAC;AAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ElasticsearchFieldPlugin, ElasticsearchFieldPluginParams as ElasticsearchFieldPluginParamsBaseParams } from "@webiny/api-elasticsearch";
|
|
2
|
-
export interface CmsEntryElasticsearchFieldPluginParams extends ElasticsearchFieldPluginParamsBaseParams {
|
|
3
|
-
/**
|
|
4
|
-
* If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.
|
|
5
|
-
*/
|
|
6
|
-
modelId?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare class CmsEntryElasticsearchFieldPlugin extends ElasticsearchFieldPlugin {
|
|
9
|
-
static readonly type: string;
|
|
10
|
-
readonly modelId?: string;
|
|
11
|
-
constructor(params: CmsEntryElasticsearchFieldPluginParams);
|
|
12
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.CmsEntryElasticsearchFieldPlugin = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _apiElasticsearch = require("@webiny/api-elasticsearch");
|
|
10
|
-
class CmsEntryElasticsearchFieldPlugin extends _apiElasticsearch.ElasticsearchFieldPlugin {
|
|
11
|
-
constructor(params) {
|
|
12
|
-
super(params);
|
|
13
|
-
(0, _defineProperty2.default)(this, "modelId", void 0);
|
|
14
|
-
this.modelId = params.modelId;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.CmsEntryElasticsearchFieldPlugin = CmsEntryElasticsearchFieldPlugin;
|
|
18
|
-
(0, _defineProperty2.default)(CmsEntryElasticsearchFieldPlugin, "type", "elasticsearch.fieldDefinition.cms.entry");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryElasticsearchFieldPlugin","ElasticsearchFieldPlugin","constructor","params","modelId"],"sources":["CmsEntryElasticsearchFieldPlugin.ts"],"sourcesContent":["import {\n ElasticsearchFieldPlugin,\n ElasticsearchFieldPluginParams as ElasticsearchFieldPluginParamsBaseParams\n} from \"@webiny/api-elasticsearch\";\n\nexport interface CmsEntryElasticsearchFieldPluginParams\n extends ElasticsearchFieldPluginParamsBaseParams {\n /**\n * If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.\n */\n modelId?: string;\n}\nexport class CmsEntryElasticsearchFieldPlugin extends ElasticsearchFieldPlugin {\n public static override readonly type: string = \"elasticsearch.fieldDefinition.cms.entry\";\n\n public readonly modelId?: string;\n\n public constructor(params: CmsEntryElasticsearchFieldPluginParams) {\n super(params);\n\n this.modelId = params.modelId;\n }\n}\n"],"mappings":";;;;;;;;AAAA;AAYO,MAAMA,gCAAgC,SAASC,0CAAwB,CAAC;EAKpEC,WAAW,CAACC,MAA8C,EAAE;IAC/D,KAAK,CAACA,MAAM,CAAC;IAAC;IAEd,IAAI,CAACC,OAAO,GAAGD,MAAM,CAACC,OAAO;EACjC;AACJ;AAAC;AAAA,8BAVYJ,gCAAgC,UACM,yCAAyC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Plugin } from "@webiny/plugins";
|
|
2
|
-
import { ElasticsearchBoolQueryConfig } from "@webiny/api-elasticsearch/types";
|
|
3
|
-
import { CmsModel, CmsModelField } from "@webiny/api-headless-cms/types";
|
|
4
|
-
export interface CmsEntryElasticsearchFullTextSearchPluginCbParams {
|
|
5
|
-
model: CmsModel;
|
|
6
|
-
query: ElasticsearchBoolQueryConfig;
|
|
7
|
-
term: string;
|
|
8
|
-
fields: CmsModelField[];
|
|
9
|
-
createFieldPath: (field: CmsModelField) => string;
|
|
10
|
-
prepareTerm: (term: string) => string;
|
|
11
|
-
}
|
|
12
|
-
export interface CmsEntryElasticsearchFullTextSearchPluginParams {
|
|
13
|
-
models?: string[];
|
|
14
|
-
apply: (params: CmsEntryElasticsearchFullTextSearchPluginCbParams) => void;
|
|
15
|
-
}
|
|
16
|
-
export declare class CmsEntryElasticsearchFullTextSearchPlugin extends Plugin {
|
|
17
|
-
static readonly type: string;
|
|
18
|
-
private readonly params;
|
|
19
|
-
get models(): string[] | undefined;
|
|
20
|
-
constructor(params: CmsEntryElasticsearchFullTextSearchPluginParams);
|
|
21
|
-
apply(params: CmsEntryElasticsearchFullTextSearchPluginCbParams): void;
|
|
22
|
-
}
|
|
23
|
-
export declare const createCmsEntryElasticsearchFullTextSearchPlugin: (params: CmsEntryElasticsearchFullTextSearchPluginParams) => CmsEntryElasticsearchFullTextSearchPlugin;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.createCmsEntryElasticsearchFullTextSearchPlugin = exports.CmsEntryElasticsearchFullTextSearchPlugin = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _plugins = require("@webiny/plugins");
|
|
10
|
-
class CmsEntryElasticsearchFullTextSearchPlugin extends _plugins.Plugin {
|
|
11
|
-
get models() {
|
|
12
|
-
return this.params.models;
|
|
13
|
-
}
|
|
14
|
-
constructor(params) {
|
|
15
|
-
super();
|
|
16
|
-
(0, _defineProperty2.default)(this, "params", void 0);
|
|
17
|
-
this.params = params;
|
|
18
|
-
}
|
|
19
|
-
apply(params) {
|
|
20
|
-
return this.params.apply(params);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.CmsEntryElasticsearchFullTextSearchPlugin = CmsEntryElasticsearchFullTextSearchPlugin;
|
|
24
|
-
(0, _defineProperty2.default)(CmsEntryElasticsearchFullTextSearchPlugin, "type", "headless-cms.elasticsearch.entry.fullTextSearch");
|
|
25
|
-
const createCmsEntryElasticsearchFullTextSearchPlugin = params => {
|
|
26
|
-
return new CmsEntryElasticsearchFullTextSearchPlugin(params);
|
|
27
|
-
};
|
|
28
|
-
exports.createCmsEntryElasticsearchFullTextSearchPlugin = createCmsEntryElasticsearchFullTextSearchPlugin;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryElasticsearchFullTextSearchPlugin","Plugin","models","params","constructor","apply","createCmsEntryElasticsearchFullTextSearchPlugin"],"sources":["CmsEntryElasticsearchFullTextSearchPlugin.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins\";\nimport { ElasticsearchBoolQueryConfig } from \"@webiny/api-elasticsearch/types\";\nimport { CmsModel, CmsModelField } from \"@webiny/api-headless-cms/types\";\n\nexport interface CmsEntryElasticsearchFullTextSearchPluginCbParams {\n model: CmsModel;\n query: ElasticsearchBoolQueryConfig;\n term: string;\n fields: CmsModelField[];\n createFieldPath: (field: CmsModelField) => string;\n prepareTerm: (term: string) => string;\n}\nexport interface CmsEntryElasticsearchFullTextSearchPluginParams {\n models?: string[];\n apply: (params: CmsEntryElasticsearchFullTextSearchPluginCbParams) => void;\n}\nexport class CmsEntryElasticsearchFullTextSearchPlugin extends Plugin {\n public static override readonly type: string =\n \"headless-cms.elasticsearch.entry.fullTextSearch\";\n\n private readonly params: CmsEntryElasticsearchFullTextSearchPluginParams;\n\n public get models() {\n return this.params.models;\n }\n\n public constructor(params: CmsEntryElasticsearchFullTextSearchPluginParams) {\n super();\n this.params = params;\n }\n\n public apply(params: CmsEntryElasticsearchFullTextSearchPluginCbParams): void {\n return this.params.apply(params);\n }\n}\n\nexport const createCmsEntryElasticsearchFullTextSearchPlugin = (\n params: CmsEntryElasticsearchFullTextSearchPluginParams\n) => {\n return new CmsEntryElasticsearchFullTextSearchPlugin(params);\n};\n"],"mappings":";;;;;;;;AAAA;AAgBO,MAAMA,yCAAyC,SAASC,eAAM,CAAC;EAMlE,IAAWC,MAAM,GAAG;IAChB,OAAO,IAAI,CAACC,MAAM,CAACD,MAAM;EAC7B;EAEOE,WAAW,CAACD,MAAuD,EAAE;IACxE,KAAK,EAAE;IAAC;IACR,IAAI,CAACA,MAAM,GAAGA,MAAM;EACxB;EAEOE,KAAK,CAACF,MAAyD,EAAQ;IAC1E,OAAO,IAAI,CAACA,MAAM,CAACE,KAAK,CAACF,MAAM,CAAC;EACpC;AACJ;AAAC;AAAA,8BAlBYH,yCAAyC,UAE9C,iDAAiD;AAkBlD,MAAMM,+CAA+C,GACxDH,MAAuD,IACtD;EACD,OAAO,IAAIH,yCAAyC,CAACG,MAAM,CAAC;AAChE,CAAC;AAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.CmsEntryElasticsearchIndexPlugin = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _apiElasticsearch = require("@webiny/api-elasticsearch");
|
|
10
|
-
class CmsEntryElasticsearchIndexPlugin extends _apiElasticsearch.ElasticsearchIndexPlugin {}
|
|
11
|
-
exports.CmsEntryElasticsearchIndexPlugin = CmsEntryElasticsearchIndexPlugin;
|
|
12
|
-
(0, _defineProperty2.default)(CmsEntryElasticsearchIndexPlugin, "type", "cms.entry.elasticsearch.index");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryElasticsearchIndexPlugin","ElasticsearchIndexPlugin"],"sources":["CmsEntryElasticsearchIndexPlugin.ts"],"sourcesContent":["import { ElasticsearchIndexPlugin } from \"@webiny/api-elasticsearch\";\n\nexport class CmsEntryElasticsearchIndexPlugin extends ElasticsearchIndexPlugin {\n public static override readonly type: string = \"cms.entry.elasticsearch.index\";\n}\n"],"mappings":";;;;;;;;AAAA;AAEO,MAAMA,gCAAgC,SAASC,0CAAwB,CAAC;AAE9E;AAAA,8BAFYD,gCAAgC,UACM,+BAA+B"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Plugin } from "@webiny/plugins/Plugin";
|
|
2
|
-
import { CmsModelField } from "@webiny/api-headless-cms/types";
|
|
3
|
-
export interface CreatePathCallableParams<T = any> {
|
|
4
|
-
field: CmsModelField;
|
|
5
|
-
key: string;
|
|
6
|
-
value: T;
|
|
7
|
-
}
|
|
8
|
-
export interface CreatePathCallable<T = any> {
|
|
9
|
-
(params: CreatePathCallableParams<T>): string;
|
|
10
|
-
}
|
|
11
|
-
export interface TransformCallableParams<T = any> {
|
|
12
|
-
field: CmsModelField;
|
|
13
|
-
value: T;
|
|
14
|
-
}
|
|
15
|
-
export interface TransformCallable<T = any> {
|
|
16
|
-
(params: TransformCallableParams<T>): string;
|
|
17
|
-
}
|
|
18
|
-
export interface CmsEntryElasticsearchQueryBuilderValueSearchPluginParams {
|
|
19
|
-
fieldType: string;
|
|
20
|
-
path?: string | CreatePathCallable;
|
|
21
|
-
transform: TransformCallable;
|
|
22
|
-
}
|
|
23
|
-
export declare class CmsEntryElasticsearchQueryBuilderValueSearchPlugin extends Plugin {
|
|
24
|
-
static readonly type: string;
|
|
25
|
-
private readonly config;
|
|
26
|
-
get fieldType(): string;
|
|
27
|
-
constructor(params: CmsEntryElasticsearchQueryBuilderValueSearchPluginParams);
|
|
28
|
-
transform(params: TransformCallableParams): any;
|
|
29
|
-
createPath(params: CreatePathCallableParams): string | null;
|
|
30
|
-
}
|
|
31
|
-
export declare const createCmsEntryElasticsearchQueryBuilderValueSearchPlugin: (params: CmsEntryElasticsearchQueryBuilderValueSearchPluginParams) => CmsEntryElasticsearchQueryBuilderValueSearchPlugin;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.createCmsEntryElasticsearchQueryBuilderValueSearchPlugin = exports.CmsEntryElasticsearchQueryBuilderValueSearchPlugin = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _Plugin = require("@webiny/plugins/Plugin");
|
|
10
|
-
class CmsEntryElasticsearchQueryBuilderValueSearchPlugin extends _Plugin.Plugin {
|
|
11
|
-
get fieldType() {
|
|
12
|
-
return this.config.fieldType;
|
|
13
|
-
}
|
|
14
|
-
constructor(params) {
|
|
15
|
-
super();
|
|
16
|
-
(0, _defineProperty2.default)(this, "config", void 0);
|
|
17
|
-
this.config = params;
|
|
18
|
-
this.name = `${this.constructor.type}-${this.config.fieldType}`;
|
|
19
|
-
}
|
|
20
|
-
transform(params) {
|
|
21
|
-
return this.config.transform(params);
|
|
22
|
-
}
|
|
23
|
-
createPath(params) {
|
|
24
|
-
if (typeof this.config.path === "function") {
|
|
25
|
-
return this.config.path(params);
|
|
26
|
-
} else if (typeof this.config.path === "string") {
|
|
27
|
-
return this.config.path;
|
|
28
|
-
}
|
|
29
|
-
return null;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.CmsEntryElasticsearchQueryBuilderValueSearchPlugin = CmsEntryElasticsearchQueryBuilderValueSearchPlugin;
|
|
33
|
-
(0, _defineProperty2.default)(CmsEntryElasticsearchQueryBuilderValueSearchPlugin, "type", "cms-elastic-search-query-builder-value-search");
|
|
34
|
-
const createCmsEntryElasticsearchQueryBuilderValueSearchPlugin = params => {
|
|
35
|
-
return new CmsEntryElasticsearchQueryBuilderValueSearchPlugin(params);
|
|
36
|
-
};
|
|
37
|
-
exports.createCmsEntryElasticsearchQueryBuilderValueSearchPlugin = createCmsEntryElasticsearchQueryBuilderValueSearchPlugin;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryElasticsearchQueryBuilderValueSearchPlugin","Plugin","fieldType","config","constructor","params","name","type","transform","createPath","path","createCmsEntryElasticsearchQueryBuilderValueSearchPlugin"],"sources":["CmsEntryElasticsearchQueryBuilderValueSearchPlugin.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins/Plugin\";\nimport { CmsModelField } from \"@webiny/api-headless-cms/types\";\n\nexport interface CreatePathCallableParams<T = any> {\n field: CmsModelField;\n key: string;\n value: T;\n}\n\nexport interface CreatePathCallable<T = any> {\n (params: CreatePathCallableParams<T>): string;\n}\n\nexport interface TransformCallableParams<T = any> {\n field: CmsModelField;\n value: T;\n}\nexport interface TransformCallable<T = any> {\n (params: TransformCallableParams<T>): string;\n}\n\nexport interface CmsEntryElasticsearchQueryBuilderValueSearchPluginParams {\n fieldType: string;\n path?: string | CreatePathCallable;\n transform: TransformCallable;\n}\nexport class CmsEntryElasticsearchQueryBuilderValueSearchPlugin extends Plugin {\n public static override readonly type: string = \"cms-elastic-search-query-builder-value-search\";\n\n private readonly config: CmsEntryElasticsearchQueryBuilderValueSearchPluginParams;\n\n public get fieldType(): string {\n return this.config.fieldType;\n }\n\n public constructor(params: CmsEntryElasticsearchQueryBuilderValueSearchPluginParams) {\n super();\n\n this.config = params;\n this.name = `${(this.constructor as any).type}-${this.config.fieldType}`;\n }\n\n public transform(params: TransformCallableParams): any {\n return this.config.transform(params);\n }\n\n public createPath(params: CreatePathCallableParams): string | null {\n if (typeof this.config.path === \"function\") {\n return this.config.path(params);\n } else if (typeof this.config.path === \"string\") {\n return this.config.path;\n }\n return null;\n }\n}\n\nexport const createCmsEntryElasticsearchQueryBuilderValueSearchPlugin = (\n params: CmsEntryElasticsearchQueryBuilderValueSearchPluginParams\n) => {\n return new CmsEntryElasticsearchQueryBuilderValueSearchPlugin(params);\n};\n"],"mappings":";;;;;;;;AAAA;AA0BO,MAAMA,kDAAkD,SAASC,cAAM,CAAC;EAK3E,IAAWC,SAAS,GAAW;IAC3B,OAAO,IAAI,CAACC,MAAM,CAACD,SAAS;EAChC;EAEOE,WAAW,CAACC,MAAgE,EAAE;IACjF,KAAK,EAAE;IAAC;IAER,IAAI,CAACF,MAAM,GAAGE,MAAM;IACpB,IAAI,CAACC,IAAI,GAAI,GAAG,IAAI,CAACF,WAAW,CAASG,IAAK,IAAG,IAAI,CAACJ,MAAM,CAACD,SAAU,EAAC;EAC5E;EAEOM,SAAS,CAACH,MAA+B,EAAO;IACnD,OAAO,IAAI,CAACF,MAAM,CAACK,SAAS,CAACH,MAAM,CAAC;EACxC;EAEOI,UAAU,CAACJ,MAAgC,EAAiB;IAC/D,IAAI,OAAO,IAAI,CAACF,MAAM,CAACO,IAAI,KAAK,UAAU,EAAE;MACxC,OAAO,IAAI,CAACP,MAAM,CAACO,IAAI,CAACL,MAAM,CAAC;IACnC,CAAC,MAAM,IAAI,OAAO,IAAI,CAACF,MAAM,CAACO,IAAI,KAAK,QAAQ,EAAE;MAC7C,OAAO,IAAI,CAACP,MAAM,CAACO,IAAI;IAC3B;IACA,OAAO,IAAI;EACf;AACJ;AAAC;AAAA,8BA5BYV,kDAAkD,UACZ,+CAA+C;AA6B3F,MAAMW,wDAAwD,GACjEN,MAAgE,IAC/D;EACD,OAAO,IAAIL,kDAAkD,CAACK,MAAM,CAAC;AACzE,CAAC;AAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ElasticsearchQueryModifierPlugin, ModifyQueryCallable, ModifyQueryParams as BaseModifyQueryParams } from "@webiny/api-elasticsearch";
|
|
2
|
-
import { CmsModel } from "@webiny/api-headless-cms/types";
|
|
3
|
-
export interface ModifyQueryParams extends BaseModifyQueryParams {
|
|
4
|
-
model: CmsModel;
|
|
5
|
-
}
|
|
6
|
-
export interface CmsEntryElasticsearchQueryModifierPluginConfig {
|
|
7
|
-
modifyQuery: ModifyQueryCallable<ModifyQueryParams>;
|
|
8
|
-
/**
|
|
9
|
-
* If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.
|
|
10
|
-
*/
|
|
11
|
-
modelId?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare class CmsEntryElasticsearchQueryModifierPlugin extends ElasticsearchQueryModifierPlugin<ModifyQueryParams> {
|
|
14
|
-
static readonly type: string;
|
|
15
|
-
readonly modelId?: string;
|
|
16
|
-
constructor(config: CmsEntryElasticsearchQueryModifierPluginConfig);
|
|
17
|
-
}
|
|
18
|
-
export declare const createCmsEntryElasticsearchQueryModifierPlugin: (config: CmsEntryElasticsearchQueryModifierPluginConfig) => CmsEntryElasticsearchQueryModifierPlugin;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.createCmsEntryElasticsearchQueryModifierPlugin = exports.CmsEntryElasticsearchQueryModifierPlugin = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _apiElasticsearch = require("@webiny/api-elasticsearch");
|
|
10
|
-
class CmsEntryElasticsearchQueryModifierPlugin extends _apiElasticsearch.ElasticsearchQueryModifierPlugin {
|
|
11
|
-
constructor(config) {
|
|
12
|
-
super(config.modifyQuery);
|
|
13
|
-
(0, _defineProperty2.default)(this, "modelId", void 0);
|
|
14
|
-
this.modelId = config.modelId;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.CmsEntryElasticsearchQueryModifierPlugin = CmsEntryElasticsearchQueryModifierPlugin;
|
|
18
|
-
(0, _defineProperty2.default)(CmsEntryElasticsearchQueryModifierPlugin, "type", "cms.elasticsearch.modifier.query.entry");
|
|
19
|
-
const createCmsEntryElasticsearchQueryModifierPlugin = config => {
|
|
20
|
-
return new CmsEntryElasticsearchQueryModifierPlugin(config);
|
|
21
|
-
};
|
|
22
|
-
exports.createCmsEntryElasticsearchQueryModifierPlugin = createCmsEntryElasticsearchQueryModifierPlugin;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryElasticsearchQueryModifierPlugin","ElasticsearchQueryModifierPlugin","constructor","config","modifyQuery","modelId","createCmsEntryElasticsearchQueryModifierPlugin"],"sources":["CmsEntryElasticsearchQueryModifierPlugin.ts"],"sourcesContent":["import {\n ElasticsearchQueryModifierPlugin,\n ModifyQueryCallable,\n ModifyQueryParams as BaseModifyQueryParams\n} from \"@webiny/api-elasticsearch\";\nimport { CmsModel } from \"@webiny/api-headless-cms/types\";\n\nexport interface ModifyQueryParams extends BaseModifyQueryParams {\n model: CmsModel;\n}\n\nexport interface CmsEntryElasticsearchQueryModifierPluginConfig {\n modifyQuery: ModifyQueryCallable<ModifyQueryParams>;\n /**\n * If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.\n */\n modelId?: string;\n}\n\nexport class CmsEntryElasticsearchQueryModifierPlugin extends ElasticsearchQueryModifierPlugin<ModifyQueryParams> {\n public static override readonly type: string = \"cms.elasticsearch.modifier.query.entry\";\n\n public readonly modelId?: string;\n\n public constructor(config: CmsEntryElasticsearchQueryModifierPluginConfig) {\n super(config.modifyQuery);\n\n this.modelId = config.modelId;\n }\n}\n\nexport const createCmsEntryElasticsearchQueryModifierPlugin = (\n config: CmsEntryElasticsearchQueryModifierPluginConfig\n) => {\n return new CmsEntryElasticsearchQueryModifierPlugin(config);\n};\n"],"mappings":";;;;;;;;AAAA;AAmBO,MAAMA,wCAAwC,SAASC,kDAAgC,CAAoB;EAKvGC,WAAW,CAACC,MAAsD,EAAE;IACvE,KAAK,CAACA,MAAM,CAACC,WAAW,CAAC;IAAC;IAE1B,IAAI,CAACC,OAAO,GAAGF,MAAM,CAACE,OAAO;EACjC;AACJ;AAAC;AAAA,8BAVYL,wCAAwC,UACF,wCAAwC;AAWpF,MAAMM,8CAA8C,GACvDH,MAAsD,IACrD;EACD,OAAO,IAAIH,wCAAwC,CAACG,MAAM,CAAC;AAC/D,CAAC;AAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ElasticsearchSortModifierPlugin, ModifySortCallable, ModifySortParams as BaseModifySortParams } from "@webiny/api-elasticsearch";
|
|
2
|
-
import { CmsModel } from "@webiny/api-headless-cms/types";
|
|
3
|
-
export interface ModifySortParams extends BaseModifySortParams {
|
|
4
|
-
model: CmsModel;
|
|
5
|
-
}
|
|
6
|
-
export interface CmsEntryElasticsearchSortModifierPluginConfig {
|
|
7
|
-
modifySort: ModifySortCallable<ModifySortParams>;
|
|
8
|
-
/**
|
|
9
|
-
* If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.
|
|
10
|
-
*/
|
|
11
|
-
modelId?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare class CmsEntryElasticsearchSortModifierPlugin extends ElasticsearchSortModifierPlugin<ModifySortParams> {
|
|
14
|
-
static readonly type: string;
|
|
15
|
-
readonly modelId?: string;
|
|
16
|
-
constructor(config: CmsEntryElasticsearchSortModifierPluginConfig);
|
|
17
|
-
}
|
|
18
|
-
export declare const createCmsEntryElasticsearchSortModifierPlugin: (config: CmsEntryElasticsearchSortModifierPluginConfig) => CmsEntryElasticsearchSortModifierPlugin;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.createCmsEntryElasticsearchSortModifierPlugin = exports.CmsEntryElasticsearchSortModifierPlugin = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _apiElasticsearch = require("@webiny/api-elasticsearch");
|
|
10
|
-
class CmsEntryElasticsearchSortModifierPlugin extends _apiElasticsearch.ElasticsearchSortModifierPlugin {
|
|
11
|
-
constructor(config) {
|
|
12
|
-
super(config.modifySort);
|
|
13
|
-
(0, _defineProperty2.default)(this, "modelId", void 0);
|
|
14
|
-
this.modelId = config.modelId;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.CmsEntryElasticsearchSortModifierPlugin = CmsEntryElasticsearchSortModifierPlugin;
|
|
18
|
-
(0, _defineProperty2.default)(CmsEntryElasticsearchSortModifierPlugin, "type", "cms.elasticsearch.modifier.sort.entry");
|
|
19
|
-
const createCmsEntryElasticsearchSortModifierPlugin = config => {
|
|
20
|
-
return new CmsEntryElasticsearchSortModifierPlugin(config);
|
|
21
|
-
};
|
|
22
|
-
exports.createCmsEntryElasticsearchSortModifierPlugin = createCmsEntryElasticsearchSortModifierPlugin;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["CmsEntryElasticsearchSortModifierPlugin","ElasticsearchSortModifierPlugin","constructor","config","modifySort","modelId","createCmsEntryElasticsearchSortModifierPlugin"],"sources":["CmsEntryElasticsearchSortModifierPlugin.ts"],"sourcesContent":["import {\n ElasticsearchSortModifierPlugin,\n ModifySortCallable,\n ModifySortParams as BaseModifySortParams\n} from \"@webiny/api-elasticsearch\";\nimport { CmsModel } from \"@webiny/api-headless-cms/types\";\n\nexport interface ModifySortParams extends BaseModifySortParams {\n model: CmsModel;\n}\n\nexport interface CmsEntryElasticsearchSortModifierPluginConfig {\n modifySort: ModifySortCallable<ModifySortParams>;\n /**\n * If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.\n */\n modelId?: string;\n}\n\nexport class CmsEntryElasticsearchSortModifierPlugin extends ElasticsearchSortModifierPlugin<ModifySortParams> {\n public static override readonly type: string = \"cms.elasticsearch.modifier.sort.entry\";\n\n public readonly modelId?: string;\n\n public constructor(config: CmsEntryElasticsearchSortModifierPluginConfig) {\n super(config.modifySort);\n this.modelId = config.modelId;\n }\n}\n\nexport const createCmsEntryElasticsearchSortModifierPlugin = (\n config: CmsEntryElasticsearchSortModifierPluginConfig\n) => {\n return new CmsEntryElasticsearchSortModifierPlugin(config);\n};\n"],"mappings":";;;;;;;;AAAA;AAmBO,MAAMA,uCAAuC,SAASC,iDAA+B,CAAmB;EAKpGC,WAAW,CAACC,MAAqD,EAAE;IACtE,KAAK,CAACA,MAAM,CAACC,UAAU,CAAC;IAAC;IACzB,IAAI,CAACC,OAAO,GAAGF,MAAM,CAACE,OAAO;EACjC;AACJ;AAAC;AAAA,8BATYL,uCAAuC,UACD,uCAAuC;AAUnF,MAAMM,6CAA6C,GACtDH,MAAqD,IACpD;EACD,OAAO,IAAIH,uCAAuC,CAACG,MAAM,CAAC;AAC9D,CAAC;AAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Plugin } from "@webiny/plugins";
|
|
2
|
-
import { ValueFilterPlugin } from "@webiny/db-dynamodb/plugins/definitions/ValueFilterPlugin";
|
|
3
|
-
import { ModelField, ModelFields } from "../operations/entry/elasticsearch/types";
|
|
4
|
-
import { ElasticsearchBoolQueryConfig } from "@webiny/api-elasticsearch/types";
|
|
5
|
-
interface CmsEntryFilterPluginConfig {
|
|
6
|
-
fieldType: string;
|
|
7
|
-
exec: (params: ExecParams) => void;
|
|
8
|
-
}
|
|
9
|
-
interface ApplyParams {
|
|
10
|
-
key: string;
|
|
11
|
-
value: any;
|
|
12
|
-
query: ElasticsearchBoolQueryConfig;
|
|
13
|
-
operator: string;
|
|
14
|
-
field: ModelField;
|
|
15
|
-
}
|
|
16
|
-
export interface ApplyFilteringCb {
|
|
17
|
-
(params: ApplyParams): void;
|
|
18
|
-
}
|
|
19
|
-
export interface GetFilterPluginCb {
|
|
20
|
-
(type: string): CmsEntryFilterPlugin;
|
|
21
|
-
}
|
|
22
|
-
interface ExecParams {
|
|
23
|
-
applyFiltering: ApplyFilteringCb;
|
|
24
|
-
getFilterPlugin: GetFilterPluginCb;
|
|
25
|
-
key: string;
|
|
26
|
-
value: any;
|
|
27
|
-
operator: string;
|
|
28
|
-
field: ModelField;
|
|
29
|
-
fields: ModelFields;
|
|
30
|
-
query: ElasticsearchBoolQueryConfig;
|
|
31
|
-
}
|
|
32
|
-
export interface CmsEntryFilterPluginCreateResponse {
|
|
33
|
-
field: ModelField;
|
|
34
|
-
path: string;
|
|
35
|
-
fieldPathId: string;
|
|
36
|
-
plugin: ValueFilterPlugin;
|
|
37
|
-
negate: boolean;
|
|
38
|
-
compareValue: any;
|
|
39
|
-
transformValue: <I = any, O = any>(value: I) => O;
|
|
40
|
-
}
|
|
41
|
-
export declare class CmsEntryFilterPlugin extends Plugin {
|
|
42
|
-
static readonly type: string;
|
|
43
|
-
static readonly ALL: string;
|
|
44
|
-
private readonly config;
|
|
45
|
-
readonly fieldType: string;
|
|
46
|
-
constructor(config: CmsEntryFilterPluginConfig);
|
|
47
|
-
exec(params: ExecParams): void;
|
|
48
|
-
}
|
|
49
|
-
export {};
|