@webiny/api-headless-cms 6.0.0-alpha.0 → 6.0.0-alpha.2
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 +1 -1
- package/constants.js.map +1 -1
- package/context.d.ts +1 -1
- package/context.js.map +1 -1
- package/crud/AccessControl/AccessControl.d.ts +2 -2
- package/crud/AccessControl/AccessControl.js.map +1 -1
- package/crud/contentEntry/abstractions/IDeleteEntry.d.ts +1 -1
- package/crud/contentEntry/abstractions/IDeleteEntry.js.map +1 -1
- package/crud/contentEntry/abstractions/IDeleteEntryOperation.d.ts +1 -1
- package/crud/contentEntry/abstractions/IDeleteEntryOperation.js.map +1 -1
- package/crud/contentEntry/abstractions/IGetEntriesByIds.d.ts +1 -1
- package/crud/contentEntry/abstractions/IGetEntriesByIds.js.map +1 -1
- package/crud/contentEntry/abstractions/IGetEntry.d.ts +1 -1
- package/crud/contentEntry/abstractions/IGetEntry.js.map +1 -1
- package/crud/contentEntry/abstractions/IGetLatestEntriesByIds.d.ts +1 -1
- package/crud/contentEntry/abstractions/IGetLatestEntriesByIds.js.map +1 -1
- package/crud/contentEntry/abstractions/IGetLatestRevisionByEntryId.d.ts +1 -1
- package/crud/contentEntry/abstractions/IGetLatestRevisionByEntryId.js.map +1 -1
- package/crud/contentEntry/abstractions/IGetPreviousRevisionByEntryId.d.ts +1 -1
- package/crud/contentEntry/abstractions/IGetPreviousRevisionByEntryId.js.map +1 -1
- package/crud/contentEntry/abstractions/IGetPublishedEntriesByIds.d.ts +1 -1
- package/crud/contentEntry/abstractions/IGetPublishedEntriesByIds.js.map +1 -1
- package/crud/contentEntry/abstractions/IGetPublishedRevisionByEntryId.d.ts +1 -1
- package/crud/contentEntry/abstractions/IGetPublishedRevisionByEntryId.js.map +1 -1
- package/crud/contentEntry/abstractions/IGetRevisionById.d.ts +1 -1
- package/crud/contentEntry/abstractions/IGetRevisionById.js.map +1 -1
- package/crud/contentEntry/abstractions/IGetRevisionsByEntryId.d.ts +1 -1
- package/crud/contentEntry/abstractions/IGetRevisionsByEntryId.js.map +1 -1
- package/crud/contentEntry/abstractions/IListEntries.d.ts +1 -1
- package/crud/contentEntry/abstractions/IListEntries.js.map +1 -1
- package/crud/contentEntry/abstractions/IListEntriesOperation.d.ts +1 -1
- package/crud/contentEntry/abstractions/IListEntriesOperation.js.map +1 -1
- package/crud/contentEntry/abstractions/IMoveEntryToBinOperation.d.ts +1 -1
- package/crud/contentEntry/abstractions/IMoveEntryToBinOperation.js.map +1 -1
- package/crud/contentEntry/abstractions/IRestoreEntryFromBin.d.ts +1 -1
- package/crud/contentEntry/abstractions/IRestoreEntryFromBin.js.map +1 -1
- package/crud/contentEntry/abstractions/IRestoreEntryFromBinOperation.d.ts +1 -1
- package/crud/contentEntry/abstractions/IRestoreEntryFromBinOperation.js.map +1 -1
- package/crud/contentEntry/afterDelete.d.ts +2 -2
- package/crud/contentEntry/afterDelete.js.map +1 -1
- package/crud/contentEntry/beforeCreate.d.ts +2 -2
- package/crud/contentEntry/beforeCreate.js.map +1 -1
- package/crud/contentEntry/beforeUpdate.d.ts +2 -2
- package/crud/contentEntry/beforeUpdate.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createEntryData.d.ts +5 -5
- package/crud/contentEntry/entryDataFactories/createEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createEntryRevisionFromData.d.ts +5 -5
- package/crud/contentEntry/entryDataFactories/createEntryRevisionFromData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createPublishEntryData.d.ts +4 -4
- package/crud/contentEntry/entryDataFactories/createPublishEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createRepublishEntryData.d.ts +2 -2
- package/crud/contentEntry/entryDataFactories/createRepublishEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.d.ts +4 -4
- package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createUpdateEntryData.d.ts +4 -4
- package/crud/contentEntry/entryDataFactories/createUpdateEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/mapAndCleanUpdatedInputData.d.ts +1 -1
- package/crud/contentEntry/entryDataFactories/mapAndCleanUpdatedInputData.js.map +1 -1
- package/crud/contentEntry/entryDataValidation.d.ts +1 -1
- package/crud/contentEntry/entryDataValidation.js.map +1 -1
- package/crud/contentEntry/markLockedFields.d.ts +1 -1
- package/crud/contentEntry/markLockedFields.js.map +1 -1
- package/crud/contentEntry/referenceFieldsMapping.d.ts +1 -1
- package/crud/contentEntry/referenceFieldsMapping.js.map +1 -1
- package/crud/contentEntry/searchableFields.d.ts +2 -2
- package/crud/contentEntry/searchableFields.js.map +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntry.d.ts +3 -3
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntry.js.map +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperation.d.ts +2 -2
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperation.js.map +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperationWithEvents.d.ts +3 -3
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperationWithEvents.js.map +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntrySecure.d.ts +3 -3
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntrySecure.js.map +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBin.d.ts +3 -3
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBin.js.map +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperation.d.ts +2 -2
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperation.js.map +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperationWithEvents.d.ts +3 -3
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperationWithEvents.js.map +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/TransformEntryDelete.d.ts +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/TransformEntryDelete.js.map +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/TransformEntryMoveToBin.d.ts +2 -2
- package/crud/contentEntry/useCases/DeleteEntry/TransformEntryMoveToBin.js.map +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/index.d.ts +5 -5
- package/crud/contentEntry/useCases/DeleteEntry/index.js.map +1 -1
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIds.d.ts +7 -5
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIds.js +6 -2
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIds.js.map +1 -1
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsNotDeleted.d.ts +2 -2
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsNotDeleted.js.map +1 -1
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsSecure.d.ts +3 -3
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsSecure.js.map +1 -1
- package/crud/contentEntry/useCases/GetEntriesByIds/index.d.ts +4 -2
- package/crud/contentEntry/useCases/GetEntriesByIds/index.js +1 -1
- package/crud/contentEntry/useCases/GetEntriesByIds/index.js.map +1 -1
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIds.d.ts +7 -5
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIds.js +6 -2
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIds.js.map +1 -1
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsNotDeleted.d.ts +2 -2
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsNotDeleted.js.map +1 -1
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsSecure.d.ts +3 -3
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsSecure.js.map +1 -1
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/index.d.ts +4 -2
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/index.js +1 -1
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/index.js.map +1 -1
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryId.d.ts +7 -5
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryId.js +7 -2
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryId.js.map +1 -1
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdDeleted.d.ts +2 -2
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdDeleted.js.map +1 -1
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdNotDeleted.d.ts +2 -2
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdNotDeleted.js.map +1 -1
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/index.d.ts +3 -1
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/index.js +1 -1
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/index.js.map +1 -1
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryId.d.ts +7 -5
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryId.js +7 -2
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryId.js.map +1 -1
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdNotDeleted.d.ts +2 -2
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdNotDeleted.js.map +1 -1
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/index.d.ts +3 -1
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/index.js +1 -1
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/index.js.map +1 -1
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIds.d.ts +7 -5
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIds.js +6 -2
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIds.js.map +1 -1
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsNotDeleted.d.ts +2 -2
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsNotDeleted.js.map +1 -1
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsSecure.d.ts +3 -3
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsSecure.js.map +1 -1
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/index.d.ts +4 -2
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/index.js +1 -1
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/index.js.map +1 -1
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.d.ts +7 -5
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.js +7 -2
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.js.map +1 -1
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdNotDeleted.d.ts +2 -2
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdNotDeleted.js.map +1 -1
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/index.d.ts +3 -1
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/index.js +1 -1
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/index.js.map +1 -1
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionById.d.ts +7 -5
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionById.js +7 -2
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionById.js.map +1 -1
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionByIdNotDeleted.d.ts +2 -2
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionByIdNotDeleted.js.map +1 -1
- package/crud/contentEntry/useCases/GetRevisionById/index.d.ts +3 -1
- package/crud/contentEntry/useCases/GetRevisionById/index.js +1 -1
- package/crud/contentEntry/useCases/GetRevisionById/index.js.map +1 -1
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryId.d.ts +7 -5
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryId.js +6 -2
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryId.js.map +1 -1
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryIdNotDeleted.d.ts +2 -2
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryIdNotDeleted.js.map +1 -1
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/index.d.ts +4 -2
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/index.js +1 -1
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/index.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/GetEntry.d.ts +2 -2
- package/crud/contentEntry/useCases/ListEntries/GetEntry.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/GetEntrySecure.d.ts +4 -4
- package/crud/contentEntry/useCases/ListEntries/GetEntrySecure.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/ListEntries.d.ts +2 -2
- package/crud/contentEntry/useCases/ListEntries/ListEntries.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperation.d.ts +12 -5
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperation.js +9 -2
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperation.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationDeleted.d.ts +2 -2
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationDeleted.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationLatest.d.ts +2 -2
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationLatest.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationNotDeleted.d.ts +2 -2
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationNotDeleted.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationPublished.d.ts +2 -2
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationPublished.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithEvents.d.ts +3 -3
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithEvents.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSearchableFields.d.ts +2 -2
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSearchableFields.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSort.d.ts +2 -2
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSort.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithStatusCheck.d.ts +2 -2
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithStatusCheck.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/ListEntriesSecure.d.ts +4 -4
- package/crud/contentEntry/useCases/ListEntries/ListEntriesSecure.js.map +1 -1
- package/crud/contentEntry/useCases/ListEntries/index.d.ts +6 -4
- package/crud/contentEntry/useCases/ListEntries/index.js +1 -1
- package/crud/contentEntry/useCases/ListEntries/index.js.map +1 -1
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBin.d.ts +3 -3
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBin.js.map +1 -1
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperation.d.ts +7 -5
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperation.js +4 -2
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperation.js.map +1 -1
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperationWithEvents.d.ts +3 -3
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperationWithEvents.js.map +1 -1
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinSecure.d.ts +3 -3
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinSecure.js.map +1 -1
- package/crud/contentEntry/useCases/RestoreEntryFromBin/TransformEntryRestoreFromBin.d.ts +2 -2
- package/crud/contentEntry/useCases/RestoreEntryFromBin/TransformEntryRestoreFromBin.js.map +1 -1
- package/crud/contentEntry/useCases/RestoreEntryFromBin/index.d.ts +7 -5
- package/crud/contentEntry/useCases/RestoreEntryFromBin/index.js +1 -1
- package/crud/contentEntry/useCases/RestoreEntryFromBin/index.js.map +1 -1
- package/crud/contentEntry.crud.d.ts +5 -5
- package/crud/contentEntry.crud.js +16 -3
- package/crud/contentEntry.crud.js.map +1 -1
- package/crud/contentModel/beforeCreate.d.ts +2 -2
- package/crud/contentModel/beforeCreate.js.map +1 -1
- package/crud/contentModel/beforeDelete.d.ts +2 -2
- package/crud/contentModel/beforeDelete.js.map +1 -1
- package/crud/contentModel/beforeUpdate.d.ts +2 -2
- package/crud/contentModel/beforeUpdate.js.map +1 -1
- package/crud/contentModel/compatibility/modelApiName.d.ts +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.d.ts +1 -1
- package/crud/contentModel/createFieldStorageId.js.map +1 -1
- package/crud/contentModel/defaultFields.d.ts +1 -1
- package/crud/contentModel/defaultFields.js.map +1 -1
- package/crud/contentModel/ensureTypeTag.d.ts +1 -1
- package/crud/contentModel/ensureTypeTag.js.map +1 -1
- package/crud/contentModel/fields/descriptionField.d.ts +1 -1
- package/crud/contentModel/fields/descriptionField.js.map +1 -1
- package/crud/contentModel/fields/getApplicableFieldById.d.ts +1 -1
- package/crud/contentModel/fields/getApplicableFieldById.js.map +1 -1
- package/crud/contentModel/fields/imageField.d.ts +1 -1
- package/crud/contentModel/fields/imageField.js.map +1 -1
- package/crud/contentModel/fields/titleField.d.ts +1 -1
- package/crud/contentModel/fields/titleField.js.map +1 -1
- package/crud/contentModel/listModelsFromDatabase.d.ts +3 -3
- package/crud/contentModel/listModelsFromDatabase.js.map +1 -1
- package/crud/contentModel/validate/endingAllowed.d.ts +1 -1
- package/crud/contentModel/validate/endingAllowed.js.map +1 -1
- package/crud/contentModel/validate/modelId.d.ts +1 -1
- package/crud/contentModel/validate/modelId.js.map +1 -1
- package/crud/contentModel/validate/pluralApiName.d.ts +1 -1
- package/crud/contentModel/validate/pluralApiName.js.map +1 -1
- package/crud/contentModel/validate/singularApiName.d.ts +1 -1
- package/crud/contentModel/validate/singularApiName.js.map +1 -1
- package/crud/contentModel/validateModel.d.ts +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/validation.d.ts +132 -132
- package/crud/contentModel.crud.d.ts +5 -5
- package/crud/contentModel.crud.js.map +1 -1
- package/crud/contentModelGroup/beforeCreate.d.ts +3 -3
- package/crud/contentModelGroup/beforeCreate.js.map +1 -1
- package/crud/contentModelGroup/beforeDelete.d.ts +3 -3
- package/crud/contentModelGroup/beforeDelete.js.map +1 -1
- package/crud/contentModelGroup/beforeUpdate.d.ts +3 -3
- package/crud/contentModelGroup/beforeUpdate.js.map +1 -1
- package/crud/contentModelGroup/listGroupsFromDatabase.d.ts +1 -1
- package/crud/contentModelGroup/listGroupsFromDatabase.js.map +1 -1
- package/crud/contentModelGroup/validation.d.ts +2 -2
- package/crud/contentModelGroup.crud.d.ts +5 -5
- package/crud/contentModelGroup.crud.js.map +1 -1
- package/crud/system.crud.d.ts +4 -4
- package/crud/system.crud.js +10 -0
- package/crud/system.crud.js.map +1 -1
- package/export/crud/exporting.d.ts +2 -2
- package/export/crud/exporting.js.map +1 -1
- package/export/crud/importing.d.ts +2 -2
- package/export/crud/importing.js.map +1 -1
- package/export/crud/imports/importData.d.ts +2 -2
- package/export/crud/imports/importData.js.map +1 -1
- package/export/crud/imports/importGroups.d.ts +2 -2
- package/export/crud/imports/importGroups.js.map +1 -1
- package/export/crud/imports/importModels.d.ts +2 -2
- package/export/crud/imports/importModels.js.map +1 -1
- package/export/crud/imports/validateGroups.d.ts +2 -2
- package/export/crud/imports/validateGroups.js.map +1 -1
- package/export/crud/imports/validateInput.d.ts +2 -2
- package/export/crud/imports/validateInput.js.map +1 -1
- package/export/crud/imports/validateModels.d.ts +2 -2
- package/export/crud/imports/validateModels.js.map +1 -1
- package/export/crud/index.d.ts +1 -1
- package/export/crud/index.js.map +1 -1
- package/export/crud/sanitize.d.ts +2 -2
- package/export/crud/sanitize.js.map +1 -1
- package/export/graphql/index.d.ts +1 -1
- package/export/graphql/index.js.map +1 -1
- package/export/types.d.ts +1 -1
- package/export/types.js.map +1 -1
- package/fieldConverters/CmsModelDefaultFieldConverterPlugin.d.ts +3 -2
- package/fieldConverters/CmsModelDefaultFieldConverterPlugin.js.map +1 -1
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.d.ts +3 -2
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js.map +1 -1
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.d.ts +3 -2
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.js.map +1 -1
- package/graphql/buildSchemaPlugins.d.ts +2 -2
- package/graphql/buildSchemaPlugins.js.map +1 -1
- package/graphql/checkEndpointAccess.d.ts +1 -1
- package/graphql/checkEndpointAccess.js.map +1 -1
- package/graphql/createExecutableSchema.d.ts +1 -1
- package/graphql/createExecutableSchema.js.map +1 -1
- package/graphql/createRequestBody.d.ts +1 -1
- package/graphql/createRequestBody.js.map +1 -1
- package/graphql/generateSchema.d.ts +2 -2
- package/graphql/generateSchema.js.map +1 -1
- package/graphql/getSchema/generateCacheId.d.ts +3 -3
- package/graphql/getSchema/generateCacheId.js.map +1 -1
- package/graphql/getSchema/generateCacheKey.d.ts +1 -1
- package/graphql/getSchema/generateCacheKey.js.map +1 -1
- package/graphql/getSchema.d.ts +4 -4
- package/graphql/getSchema.js.map +1 -1
- package/graphql/graphQLHandlerFactory.d.ts +1 -1
- package/graphql/graphQLHandlerFactory.js.map +1 -1
- package/graphql/handleRequest.d.ts +2 -2
- package/graphql/handleRequest.js.map +1 -1
- package/graphql/index.d.ts +2 -2
- package/graphql/index.js.map +1 -1
- package/graphql/scalars/RevisionIdScalarPlugin.d.ts +1 -1
- package/graphql/scalars/RevisionIdScalarPlugin.js.map +1 -1
- package/graphql/schema/baseContentSchema.d.ts +2 -2
- package/graphql/schema/baseContentSchema.js.map +1 -1
- package/graphql/schema/baseSchema.js.map +1 -1
- package/graphql/schema/contentEntries.d.ts +2 -2
- package/graphql/schema/contentEntries.js.map +1 -1
- package/graphql/schema/contentModelGroups.d.ts +2 -2
- package/graphql/schema/contentModelGroups.js.map +1 -1
- package/graphql/schema/contentModels.d.ts +2 -2
- package/graphql/schema/contentModels.js.map +1 -1
- package/graphql/schema/createFieldResolvers.d.ts +2 -2
- package/graphql/schema/createFieldResolvers.js.map +1 -1
- package/graphql/schema/createFieldTypePluginRecords.d.ts +2 -2
- package/graphql/schema/createFieldTypePluginRecords.js.map +1 -1
- package/graphql/schema/createManageSDL.d.ts +2 -2
- package/graphql/schema/createManageSDL.js.map +1 -1
- package/graphql/schema/createReadSDL.d.ts +2 -2
- package/graphql/schema/createReadSDL.js.map +1 -1
- package/graphql/schema/createSingularSDL.d.ts +1 -1
- package/graphql/schema/createSingularSDL.js.map +1 -1
- package/graphql/schema/resolvers/manage/normalizeGraphQlInput.d.ts +1 -1
- package/graphql/schema/resolvers/manage/normalizeGraphQlInput.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveCreate.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveCreate.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveCreateFrom.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveCreateFrom.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveDelete.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveDelete.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveDeleteMultiple.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveDeleteMultiple.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGet.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGetByIds.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveGetByIds.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGetRevisions.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveGetRevisions.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGetUniqueFieldValues.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveGetUniqueFieldValues.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveList.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveList.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveListDeleted.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveListDeleted.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveMove.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveMove.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolvePublish.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolvePublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveRepublish.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveRepublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveRestoreFromBin.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveRestoreFromBin.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveUnpublish.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveUnpublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveUpdate.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveUpdate.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveValidate.d.ts +1 -1
- package/graphql/schema/resolvers/manage/resolveValidate.js.map +1 -1
- package/graphql/schema/resolvers/preview/resolveGet.d.ts +1 -1
- package/graphql/schema/resolvers/preview/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/preview/resolveList.d.ts +1 -1
- package/graphql/schema/resolvers/preview/resolveList.js.map +1 -1
- package/graphql/schema/resolvers/read/resolveGet.d.ts +1 -1
- package/graphql/schema/resolvers/read/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/read/resolveList.d.ts +1 -1
- package/graphql/schema/resolvers/read/resolveList.js.map +1 -1
- package/graphql/schema/resolvers/singular/resolveGet.d.ts +1 -1
- package/graphql/schema/resolvers/singular/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/singular/resolveUpdate.d.ts +1 -1
- package/graphql/schema/resolvers/singular/resolveUpdate.js.map +1 -1
- package/graphql/schema/schemaPlugins.d.ts +1 -1
- package/graphql/schema/schemaPlugins.js.map +1 -1
- package/graphql/system.d.ts +1 -1
- package/graphql/system.js.map +1 -1
- package/graphqlFields/boolean.d.ts +1 -1
- package/graphqlFields/boolean.js.map +1 -1
- package/graphqlFields/datetime.d.ts +1 -1
- package/graphqlFields/datetime.js.map +1 -1
- package/graphqlFields/dynamicZone/dynamicZoneField.d.ts +1 -1
- package/graphqlFields/dynamicZone/dynamicZoneField.js.map +1 -1
- package/graphqlFields/file.d.ts +1 -1
- package/graphqlFields/file.js.map +1 -1
- package/graphqlFields/helpers.d.ts +1 -1
- package/graphqlFields/helpers.js.map +1 -1
- package/graphqlFields/index.d.ts +1 -1
- package/graphqlFields/index.js.map +1 -1
- package/graphqlFields/json.d.ts +1 -1
- package/graphqlFields/json.js.map +1 -1
- package/graphqlFields/longText.d.ts +1 -1
- package/graphqlFields/longText.js.map +1 -1
- package/graphqlFields/number.d.ts +1 -1
- package/graphqlFields/number.js.map +1 -1
- package/graphqlFields/object.d.ts +1 -1
- package/graphqlFields/object.js.map +1 -1
- package/graphqlFields/ref.d.ts +1 -1
- package/graphqlFields/ref.js.map +1 -1
- package/graphqlFields/richText/RichTextPluginsProcessor.d.ts +1 -1
- package/graphqlFields/richText/RichTextPluginsProcessor.js.map +1 -1
- package/graphqlFields/richText/richTextResolver.d.ts +2 -2
- package/graphqlFields/richText/richTextResolver.js.map +1 -1
- package/graphqlFields/richText.d.ts +1 -1
- package/graphqlFields/richText.js.map +1 -1
- package/graphqlFields/searchableJson.d.ts +1 -1
- package/graphqlFields/searchableJson.js +5 -0
- package/graphqlFields/searchableJson.js.map +1 -1
- package/graphqlFields/text.d.ts +1 -1
- package/graphqlFields/text.js.map +1 -1
- package/htmlRenderer/LexicalRenderer.d.ts +1 -1
- package/htmlRenderer/LexicalRenderer.js.map +1 -1
- package/htmlRenderer/createLexicalHTMLRenderer.js.map +1 -1
- package/index.d.ts +3 -3
- package/index.js.map +1 -1
- package/modelManager/SingletonModelManager.d.ts +1 -1
- package/modelManager/SingletonModelManager.js.map +1 -1
- package/modelManager/index.d.ts +1 -1
- package/modelManager/index.js.map +1 -1
- package/package.json +21 -21
- package/parameters/header.js.map +1 -1
- package/parameters/manual.d.ts +2 -1
- package/parameters/manual.js.map +1 -1
- package/parameters/path.js.map +1 -1
- package/plugins/CmsGraphQLSchemaPlugin/CmsGraphQLSchemaPlugin.d.ts +3 -2
- package/plugins/CmsGraphQLSchemaPlugin/CmsGraphQLSchemaPlugin.js.map +1 -1
- package/plugins/CmsGraphQLSchemaSorterPlugin.d.ts +1 -1
- package/plugins/CmsGraphQLSchemaSorterPlugin.js.map +1 -1
- package/plugins/CmsGroupPlugin.d.ts +1 -1
- package/plugins/CmsGroupPlugin.js.map +1 -1
- package/plugins/CmsModelFieldConverterPlugin.d.ts +2 -2
- package/plugins/CmsModelFieldConverterPlugin.js.map +1 -1
- package/plugins/CmsModelPlugin.d.ts +1 -1
- package/plugins/CmsModelPlugin.js.map +1 -1
- package/plugins/CmsParametersPlugin.d.ts +1 -1
- package/plugins/CmsParametersPlugin.js.map +1 -1
- package/plugins/StorageOperationsCmsModelPlugin.d.ts +1 -1
- package/plugins/StorageOperationsCmsModelPlugin.js.map +1 -1
- package/plugins/StorageTransformPlugin.d.ts +2 -2
- package/plugins/StorageTransformPlugin.js.map +1 -1
- package/storage/date.d.ts +1 -1
- package/storage/date.js.map +1 -1
- package/storage/dynamicZone.js.map +1 -1
- package/storage/json.js +34 -5
- package/storage/json.js.map +1 -1
- package/storage/object.js.map +1 -1
- package/types/context.d.ts +7 -7
- package/types/context.js.map +1 -1
- package/types/fields/dynamicZoneField.d.ts +1 -1
- package/types/fields/dynamicZoneField.js.map +1 -1
- package/types/fields/objectField.d.ts +1 -1
- package/types/fields/objectField.js.map +1 -1
- package/types/model.d.ts +3 -3
- package/types/model.js.map +1 -1
- package/types/modelAst.d.ts +1 -1
- package/types/modelAst.js.map +1 -1
- package/types/modelField.d.ts +2 -2
- package/types/modelField.js.map +1 -1
- package/types/modelGroup.d.ts +1 -1
- package/types/modelGroup.js.map +1 -1
- package/types/plugins.d.ts +6 -6
- package/types/plugins.js.map +1 -1
- package/types/types.d.ts +19 -19
- package/types/types.js.map +1 -1
- package/utils/RichTextRenderer.d.ts +2 -2
- package/utils/RichTextRenderer.js.map +1 -1
- package/utils/caching/Cache.d.ts +1 -1
- package/utils/caching/Cache.js.map +1 -1
- package/utils/caching/CacheKey.d.ts +2 -2
- package/utils/caching/CacheKey.js.map +1 -1
- package/utils/contentEntryTraverser/ContentEntryTraverser.d.ts +1 -1
- package/utils/contentEntryTraverser/ContentEntryTraverser.js.map +1 -1
- package/utils/contentModelAst/CmsModelFieldToAstConverterFromPlugins.d.ts +1 -1
- package/utils/contentModelAst/CmsModelFieldToAstConverterFromPlugins.js.map +1 -1
- package/utils/contentModelAst/CmsModelFieldToAstFromPlugin.d.ts +1 -1
- package/utils/contentModelAst/CmsModelFieldToAstFromPlugin.js.map +1 -1
- package/utils/contentModelAst/CmsModelToAstConverter.d.ts +1 -1
- package/utils/contentModelAst/CmsModelToAstConverter.js.map +1 -1
- package/utils/converters/Converter.d.ts +3 -3
- package/utils/converters/Converter.js.map +1 -1
- package/utils/converters/ConverterCollection.d.ts +2 -2
- package/utils/converters/ConverterCollection.js.map +1 -1
- package/utils/converters/valueKeyStorageConverter.d.ts +3 -3
- package/utils/converters/valueKeyStorageConverter.js.map +1 -1
- package/utils/createModelField.d.ts +1 -1
- package/utils/createModelField.js.map +1 -1
- package/utils/createTypeFromFields.d.ts +1 -1
- package/utils/createTypeFromFields.js.map +1 -1
- package/utils/entryStorage.d.ts +8 -1
- package/utils/entryStorage.js +37 -4
- package/utils/entryStorage.js.map +1 -1
- package/utils/getBaseFieldType.d.ts +1 -1
- package/utils/getBaseFieldType.js.map +1 -1
- package/utils/getEntryDescription.d.ts +1 -1
- package/utils/getEntryDescription.js.map +1 -1
- package/utils/getEntryImage.d.ts +1 -1
- package/utils/getEntryImage.js.map +1 -1
- package/utils/getEntryTitle.d.ts +1 -1
- package/utils/getEntryTitle.js.map +1 -1
- package/utils/getSchemaFromFieldPlugins.d.ts +4 -4
- package/utils/getSchemaFromFieldPlugins.js.map +1 -1
- package/utils/identity.d.ts +1 -1
- package/utils/identity.js.map +1 -1
- package/utils/isHeadlessCmsReady.d.ts +1 -1
- package/utils/isHeadlessCmsReady.js.map +1 -1
- package/utils/modelFieldTraverser/ModelFieldTraverser.d.ts +1 -1
- package/utils/modelFieldTraverser/ModelFieldTraverser.js.map +1 -1
- package/utils/renderFields.d.ts +1 -1
- package/utils/renderFields.js.map +1 -1
- package/utils/renderGetFilterFields.d.ts +1 -1
- package/utils/renderGetFilterFields.js.map +1 -1
- package/utils/renderInputFields.d.ts +1 -1
- package/utils/renderInputFields.js.map +1 -1
- package/utils/renderListFilterFields.d.ts +1 -1
- package/utils/renderListFilterFields.js.map +1 -1
- package/utils/renderSortEnum.d.ts +2 -2
- package/utils/renderSortEnum.js.map +1 -1
- package/validators/dateGte.d.ts +1 -1
- package/validators/dateGte.js.map +1 -1
- package/validators/dateLte.d.ts +1 -1
- package/validators/dateLte.js.map +1 -1
- package/validators/gte.d.ts +1 -1
- package/validators/gte.js.map +1 -1
- package/validators/in.d.ts +1 -1
- package/validators/in.js.map +1 -1
- package/validators/lte.d.ts +1 -1
- package/validators/lte.js.map +1 -1
- package/validators/maxLength.d.ts +1 -1
- package/validators/maxLength.js.map +1 -1
- package/validators/minLength.d.ts +1 -1
- package/validators/minLength.js.map +1 -1
- package/validators/pattern.d.ts +1 -1
- package/validators/pattern.js.map +1 -1
- package/validators/patternPlugins/email.d.ts +1 -1
- package/validators/patternPlugins/email.js.map +1 -1
- package/validators/patternPlugins/index.d.ts +1 -1
- package/validators/patternPlugins/index.js.map +1 -1
- package/validators/patternPlugins/lowerCase.d.ts +1 -1
- package/validators/patternPlugins/lowerCase.js.map +1 -1
- package/validators/patternPlugins/lowerCaseSpace.d.ts +1 -1
- package/validators/patternPlugins/lowerCaseSpace.js.map +1 -1
- package/validators/patternPlugins/upperCase.d.ts +1 -1
- package/validators/patternPlugins/upperCase.js.map +1 -1
- package/validators/patternPlugins/upperCaseSpace.d.ts +1 -1
- package/validators/patternPlugins/upperCaseSpace.js.map +1 -1
- package/validators/patternPlugins/url.d.ts +1 -1
- package/validators/patternPlugins/url.js.map +1 -1
- package/validators/required.d.ts +1 -1
- package/validators/required.js.map +1 -1
- package/validators/timeGte.d.ts +1 -1
- package/validators/timeGte.js.map +1 -1
- package/validators/timeLte.d.ts +1 -1
- package/validators/timeLte.js.map +1 -1
- package/validators/unique.d.ts +1 -1
- package/validators/unique.js.map +1 -1
|
@@ -1 +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":[]}
|
|
1
|
+
{"version":3,"names":["GetPublishedRevisionByEntryIdNotDeleted","constructor","getPublishedRevisionByEntryId","execute","model","params","entry","wbyDeleted","exports"],"sources":["GetPublishedRevisionByEntryIdNotDeleted.ts"],"sourcesContent":["import type { IGetPublishedRevisionByEntryId } from \"../../abstractions\";\nimport type { 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":[]}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { GetPublishedRevisionByEntryIdNotDeleted } from "./GetPublishedRevisionByEntryIdNotDeleted";
|
|
2
|
-
import { CmsEntryStorageOperations } from "../../../../types";
|
|
2
|
+
import type { CmsEntryStorageOperations } from "../../../../types";
|
|
3
|
+
import type { ITransformEntryCallable } from "../../../../utils/entryStorage.js";
|
|
3
4
|
interface GetPublishedRevisionByEntryIdUseCasesParams {
|
|
4
5
|
operation: CmsEntryStorageOperations["getPublishedRevisionByEntryId"];
|
|
6
|
+
transform: ITransformEntryCallable;
|
|
5
7
|
}
|
|
6
8
|
export declare const getPublishedRevisionByEntryIdUseCases: (params: GetPublishedRevisionByEntryIdUseCasesParams) => {
|
|
7
9
|
getPublishedRevisionByEntryIdUseCase: GetPublishedRevisionByEntryIdNotDeleted;
|
|
@@ -7,7 +7,7 @@ exports.getPublishedRevisionByEntryIdUseCases = void 0;
|
|
|
7
7
|
var _GetPublishedRevisionByEntryId = require("./GetPublishedRevisionByEntryId");
|
|
8
8
|
var _GetPublishedRevisionByEntryIdNotDeleted = require("./GetPublishedRevisionByEntryIdNotDeleted");
|
|
9
9
|
const getPublishedRevisionByEntryIdUseCases = params => {
|
|
10
|
-
const getPublishedRevisionByEntryId = new _GetPublishedRevisionByEntryId.GetPublishedRevisionByEntryId(params.operation);
|
|
10
|
+
const getPublishedRevisionByEntryId = new _GetPublishedRevisionByEntryId.GetPublishedRevisionByEntryId(params.operation, params.transform);
|
|
11
11
|
const getPublishedRevisionByEntryIdNotDeleted = new _GetPublishedRevisionByEntryIdNotDeleted.GetPublishedRevisionByEntryIdNotDeleted(getPublishedRevisionByEntryId);
|
|
12
12
|
return {
|
|
13
13
|
getPublishedRevisionByEntryIdUseCase: getPublishedRevisionByEntryIdNotDeleted
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"names":["_GetPublishedRevisionByEntryId","require","_GetPublishedRevisionByEntryIdNotDeleted","getPublishedRevisionByEntryIdUseCases","params","getPublishedRevisionByEntryId","GetPublishedRevisionByEntryId","operation","transform","getPublishedRevisionByEntryIdNotDeleted","GetPublishedRevisionByEntryIdNotDeleted","getPublishedRevisionByEntryIdUseCase","exports"],"sources":["index.ts"],"sourcesContent":["import { GetPublishedRevisionByEntryId } from \"./GetPublishedRevisionByEntryId\";\nimport { GetPublishedRevisionByEntryIdNotDeleted } from \"./GetPublishedRevisionByEntryIdNotDeleted\";\nimport type { CmsEntryStorageOperations } from \"~/types\";\nimport type { ITransformEntryCallable } from \"~/utils/entryStorage.js\";\n\ninterface GetPublishedRevisionByEntryIdUseCasesParams {\n operation: CmsEntryStorageOperations[\"getPublishedRevisionByEntryId\"];\n transform: ITransformEntryCallable;\n}\n\nexport const getPublishedRevisionByEntryIdUseCases = (\n params: GetPublishedRevisionByEntryIdUseCasesParams\n) => {\n const getPublishedRevisionByEntryId = new GetPublishedRevisionByEntryId(\n params.operation,\n params.transform\n );\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;AASO,MAAME,qCAAqC,GAC9CC,MAAmD,IAClD;EACD,MAAMC,6BAA6B,GAAG,IAAIC,4DAA6B,CACnEF,MAAM,CAACG,SAAS,EAChBH,MAAM,CAACI,SACX,CAAC;EACD,MAAMC,uCAAuC,GAAG,IAAIC,gFAAuC,CACvFL,6BACJ,CAAC;EAED,OAAO;IACHM,oCAAoC,EAAEF;EAC1C,CAAC;AACL,CAAC;AAACG,OAAA,CAAAT,qCAAA,GAAAA,qCAAA","ignoreList":[]}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { IGetRevisionById } from "../../abstractions";
|
|
2
|
-
import { CmsEntryStorageOperations, CmsEntryStorageOperationsGetRevisionParams, CmsModel } from "../../../../types";
|
|
1
|
+
import type { IGetRevisionById } from "../../abstractions";
|
|
2
|
+
import type { CmsEntryStorageOperations, CmsEntryStorageOperationsGetRevisionParams, CmsModel } from "../../../../types";
|
|
3
|
+
import type { ITransformEntryCallable } from "../../../../utils/entryStorage.js";
|
|
3
4
|
export declare class GetRevisionById implements IGetRevisionById {
|
|
4
|
-
private operation;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
private readonly operation;
|
|
6
|
+
private readonly transform;
|
|
7
|
+
constructor(operation: CmsEntryStorageOperations["getRevisionById"], transform: ITransformEntryCallable);
|
|
8
|
+
execute(model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams): Promise<import("../../../../types").CmsEntry<import("../../../../types").CmsEntryValues> | null>;
|
|
7
9
|
}
|
|
@@ -5,11 +5,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.GetRevisionById = void 0;
|
|
7
7
|
class GetRevisionById {
|
|
8
|
-
constructor(operation) {
|
|
8
|
+
constructor(operation, transform) {
|
|
9
9
|
this.operation = operation;
|
|
10
|
+
this.transform = transform;
|
|
10
11
|
}
|
|
11
12
|
async execute(model, params) {
|
|
12
|
-
|
|
13
|
+
const result = await this.operation(model, params);
|
|
14
|
+
if (!result) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
return await this.transform(model, result);
|
|
13
18
|
}
|
|
14
19
|
}
|
|
15
20
|
exports.GetRevisionById = GetRevisionById;
|
|
@@ -1 +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
|
|
1
|
+
{"version":3,"names":["GetRevisionById","constructor","operation","transform","execute","model","params","result","exports"],"sources":["GetRevisionById.ts"],"sourcesContent":["import type { IGetRevisionById } from \"../../abstractions\";\nimport type {\n CmsEntryStorageOperations,\n CmsEntryStorageOperationsGetRevisionParams,\n CmsModel\n} from \"~/types\";\nimport type { ITransformEntryCallable } from \"~/utils/entryStorage.js\";\n\nexport class GetRevisionById implements IGetRevisionById {\n private readonly operation: CmsEntryStorageOperations[\"getRevisionById\"];\n private readonly transform: ITransformEntryCallable;\n\n public constructor(\n operation: CmsEntryStorageOperations[\"getRevisionById\"],\n transform: ITransformEntryCallable\n ) {\n this.operation = operation;\n this.transform = transform;\n }\n\n public async execute(model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams) {\n const result = await this.operation(model, params);\n if (!result) {\n return null;\n }\n return await this.transform(model, result);\n }\n}\n"],"mappings":";;;;;;AAQO,MAAMA,eAAe,CAA6B;EAI9CC,WAAWA,CACdC,SAAuD,EACvDC,SAAkC,EACpC;IACE,IAAI,CAACD,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACC,SAAS,GAAGA,SAAS;EAC9B;EAEA,MAAaC,OAAOA,CAACC,KAAe,EAAEC,MAAkD,EAAE;IACtF,MAAMC,MAAM,GAAG,MAAM,IAAI,CAACL,SAAS,CAACG,KAAK,EAAEC,MAAM,CAAC;IAClD,IAAI,CAACC,MAAM,EAAE;MACT,OAAO,IAAI;IACf;IACA,OAAO,MAAM,IAAI,CAACJ,SAAS,CAACE,KAAK,EAAEE,MAAM,CAAC;EAC9C;AACJ;AAACC,OAAA,CAAAR,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IGetRevisionById } from "../../abstractions";
|
|
2
|
-
import { CmsEntryStorageOperationsGetRevisionParams, CmsModel } from "../../../../types";
|
|
1
|
+
import type { IGetRevisionById } from "../../abstractions";
|
|
2
|
+
import type { CmsEntryStorageOperationsGetRevisionParams, CmsModel } from "../../../../types";
|
|
3
3
|
export declare class GetRevisionByIdNotDeleted implements IGetRevisionById {
|
|
4
4
|
private getRevisionById;
|
|
5
5
|
constructor(getRevisionById: IGetRevisionById);
|
|
@@ -1 +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":[]}
|
|
1
|
+
{"version":3,"names":["GetRevisionByIdNotDeleted","constructor","getRevisionById","execute","model","params","entry","wbyDeleted","exports"],"sources":["GetRevisionByIdNotDeleted.ts"],"sourcesContent":["import type { IGetRevisionById } from \"../../abstractions\";\nimport type { 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":[]}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { GetRevisionByIdNotDeleted } from "./GetRevisionByIdNotDeleted";
|
|
2
|
-
import { CmsEntryStorageOperations } from "../../../../types";
|
|
2
|
+
import type { CmsEntryStorageOperations } from "../../../../types";
|
|
3
|
+
import type { ITransformEntryCallable } from "../../../../utils/entryStorage.js";
|
|
3
4
|
interface GetRevisionByIdUseCasesParams {
|
|
4
5
|
operation: CmsEntryStorageOperations["getRevisionById"];
|
|
6
|
+
transform: ITransformEntryCallable;
|
|
5
7
|
}
|
|
6
8
|
export declare const getRevisionByIdUseCases: (params: GetRevisionByIdUseCasesParams) => {
|
|
7
9
|
getRevisionByIdUseCase: GetRevisionByIdNotDeleted;
|
|
@@ -7,7 +7,7 @@ exports.getRevisionByIdUseCases = void 0;
|
|
|
7
7
|
var _GetRevisionById = require("./GetRevisionById");
|
|
8
8
|
var _GetRevisionByIdNotDeleted = require("./GetRevisionByIdNotDeleted");
|
|
9
9
|
const getRevisionByIdUseCases = params => {
|
|
10
|
-
const getRevisionById = new _GetRevisionById.GetRevisionById(params.operation);
|
|
10
|
+
const getRevisionById = new _GetRevisionById.GetRevisionById(params.operation, params.transform);
|
|
11
11
|
const getRevisionByIdNotDeleted = new _GetRevisionByIdNotDeleted.GetRevisionByIdNotDeleted(getRevisionById);
|
|
12
12
|
return {
|
|
13
13
|
getRevisionByIdUseCase: getRevisionByIdNotDeleted
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"names":["_GetRevisionById","require","_GetRevisionByIdNotDeleted","getRevisionByIdUseCases","params","getRevisionById","GetRevisionById","operation","transform","getRevisionByIdNotDeleted","GetRevisionByIdNotDeleted","getRevisionByIdUseCase","exports"],"sources":["index.ts"],"sourcesContent":["import { GetRevisionById } from \"./GetRevisionById\";\nimport { GetRevisionByIdNotDeleted } from \"./GetRevisionByIdNotDeleted\";\nimport type { CmsEntryStorageOperations } from \"~/types\";\nimport type { ITransformEntryCallable } from \"~/utils/entryStorage.js\";\n\ninterface GetRevisionByIdUseCasesParams {\n operation: CmsEntryStorageOperations[\"getRevisionById\"];\n transform: ITransformEntryCallable;\n}\n\nexport const getRevisionByIdUseCases = (params: GetRevisionByIdUseCasesParams) => {\n const getRevisionById = new GetRevisionById(params.operation, params.transform);\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;AASO,MAAME,uBAAuB,GAAIC,MAAqC,IAAK;EAC9E,MAAMC,eAAe,GAAG,IAAIC,gCAAe,CAACF,MAAM,CAACG,SAAS,EAAEH,MAAM,CAACI,SAAS,CAAC;EAC/E,MAAMC,yBAAyB,GAAG,IAAIC,oDAAyB,CAACL,eAAe,CAAC;EAEhF,OAAO;IACHM,sBAAsB,EAAEF;EAC5B,CAAC;AACL,CAAC;AAACG,OAAA,CAAAT,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { IGetRevisionsByEntryId } from "../../abstractions";
|
|
2
|
-
import { CmsEntryStorageOperations, CmsEntryStorageOperationsGetRevisionParams, CmsModel } from "../../../../types";
|
|
1
|
+
import type { IGetRevisionsByEntryId } from "../../abstractions";
|
|
2
|
+
import type { CmsEntryStorageOperations, CmsEntryStorageOperationsGetRevisionParams, CmsModel } from "../../../../types";
|
|
3
|
+
import type { ITransformEntryCallable } from "../../../../utils/entryStorage.js";
|
|
3
4
|
export declare class GetRevisionsByEntryId implements IGetRevisionsByEntryId {
|
|
4
|
-
private operation;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
private readonly operation;
|
|
6
|
+
private readonly transform;
|
|
7
|
+
constructor(operation: CmsEntryStorageOperations["getRevisions"], transform: ITransformEntryCallable);
|
|
8
|
+
execute(model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams): Promise<import("../../../../types").CmsEntry<import("../../../../types").CmsEntryValues>[]>;
|
|
7
9
|
}
|
|
@@ -5,11 +5,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.GetRevisionsByEntryId = void 0;
|
|
7
7
|
class GetRevisionsByEntryId {
|
|
8
|
-
constructor(operation) {
|
|
8
|
+
constructor(operation, transform) {
|
|
9
9
|
this.operation = operation;
|
|
10
|
+
this.transform = transform;
|
|
10
11
|
}
|
|
11
12
|
async execute(model, params) {
|
|
12
|
-
|
|
13
|
+
const result = await this.operation(model, params);
|
|
14
|
+
return await Promise.all(result.map(async entry => {
|
|
15
|
+
return await this.transform(model, entry);
|
|
16
|
+
}));
|
|
13
17
|
}
|
|
14
18
|
}
|
|
15
19
|
exports.GetRevisionsByEntryId = GetRevisionsByEntryId;
|
|
@@ -1 +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
|
|
1
|
+
{"version":3,"names":["GetRevisionsByEntryId","constructor","operation","transform","execute","model","params","result","Promise","all","map","entry","exports"],"sources":["GetRevisionsByEntryId.ts"],"sourcesContent":["import type { IGetRevisionsByEntryId } from \"../../abstractions\";\nimport type {\n CmsEntryStorageOperations,\n CmsEntryStorageOperationsGetRevisionParams,\n CmsModel\n} from \"~/types\";\nimport type { ITransformEntryCallable } from \"~/utils/entryStorage.js\";\n\nexport class GetRevisionsByEntryId implements IGetRevisionsByEntryId {\n private readonly operation: CmsEntryStorageOperations[\"getRevisions\"];\n private readonly transform: ITransformEntryCallable;\n\n public constructor(\n operation: CmsEntryStorageOperations[\"getRevisions\"],\n transform: ITransformEntryCallable\n ) {\n this.operation = operation;\n this.transform = transform;\n }\n\n public async execute(model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams) {\n const result = await this.operation(model, params);\n\n return await Promise.all(\n result.map(async entry => {\n return await this.transform(model, entry);\n })\n );\n }\n}\n"],"mappings":";;;;;;AAQO,MAAMA,qBAAqB,CAAmC;EAI1DC,WAAWA,CACdC,SAAoD,EACpDC,SAAkC,EACpC;IACE,IAAI,CAACD,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACC,SAAS,GAAGA,SAAS;EAC9B;EAEA,MAAaC,OAAOA,CAACC,KAAe,EAAEC,MAAkD,EAAE;IACtF,MAAMC,MAAM,GAAG,MAAM,IAAI,CAACL,SAAS,CAACG,KAAK,EAAEC,MAAM,CAAC;IAElD,OAAO,MAAME,OAAO,CAACC,GAAG,CACpBF,MAAM,CAACG,GAAG,CAAC,MAAMC,KAAK,IAAI;MACtB,OAAO,MAAM,IAAI,CAACR,SAAS,CAACE,KAAK,EAAEM,KAAK,CAAC;IAC7C,CAAC,CACL,CAAC;EACL;AACJ;AAACC,OAAA,CAAAZ,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryIdNotDeleted.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IGetRevisionsByEntryId } from "../../abstractions";
|
|
2
|
-
import { CmsEntryStorageOperationsGetRevisionParams, CmsModel } from "../../../../types";
|
|
1
|
+
import type { IGetRevisionsByEntryId } from "../../abstractions";
|
|
2
|
+
import type { CmsEntryStorageOperationsGetRevisionParams, CmsModel } from "../../../../types";
|
|
3
3
|
export declare class GetRevisionsByEntryIdNotDeleted implements IGetRevisionsByEntryId {
|
|
4
4
|
private getRevisionsByEntryId;
|
|
5
5
|
constructor(getRevisionsByEntryId: IGetRevisionsByEntryId);
|
package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryIdNotDeleted.js.map
CHANGED
|
@@ -1 +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":[]}
|
|
1
|
+
{"version":3,"names":["GetRevisionsByEntryIdNotDeleted","constructor","getRevisionsByEntryId","execute","model","params","entries","filter","entry","wbyDeleted","exports"],"sources":["GetRevisionsByEntryIdNotDeleted.ts"],"sourcesContent":["import type { IGetRevisionsByEntryId } from \"../../abstractions\";\nimport type { 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":[]}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { GetRevisionsByEntryIdNotDeleted } from "./GetRevisionsByEntryIdNotDeleted";
|
|
2
|
-
import { CmsEntryStorageOperations } from "../../../../types";
|
|
3
|
-
import { AccessControl } from "../../../AccessControl/AccessControl";
|
|
2
|
+
import type { CmsEntryStorageOperations } from "../../../../types";
|
|
3
|
+
import type { AccessControl } from "../../../AccessControl/AccessControl";
|
|
4
|
+
import type { ITransformEntryCallable } from "../../../../utils/entryStorage.js";
|
|
4
5
|
interface GetRevisionsByEntryIdUseCasesParams {
|
|
5
6
|
operation: CmsEntryStorageOperations["getRevisions"];
|
|
6
7
|
accessControl: AccessControl;
|
|
8
|
+
transform: ITransformEntryCallable;
|
|
7
9
|
}
|
|
8
10
|
export declare const getRevisionsByEntryIdUseCases: (params: GetRevisionsByEntryIdUseCasesParams) => {
|
|
9
11
|
getRevisionsByEntryIdUseCase: GetRevisionsByEntryIdNotDeleted;
|
|
@@ -7,7 +7,7 @@ exports.getRevisionsByEntryIdUseCases = void 0;
|
|
|
7
7
|
var _GetRevisionsByEntryId = require("./GetRevisionsByEntryId");
|
|
8
8
|
var _GetRevisionsByEntryIdNotDeleted = require("./GetRevisionsByEntryIdNotDeleted");
|
|
9
9
|
const getRevisionsByEntryIdUseCases = params => {
|
|
10
|
-
const getRevisionsByEntryId = new _GetRevisionsByEntryId.GetRevisionsByEntryId(params.operation);
|
|
10
|
+
const getRevisionsByEntryId = new _GetRevisionsByEntryId.GetRevisionsByEntryId(params.operation, params.transform);
|
|
11
11
|
const getRevisionsByEntryIdNotDeleted = new _GetRevisionsByEntryIdNotDeleted.GetRevisionsByEntryIdNotDeleted(getRevisionsByEntryId);
|
|
12
12
|
return {
|
|
13
13
|
getRevisionsByEntryIdUseCase: getRevisionsByEntryIdNotDeleted
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"names":["_GetRevisionsByEntryId","require","_GetRevisionsByEntryIdNotDeleted","getRevisionsByEntryIdUseCases","params","getRevisionsByEntryId","GetRevisionsByEntryId","operation","transform","getRevisionsByEntryIdNotDeleted","GetRevisionsByEntryIdNotDeleted","getRevisionsByEntryIdUseCase","exports"],"sources":["index.ts"],"sourcesContent":["import { GetRevisionsByEntryId } from \"./GetRevisionsByEntryId\";\nimport { GetRevisionsByEntryIdNotDeleted } from \"./GetRevisionsByEntryIdNotDeleted\";\nimport type { CmsEntryStorageOperations } from \"~/types\";\nimport type { AccessControl } from \"~/crud/AccessControl/AccessControl\";\nimport type { ITransformEntryCallable } from \"~/utils/entryStorage.js\";\n\ninterface GetRevisionsByEntryIdUseCasesParams {\n operation: CmsEntryStorageOperations[\"getRevisions\"];\n accessControl: AccessControl;\n transform: ITransformEntryCallable;\n}\n\nexport const getRevisionsByEntryIdUseCases = (params: GetRevisionsByEntryIdUseCasesParams) => {\n const getRevisionsByEntryId = new GetRevisionsByEntryId(params.operation, params.transform);\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;AAWO,MAAME,6BAA6B,GAAIC,MAA2C,IAAK;EAC1F,MAAMC,qBAAqB,GAAG,IAAIC,4CAAqB,CAACF,MAAM,CAACG,SAAS,EAAEH,MAAM,CAACI,SAAS,CAAC;EAC3F,MAAMC,+BAA+B,GAAG,IAAIC,gEAA+B,CACvEL,qBACJ,CAAC;EAED,OAAO;IACHM,4BAA4B,EAAEF;EAClC,CAAC;AACL,CAAC;AAACG,OAAA,CAAAT,6BAAA,GAAAA,6BAAA","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IGetEntry, IListEntriesOperation } from "../../abstractions";
|
|
2
|
-
import { CmsEntryGetParams, CmsModel } from "../../../../types";
|
|
1
|
+
import type { IGetEntry, IListEntriesOperation } from "../../abstractions";
|
|
2
|
+
import type { CmsEntryGetParams, CmsModel } from "../../../../types";
|
|
3
3
|
export declare class GetEntry implements IGetEntry {
|
|
4
4
|
private listEntries;
|
|
5
5
|
constructor(listEntries: IListEntriesOperation);
|
|
@@ -1 +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,CAAC,kBAAkB,CAAC;IAC/C;IAEA,OAAOF,IAAI;EACf;AACJ;AAACG,OAAA,CAAAZ,QAAA,GAAAA,QAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_handlerGraphql","require","GetEntry","constructor","listEntries","execute","model","params","listParams","limit","items","item","shift","NotFoundError","exports"],"sources":["GetEntry.ts"],"sourcesContent":["import type { IGetEntry, IListEntriesOperation } from \"~/crud/contentEntry/abstractions\";\nimport type { 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,CAAC,kBAAkB,CAAC;IAC/C;IAEA,OAAOF,IAAI;EACf;AACJ;AAACG,OAAA,CAAAZ,QAAA,GAAAA,QAAA","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
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";
|
|
1
|
+
import type { AccessControl } from "../../../AccessControl/AccessControl";
|
|
2
|
+
import type { IGetEntry } from "../../abstractions";
|
|
3
|
+
import type { CmsEntryGetParams, CmsModel } from "../../../../types";
|
|
4
|
+
import type { SecurityIdentity } from "@webiny/api-security/types";
|
|
5
5
|
export declare class GetEntrySecure implements IGetEntry {
|
|
6
6
|
private accessControl;
|
|
7
7
|
private getIdentity;
|
|
@@ -1 +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":[]}
|
|
1
|
+
{"version":3,"names":["GetEntrySecure","constructor","accessControl","getIdentity","useCase","execute","model","params","ensureCanAccessEntry","where","canAccessOnlyOwnedEntries","createdBy","id","exports"],"sources":["GetEntrySecure.ts"],"sourcesContent":["import type { AccessControl } from \"~/crud/AccessControl/AccessControl\";\nimport type { IGetEntry } from \"../../abstractions\";\nimport type { CmsEntryGetParams, CmsModel } from \"~/types\";\nimport type { 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":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IListEntriesOperation, IListEntries } from "../../abstractions";
|
|
2
|
-
import { CmsEntry, CmsEntryListParams, CmsEntryMeta, CmsEntryValues, CmsModel } from "../../../../types";
|
|
1
|
+
import type { IListEntriesOperation, IListEntries } from "../../abstractions";
|
|
2
|
+
import type { CmsEntry, CmsEntryListParams, CmsEntryMeta, CmsEntryValues, CmsModel } from "../../../../types";
|
|
3
3
|
export declare class ListEntries implements IListEntries {
|
|
4
4
|
private listEntries;
|
|
5
5
|
constructor(listEntries: IListEntriesOperation);
|
|
@@ -1 +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":[]}
|
|
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 type { IListEntriesOperation, IListEntries } from \"~/crud/contentEntry/abstractions\";\nimport type { 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":[]}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
import { IListEntriesOperation } from "../../abstractions";
|
|
2
|
-
import { CmsEntryStorageOperations, CmsEntryStorageOperationsListParams, CmsModel } from "../../../../types";
|
|
1
|
+
import type { IListEntriesOperation } from "../../abstractions";
|
|
2
|
+
import type { CmsEntryStorageOperations, CmsEntryStorageOperationsListParams, CmsModel } from "../../../../types";
|
|
3
|
+
import type { ITransformEntryCallable } from "../../../../utils/entryStorage.js";
|
|
3
4
|
export declare class ListEntriesOperation implements IListEntriesOperation {
|
|
4
|
-
private operation;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
private readonly operation;
|
|
6
|
+
private readonly transform;
|
|
7
|
+
constructor(operation: CmsEntryStorageOperations["list"], transform: ITransformEntryCallable);
|
|
8
|
+
execute(model: CmsModel, params: CmsEntryStorageOperationsListParams): Promise<{
|
|
9
|
+
items: import("../../../../types").CmsEntry<import("../../../../types").CmsEntryValues>[];
|
|
10
|
+
hasMoreItems: boolean;
|
|
11
|
+
cursor: string | null;
|
|
12
|
+
totalCount: number;
|
|
13
|
+
}>;
|
|
7
14
|
}
|
|
@@ -5,11 +5,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.ListEntriesOperation = void 0;
|
|
7
7
|
class ListEntriesOperation {
|
|
8
|
-
constructor(operation) {
|
|
8
|
+
constructor(operation, transform) {
|
|
9
9
|
this.operation = operation;
|
|
10
|
+
this.transform = transform;
|
|
10
11
|
}
|
|
11
12
|
async execute(model, params) {
|
|
12
|
-
|
|
13
|
+
const result = await this.operation(model, params);
|
|
14
|
+
return {
|
|
15
|
+
...result,
|
|
16
|
+
items: await Promise.all(result.items.map(async entry => {
|
|
17
|
+
return this.transform(model, entry);
|
|
18
|
+
}))
|
|
19
|
+
};
|
|
13
20
|
}
|
|
14
21
|
}
|
|
15
22
|
exports.ListEntriesOperation = ListEntriesOperation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ListEntriesOperation","constructor","operation","execute","model","params","exports"],"sources":["ListEntriesOperation.ts"],"sourcesContent":["import { IListEntriesOperation } from \"../../abstractions\";\nimport {
|
|
1
|
+
{"version":3,"names":["ListEntriesOperation","constructor","operation","transform","execute","model","params","result","items","Promise","all","map","entry","exports"],"sources":["ListEntriesOperation.ts"],"sourcesContent":["import type { IListEntriesOperation } from \"../../abstractions\";\nimport type {\n CmsEntryStorageOperations,\n CmsEntryStorageOperationsListParams,\n CmsModel\n} from \"~/types\";\nimport type { ITransformEntryCallable } from \"~/utils/entryStorage.js\";\n\nexport class ListEntriesOperation implements IListEntriesOperation {\n private readonly operation: CmsEntryStorageOperations[\"list\"];\n private readonly transform: ITransformEntryCallable;\n\n public constructor(\n operation: CmsEntryStorageOperations[\"list\"],\n transform: ITransformEntryCallable\n ) {\n this.operation = operation;\n this.transform = transform;\n }\n\n public async execute(model: CmsModel, params: CmsEntryStorageOperationsListParams) {\n const result = await this.operation(model, params);\n return {\n ...result,\n items: await Promise.all(\n result.items.map(async entry => {\n return this.transform(model, entry);\n })\n )\n };\n }\n}\n"],"mappings":";;;;;;AAQO,MAAMA,oBAAoB,CAAkC;EAIxDC,WAAWA,CACdC,SAA4C,EAC5CC,SAAkC,EACpC;IACE,IAAI,CAACD,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACC,SAAS,GAAGA,SAAS;EAC9B;EAEA,MAAaC,OAAOA,CAACC,KAAe,EAAEC,MAA2C,EAAE;IAC/E,MAAMC,MAAM,GAAG,MAAM,IAAI,CAACL,SAAS,CAACG,KAAK,EAAEC,MAAM,CAAC;IAClD,OAAO;MACH,GAAGC,MAAM;MACTC,KAAK,EAAE,MAAMC,OAAO,CAACC,GAAG,CACpBH,MAAM,CAACC,KAAK,CAACG,GAAG,CAAC,MAAMC,KAAK,IAAI;QAC5B,OAAO,IAAI,CAACT,SAAS,CAACE,KAAK,EAAEO,KAAK,CAAC;MACvC,CAAC,CACL;IACJ,CAAC;EACL;AACJ;AAACC,OAAA,CAAAb,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IListEntriesOperation } from "../../abstractions";
|
|
2
|
-
import { CmsEntryStorageOperationsListParams, CmsModel } from "../../../../types";
|
|
1
|
+
import type { IListEntriesOperation } from "../../abstractions";
|
|
2
|
+
import type { CmsEntryStorageOperationsListParams, CmsModel } from "../../../../types";
|
|
3
3
|
export declare class ListEntriesOperationDeleted implements IListEntriesOperation {
|
|
4
4
|
private listEntries;
|
|
5
5
|
constructor(listEntries: IListEntriesOperation);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ListEntriesOperationDeleted","constructor","listEntries","execute","model","params","where","wbyDeleted","exports"],"sources":["ListEntriesOperationDeleted.ts"],"sourcesContent":["import { IListEntriesOperation } from \"../../abstractions\";\nimport { CmsEntryStorageOperationsListParams, CmsModel } from \"~/types\";\n\nexport class ListEntriesOperationDeleted implements IListEntriesOperation {\n private listEntries: IListEntriesOperation;\n\n constructor(listEntries: IListEntriesOperation) {\n this.listEntries = listEntries;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsListParams) {\n const where = { ...params.where, wbyDeleted: true };\n\n return await this.listEntries.execute(model, {\n ...params,\n where\n });\n }\n}\n"],"mappings":";;;;;;AAGO,MAAMA,2BAA2B,CAAkC;EAGtEC,WAAWA,CAACC,WAAkC,EAAE;IAC5C,IAAI,CAACA,WAAW,GAAGA,WAAW;EAClC;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAA2C,EAAE;IACxE,MAAMC,KAAK,GAAG;MAAE,GAAGD,MAAM,CAACC,KAAK;MAAEC,UAAU,EAAE;IAAK,CAAC;IAEnD,OAAO,MAAM,IAAI,CAACL,WAAW,CAACC,OAAO,CAACC,KAAK,EAAE;MACzC,GAAGC,MAAM;MACTC;IACJ,CAAC,CAAC;EACN;AACJ;AAACE,OAAA,CAAAR,2BAAA,GAAAA,2BAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["ListEntriesOperationDeleted","constructor","listEntries","execute","model","params","where","wbyDeleted","exports"],"sources":["ListEntriesOperationDeleted.ts"],"sourcesContent":["import type { IListEntriesOperation } from \"../../abstractions\";\nimport type { CmsEntryStorageOperationsListParams, CmsModel } from \"~/types\";\n\nexport class ListEntriesOperationDeleted implements IListEntriesOperation {\n private listEntries: IListEntriesOperation;\n\n constructor(listEntries: IListEntriesOperation) {\n this.listEntries = listEntries;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsListParams) {\n const where = { ...params.where, wbyDeleted: true };\n\n return await this.listEntries.execute(model, {\n ...params,\n where\n });\n }\n}\n"],"mappings":";;;;;;AAGO,MAAMA,2BAA2B,CAAkC;EAGtEC,WAAWA,CAACC,WAAkC,EAAE;IAC5C,IAAI,CAACA,WAAW,GAAGA,WAAW;EAClC;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAA2C,EAAE;IACxE,MAAMC,KAAK,GAAG;MAAE,GAAGD,MAAM,CAACC,KAAK;MAAEC,UAAU,EAAE;IAAK,CAAC;IAEnD,OAAO,MAAM,IAAI,CAACL,WAAW,CAACC,OAAO,CAACC,KAAK,EAAE;MACzC,GAAGC,MAAM;MACTC;IACJ,CAAC,CAAC;EACN;AACJ;AAACE,OAAA,CAAAR,2BAAA,GAAAA,2BAAA","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IListEntriesOperation } from "../../abstractions";
|
|
2
|
-
import { CmsEntryStorageOperationsListParams, CmsModel } from "../../../../types";
|
|
1
|
+
import type { IListEntriesOperation } from "../../abstractions";
|
|
2
|
+
import type { CmsEntryStorageOperationsListParams, CmsModel } from "../../../../types";
|
|
3
3
|
export declare class ListEntriesOperationLatest implements IListEntriesOperation {
|
|
4
4
|
private listEntries;
|
|
5
5
|
constructor(listEntries: IListEntriesOperation);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ListEntriesOperationLatest","constructor","listEntries","execute","model","params","where","latest","sort","exports"],"sources":["ListEntriesOperationLatest.ts"],"sourcesContent":["import { IListEntriesOperation } from \"../../abstractions\";\nimport { CmsEntryStorageOperationsListParams, CmsModel } from \"~/types\";\n\nexport class ListEntriesOperationLatest implements IListEntriesOperation {\n private listEntries: IListEntriesOperation;\n\n constructor(listEntries: IListEntriesOperation) {\n this.listEntries = listEntries;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsListParams) {\n const where = { ...params.where, latest: true };\n\n return await this.listEntries.execute(model, {\n sort: [\"createdOn_DESC\"],\n ...params,\n where\n });\n }\n}\n"],"mappings":";;;;;;AAGO,MAAMA,0BAA0B,CAAkC;EAGrEC,WAAWA,CAACC,WAAkC,EAAE;IAC5C,IAAI,CAACA,WAAW,GAAGA,WAAW;EAClC;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAA2C,EAAE;IACxE,MAAMC,KAAK,GAAG;MAAE,GAAGD,MAAM,CAACC,KAAK;MAAEC,MAAM,EAAE;IAAK,CAAC;IAE/C,OAAO,MAAM,IAAI,CAACL,WAAW,CAACC,OAAO,CAACC,KAAK,EAAE;MACzCI,IAAI,EAAE,CAAC,gBAAgB,CAAC;MACxB,GAAGH,MAAM;MACTC;IACJ,CAAC,CAAC;EACN;AACJ;AAACG,OAAA,CAAAT,0BAAA,GAAAA,0BAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["ListEntriesOperationLatest","constructor","listEntries","execute","model","params","where","latest","sort","exports"],"sources":["ListEntriesOperationLatest.ts"],"sourcesContent":["import type { IListEntriesOperation } from \"../../abstractions\";\nimport type { CmsEntryStorageOperationsListParams, CmsModel } from \"~/types\";\n\nexport class ListEntriesOperationLatest implements IListEntriesOperation {\n private listEntries: IListEntriesOperation;\n\n constructor(listEntries: IListEntriesOperation) {\n this.listEntries = listEntries;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsListParams) {\n const where = { ...params.where, latest: true };\n\n return await this.listEntries.execute(model, {\n sort: [\"createdOn_DESC\"],\n ...params,\n where\n });\n }\n}\n"],"mappings":";;;;;;AAGO,MAAMA,0BAA0B,CAAkC;EAGrEC,WAAWA,CAACC,WAAkC,EAAE;IAC5C,IAAI,CAACA,WAAW,GAAGA,WAAW;EAClC;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAA2C,EAAE;IACxE,MAAMC,KAAK,GAAG;MAAE,GAAGD,MAAM,CAACC,KAAK;MAAEC,MAAM,EAAE;IAAK,CAAC;IAE/C,OAAO,MAAM,IAAI,CAACL,WAAW,CAACC,OAAO,CAACC,KAAK,EAAE;MACzCI,IAAI,EAAE,CAAC,gBAAgB,CAAC;MACxB,GAAGH,MAAM;MACTC;IACJ,CAAC,CAAC;EACN;AACJ;AAACG,OAAA,CAAAT,0BAAA,GAAAA,0BAAA","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IListEntriesOperation } from "../../abstractions";
|
|
2
|
-
import { CmsEntryStorageOperationsListParams, CmsModel } from "../../../../types";
|
|
1
|
+
import type { IListEntriesOperation } from "../../abstractions";
|
|
2
|
+
import type { CmsEntryStorageOperationsListParams, CmsModel } from "../../../../types";
|
|
3
3
|
export declare class ListEntriesOperationNotDeleted implements IListEntriesOperation {
|
|
4
4
|
private listEntries;
|
|
5
5
|
constructor(listEntries: IListEntriesOperation);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ListEntriesOperationNotDeleted","constructor","listEntries","execute","model","params","where","wbyDeleted_not","exports"],"sources":["ListEntriesOperationNotDeleted.ts"],"sourcesContent":["import { IListEntriesOperation } from \"../../abstractions\";\nimport { CmsEntryStorageOperationsListParams, CmsModel } from \"~/types\";\n\nexport class ListEntriesOperationNotDeleted implements IListEntriesOperation {\n private listEntries: IListEntriesOperation;\n\n constructor(listEntries: IListEntriesOperation) {\n this.listEntries = listEntries;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsListParams) {\n const where = { ...params.where, wbyDeleted_not: true };\n\n return await this.listEntries.execute(model, {\n ...params,\n where\n });\n }\n}\n"],"mappings":";;;;;;AAGO,MAAMA,8BAA8B,CAAkC;EAGzEC,WAAWA,CAACC,WAAkC,EAAE;IAC5C,IAAI,CAACA,WAAW,GAAGA,WAAW;EAClC;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAA2C,EAAE;IACxE,MAAMC,KAAK,GAAG;MAAE,GAAGD,MAAM,CAACC,KAAK;MAAEC,cAAc,EAAE;IAAK,CAAC;IAEvD,OAAO,MAAM,IAAI,CAACL,WAAW,CAACC,OAAO,CAACC,KAAK,EAAE;MACzC,GAAGC,MAAM;MACTC;IACJ,CAAC,CAAC;EACN;AACJ;AAACE,OAAA,CAAAR,8BAAA,GAAAA,8BAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["ListEntriesOperationNotDeleted","constructor","listEntries","execute","model","params","where","wbyDeleted_not","exports"],"sources":["ListEntriesOperationNotDeleted.ts"],"sourcesContent":["import type { IListEntriesOperation } from \"../../abstractions\";\nimport type { CmsEntryStorageOperationsListParams, CmsModel } from \"~/types\";\n\nexport class ListEntriesOperationNotDeleted implements IListEntriesOperation {\n private listEntries: IListEntriesOperation;\n\n constructor(listEntries: IListEntriesOperation) {\n this.listEntries = listEntries;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsListParams) {\n const where = { ...params.where, wbyDeleted_not: true };\n\n return await this.listEntries.execute(model, {\n ...params,\n where\n });\n }\n}\n"],"mappings":";;;;;;AAGO,MAAMA,8BAA8B,CAAkC;EAGzEC,WAAWA,CAACC,WAAkC,EAAE;IAC5C,IAAI,CAACA,WAAW,GAAGA,WAAW;EAClC;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAA2C,EAAE;IACxE,MAAMC,KAAK,GAAG;MAAE,GAAGD,MAAM,CAACC,KAAK;MAAEC,cAAc,EAAE;IAAK,CAAC;IAEvD,OAAO,MAAM,IAAI,CAACL,WAAW,CAACC,OAAO,CAACC,KAAK,EAAE;MACzC,GAAGC,MAAM;MACTC;IACJ,CAAC,CAAC;EACN;AACJ;AAACE,OAAA,CAAAR,8BAAA,GAAAA,8BAAA","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IListEntriesOperation } from "../../abstractions";
|
|
2
|
-
import { CmsEntryStorageOperationsListParams, CmsModel } from "../../../../types";
|
|
1
|
+
import type { IListEntriesOperation } from "../../abstractions";
|
|
2
|
+
import type { CmsEntryStorageOperationsListParams, CmsModel } from "../../../../types";
|
|
3
3
|
export declare class ListEntriesOperationPublished implements IListEntriesOperation {
|
|
4
4
|
private listEntries;
|
|
5
5
|
constructor(listEntries: IListEntriesOperation);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ListEntriesOperationPublished","constructor","listEntries","execute","model","params","where","published","exports"],"sources":["ListEntriesOperationPublished.ts"],"sourcesContent":["import { IListEntriesOperation } from \"../../abstractions\";\nimport { CmsEntryStorageOperationsListParams, CmsModel } from \"~/types\";\n\nexport class ListEntriesOperationPublished implements IListEntriesOperation {\n private listEntries: IListEntriesOperation;\n\n constructor(listEntries: IListEntriesOperation) {\n this.listEntries = listEntries;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsListParams) {\n const where = { ...params.where, published: true };\n\n return await this.listEntries.execute(model, {\n ...params,\n where\n });\n }\n}\n"],"mappings":";;;;;;AAGO,MAAMA,6BAA6B,CAAkC;EAGxEC,WAAWA,CAACC,WAAkC,EAAE;IAC5C,IAAI,CAACA,WAAW,GAAGA,WAAW;EAClC;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAA2C,EAAE;IACxE,MAAMC,KAAK,GAAG;MAAE,GAAGD,MAAM,CAACC,KAAK;MAAEC,SAAS,EAAE;IAAK,CAAC;IAElD,OAAO,MAAM,IAAI,CAACL,WAAW,CAACC,OAAO,CAACC,KAAK,EAAE;MACzC,GAAGC,MAAM;MACTC;IACJ,CAAC,CAAC;EACN;AACJ;AAACE,OAAA,CAAAR,6BAAA,GAAAA,6BAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["ListEntriesOperationPublished","constructor","listEntries","execute","model","params","where","published","exports"],"sources":["ListEntriesOperationPublished.ts"],"sourcesContent":["import type { IListEntriesOperation } from \"../../abstractions\";\nimport type { CmsEntryStorageOperationsListParams, CmsModel } from \"~/types\";\n\nexport class ListEntriesOperationPublished implements IListEntriesOperation {\n private listEntries: IListEntriesOperation;\n\n constructor(listEntries: IListEntriesOperation) {\n this.listEntries = listEntries;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsListParams) {\n const where = { ...params.where, published: true };\n\n return await this.listEntries.execute(model, {\n ...params,\n where\n });\n }\n}\n"],"mappings":";;;;;;AAGO,MAAMA,6BAA6B,CAAkC;EAGxEC,WAAWA,CAACC,WAAkC,EAAE;IAC5C,IAAI,CAACA,WAAW,GAAGA,WAAW;EAClC;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAA2C,EAAE;IACxE,MAAMC,KAAK,GAAG;MAAE,GAAGD,MAAM,CAACC,KAAK;MAAEC,SAAS,EAAE;IAAK,CAAC;IAElD,OAAO,MAAM,IAAI,CAACL,WAAW,CAACC,OAAO,CAACC,KAAK,EAAE;MACzC,GAAGC,MAAM;MACTC;IACJ,CAAC,CAAC;EACN;AACJ;AAACE,OAAA,CAAAR,6BAAA,GAAAA,6BAAA","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IListEntriesOperation } from "../../abstractions";
|
|
2
|
-
import { CmsEntryStorageOperationsListParams, CmsModel } from "../../../../types";
|
|
3
|
-
import { ListEntriesUseCasesTopics } from "./index";
|
|
1
|
+
import type { IListEntriesOperation } from "../../abstractions";
|
|
2
|
+
import type { CmsEntryStorageOperationsListParams, CmsModel } from "../../../../types";
|
|
3
|
+
import type { ListEntriesUseCasesTopics } from "./index";
|
|
4
4
|
export declare class ListEntriesOperationWithEvents implements IListEntriesOperation {
|
|
5
5
|
private topics;
|
|
6
6
|
private listEntries;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ListEntriesOperationWithEvents","constructor","topics","listEntries","execute","model","params","onEntryBeforeList","publish","where","exports"],"sources":["ListEntriesOperationWithEvents.ts"],"sourcesContent":["import { IListEntriesOperation } from \"../../abstractions\";\nimport { CmsEntryStorageOperationsListParams, CmsModel } from \"~/types\";\nimport { ListEntriesUseCasesTopics } from \"./index\";\n\nexport class ListEntriesOperationWithEvents implements IListEntriesOperation {\n private topics: ListEntriesUseCasesTopics;\n private listEntries: IListEntriesOperation;\n\n constructor(topics: ListEntriesUseCasesTopics, listEntries: IListEntriesOperation) {\n this.topics = topics;\n this.listEntries = listEntries;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsListParams) {\n await this.topics.onEntryBeforeList.publish({\n model,\n where: params.where\n });\n\n return await this.listEntries.execute(model, params);\n }\n}\n"],"mappings":";;;;;;AAIO,MAAMA,8BAA8B,CAAkC;EAIzEC,WAAWA,CAACC,MAAiC,EAAEC,WAAkC,EAAE;IAC/E,IAAI,CAACD,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACC,WAAW,GAAGA,WAAW;EAClC;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAA2C,EAAE;IACxE,MAAM,IAAI,CAACJ,MAAM,CAACK,iBAAiB,CAACC,OAAO,CAAC;MACxCH,KAAK;MACLI,KAAK,EAAEH,MAAM,CAACG;IAClB,CAAC,CAAC;IAEF,OAAO,MAAM,IAAI,CAACN,WAAW,CAACC,OAAO,CAACC,KAAK,EAAEC,MAAM,CAAC;EACxD;AACJ;AAACI,OAAA,CAAAV,8BAAA,GAAAA,8BAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["ListEntriesOperationWithEvents","constructor","topics","listEntries","execute","model","params","onEntryBeforeList","publish","where","exports"],"sources":["ListEntriesOperationWithEvents.ts"],"sourcesContent":["import type { IListEntriesOperation } from \"../../abstractions\";\nimport type { CmsEntryStorageOperationsListParams, CmsModel } from \"~/types\";\nimport type { ListEntriesUseCasesTopics } from \"./index\";\n\nexport class ListEntriesOperationWithEvents implements IListEntriesOperation {\n private topics: ListEntriesUseCasesTopics;\n private listEntries: IListEntriesOperation;\n\n constructor(topics: ListEntriesUseCasesTopics, listEntries: IListEntriesOperation) {\n this.topics = topics;\n this.listEntries = listEntries;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsListParams) {\n await this.topics.onEntryBeforeList.publish({\n model,\n where: params.where\n });\n\n return await this.listEntries.execute(model, params);\n }\n}\n"],"mappings":";;;;;;AAIO,MAAMA,8BAA8B,CAAkC;EAIzEC,WAAWA,CAACC,MAAiC,EAAEC,WAAkC,EAAE;IAC/E,IAAI,CAACD,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACC,WAAW,GAAGA,WAAW;EAClC;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAA2C,EAAE;IACxE,MAAM,IAAI,CAACJ,MAAM,CAACK,iBAAiB,CAACC,OAAO,CAAC;MACxCH,KAAK;MACLI,KAAK,EAAEH,MAAM,CAACG;IAClB,CAAC,CAAC;IAEF,OAAO,MAAM,IAAI,CAACN,WAAW,CAACC,OAAO,CAACC,KAAK,EAAEC,MAAM,CAAC;EACxD;AACJ;AAACI,OAAA,CAAAV,8BAAA,GAAAA,8BAAA","ignoreList":[]}
|
package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSearchableFields.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IListEntriesOperation } from "../../abstractions";
|
|
2
|
-
import { CmsContext, CmsEntryStorageOperationsListParams, CmsModel } from "../../../../types";
|
|
1
|
+
import type { IListEntriesOperation } from "../../abstractions";
|
|
2
|
+
import type { CmsContext, CmsEntryStorageOperationsListParams, CmsModel } from "../../../../types";
|
|
3
3
|
export declare class ListEntriesOperationWithSearchableFields implements IListEntriesOperation {
|
|
4
4
|
private context;
|
|
5
5
|
private listEntries;
|
package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSearchableFields.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_searchableFields","require","ListEntriesOperationWithSearchableFields","constructor","context","listEntries","execute","model","params","fields","getSearchableFields","plugins","input","exports"],"sources":["ListEntriesOperationWithSearchableFields.ts"],"sourcesContent":["import { IListEntriesOperation } from \"../../abstractions\";\nimport { CmsContext, CmsEntryStorageOperationsListParams, CmsModel } from \"~/types\";\nimport { getSearchableFields } from \"~/crud/contentEntry/searchableFields\";\n\nexport class ListEntriesOperationWithSearchableFields implements IListEntriesOperation {\n private context: CmsContext;\n private listEntries: IListEntriesOperation;\n\n constructor(context: CmsContext, listEntries: IListEntriesOperation) {\n this.context = context;\n this.listEntries = listEntries;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsListParams) {\n const fields = getSearchableFields({\n fields: model.fields,\n plugins: this.context.plugins,\n input: params.fields || []\n });\n\n return await this.listEntries.execute(model, { ...params, fields });\n }\n}\n"],"mappings":";;;;;;AAEA,IAAAA,iBAAA,GAAAC,OAAA;AAEO,MAAMC,wCAAwC,CAAkC;EAInFC,WAAWA,CAACC,OAAmB,EAAEC,WAAkC,EAAE;IACjE,IAAI,CAACD,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACC,WAAW,GAAGA,WAAW;EAClC;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAA2C,EAAE;IACxE,MAAMC,MAAM,GAAG,IAAAC,qCAAmB,EAAC;MAC/BD,MAAM,EAAEF,KAAK,CAACE,MAAM;MACpBE,OAAO,EAAE,IAAI,CAACP,OAAO,CAACO,OAAO;MAC7BC,KAAK,EAAEJ,MAAM,CAACC,MAAM,IAAI;IAC5B,CAAC,CAAC;IAEF,OAAO,MAAM,IAAI,CAACJ,WAAW,CAACC,OAAO,CAACC,KAAK,EAAE;MAAE,GAAGC,MAAM;MAAEC;IAAO,CAAC,CAAC;EACvE;AACJ;AAACI,OAAA,CAAAX,wCAAA,GAAAA,wCAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_searchableFields","require","ListEntriesOperationWithSearchableFields","constructor","context","listEntries","execute","model","params","fields","getSearchableFields","plugins","input","exports"],"sources":["ListEntriesOperationWithSearchableFields.ts"],"sourcesContent":["import type { IListEntriesOperation } from \"../../abstractions\";\nimport type { CmsContext, CmsEntryStorageOperationsListParams, CmsModel } from \"~/types\";\nimport { getSearchableFields } from \"~/crud/contentEntry/searchableFields\";\n\nexport class ListEntriesOperationWithSearchableFields implements IListEntriesOperation {\n private context: CmsContext;\n private listEntries: IListEntriesOperation;\n\n constructor(context: CmsContext, listEntries: IListEntriesOperation) {\n this.context = context;\n this.listEntries = listEntries;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsListParams) {\n const fields = getSearchableFields({\n fields: model.fields,\n plugins: this.context.plugins,\n input: params.fields || []\n });\n\n return await this.listEntries.execute(model, { ...params, fields });\n }\n}\n"],"mappings":";;;;;;AAEA,IAAAA,iBAAA,GAAAC,OAAA;AAEO,MAAMC,wCAAwC,CAAkC;EAInFC,WAAWA,CAACC,OAAmB,EAAEC,WAAkC,EAAE;IACjE,IAAI,CAACD,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACC,WAAW,GAAGA,WAAW;EAClC;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAA2C,EAAE;IACxE,MAAMC,MAAM,GAAG,IAAAC,qCAAmB,EAAC;MAC/BD,MAAM,EAAEF,KAAK,CAACE,MAAM;MACpBE,OAAO,EAAE,IAAI,CAACP,OAAO,CAACO,OAAO;MAC7BC,KAAK,EAAEJ,MAAM,CAACC,MAAM,IAAI;IAC5B,CAAC,CAAC;IAEF,OAAO,MAAM,IAAI,CAACJ,WAAW,CAACC,OAAO,CAACC,KAAK,EAAE;MAAE,GAAGC,MAAM;MAAEC;IAAO,CAAC,CAAC;EACvE;AACJ;AAACI,OAAA,CAAAX,wCAAA,GAAAA,wCAAA","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IListEntriesOperation } from "../../abstractions";
|
|
2
|
-
import { CmsEntryStorageOperationsListParams, CmsModel } from "../../../../types";
|
|
1
|
+
import type { IListEntriesOperation } from "../../abstractions";
|
|
2
|
+
import type { CmsEntryStorageOperationsListParams, CmsModel } from "../../../../types";
|
|
3
3
|
export declare class ListEntriesOperationWithSort implements IListEntriesOperation {
|
|
4
4
|
private listEntries;
|
|
5
5
|
constructor(listEntries: IListEntriesOperation);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ListEntriesOperationWithSort","constructor","listEntries","execute","model","params","sort","createSort","Array","isArray","filter","Boolean","length","exports"],"sources":["ListEntriesOperationWithSort.ts"],"sourcesContent":["import { IListEntriesOperation } from \"../../abstractions\";\nimport { CmsEntryListSort, CmsEntryStorageOperationsListParams, CmsModel } from \"~/types\";\n\nexport class ListEntriesOperationWithSort implements IListEntriesOperation {\n private listEntries: IListEntriesOperation;\n\n constructor(listEntries: IListEntriesOperation) {\n this.listEntries = listEntries;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsListParams) {\n return await this.listEntries.execute(model, {\n ...params,\n sort: this.createSort(params.sort)\n });\n }\n\n private createSort(sort?: CmsEntryListSort): CmsEntryListSort {\n if (Array.isArray(sort) && sort.filter(Boolean).length > 0) {\n return sort;\n }\n\n return [\"revisionCreatedOn_DESC\"];\n }\n}\n"],"mappings":";;;;;;AAGO,MAAMA,4BAA4B,CAAkC;EAGvEC,WAAWA,CAACC,WAAkC,EAAE;IAC5C,IAAI,CAACA,WAAW,GAAGA,WAAW;EAClC;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAA2C,EAAE;IACxE,OAAO,MAAM,IAAI,CAACH,WAAW,CAACC,OAAO,CAACC,KAAK,EAAE;MACzC,GAAGC,MAAM;MACTC,IAAI,EAAE,IAAI,CAACC,UAAU,CAACF,MAAM,CAACC,IAAI;IACrC,CAAC,CAAC;EACN;EAEQC,UAAUA,CAACD,IAAuB,EAAoB;IAC1D,IAAIE,KAAK,CAACC,OAAO,CAACH,IAAI,CAAC,IAAIA,IAAI,CAACI,MAAM,CAACC,OAAO,CAAC,CAACC,MAAM,GAAG,CAAC,EAAE;MACxD,OAAON,IAAI;IACf;IAEA,OAAO,CAAC,wBAAwB,CAAC;EACrC;AACJ;AAACO,OAAA,CAAAb,4BAAA,GAAAA,4BAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["ListEntriesOperationWithSort","constructor","listEntries","execute","model","params","sort","createSort","Array","isArray","filter","Boolean","length","exports"],"sources":["ListEntriesOperationWithSort.ts"],"sourcesContent":["import type { IListEntriesOperation } from \"../../abstractions\";\nimport type { CmsEntryListSort, CmsEntryStorageOperationsListParams, CmsModel } from \"~/types\";\n\nexport class ListEntriesOperationWithSort implements IListEntriesOperation {\n private listEntries: IListEntriesOperation;\n\n constructor(listEntries: IListEntriesOperation) {\n this.listEntries = listEntries;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsListParams) {\n return await this.listEntries.execute(model, {\n ...params,\n sort: this.createSort(params.sort)\n });\n }\n\n private createSort(sort?: CmsEntryListSort): CmsEntryListSort {\n if (Array.isArray(sort) && sort.filter(Boolean).length > 0) {\n return sort;\n }\n\n return [\"revisionCreatedOn_DESC\"];\n }\n}\n"],"mappings":";;;;;;AAGO,MAAMA,4BAA4B,CAAkC;EAGvEC,WAAWA,CAACC,WAAkC,EAAE;IAC5C,IAAI,CAACA,WAAW,GAAGA,WAAW;EAClC;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAA2C,EAAE;IACxE,OAAO,MAAM,IAAI,CAACH,WAAW,CAACC,OAAO,CAACC,KAAK,EAAE;MACzC,GAAGC,MAAM;MACTC,IAAI,EAAE,IAAI,CAACC,UAAU,CAACF,MAAM,CAACC,IAAI;IACrC,CAAC,CAAC;EACN;EAEQC,UAAUA,CAACD,IAAuB,EAAoB;IAC1D,IAAIE,KAAK,CAACC,OAAO,CAACH,IAAI,CAAC,IAAIA,IAAI,CAACI,MAAM,CAACC,OAAO,CAAC,CAACC,MAAM,GAAG,CAAC,EAAE;MACxD,OAAON,IAAI;IACf;IAEA,OAAO,CAAC,wBAAwB,CAAC;EACrC;AACJ;AAACO,OAAA,CAAAb,4BAAA,GAAAA,4BAAA","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IListEntriesOperation } from "../../abstractions";
|
|
2
|
-
import { CmsEntryStorageOperationsListParams, CmsModel } from "../../../../types";
|
|
1
|
+
import type { IListEntriesOperation } from "../../abstractions";
|
|
2
|
+
import type { CmsEntryStorageOperationsListParams, CmsModel } from "../../../../types";
|
|
3
3
|
export declare class ListEntriesOperationWithStatusCheck implements IListEntriesOperation {
|
|
4
4
|
private listEntries;
|
|
5
5
|
constructor(listEntries: IListEntriesOperation);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_error","_interopRequireDefault","require","ListEntriesOperationWithStatusCheck","constructor","listEntries","execute","model","params","where","latest","published","WebinyError","exports"],"sources":["ListEntriesOperationWithStatusCheck.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { IListEntriesOperation } from \"../../abstractions\";\nimport { CmsEntryStorageOperationsListParams, CmsModel } from \"~/types\";\n\nexport class ListEntriesOperationWithStatusCheck implements IListEntriesOperation {\n private listEntries: IListEntriesOperation;\n\n constructor(listEntries: IListEntriesOperation) {\n this.listEntries = listEntries;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsListParams) {\n const { where } = params;\n\n /**\n * Where must contain either latest or published keys.\n * We cannot list entries without one of those\n */\n if (where.latest && where.published) {\n throw new WebinyError(\n \"Cannot list entries that are both published and latest.\",\n \"LIST_ENTRIES_ERROR\",\n {\n where\n }\n );\n } else if (!where.latest && !where.published) {\n throw new WebinyError(\n \"Cannot list entries if we do not have latest or published defined.\",\n \"LIST_ENTRIES_ERROR\",\n {\n where\n }\n );\n }\n\n return await this.listEntries.execute(model, params);\n }\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIO,MAAMC,mCAAmC,CAAkC;EAG9EC,WAAWA,CAACC,WAAkC,EAAE;IAC5C,IAAI,CAACA,WAAW,GAAGA,WAAW;EAClC;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAA2C,EAAE;IACxE,MAAM;MAAEC;IAAM,CAAC,GAAGD,MAAM;;IAExB;AACR;AACA;AACA;IACQ,IAAIC,KAAK,CAACC,MAAM,IAAID,KAAK,CAACE,SAAS,EAAE;MACjC,MAAM,IAAIC,cAAW,CACjB,yDAAyD,EACzD,oBAAoB,EACpB;QACIH;MACJ,CACJ,CAAC;IACL,CAAC,MAAM,IAAI,CAACA,KAAK,CAACC,MAAM,IAAI,CAACD,KAAK,CAACE,SAAS,EAAE;MAC1C,MAAM,IAAIC,cAAW,CACjB,oEAAoE,EACpE,oBAAoB,EACpB;QACIH;MACJ,CACJ,CAAC;IACL;IAEA,OAAO,MAAM,IAAI,CAACJ,WAAW,CAACC,OAAO,CAACC,KAAK,EAAEC,MAAM,CAAC;EACxD;AACJ;AAACK,OAAA,CAAAV,mCAAA,GAAAA,mCAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_error","_interopRequireDefault","require","ListEntriesOperationWithStatusCheck","constructor","listEntries","execute","model","params","where","latest","published","WebinyError","exports"],"sources":["ListEntriesOperationWithStatusCheck.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport type { IListEntriesOperation } from \"../../abstractions\";\nimport type { CmsEntryStorageOperationsListParams, CmsModel } from \"~/types\";\n\nexport class ListEntriesOperationWithStatusCheck implements IListEntriesOperation {\n private listEntries: IListEntriesOperation;\n\n constructor(listEntries: IListEntriesOperation) {\n this.listEntries = listEntries;\n }\n\n async execute(model: CmsModel, params: CmsEntryStorageOperationsListParams) {\n const { where } = params;\n\n /**\n * Where must contain either latest or published keys.\n * We cannot list entries without one of those\n */\n if (where.latest && where.published) {\n throw new WebinyError(\n \"Cannot list entries that are both published and latest.\",\n \"LIST_ENTRIES_ERROR\",\n {\n where\n }\n );\n } else if (!where.latest && !where.published) {\n throw new WebinyError(\n \"Cannot list entries if we do not have latest or published defined.\",\n \"LIST_ENTRIES_ERROR\",\n {\n where\n }\n );\n }\n\n return await this.listEntries.execute(model, params);\n }\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIO,MAAMC,mCAAmC,CAAkC;EAG9EC,WAAWA,CAACC,WAAkC,EAAE;IAC5C,IAAI,CAACA,WAAW,GAAGA,WAAW;EAClC;EAEA,MAAMC,OAAOA,CAACC,KAAe,EAAEC,MAA2C,EAAE;IACxE,MAAM;MAAEC;IAAM,CAAC,GAAGD,MAAM;;IAExB;AACR;AACA;AACA;IACQ,IAAIC,KAAK,CAACC,MAAM,IAAID,KAAK,CAACE,SAAS,EAAE;MACjC,MAAM,IAAIC,cAAW,CACjB,yDAAyD,EACzD,oBAAoB,EACpB;QACIH;MACJ,CACJ,CAAC;IACL,CAAC,MAAM,IAAI,CAACA,KAAK,CAACC,MAAM,IAAI,CAACD,KAAK,CAACE,SAAS,EAAE;MAC1C,MAAM,IAAIC,cAAW,CACjB,oEAAoE,EACpE,oBAAoB,EACpB;QACIH;MACJ,CACJ,CAAC;IACL;IAEA,OAAO,MAAM,IAAI,CAACJ,WAAW,CAACC,OAAO,CAACC,KAAK,EAAEC,MAAM,CAAC;EACxD;AACJ;AAACK,OAAA,CAAAV,mCAAA,GAAAA,mCAAA","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AccessControl } from "../../../AccessControl/AccessControl";
|
|
2
|
-
import { IListEntries } from "../../abstractions";
|
|
3
|
-
import { CmsEntry, CmsEntryListParams, CmsEntryMeta, CmsEntryValues, CmsModel } from "../../../../types";
|
|
4
|
-
import { SecurityIdentity } from "@webiny/api-security/types";
|
|
1
|
+
import type { AccessControl } from "../../../AccessControl/AccessControl";
|
|
2
|
+
import type { IListEntries } from "../../abstractions";
|
|
3
|
+
import type { CmsEntry, CmsEntryListParams, CmsEntryMeta, CmsEntryValues, CmsModel } from "../../../../types";
|
|
4
|
+
import type { SecurityIdentity } from "@webiny/api-security/types";
|
|
5
5
|
export declare class ListEntriesSecure implements IListEntries {
|
|
6
6
|
private accessControl;
|
|
7
7
|
private getIdentity;
|