@webiny/api-headless-cms 5.17.4 → 5.18.0-beta.3
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/content/contextSetup.js +1 -2
- package/content/graphQLHandlerFactory.d.ts +1 -2
- package/content/graphQLHandlerFactory.js +12 -4
- package/content/plugins/CmsGroupPlugin.d.ts +11 -0
- package/content/plugins/{ContentModelGroupPlugin.js → CmsGroupPlugin.js} +4 -5
- package/content/plugins/CmsModelPlugin.d.ts +11 -0
- package/content/plugins/{ContentModelPlugin.js → CmsModelPlugin.js} +4 -5
- package/content/plugins/buildSchemaPlugins.js +1 -2
- package/content/plugins/crud/contentEntry/beforeCreate.d.ts +7 -0
- package/content/plugins/crud/contentEntry/beforeCreate.js +28 -0
- package/content/plugins/crud/contentEntry/beforeUpdate.d.ts +7 -0
- package/content/plugins/crud/contentEntry/beforeUpdate.js +28 -0
- package/content/plugins/crud/contentEntry/entryDataValidation.d.ts +2 -2
- package/content/plugins/crud/contentEntry/entryDataValidation.js +1 -2
- package/content/plugins/crud/contentEntry/markLockedFields.d.ts +3 -3
- package/content/plugins/crud/contentEntry/markLockedFields.js +10 -7
- package/content/plugins/crud/contentEntry.crud.d.ts +12 -4
- package/content/plugins/crud/contentEntry.crud.js +807 -757
- package/content/plugins/crud/contentModel/afterCreate.d.ts +7 -0
- package/content/plugins/crud/contentModel/afterCreate.js +18 -0
- package/content/plugins/crud/contentModel/afterDelete.d.ts +7 -0
- package/content/plugins/crud/contentModel/afterDelete.js +18 -0
- package/content/plugins/crud/contentModel/afterUpdate.d.ts +7 -0
- package/content/plugins/crud/contentModel/afterUpdate.js +18 -0
- package/content/plugins/crud/contentModel/beforeCreate.d.ts +9 -0
- package/content/plugins/crud/contentModel/beforeCreate.js +146 -0
- package/content/plugins/crud/contentModel/beforeDelete.d.ts +9 -0
- package/content/plugins/crud/contentModel/beforeDelete.js +56 -0
- package/content/plugins/crud/contentModel/beforeUpdate.d.ts +9 -0
- package/content/plugins/crud/contentModel/beforeUpdate.js +128 -0
- package/content/plugins/crud/contentModel/contentModelManagerFactory.d.ts +2 -2
- package/content/plugins/crud/contentModel/contentModelManagerFactory.js +2 -3
- package/content/plugins/crud/contentModel/createFieldModels.d.ts +2 -2
- package/content/plugins/crud/contentModel/createFieldModels.js +2 -3
- package/content/plugins/crud/contentModel/idValidation.js +1 -2
- package/content/plugins/crud/contentModel/models.js +1 -2
- package/content/plugins/crud/contentModel/validateLayout.d.ts +2 -2
- package/content/plugins/crud/contentModel/validateLayout.js +1 -2
- package/content/plugins/crud/contentModel.crud.d.ts +12 -4
- package/content/plugins/crud/contentModel.crud.js +351 -279
- package/content/plugins/crud/contentModelGroup/beforeCreate.d.ts +9 -0
- package/content/plugins/crud/contentModelGroup/beforeCreate.js +66 -0
- package/content/plugins/crud/contentModelGroup/beforeDelete.d.ts +9 -0
- package/content/plugins/crud/contentModelGroup/beforeDelete.js +48 -0
- package/content/plugins/crud/contentModelGroup/beforeUpdate.d.ts +8 -0
- package/content/plugins/crud/contentModelGroup/beforeUpdate.js +28 -0
- package/content/plugins/crud/contentModelGroup.crud.d.ts +12 -4
- package/content/plugins/crud/contentModelGroup.crud.js +259 -219
- package/content/plugins/crud/index.d.ts +6 -0
- package/content/plugins/crud/index.js +96 -0
- package/content/plugins/graphqlFields/boolean.js +1 -2
- package/content/plugins/graphqlFields/datetime.js +1 -2
- package/content/plugins/graphqlFields/file.js +1 -2
- package/content/plugins/graphqlFields/index.js +1 -2
- package/content/plugins/graphqlFields/longText.js +1 -2
- package/content/plugins/graphqlFields/number.js +1 -2
- package/content/plugins/graphqlFields/object.js +1 -2
- package/content/plugins/graphqlFields/ref.js +22 -11
- package/content/plugins/graphqlFields/richText.js +1 -2
- package/content/plugins/graphqlFields/text.js +1 -2
- package/content/plugins/internalSecurity/InternalAuthenticationPlugin.js +2 -3
- package/content/plugins/internalSecurity/InternalAuthorizationPlugin.js +1 -2
- package/content/plugins/modelManager/DefaultCmsModelManager.d.ts +15 -0
- package/content/plugins/modelManager/DefaultCmsModelManager.js +62 -0
- package/content/plugins/modelManager/index.d.ts +2 -2
- package/content/plugins/modelManager/index.js +3 -4
- package/content/plugins/schema/baseSchema.js +1 -2
- package/content/plugins/schema/contentEntries.js +9 -10
- package/content/plugins/schema/contentModelGroups.js +13 -14
- package/content/plugins/schema/contentModels.js +9 -10
- package/content/plugins/schema/createFieldResolvers.d.ts +2 -2
- package/content/plugins/schema/createFieldResolvers.js +14 -20
- package/content/plugins/schema/createManageResolvers.d.ts +3 -3
- package/content/plugins/schema/createManageResolvers.js +6 -10
- package/content/plugins/schema/createManageSDL.d.ts +2 -2
- package/content/plugins/schema/createManageSDL.js +5 -6
- package/content/plugins/schema/createPreviewResolvers.d.ts +3 -3
- package/content/plugins/schema/createPreviewResolvers.js +5 -6
- package/content/plugins/schema/createReadResolvers.d.ts +3 -3
- package/content/plugins/schema/createReadResolvers.js +5 -6
- package/content/plugins/schema/createReadSDL.d.ts +2 -2
- package/content/plugins/schema/createReadSDL.js +3 -4
- package/content/plugins/schema/resolvers/commonFieldResolvers.d.ts +4 -4
- package/content/plugins/schema/resolvers/commonFieldResolvers.js +1 -2
- package/content/plugins/schema/resolvers/manage/resolveCreate.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolveCreate.js +3 -4
- package/content/plugins/schema/resolvers/manage/resolveCreateFrom.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolveCreateFrom.js +3 -4
- package/content/plugins/schema/resolvers/manage/resolveDelete.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolveDelete.js +4 -5
- package/content/plugins/schema/resolvers/manage/resolveGet.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolveGet.js +3 -4
- package/content/plugins/schema/resolvers/manage/resolveGetByIds.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolveGetByIds.js +3 -4
- package/content/plugins/schema/resolvers/manage/resolveGetRevisions.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolveGetRevisions.js +3 -4
- package/content/plugins/schema/resolvers/manage/resolveList.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolveList.js +3 -4
- package/content/plugins/schema/resolvers/manage/resolvePublish.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolvePublish.js +3 -4
- package/content/plugins/schema/resolvers/manage/resolveRequestChanges.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolveRequestChanges.js +3 -4
- package/content/plugins/schema/resolvers/manage/resolveRequestReview.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolveRequestReview.js +3 -4
- package/content/plugins/schema/resolvers/manage/resolveUnpublish.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolveUnpublish.js +3 -4
- package/content/plugins/schema/resolvers/manage/resolveUpdate.d.ts +1 -1
- package/content/plugins/schema/resolvers/manage/resolveUpdate.js +3 -4
- package/content/plugins/schema/resolvers/preview/resolveGet.d.ts +1 -1
- package/content/plugins/schema/resolvers/preview/resolveGet.js +3 -4
- package/content/plugins/schema/resolvers/preview/resolveList.d.ts +1 -1
- package/content/plugins/schema/resolvers/preview/resolveList.js +3 -4
- package/content/plugins/schema/resolvers/read/resolveGet.d.ts +1 -1
- package/content/plugins/schema/resolvers/read/resolveGet.js +3 -4
- package/content/plugins/schema/resolvers/read/resolveList.d.ts +1 -1
- package/content/plugins/schema/resolvers/read/resolveList.js +3 -4
- package/content/plugins/schema/schemaPlugins.js +4 -3
- package/content/plugins/storage/StorageTransformPlugin.d.ts +30 -0
- package/content/plugins/storage/StorageTransformPlugin.js +36 -0
- package/content/plugins/storage/default.d.ts +2 -2
- package/content/plugins/storage/default.js +12 -12
- package/content/plugins/storage/object.d.ts +2 -2
- package/content/plugins/storage/object.js +28 -29
- package/content/plugins/utils/createTypeName.js +1 -2
- package/content/plugins/utils/entryStorage.d.ts +5 -5
- package/content/plugins/utils/entryStorage.js +21 -14
- package/content/plugins/utils/getEntryTitle.d.ts +2 -2
- package/content/plugins/utils/getEntryTitle.js +1 -2
- package/content/plugins/utils/getSchemaFromFieldPlugins.d.ts +2 -2
- package/content/plugins/utils/getSchemaFromFieldPlugins.js +1 -2
- package/content/plugins/utils/pluralizedTypeName.js +1 -2
- package/content/plugins/utils/renderFields.d.ts +2 -2
- package/content/plugins/utils/renderFields.js +1 -2
- package/content/plugins/utils/renderGetFilterFields.d.ts +2 -2
- package/content/plugins/utils/renderGetFilterFields.js +1 -2
- package/content/plugins/utils/renderInputFields.d.ts +2 -2
- package/content/plugins/utils/renderInputFields.js +1 -2
- package/content/plugins/utils/renderListFilterFields.d.ts +2 -2
- package/content/plugins/utils/renderListFilterFields.js +1 -2
- package/content/plugins/utils/renderSortEnum.d.ts +2 -2
- package/content/plugins/utils/renderSortEnum.js +1 -2
- package/content/plugins/validators/dateGte.js +1 -2
- package/content/plugins/validators/dateLte.js +1 -2
- package/content/plugins/validators/gte.js +1 -2
- package/content/plugins/validators/in.js +1 -2
- package/content/plugins/validators/index.js +1 -2
- package/content/plugins/validators/lte.js +1 -2
- package/content/plugins/validators/maxLength.js +1 -2
- package/content/plugins/validators/minLength.js +1 -2
- package/content/plugins/validators/pattern.js +1 -2
- package/content/plugins/validators/patternPlugins/email.js +1 -2
- package/content/plugins/validators/patternPlugins/index.js +1 -2
- package/content/plugins/validators/patternPlugins/lowerCase.js +1 -2
- package/content/plugins/validators/patternPlugins/upperCase.js +1 -2
- package/content/plugins/validators/patternPlugins/url.js +1 -2
- package/content/plugins/validators/required.js +1 -2
- package/content/plugins/validators/timeGte.js +1 -2
- package/content/plugins/validators/timeLte.js +1 -2
- package/index.d.ts +12 -0
- package/index.js +66 -0
- package/migrateCMSPermissions.d.ts +2 -2
- package/migrateCMSPermissions.js +1 -2
- package/package.json +23 -21
- package/plugins/context.js +1 -2
- package/plugins/crud/index.d.ts +6 -2
- package/plugins/crud/index.js +69 -6
- package/plugins/crud/settings.crud.d.ts +10 -4
- package/plugins/crud/settings.crud.js +64 -77
- package/plugins/crud/system.crud.d.ts +10 -4
- package/plugins/crud/system.crud.js +139 -126
- package/plugins/graphql/system.js +5 -6
- package/plugins/graphql.d.ts +1 -2
- package/plugins/graphql.js +49 -50
- package/plugins/upgrades/index.js +1 -2
- package/plugins/upgrades/v5.5.0/helpers.js +1 -2
- package/plugins/upgrades/v5.5.0/index.js +3 -4
- package/transformers.js +1 -2
- package/types.d.ts +742 -1232
- package/types.js +104 -254
- package/utils.d.ts +4 -11
- package/utils.js +2 -49
- package/content/contextSetup.js.map +0 -1
- package/content/graphQLHandlerFactory.js.map +0 -1
- package/content/index.d.ts +0 -5
- package/content/index.js +0 -37
- package/content/index.js.map +0 -1
- package/content/plugins/ContentModelGroupPlugin.d.ts +0 -7
- package/content/plugins/ContentModelGroupPlugin.js.map +0 -1
- package/content/plugins/ContentModelPlugin.d.ts +0 -7
- package/content/plugins/ContentModelPlugin.js.map +0 -1
- package/content/plugins/buildSchemaPlugins.js.map +0 -1
- package/content/plugins/crud/contentEntry/afterCreate.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/afterCreate.hook.js +0 -15
- package/content/plugins/crud/contentEntry/afterCreate.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/afterCreateRevisionFrom.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/afterCreateRevisionFrom.hook.js +0 -15
- package/content/plugins/crud/contentEntry/afterCreateRevisionFrom.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/afterDelete.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/afterDelete.hook.js +0 -15
- package/content/plugins/crud/contentEntry/afterDelete.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/afterDeleteRevision.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/afterDeleteRevision.hook.js +0 -15
- package/content/plugins/crud/contentEntry/afterDeleteRevision.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/afterPublish.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/afterPublish.hook.js +0 -15
- package/content/plugins/crud/contentEntry/afterPublish.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/afterRequestChanges.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/afterRequestChanges.hook.js +0 -15
- package/content/plugins/crud/contentEntry/afterRequestChanges.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/afterRequestReview.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/afterRequestReview.hook.js +0 -15
- package/content/plugins/crud/contentEntry/afterRequestReview.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/afterUnpublish.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/afterUnpublish.hook.js +0 -15
- package/content/plugins/crud/contentEntry/afterUnpublish.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/afterUpdate.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/afterUpdate.hook.js +0 -15
- package/content/plugins/crud/contentEntry/afterUpdate.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/beforeCreate.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/beforeCreate.hook.js +0 -18
- package/content/plugins/crud/contentEntry/beforeCreate.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/beforeCreateRevisionFrom.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/beforeCreateRevisionFrom.hook.js +0 -15
- package/content/plugins/crud/contentEntry/beforeCreateRevisionFrom.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/beforeDelete.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/beforeDelete.hook.js +0 -15
- package/content/plugins/crud/contentEntry/beforeDelete.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/beforeDeleteRevision.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/beforeDeleteRevision.hook.js +0 -15
- package/content/plugins/crud/contentEntry/beforeDeleteRevision.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/beforePublish.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/beforePublish.hook.js +0 -15
- package/content/plugins/crud/contentEntry/beforePublish.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/beforeRequestChanges.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/beforeRequestChanges.hook.js +0 -15
- package/content/plugins/crud/contentEntry/beforeRequestChanges.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/beforeRequestReview.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/beforeRequestReview.hook.js +0 -15
- package/content/plugins/crud/contentEntry/beforeRequestReview.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/beforeUnpublish.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/beforeUnpublish.hook.js +0 -15
- package/content/plugins/crud/contentEntry/beforeUnpublish.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/beforeUpdate.hook.d.ts +0 -2
- package/content/plugins/crud/contentEntry/beforeUpdate.hook.js +0 -18
- package/content/plugins/crud/contentEntry/beforeUpdate.hook.js.map +0 -1
- package/content/plugins/crud/contentEntry/entryDataValidation.js.map +0 -1
- package/content/plugins/crud/contentEntry/hooks.d.ts +0 -18
- package/content/plugins/crud/contentEntry/hooks.js +0 -240
- package/content/plugins/crud/contentEntry/hooks.js.map +0 -1
- package/content/plugins/crud/contentEntry/markLockedFields.js.map +0 -1
- package/content/plugins/crud/contentEntry/runContentEntryLifecycleHooks.d.ts +0 -4
- package/content/plugins/crud/contentEntry/runContentEntryLifecycleHooks.js +0 -24
- package/content/plugins/crud/contentEntry/runContentEntryLifecycleHooks.js.map +0 -1
- package/content/plugins/crud/contentEntry.crud.js.map +0 -1
- package/content/plugins/crud/contentModel/afterCreate.hook.d.ts +0 -7
- package/content/plugins/crud/contentModel/afterCreate.hook.js +0 -24
- package/content/plugins/crud/contentModel/afterCreate.hook.js.map +0 -1
- package/content/plugins/crud/contentModel/afterDelete.hook.d.ts +0 -7
- package/content/plugins/crud/contentModel/afterDelete.hook.js +0 -24
- package/content/plugins/crud/contentModel/afterDelete.hook.js.map +0 -1
- package/content/plugins/crud/contentModel/afterUpdate.hook.d.ts +0 -7
- package/content/plugins/crud/contentModel/afterUpdate.hook.js +0 -24
- package/content/plugins/crud/contentModel/afterUpdate.hook.js.map +0 -1
- package/content/plugins/crud/contentModel/beforeCreate.hook.d.ts +0 -7
- package/content/plugins/crud/contentModel/beforeCreate.hook.js +0 -137
- package/content/plugins/crud/contentModel/beforeCreate.hook.js.map +0 -1
- package/content/plugins/crud/contentModel/beforeDelete.hook.d.ts +0 -7
- package/content/plugins/crud/contentModel/beforeDelete.hook.js +0 -58
- package/content/plugins/crud/contentModel/beforeDelete.hook.js.map +0 -1
- package/content/plugins/crud/contentModel/beforeUpdate.hook.d.ts +0 -7
- package/content/plugins/crud/contentModel/beforeUpdate.hook.js +0 -141
- package/content/plugins/crud/contentModel/beforeUpdate.hook.js.map +0 -1
- package/content/plugins/crud/contentModel/contentModelManagerFactory.js.map +0 -1
- package/content/plugins/crud/contentModel/createFieldModels.js.map +0 -1
- package/content/plugins/crud/contentModel/hooks.d.ts +0 -6
- package/content/plugins/crud/contentModel/hooks.js +0 -84
- package/content/plugins/crud/contentModel/hooks.js.map +0 -1
- package/content/plugins/crud/contentModel/idValidation.js.map +0 -1
- package/content/plugins/crud/contentModel/models.js.map +0 -1
- package/content/plugins/crud/contentModel/runContentModelLifecycleHooks.d.ts +0 -2
- package/content/plugins/crud/contentModel/runContentModelLifecycleHooks.js +0 -24
- package/content/plugins/crud/contentModel/runContentModelLifecycleHooks.js.map +0 -1
- package/content/plugins/crud/contentModel/validateLayout.js.map +0 -1
- package/content/plugins/crud/contentModel.crud.js.map +0 -1
- package/content/plugins/crud/contentModelGroup/afterCreate.hook.d.ts +0 -7
- package/content/plugins/crud/contentModelGroup/afterCreate.hook.js +0 -24
- package/content/plugins/crud/contentModelGroup/afterCreate.hook.js.map +0 -1
- package/content/plugins/crud/contentModelGroup/afterDelete.hook.d.ts +0 -8
- package/content/plugins/crud/contentModelGroup/afterDelete.hook.js +0 -22
- package/content/plugins/crud/contentModelGroup/afterDelete.hook.js.map +0 -1
- package/content/plugins/crud/contentModelGroup/afterUpdate.hook.d.ts +0 -7
- package/content/plugins/crud/contentModelGroup/afterUpdate.hook.js +0 -26
- package/content/plugins/crud/contentModelGroup/afterUpdate.hook.js.map +0 -1
- package/content/plugins/crud/contentModelGroup/beforeCreate.hook.d.ts +0 -7
- package/content/plugins/crud/contentModelGroup/beforeCreate.hook.js +0 -87
- package/content/plugins/crud/contentModelGroup/beforeCreate.hook.js.map +0 -1
- package/content/plugins/crud/contentModelGroup/beforeDelete.hook.d.ts +0 -7
- package/content/plugins/crud/contentModelGroup/beforeDelete.hook.js +0 -46
- package/content/plugins/crud/contentModelGroup/beforeDelete.hook.js.map +0 -1
- package/content/plugins/crud/contentModelGroup/beforeUpdate.hook.d.ts +0 -7
- package/content/plugins/crud/contentModelGroup/beforeUpdate.hook.js +0 -35
- package/content/plugins/crud/contentModelGroup/beforeUpdate.hook.js.map +0 -1
- package/content/plugins/crud/contentModelGroup.crud.js.map +0 -1
- package/content/plugins/graphqlFields/boolean.js.map +0 -1
- package/content/plugins/graphqlFields/datetime.js.map +0 -1
- package/content/plugins/graphqlFields/file.js.map +0 -1
- package/content/plugins/graphqlFields/index.js.map +0 -1
- package/content/plugins/graphqlFields/longText.js.map +0 -1
- package/content/plugins/graphqlFields/number.js.map +0 -1
- package/content/plugins/graphqlFields/object.js.map +0 -1
- package/content/plugins/graphqlFields/ref.js.map +0 -1
- package/content/plugins/graphqlFields/richText.js.map +0 -1
- package/content/plugins/graphqlFields/text.js.map +0 -1
- package/content/plugins/internalSecurity/InternalAuthenticationPlugin.js.map +0 -1
- package/content/plugins/internalSecurity/InternalAuthorizationPlugin.js.map +0 -1
- package/content/plugins/modelManager/DefaultContentModelManager.d.ts +0 -15
- package/content/plugins/modelManager/DefaultContentModelManager.js +0 -63
- package/content/plugins/modelManager/DefaultContentModelManager.js.map +0 -1
- package/content/plugins/modelManager/index.js.map +0 -1
- package/content/plugins/schema/baseSchema.js.map +0 -1
- package/content/plugins/schema/contentEntries.js.map +0 -1
- package/content/plugins/schema/contentModelGroups.js.map +0 -1
- package/content/plugins/schema/contentModels.js.map +0 -1
- package/content/plugins/schema/createFieldResolvers.js.map +0 -1
- package/content/plugins/schema/createManageResolvers.js.map +0 -1
- package/content/plugins/schema/createManageSDL.js.map +0 -1
- package/content/plugins/schema/createPreviewResolvers.js.map +0 -1
- package/content/plugins/schema/createReadResolvers.js.map +0 -1
- package/content/plugins/schema/createReadSDL.js.map +0 -1
- package/content/plugins/schema/resolvers/commonFieldResolvers.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolveCreate.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolveCreateFrom.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolveDelete.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolveGet.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolveGetByIds.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolveGetRevisions.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolveList.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolvePublish.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolveRequestChanges.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolveRequestReview.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolveUnpublish.js.map +0 -1
- package/content/plugins/schema/resolvers/manage/resolveUpdate.js.map +0 -1
- package/content/plugins/schema/resolvers/preview/resolveGet.js.map +0 -1
- package/content/plugins/schema/resolvers/preview/resolveList.js.map +0 -1
- package/content/plugins/schema/resolvers/read/resolveGet.js.map +0 -1
- package/content/plugins/schema/resolvers/read/resolveList.js.map +0 -1
- package/content/plugins/schema/schemaPlugins.js.map +0 -1
- package/content/plugins/storage/default.js.map +0 -1
- package/content/plugins/storage/object.js.map +0 -1
- package/content/plugins/utils/createTypeName.js.map +0 -1
- package/content/plugins/utils/entryStorage.js.map +0 -1
- package/content/plugins/utils/getEntryTitle.js.map +0 -1
- package/content/plugins/utils/getSchemaFromFieldPlugins.js.map +0 -1
- package/content/plugins/utils/pluralizedTypeName.js.map +0 -1
- package/content/plugins/utils/renderFields.js.map +0 -1
- package/content/plugins/utils/renderGetFilterFields.js.map +0 -1
- package/content/plugins/utils/renderInputFields.js.map +0 -1
- package/content/plugins/utils/renderListFilterFields.js.map +0 -1
- package/content/plugins/utils/renderSortEnum.js.map +0 -1
- package/content/plugins/validators/dateGte.js.map +0 -1
- package/content/plugins/validators/dateLte.js.map +0 -1
- package/content/plugins/validators/gte.js.map +0 -1
- package/content/plugins/validators/in.js.map +0 -1
- package/content/plugins/validators/index.js.map +0 -1
- package/content/plugins/validators/lte.js.map +0 -1
- package/content/plugins/validators/maxLength.js.map +0 -1
- package/content/plugins/validators/minLength.js.map +0 -1
- package/content/plugins/validators/pattern.js.map +0 -1
- package/content/plugins/validators/patternPlugins/email.js.map +0 -1
- package/content/plugins/validators/patternPlugins/index.js.map +0 -1
- package/content/plugins/validators/patternPlugins/lowerCase.js.map +0 -1
- package/content/plugins/validators/patternPlugins/upperCase.js.map +0 -1
- package/content/plugins/validators/patternPlugins/url.js.map +0 -1
- package/content/plugins/validators/required.js.map +0 -1
- package/content/plugins/validators/timeGte.js.map +0 -1
- package/content/plugins/validators/timeLte.js.map +0 -1
- package/migrateCMSPermissions.js.map +0 -1
- package/plugins/InstallationPlugin.d.ts +0 -19
- package/plugins/InstallationPlugin.js +0 -39
- package/plugins/InstallationPlugin.js.map +0 -1
- package/plugins/context.js.map +0 -1
- package/plugins/crud/index.js.map +0 -1
- package/plugins/crud/settings.crud.js.map +0 -1
- package/plugins/crud/system.crud.js.map +0 -1
- package/plugins/graphql/system.js.map +0 -1
- package/plugins/graphql.js.map +0 -1
- package/plugins/index.d.ts +0 -2
- package/plugins/index.js +0 -25
- package/plugins/index.js.map +0 -1
- package/plugins/upgrades/index.js.map +0 -1
- package/plugins/upgrades/v5.5.0/helpers.js.map +0 -1
- package/plugins/upgrades/v5.5.0/index.js.map +0 -1
- package/transformers.js.map +0 -1
- package/types.js.map +0 -1
- package/utils.js.map +0 -1
package/types.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ import { SecurityPermission } from "@webiny/api-security/types";
|
|
|
8
8
|
import { HttpContext } from "@webiny/handler-http/types";
|
|
9
9
|
import { DbContext } from "@webiny/handler-db/types";
|
|
10
10
|
import { FileManagerContext } from "@webiny/api-file-manager/types";
|
|
11
|
+
import { UpgradePlugin } from "@webiny/api-upgrade/types";
|
|
12
|
+
import { Topic } from "@webiny/pubsub/types";
|
|
11
13
|
interface BaseCmsValuesObject {
|
|
12
14
|
/**
|
|
13
15
|
* API type
|
|
@@ -34,24 +36,27 @@ interface BaseCmsValuesObject {
|
|
|
34
36
|
*/
|
|
35
37
|
PREVIEW: boolean;
|
|
36
38
|
}
|
|
39
|
+
export interface HeadlessCms extends BaseCmsValuesObject, CmsCrudContextObject {
|
|
40
|
+
storageOperations: HeadlessCmsStorageOperations;
|
|
41
|
+
}
|
|
37
42
|
/**
|
|
38
43
|
* @description This combines all contexts used in the CMS into a single one.
|
|
39
44
|
*
|
|
40
45
|
* @category Context
|
|
41
46
|
*/
|
|
42
47
|
export interface CmsContext extends ContextInterface, DbContext, HttpContext, I18NContext, FileManagerContext, BaseI18NContentContext, TenancyContext {
|
|
43
|
-
cms:
|
|
48
|
+
cms: HeadlessCms;
|
|
44
49
|
}
|
|
45
|
-
interface
|
|
50
|
+
interface CmsModelFieldPredefinedValuesValue {
|
|
46
51
|
value: string;
|
|
47
52
|
label: string;
|
|
48
53
|
}
|
|
49
54
|
/**
|
|
50
55
|
* Object containing content model field predefined options and values.
|
|
51
56
|
*
|
|
52
|
-
* @category
|
|
57
|
+
* @category CmsModelField
|
|
53
58
|
*/
|
|
54
|
-
export interface
|
|
59
|
+
export interface CmsModelFieldPredefinedValues {
|
|
55
60
|
/**
|
|
56
61
|
* Are predefined field values enabled?
|
|
57
62
|
*/
|
|
@@ -59,14 +64,14 @@ export interface CmsContentModelFieldPredefinedValues {
|
|
|
59
64
|
/**
|
|
60
65
|
* Predefined values array.
|
|
61
66
|
*/
|
|
62
|
-
values:
|
|
67
|
+
values: CmsModelFieldPredefinedValuesValue[];
|
|
63
68
|
}
|
|
64
69
|
/**
|
|
65
70
|
* Object containing content model field renderer options.
|
|
66
71
|
*
|
|
67
|
-
* @category
|
|
72
|
+
* @category CmsModelField
|
|
68
73
|
*/
|
|
69
|
-
interface
|
|
74
|
+
interface CmsModelFieldRenderer {
|
|
70
75
|
/**
|
|
71
76
|
* Name of the field renderer. Must have one in field renderer plugins.
|
|
72
77
|
* Can be blank to let automatically determine the renderer.
|
|
@@ -76,10 +81,10 @@ interface CmsContentModelFieldRenderer {
|
|
|
76
81
|
/**
|
|
77
82
|
* A definition for content model field. This type exists on the app side as well.
|
|
78
83
|
*
|
|
79
|
-
* @category
|
|
84
|
+
* @category ModelField
|
|
80
85
|
* @category Database model
|
|
81
86
|
*/
|
|
82
|
-
export interface
|
|
87
|
+
export interface CmsModelField {
|
|
83
88
|
/**
|
|
84
89
|
* A generated ID for the model field
|
|
85
90
|
*/
|
|
@@ -107,17 +112,17 @@ export interface CmsContentModelField {
|
|
|
107
112
|
/**
|
|
108
113
|
* Are predefined values enabled? And list of them
|
|
109
114
|
*/
|
|
110
|
-
predefinedValues?:
|
|
115
|
+
predefinedValues?: CmsModelFieldPredefinedValues;
|
|
111
116
|
/**
|
|
112
117
|
* Field renderer. Blank if determined automatically.
|
|
113
118
|
*/
|
|
114
|
-
renderer?:
|
|
119
|
+
renderer?: CmsModelFieldRenderer;
|
|
115
120
|
/**
|
|
116
121
|
* List of validations for the field
|
|
117
122
|
*
|
|
118
123
|
* @default []
|
|
119
124
|
*/
|
|
120
|
-
validation?:
|
|
125
|
+
validation?: CmsModelFieldValidation[];
|
|
121
126
|
/**
|
|
122
127
|
* List of validations for the list of values, when a field is set to accept a list of values.
|
|
123
128
|
* These validations will be applied to the entire list, and `validation` (see above) will be applied
|
|
@@ -125,7 +130,7 @@ export interface CmsContentModelField {
|
|
|
125
130
|
*
|
|
126
131
|
* @default []
|
|
127
132
|
*/
|
|
128
|
-
listValidation?:
|
|
133
|
+
listValidation?: CmsModelFieldValidation[];
|
|
129
134
|
/**
|
|
130
135
|
* Is this a multiple values field?
|
|
131
136
|
*
|
|
@@ -143,7 +148,7 @@ export interface CmsContentModelField {
|
|
|
143
148
|
/**
|
|
144
149
|
* A definition for dateTime field to show possible type of the field in settings.
|
|
145
150
|
*/
|
|
146
|
-
export interface
|
|
151
|
+
export interface CmsModelDateTimeField extends CmsModelField {
|
|
147
152
|
/**
|
|
148
153
|
* Settings object for the field. Contains type property.
|
|
149
154
|
*/
|
|
@@ -154,21 +159,21 @@ export interface CmsContentModelDateTimeField extends CmsContentModelField {
|
|
|
154
159
|
/**
|
|
155
160
|
* Arguments for the field validator validate method.
|
|
156
161
|
*
|
|
157
|
-
* @category
|
|
162
|
+
* @category ModelField
|
|
158
163
|
* @category FieldValidation
|
|
159
164
|
*/
|
|
160
|
-
export interface
|
|
165
|
+
export interface CmsModelFieldValidatorValidateParams {
|
|
161
166
|
/**
|
|
162
167
|
* A value to be validated.
|
|
163
168
|
*/
|
|
164
169
|
value: any;
|
|
165
170
|
/**
|
|
166
|
-
* Options from the
|
|
171
|
+
* Options from the CmsModelField validations.
|
|
167
172
|
*
|
|
168
|
-
* @see
|
|
169
|
-
* @see
|
|
173
|
+
* @see CmsModelField.validation
|
|
174
|
+
* @see CmsModelField.listValidation
|
|
170
175
|
*/
|
|
171
|
-
validator:
|
|
176
|
+
validator: CmsModelFieldValidation;
|
|
172
177
|
/**
|
|
173
178
|
* An instance of the current context.
|
|
174
179
|
*/
|
|
@@ -176,17 +181,17 @@ export interface CmsModelFieldValidatorValidateArgs {
|
|
|
176
181
|
/**
|
|
177
182
|
* Field being validated.
|
|
178
183
|
*/
|
|
179
|
-
field:
|
|
184
|
+
field: CmsModelField;
|
|
180
185
|
/**
|
|
181
186
|
* An instance of the content model being validated.
|
|
182
187
|
*/
|
|
183
|
-
contentModel:
|
|
188
|
+
contentModel: CmsModel;
|
|
184
189
|
}
|
|
185
190
|
/**
|
|
186
191
|
* Definition for the field validator.
|
|
187
192
|
*
|
|
188
193
|
* @category Plugin
|
|
189
|
-
* @category
|
|
194
|
+
* @category ModelField
|
|
190
195
|
* @category FieldValidation
|
|
191
196
|
*/
|
|
192
197
|
export interface CmsModelFieldValidatorPlugin extends Plugin {
|
|
@@ -205,14 +210,14 @@ export interface CmsModelFieldValidatorPlugin extends Plugin {
|
|
|
205
210
|
/**
|
|
206
211
|
* Validation method.
|
|
207
212
|
*/
|
|
208
|
-
validate(params:
|
|
213
|
+
validate(params: CmsModelFieldValidatorValidateParams): Promise<boolean>;
|
|
209
214
|
};
|
|
210
215
|
}
|
|
211
216
|
/**
|
|
212
217
|
* A pattern validator for the content entry field value.
|
|
213
218
|
*
|
|
214
219
|
* @category Plugin
|
|
215
|
-
* @category
|
|
220
|
+
* @category ModelField
|
|
216
221
|
* @category FieldValidation
|
|
217
222
|
*/
|
|
218
223
|
export interface CmsModelFieldPatternValidatorPlugin extends Plugin {
|
|
@@ -241,9 +246,9 @@ export interface CmsModelFieldPatternValidatorPlugin extends Plugin {
|
|
|
241
246
|
/**
|
|
242
247
|
* Locked field in the content model
|
|
243
248
|
*
|
|
244
|
-
* @see
|
|
249
|
+
* @see CmsModel.lockedFields
|
|
245
250
|
*
|
|
246
|
-
* @category
|
|
251
|
+
* @category ModelField
|
|
247
252
|
*/
|
|
248
253
|
export interface LockedField {
|
|
249
254
|
/**
|
|
@@ -261,12 +266,12 @@ export interface LockedField {
|
|
|
261
266
|
[key: string]: any;
|
|
262
267
|
}
|
|
263
268
|
/**
|
|
264
|
-
*
|
|
269
|
+
* Cms Model defining an entry.
|
|
265
270
|
*
|
|
266
271
|
* @category Database model
|
|
267
|
-
* @category
|
|
272
|
+
* @category CmsModel
|
|
268
273
|
*/
|
|
269
|
-
export interface
|
|
274
|
+
export interface CmsModel {
|
|
270
275
|
/**
|
|
271
276
|
* Name of the content model.
|
|
272
277
|
*/
|
|
@@ -278,9 +283,9 @@ export interface CmsContentModel {
|
|
|
278
283
|
/**
|
|
279
284
|
* Locale this model belongs to.
|
|
280
285
|
*/
|
|
281
|
-
locale
|
|
286
|
+
locale: string;
|
|
282
287
|
/**
|
|
283
|
-
*
|
|
288
|
+
* Cms Group reference object.
|
|
284
289
|
*/
|
|
285
290
|
group: {
|
|
286
291
|
/**
|
|
@@ -311,7 +316,7 @@ export interface CmsContentModel {
|
|
|
311
316
|
/**
|
|
312
317
|
* List of fields defining entry values.
|
|
313
318
|
*/
|
|
314
|
-
fields:
|
|
319
|
+
fields: CmsModelField[];
|
|
315
320
|
/**
|
|
316
321
|
* Admin UI field layout
|
|
317
322
|
*
|
|
@@ -332,9 +337,17 @@ export interface CmsContentModel {
|
|
|
332
337
|
* It is picked as first available text field. Or user can select own field.
|
|
333
338
|
*/
|
|
334
339
|
titleFieldId: string;
|
|
340
|
+
/**
|
|
341
|
+
* The version of Webiny which this record was stored with.
|
|
342
|
+
*/
|
|
343
|
+
webinyVersion: string;
|
|
344
|
+
/**
|
|
345
|
+
* Model tenant.
|
|
346
|
+
*/
|
|
347
|
+
tenant: string;
|
|
335
348
|
}
|
|
336
349
|
/**
|
|
337
|
-
* @category
|
|
350
|
+
* @category ModelField
|
|
338
351
|
*/
|
|
339
352
|
export interface CmsModelFieldDefinition {
|
|
340
353
|
fields: string;
|
|
@@ -342,10 +355,10 @@ export interface CmsModelFieldDefinition {
|
|
|
342
355
|
}
|
|
343
356
|
export interface CmsModelFieldToGraphQLCreateResolver {
|
|
344
357
|
(params: {
|
|
345
|
-
models:
|
|
346
|
-
model:
|
|
358
|
+
models: CmsModel[];
|
|
359
|
+
model: CmsModel;
|
|
347
360
|
graphQLType: string;
|
|
348
|
-
field:
|
|
361
|
+
field: CmsModelField;
|
|
349
362
|
createFieldResolvers: any;
|
|
350
363
|
}): GraphQLFieldResolver | {
|
|
351
364
|
resolver: GraphQLFieldResolver;
|
|
@@ -354,7 +367,7 @@ export interface CmsModelFieldToGraphQLCreateResolver {
|
|
|
354
367
|
}
|
|
355
368
|
/**
|
|
356
369
|
* @category Plugin
|
|
357
|
-
* @category
|
|
370
|
+
* @category ModelField
|
|
358
371
|
* @category GraphQL
|
|
359
372
|
*/
|
|
360
373
|
export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
@@ -399,8 +412,8 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
399
412
|
* ```
|
|
400
413
|
*/
|
|
401
414
|
createGetFilters?(params: {
|
|
402
|
-
model:
|
|
403
|
-
field:
|
|
415
|
+
model: CmsModel;
|
|
416
|
+
field: CmsModelField;
|
|
404
417
|
}): string;
|
|
405
418
|
/**
|
|
406
419
|
* Definition for list filtering for GraphQL.
|
|
@@ -419,8 +432,8 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
419
432
|
* ```
|
|
420
433
|
*/
|
|
421
434
|
createListFilters?(params: {
|
|
422
|
-
model:
|
|
423
|
-
field:
|
|
435
|
+
model: CmsModel;
|
|
436
|
+
field: CmsModelField;
|
|
424
437
|
}): string;
|
|
425
438
|
/**
|
|
426
439
|
* Definition of the field type for GraphQL - be aware if multiple values is selected.
|
|
@@ -438,8 +451,8 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
438
451
|
* ```
|
|
439
452
|
*/
|
|
440
453
|
createTypeField(params: {
|
|
441
|
-
model:
|
|
442
|
-
field:
|
|
454
|
+
model: CmsModel;
|
|
455
|
+
field: CmsModelField;
|
|
443
456
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
444
457
|
}): CmsModelFieldDefinition | string;
|
|
445
458
|
/**
|
|
@@ -477,8 +490,8 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
477
490
|
* ```
|
|
478
491
|
*/
|
|
479
492
|
createSchema?: (params: {
|
|
480
|
-
models:
|
|
481
|
-
model:
|
|
493
|
+
models: CmsModel[];
|
|
494
|
+
model: CmsModel;
|
|
482
495
|
}) => GraphQLSchemaDefinition<CmsContext>;
|
|
483
496
|
};
|
|
484
497
|
manage: {
|
|
@@ -499,8 +512,8 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
499
512
|
* ```
|
|
500
513
|
*/
|
|
501
514
|
createListFilters?: (params: {
|
|
502
|
-
model:
|
|
503
|
-
field:
|
|
515
|
+
model: CmsModel;
|
|
516
|
+
field: CmsModelField;
|
|
504
517
|
}) => string;
|
|
505
518
|
/**
|
|
506
519
|
* Manage API schema definitions for the field and resolvers for them. Probably similar to `read.createSchema`.
|
|
@@ -520,8 +533,8 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
520
533
|
* ```
|
|
521
534
|
*/
|
|
522
535
|
createSchema?: (params: {
|
|
523
|
-
models:
|
|
524
|
-
model:
|
|
536
|
+
models: CmsModel[];
|
|
537
|
+
model: CmsModel;
|
|
525
538
|
}) => GraphQLSchemaDefinition<CmsContext>;
|
|
526
539
|
/**
|
|
527
540
|
* Definition of the field type for GraphQL - be aware if multiple values is selected. Probably same as `read.createTypeField`.
|
|
@@ -539,8 +552,8 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
539
552
|
* ```
|
|
540
553
|
*/
|
|
541
554
|
createTypeField: (params: {
|
|
542
|
-
model:
|
|
543
|
-
field:
|
|
555
|
+
model: CmsModel;
|
|
556
|
+
field: CmsModelField;
|
|
544
557
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
545
558
|
}) => CmsModelFieldDefinition | string;
|
|
546
559
|
/**
|
|
@@ -559,8 +572,8 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
559
572
|
* ```
|
|
560
573
|
*/
|
|
561
574
|
createInputField: (params: {
|
|
562
|
-
model:
|
|
563
|
-
field:
|
|
575
|
+
model: CmsModel;
|
|
576
|
+
field: CmsModelField;
|
|
564
577
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
565
578
|
}) => CmsModelFieldDefinition | string;
|
|
566
579
|
/**
|
|
@@ -584,7 +597,7 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
584
597
|
* Check for content model locked field.
|
|
585
598
|
* A custom plugin definable by the user.
|
|
586
599
|
*
|
|
587
|
-
* @category
|
|
600
|
+
* @category CmsModel
|
|
588
601
|
* @category Plugin
|
|
589
602
|
*/
|
|
590
603
|
export interface CmsModelLockedFieldPlugin extends Plugin {
|
|
@@ -601,17 +614,17 @@ export interface CmsModelLockedFieldPlugin extends Plugin {
|
|
|
601
614
|
*/
|
|
602
615
|
checkLockedField?: (params: {
|
|
603
616
|
lockedField: LockedField;
|
|
604
|
-
field:
|
|
617
|
+
field: CmsModelField;
|
|
605
618
|
}) => void;
|
|
606
619
|
/**
|
|
607
620
|
* A method to get the locked field data.
|
|
608
621
|
*/
|
|
609
622
|
getLockedFieldData?: (params: {
|
|
610
|
-
field:
|
|
623
|
+
field: CmsModelField;
|
|
611
624
|
}) => Record<string, any>;
|
|
612
625
|
}
|
|
613
626
|
/**
|
|
614
|
-
* @category
|
|
627
|
+
* @category ModelField
|
|
615
628
|
*/
|
|
616
629
|
export interface CmsFieldTypePlugins {
|
|
617
630
|
[key: string]: CmsModelFieldToGraphQLPlugin;
|
|
@@ -645,6 +658,14 @@ export interface CmsSettings {
|
|
|
645
658
|
* Last content model change. Used to cache GraphQL schema.
|
|
646
659
|
*/
|
|
647
660
|
contentModelLastChange: Date;
|
|
661
|
+
/**
|
|
662
|
+
* Settings tenant.
|
|
663
|
+
*/
|
|
664
|
+
tenant: string;
|
|
665
|
+
/**
|
|
666
|
+
* Settings locale.
|
|
667
|
+
*/
|
|
668
|
+
locale: string;
|
|
648
669
|
}
|
|
649
670
|
/**
|
|
650
671
|
* Settings CRUD in context.
|
|
@@ -652,55 +673,56 @@ export interface CmsSettings {
|
|
|
652
673
|
* @category Context
|
|
653
674
|
*/
|
|
654
675
|
export interface CmsSettingsContext {
|
|
655
|
-
/**
|
|
656
|
-
* A function defining usage of a method without authenticating the user.
|
|
657
|
-
*/
|
|
658
|
-
noAuth: () => {
|
|
659
|
-
/**
|
|
660
|
-
* Gets settings model from the database.
|
|
661
|
-
*/
|
|
662
|
-
get: () => Promise<CmsSettings | null>;
|
|
663
|
-
};
|
|
664
676
|
/**
|
|
665
677
|
* Gets settings model from the database.
|
|
666
678
|
*/
|
|
667
|
-
|
|
679
|
+
getSettings: () => Promise<CmsSettings | null>;
|
|
668
680
|
/**
|
|
669
681
|
* Updates settings model with a new date.
|
|
670
682
|
*/
|
|
671
|
-
|
|
683
|
+
updateModelLastChange: () => Promise<void>;
|
|
672
684
|
/**
|
|
673
685
|
* Get the datetime when content model last changed.
|
|
674
686
|
*/
|
|
675
|
-
|
|
687
|
+
getModelLastChange: () => Promise<Date>;
|
|
688
|
+
}
|
|
689
|
+
export interface BeforeInstallTopicParams {
|
|
690
|
+
tenant: string;
|
|
691
|
+
}
|
|
692
|
+
export interface AfterInstallTopicParams {
|
|
693
|
+
tenant: string;
|
|
676
694
|
}
|
|
677
695
|
export declare type CmsSystemContext = {
|
|
678
|
-
|
|
679
|
-
|
|
696
|
+
getSystemVersion: () => Promise<string>;
|
|
697
|
+
setSystemVersion: (version: string) => Promise<void>;
|
|
680
698
|
getReadAPIKey(): Promise<string>;
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
699
|
+
installSystem: () => Promise<void>;
|
|
700
|
+
upgradeSystem: (version: string) => Promise<boolean>;
|
|
701
|
+
/**
|
|
702
|
+
* Events
|
|
703
|
+
*/
|
|
704
|
+
onBeforeSystemInstall: Topic<BeforeInstallTopicParams>;
|
|
705
|
+
onAfterSystemInstall: Topic<AfterInstallTopicParams>;
|
|
684
706
|
};
|
|
685
707
|
/**
|
|
686
|
-
* A GraphQL
|
|
708
|
+
* A GraphQL params.data parameter received when creating content model group.
|
|
687
709
|
*
|
|
688
|
-
* @category
|
|
689
|
-
* @category GraphQL
|
|
710
|
+
* @category CmsGroup
|
|
711
|
+
* @category GraphQL params
|
|
690
712
|
*/
|
|
691
|
-
export interface
|
|
713
|
+
export interface CmsGroupCreateInput {
|
|
692
714
|
name: string;
|
|
693
715
|
slug?: string;
|
|
694
716
|
description?: string;
|
|
695
717
|
icon: string;
|
|
696
718
|
}
|
|
697
719
|
/**
|
|
698
|
-
* A GraphQL
|
|
720
|
+
* A GraphQL params.data parameter received when updating content model group.
|
|
699
721
|
*
|
|
700
|
-
* @category
|
|
701
|
-
* @category GraphQL
|
|
722
|
+
* @category CmsGroup
|
|
723
|
+
* @category GraphQL params
|
|
702
724
|
*/
|
|
703
|
-
export interface
|
|
725
|
+
export interface CmsGroupUpdateInput {
|
|
704
726
|
name?: string;
|
|
705
727
|
slug?: string;
|
|
706
728
|
description?: string;
|
|
@@ -709,10 +731,10 @@ export interface CmsContentModelGroupUpdateInput {
|
|
|
709
731
|
/**
|
|
710
732
|
* A representation of content model group in the database.
|
|
711
733
|
*
|
|
712
|
-
* @category
|
|
734
|
+
* @category CmsGroup
|
|
713
735
|
* @category Database model
|
|
714
736
|
*/
|
|
715
|
-
export interface
|
|
737
|
+
export interface CmsGroup {
|
|
716
738
|
/**
|
|
717
739
|
* Generated ID.
|
|
718
740
|
*/
|
|
@@ -728,7 +750,7 @@ export interface CmsContentModelGroup {
|
|
|
728
750
|
/**
|
|
729
751
|
* Locale this group belongs to.
|
|
730
752
|
*/
|
|
731
|
-
locale
|
|
753
|
+
locale: string;
|
|
732
754
|
/**
|
|
733
755
|
* Description for the group.
|
|
734
756
|
*/
|
|
@@ -744,85 +766,132 @@ export interface CmsContentModelGroup {
|
|
|
744
766
|
/**
|
|
745
767
|
* Date group was created on.
|
|
746
768
|
*/
|
|
747
|
-
createdOn?:
|
|
769
|
+
createdOn?: string;
|
|
748
770
|
/**
|
|
749
771
|
* Date group was created or changed on.
|
|
750
772
|
*/
|
|
751
|
-
savedOn?:
|
|
773
|
+
savedOn?: string;
|
|
774
|
+
/**
|
|
775
|
+
* Which Webiny version was this record stored with.
|
|
776
|
+
*/
|
|
777
|
+
webinyVersion: string;
|
|
778
|
+
/**
|
|
779
|
+
* Group tenant.
|
|
780
|
+
*/
|
|
781
|
+
tenant: string;
|
|
752
782
|
}
|
|
753
783
|
/**
|
|
754
784
|
* A data.where parameter received when listing content model groups.
|
|
755
785
|
*
|
|
756
|
-
* @category
|
|
757
|
-
* @category GraphQL
|
|
786
|
+
* @category CmsGroup
|
|
787
|
+
* @category GraphQL params
|
|
758
788
|
*/
|
|
759
|
-
export interface
|
|
760
|
-
where
|
|
761
|
-
|
|
789
|
+
export interface CmsGroupListParams {
|
|
790
|
+
where: {
|
|
791
|
+
tenant: string;
|
|
792
|
+
locale: string;
|
|
793
|
+
[key: string]: any;
|
|
794
|
+
};
|
|
795
|
+
}
|
|
796
|
+
/**
|
|
797
|
+
* @category CmsGroup
|
|
798
|
+
* @category Topic
|
|
799
|
+
*/
|
|
800
|
+
export interface BeforeGroupCreateTopicParams {
|
|
801
|
+
group: CmsGroup;
|
|
802
|
+
}
|
|
803
|
+
/**
|
|
804
|
+
* @category CmsGroup
|
|
805
|
+
* @category Topic
|
|
806
|
+
*/
|
|
807
|
+
export interface AfterGroupCreateTopicParams {
|
|
808
|
+
group: CmsGroup;
|
|
809
|
+
}
|
|
810
|
+
/**
|
|
811
|
+
* @category CmsGroup
|
|
812
|
+
* @category Topic
|
|
813
|
+
*/
|
|
814
|
+
export interface BeforeGroupUpdateTopicParams {
|
|
815
|
+
original: CmsGroup;
|
|
816
|
+
group: CmsGroup;
|
|
817
|
+
}
|
|
818
|
+
/**
|
|
819
|
+
* @category CmsGroup
|
|
820
|
+
* @category Topic
|
|
821
|
+
*/
|
|
822
|
+
export interface AfterGroupUpdateTopicParams {
|
|
823
|
+
original: CmsGroup;
|
|
824
|
+
group: CmsGroup;
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* @category CmsGroup
|
|
828
|
+
* @category Topic
|
|
829
|
+
*/
|
|
830
|
+
export interface BeforeGroupDeleteTopicParams {
|
|
831
|
+
group: CmsGroup;
|
|
762
832
|
}
|
|
763
833
|
/**
|
|
764
|
-
*
|
|
834
|
+
* @category CmsGroup
|
|
835
|
+
* @category Topic
|
|
836
|
+
*/
|
|
837
|
+
export interface AfterGroupDeleteTopicParams {
|
|
838
|
+
group: CmsGroup;
|
|
839
|
+
}
|
|
840
|
+
/**
|
|
841
|
+
* Cms Group in context.
|
|
765
842
|
*
|
|
766
843
|
* @category Context
|
|
767
|
-
* @category
|
|
844
|
+
* @category CmsGroup
|
|
768
845
|
*/
|
|
769
|
-
export interface
|
|
770
|
-
/**
|
|
771
|
-
* Plain operations on the storage level.
|
|
772
|
-
*/
|
|
773
|
-
operations: CmsContentModelGroupStorageOperations;
|
|
774
|
-
/**
|
|
775
|
-
* A function defining usage of a method without authenticating the user.
|
|
776
|
-
*/
|
|
777
|
-
noAuth: () => {
|
|
778
|
-
/**
|
|
779
|
-
* Gets content model group by given id.
|
|
780
|
-
*/
|
|
781
|
-
get: (id: string) => Promise<CmsContentModelGroup | null>;
|
|
782
|
-
/**
|
|
783
|
-
* List all content model groups. Filterable via params.
|
|
784
|
-
*/
|
|
785
|
-
list: (args?: CmsContentModelGroupListArgs) => Promise<CmsContentModelGroup[]>;
|
|
786
|
-
};
|
|
846
|
+
export interface CmsGroupContext {
|
|
787
847
|
/**
|
|
788
848
|
* Gets content model group by given id.
|
|
789
849
|
*/
|
|
790
|
-
|
|
850
|
+
getGroup: (id: string) => Promise<CmsGroup | null>;
|
|
791
851
|
/**
|
|
792
852
|
* List all content model groups. Filterable via params.
|
|
793
853
|
*/
|
|
794
|
-
|
|
854
|
+
listGroups: (params?: CmsGroupListParams) => Promise<CmsGroup[]>;
|
|
795
855
|
/**
|
|
796
856
|
* Create a new content model group.
|
|
797
857
|
*/
|
|
798
|
-
|
|
858
|
+
createGroup: (data: CmsGroupCreateInput) => Promise<CmsGroup>;
|
|
799
859
|
/**
|
|
800
860
|
* Update existing content model group.
|
|
801
861
|
*/
|
|
802
|
-
|
|
862
|
+
updateGroup: (id: string, data: CmsGroupUpdateInput) => Promise<CmsGroup>;
|
|
803
863
|
/**
|
|
804
864
|
* Delete content model group by given id.
|
|
805
865
|
*/
|
|
806
|
-
|
|
866
|
+
deleteGroup: (id: string) => Promise<boolean>;
|
|
867
|
+
/**
|
|
868
|
+
* Events.
|
|
869
|
+
*/
|
|
870
|
+
onBeforeGroupCreate: Topic<BeforeGroupCreateTopicParams>;
|
|
871
|
+
onAfterGroupCreate: Topic<AfterGroupCreateTopicParams>;
|
|
872
|
+
onBeforeGroupUpdate: Topic<BeforeGroupUpdateTopicParams>;
|
|
873
|
+
onAfterGroupUpdate: Topic<AfterGroupUpdateTopicParams>;
|
|
874
|
+
onBeforeGroupDelete: Topic<BeforeGroupDeleteTopicParams>;
|
|
875
|
+
onAfterGroupDelete: Topic<AfterGroupDeleteTopicParams>;
|
|
807
876
|
}
|
|
808
877
|
/**
|
|
809
878
|
* Definition for content model field validator.
|
|
810
879
|
*
|
|
811
|
-
* @category
|
|
880
|
+
* @category ModelField
|
|
812
881
|
* @category FieldValidation
|
|
813
882
|
*/
|
|
814
|
-
export interface
|
|
883
|
+
export interface CmsModelFieldValidation {
|
|
815
884
|
name: string;
|
|
816
885
|
message: string;
|
|
817
886
|
settings?: Record<string, any>;
|
|
818
887
|
}
|
|
819
888
|
/**
|
|
820
|
-
* A GraphQL
|
|
889
|
+
* A GraphQL params.data parameter received when creating content model.
|
|
821
890
|
*
|
|
822
|
-
* @category GraphQL
|
|
823
|
-
* @category
|
|
891
|
+
* @category GraphQL params
|
|
892
|
+
* @category CmsModel
|
|
824
893
|
*/
|
|
825
|
-
export interface
|
|
894
|
+
export interface CmsModelCreateInput {
|
|
826
895
|
/**
|
|
827
896
|
* Name of the content model.
|
|
828
897
|
*/
|
|
@@ -839,13 +908,13 @@ export interface CmsContentModelCreateInput {
|
|
|
839
908
|
/**
|
|
840
909
|
* A definition for content model field received from the user.
|
|
841
910
|
*
|
|
842
|
-
* Input type for `
|
|
843
|
-
* @see
|
|
911
|
+
* Input type for `CmsModelField`.
|
|
912
|
+
* @see CmsModelField
|
|
844
913
|
*
|
|
845
|
-
* @category GraphQL
|
|
846
|
-
* @category
|
|
914
|
+
* @category GraphQL params
|
|
915
|
+
* @category ModelField
|
|
847
916
|
*/
|
|
848
|
-
export interface
|
|
917
|
+
export interface CmsModelFieldInput {
|
|
849
918
|
/**
|
|
850
919
|
* Generated ID.
|
|
851
920
|
*/
|
|
@@ -878,31 +947,31 @@ export interface CmsContentModelFieldInput {
|
|
|
878
947
|
/**
|
|
879
948
|
* Predefined values options for the field. Check the reference for more information.
|
|
880
949
|
*/
|
|
881
|
-
predefinedValues?:
|
|
950
|
+
predefinedValues?: CmsModelFieldPredefinedValues;
|
|
882
951
|
/**
|
|
883
952
|
* Renderer options for the field. Check the reference for more information.
|
|
884
953
|
*/
|
|
885
|
-
renderer?:
|
|
954
|
+
renderer?: CmsModelFieldRenderer;
|
|
886
955
|
/**
|
|
887
956
|
* List of validations for the field.
|
|
888
957
|
*/
|
|
889
|
-
validation?:
|
|
958
|
+
validation?: CmsModelFieldValidation[];
|
|
890
959
|
/**
|
|
891
|
-
* @see
|
|
960
|
+
* @see CmsModelField.listValidation
|
|
892
961
|
*/
|
|
893
|
-
listValidation:
|
|
962
|
+
listValidation: CmsModelFieldValidation[];
|
|
894
963
|
/**
|
|
895
964
|
* User defined settings.
|
|
896
965
|
*/
|
|
897
966
|
settings?: Record<string, any>;
|
|
898
967
|
}
|
|
899
968
|
/**
|
|
900
|
-
* A GraphQL
|
|
969
|
+
* A GraphQL params.data parameter received when updating content model.
|
|
901
970
|
*
|
|
902
|
-
* @category GraphQL
|
|
903
|
-
* @category
|
|
971
|
+
* @category GraphQL params
|
|
972
|
+
* @category CmsModel
|
|
904
973
|
*/
|
|
905
|
-
export interface
|
|
974
|
+
export interface CmsModelUpdateInput {
|
|
906
975
|
/**
|
|
907
976
|
* A new content model name.
|
|
908
977
|
*/
|
|
@@ -914,7 +983,7 @@ export interface CmsContentModelUpdateInput {
|
|
|
914
983
|
/**
|
|
915
984
|
* A list of content model fields to define the entry values.
|
|
916
985
|
*/
|
|
917
|
-
fields:
|
|
986
|
+
fields: CmsModelFieldInput[];
|
|
918
987
|
/**
|
|
919
988
|
* Admin UI field layout
|
|
920
989
|
*
|
|
@@ -933,37 +1002,37 @@ export interface CmsContentModelUpdateInput {
|
|
|
933
1002
|
titleFieldId?: string;
|
|
934
1003
|
}
|
|
935
1004
|
/**
|
|
936
|
-
* A plugin to load a
|
|
1005
|
+
* A plugin to load a CmsModelManager.
|
|
937
1006
|
*
|
|
938
|
-
* @see
|
|
1007
|
+
* @see CmsModelManager
|
|
939
1008
|
*
|
|
940
1009
|
* @category Plugin
|
|
941
|
-
* @category
|
|
942
|
-
* @category
|
|
1010
|
+
* @category CmsModel
|
|
1011
|
+
* @category CmsEntry
|
|
943
1012
|
*/
|
|
944
|
-
export interface
|
|
1013
|
+
export interface ModelManagerPlugin extends Plugin {
|
|
945
1014
|
/**
|
|
946
1015
|
* A plugin type.
|
|
947
1016
|
*/
|
|
948
1017
|
type: "cms-content-model-manager";
|
|
949
1018
|
/**
|
|
950
|
-
* Specific model
|
|
1019
|
+
* Specific model CmsModelManager loader. Can target exact modelId(s).
|
|
951
1020
|
* Be aware that if you define multiple plugins without `modelId`, last one will run.
|
|
952
1021
|
*/
|
|
953
1022
|
modelId?: string[] | string;
|
|
954
1023
|
/**
|
|
955
|
-
* Create a
|
|
1024
|
+
* Create a CmsModelManager for specific type - or new default one.
|
|
956
1025
|
* 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)
|
|
957
1026
|
*/
|
|
958
|
-
create: (context: CmsContext, model:
|
|
1027
|
+
create: (context: CmsContext, model: CmsModel) => Promise<CmsModelManager>;
|
|
959
1028
|
}
|
|
960
1029
|
/**
|
|
961
1030
|
* A content entry definition for and from the database.
|
|
962
1031
|
*
|
|
963
1032
|
* @category Database model
|
|
964
|
-
* @category
|
|
1033
|
+
* @category CmsEntry
|
|
965
1034
|
*/
|
|
966
|
-
export interface
|
|
1035
|
+
export interface CmsEntry {
|
|
967
1036
|
/**
|
|
968
1037
|
* A version of the webiny this entry was created with.
|
|
969
1038
|
* This can be used when upgrading the system so we know which entries to update.
|
|
@@ -1002,7 +1071,7 @@ export interface CmsContentEntry {
|
|
|
1002
1071
|
savedOn: string;
|
|
1003
1072
|
/**
|
|
1004
1073
|
* Model ID of the definition for the entry.
|
|
1005
|
-
* @see
|
|
1074
|
+
* @see CmsModel
|
|
1006
1075
|
*/
|
|
1007
1076
|
modelId: string;
|
|
1008
1077
|
/**
|
|
@@ -1026,110 +1095,121 @@ export interface CmsContentEntry {
|
|
|
1026
1095
|
/**
|
|
1027
1096
|
* Status type of the entry.
|
|
1028
1097
|
*/
|
|
1029
|
-
status:
|
|
1098
|
+
status: CmsEntryStatus;
|
|
1030
1099
|
/**
|
|
1031
1100
|
* A mapped fieldId -> value object.
|
|
1032
1101
|
*
|
|
1033
|
-
* @see
|
|
1102
|
+
* @see CmsModelField
|
|
1034
1103
|
*/
|
|
1035
1104
|
values: Record<string, any>;
|
|
1036
1105
|
}
|
|
1037
|
-
export interface
|
|
1106
|
+
export interface CmsStorageEntry extends CmsEntry {
|
|
1038
1107
|
[key: string]: any;
|
|
1039
1108
|
}
|
|
1040
1109
|
/**
|
|
1041
1110
|
* A definition for content model manager to be used in the code.
|
|
1042
|
-
* The default one uses `
|
|
1111
|
+
* The default one uses `CmsEntryContext` methods internally, but devs can change to what every they want.
|
|
1043
1112
|
*
|
|
1044
|
-
* @see
|
|
1113
|
+
* @see CmsEntryContext
|
|
1045
1114
|
*
|
|
1046
1115
|
* @category Context
|
|
1047
|
-
* @category
|
|
1048
|
-
* @category
|
|
1116
|
+
* @category CmsEntry
|
|
1117
|
+
* @category CmsModel
|
|
1049
1118
|
*/
|
|
1050
|
-
export interface
|
|
1119
|
+
export interface CmsModelManager {
|
|
1051
1120
|
/**
|
|
1052
1121
|
* List entries in this content model.
|
|
1053
1122
|
*/
|
|
1054
|
-
list: (
|
|
1123
|
+
list: (params?: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
1055
1124
|
/**
|
|
1056
1125
|
* List only published entries in the content model.
|
|
1057
1126
|
*/
|
|
1058
|
-
listPublished: (
|
|
1127
|
+
listPublished: (params?: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
1059
1128
|
/**
|
|
1060
1129
|
* List latest entries in the content model. Used for administration.
|
|
1061
1130
|
*/
|
|
1062
|
-
listLatest: (
|
|
1131
|
+
listLatest: (params?: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
1063
1132
|
/**
|
|
1064
1133
|
* Get a list of published entries by the ID list.
|
|
1065
1134
|
*/
|
|
1066
|
-
getPublishedByIds: (ids: string[]) => Promise<
|
|
1135
|
+
getPublishedByIds: (ids: string[]) => Promise<CmsEntry[]>;
|
|
1067
1136
|
/**
|
|
1068
1137
|
* Get a list of latest entries by the ID list.
|
|
1069
1138
|
*/
|
|
1070
|
-
getLatestByIds: (ids: string[]) => Promise<
|
|
1139
|
+
getLatestByIds: (ids: string[]) => Promise<CmsEntry[]>;
|
|
1071
1140
|
/**
|
|
1072
|
-
* Get an entry filtered by given
|
|
1141
|
+
* Get an entry filtered by given params. Will always get one.
|
|
1073
1142
|
*/
|
|
1074
|
-
get: (
|
|
1143
|
+
get: (id: string) => Promise<CmsEntry>;
|
|
1075
1144
|
/**
|
|
1076
1145
|
* Create a entry.
|
|
1077
1146
|
*/
|
|
1078
|
-
create: (data: Record<string, any>) => Promise<
|
|
1147
|
+
create: (data: Record<string, any>) => Promise<CmsEntry>;
|
|
1079
1148
|
/**
|
|
1080
1149
|
* Update a entry.
|
|
1081
1150
|
*/
|
|
1082
|
-
update: (id: string, data: Record<string, any>) => Promise<
|
|
1151
|
+
update: (id: string, data: Record<string, any>) => Promise<CmsEntry>;
|
|
1083
1152
|
/**
|
|
1084
1153
|
* Delete a entry.
|
|
1085
1154
|
*/
|
|
1086
1155
|
delete: (id: string) => Promise<void>;
|
|
1087
1156
|
}
|
|
1157
|
+
export interface BeforeModelCreateTopicParams {
|
|
1158
|
+
input: Partial<CmsModel>;
|
|
1159
|
+
model: CmsModel;
|
|
1160
|
+
}
|
|
1161
|
+
export interface AfterModelCreateTopicParams {
|
|
1162
|
+
input: Partial<CmsModel>;
|
|
1163
|
+
model: CmsModel;
|
|
1164
|
+
}
|
|
1165
|
+
export interface BeforeModelUpdateTopicParams {
|
|
1166
|
+
input: Partial<CmsModel>;
|
|
1167
|
+
original: CmsModel;
|
|
1168
|
+
model: CmsModel;
|
|
1169
|
+
}
|
|
1170
|
+
export interface AfterModelUpdateTopicParams {
|
|
1171
|
+
input: Partial<CmsModel>;
|
|
1172
|
+
original: CmsModel;
|
|
1173
|
+
model: CmsModel;
|
|
1174
|
+
}
|
|
1175
|
+
export interface BeforeModelDeleteTopicParams {
|
|
1176
|
+
model: CmsModel;
|
|
1177
|
+
}
|
|
1178
|
+
export interface AfterModelDeleteTopicParams {
|
|
1179
|
+
model: CmsModel;
|
|
1180
|
+
}
|
|
1181
|
+
export interface CmsModelUpdateDirectParams {
|
|
1182
|
+
model: CmsModel;
|
|
1183
|
+
original: CmsModel;
|
|
1184
|
+
}
|
|
1088
1185
|
/**
|
|
1089
|
-
*
|
|
1186
|
+
* Cms Model in the context.
|
|
1090
1187
|
*
|
|
1091
1188
|
* @category Context
|
|
1092
|
-
* @category
|
|
1189
|
+
* @category CmsModel
|
|
1093
1190
|
*/
|
|
1094
|
-
export interface
|
|
1095
|
-
/**
|
|
1096
|
-
* Plain operations on the storage level.
|
|
1097
|
-
*/
|
|
1098
|
-
operations: CmsContentModelStorageOperations;
|
|
1099
|
-
/**
|
|
1100
|
-
* A function defining usage of a method without authenticating the user.
|
|
1101
|
-
*/
|
|
1102
|
-
noAuth: () => {
|
|
1103
|
-
/**
|
|
1104
|
-
* Get a single content model.
|
|
1105
|
-
*/
|
|
1106
|
-
get: (modelId: string) => Promise<CmsContentModel | null>;
|
|
1107
|
-
/**
|
|
1108
|
-
* Get all content models.
|
|
1109
|
-
*/
|
|
1110
|
-
list: () => Promise<CmsContentModel[]>;
|
|
1111
|
-
};
|
|
1191
|
+
export interface CmsModelContext {
|
|
1112
1192
|
/**
|
|
1113
1193
|
* A function defining usage of a method with authenticating the user but not throwing an error.
|
|
1114
1194
|
*/
|
|
1115
|
-
|
|
1195
|
+
silentAuthModel: () => {
|
|
1116
1196
|
/**
|
|
1117
1197
|
* Get all content models.
|
|
1118
1198
|
*/
|
|
1119
|
-
list: () => Promise<
|
|
1199
|
+
list: () => Promise<CmsModel[]>;
|
|
1120
1200
|
};
|
|
1121
1201
|
/**
|
|
1122
1202
|
* Get a single content model.
|
|
1123
1203
|
*/
|
|
1124
|
-
|
|
1204
|
+
getModel: (modelId: string) => Promise<CmsModel | null>;
|
|
1125
1205
|
/**
|
|
1126
1206
|
* Get all content models.
|
|
1127
1207
|
*/
|
|
1128
|
-
|
|
1208
|
+
listModels: () => Promise<CmsModel[]>;
|
|
1129
1209
|
/**
|
|
1130
1210
|
* Create a content model.
|
|
1131
1211
|
*/
|
|
1132
|
-
|
|
1212
|
+
createModel: (data: CmsModelCreateInput) => Promise<CmsModel>;
|
|
1133
1213
|
/**
|
|
1134
1214
|
* Update content model without data validation. Used internally.
|
|
1135
1215
|
*
|
|
@@ -1138,40 +1218,52 @@ export interface CmsContentModelContext {
|
|
|
1138
1218
|
*
|
|
1139
1219
|
* @hidden
|
|
1140
1220
|
*/
|
|
1141
|
-
|
|
1221
|
+
updateModelDirect: (params: CmsModelUpdateDirectParams) => Promise<CmsModel>;
|
|
1142
1222
|
/**
|
|
1143
1223
|
* Update content model.
|
|
1144
1224
|
*/
|
|
1145
|
-
|
|
1225
|
+
updateModel: (modelId: string, data: CmsModelUpdateInput) => Promise<CmsModel>;
|
|
1146
1226
|
/**
|
|
1147
1227
|
* Delete content model. Should not allow deletion if there are entries connected to it.
|
|
1148
1228
|
*/
|
|
1149
|
-
|
|
1229
|
+
deleteModel: (modelId: string) => Promise<void>;
|
|
1150
1230
|
/**
|
|
1151
|
-
* Get a instance of
|
|
1231
|
+
* Get a instance of CmsModelManager for given content modelId.
|
|
1152
1232
|
*
|
|
1153
|
-
* @see
|
|
1233
|
+
* @see CmsModelManager
|
|
1154
1234
|
*/
|
|
1155
|
-
|
|
1235
|
+
getModelManager: (modelId: string) => Promise<CmsModelManager>;
|
|
1156
1236
|
/**
|
|
1157
1237
|
* Get all content model managers mapped by modelId.
|
|
1158
|
-
* @see
|
|
1238
|
+
* @see CmsModelManager
|
|
1239
|
+
*/
|
|
1240
|
+
getManagers: () => Map<string, CmsModelManager>;
|
|
1241
|
+
/**
|
|
1242
|
+
* Events.
|
|
1159
1243
|
*/
|
|
1160
|
-
|
|
1244
|
+
onBeforeModelCreate: Topic<BeforeModelCreateTopicParams>;
|
|
1245
|
+
onAfterModelCreate: Topic<AfterModelCreateTopicParams>;
|
|
1246
|
+
onBeforeModelUpdate: Topic<BeforeModelUpdateTopicParams>;
|
|
1247
|
+
onAfterModelUpdate: Topic<AfterModelUpdateTopicParams>;
|
|
1248
|
+
onBeforeModelDelete: Topic<BeforeModelDeleteTopicParams>;
|
|
1249
|
+
onAfterModelDelete: Topic<AfterModelDeleteTopicParams>;
|
|
1161
1250
|
}
|
|
1162
1251
|
/**
|
|
1163
1252
|
* Available statuses for content entry.
|
|
1164
1253
|
*
|
|
1165
|
-
* @category
|
|
1254
|
+
* @category CmsEntry
|
|
1166
1255
|
*/
|
|
1167
|
-
declare type
|
|
1256
|
+
declare type CmsEntryStatus = "published" | "unpublished" | "reviewRequested" | "changesRequested" | "draft";
|
|
1168
1257
|
/**
|
|
1169
|
-
* Entry listing where
|
|
1258
|
+
* Entry listing where params.
|
|
1170
1259
|
*
|
|
1171
|
-
* @category
|
|
1172
|
-
* @category GraphQL
|
|
1260
|
+
* @category CmsEntry
|
|
1261
|
+
* @category GraphQL params
|
|
1173
1262
|
*/
|
|
1174
|
-
export interface
|
|
1263
|
+
export interface CmsEntryListWhere {
|
|
1264
|
+
/**
|
|
1265
|
+
* Fields.
|
|
1266
|
+
*/
|
|
1175
1267
|
id?: string;
|
|
1176
1268
|
id_in?: string[];
|
|
1177
1269
|
id_not?: string;
|
|
@@ -1229,39 +1321,39 @@ export interface CmsContentEntryListWhere {
|
|
|
1229
1321
|
/**
|
|
1230
1322
|
* Entry listing sort.
|
|
1231
1323
|
*
|
|
1232
|
-
* @category
|
|
1233
|
-
* @category GraphQL
|
|
1324
|
+
* @category CmsEntry
|
|
1325
|
+
* @category GraphQL params
|
|
1234
1326
|
*/
|
|
1235
|
-
export declare type
|
|
1327
|
+
export declare type CmsEntryListSort = string[];
|
|
1236
1328
|
/**
|
|
1237
|
-
* Get entry GraphQL resolver
|
|
1329
|
+
* Get entry GraphQL resolver params.
|
|
1238
1330
|
*
|
|
1239
|
-
* @category
|
|
1240
|
-
* @category GraphQL
|
|
1331
|
+
* @category CmsEntry
|
|
1332
|
+
* @category GraphQL params
|
|
1241
1333
|
*/
|
|
1242
|
-
export interface
|
|
1243
|
-
where
|
|
1244
|
-
sort?:
|
|
1334
|
+
export interface CmsEntryGetParams {
|
|
1335
|
+
where: CmsEntryListWhere;
|
|
1336
|
+
sort?: CmsEntryListSort;
|
|
1245
1337
|
}
|
|
1246
1338
|
/**
|
|
1247
|
-
* List entries GraphQL resolver
|
|
1339
|
+
* List entries GraphQL resolver params.
|
|
1248
1340
|
*
|
|
1249
|
-
* @category
|
|
1250
|
-
* @category GraphQL
|
|
1341
|
+
* @category CmsEntry
|
|
1342
|
+
* @category GraphQL params
|
|
1251
1343
|
*/
|
|
1252
|
-
export interface
|
|
1253
|
-
where
|
|
1254
|
-
sort?:
|
|
1344
|
+
export interface CmsEntryListParams {
|
|
1345
|
+
where: CmsEntryListWhere;
|
|
1346
|
+
sort?: CmsEntryListSort;
|
|
1255
1347
|
limit?: number;
|
|
1256
1348
|
after?: string;
|
|
1257
1349
|
}
|
|
1258
1350
|
/**
|
|
1259
1351
|
* Meta information for GraphQL output.
|
|
1260
1352
|
*
|
|
1261
|
-
* @category
|
|
1353
|
+
* @category CmsEntry
|
|
1262
1354
|
* @category GraphQL output
|
|
1263
1355
|
*/
|
|
1264
|
-
export interface
|
|
1356
|
+
export interface CmsEntryMeta {
|
|
1265
1357
|
/**
|
|
1266
1358
|
* A cursor for pagination.
|
|
1267
1359
|
*/
|
|
@@ -1275,138 +1367,227 @@ export interface CmsContentEntryMeta {
|
|
|
1275
1367
|
*/
|
|
1276
1368
|
totalCount: number;
|
|
1277
1369
|
}
|
|
1278
|
-
|
|
1279
|
-
|
|
1370
|
+
export interface BeforeEntryCreateTopicParams {
|
|
1371
|
+
input: Partial<CmsEntry>;
|
|
1372
|
+
entry: CmsEntry;
|
|
1373
|
+
model: CmsModel;
|
|
1374
|
+
}
|
|
1375
|
+
export interface AfterEntryCreateTopicParams {
|
|
1376
|
+
input: Partial<CmsEntry>;
|
|
1377
|
+
entry: CmsEntry;
|
|
1378
|
+
model: CmsModel;
|
|
1379
|
+
storageEntry: CmsEntry;
|
|
1380
|
+
}
|
|
1381
|
+
export interface BeforeEntryRevisionCreateTopicParams {
|
|
1382
|
+
entry: CmsEntry;
|
|
1383
|
+
model: CmsModel;
|
|
1384
|
+
}
|
|
1385
|
+
export interface AfterEntryRevisionCreateTopicParams {
|
|
1386
|
+
entry: CmsEntry;
|
|
1387
|
+
model: CmsModel;
|
|
1388
|
+
storageEntry: CmsEntry;
|
|
1389
|
+
}
|
|
1390
|
+
export interface BeforeEntryUpdateTopicParams {
|
|
1391
|
+
input: Partial<CmsEntry>;
|
|
1392
|
+
original: CmsEntry;
|
|
1393
|
+
entry: CmsEntry;
|
|
1394
|
+
model: CmsModel;
|
|
1395
|
+
}
|
|
1396
|
+
export interface AfterEntryUpdateTopicParams {
|
|
1397
|
+
input: Partial<CmsEntry>;
|
|
1398
|
+
original: CmsEntry;
|
|
1399
|
+
entry: CmsEntry;
|
|
1400
|
+
model: CmsModel;
|
|
1401
|
+
storageEntry: CmsEntry;
|
|
1402
|
+
}
|
|
1403
|
+
export interface BeforeEntryPublishTopicParams {
|
|
1404
|
+
entry: CmsEntry;
|
|
1405
|
+
model: CmsModel;
|
|
1406
|
+
}
|
|
1407
|
+
export interface AfterEntryPublishTopicParams {
|
|
1408
|
+
entry: CmsEntry;
|
|
1409
|
+
model: CmsModel;
|
|
1410
|
+
storageEntry: CmsEntry;
|
|
1411
|
+
}
|
|
1412
|
+
export interface BeforeEntryUnpublishTopicParams {
|
|
1413
|
+
entry: CmsEntry;
|
|
1414
|
+
model: CmsModel;
|
|
1415
|
+
}
|
|
1416
|
+
export interface AfterEntryUnpublishTopicParams {
|
|
1417
|
+
entry: CmsEntry;
|
|
1418
|
+
model: CmsModel;
|
|
1419
|
+
storageEntry: CmsEntry;
|
|
1420
|
+
}
|
|
1421
|
+
export interface BeforeEntryRequestChangesTopicParams {
|
|
1422
|
+
entry: CmsEntry;
|
|
1423
|
+
model: CmsModel;
|
|
1424
|
+
}
|
|
1425
|
+
export interface AfterEntryRequestChangesTopicParams {
|
|
1426
|
+
entry: CmsEntry;
|
|
1427
|
+
model: CmsModel;
|
|
1428
|
+
storageEntry: CmsEntry;
|
|
1429
|
+
}
|
|
1430
|
+
export interface BeforeEntryRequestReviewTopicParams {
|
|
1431
|
+
entry: CmsEntry;
|
|
1432
|
+
model: CmsModel;
|
|
1433
|
+
}
|
|
1434
|
+
export interface AfterEntryRequestReviewTopicParams {
|
|
1435
|
+
entry: CmsEntry;
|
|
1436
|
+
model: CmsModel;
|
|
1437
|
+
storageEntry: CmsEntry;
|
|
1438
|
+
}
|
|
1439
|
+
export interface BeforeEntryDeleteTopicParams {
|
|
1440
|
+
entry: CmsEntry;
|
|
1441
|
+
model: CmsModel;
|
|
1442
|
+
}
|
|
1443
|
+
export interface AfterEntryDeleteTopicParams {
|
|
1444
|
+
entry: CmsEntry;
|
|
1445
|
+
model: CmsModel;
|
|
1446
|
+
}
|
|
1447
|
+
export interface BeforeEntryRevisionDeleteTopicParams {
|
|
1448
|
+
entry: CmsEntry;
|
|
1449
|
+
model: CmsModel;
|
|
1450
|
+
}
|
|
1451
|
+
export interface AfterEntryRevisionDeleteTopicParams {
|
|
1452
|
+
entry: CmsEntry;
|
|
1453
|
+
model: CmsModel;
|
|
1454
|
+
}
|
|
1455
|
+
export interface BeforeEntryGetTopicParams {
|
|
1456
|
+
model: CmsModel;
|
|
1457
|
+
where: CmsEntryListWhere;
|
|
1458
|
+
}
|
|
1459
|
+
export interface BeforeEntryListTopicParams {
|
|
1460
|
+
where: CmsEntryListWhere;
|
|
1461
|
+
model: CmsModel;
|
|
1462
|
+
}
|
|
1463
|
+
/**
|
|
1464
|
+
* Cms Entry CRUD methods in the context.
|
|
1280
1465
|
*
|
|
1281
1466
|
* @category Context
|
|
1282
|
-
* @category
|
|
1467
|
+
* @category CmsEntry
|
|
1283
1468
|
*/
|
|
1284
|
-
export interface
|
|
1285
|
-
/**
|
|
1286
|
-
* Plain operations on the storage level.
|
|
1287
|
-
*/
|
|
1288
|
-
operations: CmsContentEntryStorageOperations;
|
|
1469
|
+
export interface CmsEntryContext {
|
|
1289
1470
|
/**
|
|
1290
1471
|
* Get a single content entry for a model.
|
|
1291
1472
|
*/
|
|
1292
|
-
|
|
1473
|
+
getEntry: (model: CmsModel, params: CmsEntryGetParams) => Promise<CmsEntry | null>;
|
|
1293
1474
|
/**
|
|
1294
1475
|
* Get a list of entries for a model by a given ID (revision).
|
|
1295
1476
|
*/
|
|
1296
|
-
|
|
1477
|
+
getEntriesByIds: (model: CmsModel, revisions: string[]) => Promise<CmsEntry[] | null>;
|
|
1297
1478
|
/**
|
|
1298
1479
|
* Get the entry for a model by a given ID.
|
|
1299
1480
|
*/
|
|
1300
|
-
|
|
1481
|
+
getEntryById: (model: CmsModel, revision: string) => Promise<CmsEntry>;
|
|
1301
1482
|
/**
|
|
1302
1483
|
* List entries for a model. Internal method used by get, listLatest and listPublished.
|
|
1303
1484
|
*/
|
|
1304
|
-
|
|
1485
|
+
listEntries: (model: CmsModel, params?: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
1305
1486
|
/**
|
|
1306
1487
|
* Lists latest entries. Used for manage API.
|
|
1307
1488
|
*/
|
|
1308
|
-
|
|
1489
|
+
listLatestEntries: (model: CmsModel, params?: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
1309
1490
|
/**
|
|
1310
1491
|
* List published entries. Used for read API.
|
|
1311
1492
|
*/
|
|
1312
|
-
|
|
1493
|
+
listPublishedEntries: (model: CmsModel, params?: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
1313
1494
|
/**
|
|
1314
1495
|
* List published entries by IDs.
|
|
1315
1496
|
*/
|
|
1316
|
-
|
|
1497
|
+
getPublishedEntriesByIds: (model: CmsModel, ids: string[]) => Promise<CmsEntry[]>;
|
|
1317
1498
|
/**
|
|
1318
1499
|
* List latest entries by IDs.
|
|
1319
1500
|
*/
|
|
1320
|
-
|
|
1501
|
+
getLatestEntriesByIds: (model: CmsModel, ids: string[]) => Promise<CmsEntry[]>;
|
|
1321
1502
|
/**
|
|
1322
1503
|
* Create a new content entry.
|
|
1323
1504
|
*/
|
|
1324
|
-
|
|
1505
|
+
createEntry: (model: CmsModel, data: Record<string, any>) => Promise<CmsEntry>;
|
|
1325
1506
|
/**
|
|
1326
1507
|
* Create a new entry from already existing entry.
|
|
1327
1508
|
*/
|
|
1328
|
-
|
|
1509
|
+
createEntryRevisionFrom: (model: CmsModel, id: string, data: Record<string, any>) => Promise<CmsEntry>;
|
|
1329
1510
|
/**
|
|
1330
1511
|
* Update existing entry.
|
|
1331
1512
|
*/
|
|
1332
|
-
|
|
1513
|
+
updateEntry: (model: CmsModel, id: string, data?: Record<string, any>) => Promise<CmsEntry>;
|
|
1333
1514
|
/**
|
|
1334
1515
|
* Delete only a certain revision of the entry.
|
|
1335
1516
|
*/
|
|
1336
|
-
|
|
1517
|
+
deleteEntryRevision: (model: CmsModel, id: string) => Promise<void>;
|
|
1337
1518
|
/**
|
|
1338
1519
|
* Delete entry with all its revisions.
|
|
1339
1520
|
*/
|
|
1340
|
-
deleteEntry: (model:
|
|
1521
|
+
deleteEntry: (model: CmsModel, id: string) => Promise<void>;
|
|
1341
1522
|
/**
|
|
1342
1523
|
* Publish entry.
|
|
1343
1524
|
*/
|
|
1344
|
-
|
|
1525
|
+
publishEntry: (model: CmsModel, id: string) => Promise<CmsEntry>;
|
|
1345
1526
|
/**
|
|
1346
1527
|
* Unpublish entry.
|
|
1347
1528
|
*/
|
|
1348
|
-
|
|
1529
|
+
unpublishEntry: (model: CmsModel, id: string) => Promise<CmsEntry>;
|
|
1349
1530
|
/**
|
|
1350
1531
|
* Request a review for the entry.
|
|
1351
1532
|
*/
|
|
1352
|
-
|
|
1533
|
+
requestEntryReview: (model: CmsModel, id: string) => Promise<CmsEntry>;
|
|
1353
1534
|
/**
|
|
1354
1535
|
* Request changes for the entry.
|
|
1355
1536
|
*/
|
|
1356
|
-
|
|
1537
|
+
requestEntryChanges: (model: CmsModel, id: string) => Promise<CmsEntry>;
|
|
1357
1538
|
/**
|
|
1358
1539
|
* Get all entry revisions.
|
|
1359
1540
|
*/
|
|
1360
|
-
getEntryRevisions: (model:
|
|
1541
|
+
getEntryRevisions: (model: CmsModel, id: string) => Promise<CmsEntry[]>;
|
|
1542
|
+
/**
|
|
1543
|
+
* Events.
|
|
1544
|
+
*/
|
|
1545
|
+
onBeforeEntryCreate: Topic<BeforeEntryCreateTopicParams>;
|
|
1546
|
+
onAfterEntryCreate: Topic<AfterEntryCreateTopicParams>;
|
|
1547
|
+
onBeforeEntryRevisionCreate: Topic<BeforeEntryRevisionCreateTopicParams>;
|
|
1548
|
+
onAfterEntryRevisionCreate: Topic<AfterEntryRevisionCreateTopicParams>;
|
|
1549
|
+
onBeforeEntryUpdate: Topic<BeforeEntryUpdateTopicParams>;
|
|
1550
|
+
onAfterEntryUpdate: Topic<AfterEntryUpdateTopicParams>;
|
|
1551
|
+
onBeforeEntryDelete: Topic<BeforeEntryDeleteTopicParams>;
|
|
1552
|
+
onAfterEntryDelete: Topic<AfterEntryDeleteTopicParams>;
|
|
1553
|
+
onBeforeEntryRevisionDelete: Topic<BeforeEntryRevisionDeleteTopicParams>;
|
|
1554
|
+
onAfterEntryRevisionDelete: Topic<AfterEntryRevisionDeleteTopicParams>;
|
|
1555
|
+
onBeforeEntryPublish: Topic<BeforeEntryPublishTopicParams>;
|
|
1556
|
+
onAfterEntryPublish: Topic<AfterEntryPublishTopicParams>;
|
|
1557
|
+
onBeforeEntryUnpublish: Topic<BeforeEntryUnpublishTopicParams>;
|
|
1558
|
+
onAfterEntryUnpublish: Topic<AfterEntryUnpublishTopicParams>;
|
|
1559
|
+
onBeforeEntryRequestChanges: Topic<BeforeEntryRequestChangesTopicParams>;
|
|
1560
|
+
onAfterEntryRequestChanges: Topic<AfterEntryRequestChangesTopicParams>;
|
|
1561
|
+
onBeforeEntryRequestReview: Topic<BeforeEntryRequestReviewTopicParams>;
|
|
1562
|
+
onAfterEntryRequestReview: Topic<AfterEntryRequestReviewTopicParams>;
|
|
1563
|
+
onBeforeEntryGet: Topic<BeforeEntryGetTopicParams>;
|
|
1564
|
+
onBeforeEntryList: Topic<BeforeEntryListTopicParams>;
|
|
1361
1565
|
}
|
|
1362
1566
|
/**
|
|
1363
1567
|
* A cms part of the context that has all the CRUD operations.
|
|
1364
1568
|
*
|
|
1365
1569
|
* @category Context
|
|
1366
1570
|
*/
|
|
1367
|
-
interface CmsCrudContextObject {
|
|
1368
|
-
|
|
1369
|
-
* Settings CRUD methods.
|
|
1370
|
-
*/
|
|
1371
|
-
settings: CmsSettingsContext;
|
|
1372
|
-
/**
|
|
1373
|
-
* Content model group CRUD methods.
|
|
1374
|
-
*/
|
|
1375
|
-
groups: CmsContentModelGroupContext;
|
|
1376
|
-
/**
|
|
1377
|
-
* Content model CRUD methods.
|
|
1378
|
-
*/
|
|
1379
|
-
models: CmsContentModelContext;
|
|
1380
|
-
/**
|
|
1381
|
-
* Fetch the content entry manager. It calls content entry methods internally, with given model as the target.
|
|
1382
|
-
*/
|
|
1383
|
-
getModel: (modelId: string) => Promise<CmsContentModelManager>;
|
|
1384
|
-
/**
|
|
1385
|
-
* Content entry CRUD methods.
|
|
1386
|
-
*/
|
|
1387
|
-
entries: CmsContentEntryContext;
|
|
1388
|
-
/**
|
|
1389
|
-
* System CRUD methods
|
|
1390
|
-
*/
|
|
1391
|
-
system: CmsSystemContext;
|
|
1571
|
+
interface CmsCrudContextObject extends CmsSettingsContext, CmsSystemContext, CmsGroupContext, CmsModelContext, CmsEntryContext {
|
|
1572
|
+
storageOperations: HeadlessCmsStorageOperations;
|
|
1392
1573
|
}
|
|
1393
1574
|
/**
|
|
1394
|
-
* Parameters for
|
|
1575
|
+
* Parameters for CmsEntryResolverFactory.
|
|
1395
1576
|
*
|
|
1396
1577
|
* @category GraphQL resolver
|
|
1397
|
-
* @category
|
|
1578
|
+
* @category CmsEntry
|
|
1398
1579
|
*/
|
|
1399
|
-
interface
|
|
1400
|
-
model:
|
|
1580
|
+
interface CmsEntryResolverFactoryParams {
|
|
1581
|
+
model: CmsModel;
|
|
1401
1582
|
}
|
|
1402
1583
|
/**
|
|
1403
|
-
* A type for
|
|
1584
|
+
* A type for EntryResolvers. Used when creating get, list, update, publish, ...etc.
|
|
1404
1585
|
*
|
|
1405
1586
|
* @category GraphQL resolver
|
|
1406
|
-
* @category
|
|
1587
|
+
* @category CmsEntry
|
|
1407
1588
|
*/
|
|
1408
|
-
export declare type
|
|
1409
|
-
(params:
|
|
1589
|
+
export declare type CmsEntryResolverFactory<TSource = any, TArgs = any, TContext = CmsContext> = {
|
|
1590
|
+
(params: CmsEntryResolverFactoryParams): GraphQLFieldResolver<TSource, TArgs, TContext>;
|
|
1410
1591
|
};
|
|
1411
1592
|
/**
|
|
1412
1593
|
* Settings security permission.
|
|
@@ -1419,9 +1600,9 @@ export interface CmsSettingsPermission extends SecurityPermission {
|
|
|
1419
1600
|
* A security permission for content model.
|
|
1420
1601
|
*
|
|
1421
1602
|
* @category SecurityPermission
|
|
1422
|
-
* @category
|
|
1603
|
+
* @category CmsModel
|
|
1423
1604
|
*/
|
|
1424
|
-
export interface
|
|
1605
|
+
export interface CmsModelPermission extends SecurityPermission {
|
|
1425
1606
|
own: boolean;
|
|
1426
1607
|
rwd: string;
|
|
1427
1608
|
/**
|
|
@@ -1441,9 +1622,9 @@ export interface CmsContentModelPermission extends SecurityPermission {
|
|
|
1441
1622
|
* The security permission for content model groups.
|
|
1442
1623
|
*
|
|
1443
1624
|
* @category SecurityPermission
|
|
1444
|
-
* @category
|
|
1625
|
+
* @category CmsGroup
|
|
1445
1626
|
*/
|
|
1446
|
-
export interface
|
|
1627
|
+
export interface CmsGroupPermission extends SecurityPermission {
|
|
1447
1628
|
own: boolean;
|
|
1448
1629
|
rwd: string;
|
|
1449
1630
|
/**
|
|
@@ -1457,9 +1638,9 @@ export interface CmsContentModelGroupPermission extends SecurityPermission {
|
|
|
1457
1638
|
* The security permission for content entry.
|
|
1458
1639
|
*
|
|
1459
1640
|
* @category SecurityPermission
|
|
1460
|
-
* @category
|
|
1641
|
+
* @category CmsEntry
|
|
1461
1642
|
*/
|
|
1462
|
-
export interface
|
|
1643
|
+
export interface CmsEntryPermission extends SecurityPermission {
|
|
1463
1644
|
own: boolean;
|
|
1464
1645
|
rwd: string;
|
|
1465
1646
|
pw: string;
|
|
@@ -1476,1020 +1657,332 @@ export interface CmsContentEntryPermission extends SecurityPermission {
|
|
|
1476
1657
|
[key: string]: string[];
|
|
1477
1658
|
};
|
|
1478
1659
|
}
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
*
|
|
1484
|
-
* @category Plugin
|
|
1485
|
-
* @category ContentModelField
|
|
1486
|
-
* @category Storage
|
|
1487
|
-
*/
|
|
1488
|
-
export interface CmsModelFieldToStoragePluginToStorageArgs<T> {
|
|
1489
|
-
model: CmsContentModel;
|
|
1490
|
-
field: CmsContentModelField;
|
|
1491
|
-
value: T;
|
|
1492
|
-
getStoragePlugin(fieldType: string): CmsModelFieldToStoragePlugin<T>;
|
|
1493
|
-
context: CmsContext;
|
|
1660
|
+
export interface CmsGroupStorageOperationsGetParams {
|
|
1661
|
+
id: string;
|
|
1662
|
+
tenant: string;
|
|
1663
|
+
locale: string;
|
|
1494
1664
|
}
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
export interface
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1665
|
+
export interface CmsGroupStorageOperationsListWhereParams {
|
|
1666
|
+
tenant: string;
|
|
1667
|
+
locale: string;
|
|
1668
|
+
[key: string]: any;
|
|
1669
|
+
}
|
|
1670
|
+
export interface CmsGroupStorageOperationsListParams {
|
|
1671
|
+
where: CmsGroupStorageOperationsListWhereParams;
|
|
1672
|
+
sort?: string[];
|
|
1673
|
+
}
|
|
1674
|
+
export interface CmsGroupStorageOperationsCreateParams {
|
|
1675
|
+
input: CmsGroupCreateInput;
|
|
1676
|
+
group: CmsGroup;
|
|
1677
|
+
}
|
|
1678
|
+
export interface CmsGroupStorageOperationsUpdateParams {
|
|
1679
|
+
original: CmsGroup;
|
|
1680
|
+
group: CmsGroup;
|
|
1681
|
+
input: CmsGroupUpdateInput;
|
|
1682
|
+
}
|
|
1683
|
+
export interface CmsGroupStorageOperationsDeleteParams {
|
|
1684
|
+
group: CmsGroup;
|
|
1510
1685
|
}
|
|
1511
1686
|
/**
|
|
1512
|
-
*
|
|
1513
|
-
*
|
|
1514
|
-
*
|
|
1515
|
-
* @category ContentModelField
|
|
1516
|
-
* @category ContentEntry
|
|
1517
|
-
* @category Storage
|
|
1687
|
+
* Description of the CmsGroup CRUD operations.
|
|
1688
|
+
* If user wants to add another database to the application, this is how it is done.
|
|
1689
|
+
* This is just plain read, update, write, delete and list - no authentication or permission checks.
|
|
1518
1690
|
*/
|
|
1519
|
-
export interface
|
|
1691
|
+
export interface CmsGroupStorageOperations {
|
|
1520
1692
|
/**
|
|
1521
|
-
*
|
|
1693
|
+
* Gets content model group by given id.
|
|
1522
1694
|
*/
|
|
1523
|
-
|
|
1695
|
+
get: (params: CmsGroupStorageOperationsGetParams) => Promise<CmsGroup | null>;
|
|
1524
1696
|
/**
|
|
1525
|
-
*
|
|
1526
|
-
*
|
|
1527
|
-
* ```ts
|
|
1528
|
-
* fieldType: "myField"
|
|
1529
|
-
* ```
|
|
1697
|
+
* List all content model groups. Filterable via params.
|
|
1530
1698
|
*/
|
|
1531
|
-
|
|
1699
|
+
list: (params: CmsGroupStorageOperationsListParams) => Promise<CmsGroup[]>;
|
|
1532
1700
|
/**
|
|
1533
|
-
*
|
|
1534
|
-
*
|
|
1535
|
-
* ```ts
|
|
1536
|
-
* toStorage({ value }) {
|
|
1537
|
-
* return gzip(value);
|
|
1538
|
-
* }
|
|
1539
|
-
* ```
|
|
1701
|
+
* Create a new content model group.
|
|
1540
1702
|
*/
|
|
1541
|
-
|
|
1703
|
+
create: (params: CmsGroupStorageOperationsCreateParams) => Promise<CmsGroup>;
|
|
1542
1704
|
/**
|
|
1543
|
-
*
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
*
|
|
1548
|
-
* }
|
|
1549
|
-
* ```
|
|
1705
|
+
* Update existing content model group.
|
|
1706
|
+
*/
|
|
1707
|
+
update: (params: CmsGroupStorageOperationsUpdateParams) => Promise<CmsGroup>;
|
|
1708
|
+
/**
|
|
1709
|
+
* Delete the content model group.
|
|
1550
1710
|
*/
|
|
1551
|
-
|
|
1711
|
+
delete: (params: CmsGroupStorageOperationsDeleteParams) => Promise<CmsGroup>;
|
|
1552
1712
|
}
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
export interface CmsContentModelHookPluginArgs {
|
|
1558
|
-
model: CmsContentModel;
|
|
1559
|
-
context: CmsContext;
|
|
1560
|
-
storageOperations: CmsContentModelStorageOperations;
|
|
1713
|
+
export interface CmsModelStorageOperationsGetParams {
|
|
1714
|
+
tenant: string;
|
|
1715
|
+
locale: string;
|
|
1716
|
+
modelId: string;
|
|
1561
1717
|
}
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
export interface CmsContentModelCreateHookPluginArgs extends CmsContentModelHookPluginArgs {
|
|
1567
|
-
input: CmsContentModelCreateInput;
|
|
1718
|
+
export interface CmsModelStorageOperationsListWhereParams {
|
|
1719
|
+
tenant: string;
|
|
1720
|
+
locale: string;
|
|
1721
|
+
[key: string]: string;
|
|
1568
1722
|
}
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1723
|
+
export interface CmsModelStorageOperationsListParams {
|
|
1724
|
+
where: CmsModelStorageOperationsListWhereParams;
|
|
1725
|
+
}
|
|
1726
|
+
export interface CmsModelStorageOperationsCreateParams {
|
|
1727
|
+
input: CmsModelCreateInput;
|
|
1728
|
+
model: CmsModel;
|
|
1729
|
+
}
|
|
1730
|
+
export interface CmsModelStorageOperationsUpdateParams {
|
|
1731
|
+
original: CmsModel;
|
|
1732
|
+
model: CmsModel;
|
|
1733
|
+
input: CmsModelUpdateInput;
|
|
1734
|
+
}
|
|
1735
|
+
export interface CmsModelStorageOperationsDeleteParams {
|
|
1736
|
+
model: CmsModel;
|
|
1575
1737
|
}
|
|
1576
1738
|
/**
|
|
1577
|
-
*
|
|
1578
|
-
*
|
|
1579
|
-
*
|
|
1580
|
-
* @category ContentModel
|
|
1581
|
-
* @category LifecycleHook
|
|
1739
|
+
* Description of the CmsModel storage operations.
|
|
1740
|
+
* If user wants to add another database to the application, this is how it is done.
|
|
1741
|
+
* This is just plain read, update, write, delete and list - no authentication or permission checks.
|
|
1582
1742
|
*/
|
|
1583
|
-
export interface
|
|
1584
|
-
type: "cms-content-model-hook";
|
|
1743
|
+
export interface CmsModelStorageOperations {
|
|
1585
1744
|
/**
|
|
1586
|
-
*
|
|
1745
|
+
* Gets content model by given id.
|
|
1587
1746
|
*/
|
|
1588
|
-
|
|
1747
|
+
get: (params: CmsModelStorageOperationsGetParams) => Promise<CmsModel | null>;
|
|
1589
1748
|
/**
|
|
1590
|
-
*
|
|
1749
|
+
* List all content models. Filterable via params.
|
|
1591
1750
|
*/
|
|
1592
|
-
|
|
1751
|
+
list: (params: CmsModelStorageOperationsListParams) => Promise<CmsModel[]>;
|
|
1593
1752
|
/**
|
|
1594
|
-
*
|
|
1753
|
+
* Create a new content model.
|
|
1595
1754
|
*/
|
|
1596
|
-
|
|
1755
|
+
create: (params: CmsModelStorageOperationsCreateParams) => Promise<CmsModel>;
|
|
1597
1756
|
/**
|
|
1598
|
-
*
|
|
1757
|
+
* Update existing content model.
|
|
1599
1758
|
*/
|
|
1600
|
-
|
|
1759
|
+
update: (params: CmsModelStorageOperationsUpdateParams) => Promise<CmsModel>;
|
|
1601
1760
|
/**
|
|
1602
|
-
*
|
|
1761
|
+
* Delete the content model.
|
|
1603
1762
|
*/
|
|
1604
|
-
|
|
1763
|
+
delete: (params: CmsModelStorageOperationsDeleteParams) => Promise<CmsModel>;
|
|
1764
|
+
}
|
|
1765
|
+
export interface CmsEntryStorageOperationsGetParams {
|
|
1766
|
+
where: CmsEntryListWhere;
|
|
1767
|
+
sort?: CmsEntryListSort;
|
|
1768
|
+
limit?: number;
|
|
1769
|
+
}
|
|
1770
|
+
export interface CmsEntryStorageOperationsListParams {
|
|
1771
|
+
where: CmsEntryListWhere;
|
|
1772
|
+
sort?: CmsEntryListSort;
|
|
1773
|
+
limit?: number;
|
|
1774
|
+
after?: string;
|
|
1775
|
+
}
|
|
1776
|
+
export interface CmsEntryStorageOperationsCreateParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
1605
1777
|
/**
|
|
1606
|
-
*
|
|
1778
|
+
* Input received from the user.
|
|
1607
1779
|
*/
|
|
1608
|
-
|
|
1609
|
-
}
|
|
1610
|
-
/**
|
|
1611
|
-
* @category ContentEntry
|
|
1612
|
-
* @category LifecycleHook
|
|
1613
|
-
*/
|
|
1614
|
-
interface CmsContentEntryHookPluginArgs {
|
|
1615
|
-
context: CmsContext;
|
|
1780
|
+
input: Record<string, any>;
|
|
1616
1781
|
/**
|
|
1617
|
-
*
|
|
1782
|
+
* Real entry, with no transformations on it.
|
|
1618
1783
|
*/
|
|
1619
|
-
|
|
1784
|
+
entry: CmsEntry;
|
|
1620
1785
|
/**
|
|
1621
|
-
*
|
|
1786
|
+
* Entry prepared for the storage.
|
|
1622
1787
|
*/
|
|
1623
|
-
|
|
1788
|
+
storageEntry: T;
|
|
1624
1789
|
}
|
|
1625
|
-
|
|
1626
|
-
* @category ContentEntry
|
|
1627
|
-
* @category LifecycleHook
|
|
1628
|
-
*/
|
|
1629
|
-
export interface CmsContentEntryBeforeCreateHookArgs extends CmsContentEntryHookPluginArgs {
|
|
1790
|
+
export interface CmsEntryStorageOperationsCreateRevisionFromParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
1630
1791
|
/**
|
|
1631
|
-
*
|
|
1792
|
+
* The entry we are creating new one from.
|
|
1632
1793
|
*/
|
|
1633
|
-
|
|
1794
|
+
originalEntry: CmsEntry;
|
|
1634
1795
|
/**
|
|
1635
|
-
*
|
|
1796
|
+
* The entry we are creating new one from, directly from storage, with transformations on it.
|
|
1636
1797
|
*/
|
|
1637
|
-
|
|
1638
|
-
}
|
|
1639
|
-
/**
|
|
1640
|
-
* @category ContentEntry
|
|
1641
|
-
* @category LifecycleHook
|
|
1642
|
-
*/
|
|
1643
|
-
export interface CmsContentEntryAfterCreateHookArgs extends CmsContentEntryHookPluginArgs {
|
|
1798
|
+
originalStorageEntry: T;
|
|
1644
1799
|
/**
|
|
1645
|
-
*
|
|
1800
|
+
* Latest entry, used to calculate the new version.
|
|
1646
1801
|
*/
|
|
1647
|
-
|
|
1802
|
+
latestEntry: CmsEntry;
|
|
1648
1803
|
/**
|
|
1649
|
-
*
|
|
1804
|
+
* Latest entry, used to calculate the new version, directly from storage, with transformations.
|
|
1650
1805
|
*/
|
|
1651
|
-
|
|
1806
|
+
latestStorageEntry: T;
|
|
1652
1807
|
/**
|
|
1653
|
-
*
|
|
1808
|
+
* Real entry, with no transformations on it.
|
|
1654
1809
|
*/
|
|
1655
|
-
|
|
1656
|
-
}
|
|
1657
|
-
/**
|
|
1658
|
-
* @category ContentEntry
|
|
1659
|
-
* @category LifecycleHook
|
|
1660
|
-
*/
|
|
1661
|
-
export interface CmsContentEntryBeforeCreateFromRevisionHookArgs extends CmsContentEntryHookPluginArgs {
|
|
1810
|
+
entry: CmsEntry;
|
|
1662
1811
|
/**
|
|
1663
|
-
* Entry
|
|
1812
|
+
* Entry prepared for the storage.
|
|
1664
1813
|
*/
|
|
1665
|
-
|
|
1814
|
+
storageEntry: T;
|
|
1815
|
+
}
|
|
1816
|
+
export interface CmsEntryStorageOperationsUpdateParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
1666
1817
|
/**
|
|
1667
|
-
*
|
|
1818
|
+
* Input received from the user.
|
|
1668
1819
|
*/
|
|
1669
|
-
|
|
1820
|
+
input: Record<string, any>;
|
|
1670
1821
|
/**
|
|
1671
|
-
*
|
|
1822
|
+
* Used to compare IDs, versions and passed into storage operations to be used if required.
|
|
1672
1823
|
*/
|
|
1673
|
-
originalEntry:
|
|
1824
|
+
originalEntry: CmsEntry;
|
|
1674
1825
|
/**
|
|
1675
|
-
*
|
|
1826
|
+
* Directly from storage, with transformations on it.
|
|
1676
1827
|
*/
|
|
1677
|
-
originalStorageEntry:
|
|
1828
|
+
originalStorageEntry: T;
|
|
1678
1829
|
/**
|
|
1679
|
-
*
|
|
1830
|
+
* Real entry, with no transformations on it.
|
|
1680
1831
|
*/
|
|
1681
|
-
|
|
1832
|
+
entry: CmsEntry;
|
|
1682
1833
|
/**
|
|
1683
|
-
*
|
|
1834
|
+
* Entry prepared for the storage.
|
|
1684
1835
|
*/
|
|
1685
|
-
|
|
1836
|
+
storageEntry: T;
|
|
1686
1837
|
}
|
|
1687
|
-
|
|
1688
|
-
* @category ContentEntry
|
|
1689
|
-
* @category LifecycleHook
|
|
1690
|
-
*/
|
|
1691
|
-
export interface CmsContentEntryAfterCreateFromRevisionHookArgs extends CmsContentEntryHookPluginArgs {
|
|
1838
|
+
export interface CmsEntryStorageOperationsDeleteRevisionParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
1692
1839
|
/**
|
|
1693
|
-
* Entry
|
|
1840
|
+
* Entry that was deleted.
|
|
1694
1841
|
*/
|
|
1695
|
-
|
|
1842
|
+
entryToDelete: CmsEntry;
|
|
1696
1843
|
/**
|
|
1697
|
-
* Entry
|
|
1844
|
+
* Entry that was deleted, directly from storage, with transformations.
|
|
1698
1845
|
*/
|
|
1699
|
-
|
|
1846
|
+
storageEntryToDelete: T;
|
|
1700
1847
|
/**
|
|
1701
|
-
*
|
|
1848
|
+
* Entry that was set as latest.
|
|
1702
1849
|
*/
|
|
1703
|
-
|
|
1850
|
+
entryToSetAsLatest?: CmsEntry;
|
|
1704
1851
|
/**
|
|
1705
|
-
*
|
|
1852
|
+
* Entry that was set as latest, directly from storage, with transformations.
|
|
1706
1853
|
*/
|
|
1707
|
-
|
|
1854
|
+
storageEntryToSetAsLatest?: T;
|
|
1855
|
+
}
|
|
1856
|
+
export interface CmsEntryStorageOperationsDeleteParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
1708
1857
|
/**
|
|
1709
|
-
*
|
|
1858
|
+
* Entry that is going to be deleted.
|
|
1710
1859
|
*/
|
|
1711
|
-
|
|
1860
|
+
entry: CmsEntry;
|
|
1712
1861
|
/**
|
|
1713
|
-
*
|
|
1862
|
+
* Entry that is going to be deleted, directly from storage.
|
|
1714
1863
|
*/
|
|
1715
|
-
|
|
1864
|
+
storageEntry: T;
|
|
1716
1865
|
}
|
|
1717
|
-
|
|
1718
|
-
* @category ContentEntry
|
|
1719
|
-
* @category LifecycleHook
|
|
1720
|
-
*/
|
|
1721
|
-
export interface CmsContentEntryBeforeUpdateHookArgs extends CmsContentEntryHookPluginArgs {
|
|
1866
|
+
export interface CmsEntryStorageOperationsPublishParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
1722
1867
|
/**
|
|
1723
|
-
*
|
|
1868
|
+
* The entry record before it was published.
|
|
1724
1869
|
*/
|
|
1725
|
-
|
|
1870
|
+
originalEntry: CmsEntry;
|
|
1726
1871
|
/**
|
|
1727
|
-
*
|
|
1872
|
+
* Directly from storage, with transformations on it.
|
|
1728
1873
|
*/
|
|
1729
|
-
|
|
1874
|
+
originalStorageEntry: T;
|
|
1730
1875
|
/**
|
|
1731
|
-
*
|
|
1876
|
+
* The modified entry that is going to be saved as published.
|
|
1877
|
+
* Entry is in its original form.
|
|
1732
1878
|
*/
|
|
1733
|
-
|
|
1879
|
+
entry: CmsEntry;
|
|
1734
1880
|
/**
|
|
1735
|
-
*
|
|
1881
|
+
* The modified entry and prepared for the storage.
|
|
1736
1882
|
*/
|
|
1737
|
-
|
|
1883
|
+
storageEntry: T;
|
|
1738
1884
|
}
|
|
1739
|
-
|
|
1740
|
-
* @category ContentEntry
|
|
1741
|
-
* @category LifecycleHook
|
|
1742
|
-
*/
|
|
1743
|
-
export interface CmsContentEntryAfterUpdateHookArgs extends CmsContentEntryHookPluginArgs {
|
|
1744
|
-
/**
|
|
1745
|
-
* User input.
|
|
1746
|
-
*/
|
|
1747
|
-
input: Record<string, any>;
|
|
1885
|
+
export interface CmsEntryStorageOperationsUnpublishParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
1748
1886
|
/**
|
|
1749
|
-
*
|
|
1887
|
+
* The entry record before it was unpublished.
|
|
1750
1888
|
*/
|
|
1751
|
-
originalEntry:
|
|
1889
|
+
originalEntry: CmsEntry;
|
|
1752
1890
|
/**
|
|
1753
|
-
*
|
|
1891
|
+
* The entry record before it was unpublished, with transformations on it.
|
|
1754
1892
|
*/
|
|
1755
|
-
originalStorageEntry:
|
|
1893
|
+
originalStorageEntry: T;
|
|
1756
1894
|
/**
|
|
1757
|
-
*
|
|
1895
|
+
* The modified entry that is going to be saved as unpublished.
|
|
1758
1896
|
*/
|
|
1759
|
-
entry:
|
|
1897
|
+
entry: CmsEntry;
|
|
1760
1898
|
/**
|
|
1761
|
-
*
|
|
1899
|
+
* The modified entry that is going to be saved as unpublished, with transformations on it.
|
|
1762
1900
|
*/
|
|
1763
|
-
storageEntry:
|
|
1901
|
+
storageEntry: T;
|
|
1764
1902
|
}
|
|
1765
|
-
|
|
1766
|
-
* @category ContentEntry
|
|
1767
|
-
* @category LifecycleHook
|
|
1768
|
-
*/
|
|
1769
|
-
export interface CmsContentEntryBeforeDeleteRevisionHookArgs extends CmsContentEntryHookPluginArgs {
|
|
1903
|
+
export interface CmsEntryStorageOperationsRequestChangesParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
1770
1904
|
/**
|
|
1771
|
-
* Entry
|
|
1772
|
-
*/
|
|
1773
|
-
entryToDelete: CmsContentEntry;
|
|
1774
|
-
/**
|
|
1775
|
-
* Entry that is going to be deleted, directly from storage, with transformations.
|
|
1776
|
-
*/
|
|
1777
|
-
storageEntryToDelete: CmsStorageContentEntry;
|
|
1778
|
-
/**
|
|
1779
|
-
* Entry that is to be set as latest.
|
|
1780
|
-
*/
|
|
1781
|
-
entryToSetAsLatest?: CmsContentEntry;
|
|
1782
|
-
/**
|
|
1783
|
-
* Entry that is to be set as latest, directly from storage, with transformations.
|
|
1784
|
-
*/
|
|
1785
|
-
storageEntryToSetAsLatest?: CmsStorageContentEntry;
|
|
1786
|
-
}
|
|
1787
|
-
/**
|
|
1788
|
-
* @category ContentEntry
|
|
1789
|
-
* @category LifecycleHook
|
|
1790
|
-
*/
|
|
1791
|
-
export interface CmsContentEntryAfterDeleteRevisionHookArgs extends CmsContentEntryHookPluginArgs {
|
|
1792
|
-
/**
|
|
1793
|
-
* Entry that was deleted.
|
|
1794
|
-
*/
|
|
1795
|
-
entryToDelete: CmsContentEntry;
|
|
1796
|
-
/**
|
|
1797
|
-
* Entry that was deleted, directly from storage, with transformations.
|
|
1798
|
-
*/
|
|
1799
|
-
storageEntryToDelete: CmsStorageContentEntry;
|
|
1800
|
-
/**
|
|
1801
|
-
* Entry that was set as latest.
|
|
1802
|
-
*/
|
|
1803
|
-
entryToSetAsLatest?: CmsContentEntry;
|
|
1804
|
-
/**
|
|
1805
|
-
* Entry that was set as latest, directly from storage, with transformations.
|
|
1806
|
-
*/
|
|
1807
|
-
storageEntryToSetAsLatest?: CmsStorageContentEntry;
|
|
1808
|
-
}
|
|
1809
|
-
/**
|
|
1810
|
-
* @category ContentEntry
|
|
1811
|
-
* @category LifecycleHook
|
|
1812
|
-
*/
|
|
1813
|
-
export interface CmsContentEntryBeforeDeleteHookArgs extends CmsContentEntryHookPluginArgs {
|
|
1814
|
-
/**
|
|
1815
|
-
* Entry that is going to be deleted.
|
|
1816
|
-
*/
|
|
1817
|
-
entry: CmsContentEntry;
|
|
1818
|
-
/**
|
|
1819
|
-
* Entry that is going to be deleted, directly from storage, with transformations.
|
|
1820
|
-
*/
|
|
1821
|
-
storageEntry: CmsStorageContentEntry;
|
|
1822
|
-
}
|
|
1823
|
-
/**
|
|
1824
|
-
* @category ContentEntry
|
|
1825
|
-
* @category LifecycleHook
|
|
1826
|
-
*/
|
|
1827
|
-
export interface CmsContentEntryAfterDeleteHookArgs extends CmsContentEntryHookPluginArgs {
|
|
1828
|
-
/**
|
|
1829
|
-
* Entry that was deleted.
|
|
1830
|
-
*/
|
|
1831
|
-
entry: CmsContentEntry;
|
|
1832
|
-
/**
|
|
1833
|
-
* Entry that was deleted, directly from storage, with transformations.
|
|
1834
|
-
*/
|
|
1835
|
-
storageEntry: CmsStorageContentEntry;
|
|
1836
|
-
}
|
|
1837
|
-
/**
|
|
1838
|
-
* @category ContentEntry
|
|
1839
|
-
* @category LifecycleHook
|
|
1840
|
-
*/
|
|
1841
|
-
export interface CmsContentEntryBeforePublishHookArgs extends CmsContentEntryHookPluginArgs {
|
|
1842
|
-
/**
|
|
1843
|
-
* Entry to be set as published.
|
|
1844
|
-
*/
|
|
1845
|
-
entry: CmsContentEntry;
|
|
1846
|
-
/**
|
|
1847
|
-
* Entry before the changes that made it published.
|
|
1848
|
-
*/
|
|
1849
|
-
originalEntry: CmsContentEntry;
|
|
1850
|
-
/**
|
|
1851
|
-
* Entry before the changes that made it published, directly from storage, with transforms.
|
|
1852
|
-
*/
|
|
1853
|
-
originalStorageEntry: CmsContentEntry;
|
|
1854
|
-
}
|
|
1855
|
-
/**
|
|
1856
|
-
* @category ContentEntry
|
|
1857
|
-
* @category LifecycleHook
|
|
1858
|
-
*/
|
|
1859
|
-
export interface CmsContentEntryAfterPublishHookArgs extends CmsContentEntryHookPluginArgs {
|
|
1860
|
-
/**
|
|
1861
|
-
* Entry to be set as published.
|
|
1862
|
-
*/
|
|
1863
|
-
entry: CmsContentEntry;
|
|
1864
|
-
/**
|
|
1865
|
-
* Entry to be set as published, after the storage transformations.
|
|
1866
|
-
*/
|
|
1867
|
-
storageEntry: CmsStorageContentEntry;
|
|
1868
|
-
/**
|
|
1869
|
-
* Entry before the changes that made it published.
|
|
1870
|
-
*/
|
|
1871
|
-
originalEntry: CmsContentEntry;
|
|
1872
|
-
/**
|
|
1873
|
-
* Entry before the changes that made it published, directly from storage, with transforms.
|
|
1874
|
-
*/
|
|
1875
|
-
originalStorageEntry: CmsContentEntry;
|
|
1876
|
-
}
|
|
1877
|
-
/**
|
|
1878
|
-
* @category ContentEntry
|
|
1879
|
-
* @category LifecycleHook
|
|
1880
|
-
*/
|
|
1881
|
-
export interface CmsContentEntryBeforeUnpublishHookArgs extends CmsContentEntryHookPluginArgs {
|
|
1882
|
-
/**
|
|
1883
|
-
* Entry to be set as unpublished.
|
|
1884
|
-
*/
|
|
1885
|
-
entry: CmsContentEntry;
|
|
1886
|
-
/**
|
|
1887
|
-
* Entry before the modification to set it unpublished.
|
|
1888
|
-
*/
|
|
1889
|
-
originalEntry: CmsContentEntry;
|
|
1890
|
-
/**
|
|
1891
|
-
* Entry before the modification to set it unpublished, directly from storage, with transformations on it.
|
|
1892
|
-
*/
|
|
1893
|
-
originalStorageEntry: CmsStorageContentEntry;
|
|
1894
|
-
}
|
|
1895
|
-
/**
|
|
1896
|
-
* @category ContentEntry
|
|
1897
|
-
* @category LifecycleHook
|
|
1898
|
-
*/
|
|
1899
|
-
export interface CmsContentEntryAfterUnpublishHookArgs extends CmsContentEntryHookPluginArgs {
|
|
1900
|
-
/**
|
|
1901
|
-
* Entry that was set as unpublished.
|
|
1902
|
-
*/
|
|
1903
|
-
entry: CmsContentEntry;
|
|
1904
|
-
/**
|
|
1905
|
-
* Entry that was set as unpublished, with transformations on it.
|
|
1906
|
-
*/
|
|
1907
|
-
storageEntry: CmsContentEntry;
|
|
1908
|
-
/**
|
|
1909
|
-
* Entry before the modification to set it unpublished.
|
|
1910
|
-
*/
|
|
1911
|
-
originalEntry: CmsContentEntry;
|
|
1912
|
-
/**
|
|
1913
|
-
* Entry before the modification to set it unpublished, directly from storage, with transformations on it.
|
|
1914
|
-
*/
|
|
1915
|
-
originalStorageEntry: CmsStorageContentEntry;
|
|
1916
|
-
}
|
|
1917
|
-
/**
|
|
1918
|
-
* @category ContentEntry
|
|
1919
|
-
* @category LifecycleHook
|
|
1920
|
-
*/
|
|
1921
|
-
export interface CmsContentEntryBeforeRequestChangesHookArgs extends CmsContentEntryHookPluginArgs {
|
|
1922
|
-
/**
|
|
1923
|
-
* Original entry to be updated, no transformations on it.
|
|
1924
|
-
*/
|
|
1925
|
-
originalEntry: CmsContentEntry;
|
|
1926
|
-
/**
|
|
1927
|
-
* Original entry to be updated, directly from storage, with the transformations.
|
|
1928
|
-
*/
|
|
1929
|
-
originalStorageEntry: CmsContentEntry;
|
|
1930
|
-
/**
|
|
1931
|
-
* Entry to be updated as requested changes on it.
|
|
1932
|
-
*/
|
|
1933
|
-
entry: CmsContentEntry;
|
|
1934
|
-
}
|
|
1935
|
-
/**
|
|
1936
|
-
* @category ContentEntry
|
|
1937
|
-
* @category LifecycleHook
|
|
1938
|
-
*/
|
|
1939
|
-
export interface CmsContentEntryAfterRequestChangesHookArgs extends CmsContentEntryHookPluginArgs {
|
|
1940
|
-
/**
|
|
1941
|
-
* Original entry to be updated, no transformations on it.
|
|
1942
|
-
*/
|
|
1943
|
-
originalEntry: CmsContentEntry;
|
|
1944
|
-
/**
|
|
1945
|
-
* Original entry to be updated, directly from storage, with the transformations.
|
|
1946
|
-
*/
|
|
1947
|
-
originalStorageEntry: CmsContentEntry;
|
|
1948
|
-
/**
|
|
1949
|
-
* Entry to be updated as requested changes on it.
|
|
1905
|
+
* Entry data updated with the required properties.
|
|
1950
1906
|
*/
|
|
1951
|
-
entry:
|
|
1907
|
+
entry: CmsEntry;
|
|
1952
1908
|
/**
|
|
1953
|
-
*
|
|
1909
|
+
* Entry that is prepared for the storageOperations, with the transformations.
|
|
1954
1910
|
*/
|
|
1955
|
-
storageEntry:
|
|
1956
|
-
}
|
|
1957
|
-
/**
|
|
1958
|
-
* @category ContentEntry
|
|
1959
|
-
* @category LifecycleHook
|
|
1960
|
-
*/
|
|
1961
|
-
export interface CmsContentEntryBeforeRequestReviewHookArgs extends CmsContentEntryHookPluginArgs {
|
|
1911
|
+
storageEntry: T;
|
|
1962
1912
|
/**
|
|
1963
|
-
* Original entry
|
|
1913
|
+
* Original entry from the storage.
|
|
1964
1914
|
*/
|
|
1965
|
-
originalEntry:
|
|
1915
|
+
originalEntry: CmsEntry;
|
|
1966
1916
|
/**
|
|
1967
1917
|
* Original entry to be updated, directly from storage, with the transformations.
|
|
1968
1918
|
*/
|
|
1969
|
-
originalStorageEntry:
|
|
1970
|
-
/**
|
|
1971
|
-
* Entry to be updated as requested review on it.
|
|
1972
|
-
*/
|
|
1973
|
-
entry: CmsContentEntry;
|
|
1919
|
+
originalStorageEntry: T;
|
|
1974
1920
|
}
|
|
1975
|
-
|
|
1976
|
-
* @category ContentEntry
|
|
1977
|
-
* @category LifecycleHook
|
|
1978
|
-
*/
|
|
1979
|
-
export interface CmsContentEntryAfterRequestReviewHookArgs extends CmsContentEntryHookPluginArgs {
|
|
1921
|
+
export interface CmsEntryStorageOperationsRequestReviewParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
1980
1922
|
/**
|
|
1981
|
-
* Entry
|
|
1923
|
+
* Entry that is prepared for the storageOperations.
|
|
1982
1924
|
*/
|
|
1983
|
-
entry:
|
|
1925
|
+
entry: CmsEntry;
|
|
1984
1926
|
/**
|
|
1985
1927
|
* Entry that is prepared for the storageOperations, with the transformations.
|
|
1986
1928
|
*/
|
|
1987
|
-
storageEntry:
|
|
1929
|
+
storageEntry: T;
|
|
1988
1930
|
/**
|
|
1989
1931
|
* Original entry from the storage.
|
|
1990
1932
|
*/
|
|
1991
|
-
originalEntry:
|
|
1933
|
+
originalEntry: CmsEntry;
|
|
1992
1934
|
/**
|
|
1993
1935
|
* Original entry to be updated, directly from storage, with the transformations.
|
|
1994
1936
|
*/
|
|
1995
|
-
originalStorageEntry:
|
|
1937
|
+
originalStorageEntry: T;
|
|
1996
1938
|
}
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
* @category ContentEntry
|
|
2002
|
-
* @category LifecycleHook
|
|
2003
|
-
*/
|
|
2004
|
-
export interface CmsContentEntryHookPlugin extends Plugin {
|
|
2005
|
-
type: "cms-content-entry-hook";
|
|
2006
|
-
/**
|
|
2007
|
-
* A hook triggered before entry is stored.
|
|
2008
|
-
* At this point, entry for storage is already built so you cannot modify them.
|
|
2009
|
-
*/
|
|
2010
|
-
beforeCreate?: (args: CmsContentEntryBeforeCreateHookArgs) => void;
|
|
2011
|
-
/**
|
|
2012
|
-
* A hook triggered after entry is stored.
|
|
2013
|
-
*/
|
|
2014
|
-
afterCreate?: (CmsContentEntryAfterCreateHookArgs: any) => void;
|
|
2015
|
-
/**
|
|
2016
|
-
* @see CmsContentEntryHookPlugin.beforeCreate
|
|
2017
|
-
*/
|
|
2018
|
-
beforeCreateRevisionFrom?: (args: CmsContentEntryBeforeCreateFromRevisionHookArgs) => void;
|
|
2019
|
-
/**
|
|
2020
|
-
* @see CmsContentEntryHookPlugin.afterCreate
|
|
2021
|
-
*/
|
|
2022
|
-
afterCreateRevisionFrom?: (args: CmsContentEntryAfterCreateFromRevisionHookArgs) => void;
|
|
2023
|
-
/**
|
|
2024
|
-
* A hook triggered before entry is updated in the database.
|
|
2025
|
-
* It can be modified but we do not recommend it.
|
|
2026
|
-
*/
|
|
2027
|
-
beforeUpdate?: (args: CmsContentEntryBeforeUpdateHookArgs) => void;
|
|
2028
|
-
/**
|
|
2029
|
-
* A hook triggered after entry is updated.
|
|
2030
|
-
*/
|
|
2031
|
-
afterUpdate?: (args: CmsContentEntryAfterUpdateHookArgs) => void;
|
|
2032
|
-
/**
|
|
2033
|
-
* A hook triggered before deleting a certain revision (id#revision).
|
|
2034
|
-
*/
|
|
2035
|
-
beforeDeleteRevision?: (args: CmsContentEntryBeforeDeleteRevisionHookArgs) => void;
|
|
2036
|
-
/**
|
|
2037
|
-
* A hook triggered after deleting certain revision.
|
|
2038
|
-
* In a case that deleted revision is only one, deleteEntry is called just to make sure that nothing is left in storage.
|
|
2039
|
-
*/
|
|
2040
|
-
afterDeleteRevision?: (args: CmsContentEntryAfterDeleteRevisionHookArgs) => void;
|
|
2041
|
-
/**
|
|
2042
|
-
* A hook triggered before deleting an entry with all its revisions.
|
|
2043
|
-
*/
|
|
2044
|
-
beforeDelete?: (args: CmsContentEntryBeforeDeleteHookArgs) => void;
|
|
2045
|
-
/**
|
|
2046
|
-
* A hook triggered after deleting an entry.
|
|
2047
|
-
*/
|
|
2048
|
-
afterDelete?: (args: CmsContentEntryBeforeDeleteHookArgs) => void;
|
|
2049
|
-
/**
|
|
2050
|
-
* A hook triggered before publishing of an entry.
|
|
2051
|
-
*/
|
|
2052
|
-
beforePublish?: (args: CmsContentEntryBeforePublishHookArgs) => void;
|
|
2053
|
-
/**
|
|
2054
|
-
* A hook triggered after publishing of an entry.
|
|
2055
|
-
*/
|
|
2056
|
-
afterPublish?: (args: CmsContentEntryAfterPublishHookArgs) => void;
|
|
2057
|
-
/**
|
|
2058
|
-
* A hook triggered before unpublishing of an entry.
|
|
2059
|
-
*/
|
|
2060
|
-
beforeUnpublish?: (args: CmsContentEntryBeforeUnpublishHookArgs) => void;
|
|
2061
|
-
/**
|
|
2062
|
-
* A hook triggered after unpublishing of an entry.
|
|
2063
|
-
*/
|
|
2064
|
-
afterUnpublish?: (args: CmsContentEntryAfterUnpublishHookArgs) => void;
|
|
2065
|
-
/**
|
|
2066
|
-
* A hook triggered before requesting changes of an entry.
|
|
2067
|
-
*/
|
|
2068
|
-
beforeRequestChanges?: (args: CmsContentEntryBeforeRequestChangesHookArgs) => void;
|
|
2069
|
-
/**
|
|
2070
|
-
* A hook triggered after requesting changes of an entry.
|
|
2071
|
-
*/
|
|
2072
|
-
afterRequestChanges?: (args: CmsContentEntryAfterRequestChangesHookArgs) => void;
|
|
2073
|
-
/**
|
|
2074
|
-
* A hook triggered before requesting review of an entry.
|
|
2075
|
-
*/
|
|
2076
|
-
beforeRequestReview?: (args: CmsContentEntryBeforeRequestReviewHookArgs) => void;
|
|
2077
|
-
/**
|
|
2078
|
-
* A hook triggered after requesting review of an entry.
|
|
2079
|
-
*/
|
|
2080
|
-
afterRequestReview?: (args: CmsContentEntryAfterRequestReviewHookArgs) => void;
|
|
1939
|
+
export interface CmsEntryStorageOperationsGetAllRevisionsParams {
|
|
1940
|
+
ids: readonly string[];
|
|
1941
|
+
tenant: string;
|
|
1942
|
+
locale: string;
|
|
2081
1943
|
}
|
|
2082
|
-
interface
|
|
2083
|
-
|
|
1944
|
+
export interface CmsEntryStorageOperationsGetByIdsParams {
|
|
1945
|
+
ids: readonly string[];
|
|
1946
|
+
tenant: string;
|
|
1947
|
+
locale: string;
|
|
2084
1948
|
}
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
context: CmsContext;
|
|
1949
|
+
export interface CmsEntryStorageOperationsGetLatestByIdsParams {
|
|
1950
|
+
ids: readonly string[];
|
|
1951
|
+
tenant: string;
|
|
1952
|
+
locale: string;
|
|
2090
1953
|
}
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
/**
|
|
2096
|
-
* A plugin type.
|
|
2097
|
-
*/
|
|
2098
|
-
type: "cms-content-model-group-storage-operations-provider";
|
|
1954
|
+
export interface CmsEntryStorageOperationsGetPublishedByIdsParams {
|
|
1955
|
+
ids: readonly string[];
|
|
1956
|
+
tenant: string;
|
|
1957
|
+
locale: string;
|
|
2099
1958
|
}
|
|
2100
|
-
export interface
|
|
1959
|
+
export interface CmsEntryStorageOperationsGetRevisionsParams {
|
|
2101
1960
|
id: string;
|
|
1961
|
+
tenant: string;
|
|
1962
|
+
locale: string;
|
|
2102
1963
|
}
|
|
2103
|
-
export interface
|
|
2104
|
-
where?: T;
|
|
2105
|
-
limit?: number;
|
|
2106
|
-
}
|
|
2107
|
-
export interface CmsContentModelGroupStorageOperationsBeforeCreateArgs {
|
|
2108
|
-
input: CmsContentModelGroupCreateInput;
|
|
2109
|
-
data: CmsContentModelGroup;
|
|
2110
|
-
}
|
|
2111
|
-
export interface CmsContentModelGroupStorageOperationsCreateArgs {
|
|
2112
|
-
input: CmsContentModelGroupCreateInput;
|
|
2113
|
-
data: CmsContentModelGroup;
|
|
2114
|
-
}
|
|
2115
|
-
export interface CmsContentModelGroupStorageOperationsAfterCreateArgs {
|
|
2116
|
-
input: CmsContentModelGroupCreateInput;
|
|
2117
|
-
group: CmsContentModelGroup;
|
|
2118
|
-
}
|
|
2119
|
-
export interface CmsContentModelGroupStorageOperationsBeforeUpdateArgs {
|
|
2120
|
-
group: CmsContentModelGroup;
|
|
2121
|
-
data: Partial<CmsContentModelGroup>;
|
|
2122
|
-
input: CmsContentModelGroupUpdateInput;
|
|
2123
|
-
}
|
|
2124
|
-
export interface CmsContentModelGroupStorageOperationsUpdateArgs {
|
|
2125
|
-
group: CmsContentModelGroup;
|
|
2126
|
-
data: Partial<CmsContentModelGroup>;
|
|
2127
|
-
input: CmsContentModelGroupUpdateInput;
|
|
2128
|
-
}
|
|
2129
|
-
export interface CmsContentModelGroupStorageOperationsAfterUpdateArgs {
|
|
2130
|
-
group: CmsContentModelGroup;
|
|
2131
|
-
data: Partial<CmsContentModelGroup>;
|
|
2132
|
-
input: CmsContentModelGroupUpdateInput;
|
|
2133
|
-
}
|
|
2134
|
-
export interface CmsContentModelGroupStorageOperationsBeforeDeleteArgs {
|
|
2135
|
-
group: CmsContentModelGroup;
|
|
2136
|
-
}
|
|
2137
|
-
export interface CmsContentModelGroupStorageOperationsDeleteArgs {
|
|
2138
|
-
group: CmsContentModelGroup;
|
|
2139
|
-
}
|
|
2140
|
-
export interface CmsContentModelGroupStorageOperationsAfterDeleteArgs {
|
|
2141
|
-
group: CmsContentModelGroup;
|
|
2142
|
-
}
|
|
2143
|
-
/**
|
|
2144
|
-
* Description of the ContentModelGroup CRUD operations.
|
|
2145
|
-
* If user wants to add another database to the application, this is how it is done.
|
|
2146
|
-
* This is just plain read, update, write, delete and list - no authentication or permission checks.
|
|
2147
|
-
*/
|
|
2148
|
-
export interface CmsContentModelGroupStorageOperations {
|
|
2149
|
-
/**
|
|
2150
|
-
* Gets content model group by given id.
|
|
2151
|
-
*/
|
|
2152
|
-
get: (args: CmsContentModelGroupStorageOperationsGetArgs) => Promise<CmsContentModelGroup | null>;
|
|
2153
|
-
/**
|
|
2154
|
-
* List all content model groups. Filterable via params.
|
|
2155
|
-
*/
|
|
2156
|
-
list: (args?: CmsContentModelGroupStorageOperationsListArgs) => Promise<CmsContentModelGroup[]>;
|
|
2157
|
-
/**
|
|
2158
|
-
* A hook to be run before the create method.
|
|
2159
|
-
*/
|
|
2160
|
-
beforeCreate?: (args: CmsContentModelGroupStorageOperationsBeforeCreateArgs) => Promise<void>;
|
|
2161
|
-
/**
|
|
2162
|
-
* Create a new content model group.
|
|
2163
|
-
*/
|
|
2164
|
-
create: (args: CmsContentModelGroupStorageOperationsCreateArgs) => Promise<CmsContentModelGroup>;
|
|
2165
|
-
/**
|
|
2166
|
-
* A hook to be run after the create method.
|
|
2167
|
-
*/
|
|
2168
|
-
afterCreate?: (args: CmsContentModelGroupStorageOperationsAfterCreateArgs) => Promise<void>;
|
|
2169
|
-
/**
|
|
2170
|
-
* A hook to be run before the update method.
|
|
2171
|
-
*/
|
|
2172
|
-
beforeUpdate?: (args: CmsContentModelGroupStorageOperationsBeforeUpdateArgs) => Promise<void>;
|
|
2173
|
-
/**
|
|
2174
|
-
* Update existing content model group.
|
|
2175
|
-
*/
|
|
2176
|
-
update: (args: CmsContentModelGroupStorageOperationsUpdateArgs) => Promise<CmsContentModelGroup>;
|
|
2177
|
-
/**
|
|
2178
|
-
* A hook to be run after the update method.
|
|
2179
|
-
*/
|
|
2180
|
-
afterUpdate?: (args: CmsContentModelGroupStorageOperationsAfterUpdateArgs) => Promise<void>;
|
|
2181
|
-
/**
|
|
2182
|
-
* A hook to be run before the delete method.
|
|
2183
|
-
*/
|
|
2184
|
-
beforeDelete?: (args: CmsContentModelGroupStorageOperationsBeforeDeleteArgs) => Promise<void>;
|
|
2185
|
-
/**
|
|
2186
|
-
* Delete the content model group.
|
|
2187
|
-
*/
|
|
2188
|
-
delete: (args: CmsContentModelGroupStorageOperationsDeleteArgs) => Promise<boolean>;
|
|
2189
|
-
/**
|
|
2190
|
-
* A hook to be run after the delete method.
|
|
2191
|
-
*/
|
|
2192
|
-
afterDelete?: (args: CmsContentModelGroupStorageOperationsAfterDeleteArgs) => Promise<void>;
|
|
2193
|
-
}
|
|
2194
|
-
/**
|
|
2195
|
-
* Arguments for the model storage operations provider method.
|
|
2196
|
-
*/
|
|
2197
|
-
interface CmsContentModelStorageOperationsProviderArgs {
|
|
2198
|
-
context: CmsContext;
|
|
2199
|
-
}
|
|
2200
|
-
/**
|
|
2201
|
-
* A plugin that provides the model storage operations implementation.
|
|
2202
|
-
*/
|
|
2203
|
-
export interface CmsContentModelStorageOperationsProvider extends CmsStorageOperationsProvider<CmsContentModelStorageOperationsProviderArgs, CmsContentModelStorageOperations> {
|
|
2204
|
-
/**
|
|
2205
|
-
* A plugin type.
|
|
2206
|
-
*/
|
|
2207
|
-
type: "cms-content-model-storage-operations-provider";
|
|
2208
|
-
}
|
|
2209
|
-
export interface CmsContentModelStorageOperationsGetArgs {
|
|
1964
|
+
export interface CmsEntryStorageOperationsGetRevisionParams {
|
|
2210
1965
|
id: string;
|
|
1966
|
+
tenant: string;
|
|
1967
|
+
locale: string;
|
|
2211
1968
|
}
|
|
2212
|
-
export interface
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
export interface CmsContentModelStorageOperationsBeforeCreateArgs {
|
|
2217
|
-
input: CmsContentModelCreateInput;
|
|
2218
|
-
data: CmsContentModel;
|
|
2219
|
-
}
|
|
2220
|
-
export interface CmsContentModelStorageOperationsCreateArgs {
|
|
2221
|
-
input: CmsContentModelCreateInput;
|
|
2222
|
-
data: CmsContentModel;
|
|
2223
|
-
}
|
|
2224
|
-
export interface CmsContentModelStorageOperationsAfterCreateArgs {
|
|
2225
|
-
input: CmsContentModelCreateInput;
|
|
2226
|
-
model: CmsContentModel;
|
|
2227
|
-
}
|
|
2228
|
-
export interface CmsContentModelStorageOperationsBeforeUpdateArgs {
|
|
2229
|
-
model: CmsContentModel;
|
|
2230
|
-
data: Partial<CmsContentModel>;
|
|
2231
|
-
input: CmsContentModelUpdateInput;
|
|
2232
|
-
}
|
|
2233
|
-
export interface CmsContentModelStorageOperationsUpdateArgs {
|
|
2234
|
-
model: CmsContentModel;
|
|
2235
|
-
data: Partial<CmsContentModel>;
|
|
2236
|
-
input: CmsContentModelUpdateInput;
|
|
2237
|
-
}
|
|
2238
|
-
export interface CmsContentModelStorageOperationsAfterUpdateArgs {
|
|
2239
|
-
model: CmsContentModel;
|
|
2240
|
-
data: Partial<CmsContentModel>;
|
|
2241
|
-
input: CmsContentModelUpdateInput;
|
|
2242
|
-
}
|
|
2243
|
-
export interface CmsContentModelStorageOperationsBeforeDeleteArgs {
|
|
2244
|
-
model: CmsContentModel;
|
|
2245
|
-
}
|
|
2246
|
-
export interface CmsContentModelStorageOperationsDeleteArgs {
|
|
2247
|
-
model: CmsContentModel;
|
|
2248
|
-
}
|
|
2249
|
-
export interface CmsContentModelStorageOperationsAfterDeleteArgs {
|
|
2250
|
-
model: CmsContentModel;
|
|
2251
|
-
}
|
|
2252
|
-
/**
|
|
2253
|
-
* Description of the ContentModel storage operations.
|
|
2254
|
-
* If user wants to add another database to the application, this is how it is done.
|
|
2255
|
-
* This is just plain read, update, write, delete and list - no authentication or permission checks.
|
|
2256
|
-
*/
|
|
2257
|
-
export interface CmsContentModelStorageOperations {
|
|
2258
|
-
/**
|
|
2259
|
-
* Gets content model by given id.
|
|
2260
|
-
*/
|
|
2261
|
-
get: (args: CmsContentModelStorageOperationsGetArgs) => Promise<CmsContentModel | null>;
|
|
2262
|
-
/**
|
|
2263
|
-
* List all content models. Filterable via params.
|
|
2264
|
-
*/
|
|
2265
|
-
list: (args?: CmsContentModelStorageOperationsListArgs) => Promise<CmsContentModel[]>;
|
|
2266
|
-
/**
|
|
2267
|
-
* A hook to be run before the create method.
|
|
2268
|
-
*/
|
|
2269
|
-
beforeCreate?: (args: CmsContentModelStorageOperationsBeforeCreateArgs) => Promise<void>;
|
|
2270
|
-
/**
|
|
2271
|
-
* Create a new content model.
|
|
2272
|
-
*/
|
|
2273
|
-
create: (args: CmsContentModelStorageOperationsCreateArgs) => Promise<CmsContentModel>;
|
|
2274
|
-
/**
|
|
2275
|
-
* A hook to be run after the create method.
|
|
2276
|
-
*/
|
|
2277
|
-
afterCreate?: (args: CmsContentModelStorageOperationsAfterCreateArgs) => Promise<void>;
|
|
2278
|
-
/**
|
|
2279
|
-
* A hook to be run before the update method.
|
|
2280
|
-
*/
|
|
2281
|
-
beforeUpdate?: (args: CmsContentModelStorageOperationsBeforeUpdateArgs) => Promise<void>;
|
|
2282
|
-
/**
|
|
2283
|
-
* Update existing content model.
|
|
2284
|
-
*/
|
|
2285
|
-
update: (args: CmsContentModelStorageOperationsUpdateArgs) => Promise<CmsContentModel>;
|
|
2286
|
-
/**
|
|
2287
|
-
* A hook to be run after the update method.
|
|
2288
|
-
*/
|
|
2289
|
-
afterUpdate?: (args: CmsContentModelStorageOperationsAfterUpdateArgs) => Promise<void>;
|
|
2290
|
-
/**
|
|
2291
|
-
* A hook to be run before the delete method.
|
|
2292
|
-
*/
|
|
2293
|
-
beforeDelete?: (args: CmsContentModelStorageOperationsBeforeDeleteArgs) => Promise<void>;
|
|
2294
|
-
/**
|
|
2295
|
-
* Delete the content model.
|
|
2296
|
-
*/
|
|
2297
|
-
delete: (args: CmsContentModelStorageOperationsDeleteArgs) => Promise<boolean>;
|
|
2298
|
-
/**
|
|
2299
|
-
* A hook to be run after the delete method.
|
|
2300
|
-
*/
|
|
2301
|
-
afterDelete?: (args: CmsContentModelStorageOperationsAfterDeleteArgs) => Promise<void>;
|
|
2302
|
-
}
|
|
2303
|
-
/**
|
|
2304
|
-
* Arguments for the entry storage provider method.
|
|
2305
|
-
*/
|
|
2306
|
-
interface CmsContentEntryStorageOperationsProviderArgs {
|
|
2307
|
-
context: CmsContext;
|
|
2308
|
-
}
|
|
2309
|
-
/**
|
|
2310
|
-
* A plugin that provides the entry storage operations implementation.
|
|
2311
|
-
*/
|
|
2312
|
-
export interface CmsContentEntryStorageOperationsProvider extends CmsStorageOperationsProvider<CmsContentEntryStorageOperationsProviderArgs, CmsContentEntryStorageOperations> {
|
|
2313
|
-
/**
|
|
2314
|
-
* A plugin type.
|
|
2315
|
-
*/
|
|
2316
|
-
type: "cms-content-entry-storage-operations-provider";
|
|
2317
|
-
}
|
|
2318
|
-
export interface CmsContentEntryStorageOperationsGetArgs {
|
|
2319
|
-
where?: CmsContentEntryListWhere;
|
|
2320
|
-
sort?: CmsContentEntryListSort;
|
|
2321
|
-
limit?: number;
|
|
2322
|
-
}
|
|
2323
|
-
export interface CmsContentEntryStorageOperationsListArgs<T extends Record<string, any> = Record<string, any>> {
|
|
2324
|
-
where?: T;
|
|
2325
|
-
sort?: CmsContentEntryListSort;
|
|
2326
|
-
limit?: number;
|
|
2327
|
-
after?: string;
|
|
2328
|
-
}
|
|
2329
|
-
export interface CmsContentEntryStorageOperationsCreateArgs<T extends CmsStorageContentEntry = CmsStorageContentEntry> {
|
|
2330
|
-
/**
|
|
2331
|
-
* Input received from the user.
|
|
2332
|
-
*/
|
|
2333
|
-
input: Record<string, any>;
|
|
2334
|
-
/**
|
|
2335
|
-
* Real entry, with no transformations on it.
|
|
2336
|
-
*/
|
|
2337
|
-
entry: CmsContentEntry;
|
|
2338
|
-
/**
|
|
2339
|
-
* Entry prepared for the storage.
|
|
2340
|
-
*/
|
|
2341
|
-
storageEntry: T;
|
|
2342
|
-
}
|
|
2343
|
-
export interface CmsContentEntryStorageOperationsCreateRevisionFromArgs<T extends CmsStorageContentEntry = CmsStorageContentEntry> {
|
|
2344
|
-
/**
|
|
2345
|
-
* The entry we are creating new one from.
|
|
2346
|
-
*/
|
|
2347
|
-
originalEntry: CmsContentEntry;
|
|
2348
|
-
/**
|
|
2349
|
-
* The entry we are creating new one from, directly from storage, with transformations on it.
|
|
2350
|
-
*/
|
|
2351
|
-
originalStorageEntry: T;
|
|
2352
|
-
/**
|
|
2353
|
-
* Latest entry, used to calculate the new version.
|
|
2354
|
-
*/
|
|
2355
|
-
latestEntry: CmsContentEntry;
|
|
2356
|
-
/**
|
|
2357
|
-
* Latest entry, used to calculate the new version, directly from storage, with transformations.
|
|
2358
|
-
*/
|
|
2359
|
-
latestStorageEntry: T;
|
|
2360
|
-
/**
|
|
2361
|
-
* Real entry, with no transformations on it.
|
|
2362
|
-
*/
|
|
2363
|
-
entry: CmsContentEntry;
|
|
2364
|
-
/**
|
|
2365
|
-
* Entry prepared for the storage.
|
|
2366
|
-
*/
|
|
2367
|
-
storageEntry: T;
|
|
2368
|
-
}
|
|
2369
|
-
export interface CmsContentEntryStorageOperationsUpdateArgs<T extends CmsStorageContentEntry = CmsStorageContentEntry> {
|
|
2370
|
-
/**
|
|
2371
|
-
* Input received from the user.
|
|
2372
|
-
*/
|
|
2373
|
-
input: Record<string, any>;
|
|
2374
|
-
/**
|
|
2375
|
-
* Used to compare IDs, versions and passed into storage operations to be used if required.
|
|
2376
|
-
*/
|
|
2377
|
-
originalEntry: CmsContentEntry;
|
|
2378
|
-
/**
|
|
2379
|
-
* Directly from storage, with transformations on it.
|
|
2380
|
-
*/
|
|
2381
|
-
originalStorageEntry: T;
|
|
2382
|
-
/**
|
|
2383
|
-
* Real entry, with no transformations on it.
|
|
2384
|
-
*/
|
|
2385
|
-
entry: CmsContentEntry;
|
|
2386
|
-
/**
|
|
2387
|
-
* Entry prepared for the storage.
|
|
2388
|
-
*/
|
|
2389
|
-
storageEntry: T;
|
|
2390
|
-
}
|
|
2391
|
-
export interface CmsContentEntryStorageOperationsDeleteRevisionArgs<T extends CmsStorageContentEntry = CmsStorageContentEntry> {
|
|
2392
|
-
/**
|
|
2393
|
-
* Entry that was deleted.
|
|
2394
|
-
*/
|
|
2395
|
-
entryToDelete: CmsContentEntry;
|
|
2396
|
-
/**
|
|
2397
|
-
* Entry that was deleted, directly from storage, with transformations.
|
|
2398
|
-
*/
|
|
2399
|
-
storageEntryToDelete: T;
|
|
2400
|
-
/**
|
|
2401
|
-
* Entry that was set as latest.
|
|
2402
|
-
*/
|
|
2403
|
-
entryToSetAsLatest?: CmsContentEntry;
|
|
2404
|
-
/**
|
|
2405
|
-
* Entry that was set as latest, directly from storage, with transformations.
|
|
2406
|
-
*/
|
|
2407
|
-
storageEntryToSetAsLatest?: T;
|
|
2408
|
-
}
|
|
2409
|
-
export interface CmsContentEntryStorageOperationsDeleteArgs<T extends CmsStorageContentEntry = CmsStorageContentEntry> {
|
|
2410
|
-
/**
|
|
2411
|
-
* Entry that is going to be deleted.
|
|
2412
|
-
*/
|
|
2413
|
-
entry: CmsContentEntry;
|
|
2414
|
-
/**
|
|
2415
|
-
* Entry that is going to be deleted, directly from storage.
|
|
2416
|
-
*/
|
|
2417
|
-
storageEntry: T;
|
|
2418
|
-
}
|
|
2419
|
-
export interface CmsContentEntryStorageOperationsPublishArgs<T extends CmsStorageContentEntry = CmsStorageContentEntry> {
|
|
2420
|
-
/**
|
|
2421
|
-
* The entry record before it was published.
|
|
2422
|
-
*/
|
|
2423
|
-
originalEntry: CmsContentEntry;
|
|
2424
|
-
/**
|
|
2425
|
-
* Directly from storage, with transformations on it.
|
|
2426
|
-
*/
|
|
2427
|
-
originalStorageEntry: T;
|
|
2428
|
-
/**
|
|
2429
|
-
* The modified entry that is going to be saved as published.
|
|
2430
|
-
* Entry is in its original form.
|
|
2431
|
-
*/
|
|
2432
|
-
entry: CmsContentEntry;
|
|
2433
|
-
/**
|
|
2434
|
-
* The modified entry and prepared for the storage.
|
|
2435
|
-
*/
|
|
2436
|
-
storageEntry: T;
|
|
2437
|
-
}
|
|
2438
|
-
export interface CmsContentEntryStorageOperationsUnpublishArgs<T extends CmsStorageContentEntry = CmsStorageContentEntry> {
|
|
2439
|
-
/**
|
|
2440
|
-
* The entry record before it was unpublished.
|
|
2441
|
-
*/
|
|
2442
|
-
originalEntry: CmsContentEntry;
|
|
2443
|
-
/**
|
|
2444
|
-
* The entry record before it was unpublished, with transformations on it.
|
|
2445
|
-
*/
|
|
2446
|
-
originalStorageEntry: T;
|
|
2447
|
-
/**
|
|
2448
|
-
* The modified entry that is going to be saved as unpublished.
|
|
2449
|
-
*/
|
|
2450
|
-
entry: CmsContentEntry;
|
|
2451
|
-
/**
|
|
2452
|
-
* The modified entry that is going to be saved as unpublished, with transformations on it.
|
|
2453
|
-
*/
|
|
2454
|
-
storageEntry: T;
|
|
1969
|
+
export interface CmsEntryStorageOperationsGetPublishedRevisionParams {
|
|
1970
|
+
id: string;
|
|
1971
|
+
tenant: string;
|
|
1972
|
+
locale: string;
|
|
2455
1973
|
}
|
|
2456
|
-
export interface
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
entry: CmsContentEntry;
|
|
2461
|
-
/**
|
|
2462
|
-
* Entry that is prepared for the storageOperations, with the transformations.
|
|
2463
|
-
*/
|
|
2464
|
-
storageEntry: T;
|
|
2465
|
-
/**
|
|
2466
|
-
* Original entry from the storage.
|
|
2467
|
-
*/
|
|
2468
|
-
originalEntry: CmsContentEntry;
|
|
2469
|
-
/**
|
|
2470
|
-
* Original entry to be updated, directly from storage, with the transformations.
|
|
2471
|
-
*/
|
|
2472
|
-
originalStorageEntry: T;
|
|
1974
|
+
export interface CmsEntryStorageOperationsGetLatestRevisionParams {
|
|
1975
|
+
id: string;
|
|
1976
|
+
tenant: string;
|
|
1977
|
+
locale: string;
|
|
2473
1978
|
}
|
|
2474
|
-
export interface
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
/**
|
|
2480
|
-
* Entry that is prepared for the storageOperations, with the transformations.
|
|
2481
|
-
*/
|
|
2482
|
-
storageEntry: T;
|
|
2483
|
-
/**
|
|
2484
|
-
* Original entry from the storage.
|
|
2485
|
-
*/
|
|
2486
|
-
originalEntry: CmsContentEntry;
|
|
2487
|
-
/**
|
|
2488
|
-
* Original entry to be updated, directly from storage, with the transformations.
|
|
2489
|
-
*/
|
|
2490
|
-
originalStorageEntry: T;
|
|
1979
|
+
export interface CmsEntryStorageOperationsGetPreviousRevisionParams {
|
|
1980
|
+
entryId: string;
|
|
1981
|
+
version: number;
|
|
1982
|
+
tenant: string;
|
|
1983
|
+
locale: string;
|
|
2491
1984
|
}
|
|
2492
|
-
export interface
|
|
1985
|
+
export interface CmsEntryStorageOperationsListResponse<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
2493
1986
|
/**
|
|
2494
1987
|
* Has more items to load with the current filtering?
|
|
2495
1988
|
*/
|
|
@@ -2508,95 +2001,95 @@ export interface CmsContentEntryStorageOperationsListResponse<T extends CmsStora
|
|
|
2508
2001
|
totalCount: number;
|
|
2509
2002
|
}
|
|
2510
2003
|
/**
|
|
2511
|
-
* Description of the
|
|
2004
|
+
* Description of the CmsModel storage operations.
|
|
2512
2005
|
* If user wants to add another database to the application, this is how it is done.
|
|
2513
2006
|
* This is just plain read, update, write, delete and list - no authentication or permission checks.
|
|
2514
2007
|
*
|
|
2515
2008
|
*
|
|
2516
2009
|
* @category StorageOperations
|
|
2517
|
-
* @category
|
|
2010
|
+
* @category CmsEntry
|
|
2518
2011
|
*/
|
|
2519
|
-
export interface
|
|
2012
|
+
export interface CmsEntryStorageOperations<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
2520
2013
|
/**
|
|
2521
2014
|
* Get all the entries of the ids.
|
|
2522
2015
|
*/
|
|
2523
|
-
getByIds: (model:
|
|
2016
|
+
getByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetByIdsParams) => Promise<T[]>;
|
|
2524
2017
|
/**
|
|
2525
2018
|
* Get all the published entries of the ids.
|
|
2526
2019
|
*/
|
|
2527
|
-
getPublishedByIds: (model:
|
|
2020
|
+
getPublishedByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetPublishedByIdsParams) => Promise<T[]>;
|
|
2528
2021
|
/**
|
|
2529
2022
|
* Get all the latest entries of the ids.
|
|
2530
2023
|
*/
|
|
2531
|
-
getLatestByIds: (model:
|
|
2024
|
+
getLatestByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetLatestByIdsParams) => Promise<T[]>;
|
|
2532
2025
|
/**
|
|
2533
2026
|
* Get all revisions of the given entry id.
|
|
2534
2027
|
*/
|
|
2535
|
-
getRevisions: (model:
|
|
2028
|
+
getRevisions: (model: CmsModel, params: CmsEntryStorageOperationsGetRevisionsParams) => Promise<T[]>;
|
|
2536
2029
|
/**
|
|
2537
2030
|
* Get all revisions of all of the given IDs.
|
|
2538
2031
|
*/
|
|
2539
|
-
getAllRevisionsByIds: (model:
|
|
2032
|
+
getAllRevisionsByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetAllRevisionsParams) => Promise<T[]>;
|
|
2540
2033
|
/**
|
|
2541
2034
|
* Get the entry by the given revision id.
|
|
2542
2035
|
*/
|
|
2543
|
-
getRevisionById: (model:
|
|
2036
|
+
getRevisionById: (model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams) => Promise<T | null>;
|
|
2544
2037
|
/**
|
|
2545
2038
|
* Get the published entry by given entryId.
|
|
2546
2039
|
*/
|
|
2547
|
-
getPublishedRevisionByEntryId: (model:
|
|
2040
|
+
getPublishedRevisionByEntryId: (model: CmsModel, params: CmsEntryStorageOperationsGetPublishedRevisionParams) => Promise<T | null>;
|
|
2548
2041
|
/**
|
|
2549
2042
|
* Get the latest entry by given entryId.
|
|
2550
2043
|
*/
|
|
2551
|
-
getLatestRevisionByEntryId: (model:
|
|
2044
|
+
getLatestRevisionByEntryId: (model: CmsModel, params: CmsEntryStorageOperationsGetLatestRevisionParams) => Promise<T | null>;
|
|
2552
2045
|
/**
|
|
2553
2046
|
* Get the revision of the entry before given one.
|
|
2554
2047
|
*/
|
|
2555
|
-
getPreviousRevision: (model:
|
|
2048
|
+
getPreviousRevision: (model: CmsModel, params: CmsEntryStorageOperationsGetPreviousRevisionParams) => Promise<T | null>;
|
|
2556
2049
|
/**
|
|
2557
|
-
* Gets entry by given
|
|
2050
|
+
* Gets entry by given params.
|
|
2558
2051
|
*/
|
|
2559
|
-
get: (model:
|
|
2052
|
+
get: (model: CmsModel, params: CmsEntryStorageOperationsGetParams) => Promise<T | null>;
|
|
2560
2053
|
/**
|
|
2561
2054
|
* List all entries. Filterable via params.
|
|
2562
2055
|
*/
|
|
2563
|
-
list: (model:
|
|
2056
|
+
list: (model: CmsModel, params: CmsEntryStorageOperationsListParams) => Promise<CmsEntryStorageOperationsListResponse<T>>;
|
|
2564
2057
|
/**
|
|
2565
2058
|
* Create a new entry.
|
|
2566
2059
|
*/
|
|
2567
|
-
create: (model:
|
|
2060
|
+
create: (model: CmsModel, params: CmsEntryStorageOperationsCreateParams<T>) => Promise<T>;
|
|
2568
2061
|
/**
|
|
2569
2062
|
* Create a new entry from existing one.
|
|
2570
2063
|
*/
|
|
2571
|
-
createRevisionFrom: (model:
|
|
2064
|
+
createRevisionFrom: (model: CmsModel, params: CmsEntryStorageOperationsCreateRevisionFromParams<T>) => Promise<T>;
|
|
2572
2065
|
/**
|
|
2573
2066
|
* Update existing entry.
|
|
2574
2067
|
*/
|
|
2575
|
-
update: (model:
|
|
2068
|
+
update: (model: CmsModel, params: CmsEntryStorageOperationsUpdateParams<T>) => Promise<T>;
|
|
2576
2069
|
/**
|
|
2577
2070
|
* Delete the entry revision.
|
|
2578
2071
|
*/
|
|
2579
|
-
deleteRevision: (model:
|
|
2072
|
+
deleteRevision: (model: CmsModel, params: CmsEntryStorageOperationsDeleteRevisionParams<T>) => Promise<void>;
|
|
2580
2073
|
/**
|
|
2581
2074
|
* Delete the entry.
|
|
2582
2075
|
*/
|
|
2583
|
-
delete: (model:
|
|
2076
|
+
delete: (model: CmsModel, params: CmsEntryStorageOperationsDeleteParams<T>) => Promise<void>;
|
|
2584
2077
|
/**
|
|
2585
2078
|
* Publish the entry.
|
|
2586
2079
|
*/
|
|
2587
|
-
publish: (model:
|
|
2080
|
+
publish: (model: CmsModel, params: CmsEntryStorageOperationsPublishParams<T>) => Promise<T>;
|
|
2588
2081
|
/**
|
|
2589
2082
|
* Unpublish the entry.
|
|
2590
2083
|
*/
|
|
2591
|
-
unpublish: (model:
|
|
2084
|
+
unpublish: (model: CmsModel, params: CmsEntryStorageOperationsUnpublishParams<T>) => Promise<T>;
|
|
2592
2085
|
/**
|
|
2593
2086
|
* Request changes the entry.
|
|
2594
2087
|
*/
|
|
2595
|
-
requestChanges: (model:
|
|
2088
|
+
requestChanges: (model: CmsModel, params: CmsEntryStorageOperationsRequestChangesParams<T>) => Promise<T>;
|
|
2596
2089
|
/**
|
|
2597
2090
|
* Request review the entry.
|
|
2598
2091
|
*/
|
|
2599
|
-
requestReview: (model:
|
|
2092
|
+
requestReview: (model: CmsModel, params: CmsEntryStorageOperationsRequestReviewParams<T>) => Promise<CmsEntry>;
|
|
2600
2093
|
}
|
|
2601
2094
|
export declare enum CONTENT_ENTRY_STATUS {
|
|
2602
2095
|
DRAFT = "draft",
|
|
@@ -2605,60 +2098,77 @@ export declare enum CONTENT_ENTRY_STATUS {
|
|
|
2605
2098
|
CHANGES_REQUESTED = "changesRequested",
|
|
2606
2099
|
REVIEW_REQUESTED = "reviewRequested"
|
|
2607
2100
|
}
|
|
2608
|
-
interface
|
|
2609
|
-
|
|
2101
|
+
export interface CmsSettingsStorageOperationsGetParams {
|
|
2102
|
+
locale: string;
|
|
2103
|
+
tenant: string;
|
|
2610
2104
|
}
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
export interface
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
*/
|
|
2618
|
-
type: "cms-settings-storage-operations-provider";
|
|
2105
|
+
export interface CmsSettingsStorageOperationsCreateParams {
|
|
2106
|
+
settings: CmsSettings;
|
|
2107
|
+
}
|
|
2108
|
+
export interface CmsSettingsStorageOperationsUpdateParams {
|
|
2109
|
+
original: CmsSettings;
|
|
2110
|
+
settings: CmsSettings;
|
|
2619
2111
|
}
|
|
2620
2112
|
export interface CmsSettingsStorageOperations {
|
|
2621
2113
|
/**
|
|
2622
2114
|
* Get the settings from the storage.
|
|
2623
2115
|
*/
|
|
2624
|
-
get: () => Promise<CmsSettings | null>;
|
|
2116
|
+
get: (params: CmsSettingsStorageOperationsGetParams) => Promise<CmsSettings | null>;
|
|
2625
2117
|
/**
|
|
2626
2118
|
* Create settings in the storage.
|
|
2627
2119
|
*/
|
|
2628
|
-
create: (
|
|
2120
|
+
create: (params: CmsSettingsStorageOperationsCreateParams) => Promise<CmsSettings>;
|
|
2629
2121
|
/**
|
|
2630
2122
|
* Update the settings in the storage.
|
|
2631
2123
|
*/
|
|
2632
|
-
update: (
|
|
2633
|
-
}
|
|
2634
|
-
interface CmsSystemStorageOperationsProviderArgs {
|
|
2635
|
-
context: CmsContext;
|
|
2636
|
-
}
|
|
2637
|
-
/**
|
|
2638
|
-
* A plugin that provides the system storage operations implementation.
|
|
2639
|
-
*/
|
|
2640
|
-
export interface CmsSystemStorageOperationsProviderPlugin extends CmsStorageOperationsProvider<CmsSystemStorageOperationsProviderArgs, CmsSystemStorageOperations> {
|
|
2641
|
-
/**
|
|
2642
|
-
* A plugin type.
|
|
2643
|
-
*/
|
|
2644
|
-
type: "cms-system-storage-operations-provider";
|
|
2124
|
+
update: (params: CmsSettingsStorageOperationsUpdateParams) => Promise<CmsSettings>;
|
|
2645
2125
|
}
|
|
2646
2126
|
export interface CmsSystem {
|
|
2647
2127
|
version?: string;
|
|
2648
2128
|
readAPIKey?: string;
|
|
2129
|
+
/**
|
|
2130
|
+
* System tenant.
|
|
2131
|
+
*/
|
|
2132
|
+
tenant: string;
|
|
2133
|
+
}
|
|
2134
|
+
export interface CmsSystemStorageOperationsGetParams {
|
|
2135
|
+
tenant: string;
|
|
2136
|
+
}
|
|
2137
|
+
export interface CmsSystemStorageOperationsCreateParams {
|
|
2138
|
+
system: CmsSystem;
|
|
2139
|
+
}
|
|
2140
|
+
export interface CmsSystemStorageOperationsUpdateParams {
|
|
2141
|
+
system: CmsSystem;
|
|
2142
|
+
original: CmsSystem;
|
|
2649
2143
|
}
|
|
2650
2144
|
export interface CmsSystemStorageOperations {
|
|
2651
2145
|
/**
|
|
2652
2146
|
* Get the system data.
|
|
2653
2147
|
*/
|
|
2654
|
-
get: () => Promise<CmsSystem | null>;
|
|
2148
|
+
get: (params: CmsSystemStorageOperationsGetParams) => Promise<CmsSystem | null>;
|
|
2655
2149
|
/**
|
|
2656
2150
|
* Create the system info in the storage.
|
|
2657
2151
|
*/
|
|
2658
|
-
create: (
|
|
2152
|
+
create: (params: CmsSystemStorageOperationsCreateParams) => Promise<CmsSystem>;
|
|
2659
2153
|
/**
|
|
2660
2154
|
* Update the system info in the storage.
|
|
2661
2155
|
*/
|
|
2662
|
-
update: (
|
|
2156
|
+
update: (params: CmsSystemStorageOperationsUpdateParams) => Promise<CmsSystem>;
|
|
2157
|
+
}
|
|
2158
|
+
export interface HeadlessCmsStorageOperations {
|
|
2159
|
+
system: CmsSystemStorageOperations;
|
|
2160
|
+
settings: CmsSettingsStorageOperations;
|
|
2161
|
+
groups: CmsGroupStorageOperations;
|
|
2162
|
+
models: CmsModelStorageOperations;
|
|
2163
|
+
entries: CmsEntryStorageOperations;
|
|
2164
|
+
init?: (cms: HeadlessCms) => Promise<void>;
|
|
2165
|
+
/**
|
|
2166
|
+
* Plugins to be attached to the main context.
|
|
2167
|
+
*/
|
|
2168
|
+
plugins?: Plugin[] | Plugin[][];
|
|
2169
|
+
/**
|
|
2170
|
+
* An upgrade to run if necessary.
|
|
2171
|
+
*/
|
|
2172
|
+
upgrade?: UpgradePlugin | null;
|
|
2663
2173
|
}
|
|
2664
2174
|
export {};
|