@webiny/api-headless-cms 5.40.0-beta.2 → 5.40.0-beta.4
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/constants.d.ts +11 -1
- package/constants.js +15 -9
- package/constants.js.map +1 -1
- package/context.js +47 -31
- package/context.js.map +1 -1
- package/crud/AccessControl/AccessControl.d.ts +3 -3
- package/crud/AccessControl/AccessControl.js.map +1 -1
- package/crud/contentEntry/abstractions/IDeleteEntry.d.ts +4 -0
- package/crud/contentEntry/abstractions/IDeleteEntry.js +7 -0
- package/crud/contentEntry/abstractions/IDeleteEntry.js.map +1 -0
- package/crud/contentEntry/abstractions/IDeleteEntryOperation.d.ts +4 -0
- package/crud/contentEntry/abstractions/IDeleteEntryOperation.js +7 -0
- package/crud/contentEntry/abstractions/IDeleteEntryOperation.js.map +1 -0
- package/crud/contentEntry/abstractions/IGetEntriesByIds.d.ts +4 -0
- package/crud/contentEntry/abstractions/IGetEntriesByIds.js +7 -0
- package/crud/contentEntry/abstractions/IGetEntriesByIds.js.map +1 -0
- package/crud/contentEntry/abstractions/IGetEntry.d.ts +4 -0
- package/crud/contentEntry/abstractions/IGetEntry.js +7 -0
- package/crud/contentEntry/abstractions/IGetEntry.js.map +1 -0
- package/crud/contentEntry/abstractions/IGetLatestEntriesByIds.d.ts +4 -0
- package/crud/contentEntry/abstractions/IGetLatestEntriesByIds.js +7 -0
- package/crud/contentEntry/abstractions/IGetLatestEntriesByIds.js.map +1 -0
- package/crud/contentEntry/abstractions/IGetLatestRevisionByEntryId.d.ts +4 -0
- package/crud/contentEntry/abstractions/IGetLatestRevisionByEntryId.js +7 -0
- package/crud/contentEntry/abstractions/IGetLatestRevisionByEntryId.js.map +1 -0
- package/crud/contentEntry/abstractions/IGetPreviousRevisionByEntryId.d.ts +4 -0
- package/crud/contentEntry/abstractions/IGetPreviousRevisionByEntryId.js +7 -0
- package/crud/contentEntry/abstractions/IGetPreviousRevisionByEntryId.js.map +1 -0
- package/crud/contentEntry/abstractions/IGetPublishedEntriesByIds.d.ts +4 -0
- package/crud/contentEntry/abstractions/IGetPublishedEntriesByIds.js +7 -0
- package/crud/contentEntry/abstractions/IGetPublishedEntriesByIds.js.map +1 -0
- package/crud/contentEntry/abstractions/IGetPublishedRevisionByEntryId.d.ts +4 -0
- package/crud/contentEntry/abstractions/IGetPublishedRevisionByEntryId.js +7 -0
- package/crud/contentEntry/abstractions/IGetPublishedRevisionByEntryId.js.map +1 -0
- package/crud/contentEntry/abstractions/IGetRevisionById.d.ts +4 -0
- package/crud/contentEntry/abstractions/IGetRevisionById.js +7 -0
- package/crud/contentEntry/abstractions/IGetRevisionById.js.map +1 -0
- package/crud/contentEntry/abstractions/IGetRevisionsByEntryId.d.ts +4 -0
- package/crud/contentEntry/abstractions/IGetRevisionsByEntryId.js +7 -0
- package/crud/contentEntry/abstractions/IGetRevisionsByEntryId.js.map +1 -0
- package/crud/contentEntry/abstractions/IListEntries.d.ts +4 -0
- package/crud/contentEntry/abstractions/IListEntries.js +7 -0
- package/crud/contentEntry/abstractions/IListEntries.js.map +1 -0
- package/crud/contentEntry/abstractions/IListEntriesOperation.d.ts +4 -0
- package/crud/contentEntry/abstractions/IListEntriesOperation.js +7 -0
- package/crud/contentEntry/abstractions/IListEntriesOperation.js.map +1 -0
- package/crud/contentEntry/abstractions/IMoveEntryToBinOperation.d.ts +4 -0
- package/crud/contentEntry/abstractions/IMoveEntryToBinOperation.js +7 -0
- package/crud/contentEntry/abstractions/IMoveEntryToBinOperation.js.map +1 -0
- package/crud/contentEntry/abstractions/IRestoreEntryFromBin.d.ts +4 -0
- package/crud/contentEntry/abstractions/IRestoreEntryFromBin.js +7 -0
- package/crud/contentEntry/abstractions/IRestoreEntryFromBin.js.map +1 -0
- package/crud/contentEntry/abstractions/IRestoreEntryFromBinOperation.d.ts +4 -0
- package/crud/contentEntry/abstractions/IRestoreEntryFromBinOperation.js +7 -0
- package/crud/contentEntry/abstractions/IRestoreEntryFromBinOperation.js.map +1 -0
- package/crud/contentEntry/abstractions/index.d.ts +16 -0
- package/crud/contentEntry/abstractions/index.js +183 -0
- package/crud/contentEntry/abstractions/index.js.map +1 -0
- package/crud/contentEntry/afterDelete.js.map +1 -1
- package/crud/contentEntry/beforeCreate.js.map +1 -1
- package/crud/contentEntry/beforeUpdate.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createEntryData.js +9 -1
- package/crud/contentEntry/entryDataFactories/createEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createEntryRevisionFromData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createPublishEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createRepublishEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createUpdateEntryData.js +8 -0
- package/crud/contentEntry/entryDataFactories/createUpdateEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/index.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/mapAndCleanUpdatedInputData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/statuses.js +3 -6
- package/crud/contentEntry/entryDataFactories/statuses.js.map +1 -1
- package/crud/contentEntry/entryDataValidation.js.map +1 -1
- package/crud/contentEntry/markLockedFields.js.map +1 -1
- package/crud/contentEntry/referenceFieldsMapping.js +1 -1
- package/crud/contentEntry/referenceFieldsMapping.js.map +1 -1
- package/crud/contentEntry/searchableFields.js.map +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntry.d.ts +10 -0
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntry.js +58 -0
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntry.js.map +1 -0
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperation.d.ts +7 -0
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperation.js +17 -0
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperation.js.map +1 -0
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperationWithEvents.d.ts +9 -0
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperationWithEvents.js +45 -0
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperationWithEvents.js.map +1 -0
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntrySecure.d.ts +9 -0
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntrySecure.js +22 -0
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntrySecure.js.map +1 -0
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBin.d.ts +10 -0
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBin.js +33 -0
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBin.js.map +1 -0
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperation.d.ts +7 -0
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperation.js +17 -0
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperation.js.map +1 -0
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperationWithEvents.d.ts +9 -0
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperationWithEvents.js +45 -0
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperationWithEvents.js.map +1 -0
- package/crud/contentEntry/useCases/DeleteEntry/TransformEntryDelete.d.ts +6 -0
- package/crud/contentEntry/useCases/DeleteEntry/TransformEntryDelete.js +21 -0
- package/crud/contentEntry/useCases/DeleteEntry/TransformEntryDelete.js.map +1 -0
- package/crud/contentEntry/useCases/DeleteEntry/TransformEntryMoveToBin.d.ts +9 -0
- package/crud/contentEntry/useCases/DeleteEntry/TransformEntryMoveToBin.js +62 -0
- package/crud/contentEntry/useCases/DeleteEntry/TransformEntryMoveToBin.js.map +1 -0
- package/crud/contentEntry/useCases/DeleteEntry/index.d.ts +28 -0
- package/crud/contentEntry/useCases/DeleteEntry/index.js +42 -0
- package/crud/contentEntry/useCases/DeleteEntry/index.js.map +1 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIds.d.ts +7 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIds.js +17 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIds.js.map +1 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsNotDeleted.d.ts +7 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsNotDeleted.js +18 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsNotDeleted.js.map +1 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsSecure.d.ts +9 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsSecure.js +28 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsSecure.js.map +1 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/index.d.ts +11 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/index.js +20 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/index.js.map +1 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIds.d.ts +7 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIds.js +17 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIds.js.map +1 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsNotDeleted.d.ts +7 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsNotDeleted.js +18 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsNotDeleted.js.map +1 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsSecure.d.ts +9 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsSecure.js +28 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsSecure.js.map +1 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/index.d.ts +11 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/index.js +20 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/index.js.map +1 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryId.d.ts +7 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryId.js +17 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryId.js.map +1 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdDeleted.d.ts +7 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdDeleted.js +21 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdDeleted.js.map +1 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdNotDeleted.d.ts +7 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdNotDeleted.js +21 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdNotDeleted.js.map +1 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/index.d.ts +13 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/index.js +22 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/index.js.map +1 -0
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryId.d.ts +7 -0
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryId.js +17 -0
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryId.js.map +1 -0
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdNotDeleted.d.ts +7 -0
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdNotDeleted.js +21 -0
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdNotDeleted.js.map +1 -0
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/index.d.ts +9 -0
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/index.js +18 -0
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/index.js.map +1 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIds.d.ts +7 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIds.js +17 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIds.js.map +1 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsNotDeleted.d.ts +7 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsNotDeleted.js +18 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsNotDeleted.js.map +1 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsSecure.d.ts +9 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsSecure.js +28 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsSecure.js.map +1 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/index.d.ts +11 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/index.js +20 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/index.js.map +1 -0
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.d.ts +7 -0
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.js +17 -0
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.js.map +1 -0
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdNotDeleted.d.ts +7 -0
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdNotDeleted.js +21 -0
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdNotDeleted.js.map +1 -0
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/index.d.ts +9 -0
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/index.js +18 -0
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/index.js.map +1 -0
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionById.d.ts +7 -0
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionById.js +17 -0
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionById.js.map +1 -0
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionByIdNotDeleted.d.ts +7 -0
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionByIdNotDeleted.js +21 -0
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionByIdNotDeleted.js.map +1 -0
- package/crud/contentEntry/useCases/GetRevisionById/index.d.ts +9 -0
- package/crud/contentEntry/useCases/GetRevisionById/index.js +18 -0
- package/crud/contentEntry/useCases/GetRevisionById/index.js.map +1 -0
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryId.d.ts +7 -0
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryId.js +17 -0
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryId.js.map +1 -0
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryIdNotDeleted.d.ts +7 -0
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryIdNotDeleted.js +18 -0
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryIdNotDeleted.js.map +1 -0
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/index.d.ts +11 -0
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/index.js +18 -0
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/index.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/GetEntry.d.ts +7 -0
- package/crud/contentEntry/useCases/ListEntries/GetEntry.js +29 -0
- package/crud/contentEntry/useCases/ListEntries/GetEntry.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/GetEntrySecure.d.ts +11 -0
- package/crud/contentEntry/useCases/ListEntries/GetEntrySecure.js +38 -0
- package/crud/contentEntry/useCases/ListEntries/GetEntrySecure.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntries.d.ts +7 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntries.js +62 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntries.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperation.d.ts +7 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperation.js +17 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperation.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationDeleted.d.ts +7 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationDeleted.js +24 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationDeleted.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationLatest.d.ts +7 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationLatest.js +25 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationLatest.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationNotDeleted.d.ts +7 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationNotDeleted.js +24 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationNotDeleted.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationPublished.d.ts +7 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationPublished.js +24 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationPublished.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithEvents.d.ts +9 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithEvents.js +22 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithEvents.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSearchableFields.d.ts +8 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSearchableFields.js +27 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSearchableFields.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSort.d.ts +8 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSort.js +26 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSort.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithStatusCheck.d.ts +7 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithStatusCheck.js +36 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithStatusCheck.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesSecure.d.ts +11 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesSecure.js +41 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesSecure.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/index.d.ts +24 -0
- package/crud/contentEntry/useCases/ListEntries/index.js +61 -0
- package/crud/contentEntry/useCases/ListEntries/index.js.map +1 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBin.d.ts +10 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBin.js +37 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBin.js.map +1 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperation.d.ts +7 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperation.js +17 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperation.js.map +1 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperationWithEvents.d.ts +9 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperationWithEvents.js +42 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperationWithEvents.js.map +1 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinSecure.d.ts +9 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinSecure.js +22 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinSecure.js.map +1 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/TransformEntryRestoreFromBin.d.ts +9 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/TransformEntryRestoreFromBin.js +61 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/TransformEntryRestoreFromBin.js.map +1 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/index.d.ts +23 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/index.js +24 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/index.js.map +1 -0
- package/crud/contentEntry/useCases/index.d.ts +11 -0
- package/crud/contentEntry/useCases/index.js +128 -0
- package/crud/contentEntry/useCases/index.js.map +1 -0
- package/crud/contentEntry.crud.js +210 -269
- package/crud/contentEntry.crud.js.map +1 -1
- package/crud/contentModel/beforeCreate.js.map +1 -1
- package/crud/contentModel/beforeDelete.js.map +1 -1
- package/crud/contentModel/beforeUpdate.js.map +1 -1
- package/crud/contentModel/compatibility/modelApiName.js.map +1 -1
- package/crud/contentModel/contentModelManagerFactory.d.ts +1 -1
- package/crud/contentModel/contentModelManagerFactory.js.map +1 -1
- package/crud/contentModel/createFieldStorageId.js.map +1 -1
- package/crud/contentModel/defaultFields.js.map +1 -1
- package/crud/contentModel/ensureTypeTag.js.map +1 -1
- package/crud/contentModel/fields/descriptionField.js.map +1 -1
- package/crud/contentModel/fields/imageField.js.map +1 -1
- package/crud/contentModel/fields/titleField.js.map +1 -1
- package/crud/contentModel/listModelsFromDatabase.js.map +1 -1
- package/crud/contentModel/validate/endingAllowed.js.map +1 -1
- package/crud/contentModel/validate/isModelEndingAllowed.js +1 -2
- package/crud/contentModel/validate/isModelEndingAllowed.js.map +1 -1
- package/crud/contentModel/validate/modelId.js.map +1 -1
- package/crud/contentModel/validate/pluralApiName.js.map +1 -1
- package/crud/contentModel/validate/singularApiName.js.map +1 -1
- package/crud/contentModel/validateModel.js.map +1 -1
- package/crud/contentModel/validateModelFields.d.ts +1 -1
- package/crud/contentModel/validateModelFields.js.map +1 -1
- package/crud/contentModel/validateStorageId.d.ts +1 -0
- package/crud/contentModel/validateStorageId.js +29 -0
- package/crud/contentModel/validateStorageId.js.map +1 -0
- package/crud/contentModel/validation.d.ts +51 -30
- package/crud/contentModel/validation.js +3 -2
- package/crud/contentModel/validation.js.map +1 -1
- package/crud/contentModel.crud.js +6 -0
- package/crud/contentModel.crud.js.map +1 -1
- package/crud/contentModelGroup/beforeCreate.js.map +1 -1
- package/crud/contentModelGroup/beforeDelete.js.map +1 -1
- package/crud/contentModelGroup/beforeUpdate.js.map +1 -1
- package/crud/contentModelGroup/listGroupsFromDatabase.js.map +1 -1
- package/crud/contentModelGroup/validation.js.map +1 -1
- package/crud/contentModelGroup.crud.js.map +1 -1
- package/crud/system.crud.js.map +1 -1
- package/export/crud/exporting.js.map +1 -1
- package/export/crud/importing.js.map +1 -1
- package/export/crud/imports/importData.js.map +1 -1
- package/export/crud/imports/importGroups.js.map +1 -1
- package/export/crud/imports/importModels.js.map +1 -1
- package/export/crud/imports/validateGroups.js.map +1 -1
- package/export/crud/imports/validateInput.js.map +1 -1
- package/export/crud/imports/validateModels.js.map +1 -1
- package/export/crud/index.js.map +1 -1
- package/export/crud/sanitize.js.map +1 -1
- package/export/graphql/index.js +1 -1
- package/export/graphql/index.js.map +1 -1
- package/export/index.js.map +1 -1
- package/export/types.js +1 -2
- package/export/types.js.map +1 -1
- package/fieldConverters/CmsModelDefaultFieldConverterPlugin.js.map +1 -1
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js +4 -14
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js.map +1 -1
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.js.map +1 -1
- package/fieldConverters/index.js.map +1 -1
- package/graphql/buildSchemaPlugins.d.ts +2 -2
- package/graphql/buildSchemaPlugins.js.map +1 -1
- package/graphql/checkEndpointAccess.js.map +1 -1
- package/graphql/createExecutableSchema.d.ts +2 -2
- package/graphql/createExecutableSchema.js.map +1 -1
- package/graphql/createRequestBody.js.map +1 -1
- package/graphql/formatErrorPayload.js.map +1 -1
- package/graphql/generateSchema.js.map +1 -1
- package/graphql/getSchema.js.map +1 -1
- package/graphql/graphQLHandlerFactory.js.map +1 -1
- package/graphql/handleRequest.js.map +1 -1
- package/graphql/index.js.map +1 -1
- package/graphql/schema/baseContentSchema.d.ts +2 -2
- package/graphql/schema/baseContentSchema.js +1 -7
- package/graphql/schema/baseContentSchema.js.map +1 -1
- package/graphql/schema/baseSchema.js +12 -5
- package/graphql/schema/baseSchema.js.map +1 -1
- package/graphql/schema/contentEntries.d.ts +2 -2
- package/graphql/schema/contentEntries.js +2 -2
- package/graphql/schema/contentEntries.js.map +1 -1
- package/graphql/schema/contentModelGroups.d.ts +2 -2
- package/graphql/schema/contentModelGroups.js +1 -1
- package/graphql/schema/contentModelGroups.js.map +1 -1
- package/graphql/schema/contentModels.d.ts +2 -2
- package/graphql/schema/contentModels.js +3 -1
- package/graphql/schema/contentModels.js.map +1 -1
- package/graphql/schema/createFieldResolvers.js.map +1 -1
- package/graphql/schema/createFieldTypePluginRecords.js.map +1 -1
- package/graphql/schema/createManageResolvers.js +8 -0
- package/graphql/schema/createManageResolvers.js.map +1 -1
- package/graphql/schema/createManageSDL.js +10 -0
- package/graphql/schema/createManageSDL.js.map +1 -1
- package/graphql/schema/createPreviewResolvers.js.map +1 -1
- package/graphql/schema/createReadResolvers.js.map +1 -1
- package/graphql/schema/createReadSDL.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveCreate.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveCreateFrom.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveDelete.js +2 -1
- package/graphql/schema/resolvers/manage/resolveDelete.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveDeleteMultiple.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGetByIds.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGetRevisions.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGetUniqueFieldValues.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveList.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveListDeleted.d.ts +4 -0
- package/graphql/schema/resolvers/manage/resolveListDeleted.js +20 -0
- package/graphql/schema/resolvers/manage/resolveListDeleted.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveMove.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolvePublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveRepublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveRestoreFromBin.d.ts +7 -0
- package/graphql/schema/resolvers/manage/resolveRestoreFromBin.js +20 -0
- package/graphql/schema/resolvers/manage/resolveRestoreFromBin.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveUnpublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveUpdate.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveValidate.js.map +1 -1
- package/graphql/schema/resolvers/preview/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/preview/resolveList.js.map +1 -1
- package/graphql/schema/resolvers/read/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/read/resolveList.js.map +1 -1
- package/graphql/schema/schemaPlugins.d.ts +2 -2
- package/graphql/schema/schemaPlugins.js +2 -2
- package/graphql/schema/schemaPlugins.js.map +1 -1
- package/graphql/system.js.map +1 -1
- package/graphqlFields/boolean.js.map +1 -1
- package/graphqlFields/datetime.js.map +1 -1
- package/graphqlFields/dynamicZone/dynamicZoneField.js +27 -1
- package/graphqlFields/dynamicZone/dynamicZoneField.js.map +1 -1
- package/graphqlFields/dynamicZone/dynamicZoneStorage.js.map +1 -1
- package/graphqlFields/dynamicZone/index.js.map +1 -1
- package/graphqlFields/file.js.map +1 -1
- package/graphqlFields/helpers.js.map +1 -1
- package/graphqlFields/index.js.map +1 -1
- package/graphqlFields/json.js.map +1 -1
- package/graphqlFields/longText.js.map +1 -1
- package/graphqlFields/number.js.map +1 -1
- package/graphqlFields/object.d.ts +2 -2
- package/graphqlFields/object.js +14 -0
- package/graphqlFields/object.js.map +1 -1
- package/graphqlFields/ref.js.map +1 -1
- package/graphqlFields/richText/RichTextPluginsProcessor.js.map +1 -1
- package/graphqlFields/richText/richTextResolver.js.map +1 -1
- package/graphqlFields/richText.js.map +1 -1
- package/graphqlFields/text.js.map +1 -1
- package/htmlRenderer/LexicalRenderer.js.map +1 -1
- package/htmlRenderer/createLexicalHTMLRenderer.js.map +1 -1
- package/index.js.map +1 -1
- package/modelManager/DefaultCmsModelManager.d.ts +1 -0
- package/modelManager/DefaultCmsModelManager.js +3 -0
- package/modelManager/DefaultCmsModelManager.js.map +1 -1
- package/modelManager/index.js +1 -1
- package/modelManager/index.js.map +1 -1
- package/package.json +27 -27
- package/parameters/context.js.map +1 -1
- package/parameters/header.js.map +1 -1
- package/parameters/index.js.map +1 -1
- package/parameters/manual.js.map +1 -1
- package/parameters/path.js.map +1 -1
- package/plugins/CmsGraphQLSchemaPlugin/CmsGraphQLSchemaPlugin.d.ts +8 -0
- package/plugins/{CmsGraphQLSchemaPlugin.js → CmsGraphQLSchemaPlugin/CmsGraphQLSchemaPlugin.js} +5 -1
- package/plugins/CmsGraphQLSchemaPlugin/CmsGraphQLSchemaPlugin.js.map +1 -0
- package/plugins/CmsGraphQLSchemaPlugin/index.d.ts +1 -0
- package/plugins/CmsGraphQLSchemaPlugin/index.js +18 -0
- package/plugins/CmsGraphQLSchemaPlugin/index.js.map +1 -0
- package/plugins/CmsGraphQLSchemaSorterPlugin.js.map +1 -1
- package/plugins/CmsGroupPlugin.d.ts +4 -0
- package/plugins/CmsGroupPlugin.js +9 -1
- package/plugins/CmsGroupPlugin.js.map +1 -1
- package/plugins/CmsModelFieldConverterPlugin.js.map +1 -1
- package/plugins/CmsModelPlugin.d.ts +10 -8
- package/plugins/CmsModelPlugin.js +29 -16
- package/plugins/CmsModelPlugin.js.map +1 -1
- package/plugins/CmsParametersPlugin.js.map +1 -1
- package/plugins/CmsRichTextRendererPlugin.js.map +1 -1
- package/plugins/StorageOperationsCmsModelPlugin.js.map +1 -1
- package/plugins/StorageTransformPlugin.js.map +1 -1
- package/plugins/index.js.map +1 -1
- package/storage/default.js.map +1 -1
- package/storage/index.js.map +1 -1
- package/storage/json.js.map +1 -1
- package/storage/object.js.map +1 -1
- package/types/context.d.ts +146 -0
- package/types/context.js +7 -0
- package/types/context.js.map +1 -0
- package/types/fields/dynamicZoneField.d.ts +23 -0
- package/types/fields/dynamicZoneField.js +7 -0
- package/types/fields/dynamicZoneField.js.map +1 -0
- package/types/fields/objectField.d.ts +13 -0
- package/types/fields/objectField.js +7 -0
- package/types/fields/objectField.js.map +1 -0
- package/types/identity.d.ts +19 -0
- package/types/identity.js +7 -0
- package/types/identity.js.map +1 -0
- package/types/index.d.ts +10 -0
- package/types/index.js +117 -0
- package/types/index.js.map +1 -0
- package/types/model.d.ts +199 -0
- package/types/model.js +7 -0
- package/types/model.js.map +1 -0
- package/types/modelAst.d.ts +39 -0
- package/types/modelAst.js +7 -0
- package/types/modelAst.js.map +1 -0
- package/types/modelField.d.ts +320 -0
- package/types/modelField.js +7 -0
- package/types/modelField.js.map +1 -0
- package/types/modelGroup.d.ts +77 -0
- package/types/modelGroup.js +7 -0
- package/types/modelGroup.js.map +1 -0
- package/types/plugins.d.ts +364 -0
- package/types/plugins.js +7 -0
- package/types/plugins.js.map +1 -0
- package/{types.d.ts → types/types.d.ts} +196 -1171
- package/{types.js → types/types.js} +18 -119
- package/types/types.js.map +1 -0
- package/utils/caching/Cache.js.map +1 -1
- package/utils/caching/CacheKey.js.map +1 -1
- package/utils/caching/index.js.map +1 -1
- package/utils/caching/types.js.map +1 -1
- package/utils/contentEntryTraverser/ContentEntryTraverser.d.ts +10 -0
- package/utils/contentEntryTraverser/ContentEntryTraverser.js +84 -0
- package/utils/contentEntryTraverser/ContentEntryTraverser.js.map +1 -0
- package/utils/contentModelAst/CmsModelFieldToAstConverterFromPlugins.d.ts +6 -0
- package/utils/contentModelAst/CmsModelFieldToAstConverterFromPlugins.js +23 -0
- package/utils/contentModelAst/CmsModelFieldToAstConverterFromPlugins.js.map +1 -0
- package/utils/contentModelAst/CmsModelFieldToAstFromPlugin.d.ts +7 -0
- package/utils/contentModelAst/CmsModelFieldToAstFromPlugin.js +22 -0
- package/utils/contentModelAst/CmsModelFieldToAstFromPlugin.js.map +1 -0
- package/utils/contentModelAst/CmsModelToAstConverter.d.ts +11 -0
- package/utils/contentModelAst/CmsModelToAstConverter.js +28 -0
- package/utils/contentModelAst/CmsModelToAstConverter.js.map +1 -0
- package/utils/contentModelAst/index.d.ts +3 -0
- package/utils/contentModelAst/index.js +40 -0
- package/utils/contentModelAst/index.js.map +1 -0
- package/utils/converters/Converter.js.map +1 -1
- package/utils/converters/ConverterCollection.js.map +1 -1
- package/utils/converters/valueKeyStorageConverter.js.map +1 -1
- package/utils/createModelField.d.ts +2 -0
- package/utils/createModelField.js +14 -4
- package/utils/createModelField.js.map +1 -1
- package/utils/createTypeFromFields.js.map +1 -1
- package/utils/createTypeName.js.map +1 -1
- package/utils/date.js.map +1 -1
- package/utils/entryStorage.js.map +1 -1
- package/utils/filterAsync.js.map +1 -1
- package/utils/getBaseFieldType.js.map +1 -1
- package/utils/getEntryDescription.js.map +1 -1
- package/utils/getEntryImage.js.map +1 -1
- package/utils/getEntryTitle.js.map +1 -1
- package/utils/getSchemaFromFieldPlugins.d.ts +4 -4
- package/utils/getSchemaFromFieldPlugins.js +2 -2
- package/utils/getSchemaFromFieldPlugins.js.map +1 -1
- package/utils/identity.js.map +1 -1
- package/utils/incrementEntryIdVersion.js.map +1 -1
- package/utils/index.js.map +1 -1
- package/utils/isHeadlessCmsReady.js.map +1 -1
- package/utils/renderFields.js.map +1 -1
- package/utils/renderGetFilterFields.js.map +1 -1
- package/utils/renderInputFields.js.map +1 -1
- package/utils/renderListFilterFields.js.map +1 -1
- package/utils/renderSortEnum.js.map +1 -1
- package/utils/toSlug.js.map +1 -1
- package/validators/dateGte.js.map +1 -1
- package/validators/dateLte.js.map +1 -1
- package/validators/gte.js.map +1 -1
- package/validators/in.js.map +1 -1
- package/validators/index.js.map +1 -1
- package/validators/lte.js.map +1 -1
- package/validators/maxLength.js.map +1 -1
- package/validators/minLength.js.map +1 -1
- package/validators/pattern.js.map +1 -1
- package/validators/patternPlugins/email.js.map +1 -1
- package/validators/patternPlugins/index.js.map +1 -1
- package/validators/patternPlugins/lowerCase.js.map +1 -1
- package/validators/patternPlugins/lowerCaseSpace.js.map +1 -1
- package/validators/patternPlugins/upperCase.js.map +1 -1
- package/validators/patternPlugins/upperCaseSpace.js.map +1 -1
- package/validators/patternPlugins/url.js.map +1 -1
- package/validators/required.js.map +1 -1
- package/validators/timeGte.js.map +1 -1
- package/validators/timeLte.js.map +1 -1
- package/validators/unique.js.map +1 -1
- package/plugins/CmsGraphQLSchemaPlugin.d.ts +0 -5
- package/plugins/CmsGraphQLSchemaPlugin.js.map +0 -1
- package/types.js.map +0 -1
- package/utils/permissions/EntriesPermissions.d.ts +0 -4
- package/utils/permissions/EntriesPermissions.js +0 -11
- package/utils/permissions/EntriesPermissions.js.map +0 -1
- package/utils/permissions/ModelGroupsPermissions.d.ts +0 -9
- package/utils/permissions/ModelGroupsPermissions.js +0 -50
- package/utils/permissions/ModelGroupsPermissions.js.map +0 -1
- package/utils/permissions/ModelsPermissions.d.ts +0 -22
- package/utils/permissions/ModelsPermissions.js +0 -90
- package/utils/permissions/ModelsPermissions.js.map +0 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.GetPublishedEntriesByIdsSecure = void 0;
|
|
7
|
+
var _filterAsync = require("../../../../utils/filterAsync");
|
|
8
|
+
class GetPublishedEntriesByIdsSecure {
|
|
9
|
+
constructor(accessControl, getPublishedEntriesByIds) {
|
|
10
|
+
this.accessControl = accessControl;
|
|
11
|
+
this.getPublishedEntriesByIds = getPublishedEntriesByIds;
|
|
12
|
+
}
|
|
13
|
+
async execute(model, params) {
|
|
14
|
+
await this.accessControl.ensureCanAccessEntry({
|
|
15
|
+
model
|
|
16
|
+
});
|
|
17
|
+
const entries = await this.getPublishedEntriesByIds.execute(model, params);
|
|
18
|
+
return (0, _filterAsync.filterAsync)(entries, async entry => {
|
|
19
|
+
return this.accessControl.canAccessEntry({
|
|
20
|
+
model,
|
|
21
|
+
entry
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.GetPublishedEntriesByIdsSecure = GetPublishedEntriesByIdsSecure;
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=GetPublishedEntriesByIdsSecure.js.map
|
package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsSecure.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_filterAsync","require","GetPublishedEntriesByIdsSecure","constructor","accessControl","getPublishedEntriesByIds","execute","model","params","ensureCanAccessEntry","entries","filterAsync","entry","canAccessEntry","exports"],"sources":["GetPublishedEntriesByIdsSecure.ts"],"sourcesContent":["import { AccessControl } from \"~/crud/AccessControl/AccessControl\";\nimport { filterAsync } from \"~/utils/filterAsync\";\nimport { IGetPublishedEntriesByIds } from \"../../abstractions\";\nimport { CmsEntryStorageOperationsGetPublishedByIdsParams, CmsModel } from \"~/types\";\n\nexport class GetPublishedEntriesByIdsSecure implements IGetPublishedEntriesByIds {\n private accessControl: AccessControl;\n private getPublishedEntriesByIds: IGetPublishedEntriesByIds;\n\n constructor(accessControl: AccessControl, getPublishedEntriesByIds: IGetPublishedEntriesByIds) {\n this.accessControl = accessControl;\n this.getPublishedEntriesByIds = getPublishedEntriesByIds;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsGetPublishedByIdsParams) {\n await this.accessControl.ensureCanAccessEntry({ model });\n\n const entries = await this.getPublishedEntriesByIds.execute(model, params);\n\n return filterAsync(entries, async entry => {\n return this.accessControl.canAccessEntry({ model, entry });\n });\n }\n}\n"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAIO,MAAMC,8BAA8B,CAAsC;EAI7EC,WAAWA,CAACC,aAA4B,EAAEC,wBAAmD,EAAE;IAC3F,IAAI,CAACD,aAAa,GAAGA,aAAa;IAClC,IAAI,CAACC,wBAAwB,GAAGA,wBAAwB;EAC5D;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAAwD,EAAE;IACrF,MAAM,IAAI,CAACJ,aAAa,CAACK,oBAAoB,CAAC;MAAEF;IAAM,CAAC,CAAC;IAExD,MAAMG,OAAO,GAAG,MAAM,IAAI,CAACL,wBAAwB,CAACC,OAAO,CAACC,KAAK,EAAEC,MAAM,CAAC;IAE1E,OAAO,IAAAG,wBAAW,EAACD,OAAO,EAAE,MAAME,KAAK,IAAI;MACvC,OAAO,IAAI,CAACR,aAAa,CAACS,cAAc,CAAC;QAAEN,KAAK;QAAEK;MAAM,CAAC,CAAC;IAC9D,CAAC,CAAC;EACN;AACJ;AAACE,OAAA,CAAAZ,8BAAA,GAAAA,8BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GetPublishedEntriesByIdsNotDeleted } from "./GetPublishedEntriesByIdsNotDeleted";
|
|
2
|
+
import { CmsEntryStorageOperations } from "../../../../types";
|
|
3
|
+
import { AccessControl } from "../../../AccessControl/AccessControl";
|
|
4
|
+
interface GetPublishedEntriesByIdsUseCasesParams {
|
|
5
|
+
operation: CmsEntryStorageOperations["getPublishedByIds"];
|
|
6
|
+
accessControl: AccessControl;
|
|
7
|
+
}
|
|
8
|
+
export declare const getPublishedEntriesByIdsUseCases: (params: GetPublishedEntriesByIdsUseCasesParams) => {
|
|
9
|
+
getPublishedEntriesByIdsUseCase: GetPublishedEntriesByIdsNotDeleted;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getPublishedEntriesByIdsUseCases = void 0;
|
|
7
|
+
var _GetPublishedEntriesByIds = require("./GetPublishedEntriesByIds");
|
|
8
|
+
var _GetPublishedEntriesByIdsNotDeleted = require("./GetPublishedEntriesByIdsNotDeleted");
|
|
9
|
+
var _GetPublishedEntriesByIdsSecure = require("./GetPublishedEntriesByIdsSecure");
|
|
10
|
+
const getPublishedEntriesByIdsUseCases = params => {
|
|
11
|
+
const getPublishedEntriesByIds = new _GetPublishedEntriesByIds.GetPublishedEntriesByIds(params.operation);
|
|
12
|
+
const getPublishedEntriesByIdsSecure = new _GetPublishedEntriesByIdsSecure.GetPublishedEntriesByIdsSecure(params.accessControl, getPublishedEntriesByIds);
|
|
13
|
+
const getPublishedEntriesByIdsNotDeleted = new _GetPublishedEntriesByIdsNotDeleted.GetPublishedEntriesByIdsNotDeleted(getPublishedEntriesByIdsSecure);
|
|
14
|
+
return {
|
|
15
|
+
getPublishedEntriesByIdsUseCase: getPublishedEntriesByIdsNotDeleted
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
exports.getPublishedEntriesByIdsUseCases = getPublishedEntriesByIdsUseCases;
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_GetPublishedEntriesByIds","require","_GetPublishedEntriesByIdsNotDeleted","_GetPublishedEntriesByIdsSecure","getPublishedEntriesByIdsUseCases","params","getPublishedEntriesByIds","GetPublishedEntriesByIds","operation","getPublishedEntriesByIdsSecure","GetPublishedEntriesByIdsSecure","accessControl","getPublishedEntriesByIdsNotDeleted","GetPublishedEntriesByIdsNotDeleted","getPublishedEntriesByIdsUseCase","exports"],"sources":["index.ts"],"sourcesContent":["import { GetPublishedEntriesByIds } from \"./GetPublishedEntriesByIds\";\nimport { GetPublishedEntriesByIdsNotDeleted } from \"./GetPublishedEntriesByIdsNotDeleted\";\nimport { GetPublishedEntriesByIdsSecure } from \"./GetPublishedEntriesByIdsSecure\";\nimport { CmsEntryStorageOperations } from \"~/types\";\nimport { AccessControl } from \"~/crud/AccessControl/AccessControl\";\n\ninterface GetPublishedEntriesByIdsUseCasesParams {\n operation: CmsEntryStorageOperations[\"getPublishedByIds\"];\n accessControl: AccessControl;\n}\n\nexport const getPublishedEntriesByIdsUseCases = (\n params: GetPublishedEntriesByIdsUseCasesParams\n) => {\n const getPublishedEntriesByIds = new GetPublishedEntriesByIds(params.operation);\n const getPublishedEntriesByIdsSecure = new GetPublishedEntriesByIdsSecure(\n params.accessControl,\n getPublishedEntriesByIds\n );\n const getPublishedEntriesByIdsNotDeleted = new GetPublishedEntriesByIdsNotDeleted(\n getPublishedEntriesByIdsSecure\n );\n\n return {\n getPublishedEntriesByIdsUseCase: getPublishedEntriesByIdsNotDeleted\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,yBAAA,GAAAC,OAAA;AACA,IAAAC,mCAAA,GAAAD,OAAA;AACA,IAAAE,+BAAA,GAAAF,OAAA;AASO,MAAMG,gCAAgC,GACzCC,MAA8C,IAC7C;EACD,MAAMC,wBAAwB,GAAG,IAAIC,kDAAwB,CAACF,MAAM,CAACG,SAAS,CAAC;EAC/E,MAAMC,8BAA8B,GAAG,IAAIC,8DAA8B,CACrEL,MAAM,CAACM,aAAa,EACpBL,wBACJ,CAAC;EACD,MAAMM,kCAAkC,GAAG,IAAIC,sEAAkC,CAC7EJ,8BACJ,CAAC;EAED,OAAO;IACHK,+BAA+B,EAAEF;EACrC,CAAC;AACL,CAAC;AAACG,OAAA,CAAAX,gCAAA,GAAAA,gCAAA","ignoreList":[]}
|
package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IGetPublishedRevisionByEntryId } from "../../abstractions";
|
|
2
|
+
import { CmsEntryStorageOperations, CmsEntryStorageOperationsGetPublishedRevisionParams, CmsModel } from "../../../../types";
|
|
3
|
+
export declare class GetPublishedRevisionByEntryId implements IGetPublishedRevisionByEntryId {
|
|
4
|
+
private operation;
|
|
5
|
+
constructor(operation: CmsEntryStorageOperations["getPublishedRevisionByEntryId"]);
|
|
6
|
+
execute(model: CmsModel, params: CmsEntryStorageOperationsGetPublishedRevisionParams): Promise<import("../../../../types").CmsStorageEntry | null>;
|
|
7
|
+
}
|
package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.GetPublishedRevisionByEntryId = void 0;
|
|
7
|
+
class GetPublishedRevisionByEntryId {
|
|
8
|
+
constructor(operation) {
|
|
9
|
+
this.operation = operation;
|
|
10
|
+
}
|
|
11
|
+
async execute(model, params) {
|
|
12
|
+
return await this.operation(model, params);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.GetPublishedRevisionByEntryId = GetPublishedRevisionByEntryId;
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=GetPublishedRevisionByEntryId.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GetPublishedRevisionByEntryId","constructor","operation","execute","model","params","exports"],"sources":["GetPublishedRevisionByEntryId.ts"],"sourcesContent":["import { IGetPublishedRevisionByEntryId } from \"../../abstractions\";\nimport {\n CmsEntryStorageOperations,\n CmsEntryStorageOperationsGetPublishedRevisionParams,\n CmsModel\n} from \"~/types\";\n\nexport class GetPublishedRevisionByEntryId implements IGetPublishedRevisionByEntryId {\n private operation: CmsEntryStorageOperations[\"getPublishedRevisionByEntryId\"];\n\n constructor(operation: CmsEntryStorageOperations[\"getPublishedRevisionByEntryId\"]) {\n this.operation = operation;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsGetPublishedRevisionParams) {\n return await this.operation(model, params);\n }\n}\n"],"mappings":";;;;;;AAOO,MAAMA,6BAA6B,CAA2C;EAGjFC,WAAWA,CAACC,SAAqE,EAAE;IAC/E,IAAI,CAACA,SAAS,GAAGA,SAAS;EAC9B;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAA2D,EAAE;IACxF,OAAO,MAAM,IAAI,CAACH,SAAS,CAACE,KAAK,EAAEC,MAAM,CAAC;EAC9C;AACJ;AAACC,OAAA,CAAAN,6BAAA,GAAAA,6BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IGetPublishedRevisionByEntryId } from "../../abstractions";
|
|
2
|
+
import { CmsEntryStorageOperationsGetPublishedRevisionParams, CmsModel } from "../../../../types";
|
|
3
|
+
export declare class GetPublishedRevisionByEntryIdNotDeleted implements IGetPublishedRevisionByEntryId {
|
|
4
|
+
private getPublishedRevisionByEntryId;
|
|
5
|
+
constructor(getPublishedRevisionByEntryId: IGetPublishedRevisionByEntryId);
|
|
6
|
+
execute(model: CmsModel, params: CmsEntryStorageOperationsGetPublishedRevisionParams): Promise<import("../../../../types").CmsStorageEntry | null>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.GetPublishedRevisionByEntryIdNotDeleted = void 0;
|
|
7
|
+
class GetPublishedRevisionByEntryIdNotDeleted {
|
|
8
|
+
constructor(getPublishedRevisionByEntryId) {
|
|
9
|
+
this.getPublishedRevisionByEntryId = getPublishedRevisionByEntryId;
|
|
10
|
+
}
|
|
11
|
+
async execute(model, params) {
|
|
12
|
+
const entry = await this.getPublishedRevisionByEntryId.execute(model, params);
|
|
13
|
+
if (!entry || entry.wbyDeleted) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
return entry;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.GetPublishedRevisionByEntryIdNotDeleted = GetPublishedRevisionByEntryIdNotDeleted;
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=GetPublishedRevisionByEntryIdNotDeleted.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GetPublishedRevisionByEntryIdNotDeleted","constructor","getPublishedRevisionByEntryId","execute","model","params","entry","wbyDeleted","exports"],"sources":["GetPublishedRevisionByEntryIdNotDeleted.ts"],"sourcesContent":["import { IGetPublishedRevisionByEntryId } from \"../../abstractions\";\nimport { CmsEntryStorageOperationsGetPublishedRevisionParams, CmsModel } from \"~/types\";\n\nexport class GetPublishedRevisionByEntryIdNotDeleted implements IGetPublishedRevisionByEntryId {\n private getPublishedRevisionByEntryId: IGetPublishedRevisionByEntryId;\n\n constructor(getPublishedRevisionByEntryId: IGetPublishedRevisionByEntryId) {\n this.getPublishedRevisionByEntryId = getPublishedRevisionByEntryId;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsGetPublishedRevisionParams) {\n const entry = await this.getPublishedRevisionByEntryId.execute(model, params);\n\n if (!entry || entry.wbyDeleted) {\n return null;\n }\n\n return entry;\n }\n}\n"],"mappings":";;;;;;AAGO,MAAMA,uCAAuC,CAA2C;EAG3FC,WAAWA,CAACC,6BAA6D,EAAE;IACvE,IAAI,CAACA,6BAA6B,GAAGA,6BAA6B;EACtE;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAA2D,EAAE;IACxF,MAAMC,KAAK,GAAG,MAAM,IAAI,CAACJ,6BAA6B,CAACC,OAAO,CAACC,KAAK,EAAEC,MAAM,CAAC;IAE7E,IAAI,CAACC,KAAK,IAAIA,KAAK,CAACC,UAAU,EAAE;MAC5B,OAAO,IAAI;IACf;IAEA,OAAOD,KAAK;EAChB;AACJ;AAACE,OAAA,CAAAR,uCAAA,GAAAA,uCAAA","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { GetPublishedRevisionByEntryIdNotDeleted } from "./GetPublishedRevisionByEntryIdNotDeleted";
|
|
2
|
+
import { CmsEntryStorageOperations } from "../../../../types";
|
|
3
|
+
interface GetPublishedRevisionByEntryIdUseCasesParams {
|
|
4
|
+
operation: CmsEntryStorageOperations["getPublishedRevisionByEntryId"];
|
|
5
|
+
}
|
|
6
|
+
export declare const getPublishedRevisionByEntryIdUseCases: (params: GetPublishedRevisionByEntryIdUseCasesParams) => {
|
|
7
|
+
getPublishedRevisionByEntryIdUseCase: GetPublishedRevisionByEntryIdNotDeleted;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getPublishedRevisionByEntryIdUseCases = void 0;
|
|
7
|
+
var _GetPublishedRevisionByEntryId = require("./GetPublishedRevisionByEntryId");
|
|
8
|
+
var _GetPublishedRevisionByEntryIdNotDeleted = require("./GetPublishedRevisionByEntryIdNotDeleted");
|
|
9
|
+
const getPublishedRevisionByEntryIdUseCases = params => {
|
|
10
|
+
const getPublishedRevisionByEntryId = new _GetPublishedRevisionByEntryId.GetPublishedRevisionByEntryId(params.operation);
|
|
11
|
+
const getPublishedRevisionByEntryIdNotDeleted = new _GetPublishedRevisionByEntryIdNotDeleted.GetPublishedRevisionByEntryIdNotDeleted(getPublishedRevisionByEntryId);
|
|
12
|
+
return {
|
|
13
|
+
getPublishedRevisionByEntryIdUseCase: getPublishedRevisionByEntryIdNotDeleted
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
exports.getPublishedRevisionByEntryIdUseCases = getPublishedRevisionByEntryIdUseCases;
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_GetPublishedRevisionByEntryId","require","_GetPublishedRevisionByEntryIdNotDeleted","getPublishedRevisionByEntryIdUseCases","params","getPublishedRevisionByEntryId","GetPublishedRevisionByEntryId","operation","getPublishedRevisionByEntryIdNotDeleted","GetPublishedRevisionByEntryIdNotDeleted","getPublishedRevisionByEntryIdUseCase","exports"],"sources":["index.ts"],"sourcesContent":["import { GetPublishedRevisionByEntryId } from \"./GetPublishedRevisionByEntryId\";\nimport { GetPublishedRevisionByEntryIdNotDeleted } from \"./GetPublishedRevisionByEntryIdNotDeleted\";\nimport { CmsEntryStorageOperations } from \"~/types\";\n\ninterface GetPublishedRevisionByEntryIdUseCasesParams {\n operation: CmsEntryStorageOperations[\"getPublishedRevisionByEntryId\"];\n}\n\nexport const getPublishedRevisionByEntryIdUseCases = (\n params: GetPublishedRevisionByEntryIdUseCasesParams\n) => {\n const getPublishedRevisionByEntryId = new GetPublishedRevisionByEntryId(params.operation);\n const getPublishedRevisionByEntryIdNotDeleted = new GetPublishedRevisionByEntryIdNotDeleted(\n getPublishedRevisionByEntryId\n );\n\n return {\n getPublishedRevisionByEntryIdUseCase: getPublishedRevisionByEntryIdNotDeleted\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,8BAAA,GAAAC,OAAA;AACA,IAAAC,wCAAA,GAAAD,OAAA;AAOO,MAAME,qCAAqC,GAC9CC,MAAmD,IAClD;EACD,MAAMC,6BAA6B,GAAG,IAAIC,4DAA6B,CAACF,MAAM,CAACG,SAAS,CAAC;EACzF,MAAMC,uCAAuC,GAAG,IAAIC,gFAAuC,CACvFJ,6BACJ,CAAC;EAED,OAAO;IACHK,oCAAoC,EAAEF;EAC1C,CAAC;AACL,CAAC;AAACG,OAAA,CAAAR,qCAAA,GAAAA,qCAAA","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IGetRevisionById } from "../../abstractions";
|
|
2
|
+
import { CmsEntryStorageOperations, CmsEntryStorageOperationsGetRevisionParams, CmsModel } from "../../../../types";
|
|
3
|
+
export declare class GetRevisionById implements IGetRevisionById {
|
|
4
|
+
private operation;
|
|
5
|
+
constructor(operation: CmsEntryStorageOperations["getRevisionById"]);
|
|
6
|
+
execute(model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams): Promise<import("../../../../types").CmsStorageEntry | null>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.GetRevisionById = void 0;
|
|
7
|
+
class GetRevisionById {
|
|
8
|
+
constructor(operation) {
|
|
9
|
+
this.operation = operation;
|
|
10
|
+
}
|
|
11
|
+
async execute(model, params) {
|
|
12
|
+
return await this.operation(model, params);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.GetRevisionById = GetRevisionById;
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=GetRevisionById.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GetRevisionById","constructor","operation","execute","model","params","exports"],"sources":["GetRevisionById.ts"],"sourcesContent":["import { IGetRevisionById } from \"../../abstractions\";\nimport {\n CmsEntryStorageOperations,\n CmsEntryStorageOperationsGetRevisionParams,\n CmsModel\n} from \"~/types\";\n\nexport class GetRevisionById implements IGetRevisionById {\n private operation: CmsEntryStorageOperations[\"getRevisionById\"];\n\n constructor(operation: CmsEntryStorageOperations[\"getRevisionById\"]) {\n this.operation = operation;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams) {\n return await this.operation(model, params);\n }\n}\n"],"mappings":";;;;;;AAOO,MAAMA,eAAe,CAA6B;EAGrDC,WAAWA,CAACC,SAAuD,EAAE;IACjE,IAAI,CAACA,SAAS,GAAGA,SAAS;EAC9B;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAAkD,EAAE;IAC/E,OAAO,MAAM,IAAI,CAACH,SAAS,CAACE,KAAK,EAAEC,MAAM,CAAC;EAC9C;AACJ;AAACC,OAAA,CAAAN,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IGetRevisionById } from "../../abstractions";
|
|
2
|
+
import { CmsEntryStorageOperationsGetRevisionParams, CmsModel } from "../../../../types";
|
|
3
|
+
export declare class GetRevisionByIdNotDeleted implements IGetRevisionById {
|
|
4
|
+
private getRevisionById;
|
|
5
|
+
constructor(getRevisionById: IGetRevisionById);
|
|
6
|
+
execute(model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams): Promise<import("../../../../types").CmsStorageEntry | null>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.GetRevisionByIdNotDeleted = void 0;
|
|
7
|
+
class GetRevisionByIdNotDeleted {
|
|
8
|
+
constructor(getRevisionById) {
|
|
9
|
+
this.getRevisionById = getRevisionById;
|
|
10
|
+
}
|
|
11
|
+
async execute(model, params) {
|
|
12
|
+
const entry = await this.getRevisionById.execute(model, params);
|
|
13
|
+
if (!entry || entry.wbyDeleted) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
return entry;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.GetRevisionByIdNotDeleted = GetRevisionByIdNotDeleted;
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=GetRevisionByIdNotDeleted.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GetRevisionByIdNotDeleted","constructor","getRevisionById","execute","model","params","entry","wbyDeleted","exports"],"sources":["GetRevisionByIdNotDeleted.ts"],"sourcesContent":["import { IGetRevisionById } from \"../../abstractions\";\nimport { CmsEntryStorageOperationsGetRevisionParams, CmsModel } from \"~/types\";\n\nexport class GetRevisionByIdNotDeleted implements IGetRevisionById {\n private getRevisionById: IGetRevisionById;\n\n constructor(getRevisionById: IGetRevisionById) {\n this.getRevisionById = getRevisionById;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams) {\n const entry = await this.getRevisionById.execute(model, params);\n\n if (!entry || entry.wbyDeleted) {\n return null;\n }\n\n return entry;\n }\n}\n"],"mappings":";;;;;;AAGO,MAAMA,yBAAyB,CAA6B;EAG/DC,WAAWA,CAACC,eAAiC,EAAE;IAC3C,IAAI,CAACA,eAAe,GAAGA,eAAe;EAC1C;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAAkD,EAAE;IAC/E,MAAMC,KAAK,GAAG,MAAM,IAAI,CAACJ,eAAe,CAACC,OAAO,CAACC,KAAK,EAAEC,MAAM,CAAC;IAE/D,IAAI,CAACC,KAAK,IAAIA,KAAK,CAACC,UAAU,EAAE;MAC5B,OAAO,IAAI;IACf;IAEA,OAAOD,KAAK;EAChB;AACJ;AAACE,OAAA,CAAAR,yBAAA,GAAAA,yBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { GetRevisionByIdNotDeleted } from "./GetRevisionByIdNotDeleted";
|
|
2
|
+
import { CmsEntryStorageOperations } from "../../../../types";
|
|
3
|
+
interface GetRevisionByIdUseCasesParams {
|
|
4
|
+
operation: CmsEntryStorageOperations["getRevisionById"];
|
|
5
|
+
}
|
|
6
|
+
export declare const getRevisionByIdUseCases: (params: GetRevisionByIdUseCasesParams) => {
|
|
7
|
+
getRevisionByIdUseCase: GetRevisionByIdNotDeleted;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getRevisionByIdUseCases = void 0;
|
|
7
|
+
var _GetRevisionById = require("./GetRevisionById");
|
|
8
|
+
var _GetRevisionByIdNotDeleted = require("./GetRevisionByIdNotDeleted");
|
|
9
|
+
const getRevisionByIdUseCases = params => {
|
|
10
|
+
const getRevisionById = new _GetRevisionById.GetRevisionById(params.operation);
|
|
11
|
+
const getRevisionByIdNotDeleted = new _GetRevisionByIdNotDeleted.GetRevisionByIdNotDeleted(getRevisionById);
|
|
12
|
+
return {
|
|
13
|
+
getRevisionByIdUseCase: getRevisionByIdNotDeleted
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
exports.getRevisionByIdUseCases = getRevisionByIdUseCases;
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_GetRevisionById","require","_GetRevisionByIdNotDeleted","getRevisionByIdUseCases","params","getRevisionById","GetRevisionById","operation","getRevisionByIdNotDeleted","GetRevisionByIdNotDeleted","getRevisionByIdUseCase","exports"],"sources":["index.ts"],"sourcesContent":["import { GetRevisionById } from \"./GetRevisionById\";\nimport { GetRevisionByIdNotDeleted } from \"./GetRevisionByIdNotDeleted\";\nimport { CmsEntryStorageOperations } from \"~/types\";\n\ninterface GetRevisionByIdUseCasesParams {\n operation: CmsEntryStorageOperations[\"getRevisionById\"];\n}\n\nexport const getRevisionByIdUseCases = (params: GetRevisionByIdUseCasesParams) => {\n const getRevisionById = new GetRevisionById(params.operation);\n const getRevisionByIdNotDeleted = new GetRevisionByIdNotDeleted(getRevisionById);\n\n return {\n getRevisionByIdUseCase: getRevisionByIdNotDeleted\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,0BAAA,GAAAD,OAAA;AAOO,MAAME,uBAAuB,GAAIC,MAAqC,IAAK;EAC9E,MAAMC,eAAe,GAAG,IAAIC,gCAAe,CAACF,MAAM,CAACG,SAAS,CAAC;EAC7D,MAAMC,yBAAyB,GAAG,IAAIC,oDAAyB,CAACJ,eAAe,CAAC;EAEhF,OAAO;IACHK,sBAAsB,EAAEF;EAC5B,CAAC;AACL,CAAC;AAACG,OAAA,CAAAR,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IGetRevisionsByEntryId } from "../../abstractions";
|
|
2
|
+
import { CmsEntryStorageOperations, CmsEntryStorageOperationsGetRevisionParams, CmsModel } from "../../../../types";
|
|
3
|
+
export declare class GetRevisionsByEntryId implements IGetRevisionsByEntryId {
|
|
4
|
+
private operation;
|
|
5
|
+
constructor(operation: CmsEntryStorageOperations["getRevisions"]);
|
|
6
|
+
execute(model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams): Promise<import("../../../../types").CmsStorageEntry[]>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.GetRevisionsByEntryId = void 0;
|
|
7
|
+
class GetRevisionsByEntryId {
|
|
8
|
+
constructor(operation) {
|
|
9
|
+
this.operation = operation;
|
|
10
|
+
}
|
|
11
|
+
async execute(model, params) {
|
|
12
|
+
return await this.operation(model, params);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.GetRevisionsByEntryId = GetRevisionsByEntryId;
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=GetRevisionsByEntryId.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GetRevisionsByEntryId","constructor","operation","execute","model","params","exports"],"sources":["GetRevisionsByEntryId.ts"],"sourcesContent":["import { IGetRevisionsByEntryId } from \"../../abstractions\";\nimport {\n CmsEntryStorageOperations,\n CmsEntryStorageOperationsGetRevisionParams,\n CmsModel\n} from \"~/types\";\n\nexport class GetRevisionsByEntryId implements IGetRevisionsByEntryId {\n private operation: CmsEntryStorageOperations[\"getRevisions\"];\n\n constructor(operation: CmsEntryStorageOperations[\"getRevisions\"]) {\n this.operation = operation;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams) {\n return await this.operation(model, params);\n }\n}\n"],"mappings":";;;;;;AAOO,MAAMA,qBAAqB,CAAmC;EAGjEC,WAAWA,CAACC,SAAoD,EAAE;IAC9D,IAAI,CAACA,SAAS,GAAGA,SAAS;EAC9B;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAAkD,EAAE;IAC/E,OAAO,MAAM,IAAI,CAACH,SAAS,CAACE,KAAK,EAAEC,MAAM,CAAC;EAC9C;AACJ;AAACC,OAAA,CAAAN,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IGetRevisionsByEntryId } from "../../abstractions";
|
|
2
|
+
import { CmsEntryStorageOperationsGetRevisionParams, CmsModel } from "../../../../types";
|
|
3
|
+
export declare class GetRevisionsByEntryIdNotDeleted implements IGetRevisionsByEntryId {
|
|
4
|
+
private getRevisionsByEntryId;
|
|
5
|
+
constructor(getRevisionsByEntryId: IGetRevisionsByEntryId);
|
|
6
|
+
execute(model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams): Promise<import("../../../../types").CmsStorageEntry[]>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.GetRevisionsByEntryIdNotDeleted = void 0;
|
|
7
|
+
class GetRevisionsByEntryIdNotDeleted {
|
|
8
|
+
constructor(getRevisionsByEntryId) {
|
|
9
|
+
this.getRevisionsByEntryId = getRevisionsByEntryId;
|
|
10
|
+
}
|
|
11
|
+
async execute(model, params) {
|
|
12
|
+
const entries = await this.getRevisionsByEntryId.execute(model, params);
|
|
13
|
+
return entries.filter(entry => !entry.wbyDeleted);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.GetRevisionsByEntryIdNotDeleted = GetRevisionsByEntryIdNotDeleted;
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=GetRevisionsByEntryIdNotDeleted.js.map
|
package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryIdNotDeleted.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GetRevisionsByEntryIdNotDeleted","constructor","getRevisionsByEntryId","execute","model","params","entries","filter","entry","wbyDeleted","exports"],"sources":["GetRevisionsByEntryIdNotDeleted.ts"],"sourcesContent":["import { IGetRevisionsByEntryId } from \"../../abstractions\";\nimport { CmsEntryStorageOperationsGetRevisionParams, CmsModel } from \"~/types\";\n\nexport class GetRevisionsByEntryIdNotDeleted implements IGetRevisionsByEntryId {\n private getRevisionsByEntryId: IGetRevisionsByEntryId;\n\n constructor(getRevisionsByEntryId: IGetRevisionsByEntryId) {\n this.getRevisionsByEntryId = getRevisionsByEntryId;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams) {\n const entries = await this.getRevisionsByEntryId.execute(model, params);\n return entries.filter(entry => !entry.wbyDeleted);\n }\n}\n"],"mappings":";;;;;;AAGO,MAAMA,+BAA+B,CAAmC;EAG3EC,WAAWA,CAACC,qBAA6C,EAAE;IACvD,IAAI,CAACA,qBAAqB,GAAGA,qBAAqB;EACtD;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAAkD,EAAE;IAC/E,MAAMC,OAAO,GAAG,MAAM,IAAI,CAACJ,qBAAqB,CAACC,OAAO,CAACC,KAAK,EAAEC,MAAM,CAAC;IACvE,OAAOC,OAAO,CAACC,MAAM,CAACC,KAAK,IAAI,CAACA,KAAK,CAACC,UAAU,CAAC;EACrD;AACJ;AAACC,OAAA,CAAAV,+BAAA,GAAAA,+BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GetRevisionsByEntryIdNotDeleted } from "./GetRevisionsByEntryIdNotDeleted";
|
|
2
|
+
import { CmsEntryStorageOperations } from "../../../../types";
|
|
3
|
+
import { AccessControl } from "../../../AccessControl/AccessControl";
|
|
4
|
+
interface GetRevisionsByEntryIdUseCasesParams {
|
|
5
|
+
operation: CmsEntryStorageOperations["getRevisions"];
|
|
6
|
+
accessControl: AccessControl;
|
|
7
|
+
}
|
|
8
|
+
export declare const getRevisionsByEntryIdUseCases: (params: GetRevisionsByEntryIdUseCasesParams) => {
|
|
9
|
+
getRevisionsByEntryIdUseCase: GetRevisionsByEntryIdNotDeleted;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getRevisionsByEntryIdUseCases = void 0;
|
|
7
|
+
var _GetRevisionsByEntryId = require("./GetRevisionsByEntryId");
|
|
8
|
+
var _GetRevisionsByEntryIdNotDeleted = require("./GetRevisionsByEntryIdNotDeleted");
|
|
9
|
+
const getRevisionsByEntryIdUseCases = params => {
|
|
10
|
+
const getRevisionsByEntryId = new _GetRevisionsByEntryId.GetRevisionsByEntryId(params.operation);
|
|
11
|
+
const getRevisionsByEntryIdNotDeleted = new _GetRevisionsByEntryIdNotDeleted.GetRevisionsByEntryIdNotDeleted(getRevisionsByEntryId);
|
|
12
|
+
return {
|
|
13
|
+
getRevisionsByEntryIdUseCase: getRevisionsByEntryIdNotDeleted
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
exports.getRevisionsByEntryIdUseCases = getRevisionsByEntryIdUseCases;
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_GetRevisionsByEntryId","require","_GetRevisionsByEntryIdNotDeleted","getRevisionsByEntryIdUseCases","params","getRevisionsByEntryId","GetRevisionsByEntryId","operation","getRevisionsByEntryIdNotDeleted","GetRevisionsByEntryIdNotDeleted","getRevisionsByEntryIdUseCase","exports"],"sources":["index.ts"],"sourcesContent":["import { GetRevisionsByEntryId } from \"./GetRevisionsByEntryId\";\nimport { GetRevisionsByEntryIdNotDeleted } from \"./GetRevisionsByEntryIdNotDeleted\";\nimport { CmsEntryStorageOperations } from \"~/types\";\nimport { AccessControl } from \"~/crud/AccessControl/AccessControl\";\n\ninterface GetRevisionsByEntryIdUseCasesParams {\n operation: CmsEntryStorageOperations[\"getRevisions\"];\n accessControl: AccessControl;\n}\n\nexport const getRevisionsByEntryIdUseCases = (params: GetRevisionsByEntryIdUseCasesParams) => {\n const getRevisionsByEntryId = new GetRevisionsByEntryId(params.operation);\n const getRevisionsByEntryIdNotDeleted = new GetRevisionsByEntryIdNotDeleted(\n getRevisionsByEntryId\n );\n\n return {\n getRevisionsByEntryIdUseCase: getRevisionsByEntryIdNotDeleted\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,gCAAA,GAAAD,OAAA;AASO,MAAME,6BAA6B,GAAIC,MAA2C,IAAK;EAC1F,MAAMC,qBAAqB,GAAG,IAAIC,4CAAqB,CAACF,MAAM,CAACG,SAAS,CAAC;EACzE,MAAMC,+BAA+B,GAAG,IAAIC,gEAA+B,CACvEJ,qBACJ,CAAC;EAED,OAAO;IACHK,4BAA4B,EAAEF;EAClC,CAAC;AACL,CAAC;AAACG,OAAA,CAAAR,6BAAA,GAAAA,6BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IGetEntry, IListEntriesOperation } from "../../abstractions";
|
|
2
|
+
import { CmsEntryGetParams, CmsModel } from "../../../../types";
|
|
3
|
+
export declare class GetEntry implements IGetEntry {
|
|
4
|
+
private listEntries;
|
|
5
|
+
constructor(listEntries: IListEntriesOperation);
|
|
6
|
+
execute(model: CmsModel, params: CmsEntryGetParams): Promise<import("../../../../types").CmsStorageEntry>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.GetEntry = void 0;
|
|
7
|
+
var _handlerGraphql = require("@webiny/handler-graphql");
|
|
8
|
+
class GetEntry {
|
|
9
|
+
constructor(listEntries) {
|
|
10
|
+
this.listEntries = listEntries;
|
|
11
|
+
}
|
|
12
|
+
async execute(model, params) {
|
|
13
|
+
const listParams = {
|
|
14
|
+
...params,
|
|
15
|
+
limit: 1
|
|
16
|
+
};
|
|
17
|
+
const {
|
|
18
|
+
items
|
|
19
|
+
} = await this.listEntries.execute(model, listParams);
|
|
20
|
+
const item = items.shift();
|
|
21
|
+
if (!item) {
|
|
22
|
+
throw new _handlerGraphql.NotFoundError(`Entry not found!`);
|
|
23
|
+
}
|
|
24
|
+
return item;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.GetEntry = GetEntry;
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=GetEntry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_handlerGraphql","require","GetEntry","constructor","listEntries","execute","model","params","listParams","limit","items","item","shift","NotFoundError","exports"],"sources":["GetEntry.ts"],"sourcesContent":["import { IGetEntry, IListEntriesOperation } from \"~/crud/contentEntry/abstractions\";\nimport { CmsEntryGetParams, CmsModel } from \"~/types\";\nimport { NotFoundError } from \"@webiny/handler-graphql\";\n\nexport class GetEntry implements IGetEntry {\n private listEntries: IListEntriesOperation;\n\n constructor(listEntries: IListEntriesOperation) {\n this.listEntries = listEntries;\n }\n\n async execute(model: CmsModel, params: CmsEntryGetParams) {\n const listParams = {\n ...params,\n limit: 1\n };\n\n const { items } = await this.listEntries.execute(model, listParams);\n\n const item = items.shift();\n\n if (!item) {\n throw new NotFoundError(`Entry not found!`);\n }\n\n return item;\n }\n}\n"],"mappings":";;;;;;AAEA,IAAAA,eAAA,GAAAC,OAAA;AAEO,MAAMC,QAAQ,CAAsB;EAGvCC,WAAWA,CAACC,WAAkC,EAAE;IAC5C,IAAI,CAACA,WAAW,GAAGA,WAAW;EAClC;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAAyB,EAAE;IACtD,MAAMC,UAAU,GAAG;MACf,GAAGD,MAAM;MACTE,KAAK,EAAE;IACX,CAAC;IAED,MAAM;MAAEC;IAAM,CAAC,GAAG,MAAM,IAAI,CAACN,WAAW,CAACC,OAAO,CAACC,KAAK,EAAEE,UAAU,CAAC;IAEnE,MAAMG,IAAI,GAAGD,KAAK,CAACE,KAAK,CAAC,CAAC;IAE1B,IAAI,CAACD,IAAI,EAAE;MACP,MAAM,IAAIE,6BAAa,CAAE,kBAAiB,CAAC;IAC/C;IAEA,OAAOF,IAAI;EACf;AACJ;AAACG,OAAA,CAAAZ,QAAA,GAAAA,QAAA","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AccessControl } from "../../../AccessControl/AccessControl";
|
|
2
|
+
import { IGetEntry } from "../../abstractions";
|
|
3
|
+
import { CmsEntryGetParams, CmsModel } from "../../../../types";
|
|
4
|
+
import { SecurityIdentity } from "@webiny/api-security/types";
|
|
5
|
+
export declare class GetEntrySecure implements IGetEntry {
|
|
6
|
+
private accessControl;
|
|
7
|
+
private getIdentity;
|
|
8
|
+
private useCase;
|
|
9
|
+
constructor(accessControl: AccessControl, getIdentity: () => SecurityIdentity, useCase: IGetEntry);
|
|
10
|
+
execute(model: CmsModel, params: CmsEntryGetParams): Promise<import("../../../../types").CmsEntry<import("../../../../types").CmsEntryValues>>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.GetEntrySecure = void 0;
|
|
7
|
+
class GetEntrySecure {
|
|
8
|
+
constructor(accessControl, getIdentity, useCase) {
|
|
9
|
+
this.accessControl = accessControl;
|
|
10
|
+
this.getIdentity = getIdentity;
|
|
11
|
+
this.useCase = useCase;
|
|
12
|
+
}
|
|
13
|
+
async execute(model, params) {
|
|
14
|
+
await this.accessControl.ensureCanAccessEntry({
|
|
15
|
+
model
|
|
16
|
+
});
|
|
17
|
+
const where = {
|
|
18
|
+
...params.where
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Possibly only get records which are owned by current user.
|
|
23
|
+
* Or if searching for the owner set that value - in the case that user can see other entries than their own.
|
|
24
|
+
*/
|
|
25
|
+
if (await this.accessControl.canAccessOnlyOwnedEntries({
|
|
26
|
+
model
|
|
27
|
+
})) {
|
|
28
|
+
where.createdBy = this.getIdentity().id;
|
|
29
|
+
}
|
|
30
|
+
return await this.useCase.execute(model, {
|
|
31
|
+
...params,
|
|
32
|
+
where
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.GetEntrySecure = GetEntrySecure;
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=GetEntrySecure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GetEntrySecure","constructor","accessControl","getIdentity","useCase","execute","model","params","ensureCanAccessEntry","where","canAccessOnlyOwnedEntries","createdBy","id","exports"],"sources":["GetEntrySecure.ts"],"sourcesContent":["import { AccessControl } from \"~/crud/AccessControl/AccessControl\";\nimport { IGetEntry } from \"../../abstractions\";\nimport { CmsEntryGetParams, CmsModel } from \"~/types\";\nimport { SecurityIdentity } from \"@webiny/api-security/types\";\n\nexport class GetEntrySecure implements IGetEntry {\n private accessControl: AccessControl;\n private getIdentity: () => SecurityIdentity;\n private useCase: IGetEntry;\n\n constructor(\n accessControl: AccessControl,\n getIdentity: () => SecurityIdentity,\n useCase: IGetEntry\n ) {\n this.accessControl = accessControl;\n this.getIdentity = getIdentity;\n this.useCase = useCase;\n }\n\n async execute(model: CmsModel, params: CmsEntryGetParams) {\n await this.accessControl.ensureCanAccessEntry({ model });\n\n const where = { ...params.where };\n\n /**\n * Possibly only get records which are owned by current user.\n * Or if searching for the owner set that value - in the case that user can see other entries than their own.\n */\n if (await this.accessControl.canAccessOnlyOwnedEntries({ model })) {\n where.createdBy = this.getIdentity().id;\n }\n\n return await this.useCase.execute(model, {\n ...params,\n where\n });\n }\n}\n"],"mappings":";;;;;;AAKO,MAAMA,cAAc,CAAsB;EAK7CC,WAAWA,CACPC,aAA4B,EAC5BC,WAAmC,EACnCC,OAAkB,EACpB;IACE,IAAI,CAACF,aAAa,GAAGA,aAAa;IAClC,IAAI,CAACC,WAAW,GAAGA,WAAW;IAC9B,IAAI,CAACC,OAAO,GAAGA,OAAO;EAC1B;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAAyB,EAAE;IACtD,MAAM,IAAI,CAACL,aAAa,CAACM,oBAAoB,CAAC;MAAEF;IAAM,CAAC,CAAC;IAExD,MAAMG,KAAK,GAAG;MAAE,GAAGF,MAAM,CAACE;IAAM,CAAC;;IAEjC;AACR;AACA;AACA;IACQ,IAAI,MAAM,IAAI,CAACP,aAAa,CAACQ,yBAAyB,CAAC;MAAEJ;IAAM,CAAC,CAAC,EAAE;MAC/DG,KAAK,CAACE,SAAS,GAAG,IAAI,CAACR,WAAW,CAAC,CAAC,CAACS,EAAE;IAC3C;IAEA,OAAO,MAAM,IAAI,CAACR,OAAO,CAACC,OAAO,CAACC,KAAK,EAAE;MACrC,GAAGC,MAAM;MACTE;IACJ,CAAC,CAAC;EACN;AACJ;AAACI,OAAA,CAAAb,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IListEntriesOperation, IListEntries } from "../../abstractions";
|
|
2
|
+
import { CmsEntry, CmsEntryListParams, CmsEntryMeta, CmsEntryValues, CmsModel } from "../../../../types";
|
|
3
|
+
export declare class ListEntries implements IListEntries {
|
|
4
|
+
private listEntries;
|
|
5
|
+
constructor(listEntries: IListEntriesOperation);
|
|
6
|
+
execute<T extends CmsEntryValues>(model: CmsModel, params?: CmsEntryListParams): Promise<[CmsEntry<T>[], CmsEntryMeta]>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ListEntries = void 0;
|
|
8
|
+
var _error = _interopRequireDefault(require("@webiny/error"));
|
|
9
|
+
class ListEntries {
|
|
10
|
+
constructor(listEntries) {
|
|
11
|
+
this.listEntries = listEntries;
|
|
12
|
+
}
|
|
13
|
+
async execute(model, params) {
|
|
14
|
+
const {
|
|
15
|
+
where: initialWhere,
|
|
16
|
+
limit: initialLimit,
|
|
17
|
+
fields
|
|
18
|
+
} = params || {};
|
|
19
|
+
try {
|
|
20
|
+
const limit = initialLimit && initialLimit > 0 ? initialLimit : 50;
|
|
21
|
+
const where = {
|
|
22
|
+
...initialWhere
|
|
23
|
+
};
|
|
24
|
+
const listParams = {
|
|
25
|
+
...params,
|
|
26
|
+
where,
|
|
27
|
+
limit
|
|
28
|
+
};
|
|
29
|
+
const {
|
|
30
|
+
hasMoreItems,
|
|
31
|
+
totalCount,
|
|
32
|
+
cursor,
|
|
33
|
+
items
|
|
34
|
+
} = await this.listEntries.execute(model, listParams);
|
|
35
|
+
const meta = {
|
|
36
|
+
hasMoreItems,
|
|
37
|
+
totalCount,
|
|
38
|
+
/**
|
|
39
|
+
* Cursor should be null if there are no more items to load.
|
|
40
|
+
* Just make sure of that, disregarding what is returned from the storageOperations.entries.list method.
|
|
41
|
+
*/
|
|
42
|
+
cursor: hasMoreItems ? cursor : null
|
|
43
|
+
};
|
|
44
|
+
return [items, meta];
|
|
45
|
+
} catch (ex) {
|
|
46
|
+
throw new _error.default(ex.message || "Error while fetching entries from storage.", ex.code || "LIST_ENTRIES_ERROR", {
|
|
47
|
+
...ex.data,
|
|
48
|
+
params,
|
|
49
|
+
error: {
|
|
50
|
+
message: ex.message,
|
|
51
|
+
code: ex.code,
|
|
52
|
+
data: ex.data
|
|
53
|
+
},
|
|
54
|
+
model,
|
|
55
|
+
fields
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.ListEntries = ListEntries;
|
|
61
|
+
|
|
62
|
+
//# sourceMappingURL=ListEntries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_error","_interopRequireDefault","require","ListEntries","constructor","listEntries","execute","model","params","where","initialWhere","limit","initialLimit","fields","listParams","hasMoreItems","totalCount","cursor","items","meta","ex","WebinyError","message","code","data","error","exports"],"sources":["ListEntries.ts"],"sourcesContent":["import { IListEntriesOperation, IListEntries } from \"~/crud/contentEntry/abstractions\";\nimport { CmsEntry, CmsEntryListParams, CmsEntryMeta, CmsEntryValues, CmsModel } from \"~/types\";\nimport WebinyError from \"@webiny/error\";\n\nexport class ListEntries implements IListEntries {\n private listEntries: IListEntriesOperation;\n\n constructor(listEntries: IListEntriesOperation) {\n this.listEntries = listEntries;\n }\n\n async execute<T extends CmsEntryValues>(\n model: CmsModel,\n params?: CmsEntryListParams\n ): Promise<[CmsEntry<T>[], CmsEntryMeta]> {\n const { where: initialWhere, limit: initialLimit, fields } = params || {};\n\n try {\n const limit = initialLimit && initialLimit > 0 ? initialLimit : 50;\n const where = { ...initialWhere };\n const listParams = { ...params, where, limit };\n\n const { hasMoreItems, totalCount, cursor, items } = await this.listEntries.execute(\n model,\n listParams\n );\n\n const meta = {\n hasMoreItems,\n totalCount,\n /**\n * Cursor should be null if there are no more items to load.\n * Just make sure of that, disregarding what is returned from the storageOperations.entries.list method.\n */\n cursor: hasMoreItems ? cursor : null\n };\n\n return [items as CmsEntry<T>[], meta];\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Error while fetching entries from storage.\",\n ex.code || \"LIST_ENTRIES_ERROR\",\n {\n ...ex.data,\n params,\n error: {\n message: ex.message,\n code: ex.code,\n data: ex.data\n },\n model,\n fields\n }\n );\n }\n }\n}\n"],"mappings":";;;;;;;AAEA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEO,MAAMC,WAAW,CAAyB;EAG7CC,WAAWA,CAACC,WAAkC,EAAE;IAC5C,IAAI,CAACA,WAAW,GAAGA,WAAW;EAClC;EAEA,MAAMC,OAAOA,CACTC,KAAe,EACfC,MAA2B,EACW;IACtC,MAAM;MAAEC,KAAK,EAAEC,YAAY;MAAEC,KAAK,EAAEC,YAAY;MAAEC;IAAO,CAAC,GAAGL,MAAM,IAAI,CAAC,CAAC;IAEzE,IAAI;MACA,MAAMG,KAAK,GAAGC,YAAY,IAAIA,YAAY,GAAG,CAAC,GAAGA,YAAY,GAAG,EAAE;MAClE,MAAMH,KAAK,GAAG;QAAE,GAAGC;MAAa,CAAC;MACjC,MAAMI,UAAU,GAAG;QAAE,GAAGN,MAAM;QAAEC,KAAK;QAAEE;MAAM,CAAC;MAE9C,MAAM;QAAEI,YAAY;QAAEC,UAAU;QAAEC,MAAM;QAAEC;MAAM,CAAC,GAAG,MAAM,IAAI,CAACb,WAAW,CAACC,OAAO,CAC9EC,KAAK,EACLO,UACJ,CAAC;MAED,MAAMK,IAAI,GAAG;QACTJ,YAAY;QACZC,UAAU;QACV;AAChB;AACA;AACA;QACgBC,MAAM,EAAEF,YAAY,GAAGE,MAAM,GAAG;MACpC,CAAC;MAED,OAAO,CAACC,KAAK,EAAmBC,IAAI,CAAC;IACzC,CAAC,CAAC,OAAOC,EAAE,EAAE;MACT,MAAM,IAAIC,cAAW,CACjBD,EAAE,CAACE,OAAO,IAAI,4CAA4C,EAC1DF,EAAE,CAACG,IAAI,IAAI,oBAAoB,EAC/B;QACI,GAAGH,EAAE,CAACI,IAAI;QACVhB,MAAM;QACNiB,KAAK,EAAE;UACHH,OAAO,EAAEF,EAAE,CAACE,OAAO;UACnBC,IAAI,EAAEH,EAAE,CAACG,IAAI;UACbC,IAAI,EAAEJ,EAAE,CAACI;QACb,CAAC;QACDjB,KAAK;QACLM;MACJ,CACJ,CAAC;IACL;EACJ;AACJ;AAACa,OAAA,CAAAvB,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IListEntriesOperation } from "../../abstractions";
|
|
2
|
+
import { CmsEntryStorageOperations, CmsEntryStorageOperationsListParams, CmsModel } from "../../../../types";
|
|
3
|
+
export declare class ListEntriesOperation implements IListEntriesOperation {
|
|
4
|
+
private operation;
|
|
5
|
+
constructor(operation: CmsEntryStorageOperations["list"]);
|
|
6
|
+
execute(model: CmsModel, params: CmsEntryStorageOperationsListParams): Promise<import("../../../../types").CmsEntryStorageOperationsListResponse<import("../../../../types").CmsStorageEntry>>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ListEntriesOperation = void 0;
|
|
7
|
+
class ListEntriesOperation {
|
|
8
|
+
constructor(operation) {
|
|
9
|
+
this.operation = operation;
|
|
10
|
+
}
|
|
11
|
+
async execute(model, params) {
|
|
12
|
+
return await this.operation(model, params);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.ListEntriesOperation = ListEntriesOperation;
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=ListEntriesOperation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ListEntriesOperation","constructor","operation","execute","model","params","exports"],"sources":["ListEntriesOperation.ts"],"sourcesContent":["import { IListEntriesOperation } from \"../../abstractions\";\nimport { CmsEntryStorageOperations, CmsEntryStorageOperationsListParams, CmsModel } from \"~/types\";\n\nexport class ListEntriesOperation implements IListEntriesOperation {\n private operation: CmsEntryStorageOperations[\"list\"];\n\n constructor(operation: CmsEntryStorageOperations[\"list\"]) {\n this.operation = operation;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsListParams) {\n return await this.operation(model, params);\n }\n}\n"],"mappings":";;;;;;AAGO,MAAMA,oBAAoB,CAAkC;EAG/DC,WAAWA,CAACC,SAA4C,EAAE;IACtD,IAAI,CAACA,SAAS,GAAGA,SAAS;EAC9B;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAA2C,EAAE;IACxE,OAAO,MAAM,IAAI,CAACH,SAAS,CAACE,KAAK,EAAEC,MAAM,CAAC;EAC9C;AACJ;AAACC,OAAA,CAAAN,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|