@webiny/api-headless-cms 0.0.0-unstable.de38392959 → 0.0.0-unstable.e0bfc55d5a
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 +18 -6
- package/constants.js +29 -16
- package/constants.js.map +1 -1
- package/context.d.ts +1 -1
- package/context.js +61 -32
- package/context.js.map +1 -1
- package/crud/AccessControl/AccessControl.d.ts +98 -0
- package/crud/AccessControl/AccessControl.js +542 -0
- package/crud/AccessControl/AccessControl.js.map +1 -0
- package/crud/AccessControl/README.md +47 -0
- package/crud/AccessControl/groups-own.png +0 -0
- package/crud/AccessControl/models-own.png +0 -0
- 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.d.ts +6 -2
- package/crud/contentEntry/afterDelete.js +15 -1
- package/crud/contentEntry/afterDelete.js.map +1 -1
- package/crud/contentEntry/beforeCreate.d.ts +2 -2
- package/crud/contentEntry/beforeCreate.js.map +1 -1
- package/crud/contentEntry/beforeUpdate.d.ts +2 -2
- package/crud/contentEntry/beforeUpdate.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createEntryData.d.ts +8 -8
- package/crud/contentEntry/entryDataFactories/createEntryData.js +30 -4
- package/crud/contentEntry/entryDataFactories/createEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createEntryRevisionFromData.d.ts +8 -6
- package/crud/contentEntry/entryDataFactories/createEntryRevisionFromData.js +54 -11
- package/crud/contentEntry/entryDataFactories/createEntryRevisionFromData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createPublishEntryData.d.ts +5 -5
- package/crud/contentEntry/entryDataFactories/createPublishEntryData.js +22 -20
- package/crud/contentEntry/entryDataFactories/createPublishEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createRepublishEntryData.d.ts +3 -3
- package/crud/contentEntry/entryDataFactories/createRepublishEntryData.js +18 -16
- package/crud/contentEntry/entryDataFactories/createRepublishEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.d.ts +5 -5
- package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.js +10 -8
- package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createUpdateEntryData.d.ts +5 -5
- 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.d.ts +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.d.ts +2 -2
- package/crud/contentEntry/entryDataValidation.js.map +1 -1
- package/crud/contentEntry/markLockedFields.d.ts +1 -1
- package/crud/contentEntry/markLockedFields.js.map +1 -1
- package/crud/contentEntry/referenceFieldsMapping.d.ts +1 -1
- package/crud/contentEntry/referenceFieldsMapping.js +10 -10
- package/crud/contentEntry/referenceFieldsMapping.js.map +1 -1
- package/crud/contentEntry/searchableFields.d.ts +2 -2
- package/crud/contentEntry/searchableFields.js.map +1 -1
- package/crud/contentEntry/useCases/DeleteEntry/DeleteEntry.d.ts +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 +54 -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 +9 -0
- package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIds.js +21 -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 +13 -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 +9 -0
- package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIds.js +21 -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 +13 -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 +9 -0
- package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryId.js +22 -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 +15 -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 +9 -0
- package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryId.js +22 -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 +11 -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 +9 -0
- package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIds.js +21 -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 +13 -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 +9 -0
- package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.js +22 -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 +11 -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 +9 -0
- package/crud/contentEntry/useCases/GetRevisionById/GetRevisionById.js +22 -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 +11 -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 +9 -0
- package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryId.js +21 -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 +13 -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 +14 -0
- package/crud/contentEntry/useCases/ListEntries/ListEntriesOperation.js +24 -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 +26 -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 +9 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperation.js +19 -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 +53 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/TransformEntryRestoreFromBin.js.map +1 -0
- package/crud/contentEntry/useCases/RestoreEntryFromBin/index.d.ts +25 -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.d.ts +6 -8
- package/crud/contentEntry.crud.js +304 -357
- package/crud/contentEntry.crud.js.map +1 -1
- package/crud/contentModel/beforeCreate.d.ts +2 -2
- package/crud/contentModel/beforeCreate.js.map +1 -1
- package/crud/contentModel/beforeDelete.d.ts +3 -5
- package/crud/contentModel/beforeDelete.js +49 -15
- package/crud/contentModel/beforeDelete.js.map +1 -1
- package/crud/contentModel/beforeUpdate.d.ts +2 -2
- package/crud/contentModel/beforeUpdate.js.map +1 -1
- package/crud/contentModel/compatibility/modelApiName.d.ts +1 -1
- package/crud/contentModel/compatibility/modelApiName.js.map +1 -1
- package/crud/contentModel/contentModelManagerFactory.d.ts +2 -2
- package/crud/contentModel/contentModelManagerFactory.js.map +1 -1
- package/crud/contentModel/createFieldStorageId.d.ts +1 -1
- package/crud/contentModel/createFieldStorageId.js.map +1 -1
- package/crud/contentModel/defaultFields.d.ts +1 -1
- package/crud/contentModel/defaultFields.js.map +1 -1
- package/crud/contentModel/ensureTypeTag.d.ts +1 -1
- package/crud/contentModel/ensureTypeTag.js.map +1 -1
- package/crud/contentModel/fields/descriptionField.d.ts +6 -2
- package/crud/contentModel/fields/descriptionField.js +14 -28
- package/crud/contentModel/fields/descriptionField.js.map +1 -1
- package/crud/contentModel/fields/getApplicableFieldById.d.ts +2 -0
- package/crud/contentModel/fields/getApplicableFieldById.js +15 -0
- package/crud/contentModel/fields/getApplicableFieldById.js.map +1 -0
- package/crud/contentModel/fields/imageField.d.ts +2 -2
- package/crud/contentModel/fields/imageField.js +9 -28
- package/crud/contentModel/fields/imageField.js.map +1 -1
- package/crud/contentModel/fields/titleField.d.ts +6 -2
- package/crud/contentModel/fields/titleField.js +14 -43
- package/crud/contentModel/fields/titleField.js.map +1 -1
- package/crud/contentModel/listModelsFromDatabase.d.ts +3 -3
- package/crud/contentModel/listModelsFromDatabase.js.map +1 -1
- package/crud/contentModel/validate/endingAllowed.d.ts +1 -1
- package/crud/contentModel/validate/endingAllowed.js.map +1 -1
- package/crud/contentModel/validate/isModelEndingAllowed.js +1 -2
- package/crud/contentModel/validate/isModelEndingAllowed.js.map +1 -1
- package/crud/contentModel/validate/modelId.d.ts +1 -1
- package/crud/contentModel/validate/modelId.js.map +1 -1
- package/crud/contentModel/validate/pluralApiName.d.ts +1 -1
- package/crud/contentModel/validate/pluralApiName.js.map +1 -1
- package/crud/contentModel/validate/singularApiName.d.ts +1 -1
- package/crud/contentModel/validate/singularApiName.js.map +1 -1
- package/crud/contentModel/validateModel.d.ts +1 -1
- package/crud/contentModel/validateModel.js.map +1 -1
- package/crud/contentModel/validateModelFields.d.ts +1 -1
- package/crud/contentModel/validateModelFields.js +1 -1
- package/crud/contentModel/validateModelFields.js.map +1 -1
- package/crud/contentModel/validateStorageId.d.ts +1 -0
- package/crud/contentModel/validateStorageId.js +19 -0
- package/crud/contentModel/validateStorageId.js.map +1 -0
- package/crud/contentModel/validation.d.ts +197 -176
- package/crud/contentModel/validation.js +5 -5
- package/crud/contentModel/validation.js.map +1 -1
- package/crud/contentModel.crud.d.ts +6 -6
- package/crud/contentModel.crud.js +76 -37
- package/crud/contentModel.crud.js.map +1 -1
- package/crud/contentModelGroup/beforeCreate.d.ts +3 -3
- package/crud/contentModelGroup/beforeCreate.js.map +1 -1
- package/crud/contentModelGroup/beforeDelete.d.ts +3 -3
- package/crud/contentModelGroup/beforeDelete.js.map +1 -1
- package/crud/contentModelGroup/beforeUpdate.d.ts +3 -3
- package/crud/contentModelGroup/beforeUpdate.js.map +1 -1
- package/crud/contentModelGroup/listGroupsFromDatabase.d.ts +1 -1
- package/crud/contentModelGroup/listGroupsFromDatabase.js.map +1 -1
- package/crud/contentModelGroup/validation.d.ts +1 -1
- package/crud/contentModelGroup/validation.js.map +1 -1
- package/crud/contentModelGroup.crud.d.ts +6 -6
- package/crud/contentModelGroup.crud.js +17 -28
- package/crud/contentModelGroup.crud.js.map +1 -1
- package/crud/system.crud.d.ts +4 -4
- package/crud/system.crud.js +10 -0
- package/crud/system.crud.js.map +1 -1
- package/export/crud/exporting.d.ts +2 -2
- package/export/crud/exporting.js.map +1 -1
- package/export/crud/importing.d.ts +2 -2
- package/export/crud/importing.js.map +1 -1
- package/export/crud/imports/importData.d.ts +2 -2
- package/export/crud/imports/importData.js.map +1 -1
- package/export/crud/imports/importGroups.d.ts +2 -2
- package/export/crud/imports/importGroups.js.map +1 -1
- package/export/crud/imports/importModels.d.ts +2 -2
- package/export/crud/imports/importModels.js.map +1 -1
- package/export/crud/imports/validateGroups.d.ts +2 -2
- package/export/crud/imports/validateGroups.js.map +1 -1
- package/export/crud/imports/validateInput.d.ts +2 -2
- package/export/crud/imports/validateInput.js.map +1 -1
- package/export/crud/imports/validateModels.d.ts +2 -2
- package/export/crud/imports/validateModels.js.map +1 -1
- package/export/crud/index.d.ts +1 -1
- package/export/crud/index.js.map +1 -1
- package/export/crud/sanitize.d.ts +3 -3
- package/export/crud/sanitize.js +2 -1
- package/export/crud/sanitize.js.map +1 -1
- package/export/graphql/index.d.ts +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.d.ts +5 -5
- package/export/types.js +1 -2
- package/export/types.js.map +1 -1
- package/fieldConverters/CmsModelDefaultFieldConverterPlugin.d.ts +5 -3
- package/fieldConverters/CmsModelDefaultFieldConverterPlugin.js.map +1 -1
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.d.ts +3 -2
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js +23 -65
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js.map +1 -1
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.d.ts +3 -2
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.js +2 -2
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.js.map +1 -1
- package/fieldConverters/index.d.ts +3 -0
- package/fieldConverters/index.js +4 -0
- package/fieldConverters/index.js.map +1 -1
- package/graphql/buildSchemaPlugins.d.ts +3 -3
- package/graphql/buildSchemaPlugins.js.map +1 -1
- package/graphql/checkEndpointAccess.d.ts +1 -1
- package/graphql/checkEndpointAccess.js.map +1 -1
- package/graphql/createExecutableSchema.d.ts +2 -2
- package/graphql/createExecutableSchema.js +14 -7
- package/graphql/createExecutableSchema.js.map +1 -1
- package/graphql/createRequestBody.d.ts +1 -1
- package/graphql/createRequestBody.js.map +1 -1
- package/graphql/formatErrorPayload.js.map +1 -1
- package/graphql/generateSchema.d.ts +2 -2
- package/graphql/generateSchema.js +6 -1
- package/graphql/generateSchema.js.map +1 -1
- package/graphql/getSchema/generateCacheId.d.ts +10 -0
- package/graphql/getSchema/generateCacheId.js +17 -0
- package/graphql/getSchema/generateCacheId.js.map +1 -0
- package/graphql/getSchema/generateCacheKey.d.ts +10 -0
- package/graphql/getSchema/generateCacheKey.js +34 -0
- package/graphql/getSchema/generateCacheKey.js.map +1 -0
- package/graphql/getSchema.d.ts +4 -4
- package/graphql/getSchema.js +13 -50
- package/graphql/getSchema.js.map +1 -1
- package/graphql/graphQLHandlerFactory.d.ts +2 -2
- package/graphql/graphQLHandlerFactory.js.map +1 -1
- package/graphql/handleRequest.d.ts +2 -2
- package/graphql/handleRequest.js +8 -1
- package/graphql/handleRequest.js.map +1 -1
- package/graphql/index.d.ts +4 -3
- package/graphql/index.js +1 -1
- package/graphql/index.js.map +1 -1
- package/graphql/scalars/RevisionId.d.ts +2 -0
- package/graphql/scalars/RevisionId.js +26 -0
- package/graphql/scalars/RevisionId.js.map +1 -0
- package/graphql/scalars/RevisionIdScalarPlugin.d.ts +2 -0
- package/graphql/scalars/RevisionIdScalarPlugin.js +18 -0
- package/graphql/scalars/RevisionIdScalarPlugin.js.map +1 -0
- package/graphql/schema/baseContentSchema.d.ts +3 -3
- 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 +3 -3
- package/graphql/schema/contentEntries.js +3 -4
- package/graphql/schema/contentEntries.js.map +1 -1
- package/graphql/schema/contentModelGroups.d.ts +3 -3
- package/graphql/schema/contentModelGroups.js +1 -1
- package/graphql/schema/contentModelGroups.js.map +1 -1
- package/graphql/schema/contentModels.d.ts +4 -5
- package/graphql/schema/contentModels.js +21 -5
- package/graphql/schema/contentModels.js.map +1 -1
- package/graphql/schema/createFieldResolvers.d.ts +2 -2
- package/graphql/schema/createFieldResolvers.js +1 -3
- package/graphql/schema/createFieldResolvers.js.map +1 -1
- package/graphql/schema/createFieldTypePluginRecords.d.ts +2 -2
- package/graphql/schema/createFieldTypePluginRecords.js.map +1 -1
- package/graphql/schema/createManageResolvers.d.ts +1 -2
- package/graphql/schema/createManageResolvers.js +24 -49
- package/graphql/schema/createManageResolvers.js.map +1 -1
- package/graphql/schema/createManageSDL.d.ts +2 -2
- package/graphql/schema/createManageSDL.js +14 -5
- package/graphql/schema/createManageSDL.js.map +1 -1
- package/graphql/schema/createPreviewResolvers.d.ts +1 -2
- package/graphql/schema/createPreviewResolvers.js +4 -7
- package/graphql/schema/createPreviewResolvers.js.map +1 -1
- package/graphql/schema/createReadResolvers.d.ts +1 -2
- package/graphql/schema/createReadResolvers.js +4 -7
- package/graphql/schema/createReadResolvers.js.map +1 -1
- package/graphql/schema/createReadSDL.d.ts +2 -2
- package/graphql/schema/createReadSDL.js +6 -7
- package/graphql/schema/createReadSDL.js.map +1 -1
- package/graphql/schema/createSingularResolvers.d.ts +12 -0
- package/graphql/schema/createSingularResolvers.js +56 -0
- package/graphql/schema/createSingularResolvers.js.map +1 -0
- package/graphql/schema/createSingularSDL.d.ts +12 -0
- package/graphql/schema/createSingularSDL.js +95 -0
- package/graphql/schema/createSingularSDL.js.map +1 -0
- package/graphql/schema/resolvers/manage/normalizeGraphQlInput.d.ts +7 -0
- package/graphql/schema/resolvers/manage/normalizeGraphQlInput.js +59 -0
- package/graphql/schema/resolvers/manage/normalizeGraphQlInput.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveCreate.d.ts +2 -2
- package/graphql/schema/resolvers/manage/resolveCreate.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveCreateFrom.d.ts +2 -2
- package/graphql/schema/resolvers/manage/resolveCreateFrom.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveDelete.d.ts +2 -2
- 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.d.ts +2 -2
- package/graphql/schema/resolvers/manage/resolveDeleteMultiple.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGet.d.ts +2 -2
- package/graphql/schema/resolvers/manage/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGetByIds.d.ts +2 -2
- package/graphql/schema/resolvers/manage/resolveGetByIds.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGetRevisions.d.ts +2 -2
- package/graphql/schema/resolvers/manage/resolveGetRevisions.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGetUniqueFieldValues.d.ts +2 -2
- package/graphql/schema/resolvers/manage/resolveGetUniqueFieldValues.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveList.d.ts +2 -2
- 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.d.ts +2 -2
- package/graphql/schema/resolvers/manage/resolveMove.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolvePublish.d.ts +2 -2
- package/graphql/schema/resolvers/manage/resolvePublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveRepublish.d.ts +2 -2
- 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.d.ts +2 -2
- package/graphql/schema/resolvers/manage/resolveUnpublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveUpdate.d.ts +2 -2
- package/graphql/schema/resolvers/manage/resolveUpdate.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveValidate.d.ts +2 -2
- package/graphql/schema/resolvers/manage/resolveValidate.js.map +1 -1
- package/graphql/schema/resolvers/preview/resolveGet.d.ts +2 -2
- package/graphql/schema/resolvers/preview/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/preview/resolveList.d.ts +2 -2
- package/graphql/schema/resolvers/preview/resolveList.js.map +1 -1
- package/graphql/schema/resolvers/read/resolveGet.d.ts +2 -2
- package/graphql/schema/resolvers/read/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/read/resolveList.d.ts +2 -2
- package/graphql/schema/resolvers/read/resolveList.js.map +1 -1
- package/graphql/schema/resolvers/singular/resolveGet.d.ts +7 -0
- package/graphql/schema/resolvers/singular/resolveGet.js +21 -0
- package/graphql/schema/resolvers/singular/resolveGet.js.map +1 -0
- package/graphql/schema/resolvers/singular/resolveUpdate.d.ts +8 -0
- package/graphql/schema/resolvers/singular/resolveUpdate.js +21 -0
- package/graphql/schema/resolvers/singular/resolveUpdate.js.map +1 -0
- package/graphql/schema/schemaPlugins.d.ts +3 -3
- package/graphql/schema/schemaPlugins.js +32 -11
- package/graphql/schema/schemaPlugins.js.map +1 -1
- package/graphql/system.d.ts +1 -1
- package/graphql/system.js +2 -1
- package/graphql/system.js.map +1 -1
- package/graphqlFields/boolean.d.ts +1 -1
- package/graphqlFields/boolean.js.map +1 -1
- package/graphqlFields/datetime.d.ts +1 -1
- package/graphqlFields/datetime.js.map +1 -1
- package/graphqlFields/dynamicZone/dynamicZoneField.d.ts +1 -1
- package/graphqlFields/dynamicZone/dynamicZoneField.js +62 -8
- package/graphqlFields/dynamicZone/dynamicZoneField.js.map +1 -1
- package/graphqlFields/dynamicZone/index.d.ts +0 -1
- package/graphqlFields/dynamicZone/index.js +0 -7
- package/graphqlFields/dynamicZone/index.js.map +1 -1
- package/graphqlFields/file.d.ts +1 -1
- package/graphqlFields/file.js.map +1 -1
- package/graphqlFields/helpers.d.ts +1 -1
- package/graphqlFields/helpers.js.map +1 -1
- package/graphqlFields/index.d.ts +1 -1
- package/graphqlFields/index.js +2 -1
- package/graphqlFields/index.js.map +1 -1
- package/graphqlFields/json.d.ts +1 -1
- package/graphqlFields/json.js.map +1 -1
- package/graphqlFields/longText.d.ts +1 -1
- package/graphqlFields/longText.js.map +1 -1
- package/graphqlFields/number.d.ts +1 -1
- package/graphqlFields/number.js.map +1 -1
- package/graphqlFields/object.d.ts +2 -2
- package/graphqlFields/object.js +14 -0
- package/graphqlFields/object.js.map +1 -1
- package/graphqlFields/ref.d.ts +1 -1
- package/graphqlFields/ref.js +1 -1
- package/graphqlFields/ref.js.map +1 -1
- package/graphqlFields/richText/RichTextPluginsProcessor.d.ts +2 -2
- package/graphqlFields/richText/RichTextPluginsProcessor.js.map +1 -1
- package/graphqlFields/richText/richTextResolver.d.ts +2 -2
- package/graphqlFields/richText/richTextResolver.js +4 -19
- package/graphqlFields/richText/richTextResolver.js.map +1 -1
- package/graphqlFields/richText.d.ts +1 -1
- package/graphqlFields/richText.js.map +1 -1
- package/graphqlFields/searchableJson.d.ts +2 -0
- package/graphqlFields/searchableJson.js +60 -0
- package/graphqlFields/searchableJson.js.map +1 -0
- package/graphqlFields/text.d.ts +1 -1
- package/graphqlFields/text.js.map +1 -1
- package/htmlRenderer/LexicalRenderer.d.ts +1 -1
- package/htmlRenderer/LexicalRenderer.js.map +1 -1
- package/htmlRenderer/createLexicalHTMLRenderer.js +1 -1
- package/htmlRenderer/createLexicalHTMLRenderer.js.map +1 -1
- package/index.d.ts +13 -7
- package/index.js +67 -7
- package/index.js.map +1 -1
- package/modelManager/DefaultCmsModelManager.d.ts +11 -10
- package/modelManager/DefaultCmsModelManager.js +16 -13
- package/modelManager/DefaultCmsModelManager.js.map +1 -1
- package/modelManager/SingletonModelManager.d.ts +12 -0
- package/modelManager/SingletonModelManager.js +48 -0
- package/modelManager/SingletonModelManager.js.map +1 -0
- package/modelManager/index.d.ts +2 -1
- package/modelManager/index.js +16 -1
- package/modelManager/index.js.map +1 -1
- package/package.json +37 -38
- package/parameters/context.js.map +1 -1
- package/parameters/header.js.map +1 -1
- package/parameters/index.js.map +1 -1
- package/parameters/manual.d.ts +2 -1
- package/parameters/manual.js.map +1 -1
- package/parameters/path.js.map +1 -1
- package/plugins/CmsGraphQLSchemaPlugin/CmsGraphQLSchemaPlugin.d.ts +9 -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.d.ts +1 -1
- package/plugins/CmsGraphQLSchemaSorterPlugin.js.map +1 -1
- package/plugins/CmsGroupPlugin.d.ts +9 -1
- package/plugins/CmsGroupPlugin.js +17 -1
- package/plugins/CmsGroupPlugin.js.map +1 -1
- package/plugins/CmsModelFieldConverterPlugin.d.ts +5 -2
- package/plugins/CmsModelFieldConverterPlugin.js +4 -0
- package/plugins/CmsModelFieldConverterPlugin.js.map +1 -1
- package/plugins/CmsModelPlugin.d.ts +30 -10
- package/plugins/CmsModelPlugin.js +101 -19
- package/plugins/CmsModelPlugin.js.map +1 -1
- package/plugins/CmsParametersPlugin.d.ts +3 -3
- package/plugins/CmsParametersPlugin.js.map +1 -1
- package/plugins/CmsRichTextRendererPlugin.d.ts +6 -6
- package/plugins/CmsRichTextRendererPlugin.js.map +1 -1
- package/plugins/StorageOperationsCmsModelPlugin.d.ts +1 -1
- package/plugins/StorageOperationsCmsModelPlugin.js.map +1 -1
- package/plugins/StorageTransformPlugin.d.ts +6 -2
- package/plugins/StorageTransformPlugin.js +9 -1
- package/plugins/StorageTransformPlugin.js.map +1 -1
- package/plugins/index.js.map +1 -1
- package/storage/date.d.ts +3 -0
- package/storage/date.js +119 -0
- package/storage/date.js.map +1 -0
- package/storage/default.js.map +1 -1
- package/storage/dynamicZone.d.ts +2 -0
- package/storage/dynamicZone.js +157 -0
- package/storage/dynamicZone.js.map +1 -0
- package/storage/index.js +7 -1
- package/storage/index.js.map +1 -1
- package/storage/json.js +34 -5
- package/storage/json.js.map +1 -1
- package/storage/object.js +16 -12
- 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 +330 -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 +365 -0
- package/types/plugins.js +7 -0
- package/types/plugins.js.map +1 -0
- package/{types.d.ts → types/types.d.ts} +295 -1215
- package/{types.js → types/types.js} +18 -119
- package/types/types.js.map +1 -0
- package/utils/RichTextRenderer.d.ts +10 -0
- package/utils/RichTextRenderer.js +33 -0
- package/utils/RichTextRenderer.js.map +1 -0
- package/utils/caching/Cache.d.ts +5 -2
- package/utils/caching/Cache.js +4 -7
- package/utils/caching/Cache.js.map +1 -1
- package/utils/caching/CacheKey.d.ts +2 -1
- package/utils/caching/CacheKey.js +5 -17
- package/utils/caching/CacheKey.js.map +1 -1
- package/utils/caching/index.js.map +1 -1
- package/utils/caching/types.d.ts +3 -1
- package/utils/caching/types.js +7 -0
- package/utils/caching/types.js.map +1 -1
- package/utils/contentEntryTraverser/ContentEntryTraverser.d.ts +13 -0
- package/utils/contentEntryTraverser/ContentEntryTraverser.js +97 -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.d.ts +3 -3
- package/utils/converters/Converter.js.map +1 -1
- package/utils/converters/ConverterCollection.d.ts +2 -2
- package/utils/converters/ConverterCollection.js.map +1 -1
- package/utils/converters/valueKeyStorageConverter.d.ts +3 -3
- package/utils/converters/valueKeyStorageConverter.js.map +1 -1
- package/utils/createModelField.d.ts +7 -0
- package/utils/createModelField.js +51 -0
- package/utils/createModelField.js.map +1 -0
- package/utils/createTypeFromFields.d.ts +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.d.ts +13 -1
- package/utils/entryStorage.js +37 -3
- package/utils/entryStorage.js.map +1 -1
- package/utils/filterAsync.js.map +1 -1
- package/utils/getBaseFieldType.d.ts +1 -1
- package/utils/getBaseFieldType.js.map +1 -1
- package/utils/getEntryDescription.d.ts +1 -1
- package/utils/getEntryDescription.js.map +1 -1
- package/utils/getEntryImage.d.ts +1 -1
- package/utils/getEntryImage.js.map +1 -1
- package/utils/getEntryTitle.d.ts +1 -1
- package/utils/getEntryTitle.js.map +1 -1
- package/utils/getSchemaFromFieldPlugins.d.ts +6 -6
- package/utils/getSchemaFromFieldPlugins.js +5 -4
- package/utils/getSchemaFromFieldPlugins.js.map +1 -1
- package/utils/identity.d.ts +1 -1
- package/utils/identity.js.map +1 -1
- package/utils/incrementEntryIdVersion.js.map +1 -1
- package/utils/index.d.ts +1 -0
- package/utils/index.js +11 -0
- package/utils/index.js.map +1 -1
- package/utils/isHeadlessCmsReady.d.ts +2 -0
- package/utils/isHeadlessCmsReady.js +23 -0
- package/utils/isHeadlessCmsReady.js.map +1 -0
- package/utils/modelFieldTraverser/ModelFieldTraverser.d.ts +16 -0
- package/utils/modelFieldTraverser/ModelFieldTraverser.js +41 -0
- package/utils/modelFieldTraverser/ModelFieldTraverser.js.map +1 -0
- package/utils/modelFieldTraverser/index.d.ts +1 -0
- package/utils/modelFieldTraverser/index.js +18 -0
- package/utils/modelFieldTraverser/index.js.map +1 -0
- package/utils/renderFields.d.ts +1 -1
- package/utils/renderFields.js +2 -0
- package/utils/renderFields.js.map +1 -1
- package/utils/renderGetFilterFields.d.ts +1 -1
- package/utils/renderGetFilterFields.js.map +1 -1
- package/utils/renderInputFields.d.ts +1 -1
- package/utils/renderInputFields.js.map +1 -1
- package/utils/renderListFilterFields.d.ts +1 -1
- package/utils/renderListFilterFields.js.map +1 -1
- package/utils/renderSortEnum.d.ts +2 -2
- package/utils/renderSortEnum.js.map +1 -1
- package/utils/toSlug.js.map +1 -1
- package/validators/dateGte.d.ts +1 -1
- package/validators/dateGte.js.map +1 -1
- package/validators/dateLte.d.ts +1 -1
- package/validators/dateLte.js.map +1 -1
- package/validators/gte.d.ts +1 -1
- package/validators/gte.js.map +1 -1
- package/validators/in.d.ts +1 -1
- package/validators/in.js.map +1 -1
- package/validators/index.js.map +1 -1
- package/validators/lte.d.ts +1 -1
- package/validators/lte.js.map +1 -1
- package/validators/maxLength.d.ts +1 -1
- package/validators/maxLength.js.map +1 -1
- package/validators/minLength.d.ts +1 -1
- package/validators/minLength.js.map +1 -1
- package/validators/pattern.d.ts +1 -1
- package/validators/pattern.js.map +1 -1
- package/validators/patternPlugins/email.d.ts +1 -1
- package/validators/patternPlugins/email.js +1 -1
- package/validators/patternPlugins/email.js.map +1 -1
- package/validators/patternPlugins/index.d.ts +1 -1
- package/validators/patternPlugins/index.js.map +1 -1
- package/validators/patternPlugins/lowerCase.d.ts +1 -1
- package/validators/patternPlugins/lowerCase.js.map +1 -1
- package/validators/patternPlugins/lowerCaseSpace.d.ts +1 -1
- package/validators/patternPlugins/lowerCaseSpace.js.map +1 -1
- package/validators/patternPlugins/upperCase.d.ts +1 -1
- package/validators/patternPlugins/upperCase.js.map +1 -1
- package/validators/patternPlugins/upperCaseSpace.d.ts +1 -1
- package/validators/patternPlugins/upperCaseSpace.js.map +1 -1
- package/validators/patternPlugins/url.d.ts +1 -1
- package/validators/patternPlugins/url.js.map +1 -1
- package/validators/required.d.ts +1 -1
- package/validators/required.js.map +1 -1
- package/validators/timeGte.d.ts +1 -1
- package/validators/timeGte.js.map +1 -1
- package/validators/timeLte.d.ts +1 -1
- package/validators/timeLte.js.map +1 -1
- package/validators/unique.d.ts +1 -1
- package/validators/unique.js.map +1 -1
- package/graphqlFields/dynamicZone/dynamicZoneStorage.d.ts +0 -3
- package/graphqlFields/dynamicZone/dynamicZoneStorage.js +0 -111
- package/graphqlFields/dynamicZone/dynamicZoneStorage.js.map +0 -1
- package/plugins/CmsGraphQLSchemaPlugin.d.ts +0 -5
- package/plugins/CmsGraphQLSchemaPlugin.js.map +0 -1
- package/types.js.map +0 -1
- package/utils/access.d.ts +0 -9
- package/utils/access.js +0 -26
- package/utils/access.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,21 +1,35 @@
|
|
|
1
|
-
import { Plugin } from "@webiny/plugins/types";
|
|
2
|
-
import { I18NContext, I18NLocale } from "@webiny/api-i18n/types";
|
|
3
|
-
import { Context } from "@webiny/api/types";
|
|
4
|
-
import { GraphQLFieldResolver,
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import type { Plugin } from "@webiny/plugins/types";
|
|
2
|
+
import type { I18NContext, I18NLocale } from "@webiny/api-i18n/types";
|
|
3
|
+
import type { Context, GenericRecord } from "@webiny/api/types";
|
|
4
|
+
import type { GraphQLFieldResolver, GraphQLRequestBody, Resolvers } from "@webiny/handler-graphql/types";
|
|
5
|
+
import type { processRequestBody } from "@webiny/handler-graphql";
|
|
6
|
+
import type { SecurityPermission } from "@webiny/api-security/types";
|
|
7
|
+
import type { DbContext } from "@webiny/handler-db/types";
|
|
8
|
+
import type { Topic } from "@webiny/pubsub/types";
|
|
9
|
+
import type { CmsModelConverterCallable } from "../utils/converters/ConverterCollection";
|
|
10
|
+
import type { HeadlessCmsExport, HeadlessCmsImport } from "../export/types";
|
|
11
|
+
import type { AccessControl } from "../crud/AccessControl/AccessControl";
|
|
12
|
+
import type { CmsModelToAstConverter } from "../utils/contentModelAst/CmsModelToAstConverter";
|
|
13
|
+
import type { CmsModelFieldToGraphQLPlugin } from "./plugins";
|
|
14
|
+
import type { CmsEntryContext } from "./context";
|
|
15
|
+
import type { CmsModelField, CmsModelFieldValidation, CmsModelUpdateInput } from "./modelField";
|
|
16
|
+
import type { CmsModel, CmsModelCreateFromInput, CmsModelCreateInput } from "./model";
|
|
17
|
+
import type { CmsGroup } from "./modelGroup";
|
|
18
|
+
import type { CmsIdentity } from "./identity";
|
|
19
|
+
import type { ISingletonModelManager } from "../modelManager";
|
|
20
|
+
export interface CmsError {
|
|
21
|
+
message: string;
|
|
22
|
+
code: string;
|
|
23
|
+
data: GenericRecord;
|
|
24
|
+
stack?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface CmsError {
|
|
27
|
+
message: string;
|
|
28
|
+
code: string;
|
|
29
|
+
data: GenericRecord;
|
|
30
|
+
stack?: string;
|
|
18
31
|
}
|
|
32
|
+
export type ApiEndpoint = "manage" | "preview" | "read";
|
|
19
33
|
export interface HeadlessCms extends CmsSystemContext, CmsGroupContext, CmsModelContext, CmsEntryContext {
|
|
20
34
|
/**
|
|
21
35
|
* API type
|
|
@@ -46,17 +60,17 @@ export interface HeadlessCms extends CmsSystemContext, CmsGroupContext, CmsModel
|
|
|
46
60
|
*/
|
|
47
61
|
storageOperations: HeadlessCmsStorageOperations;
|
|
48
62
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* @internal
|
|
63
|
+
* Use to ensure perform authorization and ensure identities have access to the groups, models and entries.
|
|
52
64
|
*/
|
|
53
|
-
|
|
65
|
+
accessControl: AccessControl;
|
|
54
66
|
/**
|
|
55
67
|
* Export operations.
|
|
56
68
|
*/
|
|
57
69
|
export: HeadlessCmsExport;
|
|
58
70
|
importing: HeadlessCmsImport;
|
|
71
|
+
getExecutableSchema: GetExecutableSchema;
|
|
59
72
|
}
|
|
73
|
+
export type GetExecutableSchema = (type: ApiEndpoint) => Promise<(<TData = Record<string, any>, TExtensions = Record<string, any>>(input: GraphQLRequestBody | GraphQLRequestBody[]) => ReturnType<typeof processRequestBody<TData, TExtensions>>)>;
|
|
60
74
|
/**
|
|
61
75
|
* @description This combines all contexts used in the CMS into a single one.
|
|
62
76
|
*
|
|
@@ -65,193 +79,6 @@ export interface HeadlessCms extends CmsSystemContext, CmsGroupContext, CmsModel
|
|
|
65
79
|
export interface CmsContext extends Context, DbContext, I18NContext {
|
|
66
80
|
cms: HeadlessCms;
|
|
67
81
|
}
|
|
68
|
-
interface CmsModelFieldPredefinedValuesValue {
|
|
69
|
-
value: string;
|
|
70
|
-
label: string;
|
|
71
|
-
/**
|
|
72
|
-
* Default selected predefined value.
|
|
73
|
-
*/
|
|
74
|
-
selected?: boolean;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Object containing content model field predefined options and values.
|
|
78
|
-
*
|
|
79
|
-
* @category CmsModelField
|
|
80
|
-
*/
|
|
81
|
-
export interface CmsModelFieldPredefinedValues {
|
|
82
|
-
/**
|
|
83
|
-
* Are predefined field values enabled?
|
|
84
|
-
*/
|
|
85
|
-
enabled: boolean;
|
|
86
|
-
/**
|
|
87
|
-
* Predefined values array.
|
|
88
|
-
*/
|
|
89
|
-
values: CmsModelFieldPredefinedValuesValue[];
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Object containing content model field renderer options.
|
|
93
|
-
*
|
|
94
|
-
* @category CmsModelField
|
|
95
|
-
*/
|
|
96
|
-
interface CmsModelFieldRenderer {
|
|
97
|
-
/**
|
|
98
|
-
* Name of the field renderer. Must have one in field renderer plugins.
|
|
99
|
-
* Can be blank to let automatically determine the renderer.
|
|
100
|
-
*/
|
|
101
|
-
name: string;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* A definition for content model field settings.
|
|
105
|
-
*
|
|
106
|
-
* @category ModelField
|
|
107
|
-
* @category Database model
|
|
108
|
-
*/
|
|
109
|
-
export interface CmsModelFieldSettings {
|
|
110
|
-
/**
|
|
111
|
-
* Predefined values (text, number)
|
|
112
|
-
* The default value for the field in case it is not predefined values field.
|
|
113
|
-
*/
|
|
114
|
-
defaultValue?: string | number | null | undefined;
|
|
115
|
-
/**
|
|
116
|
-
* Object field has child fields.
|
|
117
|
-
*/
|
|
118
|
-
fields?: CmsModelField[];
|
|
119
|
-
/**
|
|
120
|
-
* Is the file field images only one?
|
|
121
|
-
*/
|
|
122
|
-
imagesOnly?: boolean;
|
|
123
|
-
/**
|
|
124
|
-
* Object field has child fields - so it needs to have a layout.
|
|
125
|
-
*/
|
|
126
|
-
layout?: string[][];
|
|
127
|
-
/**
|
|
128
|
-
* Ref field.
|
|
129
|
-
*/
|
|
130
|
-
models?: Pick<CmsModel, "modelId">[];
|
|
131
|
-
/**
|
|
132
|
-
* Date field.
|
|
133
|
-
*/
|
|
134
|
-
type?: string;
|
|
135
|
-
/**
|
|
136
|
-
* Disable full text search explicitly on this field.
|
|
137
|
-
*/
|
|
138
|
-
disableFullTextSearch?: boolean;
|
|
139
|
-
/**
|
|
140
|
-
* There are a lot of other settings that are possible to add, so we keep the type opened.
|
|
141
|
-
*/
|
|
142
|
-
[key: string]: any;
|
|
143
|
-
}
|
|
144
|
-
export declare type CmsModelFieldType = "boolean" | "datetime" | "file" | "long-text" | "number" | "json" | "object" | "ref" | "rich-text" | "text" | "dynamicZone" | string;
|
|
145
|
-
/**
|
|
146
|
-
* A definition for content model field. This type exists on the app side as well.
|
|
147
|
-
*
|
|
148
|
-
* @category ModelField
|
|
149
|
-
* @category Database model
|
|
150
|
-
*/
|
|
151
|
-
export interface CmsModelField {
|
|
152
|
-
/**
|
|
153
|
-
* A generated unique ID for the model field.
|
|
154
|
-
* MUST be absolute unique throughout the models.
|
|
155
|
-
* Must be in form of a-zA-Z0-9.
|
|
156
|
-
*
|
|
157
|
-
* We generate a unique id value when you're building a model via UI,
|
|
158
|
-
* but when user is creating a model via a plugin it is up to them to be careful about this.
|
|
159
|
-
*/
|
|
160
|
-
id: string;
|
|
161
|
-
/**
|
|
162
|
-
* A type of the field.
|
|
163
|
-
* We are defining our built-in fields, so people know which are available by the default.
|
|
164
|
-
*/
|
|
165
|
-
type: CmsModelFieldType;
|
|
166
|
-
/**
|
|
167
|
-
* A unique storage ID for storing actual values.
|
|
168
|
-
* Must in form of a-zA-Z0-9@a-zA-Z0-9
|
|
169
|
-
*
|
|
170
|
-
* This is an auto-generated value: uses `id` and `type`
|
|
171
|
-
*
|
|
172
|
-
* This is used as path for the entry value.
|
|
173
|
-
*/
|
|
174
|
-
storageId: `${string}@${string}` | string;
|
|
175
|
-
/**
|
|
176
|
-
* Field identifier for the model field that will be available to the outside world.
|
|
177
|
-
* `storageId` is used as path (or column) to store the data.
|
|
178
|
-
*
|
|
179
|
-
* Must in form of a-zA-Z0-9.
|
|
180
|
-
*
|
|
181
|
-
* This value MUST be unique in the CmsModel.
|
|
182
|
-
*/
|
|
183
|
-
fieldId: string;
|
|
184
|
-
/**
|
|
185
|
-
* A label for the field
|
|
186
|
-
*/
|
|
187
|
-
label: string;
|
|
188
|
-
/**
|
|
189
|
-
* Text below the field to clarify what is it meant to be in the field value
|
|
190
|
-
*/
|
|
191
|
-
helpText?: string | null;
|
|
192
|
-
/**
|
|
193
|
-
* Text to be displayed in the field
|
|
194
|
-
*/
|
|
195
|
-
placeholderText?: string | null;
|
|
196
|
-
/**
|
|
197
|
-
* Are predefined values enabled? And list of them
|
|
198
|
-
*/
|
|
199
|
-
predefinedValues?: CmsModelFieldPredefinedValues;
|
|
200
|
-
/**
|
|
201
|
-
* Field renderer. Blank if determined automatically.
|
|
202
|
-
*/
|
|
203
|
-
renderer?: CmsModelFieldRenderer;
|
|
204
|
-
/**
|
|
205
|
-
* List of validations for the field
|
|
206
|
-
*
|
|
207
|
-
* @default []
|
|
208
|
-
*/
|
|
209
|
-
validation?: CmsModelFieldValidation[];
|
|
210
|
-
/**
|
|
211
|
-
* List of validations for the list of values, when a field is set to accept a list of values.
|
|
212
|
-
* These validations will be applied to the entire list, and `validation` (see above) will be applied
|
|
213
|
-
* to each individual value in the list.
|
|
214
|
-
*
|
|
215
|
-
* @default []
|
|
216
|
-
*/
|
|
217
|
-
listValidation?: CmsModelFieldValidation[];
|
|
218
|
-
/**
|
|
219
|
-
* Is this a multiple values field?
|
|
220
|
-
*
|
|
221
|
-
*/
|
|
222
|
-
multipleValues?: boolean;
|
|
223
|
-
/**
|
|
224
|
-
* Fields can be tagged to give them contextual meaning.
|
|
225
|
-
*/
|
|
226
|
-
tags?: string[];
|
|
227
|
-
/**
|
|
228
|
-
* Any user defined settings.
|
|
229
|
-
*
|
|
230
|
-
* @default {}
|
|
231
|
-
*/
|
|
232
|
-
settings?: CmsModelFieldSettings;
|
|
233
|
-
}
|
|
234
|
-
export interface CmsDynamicZoneTemplate {
|
|
235
|
-
id: string;
|
|
236
|
-
name: string;
|
|
237
|
-
gqlTypeName: string;
|
|
238
|
-
description: string;
|
|
239
|
-
icon: string;
|
|
240
|
-
fields: CmsModelField[];
|
|
241
|
-
layout: string[][];
|
|
242
|
-
validation: CmsModelFieldValidation[];
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* A definition for dynamic-zone field to show possible type of the field in settings.
|
|
246
|
-
*/
|
|
247
|
-
export interface CmsModelDynamicZoneField extends CmsModelField {
|
|
248
|
-
/**
|
|
249
|
-
* Settings object for the field. Contains `templates` property.
|
|
250
|
-
*/
|
|
251
|
-
settings: {
|
|
252
|
-
templates: CmsDynamicZoneTemplate[];
|
|
253
|
-
};
|
|
254
|
-
}
|
|
255
82
|
/**
|
|
256
83
|
* Used for our internal functionality.
|
|
257
84
|
*/
|
|
@@ -305,220 +132,6 @@ export interface CmsModelFieldValidatorValidateParams<T = any> {
|
|
|
305
132
|
*/
|
|
306
133
|
entry?: CmsEntry;
|
|
307
134
|
}
|
|
308
|
-
/**
|
|
309
|
-
* Definition for the field validator.
|
|
310
|
-
*
|
|
311
|
-
* @category Plugin
|
|
312
|
-
* @category ModelField
|
|
313
|
-
* @category FieldValidation
|
|
314
|
-
*/
|
|
315
|
-
export interface CmsModelFieldValidatorPluginValidateCb {
|
|
316
|
-
(params: CmsModelFieldValidatorValidateParams): Promise<boolean>;
|
|
317
|
-
}
|
|
318
|
-
export interface CmsModelFieldValidatorPlugin extends Plugin {
|
|
319
|
-
/**
|
|
320
|
-
* A plugin type.
|
|
321
|
-
*/
|
|
322
|
-
type: "cms-model-field-validator";
|
|
323
|
-
/**
|
|
324
|
-
* Actual validator definition.
|
|
325
|
-
*/
|
|
326
|
-
validator: {
|
|
327
|
-
/**
|
|
328
|
-
* Name of the validator.
|
|
329
|
-
*/
|
|
330
|
-
name: string;
|
|
331
|
-
/**
|
|
332
|
-
* Validation method.
|
|
333
|
-
*/
|
|
334
|
-
validate: CmsModelFieldValidatorPluginValidateCb;
|
|
335
|
-
};
|
|
336
|
-
}
|
|
337
|
-
/**
|
|
338
|
-
* A pattern validator for the content entry field value.
|
|
339
|
-
*
|
|
340
|
-
* @category Plugin
|
|
341
|
-
* @category ModelField
|
|
342
|
-
* @category FieldValidation
|
|
343
|
-
*/
|
|
344
|
-
export interface CmsModelFieldPatternValidatorPlugin extends Plugin {
|
|
345
|
-
/**
|
|
346
|
-
* A plugin type
|
|
347
|
-
*/
|
|
348
|
-
type: "cms-model-field-validator-pattern";
|
|
349
|
-
/**
|
|
350
|
-
* A pattern object for the validator.
|
|
351
|
-
*/
|
|
352
|
-
pattern: {
|
|
353
|
-
/**
|
|
354
|
-
* name of the pattern.
|
|
355
|
-
*/
|
|
356
|
-
name: string;
|
|
357
|
-
/**
|
|
358
|
-
* RegExp of the validator.
|
|
359
|
-
*/
|
|
360
|
-
regex: string;
|
|
361
|
-
/**
|
|
362
|
-
* RegExp flags
|
|
363
|
-
*/
|
|
364
|
-
flags: string;
|
|
365
|
-
};
|
|
366
|
-
}
|
|
367
|
-
/**
|
|
368
|
-
* Locked field in the content model
|
|
369
|
-
*
|
|
370
|
-
* @see CmsModel.lockedFields
|
|
371
|
-
*
|
|
372
|
-
* @category ModelField
|
|
373
|
-
*/
|
|
374
|
-
export interface LockedField {
|
|
375
|
-
/**
|
|
376
|
-
* Locked field storage ID - one used to store values.
|
|
377
|
-
* We cannot change this due to old systems.
|
|
378
|
-
*/
|
|
379
|
-
fieldId: string;
|
|
380
|
-
/**
|
|
381
|
-
* Is the field multiple values field?
|
|
382
|
-
*/
|
|
383
|
-
multipleValues: boolean;
|
|
384
|
-
/**
|
|
385
|
-
* Field type.
|
|
386
|
-
*/
|
|
387
|
-
type: string;
|
|
388
|
-
[key: string]: any;
|
|
389
|
-
}
|
|
390
|
-
/**
|
|
391
|
-
* @category Database model
|
|
392
|
-
* @category CmsModel
|
|
393
|
-
*/
|
|
394
|
-
export interface CmsModelGroup {
|
|
395
|
-
/**
|
|
396
|
-
* Generated ID of the group
|
|
397
|
-
*/
|
|
398
|
-
id: string;
|
|
399
|
-
/**
|
|
400
|
-
* Name of the group
|
|
401
|
-
*/
|
|
402
|
-
name: string;
|
|
403
|
-
}
|
|
404
|
-
/**
|
|
405
|
-
* Base CMS Model. Should not be exported and used outside of this package.
|
|
406
|
-
*
|
|
407
|
-
* @category Database model
|
|
408
|
-
* @category CmsModel
|
|
409
|
-
*/
|
|
410
|
-
export interface CmsModel {
|
|
411
|
-
/**
|
|
412
|
-
* Name of the content model.
|
|
413
|
-
*/
|
|
414
|
-
name: string;
|
|
415
|
-
/**
|
|
416
|
-
* Unique ID for the content model. Created from name if not defined by user.
|
|
417
|
-
*/
|
|
418
|
-
modelId: string;
|
|
419
|
-
/**
|
|
420
|
-
* Name of the content model in singular form to be used in the API.
|
|
421
|
-
* example:
|
|
422
|
-
* - Article
|
|
423
|
-
* - Fruit
|
|
424
|
-
* - Vegetable
|
|
425
|
-
* - Car
|
|
426
|
-
*/
|
|
427
|
-
singularApiName: string;
|
|
428
|
-
/**
|
|
429
|
-
* Name of the content model in plural form to be used in the API.
|
|
430
|
-
* example:
|
|
431
|
-
* - Articles
|
|
432
|
-
* - Fruits
|
|
433
|
-
* - Vegetables
|
|
434
|
-
* - Cars
|
|
435
|
-
*/
|
|
436
|
-
pluralApiName: string;
|
|
437
|
-
/**
|
|
438
|
-
* Model tenant.
|
|
439
|
-
*/
|
|
440
|
-
tenant: string;
|
|
441
|
-
/**
|
|
442
|
-
* Locale this model belongs to.
|
|
443
|
-
*/
|
|
444
|
-
locale: string;
|
|
445
|
-
/**
|
|
446
|
-
* Cms Group reference object.
|
|
447
|
-
*/
|
|
448
|
-
group: CmsModelGroup;
|
|
449
|
-
/**
|
|
450
|
-
* Icon for the content model.
|
|
451
|
-
*/
|
|
452
|
-
icon?: string | null;
|
|
453
|
-
/**
|
|
454
|
-
* Description for the content model.
|
|
455
|
-
*/
|
|
456
|
-
description: string | null;
|
|
457
|
-
/**
|
|
458
|
-
* Date created
|
|
459
|
-
*/
|
|
460
|
-
createdOn?: string;
|
|
461
|
-
/**
|
|
462
|
-
* Date saved. Changes on both save and create.
|
|
463
|
-
*/
|
|
464
|
-
savedOn?: string;
|
|
465
|
-
/**
|
|
466
|
-
* CreatedBy object wrapper. Contains id, name and type of the user.
|
|
467
|
-
*/
|
|
468
|
-
createdBy?: CmsIdentity;
|
|
469
|
-
/**
|
|
470
|
-
* List of fields defining entry values.
|
|
471
|
-
*/
|
|
472
|
-
fields: CmsModelField[];
|
|
473
|
-
/**
|
|
474
|
-
* Admin UI field layout
|
|
475
|
-
*
|
|
476
|
-
* ```ts
|
|
477
|
-
* layout: [
|
|
478
|
-
* [field1id, field2id],
|
|
479
|
-
* [field3id]
|
|
480
|
-
* ]
|
|
481
|
-
* ```
|
|
482
|
-
*/
|
|
483
|
-
layout: string[][];
|
|
484
|
-
/**
|
|
485
|
-
* Models can be tagged to give them contextual meaning.
|
|
486
|
-
*/
|
|
487
|
-
tags?: string[];
|
|
488
|
-
/**
|
|
489
|
-
* List of locked fields. Updated when entry is saved and a field has been used.
|
|
490
|
-
*/
|
|
491
|
-
lockedFields?: LockedField[];
|
|
492
|
-
/**
|
|
493
|
-
* The field that is being displayed as entry title.
|
|
494
|
-
* It is picked as first available text field. Or user can select own field.
|
|
495
|
-
*/
|
|
496
|
-
titleFieldId: string;
|
|
497
|
-
/**
|
|
498
|
-
* The field which is displayed as the description one.
|
|
499
|
-
* Only way this is null or undefined is that there are no long-text fields to be set as description.
|
|
500
|
-
*/
|
|
501
|
-
descriptionFieldId?: string | null;
|
|
502
|
-
/**
|
|
503
|
-
* The field which is displayed as the image.
|
|
504
|
-
* Only way this is null or undefined is that there are no file fields, with images only set, to be set as image.
|
|
505
|
-
*/
|
|
506
|
-
imageFieldId?: string | null;
|
|
507
|
-
/**
|
|
508
|
-
* The version of Webiny which this record was stored with.
|
|
509
|
-
*/
|
|
510
|
-
webinyVersion: string;
|
|
511
|
-
/**
|
|
512
|
-
* Is model private?
|
|
513
|
-
* This is meant to be used for some internal models - will not be visible in the schema.
|
|
514
|
-
* Only available for the plugin constructed models.
|
|
515
|
-
*/
|
|
516
|
-
isPrivate?: boolean;
|
|
517
|
-
/**
|
|
518
|
-
* Is this model created via plugin?
|
|
519
|
-
*/
|
|
520
|
-
isPlugin?: boolean;
|
|
521
|
-
}
|
|
522
135
|
/**
|
|
523
136
|
* When sending model to the storage operations, it must contain createValueKeyToStorageConverter and createValueKeyFromStorageConverter
|
|
524
137
|
*
|
|
@@ -535,6 +148,11 @@ export interface CmsModelFieldDefinition {
|
|
|
535
148
|
fields: string;
|
|
536
149
|
typeDefs?: string;
|
|
537
150
|
}
|
|
151
|
+
export interface CmsModelFieldToGraphQLNormalizeInputParams<TField> {
|
|
152
|
+
model: CmsModel;
|
|
153
|
+
field: TField;
|
|
154
|
+
input: GenericRecord<string> | Array<GenericRecord<string>>;
|
|
155
|
+
}
|
|
538
156
|
interface CmsModelFieldToGraphQLCreateResolverParams<TField> {
|
|
539
157
|
models: CmsModel[];
|
|
540
158
|
model: CmsModel;
|
|
@@ -564,326 +182,12 @@ export interface CmsModelFieldToGraphQLPluginValidateChildFieldsParams<TField ex
|
|
|
564
182
|
export interface CmsModelFieldToGraphQLPluginValidateChildFields<TField extends CmsModelField = CmsModelField> {
|
|
565
183
|
(params: CmsModelFieldToGraphQLPluginValidateChildFieldsParams<TField>): void;
|
|
566
184
|
}
|
|
567
|
-
/**
|
|
568
|
-
* @category Plugin
|
|
569
|
-
* @category ModelField
|
|
570
|
-
* @category GraphQL
|
|
571
|
-
*/
|
|
572
|
-
export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = CmsModelField> extends Plugin {
|
|
573
|
-
/**
|
|
574
|
-
* A plugin type
|
|
575
|
-
*/
|
|
576
|
-
type: "cms-model-field-to-graphql";
|
|
577
|
-
/**
|
|
578
|
-
* Field type name which must be exact as the one in `CmsEditorFieldTypePlugin` plugin.
|
|
579
|
-
*
|
|
580
|
-
* ```ts
|
|
581
|
-
* fieldType: "myField"
|
|
582
|
-
* ```
|
|
583
|
-
*/
|
|
584
|
-
fieldType: CmsModelFieldType;
|
|
585
|
-
/**
|
|
586
|
-
* Is the field searchable via the GraphQL?
|
|
587
|
-
*
|
|
588
|
-
* ```ts
|
|
589
|
-
* isSearchable: false
|
|
590
|
-
* ```
|
|
591
|
-
*/
|
|
592
|
-
isSearchable: boolean;
|
|
593
|
-
/**
|
|
594
|
-
* Is the field searchable via full text search?
|
|
595
|
-
*
|
|
596
|
-
* Field is not full text searchable by default.
|
|
597
|
-
* ```ts
|
|
598
|
-
* fullTextSearch: false
|
|
599
|
-
* ```
|
|
600
|
-
*/
|
|
601
|
-
fullTextSearch?: boolean;
|
|
602
|
-
/**
|
|
603
|
-
* Is the field sortable via the GraphQL?
|
|
604
|
-
*
|
|
605
|
-
* ```ts
|
|
606
|
-
* isSortable: true
|
|
607
|
-
* ```
|
|
608
|
-
*/
|
|
609
|
-
isSortable: boolean;
|
|
610
|
-
/**
|
|
611
|
-
* Optional method which creates the storageId.
|
|
612
|
-
* Primary use is for the datetime field, but if users has some specific fields, they can customize the storageId to their needs.
|
|
613
|
-
*
|
|
614
|
-
* ```ts
|
|
615
|
-
* createStorageId: ({field}) => {
|
|
616
|
-
* if (field.settings.type === "time) {
|
|
617
|
-
* return `${field.type}_time@${field.id}`
|
|
618
|
-
* }
|
|
619
|
-
* // use default method
|
|
620
|
-
* return undefined;
|
|
621
|
-
* }
|
|
622
|
-
* ```
|
|
623
|
-
*/
|
|
624
|
-
createStorageId?: (params: {
|
|
625
|
-
model: CmsModel;
|
|
626
|
-
field: Omit<TField, "storageId"> & Partial<Pick<TField, "storageId">>;
|
|
627
|
-
}) => string | null | undefined;
|
|
628
|
-
/**
|
|
629
|
-
* Read API methods.
|
|
630
|
-
*/
|
|
631
|
-
read: {
|
|
632
|
-
/**
|
|
633
|
-
* Definition for get filtering for GraphQL.
|
|
634
|
-
*
|
|
635
|
-
* ```ts
|
|
636
|
-
* read: {
|
|
637
|
-
* createGetFilters({ field }) {
|
|
638
|
-
* return `${field.fieldId}: MyField`;
|
|
639
|
-
* }
|
|
640
|
-
* }
|
|
641
|
-
* ```
|
|
642
|
-
*/
|
|
643
|
-
createGetFilters?(params: {
|
|
644
|
-
field: TField;
|
|
645
|
-
}): string;
|
|
646
|
-
/**
|
|
647
|
-
* Definition for list filtering for GraphQL.
|
|
648
|
-
*
|
|
649
|
-
* ```ts
|
|
650
|
-
* read: {
|
|
651
|
-
* createListFilters({ field }) {
|
|
652
|
-
* return `
|
|
653
|
-
* ${field.fieldId}: MyType
|
|
654
|
-
* ${field.fieldId}_not: MyType
|
|
655
|
-
* ${field.fieldId}_in: [MyType]
|
|
656
|
-
* ${field.fieldId}_not_in: [MyType]
|
|
657
|
-
* `;
|
|
658
|
-
* }
|
|
659
|
-
* }
|
|
660
|
-
* ```
|
|
661
|
-
*/
|
|
662
|
-
createListFilters?(params: {
|
|
663
|
-
model: Pick<CmsModel, "singularApiName">;
|
|
664
|
-
field: TField;
|
|
665
|
-
plugins: CmsFieldTypePlugins;
|
|
666
|
-
}): string;
|
|
667
|
-
/**
|
|
668
|
-
* Definition of the field type for GraphQL - be aware if multiple values is selected.
|
|
669
|
-
*
|
|
670
|
-
* ```ts
|
|
671
|
-
* read: {
|
|
672
|
-
* createTypeField({ field }) {
|
|
673
|
-
* if (field.multipleValues) {
|
|
674
|
-
* return `${field.fieldId}: [MyFieldType]`;
|
|
675
|
-
* }
|
|
676
|
-
*
|
|
677
|
-
* return `${field.fieldId}: MyField`;
|
|
678
|
-
* }
|
|
679
|
-
* }
|
|
680
|
-
* ```
|
|
681
|
-
*/
|
|
682
|
-
createTypeField(params: {
|
|
683
|
-
models: CmsModel[];
|
|
684
|
-
model: CmsModel;
|
|
685
|
-
field: TField;
|
|
686
|
-
fieldTypePlugins: CmsFieldTypePlugins;
|
|
687
|
-
}): CmsModelFieldDefinition | string | null;
|
|
688
|
-
/**
|
|
689
|
-
* Definition for field resolver.
|
|
690
|
-
* By default, it is simple return of the `instance.values[storageId]` but if required, users can define their own.
|
|
691
|
-
*
|
|
692
|
-
* ```ts
|
|
693
|
-
* read: {
|
|
694
|
-
* createResolver({ field }) {
|
|
695
|
-
* return instance => {
|
|
696
|
-
* return instance.values[field.storageId];
|
|
697
|
-
* };
|
|
698
|
-
* }
|
|
699
|
-
* }
|
|
700
|
-
* ```
|
|
701
|
-
*/
|
|
702
|
-
createResolver?: CmsModelFieldToGraphQLCreateResolver<TField>;
|
|
703
|
-
/**
|
|
704
|
-
* Read API schema definitions for the field and resolvers for them.
|
|
705
|
-
*
|
|
706
|
-
* ```ts
|
|
707
|
-
* read: {
|
|
708
|
-
* createSchema() {
|
|
709
|
-
* return {
|
|
710
|
-
* typeDefs: `
|
|
711
|
-
* myField {
|
|
712
|
-
* id
|
|
713
|
-
* date
|
|
714
|
-
* }
|
|
715
|
-
* `,
|
|
716
|
-
* resolvers: {}
|
|
717
|
-
* }
|
|
718
|
-
* }
|
|
719
|
-
* }
|
|
720
|
-
* ```
|
|
721
|
-
*/
|
|
722
|
-
createSchema?: (params: {
|
|
723
|
-
models: CmsModel[];
|
|
724
|
-
}) => GraphQLSchemaDefinition<CmsContext>;
|
|
725
|
-
};
|
|
726
|
-
manage: {
|
|
727
|
-
/**
|
|
728
|
-
* Definition for list filtering for GraphQL.
|
|
729
|
-
*
|
|
730
|
-
* ```ts
|
|
731
|
-
* manage: {
|
|
732
|
-
* createListFilters({ field }) {
|
|
733
|
-
* return `
|
|
734
|
-
* ${field.fieldId}: MyType
|
|
735
|
-
* ${field.fieldId}_not: MyType
|
|
736
|
-
* ${field.fieldId}_in: [MyType]
|
|
737
|
-
* ${field.fieldId}_not_in: [MyType]
|
|
738
|
-
* `;
|
|
739
|
-
* }
|
|
740
|
-
* }
|
|
741
|
-
* ```
|
|
742
|
-
*/
|
|
743
|
-
createListFilters?: (params: {
|
|
744
|
-
model: Pick<CmsModel, "singularApiName">;
|
|
745
|
-
field: TField;
|
|
746
|
-
plugins: CmsFieldTypePlugins;
|
|
747
|
-
}) => string;
|
|
748
|
-
/**
|
|
749
|
-
* Manage API schema definitions for the field and resolvers for them. Probably similar to `read.createSchema`.
|
|
750
|
-
*
|
|
751
|
-
* ```ts
|
|
752
|
-
* createSchema() {
|
|
753
|
-
* return {
|
|
754
|
-
* typeDefs: `
|
|
755
|
-
* myField {
|
|
756
|
-
* id
|
|
757
|
-
* date
|
|
758
|
-
* }
|
|
759
|
-
* `,
|
|
760
|
-
* resolvers: {}
|
|
761
|
-
* }
|
|
762
|
-
* }
|
|
763
|
-
* ```
|
|
764
|
-
*/
|
|
765
|
-
createSchema?: (params: {
|
|
766
|
-
models: CmsModel[];
|
|
767
|
-
}) => GraphQLSchemaDefinition<CmsContext>;
|
|
768
|
-
/**
|
|
769
|
-
* Definition of the field type for GraphQL - be aware if multiple values is selected. Probably same as `read.createTypeField`.
|
|
770
|
-
*
|
|
771
|
-
* ```ts
|
|
772
|
-
* manage: {
|
|
773
|
-
* createTypeField({ field }) {
|
|
774
|
-
* if (field.multipleValues) {
|
|
775
|
-
* return field.fieldId + ": [MyType]";
|
|
776
|
-
* }
|
|
777
|
-
*
|
|
778
|
-
* return field.fieldId + ": MyType";
|
|
779
|
-
* }
|
|
780
|
-
* }
|
|
781
|
-
* ```
|
|
782
|
-
*/
|
|
783
|
-
createTypeField: (params: {
|
|
784
|
-
models: CmsModel[];
|
|
785
|
-
model: CmsModel;
|
|
786
|
-
field: TField;
|
|
787
|
-
fieldTypePlugins: CmsFieldTypePlugins;
|
|
788
|
-
}) => CmsModelFieldDefinition | string | null;
|
|
789
|
-
/**
|
|
790
|
-
* Definition for input GraphQL field type.
|
|
791
|
-
*
|
|
792
|
-
* ```ts
|
|
793
|
-
* manage: {
|
|
794
|
-
* createInputField({ field }) {
|
|
795
|
-
* if (field.multipleValues) {
|
|
796
|
-
* return field.fieldId + ": [MyField]";
|
|
797
|
-
* }
|
|
798
|
-
*
|
|
799
|
-
* return field.fieldId + ": MyField";
|
|
800
|
-
* }
|
|
801
|
-
* }
|
|
802
|
-
* ```
|
|
803
|
-
*/
|
|
804
|
-
createInputField: (params: {
|
|
805
|
-
models: CmsModel[];
|
|
806
|
-
model: CmsModel;
|
|
807
|
-
field: TField;
|
|
808
|
-
fieldTypePlugins: CmsFieldTypePlugins;
|
|
809
|
-
}) => CmsModelFieldDefinition | string | null;
|
|
810
|
-
/**
|
|
811
|
-
* Definition for field resolver.
|
|
812
|
-
* By default, it is simple return of the `instance.values[storageId]` but if required, users can define their own.
|
|
813
|
-
*
|
|
814
|
-
* ```ts
|
|
815
|
-
* manage: {
|
|
816
|
-
* createResolver({ field }) {
|
|
817
|
-
* return instance => {
|
|
818
|
-
* return instance.values[field.storageId];
|
|
819
|
-
* };
|
|
820
|
-
* }
|
|
821
|
-
* }
|
|
822
|
-
* ```
|
|
823
|
-
*/
|
|
824
|
-
createResolver?: CmsModelFieldToGraphQLCreateResolver<TField>;
|
|
825
|
-
};
|
|
826
|
-
/**
|
|
827
|
-
*
|
|
828
|
-
* @param field
|
|
829
|
-
*/
|
|
830
|
-
validateChildFields?: CmsModelFieldToGraphQLPluginValidateChildFields<TField>;
|
|
831
|
-
}
|
|
832
|
-
/**
|
|
833
|
-
* Check for content model locked field.
|
|
834
|
-
* A custom plugin definable by the user.
|
|
835
|
-
*
|
|
836
|
-
* @category CmsModel
|
|
837
|
-
* @category Plugin
|
|
838
|
-
*/
|
|
839
|
-
export interface CmsModelLockedFieldPlugin extends Plugin {
|
|
840
|
-
/**
|
|
841
|
-
* A plugin type
|
|
842
|
-
*/
|
|
843
|
-
type: "cms-model-locked-field";
|
|
844
|
-
/**
|
|
845
|
-
* A unique identifier of the field type (text, number, json, myField, ...).
|
|
846
|
-
*/
|
|
847
|
-
fieldType: string;
|
|
848
|
-
/**
|
|
849
|
-
* A method to check if field really is locked.
|
|
850
|
-
*/
|
|
851
|
-
checkLockedField?: (params: {
|
|
852
|
-
lockedField: LockedField;
|
|
853
|
-
field: CmsModelField;
|
|
854
|
-
}) => void;
|
|
855
|
-
/**
|
|
856
|
-
* A method to get the locked field data.
|
|
857
|
-
*/
|
|
858
|
-
getLockedFieldData?: (params: {
|
|
859
|
-
field: CmsModelField;
|
|
860
|
-
}) => Record<string, any>;
|
|
861
|
-
}
|
|
862
185
|
/**
|
|
863
186
|
* @category ModelField
|
|
864
187
|
*/
|
|
865
188
|
export interface CmsFieldTypePlugins {
|
|
866
189
|
[key: string]: CmsModelFieldToGraphQLPlugin;
|
|
867
190
|
}
|
|
868
|
-
/**
|
|
869
|
-
* An interface describing the reference to a user that created some data in the database.
|
|
870
|
-
*
|
|
871
|
-
* @category General
|
|
872
|
-
*/
|
|
873
|
-
export interface CmsIdentity {
|
|
874
|
-
/**
|
|
875
|
-
* ID if the user.
|
|
876
|
-
*/
|
|
877
|
-
id: string;
|
|
878
|
-
/**
|
|
879
|
-
* Full name of the user.
|
|
880
|
-
*/
|
|
881
|
-
displayName: string | null;
|
|
882
|
-
/**
|
|
883
|
-
* Type of the user (admin, user)
|
|
884
|
-
*/
|
|
885
|
-
type: string;
|
|
886
|
-
}
|
|
887
191
|
export interface OnSystemBeforeInstallTopicParams {
|
|
888
192
|
tenant: string;
|
|
889
193
|
locale: string;
|
|
@@ -897,7 +201,7 @@ export interface OnSystemInstallErrorTopicParams {
|
|
|
897
201
|
tenant: string;
|
|
898
202
|
locale: string;
|
|
899
203
|
}
|
|
900
|
-
export
|
|
204
|
+
export type CmsSystemContext = {
|
|
901
205
|
getSystemVersion: () => Promise<string | null>;
|
|
902
206
|
setSystemVersion: (version: string) => Promise<void>;
|
|
903
207
|
installSystem: () => Promise<void>;
|
|
@@ -933,68 +237,6 @@ export interface CmsGroupUpdateInput {
|
|
|
933
237
|
description?: string;
|
|
934
238
|
icon?: string;
|
|
935
239
|
}
|
|
936
|
-
/**
|
|
937
|
-
* A representation of content model group in the database.
|
|
938
|
-
*
|
|
939
|
-
* @category CmsGroup
|
|
940
|
-
* @category Database model
|
|
941
|
-
*/
|
|
942
|
-
export interface CmsGroup {
|
|
943
|
-
/**
|
|
944
|
-
* Generated ID.
|
|
945
|
-
*/
|
|
946
|
-
id: string;
|
|
947
|
-
/**
|
|
948
|
-
* Name of the group.
|
|
949
|
-
*/
|
|
950
|
-
name: string;
|
|
951
|
-
/**
|
|
952
|
-
* Slug for the group. Must be unique.
|
|
953
|
-
*/
|
|
954
|
-
slug: string;
|
|
955
|
-
/**
|
|
956
|
-
* Group tenant.
|
|
957
|
-
*/
|
|
958
|
-
tenant: string;
|
|
959
|
-
/**
|
|
960
|
-
* Locale this group belongs to.
|
|
961
|
-
*/
|
|
962
|
-
locale: string;
|
|
963
|
-
/**
|
|
964
|
-
* Description for the group.
|
|
965
|
-
*/
|
|
966
|
-
description: string | null;
|
|
967
|
-
/**
|
|
968
|
-
* Icon for the group. In a form of "ico/ico".
|
|
969
|
-
*/
|
|
970
|
-
icon: string;
|
|
971
|
-
/**
|
|
972
|
-
* CreatedBy reference object.
|
|
973
|
-
*/
|
|
974
|
-
createdBy?: CmsIdentity;
|
|
975
|
-
/**
|
|
976
|
-
* Date group was created on.
|
|
977
|
-
*/
|
|
978
|
-
createdOn?: string;
|
|
979
|
-
/**
|
|
980
|
-
* Date group was created or changed on.
|
|
981
|
-
*/
|
|
982
|
-
savedOn?: string;
|
|
983
|
-
/**
|
|
984
|
-
* Which Webiny version was this record stored with.
|
|
985
|
-
*/
|
|
986
|
-
webinyVersion: string;
|
|
987
|
-
/**
|
|
988
|
-
* Is group private?
|
|
989
|
-
* This is meant to be used for some internal groups - will not be visible in the schema.
|
|
990
|
-
* Only available for the plugin constructed groups.
|
|
991
|
-
*/
|
|
992
|
-
isPrivate?: boolean;
|
|
993
|
-
/**
|
|
994
|
-
* Is this group created via plugin?
|
|
995
|
-
*/
|
|
996
|
-
isPlugin?: boolean;
|
|
997
|
-
}
|
|
998
240
|
/**
|
|
999
241
|
* A `data.where` parameter received when listing content model groups.
|
|
1000
242
|
*
|
|
@@ -1040,285 +282,87 @@ export interface OnGroupBeforeUpdateTopicParams {
|
|
|
1040
282
|
}
|
|
1041
283
|
/**
|
|
1042
284
|
* @category CmsGroup
|
|
1043
|
-
* @category Topic
|
|
1044
|
-
*/
|
|
1045
|
-
export interface OnGroupAfterUpdateTopicParams {
|
|
1046
|
-
original: CmsGroup;
|
|
1047
|
-
group: CmsGroup;
|
|
1048
|
-
}
|
|
1049
|
-
/**
|
|
1050
|
-
* @category CmsGroup
|
|
1051
|
-
* @category Topic
|
|
1052
|
-
*/
|
|
1053
|
-
export interface OnGroupUpdateErrorTopicParams {
|
|
1054
|
-
input: CmsGroupUpdateInput;
|
|
1055
|
-
original: CmsGroup;
|
|
1056
|
-
group: CmsGroup;
|
|
1057
|
-
error: Error;
|
|
1058
|
-
}
|
|
1059
|
-
/**
|
|
1060
|
-
* @category CmsGroup
|
|
1061
|
-
* @category Topic
|
|
1062
|
-
*/
|
|
1063
|
-
export interface OnGroupBeforeDeleteTopicParams {
|
|
1064
|
-
group: CmsGroup;
|
|
1065
|
-
}
|
|
1066
|
-
/**
|
|
1067
|
-
* @category CmsGroup
|
|
1068
|
-
* @category Topic
|
|
1069
|
-
*/
|
|
1070
|
-
export interface OnGroupAfterDeleteTopicParams {
|
|
1071
|
-
group: CmsGroup;
|
|
1072
|
-
}
|
|
1073
|
-
/**
|
|
1074
|
-
* @category CmsGroup
|
|
1075
|
-
* @category Topic
|
|
1076
|
-
*/
|
|
1077
|
-
export interface OnGroupDeleteErrorTopicParams {
|
|
1078
|
-
group: CmsGroup;
|
|
1079
|
-
error: Error;
|
|
1080
|
-
}
|
|
1081
|
-
/**
|
|
1082
|
-
* Cms Group in context.
|
|
1083
|
-
*
|
|
1084
|
-
* @category Context
|
|
1085
|
-
* @category CmsGroup
|
|
1086
|
-
*/
|
|
1087
|
-
export interface CmsGroupContext {
|
|
1088
|
-
/**
|
|
1089
|
-
* Gets content model group by given id.
|
|
1090
|
-
*/
|
|
1091
|
-
getGroup: (id: string) => Promise<CmsGroup>;
|
|
1092
|
-
/**
|
|
1093
|
-
* List all content model groups. Filterable via params.
|
|
1094
|
-
*/
|
|
1095
|
-
listGroups: (params?: CmsGroupListParams) => Promise<CmsGroup[]>;
|
|
1096
|
-
/**
|
|
1097
|
-
* Create a new content model group.
|
|
1098
|
-
*/
|
|
1099
|
-
createGroup: (data: CmsGroupCreateInput) => Promise<CmsGroup>;
|
|
1100
|
-
/**
|
|
1101
|
-
* Update existing content model group.
|
|
1102
|
-
*/
|
|
1103
|
-
updateGroup: (id: string, data: CmsGroupUpdateInput) => Promise<CmsGroup>;
|
|
1104
|
-
/**
|
|
1105
|
-
* Delete content model group by given id.
|
|
1106
|
-
*/
|
|
1107
|
-
deleteGroup: (id: string) => Promise<boolean>;
|
|
1108
|
-
/**
|
|
1109
|
-
* Clear the cached groups.
|
|
1110
|
-
*/
|
|
1111
|
-
clearGroupsCache: () => void;
|
|
1112
|
-
/**
|
|
1113
|
-
* Lifecycle Events
|
|
1114
|
-
*/
|
|
1115
|
-
onGroupBeforeCreate: Topic<OnGroupBeforeCreateTopicParams>;
|
|
1116
|
-
onGroupAfterCreate: Topic<OnGroupAfterCreateTopicParams>;
|
|
1117
|
-
onGroupCreateError: Topic<OnGroupCreateErrorTopicParams>;
|
|
1118
|
-
onGroupBeforeUpdate: Topic<OnGroupBeforeUpdateTopicParams>;
|
|
1119
|
-
onGroupAfterUpdate: Topic<OnGroupAfterUpdateTopicParams>;
|
|
1120
|
-
onGroupUpdateError: Topic<OnGroupUpdateErrorTopicParams>;
|
|
1121
|
-
onGroupBeforeDelete: Topic<OnGroupBeforeDeleteTopicParams>;
|
|
1122
|
-
onGroupAfterDelete: Topic<OnGroupAfterDeleteTopicParams>;
|
|
1123
|
-
onGroupDeleteError: Topic<OnGroupDeleteErrorTopicParams>;
|
|
1124
|
-
}
|
|
1125
|
-
/**
|
|
1126
|
-
* Definition for content model field validator.
|
|
1127
|
-
*
|
|
1128
|
-
* @category ModelField
|
|
1129
|
-
* @category FieldValidation
|
|
1130
|
-
*/
|
|
1131
|
-
export interface CmsModelFieldValidation {
|
|
1132
|
-
name: string;
|
|
1133
|
-
message: string;
|
|
1134
|
-
settings?: {
|
|
1135
|
-
value?: string | number;
|
|
1136
|
-
values?: string[];
|
|
1137
|
-
preset?: string;
|
|
1138
|
-
[key: string]: any;
|
|
1139
|
-
};
|
|
1140
|
-
}
|
|
1141
|
-
/**
|
|
1142
|
-
* A GraphQL `params.data` parameter received when creating content model.
|
|
1143
|
-
*
|
|
1144
|
-
* @category GraphQL params
|
|
1145
|
-
* @category CmsModel
|
|
1146
|
-
*/
|
|
1147
|
-
export interface CmsModelCreateInput {
|
|
1148
|
-
/**
|
|
1149
|
-
* Name of the content model.
|
|
1150
|
-
*/
|
|
1151
|
-
name: string;
|
|
1152
|
-
/**
|
|
1153
|
-
* Singular name of the content model to be used in the API.
|
|
1154
|
-
*/
|
|
1155
|
-
singularApiName: string;
|
|
1156
|
-
/**
|
|
1157
|
-
* Plural name of the content model to be used in the API.
|
|
1158
|
-
*/
|
|
1159
|
-
pluralApiName: string;
|
|
1160
|
-
/**
|
|
1161
|
-
* Unique ID of the content model. Created from name if not sent by the user. Cannot be changed.
|
|
1162
|
-
*/
|
|
1163
|
-
modelId?: string;
|
|
1164
|
-
/**
|
|
1165
|
-
* Description of the content model.
|
|
1166
|
-
*/
|
|
1167
|
-
description?: string | null;
|
|
1168
|
-
/**
|
|
1169
|
-
* Group where to put the content model in.
|
|
1170
|
-
*/
|
|
1171
|
-
group: string;
|
|
1172
|
-
/**
|
|
1173
|
-
* A list of content model fields to define the entry values.
|
|
1174
|
-
*/
|
|
1175
|
-
fields?: CmsModelFieldInput[];
|
|
1176
|
-
/**
|
|
1177
|
-
* Admin UI field layout
|
|
1178
|
-
*
|
|
1179
|
-
* ```ts
|
|
1180
|
-
* layout: [
|
|
1181
|
-
* [field1id, field2id],
|
|
1182
|
-
* [field3id]
|
|
1183
|
-
* ]
|
|
1184
|
-
* ```
|
|
1185
|
-
*/
|
|
1186
|
-
layout?: string[][];
|
|
1187
|
-
/**
|
|
1188
|
-
* Models can be tagged to give them contextual meaning.
|
|
1189
|
-
*/
|
|
1190
|
-
tags?: string[];
|
|
1191
|
-
/**
|
|
1192
|
-
* Fields fieldId which are picked to represent the CMS entry.
|
|
1193
|
-
*/
|
|
1194
|
-
titleFieldId?: string | null;
|
|
1195
|
-
descriptionFieldId?: string | null;
|
|
1196
|
-
imageFieldId?: string | null;
|
|
285
|
+
* @category Topic
|
|
286
|
+
*/
|
|
287
|
+
export interface OnGroupAfterUpdateTopicParams {
|
|
288
|
+
original: CmsGroup;
|
|
289
|
+
group: CmsGroup;
|
|
1197
290
|
}
|
|
1198
291
|
/**
|
|
1199
|
-
*
|
|
1200
|
-
*
|
|
1201
|
-
* @category GraphQL params
|
|
1202
|
-
* @category CmsModel
|
|
292
|
+
* @category CmsGroup
|
|
293
|
+
* @category Topic
|
|
1203
294
|
*/
|
|
1204
|
-
export interface
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
295
|
+
export interface OnGroupUpdateErrorTopicParams {
|
|
296
|
+
input: CmsGroupUpdateInput;
|
|
297
|
+
original: CmsGroup;
|
|
298
|
+
group: CmsGroup;
|
|
299
|
+
error: Error;
|
|
1209
300
|
}
|
|
1210
301
|
/**
|
|
1211
|
-
*
|
|
1212
|
-
*
|
|
1213
|
-
* Input type for `CmsModelField`.
|
|
1214
|
-
* @see CmsModelField
|
|
1215
|
-
*
|
|
1216
|
-
* @category GraphQL params
|
|
1217
|
-
* @category ModelField
|
|
302
|
+
* @category CmsGroup
|
|
303
|
+
* @category Topic
|
|
1218
304
|
*/
|
|
1219
|
-
export interface
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
label: string;
|
|
1237
|
-
/**
|
|
1238
|
-
* Text to display below the field to help user what to write in the field.
|
|
1239
|
-
*/
|
|
1240
|
-
helpText?: string | null;
|
|
1241
|
-
/**
|
|
1242
|
-
* Text to display in the field.
|
|
1243
|
-
*/
|
|
1244
|
-
placeholderText?: string | null;
|
|
1245
|
-
/**
|
|
1246
|
-
* Fields can be tagged to give them contextual meaning.
|
|
1247
|
-
*/
|
|
1248
|
-
tags?: string[];
|
|
1249
|
-
/**
|
|
1250
|
-
* Are multiple values allowed?
|
|
1251
|
-
*/
|
|
1252
|
-
multipleValues?: boolean;
|
|
1253
|
-
/**
|
|
1254
|
-
* Predefined values options for the field. Check the reference for more information.
|
|
1255
|
-
*/
|
|
1256
|
-
predefinedValues?: CmsModelFieldPredefinedValues;
|
|
1257
|
-
/**
|
|
1258
|
-
* Renderer options for the field. Check the reference for more information.
|
|
1259
|
-
*/
|
|
1260
|
-
renderer?: CmsModelFieldRenderer;
|
|
1261
|
-
/**
|
|
1262
|
-
* List of validations for the field.
|
|
1263
|
-
*/
|
|
1264
|
-
validation?: CmsModelFieldValidation[];
|
|
1265
|
-
/**
|
|
1266
|
-
* @see CmsModelField.listValidation
|
|
1267
|
-
*/
|
|
1268
|
-
listValidation?: CmsModelFieldValidation[];
|
|
1269
|
-
/**
|
|
1270
|
-
* User defined settings.
|
|
1271
|
-
*/
|
|
1272
|
-
settings?: Record<string, any>;
|
|
305
|
+
export interface OnGroupBeforeDeleteTopicParams {
|
|
306
|
+
group: CmsGroup;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* @category CmsGroup
|
|
310
|
+
* @category Topic
|
|
311
|
+
*/
|
|
312
|
+
export interface OnGroupAfterDeleteTopicParams {
|
|
313
|
+
group: CmsGroup;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* @category CmsGroup
|
|
317
|
+
* @category Topic
|
|
318
|
+
*/
|
|
319
|
+
export interface OnGroupDeleteErrorTopicParams {
|
|
320
|
+
group: CmsGroup;
|
|
321
|
+
error: Error;
|
|
1273
322
|
}
|
|
1274
323
|
/**
|
|
1275
|
-
*
|
|
324
|
+
* Cms Group in context.
|
|
1276
325
|
*
|
|
1277
|
-
* @category
|
|
1278
|
-
* @category
|
|
326
|
+
* @category Context
|
|
327
|
+
* @category CmsGroup
|
|
1279
328
|
*/
|
|
1280
|
-
export interface
|
|
1281
|
-
/**
|
|
1282
|
-
* A new content model name.
|
|
1283
|
-
*/
|
|
1284
|
-
name?: string;
|
|
329
|
+
export interface CmsGroupContext {
|
|
1285
330
|
/**
|
|
1286
|
-
*
|
|
331
|
+
* Gets content model group by given id.
|
|
1287
332
|
*/
|
|
1288
|
-
|
|
333
|
+
getGroup: (id: string) => Promise<CmsGroup>;
|
|
1289
334
|
/**
|
|
1290
|
-
*
|
|
335
|
+
* List all content model groups. Filterable via params.
|
|
1291
336
|
*/
|
|
1292
|
-
|
|
337
|
+
listGroups: (params?: CmsGroupListParams) => Promise<CmsGroup[]>;
|
|
1293
338
|
/**
|
|
1294
|
-
*
|
|
339
|
+
* Create a new content model group.
|
|
1295
340
|
*/
|
|
1296
|
-
|
|
341
|
+
createGroup: (data: CmsGroupCreateInput) => Promise<CmsGroup>;
|
|
1297
342
|
/**
|
|
1298
|
-
*
|
|
343
|
+
* Update existing content model group.
|
|
1299
344
|
*/
|
|
1300
|
-
|
|
345
|
+
updateGroup: (id: string, data: CmsGroupUpdateInput) => Promise<CmsGroup>;
|
|
1301
346
|
/**
|
|
1302
|
-
*
|
|
347
|
+
* Delete content model group by given id.
|
|
1303
348
|
*/
|
|
1304
|
-
|
|
349
|
+
deleteGroup: (id: string) => Promise<boolean>;
|
|
1305
350
|
/**
|
|
1306
|
-
*
|
|
1307
|
-
*
|
|
1308
|
-
* ```ts
|
|
1309
|
-
* layout: [
|
|
1310
|
-
* [field1id, field2id],
|
|
1311
|
-
* [field3id]
|
|
1312
|
-
* ]
|
|
1313
|
-
* ```
|
|
351
|
+
* Clear the cached groups.
|
|
1314
352
|
*/
|
|
1315
|
-
|
|
353
|
+
clearGroupsCache: () => void;
|
|
1316
354
|
/**
|
|
1317
|
-
*
|
|
355
|
+
* Lifecycle Events
|
|
1318
356
|
*/
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
357
|
+
onGroupBeforeCreate: Topic<OnGroupBeforeCreateTopicParams>;
|
|
358
|
+
onGroupAfterCreate: Topic<OnGroupAfterCreateTopicParams>;
|
|
359
|
+
onGroupCreateError: Topic<OnGroupCreateErrorTopicParams>;
|
|
360
|
+
onGroupBeforeUpdate: Topic<OnGroupBeforeUpdateTopicParams>;
|
|
361
|
+
onGroupAfterUpdate: Topic<OnGroupAfterUpdateTopicParams>;
|
|
362
|
+
onGroupUpdateError: Topic<OnGroupUpdateErrorTopicParams>;
|
|
363
|
+
onGroupBeforeDelete: Topic<OnGroupBeforeDeleteTopicParams>;
|
|
364
|
+
onGroupAfterDelete: Topic<OnGroupAfterDeleteTopicParams>;
|
|
365
|
+
onGroupDeleteError: Topic<OnGroupDeleteErrorTopicParams>;
|
|
1322
366
|
}
|
|
1323
367
|
/**
|
|
1324
368
|
* A plugin to load a CmsModelManager.
|
|
@@ -1343,7 +387,7 @@ export interface ModelManagerPlugin extends Plugin {
|
|
|
1343
387
|
* Create a CmsModelManager for specific type - or new default one.
|
|
1344
388
|
* 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)
|
|
1345
389
|
*/
|
|
1346
|
-
create
|
|
390
|
+
create<T = any>(context: CmsContext, model: CmsModel): Promise<CmsModelManager<T>>;
|
|
1347
391
|
}
|
|
1348
392
|
/**
|
|
1349
393
|
* A content entry values definition for and from the database.
|
|
@@ -1394,6 +438,14 @@ export interface CmsEntry<T = CmsEntryValues> {
|
|
|
1394
438
|
* An ISO 8601 date/time string.
|
|
1395
439
|
*/
|
|
1396
440
|
revisionModifiedOn: string | null;
|
|
441
|
+
/**
|
|
442
|
+
* An ISO 8601 date/time string.
|
|
443
|
+
*/
|
|
444
|
+
revisionDeletedOn: string | null;
|
|
445
|
+
/**
|
|
446
|
+
* An ISO 8601 date/time string.
|
|
447
|
+
*/
|
|
448
|
+
revisionRestoredOn: string | null;
|
|
1397
449
|
/**
|
|
1398
450
|
* An ISO 8601 date/time string.
|
|
1399
451
|
*/
|
|
@@ -1414,6 +466,14 @@ export interface CmsEntry<T = CmsEntryValues> {
|
|
|
1414
466
|
* Identity that last ionModified the entry.
|
|
1415
467
|
*/
|
|
1416
468
|
revisionModifiedBy: CmsIdentity | null;
|
|
469
|
+
/**
|
|
470
|
+
* Identity that last deleted the revision.
|
|
471
|
+
*/
|
|
472
|
+
revisionDeletedBy: CmsIdentity | null;
|
|
473
|
+
/**
|
|
474
|
+
* Identity that last restored the revision.
|
|
475
|
+
*/
|
|
476
|
+
revisionRestoredBy: CmsIdentity | null;
|
|
1417
477
|
/**
|
|
1418
478
|
* Identity that first published the entry.
|
|
1419
479
|
*/
|
|
@@ -1434,6 +494,14 @@ export interface CmsEntry<T = CmsEntryValues> {
|
|
|
1434
494
|
* An ISO 8601 date/time string.
|
|
1435
495
|
*/
|
|
1436
496
|
modifiedOn: string | null;
|
|
497
|
+
/**
|
|
498
|
+
* An ISO 8601 date/time string.
|
|
499
|
+
*/
|
|
500
|
+
deletedOn: string | null;
|
|
501
|
+
/**
|
|
502
|
+
* An ISO 8601 date/time string.
|
|
503
|
+
*/
|
|
504
|
+
restoredOn: string | null;
|
|
1437
505
|
/**
|
|
1438
506
|
* An ISO 8601 date/time string.
|
|
1439
507
|
*/
|
|
@@ -1454,6 +522,14 @@ export interface CmsEntry<T = CmsEntryValues> {
|
|
|
1454
522
|
* Identity that last modified the entry.
|
|
1455
523
|
*/
|
|
1456
524
|
modifiedBy: CmsIdentity | null;
|
|
525
|
+
/**
|
|
526
|
+
* Identity that last deleted the entry.
|
|
527
|
+
*/
|
|
528
|
+
deletedBy: CmsIdentity | null;
|
|
529
|
+
/**
|
|
530
|
+
* Identity that last restored the entry.
|
|
531
|
+
*/
|
|
532
|
+
restoredBy: CmsIdentity | null;
|
|
1457
533
|
/**
|
|
1458
534
|
* Identity that first published the entry.
|
|
1459
535
|
*/
|
|
@@ -1462,6 +538,17 @@ export interface CmsEntry<T = CmsEntryValues> {
|
|
|
1462
538
|
* Identity that last published the entry.
|
|
1463
539
|
*/
|
|
1464
540
|
lastPublishedBy: CmsIdentity | null;
|
|
541
|
+
/**
|
|
542
|
+
* Deprecated fields. 👇
|
|
543
|
+
*/
|
|
544
|
+
/**
|
|
545
|
+
* @deprecated Will be removed with the 5.41.0 release. Use `createdBy` field instead.
|
|
546
|
+
*/
|
|
547
|
+
ownedBy?: CmsIdentity | null;
|
|
548
|
+
/**
|
|
549
|
+
* @deprecated Will be removed with the 5.41.0 release. Use `firstPublishedOn` or `lastPublishedOn` field instead.
|
|
550
|
+
*/
|
|
551
|
+
publishedOn?: string | null;
|
|
1465
552
|
/**
|
|
1466
553
|
* Model ID of the definition for the entry.
|
|
1467
554
|
* @see CmsModel
|
|
@@ -1507,6 +594,15 @@ export interface CmsEntry<T = CmsEntryValues> {
|
|
|
1507
594
|
meta?: {
|
|
1508
595
|
[key: string]: any;
|
|
1509
596
|
};
|
|
597
|
+
/**
|
|
598
|
+
* Is the entry in the bin?
|
|
599
|
+
*/
|
|
600
|
+
wbyDeleted?: boolean | null;
|
|
601
|
+
/**
|
|
602
|
+
* This field preserves the original folderId value, as the ROOT_FOLDER is set upon deletion.
|
|
603
|
+
* The value is utilized when restoring the entry from the trash bin.
|
|
604
|
+
*/
|
|
605
|
+
binOriginalFolderId?: string | null;
|
|
1510
606
|
}
|
|
1511
607
|
export interface CmsStorageEntry extends CmsEntry {
|
|
1512
608
|
[key: string]: any;
|
|
@@ -1525,40 +621,42 @@ export interface CmsEntryUniqueValue {
|
|
|
1525
621
|
* @category CmsEntry
|
|
1526
622
|
* @category CmsModel
|
|
1527
623
|
*/
|
|
1528
|
-
export interface CmsModelManager {
|
|
624
|
+
export interface CmsModelManager<T = CmsEntryValues> {
|
|
625
|
+
model: CmsModel;
|
|
1529
626
|
/**
|
|
1530
627
|
* List only published entries in the content model.
|
|
1531
628
|
*/
|
|
1532
|
-
listPublished
|
|
629
|
+
listPublished(params: CmsEntryListParams): Promise<[CmsEntry<T>[], CmsEntryMeta]>;
|
|
1533
630
|
/**
|
|
1534
631
|
* List latest entries in the content model. Used for administration.
|
|
1535
632
|
*/
|
|
1536
|
-
listLatest
|
|
633
|
+
listLatest(params: CmsEntryListParams): Promise<[CmsEntry<T>[], CmsEntryMeta]>;
|
|
1537
634
|
/**
|
|
1538
635
|
* Get a list of published entries by the ID list.
|
|
1539
636
|
*/
|
|
1540
|
-
getPublishedByIds
|
|
637
|
+
getPublishedByIds(ids: string[]): Promise<CmsEntry<T>[]>;
|
|
1541
638
|
/**
|
|
1542
639
|
* Get a list of the latest entries by the ID list.
|
|
1543
640
|
*/
|
|
1544
|
-
getLatestByIds
|
|
641
|
+
getLatestByIds(ids: string[]): Promise<CmsEntry<T>[]>;
|
|
1545
642
|
/**
|
|
1546
643
|
* Get an entry filtered by given params. Will always get one.
|
|
1547
644
|
*/
|
|
1548
|
-
get
|
|
645
|
+
get(id: string): Promise<CmsEntry<T>>;
|
|
1549
646
|
/**
|
|
1550
647
|
* Create an entry.
|
|
1551
648
|
*/
|
|
1552
|
-
create
|
|
649
|
+
create<I>(data: CreateCmsEntryInput & I, options?: CreateCmsEntryOptionsInput): Promise<CmsEntry<T>>;
|
|
1553
650
|
/**
|
|
1554
651
|
* Update an entry.
|
|
1555
652
|
*/
|
|
1556
|
-
update
|
|
653
|
+
update(id: string, data: UpdateCmsEntryInput, options?: UpdateCmsEntryOptionsInput): Promise<CmsEntry<T>>;
|
|
1557
654
|
/**
|
|
1558
655
|
* Delete an entry.
|
|
1559
656
|
*/
|
|
1560
|
-
delete
|
|
657
|
+
delete(id: string, options?: CmsDeleteEntryOptions): Promise<void>;
|
|
1561
658
|
}
|
|
659
|
+
export type ICmsEntryManager<T = GenericRecord> = CmsModelManager<T>;
|
|
1562
660
|
/**
|
|
1563
661
|
* Create
|
|
1564
662
|
*/
|
|
@@ -1640,6 +738,13 @@ export interface CmsModelUpdateDirectParams {
|
|
|
1640
738
|
model: CmsModel;
|
|
1641
739
|
original: CmsModel;
|
|
1642
740
|
}
|
|
741
|
+
export interface ICmsModelListParams {
|
|
742
|
+
/**
|
|
743
|
+
* Defaults to true.
|
|
744
|
+
*/
|
|
745
|
+
includePrivate?: boolean;
|
|
746
|
+
includePlugins?: boolean;
|
|
747
|
+
}
|
|
1643
748
|
/**
|
|
1644
749
|
* Cms Model in the context.
|
|
1645
750
|
*
|
|
@@ -1649,55 +754,65 @@ export interface CmsModelUpdateDirectParams {
|
|
|
1649
754
|
export interface CmsModelContext {
|
|
1650
755
|
/**
|
|
1651
756
|
* Get a single content model.
|
|
757
|
+
*
|
|
758
|
+
* @throws NotFoundError
|
|
759
|
+
*/
|
|
760
|
+
getModel(modelId: string): Promise<CmsModel>;
|
|
761
|
+
/**
|
|
762
|
+
* Get model to AST converter.
|
|
1652
763
|
*/
|
|
1653
|
-
|
|
764
|
+
getModelToAstConverter: () => CmsModelToAstConverter;
|
|
1654
765
|
/**
|
|
1655
766
|
* Get all content models.
|
|
1656
767
|
*/
|
|
1657
|
-
listModels
|
|
768
|
+
listModels(params?: ICmsModelListParams): Promise<CmsModel[]>;
|
|
1658
769
|
/**
|
|
1659
770
|
* Create a content model.
|
|
1660
771
|
*/
|
|
1661
|
-
createModel
|
|
772
|
+
createModel(data: CmsModelCreateInput): Promise<CmsModel>;
|
|
1662
773
|
/**
|
|
1663
774
|
* Create a content model from the given model - clone.
|
|
1664
775
|
*/
|
|
1665
|
-
createModelFrom
|
|
776
|
+
createModelFrom(modelId: string, data: CmsModelCreateFromInput): Promise<CmsModel>;
|
|
1666
777
|
/**
|
|
1667
778
|
* Update content model without data validation. Used internally.
|
|
1668
779
|
* @hidden
|
|
1669
780
|
*/
|
|
1670
|
-
updateModelDirect
|
|
781
|
+
updateModelDirect(params: CmsModelUpdateDirectParams): Promise<CmsModel>;
|
|
1671
782
|
/**
|
|
1672
783
|
* Update content model.
|
|
1673
784
|
*/
|
|
1674
|
-
updateModel
|
|
785
|
+
updateModel(modelId: string, data: CmsModelUpdateInput): Promise<CmsModel>;
|
|
1675
786
|
/**
|
|
1676
787
|
* Delete content model. Should not allow deletion if there are entries connected to it.
|
|
1677
788
|
*/
|
|
1678
|
-
deleteModel
|
|
789
|
+
deleteModel(modelId: string): Promise<void>;
|
|
1679
790
|
/**
|
|
1680
791
|
* Possibility for users to trigger the model initialization.
|
|
1681
792
|
* They can hook into it and do what ever they want to.
|
|
1682
793
|
*
|
|
1683
794
|
* Primary idea behind this is creating the index, for the code models, in the ES.
|
|
1684
795
|
*/
|
|
1685
|
-
initializeModel
|
|
796
|
+
initializeModel(modelId: string, data: Record<string, any>): Promise<boolean>;
|
|
1686
797
|
/**
|
|
1687
798
|
* Get an instance of CmsModelManager for given content modelId.
|
|
1688
799
|
*
|
|
1689
800
|
* @see CmsModelManager
|
|
1690
801
|
*/
|
|
1691
|
-
getEntryManager
|
|
802
|
+
getEntryManager<T extends CmsEntryValues = CmsEntryValues>(model: CmsModel | string): Promise<ICmsEntryManager<T>>;
|
|
803
|
+
/**
|
|
804
|
+
* A model manager for a model which has a single entry.
|
|
805
|
+
*/
|
|
806
|
+
getSingletonEntryManager<T extends CmsEntryValues = CmsEntryValues>(model: CmsModel | string): Promise<ISingletonModelManager<T>>;
|
|
1692
807
|
/**
|
|
1693
808
|
* Get all content model managers mapped by modelId.
|
|
1694
809
|
* @see CmsModelManager
|
|
1695
810
|
*/
|
|
1696
|
-
getEntryManagers
|
|
811
|
+
getEntryManagers(): Map<string, ICmsEntryManager>;
|
|
1697
812
|
/**
|
|
1698
813
|
* Clear all the model caches.
|
|
1699
814
|
*/
|
|
1700
|
-
clearModelsCache
|
|
815
|
+
clearModelsCache(): void;
|
|
1701
816
|
/**
|
|
1702
817
|
* Lifecycle Events
|
|
1703
818
|
*/
|
|
@@ -1720,7 +835,7 @@ export interface CmsModelContext {
|
|
|
1720
835
|
*
|
|
1721
836
|
* @category CmsEntry
|
|
1722
837
|
*/
|
|
1723
|
-
export
|
|
838
|
+
export type CmsEntryStatus = "published" | "unpublished" | "draft";
|
|
1724
839
|
export interface CmsEntryListWhereRef {
|
|
1725
840
|
id?: string;
|
|
1726
841
|
id_in?: string[];
|
|
@@ -1752,6 +867,13 @@ export interface CmsEntryListWhere {
|
|
|
1752
867
|
entryId_not?: string;
|
|
1753
868
|
entryId_in?: string[];
|
|
1754
869
|
entryId_not_in?: string[];
|
|
870
|
+
/**
|
|
871
|
+
* Status of the entry.
|
|
872
|
+
*/
|
|
873
|
+
status?: CmsEntryStatus;
|
|
874
|
+
status_not?: CmsEntryStatus;
|
|
875
|
+
status_in?: CmsEntryStatus[];
|
|
876
|
+
status_not_in?: CmsEntryStatus[];
|
|
1755
877
|
/**
|
|
1756
878
|
* Revision-level meta fields. 👇
|
|
1757
879
|
*/
|
|
@@ -1837,7 +959,7 @@ export interface CmsEntryListWhere {
|
|
|
1837
959
|
/**
|
|
1838
960
|
* This is to allow querying by any content model field defined by the user.
|
|
1839
961
|
*/
|
|
1840
|
-
[key: string]: string | number | boolean | undefined | string[] | number[] | null | CmsEntryListWhere[] | CmsEntryListWhere | CmsEntryListWhereRef;
|
|
962
|
+
[key: string]: string | number | boolean | Date | undefined | string[] | number[] | null | CmsEntryListWhere[] | CmsEntryListWhere | CmsEntryListWhereRef;
|
|
1841
963
|
/**
|
|
1842
964
|
* To allow querying via nested queries, we added the AND / OR properties.
|
|
1843
965
|
*/
|
|
@@ -1850,7 +972,9 @@ export interface CmsEntryListWhere {
|
|
|
1850
972
|
* @category CmsEntry
|
|
1851
973
|
* @category GraphQL params
|
|
1852
974
|
*/
|
|
1853
|
-
export
|
|
975
|
+
export type CmsEntryListSortAsc = `${string}_ASC`;
|
|
976
|
+
export type CmsEntryListSortDesc = `${string}_DESC`;
|
|
977
|
+
export type CmsEntryListSort = (CmsEntryListSortAsc | CmsEntryListSortDesc)[];
|
|
1854
978
|
/**
|
|
1855
979
|
* Get entry GraphQL resolver params.
|
|
1856
980
|
*
|
|
@@ -2033,19 +1157,45 @@ export interface OnEntryUnpublishErrorTopicParams {
|
|
|
2033
1157
|
entry: CmsEntry;
|
|
2034
1158
|
model: CmsModel;
|
|
2035
1159
|
}
|
|
1160
|
+
/**
|
|
1161
|
+
* Delete
|
|
1162
|
+
*/
|
|
2036
1163
|
export interface OnEntryBeforeDeleteTopicParams {
|
|
2037
1164
|
entry: CmsEntry;
|
|
2038
1165
|
model: CmsModel;
|
|
1166
|
+
permanent: boolean;
|
|
2039
1167
|
}
|
|
2040
1168
|
export interface OnEntryAfterDeleteTopicParams {
|
|
2041
1169
|
entry: CmsEntry;
|
|
2042
1170
|
model: CmsModel;
|
|
1171
|
+
permanent: boolean;
|
|
2043
1172
|
}
|
|
2044
1173
|
export interface OnEntryDeleteErrorTopicParams {
|
|
1174
|
+
error: Error;
|
|
1175
|
+
entry: CmsEntry;
|
|
1176
|
+
permanent: boolean;
|
|
1177
|
+
model: CmsModel;
|
|
1178
|
+
}
|
|
1179
|
+
/**
|
|
1180
|
+
* Restore from bin
|
|
1181
|
+
*/
|
|
1182
|
+
export interface OnEntryBeforeRestoreFromBinTopicParams {
|
|
1183
|
+
entry: CmsEntry;
|
|
1184
|
+
model: CmsModel;
|
|
1185
|
+
}
|
|
1186
|
+
export interface OnEntryAfterRestoreFromBinTopicParams {
|
|
1187
|
+
entry: CmsEntry;
|
|
1188
|
+
model: CmsModel;
|
|
1189
|
+
storageEntry: CmsEntry;
|
|
1190
|
+
}
|
|
1191
|
+
export interface OnEntryRestoreFromBinErrorTopicParams {
|
|
2045
1192
|
error: Error;
|
|
2046
1193
|
entry: CmsEntry;
|
|
2047
1194
|
model: CmsModel;
|
|
2048
1195
|
}
|
|
1196
|
+
/**
|
|
1197
|
+
* Delete Revision
|
|
1198
|
+
*/
|
|
2049
1199
|
export interface OnEntryRevisionBeforeDeleteTopicParams {
|
|
2050
1200
|
entry: CmsEntry;
|
|
2051
1201
|
model: CmsModel;
|
|
@@ -2059,6 +1209,9 @@ export interface OnEntryRevisionDeleteErrorTopicParams {
|
|
|
2059
1209
|
entry: CmsEntry;
|
|
2060
1210
|
model: CmsModel;
|
|
2061
1211
|
}
|
|
1212
|
+
/**
|
|
1213
|
+
* Delete multiple
|
|
1214
|
+
*/
|
|
2062
1215
|
export interface OnEntryBeforeDeleteMultipleTopicParams {
|
|
2063
1216
|
model: CmsModel;
|
|
2064
1217
|
entries: CmsEntry[];
|
|
@@ -2075,10 +1228,16 @@ export interface OnEntryDeleteMultipleErrorTopicParams {
|
|
|
2075
1228
|
ids: string[];
|
|
2076
1229
|
error: Error;
|
|
2077
1230
|
}
|
|
1231
|
+
/**
|
|
1232
|
+
* Get
|
|
1233
|
+
*/
|
|
2078
1234
|
export interface OnEntryBeforeGetTopicParams {
|
|
2079
1235
|
model: CmsModel;
|
|
2080
1236
|
where: CmsEntryListWhere;
|
|
2081
1237
|
}
|
|
1238
|
+
/**
|
|
1239
|
+
* List
|
|
1240
|
+
*/
|
|
2082
1241
|
export interface EntryBeforeListTopicParams {
|
|
2083
1242
|
where: CmsEntryListWhere;
|
|
2084
1243
|
model: CmsModel;
|
|
@@ -2087,7 +1246,7 @@ export interface EntryBeforeListTopicParams {
|
|
|
2087
1246
|
* @category Context
|
|
2088
1247
|
* @category CmsEntry
|
|
2089
1248
|
*/
|
|
2090
|
-
export
|
|
1249
|
+
export type CreateCmsEntryInput<TValues = CmsEntryValues> = TValues & {
|
|
2091
1250
|
id?: string;
|
|
2092
1251
|
status?: CmsEntryStatus;
|
|
2093
1252
|
/**
|
|
@@ -2096,9 +1255,12 @@ export interface CreateCmsEntryInput {
|
|
|
2096
1255
|
createdOn?: Date | string;
|
|
2097
1256
|
modifiedOn?: Date | string | null;
|
|
2098
1257
|
savedOn?: Date | string;
|
|
1258
|
+
deletedOn?: Date | string | null;
|
|
1259
|
+
restoredOn?: Date | string | null;
|
|
2099
1260
|
createdBy?: CmsIdentity;
|
|
2100
|
-
modifiedBy?: CmsIdentity | null;
|
|
2101
1261
|
savedBy?: CmsIdentity;
|
|
1262
|
+
deletedBy?: CmsIdentity | null;
|
|
1263
|
+
restoredBy?: CmsIdentity | null;
|
|
2102
1264
|
firstPublishedOn?: Date | string;
|
|
2103
1265
|
lastPublishedOn?: Date | string;
|
|
2104
1266
|
firstPublishedBy?: CmsIdentity;
|
|
@@ -2109,9 +1271,13 @@ export interface CreateCmsEntryInput {
|
|
|
2109
1271
|
revisionCreatedOn?: Date | string;
|
|
2110
1272
|
revisionModifiedOn?: Date | string | null;
|
|
2111
1273
|
revisionSavedOn?: Date | string;
|
|
1274
|
+
revisionDeletedOn?: Date | string | null;
|
|
1275
|
+
revisionRestoredOn?: Date | string | null;
|
|
2112
1276
|
revisionCreatedBy?: CmsIdentity;
|
|
2113
1277
|
revisionModifiedBy?: CmsIdentity | null;
|
|
2114
1278
|
revisionSavedBy?: CmsIdentity;
|
|
1279
|
+
revisionDeletedBy?: CmsIdentity | null;
|
|
1280
|
+
revisionRestoredBy?: CmsIdentity | null;
|
|
2115
1281
|
revisionFirstPublishedOn?: Date | string;
|
|
2116
1282
|
revisionLastPublishedOn?: Date | string;
|
|
2117
1283
|
revisionFirstPublishedBy?: CmsIdentity;
|
|
@@ -2119,8 +1285,7 @@ export interface CreateCmsEntryInput {
|
|
|
2119
1285
|
wbyAco_location?: {
|
|
2120
1286
|
folderId?: string | null;
|
|
2121
1287
|
};
|
|
2122
|
-
|
|
2123
|
-
}
|
|
1288
|
+
};
|
|
2124
1289
|
export interface CreateCmsEntryOptionsInput {
|
|
2125
1290
|
skipValidators?: string[];
|
|
2126
1291
|
}
|
|
@@ -2164,18 +1329,22 @@ export interface CreateRevisionCmsEntryOptionsInput {
|
|
|
2164
1329
|
* @category Context
|
|
2165
1330
|
* @category CmsEntry
|
|
2166
1331
|
*/
|
|
2167
|
-
export
|
|
1332
|
+
export type UpdateCmsEntryInput<TValues = CmsEntryValues> = TValues & {
|
|
2168
1333
|
/**
|
|
2169
1334
|
* Revision-level meta fields. 👇
|
|
2170
1335
|
*/
|
|
2171
1336
|
revisionCreatedOn?: Date | string | null;
|
|
2172
1337
|
revisionModifiedOn?: Date | string | null;
|
|
2173
1338
|
revisionSavedOn?: Date | string | null;
|
|
1339
|
+
revisionDeletedOn?: Date | string | null;
|
|
1340
|
+
revisionRestoredOn?: Date | string | null;
|
|
2174
1341
|
revisionFirstPublishedOn?: Date | string | null;
|
|
2175
1342
|
revisionLastPublishedOn?: Date | string | null;
|
|
2176
1343
|
revisionModifiedBy?: CmsIdentity | null;
|
|
2177
1344
|
revisionCreatedBy?: CmsIdentity | null;
|
|
2178
1345
|
revisionSavedBy?: CmsIdentity | null;
|
|
1346
|
+
revisionDeletedBy?: CmsIdentity | null;
|
|
1347
|
+
revisionRestoredBy?: CmsIdentity | null;
|
|
2179
1348
|
revisionFirstPublishedBy?: CmsIdentity | null;
|
|
2180
1349
|
revisionLastPublishedBy?: CmsIdentity | null;
|
|
2181
1350
|
/**
|
|
@@ -2184,18 +1353,21 @@ export interface UpdateCmsEntryInput {
|
|
|
2184
1353
|
createdOn?: Date | string | null;
|
|
2185
1354
|
modifiedOn?: Date | string | null;
|
|
2186
1355
|
savedOn?: Date | string | null;
|
|
1356
|
+
deletedOn?: Date | string | null;
|
|
1357
|
+
restoredOn?: Date | string | null;
|
|
2187
1358
|
firstPublishedOn?: Date | string | null;
|
|
2188
1359
|
lastPublishedOn?: Date | string | null;
|
|
2189
1360
|
createdBy?: CmsIdentity | null;
|
|
2190
1361
|
modifiedBy?: CmsIdentity | null;
|
|
2191
1362
|
savedBy?: CmsIdentity | null;
|
|
1363
|
+
deletedBy?: CmsIdentity | null;
|
|
1364
|
+
restoredBy?: CmsIdentity | null;
|
|
2192
1365
|
firstPublishedBy?: CmsIdentity | null;
|
|
2193
1366
|
lastPublishedBy?: CmsIdentity | null;
|
|
2194
1367
|
wbyAco_location?: {
|
|
2195
1368
|
folderId?: string | null;
|
|
2196
1369
|
};
|
|
2197
|
-
|
|
2198
|
-
}
|
|
1370
|
+
};
|
|
2199
1371
|
export interface UpdateCmsEntryOptionsInput {
|
|
2200
1372
|
skipValidators?: string[];
|
|
2201
1373
|
}
|
|
@@ -2216,6 +1388,10 @@ export interface CmsDeleteEntryOptions {
|
|
|
2216
1388
|
* This is to force clean the entry records that might have been left behind a failed delete.
|
|
2217
1389
|
*/
|
|
2218
1390
|
force?: boolean;
|
|
1391
|
+
/**
|
|
1392
|
+
* Destroying the entry directly, without moving it to the bin.
|
|
1393
|
+
*/
|
|
1394
|
+
permanently?: boolean;
|
|
2219
1395
|
}
|
|
2220
1396
|
/**
|
|
2221
1397
|
* @category Context
|
|
@@ -2224,139 +1400,12 @@ export interface CmsDeleteEntryOptions {
|
|
|
2224
1400
|
export interface DeleteMultipleEntriesParams {
|
|
2225
1401
|
entries: string[];
|
|
2226
1402
|
}
|
|
2227
|
-
export
|
|
1403
|
+
export type DeleteMultipleEntriesResponse = {
|
|
2228
1404
|
id: string;
|
|
2229
1405
|
}[];
|
|
2230
1406
|
export interface CmsEntryValidateResponse {
|
|
2231
1407
|
[key: string]: any;
|
|
2232
1408
|
}
|
|
2233
|
-
/**
|
|
2234
|
-
* Cms Entry CRUD methods in the context.
|
|
2235
|
-
*
|
|
2236
|
-
* @category Context
|
|
2237
|
-
* @category CmsEntry
|
|
2238
|
-
*/
|
|
2239
|
-
export interface CmsEntryContext {
|
|
2240
|
-
/**
|
|
2241
|
-
* Get a single content entry for a model.
|
|
2242
|
-
*/
|
|
2243
|
-
getEntry: (model: CmsModel, params: CmsEntryGetParams) => Promise<CmsEntry>;
|
|
2244
|
-
/**
|
|
2245
|
-
* Get a list of entries for a model by a given ID (revision).
|
|
2246
|
-
*/
|
|
2247
|
-
getEntriesByIds: (model: CmsModel, revisions: string[]) => Promise<CmsEntry[]>;
|
|
2248
|
-
/**
|
|
2249
|
-
* Get the entry for a model by a given ID.
|
|
2250
|
-
*/
|
|
2251
|
-
getEntryById: (model: CmsModel, revision: string) => Promise<CmsEntry>;
|
|
2252
|
-
/**
|
|
2253
|
-
* List entries for a model. Internal method used by get, listLatest and listPublished.
|
|
2254
|
-
*/
|
|
2255
|
-
listEntries: <T = CmsEntryValues>(model: CmsModel, params: CmsEntryListParams) => Promise<[CmsEntry<T>[], CmsEntryMeta]>;
|
|
2256
|
-
/**
|
|
2257
|
-
* Lists the latest entries. Used for manage API.
|
|
2258
|
-
*/
|
|
2259
|
-
listLatestEntries: <T = CmsEntryValues>(model: CmsModel, params?: CmsEntryListParams) => Promise<[CmsEntry<T>[], CmsEntryMeta]>;
|
|
2260
|
-
/**
|
|
2261
|
-
* List published entries. Used for read API.
|
|
2262
|
-
*/
|
|
2263
|
-
listPublishedEntries: <T = CmsEntryValues>(model: CmsModel, params?: CmsEntryListParams) => Promise<[CmsEntry<T>[], CmsEntryMeta]>;
|
|
2264
|
-
/**
|
|
2265
|
-
* List published entries by IDs.
|
|
2266
|
-
*/
|
|
2267
|
-
getPublishedEntriesByIds: (model: CmsModel, ids: string[]) => Promise<CmsEntry[]>;
|
|
2268
|
-
/**
|
|
2269
|
-
* List latest entries by IDs.
|
|
2270
|
-
*/
|
|
2271
|
-
getLatestEntriesByIds: (model: CmsModel, ids: string[]) => Promise<CmsEntry[]>;
|
|
2272
|
-
/**
|
|
2273
|
-
* Create a new content entry.
|
|
2274
|
-
*/
|
|
2275
|
-
createEntry: (model: CmsModel, input: CreateCmsEntryInput, options?: CreateCmsEntryOptionsInput) => Promise<CmsEntry>;
|
|
2276
|
-
/**
|
|
2277
|
-
* Create a new entry from already existing entry.
|
|
2278
|
-
*/
|
|
2279
|
-
createEntryRevisionFrom: (model: CmsModel, id: string, input: CreateFromCmsEntryInput, options?: CreateRevisionCmsEntryOptionsInput) => Promise<CmsEntry>;
|
|
2280
|
-
/**
|
|
2281
|
-
* Update existing entry.
|
|
2282
|
-
*/
|
|
2283
|
-
updateEntry: (model: CmsModel, id: string, input: UpdateCmsEntryInput, meta?: Record<string, any>, options?: UpdateCmsEntryOptionsInput) => Promise<CmsEntry>;
|
|
2284
|
-
/**
|
|
2285
|
-
* Validate the entry - either new one or existing one.
|
|
2286
|
-
*/
|
|
2287
|
-
validateEntry: (model: CmsModel, id?: string, input?: UpdateCmsEntryInput) => Promise<CmsEntryValidateResponse>;
|
|
2288
|
-
/**
|
|
2289
|
-
* Move entry, and all its revisions, to a new folder.
|
|
2290
|
-
*/
|
|
2291
|
-
moveEntry: (model: CmsModel, id: string, folderId: string) => Promise<CmsEntry>;
|
|
2292
|
-
/**
|
|
2293
|
-
* Method that republishes entry with given identifier.
|
|
2294
|
-
* @internal
|
|
2295
|
-
*/
|
|
2296
|
-
republishEntry: (model: CmsModel, id: string) => Promise<CmsEntry>;
|
|
2297
|
-
/**
|
|
2298
|
-
* Delete only a certain revision of the entry.
|
|
2299
|
-
*/
|
|
2300
|
-
deleteEntryRevision: (model: CmsModel, id: string) => Promise<void>;
|
|
2301
|
-
/**
|
|
2302
|
-
* Delete entry with all its revisions.
|
|
2303
|
-
*/
|
|
2304
|
-
deleteEntry: (model: CmsModel, id: string, options?: CmsDeleteEntryOptions) => Promise<void>;
|
|
2305
|
-
/**
|
|
2306
|
-
* Delete multiple entries
|
|
2307
|
-
*/
|
|
2308
|
-
deleteMultipleEntries: (model: CmsModel, params: DeleteMultipleEntriesParams) => Promise<DeleteMultipleEntriesResponse>;
|
|
2309
|
-
/**
|
|
2310
|
-
* Publish entry.
|
|
2311
|
-
*/
|
|
2312
|
-
publishEntry: (model: CmsModel, id: string) => Promise<CmsEntry>;
|
|
2313
|
-
/**
|
|
2314
|
-
* Unpublish entry.
|
|
2315
|
-
*/
|
|
2316
|
-
unpublishEntry: (model: CmsModel, id: string) => Promise<CmsEntry>;
|
|
2317
|
-
/**
|
|
2318
|
-
* Get all entry revisions.
|
|
2319
|
-
*/
|
|
2320
|
-
getEntryRevisions: (model: CmsModel, id: string) => Promise<CmsEntry[]>;
|
|
2321
|
-
/**
|
|
2322
|
-
* List all unique values for a given field.
|
|
2323
|
-
*
|
|
2324
|
-
* @internal
|
|
2325
|
-
*/
|
|
2326
|
-
getUniqueFieldValues: (model: CmsModel, params: GetUniqueFieldValuesParams) => Promise<CmsEntryUniqueValue[]>;
|
|
2327
|
-
/**
|
|
2328
|
-
* Lifecycle Events
|
|
2329
|
-
*/
|
|
2330
|
-
onEntryBeforeCreate: Topic<OnEntryBeforeCreateTopicParams>;
|
|
2331
|
-
onEntryAfterCreate: Topic<OnEntryAfterCreateTopicParams>;
|
|
2332
|
-
onEntryCreateError: Topic<OnEntryCreateErrorTopicParams>;
|
|
2333
|
-
onEntryRevisionBeforeCreate: Topic<OnEntryRevisionBeforeCreateTopicParams>;
|
|
2334
|
-
onEntryRevisionAfterCreate: Topic<OnEntryRevisionAfterCreateTopicParams>;
|
|
2335
|
-
onEntryRevisionCreateError: Topic<OnEntryCreateRevisionErrorTopicParams>;
|
|
2336
|
-
onEntryBeforeUpdate: Topic<OnEntryBeforeUpdateTopicParams>;
|
|
2337
|
-
onEntryAfterUpdate: Topic<OnEntryAfterUpdateTopicParams>;
|
|
2338
|
-
onEntryUpdateError: Topic<OnEntryUpdateErrorTopicParams>;
|
|
2339
|
-
onEntryBeforeMove: Topic<OnEntryBeforeMoveTopicParams>;
|
|
2340
|
-
onEntryAfterMove: Topic<OnEntryAfterMoveTopicParams>;
|
|
2341
|
-
onEntryMoveError: Topic<OnEntryMoveErrorTopicParams>;
|
|
2342
|
-
onEntryBeforeDelete: Topic<OnEntryBeforeDeleteTopicParams>;
|
|
2343
|
-
onEntryAfterDelete: Topic<OnEntryAfterDeleteTopicParams>;
|
|
2344
|
-
onEntryDeleteError: Topic<OnEntryDeleteErrorTopicParams>;
|
|
2345
|
-
onEntryRevisionBeforeDelete: Topic<OnEntryRevisionBeforeDeleteTopicParams>;
|
|
2346
|
-
onEntryRevisionAfterDelete: Topic<OnEntryRevisionAfterDeleteTopicParams>;
|
|
2347
|
-
onEntryRevisionDeleteError: Topic<OnEntryRevisionDeleteErrorTopicParams>;
|
|
2348
|
-
onEntryBeforePublish: Topic<OnEntryBeforePublishTopicParams>;
|
|
2349
|
-
onEntryAfterPublish: Topic<OnEntryAfterPublishTopicParams>;
|
|
2350
|
-
onEntryPublishError: Topic<OnEntryPublishErrorTopicParams>;
|
|
2351
|
-
onEntryBeforeRepublish: Topic<OnEntryBeforeRepublishTopicParams>;
|
|
2352
|
-
onEntryAfterRepublish: Topic<OnEntryAfterRepublishTopicParams>;
|
|
2353
|
-
onEntryRepublishError: Topic<OnEntryRepublishErrorTopicParams>;
|
|
2354
|
-
onEntryBeforeUnpublish: Topic<OnEntryBeforeUnpublishTopicParams>;
|
|
2355
|
-
onEntryAfterUnpublish: Topic<OnEntryAfterUnpublishTopicParams>;
|
|
2356
|
-
onEntryUnpublishError: Topic<OnEntryUnpublishErrorTopicParams>;
|
|
2357
|
-
onEntryBeforeGet: Topic<OnEntryBeforeGetTopicParams>;
|
|
2358
|
-
onEntryBeforeList: Topic<EntryBeforeListTopicParams>;
|
|
2359
|
-
}
|
|
2360
1409
|
/**
|
|
2361
1410
|
* Parameters for CmsEntryResolverFactory.
|
|
2362
1411
|
*
|
|
@@ -2365,6 +1414,7 @@ export interface CmsEntryContext {
|
|
|
2365
1414
|
*/
|
|
2366
1415
|
interface CmsEntryResolverFactoryParams {
|
|
2367
1416
|
model: CmsModel;
|
|
1417
|
+
fieldTypePlugins: CmsFieldTypePlugins;
|
|
2368
1418
|
}
|
|
2369
1419
|
/**
|
|
2370
1420
|
* A type for EntryResolvers. Used when creating get, list, update, publish, ...etc.
|
|
@@ -2372,7 +1422,7 @@ interface CmsEntryResolverFactoryParams {
|
|
|
2372
1422
|
* @category GraphQL resolver
|
|
2373
1423
|
* @category CmsEntry
|
|
2374
1424
|
*/
|
|
2375
|
-
export
|
|
1425
|
+
export type CmsEntryResolverFactory<TSource = any, TArgs = any, TContext = CmsContext> = {
|
|
2376
1426
|
(params: CmsEntryResolverFactoryParams): GraphQLFieldResolver<TSource, TArgs, TContext>;
|
|
2377
1427
|
};
|
|
2378
1428
|
/**
|
|
@@ -2382,7 +1432,7 @@ export declare type CmsEntryResolverFactory<TSource = any, TArgs = any, TContext
|
|
|
2382
1432
|
*/
|
|
2383
1433
|
export interface BaseCmsSecurityPermission extends SecurityPermission {
|
|
2384
1434
|
own?: boolean;
|
|
2385
|
-
rwd: string
|
|
1435
|
+
rwd: string;
|
|
2386
1436
|
}
|
|
2387
1437
|
/**
|
|
2388
1438
|
* A security permission for content model.
|
|
@@ -2602,6 +1652,28 @@ export interface CmsEntryStorageOperationsDeleteRevisionParams<T extends CmsStor
|
|
|
2602
1652
|
export interface CmsEntryStorageOperationsDeleteParams {
|
|
2603
1653
|
entry: CmsEntry;
|
|
2604
1654
|
}
|
|
1655
|
+
export interface CmsEntryStorageOperationsMoveToBinParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
1656
|
+
/**
|
|
1657
|
+
* The modified entry that is going to be saved as published.
|
|
1658
|
+
* Entry is in its original form.
|
|
1659
|
+
*/
|
|
1660
|
+
entry: CmsEntry;
|
|
1661
|
+
/**
|
|
1662
|
+
* The modified entry and prepared for the storage.
|
|
1663
|
+
*/
|
|
1664
|
+
storageEntry: T;
|
|
1665
|
+
}
|
|
1666
|
+
export interface CmsEntryStorageOperationsRestoreFromBinParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
1667
|
+
/**
|
|
1668
|
+
* The modified entry that is going to be saved as restored.
|
|
1669
|
+
* Entry is in its original form.
|
|
1670
|
+
*/
|
|
1671
|
+
entry: CmsEntry;
|
|
1672
|
+
/**
|
|
1673
|
+
* The modified entry and prepared for the storage.
|
|
1674
|
+
*/
|
|
1675
|
+
storageEntry: T;
|
|
1676
|
+
}
|
|
2605
1677
|
export interface CmsEntryStorageOperationsDeleteEntriesParams {
|
|
2606
1678
|
entries: string[];
|
|
2607
1679
|
}
|
|
@@ -2747,6 +1819,14 @@ export interface CmsEntryStorageOperations<T extends CmsStorageEntry = CmsStorag
|
|
|
2747
1819
|
* Delete the entry.
|
|
2748
1820
|
*/
|
|
2749
1821
|
delete: (model: CmsModel, params: CmsEntryStorageOperationsDeleteParams) => Promise<void>;
|
|
1822
|
+
/**
|
|
1823
|
+
* Move the entry to bin.
|
|
1824
|
+
*/
|
|
1825
|
+
moveToBin: (model: CmsModel, params: CmsEntryStorageOperationsMoveToBinParams) => Promise<void>;
|
|
1826
|
+
/**
|
|
1827
|
+
* Restore the entry from the bin.
|
|
1828
|
+
*/
|
|
1829
|
+
restoreFromBin: (model: CmsModel, params: CmsEntryStorageOperationsRestoreFromBinParams<T>) => Promise<T>;
|
|
2750
1830
|
/**
|
|
2751
1831
|
* Delete multiple entries, with a limit on how much can be deleted in one call.
|
|
2752
1832
|
*/
|