@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
|
@@ -5,24 +5,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
type: "cms-model-field-to-storage",
|
|
10
|
-
name: "cms-model-field-to-storage-default",
|
|
11
|
-
fieldType: "*",
|
|
8
|
+
var _StorageTransformPlugin = require("./StorageTransformPlugin");
|
|
12
9
|
|
|
13
|
-
|
|
10
|
+
const plugin = new _StorageTransformPlugin.StorageTransformPlugin({
|
|
11
|
+
fieldType: "*",
|
|
12
|
+
fromStorage: async ({
|
|
14
13
|
value
|
|
15
|
-
}) {
|
|
14
|
+
}) => {
|
|
16
15
|
return value;
|
|
17
16
|
},
|
|
18
|
-
|
|
19
|
-
async toStorage({
|
|
17
|
+
toStorage: async ({
|
|
20
18
|
value
|
|
21
|
-
}) {
|
|
19
|
+
}) => {
|
|
22
20
|
return value;
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
});
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
var _default = () => {
|
|
25
|
+
return plugin;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
exports.default = _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const _default: () =>
|
|
1
|
+
import { StorageTransformPlugin } from "./StorageTransformPlugin";
|
|
2
|
+
declare const _default: () => StorageTransformPlugin;
|
|
3
3
|
export default _default;
|
|
@@ -13,6 +13,8 @@ var _pReduce = _interopRequireDefault(require("p-reduce"));
|
|
|
13
13
|
|
|
14
14
|
var _pMap = _interopRequireDefault(require("p-map"));
|
|
15
15
|
|
|
16
|
+
var _StorageTransformPlugin = require("./StorageTransformPlugin");
|
|
17
|
+
|
|
16
18
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
17
19
|
|
|
18
20
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
@@ -21,14 +23,14 @@ const processValue = async ({
|
|
|
21
23
|
fields,
|
|
22
24
|
sourceValue,
|
|
23
25
|
getStoragePlugin,
|
|
24
|
-
|
|
26
|
+
plugins,
|
|
25
27
|
model,
|
|
26
28
|
operation
|
|
27
29
|
}) => {
|
|
28
30
|
return await (0, _pReduce.default)(fields, async (values, field) => {
|
|
29
31
|
const plugin = getStoragePlugin(field.type);
|
|
30
32
|
const value = await plugin[operation]({
|
|
31
|
-
|
|
33
|
+
plugins,
|
|
32
34
|
model,
|
|
33
35
|
field,
|
|
34
36
|
value: sourceValue[field.fieldId],
|
|
@@ -40,18 +42,15 @@ const processValue = async ({
|
|
|
40
42
|
}, {});
|
|
41
43
|
};
|
|
42
44
|
|
|
43
|
-
|
|
44
|
-
type: "cms-model-field-to-storage",
|
|
45
|
-
name: "cms-model-field-to-storage-object",
|
|
45
|
+
const plugin = new _StorageTransformPlugin.StorageTransformPlugin({
|
|
46
46
|
fieldType: "object",
|
|
47
|
-
|
|
48
|
-
async fromStorage({
|
|
47
|
+
toStorage: async ({
|
|
49
48
|
field,
|
|
50
49
|
value,
|
|
51
50
|
getStoragePlugin,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}) {
|
|
51
|
+
model,
|
|
52
|
+
plugins
|
|
53
|
+
}) => {
|
|
55
54
|
if (!value) {
|
|
56
55
|
return null;
|
|
57
56
|
}
|
|
@@ -59,12 +58,12 @@ var _default = () => ({
|
|
|
59
58
|
const fields = field.settings.fields;
|
|
60
59
|
|
|
61
60
|
if (field.multipleValues) {
|
|
62
|
-
return (0, _pMap.default)(value, value => processValue({
|
|
61
|
+
return await (0, _pMap.default)(value, value => processValue({
|
|
63
62
|
sourceValue: value,
|
|
64
63
|
getStoragePlugin,
|
|
65
64
|
model,
|
|
66
|
-
|
|
67
|
-
operation: "
|
|
65
|
+
plugins,
|
|
66
|
+
operation: "toStorage",
|
|
68
67
|
fields
|
|
69
68
|
}));
|
|
70
69
|
}
|
|
@@ -73,19 +72,18 @@ var _default = () => ({
|
|
|
73
72
|
sourceValue: value,
|
|
74
73
|
getStoragePlugin,
|
|
75
74
|
model,
|
|
76
|
-
|
|
77
|
-
operation: "
|
|
75
|
+
plugins,
|
|
76
|
+
operation: "toStorage",
|
|
78
77
|
fields
|
|
79
78
|
});
|
|
80
79
|
},
|
|
81
|
-
|
|
82
|
-
async toStorage({
|
|
80
|
+
fromStorage: async ({
|
|
83
81
|
field,
|
|
84
82
|
value,
|
|
85
83
|
getStoragePlugin,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}) {
|
|
84
|
+
plugins,
|
|
85
|
+
model
|
|
86
|
+
}) => {
|
|
89
87
|
if (!value) {
|
|
90
88
|
return null;
|
|
91
89
|
}
|
|
@@ -93,28 +91,29 @@ var _default = () => ({
|
|
|
93
91
|
const fields = field.settings.fields;
|
|
94
92
|
|
|
95
93
|
if (field.multipleValues) {
|
|
96
|
-
|
|
94
|
+
return (0, _pMap.default)(value, value => processValue({
|
|
97
95
|
sourceValue: value,
|
|
98
96
|
getStoragePlugin,
|
|
99
97
|
model,
|
|
100
|
-
|
|
101
|
-
operation: "
|
|
98
|
+
plugins,
|
|
99
|
+
operation: "fromStorage",
|
|
102
100
|
fields
|
|
103
101
|
}));
|
|
104
|
-
return mValues;
|
|
105
102
|
}
|
|
106
103
|
|
|
107
104
|
return processValue({
|
|
108
105
|
sourceValue: value,
|
|
109
106
|
getStoragePlugin,
|
|
110
107
|
model,
|
|
111
|
-
|
|
112
|
-
operation: "
|
|
108
|
+
plugins,
|
|
109
|
+
operation: "fromStorage",
|
|
113
110
|
fields
|
|
114
111
|
});
|
|
115
112
|
}
|
|
116
|
-
|
|
117
113
|
});
|
|
118
114
|
|
|
119
|
-
|
|
120
|
-
|
|
115
|
+
var _default = () => {
|
|
116
|
+
return plugin;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
exports.default = _default;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CmsEntry, CmsModel, CmsModelField, CmsContext } from "../../../types";
|
|
2
2
|
/**
|
|
3
3
|
* A function that is used in crud to transform entry into the storage type.
|
|
4
4
|
*/
|
|
5
|
-
export declare const entryToStorageTransform: (context: CmsContext, model:
|
|
5
|
+
export declare const entryToStorageTransform: (context: CmsContext, model: CmsModel, entry: CmsEntry) => Promise<CmsEntry>;
|
|
6
6
|
/**
|
|
7
7
|
* A function that is used to transform the whole entry from storage into its native form.
|
|
8
8
|
*/
|
|
9
|
-
export declare const entryFromStorageTransform: (context: CmsContext, model:
|
|
9
|
+
export declare const entryFromStorageTransform: (context: CmsContext, model: CmsModel, entry?: CmsEntry & Record<string, any>) => Promise<CmsEntry>;
|
|
10
10
|
interface EntryFieldFromStorageTransformParams {
|
|
11
11
|
context: CmsContext;
|
|
12
|
-
model:
|
|
13
|
-
field:
|
|
12
|
+
model: CmsModel;
|
|
13
|
+
field: CmsModelField;
|
|
14
14
|
value: any;
|
|
15
15
|
}
|
|
16
16
|
export declare const entryFieldFromStorageTransform: (params: EntryFieldFromStorageTransformParams) => Promise<any>;
|
|
@@ -11,28 +11,36 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
11
11
|
|
|
12
12
|
var _error = _interopRequireDefault(require("@webiny/error"));
|
|
13
13
|
|
|
14
|
+
var _StorageTransformPlugin = require("../storage/StorageTransformPlugin");
|
|
15
|
+
|
|
14
16
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
15
17
|
|
|
16
18
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
17
19
|
|
|
18
20
|
const getStoragePluginFactory = context => {
|
|
19
21
|
let defaultStoragePlugin;
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
.reverse().forEach(plugin => {
|
|
22
|
+
const plugins = context.plugins.byType(_StorageTransformPlugin.StorageTransformPlugin.type) // we reverse plugins because we want to get latest added only
|
|
23
|
+
.reverse().reduce((collection, plugin) => {
|
|
23
24
|
// check if it's a default plugin
|
|
24
25
|
if (plugin.fieldType === "*" && !defaultStoragePlugin) {
|
|
25
26
|
defaultStoragePlugin = plugin;
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
|
|
27
|
+
return collection;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* either existing plugin added or plugin fieldType does not exist in current model
|
|
31
|
+
* this is to iterate a bit less later
|
|
32
|
+
*/
|
|
29
33
|
|
|
30
34
|
|
|
31
|
-
if (!
|
|
32
|
-
|
|
35
|
+
if (!collection[plugin.fieldType]) {
|
|
36
|
+
collection[plugin.fieldType] = plugin;
|
|
33
37
|
}
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
|
|
39
|
+
return collection;
|
|
40
|
+
}, {});
|
|
41
|
+
return fieldType => {
|
|
42
|
+
return plugins[fieldType] || defaultStoragePlugin;
|
|
43
|
+
};
|
|
36
44
|
};
|
|
37
45
|
/**
|
|
38
46
|
* This should be used when transforming the whole entry.
|
|
@@ -51,7 +59,7 @@ const entryStorageTransform = async (context, model, operation, entry) => {
|
|
|
51
59
|
}
|
|
52
60
|
|
|
53
61
|
transformedValues[field.fieldId] = await plugin[operation]({
|
|
54
|
-
context,
|
|
62
|
+
plugins: context.plugins,
|
|
55
63
|
model,
|
|
56
64
|
field,
|
|
57
65
|
value: entry.values[field.fieldId],
|
|
@@ -106,7 +114,7 @@ const entryFieldFromStorageTransform = async params => {
|
|
|
106
114
|
}
|
|
107
115
|
|
|
108
116
|
return plugin.fromStorage({
|
|
109
|
-
context,
|
|
117
|
+
plugins: context.plugins,
|
|
110
118
|
model,
|
|
111
119
|
field,
|
|
112
120
|
value,
|
|
@@ -114,5 +122,4 @@ const entryFieldFromStorageTransform = async params => {
|
|
|
114
122
|
});
|
|
115
123
|
};
|
|
116
124
|
|
|
117
|
-
exports.entryFieldFromStorageTransform = entryFieldFromStorageTransform;
|
|
118
|
-
//# sourceMappingURL=entryStorage.js.map
|
|
125
|
+
exports.entryFieldFromStorageTransform = entryFieldFromStorageTransform;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function getEntryTitle(model:
|
|
1
|
+
import { CmsEntry, CmsModel } from "../../../types";
|
|
2
|
+
export declare function getEntryTitle(model: CmsModel, entry: CmsEntry): any;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CmsModel, CmsContext, CmsFieldTypePlugins } from "../../../types";
|
|
2
2
|
import { GraphQLSchemaDefinition } from "@webiny/handler-graphql/types";
|
|
3
3
|
interface RenderTypesFromFieldPlugins {
|
|
4
4
|
(params: {
|
|
5
|
-
models:
|
|
5
|
+
models: CmsModel[];
|
|
6
6
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
7
7
|
type: string;
|
|
8
8
|
}): GraphQLSchemaDefinition<CmsContext>[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CmsFieldTypePlugins,
|
|
1
|
+
import { CmsFieldTypePlugins, CmsModel, CmsModelFieldDefinition } from "../../../types";
|
|
2
2
|
interface RenderFields {
|
|
3
3
|
(params: {
|
|
4
|
-
model:
|
|
4
|
+
model: CmsModel;
|
|
5
5
|
type: string;
|
|
6
6
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
7
7
|
}): CmsModelFieldDefinition[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CmsFieldTypePlugins,
|
|
1
|
+
import { CmsFieldTypePlugins, CmsModel } from "../../../types";
|
|
2
2
|
interface RenderGetFilterFields {
|
|
3
3
|
(params: {
|
|
4
|
-
model:
|
|
4
|
+
model: CmsModel;
|
|
5
5
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
6
6
|
}): string;
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CmsFieldTypePlugins,
|
|
1
|
+
import { CmsFieldTypePlugins, CmsModel, CmsModelFieldDefinition } from "../../../types";
|
|
2
2
|
interface RenderInputFields {
|
|
3
3
|
(params: {
|
|
4
|
-
model:
|
|
4
|
+
model: CmsModel;
|
|
5
5
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
6
6
|
}): CmsModelFieldDefinition[];
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CmsFieldTypePlugins,
|
|
1
|
+
import { CmsFieldTypePlugins, CmsModel } from "../../../types";
|
|
2
2
|
interface RenderListFilterFields {
|
|
3
3
|
(params: {
|
|
4
|
-
model:
|
|
4
|
+
model: CmsModel;
|
|
5
5
|
type: "read" | "manage";
|
|
6
6
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
7
7
|
}): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CmsFieldTypePlugins,
|
|
1
|
+
import { CmsFieldTypePlugins, CmsModel } from "../../../types";
|
|
2
2
|
interface RenderSortEnum {
|
|
3
3
|
(params: {
|
|
4
|
-
model:
|
|
4
|
+
model: CmsModel;
|
|
5
5
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
6
6
|
}): string;
|
|
7
7
|
}
|
|
@@ -33,5 +33,4 @@ var _timeGte = _interopRequireDefault(require("./timeGte"));
|
|
|
33
33
|
|
|
34
34
|
var _default = () => [_gte.default, _in.default, _lte.default, _pattern.default, _required.default, _minLength.default, _maxLength.default, _patternPlugins.default, (0, _dateLte.default)(), (0, _dateGte.default)(), (0, _timeLte.default)(), (0, _timeGte.default)()];
|
|
35
35
|
|
|
36
|
-
exports.default = _default;
|
|
37
|
-
//# sourceMappingURL=index.js.map
|
|
36
|
+
exports.default = _default;
|
|
@@ -16,5 +16,4 @@ var _lowerCase = _interopRequireDefault(require("./lowerCase"));
|
|
|
16
16
|
var _upperCase = _interopRequireDefault(require("./upperCase"));
|
|
17
17
|
|
|
18
18
|
var _default = [_email.default, _url.default, _lowerCase.default, _upperCase.default];
|
|
19
|
-
exports.default = _default;
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
19
|
+
exports.default = _default;
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Params as CreateAdminCrudsParams } from "./plugins/crud";
|
|
2
|
+
import { Params as CreateContentCrudsParams } from "./content/plugins/crud";
|
|
3
|
+
import { CreateGraphQLHandlerOptions } from "./content/graphQLHandlerFactory";
|
|
4
|
+
import { StorageTransformPlugin } from "./content/plugins/storage/StorageTransformPlugin";
|
|
5
|
+
export declare type AdminContextParams = CreateAdminCrudsParams;
|
|
6
|
+
export declare const createAdminHeadlessCmsContext: (params: AdminContextParams) => (import("@webiny/handler/plugins/ContextPlugin").ContextPlugin<import("./types").CmsContext> | import("@webiny/api-upgrade").UpgradePlugin<import("./types").CmsContext>[])[];
|
|
7
|
+
export declare const createAdminHeadlessCmsGraphQL: () => import("@webiny/handler-graphql/types").GraphQLSchemaPlugin<import("@webiny/handler/types").ContextInterface>;
|
|
8
|
+
export declare type ContentContextParams = CreateContentCrudsParams;
|
|
9
|
+
export declare const createContentHeadlessCmsContext: (params: ContentContextParams) => (import("./types").ModelManagerPlugin | import("@webiny/handler/plugins/ContextPlugin").ContextPlugin<import("./types").CmsContext> | import("./types").CmsModelFieldToGraphQLPlugin[] | StorageTransformPlugin<any, any> | (import("./types").CmsModelFieldValidatorPlugin | import("./types").CmsModelFieldPatternValidatorPlugin[])[])[];
|
|
10
|
+
export declare type ContentGraphQLParams = CreateGraphQLHandlerOptions;
|
|
11
|
+
export declare const createContentHeadlessCmsGraphQL: (params?: ContentGraphQLParams) => import("@webiny/plugins/types").PluginCollection;
|
|
12
|
+
export { StorageTransformPlugin };
|
package/index.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports, "StorageTransformPlugin", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () {
|
|
11
|
+
return _StorageTransformPlugin.StorageTransformPlugin;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
exports.createContentHeadlessCmsGraphQL = exports.createContentHeadlessCmsContext = exports.createAdminHeadlessCmsGraphQL = exports.createAdminHeadlessCmsContext = void 0;
|
|
15
|
+
|
|
16
|
+
var _graphql = require("./plugins/graphql");
|
|
17
|
+
|
|
18
|
+
var _crud = require("./plugins/crud");
|
|
19
|
+
|
|
20
|
+
var _context = _interopRequireDefault(require("./plugins/context"));
|
|
21
|
+
|
|
22
|
+
var _upgrades = _interopRequireDefault(require("./plugins/upgrades"));
|
|
23
|
+
|
|
24
|
+
var _contextSetup = _interopRequireDefault(require("./content/contextSetup"));
|
|
25
|
+
|
|
26
|
+
var _modelManager = _interopRequireDefault(require("./content/plugins/modelManager"));
|
|
27
|
+
|
|
28
|
+
var _crud2 = require("./content/plugins/crud");
|
|
29
|
+
|
|
30
|
+
var _graphqlFields = _interopRequireDefault(require("./content/plugins/graphqlFields"));
|
|
31
|
+
|
|
32
|
+
var _validators = _interopRequireDefault(require("./content/plugins/validators"));
|
|
33
|
+
|
|
34
|
+
var _default = _interopRequireDefault(require("./content/plugins/storage/default"));
|
|
35
|
+
|
|
36
|
+
var _object = _interopRequireDefault(require("./content/plugins/storage/object"));
|
|
37
|
+
|
|
38
|
+
var _graphQLHandlerFactory = require("./content/graphQLHandlerFactory");
|
|
39
|
+
|
|
40
|
+
var _StorageTransformPlugin = require("./content/plugins/storage/StorageTransformPlugin");
|
|
41
|
+
|
|
42
|
+
const createAdminHeadlessCmsContext = params => {
|
|
43
|
+
return [(0, _context.default)(), (0, _crud.createAdminCruds)(params), (0, _upgrades.default)()];
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
exports.createAdminHeadlessCmsContext = createAdminHeadlessCmsContext;
|
|
47
|
+
|
|
48
|
+
const createAdminHeadlessCmsGraphQL = () => {
|
|
49
|
+
return (0, _graphql.createGraphQLPlugin)();
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
exports.createAdminHeadlessCmsGraphQL = createAdminHeadlessCmsGraphQL;
|
|
53
|
+
|
|
54
|
+
const createContentHeadlessCmsContext = params => {
|
|
55
|
+
return [(0, _contextSetup.default)(), (0, _modelManager.default)(), (0, _crud2.createContentCruds)(params), (0, _graphqlFields.default)(), (0, _validators.default)(), (0, _default.default)(), (0, _object.default)() // new InternalAuthenticationPlugin("read-api-key"),
|
|
56
|
+
// new InternalAuthorizationPlugin("read-api-key")
|
|
57
|
+
];
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
exports.createContentHeadlessCmsContext = createContentHeadlessCmsContext;
|
|
61
|
+
|
|
62
|
+
const createContentHeadlessCmsGraphQL = params => {
|
|
63
|
+
return (0, _graphQLHandlerFactory.graphQLHandlerFactory)(params);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
exports.createContentHeadlessCmsGraphQL = createContentHeadlessCmsGraphQL;
|