@webiny/api-headless-cms-ddb-es 0.0.0-unstable.e6f0dc8ca7 → 0.0.0-unstable.eb81deee7e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abstractions/CmsDdbEsDataLoaders.d.ts +5 -0
- package/abstractions/CmsDdbEsDataLoaders.js +5 -0
- package/abstractions/CmsDdbEsDataLoaders.js.map +1 -0
- package/abstractions/CmsDdbEsEntriesEsEntity.d.ts +5 -0
- package/abstractions/CmsDdbEsEntriesEsEntity.js +5 -0
- package/abstractions/CmsDdbEsEntriesEsEntity.js.map +1 -0
- package/abstractions/CmsDdbEsEntryEntity.d.ts +5 -0
- package/abstractions/CmsDdbEsEntryEntity.js +5 -0
- package/abstractions/CmsDdbEsEntryEntity.js.map +1 -0
- package/abstractions/CmsDdbEsGroupEntity.d.ts +5 -0
- package/abstractions/CmsDdbEsGroupEntity.js +5 -0
- package/abstractions/CmsDdbEsGroupEntity.js.map +1 -0
- package/abstractions/CmsDdbEsModelEntity.d.ts +5 -0
- package/abstractions/CmsDdbEsModelEntity.js +5 -0
- package/abstractions/CmsDdbEsModelEntity.js.map +1 -0
- package/abstractions/CmsDdbEsOsTable.d.ts +5 -0
- package/abstractions/CmsDdbEsOsTable.js +5 -0
- package/abstractions/CmsDdbEsOsTable.js.map +1 -0
- package/abstractions/CmsDdbEsTable.d.ts +5 -0
- package/abstractions/CmsDdbEsTable.js +5 -0
- package/abstractions/CmsDdbEsTable.js.map +1 -0
- package/definitions/entry.js +7 -9
- package/definitions/entry.js.map +1 -1
- package/definitions/group.js +7 -9
- package/definitions/group.js.map +1 -1
- package/definitions/model.js +7 -9
- package/definitions/model.js.map +1 -1
- package/definitions/types.d.ts +4 -0
- package/definitions/types.js +0 -3
- package/feature.d.ts +9 -1
- package/feature.js +46 -179
- package/feature.js.map +1 -1
- package/index.d.ts +2 -1
- package/index.js +2 -3
- package/operations/entry/DdbEsCreateEntry.d.ts +24 -0
- package/operations/entry/DdbEsCreateEntry.js +134 -0
- package/operations/entry/DdbEsCreateEntry.js.map +1 -0
- package/operations/entry/DdbEsCreateEntryRevisionFrom.d.ts +24 -0
- package/operations/entry/DdbEsCreateEntryRevisionFrom.js +139 -0
- package/operations/entry/DdbEsCreateEntryRevisionFrom.js.map +1 -0
- package/operations/entry/DdbEsDeleteEntry.d.ts +18 -0
- package/operations/entry/DdbEsDeleteEntry.js +79 -0
- package/operations/entry/DdbEsDeleteEntry.js.map +1 -0
- package/operations/entry/DdbEsDeleteEntryRevision.d.ts +24 -0
- package/operations/entry/DdbEsDeleteEntryRevision.js +136 -0
- package/operations/entry/DdbEsDeleteEntryRevision.js.map +1 -0
- package/operations/entry/DdbEsDeleteMultipleEntries.d.ts +18 -0
- package/operations/entry/DdbEsDeleteMultipleEntries.js +80 -0
- package/operations/entry/DdbEsDeleteMultipleEntries.js.map +1 -0
- package/operations/entry/DdbEsGetEntriesByIds.d.ts +14 -0
- package/operations/entry/DdbEsGetEntriesByIds.js +31 -0
- package/operations/entry/DdbEsGetEntriesByIds.js.map +1 -0
- package/operations/entry/DdbEsGetEntry.d.ts +14 -0
- package/operations/entry/DdbEsGetEntry.js +27 -0
- package/operations/entry/DdbEsGetEntry.js.map +1 -0
- package/operations/entry/DdbEsGetLatestEntriesByIds.d.ts +14 -0
- package/operations/entry/DdbEsGetLatestEntriesByIds.js +31 -0
- package/operations/entry/DdbEsGetLatestEntriesByIds.js.map +1 -0
- package/operations/entry/DdbEsGetLatestRevisionByEntryId.d.ts +14 -0
- package/operations/entry/DdbEsGetLatestRevisionByEntryId.js +34 -0
- package/operations/entry/DdbEsGetLatestRevisionByEntryId.js.map +1 -0
- package/operations/entry/DdbEsGetPreviousRevision.d.ts +14 -0
- package/operations/entry/DdbEsGetPreviousRevision.js +56 -0
- package/operations/entry/DdbEsGetPreviousRevision.js.map +1 -0
- package/operations/entry/DdbEsGetPublishedEntriesByIds.d.ts +14 -0
- package/operations/entry/DdbEsGetPublishedEntriesByIds.js +31 -0
- package/operations/entry/DdbEsGetPublishedEntriesByIds.js.map +1 -0
- package/operations/entry/DdbEsGetPublishedRevisionByEntryId.d.ts +14 -0
- package/operations/entry/DdbEsGetPublishedRevisionByEntryId.js +34 -0
- package/operations/entry/DdbEsGetPublishedRevisionByEntryId.js.map +1 -0
- package/operations/entry/DdbEsGetRevisionById.d.ts +14 -0
- package/operations/entry/DdbEsGetRevisionById.js +34 -0
- package/operations/entry/DdbEsGetRevisionById.js.map +1 -0
- package/operations/entry/DdbEsGetRevisions.d.ts +14 -0
- package/operations/entry/DdbEsGetRevisions.js +33 -0
- package/operations/entry/DdbEsGetRevisions.js.map +1 -0
- package/operations/entry/DdbEsGetUniqueFieldValues.d.ts +18 -0
- package/operations/entry/DdbEsGetUniqueFieldValues.js +76 -0
- package/operations/entry/DdbEsGetUniqueFieldValues.js.map +1 -0
- package/operations/entry/DdbEsListEntries.d.ts +25 -0
- package/operations/entry/DdbEsListEntries.js +91 -0
- package/operations/entry/DdbEsListEntries.js.map +1 -0
- package/operations/entry/DdbEsMoveEntry.d.ts +20 -0
- package/operations/entry/DdbEsMoveEntry.js +113 -0
- package/operations/entry/DdbEsMoveEntry.js.map +1 -0
- package/operations/entry/DdbEsMoveToBin.d.ts +23 -0
- package/operations/entry/DdbEsMoveToBin.js +137 -0
- package/operations/entry/DdbEsMoveToBin.js.map +1 -0
- package/operations/entry/DdbEsPublishEntry.d.ts +24 -0
- package/operations/entry/DdbEsPublishEntry.js +231 -0
- package/operations/entry/DdbEsPublishEntry.js.map +1 -0
- package/operations/entry/DdbEsRestoreFromBin.d.ts +23 -0
- package/operations/entry/DdbEsRestoreFromBin.js +137 -0
- package/operations/entry/DdbEsRestoreFromBin.js.map +1 -0
- package/operations/entry/DdbEsUnpublishEntry.d.ts +24 -0
- package/operations/entry/DdbEsUnpublishEntry.js +127 -0
- package/operations/entry/DdbEsUnpublishEntry.js.map +1 -0
- package/operations/entry/DdbEsUpdateEntry.d.ts +24 -0
- package/operations/entry/DdbEsUpdateEntry.js +175 -0
- package/operations/entry/DdbEsUpdateEntry.js.map +1 -0
- package/operations/entry/dataLoader/DataLoaderCache.js +22 -26
- package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -1
- package/operations/entry/dataLoader/constants.js +2 -1
- package/operations/entry/dataLoader/constants.js.map +1 -1
- package/operations/entry/dataLoader/createBatchScheduleFn.js +6 -15
- package/operations/entry/dataLoader/createBatchScheduleFn.js.map +1 -1
- package/operations/entry/dataLoader/getAllEntryRevisions.js +18 -29
- package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -1
- package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +27 -37
- package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -1
- package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +27 -37
- package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -1
- package/operations/entry/dataLoader/getRevisionById.js +32 -46
- package/operations/entry/dataLoader/getRevisionById.js.map +1 -1
- package/operations/entry/dataLoader/index.js +8 -9
- package/operations/entry/dataLoader/index.js.map +1 -1
- package/operations/entry/dataLoader/types.js +0 -3
- package/operations/entry/dataLoaders.d.ts +5 -5
- package/operations/entry/dataLoaders.js +89 -99
- package/operations/entry/dataLoaders.js.map +1 -1
- package/{features/CmsEntryOpenSearchIndex → operations/entry}/feature.d.ts +1 -1
- package/operations/entry/feature.js +53 -0
- package/operations/entry/feature.js.map +1 -0
- package/operations/entry/keys.js +43 -63
- package/operations/entry/keys.js.map +1 -1
- package/operations/entry/recordType.js +4 -9
- package/operations/entry/recordType.js.map +1 -1
- package/operations/entry/storageEntryUtils.d.ts +7 -0
- package/operations/entry/storageEntryUtils.js +14 -0
- package/operations/entry/storageEntryUtils.js.map +1 -0
- package/operations/entry/transformations/convertEntryKeys.js +21 -26
- package/operations/entry/transformations/convertEntryKeys.js.map +1 -1
- package/operations/entry/transformations/index.d.ts +2 -5
- package/operations/entry/transformations/index.js +85 -115
- package/operations/entry/transformations/index.js.map +1 -1
- package/operations/entry/transformations/modifyEntryValues.d.ts +3 -3
- package/operations/entry/transformations/modifyEntryValues.js +12 -17
- package/operations/entry/transformations/modifyEntryValues.js.map +1 -1
- package/operations/entry/transformations/transformEntryKeys.js +13 -16
- package/operations/entry/transformations/transformEntryKeys.js.map +1 -1
- package/operations/group/DdbEsCreateGroup.d.ts +12 -0
- package/operations/group/DdbEsCreateGroup.js +35 -0
- package/operations/group/DdbEsCreateGroup.js.map +1 -0
- package/operations/group/DdbEsDeleteGroup.d.ts +12 -0
- package/operations/group/DdbEsDeleteGroup.js +31 -0
- package/operations/group/DdbEsDeleteGroup.js.map +1 -0
- package/operations/group/DdbEsGetGroup.d.ts +12 -0
- package/operations/group/DdbEsGetGroup.js +31 -0
- package/operations/group/DdbEsGetGroup.js.map +1 -0
- package/operations/group/DdbEsListGroups.d.ts +14 -0
- package/operations/group/DdbEsListGroups.js +52 -0
- package/operations/group/DdbEsListGroups.js.map +1 -0
- package/operations/group/DdbEsUpdateGroup.d.ts +12 -0
- package/operations/group/DdbEsUpdateGroup.js +35 -0
- package/operations/group/DdbEsUpdateGroup.js.map +1 -0
- package/{features/CmsEntryOpenSearchFilter → operations/group}/feature.d.ts +1 -1
- package/operations/group/feature.js +19 -0
- package/operations/group/feature.js.map +1 -0
- package/operations/group/keys.d.ts +15 -0
- package/operations/group/keys.js +17 -0
- package/operations/group/keys.js.map +1 -0
- package/operations/model/DdbEsCreateModel.d.ts +16 -0
- package/operations/model/DdbEsCreateModel.js +56 -0
- package/operations/model/DdbEsCreateModel.js.map +1 -0
- package/operations/model/DdbEsDeleteModel.d.ts +12 -0
- package/operations/model/DdbEsDeleteModel.js +31 -0
- package/operations/model/DdbEsDeleteModel.js.map +1 -0
- package/operations/model/DdbEsGetModel.d.ts +12 -0
- package/operations/model/DdbEsGetModel.js +30 -0
- package/operations/model/DdbEsGetModel.js.map +1 -0
- package/operations/model/DdbEsListModels.d.ts +12 -0
- package/operations/model/DdbEsListModels.js +36 -0
- package/operations/model/DdbEsListModels.js.map +1 -0
- package/operations/model/DdbEsUpdateModel.d.ts +12 -0
- package/operations/model/DdbEsUpdateModel.js +36 -0
- package/operations/model/DdbEsUpdateModel.js.map +1 -0
- package/{features/CmsEntryOpenSearchFieldIndex → operations/model}/feature.d.ts +1 -1
- package/operations/model/feature.js +19 -0
- package/operations/model/feature.js.map +1 -0
- package/operations/model/keys.d.ts +15 -0
- package/operations/model/keys.js +17 -0
- package/operations/model/keys.js.map +1 -0
- package/package.json +33 -27
- package/requestFeature.d.ts +20 -0
- package/requestFeature.js +54 -0
- package/requestFeature.js.map +1 -0
- package/tasks/CreateElasticsearchIndexTask.d.ts +13 -0
- package/tasks/CreateElasticsearchIndexTask.js +40 -0
- package/tasks/CreateElasticsearchIndexTask.js.map +1 -0
- package/types.d.ts +11 -50
- package/types.js +7 -13
- package/types.js.map +1 -1
- package/configurations.d.ts +0 -19
- package/configurations.js +0 -39
- package/configurations.js.map +0 -1
- package/definitions/types.js.map +0 -1
- package/elasticsearch/createElasticsearchIndex.d.ts +0 -9
- package/elasticsearch/createElasticsearchIndex.js +0 -74
- package/elasticsearch/createElasticsearchIndex.js.map +0 -1
- package/elasticsearch/deleteElasticsearchIndex.d.ts +0 -8
- package/elasticsearch/deleteElasticsearchIndex.js +0 -31
- package/elasticsearch/deleteElasticsearchIndex.js.map +0 -1
- package/exports/api/cms/opensearch.d.ts +0 -9
- package/exports/api/cms/opensearch.js +0 -11
- package/exports/api/cms/opensearch.js.map +0 -1
- package/features/CmsEntryOpenSearchBodyModifier/abstractions.d.ts +0 -16
- package/features/CmsEntryOpenSearchBodyModifier/abstractions.js +0 -4
- package/features/CmsEntryOpenSearchBodyModifier/abstractions.js.map +0 -1
- package/features/CmsEntryOpenSearchBodyModifier/index.d.ts +0 -1
- package/features/CmsEntryOpenSearchBodyModifier/index.js +0 -3
- package/features/CmsEntryOpenSearchBodyModifier/index.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.d.ts +0 -13
- package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js +0 -36
- package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.d.ts +0 -35
- package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js +0 -4
- package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.d.ts +0 -11
- package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.js +0 -4
- package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/constants.d.ts +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/constants.js +0 -3
- package/features/CmsEntryOpenSearchFieldIndex/constants.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/feature.js +0 -24
- package/features/CmsEntryOpenSearchFieldIndex/feature.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.d.ts +0 -11
- package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js +0 -77
- package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.d.ts +0 -10
- package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.js +0 -39
- package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.d.ts +0 -10
- package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.js +0 -22
- package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.d.ts +0 -10
- package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.js +0 -25
- package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.d.ts +0 -11
- package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js +0 -37
- package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.d.ts +0 -10
- package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js +0 -158
- package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.d.ts +0 -10
- package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js +0 -22
- package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js.map +0 -1
- package/features/CmsEntryOpenSearchFieldIndex/index.d.ts +0 -3
- package/features/CmsEntryOpenSearchFieldIndex/index.js +0 -5
- package/features/CmsEntryOpenSearchFieldIndex/index.js.map +0 -1
- package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.d.ts +0 -11
- package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js +0 -38
- package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js.map +0 -1
- package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.d.ts +0 -37
- package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js +0 -4
- package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js.map +0 -1
- package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.d.ts +0 -9
- package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js +0 -4
- package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js.map +0 -1
- package/features/CmsEntryOpenSearchFilter/constants.d.ts +0 -1
- package/features/CmsEntryOpenSearchFilter/constants.js +0 -3
- package/features/CmsEntryOpenSearchFilter/constants.js.map +0 -1
- package/features/CmsEntryOpenSearchFilter/feature.js +0 -16
- package/features/CmsEntryOpenSearchFilter/feature.js.map +0 -1
- package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.d.ts +0 -9
- package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js +0 -23
- package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js.map +0 -1
- package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.d.ts +0 -9
- package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js +0 -61
- package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js.map +0 -1
- package/features/CmsEntryOpenSearchFilter/fields/RefFilter.d.ts +0 -9
- package/features/CmsEntryOpenSearchFilter/fields/RefFilter.js +0 -49
- package/features/CmsEntryOpenSearchFilter/fields/RefFilter.js.map +0 -1
- package/features/CmsEntryOpenSearchFilter/index.d.ts +0 -3
- package/features/CmsEntryOpenSearchFilter/index.js +0 -5
- package/features/CmsEntryOpenSearchFilter/index.js.map +0 -1
- package/features/CmsEntryOpenSearchFullTextSearch/abstractions.d.ts +0 -20
- package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js +0 -4
- package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js.map +0 -1
- package/features/CmsEntryOpenSearchFullTextSearch/index.d.ts +0 -1
- package/features/CmsEntryOpenSearchFullTextSearch/index.js +0 -3
- package/features/CmsEntryOpenSearchFullTextSearch/index.js.map +0 -1
- package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.d.ts +0 -11
- package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.js +0 -16
- package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.js.map +0 -1
- package/features/CmsEntryOpenSearchIndex/abstractions.d.ts +0 -14
- package/features/CmsEntryOpenSearchIndex/abstractions.js +0 -4
- package/features/CmsEntryOpenSearchIndex/abstractions.js.map +0 -1
- package/features/CmsEntryOpenSearchIndex/feature.js +0 -10
- package/features/CmsEntryOpenSearchIndex/feature.js.map +0 -1
- package/features/CmsEntryOpenSearchIndex/index.d.ts +0 -3
- package/features/CmsEntryOpenSearchIndex/index.js +0 -5
- package/features/CmsEntryOpenSearchIndex/index.js.map +0 -1
- package/features/CmsEntryOpenSearchQueryModifier/abstractions.d.ts +0 -16
- package/features/CmsEntryOpenSearchQueryModifier/abstractions.js +0 -4
- package/features/CmsEntryOpenSearchQueryModifier/abstractions.js.map +0 -1
- package/features/CmsEntryOpenSearchQueryModifier/index.d.ts +0 -1
- package/features/CmsEntryOpenSearchQueryModifier/index.js +0 -3
- package/features/CmsEntryOpenSearchQueryModifier/index.js.map +0 -1
- package/features/CmsEntryOpenSearchSortModifier/abstractions.d.ts +0 -15
- package/features/CmsEntryOpenSearchSortModifier/abstractions.js +0 -4
- package/features/CmsEntryOpenSearchSortModifier/abstractions.js.map +0 -1
- package/features/CmsEntryOpenSearchSortModifier/index.d.ts +0 -1
- package/features/CmsEntryOpenSearchSortModifier/index.js +0 -3
- package/features/CmsEntryOpenSearchSortModifier/index.js.map +0 -1
- package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.d.ts +0 -12
- package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js +0 -27
- package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js.map +0 -1
- package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.d.ts +0 -22
- package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js +0 -4
- package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js.map +0 -1
- package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.d.ts +0 -10
- package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js +0 -4
- package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js.map +0 -1
- package/features/CmsEntryOpenSearchValueSearch/feature.d.ts +0 -4
- package/features/CmsEntryOpenSearchValueSearch/feature.js +0 -16
- package/features/CmsEntryOpenSearchValueSearch/feature.js.map +0 -1
- package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.d.ts +0 -10
- package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js +0 -23
- package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js.map +0 -1
- package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.d.ts +0 -10
- package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js +0 -55
- package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js.map +0 -1
- package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.d.ts +0 -10
- package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js +0 -24
- package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js.map +0 -1
- package/features/CmsEntryOpenSearchValueSearch/index.d.ts +0 -3
- package/features/CmsEntryOpenSearchValueSearch/index.js +0 -5
- package/features/CmsEntryOpenSearchValueSearch/index.js.map +0 -1
- package/features/CmsEntryOpenSearchValuesModifier/abstractions.d.ts +0 -23
- package/features/CmsEntryOpenSearchValuesModifier/abstractions.js +0 -4
- package/features/CmsEntryOpenSearchValuesModifier/abstractions.js.map +0 -1
- package/features/CmsEntryOpenSearchValuesModifier/index.d.ts +0 -1
- package/features/CmsEntryOpenSearchValuesModifier/index.js +0 -3
- package/features/CmsEntryOpenSearchValuesModifier/index.js.map +0 -1
- package/helpers/entryIndexHelpers.d.ts +0 -20
- package/helpers/entryIndexHelpers.js +0 -134
- package/helpers/entryIndexHelpers.js.map +0 -1
- package/helpers/fieldIdentifier.d.ts +0 -6
- package/helpers/fieldIdentifier.js +0 -35
- package/helpers/fieldIdentifier.js.map +0 -1
- package/helpers/index.d.ts +0 -2
- package/helpers/index.js +0 -4
- package/helpers/index.js.map +0 -1
- package/index.js.map +0 -1
- package/operations/entry/dataLoader/types.js.map +0 -1
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.d.ts +0 -18
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js +0 -27
- package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js.map +0 -1
- package/operations/entry/elasticsearch/body.d.ts +0 -29
- package/operations/entry/elasticsearch/body.js +0 -138
- package/operations/entry/elasticsearch/body.js.map +0 -1
- package/operations/entry/elasticsearch/fields/createSystemField.d.ts +0 -4
- package/operations/entry/elasticsearch/fields/createSystemField.js +0 -10
- package/operations/entry/elasticsearch/fields/createSystemField.js.map +0 -1
- package/operations/entry/elasticsearch/fields/live.d.ts +0 -2
- package/operations/entry/elasticsearch/fields/live.js +0 -45
- package/operations/entry/elasticsearch/fields/live.js.map +0 -1
- package/operations/entry/elasticsearch/fields/location.d.ts +0 -2
- package/operations/entry/elasticsearch/fields/location.js +0 -45
- package/operations/entry/elasticsearch/fields/location.js.map +0 -1
- package/operations/entry/elasticsearch/fields/state.d.ts +0 -2
- package/operations/entry/elasticsearch/fields/state.js +0 -93
- package/operations/entry/elasticsearch/fields/state.js.map +0 -1
- package/operations/entry/elasticsearch/fields.d.ts +0 -12
- package/operations/entry/elasticsearch/fields.js +0 -231
- package/operations/entry/elasticsearch/fields.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/applyFiltering.d.ts +0 -9
- package/operations/entry/elasticsearch/filtering/applyFiltering.js +0 -52
- package/operations/entry/elasticsearch/filtering/applyFiltering.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/exec.d.ts +0 -22
- package/operations/entry/elasticsearch/filtering/exec.js +0 -125
- package/operations/entry/elasticsearch/filtering/exec.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/index.d.ts +0 -1
- package/operations/entry/elasticsearch/filtering/index.js +0 -3
- package/operations/entry/elasticsearch/filtering/index.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/path.d.ts +0 -17
- package/operations/entry/elasticsearch/filtering/path.js +0 -36
- package/operations/entry/elasticsearch/filtering/path.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/populated.d.ts +0 -2
- package/operations/entry/elasticsearch/filtering/populated.js +0 -18
- package/operations/entry/elasticsearch/filtering/populated.js.map +0 -1
- package/operations/entry/elasticsearch/filtering/values.d.ts +0 -2
- package/operations/entry/elasticsearch/filtering/values.js +0 -16
- package/operations/entry/elasticsearch/filtering/values.js.map +0 -1
- package/operations/entry/elasticsearch/fullTextSearch.d.ts +0 -13
- package/operations/entry/elasticsearch/fullTextSearch.js +0 -88
- package/operations/entry/elasticsearch/fullTextSearch.js.map +0 -1
- package/operations/entry/elasticsearch/fullTextSearchFields.d.ts +0 -8
- package/operations/entry/elasticsearch/fullTextSearchFields.js +0 -20
- package/operations/entry/elasticsearch/fullTextSearchFields.js.map +0 -1
- package/operations/entry/elasticsearch/initialQuery.d.ts +0 -17
- package/operations/entry/elasticsearch/initialQuery.js +0 -88
- package/operations/entry/elasticsearch/initialQuery.js.map +0 -1
- package/operations/entry/elasticsearch/keyword.d.ts +0 -2
- package/operations/entry/elasticsearch/keyword.js +0 -31
- package/operations/entry/elasticsearch/keyword.js.map +0 -1
- package/operations/entry/elasticsearch/plugins/operator.d.ts +0 -7
- package/operations/entry/elasticsearch/plugins/operator.js +0 -24
- package/operations/entry/elasticsearch/plugins/operator.js.map +0 -1
- package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.d.ts +0 -2
- package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js +0 -6
- package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js.map +0 -1
- package/operations/entry/elasticsearch/sort.d.ts +0 -12
- package/operations/entry/elasticsearch/sort.js +0 -103
- package/operations/entry/elasticsearch/sort.js.map +0 -1
- package/operations/entry/elasticsearch/transformValueForSearch.d.ts +0 -9
- package/operations/entry/elasticsearch/transformValueForSearch.js +0 -17
- package/operations/entry/elasticsearch/transformValueForSearch.js.map +0 -1
- package/operations/entry/elasticsearch/types.d.ts +0 -34
- package/operations/entry/elasticsearch/types.js +0 -3
- package/operations/entry/elasticsearch/types.js.map +0 -1
- package/operations/entry/index.d.ts +0 -32
- package/operations/entry/index.js +0 -1761
- package/operations/entry/index.js.map +0 -1
- package/operations/entry/transformations/transformEntryToIndex.d.ts +0 -12
- package/operations/entry/transformations/transformEntryToIndex.js +0 -26
- package/operations/entry/transformations/transformEntryToIndex.js.map +0 -1
- package/operations/group/index.d.ts +0 -9
- package/operations/group/index.js +0 -142
- package/operations/group/index.js.map +0 -1
- package/operations/model/index.d.ts +0 -8
- package/operations/model/index.js +0 -163
- package/operations/model/index.js.map +0 -1
- package/tasks/createIndexTaskPlugin.d.ts +0 -2
- package/tasks/createIndexTaskPlugin.js +0 -48
- package/tasks/createIndexTaskPlugin.js.map +0 -1
- package/values/NoValueContainer.d.ts +0 -5
- package/values/NoValueContainer.js +0 -13
- package/values/NoValueContainer.js.map +0 -1
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import WebinyError from "@webiny/error";
|
|
2
|
-
import { createLatestRecordType, createPublishedRecordType } from "../recordType.js";
|
|
3
|
-
import { isSharedOpenSearchIndex as isSharedElasticsearchIndex } from "@webiny/api-opensearch";
|
|
4
|
-
export const createBaseQuery = () => {
|
|
5
|
-
return {
|
|
6
|
-
must: [],
|
|
7
|
-
must_not: [],
|
|
8
|
-
should: [],
|
|
9
|
-
filter: []
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Latest and published are specific in Elasticsearch to that extend that they are tagged in the __type property.
|
|
14
|
-
* We allow either published or either latest.
|
|
15
|
-
* Latest is used in the manage API and published in the read API.
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* We add the query.filter terms because we do not need scored search here and it is a bit faster.
|
|
19
|
-
*/
|
|
20
|
-
export const createInitialQuery = params => {
|
|
21
|
-
const {
|
|
22
|
-
model,
|
|
23
|
-
where
|
|
24
|
-
} = params;
|
|
25
|
-
const query = createBaseQuery();
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* When ES index is shared between tenants, we need to filter records by tenant ID
|
|
29
|
-
*
|
|
30
|
-
* TODO determine if we want to search across tenants in shared index?
|
|
31
|
-
*/
|
|
32
|
-
const sharedIndex = isSharedElasticsearchIndex();
|
|
33
|
-
if (sharedIndex) {
|
|
34
|
-
/**
|
|
35
|
-
* Tenant for the filtering is taken from the model.
|
|
36
|
-
*
|
|
37
|
-
* TODO determine if we want to send it in the "where" parameter?
|
|
38
|
-
*/
|
|
39
|
-
query.filter.push({
|
|
40
|
-
term: {
|
|
41
|
-
"tenant.keyword": model.tenant
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
/**
|
|
45
|
-
* Also, we must search only in selected model.
|
|
46
|
-
*/
|
|
47
|
-
query.filter.push({
|
|
48
|
-
term: {
|
|
49
|
-
"modelId.keyword": model.modelId
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* We must transform published and latest where args into something that is understandable by our Elasticsearch
|
|
56
|
-
*/
|
|
57
|
-
if (where.published === true) {
|
|
58
|
-
query.filter.push({
|
|
59
|
-
term: {
|
|
60
|
-
"__type.keyword": createPublishedRecordType()
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
} else if (where.latest === true) {
|
|
64
|
-
query.filter.push({
|
|
65
|
-
term: {
|
|
66
|
-
"__type.keyword": createLatestRecordType()
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
//
|
|
71
|
-
/**
|
|
72
|
-
* We do not allow filtering without the published or latest parameter.
|
|
73
|
-
* Also, we do not want to set the default one, as there is a large possibility for user error when filtering.
|
|
74
|
-
*/else {
|
|
75
|
-
throw new WebinyError(`Cannot call Elasticsearch query when not setting "published" or "latest".`, "OPENSEARCH_UNSUPPORTED_QUERY", {
|
|
76
|
-
where
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* We need to remove fields that actually do not exist on the record - it will break otherwise.
|
|
81
|
-
* This will modify the original object, which is what we want.
|
|
82
|
-
*/
|
|
83
|
-
delete where.published;
|
|
84
|
-
delete where.latest;
|
|
85
|
-
return query;
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
//# sourceMappingURL=initialQuery.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["WebinyError","createLatestRecordType","createPublishedRecordType","isSharedOpenSearchIndex","isSharedElasticsearchIndex","createBaseQuery","must","must_not","should","filter","createInitialQuery","params","model","where","query","sharedIndex","push","term","tenant","modelId","published","latest"],"sources":["initialQuery.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport type { OpenSearchBoolQueryConfig } from \"@webiny/api-opensearch/types.js\";\nimport type { CmsEntryListWhere, CmsModel } from \"@webiny/api-headless-cms/types/index.js\";\nimport { createLatestRecordType, createPublishedRecordType } from \"../recordType.js\";\nimport { isSharedOpenSearchIndex as isSharedElasticsearchIndex } from \"@webiny/api-opensearch\";\n\nexport const createBaseQuery = (): OpenSearchBoolQueryConfig => {\n return {\n must: [],\n must_not: [],\n should: [],\n filter: []\n };\n};\n\ninterface Params {\n model: CmsModel;\n where: CmsEntryListWhere;\n}\n/**\n * Latest and published are specific in Elasticsearch to that extend that they are tagged in the __type property.\n * We allow either published or either latest.\n * Latest is used in the manage API and published in the read API.\n *\n *\n * We add the query.filter terms because we do not need scored search here and it is a bit faster.\n */\nexport const createInitialQuery = (params: Params): OpenSearchBoolQueryConfig => {\n const { model, where } = params;\n\n const query = createBaseQuery();\n\n /**\n * When ES index is shared between tenants, we need to filter records by tenant ID\n *\n * TODO determine if we want to search across tenants in shared index?\n */\n const sharedIndex = isSharedElasticsearchIndex();\n if (sharedIndex) {\n /**\n * Tenant for the filtering is taken from the model.\n *\n * TODO determine if we want to send it in the \"where\" parameter?\n */\n query.filter.push({\n term: {\n \"tenant.keyword\": model.tenant\n }\n });\n /**\n * Also, we must search only in selected model.\n */\n query.filter.push({\n term: {\n \"modelId.keyword\": model.modelId\n }\n });\n }\n\n /**\n * We must transform published and latest where args into something that is understandable by our Elasticsearch\n */\n if (where.published === true) {\n query.filter.push({\n term: {\n \"__type.keyword\": createPublishedRecordType()\n }\n });\n } else if (where.latest === true) {\n query.filter.push({\n term: {\n \"__type.keyword\": createLatestRecordType()\n }\n });\n }\n //\n /**\n * We do not allow filtering without the published or latest parameter.\n * Also, we do not want to set the default one, as there is a large possibility for user error when filtering.\n */\n else {\n throw new WebinyError(\n `Cannot call Elasticsearch query when not setting \"published\" or \"latest\".`,\n \"OPENSEARCH_UNSUPPORTED_QUERY\",\n {\n where\n }\n );\n }\n /**\n * We need to remove fields that actually do not exist on the record - it will break otherwise.\n * This will modify the original object, which is what we want.\n */\n delete where.published;\n delete where.latest;\n\n return query;\n};\n"],"mappings":"AAAA,OAAOA,WAAW,MAAM,eAAe;AAGvC,SAASC,sBAAsB,EAAEC,yBAAyB;AAC1D,SAASC,uBAAuB,IAAIC,0BAA0B,QAAQ,wBAAwB;AAE9F,OAAO,MAAMC,eAAe,GAAGA,CAAA,KAAiC;EAC5D,OAAO;IACHC,IAAI,EAAE,EAAE;IACRC,QAAQ,EAAE,EAAE;IACZC,MAAM,EAAE,EAAE;IACVC,MAAM,EAAE;EACZ,CAAC;AACL,CAAC;AAMD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,GAAIC,MAAc,IAAgC;EAC7E,MAAM;IAAEC,KAAK;IAAEC;EAAM,CAAC,GAAGF,MAAM;EAE/B,MAAMG,KAAK,GAAGT,eAAe,CAAC,CAAC;;EAE/B;AACJ;AACA;AACA;AACA;EACI,MAAMU,WAAW,GAAGX,0BAA0B,CAAC,CAAC;EAChD,IAAIW,WAAW,EAAE;IACb;AACR;AACA;AACA;AACA;IACQD,KAAK,CAACL,MAAM,CAACO,IAAI,CAAC;MACdC,IAAI,EAAE;QACF,gBAAgB,EAAEL,KAAK,CAACM;MAC5B;IACJ,CAAC,CAAC;IACF;AACR;AACA;IACQJ,KAAK,CAACL,MAAM,CAACO,IAAI,CAAC;MACdC,IAAI,EAAE;QACF,iBAAiB,EAAEL,KAAK,CAACO;MAC7B;IACJ,CAAC,CAAC;EACN;;EAEA;AACJ;AACA;EACI,IAAIN,KAAK,CAACO,SAAS,KAAK,IAAI,EAAE;IAC1BN,KAAK,CAACL,MAAM,CAACO,IAAI,CAAC;MACdC,IAAI,EAAE;QACF,gBAAgB,EAAEf,yBAAyB,CAAC;MAChD;IACJ,CAAC,CAAC;EACN,CAAC,MAAM,IAAIW,KAAK,CAACQ,MAAM,KAAK,IAAI,EAAE;IAC9BP,KAAK,CAACL,MAAM,CAACO,IAAI,CAAC;MACdC,IAAI,EAAE;QACF,gBAAgB,EAAEhB,sBAAsB,CAAC;MAC7C;IACJ,CAAC,CAAC;EACN;EACA;EACA;AACJ;AACA;AACA,KAHI,KAIK;IACD,MAAM,IAAID,WAAW,CACjB,2EAA2E,EAC3E,8BAA8B,EAC9B;MACIa;IACJ,CACJ,CAAC;EACL;EACA;AACJ;AACA;AACA;EACI,OAAOA,KAAK,CAACO,SAAS;EACtB,OAAOP,KAAK,CAACQ,MAAM;EAEnB,OAAOP,KAAK;AAChB,CAAC","ignoreList":[]}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { getBaseFieldType } from "@webiny/api-headless-cms/utils/getBaseFieldType.js";
|
|
2
|
-
const noKeywordFields = ["date", "datetime", "number", "boolean"];
|
|
3
|
-
export const hasKeyword = field => {
|
|
4
|
-
const fieldType = getBaseFieldType(field);
|
|
5
|
-
/**
|
|
6
|
-
* We defined some field types that MUST have no keyword added to the field path
|
|
7
|
-
*/
|
|
8
|
-
if (noKeywordFields.includes(fieldType)) {
|
|
9
|
-
return false;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* If field has unmapped type defined, do not add keyword.
|
|
13
|
-
*/
|
|
14
|
-
//
|
|
15
|
-
else if (field.unmappedType) {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* And if specifically defined that field has no keyword, do not add it.
|
|
20
|
-
*/
|
|
21
|
-
//
|
|
22
|
-
else if (field.keyword === false) {
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* All other fields have keyword added.
|
|
27
|
-
*/
|
|
28
|
-
return true;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
//# sourceMappingURL=keyword.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["getBaseFieldType","noKeywordFields","hasKeyword","field","fieldType","includes","unmappedType","keyword"],"sources":["keyword.ts"],"sourcesContent":["import type { ModelField } from \"./types.js\";\nimport { getBaseFieldType } from \"@webiny/api-headless-cms/utils/getBaseFieldType.js\";\n\nconst noKeywordFields: string[] = [\"date\", \"datetime\", \"number\", \"boolean\"];\nexport const hasKeyword = (field: ModelField): boolean => {\n const fieldType = getBaseFieldType(field);\n /**\n * We defined some field types that MUST have no keyword added to the field path\n */\n if (noKeywordFields.includes(fieldType)) {\n return false;\n }\n /**\n * If field has unmapped type defined, do not add keyword.\n */\n //\n else if (field.unmappedType) {\n return false;\n }\n /**\n * And if specifically defined that field has no keyword, do not add it.\n */\n //\n else if (field.keyword === false) {\n return false;\n }\n /**\n * All other fields have keyword added.\n */\n return true;\n};\n"],"mappings":"AACA,SAASA,gBAAgB,QAAQ,oDAAoD;AAErF,MAAMC,eAAyB,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC;AAC3E,OAAO,MAAMC,UAAU,GAAIC,KAAiB,IAAc;EACtD,MAAMC,SAAS,GAAGJ,gBAAgB,CAACG,KAAK,CAAC;EACzC;AACJ;AACA;EACI,IAAIF,eAAe,CAACI,QAAQ,CAACD,SAAS,CAAC,EAAE;IACrC,OAAO,KAAK;EAChB;EACA;AACJ;AACA;EACI;EAAA,KACK,IAAID,KAAK,CAACG,YAAY,EAAE;IACzB,OAAO,KAAK;EAChB;EACA;AACJ;AACA;EACI;EAAA,KACK,IAAIH,KAAK,CAACI,OAAO,KAAK,KAAK,EAAE;IAC9B,OAAO,KAAK;EAChB;EACA;AACJ;AACA;EACI,OAAO,IAAI;AACf,CAAC","ignoreList":[]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { PluginsContainer } from "@webiny/plugins";
|
|
2
|
-
import type { OpenSearchQueryBuilderOperatorPlugins } from "../types.js";
|
|
3
|
-
interface Params {
|
|
4
|
-
plugins: PluginsContainer;
|
|
5
|
-
}
|
|
6
|
-
export declare const createOperatorPluginList: (params: Params) => OpenSearchQueryBuilderOperatorPlugins;
|
|
7
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { OpenSearchQueryBuilderOperatorPlugin } from "@webiny/api-opensearch";
|
|
2
|
-
export const createOperatorPluginList = params => {
|
|
3
|
-
const {
|
|
4
|
-
plugins
|
|
5
|
-
} = params;
|
|
6
|
-
/**
|
|
7
|
-
* We always set the last one operator plugin added.
|
|
8
|
-
* This way user can override the plugins.
|
|
9
|
-
*/
|
|
10
|
-
return plugins.byType(OpenSearchQueryBuilderOperatorPlugin.type).reduce((acc, plugin) => {
|
|
11
|
-
const operator = plugin.getOperator();
|
|
12
|
-
/**
|
|
13
|
-
* We also only allow the override of the plugins if the new plugin is NOT a default one.
|
|
14
|
-
* If a user sets the plugin name ending with .default, we cannot do anything about it.
|
|
15
|
-
*/
|
|
16
|
-
if (!!acc[operator] && (plugin.name || "").match(/\.default$/)) {
|
|
17
|
-
return acc;
|
|
18
|
-
}
|
|
19
|
-
acc[operator] = plugin;
|
|
20
|
-
return acc;
|
|
21
|
-
}, {});
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
//# sourceMappingURL=operator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["OpenSearchQueryBuilderOperatorPlugin","createOperatorPluginList","params","plugins","byType","type","reduce","acc","plugin","operator","getOperator","name","match"],"sources":["operator.ts"],"sourcesContent":["import type { PluginsContainer } from \"@webiny/plugins\";\nimport { OpenSearchQueryBuilderOperatorPlugin } from \"@webiny/api-opensearch\";\nimport type { OpenSearchQueryBuilderOperatorPlugins } from \"../types.js\";\n\ninterface Params {\n plugins: PluginsContainer;\n}\nexport const createOperatorPluginList = (params: Params): OpenSearchQueryBuilderOperatorPlugins => {\n const { plugins } = params;\n /**\n * We always set the last one operator plugin added.\n * This way user can override the plugins.\n */\n return plugins\n .byType<OpenSearchQueryBuilderOperatorPlugin>(OpenSearchQueryBuilderOperatorPlugin.type)\n .reduce<OpenSearchQueryBuilderOperatorPlugins>((acc, plugin) => {\n const operator = plugin.getOperator();\n /**\n * We also only allow the override of the plugins if the new plugin is NOT a default one.\n * If a user sets the plugin name ending with .default, we cannot do anything about it.\n */\n if (!!acc[operator] && (plugin.name || \"\").match(/\\.default$/)) {\n return acc;\n }\n acc[operator] = plugin;\n return acc;\n }, {});\n};\n"],"mappings":"AACA,SAASA,oCAAoC,QAAQ,wBAAwB;AAM7E,OAAO,MAAMC,wBAAwB,GAAIC,MAAc,IAA4C;EAC/F,MAAM;IAAEC;EAAQ,CAAC,GAAGD,MAAM;EAC1B;AACJ;AACA;AACA;EACI,OAAOC,OAAO,CACTC,MAAM,CAAuCJ,oCAAoC,CAACK,IAAI,CAAC,CACvFC,MAAM,CAAwC,CAACC,GAAG,EAAEC,MAAM,KAAK;IAC5D,MAAMC,QAAQ,GAAGD,MAAM,CAACE,WAAW,CAAC,CAAC;IACrC;AACZ;AACA;AACA;IACY,IAAI,CAAC,CAACH,GAAG,CAACE,QAAQ,CAAC,IAAI,CAACD,MAAM,CAACG,IAAI,IAAI,EAAE,EAAEC,KAAK,CAAC,YAAY,CAAC,EAAE;MAC5D,OAAOL,GAAG;IACd;IACAA,GAAG,CAACE,QAAQ,CAAC,GAAGD,MAAM;IACtB,OAAOD,GAAG;EACd,CAAC,EAAE,CAAC,CAAC,CAAC;AACd,CAAC","ignoreList":[]}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
const IGNORED_ES_SEARCH_EXCEPTIONS = ["index_not_found_exception", "search_phase_execution_exception"];
|
|
2
|
-
export const shouldIgnoreEsResponseError = error => {
|
|
3
|
-
return IGNORED_ES_SEARCH_EXCEPTIONS.some(ignoredMessage => error.message.includes(ignoredMessage));
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
//# sourceMappingURL=shouldIgnoreEsResponseError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["IGNORED_ES_SEARCH_EXCEPTIONS","shouldIgnoreEsResponseError","error","some","ignoredMessage","message","includes"],"sources":["shouldIgnoreEsResponseError.ts"],"sourcesContent":["import type WebinyError from \"@webiny/error\";\n\nconst IGNORED_ES_SEARCH_EXCEPTIONS = [\n \"index_not_found_exception\",\n \"search_phase_execution_exception\"\n];\n\nexport const shouldIgnoreEsResponseError = (error: WebinyError) => {\n return IGNORED_ES_SEARCH_EXCEPTIONS.some(ignoredMessage =>\n error.message.includes(ignoredMessage)\n );\n};\n"],"mappings":"AAEA,MAAMA,4BAA4B,GAAG,CACjC,2BAA2B,EAC3B,kCAAkC,CACrC;AAED,OAAO,MAAMC,2BAA2B,GAAIC,KAAkB,IAAK;EAC/D,OAAOF,4BAA4B,CAACG,IAAI,CAACC,cAAc,IACnDF,KAAK,CAACG,OAAO,CAACC,QAAQ,CAACF,cAAc,CACzC,CAAC;AACL,CAAC","ignoreList":[]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Sort as OpenSearchSort } from "@webiny/api-opensearch/types.js";
|
|
2
|
-
import type { CmsEntryListSort, CmsModel } from "@webiny/api-headless-cms/types/index.js";
|
|
3
|
-
import type { ModelFields } from "./types.js";
|
|
4
|
-
import type { CmsEntryOpenSearchValueSearchRegistry } from "../../../features/CmsEntryOpenSearchValueSearch/index.js";
|
|
5
|
-
interface Params {
|
|
6
|
-
sort?: CmsEntryListSort;
|
|
7
|
-
modelFields: ModelFields;
|
|
8
|
-
model: CmsModel;
|
|
9
|
-
valueSearchRegistry: CmsEntryOpenSearchValueSearchRegistry.Interface;
|
|
10
|
-
}
|
|
11
|
-
export declare const createElasticsearchSort: (params: Params) => OpenSearchSort;
|
|
12
|
-
export {};
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { createSort, OpenSearchFieldPlugin } from "@webiny/api-opensearch";
|
|
2
|
-
import { hasKeyword } from "./keyword.js";
|
|
3
|
-
import { createFieldPathFactory } from "./filtering/path.js";
|
|
4
|
-
import { NoValueContainer } from "../../../values/NoValueContainer.js";
|
|
5
|
-
const matchField = input => {
|
|
6
|
-
const valuesMatch = input.match(/^values_([a-zA-Z-0-9_]+)_(ASC|DESC)$/);
|
|
7
|
-
if (valuesMatch) {
|
|
8
|
-
const [, fieldId, order] = valuesMatch;
|
|
9
|
-
return {
|
|
10
|
-
fieldId,
|
|
11
|
-
isValues: true,
|
|
12
|
-
order: order
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
const nonValues = input.match(/^([a-zA-Z-0-9_]+)_(ASC|DESC)$/);
|
|
16
|
-
if (!nonValues) {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
const [, fieldId, order] = nonValues;
|
|
20
|
-
return {
|
|
21
|
-
fieldId,
|
|
22
|
-
isValues: false,
|
|
23
|
-
order: order
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
export const createElasticsearchSort = params => {
|
|
27
|
-
const {
|
|
28
|
-
sort,
|
|
29
|
-
modelFields,
|
|
30
|
-
valueSearchRegistry
|
|
31
|
-
} = params;
|
|
32
|
-
if (!sort || sort.length === 0) {
|
|
33
|
-
return [{
|
|
34
|
-
["id.keyword"]: {
|
|
35
|
-
order: "asc"
|
|
36
|
-
}
|
|
37
|
-
}];
|
|
38
|
-
}
|
|
39
|
-
const createFieldPath = createFieldPathFactory({
|
|
40
|
-
valueSearchRegistry
|
|
41
|
-
});
|
|
42
|
-
const fieldIdToStorageIdIdMap = {};
|
|
43
|
-
const sortPlugins = Object.values(modelFields).reduce((plugins, field) => {
|
|
44
|
-
/**
|
|
45
|
-
* We do not support sorting by nested fields.
|
|
46
|
-
*/
|
|
47
|
-
const isValues = field.parents.length === 1 && field.parents[0].fieldId === "values";
|
|
48
|
-
if (field.parents.length > 0 && !isValues) {
|
|
49
|
-
return plugins;
|
|
50
|
-
}
|
|
51
|
-
const fieldId = field.field.fieldId;
|
|
52
|
-
const fieldIdPath = isValues ? `values.${fieldId}` : fieldId;
|
|
53
|
-
fieldIdToStorageIdIdMap[fieldIdPath] = fieldIdPath;
|
|
54
|
-
const {
|
|
55
|
-
path
|
|
56
|
-
} = createFieldPath({
|
|
57
|
-
key: field.field.storageId,
|
|
58
|
-
field,
|
|
59
|
-
value: NoValueContainer.create(),
|
|
60
|
-
keyword: false,
|
|
61
|
-
originalValue: NoValueContainer.create()
|
|
62
|
-
});
|
|
63
|
-
/**
|
|
64
|
-
* Plugins must be stored with fieldId as key because it is later used to find the sorting plugin.
|
|
65
|
-
*/
|
|
66
|
-
plugins[fieldIdPath] = new OpenSearchFieldPlugin({
|
|
67
|
-
unmappedType: field.unmappedType,
|
|
68
|
-
keyword: hasKeyword(field),
|
|
69
|
-
sortable: field.sortable,
|
|
70
|
-
searchable: field.searchable,
|
|
71
|
-
field: fieldId,
|
|
72
|
-
path
|
|
73
|
-
});
|
|
74
|
-
return plugins;
|
|
75
|
-
}, {
|
|
76
|
-
["*"]: new OpenSearchFieldPlugin({
|
|
77
|
-
field: OpenSearchFieldPlugin.ALL,
|
|
78
|
-
keyword: false
|
|
79
|
-
})
|
|
80
|
-
});
|
|
81
|
-
const transformedSort = sort.map(value => {
|
|
82
|
-
const matched = matchField(value);
|
|
83
|
-
if (!matched) {
|
|
84
|
-
return null;
|
|
85
|
-
}
|
|
86
|
-
const {
|
|
87
|
-
fieldId,
|
|
88
|
-
order,
|
|
89
|
-
isValues
|
|
90
|
-
} = matched;
|
|
91
|
-
const key = isValues ? `values.${fieldId}` : fieldId;
|
|
92
|
-
if (fieldIdToStorageIdIdMap[key]) {
|
|
93
|
-
return `${fieldIdToStorageIdIdMap[key]}_${order}`;
|
|
94
|
-
}
|
|
95
|
-
return value;
|
|
96
|
-
}).filter(Boolean);
|
|
97
|
-
return createSort({
|
|
98
|
-
fieldPlugins: sortPlugins,
|
|
99
|
-
sort: transformedSort
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
//# sourceMappingURL=sort.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["createSort","OpenSearchFieldPlugin","hasKeyword","createFieldPathFactory","NoValueContainer","matchField","input","valuesMatch","match","fieldId","order","isValues","nonValues","createElasticsearchSort","params","sort","modelFields","valueSearchRegistry","length","createFieldPath","fieldIdToStorageIdIdMap","sortPlugins","Object","values","reduce","plugins","field","parents","fieldIdPath","path","key","storageId","value","create","keyword","originalValue","unmappedType","sortable","searchable","ALL","transformedSort","map","matched","filter","Boolean","fieldPlugins"],"sources":["sort.ts"],"sourcesContent":["import type { Sort as OpenSearchSort } from \"@webiny/api-opensearch/types.js\";\nimport { createSort, OpenSearchFieldPlugin } from \"@webiny/api-opensearch\";\nimport type { CmsEntryListSort, CmsModel } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { ModelFields } from \"./types.js\";\nimport { hasKeyword } from \"~/operations/entry/elasticsearch/keyword.js\";\nimport { createFieldPathFactory } from \"~/operations/entry/elasticsearch/filtering/path.js\";\nimport { NoValueContainer } from \"~/values/NoValueContainer.js\";\nimport type { CmsEntryOpenSearchValueSearchRegistry } from \"~/features/CmsEntryOpenSearchValueSearch/index.js\";\n\ninterface IMatchFieldResponse {\n fieldId: string;\n isValues: boolean;\n order: \"ASC\" | \"DESC\";\n}\n\nconst matchField = (input: string): IMatchFieldResponse | null => {\n const valuesMatch = input.match(/^values_([a-zA-Z-0-9_]+)_(ASC|DESC)$/);\n if (valuesMatch) {\n const [, fieldId, order] = valuesMatch;\n return {\n fieldId,\n isValues: true,\n order: order as \"ASC\" | \"DESC\"\n };\n }\n const nonValues = input.match(/^([a-zA-Z-0-9_]+)_(ASC|DESC)$/);\n if (!nonValues) {\n return null;\n }\n const [, fieldId, order] = nonValues;\n return {\n fieldId,\n isValues: false,\n order: order as \"ASC\" | \"DESC\"\n };\n};\n\ninterface Params {\n sort?: CmsEntryListSort;\n modelFields: ModelFields;\n model: CmsModel;\n valueSearchRegistry: CmsEntryOpenSearchValueSearchRegistry.Interface;\n}\n\nexport const createElasticsearchSort = (params: Params): OpenSearchSort => {\n const { sort, modelFields, valueSearchRegistry } = params;\n\n if (!sort || sort.length === 0) {\n return [\n {\n [\"id.keyword\"]: {\n order: \"asc\"\n }\n }\n ];\n }\n\n const createFieldPath = createFieldPathFactory({\n valueSearchRegistry\n });\n\n const fieldIdToStorageIdIdMap: Record<string, string> = {};\n\n const sortPlugins = Object.values(modelFields).reduce<Record<string, OpenSearchFieldPlugin>>(\n (plugins, field) => {\n /**\n * We do not support sorting by nested fields.\n */\n const isValues = field.parents.length === 1 && field.parents[0].fieldId === \"values\";\n if (field.parents.length > 0 && !isValues) {\n return plugins;\n }\n\n const fieldId = field.field.fieldId;\n const fieldIdPath = isValues ? `values.${fieldId}` : fieldId;\n\n fieldIdToStorageIdIdMap[fieldIdPath] = fieldIdPath;\n\n const { path } = createFieldPath({\n key: field.field.storageId,\n field,\n value: NoValueContainer.create(),\n keyword: false,\n originalValue: NoValueContainer.create()\n });\n /**\n * Plugins must be stored with fieldId as key because it is later used to find the sorting plugin.\n */\n plugins[fieldIdPath] = new OpenSearchFieldPlugin({\n unmappedType: field.unmappedType,\n keyword: hasKeyword(field),\n sortable: field.sortable,\n searchable: field.searchable,\n field: fieldId,\n path\n });\n return plugins;\n },\n {\n [\"*\"]: new OpenSearchFieldPlugin({\n field: OpenSearchFieldPlugin.ALL,\n keyword: false\n })\n }\n );\n\n const transformedSort = sort\n .map(value => {\n const matched = matchField(value);\n if (!matched) {\n return null;\n }\n const { fieldId, order, isValues } = matched;\n const key = isValues ? `values.${fieldId}` : fieldId;\n if (fieldIdToStorageIdIdMap[key]) {\n return `${fieldIdToStorageIdIdMap[key]}_${order}`;\n }\n\n return value;\n })\n .filter(Boolean) as string[];\n return createSort({\n fieldPlugins: sortPlugins,\n sort: transformedSort\n });\n};\n"],"mappings":"AACA,SAASA,UAAU,EAAEC,qBAAqB,QAAQ,wBAAwB;AAG1E,SAASC,UAAU;AACnB,SAASC,sBAAsB;AAC/B,SAASC,gBAAgB;AASzB,MAAMC,UAAU,GAAIC,KAAa,IAAiC;EAC9D,MAAMC,WAAW,GAAGD,KAAK,CAACE,KAAK,CAAC,sCAAsC,CAAC;EACvE,IAAID,WAAW,EAAE;IACb,MAAM,GAAGE,OAAO,EAAEC,KAAK,CAAC,GAAGH,WAAW;IACtC,OAAO;MACHE,OAAO;MACPE,QAAQ,EAAE,IAAI;MACdD,KAAK,EAAEA;IACX,CAAC;EACL;EACA,MAAME,SAAS,GAAGN,KAAK,CAACE,KAAK,CAAC,+BAA+B,CAAC;EAC9D,IAAI,CAACI,SAAS,EAAE;IACZ,OAAO,IAAI;EACf;EACA,MAAM,GAAGH,OAAO,EAAEC,KAAK,CAAC,GAAGE,SAAS;EACpC,OAAO;IACHH,OAAO;IACPE,QAAQ,EAAE,KAAK;IACfD,KAAK,EAAEA;EACX,CAAC;AACL,CAAC;AASD,OAAO,MAAMG,uBAAuB,GAAIC,MAAc,IAAqB;EACvE,MAAM;IAAEC,IAAI;IAAEC,WAAW;IAAEC;EAAoB,CAAC,GAAGH,MAAM;EAEzD,IAAI,CAACC,IAAI,IAAIA,IAAI,CAACG,MAAM,KAAK,CAAC,EAAE;IAC5B,OAAO,CACH;MACI,CAAC,YAAY,GAAG;QACZR,KAAK,EAAE;MACX;IACJ,CAAC,CACJ;EACL;EAEA,MAAMS,eAAe,GAAGhB,sBAAsB,CAAC;IAC3Cc;EACJ,CAAC,CAAC;EAEF,MAAMG,uBAA+C,GAAG,CAAC,CAAC;EAE1D,MAAMC,WAAW,GAAGC,MAAM,CAACC,MAAM,CAACP,WAAW,CAAC,CAACQ,MAAM,CACjD,CAACC,OAAO,EAAEC,KAAK,KAAK;IAChB;AACZ;AACA;IACY,MAAMf,QAAQ,GAAGe,KAAK,CAACC,OAAO,CAACT,MAAM,KAAK,CAAC,IAAIQ,KAAK,CAACC,OAAO,CAAC,CAAC,CAAC,CAAClB,OAAO,KAAK,QAAQ;IACpF,IAAIiB,KAAK,CAACC,OAAO,CAACT,MAAM,GAAG,CAAC,IAAI,CAACP,QAAQ,EAAE;MACvC,OAAOc,OAAO;IAClB;IAEA,MAAMhB,OAAO,GAAGiB,KAAK,CAACA,KAAK,CAACjB,OAAO;IACnC,MAAMmB,WAAW,GAAGjB,QAAQ,GAAG,UAAUF,OAAO,EAAE,GAAGA,OAAO;IAE5DW,uBAAuB,CAACQ,WAAW,CAAC,GAAGA,WAAW;IAElD,MAAM;MAAEC;IAAK,CAAC,GAAGV,eAAe,CAAC;MAC7BW,GAAG,EAAEJ,KAAK,CAACA,KAAK,CAACK,SAAS;MAC1BL,KAAK;MACLM,KAAK,EAAE5B,gBAAgB,CAAC6B,MAAM,CAAC,CAAC;MAChCC,OAAO,EAAE,KAAK;MACdC,aAAa,EAAE/B,gBAAgB,CAAC6B,MAAM,CAAC;IAC3C,CAAC,CAAC;IACF;AACZ;AACA;IACYR,OAAO,CAACG,WAAW,CAAC,GAAG,IAAI3B,qBAAqB,CAAC;MAC7CmC,YAAY,EAAEV,KAAK,CAACU,YAAY;MAChCF,OAAO,EAAEhC,UAAU,CAACwB,KAAK,CAAC;MAC1BW,QAAQ,EAAEX,KAAK,CAACW,QAAQ;MACxBC,UAAU,EAAEZ,KAAK,CAACY,UAAU;MAC5BZ,KAAK,EAAEjB,OAAO;MACdoB;IACJ,CAAC,CAAC;IACF,OAAOJ,OAAO;EAClB,CAAC,EACD;IACI,CAAC,GAAG,GAAG,IAAIxB,qBAAqB,CAAC;MAC7ByB,KAAK,EAAEzB,qBAAqB,CAACsC,GAAG;MAChCL,OAAO,EAAE;IACb,CAAC;EACL,CACJ,CAAC;EAED,MAAMM,eAAe,GAAGzB,IAAI,CACvB0B,GAAG,CAACT,KAAK,IAAI;IACV,MAAMU,OAAO,GAAGrC,UAAU,CAAC2B,KAAK,CAAC;IACjC,IAAI,CAACU,OAAO,EAAE;MACV,OAAO,IAAI;IACf;IACA,MAAM;MAAEjC,OAAO;MAAEC,KAAK;MAAEC;IAAS,CAAC,GAAG+B,OAAO;IAC5C,MAAMZ,GAAG,GAAGnB,QAAQ,GAAG,UAAUF,OAAO,EAAE,GAAGA,OAAO;IACpD,IAAIW,uBAAuB,CAACU,GAAG,CAAC,EAAE;MAC9B,OAAO,GAAGV,uBAAuB,CAACU,GAAG,CAAC,IAAIpB,KAAK,EAAE;IACrD;IAEA,OAAOsB,KAAK;EAChB,CAAC,CAAC,CACDW,MAAM,CAACC,OAAO,CAAa;EAChC,OAAO5C,UAAU,CAAC;IACd6C,YAAY,EAAExB,WAAW;IACzBN,IAAI,EAAEyB;EACV,CAAC,CAAC;AACN,CAAC","ignoreList":[]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { CmsModelField } from "@webiny/api-headless-cms/types/index.js";
|
|
2
|
-
import type { CmsEntryOpenSearchValueSearchRegistry } from "../../../features/CmsEntryOpenSearchValueSearch/index.js";
|
|
3
|
-
interface Params {
|
|
4
|
-
valueSearchRegistry: CmsEntryOpenSearchValueSearchRegistry.Interface;
|
|
5
|
-
field: CmsModelField;
|
|
6
|
-
value: any;
|
|
7
|
-
}
|
|
8
|
-
export declare const transformValueForSearch: (params: Params) => any;
|
|
9
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export const transformValueForSearch = params => {
|
|
2
|
-
const {
|
|
3
|
-
field,
|
|
4
|
-
valueSearchRegistry,
|
|
5
|
-
value
|
|
6
|
-
} = params;
|
|
7
|
-
const search = valueSearchRegistry.get(field.type);
|
|
8
|
-
if (!search) {
|
|
9
|
-
return value;
|
|
10
|
-
}
|
|
11
|
-
return search.transform({
|
|
12
|
-
field,
|
|
13
|
-
value
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=transformValueForSearch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["transformValueForSearch","params","field","valueSearchRegistry","value","search","get","type","transform"],"sources":["transformValueForSearch.ts"],"sourcesContent":["import type { CmsModelField } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { CmsEntryOpenSearchValueSearchRegistry } from \"~/features/CmsEntryOpenSearchValueSearch/index.js\";\n\ninterface Params {\n valueSearchRegistry: CmsEntryOpenSearchValueSearchRegistry.Interface;\n field: CmsModelField;\n value: any;\n}\n\nexport const transformValueForSearch = (params: Params): any => {\n const { field, valueSearchRegistry, value } = params;\n const search = valueSearchRegistry.get(field.type);\n if (!search) {\n return value;\n }\n return search.transform({ field, value });\n};\n"],"mappings":"AASA,OAAO,MAAMA,uBAAuB,GAAIC,MAAc,IAAU;EAC5D,MAAM;IAAEC,KAAK;IAAEC,mBAAmB;IAAEC;EAAM,CAAC,GAAGH,MAAM;EACpD,MAAMI,MAAM,GAAGF,mBAAmB,CAACG,GAAG,CAACJ,KAAK,CAACK,IAAI,CAAC;EAClD,IAAI,CAACF,MAAM,EAAE;IACT,OAAOD,KAAK;EAChB;EACA,OAAOC,MAAM,CAACG,SAAS,CAAC;IAAEN,KAAK;IAAEE;EAAM,CAAC,CAAC;AAC7C,CAAC","ignoreList":[]}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { OpenSearchQueryBuilderOperatorPlugin } from "@webiny/api-opensearch";
|
|
2
|
-
import type { CmsModelField } from "@webiny/api-headless-cms/types/index.js";
|
|
3
|
-
/**
|
|
4
|
-
* ./fields
|
|
5
|
-
*/
|
|
6
|
-
type ModelFieldPath = string | ((value: string) => string);
|
|
7
|
-
export type FieldType = "text" | "date" | "datetime" | "time" | "number" | "boolean" | string;
|
|
8
|
-
export interface ModelFieldParent {
|
|
9
|
-
fieldId: string;
|
|
10
|
-
storageId: string;
|
|
11
|
-
type: FieldType;
|
|
12
|
-
}
|
|
13
|
-
export interface ModelField {
|
|
14
|
-
unmappedType?: string;
|
|
15
|
-
keyword?: boolean;
|
|
16
|
-
searchable: boolean;
|
|
17
|
-
sortable: boolean;
|
|
18
|
-
type: FieldType;
|
|
19
|
-
systemField?: boolean;
|
|
20
|
-
field: CmsModelField;
|
|
21
|
-
path?: ModelFieldPath;
|
|
22
|
-
fullTextSearch?: boolean;
|
|
23
|
-
parents: ModelFieldParent[];
|
|
24
|
-
}
|
|
25
|
-
export interface ModelFields {
|
|
26
|
-
[fieldId: string]: ModelField;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* ./plugins/operator
|
|
30
|
-
*/
|
|
31
|
-
export interface OpenSearchQueryBuilderOperatorPlugins {
|
|
32
|
-
[key: string]: OpenSearchQueryBuilderOperatorPlugin;
|
|
33
|
-
}
|
|
34
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { OpenSearchQueryBuilderOperatorPlugin } from \"@webiny/api-opensearch\";\nimport type { CmsModelField } from \"@webiny/api-headless-cms/types/index.js\";\n\n/**\n * ./fields\n */\ntype ModelFieldPath = string | ((value: string) => string);\n\nexport type FieldType = \"text\" | \"date\" | \"datetime\" | \"time\" | \"number\" | \"boolean\" | string;\n\nexport interface ModelFieldParent {\n fieldId: string;\n storageId: string;\n type: FieldType;\n}\nexport interface ModelField {\n unmappedType?: string;\n keyword?: boolean;\n searchable: boolean;\n sortable: boolean;\n type: FieldType;\n systemField?: boolean;\n field: CmsModelField;\n path?: ModelFieldPath;\n fullTextSearch?: boolean;\n parents: ModelFieldParent[];\n}\n\nexport interface ModelFields {\n [fieldId: string]: ModelField;\n}\n\n/**\n * ./plugins/operator\n */\nexport interface OpenSearchQueryBuilderOperatorPlugins {\n [key: string]: OpenSearchQueryBuilderOperatorPlugin;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { Client } from "@webiny/api-opensearch";
|
|
2
|
-
import { type IOpenSearchEntity as IElasticsearchEntity } from "@webiny/api-opensearch";
|
|
3
|
-
import type { PluginsContainer } from "@webiny/plugins";
|
|
4
|
-
import type { CmsEntryStorageOperations } from "../../types.js";
|
|
5
|
-
import type { IEntryEntity } from "../../definitions/types.js";
|
|
6
|
-
import type { CmsModelFieldToGraphQLRegistry } from "@webiny/api-headless-cms/exports/api/cms/graphql.js";
|
|
7
|
-
import { CompressionHandler } from "@webiny/utils/features/compression/abstractions/CompressionHandler.js";
|
|
8
|
-
import type { CmsEntryOpenSearchBodyModifier } from "../../features/CmsEntryOpenSearchBodyModifier/index.js";
|
|
9
|
-
import type { CmsEntryOpenSearchSortModifier } from "../../features/CmsEntryOpenSearchSortModifier/index.js";
|
|
10
|
-
import type { CmsEntryOpenSearchValuesModifier } from "../../features/CmsEntryOpenSearchValuesModifier/index.js";
|
|
11
|
-
import type { CmsEntryOpenSearchQueryModifier } from "../../features/CmsEntryOpenSearchQueryModifier/index.js";
|
|
12
|
-
import type { CmsEntryOpenSearchValueSearchRegistry } from "../../features/CmsEntryOpenSearchValueSearch/index.js";
|
|
13
|
-
import type { CmsEntryOpenSearchFullTextSearch } from "../../features/CmsEntryOpenSearchFullTextSearch/index.js";
|
|
14
|
-
import type { CmsEntryOpenSearchFieldIndexRegistry } from "../../features/CmsEntryOpenSearchFieldIndex/index.js";
|
|
15
|
-
import type { CmsEntryOpenSearchFilterRegistry } from "../../features/CmsEntryOpenSearchFilter/index.js";
|
|
16
|
-
export interface CreateEntriesStorageOperationsParams {
|
|
17
|
-
entity: IEntryEntity;
|
|
18
|
-
esEntity: IElasticsearchEntity;
|
|
19
|
-
elasticsearch: Client;
|
|
20
|
-
plugins: PluginsContainer;
|
|
21
|
-
fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface;
|
|
22
|
-
fieldIndexRegistry: CmsEntryOpenSearchFieldIndexRegistry.Interface;
|
|
23
|
-
compressionHandler: CompressionHandler.Interface;
|
|
24
|
-
bodyModifiers: CmsEntryOpenSearchBodyModifier.Interface[];
|
|
25
|
-
sortModifiers: CmsEntryOpenSearchSortModifier.Interface[];
|
|
26
|
-
queryModifiers: CmsEntryOpenSearchQueryModifier.Interface[];
|
|
27
|
-
valueSearchRegistry: CmsEntryOpenSearchValueSearchRegistry.Interface;
|
|
28
|
-
fullTextSearches: CmsEntryOpenSearchFullTextSearch.Interface[];
|
|
29
|
-
valuesModifiers: CmsEntryOpenSearchValuesModifier.Interface[];
|
|
30
|
-
filterRegistry: CmsEntryOpenSearchFilterRegistry.Interface;
|
|
31
|
-
}
|
|
32
|
-
export declare const createEntriesStorageOperations: (params: CreateEntriesStorageOperationsParams) => CmsEntryStorageOperations;
|