@webiny/api-headless-cms-ddb-es 0.0.0-unstable.eb196ccd2f → 0.0.0-unstable.eb81deee7e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 -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 +9 -0
- package/feature.js +55 -0
- package/feature.js.map +1 -0
- package/index.d.ts +2 -3
- package/index.js +2 -225
- 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 +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 +53 -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 +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 +40 -36
- package/requestFeature.d.ts +20 -0
- package/requestFeature.js +54 -0
- package/requestFeature.js.map +1 -0
- package/tasks/CreateElasticsearchIndexTask.d.ts +13 -0
- package/tasks/CreateElasticsearchIndexTask.js +40 -0
- package/tasks/CreateElasticsearchIndexTask.js.map +1 -0
- package/types.d.ts +12 -159
- package/types.js +7 -39
- package/types.js.map +1 -1
- package/configurations.d.ts +0 -19
- package/configurations.js +0 -49
- package/configurations.js.map +0 -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
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Plugin } from "@webiny/plugins/Plugin";
|
|
2
|
-
import type { CmsModelField } from "@webiny/api-headless-cms/types";
|
|
3
|
-
export interface CreatePathCallableParams<T = any> {
|
|
4
|
-
field: CmsModelField;
|
|
5
|
-
key: string;
|
|
6
|
-
value: T;
|
|
7
|
-
originalValue: any;
|
|
8
|
-
}
|
|
9
|
-
export interface CreatePathCallable<T = any> {
|
|
10
|
-
(params: CreatePathCallableParams<T>): string;
|
|
11
|
-
}
|
|
12
|
-
export interface TransformCallableParams<T = any> {
|
|
13
|
-
field: CmsModelField;
|
|
14
|
-
value: T;
|
|
15
|
-
}
|
|
16
|
-
export interface TransformCallable<T = any> {
|
|
17
|
-
(params: TransformCallableParams<T>): string;
|
|
18
|
-
}
|
|
19
|
-
export interface CmsEntryElasticsearchQueryBuilderValueSearchPluginParams {
|
|
20
|
-
fieldType: string;
|
|
21
|
-
path?: string | CreatePathCallable;
|
|
22
|
-
transform: TransformCallable;
|
|
23
|
-
}
|
|
24
|
-
export declare class CmsEntryElasticsearchQueryBuilderValueSearchPlugin extends Plugin {
|
|
25
|
-
static readonly type: string;
|
|
26
|
-
private readonly config;
|
|
27
|
-
get fieldType(): string;
|
|
28
|
-
constructor(params: CmsEntryElasticsearchQueryBuilderValueSearchPluginParams);
|
|
29
|
-
transform(params: TransformCallableParams): any;
|
|
30
|
-
createPath(params: CreatePathCallableParams): string | null;
|
|
31
|
-
}
|
|
32
|
-
export declare const createCmsEntryElasticsearchQueryBuilderValueSearchPlugin: (params: CmsEntryElasticsearchQueryBuilderValueSearchPluginParams) => CmsEntryElasticsearchQueryBuilderValueSearchPlugin;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createCmsEntryElasticsearchQueryBuilderValueSearchPlugin = exports.CmsEntryElasticsearchQueryBuilderValueSearchPlugin = void 0;
|
|
7
|
-
var _Plugin = require("@webiny/plugins/Plugin");
|
|
8
|
-
class CmsEntryElasticsearchQueryBuilderValueSearchPlugin extends _Plugin.Plugin {
|
|
9
|
-
static type = "cms-elastic-search-query-builder-value-search";
|
|
10
|
-
get fieldType() {
|
|
11
|
-
return this.config.fieldType;
|
|
12
|
-
}
|
|
13
|
-
constructor(params) {
|
|
14
|
-
super();
|
|
15
|
-
this.config = params;
|
|
16
|
-
/**
|
|
17
|
-
* There is a type on the constructor, TS just doesn't see it.
|
|
18
|
-
*/
|
|
19
|
-
// @ts-expect-error
|
|
20
|
-
this.name = `${this.constructor.type}-${this.config.fieldType}`;
|
|
21
|
-
}
|
|
22
|
-
transform(params) {
|
|
23
|
-
return this.config.transform(params);
|
|
24
|
-
}
|
|
25
|
-
createPath(params) {
|
|
26
|
-
if (typeof this.config.path === "function") {
|
|
27
|
-
return this.config.path(params);
|
|
28
|
-
} else if (typeof this.config.path === "string") {
|
|
29
|
-
return this.config.path;
|
|
30
|
-
}
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
exports.CmsEntryElasticsearchQueryBuilderValueSearchPlugin = CmsEntryElasticsearchQueryBuilderValueSearchPlugin;
|
|
35
|
-
const createCmsEntryElasticsearchQueryBuilderValueSearchPlugin = params => {
|
|
36
|
-
return new CmsEntryElasticsearchQueryBuilderValueSearchPlugin(params);
|
|
37
|
-
};
|
|
38
|
-
exports.createCmsEntryElasticsearchQueryBuilderValueSearchPlugin = createCmsEntryElasticsearchQueryBuilderValueSearchPlugin;
|
|
39
|
-
|
|
40
|
-
//# sourceMappingURL=CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_Plugin","require","CmsEntryElasticsearchQueryBuilderValueSearchPlugin","Plugin","type","fieldType","config","constructor","params","name","transform","createPath","path","exports","createCmsEntryElasticsearchQueryBuilderValueSearchPlugin"],"sources":["CmsEntryElasticsearchQueryBuilderValueSearchPlugin.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins/Plugin\";\nimport type { CmsModelField } from \"@webiny/api-headless-cms/types\";\n\nexport interface CreatePathCallableParams<T = any> {\n field: CmsModelField;\n key: string;\n value: T;\n originalValue: any;\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 /**\n * There is a type on the constructor, TS just doesn't see it.\n */\n // @ts-expect-error\n this.name = `${this.constructor.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,IAAAA,OAAA,GAAAC,OAAA;AA2BO,MAAMC,kDAAkD,SAASC,cAAM,CAAC;EAC3E,OAAgCC,IAAI,GAAW,+CAA+C;EAI9F,IAAWC,SAASA,CAAA,EAAW;IAC3B,OAAO,IAAI,CAACC,MAAM,CAACD,SAAS;EAChC;EAEOE,WAAWA,CAACC,MAAgE,EAAE;IACjF,KAAK,CAAC,CAAC;IAEP,IAAI,CAACF,MAAM,GAAGE,MAAM;IACpB;AACR;AACA;IACQ;IACA,IAAI,CAACC,IAAI,GAAG,GAAG,IAAI,CAACF,WAAW,CAACH,IAAI,IAAI,IAAI,CAACE,MAAM,CAACD,SAAS,EAAE;EACnE;EAEOK,SAASA,CAACF,MAA+B,EAAO;IACnD,OAAO,IAAI,CAACF,MAAM,CAACI,SAAS,CAACF,MAAM,CAAC;EACxC;EAEOG,UAAUA,CAACH,MAAgC,EAAiB;IAC/D,IAAI,OAAO,IAAI,CAACF,MAAM,CAACM,IAAI,KAAK,UAAU,EAAE;MACxC,OAAO,IAAI,CAACN,MAAM,CAACM,IAAI,CAACJ,MAAM,CAAC;IACnC,CAAC,MAAM,IAAI,OAAO,IAAI,CAACF,MAAM,CAACM,IAAI,KAAK,QAAQ,EAAE;MAC7C,OAAO,IAAI,CAACN,MAAM,CAACM,IAAI;IAC3B;IACA,OAAO,IAAI;EACf;AACJ;AAACC,OAAA,CAAAX,kDAAA,GAAAA,kDAAA;AAEM,MAAMY,wDAAwD,GACjEN,MAAgE,IAC/D;EACD,OAAO,IAAIN,kDAAkD,CAACM,MAAM,CAAC;AACzE,CAAC;AAACK,OAAA,CAAAC,wDAAA,GAAAA,wDAAA","ignoreList":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ModifyQueryCallable, ModifyQueryParams as BaseModifyQueryParams } from "@webiny/api-elasticsearch";
|
|
2
|
-
import { ElasticsearchQueryModifierPlugin } from "@webiny/api-elasticsearch";
|
|
3
|
-
import type { CmsModel } from "@webiny/api-headless-cms/types";
|
|
4
|
-
export interface ModifyQueryParams extends BaseModifyQueryParams {
|
|
5
|
-
model: CmsModel;
|
|
6
|
-
}
|
|
7
|
-
export interface CmsEntryElasticsearchQueryModifierPluginConfig {
|
|
8
|
-
modifyQuery: ModifyQueryCallable<ModifyQueryParams>;
|
|
9
|
-
/**
|
|
10
|
-
* If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.
|
|
11
|
-
*/
|
|
12
|
-
modelId?: string;
|
|
13
|
-
}
|
|
14
|
-
export declare class CmsEntryElasticsearchQueryModifierPlugin extends ElasticsearchQueryModifierPlugin<ModifyQueryParams> {
|
|
15
|
-
static readonly type: string;
|
|
16
|
-
readonly modelId?: string;
|
|
17
|
-
constructor(config: CmsEntryElasticsearchQueryModifierPluginConfig);
|
|
18
|
-
}
|
|
19
|
-
export declare const createCmsEntryElasticsearchQueryModifierPlugin: (config: CmsEntryElasticsearchQueryModifierPluginConfig) => CmsEntryElasticsearchQueryModifierPlugin;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createCmsEntryElasticsearchQueryModifierPlugin = exports.CmsEntryElasticsearchQueryModifierPlugin = void 0;
|
|
7
|
-
var _apiElasticsearch = require("@webiny/api-elasticsearch");
|
|
8
|
-
class CmsEntryElasticsearchQueryModifierPlugin extends _apiElasticsearch.ElasticsearchQueryModifierPlugin {
|
|
9
|
-
static type = "cms.elasticsearch.modifier.query.entry";
|
|
10
|
-
constructor(config) {
|
|
11
|
-
super(config.modifyQuery);
|
|
12
|
-
this.modelId = config.modelId;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.CmsEntryElasticsearchQueryModifierPlugin = CmsEntryElasticsearchQueryModifierPlugin;
|
|
16
|
-
const createCmsEntryElasticsearchQueryModifierPlugin = config => {
|
|
17
|
-
return new CmsEntryElasticsearchQueryModifierPlugin(config);
|
|
18
|
-
};
|
|
19
|
-
exports.createCmsEntryElasticsearchQueryModifierPlugin = createCmsEntryElasticsearchQueryModifierPlugin;
|
|
20
|
-
|
|
21
|
-
//# sourceMappingURL=CmsEntryElasticsearchQueryModifierPlugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_apiElasticsearch","require","CmsEntryElasticsearchQueryModifierPlugin","ElasticsearchQueryModifierPlugin","type","constructor","config","modifyQuery","modelId","exports","createCmsEntryElasticsearchQueryModifierPlugin"],"sources":["CmsEntryElasticsearchQueryModifierPlugin.ts"],"sourcesContent":["import type {\n ModifyQueryCallable,\n ModifyQueryParams as BaseModifyQueryParams\n} from \"@webiny/api-elasticsearch\";\nimport { ElasticsearchQueryModifierPlugin } from \"@webiny/api-elasticsearch\";\nimport type { 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":";;;;;;AAIA,IAAAA,iBAAA,GAAAC,OAAA;AAeO,MAAMC,wCAAwC,SAASC,kDAAgC,CAAoB;EAC9G,OAAgCC,IAAI,GAAW,wCAAwC;EAIhFC,WAAWA,CAACC,MAAsD,EAAE;IACvE,KAAK,CAACA,MAAM,CAACC,WAAW,CAAC;IAEzB,IAAI,CAACC,OAAO,GAAGF,MAAM,CAACE,OAAO;EACjC;AACJ;AAACC,OAAA,CAAAP,wCAAA,GAAAA,wCAAA;AAEM,MAAMQ,8CAA8C,GACvDJ,MAAsD,IACrD;EACD,OAAO,IAAIJ,wCAAwC,CAACI,MAAM,CAAC;AAC/D,CAAC;AAACG,OAAA,CAAAC,8CAAA,GAAAA,8CAAA","ignoreList":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ModifySortCallable, ModifySortParams as BaseModifySortParams } from "@webiny/api-elasticsearch";
|
|
2
|
-
import { ElasticsearchSortModifierPlugin } from "@webiny/api-elasticsearch";
|
|
3
|
-
import type { CmsModel } from "@webiny/api-headless-cms/types";
|
|
4
|
-
export interface ModifySortParams extends BaseModifySortParams {
|
|
5
|
-
model: CmsModel;
|
|
6
|
-
}
|
|
7
|
-
export interface CmsEntryElasticsearchSortModifierPluginConfig {
|
|
8
|
-
modifySort: ModifySortCallable<ModifySortParams>;
|
|
9
|
-
/**
|
|
10
|
-
* If modelId is not passed, there is no filtering of plugins by it when plugin is applied during the runtime.
|
|
11
|
-
*/
|
|
12
|
-
modelId?: string;
|
|
13
|
-
}
|
|
14
|
-
export declare class CmsEntryElasticsearchSortModifierPlugin extends ElasticsearchSortModifierPlugin<ModifySortParams> {
|
|
15
|
-
static readonly type: string;
|
|
16
|
-
readonly modelId?: string;
|
|
17
|
-
constructor(config: CmsEntryElasticsearchSortModifierPluginConfig);
|
|
18
|
-
}
|
|
19
|
-
export declare const createCmsEntryElasticsearchSortModifierPlugin: (config: CmsEntryElasticsearchSortModifierPluginConfig) => CmsEntryElasticsearchSortModifierPlugin;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createCmsEntryElasticsearchSortModifierPlugin = exports.CmsEntryElasticsearchSortModifierPlugin = void 0;
|
|
7
|
-
var _apiElasticsearch = require("@webiny/api-elasticsearch");
|
|
8
|
-
class CmsEntryElasticsearchSortModifierPlugin extends _apiElasticsearch.ElasticsearchSortModifierPlugin {
|
|
9
|
-
static type = "cms.elasticsearch.modifier.sort.entry";
|
|
10
|
-
constructor(config) {
|
|
11
|
-
super(config.modifySort);
|
|
12
|
-
this.modelId = config.modelId;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.CmsEntryElasticsearchSortModifierPlugin = CmsEntryElasticsearchSortModifierPlugin;
|
|
16
|
-
const createCmsEntryElasticsearchSortModifierPlugin = config => {
|
|
17
|
-
return new CmsEntryElasticsearchSortModifierPlugin(config);
|
|
18
|
-
};
|
|
19
|
-
exports.createCmsEntryElasticsearchSortModifierPlugin = createCmsEntryElasticsearchSortModifierPlugin;
|
|
20
|
-
|
|
21
|
-
//# sourceMappingURL=CmsEntryElasticsearchSortModifierPlugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_apiElasticsearch","require","CmsEntryElasticsearchSortModifierPlugin","ElasticsearchSortModifierPlugin","type","constructor","config","modifySort","modelId","exports","createCmsEntryElasticsearchSortModifierPlugin"],"sources":["CmsEntryElasticsearchSortModifierPlugin.ts"],"sourcesContent":["import type {\n ModifySortCallable,\n ModifySortParams as BaseModifySortParams\n} from \"@webiny/api-elasticsearch\";\nimport { ElasticsearchSortModifierPlugin } from \"@webiny/api-elasticsearch\";\nimport type { 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":";;;;;;AAIA,IAAAA,iBAAA,GAAAC,OAAA;AAeO,MAAMC,uCAAuC,SAASC,iDAA+B,CAAmB;EAC3G,OAAgCC,IAAI,GAAW,uCAAuC;EAI/EC,WAAWA,CAACC,MAAqD,EAAE;IACtE,KAAK,CAACA,MAAM,CAACC,UAAU,CAAC;IACxB,IAAI,CAACC,OAAO,GAAGF,MAAM,CAACE,OAAO;EACjC;AACJ;AAACC,OAAA,CAAAP,uCAAA,GAAAA,uCAAA;AAEM,MAAMQ,6CAA6C,GACtDJ,MAAqD,IACpD;EACD,OAAO,IAAIJ,uCAAuC,CAACI,MAAM,CAAC;AAC9D,CAAC;AAACG,OAAA,CAAAC,6CAAA,GAAAA,6CAAA","ignoreList":[]}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Plugin } from "@webiny/plugins";
|
|
2
|
-
import type { CmsEntry, CmsEntryValues, CmsModel } from "@webiny/api-headless-cms/types";
|
|
3
|
-
interface CmsEntryElasticsearchValuesModifierCbParamsSetValuesCb<T = CmsEntryValues> {
|
|
4
|
-
(prev: Partial<T>): Partial<T>;
|
|
5
|
-
}
|
|
6
|
-
interface CmsEntryElasticsearchValuesModifierCbParams<T = CmsEntryValues> {
|
|
7
|
-
model: CmsModel;
|
|
8
|
-
entry: CmsEntry<T>;
|
|
9
|
-
values: T;
|
|
10
|
-
setValues: (cb: CmsEntryElasticsearchValuesModifierCbParamsSetValuesCb<T>) => void;
|
|
11
|
-
}
|
|
12
|
-
export interface CmsEntryElasticsearchValuesModifierCb<T = CmsEntryValues> {
|
|
13
|
-
(params: CmsEntryElasticsearchValuesModifierCbParams<T>): void;
|
|
14
|
-
}
|
|
15
|
-
export interface CmsEntryElasticsearchValuesModifierExecParams<T = CmsEntryValues> {
|
|
16
|
-
model: CmsModel;
|
|
17
|
-
entry: CmsEntry<T>;
|
|
18
|
-
values: Partial<T>;
|
|
19
|
-
}
|
|
20
|
-
export type CmsEntryElasticsearchValuesModifierParams<T> = CmsEntryElasticsearchValuesModifierCb<T> | {
|
|
21
|
-
models: string[];
|
|
22
|
-
modifier: CmsEntryElasticsearchValuesModifierCb<T>;
|
|
23
|
-
};
|
|
24
|
-
export declare class CmsEntryElasticsearchValuesModifier<T = CmsEntryValues> extends Plugin {
|
|
25
|
-
static readonly type: string;
|
|
26
|
-
private readonly models?;
|
|
27
|
-
private readonly cb;
|
|
28
|
-
constructor(params: CmsEntryElasticsearchValuesModifierParams<T>);
|
|
29
|
-
canModify(modelId: string): boolean;
|
|
30
|
-
modify(params: CmsEntryElasticsearchValuesModifierExecParams<T>): Partial<T>;
|
|
31
|
-
}
|
|
32
|
-
export declare const createCmsEntryElasticsearchValuesModifier: <T = CmsEntryValues>(params: CmsEntryElasticsearchValuesModifierParams<T>) => CmsEntryElasticsearchValuesModifier<T>;
|
|
33
|
-
export {};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createCmsEntryElasticsearchValuesModifier = exports.CmsEntryElasticsearchValuesModifier = void 0;
|
|
7
|
-
var _plugins = require("@webiny/plugins");
|
|
8
|
-
class CmsEntryElasticsearchValuesModifier extends _plugins.Plugin {
|
|
9
|
-
static type = "cms.entry.elasticsearch.values.modifier";
|
|
10
|
-
models = undefined;
|
|
11
|
-
constructor(params) {
|
|
12
|
-
super();
|
|
13
|
-
if (typeof params === "function") {
|
|
14
|
-
this.cb = params;
|
|
15
|
-
} else {
|
|
16
|
-
this.cb = params.modifier;
|
|
17
|
-
this.models = params.models.length > 0 ? params.models : undefined;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
canModify(modelId) {
|
|
21
|
-
if (!this.models?.length) {
|
|
22
|
-
return true;
|
|
23
|
-
}
|
|
24
|
-
return this.models.includes(modelId);
|
|
25
|
-
}
|
|
26
|
-
modify(params) {
|
|
27
|
-
const {
|
|
28
|
-
model,
|
|
29
|
-
entry,
|
|
30
|
-
values: initialValues
|
|
31
|
-
} = params;
|
|
32
|
-
let values = initialValues;
|
|
33
|
-
this.cb({
|
|
34
|
-
model,
|
|
35
|
-
entry,
|
|
36
|
-
values,
|
|
37
|
-
setValues: cb => {
|
|
38
|
-
values = cb(values);
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
return values;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.CmsEntryElasticsearchValuesModifier = CmsEntryElasticsearchValuesModifier;
|
|
45
|
-
const createCmsEntryElasticsearchValuesModifier = params => {
|
|
46
|
-
return new CmsEntryElasticsearchValuesModifier(params);
|
|
47
|
-
};
|
|
48
|
-
exports.createCmsEntryElasticsearchValuesModifier = createCmsEntryElasticsearchValuesModifier;
|
|
49
|
-
|
|
50
|
-
//# sourceMappingURL=CmsEntryElasticsearchValuesModifier.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_plugins","require","CmsEntryElasticsearchValuesModifier","Plugin","type","models","undefined","constructor","params","cb","modifier","length","canModify","modelId","includes","modify","model","entry","values","initialValues","setValues","exports","createCmsEntryElasticsearchValuesModifier"],"sources":["CmsEntryElasticsearchValuesModifier.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins\";\nimport type { CmsEntry, CmsEntryValues, CmsModel } from \"@webiny/api-headless-cms/types\";\n\ninterface CmsEntryElasticsearchValuesModifierCbParamsSetValuesCb<T = CmsEntryValues> {\n (prev: Partial<T>): Partial<T>;\n}\n\ninterface CmsEntryElasticsearchValuesModifierCbParams<T = CmsEntryValues> {\n model: CmsModel;\n entry: CmsEntry<T>;\n values: T;\n setValues: (cb: CmsEntryElasticsearchValuesModifierCbParamsSetValuesCb<T>) => void;\n}\n\nexport interface CmsEntryElasticsearchValuesModifierCb<T = CmsEntryValues> {\n (params: CmsEntryElasticsearchValuesModifierCbParams<T>): void;\n}\n\nexport interface CmsEntryElasticsearchValuesModifierExecParams<T = CmsEntryValues> {\n model: CmsModel;\n entry: CmsEntry<T>;\n values: Partial<T>;\n}\n\nexport type CmsEntryElasticsearchValuesModifierParams<T> =\n | CmsEntryElasticsearchValuesModifierCb<T>\n | {\n models: string[];\n modifier: CmsEntryElasticsearchValuesModifierCb<T>;\n };\n\nexport class CmsEntryElasticsearchValuesModifier<T = CmsEntryValues> extends Plugin {\n public static override readonly type: string = \"cms.entry.elasticsearch.values.modifier\";\n\n private readonly models?: string[] = undefined;\n private readonly cb: CmsEntryElasticsearchValuesModifierCb<T>;\n\n public constructor(params: CmsEntryElasticsearchValuesModifierParams<T>) {\n super();\n if (typeof params === \"function\") {\n this.cb = params;\n } else {\n this.cb = params.modifier;\n this.models = params.models.length > 0 ? params.models : undefined;\n }\n }\n\n public canModify(modelId: string): boolean {\n if (!this.models?.length) {\n return true;\n }\n return this.models.includes(modelId);\n }\n\n public modify(params: CmsEntryElasticsearchValuesModifierExecParams<T>): Partial<T> {\n const { model, entry, values: initialValues } = params;\n let values: any = initialValues;\n this.cb({\n model,\n entry,\n values,\n setValues: (cb: CmsEntryElasticsearchValuesModifierCbParamsSetValuesCb<T>) => {\n values = cb(values);\n }\n });\n return values;\n }\n}\n\nexport const createCmsEntryElasticsearchValuesModifier = <T = CmsEntryValues>(\n params: CmsEntryElasticsearchValuesModifierParams<T>\n) => {\n return new CmsEntryElasticsearchValuesModifier<T>(params);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AA+BO,MAAMC,mCAAmC,SAA6BC,eAAM,CAAC;EAChF,OAAgCC,IAAI,GAAW,yCAAyC;EAEvEC,MAAM,GAAcC,SAAS;EAGvCC,WAAWA,CAACC,MAAoD,EAAE;IACrE,KAAK,CAAC,CAAC;IACP,IAAI,OAAOA,MAAM,KAAK,UAAU,EAAE;MAC9B,IAAI,CAACC,EAAE,GAAGD,MAAM;IACpB,CAAC,MAAM;MACH,IAAI,CAACC,EAAE,GAAGD,MAAM,CAACE,QAAQ;MACzB,IAAI,CAACL,MAAM,GAAGG,MAAM,CAACH,MAAM,CAACM,MAAM,GAAG,CAAC,GAAGH,MAAM,CAACH,MAAM,GAAGC,SAAS;IACtE;EACJ;EAEOM,SAASA,CAACC,OAAe,EAAW;IACvC,IAAI,CAAC,IAAI,CAACR,MAAM,EAAEM,MAAM,EAAE;MACtB,OAAO,IAAI;IACf;IACA,OAAO,IAAI,CAACN,MAAM,CAACS,QAAQ,CAACD,OAAO,CAAC;EACxC;EAEOE,MAAMA,CAACP,MAAwD,EAAc;IAChF,MAAM;MAAEQ,KAAK;MAAEC,KAAK;MAAEC,MAAM,EAAEC;IAAc,CAAC,GAAGX,MAAM;IACtD,IAAIU,MAAW,GAAGC,aAAa;IAC/B,IAAI,CAACV,EAAE,CAAC;MACJO,KAAK;MACLC,KAAK;MACLC,MAAM;MACNE,SAAS,EAAGX,EAA6D,IAAK;QAC1ES,MAAM,GAAGT,EAAE,CAACS,MAAM,CAAC;MACvB;IACJ,CAAC,CAAC;IACF,OAAOA,MAAM;EACjB;AACJ;AAACG,OAAA,CAAAnB,mCAAA,GAAAA,mCAAA;AAEM,MAAMoB,yCAAyC,GAClDd,MAAoD,IACnD;EACD,OAAO,IAAIN,mCAAmC,CAAIM,MAAM,CAAC;AAC7D,CAAC;AAACa,OAAA,CAAAC,yCAAA,GAAAA,yCAAA","ignoreList":[]}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Plugin } from "@webiny/plugins";
|
|
2
|
-
import type { ValueFilterPlugin } from "@webiny/db-dynamodb/plugins/definitions/ValueFilterPlugin";
|
|
3
|
-
import type { ModelField, ModelFields } from "../operations/entry/elasticsearch/types";
|
|
4
|
-
import type { 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 {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.CmsEntryFilterPlugin = void 0;
|
|
7
|
-
var _plugins = require("@webiny/plugins");
|
|
8
|
-
class CmsEntryFilterPlugin extends _plugins.Plugin {
|
|
9
|
-
static type = "cms.elasticsearch.entry.filter";
|
|
10
|
-
static ALL = "*";
|
|
11
|
-
constructor(config) {
|
|
12
|
-
super();
|
|
13
|
-
this.config = config;
|
|
14
|
-
this.fieldType = this.config.fieldType;
|
|
15
|
-
}
|
|
16
|
-
exec(params) {
|
|
17
|
-
return this.config.exec(params);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.CmsEntryFilterPlugin = CmsEntryFilterPlugin;
|
|
21
|
-
|
|
22
|
-
//# sourceMappingURL=CmsEntryFilterPlugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_plugins","require","CmsEntryFilterPlugin","Plugin","type","ALL","constructor","config","fieldType","exec","params","exports"],"sources":["CmsEntryFilterPlugin.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins\";\nimport type { ValueFilterPlugin } from \"@webiny/db-dynamodb/plugins/definitions/ValueFilterPlugin\";\nimport type { ModelField, ModelFields } from \"~/operations/entry/elasticsearch/types\";\nimport type { ElasticsearchBoolQueryConfig } from \"@webiny/api-elasticsearch/types\";\n\ninterface CmsEntryFilterPluginConfig {\n fieldType: string;\n exec: (params: ExecParams) => void;\n}\ninterface ApplyParams {\n key: string;\n value: any;\n query: ElasticsearchBoolQueryConfig;\n operator: string;\n field: ModelField;\n}\nexport interface ApplyFilteringCb {\n (params: ApplyParams): void;\n}\n\nexport interface GetFilterPluginCb {\n (type: string): CmsEntryFilterPlugin;\n}\n\ninterface ExecParams {\n applyFiltering: ApplyFilteringCb;\n getFilterPlugin: GetFilterPluginCb;\n key: string;\n value: any;\n operator: string;\n field: ModelField;\n fields: ModelFields;\n query: ElasticsearchBoolQueryConfig;\n}\n\nexport interface CmsEntryFilterPluginCreateResponse {\n field: ModelField;\n path: string;\n fieldPathId: string;\n plugin: ValueFilterPlugin;\n negate: boolean;\n compareValue: any;\n transformValue: <I = any, O = any>(value: I) => O;\n}\n\nexport class CmsEntryFilterPlugin extends Plugin {\n public static override readonly type: string = \"cms.elasticsearch.entry.filter\";\n public static readonly ALL: string = \"*\";\n\n private readonly config: CmsEntryFilterPluginConfig;\n public readonly fieldType: string;\n\n public constructor(config: CmsEntryFilterPluginConfig) {\n super();\n this.config = config;\n this.fieldType = this.config.fieldType;\n }\n\n public exec(params: ExecParams) {\n return this.config.exec(params);\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AA6CO,MAAMC,oBAAoB,SAASC,eAAM,CAAC;EAC7C,OAAgCC,IAAI,GAAW,gCAAgC;EAC/E,OAAuBC,GAAG,GAAW,GAAG;EAKjCC,WAAWA,CAACC,MAAkC,EAAE;IACnD,KAAK,CAAC,CAAC;IACP,IAAI,CAACA,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACC,SAAS,GAAG,IAAI,CAACD,MAAM,CAACC,SAAS;EAC1C;EAEOC,IAAIA,CAACC,MAAkB,EAAE;IAC5B,OAAO,IAAI,CAACH,MAAM,CAACE,IAAI,CAACC,MAAM,CAAC;EACnC;AACJ;AAACC,OAAA,CAAAT,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
package/plugins/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from "./CmsEntryElasticsearchBodyModifierPlugin";
|
|
2
|
-
export * from "./CmsEntryElasticsearchIndexPlugin";
|
|
3
|
-
export * from "./CmsEntryElasticsearchQueryBuilderValueSearchPlugin";
|
|
4
|
-
export * from "./CmsEntryElasticsearchQueryModifierPlugin";
|
|
5
|
-
export * from "./CmsEntryElasticsearchSortModifierPlugin";
|
|
6
|
-
export * from "./CmsEntryElasticsearchFullTextSearchPlugin";
|
|
7
|
-
export * from "./CmsElasticsearchModelFieldPlugin";
|
|
8
|
-
export * from "./CmsEntryElasticsearchValuesModifier";
|
package/plugins/index.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _CmsEntryElasticsearchBodyModifierPlugin = require("./CmsEntryElasticsearchBodyModifierPlugin");
|
|
7
|
-
Object.keys(_CmsEntryElasticsearchBodyModifierPlugin).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _CmsEntryElasticsearchBodyModifierPlugin[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _CmsEntryElasticsearchBodyModifierPlugin[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _CmsEntryElasticsearchIndexPlugin = require("./CmsEntryElasticsearchIndexPlugin");
|
|
18
|
-
Object.keys(_CmsEntryElasticsearchIndexPlugin).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _CmsEntryElasticsearchIndexPlugin[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _CmsEntryElasticsearchIndexPlugin[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
var _CmsEntryElasticsearchQueryBuilderValueSearchPlugin = require("./CmsEntryElasticsearchQueryBuilderValueSearchPlugin");
|
|
29
|
-
Object.keys(_CmsEntryElasticsearchQueryBuilderValueSearchPlugin).forEach(function (key) {
|
|
30
|
-
if (key === "default" || key === "__esModule") return;
|
|
31
|
-
if (key in exports && exports[key] === _CmsEntryElasticsearchQueryBuilderValueSearchPlugin[key]) return;
|
|
32
|
-
Object.defineProperty(exports, key, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () {
|
|
35
|
-
return _CmsEntryElasticsearchQueryBuilderValueSearchPlugin[key];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
var _CmsEntryElasticsearchQueryModifierPlugin = require("./CmsEntryElasticsearchQueryModifierPlugin");
|
|
40
|
-
Object.keys(_CmsEntryElasticsearchQueryModifierPlugin).forEach(function (key) {
|
|
41
|
-
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (key in exports && exports[key] === _CmsEntryElasticsearchQueryModifierPlugin[key]) return;
|
|
43
|
-
Object.defineProperty(exports, key, {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () {
|
|
46
|
-
return _CmsEntryElasticsearchQueryModifierPlugin[key];
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
var _CmsEntryElasticsearchSortModifierPlugin = require("./CmsEntryElasticsearchSortModifierPlugin");
|
|
51
|
-
Object.keys(_CmsEntryElasticsearchSortModifierPlugin).forEach(function (key) {
|
|
52
|
-
if (key === "default" || key === "__esModule") return;
|
|
53
|
-
if (key in exports && exports[key] === _CmsEntryElasticsearchSortModifierPlugin[key]) return;
|
|
54
|
-
Object.defineProperty(exports, key, {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return _CmsEntryElasticsearchSortModifierPlugin[key];
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
var _CmsEntryElasticsearchFullTextSearchPlugin = require("./CmsEntryElasticsearchFullTextSearchPlugin");
|
|
62
|
-
Object.keys(_CmsEntryElasticsearchFullTextSearchPlugin).forEach(function (key) {
|
|
63
|
-
if (key === "default" || key === "__esModule") return;
|
|
64
|
-
if (key in exports && exports[key] === _CmsEntryElasticsearchFullTextSearchPlugin[key]) return;
|
|
65
|
-
Object.defineProperty(exports, key, {
|
|
66
|
-
enumerable: true,
|
|
67
|
-
get: function () {
|
|
68
|
-
return _CmsEntryElasticsearchFullTextSearchPlugin[key];
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
var _CmsElasticsearchModelFieldPlugin = require("./CmsElasticsearchModelFieldPlugin");
|
|
73
|
-
Object.keys(_CmsElasticsearchModelFieldPlugin).forEach(function (key) {
|
|
74
|
-
if (key === "default" || key === "__esModule") return;
|
|
75
|
-
if (key in exports && exports[key] === _CmsElasticsearchModelFieldPlugin[key]) return;
|
|
76
|
-
Object.defineProperty(exports, key, {
|
|
77
|
-
enumerable: true,
|
|
78
|
-
get: function () {
|
|
79
|
-
return _CmsElasticsearchModelFieldPlugin[key];
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
var _CmsEntryElasticsearchValuesModifier = require("./CmsEntryElasticsearchValuesModifier");
|
|
84
|
-
Object.keys(_CmsEntryElasticsearchValuesModifier).forEach(function (key) {
|
|
85
|
-
if (key === "default" || key === "__esModule") return;
|
|
86
|
-
if (key in exports && exports[key] === _CmsEntryElasticsearchValuesModifier[key]) return;
|
|
87
|
-
Object.defineProperty(exports, key, {
|
|
88
|
-
enumerable: true,
|
|
89
|
-
get: function () {
|
|
90
|
-
return _CmsEntryElasticsearchValuesModifier[key];
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
//# sourceMappingURL=index.js.map
|
package/plugins/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_CmsEntryElasticsearchBodyModifierPlugin","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_CmsEntryElasticsearchIndexPlugin","_CmsEntryElasticsearchQueryBuilderValueSearchPlugin","_CmsEntryElasticsearchQueryModifierPlugin","_CmsEntryElasticsearchSortModifierPlugin","_CmsEntryElasticsearchFullTextSearchPlugin","_CmsElasticsearchModelFieldPlugin","_CmsEntryElasticsearchValuesModifier"],"sources":["index.ts"],"sourcesContent":["export * from \"./CmsEntryElasticsearchBodyModifierPlugin\";\nexport * from \"./CmsEntryElasticsearchIndexPlugin\";\nexport * from \"./CmsEntryElasticsearchQueryBuilderValueSearchPlugin\";\nexport * from \"./CmsEntryElasticsearchQueryModifierPlugin\";\nexport * from \"./CmsEntryElasticsearchSortModifierPlugin\";\nexport * from \"./CmsEntryElasticsearchFullTextSearchPlugin\";\nexport * from \"./CmsElasticsearchModelFieldPlugin\";\nexport * from \"./CmsEntryElasticsearchValuesModifier\";\n"],"mappings":";;;;;AAAA,IAAAA,wCAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,wCAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,wCAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,wCAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,iCAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,iCAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,iCAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,iCAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,mDAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,mDAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,mDAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,mDAAA,CAAAN,GAAA;IAAA;EAAA;AAAA;AACA,IAAAO,yCAAA,GAAAX,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAS,yCAAA,EAAAR,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAO,yCAAA,CAAAP,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAG,yCAAA,CAAAP,GAAA;IAAA;EAAA;AAAA;AACA,IAAAQ,wCAAA,GAAAZ,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAU,wCAAA,EAAAT,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAQ,wCAAA,CAAAR,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAI,wCAAA,CAAAR,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,0CAAA,GAAAb,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,0CAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAS,0CAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAK,0CAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AACA,IAAAU,iCAAA,GAAAd,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAY,iCAAA,EAAAX,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAU,iCAAA,CAAAV,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAM,iCAAA,CAAAV,GAAA;IAAA;EAAA;AAAA;AACA,IAAAW,oCAAA,GAAAf,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAa,oCAAA,EAAAZ,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAW,oCAAA,CAAAX,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAO,oCAAA,CAAAX,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createIndexTaskPluginTest = void 0;
|
|
7
|
-
var _apiElasticsearchTasks = require("@webiny/api-elasticsearch-tasks");
|
|
8
|
-
var _configurations = require("../configurations");
|
|
9
|
-
const createIndexTaskPluginTest = () => {
|
|
10
|
-
return (0, _apiElasticsearchTasks.createElasticsearchIndexTaskPlugin)({
|
|
11
|
-
name: "elasticsearch.cms.createIndexTaskPlugin",
|
|
12
|
-
getIndexList: async ({
|
|
13
|
-
context,
|
|
14
|
-
locale,
|
|
15
|
-
tenant
|
|
16
|
-
}) => {
|
|
17
|
-
const originalTenant = context.tenancy.getCurrentTenant();
|
|
18
|
-
if (!originalTenant) {
|
|
19
|
-
return [];
|
|
20
|
-
}
|
|
21
|
-
const originalLocale = context.i18n.getCurrentLocale("content");
|
|
22
|
-
if (!originalLocale) {
|
|
23
|
-
return [];
|
|
24
|
-
}
|
|
25
|
-
const selectedTenant = await context.tenancy.getTenantById(tenant);
|
|
26
|
-
if (!selectedTenant) {
|
|
27
|
-
return [];
|
|
28
|
-
}
|
|
29
|
-
const selectedLocale = await context.i18n.getLocale(locale);
|
|
30
|
-
if (!selectedLocale) {
|
|
31
|
-
return [];
|
|
32
|
-
}
|
|
33
|
-
const models = await context.cms.listModels();
|
|
34
|
-
if (models.length === 0) {
|
|
35
|
-
return [];
|
|
36
|
-
}
|
|
37
|
-
context.tenancy.setCurrentTenant(selectedTenant);
|
|
38
|
-
context.i18n.setCurrentLocale("content", selectedLocale);
|
|
39
|
-
const indexes = models.map(model => {
|
|
40
|
-
const {
|
|
41
|
-
index
|
|
42
|
-
} = _configurations.configurations.es({
|
|
43
|
-
model: {
|
|
44
|
-
modelId: model.modelId,
|
|
45
|
-
tenant,
|
|
46
|
-
locale
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
return {
|
|
50
|
-
index,
|
|
51
|
-
settings: _configurations.configurations.indexSettings({
|
|
52
|
-
context,
|
|
53
|
-
model: {
|
|
54
|
-
locale
|
|
55
|
-
}
|
|
56
|
-
})
|
|
57
|
-
};
|
|
58
|
-
});
|
|
59
|
-
context.tenancy.setCurrentTenant(originalTenant);
|
|
60
|
-
context.i18n.setCurrentLocale("content", originalLocale);
|
|
61
|
-
return indexes;
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
exports.createIndexTaskPluginTest = createIndexTaskPluginTest;
|
|
66
|
-
|
|
67
|
-
//# sourceMappingURL=createIndexTaskPlugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_apiElasticsearchTasks","require","_configurations","createIndexTaskPluginTest","createElasticsearchIndexTaskPlugin","name","getIndexList","context","locale","tenant","originalTenant","tenancy","getCurrentTenant","originalLocale","i18n","getCurrentLocale","selectedTenant","getTenantById","selectedLocale","getLocale","models","cms","listModels","length","setCurrentTenant","setCurrentLocale","indexes","map","model","index","configurations","es","modelId","settings","indexSettings","exports"],"sources":["createIndexTaskPlugin.ts"],"sourcesContent":["import type { CreateElasticsearchIndexTaskPluginIndex } from \"@webiny/api-elasticsearch-tasks\";\nimport { createElasticsearchIndexTaskPlugin } from \"@webiny/api-elasticsearch-tasks\";\nimport { configurations } from \"~/configurations\";\nimport type { CmsContext } from \"~/types\";\n\nexport const createIndexTaskPluginTest = () => {\n return createElasticsearchIndexTaskPlugin<CmsContext>({\n name: \"elasticsearch.cms.createIndexTaskPlugin\",\n getIndexList: async ({ context, locale, tenant }) => {\n const originalTenant = context.tenancy.getCurrentTenant();\n if (!originalTenant) {\n return [];\n }\n const originalLocale = context.i18n.getCurrentLocale(\"content\");\n if (!originalLocale) {\n return [];\n }\n\n const selectedTenant = await context.tenancy.getTenantById(tenant);\n if (!selectedTenant) {\n return [];\n }\n const selectedLocale = await context.i18n.getLocale(locale);\n if (!selectedLocale) {\n return [];\n }\n const models = await context.cms.listModels();\n if (models.length === 0) {\n return [];\n }\n\n context.tenancy.setCurrentTenant(selectedTenant);\n context.i18n.setCurrentLocale(\"content\", selectedLocale);\n\n const indexes = models.map<CreateElasticsearchIndexTaskPluginIndex>(model => {\n const { index } = configurations.es({\n model: {\n modelId: model.modelId,\n tenant,\n locale\n }\n });\n return {\n index,\n settings: configurations.indexSettings({\n context,\n model: {\n locale\n }\n })\n };\n });\n\n context.tenancy.setCurrentTenant(originalTenant);\n context.i18n.setCurrentLocale(\"content\", originalLocale);\n return indexes;\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AAGO,MAAME,yBAAyB,GAAGA,CAAA,KAAM;EAC3C,OAAO,IAAAC,yDAAkC,EAAa;IAClDC,IAAI,EAAE,yCAAyC;IAC/CC,YAAY,EAAE,MAAAA,CAAO;MAAEC,OAAO;MAAEC,MAAM;MAAEC;IAAO,CAAC,KAAK;MACjD,MAAMC,cAAc,GAAGH,OAAO,CAACI,OAAO,CAACC,gBAAgB,CAAC,CAAC;MACzD,IAAI,CAACF,cAAc,EAAE;QACjB,OAAO,EAAE;MACb;MACA,MAAMG,cAAc,GAAGN,OAAO,CAACO,IAAI,CAACC,gBAAgB,CAAC,SAAS,CAAC;MAC/D,IAAI,CAACF,cAAc,EAAE;QACjB,OAAO,EAAE;MACb;MAEA,MAAMG,cAAc,GAAG,MAAMT,OAAO,CAACI,OAAO,CAACM,aAAa,CAACR,MAAM,CAAC;MAClE,IAAI,CAACO,cAAc,EAAE;QACjB,OAAO,EAAE;MACb;MACA,MAAME,cAAc,GAAG,MAAMX,OAAO,CAACO,IAAI,CAACK,SAAS,CAACX,MAAM,CAAC;MAC3D,IAAI,CAACU,cAAc,EAAE;QACjB,OAAO,EAAE;MACb;MACA,MAAME,MAAM,GAAG,MAAMb,OAAO,CAACc,GAAG,CAACC,UAAU,CAAC,CAAC;MAC7C,IAAIF,MAAM,CAACG,MAAM,KAAK,CAAC,EAAE;QACrB,OAAO,EAAE;MACb;MAEAhB,OAAO,CAACI,OAAO,CAACa,gBAAgB,CAACR,cAAc,CAAC;MAChDT,OAAO,CAACO,IAAI,CAACW,gBAAgB,CAAC,SAAS,EAAEP,cAAc,CAAC;MAExD,MAAMQ,OAAO,GAAGN,MAAM,CAACO,GAAG,CAA0CC,KAAK,IAAI;QACzE,MAAM;UAAEC;QAAM,CAAC,GAAGC,8BAAc,CAACC,EAAE,CAAC;UAChCH,KAAK,EAAE;YACHI,OAAO,EAAEJ,KAAK,CAACI,OAAO;YACtBvB,MAAM;YACND;UACJ;QACJ,CAAC,CAAC;QACF,OAAO;UACHqB,KAAK;UACLI,QAAQ,EAAEH,8BAAc,CAACI,aAAa,CAAC;YACnC3B,OAAO;YACPqB,KAAK,EAAE;cACHpB;YACJ;UACJ,CAAC;QACL,CAAC;MACL,CAAC,CAAC;MAEFD,OAAO,CAACI,OAAO,CAACa,gBAAgB,CAACd,cAAc,CAAC;MAChDH,OAAO,CAACO,IAAI,CAACW,gBAAgB,CAAC,SAAS,EAAEZ,cAAc,CAAC;MACxD,OAAOa,OAAO;IAClB;EACJ,CAAC,CAAC;AACN,CAAC;AAACS,OAAA,CAAAhC,yBAAA,GAAAA,yBAAA","ignoreList":[]}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.NoValueContainer = void 0;
|
|
7
|
-
class NoValueContainer {
|
|
8
|
-
constructor() {
|
|
9
|
-
//
|
|
10
|
-
}
|
|
11
|
-
static create() {
|
|
12
|
-
return new NoValueContainer();
|
|
13
|
-
}
|
|
14
|
-
static is(value) {
|
|
15
|
-
return value instanceof NoValueContainer;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.NoValueContainer = NoValueContainer;
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=NoValueContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["NoValueContainer","constructor","create","is","value","exports"],"sources":["NoValueContainer.ts"],"sourcesContent":["export class NoValueContainer {\n private constructor() {\n //\n }\n\n public static create(): NoValueContainer {\n return new NoValueContainer();\n }\n\n public static is(value: unknown): boolean {\n return value instanceof NoValueContainer;\n }\n}\n"],"mappings":";;;;;;AAAO,MAAMA,gBAAgB,CAAC;EAClBC,WAAWA,CAAA,EAAG;IAClB;EAAA;EAGJ,OAAcC,MAAMA,CAAA,EAAqB;IACrC,OAAO,IAAIF,gBAAgB,CAAC,CAAC;EACjC;EAEA,OAAcG,EAAEA,CAACC,KAAc,EAAW;IACtC,OAAOA,KAAK,YAAYJ,gBAAgB;EAC5C;AACJ;AAACK,OAAA,CAAAL,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|