@webiny/api-headless-cms 0.0.0-mt-3 → 0.0.0-unstable.8c4d9f045a
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/context.d.ts +3 -0
- package/context.js +64 -0
- package/context.js.map +1 -0
- package/crud/contentEntry/afterDelete.d.ts +8 -0
- package/{content/plugins/crud → crud}/contentEntry/afterDelete.js +2 -2
- package/crud/contentEntry/afterDelete.js.map +1 -0
- package/crud/contentEntry/beforeCreate.d.ts +8 -0
- package/{content/plugins/crud → crud}/contentEntry/beforeCreate.js +2 -2
- package/crud/contentEntry/beforeCreate.js.map +1 -0
- package/crud/contentEntry/beforeUpdate.d.ts +8 -0
- package/{content/plugins/crud → crud}/contentEntry/beforeUpdate.js +2 -2
- package/crud/contentEntry/beforeUpdate.js.map +1 -0
- package/crud/contentEntry/entryDataValidation.d.ts +10 -0
- package/{content/plugins/crud → crud}/contentEntry/entryDataValidation.js +26 -10
- package/crud/contentEntry/entryDataValidation.js.map +1 -0
- package/{content/plugins/crud → crud}/contentEntry/markLockedFields.d.ts +3 -2
- package/{content/plugins/crud → crud}/contentEntry/markLockedFields.js +6 -6
- package/crud/contentEntry/markLockedFields.js.map +1 -0
- package/crud/contentEntry/referenceFieldsMapping.d.ts +13 -0
- package/crud/contentEntry/referenceFieldsMapping.js +294 -0
- package/crud/contentEntry/referenceFieldsMapping.js.map +1 -0
- package/{content/plugins/crud → crud}/contentEntry.crud.d.ts +5 -7
- package/{content/plugins/crud → crud}/contentEntry.crud.js +585 -219
- package/crud/contentEntry.crud.js.map +1 -0
- package/crud/contentModel/afterCreate.d.ts +8 -0
- package/{content/plugins/crud → crud}/contentModel/afterCreate.js +2 -2
- package/crud/contentModel/afterCreate.js.map +1 -0
- package/crud/contentModel/afterCreateFrom.d.ts +8 -0
- package/crud/contentModel/afterCreateFrom.js +18 -0
- package/crud/contentModel/afterCreateFrom.js.map +1 -0
- package/crud/contentModel/afterDelete.d.ts +8 -0
- package/{content/plugins/crud → crud}/contentModel/afterDelete.js +2 -2
- package/crud/contentModel/afterDelete.js.map +1 -0
- package/crud/contentModel/afterUpdate.d.ts +8 -0
- package/{content/plugins/crud → crud}/contentModel/afterUpdate.js +2 -2
- package/crud/contentModel/afterUpdate.js.map +1 -0
- package/crud/contentModel/beforeCreate.d.ts +15 -0
- package/{content/plugins/crud → crud}/contentModel/beforeCreate.js +58 -10
- package/crud/contentModel/beforeCreate.js.map +1 -0
- package/{content/plugins/crud → crud}/contentModel/beforeDelete.d.ts +5 -4
- package/{content/plugins/crud → crud}/contentModel/beforeDelete.js +10 -6
- package/crud/contentModel/beforeDelete.js.map +1 -0
- package/{content/plugins/crud → crud}/contentModel/beforeUpdate.d.ts +5 -4
- package/crud/contentModel/beforeUpdate.js +37 -0
- package/crud/contentModel/beforeUpdate.js.map +1 -0
- package/crud/contentModel/contentModelManagerFactory.d.ts +2 -0
- package/{content/plugins/crud → crud}/contentModel/contentModelManagerFactory.js +0 -0
- package/crud/contentModel/contentModelManagerFactory.js.map +1 -0
- package/crud/contentModel/createFieldModels.d.ts +2 -0
- package/{content/plugins/crud → crud}/contentModel/createFieldModels.js +6 -2
- package/crud/contentModel/createFieldModels.js.map +1 -0
- package/crud/contentModel/createFieldStorageId.d.ts +2 -0
- package/crud/contentModel/createFieldStorageId.js +16 -0
- package/crud/contentModel/createFieldStorageId.js.map +1 -0
- package/crud/contentModel/fieldIdValidation.d.ts +1 -0
- package/crud/contentModel/fieldIdValidation.js +25 -0
- package/crud/contentModel/fieldIdValidation.js.map +1 -0
- package/crud/contentModel/idValidation.d.ts +1 -0
- package/{content/plugins/crud → crud}/contentModel/idValidation.js +3 -3
- package/crud/contentModel/idValidation.js.map +1 -0
- package/{content/plugins/crud → crud}/contentModel/models.d.ts +2 -1
- package/{content/plugins/crud → crud}/contentModel/models.js +64 -25
- package/crud/contentModel/models.js.map +1 -0
- package/crud/contentModel/systemFields.d.ts +1 -0
- package/crud/contentModel/systemFields.js +8 -0
- package/crud/contentModel/systemFields.js.map +1 -0
- package/crud/contentModel/validateLayout.d.ts +2 -0
- package/{content/plugins/crud → crud}/contentModel/validateLayout.js +1 -3
- package/crud/contentModel/validateLayout.js.map +1 -0
- package/crud/contentModel/validateModel.d.ts +9 -0
- package/crud/contentModel/validateModel.js +32 -0
- package/crud/contentModel/validateModel.js.map +1 -0
- package/crud/contentModel/validateModelFields.d.ts +9 -0
- package/crud/contentModel/validateModelFields.js +363 -0
- package/crud/contentModel/validateModelFields.js.map +1 -0
- package/{content/plugins/crud → crud}/contentModel.crud.d.ts +3 -3
- package/{content/plugins/crud → crud}/contentModel.crud.js +251 -95
- package/crud/contentModel.crud.js.map +1 -0
- package/{content/plugins/crud → crud}/contentModelGroup/beforeCreate.d.ts +4 -3
- package/{content/plugins/crud → crud}/contentModelGroup/beforeCreate.js +6 -6
- package/crud/contentModelGroup/beforeCreate.js.map +1 -0
- package/{content/plugins/crud → crud}/contentModelGroup/beforeDelete.d.ts +4 -3
- package/{content/plugins/crud → crud}/contentModelGroup/beforeDelete.js +1 -1
- package/crud/contentModelGroup/beforeDelete.js.map +1 -0
- package/crud/contentModelGroup/beforeUpdate.d.ts +9 -0
- package/{content/plugins/crud → crud}/contentModelGroup/beforeUpdate.js +1 -1
- package/crud/contentModelGroup/beforeUpdate.js.map +1 -0
- package/{content/plugins/crud → crud}/contentModelGroup.crud.d.ts +3 -3
- package/{content/plugins/crud → crud}/contentModelGroup.crud.js +54 -59
- package/crud/contentModelGroup.crud.js.map +1 -0
- package/crud/index.d.ts +6 -0
- package/{content/plugins/crud → crud}/index.js +15 -26
- package/crud/index.js.map +1 -0
- package/{plugins/crud → crud}/settings.crud.d.ts +3 -3
- package/crud/settings.crud.js +88 -0
- package/crud/settings.crud.js.map +1 -0
- package/{plugins/crud → crud}/system.crud.d.ts +6 -3
- package/{plugins/crud → crud}/system.crud.js +43 -16
- package/crud/system.crud.js.map +1 -0
- package/fieldConverters/CmsModelDefaultFieldConverterPlugin.d.ts +7 -0
- package/fieldConverters/CmsModelDefaultFieldConverterPlugin.js +66 -0
- package/fieldConverters/CmsModelDefaultFieldConverterPlugin.js.map +1 -0
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.d.ts +11 -0
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.js +306 -0
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.js.map +1 -0
- package/fieldConverters/index.d.ts +3 -0
- package/fieldConverters/index.js +16 -0
- package/fieldConverters/index.js.map +1 -0
- package/{content/plugins → graphql}/buildSchemaPlugins.d.ts +2 -3
- package/graphql/buildSchemaPlugins.js +27 -0
- package/graphql/buildSchemaPlugins.js.map +1 -0
- package/graphql/graphQLHandlerFactory.d.ts +5 -0
- package/graphql/graphQLHandlerFactory.js +158 -0
- package/graphql/graphQLHandlerFactory.js.map +1 -0
- package/graphql/index.d.ts +5 -0
- package/graphql/index.js +57 -0
- package/graphql/index.js.map +1 -0
- package/graphql/schema/baseContentSchema.d.ts +3 -0
- package/{content/plugins/schema/baseSchema.js → graphql/schema/baseContentSchema.js} +10 -28
- package/graphql/schema/baseContentSchema.js.map +1 -0
- package/graphql/schema/contentEntries.d.ts +3 -0
- package/graphql/schema/contentEntries.js +351 -0
- package/graphql/schema/contentEntries.js.map +1 -0
- package/graphql/schema/contentModelGroups.d.ts +3 -0
- package/{content/plugins → graphql}/schema/contentModelGroups.js +34 -15
- package/graphql/schema/contentModelGroups.js.map +1 -0
- package/graphql/schema/contentModels.d.ts +3 -0
- package/{content/plugins → graphql}/schema/contentModels.js +47 -10
- package/graphql/schema/contentModels.js.map +1 -0
- package/graphql/schema/createFieldResolvers.d.ts +20 -0
- package/{content/plugins → graphql}/schema/createFieldResolvers.js +48 -17
- package/graphql/schema/createFieldResolvers.js.map +1 -0
- package/graphql/schema/createManageResolvers.d.ts +12 -0
- package/{content/plugins → graphql}/schema/createManageResolvers.js +35 -19
- package/graphql/schema/createManageResolvers.js.map +1 -0
- package/graphql/schema/createManageSDL.d.ts +10 -0
- package/{content/plugins → graphql}/schema/createManageSDL.js +20 -9
- package/graphql/schema/createManageSDL.js.map +1 -0
- package/graphql/schema/createPreviewResolvers.d.ts +12 -0
- package/{content/plugins → graphql}/schema/createPreviewResolvers.js +16 -9
- package/graphql/schema/createPreviewResolvers.js.map +1 -0
- package/graphql/schema/createReadResolvers.d.ts +12 -0
- package/{content/plugins → graphql}/schema/createReadResolvers.js +16 -9
- package/graphql/schema/createReadResolvers.js.map +1 -0
- package/graphql/schema/createReadSDL.d.ts +10 -0
- package/{content/plugins → graphql}/schema/createReadSDL.js +14 -8
- package/graphql/schema/createReadSDL.js.map +1 -0
- package/graphql/schema/resolvers/commonFieldResolvers.d.ts +6 -0
- package/{content/plugins → graphql}/schema/resolvers/commonFieldResolvers.js +0 -0
- package/graphql/schema/resolvers/commonFieldResolvers.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveCreate.d.ts +7 -0
- package/{content/plugins → graphql}/schema/resolvers/manage/resolveCreate.js +2 -4
- package/graphql/schema/resolvers/manage/resolveCreate.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveCreateFrom.d.ts +8 -0
- package/{content/plugins → graphql}/schema/resolvers/manage/resolveCreateFrom.js +2 -4
- package/graphql/schema/resolvers/manage/resolveCreateFrom.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveDelete.d.ts +7 -0
- package/{content/plugins → graphql}/schema/resolvers/manage/resolveDelete.js +10 -8
- package/graphql/schema/resolvers/manage/resolveDelete.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveGet.d.ts +7 -0
- package/graphql/schema/resolvers/manage/resolveGet.js +83 -0
- package/graphql/schema/resolvers/manage/resolveGet.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveGetByIds.d.ts +7 -0
- package/{content/plugins → graphql}/schema/resolvers/manage/resolveGetByIds.js +2 -4
- package/graphql/schema/resolvers/manage/resolveGetByIds.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveGetRevisions.d.ts +7 -0
- package/{content/plugins → graphql}/schema/resolvers/manage/resolveGetRevisions.js +2 -4
- package/graphql/schema/resolvers/manage/resolveGetRevisions.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveList.d.ts +4 -0
- package/{content/plugins/schema/resolvers/read → graphql/schema/resolvers/manage}/resolveList.js +2 -4
- package/graphql/schema/resolvers/manage/resolveList.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolvePublish.d.ts +7 -0
- package/{content/plugins → graphql}/schema/resolvers/manage/resolvePublish.js +0 -0
- package/graphql/schema/resolvers/manage/resolvePublish.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveRepublish.d.ts +7 -0
- package/{content/plugins/schema/resolvers/manage/resolveGet.js → graphql/schema/resolvers/manage/resolveRepublish.js} +4 -4
- package/graphql/schema/resolvers/manage/resolveRepublish.js.map +1 -0
- package/{content/plugins → graphql}/schema/resolvers/manage/resolveRequestChanges.d.ts +4 -3
- package/{content/plugins → graphql}/schema/resolvers/manage/resolveRequestChanges.js +2 -4
- package/graphql/schema/resolvers/manage/resolveRequestChanges.js.map +1 -0
- package/{content/plugins → graphql}/schema/resolvers/manage/resolveRequestReview.d.ts +4 -3
- package/{content/plugins → graphql}/schema/resolvers/manage/resolveRequestReview.js +2 -4
- package/graphql/schema/resolvers/manage/resolveRequestReview.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveUnpublish.d.ts +7 -0
- package/{content/plugins → graphql}/schema/resolvers/manage/resolveUnpublish.js +0 -0
- package/graphql/schema/resolvers/manage/resolveUnpublish.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveUpdate.d.ts +8 -0
- package/{content/plugins → graphql}/schema/resolvers/manage/resolveUpdate.js +2 -4
- package/graphql/schema/resolvers/manage/resolveUpdate.js.map +1 -0
- package/graphql/schema/resolvers/preview/resolveGet.d.ts +4 -0
- package/{content/plugins → graphql}/schema/resolvers/preview/resolveGet.js +2 -2
- package/graphql/schema/resolvers/preview/resolveGet.js.map +1 -0
- package/graphql/schema/resolvers/preview/resolveList.d.ts +4 -0
- package/{content/plugins → graphql}/schema/resolvers/preview/resolveList.js +2 -4
- package/graphql/schema/resolvers/preview/resolveList.js.map +1 -0
- package/graphql/schema/resolvers/read/resolveGet.d.ts +4 -0
- package/{content/plugins → graphql}/schema/resolvers/read/resolveGet.js +2 -2
- package/graphql/schema/resolvers/read/resolveGet.js.map +1 -0
- package/graphql/schema/resolvers/read/resolveList.d.ts +4 -0
- package/{content/plugins/schema/resolvers/manage → graphql/schema/resolvers/read}/resolveList.js +2 -4
- package/graphql/schema/resolvers/read/resolveList.js.map +1 -0
- package/{content/plugins → graphql}/schema/schemaPlugins.d.ts +1 -1
- package/{content/plugins → graphql}/schema/schemaPlugins.js +25 -6
- package/graphql/schema/schemaPlugins.js.map +1 -0
- package/graphql/system.d.ts +6 -0
- package/graphql/system.js +119 -0
- package/graphql/system.js.map +1 -0
- package/graphqlFields/boolean.d.ts +2 -0
- package/graphqlFields/boolean.js +69 -0
- package/graphqlFields/boolean.js.map +1 -0
- package/graphqlFields/datetime.d.ts +2 -0
- package/graphqlFields/datetime.js +95 -0
- package/graphqlFields/datetime.js.map +1 -0
- package/graphqlFields/file.d.ts +2 -0
- package/graphqlFields/file.js +50 -0
- package/graphqlFields/file.js.map +1 -0
- package/graphqlFields/helpers.d.ts +6 -0
- package/graphqlFields/helpers.js +49 -0
- package/graphqlFields/helpers.js.map +1 -0
- package/graphqlFields/index.d.ts +2 -0
- package/graphqlFields/index.js +28 -0
- package/graphqlFields/index.js.map +1 -0
- package/graphqlFields/longText.d.ts +2 -0
- package/graphqlFields/longText.js +63 -0
- package/graphqlFields/longText.js.map +1 -0
- package/graphqlFields/number.d.ts +2 -0
- package/graphqlFields/number.js +75 -0
- package/graphqlFields/number.js.map +1 -0
- package/graphqlFields/object.d.ts +2 -0
- package/graphqlFields/object.js +225 -0
- package/graphqlFields/object.js.map +1 -0
- package/graphqlFields/ref.d.ts +2 -0
- package/graphqlFields/ref.js +279 -0
- package/graphqlFields/ref.js.map +1 -0
- package/graphqlFields/richText.d.ts +2 -0
- package/graphqlFields/richText.js +56 -0
- package/graphqlFields/richText.js.map +1 -0
- package/graphqlFields/text.d.ts +2 -0
- package/graphqlFields/text.js +73 -0
- package/graphqlFields/text.js.map +1 -0
- package/index.d.ts +10 -12
- package/index.js +80 -37
- package/index.js.map +1 -0
- package/modelManager/DefaultCmsModelManager.d.ts +14 -0
- package/{content/plugins/modelManager → modelManager}/DefaultCmsModelManager.js +11 -9
- package/modelManager/DefaultCmsModelManager.js.map +1 -0
- package/modelManager/index.d.ts +2 -0
- package/{content/plugins/modelManager → modelManager}/index.js +3 -3
- package/modelManager/index.js.map +1 -0
- package/package.json +37 -36
- package/parameters/context.d.ts +2 -0
- package/parameters/context.js +22 -0
- package/parameters/context.js.map +1 -0
- package/parameters/header.d.ts +2 -0
- package/parameters/header.js +55 -0
- package/parameters/header.js.map +1 -0
- package/parameters/index.d.ts +4 -0
- package/parameters/index.js +57 -0
- package/parameters/index.js.map +1 -0
- package/parameters/manual.d.ts +6 -0
- package/parameters/manual.js +45 -0
- package/parameters/manual.js.map +1 -0
- package/parameters/path.d.ts +2 -0
- package/parameters/path.js +51 -0
- package/parameters/path.js.map +1 -0
- package/plugins/CmsGroupPlugin.d.ts +13 -0
- package/{content/plugins → plugins}/CmsGroupPlugin.js +8 -2
- package/plugins/CmsGroupPlugin.js.map +1 -0
- package/plugins/CmsModelFieldConverterPlugin.d.ts +14 -0
- package/plugins/CmsModelFieldConverterPlugin.js +17 -0
- package/plugins/CmsModelFieldConverterPlugin.js.map +1 -0
- package/plugins/CmsModelPlugin.d.ts +41 -0
- package/plugins/CmsModelPlugin.js +189 -0
- package/plugins/CmsModelPlugin.js.map +1 -0
- package/plugins/CmsParametersPlugin.d.ts +20 -0
- package/plugins/CmsParametersPlugin.js +28 -0
- package/plugins/CmsParametersPlugin.js.map +1 -0
- package/{content/plugins/storage → plugins}/StorageTransformPlugin.d.ts +4 -3
- package/{content/plugins/storage → plugins}/StorageTransformPlugin.js +1 -0
- package/plugins/StorageTransformPlugin.js.map +1 -0
- package/plugins/index.d.ts +5 -0
- package/plugins/index.js +70 -0
- package/plugins/index.js.map +1 -0
- package/storage/default.d.ts +2 -0
- package/storage/default.js +27 -0
- package/storage/default.js.map +1 -0
- package/storage/object.d.ts +2 -0
- package/storage/object.js +128 -0
- package/storage/object.js.map +1 -0
- package/types.d.ts +413 -246
- package/types.js +52 -0
- package/types.js.map +1 -0
- package/upgrades/5.33.0/index.d.ts +3 -0
- package/upgrades/5.33.0/index.js +186 -0
- package/upgrades/5.33.0/index.js.map +1 -0
- package/upgrades/index.d.ts +1 -0
- package/upgrades/index.js +12 -0
- package/upgrades/index.js.map +1 -0
- package/utils/access.d.ts +8 -0
- package/utils/access.js +90 -0
- package/utils/access.js.map +1 -0
- package/utils/converters/Converter.d.ts +27 -0
- package/utils/converters/Converter.js +71 -0
- package/utils/converters/Converter.js.map +1 -0
- package/utils/converters/ConverterCollection.d.ts +24 -0
- package/utils/converters/ConverterCollection.js +115 -0
- package/utils/converters/ConverterCollection.js.map +1 -0
- package/utils/converters/valueKeyStorageConverter.d.ts +18 -0
- package/utils/converters/valueKeyStorageConverter.js +152 -0
- package/utils/converters/valueKeyStorageConverter.js.map +1 -0
- package/{content/plugins/utils → utils}/createTypeName.d.ts +3 -3
- package/{content/plugins/utils → utils}/createTypeName.js +0 -0
- package/utils/createTypeName.js.map +1 -0
- package/{content/plugins/utils → utils}/entryStorage.d.ts +3 -3
- package/{content/plugins/utils → utils}/entryStorage.js +3 -7
- package/utils/entryStorage.js.map +1 -0
- package/utils/filterAsync.d.ts +1 -0
- package/utils/filterAsync.js +23 -0
- package/utils/filterAsync.js.map +1 -0
- package/utils/filterModelFields.d.ts +16 -0
- package/utils/filterModelFields.js +81 -0
- package/utils/filterModelFields.js.map +1 -0
- package/utils/getEntryTitle.d.ts +2 -0
- package/{content/plugins/utils → utils}/getEntryTitle.js +7 -6
- package/utils/getEntryTitle.js.map +1 -0
- package/utils/getSchemaFromFieldPlugins.d.ts +12 -0
- package/utils/getSchemaFromFieldPlugins.js +35 -0
- package/utils/getSchemaFromFieldPlugins.js.map +1 -0
- package/utils/ownership.d.ts +8 -0
- package/utils/ownership.js +41 -0
- package/utils/ownership.js.map +1 -0
- package/utils/permissions.d.ts +7 -0
- package/utils/permissions.js +110 -0
- package/utils/permissions.js.map +1 -0
- package/utils/pluralizedTypeName.d.ts +1 -0
- package/{content/plugins/utils → utils}/pluralizedTypeName.js +0 -0
- package/utils/pluralizedTypeName.js.map +1 -0
- package/utils/renderFields.d.ts +15 -0
- package/{content/plugins/utils → utils}/renderFields.js +4 -2
- package/utils/renderFields.js.map +1 -0
- package/utils/renderGetFilterFields.d.ts +10 -0
- package/{content/plugins/utils → utils}/renderGetFilterFields.js +28 -13
- package/utils/renderGetFilterFields.js.map +1 -0
- package/utils/renderInputFields.d.ts +14 -0
- package/{content/plugins/utils → utils}/renderInputFields.js +1 -1
- package/utils/renderInputFields.js.map +1 -0
- package/utils/renderListFilterFields.d.ts +11 -0
- package/{content/plugins/utils → utils}/renderListFilterFields.js +30 -17
- package/utils/renderListFilterFields.js.map +1 -0
- package/{content/plugins/utils → utils}/renderSortEnum.d.ts +1 -1
- package/utils/renderSortEnum.js +32 -0
- package/utils/renderSortEnum.js.map +1 -0
- package/utils/toSlug.d.ts +1 -0
- package/utils/toSlug.js +20 -0
- package/utils/toSlug.js.map +1 -0
- package/validators/dateGte.d.ts +2 -0
- package/{content/plugins/validators → validators}/dateGte.js +4 -4
- package/validators/dateGte.js.map +1 -0
- package/validators/dateLte.d.ts +2 -0
- package/{content/plugins/validators → validators}/dateLte.js +4 -4
- package/validators/dateLte.js.map +1 -0
- package/validators/gte.d.ts +2 -0
- package/validators/gte.js +36 -0
- package/validators/gte.js.map +1 -0
- package/validators/in.d.ts +2 -0
- package/validators/in.js +36 -0
- package/validators/in.js.map +1 -0
- package/validators/index.d.ts +1 -0
- package/validators/index.js +36 -0
- package/validators/index.js.map +1 -0
- package/validators/lte.d.ts +2 -0
- package/validators/lte.js +36 -0
- package/validators/lte.js.map +1 -0
- package/validators/maxLength.d.ts +2 -0
- package/validators/maxLength.js +36 -0
- package/validators/maxLength.js.map +1 -0
- package/validators/minLength.d.ts +2 -0
- package/validators/minLength.js +36 -0
- package/validators/minLength.js.map +1 -0
- package/validators/pattern.d.ts +2 -0
- package/validators/pattern.js +50 -0
- package/validators/pattern.js.map +1 -0
- package/validators/patternPlugins/email.d.ts +2 -0
- package/validators/patternPlugins/email.js +20 -0
- package/validators/patternPlugins/email.js.map +1 -0
- package/validators/patternPlugins/index.d.ts +2 -0
- package/validators/patternPlugins/index.js +24 -0
- package/validators/patternPlugins/index.js.map +1 -0
- package/validators/patternPlugins/lowerCase.d.ts +2 -0
- package/validators/patternPlugins/lowerCase.js +20 -0
- package/validators/patternPlugins/lowerCase.js.map +1 -0
- package/validators/patternPlugins/lowerCaseSpace.d.ts +2 -0
- package/validators/patternPlugins/lowerCaseSpace.js +20 -0
- package/validators/patternPlugins/lowerCaseSpace.js.map +1 -0
- package/validators/patternPlugins/upperCase.d.ts +2 -0
- package/validators/patternPlugins/upperCase.js +20 -0
- package/validators/patternPlugins/upperCase.js.map +1 -0
- package/validators/patternPlugins/upperCaseSpace.d.ts +2 -0
- package/validators/patternPlugins/upperCaseSpace.js +20 -0
- package/validators/patternPlugins/upperCaseSpace.js.map +1 -0
- package/validators/patternPlugins/url.d.ts +2 -0
- package/validators/patternPlugins/url.js +20 -0
- package/validators/patternPlugins/url.js.map +1 -0
- package/validators/required.d.ts +2 -0
- package/validators/required.js +27 -0
- package/validators/required.js.map +1 -0
- package/validators/timeGte.d.ts +2 -0
- package/{content/plugins/validators → validators}/timeGte.js +6 -4
- package/validators/timeGte.js.map +1 -0
- package/validators/timeLte.d.ts +2 -0
- package/{content/plugins/validators → validators}/timeLte.js +6 -4
- package/validators/timeLte.js.map +1 -0
- package/validators/unique.d.ts +6 -0
- package/validators/unique.js +63 -0
- package/validators/unique.js.map +1 -0
- package/content/contextSetup.d.ts +0 -4
- package/content/contextSetup.js +0 -65
- package/content/graphQLHandlerFactory.d.ts +0 -5
- package/content/graphQLHandlerFactory.js +0 -173
- package/content/plugins/CmsGroupPlugin.d.ts +0 -11
- package/content/plugins/CmsModelPlugin.d.ts +0 -11
- package/content/plugins/CmsModelPlugin.js +0 -24
- package/content/plugins/buildSchemaPlugins.js +0 -29
- package/content/plugins/crud/contentEntry/afterDelete.d.ts +0 -7
- package/content/plugins/crud/contentEntry/beforeCreate.d.ts +0 -7
- package/content/plugins/crud/contentEntry/beforeUpdate.d.ts +0 -7
- package/content/plugins/crud/contentEntry/entryDataValidation.d.ts +0 -4
- package/content/plugins/crud/contentModel/afterCreate.d.ts +0 -7
- package/content/plugins/crud/contentModel/afterDelete.d.ts +0 -7
- package/content/plugins/crud/contentModel/afterUpdate.d.ts +0 -7
- package/content/plugins/crud/contentModel/beforeCreate.d.ts +0 -9
- package/content/plugins/crud/contentModel/beforeUpdate.js +0 -128
- package/content/plugins/crud/contentModel/contentModelManagerFactory.d.ts +0 -2
- package/content/plugins/crud/contentModel/createFieldModels.d.ts +0 -2
- package/content/plugins/crud/contentModel/idValidation.d.ts +0 -2
- package/content/plugins/crud/contentModel/validateLayout.d.ts +0 -2
- package/content/plugins/crud/contentModelGroup/beforeUpdate.d.ts +0 -8
- package/content/plugins/crud/index.d.ts +0 -6
- package/content/plugins/graphqlFields/boolean.d.ts +0 -3
- package/content/plugins/graphqlFields/boolean.js +0 -69
- package/content/plugins/graphqlFields/datetime.d.ts +0 -3
- package/content/plugins/graphqlFields/datetime.js +0 -83
- package/content/plugins/graphqlFields/file.d.ts +0 -3
- package/content/plugins/graphqlFields/file.js +0 -49
- package/content/plugins/graphqlFields/index.d.ts +0 -2
- package/content/plugins/graphqlFields/index.js +0 -30
- package/content/plugins/graphqlFields/longText.d.ts +0 -3
- package/content/plugins/graphqlFields/longText.js +0 -62
- package/content/plugins/graphqlFields/number.d.ts +0 -3
- package/content/plugins/graphqlFields/number.js +0 -75
- package/content/plugins/graphqlFields/object.d.ts +0 -3
- package/content/plugins/graphqlFields/object.js +0 -180
- package/content/plugins/graphqlFields/ref.d.ts +0 -3
- package/content/plugins/graphqlFields/ref.js +0 -205
- package/content/plugins/graphqlFields/richText.d.ts +0 -3
- package/content/plugins/graphqlFields/richText.js +0 -55
- package/content/plugins/graphqlFields/text.d.ts +0 -3
- package/content/plugins/graphqlFields/text.js +0 -72
- package/content/plugins/internalSecurity/InternalAuthenticationPlugin.d.ts +0 -8
- package/content/plugins/internalSecurity/InternalAuthenticationPlugin.js +0 -54
- package/content/plugins/internalSecurity/InternalAuthorizationPlugin.d.ts +0 -7
- package/content/plugins/internalSecurity/InternalAuthorizationPlugin.js +0 -35
- package/content/plugins/modelManager/DefaultCmsModelManager.d.ts +0 -15
- package/content/plugins/modelManager/index.d.ts +0 -3
- package/content/plugins/schema/baseSchema.d.ts +0 -4
- package/content/plugins/schema/contentEntries.d.ts +0 -4
- package/content/plugins/schema/contentEntries.js +0 -166
- package/content/plugins/schema/contentModelGroups.d.ts +0 -4
- package/content/plugins/schema/contentModels.d.ts +0 -4
- package/content/plugins/schema/createFieldResolvers.d.ts +0 -19
- package/content/plugins/schema/createManageResolvers.d.ts +0 -11
- package/content/plugins/schema/createManageSDL.d.ts +0 -9
- package/content/plugins/schema/createPreviewResolvers.d.ts +0 -10
- package/content/plugins/schema/createReadResolvers.d.ts +0 -10
- package/content/plugins/schema/createReadSDL.d.ts +0 -9
- package/content/plugins/schema/resolvers/commonFieldResolvers.d.ts +0 -6
- package/content/plugins/schema/resolvers/manage/resolveCreate.d.ts +0 -6
- package/content/plugins/schema/resolvers/manage/resolveCreateFrom.d.ts +0 -7
- package/content/plugins/schema/resolvers/manage/resolveDelete.d.ts +0 -2
- package/content/plugins/schema/resolvers/manage/resolveGet.d.ts +0 -2
- package/content/plugins/schema/resolvers/manage/resolveGetByIds.d.ts +0 -2
- package/content/plugins/schema/resolvers/manage/resolveGetRevisions.d.ts +0 -2
- package/content/plugins/schema/resolvers/manage/resolveList.d.ts +0 -2
- package/content/plugins/schema/resolvers/manage/resolvePublish.d.ts +0 -2
- package/content/plugins/schema/resolvers/manage/resolveUnpublish.d.ts +0 -2
- package/content/plugins/schema/resolvers/manage/resolveUpdate.d.ts +0 -7
- package/content/plugins/schema/resolvers/preview/resolveGet.d.ts +0 -2
- package/content/plugins/schema/resolvers/preview/resolveList.d.ts +0 -2
- package/content/plugins/schema/resolvers/read/resolveGet.d.ts +0 -2
- package/content/plugins/schema/resolvers/read/resolveList.d.ts +0 -2
- package/content/plugins/storage/default.d.ts +0 -3
- package/content/plugins/storage/default.js +0 -28
- package/content/plugins/storage/object.d.ts +0 -3
- package/content/plugins/storage/object.js +0 -119
- package/content/plugins/utils/getEntryTitle.d.ts +0 -2
- package/content/plugins/utils/getSchemaFromFieldPlugins.d.ts +0 -11
- package/content/plugins/utils/getSchemaFromFieldPlugins.js +0 -30
- package/content/plugins/utils/pluralizedTypeName.d.ts +0 -1
- package/content/plugins/utils/renderFields.d.ts +0 -16
- package/content/plugins/utils/renderGetFilterFields.d.ts +0 -9
- package/content/plugins/utils/renderInputFields.d.ts +0 -14
- package/content/plugins/utils/renderListFilterFields.d.ts +0 -10
- package/content/plugins/utils/renderSortEnum.js +0 -32
- package/content/plugins/validators/dateGte.d.ts +0 -3
- package/content/plugins/validators/dateLte.d.ts +0 -3
- package/content/plugins/validators/gte.d.ts +0 -3
- package/content/plugins/validators/gte.js +0 -32
- package/content/plugins/validators/in.d.ts +0 -3
- package/content/plugins/validators/in.js +0 -32
- package/content/plugins/validators/index.d.ts +0 -2
- package/content/plugins/validators/index.js +0 -36
- package/content/plugins/validators/lte.d.ts +0 -3
- package/content/plugins/validators/lte.js +0 -32
- package/content/plugins/validators/maxLength.d.ts +0 -3
- package/content/plugins/validators/maxLength.js +0 -32
- package/content/plugins/validators/minLength.d.ts +0 -3
- package/content/plugins/validators/minLength.js +0 -32
- package/content/plugins/validators/pattern.d.ts +0 -3
- package/content/plugins/validators/pattern.js +0 -47
- package/content/plugins/validators/patternPlugins/email.d.ts +0 -3
- package/content/plugins/validators/patternPlugins/email.js +0 -17
- package/content/plugins/validators/patternPlugins/index.d.ts +0 -2
- package/content/plugins/validators/patternPlugins/index.js +0 -19
- package/content/plugins/validators/patternPlugins/lowerCase.d.ts +0 -3
- package/content/plugins/validators/patternPlugins/lowerCase.js +0 -17
- package/content/plugins/validators/patternPlugins/upperCase.d.ts +0 -3
- package/content/plugins/validators/patternPlugins/upperCase.js +0 -17
- package/content/plugins/validators/patternPlugins/url.d.ts +0 -3
- package/content/plugins/validators/patternPlugins/url.js +0 -17
- package/content/plugins/validators/required.d.ts +0 -3
- package/content/plugins/validators/required.js +0 -25
- package/content/plugins/validators/timeGte.d.ts +0 -3
- package/content/plugins/validators/timeLte.d.ts +0 -3
- package/migrateCMSPermissions.d.ts +0 -17
- package/migrateCMSPermissions.js +0 -193
- package/plugins/context.d.ts +0 -4
- package/plugins/context.js +0 -34
- package/plugins/crud/index.d.ts +0 -6
- package/plugins/crud/index.js +0 -100
- package/plugins/crud/settings.crud.js +0 -93
- package/plugins/graphql/system.d.ts +0 -17
- package/plugins/graphql/system.js +0 -72
- package/plugins/graphql.d.ts +0 -2
- package/plugins/graphql.js +0 -79
- package/plugins/upgrades/index.d.ts +0 -2
- package/plugins/upgrades/index.js +0 -14
- package/plugins/upgrades/v5.5.0/helpers.d.ts +0 -6
- package/plugins/upgrades/v5.5.0/helpers.js +0 -10
- package/plugins/upgrades/v5.5.0/index.d.ts +0 -4
- package/plugins/upgrades/v5.5.0/index.js +0 -129
- package/transformers.d.ts +0 -2
- package/transformers.js +0 -25
- package/utils.d.ts +0 -25
- package/utils.js +0 -251
package/types.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { Plugin } from "@webiny/plugins/types";
|
|
2
2
|
import { I18NContext, I18NLocale } from "@webiny/api-i18n/types";
|
|
3
|
-
import {
|
|
3
|
+
import { Context } from "@webiny/api/types";
|
|
4
4
|
import { TenancyContext } from "@webiny/api-tenancy/types";
|
|
5
5
|
import { GraphQLFieldResolver, GraphQLSchemaDefinition, Resolvers } from "@webiny/handler-graphql/types";
|
|
6
|
-
import { BaseI18NContentContext } from "@webiny/api-i18n-content/types";
|
|
7
6
|
import { SecurityPermission } from "@webiny/api-security/types";
|
|
8
|
-
import { HttpContext } from "@webiny/handler-http/types";
|
|
9
7
|
import { DbContext } from "@webiny/handler-db/types";
|
|
10
8
|
import { FileManagerContext } from "@webiny/api-file-manager/types";
|
|
11
9
|
import { UpgradePlugin } from "@webiny/api-upgrade/types";
|
|
12
10
|
import { Topic } from "@webiny/pubsub/types";
|
|
11
|
+
import { CmsModelConverterCallable } from "./utils/converters/ConverterCollection";
|
|
12
|
+
export declare type ApiEndpoint = "manage" | "preview" | "read";
|
|
13
13
|
export interface HeadlessCms extends CmsSettingsContext, CmsSystemContext, CmsGroupContext, CmsModelContext, CmsEntryContext {
|
|
14
14
|
/**
|
|
15
15
|
* API type
|
|
16
16
|
*/
|
|
17
|
-
type:
|
|
17
|
+
type: ApiEndpoint | null;
|
|
18
18
|
/**
|
|
19
19
|
* Requested locale
|
|
20
20
|
*/
|
|
@@ -45,12 +45,16 @@ export interface HeadlessCms extends CmsSettingsContext, CmsSystemContext, CmsGr
|
|
|
45
45
|
*
|
|
46
46
|
* @category Context
|
|
47
47
|
*/
|
|
48
|
-
export interface CmsContext extends
|
|
48
|
+
export interface CmsContext extends Context, DbContext, I18NContext, FileManagerContext, TenancyContext {
|
|
49
49
|
cms: HeadlessCms;
|
|
50
50
|
}
|
|
51
51
|
interface CmsModelFieldPredefinedValuesValue {
|
|
52
52
|
value: string;
|
|
53
53
|
label: string;
|
|
54
|
+
/**
|
|
55
|
+
* Default selected predefined value.
|
|
56
|
+
*/
|
|
57
|
+
selected?: boolean;
|
|
54
58
|
}
|
|
55
59
|
/**
|
|
56
60
|
* Object containing content model field predefined options and values.
|
|
@@ -79,6 +83,39 @@ interface CmsModelFieldRenderer {
|
|
|
79
83
|
*/
|
|
80
84
|
name: string;
|
|
81
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* A definition for content model field settings.
|
|
88
|
+
*
|
|
89
|
+
* @category ModelField
|
|
90
|
+
* @category Database model
|
|
91
|
+
*/
|
|
92
|
+
export interface CmsModelFieldSettings {
|
|
93
|
+
/**
|
|
94
|
+
* Predefined values (text, number)
|
|
95
|
+
* The default value for the field in case it is not predefined values field.
|
|
96
|
+
*/
|
|
97
|
+
defaultValue?: string | number | null | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* Object field has child fields.
|
|
100
|
+
*/
|
|
101
|
+
fields?: CmsModelField[];
|
|
102
|
+
/**
|
|
103
|
+
* Object field has child fields - so it needs to have a layout.
|
|
104
|
+
*/
|
|
105
|
+
layout?: string[][];
|
|
106
|
+
/**
|
|
107
|
+
* Ref field.
|
|
108
|
+
*/
|
|
109
|
+
models?: Pick<CmsModel, "modelId">[];
|
|
110
|
+
/**
|
|
111
|
+
* Date field.
|
|
112
|
+
*/
|
|
113
|
+
type?: string;
|
|
114
|
+
/**
|
|
115
|
+
* There are a lot of other settings that are possible to add, so we keep the type opened.
|
|
116
|
+
*/
|
|
117
|
+
[key: string]: any;
|
|
118
|
+
}
|
|
82
119
|
/**
|
|
83
120
|
* A definition for content model field. This type exists on the app side as well.
|
|
84
121
|
*
|
|
@@ -87,15 +124,37 @@ interface CmsModelFieldRenderer {
|
|
|
87
124
|
*/
|
|
88
125
|
export interface CmsModelField {
|
|
89
126
|
/**
|
|
90
|
-
* A generated ID for the model field
|
|
127
|
+
* A generated unique ID for the model field.
|
|
128
|
+
* MUST be absolute unique throughout the models.
|
|
129
|
+
* Must be in form of a-zA-Z0-9.
|
|
130
|
+
*
|
|
131
|
+
* We generate a unique id value when you're building a model via UI,
|
|
132
|
+
* but when user is creating a model via a plugin it is up to them to be careful about this.
|
|
91
133
|
*/
|
|
92
134
|
id: string;
|
|
93
135
|
/**
|
|
94
|
-
* A type of the field
|
|
136
|
+
* A type of the field.
|
|
137
|
+
* We are defining our built-in fields, so people know which are available by the default.
|
|
95
138
|
*/
|
|
96
|
-
type: string;
|
|
139
|
+
type: "boolean" | "datetime" | "file" | "long-text" | "number" | "object" | "ref" | "rich-text" | "text" | string;
|
|
97
140
|
/**
|
|
98
|
-
* A unique
|
|
141
|
+
* A unique storage ID for storing actual values.
|
|
142
|
+
* Must in form of a-zA-Z0-9@a-zA-Z0-9@a-zA-Z0-9.
|
|
143
|
+
*
|
|
144
|
+
* This is an auto-generated value: uses `id` and `type`
|
|
145
|
+
*
|
|
146
|
+
* This is used as path for the entry value.
|
|
147
|
+
*
|
|
148
|
+
* @internal
|
|
149
|
+
*/
|
|
150
|
+
storageId: string;
|
|
151
|
+
/**
|
|
152
|
+
* Field identifier for the model field that will be available to the outside world.
|
|
153
|
+
* `storageId` is used as path (or column) to store the data.
|
|
154
|
+
*
|
|
155
|
+
* Must in form of a-zA-Z0-9.
|
|
156
|
+
*
|
|
157
|
+
* This value MUST be unique in the CmsModel.
|
|
99
158
|
*/
|
|
100
159
|
fieldId: string;
|
|
101
160
|
/**
|
|
@@ -105,11 +164,11 @@ export interface CmsModelField {
|
|
|
105
164
|
/**
|
|
106
165
|
* Text below the field to clarify what is it meant to be in the field value
|
|
107
166
|
*/
|
|
108
|
-
helpText?: string;
|
|
167
|
+
helpText?: string | null;
|
|
109
168
|
/**
|
|
110
169
|
* Text to be displayed in the field
|
|
111
170
|
*/
|
|
112
|
-
placeholderText?: string;
|
|
171
|
+
placeholderText?: string | null;
|
|
113
172
|
/**
|
|
114
173
|
* Are predefined values enabled? And list of them
|
|
115
174
|
*/
|
|
@@ -142,9 +201,13 @@ export interface CmsModelField {
|
|
|
142
201
|
*
|
|
143
202
|
* @default {}
|
|
144
203
|
*/
|
|
145
|
-
settings?:
|
|
146
|
-
|
|
147
|
-
|
|
204
|
+
settings?: CmsModelFieldSettings;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Used for our internal functionality.
|
|
208
|
+
*/
|
|
209
|
+
export interface CmsModelFieldWithParent extends CmsModelField {
|
|
210
|
+
parent?: CmsModelFieldWithParent | null;
|
|
148
211
|
}
|
|
149
212
|
/**
|
|
150
213
|
* A definition for dateTime field to show possible type of the field in settings.
|
|
@@ -163,11 +226,11 @@ export interface CmsModelDateTimeField extends CmsModelField {
|
|
|
163
226
|
* @category ModelField
|
|
164
227
|
* @category FieldValidation
|
|
165
228
|
*/
|
|
166
|
-
export interface CmsModelFieldValidatorValidateParams {
|
|
229
|
+
export interface CmsModelFieldValidatorValidateParams<T = any> {
|
|
167
230
|
/**
|
|
168
231
|
* A value to be validated.
|
|
169
232
|
*/
|
|
170
|
-
value:
|
|
233
|
+
value: T;
|
|
171
234
|
/**
|
|
172
235
|
* Options from the CmsModelField validations.
|
|
173
236
|
*
|
|
@@ -186,7 +249,12 @@ export interface CmsModelFieldValidatorValidateParams {
|
|
|
186
249
|
/**
|
|
187
250
|
* An instance of the content model being validated.
|
|
188
251
|
*/
|
|
189
|
-
|
|
252
|
+
model: CmsModel;
|
|
253
|
+
/**
|
|
254
|
+
* If entry is sent it means it is an update operation.
|
|
255
|
+
* First usage is for the unique field value.
|
|
256
|
+
*/
|
|
257
|
+
entry?: CmsEntry;
|
|
190
258
|
}
|
|
191
259
|
/**
|
|
192
260
|
* Definition for the field validator.
|
|
@@ -253,7 +321,8 @@ export interface CmsModelFieldPatternValidatorPlugin extends Plugin {
|
|
|
253
321
|
*/
|
|
254
322
|
export interface LockedField {
|
|
255
323
|
/**
|
|
256
|
-
* Locked field ID - one used
|
|
324
|
+
* Locked field storage ID - one used to store values.
|
|
325
|
+
* We cannot change this due to old systems.
|
|
257
326
|
*/
|
|
258
327
|
fieldId: string;
|
|
259
328
|
/**
|
|
@@ -281,6 +350,10 @@ export interface CmsModel {
|
|
|
281
350
|
* Unique ID for the content model. Created from name if not defined by user.
|
|
282
351
|
*/
|
|
283
352
|
modelId: string;
|
|
353
|
+
/**
|
|
354
|
+
* Model tenant.
|
|
355
|
+
*/
|
|
356
|
+
tenant: string;
|
|
284
357
|
/**
|
|
285
358
|
* Locale this model belongs to.
|
|
286
359
|
*/
|
|
@@ -301,15 +374,15 @@ export interface CmsModel {
|
|
|
301
374
|
/**
|
|
302
375
|
* Description for the content model.
|
|
303
376
|
*/
|
|
304
|
-
description
|
|
377
|
+
description: string;
|
|
305
378
|
/**
|
|
306
379
|
* Date created
|
|
307
380
|
*/
|
|
308
|
-
createdOn?:
|
|
381
|
+
createdOn?: string;
|
|
309
382
|
/**
|
|
310
383
|
* Date saved. Changes on both save and create.
|
|
311
384
|
*/
|
|
312
|
-
savedOn?:
|
|
385
|
+
savedOn?: string;
|
|
313
386
|
/**
|
|
314
387
|
* CreatedBy object wrapper. Contains id, name and type of the user.
|
|
315
388
|
*/
|
|
@@ -343,9 +416,20 @@ export interface CmsModel {
|
|
|
343
416
|
*/
|
|
344
417
|
webinyVersion: string;
|
|
345
418
|
/**
|
|
346
|
-
*
|
|
419
|
+
* Is model private?
|
|
420
|
+
* This is meant to be used for some internal models - will not be visible in the schema.
|
|
421
|
+
* Only available for the plugin constructed models.
|
|
347
422
|
*/
|
|
348
|
-
|
|
423
|
+
isPrivate?: boolean;
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* When sending model to the storage operations, it must contain createValueKeyToStorageConverter and createValueKeyFromStorageConverter
|
|
427
|
+
*
|
|
428
|
+
* @category CmsModel
|
|
429
|
+
*/
|
|
430
|
+
export interface StorageOperationsCmsModel extends CmsModel {
|
|
431
|
+
convertValueKeyToStorage: CmsModelConverterCallable;
|
|
432
|
+
convertValueKeyFromStorage: CmsModelConverterCallable;
|
|
349
433
|
}
|
|
350
434
|
/**
|
|
351
435
|
* @category ModelField
|
|
@@ -354,17 +438,18 @@ export interface CmsModelFieldDefinition {
|
|
|
354
438
|
fields: string;
|
|
355
439
|
typeDefs?: string;
|
|
356
440
|
}
|
|
441
|
+
interface CmsModelFieldToGraphQLCreateResolverParams {
|
|
442
|
+
models: CmsModel[];
|
|
443
|
+
model: CmsModel;
|
|
444
|
+
graphQLType: string;
|
|
445
|
+
field: CmsModelField;
|
|
446
|
+
createFieldResolvers: any;
|
|
447
|
+
}
|
|
357
448
|
export interface CmsModelFieldToGraphQLCreateResolver {
|
|
358
|
-
(params: {
|
|
359
|
-
|
|
360
|
-
model: CmsModel;
|
|
361
|
-
graphQLType: string;
|
|
362
|
-
field: CmsModelField;
|
|
363
|
-
createFieldResolvers: any;
|
|
364
|
-
}): GraphQLFieldResolver | {
|
|
365
|
-
resolver: GraphQLFieldResolver;
|
|
449
|
+
(params: CmsModelFieldToGraphQLCreateResolverParams): GraphQLFieldResolver | {
|
|
450
|
+
resolver: GraphQLFieldResolver | null;
|
|
366
451
|
typeResolvers: Resolvers<CmsContext>;
|
|
367
|
-
};
|
|
452
|
+
} | false;
|
|
368
453
|
}
|
|
369
454
|
/**
|
|
370
455
|
* @category Plugin
|
|
@@ -392,6 +477,15 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
392
477
|
* ```
|
|
393
478
|
*/
|
|
394
479
|
isSearchable: boolean;
|
|
480
|
+
/**
|
|
481
|
+
* Is the field searchable via full text search?
|
|
482
|
+
*
|
|
483
|
+
* Field is not full text searchable by default.
|
|
484
|
+
* ```ts
|
|
485
|
+
* fullTextSearch: false
|
|
486
|
+
* ```
|
|
487
|
+
*/
|
|
488
|
+
fullTextSearch?: boolean;
|
|
395
489
|
/**
|
|
396
490
|
* Is the field sortable via the GraphQL?
|
|
397
491
|
*
|
|
@@ -400,6 +494,27 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
400
494
|
* ```
|
|
401
495
|
*/
|
|
402
496
|
isSortable: boolean;
|
|
497
|
+
/**
|
|
498
|
+
* Optional method which creates the storageId.
|
|
499
|
+
* Primary use is for the datetime field, but if users has some specific fields, they can customize the storageId to their needs.
|
|
500
|
+
*
|
|
501
|
+
* ```ts
|
|
502
|
+
* createStorageId: ({field}) => {
|
|
503
|
+
* if (field.settings.type === "time) {
|
|
504
|
+
* return `${field.type}_time@${field.id}`
|
|
505
|
+
* }
|
|
506
|
+
* // use default method
|
|
507
|
+
* return undefined;
|
|
508
|
+
* }
|
|
509
|
+
* ```
|
|
510
|
+
*/
|
|
511
|
+
createStorageId?: (params: {
|
|
512
|
+
model: CmsModel;
|
|
513
|
+
field: CmsModelField;
|
|
514
|
+
}) => string | null | undefined;
|
|
515
|
+
/**
|
|
516
|
+
* Read API methods.
|
|
517
|
+
*/
|
|
403
518
|
read: {
|
|
404
519
|
/**
|
|
405
520
|
* Definition for get filtering for GraphQL.
|
|
@@ -455,16 +570,16 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
455
570
|
model: CmsModel;
|
|
456
571
|
field: CmsModelField;
|
|
457
572
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
458
|
-
}): CmsModelFieldDefinition | string;
|
|
573
|
+
}): CmsModelFieldDefinition | string | null;
|
|
459
574
|
/**
|
|
460
575
|
* Definition for field resolver.
|
|
461
|
-
* By default it is simple return of the `instance.values[
|
|
576
|
+
* By default it is simple return of the `instance.values[storageId]` but if required, users can define their own.
|
|
462
577
|
*
|
|
463
578
|
* ```ts
|
|
464
579
|
* read: {
|
|
465
580
|
* createResolver({ field }) {
|
|
466
581
|
* return instance => {
|
|
467
|
-
* return instance.values[field.
|
|
582
|
+
* return instance.values[field.storageId];
|
|
468
583
|
* };
|
|
469
584
|
* }
|
|
470
585
|
* }
|
|
@@ -492,7 +607,6 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
492
607
|
*/
|
|
493
608
|
createSchema?: (params: {
|
|
494
609
|
models: CmsModel[];
|
|
495
|
-
model: CmsModel;
|
|
496
610
|
}) => GraphQLSchemaDefinition<CmsContext>;
|
|
497
611
|
};
|
|
498
612
|
manage: {
|
|
@@ -535,7 +649,6 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
535
649
|
*/
|
|
536
650
|
createSchema?: (params: {
|
|
537
651
|
models: CmsModel[];
|
|
538
|
-
model: CmsModel;
|
|
539
652
|
}) => GraphQLSchemaDefinition<CmsContext>;
|
|
540
653
|
/**
|
|
541
654
|
* Definition of the field type for GraphQL - be aware if multiple values is selected. Probably same as `read.createTypeField`.
|
|
@@ -556,7 +669,7 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
556
669
|
model: CmsModel;
|
|
557
670
|
field: CmsModelField;
|
|
558
671
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
559
|
-
}) => CmsModelFieldDefinition | string;
|
|
672
|
+
}) => CmsModelFieldDefinition | string | null;
|
|
560
673
|
/**
|
|
561
674
|
* Definition for input GraphQL field type.
|
|
562
675
|
*
|
|
@@ -576,16 +689,16 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
576
689
|
model: CmsModel;
|
|
577
690
|
field: CmsModelField;
|
|
578
691
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
579
|
-
}) => CmsModelFieldDefinition | string;
|
|
692
|
+
}) => CmsModelFieldDefinition | string | null;
|
|
580
693
|
/**
|
|
581
694
|
* Definition for field resolver.
|
|
582
|
-
* By default it is simple return of the `instance.values[
|
|
695
|
+
* By default it is simple return of the `instance.values[storageId]` but if required, users can define their own.
|
|
583
696
|
*
|
|
584
697
|
* ```ts
|
|
585
698
|
* manage: {
|
|
586
699
|
* createResolver({ field }) {
|
|
587
700
|
* return instance => {
|
|
588
|
-
* return instance.values[field.
|
|
701
|
+
* return instance.values[field.storageId];
|
|
589
702
|
* };
|
|
590
703
|
* }
|
|
591
704
|
* }
|
|
@@ -643,7 +756,7 @@ export interface CreatedBy {
|
|
|
643
756
|
/**
|
|
644
757
|
* Full name of the user.
|
|
645
758
|
*/
|
|
646
|
-
displayName: string;
|
|
759
|
+
displayName: string | null;
|
|
647
760
|
/**
|
|
648
761
|
* Type of the user (admin, user)
|
|
649
762
|
*/
|
|
@@ -689,14 +802,16 @@ export interface CmsSettingsContext {
|
|
|
689
802
|
}
|
|
690
803
|
export interface BeforeInstallTopicParams {
|
|
691
804
|
tenant: string;
|
|
805
|
+
locale: string;
|
|
692
806
|
}
|
|
693
807
|
export interface AfterInstallTopicParams {
|
|
694
808
|
tenant: string;
|
|
809
|
+
locale: string;
|
|
695
810
|
}
|
|
696
811
|
export declare type CmsSystemContext = {
|
|
697
|
-
getSystemVersion: () => Promise<string>;
|
|
812
|
+
getSystemVersion: () => Promise<string | null>;
|
|
698
813
|
setSystemVersion: (version: string) => Promise<void>;
|
|
699
|
-
getReadAPIKey(): Promise<string>;
|
|
814
|
+
getReadAPIKey(): Promise<string | null>;
|
|
700
815
|
installSystem: () => Promise<void>;
|
|
701
816
|
upgradeSystem: (version: string) => Promise<boolean>;
|
|
702
817
|
/**
|
|
@@ -748,6 +863,10 @@ export interface CmsGroup {
|
|
|
748
863
|
* Slug for the group. Must be unique.
|
|
749
864
|
*/
|
|
750
865
|
slug: string;
|
|
866
|
+
/**
|
|
867
|
+
* Group tenant.
|
|
868
|
+
*/
|
|
869
|
+
tenant: string;
|
|
751
870
|
/**
|
|
752
871
|
* Locale this group belongs to.
|
|
753
872
|
*/
|
|
@@ -755,11 +874,11 @@ export interface CmsGroup {
|
|
|
755
874
|
/**
|
|
756
875
|
* Description for the group.
|
|
757
876
|
*/
|
|
758
|
-
description
|
|
877
|
+
description: string;
|
|
759
878
|
/**
|
|
760
879
|
* Icon for the group. In a form of "ico/ico".
|
|
761
880
|
*/
|
|
762
|
-
icon
|
|
881
|
+
icon: string;
|
|
763
882
|
/**
|
|
764
883
|
* CreatedBy reference object.
|
|
765
884
|
*/
|
|
@@ -777,9 +896,11 @@ export interface CmsGroup {
|
|
|
777
896
|
*/
|
|
778
897
|
webinyVersion: string;
|
|
779
898
|
/**
|
|
780
|
-
*
|
|
899
|
+
* Is group private?
|
|
900
|
+
* This is meant to be used for some internal groups - will not be visible in the schema.
|
|
901
|
+
* Only available for the plugin constructed groups.
|
|
781
902
|
*/
|
|
782
|
-
|
|
903
|
+
isPrivate?: boolean;
|
|
783
904
|
}
|
|
784
905
|
/**
|
|
785
906
|
* A data.where parameter received when listing content model groups.
|
|
@@ -865,6 +986,10 @@ export interface CmsGroupContext {
|
|
|
865
986
|
* Delete content model group by given id.
|
|
866
987
|
*/
|
|
867
988
|
deleteGroup: (id: string) => Promise<boolean>;
|
|
989
|
+
/**
|
|
990
|
+
* Clear the cached groups.
|
|
991
|
+
*/
|
|
992
|
+
clearGroupsCache: () => void;
|
|
868
993
|
/**
|
|
869
994
|
* Events.
|
|
870
995
|
*/
|
|
@@ -884,7 +1009,12 @@ export interface CmsGroupContext {
|
|
|
884
1009
|
export interface CmsModelFieldValidation {
|
|
885
1010
|
name: string;
|
|
886
1011
|
message: string;
|
|
887
|
-
settings?:
|
|
1012
|
+
settings?: {
|
|
1013
|
+
value?: string | number;
|
|
1014
|
+
values?: string[];
|
|
1015
|
+
preset?: string;
|
|
1016
|
+
[key: string]: any;
|
|
1017
|
+
};
|
|
888
1018
|
}
|
|
889
1019
|
/**
|
|
890
1020
|
* A GraphQL params.data parameter received when creating content model.
|
|
@@ -905,6 +1035,42 @@ export interface CmsModelCreateInput {
|
|
|
905
1035
|
* Description of the content model.
|
|
906
1036
|
*/
|
|
907
1037
|
description?: string;
|
|
1038
|
+
/**
|
|
1039
|
+
* Group where to put the content model in.
|
|
1040
|
+
*/
|
|
1041
|
+
group: string;
|
|
1042
|
+
/**
|
|
1043
|
+
* A list of content model fields to define the entry values.
|
|
1044
|
+
*/
|
|
1045
|
+
fields?: CmsModelFieldInput[];
|
|
1046
|
+
/**
|
|
1047
|
+
* Admin UI field layout
|
|
1048
|
+
*
|
|
1049
|
+
* ```ts
|
|
1050
|
+
* layout: [
|
|
1051
|
+
* [field1id, field2id],
|
|
1052
|
+
* [field3id]
|
|
1053
|
+
* ]
|
|
1054
|
+
* ```
|
|
1055
|
+
*/
|
|
1056
|
+
layout?: string[][];
|
|
1057
|
+
/**
|
|
1058
|
+
* The field that is being displayed as entry title.
|
|
1059
|
+
* It is picked as first available text field. Or user can select own field.
|
|
1060
|
+
*/
|
|
1061
|
+
titleFieldId?: string;
|
|
1062
|
+
}
|
|
1063
|
+
/**
|
|
1064
|
+
* A GraphQL params.data parameter received when creating content model from existing model.
|
|
1065
|
+
*
|
|
1066
|
+
* @category GraphQL params
|
|
1067
|
+
* @category CmsModel
|
|
1068
|
+
*/
|
|
1069
|
+
export interface CmsModelCreateFromInput extends CmsModelCreateInput {
|
|
1070
|
+
/**
|
|
1071
|
+
* Locale into which we want to clone the model into.
|
|
1072
|
+
*/
|
|
1073
|
+
locale?: string;
|
|
908
1074
|
}
|
|
909
1075
|
/**
|
|
910
1076
|
* A definition for content model field received from the user.
|
|
@@ -926,7 +1092,7 @@ export interface CmsModelFieldInput {
|
|
|
926
1092
|
*/
|
|
927
1093
|
type: string;
|
|
928
1094
|
/**
|
|
929
|
-
*
|
|
1095
|
+
* Field outside world identifier for the field. Must be unique in the model.
|
|
930
1096
|
*/
|
|
931
1097
|
fieldId: string;
|
|
932
1098
|
/**
|
|
@@ -977,6 +1143,10 @@ export interface CmsModelUpdateInput {
|
|
|
977
1143
|
* A new content model name.
|
|
978
1144
|
*/
|
|
979
1145
|
name?: string;
|
|
1146
|
+
/**
|
|
1147
|
+
* A group we want to move the model to.
|
|
1148
|
+
*/
|
|
1149
|
+
group?: string;
|
|
980
1150
|
/**
|
|
981
1151
|
* A new description of the content model.
|
|
982
1152
|
*/
|
|
@@ -1027,6 +1197,15 @@ export interface ModelManagerPlugin extends Plugin {
|
|
|
1027
1197
|
*/
|
|
1028
1198
|
create: (context: CmsContext, model: CmsModel) => Promise<CmsModelManager>;
|
|
1029
1199
|
}
|
|
1200
|
+
/**
|
|
1201
|
+
* A content entry values definition for and from the database.
|
|
1202
|
+
*
|
|
1203
|
+
* @category Database model
|
|
1204
|
+
* @category CmsEntry
|
|
1205
|
+
*/
|
|
1206
|
+
export interface CmsEntryValues {
|
|
1207
|
+
[key: string]: any;
|
|
1208
|
+
}
|
|
1030
1209
|
/**
|
|
1031
1210
|
* A content entry definition for and from the database.
|
|
1032
1211
|
*
|
|
@@ -1098,11 +1277,22 @@ export interface CmsEntry {
|
|
|
1098
1277
|
*/
|
|
1099
1278
|
status: CmsEntryStatus;
|
|
1100
1279
|
/**
|
|
1101
|
-
* A mapped
|
|
1280
|
+
* A mapped storageId -> value object.
|
|
1102
1281
|
*
|
|
1103
1282
|
* @see CmsModelField
|
|
1104
1283
|
*/
|
|
1105
|
-
values:
|
|
1284
|
+
values: CmsEntryValues;
|
|
1285
|
+
/**
|
|
1286
|
+
* Settings for the given entry.
|
|
1287
|
+
*
|
|
1288
|
+
* Introduced with Advanced Publishing Workflow - will be always inserted after this PR is merged.
|
|
1289
|
+
* Be aware that when accessing properties in it on old systems - it will break if not checked first.
|
|
1290
|
+
*
|
|
1291
|
+
* Available only on the Manage API in entry GraphQL type meta.data property.
|
|
1292
|
+
*/
|
|
1293
|
+
meta?: {
|
|
1294
|
+
[key: string]: any;
|
|
1295
|
+
};
|
|
1106
1296
|
}
|
|
1107
1297
|
export interface CmsStorageEntry extends CmsEntry {
|
|
1108
1298
|
[key: string]: any;
|
|
@@ -1118,18 +1308,14 @@ export interface CmsStorageEntry extends CmsEntry {
|
|
|
1118
1308
|
* @category CmsModel
|
|
1119
1309
|
*/
|
|
1120
1310
|
export interface CmsModelManager {
|
|
1121
|
-
/**
|
|
1122
|
-
* List entries in this content model.
|
|
1123
|
-
*/
|
|
1124
|
-
list: (params?: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
1125
1311
|
/**
|
|
1126
1312
|
* List only published entries in the content model.
|
|
1127
1313
|
*/
|
|
1128
|
-
listPublished: (params
|
|
1314
|
+
listPublished: (params: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
1129
1315
|
/**
|
|
1130
1316
|
* List latest entries in the content model. Used for administration.
|
|
1131
1317
|
*/
|
|
1132
|
-
listLatest: (params
|
|
1318
|
+
listLatest: (params: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
1133
1319
|
/**
|
|
1134
1320
|
* Get a list of published entries by the ID list.
|
|
1135
1321
|
*/
|
|
@@ -1145,31 +1331,41 @@ export interface CmsModelManager {
|
|
|
1145
1331
|
/**
|
|
1146
1332
|
* Create a entry.
|
|
1147
1333
|
*/
|
|
1148
|
-
create: (data:
|
|
1334
|
+
create: (data: CreateCmsEntryInput) => Promise<CmsEntry>;
|
|
1149
1335
|
/**
|
|
1150
1336
|
* Update a entry.
|
|
1151
1337
|
*/
|
|
1152
|
-
update: (id: string, data:
|
|
1338
|
+
update: (id: string, data: UpdateCmsEntryInput) => Promise<CmsEntry>;
|
|
1153
1339
|
/**
|
|
1154
1340
|
* Delete a entry.
|
|
1155
1341
|
*/
|
|
1156
1342
|
delete: (id: string) => Promise<void>;
|
|
1157
1343
|
}
|
|
1158
1344
|
export interface BeforeModelCreateTopicParams {
|
|
1159
|
-
input:
|
|
1345
|
+
input: CmsModelCreateInput;
|
|
1160
1346
|
model: CmsModel;
|
|
1161
1347
|
}
|
|
1162
1348
|
export interface AfterModelCreateTopicParams {
|
|
1163
|
-
input:
|
|
1349
|
+
input: CmsModelCreateInput;
|
|
1350
|
+
model: CmsModel;
|
|
1351
|
+
}
|
|
1352
|
+
export interface BeforeModelCreateFromTopicParams {
|
|
1353
|
+
input: CmsModelCreateInput;
|
|
1354
|
+
original: CmsModel;
|
|
1355
|
+
model: CmsModel;
|
|
1356
|
+
}
|
|
1357
|
+
export interface AfterModelCreateFromTopicParams {
|
|
1358
|
+
input: CmsModelCreateInput;
|
|
1359
|
+
original: CmsModel;
|
|
1164
1360
|
model: CmsModel;
|
|
1165
1361
|
}
|
|
1166
1362
|
export interface BeforeModelUpdateTopicParams {
|
|
1167
|
-
input:
|
|
1363
|
+
input: CmsModelUpdateInput;
|
|
1168
1364
|
original: CmsModel;
|
|
1169
1365
|
model: CmsModel;
|
|
1170
1366
|
}
|
|
1171
1367
|
export interface AfterModelUpdateTopicParams {
|
|
1172
|
-
input:
|
|
1368
|
+
input: CmsModelUpdateInput;
|
|
1173
1369
|
original: CmsModel;
|
|
1174
1370
|
model: CmsModel;
|
|
1175
1371
|
}
|
|
@@ -1190,15 +1386,6 @@ export interface CmsModelUpdateDirectParams {
|
|
|
1190
1386
|
* @category CmsModel
|
|
1191
1387
|
*/
|
|
1192
1388
|
export interface CmsModelContext {
|
|
1193
|
-
/**
|
|
1194
|
-
* A function defining usage of a method with authenticating the user but not throwing an error.
|
|
1195
|
-
*/
|
|
1196
|
-
silentAuthModel: () => {
|
|
1197
|
-
/**
|
|
1198
|
-
* Get all content models.
|
|
1199
|
-
*/
|
|
1200
|
-
list: () => Promise<CmsModel[]>;
|
|
1201
|
-
};
|
|
1202
1389
|
/**
|
|
1203
1390
|
* Get a single content model.
|
|
1204
1391
|
*/
|
|
@@ -1211,12 +1398,12 @@ export interface CmsModelContext {
|
|
|
1211
1398
|
* Create a content model.
|
|
1212
1399
|
*/
|
|
1213
1400
|
createModel: (data: CmsModelCreateInput) => Promise<CmsModel>;
|
|
1401
|
+
/**
|
|
1402
|
+
* Create a content model from the given model - clone.
|
|
1403
|
+
*/
|
|
1404
|
+
createModelFrom: (modelId: string, data: CmsModelCreateFromInput) => Promise<CmsModel>;
|
|
1214
1405
|
/**
|
|
1215
1406
|
* Update content model without data validation. Used internally.
|
|
1216
|
-
*
|
|
1217
|
-
* @param model - existing content model
|
|
1218
|
-
* @param data - data to be updated
|
|
1219
|
-
*
|
|
1220
1407
|
* @hidden
|
|
1221
1408
|
*/
|
|
1222
1409
|
updateModelDirect: (params: CmsModelUpdateDirectParams) => Promise<CmsModel>;
|
|
@@ -1232,18 +1419,29 @@ export interface CmsModelContext {
|
|
|
1232
1419
|
* Get a instance of CmsModelManager for given content modelId.
|
|
1233
1420
|
*
|
|
1234
1421
|
* @see CmsModelManager
|
|
1422
|
+
*
|
|
1423
|
+
* @deprecated use the getEntryManager() method instead
|
|
1235
1424
|
*/
|
|
1236
|
-
getModelManager: (
|
|
1425
|
+
getModelManager: (model: CmsModel | string) => Promise<CmsModelManager>;
|
|
1426
|
+
getEntryManager: (model: CmsModel | string) => Promise<CmsModelManager>;
|
|
1237
1427
|
/**
|
|
1238
1428
|
* Get all content model managers mapped by modelId.
|
|
1239
1429
|
* @see CmsModelManager
|
|
1430
|
+
* @deprecated use getEntryManagers instead
|
|
1240
1431
|
*/
|
|
1241
1432
|
getManagers: () => Map<string, CmsModelManager>;
|
|
1433
|
+
getEntryManagers: () => Map<string, CmsModelManager>;
|
|
1434
|
+
/**
|
|
1435
|
+
* Clear all the model caches.
|
|
1436
|
+
*/
|
|
1437
|
+
clearModelsCache: () => void;
|
|
1242
1438
|
/**
|
|
1243
1439
|
* Events.
|
|
1244
1440
|
*/
|
|
1245
1441
|
onBeforeModelCreate: Topic<BeforeModelCreateTopicParams>;
|
|
1246
1442
|
onAfterModelCreate: Topic<AfterModelCreateTopicParams>;
|
|
1443
|
+
onBeforeModelCreateFrom: Topic<BeforeModelCreateFromTopicParams>;
|
|
1444
|
+
onAfterModelCreateFrom: Topic<AfterModelCreateFromTopicParams>;
|
|
1247
1445
|
onBeforeModelUpdate: Topic<BeforeModelUpdateTopicParams>;
|
|
1248
1446
|
onAfterModelUpdate: Topic<AfterModelUpdateTopicParams>;
|
|
1249
1447
|
onBeforeModelDelete: Topic<BeforeModelDeleteTopicParams>;
|
|
@@ -1254,7 +1452,17 @@ export interface CmsModelContext {
|
|
|
1254
1452
|
*
|
|
1255
1453
|
* @category CmsEntry
|
|
1256
1454
|
*/
|
|
1257
|
-
declare type CmsEntryStatus = "published" | "unpublished" | "reviewRequested" | "changesRequested" | "draft";
|
|
1455
|
+
export declare type CmsEntryStatus = "published" | "unpublished" | "reviewRequested" | "changesRequested" | "draft";
|
|
1456
|
+
export interface CmsEntryListWhereRef {
|
|
1457
|
+
id?: string;
|
|
1458
|
+
id_in?: string[];
|
|
1459
|
+
id_not?: string;
|
|
1460
|
+
id_not_in?: string[];
|
|
1461
|
+
entryId?: string;
|
|
1462
|
+
entryId_not?: string;
|
|
1463
|
+
entryId_in?: string[];
|
|
1464
|
+
entryId_not_in?: string[];
|
|
1465
|
+
}
|
|
1258
1466
|
/**
|
|
1259
1467
|
* Entry listing where params.
|
|
1260
1468
|
*
|
|
@@ -1277,7 +1485,9 @@ export interface CmsEntryListWhere {
|
|
|
1277
1485
|
entryId_in?: string[];
|
|
1278
1486
|
entryId_not_in?: string[];
|
|
1279
1487
|
/**
|
|
1280
|
-
*
|
|
1488
|
+
* Contains the owner of the entry. An "owner" is the identity who originally created the entry.
|
|
1489
|
+
* Subsequent revisions can be created by other identities, and those will be stored in `createdBy`,
|
|
1490
|
+
* but the `owner` is always the original author of the entry.
|
|
1281
1491
|
*
|
|
1282
1492
|
* Can be sent via the API or set internal if user can see only their own entries.
|
|
1283
1493
|
*/
|
|
@@ -1302,22 +1512,25 @@ export interface CmsEntryListWhere {
|
|
|
1302
1512
|
version_lt?: number;
|
|
1303
1513
|
version_gt?: number;
|
|
1304
1514
|
/**
|
|
1305
|
-
* Each operations implementation MUST determine how to use this field.
|
|
1306
|
-
* In SQL it can be published field and in DynamoDB can be
|
|
1515
|
+
* Each storage operations implementation MUST determine how to use this field.
|
|
1516
|
+
* In SQL, it can be a `published` field, and in DynamoDB it can be an SK.
|
|
1307
1517
|
*
|
|
1308
1518
|
* It is not meant to be used via the API.
|
|
1309
1519
|
* @internal
|
|
1310
1520
|
*/
|
|
1311
1521
|
published?: boolean;
|
|
1312
1522
|
/**
|
|
1313
|
-
* Each operations implementation MUST determine how to use this field.
|
|
1314
|
-
* In SQL it can be
|
|
1523
|
+
* Each storage operations implementation MUST determine how to use this field.
|
|
1524
|
+
* In SQL, it can be a `latest` field, and in DynamoDB it can be an SK.
|
|
1315
1525
|
*
|
|
1316
1526
|
* It is not meant to be used via the API.
|
|
1317
1527
|
* @internal
|
|
1318
1528
|
*/
|
|
1319
1529
|
latest?: boolean;
|
|
1320
|
-
|
|
1530
|
+
/**
|
|
1531
|
+
* This is to allow querying by any content model field defined by the user.
|
|
1532
|
+
*/
|
|
1533
|
+
[key: string]: any | CmsEntryListWhereRef;
|
|
1321
1534
|
}
|
|
1322
1535
|
/**
|
|
1323
1536
|
* Entry listing sort.
|
|
@@ -1343,10 +1556,12 @@ export interface CmsEntryGetParams {
|
|
|
1343
1556
|
* @category GraphQL params
|
|
1344
1557
|
*/
|
|
1345
1558
|
export interface CmsEntryListParams {
|
|
1346
|
-
where
|
|
1559
|
+
where?: CmsEntryListWhere;
|
|
1347
1560
|
sort?: CmsEntryListSort;
|
|
1561
|
+
search?: string;
|
|
1562
|
+
fields?: string[];
|
|
1348
1563
|
limit?: number;
|
|
1349
|
-
after?: string;
|
|
1564
|
+
after?: string | null;
|
|
1350
1565
|
}
|
|
1351
1566
|
/**
|
|
1352
1567
|
* Meta information for GraphQL output.
|
|
@@ -1358,7 +1573,7 @@ export interface CmsEntryMeta {
|
|
|
1358
1573
|
/**
|
|
1359
1574
|
* A cursor for pagination.
|
|
1360
1575
|
*/
|
|
1361
|
-
cursor: string;
|
|
1576
|
+
cursor: string | null;
|
|
1362
1577
|
/**
|
|
1363
1578
|
* Is there more items to load?
|
|
1364
1579
|
*/
|
|
@@ -1369,97 +1584,122 @@ export interface CmsEntryMeta {
|
|
|
1369
1584
|
totalCount: number;
|
|
1370
1585
|
}
|
|
1371
1586
|
export interface BeforeEntryCreateTopicParams {
|
|
1372
|
-
input:
|
|
1587
|
+
input: CreateCmsEntryInput;
|
|
1373
1588
|
entry: CmsEntry;
|
|
1374
|
-
model:
|
|
1589
|
+
model: StorageOperationsCmsModel;
|
|
1375
1590
|
}
|
|
1376
1591
|
export interface AfterEntryCreateTopicParams {
|
|
1377
|
-
input:
|
|
1592
|
+
input: CreateCmsEntryInput;
|
|
1378
1593
|
entry: CmsEntry;
|
|
1379
|
-
model:
|
|
1594
|
+
model: StorageOperationsCmsModel;
|
|
1380
1595
|
storageEntry: CmsEntry;
|
|
1381
1596
|
}
|
|
1382
|
-
export interface
|
|
1597
|
+
export interface BeforeEntryCreateRevisionTopicParams {
|
|
1598
|
+
input: CreateFromCmsEntryInput;
|
|
1383
1599
|
entry: CmsEntry;
|
|
1384
|
-
|
|
1600
|
+
original: CmsEntry;
|
|
1601
|
+
model: StorageOperationsCmsModel;
|
|
1385
1602
|
}
|
|
1386
|
-
export interface
|
|
1603
|
+
export interface AfterEntryCreateRevisionTopicParams {
|
|
1604
|
+
input: CreateFromCmsEntryInput;
|
|
1387
1605
|
entry: CmsEntry;
|
|
1388
|
-
|
|
1606
|
+
original: CmsEntry;
|
|
1607
|
+
model: StorageOperationsCmsModel;
|
|
1389
1608
|
storageEntry: CmsEntry;
|
|
1390
1609
|
}
|
|
1391
1610
|
export interface BeforeEntryUpdateTopicParams {
|
|
1392
|
-
input:
|
|
1611
|
+
input: UpdateCmsEntryInput;
|
|
1393
1612
|
original: CmsEntry;
|
|
1394
1613
|
entry: CmsEntry;
|
|
1395
|
-
model:
|
|
1614
|
+
model: StorageOperationsCmsModel;
|
|
1396
1615
|
}
|
|
1397
1616
|
export interface AfterEntryUpdateTopicParams {
|
|
1398
|
-
input:
|
|
1617
|
+
input: UpdateCmsEntryInput;
|
|
1399
1618
|
original: CmsEntry;
|
|
1400
1619
|
entry: CmsEntry;
|
|
1401
|
-
model:
|
|
1620
|
+
model: StorageOperationsCmsModel;
|
|
1402
1621
|
storageEntry: CmsEntry;
|
|
1403
1622
|
}
|
|
1404
1623
|
export interface BeforeEntryPublishTopicParams {
|
|
1405
1624
|
entry: CmsEntry;
|
|
1406
|
-
model:
|
|
1625
|
+
model: StorageOperationsCmsModel;
|
|
1407
1626
|
}
|
|
1408
1627
|
export interface AfterEntryPublishTopicParams {
|
|
1409
1628
|
entry: CmsEntry;
|
|
1410
|
-
model:
|
|
1629
|
+
model: StorageOperationsCmsModel;
|
|
1411
1630
|
storageEntry: CmsEntry;
|
|
1412
1631
|
}
|
|
1413
1632
|
export interface BeforeEntryUnpublishTopicParams {
|
|
1414
1633
|
entry: CmsEntry;
|
|
1415
|
-
model:
|
|
1634
|
+
model: StorageOperationsCmsModel;
|
|
1416
1635
|
}
|
|
1417
1636
|
export interface AfterEntryUnpublishTopicParams {
|
|
1418
1637
|
entry: CmsEntry;
|
|
1419
|
-
model:
|
|
1638
|
+
model: StorageOperationsCmsModel;
|
|
1420
1639
|
storageEntry: CmsEntry;
|
|
1421
1640
|
}
|
|
1422
1641
|
export interface BeforeEntryRequestChangesTopicParams {
|
|
1423
1642
|
entry: CmsEntry;
|
|
1424
|
-
model:
|
|
1643
|
+
model: StorageOperationsCmsModel;
|
|
1425
1644
|
}
|
|
1426
1645
|
export interface AfterEntryRequestChangesTopicParams {
|
|
1427
1646
|
entry: CmsEntry;
|
|
1428
|
-
model:
|
|
1647
|
+
model: StorageOperationsCmsModel;
|
|
1429
1648
|
storageEntry: CmsEntry;
|
|
1430
1649
|
}
|
|
1431
1650
|
export interface BeforeEntryRequestReviewTopicParams {
|
|
1432
1651
|
entry: CmsEntry;
|
|
1433
|
-
model:
|
|
1652
|
+
model: StorageOperationsCmsModel;
|
|
1434
1653
|
}
|
|
1435
1654
|
export interface AfterEntryRequestReviewTopicParams {
|
|
1436
1655
|
entry: CmsEntry;
|
|
1437
|
-
model:
|
|
1656
|
+
model: StorageOperationsCmsModel;
|
|
1438
1657
|
storageEntry: CmsEntry;
|
|
1439
1658
|
}
|
|
1440
1659
|
export interface BeforeEntryDeleteTopicParams {
|
|
1441
1660
|
entry: CmsEntry;
|
|
1442
|
-
model:
|
|
1661
|
+
model: StorageOperationsCmsModel;
|
|
1443
1662
|
}
|
|
1444
1663
|
export interface AfterEntryDeleteTopicParams {
|
|
1445
1664
|
entry: CmsEntry;
|
|
1446
|
-
model:
|
|
1665
|
+
model: StorageOperationsCmsModel;
|
|
1447
1666
|
}
|
|
1448
|
-
export interface
|
|
1667
|
+
export interface BeforeEntryDeleteRevisionTopicParams {
|
|
1449
1668
|
entry: CmsEntry;
|
|
1450
|
-
model:
|
|
1669
|
+
model: StorageOperationsCmsModel;
|
|
1451
1670
|
}
|
|
1452
|
-
export interface
|
|
1671
|
+
export interface AfterEntryDeleteRevisionTopicParams {
|
|
1453
1672
|
entry: CmsEntry;
|
|
1454
|
-
model:
|
|
1673
|
+
model: StorageOperationsCmsModel;
|
|
1455
1674
|
}
|
|
1456
1675
|
export interface BeforeEntryGetTopicParams {
|
|
1457
|
-
model:
|
|
1676
|
+
model: StorageOperationsCmsModel;
|
|
1458
1677
|
where: CmsEntryListWhere;
|
|
1459
1678
|
}
|
|
1460
1679
|
export interface BeforeEntryListTopicParams {
|
|
1461
1680
|
where: CmsEntryListWhere;
|
|
1462
|
-
model:
|
|
1681
|
+
model: StorageOperationsCmsModel;
|
|
1682
|
+
}
|
|
1683
|
+
/**
|
|
1684
|
+
* @category Context
|
|
1685
|
+
* @category CmsEntry
|
|
1686
|
+
*/
|
|
1687
|
+
export interface CreateCmsEntryInput {
|
|
1688
|
+
[key: string]: any;
|
|
1689
|
+
}
|
|
1690
|
+
/**
|
|
1691
|
+
* @category Context
|
|
1692
|
+
* @category CmsEntry
|
|
1693
|
+
*/
|
|
1694
|
+
export interface CreateFromCmsEntryInput {
|
|
1695
|
+
[key: string]: any;
|
|
1696
|
+
}
|
|
1697
|
+
/**
|
|
1698
|
+
* @category Context
|
|
1699
|
+
* @category CmsEntry
|
|
1700
|
+
*/
|
|
1701
|
+
export interface UpdateCmsEntryInput {
|
|
1702
|
+
[key: string]: any;
|
|
1463
1703
|
}
|
|
1464
1704
|
/**
|
|
1465
1705
|
* Cms Entry CRUD methods in the context.
|
|
@@ -1475,7 +1715,7 @@ export interface CmsEntryContext {
|
|
|
1475
1715
|
/**
|
|
1476
1716
|
* Get a list of entries for a model by a given ID (revision).
|
|
1477
1717
|
*/
|
|
1478
|
-
getEntriesByIds: (model: CmsModel, revisions: string[]) => Promise<CmsEntry[]
|
|
1718
|
+
getEntriesByIds: (model: CmsModel, revisions: string[]) => Promise<CmsEntry[]>;
|
|
1479
1719
|
/**
|
|
1480
1720
|
* Get the entry for a model by a given ID.
|
|
1481
1721
|
*/
|
|
@@ -1483,7 +1723,7 @@ export interface CmsEntryContext {
|
|
|
1483
1723
|
/**
|
|
1484
1724
|
* List entries for a model. Internal method used by get, listLatest and listPublished.
|
|
1485
1725
|
*/
|
|
1486
|
-
listEntries: (model: CmsModel, params
|
|
1726
|
+
listEntries: (model: CmsModel, params: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
1487
1727
|
/**
|
|
1488
1728
|
* Lists latest entries. Used for manage API.
|
|
1489
1729
|
*/
|
|
@@ -1503,15 +1743,20 @@ export interface CmsEntryContext {
|
|
|
1503
1743
|
/**
|
|
1504
1744
|
* Create a new content entry.
|
|
1505
1745
|
*/
|
|
1506
|
-
createEntry: (model: CmsModel,
|
|
1746
|
+
createEntry: (model: CmsModel, input: CreateCmsEntryInput) => Promise<CmsEntry>;
|
|
1507
1747
|
/**
|
|
1508
1748
|
* Create a new entry from already existing entry.
|
|
1509
1749
|
*/
|
|
1510
|
-
createEntryRevisionFrom: (model: CmsModel, id: string,
|
|
1750
|
+
createEntryRevisionFrom: (model: CmsModel, id: string, input: CreateFromCmsEntryInput) => Promise<CmsEntry>;
|
|
1511
1751
|
/**
|
|
1512
1752
|
* Update existing entry.
|
|
1513
1753
|
*/
|
|
1514
|
-
updateEntry: (model: CmsModel, id: string,
|
|
1754
|
+
updateEntry: (model: CmsModel, id: string, input: UpdateCmsEntryInput, meta?: Record<string, any>) => Promise<CmsEntry>;
|
|
1755
|
+
/**
|
|
1756
|
+
* Method that republishes entry with given identifier.
|
|
1757
|
+
* @internal
|
|
1758
|
+
*/
|
|
1759
|
+
republishEntry: (model: CmsModel, id: string) => Promise<CmsEntry>;
|
|
1515
1760
|
/**
|
|
1516
1761
|
* Delete only a certain revision of the entry.
|
|
1517
1762
|
*/
|
|
@@ -1545,14 +1790,14 @@ export interface CmsEntryContext {
|
|
|
1545
1790
|
*/
|
|
1546
1791
|
onBeforeEntryCreate: Topic<BeforeEntryCreateTopicParams>;
|
|
1547
1792
|
onAfterEntryCreate: Topic<AfterEntryCreateTopicParams>;
|
|
1548
|
-
|
|
1549
|
-
|
|
1793
|
+
onBeforeEntryCreateRevision: Topic<BeforeEntryCreateRevisionTopicParams>;
|
|
1794
|
+
onAfterEntryCreateRevision: Topic<AfterEntryCreateRevisionTopicParams>;
|
|
1550
1795
|
onBeforeEntryUpdate: Topic<BeforeEntryUpdateTopicParams>;
|
|
1551
1796
|
onAfterEntryUpdate: Topic<AfterEntryUpdateTopicParams>;
|
|
1552
1797
|
onBeforeEntryDelete: Topic<BeforeEntryDeleteTopicParams>;
|
|
1553
1798
|
onAfterEntryDelete: Topic<AfterEntryDeleteTopicParams>;
|
|
1554
|
-
|
|
1555
|
-
|
|
1799
|
+
onBeforeEntryDeleteRevision: Topic<BeforeEntryDeleteRevisionTopicParams>;
|
|
1800
|
+
onAfterEntryDeleteRevision: Topic<AfterEntryDeleteRevisionTopicParams>;
|
|
1556
1801
|
onBeforeEntryPublish: Topic<BeforeEntryPublishTopicParams>;
|
|
1557
1802
|
onAfterEntryPublish: Topic<AfterEntryPublishTopicParams>;
|
|
1558
1803
|
onBeforeEntryUnpublish: Topic<BeforeEntryUnpublishTopicParams>;
|
|
@@ -1589,15 +1834,22 @@ export declare type CmsEntryResolverFactory<TSource = any, TArgs = any, TContext
|
|
|
1589
1834
|
*/
|
|
1590
1835
|
export interface CmsSettingsPermission extends SecurityPermission {
|
|
1591
1836
|
}
|
|
1837
|
+
/**
|
|
1838
|
+
* A base security permission for CMS.
|
|
1839
|
+
*
|
|
1840
|
+
* @category SecurityPermission
|
|
1841
|
+
*/
|
|
1842
|
+
export interface BaseCmsSecurityPermission extends SecurityPermission {
|
|
1843
|
+
own?: boolean;
|
|
1844
|
+
rwd: string | number;
|
|
1845
|
+
}
|
|
1592
1846
|
/**
|
|
1593
1847
|
* A security permission for content model.
|
|
1594
1848
|
*
|
|
1595
1849
|
* @category SecurityPermission
|
|
1596
1850
|
* @category CmsModel
|
|
1597
1851
|
*/
|
|
1598
|
-
export interface CmsModelPermission extends
|
|
1599
|
-
own: boolean;
|
|
1600
|
-
rwd: string;
|
|
1852
|
+
export interface CmsModelPermission extends BaseCmsSecurityPermission {
|
|
1601
1853
|
/**
|
|
1602
1854
|
* A object representing `key: model.modelId` values where key is locale code.
|
|
1603
1855
|
*/
|
|
@@ -1617,9 +1869,7 @@ export interface CmsModelPermission extends SecurityPermission {
|
|
|
1617
1869
|
* @category SecurityPermission
|
|
1618
1870
|
* @category CmsGroup
|
|
1619
1871
|
*/
|
|
1620
|
-
export interface CmsGroupPermission extends
|
|
1621
|
-
own: boolean;
|
|
1622
|
-
rwd: string;
|
|
1872
|
+
export interface CmsGroupPermission extends BaseCmsSecurityPermission {
|
|
1623
1873
|
/**
|
|
1624
1874
|
* A object representing `key: group.id` values where key is locale code.
|
|
1625
1875
|
*/
|
|
@@ -1633,10 +1883,8 @@ export interface CmsGroupPermission extends SecurityPermission {
|
|
|
1633
1883
|
* @category SecurityPermission
|
|
1634
1884
|
* @category CmsEntry
|
|
1635
1885
|
*/
|
|
1636
|
-
export interface CmsEntryPermission extends
|
|
1637
|
-
|
|
1638
|
-
rwd: string;
|
|
1639
|
-
pw: string;
|
|
1886
|
+
export interface CmsEntryPermission extends BaseCmsSecurityPermission {
|
|
1887
|
+
pw?: string;
|
|
1640
1888
|
/**
|
|
1641
1889
|
* A object representing `key: model.modelId` values where key is locale code.
|
|
1642
1890
|
*/
|
|
@@ -1665,13 +1913,10 @@ export interface CmsGroupStorageOperationsListParams {
|
|
|
1665
1913
|
sort?: string[];
|
|
1666
1914
|
}
|
|
1667
1915
|
export interface CmsGroupStorageOperationsCreateParams {
|
|
1668
|
-
input: CmsGroupCreateInput;
|
|
1669
1916
|
group: CmsGroup;
|
|
1670
1917
|
}
|
|
1671
1918
|
export interface CmsGroupStorageOperationsUpdateParams {
|
|
1672
|
-
original: CmsGroup;
|
|
1673
1919
|
group: CmsGroup;
|
|
1674
|
-
input: CmsGroupUpdateInput;
|
|
1675
1920
|
}
|
|
1676
1921
|
export interface CmsGroupStorageOperationsDeleteParams {
|
|
1677
1922
|
group: CmsGroup;
|
|
@@ -1717,13 +1962,10 @@ export interface CmsModelStorageOperationsListParams {
|
|
|
1717
1962
|
where: CmsModelStorageOperationsListWhereParams;
|
|
1718
1963
|
}
|
|
1719
1964
|
export interface CmsModelStorageOperationsCreateParams {
|
|
1720
|
-
input: CmsModelCreateInput;
|
|
1721
1965
|
model: CmsModel;
|
|
1722
1966
|
}
|
|
1723
1967
|
export interface CmsModelStorageOperationsUpdateParams {
|
|
1724
|
-
original: CmsModel;
|
|
1725
1968
|
model: CmsModel;
|
|
1726
|
-
input: CmsModelUpdateInput;
|
|
1727
1969
|
}
|
|
1728
1970
|
export interface CmsModelStorageOperationsDeleteParams {
|
|
1729
1971
|
model: CmsModel;
|
|
@@ -1763,14 +2005,12 @@ export interface CmsEntryStorageOperationsGetParams {
|
|
|
1763
2005
|
export interface CmsEntryStorageOperationsListParams {
|
|
1764
2006
|
where: CmsEntryListWhere;
|
|
1765
2007
|
sort?: CmsEntryListSort;
|
|
2008
|
+
search?: string;
|
|
2009
|
+
fields?: string[];
|
|
1766
2010
|
limit?: number;
|
|
1767
|
-
after?: string;
|
|
2011
|
+
after?: string | null;
|
|
1768
2012
|
}
|
|
1769
2013
|
export interface CmsEntryStorageOperationsCreateParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
1770
|
-
/**
|
|
1771
|
-
* Input received from the user.
|
|
1772
|
-
*/
|
|
1773
|
-
input: Record<string, any>;
|
|
1774
2014
|
/**
|
|
1775
2015
|
* Real entry, with no transformations on it.
|
|
1776
2016
|
*/
|
|
@@ -1781,22 +2021,6 @@ export interface CmsEntryStorageOperationsCreateParams<T extends CmsStorageEntry
|
|
|
1781
2021
|
storageEntry: T;
|
|
1782
2022
|
}
|
|
1783
2023
|
export interface CmsEntryStorageOperationsCreateRevisionFromParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
1784
|
-
/**
|
|
1785
|
-
* The entry we are creating new one from.
|
|
1786
|
-
*/
|
|
1787
|
-
originalEntry: CmsEntry;
|
|
1788
|
-
/**
|
|
1789
|
-
* The entry we are creating new one from, directly from storage, with transformations on it.
|
|
1790
|
-
*/
|
|
1791
|
-
originalStorageEntry: T;
|
|
1792
|
-
/**
|
|
1793
|
-
* Latest entry, used to calculate the new version.
|
|
1794
|
-
*/
|
|
1795
|
-
latestEntry: CmsEntry;
|
|
1796
|
-
/**
|
|
1797
|
-
* Latest entry, used to calculate the new version, directly from storage, with transformations.
|
|
1798
|
-
*/
|
|
1799
|
-
latestStorageEntry: T;
|
|
1800
2024
|
/**
|
|
1801
2025
|
* Real entry, with no transformations on it.
|
|
1802
2026
|
*/
|
|
@@ -1807,18 +2031,6 @@ export interface CmsEntryStorageOperationsCreateRevisionFromParams<T extends Cms
|
|
|
1807
2031
|
storageEntry: T;
|
|
1808
2032
|
}
|
|
1809
2033
|
export interface CmsEntryStorageOperationsUpdateParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
1810
|
-
/**
|
|
1811
|
-
* Input received from the user.
|
|
1812
|
-
*/
|
|
1813
|
-
input: Record<string, any>;
|
|
1814
|
-
/**
|
|
1815
|
-
* Used to compare IDs, versions and passed into storage operations to be used if required.
|
|
1816
|
-
*/
|
|
1817
|
-
originalEntry: CmsEntry;
|
|
1818
|
-
/**
|
|
1819
|
-
* Directly from storage, with transformations on it.
|
|
1820
|
-
*/
|
|
1821
|
-
originalStorageEntry: T;
|
|
1822
2034
|
/**
|
|
1823
2035
|
* Real entry, with no transformations on it.
|
|
1824
2036
|
*/
|
|
@@ -1832,39 +2044,27 @@ export interface CmsEntryStorageOperationsDeleteRevisionParams<T extends CmsStor
|
|
|
1832
2044
|
/**
|
|
1833
2045
|
* Entry that was deleted.
|
|
1834
2046
|
*/
|
|
1835
|
-
|
|
2047
|
+
entry: CmsEntry;
|
|
1836
2048
|
/**
|
|
1837
2049
|
* Entry that was deleted, directly from storage, with transformations.
|
|
1838
2050
|
*/
|
|
1839
|
-
|
|
2051
|
+
storageEntry: T;
|
|
1840
2052
|
/**
|
|
1841
2053
|
* Entry that was set as latest.
|
|
1842
2054
|
*/
|
|
1843
|
-
|
|
2055
|
+
latestEntry: CmsEntry | null;
|
|
1844
2056
|
/**
|
|
1845
2057
|
* Entry that was set as latest, directly from storage, with transformations.
|
|
1846
2058
|
*/
|
|
1847
|
-
|
|
2059
|
+
latestStorageEntry: T | null;
|
|
1848
2060
|
}
|
|
1849
|
-
export interface CmsEntryStorageOperationsDeleteParams
|
|
2061
|
+
export interface CmsEntryStorageOperationsDeleteParams {
|
|
1850
2062
|
/**
|
|
1851
2063
|
* Entry that is going to be deleted.
|
|
1852
2064
|
*/
|
|
1853
2065
|
entry: CmsEntry;
|
|
1854
|
-
/**
|
|
1855
|
-
* Entry that is going to be deleted, directly from storage.
|
|
1856
|
-
*/
|
|
1857
|
-
storageEntry: T;
|
|
1858
2066
|
}
|
|
1859
2067
|
export interface CmsEntryStorageOperationsPublishParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
1860
|
-
/**
|
|
1861
|
-
* The entry record before it was published.
|
|
1862
|
-
*/
|
|
1863
|
-
originalEntry: CmsEntry;
|
|
1864
|
-
/**
|
|
1865
|
-
* Directly from storage, with transformations on it.
|
|
1866
|
-
*/
|
|
1867
|
-
originalStorageEntry: T;
|
|
1868
2068
|
/**
|
|
1869
2069
|
* The modified entry that is going to be saved as published.
|
|
1870
2070
|
* Entry is in its original form.
|
|
@@ -1876,14 +2076,6 @@ export interface CmsEntryStorageOperationsPublishParams<T extends CmsStorageEntr
|
|
|
1876
2076
|
storageEntry: T;
|
|
1877
2077
|
}
|
|
1878
2078
|
export interface CmsEntryStorageOperationsUnpublishParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
1879
|
-
/**
|
|
1880
|
-
* The entry record before it was unpublished.
|
|
1881
|
-
*/
|
|
1882
|
-
originalEntry: CmsEntry;
|
|
1883
|
-
/**
|
|
1884
|
-
* The entry record before it was unpublished, with transformations on it.
|
|
1885
|
-
*/
|
|
1886
|
-
originalStorageEntry: T;
|
|
1887
2079
|
/**
|
|
1888
2080
|
* The modified entry that is going to be saved as unpublished.
|
|
1889
2081
|
*/
|
|
@@ -1902,14 +2094,6 @@ export interface CmsEntryStorageOperationsRequestChangesParams<T extends CmsStor
|
|
|
1902
2094
|
* Entry that is prepared for the storageOperations, with the transformations.
|
|
1903
2095
|
*/
|
|
1904
2096
|
storageEntry: T;
|
|
1905
|
-
/**
|
|
1906
|
-
* Original entry from the storage.
|
|
1907
|
-
*/
|
|
1908
|
-
originalEntry: CmsEntry;
|
|
1909
|
-
/**
|
|
1910
|
-
* Original entry to be updated, directly from storage, with the transformations.
|
|
1911
|
-
*/
|
|
1912
|
-
originalStorageEntry: T;
|
|
1913
2097
|
}
|
|
1914
2098
|
export interface CmsEntryStorageOperationsRequestReviewParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
1915
2099
|
/**
|
|
@@ -1920,17 +2104,6 @@ export interface CmsEntryStorageOperationsRequestReviewParams<T extends CmsStora
|
|
|
1920
2104
|
* Entry that is prepared for the storageOperations, with the transformations.
|
|
1921
2105
|
*/
|
|
1922
2106
|
storageEntry: T;
|
|
1923
|
-
/**
|
|
1924
|
-
* Original entry from the storage.
|
|
1925
|
-
*/
|
|
1926
|
-
originalEntry: CmsEntry;
|
|
1927
|
-
/**
|
|
1928
|
-
* Original entry to be updated, directly from storage, with the transformations.
|
|
1929
|
-
*/
|
|
1930
|
-
originalStorageEntry: T;
|
|
1931
|
-
}
|
|
1932
|
-
export interface CmsEntryStorageOperationsGetAllRevisionsParams {
|
|
1933
|
-
ids: readonly string[];
|
|
1934
2107
|
}
|
|
1935
2108
|
export interface CmsEntryStorageOperationsGetByIdsParams {
|
|
1936
2109
|
ids: readonly string[];
|
|
@@ -1988,83 +2161,79 @@ export interface CmsEntryStorageOperations<T extends CmsStorageEntry = CmsStorag
|
|
|
1988
2161
|
/**
|
|
1989
2162
|
* Get all the entries of the ids.
|
|
1990
2163
|
*/
|
|
1991
|
-
getByIds: (model:
|
|
2164
|
+
getByIds: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetByIdsParams) => Promise<T[]>;
|
|
1992
2165
|
/**
|
|
1993
2166
|
* Get all the published entries of the ids.
|
|
1994
2167
|
*/
|
|
1995
|
-
getPublishedByIds: (model:
|
|
2168
|
+
getPublishedByIds: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetPublishedByIdsParams) => Promise<T[]>;
|
|
1996
2169
|
/**
|
|
1997
2170
|
* Get all the latest entries of the ids.
|
|
1998
2171
|
*/
|
|
1999
|
-
getLatestByIds: (model:
|
|
2172
|
+
getLatestByIds: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetLatestByIdsParams) => Promise<T[]>;
|
|
2000
2173
|
/**
|
|
2001
2174
|
* Get all revisions of the given entry id.
|
|
2002
2175
|
*/
|
|
2003
|
-
getRevisions: (model:
|
|
2004
|
-
/**
|
|
2005
|
-
* Get all revisions of all of the given IDs.
|
|
2006
|
-
*/
|
|
2007
|
-
getAllRevisionsByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetAllRevisionsParams) => Promise<T[]>;
|
|
2176
|
+
getRevisions: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetRevisionsParams) => Promise<T[]>;
|
|
2008
2177
|
/**
|
|
2009
2178
|
* Get the entry by the given revision id.
|
|
2010
2179
|
*/
|
|
2011
|
-
getRevisionById: (model:
|
|
2180
|
+
getRevisionById: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetRevisionParams) => Promise<T | null>;
|
|
2012
2181
|
/**
|
|
2013
2182
|
* Get the published entry by given entryId.
|
|
2014
2183
|
*/
|
|
2015
|
-
getPublishedRevisionByEntryId: (model:
|
|
2184
|
+
getPublishedRevisionByEntryId: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetPublishedRevisionParams) => Promise<T | null>;
|
|
2016
2185
|
/**
|
|
2017
2186
|
* Get the latest entry by given entryId.
|
|
2018
2187
|
*/
|
|
2019
|
-
getLatestRevisionByEntryId: (model:
|
|
2188
|
+
getLatestRevisionByEntryId: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetLatestRevisionParams) => Promise<T | null>;
|
|
2020
2189
|
/**
|
|
2021
2190
|
* Get the revision of the entry before given one.
|
|
2022
2191
|
*/
|
|
2023
|
-
getPreviousRevision: (model:
|
|
2192
|
+
getPreviousRevision: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetPreviousRevisionParams) => Promise<T | null>;
|
|
2024
2193
|
/**
|
|
2025
2194
|
* Gets entry by given params.
|
|
2026
2195
|
*/
|
|
2027
|
-
get: (model:
|
|
2196
|
+
get: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetParams) => Promise<T | null>;
|
|
2028
2197
|
/**
|
|
2029
2198
|
* List all entries. Filterable via params.
|
|
2030
2199
|
*/
|
|
2031
|
-
list: (model:
|
|
2200
|
+
list: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsListParams) => Promise<CmsEntryStorageOperationsListResponse<T>>;
|
|
2032
2201
|
/**
|
|
2033
2202
|
* Create a new entry.
|
|
2034
2203
|
*/
|
|
2035
|
-
create: (model:
|
|
2204
|
+
create: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsCreateParams<T>) => Promise<T>;
|
|
2036
2205
|
/**
|
|
2037
2206
|
* Create a new entry from existing one.
|
|
2038
2207
|
*/
|
|
2039
|
-
createRevisionFrom: (model:
|
|
2208
|
+
createRevisionFrom: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsCreateRevisionFromParams<T>) => Promise<T>;
|
|
2040
2209
|
/**
|
|
2041
2210
|
* Update existing entry.
|
|
2042
2211
|
*/
|
|
2043
|
-
update: (model:
|
|
2212
|
+
update: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsUpdateParams<T>) => Promise<T>;
|
|
2044
2213
|
/**
|
|
2045
2214
|
* Delete the entry revision.
|
|
2046
2215
|
*/
|
|
2047
|
-
deleteRevision: (model:
|
|
2216
|
+
deleteRevision: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsDeleteRevisionParams<T>) => Promise<void>;
|
|
2048
2217
|
/**
|
|
2049
2218
|
* Delete the entry.
|
|
2050
2219
|
*/
|
|
2051
|
-
delete: (model:
|
|
2220
|
+
delete: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsDeleteParams) => Promise<void>;
|
|
2052
2221
|
/**
|
|
2053
2222
|
* Publish the entry.
|
|
2054
2223
|
*/
|
|
2055
|
-
publish: (model:
|
|
2224
|
+
publish: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsPublishParams<T>) => Promise<T>;
|
|
2056
2225
|
/**
|
|
2057
2226
|
* Unpublish the entry.
|
|
2058
2227
|
*/
|
|
2059
|
-
unpublish: (model:
|
|
2228
|
+
unpublish: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsUnpublishParams<T>) => Promise<T>;
|
|
2060
2229
|
/**
|
|
2061
2230
|
* Request changes the entry.
|
|
2062
2231
|
*/
|
|
2063
|
-
requestChanges: (model:
|
|
2232
|
+
requestChanges: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsRequestChangesParams<T>) => Promise<T>;
|
|
2064
2233
|
/**
|
|
2065
2234
|
* Request review the entry.
|
|
2066
2235
|
*/
|
|
2067
|
-
requestReview: (model:
|
|
2236
|
+
requestReview: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsRequestReviewParams<T>) => Promise<CmsEntry>;
|
|
2068
2237
|
}
|
|
2069
2238
|
export declare enum CONTENT_ENTRY_STATUS {
|
|
2070
2239
|
DRAFT = "draft",
|
|
@@ -2081,7 +2250,6 @@ export interface CmsSettingsStorageOperationsCreateParams {
|
|
|
2081
2250
|
settings: CmsSettings;
|
|
2082
2251
|
}
|
|
2083
2252
|
export interface CmsSettingsStorageOperationsUpdateParams {
|
|
2084
|
-
original: CmsSettings;
|
|
2085
2253
|
settings: CmsSettings;
|
|
2086
2254
|
}
|
|
2087
2255
|
export interface CmsSettingsStorageOperations {
|
|
@@ -2114,7 +2282,6 @@ export interface CmsSystemStorageOperationsCreateParams {
|
|
|
2114
2282
|
}
|
|
2115
2283
|
export interface CmsSystemStorageOperationsUpdateParams {
|
|
2116
2284
|
system: CmsSystem;
|
|
2117
|
-
original: CmsSystem;
|
|
2118
2285
|
}
|
|
2119
2286
|
export interface CmsSystemStorageOperations {
|
|
2120
2287
|
/**
|
|
@@ -2136,11 +2303,11 @@ export interface HeadlessCmsStorageOperations {
|
|
|
2136
2303
|
groups: CmsGroupStorageOperations;
|
|
2137
2304
|
models: CmsModelStorageOperations;
|
|
2138
2305
|
entries: CmsEntryStorageOperations;
|
|
2139
|
-
init?: (cms: HeadlessCms) => Promise<void>;
|
|
2140
2306
|
/**
|
|
2141
|
-
*
|
|
2307
|
+
* Either attach something from the storage operations or run something in it.
|
|
2142
2308
|
*/
|
|
2143
|
-
|
|
2309
|
+
beforeInit?: (context: CmsContext) => Promise<void>;
|
|
2310
|
+
init?: (context: CmsContext) => Promise<void>;
|
|
2144
2311
|
/**
|
|
2145
2312
|
* An upgrade to run if necessary.
|
|
2146
2313
|
*/
|