@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.js
CHANGED
|
@@ -14,19 +14,19 @@ exports.CONTENT_ENTRY_STATUS = void 0;
|
|
|
14
14
|
/**
|
|
15
15
|
* Object containing content model field predefined options and values.
|
|
16
16
|
*
|
|
17
|
-
* @category
|
|
17
|
+
* @category CmsModelField
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Object containing content model field renderer options.
|
|
22
22
|
*
|
|
23
|
-
* @category
|
|
23
|
+
* @category CmsModelField
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* A definition for content model field. This type exists on the app side as well.
|
|
28
28
|
*
|
|
29
|
-
* @category
|
|
29
|
+
* @category ModelField
|
|
30
30
|
* @category Database model
|
|
31
31
|
*/
|
|
32
32
|
|
|
@@ -37,7 +37,7 @@ exports.CONTENT_ENTRY_STATUS = void 0;
|
|
|
37
37
|
/**
|
|
38
38
|
* Arguments for the field validator validate method.
|
|
39
39
|
*
|
|
40
|
-
* @category
|
|
40
|
+
* @category ModelField
|
|
41
41
|
* @category FieldValidation
|
|
42
42
|
*/
|
|
43
43
|
|
|
@@ -45,7 +45,7 @@ exports.CONTENT_ENTRY_STATUS = void 0;
|
|
|
45
45
|
* Definition for the field validator.
|
|
46
46
|
*
|
|
47
47
|
* @category Plugin
|
|
48
|
-
* @category
|
|
48
|
+
* @category ModelField
|
|
49
49
|
* @category FieldValidation
|
|
50
50
|
*/
|
|
51
51
|
|
|
@@ -53,32 +53,32 @@ exports.CONTENT_ENTRY_STATUS = void 0;
|
|
|
53
53
|
* A pattern validator for the content entry field value.
|
|
54
54
|
*
|
|
55
55
|
* @category Plugin
|
|
56
|
-
* @category
|
|
56
|
+
* @category ModelField
|
|
57
57
|
* @category FieldValidation
|
|
58
58
|
*/
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* Locked field in the content model
|
|
62
62
|
*
|
|
63
|
-
* @see
|
|
63
|
+
* @see CmsModel.lockedFields
|
|
64
64
|
*
|
|
65
|
-
* @category
|
|
65
|
+
* @category ModelField
|
|
66
66
|
*/
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* Cms Model defining an entry.
|
|
70
70
|
*
|
|
71
71
|
* @category Database model
|
|
72
|
-
* @category
|
|
72
|
+
* @category CmsModel
|
|
73
73
|
*/
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
|
-
* @category
|
|
76
|
+
* @category ModelField
|
|
77
77
|
*/
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* @category Plugin
|
|
81
|
-
* @category
|
|
81
|
+
* @category ModelField
|
|
82
82
|
* @category GraphQL
|
|
83
83
|
*/
|
|
84
84
|
|
|
@@ -86,12 +86,12 @@ exports.CONTENT_ENTRY_STATUS = void 0;
|
|
|
86
86
|
* Check for content model locked field.
|
|
87
87
|
* A custom plugin definable by the user.
|
|
88
88
|
*
|
|
89
|
-
* @category
|
|
89
|
+
* @category CmsModel
|
|
90
90
|
* @category Plugin
|
|
91
91
|
*/
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
|
-
* @category
|
|
94
|
+
* @category ModelField
|
|
95
95
|
*/
|
|
96
96
|
|
|
97
97
|
/**
|
|
@@ -113,152 +113,182 @@ exports.CONTENT_ENTRY_STATUS = void 0;
|
|
|
113
113
|
*/
|
|
114
114
|
|
|
115
115
|
/**
|
|
116
|
-
* A GraphQL
|
|
116
|
+
* A GraphQL params.data parameter received when creating content model group.
|
|
117
117
|
*
|
|
118
|
-
* @category
|
|
119
|
-
* @category GraphQL
|
|
118
|
+
* @category CmsGroup
|
|
119
|
+
* @category GraphQL params
|
|
120
120
|
*/
|
|
121
121
|
|
|
122
122
|
/**
|
|
123
|
-
* A GraphQL
|
|
123
|
+
* A GraphQL params.data parameter received when updating content model group.
|
|
124
124
|
*
|
|
125
|
-
* @category
|
|
126
|
-
* @category GraphQL
|
|
125
|
+
* @category CmsGroup
|
|
126
|
+
* @category GraphQL params
|
|
127
127
|
*/
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
130
|
* A representation of content model group in the database.
|
|
131
131
|
*
|
|
132
|
-
* @category
|
|
132
|
+
* @category CmsGroup
|
|
133
133
|
* @category Database model
|
|
134
134
|
*/
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
137
|
* A data.where parameter received when listing content model groups.
|
|
138
138
|
*
|
|
139
|
-
* @category
|
|
140
|
-
* @category GraphQL
|
|
139
|
+
* @category CmsGroup
|
|
140
|
+
* @category GraphQL params
|
|
141
141
|
*/
|
|
142
142
|
|
|
143
143
|
/**
|
|
144
|
-
*
|
|
144
|
+
* @category CmsGroup
|
|
145
|
+
* @category Topic
|
|
146
|
+
*/
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @category CmsGroup
|
|
150
|
+
* @category Topic
|
|
151
|
+
*/
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @category CmsGroup
|
|
155
|
+
* @category Topic
|
|
156
|
+
*/
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* @category CmsGroup
|
|
160
|
+
* @category Topic
|
|
161
|
+
*/
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* @category CmsGroup
|
|
165
|
+
* @category Topic
|
|
166
|
+
*/
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* @category CmsGroup
|
|
170
|
+
* @category Topic
|
|
171
|
+
*/
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Cms Group in context.
|
|
145
175
|
*
|
|
146
176
|
* @category Context
|
|
147
|
-
* @category
|
|
177
|
+
* @category CmsGroup
|
|
148
178
|
*/
|
|
149
179
|
|
|
150
180
|
/**
|
|
151
181
|
* Definition for content model field validator.
|
|
152
182
|
*
|
|
153
|
-
* @category
|
|
183
|
+
* @category ModelField
|
|
154
184
|
* @category FieldValidation
|
|
155
185
|
*/
|
|
156
186
|
|
|
157
187
|
/**
|
|
158
|
-
* A GraphQL
|
|
188
|
+
* A GraphQL params.data parameter received when creating content model.
|
|
159
189
|
*
|
|
160
|
-
* @category GraphQL
|
|
161
|
-
* @category
|
|
190
|
+
* @category GraphQL params
|
|
191
|
+
* @category CmsModel
|
|
162
192
|
*/
|
|
163
193
|
|
|
164
194
|
/**
|
|
165
195
|
* A definition for content model field received from the user.
|
|
166
196
|
*
|
|
167
|
-
* Input type for `
|
|
168
|
-
* @see
|
|
197
|
+
* Input type for `CmsModelField`.
|
|
198
|
+
* @see CmsModelField
|
|
169
199
|
*
|
|
170
|
-
* @category GraphQL
|
|
171
|
-
* @category
|
|
200
|
+
* @category GraphQL params
|
|
201
|
+
* @category ModelField
|
|
172
202
|
*/
|
|
173
203
|
|
|
174
204
|
/**
|
|
175
|
-
* A GraphQL
|
|
205
|
+
* A GraphQL params.data parameter received when updating content model.
|
|
176
206
|
*
|
|
177
|
-
* @category GraphQL
|
|
178
|
-
* @category
|
|
207
|
+
* @category GraphQL params
|
|
208
|
+
* @category CmsModel
|
|
179
209
|
*/
|
|
180
210
|
|
|
181
211
|
/**
|
|
182
|
-
* A plugin to load a
|
|
212
|
+
* A plugin to load a CmsModelManager.
|
|
183
213
|
*
|
|
184
|
-
* @see
|
|
214
|
+
* @see CmsModelManager
|
|
185
215
|
*
|
|
186
216
|
* @category Plugin
|
|
187
|
-
* @category
|
|
188
|
-
* @category
|
|
217
|
+
* @category CmsModel
|
|
218
|
+
* @category CmsEntry
|
|
189
219
|
*/
|
|
190
220
|
|
|
191
221
|
/**
|
|
192
222
|
* A content entry definition for and from the database.
|
|
193
223
|
*
|
|
194
224
|
* @category Database model
|
|
195
|
-
* @category
|
|
225
|
+
* @category CmsEntry
|
|
196
226
|
*/
|
|
197
227
|
|
|
198
228
|
/**
|
|
199
229
|
* A definition for content model manager to be used in the code.
|
|
200
|
-
* The default one uses `
|
|
230
|
+
* The default one uses `CmsEntryContext` methods internally, but devs can change to what every they want.
|
|
201
231
|
*
|
|
202
|
-
* @see
|
|
232
|
+
* @see CmsEntryContext
|
|
203
233
|
*
|
|
204
234
|
* @category Context
|
|
205
|
-
* @category
|
|
206
|
-
* @category
|
|
235
|
+
* @category CmsEntry
|
|
236
|
+
* @category CmsModel
|
|
207
237
|
*/
|
|
208
238
|
|
|
209
239
|
/**
|
|
210
|
-
*
|
|
240
|
+
* Cms Model in the context.
|
|
211
241
|
*
|
|
212
242
|
* @category Context
|
|
213
|
-
* @category
|
|
243
|
+
* @category CmsModel
|
|
214
244
|
*/
|
|
215
245
|
|
|
216
246
|
/**
|
|
217
247
|
* Available statuses for content entry.
|
|
218
248
|
*
|
|
219
|
-
* @category
|
|
249
|
+
* @category CmsEntry
|
|
220
250
|
*/
|
|
221
251
|
|
|
222
252
|
/**
|
|
223
|
-
* Entry listing where
|
|
253
|
+
* Entry listing where params.
|
|
224
254
|
*
|
|
225
|
-
* @category
|
|
226
|
-
* @category GraphQL
|
|
255
|
+
* @category CmsEntry
|
|
256
|
+
* @category GraphQL params
|
|
227
257
|
*/
|
|
228
258
|
|
|
229
259
|
/**
|
|
230
260
|
* Entry listing sort.
|
|
231
261
|
*
|
|
232
|
-
* @category
|
|
233
|
-
* @category GraphQL
|
|
262
|
+
* @category CmsEntry
|
|
263
|
+
* @category GraphQL params
|
|
234
264
|
*/
|
|
235
265
|
|
|
236
266
|
/**
|
|
237
|
-
* Get entry GraphQL resolver
|
|
267
|
+
* Get entry GraphQL resolver params.
|
|
238
268
|
*
|
|
239
|
-
* @category
|
|
240
|
-
* @category GraphQL
|
|
269
|
+
* @category CmsEntry
|
|
270
|
+
* @category GraphQL params
|
|
241
271
|
*/
|
|
242
272
|
|
|
243
273
|
/**
|
|
244
|
-
* List entries GraphQL resolver
|
|
274
|
+
* List entries GraphQL resolver params.
|
|
245
275
|
*
|
|
246
|
-
* @category
|
|
247
|
-
* @category GraphQL
|
|
276
|
+
* @category CmsEntry
|
|
277
|
+
* @category GraphQL params
|
|
248
278
|
*/
|
|
249
279
|
|
|
250
280
|
/**
|
|
251
281
|
* Meta information for GraphQL output.
|
|
252
282
|
*
|
|
253
|
-
* @category
|
|
283
|
+
* @category CmsEntry
|
|
254
284
|
* @category GraphQL output
|
|
255
285
|
*/
|
|
256
286
|
|
|
257
287
|
/**
|
|
258
|
-
*
|
|
288
|
+
* Cms Entry CRUD methods in the context.
|
|
259
289
|
*
|
|
260
290
|
* @category Context
|
|
261
|
-
* @category
|
|
291
|
+
* @category CmsEntry
|
|
262
292
|
*/
|
|
263
293
|
|
|
264
294
|
/**
|
|
@@ -268,17 +298,17 @@ exports.CONTENT_ENTRY_STATUS = void 0;
|
|
|
268
298
|
*/
|
|
269
299
|
|
|
270
300
|
/**
|
|
271
|
-
* Parameters for
|
|
301
|
+
* Parameters for CmsEntryResolverFactory.
|
|
272
302
|
*
|
|
273
303
|
* @category GraphQL resolver
|
|
274
|
-
* @category
|
|
304
|
+
* @category CmsEntry
|
|
275
305
|
*/
|
|
276
306
|
|
|
277
307
|
/**
|
|
278
|
-
* A type for
|
|
308
|
+
* A type for EntryResolvers. Used when creating get, list, update, publish, ...etc.
|
|
279
309
|
*
|
|
280
310
|
* @category GraphQL resolver
|
|
281
|
-
* @category
|
|
311
|
+
* @category CmsEntry
|
|
282
312
|
*/
|
|
283
313
|
|
|
284
314
|
/**
|
|
@@ -292,222 +322,43 @@ exports.CONTENT_ENTRY_STATUS = void 0;
|
|
|
292
322
|
* A security permission for content model.
|
|
293
323
|
*
|
|
294
324
|
* @category SecurityPermission
|
|
295
|
-
* @category
|
|
325
|
+
* @category CmsModel
|
|
296
326
|
*/
|
|
297
327
|
|
|
298
328
|
/**
|
|
299
329
|
* The security permission for content model groups.
|
|
300
330
|
*
|
|
301
331
|
* @category SecurityPermission
|
|
302
|
-
* @category
|
|
332
|
+
* @category CmsGroup
|
|
303
333
|
*/
|
|
304
334
|
|
|
305
335
|
/**
|
|
306
336
|
* The security permission for content entry.
|
|
307
337
|
*
|
|
308
338
|
* @category SecurityPermission
|
|
309
|
-
* @category
|
|
310
|
-
*/
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* A argument definition for CmsModelFieldToStoragePlugin.toStorage
|
|
314
|
-
*
|
|
315
|
-
* @see CmsModelFieldToStoragePlugin.toStorage
|
|
316
|
-
*
|
|
317
|
-
* @category Plugin
|
|
318
|
-
* @category ContentModelField
|
|
319
|
-
* @category Storage
|
|
320
|
-
*/
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* A argument definition for CmsModelFieldToStoragePlugin.fromStorage
|
|
324
|
-
*
|
|
325
|
-
* @see CmsModelFieldToStoragePlugin.fromStorage
|
|
326
|
-
*
|
|
327
|
-
* @category Plugin
|
|
328
|
-
* @category ContentModelField
|
|
329
|
-
* @category Storage
|
|
339
|
+
* @category CmsEntry
|
|
330
340
|
*/
|
|
331
341
|
|
|
332
342
|
/**
|
|
333
|
-
*
|
|
334
|
-
*
|
|
335
|
-
* @category Plugin
|
|
336
|
-
* @category ContentModelField
|
|
337
|
-
* @category ContentEntry
|
|
338
|
-
* @category Storage
|
|
339
|
-
*/
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* @category LifecycleHook
|
|
343
|
-
* @category ContentModel
|
|
344
|
-
*/
|
|
345
|
-
|
|
346
|
-
/**
|
|
347
|
-
* @category LifecycleHook
|
|
348
|
-
* @category ContentModel
|
|
349
|
-
*/
|
|
350
|
-
|
|
351
|
-
/**
|
|
352
|
-
* @category LifecycleHook
|
|
353
|
-
* @category ContentModel
|
|
354
|
-
*/
|
|
355
|
-
|
|
356
|
-
/**
|
|
357
|
-
* A plugin type that defines lifecycle hooks for content model.
|
|
358
|
-
*
|
|
359
|
-
* @category Plugin
|
|
360
|
-
* @category ContentModel
|
|
361
|
-
* @category LifecycleHook
|
|
362
|
-
*/
|
|
363
|
-
|
|
364
|
-
/**
|
|
365
|
-
* @category ContentEntry
|
|
366
|
-
* @category LifecycleHook
|
|
367
|
-
*/
|
|
368
|
-
|
|
369
|
-
/**
|
|
370
|
-
* @category ContentEntry
|
|
371
|
-
* @category LifecycleHook
|
|
372
|
-
*/
|
|
373
|
-
|
|
374
|
-
/**
|
|
375
|
-
* @category ContentEntry
|
|
376
|
-
* @category LifecycleHook
|
|
377
|
-
*/
|
|
378
|
-
|
|
379
|
-
/**
|
|
380
|
-
* @category ContentEntry
|
|
381
|
-
* @category LifecycleHook
|
|
382
|
-
*/
|
|
383
|
-
|
|
384
|
-
/**
|
|
385
|
-
* @category ContentEntry
|
|
386
|
-
* @category LifecycleHook
|
|
387
|
-
*/
|
|
388
|
-
|
|
389
|
-
/**
|
|
390
|
-
* @category ContentEntry
|
|
391
|
-
* @category LifecycleHook
|
|
392
|
-
*/
|
|
393
|
-
|
|
394
|
-
/**
|
|
395
|
-
* @category ContentEntry
|
|
396
|
-
* @category LifecycleHook
|
|
397
|
-
*/
|
|
398
|
-
|
|
399
|
-
/**
|
|
400
|
-
* @category ContentEntry
|
|
401
|
-
* @category LifecycleHook
|
|
402
|
-
*/
|
|
403
|
-
|
|
404
|
-
/**
|
|
405
|
-
* @category ContentEntry
|
|
406
|
-
* @category LifecycleHook
|
|
407
|
-
*/
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* @category ContentEntry
|
|
411
|
-
* @category LifecycleHook
|
|
412
|
-
*/
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* @category ContentEntry
|
|
416
|
-
* @category LifecycleHook
|
|
417
|
-
*/
|
|
418
|
-
|
|
419
|
-
/**
|
|
420
|
-
* @category ContentEntry
|
|
421
|
-
* @category LifecycleHook
|
|
422
|
-
*/
|
|
423
|
-
|
|
424
|
-
/**
|
|
425
|
-
* @category ContentEntry
|
|
426
|
-
* @category LifecycleHook
|
|
427
|
-
*/
|
|
428
|
-
|
|
429
|
-
/**
|
|
430
|
-
* @category ContentEntry
|
|
431
|
-
* @category LifecycleHook
|
|
432
|
-
*/
|
|
433
|
-
|
|
434
|
-
/**
|
|
435
|
-
* @category ContentEntry
|
|
436
|
-
* @category LifecycleHook
|
|
437
|
-
*/
|
|
438
|
-
|
|
439
|
-
/**
|
|
440
|
-
* @category ContentEntry
|
|
441
|
-
* @category LifecycleHook
|
|
442
|
-
*/
|
|
443
|
-
|
|
444
|
-
/**
|
|
445
|
-
* @category ContentEntry
|
|
446
|
-
* @category LifecycleHook
|
|
447
|
-
*/
|
|
448
|
-
|
|
449
|
-
/**
|
|
450
|
-
* @category ContentEntry
|
|
451
|
-
* @category LifecycleHook
|
|
452
|
-
*/
|
|
453
|
-
|
|
454
|
-
/**
|
|
455
|
-
* @category ContentEntry
|
|
456
|
-
* @category LifecycleHook
|
|
457
|
-
*/
|
|
458
|
-
|
|
459
|
-
/**
|
|
460
|
-
* A plugin type that defines lifecycle hooks for content entry.
|
|
461
|
-
*
|
|
462
|
-
* @category Plugin
|
|
463
|
-
* @category ContentEntry
|
|
464
|
-
* @category LifecycleHook
|
|
465
|
-
*/
|
|
466
|
-
|
|
467
|
-
/**
|
|
468
|
-
* Arguments for the group storage operations provider method.
|
|
469
|
-
*/
|
|
470
|
-
|
|
471
|
-
/**
|
|
472
|
-
* A plugin that provides the group storage operations implementation.
|
|
473
|
-
*/
|
|
474
|
-
|
|
475
|
-
/**
|
|
476
|
-
* Description of the ContentModelGroup CRUD operations.
|
|
343
|
+
* Description of the CmsGroup CRUD operations.
|
|
477
344
|
* If user wants to add another database to the application, this is how it is done.
|
|
478
345
|
* This is just plain read, update, write, delete and list - no authentication or permission checks.
|
|
479
346
|
*/
|
|
480
347
|
|
|
481
348
|
/**
|
|
482
|
-
*
|
|
483
|
-
*/
|
|
484
|
-
|
|
485
|
-
/**
|
|
486
|
-
* A plugin that provides the model storage operations implementation.
|
|
487
|
-
*/
|
|
488
|
-
|
|
489
|
-
/**
|
|
490
|
-
* Description of the ContentModel storage operations.
|
|
349
|
+
* Description of the CmsModel storage operations.
|
|
491
350
|
* If user wants to add another database to the application, this is how it is done.
|
|
492
351
|
* This is just plain read, update, write, delete and list - no authentication or permission checks.
|
|
493
352
|
*/
|
|
494
353
|
|
|
495
354
|
/**
|
|
496
|
-
*
|
|
497
|
-
*/
|
|
498
|
-
|
|
499
|
-
/**
|
|
500
|
-
* A plugin that provides the entry storage operations implementation.
|
|
501
|
-
*/
|
|
502
|
-
|
|
503
|
-
/**
|
|
504
|
-
* Description of the ContentModel storage operations.
|
|
355
|
+
* Description of the CmsModel storage operations.
|
|
505
356
|
* If user wants to add another database to the application, this is how it is done.
|
|
506
357
|
* This is just plain read, update, write, delete and list - no authentication or permission checks.
|
|
507
358
|
*
|
|
508
359
|
*
|
|
509
360
|
* @category StorageOperations
|
|
510
|
-
* @category
|
|
361
|
+
* @category CmsEntry
|
|
511
362
|
*/
|
|
512
363
|
let CONTENT_ENTRY_STATUS;
|
|
513
364
|
exports.CONTENT_ENTRY_STATUS = CONTENT_ENTRY_STATUS;
|
|
@@ -518,5 +369,4 @@ exports.CONTENT_ENTRY_STATUS = CONTENT_ENTRY_STATUS;
|
|
|
518
369
|
CONTENT_ENTRY_STATUS["UNPUBLISHED"] = "unpublished";
|
|
519
370
|
CONTENT_ENTRY_STATUS["CHANGES_REQUESTED"] = "changesRequested";
|
|
520
371
|
CONTENT_ENTRY_STATUS["REVIEW_REQUESTED"] = "reviewRequested";
|
|
521
|
-
})(CONTENT_ENTRY_STATUS || (exports.CONTENT_ENTRY_STATUS = CONTENT_ENTRY_STATUS = {}));
|
|
522
|
-
//# sourceMappingURL=types.js.map
|
|
372
|
+
})(CONTENT_ENTRY_STATUS || (exports.CONTENT_ENTRY_STATUS = CONTENT_ENTRY_STATUS = {}));
|
package/utils.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Plugin } from "@webiny/plugins/types";
|
|
2
1
|
import { SecurityPermission } from "@webiny/api-security/types";
|
|
3
|
-
import {
|
|
2
|
+
import { CmsModel, CmsContext, CreatedBy, CmsGroupPermission, CmsGroup } from "./types";
|
|
4
3
|
export declare const hasRwd: (permission: any, rwd: any) => any;
|
|
5
4
|
export declare const hasPw: (permission: any, pw: any) => any;
|
|
6
5
|
export declare const checkPermissions: <TPermission extends SecurityPermission = SecurityPermission>(context: CmsContext, name: string, check?: {
|
|
@@ -19,14 +18,8 @@ export declare const validateOwnership: (context: CmsContext, permission: Securi
|
|
|
19
18
|
* model access is checking for both specific model or group access
|
|
20
19
|
* if permission has specific models set as access pattern then groups will not matter (although both can be set)
|
|
21
20
|
*/
|
|
22
|
-
export declare const checkModelAccess: (context: CmsContext, model:
|
|
23
|
-
export declare const validateModelAccess: (context: CmsContext, model:
|
|
24
|
-
export declare const validateGroupAccess: (context: CmsContext, permission:
|
|
21
|
+
export declare const checkModelAccess: (context: CmsContext, model: CmsModel) => Promise<void>;
|
|
22
|
+
export declare const validateModelAccess: (context: CmsContext, model: CmsModel) => Promise<boolean>;
|
|
23
|
+
export declare const validateGroupAccess: (context: CmsContext, permission: CmsGroupPermission, group: CmsGroup) => boolean;
|
|
25
24
|
export declare const toSlug: (text: any) => string;
|
|
26
|
-
export declare const zeroPad: (version: any) => string;
|
|
27
|
-
export declare const createCmsPK: (context: CmsContext) => string;
|
|
28
|
-
export declare const paginateBatch: <T = Record<string, any>>(items: T[], perPage: number, execute: (items: T[]) => Promise<any>) => Promise<void>;
|
|
29
25
|
export declare const filterAsync: <T = Record<string, any>>(items: T[], predicate: (T: any) => Promise<boolean>) => Promise<T[]>;
|
|
30
|
-
declare type CallbackFallback = (args: any) => void | Promise<void>;
|
|
31
|
-
export declare const executeCallbacks: <TCallbackFunction extends CallbackFallback = CallbackFallback>(plugins: Plugin[], hook: string, args: Parameters<TCallbackFunction>[0]) => Promise<void>;
|
|
32
|
-
export {};
|
package/utils.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.validateOwnership = exports.validateModelAccess = exports.validateGroupAccess = exports.toSlug = exports.hasRwd = exports.hasPw = exports.filterAsync = exports.checkPermissions = exports.checkOwnership = exports.checkModelAccess = void 0;
|
|
9
9
|
|
|
10
10
|
var _slugify = _interopRequireDefault(require("slugify"));
|
|
11
11
|
|
|
@@ -233,42 +233,6 @@ const toSlug = text => {
|
|
|
233
233
|
|
|
234
234
|
exports.toSlug = toSlug;
|
|
235
235
|
|
|
236
|
-
const zeroPad = version => `${version}`.padStart(4, "0");
|
|
237
|
-
|
|
238
|
-
exports.zeroPad = zeroPad;
|
|
239
|
-
|
|
240
|
-
const createCmsPK = context => {
|
|
241
|
-
const {
|
|
242
|
-
tenancy,
|
|
243
|
-
cms
|
|
244
|
-
} = context;
|
|
245
|
-
const tenant = tenancy.getCurrentTenant();
|
|
246
|
-
|
|
247
|
-
if (!tenant) {
|
|
248
|
-
throw new Error("Tenant missing.");
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
const locale = cms.getLocale();
|
|
252
|
-
|
|
253
|
-
if (!locale) {
|
|
254
|
-
throw new Error("Locale missing.");
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
return `T#${tenant.id}#L#${locale.code}#CMS`;
|
|
258
|
-
};
|
|
259
|
-
|
|
260
|
-
exports.createCmsPK = createCmsPK;
|
|
261
|
-
|
|
262
|
-
const paginateBatch = async (items, perPage, execute) => {
|
|
263
|
-
const pages = Math.ceil(items.length / perPage);
|
|
264
|
-
|
|
265
|
-
for (let i = 0; i < pages; i++) {
|
|
266
|
-
await execute(items.slice(i * perPage, i * perPage + perPage));
|
|
267
|
-
}
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
exports.paginateBatch = paginateBatch;
|
|
271
|
-
|
|
272
236
|
const filterAsync = async (items, predicate) => {
|
|
273
237
|
const filteredItems = [];
|
|
274
238
|
|
|
@@ -284,15 +248,4 @@ const filterAsync = async (items, predicate) => {
|
|
|
284
248
|
return filteredItems;
|
|
285
249
|
};
|
|
286
250
|
|
|
287
|
-
exports.filterAsync = filterAsync;
|
|
288
|
-
|
|
289
|
-
const executeCallbacks = async (plugins, hook, args) => {
|
|
290
|
-
for (const plugin of plugins) {
|
|
291
|
-
if (typeof plugin[hook] === "function") {
|
|
292
|
-
await plugin[hook](args);
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
};
|
|
296
|
-
|
|
297
|
-
exports.executeCallbacks = executeCallbacks;
|
|
298
|
-
//# sourceMappingURL=utils.js.map
|
|
251
|
+
exports.filterAsync = filterAsync;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/content/contextSetup.ts"],"names":["extractHandlerHttpParameters","context","key","http","request","path","parameters","type","locale","split","WebinyError","ContextPlugin","method","cms","systemLocale","i18n","getLocale","READ","PREVIEW","MANAGE"],"mappings":";;;;;;;;;AACA;;AACA;;AAEA,MAAMA,4BAA4B,GAAIC,OAAD,IAAyB;AAAA;;AAC1D,QAAM;AAAEC,IAAAA,GAAG,GAAG;AAAR,MAAe,kBAAAD,OAAO,CAACE,IAAR,yFAAcC,OAAd,0GAAuBC,IAAvB,kFAA6BC,UAA7B,KAA2C,EAAhE;AACA,QAAM,CAACC,IAAD,EAAOC,MAAP,IAAiBN,GAAG,CAACO,KAAJ,CAAU,GAAV,CAAvB;;AACA,MAAI,CAACF,IAAL,EAAW;AACP,UAAM,IAAIG,cAAJ,CAAiB,qDAAjB,CAAN;AACH,GAFD,MAEO,IAAI,CAACF,MAAL,EAAa;AAChB,UAAM,IAAIE,cAAJ,CAAiB,uDAAjB,CAAN;AACH;;AAED,SAAO;AACHH,IAAAA,IADG;AAEHC,IAAAA;AAFG,GAAP;AAIH,CAbD;;eAee,MAAM;AACjB,SAAO,IAAIG,4BAAJ,CAA8B,MAAMV,OAAN,IAAiB;AAAA;;AAClD,QAAI,mBAAAA,OAAO,CAACE,IAAR,2FAAcC,OAAd,gFAAuBQ,MAAvB,MAAkC,SAAtC,EAAiD;AAC7C;AACH,KAFD,MAEO,IAAIX,OAAO,CAACY,GAAZ,EAAiB;AACpB,YAAM,IAAIH,cAAJ,CACF,sFADE,EAEF,+BAFE,CAAN;AAIH;;AAED,UAAM;AAAEH,MAAAA,IAAF;AAAQC,MAAAA;AAAR,QAAmBR,4BAA4B,CAACC,OAAD,CAArD;AAEA,UAAMa,YAAY,GAAGb,OAAO,CAACc,IAAR,CAAaC,SAAb,CAAuBR,MAAvB,CAArB;;AACA,QAAI,CAACM,YAAL,EAAmB;AACf,YAAM,IAAIJ,cAAJ,CAAiB,uBAAsBF,MAAO,kBAA9C,CAAN;AACH;;AAEDP,IAAAA,OAAO,CAACY,GAAR,GAAc;AACVN,MAAAA,IADU;AAEVC,MAAAA,MAFU;AAGVQ,MAAAA,SAAS,EAAE,MAAMF,YAHP;AAIVG,MAAAA,IAAI,EAAEV,IAAI,KAAK,MAJL;AAKVW,MAAAA,OAAO,EAAEX,IAAI,KAAK,SALR;AAMVY,MAAAA,MAAM,EAAEZ,IAAI,KAAK;AANP,KAAd;AAQH,GAzBM,CAAP;AA0BH,C","sourcesContent":["import { CmsContext } from \"~/types\";\nimport WebinyError from \"@webiny/error\";\nimport { ContextPlugin } from \"@webiny/handler/plugins/ContextPlugin\";\n\nconst extractHandlerHttpParameters = (context: CmsContext) => {\n const { key = \"\" } = context.http?.request?.path?.parameters || {};\n const [type, locale] = key.split(\"/\");\n if (!type) {\n throw new WebinyError(`Missing context.http.request.path parameter \"type\".`);\n } else if (!locale) {\n throw new WebinyError(`Missing context.http.request.path parameter \"locale\".`);\n }\n\n return {\n type,\n locale\n };\n};\n\nexport default () => {\n return new ContextPlugin<CmsContext>(async context => {\n if (context.http?.request?.method === \"OPTIONS\") {\n return;\n } else if (context.cms) {\n throw new WebinyError(\n \"Context setup plugin must be first to be registered. Cannot have anything before it.\",\n \"CMS_CONTEXT_INITIALIZED_ERROR\"\n );\n }\n\n const { type, locale } = extractHandlerHttpParameters(context);\n\n const systemLocale = context.i18n.getLocale(locale);\n if (!systemLocale) {\n throw new WebinyError(`There is no locale \"${locale}\" in the system.`);\n }\n\n context.cms = {\n type,\n locale,\n getLocale: () => systemLocale,\n READ: type === \"read\",\n PREVIEW: type === \"preview\",\n MANAGE: type === \"manage\"\n } as any;\n });\n};\n"],"file":"contextSetup.js"}
|