@webiny/api-headless-cms 0.0.0-mt-3 → 0.0.0-unstable.40876133bb
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 +605 -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 +66 -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 +36 -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 +657 -349
- 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 +31 -0
- package/utils/converters/ConverterCollection.js +139 -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;
|
|
139
|
+
/**
|
|
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;
|
|
97
150
|
/**
|
|
98
|
-
*
|
|
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 {
|
|
691
803
|
tenant: string;
|
|
804
|
+
locale: string;
|
|
805
|
+
}
|
|
806
|
+
export interface OnSystemAfterInstallTopicParams {
|
|
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
|
|
1022
|
+
*/
|
|
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
|
|
870
1038
|
*/
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
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,51 @@ 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;
|
|
1160
1389
|
model: CmsModel;
|
|
1161
1390
|
}
|
|
1162
|
-
export interface
|
|
1163
|
-
input:
|
|
1391
|
+
export interface OnModelAfterCreateTopicParams {
|
|
1392
|
+
input: CmsModelCreateInput;
|
|
1164
1393
|
model: CmsModel;
|
|
1165
1394
|
}
|
|
1166
|
-
export interface
|
|
1167
|
-
input:
|
|
1395
|
+
export interface OnModelBeforeCreateFromTopicParams {
|
|
1396
|
+
input: CmsModelCreateInput;
|
|
1168
1397
|
original: CmsModel;
|
|
1169
1398
|
model: CmsModel;
|
|
1170
1399
|
}
|
|
1171
|
-
export interface
|
|
1172
|
-
input:
|
|
1400
|
+
export interface OnModelAfterCreateFromTopicParams {
|
|
1401
|
+
input: CmsModelCreateInput;
|
|
1402
|
+
original: CmsModel;
|
|
1403
|
+
model: CmsModel;
|
|
1404
|
+
}
|
|
1405
|
+
export interface OnModelBeforeUpdateTopicParams {
|
|
1406
|
+
input: CmsModelUpdateInput;
|
|
1407
|
+
original: CmsModel;
|
|
1408
|
+
model: CmsModel;
|
|
1409
|
+
}
|
|
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 {
|
|
1419
|
+
model: CmsModel;
|
|
1420
|
+
}
|
|
1421
|
+
export interface OnModelInitializeParams {
|
|
1180
1422
|
model: CmsModel;
|
|
1181
1423
|
}
|
|
1182
1424
|
export interface CmsModelUpdateDirectParams {
|
|
@@ -1190,15 +1432,6 @@ export interface CmsModelUpdateDirectParams {
|
|
|
1190
1432
|
* @category CmsModel
|
|
1191
1433
|
*/
|
|
1192
1434
|
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
1435
|
/**
|
|
1203
1436
|
* Get a single content model.
|
|
1204
1437
|
*/
|
|
@@ -1211,12 +1444,12 @@ export interface CmsModelContext {
|
|
|
1211
1444
|
* Create a content model.
|
|
1212
1445
|
*/
|
|
1213
1446
|
createModel: (data: CmsModelCreateInput) => Promise<CmsModel>;
|
|
1447
|
+
/**
|
|
1448
|
+
* Create a content model from the given model - clone.
|
|
1449
|
+
*/
|
|
1450
|
+
createModelFrom: (modelId: string, data: CmsModelCreateFromInput) => Promise<CmsModel>;
|
|
1214
1451
|
/**
|
|
1215
1452
|
* Update content model without data validation. Used internally.
|
|
1216
|
-
*
|
|
1217
|
-
* @param model - existing content model
|
|
1218
|
-
* @param data - data to be updated
|
|
1219
|
-
*
|
|
1220
1453
|
* @hidden
|
|
1221
1454
|
*/
|
|
1222
1455
|
updateModelDirect: (params: CmsModelUpdateDirectParams) => Promise<CmsModel>;
|
|
@@ -1228,33 +1461,97 @@ export interface CmsModelContext {
|
|
|
1228
1461
|
* Delete content model. Should not allow deletion if there are entries connected to it.
|
|
1229
1462
|
*/
|
|
1230
1463
|
deleteModel: (modelId: string) => Promise<void>;
|
|
1464
|
+
/**
|
|
1465
|
+
* Possibility for users to trigger the model initialization.
|
|
1466
|
+
* They can hook into it and do what ever they want to.
|
|
1467
|
+
*
|
|
1468
|
+
* Primary idea behind this is creating the index, for the code models, in the ES.
|
|
1469
|
+
*/
|
|
1470
|
+
initializeModel: (modelId: string) => Promise<boolean>;
|
|
1231
1471
|
/**
|
|
1232
1472
|
* Get a instance of CmsModelManager for given content modelId.
|
|
1233
1473
|
*
|
|
1234
1474
|
* @see CmsModelManager
|
|
1475
|
+
*
|
|
1476
|
+
* @deprecated use the getEntryManager() method instead
|
|
1235
1477
|
*/
|
|
1236
|
-
getModelManager: (
|
|
1478
|
+
getModelManager: (model: CmsModel | string) => Promise<CmsModelManager>;
|
|
1479
|
+
getEntryManager: (model: CmsModel | string) => Promise<CmsModelManager>;
|
|
1237
1480
|
/**
|
|
1238
1481
|
* Get all content model managers mapped by modelId.
|
|
1239
1482
|
* @see CmsModelManager
|
|
1483
|
+
* @deprecated use getEntryManagers instead
|
|
1240
1484
|
*/
|
|
1241
1485
|
getManagers: () => Map<string, CmsModelManager>;
|
|
1486
|
+
getEntryManagers: () => Map<string, CmsModelManager>;
|
|
1487
|
+
/**
|
|
1488
|
+
* Clear all the model caches.
|
|
1489
|
+
*/
|
|
1490
|
+
clearModelsCache: () => void;
|
|
1491
|
+
/**
|
|
1492
|
+
* Lifecycle events - deprecated.
|
|
1493
|
+
*/
|
|
1494
|
+
/**
|
|
1495
|
+
* @deprecated
|
|
1496
|
+
*/
|
|
1497
|
+
onBeforeModelCreate: Topic<OnModelBeforeCreateTopicParams>;
|
|
1498
|
+
/**
|
|
1499
|
+
* @deprecated
|
|
1500
|
+
*/
|
|
1501
|
+
onAfterModelCreate: Topic<OnModelAfterCreateTopicParams>;
|
|
1502
|
+
/**
|
|
1503
|
+
* @deprecated
|
|
1504
|
+
*/
|
|
1505
|
+
onBeforeModelCreateFrom: Topic<OnModelBeforeCreateFromTopicParams>;
|
|
1506
|
+
/**
|
|
1507
|
+
* @deprecated
|
|
1508
|
+
*/
|
|
1509
|
+
onAfterModelCreateFrom: Topic<OnModelAfterCreateFromTopicParams>;
|
|
1510
|
+
/**
|
|
1511
|
+
* @deprecated
|
|
1512
|
+
*/
|
|
1513
|
+
onBeforeModelUpdate: Topic<OnModelBeforeUpdateTopicParams>;
|
|
1514
|
+
/**
|
|
1515
|
+
* @deprecated
|
|
1516
|
+
*/
|
|
1517
|
+
onAfterModelUpdate: Topic<OnModelAfterUpdateTopicParams>;
|
|
1518
|
+
/**
|
|
1519
|
+
* @deprecated
|
|
1520
|
+
*/
|
|
1521
|
+
onBeforeModelDelete: Topic<OnModelBeforeDeleteTopicParams>;
|
|
1522
|
+
/**
|
|
1523
|
+
* @deprecated
|
|
1524
|
+
*/
|
|
1525
|
+
onAfterModelDelete: Topic<OnModelAfterDeleteTopicParams>;
|
|
1242
1526
|
/**
|
|
1243
|
-
*
|
|
1527
|
+
* Lifecycle events - released in 5.33.0
|
|
1244
1528
|
*/
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1529
|
+
onModelBeforeCreate: Topic<OnModelBeforeCreateTopicParams>;
|
|
1530
|
+
onModelAfterCreate: Topic<OnModelAfterCreateTopicParams>;
|
|
1531
|
+
onModelBeforeCreateFrom: Topic<OnModelBeforeCreateFromTopicParams>;
|
|
1532
|
+
onModelAfterCreateFrom: Topic<OnModelAfterCreateFromTopicParams>;
|
|
1533
|
+
onModelBeforeUpdate: Topic<OnModelBeforeUpdateTopicParams>;
|
|
1534
|
+
onModelAfterUpdate: Topic<OnModelAfterUpdateTopicParams>;
|
|
1535
|
+
onModelBeforeDelete: Topic<OnModelBeforeDeleteTopicParams>;
|
|
1536
|
+
onModelAfterDelete: Topic<OnModelAfterDeleteTopicParams>;
|
|
1537
|
+
onModelInitialize: Topic<OnModelInitializeParams>;
|
|
1251
1538
|
}
|
|
1252
1539
|
/**
|
|
1253
1540
|
* Available statuses for content entry.
|
|
1254
1541
|
*
|
|
1255
1542
|
* @category CmsEntry
|
|
1256
1543
|
*/
|
|
1257
|
-
declare type CmsEntryStatus = "published" | "unpublished" | "
|
|
1544
|
+
export declare type CmsEntryStatus = "published" | "unpublished" | "draft";
|
|
1545
|
+
export interface CmsEntryListWhereRef {
|
|
1546
|
+
id?: string;
|
|
1547
|
+
id_in?: string[];
|
|
1548
|
+
id_not?: string;
|
|
1549
|
+
id_not_in?: string[];
|
|
1550
|
+
entryId?: string;
|
|
1551
|
+
entryId_not?: string;
|
|
1552
|
+
entryId_in?: string[];
|
|
1553
|
+
entryId_not_in?: string[];
|
|
1554
|
+
}
|
|
1258
1555
|
/**
|
|
1259
1556
|
* Entry listing where params.
|
|
1260
1557
|
*
|
|
@@ -1277,7 +1574,9 @@ export interface CmsEntryListWhere {
|
|
|
1277
1574
|
entryId_in?: string[];
|
|
1278
1575
|
entryId_not_in?: string[];
|
|
1279
1576
|
/**
|
|
1280
|
-
*
|
|
1577
|
+
* Contains the owner of the entry. An "owner" is the identity who originally created the entry.
|
|
1578
|
+
* Subsequent revisions can be created by other identities, and those will be stored in `createdBy`,
|
|
1579
|
+
* but the `owner` is always the original author of the entry.
|
|
1281
1580
|
*
|
|
1282
1581
|
* Can be sent via the API or set internal if user can see only their own entries.
|
|
1283
1582
|
*/
|
|
@@ -1302,22 +1601,25 @@ export interface CmsEntryListWhere {
|
|
|
1302
1601
|
version_lt?: number;
|
|
1303
1602
|
version_gt?: number;
|
|
1304
1603
|
/**
|
|
1305
|
-
* Each operations implementation MUST determine how to use this field.
|
|
1306
|
-
* In SQL it can be published field and in DynamoDB can be
|
|
1604
|
+
* Each storage operations implementation MUST determine how to use this field.
|
|
1605
|
+
* In SQL, it can be a `published` field, and in DynamoDB it can be an SK.
|
|
1307
1606
|
*
|
|
1308
1607
|
* It is not meant to be used via the API.
|
|
1309
1608
|
* @internal
|
|
1310
1609
|
*/
|
|
1311
1610
|
published?: boolean;
|
|
1312
1611
|
/**
|
|
1313
|
-
* Each operations implementation MUST determine how to use this field.
|
|
1314
|
-
* In SQL it can be
|
|
1612
|
+
* Each storage operations implementation MUST determine how to use this field.
|
|
1613
|
+
* In SQL, it can be a `latest` field, and in DynamoDB it can be an SK.
|
|
1315
1614
|
*
|
|
1316
1615
|
* It is not meant to be used via the API.
|
|
1317
1616
|
* @internal
|
|
1318
1617
|
*/
|
|
1319
1618
|
latest?: boolean;
|
|
1320
|
-
|
|
1619
|
+
/**
|
|
1620
|
+
* This is to allow querying by any content model field defined by the user.
|
|
1621
|
+
*/
|
|
1622
|
+
[key: string]: any | CmsEntryListWhereRef;
|
|
1321
1623
|
}
|
|
1322
1624
|
/**
|
|
1323
1625
|
* Entry listing sort.
|
|
@@ -1343,10 +1645,12 @@ export interface CmsEntryGetParams {
|
|
|
1343
1645
|
* @category GraphQL params
|
|
1344
1646
|
*/
|
|
1345
1647
|
export interface CmsEntryListParams {
|
|
1346
|
-
where
|
|
1648
|
+
where?: CmsEntryListWhere;
|
|
1347
1649
|
sort?: CmsEntryListSort;
|
|
1650
|
+
search?: string;
|
|
1651
|
+
fields?: string[];
|
|
1348
1652
|
limit?: number;
|
|
1349
|
-
after?: string;
|
|
1653
|
+
after?: string | null;
|
|
1350
1654
|
}
|
|
1351
1655
|
/**
|
|
1352
1656
|
* Meta information for GraphQL output.
|
|
@@ -1358,7 +1662,7 @@ export interface CmsEntryMeta {
|
|
|
1358
1662
|
/**
|
|
1359
1663
|
* A cursor for pagination.
|
|
1360
1664
|
*/
|
|
1361
|
-
cursor: string;
|
|
1665
|
+
cursor: string | null;
|
|
1362
1666
|
/**
|
|
1363
1667
|
* Is there more items to load?
|
|
1364
1668
|
*/
|
|
@@ -1368,98 +1672,143 @@ export interface CmsEntryMeta {
|
|
|
1368
1672
|
*/
|
|
1369
1673
|
totalCount: number;
|
|
1370
1674
|
}
|
|
1371
|
-
export interface
|
|
1372
|
-
input:
|
|
1675
|
+
export interface OnEntryBeforeCreateTopicParams {
|
|
1676
|
+
input: CreateCmsEntryInput;
|
|
1373
1677
|
entry: CmsEntry;
|
|
1374
|
-
model:
|
|
1678
|
+
model: StorageOperationsCmsModel;
|
|
1375
1679
|
}
|
|
1376
|
-
export interface
|
|
1377
|
-
input:
|
|
1680
|
+
export interface OnEntryAfterCreateTopicParams {
|
|
1681
|
+
input: CreateCmsEntryInput;
|
|
1378
1682
|
entry: CmsEntry;
|
|
1379
|
-
model:
|
|
1683
|
+
model: StorageOperationsCmsModel;
|
|
1380
1684
|
storageEntry: CmsEntry;
|
|
1381
1685
|
}
|
|
1382
|
-
export interface
|
|
1686
|
+
export interface OnEntryCreateErrorTopicParams {
|
|
1687
|
+
error: Error;
|
|
1688
|
+
input: CreateCmsEntryInput;
|
|
1383
1689
|
entry: CmsEntry;
|
|
1384
1690
|
model: CmsModel;
|
|
1385
1691
|
}
|
|
1386
|
-
export interface
|
|
1692
|
+
export interface OnEntryRevisionBeforeCreateTopicParams {
|
|
1693
|
+
input: CreateFromCmsEntryInput;
|
|
1387
1694
|
entry: CmsEntry;
|
|
1388
|
-
|
|
1389
|
-
|
|
1695
|
+
original: CmsEntry;
|
|
1696
|
+
model: StorageOperationsCmsModel;
|
|
1390
1697
|
}
|
|
1391
|
-
export interface
|
|
1392
|
-
input:
|
|
1698
|
+
export interface OnEntryRevisionAfterCreateTopicParams {
|
|
1699
|
+
input: CreateFromCmsEntryInput;
|
|
1700
|
+
entry: CmsEntry;
|
|
1393
1701
|
original: CmsEntry;
|
|
1702
|
+
model: StorageOperationsCmsModel;
|
|
1703
|
+
storageEntry: CmsEntry;
|
|
1704
|
+
}
|
|
1705
|
+
export interface OnEntryCreateRevisionErrorTopicParams {
|
|
1706
|
+
error: Error;
|
|
1707
|
+
input: CreateFromCmsEntryInput;
|
|
1394
1708
|
entry: CmsEntry;
|
|
1395
1709
|
model: CmsModel;
|
|
1396
1710
|
}
|
|
1397
|
-
export interface
|
|
1398
|
-
input:
|
|
1711
|
+
export interface OnEntryBeforeUpdateTopicParams {
|
|
1712
|
+
input: UpdateCmsEntryInput;
|
|
1399
1713
|
original: CmsEntry;
|
|
1400
1714
|
entry: CmsEntry;
|
|
1401
|
-
model:
|
|
1402
|
-
storageEntry: CmsEntry;
|
|
1715
|
+
model: StorageOperationsCmsModel;
|
|
1403
1716
|
}
|
|
1404
|
-
export interface
|
|
1717
|
+
export interface OnEntryAfterUpdateTopicParams {
|
|
1718
|
+
input: UpdateCmsEntryInput;
|
|
1719
|
+
original: CmsEntry;
|
|
1405
1720
|
entry: CmsEntry;
|
|
1406
|
-
model:
|
|
1721
|
+
model: StorageOperationsCmsModel;
|
|
1722
|
+
storageEntry: CmsEntry;
|
|
1407
1723
|
}
|
|
1408
|
-
export interface
|
|
1724
|
+
export interface OnEntryUpdateErrorTopicParams {
|
|
1725
|
+
error: Error;
|
|
1726
|
+
input: CreateFromCmsEntryInput;
|
|
1409
1727
|
entry: CmsEntry;
|
|
1410
1728
|
model: CmsModel;
|
|
1411
|
-
storageEntry: CmsEntry;
|
|
1412
1729
|
}
|
|
1413
|
-
export interface
|
|
1730
|
+
export interface OnEntryBeforePublishTopicParams {
|
|
1414
1731
|
entry: CmsEntry;
|
|
1415
|
-
model:
|
|
1732
|
+
model: StorageOperationsCmsModel;
|
|
1416
1733
|
}
|
|
1417
|
-
export interface
|
|
1734
|
+
export interface OnEntryAfterPublishTopicParams {
|
|
1418
1735
|
entry: CmsEntry;
|
|
1419
|
-
model:
|
|
1736
|
+
model: StorageOperationsCmsModel;
|
|
1420
1737
|
storageEntry: CmsEntry;
|
|
1421
1738
|
}
|
|
1422
|
-
export interface
|
|
1739
|
+
export interface OnEntryPublishErrorTopicParams {
|
|
1740
|
+
error: Error;
|
|
1423
1741
|
entry: CmsEntry;
|
|
1424
|
-
model:
|
|
1742
|
+
model: StorageOperationsCmsModel;
|
|
1425
1743
|
}
|
|
1426
|
-
export interface
|
|
1744
|
+
export interface OnEntryBeforeUnpublishTopicParams {
|
|
1427
1745
|
entry: CmsEntry;
|
|
1428
|
-
model:
|
|
1746
|
+
model: StorageOperationsCmsModel;
|
|
1747
|
+
}
|
|
1748
|
+
export interface OnEntryAfterUnpublishTopicParams {
|
|
1749
|
+
entry: CmsEntry;
|
|
1750
|
+
model: StorageOperationsCmsModel;
|
|
1429
1751
|
storageEntry: CmsEntry;
|
|
1430
1752
|
}
|
|
1431
|
-
export interface
|
|
1753
|
+
export interface OnEntryUnpublishErrorTopicParams {
|
|
1754
|
+
error: Error;
|
|
1432
1755
|
entry: CmsEntry;
|
|
1433
1756
|
model: CmsModel;
|
|
1434
1757
|
}
|
|
1435
|
-
export interface
|
|
1758
|
+
export interface OnEntryBeforeDeleteTopicParams {
|
|
1436
1759
|
entry: CmsEntry;
|
|
1437
|
-
model:
|
|
1438
|
-
storageEntry: CmsEntry;
|
|
1760
|
+
model: StorageOperationsCmsModel;
|
|
1439
1761
|
}
|
|
1440
|
-
export interface
|
|
1762
|
+
export interface OnEntryAfterDeleteTopicParams {
|
|
1441
1763
|
entry: CmsEntry;
|
|
1442
|
-
model:
|
|
1764
|
+
model: StorageOperationsCmsModel;
|
|
1443
1765
|
}
|
|
1444
|
-
export interface
|
|
1766
|
+
export interface OnEntryDeleteErrorTopicParams {
|
|
1767
|
+
error: Error;
|
|
1445
1768
|
entry: CmsEntry;
|
|
1446
|
-
model:
|
|
1769
|
+
model: StorageOperationsCmsModel;
|
|
1447
1770
|
}
|
|
1448
|
-
export interface
|
|
1771
|
+
export interface OnEntryRevisionBeforeDeleteTopicParams {
|
|
1449
1772
|
entry: CmsEntry;
|
|
1450
|
-
model:
|
|
1773
|
+
model: StorageOperationsCmsModel;
|
|
1451
1774
|
}
|
|
1452
|
-
export interface
|
|
1775
|
+
export interface OnEntryRevisionAfterDeleteTopicParams {
|
|
1453
1776
|
entry: CmsEntry;
|
|
1454
|
-
model:
|
|
1777
|
+
model: StorageOperationsCmsModel;
|
|
1455
1778
|
}
|
|
1456
|
-
export interface
|
|
1457
|
-
|
|
1779
|
+
export interface OnEntryRevisionDeleteErrorTopicParams {
|
|
1780
|
+
error: Error;
|
|
1781
|
+
entry: CmsEntry;
|
|
1782
|
+
model: StorageOperationsCmsModel;
|
|
1783
|
+
}
|
|
1784
|
+
export interface OnEntryBeforeGetTopicParams {
|
|
1785
|
+
model: StorageOperationsCmsModel;
|
|
1458
1786
|
where: CmsEntryListWhere;
|
|
1459
1787
|
}
|
|
1460
|
-
export interface
|
|
1788
|
+
export interface EntryBeforeListTopicParams {
|
|
1461
1789
|
where: CmsEntryListWhere;
|
|
1462
|
-
model:
|
|
1790
|
+
model: StorageOperationsCmsModel;
|
|
1791
|
+
}
|
|
1792
|
+
/**
|
|
1793
|
+
* @category Context
|
|
1794
|
+
* @category CmsEntry
|
|
1795
|
+
*/
|
|
1796
|
+
export interface CreateCmsEntryInput {
|
|
1797
|
+
[key: string]: any;
|
|
1798
|
+
}
|
|
1799
|
+
/**
|
|
1800
|
+
* @category Context
|
|
1801
|
+
* @category CmsEntry
|
|
1802
|
+
*/
|
|
1803
|
+
export interface CreateFromCmsEntryInput {
|
|
1804
|
+
[key: string]: any;
|
|
1805
|
+
}
|
|
1806
|
+
/**
|
|
1807
|
+
* @category Context
|
|
1808
|
+
* @category CmsEntry
|
|
1809
|
+
*/
|
|
1810
|
+
export interface UpdateCmsEntryInput {
|
|
1811
|
+
[key: string]: any;
|
|
1463
1812
|
}
|
|
1464
1813
|
/**
|
|
1465
1814
|
* Cms Entry CRUD methods in the context.
|
|
@@ -1475,7 +1824,7 @@ export interface CmsEntryContext {
|
|
|
1475
1824
|
/**
|
|
1476
1825
|
* Get a list of entries for a model by a given ID (revision).
|
|
1477
1826
|
*/
|
|
1478
|
-
getEntriesByIds: (model: CmsModel, revisions: string[]) => Promise<CmsEntry[]
|
|
1827
|
+
getEntriesByIds: (model: CmsModel, revisions: string[]) => Promise<CmsEntry[]>;
|
|
1479
1828
|
/**
|
|
1480
1829
|
* Get the entry for a model by a given ID.
|
|
1481
1830
|
*/
|
|
@@ -1483,7 +1832,7 @@ export interface CmsEntryContext {
|
|
|
1483
1832
|
/**
|
|
1484
1833
|
* List entries for a model. Internal method used by get, listLatest and listPublished.
|
|
1485
1834
|
*/
|
|
1486
|
-
listEntries: (model: CmsModel, params
|
|
1835
|
+
listEntries: (model: CmsModel, params: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
1487
1836
|
/**
|
|
1488
1837
|
* Lists latest entries. Used for manage API.
|
|
1489
1838
|
*/
|
|
@@ -1503,15 +1852,20 @@ export interface CmsEntryContext {
|
|
|
1503
1852
|
/**
|
|
1504
1853
|
* Create a new content entry.
|
|
1505
1854
|
*/
|
|
1506
|
-
createEntry: (model: CmsModel,
|
|
1855
|
+
createEntry: (model: CmsModel, input: CreateCmsEntryInput) => Promise<CmsEntry>;
|
|
1507
1856
|
/**
|
|
1508
1857
|
* Create a new entry from already existing entry.
|
|
1509
1858
|
*/
|
|
1510
|
-
createEntryRevisionFrom: (model: CmsModel, id: string,
|
|
1859
|
+
createEntryRevisionFrom: (model: CmsModel, id: string, input: CreateFromCmsEntryInput) => Promise<CmsEntry>;
|
|
1511
1860
|
/**
|
|
1512
1861
|
* Update existing entry.
|
|
1513
1862
|
*/
|
|
1514
|
-
updateEntry: (model: CmsModel, id: string,
|
|
1863
|
+
updateEntry: (model: CmsModel, id: string, input: UpdateCmsEntryInput, meta?: Record<string, any>) => Promise<CmsEntry>;
|
|
1864
|
+
/**
|
|
1865
|
+
* Method that republishes entry with given identifier.
|
|
1866
|
+
* @internal
|
|
1867
|
+
*/
|
|
1868
|
+
republishEntry: (model: CmsModel, id: string) => Promise<CmsEntry>;
|
|
1515
1869
|
/**
|
|
1516
1870
|
* Delete only a certain revision of the entry.
|
|
1517
1871
|
*/
|
|
@@ -1529,40 +1883,102 @@ export interface CmsEntryContext {
|
|
|
1529
1883
|
*/
|
|
1530
1884
|
unpublishEntry: (model: CmsModel, id: string) => Promise<CmsEntry>;
|
|
1531
1885
|
/**
|
|
1532
|
-
*
|
|
1886
|
+
* Get all entry revisions.
|
|
1533
1887
|
*/
|
|
1534
|
-
|
|
1888
|
+
getEntryRevisions: (model: CmsModel, id: string) => Promise<CmsEntry[]>;
|
|
1535
1889
|
/**
|
|
1536
|
-
*
|
|
1890
|
+
* Lifecyle events - deprecated.
|
|
1537
1891
|
*/
|
|
1538
|
-
requestEntryChanges: (model: CmsModel, id: string) => Promise<CmsEntry>;
|
|
1539
1892
|
/**
|
|
1540
|
-
*
|
|
1893
|
+
* @deprecated
|
|
1541
1894
|
*/
|
|
1542
|
-
|
|
1895
|
+
onBeforeEntryCreate: Topic<OnEntryBeforeCreateTopicParams>;
|
|
1543
1896
|
/**
|
|
1544
|
-
*
|
|
1545
|
-
*/
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1897
|
+
* @deprecated
|
|
1898
|
+
*/
|
|
1899
|
+
onAfterEntryCreate: Topic<OnEntryAfterCreateTopicParams>;
|
|
1900
|
+
/**
|
|
1901
|
+
* @deprecated
|
|
1902
|
+
*/
|
|
1903
|
+
onBeforeEntryCreateRevision: Topic<OnEntryRevisionBeforeCreateTopicParams>;
|
|
1904
|
+
/**
|
|
1905
|
+
* @deprecated
|
|
1906
|
+
*/
|
|
1907
|
+
onAfterEntryCreateRevision: Topic<OnEntryRevisionAfterCreateTopicParams>;
|
|
1908
|
+
/**
|
|
1909
|
+
* @deprecated
|
|
1910
|
+
*/
|
|
1911
|
+
onBeforeEntryUpdate: Topic<OnEntryBeforeUpdateTopicParams>;
|
|
1912
|
+
/**
|
|
1913
|
+
* @deprecated
|
|
1914
|
+
*/
|
|
1915
|
+
onAfterEntryUpdate: Topic<OnEntryAfterUpdateTopicParams>;
|
|
1916
|
+
/**
|
|
1917
|
+
* @deprecated
|
|
1918
|
+
*/
|
|
1919
|
+
onBeforeEntryDelete: Topic<OnEntryBeforeDeleteTopicParams>;
|
|
1920
|
+
/**
|
|
1921
|
+
* @deprecated
|
|
1922
|
+
*/
|
|
1923
|
+
onAfterEntryDelete: Topic<OnEntryAfterDeleteTopicParams>;
|
|
1924
|
+
/**
|
|
1925
|
+
* @deprecated
|
|
1926
|
+
*/
|
|
1927
|
+
onBeforeEntryDeleteRevision: Topic<OnEntryRevisionBeforeDeleteTopicParams>;
|
|
1928
|
+
/**
|
|
1929
|
+
* @deprecated
|
|
1930
|
+
*/
|
|
1931
|
+
onAfterEntryDeleteRevision: Topic<OnEntryRevisionAfterDeleteTopicParams>;
|
|
1932
|
+
/**
|
|
1933
|
+
* @deprecated
|
|
1934
|
+
*/
|
|
1935
|
+
onBeforeEntryPublish: Topic<OnEntryBeforePublishTopicParams>;
|
|
1936
|
+
/**
|
|
1937
|
+
* @deprecated
|
|
1938
|
+
*/
|
|
1939
|
+
onAfterEntryPublish: Topic<OnEntryAfterPublishTopicParams>;
|
|
1940
|
+
/**
|
|
1941
|
+
* @deprecated
|
|
1942
|
+
*/
|
|
1943
|
+
onBeforeEntryUnpublish: Topic<OnEntryBeforeUnpublishTopicParams>;
|
|
1944
|
+
/**
|
|
1945
|
+
* @deprecated
|
|
1946
|
+
*/
|
|
1947
|
+
onAfterEntryUnpublish: Topic<OnEntryAfterUnpublishTopicParams>;
|
|
1948
|
+
/**
|
|
1949
|
+
* @deprecated
|
|
1950
|
+
*/
|
|
1951
|
+
onBeforeEntryGet: Topic<OnEntryBeforeGetTopicParams>;
|
|
1952
|
+
/**
|
|
1953
|
+
* @deprecated
|
|
1954
|
+
*/
|
|
1955
|
+
onBeforeEntryList: Topic<EntryBeforeListTopicParams>;
|
|
1956
|
+
/**
|
|
1957
|
+
* Lifecycle events released in 5.33.0
|
|
1958
|
+
*/
|
|
1959
|
+
onEntryBeforeCreate: Topic<OnEntryBeforeCreateTopicParams>;
|
|
1960
|
+
onEntryAfterCreate: Topic<OnEntryAfterCreateTopicParams>;
|
|
1961
|
+
onEntryCreateError: Topic<OnEntryCreateErrorTopicParams>;
|
|
1962
|
+
onEntryRevisionBeforeCreate: Topic<OnEntryRevisionBeforeCreateTopicParams>;
|
|
1963
|
+
onEntryRevisionAfterCreate: Topic<OnEntryRevisionAfterCreateTopicParams>;
|
|
1964
|
+
onEntryRevisionCreateError: Topic<OnEntryCreateRevisionErrorTopicParams>;
|
|
1965
|
+
onEntryBeforeUpdate: Topic<OnEntryBeforeUpdateTopicParams>;
|
|
1966
|
+
onEntryAfterUpdate: Topic<OnEntryAfterUpdateTopicParams>;
|
|
1967
|
+
onEntryUpdateError: Topic<OnEntryUpdateErrorTopicParams>;
|
|
1968
|
+
onEntryBeforeDelete: Topic<OnEntryBeforeDeleteTopicParams>;
|
|
1969
|
+
onEntryAfterDelete: Topic<OnEntryAfterDeleteTopicParams>;
|
|
1970
|
+
onEntryDeleteError: Topic<OnEntryDeleteErrorTopicParams>;
|
|
1971
|
+
onEntryRevisionBeforeDelete: Topic<OnEntryRevisionBeforeDeleteTopicParams>;
|
|
1972
|
+
onEntryRevisionAfterDelete: Topic<OnEntryRevisionAfterDeleteTopicParams>;
|
|
1973
|
+
onEntryRevisionDeleteError: Topic<OnEntryRevisionDeleteErrorTopicParams>;
|
|
1974
|
+
onEntryBeforePublish: Topic<OnEntryBeforePublishTopicParams>;
|
|
1975
|
+
onEntryAfterPublish: Topic<OnEntryAfterPublishTopicParams>;
|
|
1976
|
+
onEntryPublishError: Topic<OnEntryPublishErrorTopicParams>;
|
|
1977
|
+
onEntryBeforeUnpublish: Topic<OnEntryBeforeUnpublishTopicParams>;
|
|
1978
|
+
onEntryAfterUnpublish: Topic<OnEntryAfterUnpublishTopicParams>;
|
|
1979
|
+
onEntryUnpublishError: Topic<OnEntryUnpublishErrorTopicParams>;
|
|
1980
|
+
onEntryBeforeGet: Topic<OnEntryBeforeGetTopicParams>;
|
|
1981
|
+
onEntryBeforeList: Topic<EntryBeforeListTopicParams>;
|
|
1566
1982
|
}
|
|
1567
1983
|
/**
|
|
1568
1984
|
* Parameters for CmsEntryResolverFactory.
|
|
@@ -1589,15 +2005,22 @@ export declare type CmsEntryResolverFactory<TSource = any, TArgs = any, TContext
|
|
|
1589
2005
|
*/
|
|
1590
2006
|
export interface CmsSettingsPermission extends SecurityPermission {
|
|
1591
2007
|
}
|
|
2008
|
+
/**
|
|
2009
|
+
* A base security permission for CMS.
|
|
2010
|
+
*
|
|
2011
|
+
* @category SecurityPermission
|
|
2012
|
+
*/
|
|
2013
|
+
export interface BaseCmsSecurityPermission extends SecurityPermission {
|
|
2014
|
+
own?: boolean;
|
|
2015
|
+
rwd: string | number;
|
|
2016
|
+
}
|
|
1592
2017
|
/**
|
|
1593
2018
|
* A security permission for content model.
|
|
1594
2019
|
*
|
|
1595
2020
|
* @category SecurityPermission
|
|
1596
2021
|
* @category CmsModel
|
|
1597
2022
|
*/
|
|
1598
|
-
export interface CmsModelPermission extends
|
|
1599
|
-
own: boolean;
|
|
1600
|
-
rwd: string;
|
|
2023
|
+
export interface CmsModelPermission extends BaseCmsSecurityPermission {
|
|
1601
2024
|
/**
|
|
1602
2025
|
* A object representing `key: model.modelId` values where key is locale code.
|
|
1603
2026
|
*/
|
|
@@ -1617,9 +2040,7 @@ export interface CmsModelPermission extends SecurityPermission {
|
|
|
1617
2040
|
* @category SecurityPermission
|
|
1618
2041
|
* @category CmsGroup
|
|
1619
2042
|
*/
|
|
1620
|
-
export interface CmsGroupPermission extends
|
|
1621
|
-
own: boolean;
|
|
1622
|
-
rwd: string;
|
|
2043
|
+
export interface CmsGroupPermission extends BaseCmsSecurityPermission {
|
|
1623
2044
|
/**
|
|
1624
2045
|
* A object representing `key: group.id` values where key is locale code.
|
|
1625
2046
|
*/
|
|
@@ -1633,10 +2054,8 @@ export interface CmsGroupPermission extends SecurityPermission {
|
|
|
1633
2054
|
* @category SecurityPermission
|
|
1634
2055
|
* @category CmsEntry
|
|
1635
2056
|
*/
|
|
1636
|
-
export interface CmsEntryPermission extends
|
|
1637
|
-
|
|
1638
|
-
rwd: string;
|
|
1639
|
-
pw: string;
|
|
2057
|
+
export interface CmsEntryPermission extends BaseCmsSecurityPermission {
|
|
2058
|
+
pw?: string;
|
|
1640
2059
|
/**
|
|
1641
2060
|
* A object representing `key: model.modelId` values where key is locale code.
|
|
1642
2061
|
*/
|
|
@@ -1665,13 +2084,10 @@ export interface CmsGroupStorageOperationsListParams {
|
|
|
1665
2084
|
sort?: string[];
|
|
1666
2085
|
}
|
|
1667
2086
|
export interface CmsGroupStorageOperationsCreateParams {
|
|
1668
|
-
input: CmsGroupCreateInput;
|
|
1669
2087
|
group: CmsGroup;
|
|
1670
2088
|
}
|
|
1671
2089
|
export interface CmsGroupStorageOperationsUpdateParams {
|
|
1672
|
-
original: CmsGroup;
|
|
1673
2090
|
group: CmsGroup;
|
|
1674
|
-
input: CmsGroupUpdateInput;
|
|
1675
2091
|
}
|
|
1676
2092
|
export interface CmsGroupStorageOperationsDeleteParams {
|
|
1677
2093
|
group: CmsGroup;
|
|
@@ -1717,13 +2133,10 @@ export interface CmsModelStorageOperationsListParams {
|
|
|
1717
2133
|
where: CmsModelStorageOperationsListWhereParams;
|
|
1718
2134
|
}
|
|
1719
2135
|
export interface CmsModelStorageOperationsCreateParams {
|
|
1720
|
-
input: CmsModelCreateInput;
|
|
1721
2136
|
model: CmsModel;
|
|
1722
2137
|
}
|
|
1723
2138
|
export interface CmsModelStorageOperationsUpdateParams {
|
|
1724
|
-
original: CmsModel;
|
|
1725
2139
|
model: CmsModel;
|
|
1726
|
-
input: CmsModelUpdateInput;
|
|
1727
2140
|
}
|
|
1728
2141
|
export interface CmsModelStorageOperationsDeleteParams {
|
|
1729
2142
|
model: CmsModel;
|
|
@@ -1763,14 +2176,12 @@ export interface CmsEntryStorageOperationsGetParams {
|
|
|
1763
2176
|
export interface CmsEntryStorageOperationsListParams {
|
|
1764
2177
|
where: CmsEntryListWhere;
|
|
1765
2178
|
sort?: CmsEntryListSort;
|
|
2179
|
+
search?: string;
|
|
2180
|
+
fields?: string[];
|
|
1766
2181
|
limit?: number;
|
|
1767
|
-
after?: string;
|
|
2182
|
+
after?: string | null;
|
|
1768
2183
|
}
|
|
1769
2184
|
export interface CmsEntryStorageOperationsCreateParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
1770
|
-
/**
|
|
1771
|
-
* Input received from the user.
|
|
1772
|
-
*/
|
|
1773
|
-
input: Record<string, any>;
|
|
1774
2185
|
/**
|
|
1775
2186
|
* Real entry, with no transformations on it.
|
|
1776
2187
|
*/
|
|
@@ -1781,22 +2192,6 @@ export interface CmsEntryStorageOperationsCreateParams<T extends CmsStorageEntry
|
|
|
1781
2192
|
storageEntry: T;
|
|
1782
2193
|
}
|
|
1783
2194
|
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
2195
|
/**
|
|
1801
2196
|
* Real entry, with no transformations on it.
|
|
1802
2197
|
*/
|
|
@@ -1807,18 +2202,6 @@ export interface CmsEntryStorageOperationsCreateRevisionFromParams<T extends Cms
|
|
|
1807
2202
|
storageEntry: T;
|
|
1808
2203
|
}
|
|
1809
2204
|
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
2205
|
/**
|
|
1823
2206
|
* Real entry, with no transformations on it.
|
|
1824
2207
|
*/
|
|
@@ -1832,39 +2215,27 @@ export interface CmsEntryStorageOperationsDeleteRevisionParams<T extends CmsStor
|
|
|
1832
2215
|
/**
|
|
1833
2216
|
* Entry that was deleted.
|
|
1834
2217
|
*/
|
|
1835
|
-
|
|
2218
|
+
entry: CmsEntry;
|
|
1836
2219
|
/**
|
|
1837
2220
|
* Entry that was deleted, directly from storage, with transformations.
|
|
1838
2221
|
*/
|
|
1839
|
-
|
|
2222
|
+
storageEntry: T;
|
|
1840
2223
|
/**
|
|
1841
2224
|
* Entry that was set as latest.
|
|
1842
2225
|
*/
|
|
1843
|
-
|
|
2226
|
+
latestEntry: CmsEntry | null;
|
|
1844
2227
|
/**
|
|
1845
2228
|
* Entry that was set as latest, directly from storage, with transformations.
|
|
1846
2229
|
*/
|
|
1847
|
-
|
|
2230
|
+
latestStorageEntry: T | null;
|
|
1848
2231
|
}
|
|
1849
|
-
export interface CmsEntryStorageOperationsDeleteParams
|
|
2232
|
+
export interface CmsEntryStorageOperationsDeleteParams {
|
|
1850
2233
|
/**
|
|
1851
2234
|
* Entry that is going to be deleted.
|
|
1852
2235
|
*/
|
|
1853
2236
|
entry: CmsEntry;
|
|
1854
|
-
/**
|
|
1855
|
-
* Entry that is going to be deleted, directly from storage.
|
|
1856
|
-
*/
|
|
1857
|
-
storageEntry: T;
|
|
1858
2237
|
}
|
|
1859
2238
|
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
2239
|
/**
|
|
1869
2240
|
* The modified entry that is going to be saved as published.
|
|
1870
2241
|
* Entry is in its original form.
|
|
@@ -1876,14 +2247,6 @@ export interface CmsEntryStorageOperationsPublishParams<T extends CmsStorageEntr
|
|
|
1876
2247
|
storageEntry: T;
|
|
1877
2248
|
}
|
|
1878
2249
|
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
2250
|
/**
|
|
1888
2251
|
* The modified entry that is going to be saved as unpublished.
|
|
1889
2252
|
*/
|
|
@@ -1893,45 +2256,6 @@ export interface CmsEntryStorageOperationsUnpublishParams<T extends CmsStorageEn
|
|
|
1893
2256
|
*/
|
|
1894
2257
|
storageEntry: T;
|
|
1895
2258
|
}
|
|
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
2259
|
export interface CmsEntryStorageOperationsGetByIdsParams {
|
|
1936
2260
|
ids: readonly string[];
|
|
1937
2261
|
}
|
|
@@ -1988,90 +2312,76 @@ export interface CmsEntryStorageOperations<T extends CmsStorageEntry = CmsStorag
|
|
|
1988
2312
|
/**
|
|
1989
2313
|
* Get all the entries of the ids.
|
|
1990
2314
|
*/
|
|
1991
|
-
getByIds: (model:
|
|
2315
|
+
getByIds: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetByIdsParams) => Promise<T[]>;
|
|
1992
2316
|
/**
|
|
1993
2317
|
* Get all the published entries of the ids.
|
|
1994
2318
|
*/
|
|
1995
|
-
getPublishedByIds: (model:
|
|
2319
|
+
getPublishedByIds: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetPublishedByIdsParams) => Promise<T[]>;
|
|
1996
2320
|
/**
|
|
1997
2321
|
* Get all the latest entries of the ids.
|
|
1998
2322
|
*/
|
|
1999
|
-
getLatestByIds: (model:
|
|
2323
|
+
getLatestByIds: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetLatestByIdsParams) => Promise<T[]>;
|
|
2000
2324
|
/**
|
|
2001
2325
|
* Get all revisions of the given entry id.
|
|
2002
2326
|
*/
|
|
2003
|
-
getRevisions: (model:
|
|
2004
|
-
/**
|
|
2005
|
-
* Get all revisions of all of the given IDs.
|
|
2006
|
-
*/
|
|
2007
|
-
getAllRevisionsByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetAllRevisionsParams) => Promise<T[]>;
|
|
2327
|
+
getRevisions: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetRevisionsParams) => Promise<T[]>;
|
|
2008
2328
|
/**
|
|
2009
2329
|
* Get the entry by the given revision id.
|
|
2010
2330
|
*/
|
|
2011
|
-
getRevisionById: (model:
|
|
2331
|
+
getRevisionById: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetRevisionParams) => Promise<T | null>;
|
|
2012
2332
|
/**
|
|
2013
2333
|
* Get the published entry by given entryId.
|
|
2014
2334
|
*/
|
|
2015
|
-
getPublishedRevisionByEntryId: (model:
|
|
2335
|
+
getPublishedRevisionByEntryId: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetPublishedRevisionParams) => Promise<T | null>;
|
|
2016
2336
|
/**
|
|
2017
2337
|
* Get the latest entry by given entryId.
|
|
2018
2338
|
*/
|
|
2019
|
-
getLatestRevisionByEntryId: (model:
|
|
2339
|
+
getLatestRevisionByEntryId: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetLatestRevisionParams) => Promise<T | null>;
|
|
2020
2340
|
/**
|
|
2021
2341
|
* Get the revision of the entry before given one.
|
|
2022
2342
|
*/
|
|
2023
|
-
getPreviousRevision: (model:
|
|
2343
|
+
getPreviousRevision: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetPreviousRevisionParams) => Promise<T | null>;
|
|
2024
2344
|
/**
|
|
2025
2345
|
* Gets entry by given params.
|
|
2026
2346
|
*/
|
|
2027
|
-
get: (model:
|
|
2347
|
+
get: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsGetParams) => Promise<T | null>;
|
|
2028
2348
|
/**
|
|
2029
2349
|
* List all entries. Filterable via params.
|
|
2030
2350
|
*/
|
|
2031
|
-
list: (model:
|
|
2351
|
+
list: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsListParams) => Promise<CmsEntryStorageOperationsListResponse<T>>;
|
|
2032
2352
|
/**
|
|
2033
2353
|
* Create a new entry.
|
|
2034
2354
|
*/
|
|
2035
|
-
create: (model:
|
|
2355
|
+
create: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsCreateParams<T>) => Promise<T>;
|
|
2036
2356
|
/**
|
|
2037
2357
|
* Create a new entry from existing one.
|
|
2038
2358
|
*/
|
|
2039
|
-
createRevisionFrom: (model:
|
|
2359
|
+
createRevisionFrom: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsCreateRevisionFromParams<T>) => Promise<T>;
|
|
2040
2360
|
/**
|
|
2041
2361
|
* Update existing entry.
|
|
2042
2362
|
*/
|
|
2043
|
-
update: (model:
|
|
2363
|
+
update: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsUpdateParams<T>) => Promise<T>;
|
|
2044
2364
|
/**
|
|
2045
2365
|
* Delete the entry revision.
|
|
2046
2366
|
*/
|
|
2047
|
-
deleteRevision: (model:
|
|
2367
|
+
deleteRevision: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsDeleteRevisionParams<T>) => Promise<void>;
|
|
2048
2368
|
/**
|
|
2049
2369
|
* Delete the entry.
|
|
2050
2370
|
*/
|
|
2051
|
-
delete: (model:
|
|
2371
|
+
delete: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsDeleteParams) => Promise<void>;
|
|
2052
2372
|
/**
|
|
2053
2373
|
* Publish the entry.
|
|
2054
2374
|
*/
|
|
2055
|
-
publish: (model:
|
|
2375
|
+
publish: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsPublishParams<T>) => Promise<T>;
|
|
2056
2376
|
/**
|
|
2057
2377
|
* Unpublish the entry.
|
|
2058
2378
|
*/
|
|
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>;
|
|
2379
|
+
unpublish: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsUnpublishParams<T>) => Promise<T>;
|
|
2068
2380
|
}
|
|
2069
2381
|
export declare enum CONTENT_ENTRY_STATUS {
|
|
2070
2382
|
DRAFT = "draft",
|
|
2071
2383
|
PUBLISHED = "published",
|
|
2072
|
-
UNPUBLISHED = "unpublished"
|
|
2073
|
-
CHANGES_REQUESTED = "changesRequested",
|
|
2074
|
-
REVIEW_REQUESTED = "reviewRequested"
|
|
2384
|
+
UNPUBLISHED = "unpublished"
|
|
2075
2385
|
}
|
|
2076
2386
|
export interface CmsSettingsStorageOperationsGetParams {
|
|
2077
2387
|
locale: string;
|
|
@@ -2081,7 +2391,6 @@ export interface CmsSettingsStorageOperationsCreateParams {
|
|
|
2081
2391
|
settings: CmsSettings;
|
|
2082
2392
|
}
|
|
2083
2393
|
export interface CmsSettingsStorageOperationsUpdateParams {
|
|
2084
|
-
original: CmsSettings;
|
|
2085
2394
|
settings: CmsSettings;
|
|
2086
2395
|
}
|
|
2087
2396
|
export interface CmsSettingsStorageOperations {
|
|
@@ -2114,7 +2423,6 @@ export interface CmsSystemStorageOperationsCreateParams {
|
|
|
2114
2423
|
}
|
|
2115
2424
|
export interface CmsSystemStorageOperationsUpdateParams {
|
|
2116
2425
|
system: CmsSystem;
|
|
2117
|
-
original: CmsSystem;
|
|
2118
2426
|
}
|
|
2119
2427
|
export interface CmsSystemStorageOperations {
|
|
2120
2428
|
/**
|
|
@@ -2130,17 +2438,17 @@ export interface CmsSystemStorageOperations {
|
|
|
2130
2438
|
*/
|
|
2131
2439
|
update: (params: CmsSystemStorageOperationsUpdateParams) => Promise<CmsSystem>;
|
|
2132
2440
|
}
|
|
2133
|
-
export interface HeadlessCmsStorageOperations {
|
|
2441
|
+
export interface HeadlessCmsStorageOperations<C = CmsContext> {
|
|
2134
2442
|
system: CmsSystemStorageOperations;
|
|
2135
2443
|
settings: CmsSettingsStorageOperations;
|
|
2136
2444
|
groups: CmsGroupStorageOperations;
|
|
2137
2445
|
models: CmsModelStorageOperations;
|
|
2138
2446
|
entries: CmsEntryStorageOperations;
|
|
2139
|
-
init?: (cms: HeadlessCms) => Promise<void>;
|
|
2140
2447
|
/**
|
|
2141
|
-
*
|
|
2448
|
+
* Either attach something from the storage operations or run something in it.
|
|
2142
2449
|
*/
|
|
2143
|
-
|
|
2450
|
+
beforeInit?: (context: C) => Promise<void>;
|
|
2451
|
+
init?: (context: C) => Promise<void>;
|
|
2144
2452
|
/**
|
|
2145
2453
|
* An upgrade to run if necessary.
|
|
2146
2454
|
*/
|