@webiny/api-headless-cms 0.0.0-mt-2 → 0.0.0-unstable.1e66d121db
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 +60 -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 +23 -11
- 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 +10 -14
- package/crud/contentEntry/markLockedFields.js.map +1 -0
- package/crud/contentEntry/referenceFieldsMapping.d.ts +13 -0
- package/crud/contentEntry/referenceFieldsMapping.js +288 -0
- package/crud/contentEntry/referenceFieldsMapping.js.map +1 -0
- package/{content/plugins/crud → crud}/contentEntry.crud.d.ts +5 -9
- package/crud/contentEntry.crud.js +1255 -0
- package/crud/contentEntry.crud.js.map +1 -0
- package/crud/contentModel/afterCreate.d.ts +8 -0
- package/crud/contentModel/afterCreate.js +18 -0
- 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/crud/contentModel/afterDelete.js +18 -0
- package/crud/contentModel/afterDelete.js.map +1 -0
- package/crud/contentModel/afterUpdate.d.ts +8 -0
- package/crud/contentModel/afterUpdate.js +18 -0
- package/crud/contentModel/afterUpdate.js.map +1 -0
- package/crud/contentModel/beforeCreate.d.ts +15 -0
- package/{content/plugins/crud → crud}/contentModel/beforeCreate.js +61 -13
- package/crud/contentModel/beforeCreate.js.map +1 -0
- package/crud/contentModel/beforeDelete.d.ts +10 -0
- package/{content/plugins/crud → crud}/contentModel/beforeDelete.js +14 -10
- package/crud/contentModel/beforeDelete.js.map +1 -0
- package/crud/contentModel/beforeUpdate.d.ts +10 -0
- 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 +359 -0
- package/crud/contentModel/validateModelFields.js.map +1 -0
- package/{content/plugins/crud → crud}/contentModel.crud.d.ts +3 -3
- package/crud/contentModel.crud.js +590 -0
- package/crud/contentModel.crud.js.map +1 -0
- package/crud/contentModelGroup/beforeCreate.d.ts +10 -0
- package/{content/plugins/crud → crud}/contentModelGroup/beforeCreate.js +9 -9
- package/crud/contentModelGroup/beforeCreate.js.map +1 -0
- package/crud/contentModelGroup/beforeDelete.d.ts +10 -0
- package/{content/plugins/crud → crud}/contentModelGroup/beforeDelete.js +4 -4
- package/crud/contentModelGroup/beforeDelete.js.map +1 -0
- package/crud/contentModelGroup/beforeUpdate.d.ts +9 -0
- package/{content/plugins/crud → crud}/contentModelGroup/beforeUpdate.js +3 -3
- 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 +108 -93
- package/crud/contentModelGroup.crud.js.map +1 -0
- package/crud/index.d.ts +6 -0
- package/crud/index.js +85 -0
- package/crud/index.js.map +1 -0
- package/{plugins/crud → crud}/settings.crud.d.ts +3 -3
- package/crud/settings.crud.js +83 -0
- package/crud/settings.crud.js.map +1 -0
- package/{plugins/crud → crud}/system.crud.d.ts +6 -3
- package/crud/system.crud.js +221 -0
- 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 +304 -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/graphql/schema/baseContentSchema.js +76 -0
- 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 -23
- package/graphql/schema/createFieldResolvers.js.map +1 -0
- package/graphql/schema/createManageResolvers.d.ts +12 -0
- package/{content/plugins → graphql}/schema/createManageResolvers.js +36 -34
- package/graphql/schema/createManageResolvers.js.map +1 -0
- package/graphql/schema/createManageSDL.d.ts +10 -0
- package/{content/plugins → graphql}/schema/createManageSDL.js +23 -16
- package/graphql/schema/createManageSDL.js.map +1 -0
- package/graphql/schema/createPreviewResolvers.d.ts +12 -0
- package/graphql/schema/createPreviewResolvers.js +58 -0
- package/graphql/schema/createPreviewResolvers.js.map +1 -0
- package/graphql/schema/createReadResolvers.d.ts +12 -0
- package/graphql/schema/createReadResolvers.js +58 -0
- 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 +79 -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/graphql/schema/resolvers/preview/resolveGet.js +34 -0
- 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/graphql/schema/resolvers/read/resolveGet.js +34 -0
- 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 +275 -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 +12 -10
- 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 +44 -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 +9 -3
- 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 +45 -0
- package/plugins/CmsModelPlugin.js +194 -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 +2 -1
- 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 +124 -0
- package/storage/object.js.map +1 -0
- package/types.d.ts +645 -348
- package/types.js +52 -2
- package/types.js.map +1 -0
- package/upgrades/5.33.0/index.d.ts +3 -0
- package/upgrades/5.33.0/index.js +182 -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 +113 -0
- package/utils/converters/ConverterCollection.js.map +1 -0
- package/utils/converters/valueKeyStorageConverter.d.ts +18 -0
- package/utils/converters/valueKeyStorageConverter.js +148 -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 +1 -1
- package/utils/createTypeName.js.map +1 -0
- package/{content/plugins/utils → utils}/entryStorage.d.ts +3 -3
- package/{content/plugins/utils → utils}/entryStorage.js +4 -12
- 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 +77 -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 +106 -0
- package/utils/permissions.js.map +1 -0
- package/utils/pluralizedTypeName.d.ts +1 -0
- package/{content/plugins/utils → utils}/pluralizedTypeName.js +1 -1
- 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 +37 -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/contentEntry.crud.js +0 -931
- package/content/plugins/crud/contentModel/afterCreate.d.ts +0 -7
- package/content/plugins/crud/contentModel/afterCreate.js +0 -18
- package/content/plugins/crud/contentModel/afterDelete.d.ts +0 -7
- package/content/plugins/crud/contentModel/afterDelete.js +0 -18
- package/content/plugins/crud/contentModel/afterUpdate.d.ts +0 -7
- package/content/plugins/crud/contentModel/afterUpdate.js +0 -18
- package/content/plugins/crud/contentModel/beforeCreate.d.ts +0 -9
- package/content/plugins/crud/contentModel/beforeDelete.d.ts +0 -9
- package/content/plugins/crud/contentModel/beforeUpdate.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/contentModel.crud.js +0 -425
- package/content/plugins/crud/contentModelGroup/beforeCreate.d.ts +0 -9
- package/content/plugins/crud/contentModelGroup/beforeDelete.d.ts +0 -9
- package/content/plugins/crud/contentModelGroup/beforeUpdate.d.ts +0 -8
- package/content/plugins/crud/index.d.ts +0 -6
- package/content/plugins/crud/index.js +0 -100
- 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/baseSchema.js +0 -98
- 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/createPreviewResolvers.js +0 -55
- package/content/plugins/schema/createReadResolvers.d.ts +0 -10
- package/content/plugins/schema/createReadResolvers.js +0 -55
- 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/resolveGet.js +0 -38
- 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/resolveGet.js +0 -38
- 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/crud/system.crud.js +0 -182
- 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,19 @@
|
|
|
1
1
|
import { Plugin } from "@webiny/plugins/types";
|
|
2
2
|
import { I18NContext, I18NLocale } from "@webiny/api-i18n/types";
|
|
3
|
-
import {
|
|
4
|
-
import { TenancyContext } from "@webiny/api-tenancy/types";
|
|
3
|
+
import { Context } from "@webiny/api/types";
|
|
5
4
|
import { GraphQLFieldResolver, GraphQLSchemaDefinition, Resolvers } from "@webiny/handler-graphql/types";
|
|
6
|
-
import { BaseI18NContentContext } from "@webiny/api-i18n-content/types";
|
|
7
5
|
import { SecurityPermission } from "@webiny/api-security/types";
|
|
8
|
-
import { HttpContext } from "@webiny/handler-http/types";
|
|
9
6
|
import { DbContext } from "@webiny/handler-db/types";
|
|
10
7
|
import { FileManagerContext } from "@webiny/api-file-manager/types";
|
|
11
8
|
import { UpgradePlugin } from "@webiny/api-upgrade/types";
|
|
12
9
|
import { Topic } from "@webiny/pubsub/types";
|
|
10
|
+
import { CmsModelConverterCallable } from "./utils/converters/ConverterCollection";
|
|
11
|
+
export declare type ApiEndpoint = "manage" | "preview" | "read";
|
|
13
12
|
export interface HeadlessCms extends CmsSettingsContext, CmsSystemContext, CmsGroupContext, CmsModelContext, CmsEntryContext {
|
|
14
13
|
/**
|
|
15
14
|
* API type
|
|
16
15
|
*/
|
|
17
|
-
type:
|
|
16
|
+
type: ApiEndpoint | null;
|
|
18
17
|
/**
|
|
19
18
|
* Requested locale
|
|
20
19
|
*/
|
|
@@ -45,12 +44,16 @@ export interface HeadlessCms extends CmsSettingsContext, CmsSystemContext, CmsGr
|
|
|
45
44
|
*
|
|
46
45
|
* @category Context
|
|
47
46
|
*/
|
|
48
|
-
export interface CmsContext extends
|
|
47
|
+
export interface CmsContext extends Context, DbContext, I18NContext, FileManagerContext {
|
|
49
48
|
cms: HeadlessCms;
|
|
50
49
|
}
|
|
51
50
|
interface CmsModelFieldPredefinedValuesValue {
|
|
52
51
|
value: string;
|
|
53
52
|
label: string;
|
|
53
|
+
/**
|
|
54
|
+
* Default selected predefined value.
|
|
55
|
+
*/
|
|
56
|
+
selected?: boolean;
|
|
54
57
|
}
|
|
55
58
|
/**
|
|
56
59
|
* Object containing content model field predefined options and values.
|
|
@@ -79,6 +82,39 @@ interface CmsModelFieldRenderer {
|
|
|
79
82
|
*/
|
|
80
83
|
name: string;
|
|
81
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* A definition for content model field settings.
|
|
87
|
+
*
|
|
88
|
+
* @category ModelField
|
|
89
|
+
* @category Database model
|
|
90
|
+
*/
|
|
91
|
+
export interface CmsModelFieldSettings {
|
|
92
|
+
/**
|
|
93
|
+
* Predefined values (text, number)
|
|
94
|
+
* The default value for the field in case it is not predefined values field.
|
|
95
|
+
*/
|
|
96
|
+
defaultValue?: string | number | null | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* Object field has child fields.
|
|
99
|
+
*/
|
|
100
|
+
fields?: CmsModelField[];
|
|
101
|
+
/**
|
|
102
|
+
* Object field has child fields - so it needs to have a layout.
|
|
103
|
+
*/
|
|
104
|
+
layout?: string[][];
|
|
105
|
+
/**
|
|
106
|
+
* Ref field.
|
|
107
|
+
*/
|
|
108
|
+
models?: Pick<CmsModel, "modelId">[];
|
|
109
|
+
/**
|
|
110
|
+
* Date field.
|
|
111
|
+
*/
|
|
112
|
+
type?: string;
|
|
113
|
+
/**
|
|
114
|
+
* There are a lot of other settings that are possible to add, so we keep the type opened.
|
|
115
|
+
*/
|
|
116
|
+
[key: string]: any;
|
|
117
|
+
}
|
|
82
118
|
/**
|
|
83
119
|
* A definition for content model field. This type exists on the app side as well.
|
|
84
120
|
*
|
|
@@ -87,15 +123,37 @@ interface CmsModelFieldRenderer {
|
|
|
87
123
|
*/
|
|
88
124
|
export interface CmsModelField {
|
|
89
125
|
/**
|
|
90
|
-
* A generated ID for the model field
|
|
126
|
+
* A generated unique ID for the model field.
|
|
127
|
+
* MUST be absolute unique throughout the models.
|
|
128
|
+
* Must be in form of a-zA-Z0-9.
|
|
129
|
+
*
|
|
130
|
+
* We generate a unique id value when you're building a model via UI,
|
|
131
|
+
* but when user is creating a model via a plugin it is up to them to be careful about this.
|
|
91
132
|
*/
|
|
92
133
|
id: string;
|
|
93
134
|
/**
|
|
94
|
-
* A type of the field
|
|
135
|
+
* A type of the field.
|
|
136
|
+
* We are defining our built-in fields, so people know which are available by the default.
|
|
95
137
|
*/
|
|
96
|
-
type: string;
|
|
138
|
+
type: "boolean" | "datetime" | "file" | "long-text" | "number" | "object" | "ref" | "rich-text" | "text" | string;
|
|
97
139
|
/**
|
|
98
|
-
* A unique
|
|
140
|
+
* A unique storage ID for storing actual values.
|
|
141
|
+
* Must in form of a-zA-Z0-9@a-zA-Z0-9@a-zA-Z0-9.
|
|
142
|
+
*
|
|
143
|
+
* This is an auto-generated value: uses `id` and `type`
|
|
144
|
+
*
|
|
145
|
+
* This is used as path for the entry value.
|
|
146
|
+
*
|
|
147
|
+
* @internal
|
|
148
|
+
*/
|
|
149
|
+
storageId: string;
|
|
150
|
+
/**
|
|
151
|
+
* Field identifier for the model field that will be available to the outside world.
|
|
152
|
+
* `storageId` is used as path (or column) to store the data.
|
|
153
|
+
*
|
|
154
|
+
* Must in form of a-zA-Z0-9.
|
|
155
|
+
*
|
|
156
|
+
* This value MUST be unique in the CmsModel.
|
|
99
157
|
*/
|
|
100
158
|
fieldId: string;
|
|
101
159
|
/**
|
|
@@ -105,11 +163,11 @@ export interface CmsModelField {
|
|
|
105
163
|
/**
|
|
106
164
|
* Text below the field to clarify what is it meant to be in the field value
|
|
107
165
|
*/
|
|
108
|
-
helpText?: string;
|
|
166
|
+
helpText?: string | null;
|
|
109
167
|
/**
|
|
110
168
|
* Text to be displayed in the field
|
|
111
169
|
*/
|
|
112
|
-
placeholderText?: string;
|
|
170
|
+
placeholderText?: string | null;
|
|
113
171
|
/**
|
|
114
172
|
* Are predefined values enabled? And list of them
|
|
115
173
|
*/
|
|
@@ -142,9 +200,13 @@ export interface CmsModelField {
|
|
|
142
200
|
*
|
|
143
201
|
* @default {}
|
|
144
202
|
*/
|
|
145
|
-
settings?:
|
|
146
|
-
|
|
147
|
-
|
|
203
|
+
settings?: CmsModelFieldSettings;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Used for our internal functionality.
|
|
207
|
+
*/
|
|
208
|
+
export interface CmsModelFieldWithParent extends CmsModelField {
|
|
209
|
+
parent?: CmsModelFieldWithParent | null;
|
|
148
210
|
}
|
|
149
211
|
/**
|
|
150
212
|
* A definition for dateTime field to show possible type of the field in settings.
|
|
@@ -163,11 +225,11 @@ export interface CmsModelDateTimeField extends CmsModelField {
|
|
|
163
225
|
* @category ModelField
|
|
164
226
|
* @category FieldValidation
|
|
165
227
|
*/
|
|
166
|
-
export interface CmsModelFieldValidatorValidateParams {
|
|
228
|
+
export interface CmsModelFieldValidatorValidateParams<T = any> {
|
|
167
229
|
/**
|
|
168
230
|
* A value to be validated.
|
|
169
231
|
*/
|
|
170
|
-
value:
|
|
232
|
+
value: T;
|
|
171
233
|
/**
|
|
172
234
|
* Options from the CmsModelField validations.
|
|
173
235
|
*
|
|
@@ -186,7 +248,12 @@ export interface CmsModelFieldValidatorValidateParams {
|
|
|
186
248
|
/**
|
|
187
249
|
* An instance of the content model being validated.
|
|
188
250
|
*/
|
|
189
|
-
|
|
251
|
+
model: CmsModel;
|
|
252
|
+
/**
|
|
253
|
+
* If entry is sent it means it is an update operation.
|
|
254
|
+
* First usage is for the unique field value.
|
|
255
|
+
*/
|
|
256
|
+
entry?: CmsEntry;
|
|
190
257
|
}
|
|
191
258
|
/**
|
|
192
259
|
* Definition for the field validator.
|
|
@@ -253,7 +320,8 @@ export interface CmsModelFieldPatternValidatorPlugin extends Plugin {
|
|
|
253
320
|
*/
|
|
254
321
|
export interface LockedField {
|
|
255
322
|
/**
|
|
256
|
-
* Locked field ID - one used
|
|
323
|
+
* Locked field storage ID - one used to store values.
|
|
324
|
+
* We cannot change this due to old systems.
|
|
257
325
|
*/
|
|
258
326
|
fieldId: string;
|
|
259
327
|
/**
|
|
@@ -281,6 +349,10 @@ export interface CmsModel {
|
|
|
281
349
|
* Unique ID for the content model. Created from name if not defined by user.
|
|
282
350
|
*/
|
|
283
351
|
modelId: string;
|
|
352
|
+
/**
|
|
353
|
+
* Model tenant.
|
|
354
|
+
*/
|
|
355
|
+
tenant: string;
|
|
284
356
|
/**
|
|
285
357
|
* Locale this model belongs to.
|
|
286
358
|
*/
|
|
@@ -301,15 +373,15 @@ export interface CmsModel {
|
|
|
301
373
|
/**
|
|
302
374
|
* Description for the content model.
|
|
303
375
|
*/
|
|
304
|
-
description
|
|
376
|
+
description: string;
|
|
305
377
|
/**
|
|
306
378
|
* Date created
|
|
307
379
|
*/
|
|
308
|
-
createdOn?:
|
|
380
|
+
createdOn?: string;
|
|
309
381
|
/**
|
|
310
382
|
* Date saved. Changes on both save and create.
|
|
311
383
|
*/
|
|
312
|
-
savedOn?:
|
|
384
|
+
savedOn?: string;
|
|
313
385
|
/**
|
|
314
386
|
* CreatedBy object wrapper. Contains id, name and type of the user.
|
|
315
387
|
*/
|
|
@@ -343,9 +415,20 @@ export interface CmsModel {
|
|
|
343
415
|
*/
|
|
344
416
|
webinyVersion: string;
|
|
345
417
|
/**
|
|
346
|
-
*
|
|
418
|
+
* Is model private?
|
|
419
|
+
* This is meant to be used for some internal models - will not be visible in the schema.
|
|
420
|
+
* Only available for the plugin constructed models.
|
|
347
421
|
*/
|
|
348
|
-
|
|
422
|
+
isPrivate?: boolean;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* When sending model to the storage operations, it must contain createValueKeyToStorageConverter and createValueKeyFromStorageConverter
|
|
426
|
+
*
|
|
427
|
+
* @category CmsModel
|
|
428
|
+
*/
|
|
429
|
+
export interface StorageOperationsCmsModel extends CmsModel {
|
|
430
|
+
convertValueKeyToStorage: CmsModelConverterCallable;
|
|
431
|
+
convertValueKeyFromStorage: CmsModelConverterCallable;
|
|
349
432
|
}
|
|
350
433
|
/**
|
|
351
434
|
* @category ModelField
|
|
@@ -354,17 +437,18 @@ export interface CmsModelFieldDefinition {
|
|
|
354
437
|
fields: string;
|
|
355
438
|
typeDefs?: string;
|
|
356
439
|
}
|
|
440
|
+
interface CmsModelFieldToGraphQLCreateResolverParams {
|
|
441
|
+
models: CmsModel[];
|
|
442
|
+
model: CmsModel;
|
|
443
|
+
graphQLType: string;
|
|
444
|
+
field: CmsModelField;
|
|
445
|
+
createFieldResolvers: any;
|
|
446
|
+
}
|
|
357
447
|
export interface CmsModelFieldToGraphQLCreateResolver {
|
|
358
|
-
(params: {
|
|
359
|
-
|
|
360
|
-
model: CmsModel;
|
|
361
|
-
graphQLType: string;
|
|
362
|
-
field: CmsModelField;
|
|
363
|
-
createFieldResolvers: any;
|
|
364
|
-
}): GraphQLFieldResolver | {
|
|
365
|
-
resolver: GraphQLFieldResolver;
|
|
448
|
+
(params: CmsModelFieldToGraphQLCreateResolverParams): GraphQLFieldResolver | {
|
|
449
|
+
resolver: GraphQLFieldResolver | null;
|
|
366
450
|
typeResolvers: Resolvers<CmsContext>;
|
|
367
|
-
};
|
|
451
|
+
} | false;
|
|
368
452
|
}
|
|
369
453
|
/**
|
|
370
454
|
* @category Plugin
|
|
@@ -392,6 +476,15 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
392
476
|
* ```
|
|
393
477
|
*/
|
|
394
478
|
isSearchable: boolean;
|
|
479
|
+
/**
|
|
480
|
+
* Is the field searchable via full text search?
|
|
481
|
+
*
|
|
482
|
+
* Field is not full text searchable by default.
|
|
483
|
+
* ```ts
|
|
484
|
+
* fullTextSearch: false
|
|
485
|
+
* ```
|
|
486
|
+
*/
|
|
487
|
+
fullTextSearch?: boolean;
|
|
395
488
|
/**
|
|
396
489
|
* Is the field sortable via the GraphQL?
|
|
397
490
|
*
|
|
@@ -400,6 +493,27 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
400
493
|
* ```
|
|
401
494
|
*/
|
|
402
495
|
isSortable: boolean;
|
|
496
|
+
/**
|
|
497
|
+
* Optional method which creates the storageId.
|
|
498
|
+
* Primary use is for the datetime field, but if users has some specific fields, they can customize the storageId to their needs.
|
|
499
|
+
*
|
|
500
|
+
* ```ts
|
|
501
|
+
* createStorageId: ({field}) => {
|
|
502
|
+
* if (field.settings.type === "time) {
|
|
503
|
+
* return `${field.type}_time@${field.id}`
|
|
504
|
+
* }
|
|
505
|
+
* // use default method
|
|
506
|
+
* return undefined;
|
|
507
|
+
* }
|
|
508
|
+
* ```
|
|
509
|
+
*/
|
|
510
|
+
createStorageId?: (params: {
|
|
511
|
+
model: CmsModel;
|
|
512
|
+
field: CmsModelField;
|
|
513
|
+
}) => string | null | undefined;
|
|
514
|
+
/**
|
|
515
|
+
* Read API methods.
|
|
516
|
+
*/
|
|
403
517
|
read: {
|
|
404
518
|
/**
|
|
405
519
|
* Definition for get filtering for GraphQL.
|
|
@@ -455,16 +569,16 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
455
569
|
model: CmsModel;
|
|
456
570
|
field: CmsModelField;
|
|
457
571
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
458
|
-
}): CmsModelFieldDefinition | string;
|
|
572
|
+
}): CmsModelFieldDefinition | string | null;
|
|
459
573
|
/**
|
|
460
574
|
* Definition for field resolver.
|
|
461
|
-
* By default it is simple return of the `instance.values[
|
|
575
|
+
* By default it is simple return of the `instance.values[storageId]` but if required, users can define their own.
|
|
462
576
|
*
|
|
463
577
|
* ```ts
|
|
464
578
|
* read: {
|
|
465
579
|
* createResolver({ field }) {
|
|
466
580
|
* return instance => {
|
|
467
|
-
* return instance.values[field.
|
|
581
|
+
* return instance.values[field.storageId];
|
|
468
582
|
* };
|
|
469
583
|
* }
|
|
470
584
|
* }
|
|
@@ -492,7 +606,6 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
492
606
|
*/
|
|
493
607
|
createSchema?: (params: {
|
|
494
608
|
models: CmsModel[];
|
|
495
|
-
model: CmsModel;
|
|
496
609
|
}) => GraphQLSchemaDefinition<CmsContext>;
|
|
497
610
|
};
|
|
498
611
|
manage: {
|
|
@@ -535,7 +648,6 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
535
648
|
*/
|
|
536
649
|
createSchema?: (params: {
|
|
537
650
|
models: CmsModel[];
|
|
538
|
-
model: CmsModel;
|
|
539
651
|
}) => GraphQLSchemaDefinition<CmsContext>;
|
|
540
652
|
/**
|
|
541
653
|
* Definition of the field type for GraphQL - be aware if multiple values is selected. Probably same as `read.createTypeField`.
|
|
@@ -556,7 +668,7 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
556
668
|
model: CmsModel;
|
|
557
669
|
field: CmsModelField;
|
|
558
670
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
559
|
-
}) => CmsModelFieldDefinition | string;
|
|
671
|
+
}) => CmsModelFieldDefinition | string | null;
|
|
560
672
|
/**
|
|
561
673
|
* Definition for input GraphQL field type.
|
|
562
674
|
*
|
|
@@ -576,16 +688,16 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
576
688
|
model: CmsModel;
|
|
577
689
|
field: CmsModelField;
|
|
578
690
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
579
|
-
}) => CmsModelFieldDefinition | string;
|
|
691
|
+
}) => CmsModelFieldDefinition | string | null;
|
|
580
692
|
/**
|
|
581
693
|
* Definition for field resolver.
|
|
582
|
-
* By default it is simple return of the `instance.values[
|
|
694
|
+
* By default it is simple return of the `instance.values[storageId]` but if required, users can define their own.
|
|
583
695
|
*
|
|
584
696
|
* ```ts
|
|
585
697
|
* manage: {
|
|
586
698
|
* createResolver({ field }) {
|
|
587
699
|
* return instance => {
|
|
588
|
-
* return instance.values[field.
|
|
700
|
+
* return instance.values[field.storageId];
|
|
589
701
|
* };
|
|
590
702
|
* }
|
|
591
703
|
* }
|
|
@@ -643,7 +755,7 @@ export interface CreatedBy {
|
|
|
643
755
|
/**
|
|
644
756
|
* Full name of the user.
|
|
645
757
|
*/
|
|
646
|
-
displayName: string;
|
|
758
|
+
displayName: string | null;
|
|
647
759
|
/**
|
|
648
760
|
* Type of the user (admin, user)
|
|
649
761
|
*/
|
|
@@ -687,23 +799,42 @@ export interface CmsSettingsContext {
|
|
|
687
799
|
*/
|
|
688
800
|
getModelLastChange: () => Promise<Date>;
|
|
689
801
|
}
|
|
690
|
-
export interface
|
|
802
|
+
export interface OnSystemBeforeInstallTopicParams {
|
|
803
|
+
tenant: string;
|
|
804
|
+
locale: string;
|
|
805
|
+
}
|
|
806
|
+
export interface OnSystemAfterInstallTopicParams {
|
|
691
807
|
tenant: string;
|
|
808
|
+
locale: string;
|
|
692
809
|
}
|
|
693
|
-
export interface
|
|
810
|
+
export interface OnSystemInstallErrorTopicParams {
|
|
811
|
+
error: Error;
|
|
694
812
|
tenant: string;
|
|
813
|
+
locale: string;
|
|
695
814
|
}
|
|
696
815
|
export declare type CmsSystemContext = {
|
|
697
|
-
getSystemVersion: () => Promise<string>;
|
|
816
|
+
getSystemVersion: () => Promise<string | null>;
|
|
698
817
|
setSystemVersion: (version: string) => Promise<void>;
|
|
699
|
-
getReadAPIKey(): Promise<string>;
|
|
818
|
+
getReadAPIKey(): Promise<string | null>;
|
|
700
819
|
installSystem: () => Promise<void>;
|
|
701
820
|
upgradeSystem: (version: string) => Promise<boolean>;
|
|
702
821
|
/**
|
|
703
|
-
*
|
|
822
|
+
* Lifecycle events - deprecated
|
|
704
823
|
*/
|
|
705
|
-
|
|
706
|
-
|
|
824
|
+
/**
|
|
825
|
+
* @deprecated
|
|
826
|
+
*/
|
|
827
|
+
onBeforeSystemInstall: Topic<OnSystemBeforeInstallTopicParams>;
|
|
828
|
+
/**
|
|
829
|
+
* @deprecated
|
|
830
|
+
*/
|
|
831
|
+
onAfterSystemInstall: Topic<OnSystemAfterInstallTopicParams>;
|
|
832
|
+
/**
|
|
833
|
+
* Released in 5.34.0
|
|
834
|
+
*/
|
|
835
|
+
onSystemBeforeInstall: Topic<OnSystemBeforeInstallTopicParams>;
|
|
836
|
+
onSystemAfterInstall: Topic<OnSystemAfterInstallTopicParams>;
|
|
837
|
+
onSystemInstallError: Topic<OnSystemInstallErrorTopicParams>;
|
|
707
838
|
};
|
|
708
839
|
/**
|
|
709
840
|
* A GraphQL params.data parameter received when creating content model group.
|
|
@@ -748,6 +879,10 @@ export interface CmsGroup {
|
|
|
748
879
|
* Slug for the group. Must be unique.
|
|
749
880
|
*/
|
|
750
881
|
slug: string;
|
|
882
|
+
/**
|
|
883
|
+
* Group tenant.
|
|
884
|
+
*/
|
|
885
|
+
tenant: string;
|
|
751
886
|
/**
|
|
752
887
|
* Locale this group belongs to.
|
|
753
888
|
*/
|
|
@@ -755,11 +890,11 @@ export interface CmsGroup {
|
|
|
755
890
|
/**
|
|
756
891
|
* Description for the group.
|
|
757
892
|
*/
|
|
758
|
-
description
|
|
893
|
+
description: string;
|
|
759
894
|
/**
|
|
760
895
|
* Icon for the group. In a form of "ico/ico".
|
|
761
896
|
*/
|
|
762
|
-
icon
|
|
897
|
+
icon: string;
|
|
763
898
|
/**
|
|
764
899
|
* CreatedBy reference object.
|
|
765
900
|
*/
|
|
@@ -777,9 +912,11 @@ export interface CmsGroup {
|
|
|
777
912
|
*/
|
|
778
913
|
webinyVersion: string;
|
|
779
914
|
/**
|
|
780
|
-
*
|
|
915
|
+
* Is group private?
|
|
916
|
+
* This is meant to be used for some internal groups - will not be visible in the schema.
|
|
917
|
+
* Only available for the plugin constructed groups.
|
|
781
918
|
*/
|
|
782
|
-
|
|
919
|
+
isPrivate?: boolean;
|
|
783
920
|
}
|
|
784
921
|
/**
|
|
785
922
|
* A data.where parameter received when listing content model groups.
|
|
@@ -798,21 +935,21 @@ export interface CmsGroupListParams {
|
|
|
798
935
|
* @category CmsGroup
|
|
799
936
|
* @category Topic
|
|
800
937
|
*/
|
|
801
|
-
export interface
|
|
938
|
+
export interface OnGroupBeforeCreateTopicParams {
|
|
802
939
|
group: CmsGroup;
|
|
803
940
|
}
|
|
804
941
|
/**
|
|
805
942
|
* @category CmsGroup
|
|
806
943
|
* @category Topic
|
|
807
944
|
*/
|
|
808
|
-
export interface
|
|
945
|
+
export interface OnGroupAfterCreateTopicParams {
|
|
809
946
|
group: CmsGroup;
|
|
810
947
|
}
|
|
811
948
|
/**
|
|
812
949
|
* @category CmsGroup
|
|
813
950
|
* @category Topic
|
|
814
951
|
*/
|
|
815
|
-
export interface
|
|
952
|
+
export interface OnGroupBeforeUpdateTopicParams {
|
|
816
953
|
original: CmsGroup;
|
|
817
954
|
group: CmsGroup;
|
|
818
955
|
}
|
|
@@ -820,7 +957,7 @@ export interface BeforeGroupUpdateTopicParams {
|
|
|
820
957
|
* @category CmsGroup
|
|
821
958
|
* @category Topic
|
|
822
959
|
*/
|
|
823
|
-
export interface
|
|
960
|
+
export interface OnGroupAfterUpdateTopicParams {
|
|
824
961
|
original: CmsGroup;
|
|
825
962
|
group: CmsGroup;
|
|
826
963
|
}
|
|
@@ -828,14 +965,14 @@ export interface AfterGroupUpdateTopicParams {
|
|
|
828
965
|
* @category CmsGroup
|
|
829
966
|
* @category Topic
|
|
830
967
|
*/
|
|
831
|
-
export interface
|
|
968
|
+
export interface OnGroupBeforeDeleteTopicParams {
|
|
832
969
|
group: CmsGroup;
|
|
833
970
|
}
|
|
834
971
|
/**
|
|
835
972
|
* @category CmsGroup
|
|
836
973
|
* @category Topic
|
|
837
974
|
*/
|
|
838
|
-
export interface
|
|
975
|
+
export interface OnGroupAfterDeleteTopicParams {
|
|
839
976
|
group: CmsGroup;
|
|
840
977
|
}
|
|
841
978
|
/**
|
|
@@ -866,14 +1003,45 @@ export interface CmsGroupContext {
|
|
|
866
1003
|
*/
|
|
867
1004
|
deleteGroup: (id: string) => Promise<boolean>;
|
|
868
1005
|
/**
|
|
869
|
-
*
|
|
1006
|
+
* Clear the cached groups.
|
|
1007
|
+
*/
|
|
1008
|
+
clearGroupsCache: () => void;
|
|
1009
|
+
/**
|
|
1010
|
+
* Lifecycle events - deprecated
|
|
1011
|
+
*/
|
|
1012
|
+
/**
|
|
1013
|
+
* @deprecated
|
|
1014
|
+
*/
|
|
1015
|
+
onBeforeGroupCreate: Topic<OnGroupBeforeCreateTopicParams>;
|
|
1016
|
+
/**
|
|
1017
|
+
* @deprecated
|
|
1018
|
+
*/
|
|
1019
|
+
onAfterGroupCreate: Topic<OnGroupAfterCreateTopicParams>;
|
|
1020
|
+
/**
|
|
1021
|
+
* @deprecated
|
|
870
1022
|
*/
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
1023
|
+
onBeforeGroupUpdate: Topic<OnGroupBeforeUpdateTopicParams>;
|
|
1024
|
+
/**
|
|
1025
|
+
* @deprecated
|
|
1026
|
+
*/
|
|
1027
|
+
onAfterGroupUpdate: Topic<OnGroupAfterUpdateTopicParams>;
|
|
1028
|
+
/**
|
|
1029
|
+
* @deprecated
|
|
1030
|
+
*/
|
|
1031
|
+
onBeforeGroupDelete: Topic<OnGroupBeforeDeleteTopicParams>;
|
|
1032
|
+
/**
|
|
1033
|
+
* @deprecated
|
|
1034
|
+
*/
|
|
1035
|
+
onAfterGroupDelete: Topic<OnGroupAfterDeleteTopicParams>;
|
|
1036
|
+
/**
|
|
1037
|
+
* Lifecycle events released in 5.33.0
|
|
1038
|
+
*/
|
|
1039
|
+
onGroupBeforeCreate: Topic<OnGroupBeforeCreateTopicParams>;
|
|
1040
|
+
onGroupAfterCreate: Topic<OnGroupAfterCreateTopicParams>;
|
|
1041
|
+
onGroupBeforeUpdate: Topic<OnGroupBeforeUpdateTopicParams>;
|
|
1042
|
+
onGroupAfterUpdate: Topic<OnGroupAfterUpdateTopicParams>;
|
|
1043
|
+
onGroupBeforeDelete: Topic<OnGroupBeforeDeleteTopicParams>;
|
|
1044
|
+
onGroupAfterDelete: Topic<OnGroupAfterDeleteTopicParams>;
|
|
877
1045
|
}
|
|
878
1046
|
/**
|
|
879
1047
|
* Definition for content model field validator.
|
|
@@ -884,7 +1052,12 @@ export interface CmsGroupContext {
|
|
|
884
1052
|
export interface CmsModelFieldValidation {
|
|
885
1053
|
name: string;
|
|
886
1054
|
message: string;
|
|
887
|
-
settings?:
|
|
1055
|
+
settings?: {
|
|
1056
|
+
value?: string | number;
|
|
1057
|
+
values?: string[];
|
|
1058
|
+
preset?: string;
|
|
1059
|
+
[key: string]: any;
|
|
1060
|
+
};
|
|
888
1061
|
}
|
|
889
1062
|
/**
|
|
890
1063
|
* A GraphQL params.data parameter received when creating content model.
|
|
@@ -905,6 +1078,42 @@ export interface CmsModelCreateInput {
|
|
|
905
1078
|
* Description of the content model.
|
|
906
1079
|
*/
|
|
907
1080
|
description?: string;
|
|
1081
|
+
/**
|
|
1082
|
+
* Group where to put the content model in.
|
|
1083
|
+
*/
|
|
1084
|
+
group: string;
|
|
1085
|
+
/**
|
|
1086
|
+
* A list of content model fields to define the entry values.
|
|
1087
|
+
*/
|
|
1088
|
+
fields?: CmsModelFieldInput[];
|
|
1089
|
+
/**
|
|
1090
|
+
* Admin UI field layout
|
|
1091
|
+
*
|
|
1092
|
+
* ```ts
|
|
1093
|
+
* layout: [
|
|
1094
|
+
* [field1id, field2id],
|
|
1095
|
+
* [field3id]
|
|
1096
|
+
* ]
|
|
1097
|
+
* ```
|
|
1098
|
+
*/
|
|
1099
|
+
layout?: string[][];
|
|
1100
|
+
/**
|
|
1101
|
+
* The field that is being displayed as entry title.
|
|
1102
|
+
* It is picked as first available text field. Or user can select own field.
|
|
1103
|
+
*/
|
|
1104
|
+
titleFieldId?: string;
|
|
1105
|
+
}
|
|
1106
|
+
/**
|
|
1107
|
+
* A GraphQL params.data parameter received when creating content model from existing model.
|
|
1108
|
+
*
|
|
1109
|
+
* @category GraphQL params
|
|
1110
|
+
* @category CmsModel
|
|
1111
|
+
*/
|
|
1112
|
+
export interface CmsModelCreateFromInput extends CmsModelCreateInput {
|
|
1113
|
+
/**
|
|
1114
|
+
* Locale into which we want to clone the model into.
|
|
1115
|
+
*/
|
|
1116
|
+
locale?: string;
|
|
908
1117
|
}
|
|
909
1118
|
/**
|
|
910
1119
|
* A definition for content model field received from the user.
|
|
@@ -926,7 +1135,7 @@ export interface CmsModelFieldInput {
|
|
|
926
1135
|
*/
|
|
927
1136
|
type: string;
|
|
928
1137
|
/**
|
|
929
|
-
*
|
|
1138
|
+
* Field outside world identifier for the field. Must be unique in the model.
|
|
930
1139
|
*/
|
|
931
1140
|
fieldId: string;
|
|
932
1141
|
/**
|
|
@@ -977,6 +1186,10 @@ export interface CmsModelUpdateInput {
|
|
|
977
1186
|
* A new content model name.
|
|
978
1187
|
*/
|
|
979
1188
|
name?: string;
|
|
1189
|
+
/**
|
|
1190
|
+
* A group we want to move the model to.
|
|
1191
|
+
*/
|
|
1192
|
+
group?: string;
|
|
980
1193
|
/**
|
|
981
1194
|
* A new description of the content model.
|
|
982
1195
|
*/
|
|
@@ -1027,13 +1240,22 @@ export interface ModelManagerPlugin extends Plugin {
|
|
|
1027
1240
|
*/
|
|
1028
1241
|
create: (context: CmsContext, model: CmsModel) => Promise<CmsModelManager>;
|
|
1029
1242
|
}
|
|
1243
|
+
/**
|
|
1244
|
+
* A content entry values definition for and from the database.
|
|
1245
|
+
*
|
|
1246
|
+
* @category Database model
|
|
1247
|
+
* @category CmsEntry
|
|
1248
|
+
*/
|
|
1249
|
+
export interface CmsEntryValues {
|
|
1250
|
+
[key: string]: any;
|
|
1251
|
+
}
|
|
1030
1252
|
/**
|
|
1031
1253
|
* A content entry definition for and from the database.
|
|
1032
1254
|
*
|
|
1033
1255
|
* @category Database model
|
|
1034
1256
|
* @category CmsEntry
|
|
1035
1257
|
*/
|
|
1036
|
-
export interface CmsEntry {
|
|
1258
|
+
export interface CmsEntry<T = CmsEntryValues> {
|
|
1037
1259
|
/**
|
|
1038
1260
|
* A version of the webiny this entry was created with.
|
|
1039
1261
|
* This can be used when upgrading the system so we know which entries to update.
|
|
@@ -1098,11 +1320,22 @@ export interface CmsEntry {
|
|
|
1098
1320
|
*/
|
|
1099
1321
|
status: CmsEntryStatus;
|
|
1100
1322
|
/**
|
|
1101
|
-
* A mapped
|
|
1323
|
+
* A mapped storageId -> value object.
|
|
1102
1324
|
*
|
|
1103
1325
|
* @see CmsModelField
|
|
1104
1326
|
*/
|
|
1105
|
-
values:
|
|
1327
|
+
values: T;
|
|
1328
|
+
/**
|
|
1329
|
+
* Settings for the given entry.
|
|
1330
|
+
*
|
|
1331
|
+
* Introduced with Advanced Publishing Workflow - will be always inserted after this PR is merged.
|
|
1332
|
+
* Be aware that when accessing properties in it on old systems - it will break if not checked first.
|
|
1333
|
+
*
|
|
1334
|
+
* Available only on the Manage API in entry GraphQL type meta.data property.
|
|
1335
|
+
*/
|
|
1336
|
+
meta?: {
|
|
1337
|
+
[key: string]: any;
|
|
1338
|
+
};
|
|
1106
1339
|
}
|
|
1107
1340
|
export interface CmsStorageEntry extends CmsEntry {
|
|
1108
1341
|
[key: string]: any;
|
|
@@ -1118,18 +1351,14 @@ export interface CmsStorageEntry extends CmsEntry {
|
|
|
1118
1351
|
* @category CmsModel
|
|
1119
1352
|
*/
|
|
1120
1353
|
export interface CmsModelManager {
|
|
1121
|
-
/**
|
|
1122
|
-
* List entries in this content model.
|
|
1123
|
-
*/
|
|
1124
|
-
list: (params?: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
1125
1354
|
/**
|
|
1126
1355
|
* List only published entries in the content model.
|
|
1127
1356
|
*/
|
|
1128
|
-
listPublished: (params
|
|
1357
|
+
listPublished: (params: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
1129
1358
|
/**
|
|
1130
1359
|
* List latest entries in the content model. Used for administration.
|
|
1131
1360
|
*/
|
|
1132
|
-
listLatest: (params
|
|
1361
|
+
listLatest: (params: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
1133
1362
|
/**
|
|
1134
1363
|
* Get a list of published entries by the ID list.
|
|
1135
1364
|
*/
|
|
@@ -1145,38 +1374,48 @@ export interface CmsModelManager {
|
|
|
1145
1374
|
/**
|
|
1146
1375
|
* Create a entry.
|
|
1147
1376
|
*/
|
|
1148
|
-
create: (data:
|
|
1377
|
+
create: (data: CreateCmsEntryInput) => Promise<CmsEntry>;
|
|
1149
1378
|
/**
|
|
1150
1379
|
* Update a entry.
|
|
1151
1380
|
*/
|
|
1152
|
-
update: (id: string, data:
|
|
1381
|
+
update: (id: string, data: UpdateCmsEntryInput) => Promise<CmsEntry>;
|
|
1153
1382
|
/**
|
|
1154
1383
|
* Delete a entry.
|
|
1155
1384
|
*/
|
|
1156
1385
|
delete: (id: string) => Promise<void>;
|
|
1157
1386
|
}
|
|
1158
|
-
export interface
|
|
1159
|
-
input:
|
|
1387
|
+
export interface OnModelBeforeCreateTopicParams {
|
|
1388
|
+
input: CmsModelCreateInput;
|
|
1389
|
+
model: CmsModel;
|
|
1390
|
+
}
|
|
1391
|
+
export interface OnModelAfterCreateTopicParams {
|
|
1392
|
+
input: CmsModelCreateInput;
|
|
1393
|
+
model: CmsModel;
|
|
1394
|
+
}
|
|
1395
|
+
export interface OnModelBeforeCreateFromTopicParams {
|
|
1396
|
+
input: CmsModelCreateInput;
|
|
1397
|
+
original: CmsModel;
|
|
1160
1398
|
model: CmsModel;
|
|
1161
1399
|
}
|
|
1162
|
-
export interface
|
|
1163
|
-
input:
|
|
1400
|
+
export interface OnModelAfterCreateFromTopicParams {
|
|
1401
|
+
input: CmsModelCreateInput;
|
|
1402
|
+
original: CmsModel;
|
|
1164
1403
|
model: CmsModel;
|
|
1165
1404
|
}
|
|
1166
|
-
export interface
|
|
1167
|
-
input:
|
|
1405
|
+
export interface OnModelBeforeUpdateTopicParams {
|
|
1406
|
+
input: CmsModelUpdateInput;
|
|
1168
1407
|
original: CmsModel;
|
|
1169
1408
|
model: CmsModel;
|
|
1170
1409
|
}
|
|
1171
|
-
export interface
|
|
1172
|
-
input:
|
|
1410
|
+
export interface OnModelAfterUpdateTopicParams {
|
|
1411
|
+
input: CmsModelUpdateInput;
|
|
1173
1412
|
original: CmsModel;
|
|
1174
1413
|
model: CmsModel;
|
|
1175
1414
|
}
|
|
1176
|
-
export interface
|
|
1415
|
+
export interface OnModelBeforeDeleteTopicParams {
|
|
1177
1416
|
model: CmsModel;
|
|
1178
1417
|
}
|
|
1179
|
-
export interface
|
|
1418
|
+
export interface OnModelAfterDeleteTopicParams {
|
|
1180
1419
|
model: CmsModel;
|
|
1181
1420
|
}
|
|
1182
1421
|
export interface CmsModelUpdateDirectParams {
|
|
@@ -1190,15 +1429,6 @@ export interface CmsModelUpdateDirectParams {
|
|
|
1190
1429
|
* @category CmsModel
|
|
1191
1430
|
*/
|
|
1192
1431
|
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
1432
|
/**
|
|
1203
1433
|
* Get a single content model.
|
|
1204
1434
|
*/
|
|
@@ -1211,12 +1441,12 @@ export interface CmsModelContext {
|
|
|
1211
1441
|
* Create a content model.
|
|
1212
1442
|
*/
|
|
1213
1443
|
createModel: (data: CmsModelCreateInput) => Promise<CmsModel>;
|
|
1444
|
+
/**
|
|
1445
|
+
* Create a content model from the given model - clone.
|
|
1446
|
+
*/
|
|
1447
|
+
createModelFrom: (modelId: string, data: CmsModelCreateFromInput) => Promise<CmsModel>;
|
|
1214
1448
|
/**
|
|
1215
1449
|
* Update content model without data validation. Used internally.
|
|
1216
|
-
*
|
|
1217
|
-
* @param model - existing content model
|
|
1218
|
-
* @param data - data to be updated
|
|
1219
|
-
*
|
|
1220
1450
|
* @hidden
|
|
1221
1451
|
*/
|
|
1222
1452
|
updateModelDirect: (params: CmsModelUpdateDirectParams) => Promise<CmsModel>;
|
|
@@ -1232,29 +1462,85 @@ export interface CmsModelContext {
|
|
|
1232
1462
|
* Get a instance of CmsModelManager for given content modelId.
|
|
1233
1463
|
*
|
|
1234
1464
|
* @see CmsModelManager
|
|
1465
|
+
*
|
|
1466
|
+
* @deprecated use the getEntryManager() method instead
|
|
1235
1467
|
*/
|
|
1236
|
-
getModelManager: (
|
|
1468
|
+
getModelManager: (model: CmsModel | string) => Promise<CmsModelManager>;
|
|
1469
|
+
getEntryManager: (model: CmsModel | string) => Promise<CmsModelManager>;
|
|
1237
1470
|
/**
|
|
1238
1471
|
* Get all content model managers mapped by modelId.
|
|
1239
1472
|
* @see CmsModelManager
|
|
1473
|
+
* @deprecated use getEntryManagers instead
|
|
1240
1474
|
*/
|
|
1241
1475
|
getManagers: () => Map<string, CmsModelManager>;
|
|
1476
|
+
getEntryManagers: () => Map<string, CmsModelManager>;
|
|
1477
|
+
/**
|
|
1478
|
+
* Clear all the model caches.
|
|
1479
|
+
*/
|
|
1480
|
+
clearModelsCache: () => void;
|
|
1242
1481
|
/**
|
|
1243
|
-
*
|
|
1482
|
+
* Lifecycle events - deprecated.
|
|
1244
1483
|
*/
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1484
|
+
/**
|
|
1485
|
+
* @deprecated
|
|
1486
|
+
*/
|
|
1487
|
+
onBeforeModelCreate: Topic<OnModelBeforeCreateTopicParams>;
|
|
1488
|
+
/**
|
|
1489
|
+
* @deprecated
|
|
1490
|
+
*/
|
|
1491
|
+
onAfterModelCreate: Topic<OnModelAfterCreateTopicParams>;
|
|
1492
|
+
/**
|
|
1493
|
+
* @deprecated
|
|
1494
|
+
*/
|
|
1495
|
+
onBeforeModelCreateFrom: Topic<OnModelBeforeCreateFromTopicParams>;
|
|
1496
|
+
/**
|
|
1497
|
+
* @deprecated
|
|
1498
|
+
*/
|
|
1499
|
+
onAfterModelCreateFrom: Topic<OnModelAfterCreateFromTopicParams>;
|
|
1500
|
+
/**
|
|
1501
|
+
* @deprecated
|
|
1502
|
+
*/
|
|
1503
|
+
onBeforeModelUpdate: Topic<OnModelBeforeUpdateTopicParams>;
|
|
1504
|
+
/**
|
|
1505
|
+
* @deprecated
|
|
1506
|
+
*/
|
|
1507
|
+
onAfterModelUpdate: Topic<OnModelAfterUpdateTopicParams>;
|
|
1508
|
+
/**
|
|
1509
|
+
* @deprecated
|
|
1510
|
+
*/
|
|
1511
|
+
onBeforeModelDelete: Topic<OnModelBeforeDeleteTopicParams>;
|
|
1512
|
+
/**
|
|
1513
|
+
* @deprecated
|
|
1514
|
+
*/
|
|
1515
|
+
onAfterModelDelete: Topic<OnModelAfterDeleteTopicParams>;
|
|
1516
|
+
/**
|
|
1517
|
+
* Lifecycle events - released in 5.33.0
|
|
1518
|
+
*/
|
|
1519
|
+
onModelBeforeCreate: Topic<OnModelBeforeCreateTopicParams>;
|
|
1520
|
+
onModelAfterCreate: Topic<OnModelAfterCreateTopicParams>;
|
|
1521
|
+
onModelBeforeCreateFrom: Topic<OnModelBeforeCreateFromTopicParams>;
|
|
1522
|
+
onModelAfterCreateFrom: Topic<OnModelAfterCreateFromTopicParams>;
|
|
1523
|
+
onModelBeforeUpdate: Topic<OnModelBeforeUpdateTopicParams>;
|
|
1524
|
+
onModelAfterUpdate: Topic<OnModelAfterUpdateTopicParams>;
|
|
1525
|
+
onModelBeforeDelete: Topic<OnModelBeforeDeleteTopicParams>;
|
|
1526
|
+
onModelAfterDelete: Topic<OnModelAfterDeleteTopicParams>;
|
|
1251
1527
|
}
|
|
1252
1528
|
/**
|
|
1253
1529
|
* Available statuses for content entry.
|
|
1254
1530
|
*
|
|
1255
1531
|
* @category CmsEntry
|
|
1256
1532
|
*/
|
|
1257
|
-
declare type CmsEntryStatus = "published" | "unpublished" | "
|
|
1533
|
+
export declare type CmsEntryStatus = "published" | "unpublished" | "draft";
|
|
1534
|
+
export interface CmsEntryListWhereRef {
|
|
1535
|
+
id?: string;
|
|
1536
|
+
id_in?: string[];
|
|
1537
|
+
id_not?: string;
|
|
1538
|
+
id_not_in?: string[];
|
|
1539
|
+
entryId?: string;
|
|
1540
|
+
entryId_not?: string;
|
|
1541
|
+
entryId_in?: string[];
|
|
1542
|
+
entryId_not_in?: string[];
|
|
1543
|
+
}
|
|
1258
1544
|
/**
|
|
1259
1545
|
* Entry listing where params.
|
|
1260
1546
|
*
|
|
@@ -1277,7 +1563,9 @@ export interface CmsEntryListWhere {
|
|
|
1277
1563
|
entryId_in?: string[];
|
|
1278
1564
|
entryId_not_in?: string[];
|
|
1279
1565
|
/**
|
|
1280
|
-
*
|
|
1566
|
+
* Contains the owner of the entry. An "owner" is the identity who originally created the entry.
|
|
1567
|
+
* Subsequent revisions can be created by other identities, and those will be stored in `createdBy`,
|
|
1568
|
+
* but the `owner` is always the original author of the entry.
|
|
1281
1569
|
*
|
|
1282
1570
|
* Can be sent via the API or set internal if user can see only their own entries.
|
|
1283
1571
|
*/
|
|
@@ -1302,22 +1590,25 @@ export interface CmsEntryListWhere {
|
|
|
1302
1590
|
version_lt?: number;
|
|
1303
1591
|
version_gt?: number;
|
|
1304
1592
|
/**
|
|
1305
|
-
* Each operations implementation MUST determine how to use this field.
|
|
1306
|
-
* In SQL it can be published field and in DynamoDB can be
|
|
1593
|
+
* Each storage operations implementation MUST determine how to use this field.
|
|
1594
|
+
* In SQL, it can be a `published` field, and in DynamoDB it can be an SK.
|
|
1307
1595
|
*
|
|
1308
1596
|
* It is not meant to be used via the API.
|
|
1309
1597
|
* @internal
|
|
1310
1598
|
*/
|
|
1311
1599
|
published?: boolean;
|
|
1312
1600
|
/**
|
|
1313
|
-
* Each operations implementation MUST determine how to use this field.
|
|
1314
|
-
* In SQL it can be
|
|
1601
|
+
* Each storage operations implementation MUST determine how to use this field.
|
|
1602
|
+
* In SQL, it can be a `latest` field, and in DynamoDB it can be an SK.
|
|
1315
1603
|
*
|
|
1316
1604
|
* It is not meant to be used via the API.
|
|
1317
1605
|
* @internal
|
|
1318
1606
|
*/
|
|
1319
1607
|
latest?: boolean;
|
|
1320
|
-
|
|
1608
|
+
/**
|
|
1609
|
+
* This is to allow querying by any content model field defined by the user.
|
|
1610
|
+
*/
|
|
1611
|
+
[key: string]: any | CmsEntryListWhereRef;
|
|
1321
1612
|
}
|
|
1322
1613
|
/**
|
|
1323
1614
|
* Entry listing sort.
|
|
@@ -1343,10 +1634,12 @@ export interface CmsEntryGetParams {
|
|
|
1343
1634
|
* @category GraphQL params
|
|
1344
1635
|
*/
|
|
1345
1636
|
export interface CmsEntryListParams {
|
|
1346
|
-
where
|
|
1637
|
+
where?: CmsEntryListWhere;
|
|
1347
1638
|
sort?: CmsEntryListSort;
|
|
1639
|
+
search?: string;
|
|
1640
|
+
fields?: string[];
|
|
1348
1641
|
limit?: number;
|
|
1349
|
-
after?: string;
|
|
1642
|
+
after?: string | null;
|
|
1350
1643
|
}
|
|
1351
1644
|
/**
|
|
1352
1645
|
* Meta information for GraphQL output.
|
|
@@ -1358,7 +1651,7 @@ export interface CmsEntryMeta {
|
|
|
1358
1651
|
/**
|
|
1359
1652
|
* A cursor for pagination.
|
|
1360
1653
|
*/
|
|
1361
|
-
cursor: string;
|
|
1654
|
+
cursor: string | null;
|
|
1362
1655
|
/**
|
|
1363
1656
|
* Is there more items to load?
|
|
1364
1657
|
*/
|
|
@@ -1368,98 +1661,143 @@ export interface CmsEntryMeta {
|
|
|
1368
1661
|
*/
|
|
1369
1662
|
totalCount: number;
|
|
1370
1663
|
}
|
|
1371
|
-
export interface
|
|
1372
|
-
input:
|
|
1664
|
+
export interface OnEntryBeforeCreateTopicParams {
|
|
1665
|
+
input: CreateCmsEntryInput;
|
|
1373
1666
|
entry: CmsEntry;
|
|
1374
|
-
model:
|
|
1667
|
+
model: StorageOperationsCmsModel;
|
|
1375
1668
|
}
|
|
1376
|
-
export interface
|
|
1377
|
-
input:
|
|
1669
|
+
export interface OnEntryAfterCreateTopicParams {
|
|
1670
|
+
input: CreateCmsEntryInput;
|
|
1378
1671
|
entry: CmsEntry;
|
|
1379
|
-
model:
|
|
1672
|
+
model: StorageOperationsCmsModel;
|
|
1380
1673
|
storageEntry: CmsEntry;
|
|
1381
1674
|
}
|
|
1382
|
-
export interface
|
|
1675
|
+
export interface OnEntryCreateErrorTopicParams {
|
|
1676
|
+
error: Error;
|
|
1677
|
+
input: CreateCmsEntryInput;
|
|
1383
1678
|
entry: CmsEntry;
|
|
1384
1679
|
model: CmsModel;
|
|
1385
1680
|
}
|
|
1386
|
-
export interface
|
|
1681
|
+
export interface OnEntryRevisionBeforeCreateTopicParams {
|
|
1682
|
+
input: CreateFromCmsEntryInput;
|
|
1387
1683
|
entry: CmsEntry;
|
|
1388
|
-
|
|
1389
|
-
|
|
1684
|
+
original: CmsEntry;
|
|
1685
|
+
model: StorageOperationsCmsModel;
|
|
1390
1686
|
}
|
|
1391
|
-
export interface
|
|
1392
|
-
input:
|
|
1687
|
+
export interface OnEntryRevisionAfterCreateTopicParams {
|
|
1688
|
+
input: CreateFromCmsEntryInput;
|
|
1689
|
+
entry: CmsEntry;
|
|
1393
1690
|
original: CmsEntry;
|
|
1691
|
+
model: StorageOperationsCmsModel;
|
|
1692
|
+
storageEntry: CmsEntry;
|
|
1693
|
+
}
|
|
1694
|
+
export interface OnEntryCreateRevisionErrorTopicParams {
|
|
1695
|
+
error: Error;
|
|
1696
|
+
input: CreateFromCmsEntryInput;
|
|
1394
1697
|
entry: CmsEntry;
|
|
1395
1698
|
model: CmsModel;
|
|
1396
1699
|
}
|
|
1397
|
-
export interface
|
|
1398
|
-
input:
|
|
1700
|
+
export interface OnEntryBeforeUpdateTopicParams {
|
|
1701
|
+
input: UpdateCmsEntryInput;
|
|
1399
1702
|
original: CmsEntry;
|
|
1400
1703
|
entry: CmsEntry;
|
|
1401
|
-
model:
|
|
1402
|
-
storageEntry: CmsEntry;
|
|
1704
|
+
model: StorageOperationsCmsModel;
|
|
1403
1705
|
}
|
|
1404
|
-
export interface
|
|
1706
|
+
export interface OnEntryAfterUpdateTopicParams {
|
|
1707
|
+
input: UpdateCmsEntryInput;
|
|
1708
|
+
original: CmsEntry;
|
|
1405
1709
|
entry: CmsEntry;
|
|
1406
|
-
model:
|
|
1710
|
+
model: StorageOperationsCmsModel;
|
|
1711
|
+
storageEntry: CmsEntry;
|
|
1407
1712
|
}
|
|
1408
|
-
export interface
|
|
1713
|
+
export interface OnEntryUpdateErrorTopicParams {
|
|
1714
|
+
error: Error;
|
|
1715
|
+
input: CreateFromCmsEntryInput;
|
|
1409
1716
|
entry: CmsEntry;
|
|
1410
1717
|
model: CmsModel;
|
|
1411
|
-
storageEntry: CmsEntry;
|
|
1412
1718
|
}
|
|
1413
|
-
export interface
|
|
1719
|
+
export interface OnEntryBeforePublishTopicParams {
|
|
1414
1720
|
entry: CmsEntry;
|
|
1415
|
-
model:
|
|
1721
|
+
model: StorageOperationsCmsModel;
|
|
1416
1722
|
}
|
|
1417
|
-
export interface
|
|
1723
|
+
export interface OnEntryAfterPublishTopicParams {
|
|
1418
1724
|
entry: CmsEntry;
|
|
1419
|
-
model:
|
|
1725
|
+
model: StorageOperationsCmsModel;
|
|
1420
1726
|
storageEntry: CmsEntry;
|
|
1421
1727
|
}
|
|
1422
|
-
export interface
|
|
1728
|
+
export interface OnEntryPublishErrorTopicParams {
|
|
1729
|
+
error: Error;
|
|
1423
1730
|
entry: CmsEntry;
|
|
1424
|
-
model:
|
|
1731
|
+
model: StorageOperationsCmsModel;
|
|
1425
1732
|
}
|
|
1426
|
-
export interface
|
|
1733
|
+
export interface OnEntryBeforeUnpublishTopicParams {
|
|
1427
1734
|
entry: CmsEntry;
|
|
1428
|
-
model:
|
|
1735
|
+
model: StorageOperationsCmsModel;
|
|
1736
|
+
}
|
|
1737
|
+
export interface OnEntryAfterUnpublishTopicParams {
|
|
1738
|
+
entry: CmsEntry;
|
|
1739
|
+
model: StorageOperationsCmsModel;
|
|
1429
1740
|
storageEntry: CmsEntry;
|
|
1430
1741
|
}
|
|
1431
|
-
export interface
|
|
1742
|
+
export interface OnEntryUnpublishErrorTopicParams {
|
|
1743
|
+
error: Error;
|
|
1432
1744
|
entry: CmsEntry;
|
|
1433
1745
|
model: CmsModel;
|
|
1434
1746
|
}
|
|
1435
|
-
export interface
|
|
1747
|
+
export interface OnEntryBeforeDeleteTopicParams {
|
|
1436
1748
|
entry: CmsEntry;
|
|
1437
|
-
model:
|
|
1438
|
-
storageEntry: CmsEntry;
|
|
1749
|
+
model: StorageOperationsCmsModel;
|
|
1439
1750
|
}
|
|
1440
|
-
export interface
|
|
1751
|
+
export interface OnEntryAfterDeleteTopicParams {
|
|
1441
1752
|
entry: CmsEntry;
|
|
1442
|
-
model:
|
|
1753
|
+
model: StorageOperationsCmsModel;
|
|
1443
1754
|
}
|
|
1444
|
-
export interface
|
|
1755
|
+
export interface OnEntryDeleteErrorTopicParams {
|
|
1756
|
+
error: Error;
|
|
1445
1757
|
entry: CmsEntry;
|
|
1446
|
-
model:
|
|
1758
|
+
model: StorageOperationsCmsModel;
|
|
1447
1759
|
}
|
|
1448
|
-
export interface
|
|
1760
|
+
export interface OnEntryRevisionBeforeDeleteTopicParams {
|
|
1449
1761
|
entry: CmsEntry;
|
|
1450
|
-
model:
|
|
1762
|
+
model: StorageOperationsCmsModel;
|
|
1451
1763
|
}
|
|
1452
|
-
export interface
|
|
1764
|
+
export interface OnEntryRevisionAfterDeleteTopicParams {
|
|
1453
1765
|
entry: CmsEntry;
|
|
1454
|
-
model:
|
|
1766
|
+
model: StorageOperationsCmsModel;
|
|
1455
1767
|
}
|
|
1456
|
-
export interface
|
|
1457
|
-
|
|
1768
|
+
export interface OnEntryRevisionDeleteErrorTopicParams {
|
|
1769
|
+
error: Error;
|
|
1770
|
+
entry: CmsEntry;
|
|
1771
|
+
model: StorageOperationsCmsModel;
|
|
1772
|
+
}
|
|
1773
|
+
export interface OnEntryBeforeGetTopicParams {
|
|
1774
|
+
model: StorageOperationsCmsModel;
|
|
1458
1775
|
where: CmsEntryListWhere;
|
|
1459
1776
|
}
|
|
1460
|
-
export interface
|
|
1777
|
+
export interface EntryBeforeListTopicParams {
|
|
1461
1778
|
where: CmsEntryListWhere;
|
|
1462
|
-
model:
|
|
1779
|
+
model: StorageOperationsCmsModel;
|
|
1780
|
+
}
|
|
1781
|
+
/**
|
|
1782
|
+
* @category Context
|
|
1783
|
+
* @category CmsEntry
|
|
1784
|
+
*/
|
|
1785
|
+
export interface CreateCmsEntryInput {
|
|
1786
|
+
[key: string]: any;
|
|
1787
|
+
}
|
|
1788
|
+
/**
|
|
1789
|
+
* @category Context
|
|
1790
|
+
* @category CmsEntry
|
|
1791
|
+
*/
|
|
1792
|
+
export interface CreateFromCmsEntryInput {
|
|
1793
|
+
[key: string]: any;
|
|
1794
|
+
}
|
|
1795
|
+
/**
|
|
1796
|
+
* @category Context
|
|
1797
|
+
* @category CmsEntry
|
|
1798
|
+
*/
|
|
1799
|
+
export interface UpdateCmsEntryInput {
|
|
1800
|
+
[key: string]: any;
|
|
1463
1801
|
}
|
|
1464
1802
|
/**
|
|
1465
1803
|
* Cms Entry CRUD methods in the context.
|
|
@@ -1475,7 +1813,7 @@ export interface CmsEntryContext {
|
|
|
1475
1813
|
/**
|
|
1476
1814
|
* Get a list of entries for a model by a given ID (revision).
|
|
1477
1815
|
*/
|
|
1478
|
-
getEntriesByIds: (model: CmsModel, revisions: string[]) => Promise<CmsEntry[]
|
|
1816
|
+
getEntriesByIds: (model: CmsModel, revisions: string[]) => Promise<CmsEntry[]>;
|
|
1479
1817
|
/**
|
|
1480
1818
|
* Get the entry for a model by a given ID.
|
|
1481
1819
|
*/
|
|
@@ -1483,7 +1821,7 @@ export interface CmsEntryContext {
|
|
|
1483
1821
|
/**
|
|
1484
1822
|
* List entries for a model. Internal method used by get, listLatest and listPublished.
|
|
1485
1823
|
*/
|
|
1486
|
-
listEntries: (model: CmsModel, params
|
|
1824
|
+
listEntries: (model: CmsModel, params: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
1487
1825
|
/**
|
|
1488
1826
|
* Lists latest entries. Used for manage API.
|
|
1489
1827
|
*/
|
|
@@ -1503,15 +1841,20 @@ export interface CmsEntryContext {
|
|
|
1503
1841
|
/**
|
|
1504
1842
|
* Create a new content entry.
|
|
1505
1843
|
*/
|
|
1506
|
-
createEntry: (model: CmsModel,
|
|
1844
|
+
createEntry: (model: CmsModel, input: CreateCmsEntryInput) => Promise<CmsEntry>;
|
|
1507
1845
|
/**
|
|
1508
1846
|
* Create a new entry from already existing entry.
|
|
1509
1847
|
*/
|
|
1510
|
-
createEntryRevisionFrom: (model: CmsModel, id: string,
|
|
1848
|
+
createEntryRevisionFrom: (model: CmsModel, id: string, input: CreateFromCmsEntryInput) => Promise<CmsEntry>;
|
|
1511
1849
|
/**
|
|
1512
1850
|
* Update existing entry.
|
|
1513
1851
|
*/
|
|
1514
|
-
updateEntry: (model: CmsModel, id: string,
|
|
1852
|
+
updateEntry: (model: CmsModel, id: string, input: UpdateCmsEntryInput, meta?: Record<string, any>) => Promise<CmsEntry>;
|
|
1853
|
+
/**
|
|
1854
|
+
* Method that republishes entry with given identifier.
|
|
1855
|
+
* @internal
|
|
1856
|
+
*/
|
|
1857
|
+
republishEntry: (model: CmsModel, id: string) => Promise<CmsEntry>;
|
|
1515
1858
|
/**
|
|
1516
1859
|
* Delete only a certain revision of the entry.
|
|
1517
1860
|
*/
|
|
@@ -1529,40 +1872,102 @@ export interface CmsEntryContext {
|
|
|
1529
1872
|
*/
|
|
1530
1873
|
unpublishEntry: (model: CmsModel, id: string) => Promise<CmsEntry>;
|
|
1531
1874
|
/**
|
|
1532
|
-
*
|
|
1875
|
+
* Get all entry revisions.
|
|
1533
1876
|
*/
|
|
1534
|
-
|
|
1877
|
+
getEntryRevisions: (model: CmsModel, id: string) => Promise<CmsEntry[]>;
|
|
1535
1878
|
/**
|
|
1536
|
-
*
|
|
1879
|
+
* Lifecyle events - deprecated.
|
|
1537
1880
|
*/
|
|
1538
|
-
requestEntryChanges: (model: CmsModel, id: string) => Promise<CmsEntry>;
|
|
1539
1881
|
/**
|
|
1540
|
-
*
|
|
1882
|
+
* @deprecated
|
|
1541
1883
|
*/
|
|
1542
|
-
|
|
1884
|
+
onBeforeEntryCreate: Topic<OnEntryBeforeCreateTopicParams>;
|
|
1885
|
+
/**
|
|
1886
|
+
* @deprecated
|
|
1887
|
+
*/
|
|
1888
|
+
onAfterEntryCreate: Topic<OnEntryAfterCreateTopicParams>;
|
|
1889
|
+
/**
|
|
1890
|
+
* @deprecated
|
|
1891
|
+
*/
|
|
1892
|
+
onBeforeEntryCreateRevision: Topic<OnEntryRevisionBeforeCreateTopicParams>;
|
|
1893
|
+
/**
|
|
1894
|
+
* @deprecated
|
|
1895
|
+
*/
|
|
1896
|
+
onAfterEntryCreateRevision: Topic<OnEntryRevisionAfterCreateTopicParams>;
|
|
1543
1897
|
/**
|
|
1544
|
-
*
|
|
1545
|
-
*/
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1898
|
+
* @deprecated
|
|
1899
|
+
*/
|
|
1900
|
+
onBeforeEntryUpdate: Topic<OnEntryBeforeUpdateTopicParams>;
|
|
1901
|
+
/**
|
|
1902
|
+
* @deprecated
|
|
1903
|
+
*/
|
|
1904
|
+
onAfterEntryUpdate: Topic<OnEntryAfterUpdateTopicParams>;
|
|
1905
|
+
/**
|
|
1906
|
+
* @deprecated
|
|
1907
|
+
*/
|
|
1908
|
+
onBeforeEntryDelete: Topic<OnEntryBeforeDeleteTopicParams>;
|
|
1909
|
+
/**
|
|
1910
|
+
* @deprecated
|
|
1911
|
+
*/
|
|
1912
|
+
onAfterEntryDelete: Topic<OnEntryAfterDeleteTopicParams>;
|
|
1913
|
+
/**
|
|
1914
|
+
* @deprecated
|
|
1915
|
+
*/
|
|
1916
|
+
onBeforeEntryDeleteRevision: Topic<OnEntryRevisionBeforeDeleteTopicParams>;
|
|
1917
|
+
/**
|
|
1918
|
+
* @deprecated
|
|
1919
|
+
*/
|
|
1920
|
+
onAfterEntryDeleteRevision: Topic<OnEntryRevisionAfterDeleteTopicParams>;
|
|
1921
|
+
/**
|
|
1922
|
+
* @deprecated
|
|
1923
|
+
*/
|
|
1924
|
+
onBeforeEntryPublish: Topic<OnEntryBeforePublishTopicParams>;
|
|
1925
|
+
/**
|
|
1926
|
+
* @deprecated
|
|
1927
|
+
*/
|
|
1928
|
+
onAfterEntryPublish: Topic<OnEntryAfterPublishTopicParams>;
|
|
1929
|
+
/**
|
|
1930
|
+
* @deprecated
|
|
1931
|
+
*/
|
|
1932
|
+
onBeforeEntryUnpublish: Topic<OnEntryBeforeUnpublishTopicParams>;
|
|
1933
|
+
/**
|
|
1934
|
+
* @deprecated
|
|
1935
|
+
*/
|
|
1936
|
+
onAfterEntryUnpublish: Topic<OnEntryAfterUnpublishTopicParams>;
|
|
1937
|
+
/**
|
|
1938
|
+
* @deprecated
|
|
1939
|
+
*/
|
|
1940
|
+
onBeforeEntryGet: Topic<OnEntryBeforeGetTopicParams>;
|
|
1941
|
+
/**
|
|
1942
|
+
* @deprecated
|
|
1943
|
+
*/
|
|
1944
|
+
onBeforeEntryList: Topic<EntryBeforeListTopicParams>;
|
|
1945
|
+
/**
|
|
1946
|
+
* Lifecycle events released in 5.33.0
|
|
1947
|
+
*/
|
|
1948
|
+
onEntryBeforeCreate: Topic<OnEntryBeforeCreateTopicParams>;
|
|
1949
|
+
onEntryAfterCreate: Topic<OnEntryAfterCreateTopicParams>;
|
|
1950
|
+
onEntryCreateError: Topic<OnEntryCreateErrorTopicParams>;
|
|
1951
|
+
onEntryRevisionBeforeCreate: Topic<OnEntryRevisionBeforeCreateTopicParams>;
|
|
1952
|
+
onEntryRevisionAfterCreate: Topic<OnEntryRevisionAfterCreateTopicParams>;
|
|
1953
|
+
onEntryRevisionCreateError: Topic<OnEntryCreateRevisionErrorTopicParams>;
|
|
1954
|
+
onEntryBeforeUpdate: Topic<OnEntryBeforeUpdateTopicParams>;
|
|
1955
|
+
onEntryAfterUpdate: Topic<OnEntryAfterUpdateTopicParams>;
|
|
1956
|
+
onEntryUpdateError: Topic<OnEntryUpdateErrorTopicParams>;
|
|
1957
|
+
onEntryBeforeDelete: Topic<OnEntryBeforeDeleteTopicParams>;
|
|
1958
|
+
onEntryAfterDelete: Topic<OnEntryAfterDeleteTopicParams>;
|
|
1959
|
+
onEntryDeleteError: Topic<OnEntryDeleteErrorTopicParams>;
|
|
1960
|
+
onEntryRevisionBeforeDelete: Topic<OnEntryRevisionBeforeDeleteTopicParams>;
|
|
1961
|
+
onEntryRevisionAfterDelete: Topic<OnEntryRevisionAfterDeleteTopicParams>;
|
|
1962
|
+
onEntryRevisionDeleteError: Topic<OnEntryRevisionDeleteErrorTopicParams>;
|
|
1963
|
+
onEntryBeforePublish: Topic<OnEntryBeforePublishTopicParams>;
|
|
1964
|
+
onEntryAfterPublish: Topic<OnEntryAfterPublishTopicParams>;
|
|
1965
|
+
onEntryPublishError: Topic<OnEntryPublishErrorTopicParams>;
|
|
1966
|
+
onEntryBeforeUnpublish: Topic<OnEntryBeforeUnpublishTopicParams>;
|
|
1967
|
+
onEntryAfterUnpublish: Topic<OnEntryAfterUnpublishTopicParams>;
|
|
1968
|
+
onEntryUnpublishError: Topic<OnEntryUnpublishErrorTopicParams>;
|
|
1969
|
+
onEntryBeforeGet: Topic<OnEntryBeforeGetTopicParams>;
|
|
1970
|
+
onEntryBeforeList: Topic<EntryBeforeListTopicParams>;
|
|
1566
1971
|
}
|
|
1567
1972
|
/**
|
|
1568
1973
|
* Parameters for CmsEntryResolverFactory.
|
|
@@ -1589,15 +1994,22 @@ export declare type CmsEntryResolverFactory<TSource = any, TArgs = any, TContext
|
|
|
1589
1994
|
*/
|
|
1590
1995
|
export interface CmsSettingsPermission extends SecurityPermission {
|
|
1591
1996
|
}
|
|
1997
|
+
/**
|
|
1998
|
+
* A base security permission for CMS.
|
|
1999
|
+
*
|
|
2000
|
+
* @category SecurityPermission
|
|
2001
|
+
*/
|
|
2002
|
+
export interface BaseCmsSecurityPermission extends SecurityPermission {
|
|
2003
|
+
own?: boolean;
|
|
2004
|
+
rwd: string | number;
|
|
2005
|
+
}
|
|
1592
2006
|
/**
|
|
1593
2007
|
* A security permission for content model.
|
|
1594
2008
|
*
|
|
1595
2009
|
* @category SecurityPermission
|
|
1596
2010
|
* @category CmsModel
|
|
1597
2011
|
*/
|
|
1598
|
-
export interface CmsModelPermission extends
|
|
1599
|
-
own: boolean;
|
|
1600
|
-
rwd: string;
|
|
2012
|
+
export interface CmsModelPermission extends BaseCmsSecurityPermission {
|
|
1601
2013
|
/**
|
|
1602
2014
|
* A object representing `key: model.modelId` values where key is locale code.
|
|
1603
2015
|
*/
|
|
@@ -1617,9 +2029,7 @@ export interface CmsModelPermission extends SecurityPermission {
|
|
|
1617
2029
|
* @category SecurityPermission
|
|
1618
2030
|
* @category CmsGroup
|
|
1619
2031
|
*/
|
|
1620
|
-
export interface CmsGroupPermission extends
|
|
1621
|
-
own: boolean;
|
|
1622
|
-
rwd: string;
|
|
2032
|
+
export interface CmsGroupPermission extends BaseCmsSecurityPermission {
|
|
1623
2033
|
/**
|
|
1624
2034
|
* A object representing `key: group.id` values where key is locale code.
|
|
1625
2035
|
*/
|
|
@@ -1633,10 +2043,8 @@ export interface CmsGroupPermission extends SecurityPermission {
|
|
|
1633
2043
|
* @category SecurityPermission
|
|
1634
2044
|
* @category CmsEntry
|
|
1635
2045
|
*/
|
|
1636
|
-
export interface CmsEntryPermission extends
|
|
1637
|
-
|
|
1638
|
-
rwd: string;
|
|
1639
|
-
pw: string;
|
|
2046
|
+
export interface CmsEntryPermission extends BaseCmsSecurityPermission {
|
|
2047
|
+
pw?: string;
|
|
1640
2048
|
/**
|
|
1641
2049
|
* A object representing `key: model.modelId` values where key is locale code.
|
|
1642
2050
|
*/
|
|
@@ -1665,13 +2073,10 @@ export interface CmsGroupStorageOperationsListParams {
|
|
|
1665
2073
|
sort?: string[];
|
|
1666
2074
|
}
|
|
1667
2075
|
export interface CmsGroupStorageOperationsCreateParams {
|
|
1668
|
-
input: CmsGroupCreateInput;
|
|
1669
2076
|
group: CmsGroup;
|
|
1670
2077
|
}
|
|
1671
2078
|
export interface CmsGroupStorageOperationsUpdateParams {
|
|
1672
|
-
original: CmsGroup;
|
|
1673
2079
|
group: CmsGroup;
|
|
1674
|
-
input: CmsGroupUpdateInput;
|
|
1675
2080
|
}
|
|
1676
2081
|
export interface CmsGroupStorageOperationsDeleteParams {
|
|
1677
2082
|
group: CmsGroup;
|
|
@@ -1717,13 +2122,10 @@ export interface CmsModelStorageOperationsListParams {
|
|
|
1717
2122
|
where: CmsModelStorageOperationsListWhereParams;
|
|
1718
2123
|
}
|
|
1719
2124
|
export interface CmsModelStorageOperationsCreateParams {
|
|
1720
|
-
input: CmsModelCreateInput;
|
|
1721
2125
|
model: CmsModel;
|
|
1722
2126
|
}
|
|
1723
2127
|
export interface CmsModelStorageOperationsUpdateParams {
|
|
1724
|
-
original: CmsModel;
|
|
1725
2128
|
model: CmsModel;
|
|
1726
|
-
input: CmsModelUpdateInput;
|
|
1727
2129
|
}
|
|
1728
2130
|
export interface CmsModelStorageOperationsDeleteParams {
|
|
1729
2131
|
model: CmsModel;
|
|
@@ -1763,14 +2165,12 @@ export interface CmsEntryStorageOperationsGetParams {
|
|
|
1763
2165
|
export interface CmsEntryStorageOperationsListParams {
|
|
1764
2166
|
where: CmsEntryListWhere;
|
|
1765
2167
|
sort?: CmsEntryListSort;
|
|
2168
|
+
search?: string;
|
|
2169
|
+
fields?: string[];
|
|
1766
2170
|
limit?: number;
|
|
1767
|
-
after?: string;
|
|
2171
|
+
after?: string | null;
|
|
1768
2172
|
}
|
|
1769
2173
|
export interface CmsEntryStorageOperationsCreateParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
1770
|
-
/**
|
|
1771
|
-
* Input received from the user.
|
|
1772
|
-
*/
|
|
1773
|
-
input: Record<string, any>;
|
|
1774
2174
|
/**
|
|
1775
2175
|
* Real entry, with no transformations on it.
|
|
1776
2176
|
*/
|
|
@@ -1781,22 +2181,6 @@ export interface CmsEntryStorageOperationsCreateParams<T extends CmsStorageEntry
|
|
|
1781
2181
|
storageEntry: T;
|
|
1782
2182
|
}
|
|
1783
2183
|
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
2184
|
/**
|
|
1801
2185
|
* Real entry, with no transformations on it.
|
|
1802
2186
|
*/
|
|
@@ -1807,18 +2191,6 @@ export interface CmsEntryStorageOperationsCreateRevisionFromParams<T extends Cms
|
|
|
1807
2191
|
storageEntry: T;
|
|
1808
2192
|
}
|
|
1809
2193
|
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
2194
|
/**
|
|
1823
2195
|
* Real entry, with no transformations on it.
|
|
1824
2196
|
*/
|
|
@@ -1832,39 +2204,27 @@ export interface CmsEntryStorageOperationsDeleteRevisionParams<T extends CmsStor
|
|
|
1832
2204
|
/**
|
|
1833
2205
|
* Entry that was deleted.
|
|
1834
2206
|
*/
|
|
1835
|
-
|
|
2207
|
+
entry: CmsEntry;
|
|
1836
2208
|
/**
|
|
1837
2209
|
* Entry that was deleted, directly from storage, with transformations.
|
|
1838
2210
|
*/
|
|
1839
|
-
|
|
2211
|
+
storageEntry: T;
|
|
1840
2212
|
/**
|
|
1841
2213
|
* Entry that was set as latest.
|
|
1842
2214
|
*/
|
|
1843
|
-
|
|
2215
|
+
latestEntry: CmsEntry | null;
|
|
1844
2216
|
/**
|
|
1845
2217
|
* Entry that was set as latest, directly from storage, with transformations.
|
|
1846
2218
|
*/
|
|
1847
|
-
|
|
2219
|
+
latestStorageEntry: T | null;
|
|
1848
2220
|
}
|
|
1849
|
-
export interface CmsEntryStorageOperationsDeleteParams
|
|
2221
|
+
export interface CmsEntryStorageOperationsDeleteParams {
|
|
1850
2222
|
/**
|
|
1851
2223
|
* Entry that is going to be deleted.
|
|
1852
2224
|
*/
|
|
1853
2225
|
entry: CmsEntry;
|
|
1854
|
-
/**
|
|
1855
|
-
* Entry that is going to be deleted, directly from storage.
|
|
1856
|
-
*/
|
|
1857
|
-
storageEntry: T;
|
|
1858
2226
|
}
|
|
1859
2227
|
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
2228
|
/**
|
|
1869
2229
|
* The modified entry that is going to be saved as published.
|
|
1870
2230
|
* Entry is in its original form.
|
|
@@ -1876,14 +2236,6 @@ export interface CmsEntryStorageOperationsPublishParams<T extends CmsStorageEntr
|
|
|
1876
2236
|
storageEntry: T;
|
|
1877
2237
|
}
|
|
1878
2238
|
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
2239
|
/**
|
|
1888
2240
|
* The modified entry that is going to be saved as unpublished.
|
|
1889
2241
|
*/
|
|
@@ -1893,45 +2245,6 @@ export interface CmsEntryStorageOperationsUnpublishParams<T extends CmsStorageEn
|
|
|
1893
2245
|
*/
|
|
1894
2246
|
storageEntry: T;
|
|
1895
2247
|
}
|
|
1896
|
-
export interface CmsEntryStorageOperationsRequestChangesParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
1897
|
-
/**
|
|
1898
|
-
* Entry data updated with the required properties.
|
|
1899
|
-
*/
|
|
1900
|
-
entry: CmsEntry;
|
|
1901
|
-
/**
|
|
1902
|
-
* Entry that is prepared for the storageOperations, with the transformations.
|
|
1903
|
-
*/
|
|
1904
|
-
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
|
-
}
|
|
1914
|
-
export interface CmsEntryStorageOperationsRequestReviewParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
1915
|
-
/**
|
|
1916
|
-
* Entry that is prepared for the storageOperations.
|
|
1917
|
-
*/
|
|
1918
|
-
entry: CmsEntry;
|
|
1919
|
-
/**
|
|
1920
|
-
* Entry that is prepared for the storageOperations, with the transformations.
|
|
1921
|
-
*/
|
|
1922
|
-
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
|
-
}
|
|
1935
2248
|
export interface CmsEntryStorageOperationsGetByIdsParams {
|
|
1936
2249
|
ids: readonly string[];
|
|
1937
2250
|
}
|
|
@@ -1988,90 +2301,76 @@ export interface CmsEntryStorageOperations<T extends CmsStorageEntry = CmsStorag
|
|
|
1988
2301
|
/**
|
|
1989
2302
|
* Get all the entries of the ids.
|
|
1990
2303
|
*/
|
|
1991
|
-
getByIds: (model:
|
|
2304
|
+
getByIds: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetByIdsParams) => Promise<T[]>;
|
|
1992
2305
|
/**
|
|
1993
2306
|
* Get all the published entries of the ids.
|
|
1994
2307
|
*/
|
|
1995
|
-
getPublishedByIds: (model:
|
|
2308
|
+
getPublishedByIds: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetPublishedByIdsParams) => Promise<T[]>;
|
|
1996
2309
|
/**
|
|
1997
2310
|
* Get all the latest entries of the ids.
|
|
1998
2311
|
*/
|
|
1999
|
-
getLatestByIds: (model:
|
|
2312
|
+
getLatestByIds: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetLatestByIdsParams) => Promise<T[]>;
|
|
2000
2313
|
/**
|
|
2001
2314
|
* Get all revisions of the given entry id.
|
|
2002
2315
|
*/
|
|
2003
|
-
getRevisions: (model:
|
|
2004
|
-
/**
|
|
2005
|
-
* Get all revisions of all of the given IDs.
|
|
2006
|
-
*/
|
|
2007
|
-
getAllRevisionsByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetAllRevisionsParams) => Promise<T[]>;
|
|
2316
|
+
getRevisions: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetRevisionsParams) => Promise<T[]>;
|
|
2008
2317
|
/**
|
|
2009
2318
|
* Get the entry by the given revision id.
|
|
2010
2319
|
*/
|
|
2011
|
-
getRevisionById: (model:
|
|
2320
|
+
getRevisionById: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetRevisionParams) => Promise<T | null>;
|
|
2012
2321
|
/**
|
|
2013
2322
|
* Get the published entry by given entryId.
|
|
2014
2323
|
*/
|
|
2015
|
-
getPublishedRevisionByEntryId: (model:
|
|
2324
|
+
getPublishedRevisionByEntryId: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetPublishedRevisionParams) => Promise<T | null>;
|
|
2016
2325
|
/**
|
|
2017
2326
|
* Get the latest entry by given entryId.
|
|
2018
2327
|
*/
|
|
2019
|
-
getLatestRevisionByEntryId: (model:
|
|
2328
|
+
getLatestRevisionByEntryId: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetLatestRevisionParams) => Promise<T | null>;
|
|
2020
2329
|
/**
|
|
2021
2330
|
* Get the revision of the entry before given one.
|
|
2022
2331
|
*/
|
|
2023
|
-
getPreviousRevision: (model:
|
|
2332
|
+
getPreviousRevision: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetPreviousRevisionParams) => Promise<T | null>;
|
|
2024
2333
|
/**
|
|
2025
2334
|
* Gets entry by given params.
|
|
2026
2335
|
*/
|
|
2027
|
-
get: (model:
|
|
2336
|
+
get: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetParams) => Promise<T | null>;
|
|
2028
2337
|
/**
|
|
2029
2338
|
* List all entries. Filterable via params.
|
|
2030
2339
|
*/
|
|
2031
|
-
list: (model:
|
|
2340
|
+
list: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsListParams) => Promise<CmsEntryStorageOperationsListResponse<T>>;
|
|
2032
2341
|
/**
|
|
2033
2342
|
* Create a new entry.
|
|
2034
2343
|
*/
|
|
2035
|
-
create: (model:
|
|
2344
|
+
create: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsCreateParams<T>) => Promise<T>;
|
|
2036
2345
|
/**
|
|
2037
2346
|
* Create a new entry from existing one.
|
|
2038
2347
|
*/
|
|
2039
|
-
createRevisionFrom: (model:
|
|
2348
|
+
createRevisionFrom: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsCreateRevisionFromParams<T>) => Promise<T>;
|
|
2040
2349
|
/**
|
|
2041
2350
|
* Update existing entry.
|
|
2042
2351
|
*/
|
|
2043
|
-
update: (model:
|
|
2352
|
+
update: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsUpdateParams<T>) => Promise<T>;
|
|
2044
2353
|
/**
|
|
2045
2354
|
* Delete the entry revision.
|
|
2046
2355
|
*/
|
|
2047
|
-
deleteRevision: (model:
|
|
2356
|
+
deleteRevision: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsDeleteRevisionParams<T>) => Promise<void>;
|
|
2048
2357
|
/**
|
|
2049
2358
|
* Delete the entry.
|
|
2050
2359
|
*/
|
|
2051
|
-
delete: (model:
|
|
2360
|
+
delete: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsDeleteParams) => Promise<void>;
|
|
2052
2361
|
/**
|
|
2053
2362
|
* Publish the entry.
|
|
2054
2363
|
*/
|
|
2055
|
-
publish: (model:
|
|
2364
|
+
publish: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsPublishParams<T>) => Promise<T>;
|
|
2056
2365
|
/**
|
|
2057
2366
|
* Unpublish the entry.
|
|
2058
2367
|
*/
|
|
2059
|
-
unpublish: (model:
|
|
2060
|
-
/**
|
|
2061
|
-
* Request changes the entry.
|
|
2062
|
-
*/
|
|
2063
|
-
requestChanges: (model: CmsModel, params: CmsEntryStorageOperationsRequestChangesParams<T>) => Promise<T>;
|
|
2064
|
-
/**
|
|
2065
|
-
* Request review the entry.
|
|
2066
|
-
*/
|
|
2067
|
-
requestReview: (model: CmsModel, params: CmsEntryStorageOperationsRequestReviewParams<T>) => Promise<CmsEntry>;
|
|
2368
|
+
unpublish: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsUnpublishParams<T>) => Promise<T>;
|
|
2068
2369
|
}
|
|
2069
2370
|
export declare enum CONTENT_ENTRY_STATUS {
|
|
2070
2371
|
DRAFT = "draft",
|
|
2071
2372
|
PUBLISHED = "published",
|
|
2072
|
-
UNPUBLISHED = "unpublished"
|
|
2073
|
-
CHANGES_REQUESTED = "changesRequested",
|
|
2074
|
-
REVIEW_REQUESTED = "reviewRequested"
|
|
2373
|
+
UNPUBLISHED = "unpublished"
|
|
2075
2374
|
}
|
|
2076
2375
|
export interface CmsSettingsStorageOperationsGetParams {
|
|
2077
2376
|
locale: string;
|
|
@@ -2081,7 +2380,6 @@ export interface CmsSettingsStorageOperationsCreateParams {
|
|
|
2081
2380
|
settings: CmsSettings;
|
|
2082
2381
|
}
|
|
2083
2382
|
export interface CmsSettingsStorageOperationsUpdateParams {
|
|
2084
|
-
original: CmsSettings;
|
|
2085
2383
|
settings: CmsSettings;
|
|
2086
2384
|
}
|
|
2087
2385
|
export interface CmsSettingsStorageOperations {
|
|
@@ -2114,7 +2412,6 @@ export interface CmsSystemStorageOperationsCreateParams {
|
|
|
2114
2412
|
}
|
|
2115
2413
|
export interface CmsSystemStorageOperationsUpdateParams {
|
|
2116
2414
|
system: CmsSystem;
|
|
2117
|
-
original: CmsSystem;
|
|
2118
2415
|
}
|
|
2119
2416
|
export interface CmsSystemStorageOperations {
|
|
2120
2417
|
/**
|
|
@@ -2136,11 +2433,11 @@ export interface HeadlessCmsStorageOperations {
|
|
|
2136
2433
|
groups: CmsGroupStorageOperations;
|
|
2137
2434
|
models: CmsModelStorageOperations;
|
|
2138
2435
|
entries: CmsEntryStorageOperations;
|
|
2139
|
-
init?: (cms: HeadlessCms) => Promise<void>;
|
|
2140
2436
|
/**
|
|
2141
|
-
*
|
|
2437
|
+
* Either attach something from the storage operations or run something in it.
|
|
2142
2438
|
*/
|
|
2143
|
-
|
|
2439
|
+
beforeInit?: (context: CmsContext) => Promise<void>;
|
|
2440
|
+
init?: (context: CmsContext) => Promise<void>;
|
|
2144
2441
|
/**
|
|
2145
2442
|
* An upgrade to run if necessary.
|
|
2146
2443
|
*/
|