@webiny/api-headless-cms 5.40.0-beta.2 → 5.40.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/constants.d.ts +11 -1
- package/constants.js +15 -9
- package/constants.js.map +1 -1
- package/context.js +47 -31
- package/context.js.map +1 -1
- package/crud/AccessControl/AccessControl.d.ts +3 -3
- package/crud/AccessControl/AccessControl.js.map +1 -1
- package/crud/contentEntry/abstractions/IDeleteEntry.d.ts +4 -0
- package/crud/contentEntry/abstractions/IDeleteEntry.js +7 -0
- package/crud/contentEntry/abstractions/IDeleteEntry.js.map +1 -0
- package/crud/contentEntry/abstractions/IDeleteEntryOperation.d.ts +4 -0
- package/crud/contentEntry/abstractions/IDeleteEntryOperation.js +7 -0
- package/crud/contentEntry/abstractions/IDeleteEntryOperation.js.map +1 -0
- package/crud/contentEntry/abstractions/IGetEntriesByIds.d.ts +4 -0
- package/crud/contentEntry/abstractions/IGetEntriesByIds.js +7 -0
- package/crud/contentEntry/abstractions/IGetEntriesByIds.js.map +1 -0
- package/crud/contentEntry/abstractions/IGetEntry.d.ts +4 -0
- package/crud/contentEntry/abstractions/IGetEntry.js +7 -0
- package/crud/contentEntry/abstractions/IGetEntry.js.map +1 -0
- package/crud/contentEntry/abstractions/IGetLatestEntriesByIds.d.ts +4 -0
- package/crud/contentEntry/abstractions/IGetLatestEntriesByIds.js +7 -0
- package/crud/contentEntry/abstractions/IGetLatestEntriesByIds.js.map +1 -0
- package/crud/contentEntry/abstractions/IGetLatestRevisionByEntryId.d.ts +4 -0
- package/crud/contentEntry/abstractions/IGetLatestRevisionByEntryId.js +7 -0
- package/crud/contentEntry/abstractions/IGetLatestRevisionByEntryId.js.map +1 -0
- package/crud/contentEntry/abstractions/IGetPreviousRevisionByEntryId.d.ts +4 -0
- package/crud/contentEntry/abstractions/IGetPreviousRevisionByEntryId.js +7 -0
- package/crud/contentEntry/abstractions/IGetPreviousRevisionByEntryId.js.map +1 -0
- package/crud/contentEntry/abstractions/IGetPublishedEntriesByIds.d.ts +4 -0
- package/crud/contentEntry/abstractions/IGetPublishedEntriesByIds.js +7 -0
- package/crud/contentEntry/abstractions/IGetPublishedEntriesByIds.js.map +1 -0
- package/crud/contentEntry/abstractions/IGetPublishedRevisionByEntryId.d.ts +4 -0
- package/crud/contentEntry/abstractions/IGetPublishedRevisionByEntryId.js +7 -0
- package/crud/contentEntry/abstractions/IGetPublishedRevisionByEntryId.js.map +1 -0
- package/crud/contentEntry/abstractions/IGetRevisionById.d.ts +4 -0
- package/crud/contentEntry/abstractions/IGetRevisionById.js +7 -0
- package/crud/contentEntry/abstractions/IGetRevisionById.js.map +1 -0
- package/crud/contentEntry/abstractions/IGetRevisionsByEntryId.d.ts +4 -0
- package/crud/contentEntry/abstractions/IGetRevisionsByEntryId.js +7 -0
- package/crud/contentEntry/abstractions/IGetRevisionsByEntryId.js.map +1 -0
- package/crud/contentEntry/abstractions/IListEntries.d.ts +4 -0
- package/crud/contentEntry/abstractions/IListEntries.js +7 -0
- package/crud/contentEntry/abstractions/IListEntries.js.map +1 -0
- package/crud/contentEntry/abstractions/IListEntriesOperation.d.ts +4 -0
- package/crud/contentEntry/abstractions/IListEntriesOperation.js +7 -0
- package/crud/contentEntry/abstractions/IListEntriesOperation.js.map +1 -0
- package/crud/contentEntry/abstractions/IMoveEntryToBinOperation.d.ts +4 -0
- package/crud/contentEntry/abstractions/IMoveEntryToBinOperation.js +7 -0
- package/crud/contentEntry/abstractions/IMoveEntryToBinOperation.js.map +1 -0
- package/crud/contentEntry/abstractions/IRestoreEntryFromBin.d.ts +4 -0
- package/crud/contentEntry/abstractions/IRestoreEntryFromBin.js +7 -0
- package/crud/contentEntry/abstractions/IRestoreEntryFromBin.js.map +1 -0
- package/crud/contentEntry/abstractions/IRestoreEntryFromBinOperation.d.ts +4 -0
- package/crud/contentEntry/abstractions/IRestoreEntryFromBinOperation.js +7 -0
- package/crud/contentEntry/abstractions/IRestoreEntryFromBinOperation.js.map +1 -0
- package/crud/contentEntry/abstractions/index.d.ts +16 -0
- package/crud/contentEntry/abstractions/index.js +183 -0
- package/crud/contentEntry/abstractions/index.js.map +1 -0
- package/crud/contentEntry/afterDelete.js.map +1 -1
- package/crud/contentEntry/beforeCreate.js.map +1 -1
- package/crud/contentEntry/beforeUpdate.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createEntryData.js +9 -1
- package/crud/contentEntry/entryDataFactories/createEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createEntryRevisionFromData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createPublishEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createRepublishEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createUpdateEntryData.js +8 -0
- package/crud/contentEntry/entryDataFactories/createUpdateEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/index.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/mapAndCleanUpdatedInputData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/statuses.js +3 -6
- package/crud/contentEntry/entryDataFactories/statuses.js.map +1 -1
- package/crud/contentEntry/entryDataValidation.js.map +1 -1
- package/crud/contentEntry/markLockedFields.js.map +1 -1
- package/crud/contentEntry/referenceFieldsMapping.js +1 -1
- package/crud/contentEntry/referenceFieldsMapping.js.map +1 -1
- package/crud/contentEntry/searchableFields.js.map +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntry.d.ts +10 -0
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntry.js +58 -0
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntry.js.map +1 -0
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperation.d.ts +7 -0
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperation.js +17 -0
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperation.js.map +1 -0
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperationWithEvents.d.ts +9 -0
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperationWithEvents.js +45 -0
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperationWithEvents.js.map +1 -0
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntrySecure.d.ts +9 -0
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntrySecure.js +22 -0
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntrySecure.js.map +1 -0
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBin.d.ts +10 -0
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBin.js +33 -0
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBin.js.map +1 -0
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperation.d.ts +7 -0
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperation.js +17 -0
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperation.js.map +1 -0
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperationWithEvents.d.ts +9 -0
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperationWithEvents.js +45 -0
- package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperationWithEvents.js.map +1 -0
- package/crud/contentEntry/useCases/DeleteEntry/TransformEntryDelete.d.ts +6 -0
- package/crud/contentEntry/useCases/DeleteEntry/TransformEntryDelete.js +21 -0
- package/crud/contentEntry/useCases/DeleteEntry/TransformEntryDelete.js.map +1 -0
- package/crud/contentEntry/useCases/DeleteEntry/TransformEntryMoveToBin.d.ts +9 -0
- package/crud/contentEntry/useCases/DeleteEntry/TransformEntryMoveToBin.js +62 -0
- package/crud/contentEntry/useCases/DeleteEntry/TransformEntryMoveToBin.js.map +1 -0
- package/crud/contentEntry/useCases/DeleteEntry/index.d.ts +28 -0
- package/crud/contentEntry/useCases/DeleteEntry/index.js +42 -0
- package/crud/contentEntry/useCases/DeleteEntry/index.js.map +1 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIds.d.ts +7 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIds.js +17 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIds.js.map +1 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsNotDeleted.d.ts +7 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsNotDeleted.js +18 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsNotDeleted.js.map +1 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsSecure.d.ts +9 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsSecure.js +28 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsSecure.js.map +1 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/index.d.ts +11 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/index.js +20 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/index.js.map +1 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIds.d.ts +7 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIds.js +17 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIds.js.map +1 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsNotDeleted.d.ts +7 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsNotDeleted.js +18 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsNotDeleted.js.map +1 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsSecure.d.ts +9 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsSecure.js +28 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsSecure.js.map +1 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/index.d.ts +11 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/index.js +20 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/index.js.map +1 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryId.d.ts +7 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryId.js +17 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryId.js.map +1 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdDeleted.d.ts +7 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdDeleted.js +21 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdDeleted.js.map +1 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdNotDeleted.d.ts +7 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdNotDeleted.js +21 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdNotDeleted.js.map +1 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/index.d.ts +13 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/index.js +22 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/index.js.map +1 -0
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryId.d.ts +7 -0
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryId.js +17 -0
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryId.js.map +1 -0
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdNotDeleted.d.ts +7 -0
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdNotDeleted.js +21 -0
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdNotDeleted.js.map +1 -0
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/index.d.ts +9 -0
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/index.js +18 -0
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/index.js.map +1 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIds.d.ts +7 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIds.js +17 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIds.js.map +1 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsNotDeleted.d.ts +7 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsNotDeleted.js +18 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsNotDeleted.js.map +1 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsSecure.d.ts +9 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsSecure.js +28 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsSecure.js.map +1 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/index.d.ts +11 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/index.js +20 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/index.js.map +1 -0
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.d.ts +7 -0
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.js +17 -0
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.js.map +1 -0
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdNotDeleted.d.ts +7 -0
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdNotDeleted.js +21 -0
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdNotDeleted.js.map +1 -0
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/index.d.ts +9 -0
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/index.js +18 -0
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/index.js.map +1 -0
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionById.d.ts +7 -0
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionById.js +17 -0
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionById.js.map +1 -0
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionByIdNotDeleted.d.ts +7 -0
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionByIdNotDeleted.js +21 -0
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionByIdNotDeleted.js.map +1 -0
- package/crud/contentEntry/useCases/GetRevisionById/index.d.ts +9 -0
- package/crud/contentEntry/useCases/GetRevisionById/index.js +18 -0
- package/crud/contentEntry/useCases/GetRevisionById/index.js.map +1 -0
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryId.d.ts +7 -0
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryId.js +17 -0
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryId.js.map +1 -0
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryIdNotDeleted.d.ts +7 -0
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryIdNotDeleted.js +18 -0
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryIdNotDeleted.js.map +1 -0
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/index.d.ts +11 -0
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/index.js +18 -0
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/index.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/GetEntry.d.ts +7 -0
- package/crud/contentEntry/useCases/ListEntries/GetEntry.js +29 -0
- package/crud/contentEntry/useCases/ListEntries/GetEntry.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/GetEntrySecure.d.ts +11 -0
- package/crud/contentEntry/useCases/ListEntries/GetEntrySecure.js +38 -0
- package/crud/contentEntry/useCases/ListEntries/GetEntrySecure.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntries.d.ts +7 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntries.js +62 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntries.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperation.d.ts +7 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperation.js +17 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperation.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationDeleted.d.ts +7 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationDeleted.js +24 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationDeleted.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationLatest.d.ts +7 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationLatest.js +25 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationLatest.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationNotDeleted.d.ts +7 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationNotDeleted.js +24 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationNotDeleted.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationPublished.d.ts +7 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationPublished.js +24 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationPublished.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithEvents.d.ts +9 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithEvents.js +22 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithEvents.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSearchableFields.d.ts +8 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSearchableFields.js +27 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSearchableFields.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSort.d.ts +8 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSort.js +26 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSort.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithStatusCheck.d.ts +7 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithStatusCheck.js +36 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithStatusCheck.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesSecure.d.ts +11 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesSecure.js +41 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesSecure.js.map +1 -0
- package/crud/contentEntry/useCases/ListEntries/index.d.ts +24 -0
- package/crud/contentEntry/useCases/ListEntries/index.js +61 -0
- package/crud/contentEntry/useCases/ListEntries/index.js.map +1 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBin.d.ts +10 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBin.js +37 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBin.js.map +1 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperation.d.ts +7 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperation.js +17 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperation.js.map +1 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperationWithEvents.d.ts +9 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperationWithEvents.js +42 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperationWithEvents.js.map +1 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinSecure.d.ts +9 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinSecure.js +22 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinSecure.js.map +1 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/TransformEntryRestoreFromBin.d.ts +9 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/TransformEntryRestoreFromBin.js +61 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/TransformEntryRestoreFromBin.js.map +1 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/index.d.ts +23 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/index.js +24 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/index.js.map +1 -0
- package/crud/contentEntry/useCases/index.d.ts +11 -0
- package/crud/contentEntry/useCases/index.js +128 -0
- package/crud/contentEntry/useCases/index.js.map +1 -0
- package/crud/contentEntry.crud.js +210 -269
- package/crud/contentEntry.crud.js.map +1 -1
- package/crud/contentModel/beforeCreate.js.map +1 -1
- package/crud/contentModel/beforeDelete.js.map +1 -1
- package/crud/contentModel/beforeUpdate.js.map +1 -1
- package/crud/contentModel/compatibility/modelApiName.js.map +1 -1
- package/crud/contentModel/contentModelManagerFactory.d.ts +1 -1
- package/crud/contentModel/contentModelManagerFactory.js.map +1 -1
- package/crud/contentModel/createFieldStorageId.js.map +1 -1
- package/crud/contentModel/defaultFields.js.map +1 -1
- package/crud/contentModel/ensureTypeTag.js.map +1 -1
- package/crud/contentModel/fields/descriptionField.js.map +1 -1
- package/crud/contentModel/fields/imageField.js.map +1 -1
- package/crud/contentModel/fields/titleField.js.map +1 -1
- package/crud/contentModel/listModelsFromDatabase.js.map +1 -1
- package/crud/contentModel/validate/endingAllowed.js.map +1 -1
- package/crud/contentModel/validate/isModelEndingAllowed.js +1 -2
- package/crud/contentModel/validate/isModelEndingAllowed.js.map +1 -1
- package/crud/contentModel/validate/modelId.js.map +1 -1
- package/crud/contentModel/validate/pluralApiName.js.map +1 -1
- package/crud/contentModel/validate/singularApiName.js.map +1 -1
- package/crud/contentModel/validateModel.js.map +1 -1
- package/crud/contentModel/validateModelFields.d.ts +1 -1
- package/crud/contentModel/validateModelFields.js.map +1 -1
- package/crud/contentModel/validateStorageId.d.ts +1 -0
- package/crud/contentModel/validateStorageId.js +29 -0
- package/crud/contentModel/validateStorageId.js.map +1 -0
- package/crud/contentModel/validation.d.ts +51 -30
- package/crud/contentModel/validation.js +3 -2
- package/crud/contentModel/validation.js.map +1 -1
- package/crud/contentModel.crud.js +6 -0
- package/crud/contentModel.crud.js.map +1 -1
- package/crud/contentModelGroup/beforeCreate.js.map +1 -1
- package/crud/contentModelGroup/beforeDelete.js.map +1 -1
- package/crud/contentModelGroup/beforeUpdate.js.map +1 -1
- package/crud/contentModelGroup/listGroupsFromDatabase.js.map +1 -1
- package/crud/contentModelGroup/validation.js.map +1 -1
- package/crud/contentModelGroup.crud.js.map +1 -1
- package/crud/system.crud.js.map +1 -1
- package/export/crud/exporting.js.map +1 -1
- package/export/crud/importing.js.map +1 -1
- package/export/crud/imports/importData.js.map +1 -1
- package/export/crud/imports/importGroups.js.map +1 -1
- package/export/crud/imports/importModels.js.map +1 -1
- package/export/crud/imports/validateGroups.js.map +1 -1
- package/export/crud/imports/validateInput.js.map +1 -1
- package/export/crud/imports/validateModels.js.map +1 -1
- package/export/crud/index.js.map +1 -1
- package/export/crud/sanitize.js.map +1 -1
- package/export/graphql/index.js +1 -1
- package/export/graphql/index.js.map +1 -1
- package/export/index.js.map +1 -1
- package/export/types.js +1 -2
- package/export/types.js.map +1 -1
- package/fieldConverters/CmsModelDefaultFieldConverterPlugin.js.map +1 -1
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js +4 -14
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js.map +1 -1
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.js.map +1 -1
- package/fieldConverters/index.js.map +1 -1
- package/graphql/buildSchemaPlugins.d.ts +2 -2
- package/graphql/buildSchemaPlugins.js.map +1 -1
- package/graphql/checkEndpointAccess.js.map +1 -1
- package/graphql/createExecutableSchema.d.ts +2 -2
- package/graphql/createExecutableSchema.js.map +1 -1
- package/graphql/createRequestBody.js.map +1 -1
- package/graphql/formatErrorPayload.js.map +1 -1
- package/graphql/generateSchema.js.map +1 -1
- package/graphql/getSchema.js.map +1 -1
- package/graphql/graphQLHandlerFactory.js.map +1 -1
- package/graphql/handleRequest.js.map +1 -1
- package/graphql/index.js.map +1 -1
- package/graphql/schema/baseContentSchema.d.ts +2 -2
- package/graphql/schema/baseContentSchema.js +1 -7
- package/graphql/schema/baseContentSchema.js.map +1 -1
- package/graphql/schema/baseSchema.js +12 -5
- package/graphql/schema/baseSchema.js.map +1 -1
- package/graphql/schema/contentEntries.d.ts +2 -2
- package/graphql/schema/contentEntries.js +2 -2
- package/graphql/schema/contentEntries.js.map +1 -1
- package/graphql/schema/contentModelGroups.d.ts +2 -2
- package/graphql/schema/contentModelGroups.js +1 -1
- package/graphql/schema/contentModelGroups.js.map +1 -1
- package/graphql/schema/contentModels.d.ts +2 -2
- package/graphql/schema/contentModels.js +3 -1
- package/graphql/schema/contentModels.js.map +1 -1
- package/graphql/schema/createFieldResolvers.js.map +1 -1
- package/graphql/schema/createFieldTypePluginRecords.js.map +1 -1
- package/graphql/schema/createManageResolvers.js +8 -0
- package/graphql/schema/createManageResolvers.js.map +1 -1
- package/graphql/schema/createManageSDL.js +10 -0
- package/graphql/schema/createManageSDL.js.map +1 -1
- package/graphql/schema/createPreviewResolvers.js.map +1 -1
- package/graphql/schema/createReadResolvers.js.map +1 -1
- package/graphql/schema/createReadSDL.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveCreate.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveCreateFrom.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveDelete.js +2 -1
- package/graphql/schema/resolvers/manage/resolveDelete.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveDeleteMultiple.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGetByIds.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGetRevisions.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGetUniqueFieldValues.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveList.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveListDeleted.d.ts +4 -0
- package/graphql/schema/resolvers/manage/resolveListDeleted.js +20 -0
- package/graphql/schema/resolvers/manage/resolveListDeleted.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveMove.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolvePublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveRepublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveRestoreFromBin.d.ts +7 -0
- package/graphql/schema/resolvers/manage/resolveRestoreFromBin.js +20 -0
- package/graphql/schema/resolvers/manage/resolveRestoreFromBin.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveUnpublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveUpdate.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveValidate.js.map +1 -1
- package/graphql/schema/resolvers/preview/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/preview/resolveList.js.map +1 -1
- package/graphql/schema/resolvers/read/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/read/resolveList.js.map +1 -1
- package/graphql/schema/schemaPlugins.d.ts +2 -2
- package/graphql/schema/schemaPlugins.js +2 -2
- package/graphql/schema/schemaPlugins.js.map +1 -1
- package/graphql/system.js.map +1 -1
- package/graphqlFields/boolean.js.map +1 -1
- package/graphqlFields/datetime.js.map +1 -1
- package/graphqlFields/dynamicZone/dynamicZoneField.js +27 -1
- package/graphqlFields/dynamicZone/dynamicZoneField.js.map +1 -1
- package/graphqlFields/dynamicZone/dynamicZoneStorage.js.map +1 -1
- package/graphqlFields/dynamicZone/index.js.map +1 -1
- package/graphqlFields/file.js.map +1 -1
- package/graphqlFields/helpers.js.map +1 -1
- package/graphqlFields/index.js.map +1 -1
- package/graphqlFields/json.js.map +1 -1
- package/graphqlFields/longText.js.map +1 -1
- package/graphqlFields/number.js.map +1 -1
- package/graphqlFields/object.d.ts +2 -2
- package/graphqlFields/object.js +14 -0
- package/graphqlFields/object.js.map +1 -1
- package/graphqlFields/ref.js.map +1 -1
- package/graphqlFields/richText/RichTextPluginsProcessor.js.map +1 -1
- package/graphqlFields/richText/richTextResolver.js.map +1 -1
- package/graphqlFields/richText.js.map +1 -1
- package/graphqlFields/text.js.map +1 -1
- package/htmlRenderer/LexicalRenderer.js.map +1 -1
- package/htmlRenderer/createLexicalHTMLRenderer.js.map +1 -1
- package/index.js.map +1 -1
- package/modelManager/DefaultCmsModelManager.d.ts +1 -0
- package/modelManager/DefaultCmsModelManager.js +3 -0
- package/modelManager/DefaultCmsModelManager.js.map +1 -1
- package/modelManager/index.js +1 -1
- package/modelManager/index.js.map +1 -1
- package/package.json +27 -27
- package/parameters/context.js.map +1 -1
- package/parameters/header.js.map +1 -1
- package/parameters/index.js.map +1 -1
- package/parameters/manual.js.map +1 -1
- package/parameters/path.js.map +1 -1
- package/plugins/CmsGraphQLSchemaPlugin/CmsGraphQLSchemaPlugin.d.ts +8 -0
- package/plugins/{CmsGraphQLSchemaPlugin.js → CmsGraphQLSchemaPlugin/CmsGraphQLSchemaPlugin.js} +5 -1
- package/plugins/CmsGraphQLSchemaPlugin/CmsGraphQLSchemaPlugin.js.map +1 -0
- package/plugins/CmsGraphQLSchemaPlugin/index.d.ts +1 -0
- package/plugins/CmsGraphQLSchemaPlugin/index.js +18 -0
- package/plugins/CmsGraphQLSchemaPlugin/index.js.map +1 -0
- package/plugins/CmsGraphQLSchemaSorterPlugin.js.map +1 -1
- package/plugins/CmsGroupPlugin.d.ts +4 -0
- package/plugins/CmsGroupPlugin.js +9 -1
- package/plugins/CmsGroupPlugin.js.map +1 -1
- package/plugins/CmsModelFieldConverterPlugin.js.map +1 -1
- package/plugins/CmsModelPlugin.d.ts +10 -8
- package/plugins/CmsModelPlugin.js +29 -16
- package/plugins/CmsModelPlugin.js.map +1 -1
- package/plugins/CmsParametersPlugin.js.map +1 -1
- package/plugins/CmsRichTextRendererPlugin.js.map +1 -1
- package/plugins/StorageOperationsCmsModelPlugin.js.map +1 -1
- package/plugins/StorageTransformPlugin.js.map +1 -1
- package/plugins/index.js.map +1 -1
- package/storage/default.js.map +1 -1
- package/storage/index.js.map +1 -1
- package/storage/json.js.map +1 -1
- package/storage/object.js.map +1 -1
- package/types/context.d.ts +146 -0
- package/types/context.js +7 -0
- package/types/context.js.map +1 -0
- package/types/fields/dynamicZoneField.d.ts +23 -0
- package/types/fields/dynamicZoneField.js +7 -0
- package/types/fields/dynamicZoneField.js.map +1 -0
- package/types/fields/objectField.d.ts +13 -0
- package/types/fields/objectField.js +7 -0
- package/types/fields/objectField.js.map +1 -0
- package/types/identity.d.ts +19 -0
- package/types/identity.js +7 -0
- package/types/identity.js.map +1 -0
- package/types/index.d.ts +10 -0
- package/types/index.js +117 -0
- package/types/index.js.map +1 -0
- package/types/model.d.ts +199 -0
- package/types/model.js +7 -0
- package/types/model.js.map +1 -0
- package/types/modelAst.d.ts +39 -0
- package/types/modelAst.js +7 -0
- package/types/modelAst.js.map +1 -0
- package/types/modelField.d.ts +320 -0
- package/types/modelField.js +7 -0
- package/types/modelField.js.map +1 -0
- package/types/modelGroup.d.ts +77 -0
- package/types/modelGroup.js +7 -0
- package/types/modelGroup.js.map +1 -0
- package/types/plugins.d.ts +364 -0
- package/types/plugins.js +7 -0
- package/types/plugins.js.map +1 -0
- package/{types.d.ts → types/types.d.ts} +196 -1171
- package/{types.js → types/types.js} +18 -119
- package/types/types.js.map +1 -0
- package/utils/caching/Cache.js.map +1 -1
- package/utils/caching/CacheKey.js.map +1 -1
- package/utils/caching/index.js.map +1 -1
- package/utils/caching/types.js.map +1 -1
- package/utils/contentEntryTraverser/ContentEntryTraverser.d.ts +10 -0
- package/utils/contentEntryTraverser/ContentEntryTraverser.js +84 -0
- package/utils/contentEntryTraverser/ContentEntryTraverser.js.map +1 -0
- package/utils/contentModelAst/CmsModelFieldToAstConverterFromPlugins.d.ts +6 -0
- package/utils/contentModelAst/CmsModelFieldToAstConverterFromPlugins.js +23 -0
- package/utils/contentModelAst/CmsModelFieldToAstConverterFromPlugins.js.map +1 -0
- package/utils/contentModelAst/CmsModelFieldToAstFromPlugin.d.ts +7 -0
- package/utils/contentModelAst/CmsModelFieldToAstFromPlugin.js +22 -0
- package/utils/contentModelAst/CmsModelFieldToAstFromPlugin.js.map +1 -0
- package/utils/contentModelAst/CmsModelToAstConverter.d.ts +11 -0
- package/utils/contentModelAst/CmsModelToAstConverter.js +28 -0
- package/utils/contentModelAst/CmsModelToAstConverter.js.map +1 -0
- package/utils/contentModelAst/index.d.ts +3 -0
- package/utils/contentModelAst/index.js +40 -0
- package/utils/contentModelAst/index.js.map +1 -0
- package/utils/converters/Converter.js.map +1 -1
- package/utils/converters/ConverterCollection.js.map +1 -1
- package/utils/converters/valueKeyStorageConverter.js.map +1 -1
- package/utils/createModelField.d.ts +2 -0
- package/utils/createModelField.js +14 -4
- package/utils/createModelField.js.map +1 -1
- package/utils/createTypeFromFields.js.map +1 -1
- package/utils/createTypeName.js.map +1 -1
- package/utils/date.js.map +1 -1
- package/utils/entryStorage.js.map +1 -1
- package/utils/filterAsync.js.map +1 -1
- package/utils/getBaseFieldType.js.map +1 -1
- package/utils/getEntryDescription.js.map +1 -1
- package/utils/getEntryImage.js.map +1 -1
- package/utils/getEntryTitle.js.map +1 -1
- package/utils/getSchemaFromFieldPlugins.d.ts +4 -4
- package/utils/getSchemaFromFieldPlugins.js +2 -2
- package/utils/getSchemaFromFieldPlugins.js.map +1 -1
- package/utils/identity.js.map +1 -1
- package/utils/incrementEntryIdVersion.js.map +1 -1
- package/utils/index.js.map +1 -1
- package/utils/isHeadlessCmsReady.js.map +1 -1
- package/utils/renderFields.js.map +1 -1
- package/utils/renderGetFilterFields.js.map +1 -1
- package/utils/renderInputFields.js.map +1 -1
- package/utils/renderListFilterFields.js.map +1 -1
- package/utils/renderSortEnum.js.map +1 -1
- package/utils/toSlug.js.map +1 -1
- package/validators/dateGte.js.map +1 -1
- package/validators/dateLte.js.map +1 -1
- package/validators/gte.js.map +1 -1
- package/validators/in.js.map +1 -1
- package/validators/index.js.map +1 -1
- package/validators/lte.js.map +1 -1
- package/validators/maxLength.js.map +1 -1
- package/validators/minLength.js.map +1 -1
- package/validators/pattern.js.map +1 -1
- package/validators/patternPlugins/email.js.map +1 -1
- package/validators/patternPlugins/index.js.map +1 -1
- package/validators/patternPlugins/lowerCase.js.map +1 -1
- package/validators/patternPlugins/lowerCaseSpace.js.map +1 -1
- package/validators/patternPlugins/upperCase.js.map +1 -1
- package/validators/patternPlugins/upperCaseSpace.js.map +1 -1
- package/validators/patternPlugins/url.js.map +1 -1
- package/validators/required.js.map +1 -1
- package/validators/timeGte.js.map +1 -1
- package/validators/timeLte.js.map +1 -1
- package/validators/unique.js.map +1 -1
- package/plugins/CmsGraphQLSchemaPlugin.d.ts +0 -5
- package/plugins/CmsGraphQLSchemaPlugin.js.map +0 -1
- package/types.js.map +0 -1
- package/utils/permissions/EntriesPermissions.d.ts +0 -4
- package/utils/permissions/EntriesPermissions.js +0 -11
- package/utils/permissions/EntriesPermissions.js.map +0 -1
- package/utils/permissions/ModelGroupsPermissions.d.ts +0 -9
- package/utils/permissions/ModelGroupsPermissions.js +0 -50
- package/utils/permissions/ModelGroupsPermissions.js.map +0 -1
- package/utils/permissions/ModelsPermissions.d.ts +0 -22
- package/utils/permissions/ModelsPermissions.js +0 -90
- package/utils/permissions/ModelsPermissions.js.map +0 -1
|
@@ -1,22 +1,34 @@
|
|
|
1
1
|
import { Plugin } from "@webiny/plugins/types";
|
|
2
2
|
import { I18NContext, I18NLocale } from "@webiny/api-i18n/types";
|
|
3
|
-
import { Context } from "@webiny/api/types";
|
|
4
|
-
import { GraphQLFieldResolver,
|
|
3
|
+
import { Context, GenericRecord } from "@webiny/api/types";
|
|
4
|
+
import { GraphQLFieldResolver, GraphQLRequestBody, Resolvers } from "@webiny/handler-graphql/types";
|
|
5
|
+
import { processRequestBody } from "@webiny/handler-graphql";
|
|
5
6
|
import { SecurityPermission } from "@webiny/api-security/types";
|
|
6
7
|
import { DbContext } from "@webiny/handler-db/types";
|
|
7
8
|
import { Topic } from "@webiny/pubsub/types";
|
|
8
|
-
import { CmsModelConverterCallable } from "
|
|
9
|
-
import { HeadlessCmsExport, HeadlessCmsImport } from "
|
|
10
|
-
import { AccessControl } from "
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
import { CmsModelConverterCallable } from "../utils/converters/ConverterCollection";
|
|
10
|
+
import { HeadlessCmsExport, HeadlessCmsImport } from "../export/types";
|
|
11
|
+
import { AccessControl } from "../crud/AccessControl/AccessControl";
|
|
12
|
+
import { CmsModelToAstConverter } from "../utils/contentModelAst/CmsModelToAstConverter";
|
|
13
|
+
import { CmsModelFieldToGraphQLPlugin } from "./plugins";
|
|
14
|
+
import { CmsEntryContext } from "./context";
|
|
15
|
+
import { CmsModelField, CmsModelFieldValidation, CmsModelUpdateInput } from "./modelField";
|
|
16
|
+
import { CmsModel, CmsModelCreateFromInput, CmsModelCreateInput } from "./model";
|
|
17
|
+
import { CmsGroup } from "./modelGroup";
|
|
18
|
+
import { CmsIdentity } from "./identity";
|
|
19
|
+
export interface CmsError {
|
|
20
|
+
message: string;
|
|
21
|
+
code: string;
|
|
22
|
+
data: GenericRecord;
|
|
23
|
+
stack?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface CmsError {
|
|
26
|
+
message: string;
|
|
27
|
+
code: string;
|
|
28
|
+
data: GenericRecord;
|
|
29
|
+
stack?: string;
|
|
19
30
|
}
|
|
31
|
+
export declare type ApiEndpoint = "manage" | "preview" | "read";
|
|
20
32
|
export interface HeadlessCms extends CmsSystemContext, CmsGroupContext, CmsModelContext, CmsEntryContext {
|
|
21
33
|
/**
|
|
22
34
|
* API type
|
|
@@ -50,18 +62,14 @@ export interface HeadlessCms extends CmsSystemContext, CmsGroupContext, CmsModel
|
|
|
50
62
|
* Use to ensure perform authorization and ensure identities have access to the groups, models and entries.
|
|
51
63
|
*/
|
|
52
64
|
accessControl: AccessControl;
|
|
53
|
-
/**
|
|
54
|
-
* Permissions for groups, models and entries.
|
|
55
|
-
* @internal
|
|
56
|
-
* @deprecated Will be removed with the 5.40.0 release. Use `accessControl` instead.
|
|
57
|
-
*/
|
|
58
|
-
permissions: HeadlessCmsPermissions;
|
|
59
65
|
/**
|
|
60
66
|
* Export operations.
|
|
61
67
|
*/
|
|
62
68
|
export: HeadlessCmsExport;
|
|
63
69
|
importing: HeadlessCmsImport;
|
|
70
|
+
getExecutableSchema: GetExecutableSchema;
|
|
64
71
|
}
|
|
72
|
+
export declare type GetExecutableSchema = (type: ApiEndpoint) => Promise<(<TData = Record<string, any>, TExtensions = Record<string, any>>(input: GraphQLRequestBody | GraphQLRequestBody[]) => ReturnType<typeof processRequestBody<TData, TExtensions>>)>;
|
|
65
73
|
/**
|
|
66
74
|
* @description This combines all contexts used in the CMS into a single one.
|
|
67
75
|
*
|
|
@@ -70,194 +78,6 @@ export interface HeadlessCms extends CmsSystemContext, CmsGroupContext, CmsModel
|
|
|
70
78
|
export interface CmsContext extends Context, DbContext, I18NContext {
|
|
71
79
|
cms: HeadlessCms;
|
|
72
80
|
}
|
|
73
|
-
interface CmsModelFieldPredefinedValuesValue {
|
|
74
|
-
value: string;
|
|
75
|
-
label: string;
|
|
76
|
-
/**
|
|
77
|
-
* Default selected predefined value.
|
|
78
|
-
*/
|
|
79
|
-
selected?: boolean;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Object containing content model field predefined options and values.
|
|
83
|
-
*
|
|
84
|
-
* @category CmsModelField
|
|
85
|
-
*/
|
|
86
|
-
export interface CmsModelFieldPredefinedValues {
|
|
87
|
-
/**
|
|
88
|
-
* Are predefined field values enabled?
|
|
89
|
-
*/
|
|
90
|
-
enabled: boolean;
|
|
91
|
-
/**
|
|
92
|
-
* Predefined values array.
|
|
93
|
-
*/
|
|
94
|
-
values: CmsModelFieldPredefinedValuesValue[];
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Object containing content model field renderer options.
|
|
98
|
-
*
|
|
99
|
-
* @category CmsModelField
|
|
100
|
-
*/
|
|
101
|
-
interface CmsModelFieldRenderer {
|
|
102
|
-
/**
|
|
103
|
-
* Name of the field renderer. Must have one in field renderer plugins.
|
|
104
|
-
* Can be blank to let automatically determine the renderer.
|
|
105
|
-
*/
|
|
106
|
-
name: string;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* A definition for content model field settings.
|
|
110
|
-
*
|
|
111
|
-
* @category ModelField
|
|
112
|
-
* @category Database model
|
|
113
|
-
*/
|
|
114
|
-
export interface CmsModelFieldSettings {
|
|
115
|
-
/**
|
|
116
|
-
* Predefined values (text, number)
|
|
117
|
-
* The default value for the field in case it is not predefined values field.
|
|
118
|
-
*/
|
|
119
|
-
defaultValue?: string | number | null | undefined;
|
|
120
|
-
/**
|
|
121
|
-
* Object field has child fields.
|
|
122
|
-
*/
|
|
123
|
-
fields?: CmsModelField[];
|
|
124
|
-
/**
|
|
125
|
-
* Is the file field images only one?
|
|
126
|
-
*/
|
|
127
|
-
imagesOnly?: boolean;
|
|
128
|
-
/**
|
|
129
|
-
* Object field has child fields - so it needs to have a layout.
|
|
130
|
-
*/
|
|
131
|
-
layout?: string[][];
|
|
132
|
-
/**
|
|
133
|
-
* Ref field.
|
|
134
|
-
*/
|
|
135
|
-
models?: Pick<CmsModel, "modelId">[];
|
|
136
|
-
/**
|
|
137
|
-
* Date field.
|
|
138
|
-
*/
|
|
139
|
-
type?: string;
|
|
140
|
-
/**
|
|
141
|
-
* Disable full text search explicitly on this field.
|
|
142
|
-
*/
|
|
143
|
-
disableFullTextSearch?: boolean;
|
|
144
|
-
/**
|
|
145
|
-
* There are a lot of other settings that are possible to add, so we keep the type opened.
|
|
146
|
-
*/
|
|
147
|
-
[key: string]: any;
|
|
148
|
-
}
|
|
149
|
-
export declare type CmsModelFieldType = "boolean" | "datetime" | "file" | "long-text" | "number" | "json" | "object" | "ref" | "rich-text" | "text" | "dynamicZone" | string;
|
|
150
|
-
/**
|
|
151
|
-
* A definition for content model field. This type exists on the app side as well.
|
|
152
|
-
*
|
|
153
|
-
* @category ModelField
|
|
154
|
-
* @category Database model
|
|
155
|
-
*/
|
|
156
|
-
export interface CmsModelField {
|
|
157
|
-
/**
|
|
158
|
-
* A generated unique ID for the model field.
|
|
159
|
-
* MUST be absolute unique throughout the models.
|
|
160
|
-
* Must be in form of a-zA-Z0-9.
|
|
161
|
-
*
|
|
162
|
-
* We generate a unique id value when you're building a model via UI,
|
|
163
|
-
* but when user is creating a model via a plugin it is up to them to be careful about this.
|
|
164
|
-
*/
|
|
165
|
-
id: string;
|
|
166
|
-
/**
|
|
167
|
-
* A type of the field.
|
|
168
|
-
* We are defining our built-in fields, so people know which are available by the default.
|
|
169
|
-
*/
|
|
170
|
-
type: CmsModelFieldType;
|
|
171
|
-
/**
|
|
172
|
-
* A unique storage ID for storing actual values.
|
|
173
|
-
* Must in form of a-zA-Z0-9@a-zA-Z0-9
|
|
174
|
-
*
|
|
175
|
-
* This is an auto-generated value: uses `id` and `type`
|
|
176
|
-
*
|
|
177
|
-
* This is used as path for the entry value.
|
|
178
|
-
*/
|
|
179
|
-
storageId: `${string}@${string}` | string;
|
|
180
|
-
/**
|
|
181
|
-
* Field identifier for the model field that will be available to the outside world.
|
|
182
|
-
* `storageId` is used as path (or column) to store the data.
|
|
183
|
-
*
|
|
184
|
-
* Must in form of a-zA-Z0-9.
|
|
185
|
-
*
|
|
186
|
-
* This value MUST be unique in the CmsModel.
|
|
187
|
-
*/
|
|
188
|
-
fieldId: string;
|
|
189
|
-
/**
|
|
190
|
-
* A label for the field
|
|
191
|
-
*/
|
|
192
|
-
label: string;
|
|
193
|
-
/**
|
|
194
|
-
* Text below the field to clarify what is it meant to be in the field value
|
|
195
|
-
*/
|
|
196
|
-
helpText?: string | null;
|
|
197
|
-
/**
|
|
198
|
-
* Text to be displayed in the field
|
|
199
|
-
*/
|
|
200
|
-
placeholderText?: string | null;
|
|
201
|
-
/**
|
|
202
|
-
* Are predefined values enabled? And list of them
|
|
203
|
-
*/
|
|
204
|
-
predefinedValues?: CmsModelFieldPredefinedValues;
|
|
205
|
-
/**
|
|
206
|
-
* Field renderer. Blank if determined automatically.
|
|
207
|
-
*/
|
|
208
|
-
renderer?: CmsModelFieldRenderer;
|
|
209
|
-
/**
|
|
210
|
-
* List of validations for the field
|
|
211
|
-
*
|
|
212
|
-
* @default []
|
|
213
|
-
*/
|
|
214
|
-
validation?: CmsModelFieldValidation[];
|
|
215
|
-
/**
|
|
216
|
-
* List of validations for the list of values, when a field is set to accept a list of values.
|
|
217
|
-
* These validations will be applied to the entire list, and `validation` (see above) will be applied
|
|
218
|
-
* to each individual value in the list.
|
|
219
|
-
*
|
|
220
|
-
* @default []
|
|
221
|
-
*/
|
|
222
|
-
listValidation?: CmsModelFieldValidation[];
|
|
223
|
-
/**
|
|
224
|
-
* Is this a multiple values field?
|
|
225
|
-
*
|
|
226
|
-
*/
|
|
227
|
-
multipleValues?: boolean;
|
|
228
|
-
/**
|
|
229
|
-
* Fields can be tagged to give them contextual meaning.
|
|
230
|
-
*/
|
|
231
|
-
tags?: string[];
|
|
232
|
-
/**
|
|
233
|
-
* Any user defined settings.
|
|
234
|
-
*
|
|
235
|
-
* @default {}
|
|
236
|
-
*/
|
|
237
|
-
settings?: CmsModelFieldSettings;
|
|
238
|
-
}
|
|
239
|
-
export interface CmsDynamicZoneTemplate {
|
|
240
|
-
id: string;
|
|
241
|
-
name: string;
|
|
242
|
-
gqlTypeName: string;
|
|
243
|
-
description: string;
|
|
244
|
-
icon: string;
|
|
245
|
-
fields: CmsModelField[];
|
|
246
|
-
layout: string[][];
|
|
247
|
-
validation: CmsModelFieldValidation[];
|
|
248
|
-
tags?: string[];
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* A definition for dynamic-zone field to show possible type of the field in settings.
|
|
252
|
-
*/
|
|
253
|
-
export interface CmsModelDynamicZoneField extends CmsModelField {
|
|
254
|
-
/**
|
|
255
|
-
* Settings object for the field. Contains `templates` property.
|
|
256
|
-
*/
|
|
257
|
-
settings: {
|
|
258
|
-
templates: CmsDynamicZoneTemplate[];
|
|
259
|
-
};
|
|
260
|
-
}
|
|
261
81
|
/**
|
|
262
82
|
* Used for our internal functionality.
|
|
263
83
|
*/
|
|
@@ -311,229 +131,6 @@ export interface CmsModelFieldValidatorValidateParams<T = any> {
|
|
|
311
131
|
*/
|
|
312
132
|
entry?: CmsEntry;
|
|
313
133
|
}
|
|
314
|
-
/**
|
|
315
|
-
* Definition for the field validator.
|
|
316
|
-
*
|
|
317
|
-
* @category Plugin
|
|
318
|
-
* @category ModelField
|
|
319
|
-
* @category FieldValidation
|
|
320
|
-
*/
|
|
321
|
-
export interface CmsModelFieldValidatorPluginValidateCb {
|
|
322
|
-
(params: CmsModelFieldValidatorValidateParams): Promise<boolean>;
|
|
323
|
-
}
|
|
324
|
-
export interface CmsModelFieldValidatorPlugin extends Plugin {
|
|
325
|
-
/**
|
|
326
|
-
* A plugin type.
|
|
327
|
-
*/
|
|
328
|
-
type: "cms-model-field-validator";
|
|
329
|
-
/**
|
|
330
|
-
* Actual validator definition.
|
|
331
|
-
*/
|
|
332
|
-
validator: {
|
|
333
|
-
/**
|
|
334
|
-
* Name of the validator.
|
|
335
|
-
*/
|
|
336
|
-
name: string;
|
|
337
|
-
/**
|
|
338
|
-
* Validation method.
|
|
339
|
-
*/
|
|
340
|
-
validate: CmsModelFieldValidatorPluginValidateCb;
|
|
341
|
-
};
|
|
342
|
-
}
|
|
343
|
-
/**
|
|
344
|
-
* A pattern validator for the content entry field value.
|
|
345
|
-
*
|
|
346
|
-
* @category Plugin
|
|
347
|
-
* @category ModelField
|
|
348
|
-
* @category FieldValidation
|
|
349
|
-
*/
|
|
350
|
-
export interface CmsModelFieldPatternValidatorPlugin extends Plugin {
|
|
351
|
-
/**
|
|
352
|
-
* A plugin type
|
|
353
|
-
*/
|
|
354
|
-
type: "cms-model-field-validator-pattern";
|
|
355
|
-
/**
|
|
356
|
-
* A pattern object for the validator.
|
|
357
|
-
*/
|
|
358
|
-
pattern: {
|
|
359
|
-
/**
|
|
360
|
-
* name of the pattern.
|
|
361
|
-
*/
|
|
362
|
-
name: string;
|
|
363
|
-
/**
|
|
364
|
-
* RegExp of the validator.
|
|
365
|
-
*/
|
|
366
|
-
regex: string;
|
|
367
|
-
/**
|
|
368
|
-
* RegExp flags
|
|
369
|
-
*/
|
|
370
|
-
flags: string;
|
|
371
|
-
};
|
|
372
|
-
}
|
|
373
|
-
/**
|
|
374
|
-
* Locked field in the content model
|
|
375
|
-
*
|
|
376
|
-
* @see CmsModel.lockedFields
|
|
377
|
-
*
|
|
378
|
-
* @category ModelField
|
|
379
|
-
*/
|
|
380
|
-
export interface LockedField {
|
|
381
|
-
/**
|
|
382
|
-
* Locked field storage ID - one used to store values.
|
|
383
|
-
* We cannot change this due to old systems.
|
|
384
|
-
*/
|
|
385
|
-
fieldId: string;
|
|
386
|
-
/**
|
|
387
|
-
* Is the field multiple values field?
|
|
388
|
-
*/
|
|
389
|
-
multipleValues: boolean;
|
|
390
|
-
/**
|
|
391
|
-
* Field type.
|
|
392
|
-
*/
|
|
393
|
-
type: string;
|
|
394
|
-
[key: string]: any;
|
|
395
|
-
}
|
|
396
|
-
/**
|
|
397
|
-
* @category Database model
|
|
398
|
-
* @category CmsModel
|
|
399
|
-
*/
|
|
400
|
-
export interface CmsModelGroup {
|
|
401
|
-
/**
|
|
402
|
-
* Generated ID of the group
|
|
403
|
-
*/
|
|
404
|
-
id: string;
|
|
405
|
-
/**
|
|
406
|
-
* Name of the group
|
|
407
|
-
*/
|
|
408
|
-
name: string;
|
|
409
|
-
}
|
|
410
|
-
export interface CmsModelAuthorization {
|
|
411
|
-
permissions: boolean;
|
|
412
|
-
[key: string]: any;
|
|
413
|
-
}
|
|
414
|
-
/**
|
|
415
|
-
* Base CMS Model. Should not be exported and used outside of this package.
|
|
416
|
-
*
|
|
417
|
-
* @category Database model
|
|
418
|
-
* @category CmsModel
|
|
419
|
-
*/
|
|
420
|
-
export interface CmsModel {
|
|
421
|
-
/**
|
|
422
|
-
* Name of the content model.
|
|
423
|
-
*/
|
|
424
|
-
name: string;
|
|
425
|
-
/**
|
|
426
|
-
* Unique ID for the content model. Created from name if not defined by user.
|
|
427
|
-
*/
|
|
428
|
-
modelId: string;
|
|
429
|
-
/**
|
|
430
|
-
* Name of the content model in singular form to be used in the API.
|
|
431
|
-
* example:
|
|
432
|
-
* - Article
|
|
433
|
-
* - Fruit
|
|
434
|
-
* - Vegetable
|
|
435
|
-
* - Car
|
|
436
|
-
*/
|
|
437
|
-
singularApiName: string;
|
|
438
|
-
/**
|
|
439
|
-
* Name of the content model in plural form to be used in the API.
|
|
440
|
-
* example:
|
|
441
|
-
* - Articles
|
|
442
|
-
* - Fruits
|
|
443
|
-
* - Vegetables
|
|
444
|
-
* - Cars
|
|
445
|
-
*/
|
|
446
|
-
pluralApiName: string;
|
|
447
|
-
/**
|
|
448
|
-
* Model tenant.
|
|
449
|
-
*/
|
|
450
|
-
tenant: string;
|
|
451
|
-
/**
|
|
452
|
-
* Locale this model belongs to.
|
|
453
|
-
*/
|
|
454
|
-
locale: string;
|
|
455
|
-
/**
|
|
456
|
-
* Cms Group reference object.
|
|
457
|
-
*/
|
|
458
|
-
group: CmsModelGroup;
|
|
459
|
-
/**
|
|
460
|
-
* Icon for the content model.
|
|
461
|
-
*/
|
|
462
|
-
icon?: string | null;
|
|
463
|
-
/**
|
|
464
|
-
* Description for the content model.
|
|
465
|
-
*/
|
|
466
|
-
description: string | null;
|
|
467
|
-
/**
|
|
468
|
-
* Date created
|
|
469
|
-
*/
|
|
470
|
-
createdOn?: string;
|
|
471
|
-
/**
|
|
472
|
-
* Date saved. Changes on both save and create.
|
|
473
|
-
*/
|
|
474
|
-
savedOn?: string;
|
|
475
|
-
/**
|
|
476
|
-
* CreatedBy object wrapper. Contains id, name and type of the user.
|
|
477
|
-
*/
|
|
478
|
-
createdBy?: CmsIdentity;
|
|
479
|
-
/**
|
|
480
|
-
* List of fields defining entry values.
|
|
481
|
-
*/
|
|
482
|
-
fields: CmsModelField[];
|
|
483
|
-
/**
|
|
484
|
-
* Admin UI field layout
|
|
485
|
-
*
|
|
486
|
-
* ```ts
|
|
487
|
-
* layout: [
|
|
488
|
-
* [field1id, field2id],
|
|
489
|
-
* [field3id]
|
|
490
|
-
* ]
|
|
491
|
-
* ```
|
|
492
|
-
*/
|
|
493
|
-
layout: string[][];
|
|
494
|
-
/**
|
|
495
|
-
* Models can be tagged to give them contextual meaning.
|
|
496
|
-
*/
|
|
497
|
-
tags?: string[];
|
|
498
|
-
/**
|
|
499
|
-
* List of locked fields. Updated when entry is saved and a field has been used.
|
|
500
|
-
*/
|
|
501
|
-
lockedFields?: LockedField[];
|
|
502
|
-
/**
|
|
503
|
-
* The field that is being displayed as entry title.
|
|
504
|
-
* It is picked as first available text field. Or user can select own field.
|
|
505
|
-
*/
|
|
506
|
-
titleFieldId: string;
|
|
507
|
-
/**
|
|
508
|
-
* The field which is displayed as the description one.
|
|
509
|
-
* Only way this is null or undefined is that there are no long-text fields to be set as description.
|
|
510
|
-
*/
|
|
511
|
-
descriptionFieldId?: string | null;
|
|
512
|
-
/**
|
|
513
|
-
* The field which is displayed as the image.
|
|
514
|
-
* Only way this is null or undefined is that there are no file fields, with images only set, to be set as image.
|
|
515
|
-
*/
|
|
516
|
-
imageFieldId?: string | null;
|
|
517
|
-
/**
|
|
518
|
-
* The version of Webiny which this record was stored with.
|
|
519
|
-
*/
|
|
520
|
-
webinyVersion: string;
|
|
521
|
-
/**
|
|
522
|
-
* Is model private?
|
|
523
|
-
* This is meant to be used for some internal models - will not be visible in the schema.
|
|
524
|
-
* Only available for the plugin constructed models.
|
|
525
|
-
*/
|
|
526
|
-
isPrivate?: boolean;
|
|
527
|
-
/**
|
|
528
|
-
* Does this model require authorization to be performed?
|
|
529
|
-
* Only available for models created via plugins.
|
|
530
|
-
*/
|
|
531
|
-
authorization?: boolean | CmsModelAuthorization;
|
|
532
|
-
/**
|
|
533
|
-
* Is this model created via plugin?
|
|
534
|
-
*/
|
|
535
|
-
isPlugin?: boolean;
|
|
536
|
-
}
|
|
537
134
|
/**
|
|
538
135
|
* When sending model to the storage operations, it must contain createValueKeyToStorageConverter and createValueKeyFromStorageConverter
|
|
539
136
|
*
|
|
@@ -579,326 +176,12 @@ export interface CmsModelFieldToGraphQLPluginValidateChildFieldsParams<TField ex
|
|
|
579
176
|
export interface CmsModelFieldToGraphQLPluginValidateChildFields<TField extends CmsModelField = CmsModelField> {
|
|
580
177
|
(params: CmsModelFieldToGraphQLPluginValidateChildFieldsParams<TField>): void;
|
|
581
178
|
}
|
|
582
|
-
/**
|
|
583
|
-
* @category Plugin
|
|
584
|
-
* @category ModelField
|
|
585
|
-
* @category GraphQL
|
|
586
|
-
*/
|
|
587
|
-
export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = CmsModelField> extends Plugin {
|
|
588
|
-
/**
|
|
589
|
-
* A plugin type
|
|
590
|
-
*/
|
|
591
|
-
type: "cms-model-field-to-graphql";
|
|
592
|
-
/**
|
|
593
|
-
* Field type name which must be exact as the one in `CmsEditorFieldTypePlugin` plugin.
|
|
594
|
-
*
|
|
595
|
-
* ```ts
|
|
596
|
-
* fieldType: "myField"
|
|
597
|
-
* ```
|
|
598
|
-
*/
|
|
599
|
-
fieldType: CmsModelFieldType;
|
|
600
|
-
/**
|
|
601
|
-
* Is the field searchable via the GraphQL?
|
|
602
|
-
*
|
|
603
|
-
* ```ts
|
|
604
|
-
* isSearchable: false
|
|
605
|
-
* ```
|
|
606
|
-
*/
|
|
607
|
-
isSearchable: boolean;
|
|
608
|
-
/**
|
|
609
|
-
* Is the field searchable via full text search?
|
|
610
|
-
*
|
|
611
|
-
* Field is not full text searchable by default.
|
|
612
|
-
* ```ts
|
|
613
|
-
* fullTextSearch: false
|
|
614
|
-
* ```
|
|
615
|
-
*/
|
|
616
|
-
fullTextSearch?: boolean;
|
|
617
|
-
/**
|
|
618
|
-
* Is the field sortable via the GraphQL?
|
|
619
|
-
*
|
|
620
|
-
* ```ts
|
|
621
|
-
* isSortable: true
|
|
622
|
-
* ```
|
|
623
|
-
*/
|
|
624
|
-
isSortable: boolean;
|
|
625
|
-
/**
|
|
626
|
-
* Optional method which creates the storageId.
|
|
627
|
-
* Primary use is for the datetime field, but if users has some specific fields, they can customize the storageId to their needs.
|
|
628
|
-
*
|
|
629
|
-
* ```ts
|
|
630
|
-
* createStorageId: ({field}) => {
|
|
631
|
-
* if (field.settings.type === "time) {
|
|
632
|
-
* return `${field.type}_time@${field.id}`
|
|
633
|
-
* }
|
|
634
|
-
* // use default method
|
|
635
|
-
* return undefined;
|
|
636
|
-
* }
|
|
637
|
-
* ```
|
|
638
|
-
*/
|
|
639
|
-
createStorageId?: (params: {
|
|
640
|
-
model: CmsModel;
|
|
641
|
-
field: Omit<TField, "storageId"> & Partial<Pick<TField, "storageId">>;
|
|
642
|
-
}) => string | null | undefined;
|
|
643
|
-
/**
|
|
644
|
-
* Read API methods.
|
|
645
|
-
*/
|
|
646
|
-
read: {
|
|
647
|
-
/**
|
|
648
|
-
* Definition for get filtering for GraphQL.
|
|
649
|
-
*
|
|
650
|
-
* ```ts
|
|
651
|
-
* read: {
|
|
652
|
-
* createGetFilters({ field }) {
|
|
653
|
-
* return `${field.fieldId}: MyField`;
|
|
654
|
-
* }
|
|
655
|
-
* }
|
|
656
|
-
* ```
|
|
657
|
-
*/
|
|
658
|
-
createGetFilters?(params: {
|
|
659
|
-
field: TField;
|
|
660
|
-
}): string;
|
|
661
|
-
/**
|
|
662
|
-
* Definition for list filtering for GraphQL.
|
|
663
|
-
*
|
|
664
|
-
* ```ts
|
|
665
|
-
* read: {
|
|
666
|
-
* createListFilters({ field }) {
|
|
667
|
-
* return `
|
|
668
|
-
* ${field.fieldId}: MyType
|
|
669
|
-
* ${field.fieldId}_not: MyType
|
|
670
|
-
* ${field.fieldId}_in: [MyType]
|
|
671
|
-
* ${field.fieldId}_not_in: [MyType]
|
|
672
|
-
* `;
|
|
673
|
-
* }
|
|
674
|
-
* }
|
|
675
|
-
* ```
|
|
676
|
-
*/
|
|
677
|
-
createListFilters?(params: {
|
|
678
|
-
model: Pick<CmsModel, "singularApiName">;
|
|
679
|
-
field: TField;
|
|
680
|
-
plugins: CmsFieldTypePlugins;
|
|
681
|
-
}): string;
|
|
682
|
-
/**
|
|
683
|
-
* Definition of the field type for GraphQL - be aware if multiple values is selected.
|
|
684
|
-
*
|
|
685
|
-
* ```ts
|
|
686
|
-
* read: {
|
|
687
|
-
* createTypeField({ field }) {
|
|
688
|
-
* if (field.multipleValues) {
|
|
689
|
-
* return `${field.fieldId}: [MyFieldType]`;
|
|
690
|
-
* }
|
|
691
|
-
*
|
|
692
|
-
* return `${field.fieldId}: MyField`;
|
|
693
|
-
* }
|
|
694
|
-
* }
|
|
695
|
-
* ```
|
|
696
|
-
*/
|
|
697
|
-
createTypeField(params: {
|
|
698
|
-
models: CmsModel[];
|
|
699
|
-
model: CmsModel;
|
|
700
|
-
field: TField;
|
|
701
|
-
fieldTypePlugins: CmsFieldTypePlugins;
|
|
702
|
-
}): CmsModelFieldDefinition | string | null;
|
|
703
|
-
/**
|
|
704
|
-
* Definition for field resolver.
|
|
705
|
-
* By default, it is simple return of the `instance.values[storageId]` but if required, users can define their own.
|
|
706
|
-
*
|
|
707
|
-
* ```ts
|
|
708
|
-
* read: {
|
|
709
|
-
* createResolver({ field }) {
|
|
710
|
-
* return instance => {
|
|
711
|
-
* return instance.values[field.storageId];
|
|
712
|
-
* };
|
|
713
|
-
* }
|
|
714
|
-
* }
|
|
715
|
-
* ```
|
|
716
|
-
*/
|
|
717
|
-
createResolver?: CmsModelFieldToGraphQLCreateResolver<TField>;
|
|
718
|
-
/**
|
|
719
|
-
* Read API schema definitions for the field and resolvers for them.
|
|
720
|
-
*
|
|
721
|
-
* ```ts
|
|
722
|
-
* read: {
|
|
723
|
-
* createSchema() {
|
|
724
|
-
* return {
|
|
725
|
-
* typeDefs: `
|
|
726
|
-
* myField {
|
|
727
|
-
* id
|
|
728
|
-
* date
|
|
729
|
-
* }
|
|
730
|
-
* `,
|
|
731
|
-
* resolvers: {}
|
|
732
|
-
* }
|
|
733
|
-
* }
|
|
734
|
-
* }
|
|
735
|
-
* ```
|
|
736
|
-
*/
|
|
737
|
-
createSchema?: (params: {
|
|
738
|
-
models: CmsModel[];
|
|
739
|
-
}) => GraphQLSchemaDefinition<CmsContext>;
|
|
740
|
-
};
|
|
741
|
-
manage: {
|
|
742
|
-
/**
|
|
743
|
-
* Definition for list filtering for GraphQL.
|
|
744
|
-
*
|
|
745
|
-
* ```ts
|
|
746
|
-
* manage: {
|
|
747
|
-
* createListFilters({ field }) {
|
|
748
|
-
* return `
|
|
749
|
-
* ${field.fieldId}: MyType
|
|
750
|
-
* ${field.fieldId}_not: MyType
|
|
751
|
-
* ${field.fieldId}_in: [MyType]
|
|
752
|
-
* ${field.fieldId}_not_in: [MyType]
|
|
753
|
-
* `;
|
|
754
|
-
* }
|
|
755
|
-
* }
|
|
756
|
-
* ```
|
|
757
|
-
*/
|
|
758
|
-
createListFilters?: (params: {
|
|
759
|
-
model: Pick<CmsModel, "singularApiName">;
|
|
760
|
-
field: TField;
|
|
761
|
-
plugins: CmsFieldTypePlugins;
|
|
762
|
-
}) => string;
|
|
763
|
-
/**
|
|
764
|
-
* Manage API schema definitions for the field and resolvers for them. Probably similar to `read.createSchema`.
|
|
765
|
-
*
|
|
766
|
-
* ```ts
|
|
767
|
-
* createSchema() {
|
|
768
|
-
* return {
|
|
769
|
-
* typeDefs: `
|
|
770
|
-
* myField {
|
|
771
|
-
* id
|
|
772
|
-
* date
|
|
773
|
-
* }
|
|
774
|
-
* `,
|
|
775
|
-
* resolvers: {}
|
|
776
|
-
* }
|
|
777
|
-
* }
|
|
778
|
-
* ```
|
|
779
|
-
*/
|
|
780
|
-
createSchema?: (params: {
|
|
781
|
-
models: CmsModel[];
|
|
782
|
-
}) => GraphQLSchemaDefinition<CmsContext>;
|
|
783
|
-
/**
|
|
784
|
-
* Definition of the field type for GraphQL - be aware if multiple values is selected. Probably same as `read.createTypeField`.
|
|
785
|
-
*
|
|
786
|
-
* ```ts
|
|
787
|
-
* manage: {
|
|
788
|
-
* createTypeField({ field }) {
|
|
789
|
-
* if (field.multipleValues) {
|
|
790
|
-
* return field.fieldId + ": [MyType]";
|
|
791
|
-
* }
|
|
792
|
-
*
|
|
793
|
-
* return field.fieldId + ": MyType";
|
|
794
|
-
* }
|
|
795
|
-
* }
|
|
796
|
-
* ```
|
|
797
|
-
*/
|
|
798
|
-
createTypeField: (params: {
|
|
799
|
-
models: CmsModel[];
|
|
800
|
-
model: CmsModel;
|
|
801
|
-
field: TField;
|
|
802
|
-
fieldTypePlugins: CmsFieldTypePlugins;
|
|
803
|
-
}) => CmsModelFieldDefinition | string | null;
|
|
804
|
-
/**
|
|
805
|
-
* Definition for input GraphQL field type.
|
|
806
|
-
*
|
|
807
|
-
* ```ts
|
|
808
|
-
* manage: {
|
|
809
|
-
* createInputField({ field }) {
|
|
810
|
-
* if (field.multipleValues) {
|
|
811
|
-
* return field.fieldId + ": [MyField]";
|
|
812
|
-
* }
|
|
813
|
-
*
|
|
814
|
-
* return field.fieldId + ": MyField";
|
|
815
|
-
* }
|
|
816
|
-
* }
|
|
817
|
-
* ```
|
|
818
|
-
*/
|
|
819
|
-
createInputField: (params: {
|
|
820
|
-
models: CmsModel[];
|
|
821
|
-
model: CmsModel;
|
|
822
|
-
field: TField;
|
|
823
|
-
fieldTypePlugins: CmsFieldTypePlugins;
|
|
824
|
-
}) => CmsModelFieldDefinition | string | null;
|
|
825
|
-
/**
|
|
826
|
-
* Definition for field resolver.
|
|
827
|
-
* By default, it is simple return of the `instance.values[storageId]` but if required, users can define their own.
|
|
828
|
-
*
|
|
829
|
-
* ```ts
|
|
830
|
-
* manage: {
|
|
831
|
-
* createResolver({ field }) {
|
|
832
|
-
* return instance => {
|
|
833
|
-
* return instance.values[field.storageId];
|
|
834
|
-
* };
|
|
835
|
-
* }
|
|
836
|
-
* }
|
|
837
|
-
* ```
|
|
838
|
-
*/
|
|
839
|
-
createResolver?: CmsModelFieldToGraphQLCreateResolver<TField>;
|
|
840
|
-
};
|
|
841
|
-
/**
|
|
842
|
-
*
|
|
843
|
-
* @param field
|
|
844
|
-
*/
|
|
845
|
-
validateChildFields?: CmsModelFieldToGraphQLPluginValidateChildFields<TField>;
|
|
846
|
-
}
|
|
847
|
-
/**
|
|
848
|
-
* Check for content model locked field.
|
|
849
|
-
* A custom plugin definable by the user.
|
|
850
|
-
*
|
|
851
|
-
* @category CmsModel
|
|
852
|
-
* @category Plugin
|
|
853
|
-
*/
|
|
854
|
-
export interface CmsModelLockedFieldPlugin extends Plugin {
|
|
855
|
-
/**
|
|
856
|
-
* A plugin type
|
|
857
|
-
*/
|
|
858
|
-
type: "cms-model-locked-field";
|
|
859
|
-
/**
|
|
860
|
-
* A unique identifier of the field type (text, number, json, myField, ...).
|
|
861
|
-
*/
|
|
862
|
-
fieldType: string;
|
|
863
|
-
/**
|
|
864
|
-
* A method to check if field really is locked.
|
|
865
|
-
*/
|
|
866
|
-
checkLockedField?: (params: {
|
|
867
|
-
lockedField: LockedField;
|
|
868
|
-
field: CmsModelField;
|
|
869
|
-
}) => void;
|
|
870
|
-
/**
|
|
871
|
-
* A method to get the locked field data.
|
|
872
|
-
*/
|
|
873
|
-
getLockedFieldData?: (params: {
|
|
874
|
-
field: CmsModelField;
|
|
875
|
-
}) => Record<string, any>;
|
|
876
|
-
}
|
|
877
179
|
/**
|
|
878
180
|
* @category ModelField
|
|
879
181
|
*/
|
|
880
182
|
export interface CmsFieldTypePlugins {
|
|
881
183
|
[key: string]: CmsModelFieldToGraphQLPlugin;
|
|
882
184
|
}
|
|
883
|
-
/**
|
|
884
|
-
* An interface describing the reference to a user that created some data in the database.
|
|
885
|
-
*
|
|
886
|
-
* @category General
|
|
887
|
-
*/
|
|
888
|
-
export interface CmsIdentity {
|
|
889
|
-
/**
|
|
890
|
-
* ID if the user.
|
|
891
|
-
*/
|
|
892
|
-
id: string;
|
|
893
|
-
/**
|
|
894
|
-
* Full name of the user.
|
|
895
|
-
*/
|
|
896
|
-
displayName: string | null;
|
|
897
|
-
/**
|
|
898
|
-
* Type of the user (admin, user)
|
|
899
|
-
*/
|
|
900
|
-
type: string;
|
|
901
|
-
}
|
|
902
185
|
export interface OnSystemBeforeInstallTopicParams {
|
|
903
186
|
tenant: string;
|
|
904
187
|
locale: string;
|
|
@@ -930,85 +213,23 @@ export declare type CmsSystemContext = {
|
|
|
930
213
|
* @category GraphQL params
|
|
931
214
|
*/
|
|
932
215
|
export interface CmsGroupCreateInput {
|
|
933
|
-
id?: string;
|
|
934
|
-
name: string;
|
|
935
|
-
slug?: string;
|
|
936
|
-
description?: string | null;
|
|
937
|
-
icon: string;
|
|
938
|
-
}
|
|
939
|
-
/**
|
|
940
|
-
* A GraphQL `params.data` parameter received when updating content model group.
|
|
941
|
-
*
|
|
942
|
-
* @category CmsGroup
|
|
943
|
-
* @category GraphQL params
|
|
944
|
-
*/
|
|
945
|
-
export interface CmsGroupUpdateInput {
|
|
946
|
-
name?: string;
|
|
947
|
-
slug?: string;
|
|
948
|
-
description?: string;
|
|
949
|
-
icon?: string;
|
|
950
|
-
}
|
|
951
|
-
/**
|
|
952
|
-
* A representation of content model group in the database.
|
|
953
|
-
*
|
|
954
|
-
* @category CmsGroup
|
|
955
|
-
* @category Database model
|
|
956
|
-
*/
|
|
957
|
-
export interface CmsGroup {
|
|
958
|
-
/**
|
|
959
|
-
* Generated ID.
|
|
960
|
-
*/
|
|
961
|
-
id: string;
|
|
962
|
-
/**
|
|
963
|
-
* Name of the group.
|
|
964
|
-
*/
|
|
965
|
-
name: string;
|
|
966
|
-
/**
|
|
967
|
-
* Slug for the group. Must be unique.
|
|
968
|
-
*/
|
|
969
|
-
slug: string;
|
|
970
|
-
/**
|
|
971
|
-
* Group tenant.
|
|
972
|
-
*/
|
|
973
|
-
tenant: string;
|
|
974
|
-
/**
|
|
975
|
-
* Locale this group belongs to.
|
|
976
|
-
*/
|
|
977
|
-
locale: string;
|
|
978
|
-
/**
|
|
979
|
-
* Description for the group.
|
|
980
|
-
*/
|
|
981
|
-
description: string | null;
|
|
982
|
-
/**
|
|
983
|
-
* Icon for the group. In a form of "ico/ico".
|
|
984
|
-
*/
|
|
985
|
-
icon: string;
|
|
986
|
-
/**
|
|
987
|
-
* CreatedBy reference object.
|
|
988
|
-
*/
|
|
989
|
-
createdBy?: CmsIdentity;
|
|
990
|
-
/**
|
|
991
|
-
* Date group was created on.
|
|
992
|
-
*/
|
|
993
|
-
createdOn?: string;
|
|
994
|
-
/**
|
|
995
|
-
* Date group was created or changed on.
|
|
996
|
-
*/
|
|
997
|
-
savedOn?: string;
|
|
998
|
-
/**
|
|
999
|
-
* Which Webiny version was this record stored with.
|
|
1000
|
-
*/
|
|
1001
|
-
webinyVersion: string;
|
|
1002
|
-
/**
|
|
1003
|
-
* Is group private?
|
|
1004
|
-
* This is meant to be used for some internal groups - will not be visible in the schema.
|
|
1005
|
-
* Only available for the plugin constructed groups.
|
|
1006
|
-
*/
|
|
1007
|
-
isPrivate?: boolean;
|
|
1008
|
-
/**
|
|
1009
|
-
* Is this group created via plugin?
|
|
1010
|
-
*/
|
|
1011
|
-
isPlugin?: boolean;
|
|
216
|
+
id?: string;
|
|
217
|
+
name: string;
|
|
218
|
+
slug?: string;
|
|
219
|
+
description?: string | null;
|
|
220
|
+
icon: string;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* A GraphQL `params.data` parameter received when updating content model group.
|
|
224
|
+
*
|
|
225
|
+
* @category CmsGroup
|
|
226
|
+
* @category GraphQL params
|
|
227
|
+
*/
|
|
228
|
+
export interface CmsGroupUpdateInput {
|
|
229
|
+
name?: string;
|
|
230
|
+
slug?: string;
|
|
231
|
+
description?: string;
|
|
232
|
+
icon?: string;
|
|
1012
233
|
}
|
|
1013
234
|
/**
|
|
1014
235
|
* A `data.where` parameter received when listing content model groups.
|
|
@@ -1137,204 +358,6 @@ export interface CmsGroupContext {
|
|
|
1137
358
|
onGroupAfterDelete: Topic<OnGroupAfterDeleteTopicParams>;
|
|
1138
359
|
onGroupDeleteError: Topic<OnGroupDeleteErrorTopicParams>;
|
|
1139
360
|
}
|
|
1140
|
-
/**
|
|
1141
|
-
* Definition for content model field validator.
|
|
1142
|
-
*
|
|
1143
|
-
* @category ModelField
|
|
1144
|
-
* @category FieldValidation
|
|
1145
|
-
*/
|
|
1146
|
-
export interface CmsModelFieldValidation {
|
|
1147
|
-
name: string;
|
|
1148
|
-
message: string;
|
|
1149
|
-
settings?: {
|
|
1150
|
-
value?: string | number;
|
|
1151
|
-
values?: string[];
|
|
1152
|
-
preset?: string;
|
|
1153
|
-
[key: string]: any;
|
|
1154
|
-
};
|
|
1155
|
-
}
|
|
1156
|
-
/**
|
|
1157
|
-
* A GraphQL `params.data` parameter received when creating content model.
|
|
1158
|
-
*
|
|
1159
|
-
* @category GraphQL params
|
|
1160
|
-
* @category CmsModel
|
|
1161
|
-
*/
|
|
1162
|
-
export interface CmsModelCreateInput {
|
|
1163
|
-
/**
|
|
1164
|
-
* Name of the content model.
|
|
1165
|
-
*/
|
|
1166
|
-
name: string;
|
|
1167
|
-
/**
|
|
1168
|
-
* Singular name of the content model to be used in the API.
|
|
1169
|
-
*/
|
|
1170
|
-
singularApiName: string;
|
|
1171
|
-
/**
|
|
1172
|
-
* Plural name of the content model to be used in the API.
|
|
1173
|
-
*/
|
|
1174
|
-
pluralApiName: string;
|
|
1175
|
-
/**
|
|
1176
|
-
* Unique ID of the content model. Created from name if not sent by the user. Cannot be changed.
|
|
1177
|
-
*/
|
|
1178
|
-
modelId?: string;
|
|
1179
|
-
/**
|
|
1180
|
-
* Description of the content model.
|
|
1181
|
-
*/
|
|
1182
|
-
description?: string | null;
|
|
1183
|
-
/**
|
|
1184
|
-
* Group where to put the content model in.
|
|
1185
|
-
*/
|
|
1186
|
-
group: string;
|
|
1187
|
-
/**
|
|
1188
|
-
* A list of content model fields to define the entry values.
|
|
1189
|
-
*/
|
|
1190
|
-
fields?: CmsModelFieldInput[];
|
|
1191
|
-
/**
|
|
1192
|
-
* Admin UI field layout
|
|
1193
|
-
*
|
|
1194
|
-
* ```ts
|
|
1195
|
-
* layout: [
|
|
1196
|
-
* [field1id, field2id],
|
|
1197
|
-
* [field3id]
|
|
1198
|
-
* ]
|
|
1199
|
-
* ```
|
|
1200
|
-
*/
|
|
1201
|
-
layout?: string[][];
|
|
1202
|
-
/**
|
|
1203
|
-
* Models can be tagged to give them contextual meaning.
|
|
1204
|
-
*/
|
|
1205
|
-
tags?: string[];
|
|
1206
|
-
/**
|
|
1207
|
-
* Fields fieldId which are picked to represent the CMS entry.
|
|
1208
|
-
*/
|
|
1209
|
-
titleFieldId?: string | null;
|
|
1210
|
-
descriptionFieldId?: string | null;
|
|
1211
|
-
imageFieldId?: string | null;
|
|
1212
|
-
}
|
|
1213
|
-
/**
|
|
1214
|
-
* A GraphQL `params.data` parameter received when creating content model from existing model.
|
|
1215
|
-
*
|
|
1216
|
-
* @category GraphQL params
|
|
1217
|
-
* @category CmsModel
|
|
1218
|
-
*/
|
|
1219
|
-
export interface CmsModelCreateFromInput extends CmsModelCreateInput {
|
|
1220
|
-
/**
|
|
1221
|
-
* Locale into which we want to clone the model into.
|
|
1222
|
-
*/
|
|
1223
|
-
locale?: string;
|
|
1224
|
-
}
|
|
1225
|
-
/**
|
|
1226
|
-
* A definition for content model field received from the user.
|
|
1227
|
-
*
|
|
1228
|
-
* Input type for `CmsModelField`.
|
|
1229
|
-
* @see CmsModelField
|
|
1230
|
-
*
|
|
1231
|
-
* @category GraphQL params
|
|
1232
|
-
* @category ModelField
|
|
1233
|
-
*/
|
|
1234
|
-
export interface CmsModelFieldInput {
|
|
1235
|
-
/**
|
|
1236
|
-
* Generated ID.
|
|
1237
|
-
*/
|
|
1238
|
-
id: string;
|
|
1239
|
-
/**
|
|
1240
|
-
* Type of the field. A plugin for the field must be defined.
|
|
1241
|
-
* @see CmsModelFieldToGraphQLPlugin
|
|
1242
|
-
*/
|
|
1243
|
-
type: string;
|
|
1244
|
-
/**
|
|
1245
|
-
* Field outside world identifier for the field. Must be unique in the model.
|
|
1246
|
-
*/
|
|
1247
|
-
fieldId: string;
|
|
1248
|
-
/**
|
|
1249
|
-
* Label for the field.
|
|
1250
|
-
*/
|
|
1251
|
-
label: string;
|
|
1252
|
-
/**
|
|
1253
|
-
* Text to display below the field to help user what to write in the field.
|
|
1254
|
-
*/
|
|
1255
|
-
helpText?: string | null;
|
|
1256
|
-
/**
|
|
1257
|
-
* Text to display in the field.
|
|
1258
|
-
*/
|
|
1259
|
-
placeholderText?: string | null;
|
|
1260
|
-
/**
|
|
1261
|
-
* Fields can be tagged to give them contextual meaning.
|
|
1262
|
-
*/
|
|
1263
|
-
tags?: string[];
|
|
1264
|
-
/**
|
|
1265
|
-
* Are multiple values allowed?
|
|
1266
|
-
*/
|
|
1267
|
-
multipleValues?: boolean;
|
|
1268
|
-
/**
|
|
1269
|
-
* Predefined values options for the field. Check the reference for more information.
|
|
1270
|
-
*/
|
|
1271
|
-
predefinedValues?: CmsModelFieldPredefinedValues;
|
|
1272
|
-
/**
|
|
1273
|
-
* Renderer options for the field. Check the reference for more information.
|
|
1274
|
-
*/
|
|
1275
|
-
renderer?: CmsModelFieldRenderer;
|
|
1276
|
-
/**
|
|
1277
|
-
* List of validations for the field.
|
|
1278
|
-
*/
|
|
1279
|
-
validation?: CmsModelFieldValidation[];
|
|
1280
|
-
/**
|
|
1281
|
-
* @see CmsModelField.listValidation
|
|
1282
|
-
*/
|
|
1283
|
-
listValidation?: CmsModelFieldValidation[];
|
|
1284
|
-
/**
|
|
1285
|
-
* User defined settings.
|
|
1286
|
-
*/
|
|
1287
|
-
settings?: Record<string, any>;
|
|
1288
|
-
}
|
|
1289
|
-
/**
|
|
1290
|
-
* A GraphQL `params.data` parameter received when updating content model.
|
|
1291
|
-
*
|
|
1292
|
-
* @category GraphQL params
|
|
1293
|
-
* @category CmsModel
|
|
1294
|
-
*/
|
|
1295
|
-
export interface CmsModelUpdateInput {
|
|
1296
|
-
/**
|
|
1297
|
-
* A new content model name.
|
|
1298
|
-
*/
|
|
1299
|
-
name?: string;
|
|
1300
|
-
/**
|
|
1301
|
-
* A new singular name of the content model to be used in the API.
|
|
1302
|
-
*/
|
|
1303
|
-
singularApiName?: string;
|
|
1304
|
-
/**
|
|
1305
|
-
* A new plural name of the content model to be used in the API.
|
|
1306
|
-
*/
|
|
1307
|
-
pluralApiName?: string;
|
|
1308
|
-
/**
|
|
1309
|
-
* A group we want to move the model to.
|
|
1310
|
-
*/
|
|
1311
|
-
group?: string;
|
|
1312
|
-
/**
|
|
1313
|
-
* A new description of the content model.
|
|
1314
|
-
*/
|
|
1315
|
-
description?: string | null;
|
|
1316
|
-
/**
|
|
1317
|
-
* A list of content model fields to define the entry values.
|
|
1318
|
-
*/
|
|
1319
|
-
fields: CmsModelFieldInput[];
|
|
1320
|
-
/**
|
|
1321
|
-
* Admin UI field layout
|
|
1322
|
-
*
|
|
1323
|
-
* ```ts
|
|
1324
|
-
* layout: [
|
|
1325
|
-
* [field1id, field2id],
|
|
1326
|
-
* [field3id]
|
|
1327
|
-
* ]
|
|
1328
|
-
* ```
|
|
1329
|
-
*/
|
|
1330
|
-
layout: string[][];
|
|
1331
|
-
/**
|
|
1332
|
-
* Fields fieldId which are picked to represent the CMS entry.
|
|
1333
|
-
*/
|
|
1334
|
-
titleFieldId?: string | null;
|
|
1335
|
-
descriptionFieldId?: string | null;
|
|
1336
|
-
imageFieldId?: string | null;
|
|
1337
|
-
}
|
|
1338
361
|
/**
|
|
1339
362
|
* A plugin to load a CmsModelManager.
|
|
1340
363
|
*
|
|
@@ -1358,7 +381,7 @@ export interface ModelManagerPlugin extends Plugin {
|
|
|
1358
381
|
* Create a CmsModelManager for specific type - or new default one.
|
|
1359
382
|
* For reference in how is this plugin run check [contentModelManagerFactory](https://github.com/webiny/webiny-js/blob/f15676/packages/api-headless-cms/src/content/plugins/CRUD/contentModel/contentModelManagerFactory.ts)
|
|
1360
383
|
*/
|
|
1361
|
-
create
|
|
384
|
+
create<T = any>(context: CmsContext, model: CmsModel): Promise<CmsModelManager<T>>;
|
|
1362
385
|
}
|
|
1363
386
|
/**
|
|
1364
387
|
* A content entry values definition for and from the database.
|
|
@@ -1409,6 +432,14 @@ export interface CmsEntry<T = CmsEntryValues> {
|
|
|
1409
432
|
* An ISO 8601 date/time string.
|
|
1410
433
|
*/
|
|
1411
434
|
revisionModifiedOn: string | null;
|
|
435
|
+
/**
|
|
436
|
+
* An ISO 8601 date/time string.
|
|
437
|
+
*/
|
|
438
|
+
revisionDeletedOn: string | null;
|
|
439
|
+
/**
|
|
440
|
+
* An ISO 8601 date/time string.
|
|
441
|
+
*/
|
|
442
|
+
revisionRestoredOn: string | null;
|
|
1412
443
|
/**
|
|
1413
444
|
* An ISO 8601 date/time string.
|
|
1414
445
|
*/
|
|
@@ -1429,6 +460,14 @@ export interface CmsEntry<T = CmsEntryValues> {
|
|
|
1429
460
|
* Identity that last ionModified the entry.
|
|
1430
461
|
*/
|
|
1431
462
|
revisionModifiedBy: CmsIdentity | null;
|
|
463
|
+
/**
|
|
464
|
+
* Identity that last deleted the revision.
|
|
465
|
+
*/
|
|
466
|
+
revisionDeletedBy: CmsIdentity | null;
|
|
467
|
+
/**
|
|
468
|
+
* Identity that last restored the revision.
|
|
469
|
+
*/
|
|
470
|
+
revisionRestoredBy: CmsIdentity | null;
|
|
1432
471
|
/**
|
|
1433
472
|
* Identity that first published the entry.
|
|
1434
473
|
*/
|
|
@@ -1449,6 +488,14 @@ export interface CmsEntry<T = CmsEntryValues> {
|
|
|
1449
488
|
* An ISO 8601 date/time string.
|
|
1450
489
|
*/
|
|
1451
490
|
modifiedOn: string | null;
|
|
491
|
+
/**
|
|
492
|
+
* An ISO 8601 date/time string.
|
|
493
|
+
*/
|
|
494
|
+
deletedOn: string | null;
|
|
495
|
+
/**
|
|
496
|
+
* An ISO 8601 date/time string.
|
|
497
|
+
*/
|
|
498
|
+
restoredOn: string | null;
|
|
1452
499
|
/**
|
|
1453
500
|
* An ISO 8601 date/time string.
|
|
1454
501
|
*/
|
|
@@ -1469,6 +516,14 @@ export interface CmsEntry<T = CmsEntryValues> {
|
|
|
1469
516
|
* Identity that last modified the entry.
|
|
1470
517
|
*/
|
|
1471
518
|
modifiedBy: CmsIdentity | null;
|
|
519
|
+
/**
|
|
520
|
+
* Identity that last deleted the entry.
|
|
521
|
+
*/
|
|
522
|
+
deletedBy: CmsIdentity | null;
|
|
523
|
+
/**
|
|
524
|
+
* Identity that last restored the entry.
|
|
525
|
+
*/
|
|
526
|
+
restoredBy: CmsIdentity | null;
|
|
1472
527
|
/**
|
|
1473
528
|
* Identity that first published the entry.
|
|
1474
529
|
*/
|
|
@@ -1522,6 +577,15 @@ export interface CmsEntry<T = CmsEntryValues> {
|
|
|
1522
577
|
meta?: {
|
|
1523
578
|
[key: string]: any;
|
|
1524
579
|
};
|
|
580
|
+
/**
|
|
581
|
+
* Is the entry in the bin?
|
|
582
|
+
*/
|
|
583
|
+
wbyDeleted?: boolean | null;
|
|
584
|
+
/**
|
|
585
|
+
* This field preserves the original folderId value, as the ROOT_FOLDER is set upon deletion.
|
|
586
|
+
* The value is utilized when restoring the entry from the trash bin.
|
|
587
|
+
*/
|
|
588
|
+
binOriginalFolderId?: string | null;
|
|
1525
589
|
}
|
|
1526
590
|
export interface CmsStorageEntry extends CmsEntry {
|
|
1527
591
|
[key: string]: any;
|
|
@@ -1540,39 +604,39 @@ export interface CmsEntryUniqueValue {
|
|
|
1540
604
|
* @category CmsEntry
|
|
1541
605
|
* @category CmsModel
|
|
1542
606
|
*/
|
|
1543
|
-
export interface CmsModelManager {
|
|
607
|
+
export interface CmsModelManager<T = CmsEntryValues> {
|
|
1544
608
|
/**
|
|
1545
609
|
* List only published entries in the content model.
|
|
1546
610
|
*/
|
|
1547
|
-
listPublished
|
|
611
|
+
listPublished(params: CmsEntryListParams): Promise<[CmsEntry<T>[], CmsEntryMeta]>;
|
|
1548
612
|
/**
|
|
1549
613
|
* List latest entries in the content model. Used for administration.
|
|
1550
614
|
*/
|
|
1551
|
-
listLatest
|
|
615
|
+
listLatest(params: CmsEntryListParams): Promise<[CmsEntry<T>[], CmsEntryMeta]>;
|
|
1552
616
|
/**
|
|
1553
617
|
* Get a list of published entries by the ID list.
|
|
1554
618
|
*/
|
|
1555
|
-
getPublishedByIds
|
|
619
|
+
getPublishedByIds(ids: string[]): Promise<CmsEntry<T>[]>;
|
|
1556
620
|
/**
|
|
1557
621
|
* Get a list of the latest entries by the ID list.
|
|
1558
622
|
*/
|
|
1559
|
-
getLatestByIds
|
|
623
|
+
getLatestByIds(ids: string[]): Promise<CmsEntry<T>[]>;
|
|
1560
624
|
/**
|
|
1561
625
|
* Get an entry filtered by given params. Will always get one.
|
|
1562
626
|
*/
|
|
1563
|
-
get
|
|
627
|
+
get(id: string): Promise<CmsEntry<T>>;
|
|
1564
628
|
/**
|
|
1565
629
|
* Create an entry.
|
|
1566
630
|
*/
|
|
1567
|
-
create
|
|
631
|
+
create<I>(data: CreateCmsEntryInput & I): Promise<CmsEntry<T>>;
|
|
1568
632
|
/**
|
|
1569
633
|
* Update an entry.
|
|
1570
634
|
*/
|
|
1571
|
-
update
|
|
635
|
+
update(id: string, data: UpdateCmsEntryInput): Promise<CmsEntry<T>>;
|
|
1572
636
|
/**
|
|
1573
637
|
* Delete an entry.
|
|
1574
638
|
*/
|
|
1575
|
-
delete
|
|
639
|
+
delete(id: string): Promise<void>;
|
|
1576
640
|
}
|
|
1577
641
|
/**
|
|
1578
642
|
* Create
|
|
@@ -1665,54 +729,58 @@ export interface CmsModelContext {
|
|
|
1665
729
|
/**
|
|
1666
730
|
* Get a single content model.
|
|
1667
731
|
*/
|
|
1668
|
-
getModel
|
|
732
|
+
getModel(modelId: string): Promise<CmsModel | null>;
|
|
733
|
+
/**
|
|
734
|
+
* Get model to AST converter.
|
|
735
|
+
*/
|
|
736
|
+
getModelToAstConverter: () => CmsModelToAstConverter;
|
|
1669
737
|
/**
|
|
1670
738
|
* Get all content models.
|
|
1671
739
|
*/
|
|
1672
|
-
listModels
|
|
740
|
+
listModels(): Promise<CmsModel[]>;
|
|
1673
741
|
/**
|
|
1674
742
|
* Create a content model.
|
|
1675
743
|
*/
|
|
1676
|
-
createModel
|
|
744
|
+
createModel(data: CmsModelCreateInput): Promise<CmsModel>;
|
|
1677
745
|
/**
|
|
1678
746
|
* Create a content model from the given model - clone.
|
|
1679
747
|
*/
|
|
1680
|
-
createModelFrom
|
|
748
|
+
createModelFrom(modelId: string, data: CmsModelCreateFromInput): Promise<CmsModel>;
|
|
1681
749
|
/**
|
|
1682
750
|
* Update content model without data validation. Used internally.
|
|
1683
751
|
* @hidden
|
|
1684
752
|
*/
|
|
1685
|
-
updateModelDirect
|
|
753
|
+
updateModelDirect(params: CmsModelUpdateDirectParams): Promise<CmsModel>;
|
|
1686
754
|
/**
|
|
1687
755
|
* Update content model.
|
|
1688
756
|
*/
|
|
1689
|
-
updateModel
|
|
757
|
+
updateModel(modelId: string, data: CmsModelUpdateInput): Promise<CmsModel>;
|
|
1690
758
|
/**
|
|
1691
759
|
* Delete content model. Should not allow deletion if there are entries connected to it.
|
|
1692
760
|
*/
|
|
1693
|
-
deleteModel
|
|
761
|
+
deleteModel(modelId: string): Promise<void>;
|
|
1694
762
|
/**
|
|
1695
763
|
* Possibility for users to trigger the model initialization.
|
|
1696
764
|
* They can hook into it and do what ever they want to.
|
|
1697
765
|
*
|
|
1698
766
|
* Primary idea behind this is creating the index, for the code models, in the ES.
|
|
1699
767
|
*/
|
|
1700
|
-
initializeModel
|
|
768
|
+
initializeModel(modelId: string, data: Record<string, any>): Promise<boolean>;
|
|
1701
769
|
/**
|
|
1702
770
|
* Get an instance of CmsModelManager for given content modelId.
|
|
1703
771
|
*
|
|
1704
772
|
* @see CmsModelManager
|
|
1705
773
|
*/
|
|
1706
|
-
getEntryManager
|
|
774
|
+
getEntryManager<T = any>(model: CmsModel | string): Promise<CmsModelManager<T>>;
|
|
1707
775
|
/**
|
|
1708
776
|
* Get all content model managers mapped by modelId.
|
|
1709
777
|
* @see CmsModelManager
|
|
1710
778
|
*/
|
|
1711
|
-
getEntryManagers
|
|
779
|
+
getEntryManagers(): Map<string, CmsModelManager>;
|
|
1712
780
|
/**
|
|
1713
781
|
* Clear all the model caches.
|
|
1714
782
|
*/
|
|
1715
|
-
clearModelsCache
|
|
783
|
+
clearModelsCache(): void;
|
|
1716
784
|
/**
|
|
1717
785
|
* Lifecycle Events
|
|
1718
786
|
*/
|
|
@@ -1852,7 +920,7 @@ export interface CmsEntryListWhere {
|
|
|
1852
920
|
/**
|
|
1853
921
|
* This is to allow querying by any content model field defined by the user.
|
|
1854
922
|
*/
|
|
1855
|
-
[key: string]: string | number | boolean | undefined | string[] | number[] | null | CmsEntryListWhere[] | CmsEntryListWhere | CmsEntryListWhereRef;
|
|
923
|
+
[key: string]: string | number | boolean | Date | undefined | string[] | number[] | null | CmsEntryListWhere[] | CmsEntryListWhere | CmsEntryListWhereRef;
|
|
1856
924
|
/**
|
|
1857
925
|
* To allow querying via nested queries, we added the AND / OR properties.
|
|
1858
926
|
*/
|
|
@@ -2048,19 +1116,45 @@ export interface OnEntryUnpublishErrorTopicParams {
|
|
|
2048
1116
|
entry: CmsEntry;
|
|
2049
1117
|
model: CmsModel;
|
|
2050
1118
|
}
|
|
1119
|
+
/**
|
|
1120
|
+
* Delete
|
|
1121
|
+
*/
|
|
2051
1122
|
export interface OnEntryBeforeDeleteTopicParams {
|
|
2052
1123
|
entry: CmsEntry;
|
|
2053
1124
|
model: CmsModel;
|
|
1125
|
+
permanent: boolean;
|
|
2054
1126
|
}
|
|
2055
1127
|
export interface OnEntryAfterDeleteTopicParams {
|
|
2056
1128
|
entry: CmsEntry;
|
|
2057
1129
|
model: CmsModel;
|
|
1130
|
+
permanent: boolean;
|
|
2058
1131
|
}
|
|
2059
1132
|
export interface OnEntryDeleteErrorTopicParams {
|
|
1133
|
+
error: Error;
|
|
1134
|
+
entry: CmsEntry;
|
|
1135
|
+
permanent: boolean;
|
|
1136
|
+
model: CmsModel;
|
|
1137
|
+
}
|
|
1138
|
+
/**
|
|
1139
|
+
* Restore from bin
|
|
1140
|
+
*/
|
|
1141
|
+
export interface OnEntryBeforeRestoreFromBinTopicParams {
|
|
1142
|
+
entry: CmsEntry;
|
|
1143
|
+
model: CmsModel;
|
|
1144
|
+
}
|
|
1145
|
+
export interface OnEntryAfterRestoreFromBinTopicParams {
|
|
1146
|
+
entry: CmsEntry;
|
|
1147
|
+
model: CmsModel;
|
|
1148
|
+
storageEntry: CmsEntry;
|
|
1149
|
+
}
|
|
1150
|
+
export interface OnEntryRestoreFromBinErrorTopicParams {
|
|
2060
1151
|
error: Error;
|
|
2061
1152
|
entry: CmsEntry;
|
|
2062
1153
|
model: CmsModel;
|
|
2063
1154
|
}
|
|
1155
|
+
/**
|
|
1156
|
+
* Delete Revision
|
|
1157
|
+
*/
|
|
2064
1158
|
export interface OnEntryRevisionBeforeDeleteTopicParams {
|
|
2065
1159
|
entry: CmsEntry;
|
|
2066
1160
|
model: CmsModel;
|
|
@@ -2074,6 +1168,9 @@ export interface OnEntryRevisionDeleteErrorTopicParams {
|
|
|
2074
1168
|
entry: CmsEntry;
|
|
2075
1169
|
model: CmsModel;
|
|
2076
1170
|
}
|
|
1171
|
+
/**
|
|
1172
|
+
* Delete multiple
|
|
1173
|
+
*/
|
|
2077
1174
|
export interface OnEntryBeforeDeleteMultipleTopicParams {
|
|
2078
1175
|
model: CmsModel;
|
|
2079
1176
|
entries: CmsEntry[];
|
|
@@ -2090,10 +1187,16 @@ export interface OnEntryDeleteMultipleErrorTopicParams {
|
|
|
2090
1187
|
ids: string[];
|
|
2091
1188
|
error: Error;
|
|
2092
1189
|
}
|
|
1190
|
+
/**
|
|
1191
|
+
* Get
|
|
1192
|
+
*/
|
|
2093
1193
|
export interface OnEntryBeforeGetTopicParams {
|
|
2094
1194
|
model: CmsModel;
|
|
2095
1195
|
where: CmsEntryListWhere;
|
|
2096
1196
|
}
|
|
1197
|
+
/**
|
|
1198
|
+
* List
|
|
1199
|
+
*/
|
|
2097
1200
|
export interface EntryBeforeListTopicParams {
|
|
2098
1201
|
where: CmsEntryListWhere;
|
|
2099
1202
|
model: CmsModel;
|
|
@@ -2111,9 +1214,12 @@ export interface CreateCmsEntryInput {
|
|
|
2111
1214
|
createdOn?: Date | string;
|
|
2112
1215
|
modifiedOn?: Date | string | null;
|
|
2113
1216
|
savedOn?: Date | string;
|
|
1217
|
+
deletedOn?: Date | string | null;
|
|
1218
|
+
restoredOn?: Date | string | null;
|
|
2114
1219
|
createdBy?: CmsIdentity;
|
|
2115
|
-
modifiedBy?: CmsIdentity | null;
|
|
2116
1220
|
savedBy?: CmsIdentity;
|
|
1221
|
+
deletedBy?: CmsIdentity | null;
|
|
1222
|
+
restoredBy?: CmsIdentity | null;
|
|
2117
1223
|
firstPublishedOn?: Date | string;
|
|
2118
1224
|
lastPublishedOn?: Date | string;
|
|
2119
1225
|
firstPublishedBy?: CmsIdentity;
|
|
@@ -2124,9 +1230,13 @@ export interface CreateCmsEntryInput {
|
|
|
2124
1230
|
revisionCreatedOn?: Date | string;
|
|
2125
1231
|
revisionModifiedOn?: Date | string | null;
|
|
2126
1232
|
revisionSavedOn?: Date | string;
|
|
1233
|
+
revisionDeletedOn?: Date | string | null;
|
|
1234
|
+
revisionRestoredOn?: Date | string | null;
|
|
2127
1235
|
revisionCreatedBy?: CmsIdentity;
|
|
2128
1236
|
revisionModifiedBy?: CmsIdentity | null;
|
|
2129
1237
|
revisionSavedBy?: CmsIdentity;
|
|
1238
|
+
revisionDeletedBy?: CmsIdentity | null;
|
|
1239
|
+
revisionRestoredBy?: CmsIdentity | null;
|
|
2130
1240
|
revisionFirstPublishedOn?: Date | string;
|
|
2131
1241
|
revisionLastPublishedOn?: Date | string;
|
|
2132
1242
|
revisionFirstPublishedBy?: CmsIdentity;
|
|
@@ -2186,11 +1296,15 @@ export interface UpdateCmsEntryInput {
|
|
|
2186
1296
|
revisionCreatedOn?: Date | string | null;
|
|
2187
1297
|
revisionModifiedOn?: Date | string | null;
|
|
2188
1298
|
revisionSavedOn?: Date | string | null;
|
|
1299
|
+
revisionDeletedOn?: Date | string | null;
|
|
1300
|
+
revisionRestoredOn?: Date | string | null;
|
|
2189
1301
|
revisionFirstPublishedOn?: Date | string | null;
|
|
2190
1302
|
revisionLastPublishedOn?: Date | string | null;
|
|
2191
1303
|
revisionModifiedBy?: CmsIdentity | null;
|
|
2192
1304
|
revisionCreatedBy?: CmsIdentity | null;
|
|
2193
1305
|
revisionSavedBy?: CmsIdentity | null;
|
|
1306
|
+
revisionDeletedBy?: CmsIdentity | null;
|
|
1307
|
+
revisionRestoredBy?: CmsIdentity | null;
|
|
2194
1308
|
revisionFirstPublishedBy?: CmsIdentity | null;
|
|
2195
1309
|
revisionLastPublishedBy?: CmsIdentity | null;
|
|
2196
1310
|
/**
|
|
@@ -2199,11 +1313,15 @@ export interface UpdateCmsEntryInput {
|
|
|
2199
1313
|
createdOn?: Date | string | null;
|
|
2200
1314
|
modifiedOn?: Date | string | null;
|
|
2201
1315
|
savedOn?: Date | string | null;
|
|
1316
|
+
deletedOn?: Date | string | null;
|
|
1317
|
+
restoredOn?: Date | string | null;
|
|
2202
1318
|
firstPublishedOn?: Date | string | null;
|
|
2203
1319
|
lastPublishedOn?: Date | string | null;
|
|
2204
1320
|
createdBy?: CmsIdentity | null;
|
|
2205
1321
|
modifiedBy?: CmsIdentity | null;
|
|
2206
1322
|
savedBy?: CmsIdentity | null;
|
|
1323
|
+
deletedBy?: CmsIdentity | null;
|
|
1324
|
+
restoredBy?: CmsIdentity | null;
|
|
2207
1325
|
firstPublishedBy?: CmsIdentity | null;
|
|
2208
1326
|
lastPublishedBy?: CmsIdentity | null;
|
|
2209
1327
|
wbyAco_location?: {
|
|
@@ -2231,6 +1349,10 @@ export interface CmsDeleteEntryOptions {
|
|
|
2231
1349
|
* This is to force clean the entry records that might have been left behind a failed delete.
|
|
2232
1350
|
*/
|
|
2233
1351
|
force?: boolean;
|
|
1352
|
+
/**
|
|
1353
|
+
* Destroying the entry directly, without moving it to the bin.
|
|
1354
|
+
*/
|
|
1355
|
+
permanently?: boolean;
|
|
2234
1356
|
}
|
|
2235
1357
|
/**
|
|
2236
1358
|
* @category Context
|
|
@@ -2245,133 +1367,6 @@ export declare type DeleteMultipleEntriesResponse = {
|
|
|
2245
1367
|
export interface CmsEntryValidateResponse {
|
|
2246
1368
|
[key: string]: any;
|
|
2247
1369
|
}
|
|
2248
|
-
/**
|
|
2249
|
-
* Cms Entry CRUD methods in the context.
|
|
2250
|
-
*
|
|
2251
|
-
* @category Context
|
|
2252
|
-
* @category CmsEntry
|
|
2253
|
-
*/
|
|
2254
|
-
export interface CmsEntryContext {
|
|
2255
|
-
/**
|
|
2256
|
-
* Get a single content entry for a model.
|
|
2257
|
-
*/
|
|
2258
|
-
getEntry: (model: CmsModel, params: CmsEntryGetParams) => Promise<CmsEntry>;
|
|
2259
|
-
/**
|
|
2260
|
-
* Get a list of entries for a model by a given ID (revision).
|
|
2261
|
-
*/
|
|
2262
|
-
getEntriesByIds: (model: CmsModel, revisions: string[]) => Promise<CmsEntry[]>;
|
|
2263
|
-
/**
|
|
2264
|
-
* Get the entry for a model by a given ID.
|
|
2265
|
-
*/
|
|
2266
|
-
getEntryById: (model: CmsModel, revision: string) => Promise<CmsEntry>;
|
|
2267
|
-
/**
|
|
2268
|
-
* List entries for a model. Internal method used by get, listLatest and listPublished.
|
|
2269
|
-
*/
|
|
2270
|
-
listEntries: <T = CmsEntryValues>(model: CmsModel, params: CmsEntryListParams) => Promise<[CmsEntry<T>[], CmsEntryMeta]>;
|
|
2271
|
-
/**
|
|
2272
|
-
* Lists the latest entries. Used for manage API.
|
|
2273
|
-
*/
|
|
2274
|
-
listLatestEntries: <T = CmsEntryValues>(model: CmsModel, params?: CmsEntryListParams) => Promise<[CmsEntry<T>[], CmsEntryMeta]>;
|
|
2275
|
-
/**
|
|
2276
|
-
* List published entries. Used for read API.
|
|
2277
|
-
*/
|
|
2278
|
-
listPublishedEntries: <T = CmsEntryValues>(model: CmsModel, params?: CmsEntryListParams) => Promise<[CmsEntry<T>[], CmsEntryMeta]>;
|
|
2279
|
-
/**
|
|
2280
|
-
* List published entries by IDs.
|
|
2281
|
-
*/
|
|
2282
|
-
getPublishedEntriesByIds: (model: CmsModel, ids: string[]) => Promise<CmsEntry[]>;
|
|
2283
|
-
/**
|
|
2284
|
-
* List latest entries by IDs.
|
|
2285
|
-
*/
|
|
2286
|
-
getLatestEntriesByIds: (model: CmsModel, ids: string[]) => Promise<CmsEntry[]>;
|
|
2287
|
-
/**
|
|
2288
|
-
* Create a new content entry.
|
|
2289
|
-
*/
|
|
2290
|
-
createEntry: (model: CmsModel, input: CreateCmsEntryInput, options?: CreateCmsEntryOptionsInput) => Promise<CmsEntry>;
|
|
2291
|
-
/**
|
|
2292
|
-
* Create a new entry from already existing entry.
|
|
2293
|
-
*/
|
|
2294
|
-
createEntryRevisionFrom: (model: CmsModel, id: string, input: CreateFromCmsEntryInput, options?: CreateRevisionCmsEntryOptionsInput) => Promise<CmsEntry>;
|
|
2295
|
-
/**
|
|
2296
|
-
* Update existing entry.
|
|
2297
|
-
*/
|
|
2298
|
-
updateEntry: (model: CmsModel, id: string, input: UpdateCmsEntryInput, meta?: Record<string, any>, options?: UpdateCmsEntryOptionsInput) => Promise<CmsEntry>;
|
|
2299
|
-
/**
|
|
2300
|
-
* Validate the entry - either new one or existing one.
|
|
2301
|
-
*/
|
|
2302
|
-
validateEntry: (model: CmsModel, id?: string, input?: UpdateCmsEntryInput) => Promise<CmsEntryValidateResponse>;
|
|
2303
|
-
/**
|
|
2304
|
-
* Move entry, and all its revisions, to a new folder.
|
|
2305
|
-
*/
|
|
2306
|
-
moveEntry: (model: CmsModel, id: string, folderId: string) => Promise<CmsEntry>;
|
|
2307
|
-
/**
|
|
2308
|
-
* Method that republishes entry with given identifier.
|
|
2309
|
-
* @internal
|
|
2310
|
-
*/
|
|
2311
|
-
republishEntry: (model: CmsModel, id: string) => Promise<CmsEntry>;
|
|
2312
|
-
/**
|
|
2313
|
-
* Delete only a certain revision of the entry.
|
|
2314
|
-
*/
|
|
2315
|
-
deleteEntryRevision: (model: CmsModel, id: string) => Promise<void>;
|
|
2316
|
-
/**
|
|
2317
|
-
* Delete entry with all its revisions.
|
|
2318
|
-
*/
|
|
2319
|
-
deleteEntry: (model: CmsModel, id: string, options?: CmsDeleteEntryOptions) => Promise<void>;
|
|
2320
|
-
/**
|
|
2321
|
-
* Delete multiple entries
|
|
2322
|
-
*/
|
|
2323
|
-
deleteMultipleEntries: (model: CmsModel, params: DeleteMultipleEntriesParams) => Promise<DeleteMultipleEntriesResponse>;
|
|
2324
|
-
/**
|
|
2325
|
-
* Publish entry.
|
|
2326
|
-
*/
|
|
2327
|
-
publishEntry: (model: CmsModel, id: string) => Promise<CmsEntry>;
|
|
2328
|
-
/**
|
|
2329
|
-
* Unpublish entry.
|
|
2330
|
-
*/
|
|
2331
|
-
unpublishEntry: (model: CmsModel, id: string) => Promise<CmsEntry>;
|
|
2332
|
-
/**
|
|
2333
|
-
* Get all entry revisions.
|
|
2334
|
-
*/
|
|
2335
|
-
getEntryRevisions: (model: CmsModel, id: string) => Promise<CmsEntry[]>;
|
|
2336
|
-
/**
|
|
2337
|
-
* List all unique values for a given field.
|
|
2338
|
-
*
|
|
2339
|
-
* @internal
|
|
2340
|
-
*/
|
|
2341
|
-
getUniqueFieldValues: (model: CmsModel, params: GetUniqueFieldValuesParams) => Promise<CmsEntryUniqueValue[]>;
|
|
2342
|
-
/**
|
|
2343
|
-
* Lifecycle Events
|
|
2344
|
-
*/
|
|
2345
|
-
onEntryBeforeCreate: Topic<OnEntryBeforeCreateTopicParams>;
|
|
2346
|
-
onEntryAfterCreate: Topic<OnEntryAfterCreateTopicParams>;
|
|
2347
|
-
onEntryCreateError: Topic<OnEntryCreateErrorTopicParams>;
|
|
2348
|
-
onEntryRevisionBeforeCreate: Topic<OnEntryRevisionBeforeCreateTopicParams>;
|
|
2349
|
-
onEntryRevisionAfterCreate: Topic<OnEntryRevisionAfterCreateTopicParams>;
|
|
2350
|
-
onEntryRevisionCreateError: Topic<OnEntryCreateRevisionErrorTopicParams>;
|
|
2351
|
-
onEntryBeforeUpdate: Topic<OnEntryBeforeUpdateTopicParams>;
|
|
2352
|
-
onEntryAfterUpdate: Topic<OnEntryAfterUpdateTopicParams>;
|
|
2353
|
-
onEntryUpdateError: Topic<OnEntryUpdateErrorTopicParams>;
|
|
2354
|
-
onEntryBeforeMove: Topic<OnEntryBeforeMoveTopicParams>;
|
|
2355
|
-
onEntryAfterMove: Topic<OnEntryAfterMoveTopicParams>;
|
|
2356
|
-
onEntryMoveError: Topic<OnEntryMoveErrorTopicParams>;
|
|
2357
|
-
onEntryBeforeDelete: Topic<OnEntryBeforeDeleteTopicParams>;
|
|
2358
|
-
onEntryAfterDelete: Topic<OnEntryAfterDeleteTopicParams>;
|
|
2359
|
-
onEntryDeleteError: Topic<OnEntryDeleteErrorTopicParams>;
|
|
2360
|
-
onEntryRevisionBeforeDelete: Topic<OnEntryRevisionBeforeDeleteTopicParams>;
|
|
2361
|
-
onEntryRevisionAfterDelete: Topic<OnEntryRevisionAfterDeleteTopicParams>;
|
|
2362
|
-
onEntryRevisionDeleteError: Topic<OnEntryRevisionDeleteErrorTopicParams>;
|
|
2363
|
-
onEntryBeforePublish: Topic<OnEntryBeforePublishTopicParams>;
|
|
2364
|
-
onEntryAfterPublish: Topic<OnEntryAfterPublishTopicParams>;
|
|
2365
|
-
onEntryPublishError: Topic<OnEntryPublishErrorTopicParams>;
|
|
2366
|
-
onEntryBeforeRepublish: Topic<OnEntryBeforeRepublishTopicParams>;
|
|
2367
|
-
onEntryAfterRepublish: Topic<OnEntryAfterRepublishTopicParams>;
|
|
2368
|
-
onEntryRepublishError: Topic<OnEntryRepublishErrorTopicParams>;
|
|
2369
|
-
onEntryBeforeUnpublish: Topic<OnEntryBeforeUnpublishTopicParams>;
|
|
2370
|
-
onEntryAfterUnpublish: Topic<OnEntryAfterUnpublishTopicParams>;
|
|
2371
|
-
onEntryUnpublishError: Topic<OnEntryUnpublishErrorTopicParams>;
|
|
2372
|
-
onEntryBeforeGet: Topic<OnEntryBeforeGetTopicParams>;
|
|
2373
|
-
onEntryBeforeList: Topic<EntryBeforeListTopicParams>;
|
|
2374
|
-
}
|
|
2375
1370
|
/**
|
|
2376
1371
|
* Parameters for CmsEntryResolverFactory.
|
|
2377
1372
|
*
|
|
@@ -2617,6 +1612,28 @@ export interface CmsEntryStorageOperationsDeleteRevisionParams<T extends CmsStor
|
|
|
2617
1612
|
export interface CmsEntryStorageOperationsDeleteParams {
|
|
2618
1613
|
entry: CmsEntry;
|
|
2619
1614
|
}
|
|
1615
|
+
export interface CmsEntryStorageOperationsMoveToBinParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
1616
|
+
/**
|
|
1617
|
+
* The modified entry that is going to be saved as published.
|
|
1618
|
+
* Entry is in its original form.
|
|
1619
|
+
*/
|
|
1620
|
+
entry: CmsEntry;
|
|
1621
|
+
/**
|
|
1622
|
+
* The modified entry and prepared for the storage.
|
|
1623
|
+
*/
|
|
1624
|
+
storageEntry: T;
|
|
1625
|
+
}
|
|
1626
|
+
export interface CmsEntryStorageOperationsRestoreFromBinParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
1627
|
+
/**
|
|
1628
|
+
* The modified entry that is going to be saved as restored.
|
|
1629
|
+
* Entry is in its original form.
|
|
1630
|
+
*/
|
|
1631
|
+
entry: CmsEntry;
|
|
1632
|
+
/**
|
|
1633
|
+
* The modified entry and prepared for the storage.
|
|
1634
|
+
*/
|
|
1635
|
+
storageEntry: T;
|
|
1636
|
+
}
|
|
2620
1637
|
export interface CmsEntryStorageOperationsDeleteEntriesParams {
|
|
2621
1638
|
entries: string[];
|
|
2622
1639
|
}
|
|
@@ -2762,6 +1779,14 @@ export interface CmsEntryStorageOperations<T extends CmsStorageEntry = CmsStorag
|
|
|
2762
1779
|
* Delete the entry.
|
|
2763
1780
|
*/
|
|
2764
1781
|
delete: (model: CmsModel, params: CmsEntryStorageOperationsDeleteParams) => Promise<void>;
|
|
1782
|
+
/**
|
|
1783
|
+
* Move the entry to bin.
|
|
1784
|
+
*/
|
|
1785
|
+
moveToBin: (model: CmsModel, params: CmsEntryStorageOperationsMoveToBinParams) => Promise<void>;
|
|
1786
|
+
/**
|
|
1787
|
+
* Restore the entry from the bin.
|
|
1788
|
+
*/
|
|
1789
|
+
restoreFromBin: (model: CmsModel, params: CmsEntryStorageOperationsRestoreFromBinParams<T>) => Promise<T>;
|
|
2765
1790
|
/**
|
|
2766
1791
|
* Delete multiple entries, with a limit on how much can be deleted in one call.
|
|
2767
1792
|
*/
|