@webiny/api-headless-cms 0.0.0-unstable.8c4d9f045a → 0.0.0-unstable.8feaff8c32
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/constants.d.ts +1 -0
- package/constants.js +8 -0
- package/constants.js.map +1 -0
- package/context.d.ts +5 -2
- package/context.js +96 -30
- package/context.js.map +1 -1
- package/crud/contentEntry/afterDelete.d.ts +2 -2
- package/crud/contentEntry/afterDelete.js +2 -7
- package/crud/contentEntry/afterDelete.js.map +1 -1
- package/crud/contentEntry/beforeCreate.d.ts +2 -2
- package/crud/contentEntry/beforeCreate.js +2 -5
- package/crud/contentEntry/beforeCreate.js.map +1 -1
- package/crud/contentEntry/beforeUpdate.d.ts +2 -2
- package/crud/contentEntry/beforeUpdate.js +2 -5
- package/crud/contentEntry/beforeUpdate.js.map +1 -1
- package/crud/contentEntry/entryDataValidation.js +4 -47
- package/crud/contentEntry/entryDataValidation.js.map +1 -1
- package/crud/contentEntry/markLockedFields.d.ts +1 -1
- package/crud/contentEntry/markLockedFields.js +25 -39
- package/crud/contentEntry/markLockedFields.js.map +1 -1
- package/crud/contentEntry/referenceFieldsMapping.js +48 -77
- package/crud/contentEntry/referenceFieldsMapping.js.map +1 -1
- package/crud/contentEntry/searchableFields.d.ts +9 -0
- package/crud/contentEntry/searchableFields.js +72 -0
- package/crud/contentEntry/searchableFields.js.map +1 -0
- package/crud/contentEntry.crud.d.ts +12 -7
- package/crud/contentEntry.crud.js +1213 -1033
- package/crud/contentEntry.crud.js.map +1 -1
- package/crud/contentModel/afterCreate.d.ts +3 -3
- package/crud/contentModel/afterCreate.js +5 -7
- package/crud/contentModel/afterCreate.js.map +1 -1
- package/crud/contentModel/afterCreateFrom.d.ts +3 -3
- package/crud/contentModel/afterCreateFrom.js +5 -7
- package/crud/contentModel/afterCreateFrom.js.map +1 -1
- package/crud/contentModel/afterDelete.d.ts +3 -3
- package/crud/contentModel/afterDelete.js +5 -7
- package/crud/contentModel/afterDelete.js.map +1 -1
- package/crud/contentModel/afterUpdate.d.ts +3 -3
- package/crud/contentModel/afterUpdate.js +5 -7
- package/crud/contentModel/afterUpdate.js.map +1 -1
- package/crud/contentModel/beforeCreate.d.ts +5 -6
- package/crud/contentModel/beforeCreate.js +53 -119
- package/crud/contentModel/beforeCreate.js.map +1 -1
- package/crud/contentModel/beforeDelete.d.ts +3 -3
- package/crud/contentModel/beforeDelete.js +7 -21
- package/crud/contentModel/beforeDelete.js.map +1 -1
- package/crud/contentModel/beforeUpdate.d.ts +4 -6
- package/crud/contentModel/beforeUpdate.js +38 -15
- package/crud/contentModel/beforeUpdate.js.map +1 -1
- package/crud/contentModel/compatibility/modelApiName.d.ts +3 -0
- package/crud/contentModel/compatibility/modelApiName.js +24 -0
- package/crud/contentModel/compatibility/modelApiName.js.map +1 -0
- package/crud/contentModel/contentModelManagerFactory.js +0 -7
- package/crud/contentModel/contentModelManagerFactory.js.map +1 -1
- package/crud/contentModel/createFieldStorageId.js +4 -3
- package/crud/contentModel/createFieldStorageId.js.map +1 -1
- package/crud/contentModel/defaultFields.d.ts +5 -0
- package/crud/contentModel/defaultFields.js +58 -0
- package/crud/contentModel/defaultFields.js.map +1 -0
- package/crud/contentModel/fields/descriptionField.d.ts +2 -0
- package/crud/contentModel/fields/descriptionField.js +42 -0
- package/crud/contentModel/fields/descriptionField.js.map +1 -0
- package/crud/contentModel/fields/imageField.d.ts +2 -0
- package/crud/contentModel/fields/imageField.js +46 -0
- package/crud/contentModel/fields/imageField.js.map +1 -0
- package/crud/contentModel/fields/titleField.d.ts +2 -0
- package/crud/contentModel/fields/titleField.js +58 -0
- package/crud/contentModel/fields/titleField.js.map +1 -0
- package/crud/contentModel/validate/endingAllowed.d.ts +6 -0
- package/crud/contentModel/validate/endingAllowed.js +26 -0
- package/crud/contentModel/validate/endingAllowed.js.map +1 -0
- package/crud/contentModel/validate/isModelEndingAllowed.d.ts +6 -0
- package/crud/contentModel/validate/isModelEndingAllowed.js +24 -0
- package/crud/contentModel/validate/isModelEndingAllowed.js.map +1 -0
- package/crud/contentModel/validate/modelId.d.ts +11 -0
- package/crud/contentModel/validate/modelId.js +36 -0
- package/crud/contentModel/validate/modelId.js.map +1 -0
- package/crud/contentModel/validate/pluralApiName.d.ts +7 -0
- package/crud/contentModel/validate/pluralApiName.js +24 -0
- package/crud/contentModel/validate/pluralApiName.js.map +1 -0
- package/crud/contentModel/validate/singularApiName.d.ts +7 -0
- package/crud/contentModel/validate/singularApiName.js +24 -0
- package/crud/contentModel/validate/singularApiName.js.map +1 -0
- package/crud/contentModel/validateLayout.js +0 -8
- package/crud/contentModel/validateLayout.js.map +1 -1
- package/crud/contentModel/validateModel.d.ts +4 -4
- package/crud/contentModel/validateModel.js +7 -12
- package/crud/contentModel/validateModel.js.map +1 -1
- package/crud/contentModel/validateModelFields.d.ts +4 -4
- package/crud/contentModel/validateModelFields.js +134 -155
- package/crud/contentModel/validateModelFields.js.map +1 -1
- package/crud/contentModel/validation.d.ts +591 -0
- package/crud/contentModel/validation.js +145 -0
- package/crud/contentModel/validation.js.map +1 -0
- package/crud/contentModel.crud.d.ts +2 -0
- package/crud/contentModel.crud.js +426 -381
- package/crud/contentModel.crud.js.map +1 -1
- package/crud/contentModelGroup/beforeCreate.d.ts +2 -2
- package/crud/contentModelGroup/beforeCreate.js +3 -15
- package/crud/contentModelGroup/beforeCreate.js.map +1 -1
- package/crud/contentModelGroup/beforeDelete.d.ts +2 -2
- package/crud/contentModelGroup/beforeDelete.js +3 -11
- package/crud/contentModelGroup/beforeDelete.js.map +1 -1
- package/crud/contentModelGroup/beforeUpdate.d.ts +2 -2
- package/crud/contentModelGroup/beforeUpdate.js +2 -7
- package/crud/contentModelGroup/beforeUpdate.js.map +1 -1
- package/crud/contentModelGroup/validation.d.ts +30 -0
- package/crud/contentModelGroup/validation.js +34 -0
- package/crud/contentModelGroup/validation.js.map +1 -0
- package/crud/contentModelGroup.crud.d.ts +2 -0
- package/crud/contentModelGroup.crud.js +252 -231
- package/crud/contentModelGroup.crud.js.map +1 -1
- package/crud/settings.crud.d.ts +3 -1
- package/crud/settings.crud.js +10 -36
- package/crud/settings.crud.js.map +1 -1
- package/crud/system.crud.js +55 -138
- package/crud/system.crud.js.map +1 -1
- package/fieldConverters/CmsModelDefaultFieldConverterPlugin.js +1 -14
- package/fieldConverters/CmsModelDefaultFieldConverterPlugin.js.map +1 -1
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.d.ts +11 -0
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js +203 -0
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js.map +1 -0
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.js +17 -72
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.js.map +1 -1
- package/fieldConverters/index.d.ts +2 -1
- package/fieldConverters/index.js +2 -5
- package/fieldConverters/index.js.map +1 -1
- package/graphql/buildSchemaPlugins.d.ts +8 -3
- package/graphql/buildSchemaPlugins.js +7 -11
- package/graphql/buildSchemaPlugins.js.map +1 -1
- package/graphql/checkEndpointAccess.d.ts +2 -0
- package/graphql/checkEndpointAccess.js +18 -0
- package/graphql/checkEndpointAccess.js.map +1 -0
- package/graphql/createExecutableSchema.d.ts +6 -0
- package/graphql/createExecutableSchema.js +29 -0
- package/graphql/createExecutableSchema.js.map +1 -0
- package/graphql/createRequestBody.d.ts +2 -0
- package/graphql/createRequestBody.js +14 -0
- package/graphql/createRequestBody.js.map +1 -0
- package/graphql/formatErrorPayload.d.ts +1 -0
- package/graphql/formatErrorPayload.js +25 -0
- package/graphql/formatErrorPayload.js.map +1 -0
- package/graphql/generateSchema.d.ts +8 -0
- package/graphql/generateSchema.js +31 -0
- package/graphql/generateSchema.js.map +1 -0
- package/graphql/getSchema.d.ts +17 -0
- package/graphql/getSchema.js +102 -0
- package/graphql/getSchema.js.map +1 -0
- package/graphql/graphQLHandlerFactory.js +7 -130
- package/graphql/graphQLHandlerFactory.js.map +1 -1
- package/graphql/handleRequest.d.ts +11 -0
- package/graphql/handleRequest.js +81 -0
- package/graphql/handleRequest.js.map +1 -0
- package/graphql/index.d.ts +1 -3
- package/graphql/index.js +2 -46
- package/graphql/index.js.map +1 -1
- package/graphql/schema/baseContentSchema.d.ts +6 -2
- package/graphql/schema/baseContentSchema.js +15 -29
- package/graphql/schema/baseContentSchema.js.map +1 -1
- package/graphql/schema/baseSchema.d.ts +3 -0
- package/graphql/schema/baseSchema.js +84 -0
- package/graphql/schema/baseSchema.js.map +1 -0
- package/graphql/schema/contentEntries.d.ts +6 -2
- package/graphql/schema/contentEntries.js +127 -111
- package/graphql/schema/contentEntries.js.map +1 -1
- package/graphql/schema/contentModelGroups.d.ts +6 -2
- package/graphql/schema/contentModelGroups.js +16 -29
- package/graphql/schema/contentModelGroups.js.map +1 -1
- package/graphql/schema/contentModels.d.ts +6 -2
- package/graphql/schema/contentModels.js +77 -22
- package/graphql/schema/contentModels.js.map +1 -1
- package/graphql/schema/createFieldResolvers.d.ts +2 -2
- package/graphql/schema/createFieldResolvers.js +25 -44
- package/graphql/schema/createFieldResolvers.js.map +1 -1
- package/graphql/schema/createFieldTypePluginRecords.d.ts +3 -0
- package/graphql/schema/createFieldTypePluginRecords.js +13 -0
- package/graphql/schema/createFieldTypePluginRecords.js.map +1 -0
- package/graphql/schema/createManageResolvers.d.ts +1 -1
- package/graphql/schema/createManageResolvers.js +47 -57
- package/graphql/schema/createManageResolvers.js.map +1 -1
- package/graphql/schema/createManageSDL.d.ts +3 -0
- package/graphql/schema/createManageSDL.js +99 -83
- package/graphql/schema/createManageSDL.js.map +1 -1
- package/graphql/schema/createPreviewResolvers.js +6 -24
- package/graphql/schema/createPreviewResolvers.js.map +1 -1
- package/graphql/schema/createReadResolvers.js +11 -24
- package/graphql/schema/createReadResolvers.js.map +1 -1
- package/graphql/schema/createReadSDL.d.ts +3 -0
- package/graphql/schema/createReadSDL.js +48 -46
- package/graphql/schema/createReadSDL.js.map +1 -1
- package/graphql/schema/resolvers/commonFieldResolvers.d.ts +3 -2
- package/graphql/schema/resolvers/commonFieldResolvers.js +2 -3
- package/graphql/schema/resolvers/commonFieldResolvers.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveCreate.js +0 -3
- package/graphql/schema/resolvers/manage/resolveCreate.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveCreateFrom.js +0 -3
- package/graphql/schema/resolvers/manage/resolveCreateFrom.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveDelete.d.ts +2 -1
- package/graphql/schema/resolvers/manage/resolveDelete.js +13 -9
- package/graphql/schema/resolvers/manage/resolveDelete.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveDeleteMultiple.d.ts +7 -0
- package/graphql/schema/resolvers/manage/resolveDeleteMultiple.js +20 -0
- package/graphql/schema/resolvers/manage/resolveDeleteMultiple.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveGet.js +5 -25
- package/graphql/schema/resolvers/manage/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGetByIds.js +0 -3
- package/graphql/schema/resolvers/manage/resolveGetByIds.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGetRevisions.js +0 -3
- package/graphql/schema/resolvers/manage/resolveGetRevisions.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGetUniqueFieldValues.d.ts +4 -0
- package/graphql/schema/resolvers/manage/resolveGetUniqueFieldValues.js +18 -0
- package/graphql/schema/resolvers/manage/resolveGetUniqueFieldValues.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveList.js +0 -3
- package/graphql/schema/resolvers/manage/resolveList.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveMove.d.ts +8 -0
- package/graphql/schema/resolvers/manage/resolveMove.js +30 -0
- package/graphql/schema/resolvers/manage/resolveMove.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolvePublish.js +0 -3
- package/graphql/schema/resolvers/manage/resolvePublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveRepublish.js +0 -3
- package/graphql/schema/resolvers/manage/resolveRepublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveUnpublish.js +0 -3
- package/graphql/schema/resolvers/manage/resolveUnpublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveUpdate.js +0 -3
- package/graphql/schema/resolvers/manage/resolveUpdate.js.map +1 -1
- package/graphql/schema/resolvers/preview/resolveGet.js +3 -15
- package/graphql/schema/resolvers/preview/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/preview/resolveList.js +0 -3
- package/graphql/schema/resolvers/preview/resolveList.js.map +1 -1
- package/graphql/schema/resolvers/read/resolveGet.js +3 -15
- package/graphql/schema/resolvers/read/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/read/resolveList.js +0 -3
- package/graphql/schema/resolvers/read/resolveList.js.map +1 -1
- package/graphql/schema/schemaPlugins.d.ts +8 -3
- package/graphql/schema/schemaPlugins.js +58 -69
- package/graphql/schema/schemaPlugins.js.map +1 -1
- package/graphql/system.d.ts +2 -5
- package/graphql/system.js +56 -98
- package/graphql/system.js.map +1 -1
- package/graphqlFields/boolean.js +0 -12
- package/graphqlFields/boolean.js.map +1 -1
- package/graphqlFields/datetime.js +0 -17
- package/graphqlFields/datetime.js.map +1 -1
- package/graphqlFields/dynamicZone/dynamicZoneField.d.ts +2 -0
- package/graphqlFields/dynamicZone/dynamicZoneField.js +243 -0
- package/graphqlFields/dynamicZone/dynamicZoneField.js.map +1 -0
- package/graphqlFields/dynamicZone/dynamicZoneStorage.d.ts +3 -0
- package/graphqlFields/dynamicZone/dynamicZoneStorage.js +63 -0
- package/graphqlFields/dynamicZone/dynamicZoneStorage.js.map +1 -0
- package/graphqlFields/dynamicZone/index.d.ts +2 -0
- package/graphqlFields/dynamicZone/index.js +19 -0
- package/graphqlFields/dynamicZone/index.js.map +1 -0
- package/graphqlFields/file.js +0 -8
- package/graphqlFields/file.js.map +1 -1
- package/graphqlFields/helpers.js +0 -10
- package/graphqlFields/helpers.js.map +1 -1
- package/graphqlFields/index.d.ts +1 -1
- package/graphqlFields/index.js +2 -12
- package/graphqlFields/index.js.map +1 -1
- package/graphqlFields/longText.js +0 -10
- package/graphqlFields/longText.js.map +1 -1
- package/graphqlFields/number.js +5 -12
- package/graphqlFields/number.js.map +1 -1
- package/graphqlFields/object.js +132 -99
- package/graphqlFields/object.js.map +1 -1
- package/graphqlFields/ref.js +90 -114
- package/graphqlFields/ref.js.map +1 -1
- package/graphqlFields/richText.js +0 -9
- package/graphqlFields/richText.js.map +1 -1
- package/graphqlFields/text.js +2 -11
- package/graphqlFields/text.js.map +1 -1
- package/index.d.ts +5 -3
- package/index.js +27 -27
- package/index.js.map +1 -1
- package/modelManager/DefaultCmsModelManager.d.ts +7 -7
- package/modelManager/DefaultCmsModelManager.js +1 -17
- package/modelManager/DefaultCmsModelManager.js.map +1 -1
- package/modelManager/index.js +0 -4
- package/modelManager/index.js.map +1 -1
- package/package.json +36 -42
- package/parameters/context.js +0 -4
- package/parameters/context.js.map +1 -1
- package/parameters/header.js +4 -15
- package/parameters/header.js.map +1 -1
- package/parameters/index.js +0 -8
- package/parameters/index.js.map +1 -1
- package/parameters/manual.js +7 -15
- package/parameters/manual.js.map +1 -1
- package/parameters/path.js +1 -12
- package/parameters/path.js.map +1 -1
- package/plugins/CmsGraphQLSchemaPlugin.d.ts +5 -0
- package/plugins/CmsGraphQLSchemaPlugin.js +12 -0
- package/plugins/CmsGraphQLSchemaPlugin.js.map +1 -0
- package/plugins/CmsGraphQLSchemaSorterPlugin.d.ts +20 -0
- package/plugins/CmsGraphQLSchemaSorterPlugin.js +28 -0
- package/plugins/CmsGraphQLSchemaSorterPlugin.js.map +1 -0
- package/plugins/CmsGroupPlugin.js +1 -9
- package/plugins/CmsGroupPlugin.js.map +1 -1
- package/plugins/CmsModelFieldConverterPlugin.d.ts +2 -2
- package/plugins/CmsModelFieldConverterPlugin.js +1 -6
- package/plugins/CmsModelFieldConverterPlugin.js.map +1 -1
- package/plugins/CmsModelPlugin.d.ts +27 -5
- package/plugins/CmsModelPlugin.js +46 -51
- package/plugins/CmsModelPlugin.js.map +1 -1
- package/plugins/CmsParametersPlugin.js +4 -7
- package/plugins/CmsParametersPlugin.js.map +1 -1
- package/plugins/StorageOperationsCmsModelPlugin.d.ts +23 -0
- package/plugins/StorageOperationsCmsModelPlugin.js +42 -0
- package/plugins/StorageOperationsCmsModelPlugin.js.map +1 -0
- package/plugins/StorageTransformPlugin.d.ts +11 -11
- package/plugins/StorageTransformPlugin.js +1 -10
- package/plugins/StorageTransformPlugin.js.map +1 -1
- package/plugins/index.d.ts +3 -0
- package/plugins/index.js +33 -10
- package/plugins/index.js.map +1 -1
- package/storage/default.js +0 -3
- package/storage/default.js.map +1 -1
- package/storage/object.js +7 -27
- package/storage/object.js.map +1 -1
- package/types.d.ts +712 -251
- package/types.js +78 -76
- package/types.js.map +1 -1
- package/utils/converters/Converter.js +1 -14
- package/utils/converters/Converter.js.map +1 -1
- package/utils/converters/ConverterCollection.d.ts +7 -0
- package/utils/converters/ConverterCollection.js +36 -32
- package/utils/converters/ConverterCollection.js.map +1 -1
- package/utils/converters/valueKeyStorageConverter.d.ts +1 -5
- package/utils/converters/valueKeyStorageConverter.js +32 -51
- package/utils/converters/valueKeyStorageConverter.js.map +1 -1
- package/utils/createTypeFromFields.d.ts +16 -0
- package/utils/createTypeFromFields.js +66 -0
- package/utils/createTypeFromFields.js.map +1 -0
- package/utils/createTypeName.d.ts +0 -2
- package/utils/createTypeName.js +5 -20
- package/utils/createTypeName.js.map +1 -1
- package/utils/entryStorage.js +25 -42
- package/utils/entryStorage.js.map +1 -1
- package/utils/filterAsync.js +0 -5
- package/utils/filterAsync.js.map +1 -1
- package/utils/getBaseFieldType.d.ts +2 -0
- package/utils/getBaseFieldType.js +10 -0
- package/utils/getBaseFieldType.js.map +1 -0
- package/utils/getEntryDescription.d.ts +2 -0
- package/utils/getEntryDescription.js +17 -0
- package/utils/getEntryDescription.js.map +1 -0
- package/utils/getEntryImage.d.ts +2 -0
- package/utils/getEntryImage.js +17 -0
- package/utils/getEntryImage.js.map +1 -0
- package/utils/getEntryTitle.d.ts +1 -1
- package/utils/getEntryTitle.js +0 -9
- package/utils/getEntryTitle.js.map +1 -1
- package/utils/getSchemaFromFieldPlugins.d.ts +4 -7
- package/utils/getSchemaFromFieldPlugins.js +23 -19
- package/utils/getSchemaFromFieldPlugins.js.map +1 -1
- package/utils/incrementEntryIdVersion.d.ts +5 -0
- package/utils/incrementEntryIdVersion.js +29 -0
- package/utils/incrementEntryIdVersion.js.map +1 -0
- package/utils/permissions/EntriesPermissions.d.ts +4 -0
- package/utils/permissions/EntriesPermissions.js +9 -0
- package/utils/permissions/EntriesPermissions.js.map +1 -0
- package/utils/permissions/ModelGroupsPermissions.d.ts +11 -0
- package/utils/permissions/ModelGroupsPermissions.js +48 -0
- package/utils/permissions/ModelGroupsPermissions.js.map +1 -0
- package/utils/permissions/ModelsPermissions.d.ts +20 -0
- package/utils/permissions/ModelsPermissions.js +91 -0
- package/utils/permissions/ModelsPermissions.js.map +1 -0
- package/utils/permissions/SettingsPermissions.d.ts +4 -0
- package/utils/permissions/SettingsPermissions.js +9 -0
- package/utils/permissions/SettingsPermissions.js.map +1 -0
- package/utils/renderFields.d.ts +4 -2
- package/utils/renderFields.js +12 -11
- package/utils/renderFields.js.map +1 -1
- package/utils/renderGetFilterFields.d.ts +2 -2
- package/utils/renderGetFilterFields.js +9 -30
- package/utils/renderGetFilterFields.js.map +1 -1
- package/utils/renderInputFields.d.ts +4 -2
- package/utils/renderInputFields.js +19 -14
- package/utils/renderInputFields.js.map +1 -1
- package/utils/renderListFilterFields.d.ts +3 -1
- package/utils/renderListFilterFields.js +24 -28
- package/utils/renderListFilterFields.js.map +1 -1
- package/utils/renderSortEnum.d.ts +9 -5
- package/utils/renderSortEnum.js +26 -12
- package/utils/renderSortEnum.js.map +1 -1
- package/utils/toSlug.js +1 -5
- package/utils/toSlug.js.map +1 -1
- package/validators/dateGte.js +0 -7
- package/validators/dateGte.js.map +1 -1
- package/validators/dateLte.js +0 -7
- package/validators/dateLte.js.map +1 -1
- package/validators/dynamicZone.d.ts +2 -0
- package/validators/dynamicZone.js +20 -0
- package/validators/dynamicZone.js.map +1 -0
- package/validators/gte.js +0 -8
- package/validators/gte.js.map +1 -1
- package/validators/in.js +0 -8
- package/validators/in.js.map +1 -1
- package/validators/index.js +2 -16
- package/validators/index.js.map +1 -1
- package/validators/lte.js +0 -8
- package/validators/lte.js.map +1 -1
- package/validators/maxLength.js +0 -8
- package/validators/maxLength.js.map +1 -1
- package/validators/minLength.js +0 -8
- package/validators/minLength.js.map +1 -1
- package/validators/pattern.js +0 -9
- package/validators/pattern.js.map +1 -1
- package/validators/patternPlugins/email.js +0 -2
- package/validators/patternPlugins/email.js.map +1 -1
- package/validators/patternPlugins/index.js +0 -8
- package/validators/patternPlugins/index.js.map +1 -1
- package/validators/patternPlugins/lowerCase.js +0 -2
- package/validators/patternPlugins/lowerCase.js.map +1 -1
- package/validators/patternPlugins/lowerCaseSpace.js +0 -2
- package/validators/patternPlugins/lowerCaseSpace.js.map +1 -1
- package/validators/patternPlugins/upperCase.js +0 -2
- package/validators/patternPlugins/upperCase.js.map +1 -1
- package/validators/patternPlugins/upperCaseSpace.js +0 -2
- package/validators/patternPlugins/upperCaseSpace.js.map +1 -1
- package/validators/patternPlugins/url.js +0 -2
- package/validators/patternPlugins/url.js.map +1 -1
- package/validators/required.js +0 -5
- package/validators/required.js.map +1 -1
- package/validators/timeGte.js +0 -8
- package/validators/timeGte.js.map +1 -1
- package/validators/timeLte.js +0 -8
- package/validators/timeLte.js.map +1 -1
- package/validators/unique.js +1 -8
- package/validators/unique.js.map +1 -1
- package/crud/contentModel/createFieldModels.d.ts +0 -2
- package/crud/contentModel/createFieldModels.js +0 -26
- package/crud/contentModel/createFieldModels.js.map +0 -1
- package/crud/contentModel/fieldIdValidation.d.ts +0 -1
- package/crud/contentModel/fieldIdValidation.js +0 -25
- package/crud/contentModel/fieldIdValidation.js.map +0 -1
- package/crud/contentModel/idValidation.d.ts +0 -1
- package/crud/contentModel/idValidation.js +0 -22
- package/crud/contentModel/idValidation.js.map +0 -1
- package/crud/contentModel/models.d.ts +0 -4
- package/crud/contentModel/models.js +0 -180
- package/crud/contentModel/models.js.map +0 -1
- package/crud/contentModel/systemFields.d.ts +0 -1
- package/crud/contentModel/systemFields.js +0 -8
- package/crud/contentModel/systemFields.js.map +0 -1
- package/crud/index.d.ts +0 -6
- package/crud/index.js +0 -89
- package/crud/index.js.map +0 -1
- package/graphql/schema/resolvers/manage/resolveRequestChanges.d.ts +0 -7
- package/graphql/schema/resolvers/manage/resolveRequestChanges.js +0 -21
- package/graphql/schema/resolvers/manage/resolveRequestChanges.js.map +0 -1
- package/graphql/schema/resolvers/manage/resolveRequestReview.d.ts +0 -7
- package/graphql/schema/resolvers/manage/resolveRequestReview.js +0 -21
- package/graphql/schema/resolvers/manage/resolveRequestReview.js.map +0 -1
- package/upgrades/5.33.0/index.d.ts +0 -3
- package/upgrades/5.33.0/index.js +0 -186
- package/upgrades/5.33.0/index.js.map +0 -1
- package/upgrades/index.d.ts +0 -1
- package/upgrades/index.js +0 -12
- package/upgrades/index.js.map +0 -1
- package/utils/access.d.ts +0 -8
- package/utils/access.js +0 -90
- package/utils/access.js.map +0 -1
- package/utils/filterModelFields.d.ts +0 -16
- package/utils/filterModelFields.js +0 -81
- package/utils/filterModelFields.js.map +0 -1
- package/utils/ownership.d.ts +0 -8
- package/utils/ownership.js +0 -41
- package/utils/ownership.js.map +0 -1
- package/utils/permissions.d.ts +0 -7
- package/utils/permissions.js +0 -110
- package/utils/permissions.js.map +0 -1
- package/utils/pluralizedTypeName.d.ts +0 -1
- package/utils/pluralizedTypeName.js +0 -26
- package/utils/pluralizedTypeName.js.map +0 -1
package/types.d.ts
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { Plugin } from "@webiny/plugins/types";
|
|
2
2
|
import { I18NContext, I18NLocale } from "@webiny/api-i18n/types";
|
|
3
3
|
import { Context } from "@webiny/api/types";
|
|
4
|
-
import { TenancyContext } from "@webiny/api-tenancy/types";
|
|
5
4
|
import { GraphQLFieldResolver, GraphQLSchemaDefinition, Resolvers } from "@webiny/handler-graphql/types";
|
|
6
5
|
import { SecurityPermission } from "@webiny/api-security/types";
|
|
7
6
|
import { DbContext } from "@webiny/handler-db/types";
|
|
8
|
-
import { FileManagerContext } from "@webiny/api-file-manager/types";
|
|
9
|
-
import { UpgradePlugin } from "@webiny/api-upgrade/types";
|
|
10
7
|
import { Topic } from "@webiny/pubsub/types";
|
|
11
8
|
import { CmsModelConverterCallable } from "./utils/converters/ConverterCollection";
|
|
12
9
|
export declare type ApiEndpoint = "manage" | "preview" | "read";
|
|
@@ -45,7 +42,7 @@ export interface HeadlessCms extends CmsSettingsContext, CmsSystemContext, CmsGr
|
|
|
45
42
|
*
|
|
46
43
|
* @category Context
|
|
47
44
|
*/
|
|
48
|
-
export interface CmsContext extends Context, DbContext, I18NContext
|
|
45
|
+
export interface CmsContext extends Context, DbContext, I18NContext {
|
|
49
46
|
cms: HeadlessCms;
|
|
50
47
|
}
|
|
51
48
|
interface CmsModelFieldPredefinedValuesValue {
|
|
@@ -99,6 +96,10 @@ export interface CmsModelFieldSettings {
|
|
|
99
96
|
* Object field has child fields.
|
|
100
97
|
*/
|
|
101
98
|
fields?: CmsModelField[];
|
|
99
|
+
/**
|
|
100
|
+
* Is the file field images only one?
|
|
101
|
+
*/
|
|
102
|
+
imagesOnly?: boolean;
|
|
102
103
|
/**
|
|
103
104
|
* Object field has child fields - so it needs to have a layout.
|
|
104
105
|
*/
|
|
@@ -116,6 +117,7 @@ export interface CmsModelFieldSettings {
|
|
|
116
117
|
*/
|
|
117
118
|
[key: string]: any;
|
|
118
119
|
}
|
|
120
|
+
export declare type CmsModelFieldType = "boolean" | "datetime" | "file" | "long-text" | "number" | "object" | "ref" | "rich-text" | "text" | "dynamicZone" | string;
|
|
119
121
|
/**
|
|
120
122
|
* A definition for content model field. This type exists on the app side as well.
|
|
121
123
|
*
|
|
@@ -136,18 +138,16 @@ export interface CmsModelField {
|
|
|
136
138
|
* A type of the field.
|
|
137
139
|
* We are defining our built-in fields, so people know which are available by the default.
|
|
138
140
|
*/
|
|
139
|
-
type:
|
|
141
|
+
type: CmsModelFieldType;
|
|
140
142
|
/**
|
|
141
143
|
* A unique storage ID for storing actual values.
|
|
142
|
-
* Must in form of a-zA-Z0-9@a-zA-Z0-9
|
|
144
|
+
* Must in form of a-zA-Z0-9@a-zA-Z0-9
|
|
143
145
|
*
|
|
144
146
|
* This is an auto-generated value: uses `id` and `type`
|
|
145
147
|
*
|
|
146
148
|
* This is used as path for the entry value.
|
|
147
|
-
*
|
|
148
|
-
* @internal
|
|
149
149
|
*/
|
|
150
|
-
storageId: string;
|
|
150
|
+
storageId: `${string}@${string}` | string;
|
|
151
151
|
/**
|
|
152
152
|
* Field identifier for the model field that will be available to the outside world.
|
|
153
153
|
* `storageId` is used as path (or column) to store the data.
|
|
@@ -196,6 +196,10 @@ export interface CmsModelField {
|
|
|
196
196
|
*
|
|
197
197
|
*/
|
|
198
198
|
multipleValues?: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Fields can be tagged to give them contextual meaning.
|
|
201
|
+
*/
|
|
202
|
+
tags?: string[];
|
|
199
203
|
/**
|
|
200
204
|
* Any user defined settings.
|
|
201
205
|
*
|
|
@@ -203,18 +207,42 @@ export interface CmsModelField {
|
|
|
203
207
|
*/
|
|
204
208
|
settings?: CmsModelFieldSettings;
|
|
205
209
|
}
|
|
210
|
+
export interface CmsDynamicZoneTemplate {
|
|
211
|
+
id: string;
|
|
212
|
+
name: string;
|
|
213
|
+
gqlTypeName: string;
|
|
214
|
+
description: string;
|
|
215
|
+
icon: string;
|
|
216
|
+
fields: CmsModelField[];
|
|
217
|
+
layout: string[][];
|
|
218
|
+
validation: CmsModelFieldValidation[];
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* A definition for dynamic-zone field to show possible type of the field in settings.
|
|
222
|
+
*/
|
|
223
|
+
export interface CmsModelDynamicZoneField extends CmsModelField {
|
|
224
|
+
/**
|
|
225
|
+
* Settings object for the field. Contains `templates` property.
|
|
226
|
+
*/
|
|
227
|
+
settings: {
|
|
228
|
+
templates: CmsDynamicZoneTemplate[];
|
|
229
|
+
};
|
|
230
|
+
}
|
|
206
231
|
/**
|
|
207
232
|
* Used for our internal functionality.
|
|
208
233
|
*/
|
|
209
234
|
export interface CmsModelFieldWithParent extends CmsModelField {
|
|
210
235
|
parent?: CmsModelFieldWithParent | null;
|
|
211
236
|
}
|
|
237
|
+
export interface CmsModelDynamicZoneFieldWithParent extends CmsModelDynamicZoneField {
|
|
238
|
+
parent?: CmsModelDynamicZoneFieldWithParent | null;
|
|
239
|
+
}
|
|
212
240
|
/**
|
|
213
241
|
* A definition for dateTime field to show possible type of the field in settings.
|
|
214
242
|
*/
|
|
215
243
|
export interface CmsModelDateTimeField extends CmsModelField {
|
|
216
244
|
/**
|
|
217
|
-
* Settings object for the field. Contains type property.
|
|
245
|
+
* Settings object for the field. Contains `type` property.
|
|
218
246
|
*/
|
|
219
247
|
settings: {
|
|
220
248
|
type: "time" | "date" | "dateTimeWithoutTimezone" | "dateTimeWithTimezone";
|
|
@@ -336,7 +364,21 @@ export interface LockedField {
|
|
|
336
364
|
[key: string]: any;
|
|
337
365
|
}
|
|
338
366
|
/**
|
|
339
|
-
*
|
|
367
|
+
* @category Database model
|
|
368
|
+
* @category CmsModel
|
|
369
|
+
*/
|
|
370
|
+
export interface CmsModelGroup {
|
|
371
|
+
/**
|
|
372
|
+
* Generated ID of the group
|
|
373
|
+
*/
|
|
374
|
+
id: string;
|
|
375
|
+
/**
|
|
376
|
+
* Name of the group
|
|
377
|
+
*/
|
|
378
|
+
name: string;
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Base CMS Model. Should not be exported and used outside of this package.
|
|
340
382
|
*
|
|
341
383
|
* @category Database model
|
|
342
384
|
* @category CmsModel
|
|
@@ -350,6 +392,24 @@ export interface CmsModel {
|
|
|
350
392
|
* Unique ID for the content model. Created from name if not defined by user.
|
|
351
393
|
*/
|
|
352
394
|
modelId: string;
|
|
395
|
+
/**
|
|
396
|
+
* Name of the content model in singular form to be used in the API.
|
|
397
|
+
* example:
|
|
398
|
+
* - Article
|
|
399
|
+
* - Fruit
|
|
400
|
+
* - Vegetable
|
|
401
|
+
* - Car
|
|
402
|
+
*/
|
|
403
|
+
singularApiName: string;
|
|
404
|
+
/**
|
|
405
|
+
* Name of the content model in plural form to be used in the API.
|
|
406
|
+
* example:
|
|
407
|
+
* - Articles
|
|
408
|
+
* - Fruits
|
|
409
|
+
* - Vegetables
|
|
410
|
+
* - Cars
|
|
411
|
+
*/
|
|
412
|
+
pluralApiName: string;
|
|
353
413
|
/**
|
|
354
414
|
* Model tenant.
|
|
355
415
|
*/
|
|
@@ -361,20 +421,15 @@ export interface CmsModel {
|
|
|
361
421
|
/**
|
|
362
422
|
* Cms Group reference object.
|
|
363
423
|
*/
|
|
364
|
-
group:
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
/**
|
|
370
|
-
* Name of the group
|
|
371
|
-
*/
|
|
372
|
-
name: string;
|
|
373
|
-
};
|
|
424
|
+
group: CmsModelGroup;
|
|
425
|
+
/**
|
|
426
|
+
* Icon for the content model.
|
|
427
|
+
*/
|
|
428
|
+
icon?: string | null;
|
|
374
429
|
/**
|
|
375
430
|
* Description for the content model.
|
|
376
431
|
*/
|
|
377
|
-
description: string;
|
|
432
|
+
description: string | null;
|
|
378
433
|
/**
|
|
379
434
|
* Date created
|
|
380
435
|
*/
|
|
@@ -386,7 +441,7 @@ export interface CmsModel {
|
|
|
386
441
|
/**
|
|
387
442
|
* CreatedBy object wrapper. Contains id, name and type of the user.
|
|
388
443
|
*/
|
|
389
|
-
createdBy?:
|
|
444
|
+
createdBy?: CmsIdentity;
|
|
390
445
|
/**
|
|
391
446
|
* List of fields defining entry values.
|
|
392
447
|
*/
|
|
@@ -402,6 +457,10 @@ export interface CmsModel {
|
|
|
402
457
|
* ```
|
|
403
458
|
*/
|
|
404
459
|
layout: string[][];
|
|
460
|
+
/**
|
|
461
|
+
* Models can be tagged to give them contextual meaning.
|
|
462
|
+
*/
|
|
463
|
+
tags?: string[];
|
|
405
464
|
/**
|
|
406
465
|
* List of locked fields. Updated when entry is saved and a field has been used.
|
|
407
466
|
*/
|
|
@@ -411,6 +470,16 @@ export interface CmsModel {
|
|
|
411
470
|
* It is picked as first available text field. Or user can select own field.
|
|
412
471
|
*/
|
|
413
472
|
titleFieldId: string;
|
|
473
|
+
/**
|
|
474
|
+
* The field which is displayed as the description one.
|
|
475
|
+
* Only way this is null or undefined is that there are no long-text fields to be set as description.
|
|
476
|
+
*/
|
|
477
|
+
descriptionFieldId?: string | null;
|
|
478
|
+
/**
|
|
479
|
+
* The field which is displayed as the image.
|
|
480
|
+
* Only way this is null or undefined is that there are no file fields, with images only set, to be set as image.
|
|
481
|
+
*/
|
|
482
|
+
imageFieldId?: string | null;
|
|
414
483
|
/**
|
|
415
484
|
* The version of Webiny which this record was stored with.
|
|
416
485
|
*/
|
|
@@ -438,25 +507,41 @@ export interface CmsModelFieldDefinition {
|
|
|
438
507
|
fields: string;
|
|
439
508
|
typeDefs?: string;
|
|
440
509
|
}
|
|
441
|
-
interface CmsModelFieldToGraphQLCreateResolverParams {
|
|
510
|
+
interface CmsModelFieldToGraphQLCreateResolverParams<TField> {
|
|
442
511
|
models: CmsModel[];
|
|
443
512
|
model: CmsModel;
|
|
444
513
|
graphQLType: string;
|
|
445
|
-
field:
|
|
514
|
+
field: TField;
|
|
446
515
|
createFieldResolvers: any;
|
|
516
|
+
fieldTypePlugins: CmsFieldTypePlugins;
|
|
447
517
|
}
|
|
448
|
-
export interface CmsModelFieldToGraphQLCreateResolver {
|
|
449
|
-
(params: CmsModelFieldToGraphQLCreateResolverParams): GraphQLFieldResolver | {
|
|
518
|
+
export interface CmsModelFieldToGraphQLCreateResolver<TField = CmsModelField> {
|
|
519
|
+
(params: CmsModelFieldToGraphQLCreateResolverParams<TField>): GraphQLFieldResolver | {
|
|
450
520
|
resolver: GraphQLFieldResolver | null;
|
|
451
521
|
typeResolvers: Resolvers<CmsContext>;
|
|
452
522
|
} | false;
|
|
453
523
|
}
|
|
524
|
+
export interface CmsModelFieldToGraphQLPluginValidateChildFieldsValidateParams<TField extends CmsModelField = CmsModelField> {
|
|
525
|
+
fields: TField[];
|
|
526
|
+
originalFields: TField[];
|
|
527
|
+
}
|
|
528
|
+
export interface CmsModelFieldToGraphQLPluginValidateChildFieldsValidate {
|
|
529
|
+
(params: CmsModelFieldToGraphQLPluginValidateChildFieldsValidateParams): void;
|
|
530
|
+
}
|
|
531
|
+
export interface CmsModelFieldToGraphQLPluginValidateChildFieldsParams<TField extends CmsModelField = CmsModelField> {
|
|
532
|
+
field: TField;
|
|
533
|
+
originalField?: TField;
|
|
534
|
+
validate: CmsModelFieldToGraphQLPluginValidateChildFieldsValidate;
|
|
535
|
+
}
|
|
536
|
+
export interface CmsModelFieldToGraphQLPluginValidateChildFields<TField extends CmsModelField = CmsModelField> {
|
|
537
|
+
(params: CmsModelFieldToGraphQLPluginValidateChildFieldsParams<TField>): void;
|
|
538
|
+
}
|
|
454
539
|
/**
|
|
455
540
|
* @category Plugin
|
|
456
541
|
* @category ModelField
|
|
457
542
|
* @category GraphQL
|
|
458
543
|
*/
|
|
459
|
-
export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
544
|
+
export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = CmsModelField> extends Plugin {
|
|
460
545
|
/**
|
|
461
546
|
* A plugin type
|
|
462
547
|
*/
|
|
@@ -510,7 +595,7 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
510
595
|
*/
|
|
511
596
|
createStorageId?: (params: {
|
|
512
597
|
model: CmsModel;
|
|
513
|
-
field:
|
|
598
|
+
field: Omit<TField, "storageId"> & Partial<Pick<TField, "storageId">>;
|
|
514
599
|
}) => string | null | undefined;
|
|
515
600
|
/**
|
|
516
601
|
* Read API methods.
|
|
@@ -528,8 +613,7 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
528
613
|
* ```
|
|
529
614
|
*/
|
|
530
615
|
createGetFilters?(params: {
|
|
531
|
-
|
|
532
|
-
field: CmsModelField;
|
|
616
|
+
field: TField;
|
|
533
617
|
}): string;
|
|
534
618
|
/**
|
|
535
619
|
* Definition for list filtering for GraphQL.
|
|
@@ -548,8 +632,9 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
548
632
|
* ```
|
|
549
633
|
*/
|
|
550
634
|
createListFilters?(params: {
|
|
551
|
-
model: CmsModel
|
|
552
|
-
field:
|
|
635
|
+
model: Pick<CmsModel, "singularApiName">;
|
|
636
|
+
field: TField;
|
|
637
|
+
plugins: CmsFieldTypePlugins;
|
|
553
638
|
}): string;
|
|
554
639
|
/**
|
|
555
640
|
* Definition of the field type for GraphQL - be aware if multiple values is selected.
|
|
@@ -567,13 +652,14 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
567
652
|
* ```
|
|
568
653
|
*/
|
|
569
654
|
createTypeField(params: {
|
|
655
|
+
models: CmsModel[];
|
|
570
656
|
model: CmsModel;
|
|
571
|
-
field:
|
|
657
|
+
field: TField;
|
|
572
658
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
573
659
|
}): CmsModelFieldDefinition | string | null;
|
|
574
660
|
/**
|
|
575
661
|
* Definition for field resolver.
|
|
576
|
-
* By default it is simple return of the `instance.values[storageId]` but if required, users can define their own.
|
|
662
|
+
* By default, it is simple return of the `instance.values[storageId]` but if required, users can define their own.
|
|
577
663
|
*
|
|
578
664
|
* ```ts
|
|
579
665
|
* read: {
|
|
@@ -585,7 +671,7 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
585
671
|
* }
|
|
586
672
|
* ```
|
|
587
673
|
*/
|
|
588
|
-
createResolver?: CmsModelFieldToGraphQLCreateResolver
|
|
674
|
+
createResolver?: CmsModelFieldToGraphQLCreateResolver<TField>;
|
|
589
675
|
/**
|
|
590
676
|
* Read API schema definitions for the field and resolvers for them.
|
|
591
677
|
*
|
|
@@ -627,8 +713,9 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
627
713
|
* ```
|
|
628
714
|
*/
|
|
629
715
|
createListFilters?: (params: {
|
|
630
|
-
model: CmsModel
|
|
631
|
-
field:
|
|
716
|
+
model: Pick<CmsModel, "singularApiName">;
|
|
717
|
+
field: TField;
|
|
718
|
+
plugins: CmsFieldTypePlugins;
|
|
632
719
|
}) => string;
|
|
633
720
|
/**
|
|
634
721
|
* Manage API schema definitions for the field and resolvers for them. Probably similar to `read.createSchema`.
|
|
@@ -666,8 +753,9 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
666
753
|
* ```
|
|
667
754
|
*/
|
|
668
755
|
createTypeField: (params: {
|
|
756
|
+
models: CmsModel[];
|
|
669
757
|
model: CmsModel;
|
|
670
|
-
field:
|
|
758
|
+
field: TField;
|
|
671
759
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
672
760
|
}) => CmsModelFieldDefinition | string | null;
|
|
673
761
|
/**
|
|
@@ -686,13 +774,14 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
686
774
|
* ```
|
|
687
775
|
*/
|
|
688
776
|
createInputField: (params: {
|
|
777
|
+
models: CmsModel[];
|
|
689
778
|
model: CmsModel;
|
|
690
|
-
field:
|
|
779
|
+
field: TField;
|
|
691
780
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
692
781
|
}) => CmsModelFieldDefinition | string | null;
|
|
693
782
|
/**
|
|
694
783
|
* Definition for field resolver.
|
|
695
|
-
* By default it is simple return of the `instance.values[storageId]` but if required, users can define their own.
|
|
784
|
+
* By default, it is simple return of the `instance.values[storageId]` but if required, users can define their own.
|
|
696
785
|
*
|
|
697
786
|
* ```ts
|
|
698
787
|
* manage: {
|
|
@@ -704,8 +793,13 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
704
793
|
* }
|
|
705
794
|
* ```
|
|
706
795
|
*/
|
|
707
|
-
createResolver?: CmsModelFieldToGraphQLCreateResolver
|
|
796
|
+
createResolver?: CmsModelFieldToGraphQLCreateResolver<TField>;
|
|
708
797
|
};
|
|
798
|
+
/**
|
|
799
|
+
*
|
|
800
|
+
* @param field
|
|
801
|
+
*/
|
|
802
|
+
validateChildFields?: CmsModelFieldToGraphQLPluginValidateChildFields<TField>;
|
|
709
803
|
}
|
|
710
804
|
/**
|
|
711
805
|
* Check for content model locked field.
|
|
@@ -744,11 +838,11 @@ export interface CmsFieldTypePlugins {
|
|
|
744
838
|
[key: string]: CmsModelFieldToGraphQLPlugin;
|
|
745
839
|
}
|
|
746
840
|
/**
|
|
747
|
-
*
|
|
841
|
+
* An interface describing the reference to a user that created some data in the database.
|
|
748
842
|
*
|
|
749
843
|
* @category General
|
|
750
844
|
*/
|
|
751
|
-
export interface
|
|
845
|
+
export interface CmsIdentity {
|
|
752
846
|
/**
|
|
753
847
|
* ID if the user.
|
|
754
848
|
*/
|
|
@@ -798,30 +892,45 @@ export interface CmsSettingsContext {
|
|
|
798
892
|
/**
|
|
799
893
|
* Get the datetime when content model last changed.
|
|
800
894
|
*/
|
|
801
|
-
getModelLastChange: () => Promise<Date>;
|
|
895
|
+
getModelLastChange: () => Promise<Date | null>;
|
|
896
|
+
}
|
|
897
|
+
export interface OnSystemBeforeInstallTopicParams {
|
|
898
|
+
tenant: string;
|
|
899
|
+
locale: string;
|
|
802
900
|
}
|
|
803
|
-
export interface
|
|
901
|
+
export interface OnSystemAfterInstallTopicParams {
|
|
804
902
|
tenant: string;
|
|
805
903
|
locale: string;
|
|
806
904
|
}
|
|
807
|
-
export interface
|
|
905
|
+
export interface OnSystemInstallErrorTopicParams {
|
|
906
|
+
error: Error;
|
|
808
907
|
tenant: string;
|
|
809
908
|
locale: string;
|
|
810
909
|
}
|
|
811
910
|
export declare type CmsSystemContext = {
|
|
812
911
|
getSystemVersion: () => Promise<string | null>;
|
|
813
912
|
setSystemVersion: (version: string) => Promise<void>;
|
|
814
|
-
getReadAPIKey(): Promise<string | null>;
|
|
815
913
|
installSystem: () => Promise<void>;
|
|
816
|
-
upgradeSystem: (version: string) => Promise<boolean>;
|
|
817
914
|
/**
|
|
818
|
-
*
|
|
915
|
+
* Lifecycle events - deprecated
|
|
916
|
+
*/
|
|
917
|
+
/**
|
|
918
|
+
* @deprecated
|
|
919
|
+
*/
|
|
920
|
+
onBeforeSystemInstall: Topic<OnSystemBeforeInstallTopicParams>;
|
|
921
|
+
/**
|
|
922
|
+
* @deprecated
|
|
923
|
+
*/
|
|
924
|
+
onAfterSystemInstall: Topic<OnSystemAfterInstallTopicParams>;
|
|
925
|
+
/**
|
|
926
|
+
* Released in 5.34.0
|
|
819
927
|
*/
|
|
820
|
-
|
|
821
|
-
|
|
928
|
+
onSystemBeforeInstall: Topic<OnSystemBeforeInstallTopicParams>;
|
|
929
|
+
onSystemAfterInstall: Topic<OnSystemAfterInstallTopicParams>;
|
|
930
|
+
onSystemInstallError: Topic<OnSystemInstallErrorTopicParams>;
|
|
822
931
|
};
|
|
823
932
|
/**
|
|
824
|
-
* A GraphQL params.data parameter received when creating content model group.
|
|
933
|
+
* A GraphQL `params.data` parameter received when creating content model group.
|
|
825
934
|
*
|
|
826
935
|
* @category CmsGroup
|
|
827
936
|
* @category GraphQL params
|
|
@@ -833,7 +942,7 @@ export interface CmsGroupCreateInput {
|
|
|
833
942
|
icon: string;
|
|
834
943
|
}
|
|
835
944
|
/**
|
|
836
|
-
* A GraphQL params.data parameter received when updating content model group.
|
|
945
|
+
* A GraphQL `params.data` parameter received when updating content model group.
|
|
837
946
|
*
|
|
838
947
|
* @category CmsGroup
|
|
839
948
|
* @category GraphQL params
|
|
@@ -882,7 +991,7 @@ export interface CmsGroup {
|
|
|
882
991
|
/**
|
|
883
992
|
* CreatedBy reference object.
|
|
884
993
|
*/
|
|
885
|
-
createdBy?:
|
|
994
|
+
createdBy?: CmsIdentity;
|
|
886
995
|
/**
|
|
887
996
|
* Date group was created on.
|
|
888
997
|
*/
|
|
@@ -903,7 +1012,7 @@ export interface CmsGroup {
|
|
|
903
1012
|
isPrivate?: boolean;
|
|
904
1013
|
}
|
|
905
1014
|
/**
|
|
906
|
-
* A data.where parameter received when listing content model groups.
|
|
1015
|
+
* A `data.where` parameter received when listing content model groups.
|
|
907
1016
|
*
|
|
908
1017
|
* @category CmsGroup
|
|
909
1018
|
* @category GraphQL params
|
|
@@ -919,21 +1028,30 @@ export interface CmsGroupListParams {
|
|
|
919
1028
|
* @category CmsGroup
|
|
920
1029
|
* @category Topic
|
|
921
1030
|
*/
|
|
922
|
-
export interface
|
|
1031
|
+
export interface OnGroupBeforeCreateTopicParams {
|
|
923
1032
|
group: CmsGroup;
|
|
924
1033
|
}
|
|
925
1034
|
/**
|
|
926
1035
|
* @category CmsGroup
|
|
927
1036
|
* @category Topic
|
|
928
1037
|
*/
|
|
929
|
-
export interface
|
|
1038
|
+
export interface OnGroupAfterCreateTopicParams {
|
|
930
1039
|
group: CmsGroup;
|
|
931
1040
|
}
|
|
932
1041
|
/**
|
|
933
1042
|
* @category CmsGroup
|
|
934
1043
|
* @category Topic
|
|
935
1044
|
*/
|
|
936
|
-
export interface
|
|
1045
|
+
export interface OnGroupCreateErrorTopicParams {
|
|
1046
|
+
input: CmsGroupCreateInput;
|
|
1047
|
+
group: CmsGroup;
|
|
1048
|
+
error: Error;
|
|
1049
|
+
}
|
|
1050
|
+
/**
|
|
1051
|
+
* @category CmsGroup
|
|
1052
|
+
* @category Topic
|
|
1053
|
+
*/
|
|
1054
|
+
export interface OnGroupBeforeUpdateTopicParams {
|
|
937
1055
|
original: CmsGroup;
|
|
938
1056
|
group: CmsGroup;
|
|
939
1057
|
}
|
|
@@ -941,7 +1059,7 @@ export interface BeforeGroupUpdateTopicParams {
|
|
|
941
1059
|
* @category CmsGroup
|
|
942
1060
|
* @category Topic
|
|
943
1061
|
*/
|
|
944
|
-
export interface
|
|
1062
|
+
export interface OnGroupAfterUpdateTopicParams {
|
|
945
1063
|
original: CmsGroup;
|
|
946
1064
|
group: CmsGroup;
|
|
947
1065
|
}
|
|
@@ -949,16 +1067,34 @@ export interface AfterGroupUpdateTopicParams {
|
|
|
949
1067
|
* @category CmsGroup
|
|
950
1068
|
* @category Topic
|
|
951
1069
|
*/
|
|
952
|
-
export interface
|
|
1070
|
+
export interface OnGroupUpdateErrorTopicParams {
|
|
1071
|
+
input: CmsGroupUpdateInput;
|
|
1072
|
+
original: CmsGroup;
|
|
953
1073
|
group: CmsGroup;
|
|
1074
|
+
error: Error;
|
|
954
1075
|
}
|
|
955
1076
|
/**
|
|
956
1077
|
* @category CmsGroup
|
|
957
1078
|
* @category Topic
|
|
958
1079
|
*/
|
|
959
|
-
export interface
|
|
1080
|
+
export interface OnGroupBeforeDeleteTopicParams {
|
|
960
1081
|
group: CmsGroup;
|
|
961
1082
|
}
|
|
1083
|
+
/**
|
|
1084
|
+
* @category CmsGroup
|
|
1085
|
+
* @category Topic
|
|
1086
|
+
*/
|
|
1087
|
+
export interface OnGroupAfterDeleteTopicParams {
|
|
1088
|
+
group: CmsGroup;
|
|
1089
|
+
}
|
|
1090
|
+
/**
|
|
1091
|
+
* @category CmsGroup
|
|
1092
|
+
* @category Topic
|
|
1093
|
+
*/
|
|
1094
|
+
export interface OnGroupDeleteErrorTopicParams {
|
|
1095
|
+
group: CmsGroup;
|
|
1096
|
+
error: Error;
|
|
1097
|
+
}
|
|
962
1098
|
/**
|
|
963
1099
|
* Cms Group in context.
|
|
964
1100
|
*
|
|
@@ -991,14 +1127,44 @@ export interface CmsGroupContext {
|
|
|
991
1127
|
*/
|
|
992
1128
|
clearGroupsCache: () => void;
|
|
993
1129
|
/**
|
|
994
|
-
*
|
|
1130
|
+
* Lifecycle events - deprecated
|
|
1131
|
+
*/
|
|
1132
|
+
/**
|
|
1133
|
+
* @deprecated
|
|
1134
|
+
*/
|
|
1135
|
+
onBeforeGroupCreate: Topic<OnGroupBeforeCreateTopicParams>;
|
|
1136
|
+
/**
|
|
1137
|
+
* @deprecated
|
|
1138
|
+
*/
|
|
1139
|
+
onAfterGroupCreate: Topic<OnGroupAfterCreateTopicParams>;
|
|
1140
|
+
/**
|
|
1141
|
+
* @deprecated
|
|
1142
|
+
*/
|
|
1143
|
+
onBeforeGroupUpdate: Topic<OnGroupBeforeUpdateTopicParams>;
|
|
1144
|
+
/**
|
|
1145
|
+
* @deprecated
|
|
1146
|
+
*/
|
|
1147
|
+
onAfterGroupUpdate: Topic<OnGroupAfterUpdateTopicParams>;
|
|
1148
|
+
/**
|
|
1149
|
+
* @deprecated
|
|
1150
|
+
*/
|
|
1151
|
+
onBeforeGroupDelete: Topic<OnGroupBeforeDeleteTopicParams>;
|
|
1152
|
+
/**
|
|
1153
|
+
* @deprecated
|
|
995
1154
|
*/
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1155
|
+
onAfterGroupDelete: Topic<OnGroupAfterDeleteTopicParams>;
|
|
1156
|
+
/**
|
|
1157
|
+
* Lifecycle events released in 5.33.0
|
|
1158
|
+
*/
|
|
1159
|
+
onGroupBeforeCreate: Topic<OnGroupBeforeCreateTopicParams>;
|
|
1160
|
+
onGroupAfterCreate: Topic<OnGroupAfterCreateTopicParams>;
|
|
1161
|
+
onGroupCreateError: Topic<OnGroupCreateErrorTopicParams>;
|
|
1162
|
+
onGroupBeforeUpdate: Topic<OnGroupBeforeUpdateTopicParams>;
|
|
1163
|
+
onGroupAfterUpdate: Topic<OnGroupAfterUpdateTopicParams>;
|
|
1164
|
+
onGroupUpdateError: Topic<OnGroupUpdateErrorTopicParams>;
|
|
1165
|
+
onGroupBeforeDelete: Topic<OnGroupBeforeDeleteTopicParams>;
|
|
1166
|
+
onGroupAfterDelete: Topic<OnGroupAfterDeleteTopicParams>;
|
|
1167
|
+
onGroupDeleteError: Topic<OnGroupDeleteErrorTopicParams>;
|
|
1002
1168
|
}
|
|
1003
1169
|
/**
|
|
1004
1170
|
* Definition for content model field validator.
|
|
@@ -1017,7 +1183,7 @@ export interface CmsModelFieldValidation {
|
|
|
1017
1183
|
};
|
|
1018
1184
|
}
|
|
1019
1185
|
/**
|
|
1020
|
-
* A GraphQL params.data parameter received when creating content model.
|
|
1186
|
+
* A GraphQL `params.data` parameter received when creating content model.
|
|
1021
1187
|
*
|
|
1022
1188
|
* @category GraphQL params
|
|
1023
1189
|
* @category CmsModel
|
|
@@ -1027,6 +1193,14 @@ export interface CmsModelCreateInput {
|
|
|
1027
1193
|
* Name of the content model.
|
|
1028
1194
|
*/
|
|
1029
1195
|
name: string;
|
|
1196
|
+
/**
|
|
1197
|
+
* Singular name of the content model to be used in the API.
|
|
1198
|
+
*/
|
|
1199
|
+
singularApiName: string;
|
|
1200
|
+
/**
|
|
1201
|
+
* Plural name of the content model to be used in the API.
|
|
1202
|
+
*/
|
|
1203
|
+
pluralApiName: string;
|
|
1030
1204
|
/**
|
|
1031
1205
|
* Unique ID of the content model. Created from name if not sent by the user. Cannot be changed.
|
|
1032
1206
|
*/
|
|
@@ -1034,7 +1208,7 @@ export interface CmsModelCreateInput {
|
|
|
1034
1208
|
/**
|
|
1035
1209
|
* Description of the content model.
|
|
1036
1210
|
*/
|
|
1037
|
-
description?: string;
|
|
1211
|
+
description?: string | null;
|
|
1038
1212
|
/**
|
|
1039
1213
|
* Group where to put the content model in.
|
|
1040
1214
|
*/
|
|
@@ -1055,13 +1229,18 @@ export interface CmsModelCreateInput {
|
|
|
1055
1229
|
*/
|
|
1056
1230
|
layout?: string[][];
|
|
1057
1231
|
/**
|
|
1058
|
-
*
|
|
1059
|
-
|
|
1232
|
+
* Models can be tagged to give them contextual meaning.
|
|
1233
|
+
*/
|
|
1234
|
+
tags?: string[];
|
|
1235
|
+
/**
|
|
1236
|
+
* Fields fieldId which are picked to represent the CMS entry.
|
|
1060
1237
|
*/
|
|
1061
|
-
titleFieldId?: string;
|
|
1238
|
+
titleFieldId?: string | null;
|
|
1239
|
+
descriptionFieldId?: string | null;
|
|
1240
|
+
imageFieldId?: string | null;
|
|
1062
1241
|
}
|
|
1063
1242
|
/**
|
|
1064
|
-
* A GraphQL params.data parameter received when creating content model from existing model.
|
|
1243
|
+
* A GraphQL `params.data` parameter received when creating content model from existing model.
|
|
1065
1244
|
*
|
|
1066
1245
|
* @category GraphQL params
|
|
1067
1246
|
* @category CmsModel
|
|
@@ -1102,11 +1281,15 @@ export interface CmsModelFieldInput {
|
|
|
1102
1281
|
/**
|
|
1103
1282
|
* Text to display below the field to help user what to write in the field.
|
|
1104
1283
|
*/
|
|
1105
|
-
helpText?: string;
|
|
1284
|
+
helpText?: string | null;
|
|
1106
1285
|
/**
|
|
1107
1286
|
* Text to display in the field.
|
|
1108
1287
|
*/
|
|
1109
|
-
placeholderText?: string;
|
|
1288
|
+
placeholderText?: string | null;
|
|
1289
|
+
/**
|
|
1290
|
+
* Fields can be tagged to give them contextual meaning.
|
|
1291
|
+
*/
|
|
1292
|
+
tags?: string[];
|
|
1110
1293
|
/**
|
|
1111
1294
|
* Are multiple values allowed?
|
|
1112
1295
|
*/
|
|
@@ -1126,14 +1309,14 @@ export interface CmsModelFieldInput {
|
|
|
1126
1309
|
/**
|
|
1127
1310
|
* @see CmsModelField.listValidation
|
|
1128
1311
|
*/
|
|
1129
|
-
listValidation
|
|
1312
|
+
listValidation?: CmsModelFieldValidation[];
|
|
1130
1313
|
/**
|
|
1131
1314
|
* User defined settings.
|
|
1132
1315
|
*/
|
|
1133
1316
|
settings?: Record<string, any>;
|
|
1134
1317
|
}
|
|
1135
1318
|
/**
|
|
1136
|
-
* A GraphQL params.data parameter received when updating content model.
|
|
1319
|
+
* A GraphQL `params.data` parameter received when updating content model.
|
|
1137
1320
|
*
|
|
1138
1321
|
* @category GraphQL params
|
|
1139
1322
|
* @category CmsModel
|
|
@@ -1143,6 +1326,14 @@ export interface CmsModelUpdateInput {
|
|
|
1143
1326
|
* A new content model name.
|
|
1144
1327
|
*/
|
|
1145
1328
|
name?: string;
|
|
1329
|
+
/**
|
|
1330
|
+
* A new singular name of the content model to be used in the API.
|
|
1331
|
+
*/
|
|
1332
|
+
singularApiName?: string;
|
|
1333
|
+
/**
|
|
1334
|
+
* A new plural name of the content model to be used in the API.
|
|
1335
|
+
*/
|
|
1336
|
+
pluralApiName?: string;
|
|
1146
1337
|
/**
|
|
1147
1338
|
* A group we want to move the model to.
|
|
1148
1339
|
*/
|
|
@@ -1150,7 +1341,7 @@ export interface CmsModelUpdateInput {
|
|
|
1150
1341
|
/**
|
|
1151
1342
|
* A new description of the content model.
|
|
1152
1343
|
*/
|
|
1153
|
-
description?: string;
|
|
1344
|
+
description?: string | null;
|
|
1154
1345
|
/**
|
|
1155
1346
|
* A list of content model fields to define the entry values.
|
|
1156
1347
|
*/
|
|
@@ -1167,10 +1358,11 @@ export interface CmsModelUpdateInput {
|
|
|
1167
1358
|
*/
|
|
1168
1359
|
layout: string[][];
|
|
1169
1360
|
/**
|
|
1170
|
-
*
|
|
1171
|
-
* It is picked as first available text field. Or user can select own field.
|
|
1361
|
+
* Fields fieldId which are picked to represent the CMS entry.
|
|
1172
1362
|
*/
|
|
1173
|
-
titleFieldId?: string;
|
|
1363
|
+
titleFieldId?: string | null;
|
|
1364
|
+
descriptionFieldId?: string | null;
|
|
1365
|
+
imageFieldId?: string | null;
|
|
1174
1366
|
}
|
|
1175
1367
|
/**
|
|
1176
1368
|
* A plugin to load a CmsModelManager.
|
|
@@ -1212,10 +1404,10 @@ export interface CmsEntryValues {
|
|
|
1212
1404
|
* @category Database model
|
|
1213
1405
|
* @category CmsEntry
|
|
1214
1406
|
*/
|
|
1215
|
-
export interface CmsEntry {
|
|
1407
|
+
export interface CmsEntry<T = CmsEntryValues> {
|
|
1216
1408
|
/**
|
|
1217
1409
|
* A version of the webiny this entry was created with.
|
|
1218
|
-
* This can be used when upgrading the system so we know which entries to update.
|
|
1410
|
+
* This can be used when upgrading the system, so we know which entries to update.
|
|
1219
1411
|
*/
|
|
1220
1412
|
webinyVersion: string;
|
|
1221
1413
|
/**
|
|
@@ -1234,11 +1426,15 @@ export interface CmsEntry {
|
|
|
1234
1426
|
/**
|
|
1235
1427
|
* CreatedBy object reference.
|
|
1236
1428
|
*/
|
|
1237
|
-
createdBy:
|
|
1429
|
+
createdBy: CmsIdentity;
|
|
1238
1430
|
/**
|
|
1239
1431
|
* OwnedBy object reference. Can be different from CreatedBy.
|
|
1240
1432
|
*/
|
|
1241
|
-
ownedBy:
|
|
1433
|
+
ownedBy: CmsIdentity;
|
|
1434
|
+
/**
|
|
1435
|
+
* ModifiedBy object reference. Last person who modified the entry.
|
|
1436
|
+
*/
|
|
1437
|
+
modifiedBy?: CmsIdentity | null;
|
|
1242
1438
|
/**
|
|
1243
1439
|
* A string of Date.toISOString() type.
|
|
1244
1440
|
* Populated on creation.
|
|
@@ -1281,14 +1477,20 @@ export interface CmsEntry {
|
|
|
1281
1477
|
*
|
|
1282
1478
|
* @see CmsModelField
|
|
1283
1479
|
*/
|
|
1284
|
-
values:
|
|
1480
|
+
values: T;
|
|
1481
|
+
/**
|
|
1482
|
+
* Advanced Content Organization
|
|
1483
|
+
*/
|
|
1484
|
+
location?: {
|
|
1485
|
+
folderId?: string | null;
|
|
1486
|
+
};
|
|
1285
1487
|
/**
|
|
1286
1488
|
* Settings for the given entry.
|
|
1287
1489
|
*
|
|
1288
|
-
* Introduced with Advanced Publishing Workflow
|
|
1289
|
-
* Be aware that when accessing properties in it on old systems
|
|
1490
|
+
* Introduced with Advanced Publishing Workflow. Will always be inserted once this PR is merged.
|
|
1491
|
+
* Be aware that when accessing properties in it on old systems, it will break if not checked first.
|
|
1290
1492
|
*
|
|
1291
|
-
* Available only on the Manage API in entry GraphQL type meta.data property.
|
|
1493
|
+
* Available only on the Manage API in entry GraphQL type `meta.data` property.
|
|
1292
1494
|
*/
|
|
1293
1495
|
meta?: {
|
|
1294
1496
|
[key: string]: any;
|
|
@@ -1297,6 +1499,10 @@ export interface CmsEntry {
|
|
|
1297
1499
|
export interface CmsStorageEntry extends CmsEntry {
|
|
1298
1500
|
[key: string]: any;
|
|
1299
1501
|
}
|
|
1502
|
+
export interface CmsEntryUniqueValue {
|
|
1503
|
+
value: string;
|
|
1504
|
+
count: number;
|
|
1505
|
+
}
|
|
1300
1506
|
/**
|
|
1301
1507
|
* A definition for content model manager to be used in the code.
|
|
1302
1508
|
* The default one uses `CmsEntryContext` methods internally, but devs can change to what every they want.
|
|
@@ -1321,7 +1527,7 @@ export interface CmsModelManager {
|
|
|
1321
1527
|
*/
|
|
1322
1528
|
getPublishedByIds: (ids: string[]) => Promise<CmsEntry[]>;
|
|
1323
1529
|
/**
|
|
1324
|
-
* Get a list of latest entries by the ID list.
|
|
1530
|
+
* Get a list of the latest entries by the ID list.
|
|
1325
1531
|
*/
|
|
1326
1532
|
getLatestByIds: (ids: string[]) => Promise<CmsEntry[]>;
|
|
1327
1533
|
/**
|
|
@@ -1329,52 +1535,95 @@ export interface CmsModelManager {
|
|
|
1329
1535
|
*/
|
|
1330
1536
|
get: (id: string) => Promise<CmsEntry>;
|
|
1331
1537
|
/**
|
|
1332
|
-
* Create
|
|
1538
|
+
* Create an entry.
|
|
1333
1539
|
*/
|
|
1334
1540
|
create: (data: CreateCmsEntryInput) => Promise<CmsEntry>;
|
|
1335
1541
|
/**
|
|
1336
|
-
* Update
|
|
1542
|
+
* Update an entry.
|
|
1337
1543
|
*/
|
|
1338
1544
|
update: (id: string, data: UpdateCmsEntryInput) => Promise<CmsEntry>;
|
|
1339
1545
|
/**
|
|
1340
|
-
* Delete
|
|
1546
|
+
* Delete an entry.
|
|
1341
1547
|
*/
|
|
1342
1548
|
delete: (id: string) => Promise<void>;
|
|
1343
1549
|
}
|
|
1344
|
-
|
|
1550
|
+
/**
|
|
1551
|
+
* Create
|
|
1552
|
+
*/
|
|
1553
|
+
export interface OnModelBeforeCreateTopicParams {
|
|
1345
1554
|
input: CmsModelCreateInput;
|
|
1346
1555
|
model: CmsModel;
|
|
1347
1556
|
}
|
|
1348
|
-
export interface
|
|
1557
|
+
export interface OnModelAfterCreateTopicParams {
|
|
1349
1558
|
input: CmsModelCreateInput;
|
|
1350
1559
|
model: CmsModel;
|
|
1351
1560
|
}
|
|
1352
|
-
export interface
|
|
1561
|
+
export interface OnModelCreateErrorTopicParams {
|
|
1562
|
+
input: CmsModelCreateInput;
|
|
1563
|
+
model: CmsModel;
|
|
1564
|
+
error: Error;
|
|
1565
|
+
}
|
|
1566
|
+
/**
|
|
1567
|
+
* Create From / Clone
|
|
1568
|
+
*/
|
|
1569
|
+
export interface OnModelBeforeCreateFromTopicParams {
|
|
1353
1570
|
input: CmsModelCreateInput;
|
|
1354
1571
|
original: CmsModel;
|
|
1355
1572
|
model: CmsModel;
|
|
1356
1573
|
}
|
|
1357
|
-
export interface
|
|
1574
|
+
export interface OnModelAfterCreateFromTopicParams {
|
|
1358
1575
|
input: CmsModelCreateInput;
|
|
1359
1576
|
original: CmsModel;
|
|
1360
1577
|
model: CmsModel;
|
|
1361
1578
|
}
|
|
1362
|
-
export interface
|
|
1579
|
+
export interface OnModelCreateFromErrorParams {
|
|
1580
|
+
input: CmsModelCreateInput;
|
|
1581
|
+
original: CmsModel;
|
|
1582
|
+
model: CmsModel;
|
|
1583
|
+
error: Error;
|
|
1584
|
+
}
|
|
1585
|
+
/**
|
|
1586
|
+
* Update
|
|
1587
|
+
*/
|
|
1588
|
+
export interface OnModelBeforeUpdateTopicParams {
|
|
1589
|
+
input: CmsModelUpdateInput;
|
|
1590
|
+
original: CmsModel;
|
|
1591
|
+
model: CmsModel;
|
|
1592
|
+
}
|
|
1593
|
+
export interface OnModelAfterUpdateTopicParams {
|
|
1363
1594
|
input: CmsModelUpdateInput;
|
|
1364
1595
|
original: CmsModel;
|
|
1365
1596
|
model: CmsModel;
|
|
1366
1597
|
}
|
|
1367
|
-
export interface
|
|
1598
|
+
export interface OnModelUpdateErrorTopicParams {
|
|
1368
1599
|
input: CmsModelUpdateInput;
|
|
1369
1600
|
original: CmsModel;
|
|
1370
1601
|
model: CmsModel;
|
|
1602
|
+
error: Error;
|
|
1371
1603
|
}
|
|
1372
|
-
|
|
1604
|
+
/**
|
|
1605
|
+
* Delete
|
|
1606
|
+
*/
|
|
1607
|
+
export interface OnModelBeforeDeleteTopicParams {
|
|
1608
|
+
model: CmsModel;
|
|
1609
|
+
}
|
|
1610
|
+
export interface OnModelAfterDeleteTopicParams {
|
|
1373
1611
|
model: CmsModel;
|
|
1374
1612
|
}
|
|
1375
|
-
export interface
|
|
1613
|
+
export interface OnModelDeleteErrorTopicParams {
|
|
1376
1614
|
model: CmsModel;
|
|
1615
|
+
error: Error;
|
|
1377
1616
|
}
|
|
1617
|
+
/**
|
|
1618
|
+
* Initialize
|
|
1619
|
+
*/
|
|
1620
|
+
export interface OnModelInitializeParams {
|
|
1621
|
+
model: CmsModel;
|
|
1622
|
+
data: Record<string, any>;
|
|
1623
|
+
}
|
|
1624
|
+
/**
|
|
1625
|
+
*
|
|
1626
|
+
*/
|
|
1378
1627
|
export interface CmsModelUpdateDirectParams {
|
|
1379
1628
|
model: CmsModel;
|
|
1380
1629
|
original: CmsModel;
|
|
@@ -1416,7 +1665,14 @@ export interface CmsModelContext {
|
|
|
1416
1665
|
*/
|
|
1417
1666
|
deleteModel: (modelId: string) => Promise<void>;
|
|
1418
1667
|
/**
|
|
1419
|
-
*
|
|
1668
|
+
* Possibility for users to trigger the model initialization.
|
|
1669
|
+
* They can hook into it and do what ever they want to.
|
|
1670
|
+
*
|
|
1671
|
+
* Primary idea behind this is creating the index, for the code models, in the ES.
|
|
1672
|
+
*/
|
|
1673
|
+
initializeModel: (modelId: string, data: Record<string, any>) => Promise<boolean>;
|
|
1674
|
+
/**
|
|
1675
|
+
* Get an instance of CmsModelManager for given content modelId.
|
|
1420
1676
|
*
|
|
1421
1677
|
* @see CmsModelManager
|
|
1422
1678
|
*
|
|
@@ -1436,23 +1692,63 @@ export interface CmsModelContext {
|
|
|
1436
1692
|
*/
|
|
1437
1693
|
clearModelsCache: () => void;
|
|
1438
1694
|
/**
|
|
1439
|
-
*
|
|
1695
|
+
* Lifecycle events - deprecated.
|
|
1696
|
+
*/
|
|
1697
|
+
/**
|
|
1698
|
+
* @deprecated
|
|
1440
1699
|
*/
|
|
1441
|
-
onBeforeModelCreate: Topic<
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1700
|
+
onBeforeModelCreate: Topic<OnModelBeforeCreateTopicParams>;
|
|
1701
|
+
/**
|
|
1702
|
+
* @deprecated
|
|
1703
|
+
*/
|
|
1704
|
+
onAfterModelCreate: Topic<OnModelAfterCreateTopicParams>;
|
|
1705
|
+
/**
|
|
1706
|
+
* @deprecated
|
|
1707
|
+
*/
|
|
1708
|
+
onBeforeModelCreateFrom: Topic<OnModelBeforeCreateFromTopicParams>;
|
|
1709
|
+
/**
|
|
1710
|
+
* @deprecated
|
|
1711
|
+
*/
|
|
1712
|
+
onAfterModelCreateFrom: Topic<OnModelAfterCreateFromTopicParams>;
|
|
1713
|
+
/**
|
|
1714
|
+
* @deprecated
|
|
1715
|
+
*/
|
|
1716
|
+
onBeforeModelUpdate: Topic<OnModelBeforeUpdateTopicParams>;
|
|
1717
|
+
/**
|
|
1718
|
+
* @deprecated
|
|
1719
|
+
*/
|
|
1720
|
+
onAfterModelUpdate: Topic<OnModelAfterUpdateTopicParams>;
|
|
1721
|
+
/**
|
|
1722
|
+
* @deprecated
|
|
1723
|
+
*/
|
|
1724
|
+
onBeforeModelDelete: Topic<OnModelBeforeDeleteTopicParams>;
|
|
1725
|
+
/**
|
|
1726
|
+
* @deprecated
|
|
1727
|
+
*/
|
|
1728
|
+
onAfterModelDelete: Topic<OnModelAfterDeleteTopicParams>;
|
|
1729
|
+
/**
|
|
1730
|
+
* Lifecycle events - released in 5.33.0
|
|
1731
|
+
*/
|
|
1732
|
+
onModelBeforeCreate: Topic<OnModelBeforeCreateTopicParams>;
|
|
1733
|
+
onModelAfterCreate: Topic<OnModelAfterCreateTopicParams>;
|
|
1734
|
+
onModelCreateError: Topic<OnModelCreateErrorTopicParams>;
|
|
1735
|
+
onModelBeforeCreateFrom: Topic<OnModelBeforeCreateFromTopicParams>;
|
|
1736
|
+
onModelAfterCreateFrom: Topic<OnModelAfterCreateFromTopicParams>;
|
|
1737
|
+
onModelCreateFromError: Topic<OnModelCreateFromErrorParams>;
|
|
1738
|
+
onModelBeforeUpdate: Topic<OnModelBeforeUpdateTopicParams>;
|
|
1739
|
+
onModelAfterUpdate: Topic<OnModelAfterUpdateTopicParams>;
|
|
1740
|
+
onModelUpdateError: Topic<OnModelUpdateErrorTopicParams>;
|
|
1741
|
+
onModelBeforeDelete: Topic<OnModelBeforeDeleteTopicParams>;
|
|
1742
|
+
onModelAfterDelete: Topic<OnModelAfterDeleteTopicParams>;
|
|
1743
|
+
onModelDeleteError: Topic<OnModelDeleteErrorTopicParams>;
|
|
1744
|
+
onModelInitialize: Topic<OnModelInitializeParams>;
|
|
1449
1745
|
}
|
|
1450
1746
|
/**
|
|
1451
1747
|
* Available statuses for content entry.
|
|
1452
1748
|
*
|
|
1453
1749
|
* @category CmsEntry
|
|
1454
1750
|
*/
|
|
1455
|
-
export declare type CmsEntryStatus = "published" | "unpublished" | "
|
|
1751
|
+
export declare type CmsEntryStatus = "published" | "unpublished" | "draft";
|
|
1456
1752
|
export interface CmsEntryListWhereRef {
|
|
1457
1753
|
id?: string;
|
|
1458
1754
|
id_in?: string[];
|
|
@@ -1530,7 +1826,12 @@ export interface CmsEntryListWhere {
|
|
|
1530
1826
|
/**
|
|
1531
1827
|
* This is to allow querying by any content model field defined by the user.
|
|
1532
1828
|
*/
|
|
1533
|
-
[key: string]:
|
|
1829
|
+
[key: string]: string | number | boolean | undefined | string[] | number[] | null | CmsEntryListWhere[] | CmsEntryListWhere | CmsEntryListWhereRef;
|
|
1830
|
+
/**
|
|
1831
|
+
* To allow querying via nested queries, we added the AND / OR properties.
|
|
1832
|
+
*/
|
|
1833
|
+
AND?: CmsEntryListWhere[];
|
|
1834
|
+
OR?: CmsEntryListWhere[];
|
|
1534
1835
|
}
|
|
1535
1836
|
/**
|
|
1536
1837
|
* Entry listing sort.
|
|
@@ -1583,108 +1884,181 @@ export interface CmsEntryMeta {
|
|
|
1583
1884
|
*/
|
|
1584
1885
|
totalCount: number;
|
|
1585
1886
|
}
|
|
1586
|
-
|
|
1887
|
+
/**
|
|
1888
|
+
* Create
|
|
1889
|
+
*/
|
|
1890
|
+
export interface OnEntryBeforeCreateTopicParams {
|
|
1587
1891
|
input: CreateCmsEntryInput;
|
|
1588
1892
|
entry: CmsEntry;
|
|
1589
|
-
model:
|
|
1893
|
+
model: CmsModel;
|
|
1590
1894
|
}
|
|
1591
|
-
export interface
|
|
1895
|
+
export interface OnEntryAfterCreateTopicParams {
|
|
1592
1896
|
input: CreateCmsEntryInput;
|
|
1593
1897
|
entry: CmsEntry;
|
|
1594
|
-
model:
|
|
1898
|
+
model: CmsModel;
|
|
1595
1899
|
storageEntry: CmsEntry;
|
|
1596
1900
|
}
|
|
1597
|
-
export interface
|
|
1901
|
+
export interface OnEntryCreateErrorTopicParams {
|
|
1902
|
+
error: Error;
|
|
1903
|
+
input: CreateCmsEntryInput;
|
|
1904
|
+
entry: CmsEntry;
|
|
1905
|
+
model: CmsModel;
|
|
1906
|
+
}
|
|
1907
|
+
/**
|
|
1908
|
+
* Revision Create
|
|
1909
|
+
*/
|
|
1910
|
+
export interface OnEntryRevisionBeforeCreateTopicParams {
|
|
1598
1911
|
input: CreateFromCmsEntryInput;
|
|
1599
1912
|
entry: CmsEntry;
|
|
1600
1913
|
original: CmsEntry;
|
|
1601
|
-
model:
|
|
1914
|
+
model: CmsModel;
|
|
1602
1915
|
}
|
|
1603
|
-
export interface
|
|
1916
|
+
export interface OnEntryRevisionAfterCreateTopicParams {
|
|
1604
1917
|
input: CreateFromCmsEntryInput;
|
|
1605
1918
|
entry: CmsEntry;
|
|
1606
1919
|
original: CmsEntry;
|
|
1607
|
-
model:
|
|
1920
|
+
model: CmsModel;
|
|
1608
1921
|
storageEntry: CmsEntry;
|
|
1609
1922
|
}
|
|
1610
|
-
export interface
|
|
1923
|
+
export interface OnEntryCreateRevisionErrorTopicParams {
|
|
1924
|
+
error: Error;
|
|
1925
|
+
input: CreateFromCmsEntryInput;
|
|
1926
|
+
original: CmsEntry;
|
|
1927
|
+
entry: CmsEntry;
|
|
1928
|
+
model: CmsModel;
|
|
1929
|
+
}
|
|
1930
|
+
/**
|
|
1931
|
+
* Update
|
|
1932
|
+
*/
|
|
1933
|
+
export interface OnEntryBeforeUpdateTopicParams {
|
|
1611
1934
|
input: UpdateCmsEntryInput;
|
|
1612
1935
|
original: CmsEntry;
|
|
1613
1936
|
entry: CmsEntry;
|
|
1614
|
-
model:
|
|
1937
|
+
model: CmsModel;
|
|
1615
1938
|
}
|
|
1616
|
-
export interface
|
|
1939
|
+
export interface OnEntryAfterUpdateTopicParams {
|
|
1617
1940
|
input: UpdateCmsEntryInput;
|
|
1618
1941
|
original: CmsEntry;
|
|
1619
1942
|
entry: CmsEntry;
|
|
1620
|
-
model:
|
|
1943
|
+
model: CmsModel;
|
|
1621
1944
|
storageEntry: CmsEntry;
|
|
1622
1945
|
}
|
|
1623
|
-
export interface
|
|
1946
|
+
export interface OnEntryUpdateErrorTopicParams {
|
|
1947
|
+
error: Error;
|
|
1948
|
+
input: UpdateCmsEntryInput;
|
|
1624
1949
|
entry: CmsEntry;
|
|
1625
|
-
model:
|
|
1950
|
+
model: CmsModel;
|
|
1626
1951
|
}
|
|
1627
|
-
|
|
1952
|
+
/**
|
|
1953
|
+
* Publish
|
|
1954
|
+
*/
|
|
1955
|
+
export interface OnEntryBeforePublishTopicParams {
|
|
1628
1956
|
entry: CmsEntry;
|
|
1629
|
-
model:
|
|
1957
|
+
model: CmsModel;
|
|
1958
|
+
}
|
|
1959
|
+
export interface OnEntryAfterPublishTopicParams {
|
|
1960
|
+
entry: CmsEntry;
|
|
1961
|
+
model: CmsModel;
|
|
1630
1962
|
storageEntry: CmsEntry;
|
|
1631
1963
|
}
|
|
1632
|
-
export interface
|
|
1964
|
+
export interface OnEntryPublishErrorTopicParams {
|
|
1965
|
+
error: Error;
|
|
1633
1966
|
entry: CmsEntry;
|
|
1634
|
-
model:
|
|
1967
|
+
model: CmsModel;
|
|
1635
1968
|
}
|
|
1636
|
-
|
|
1969
|
+
/**
|
|
1970
|
+
* Republish
|
|
1971
|
+
*/
|
|
1972
|
+
export interface OnEntryBeforeRepublishTopicParams {
|
|
1637
1973
|
entry: CmsEntry;
|
|
1638
|
-
model:
|
|
1974
|
+
model: CmsModel;
|
|
1975
|
+
}
|
|
1976
|
+
export interface OnEntryAfterRepublishTopicParams {
|
|
1977
|
+
entry: CmsEntry;
|
|
1978
|
+
model: CmsModel;
|
|
1639
1979
|
storageEntry: CmsEntry;
|
|
1640
1980
|
}
|
|
1641
|
-
export interface
|
|
1981
|
+
export interface OnEntryRepublishErrorTopicParams {
|
|
1982
|
+
error: Error;
|
|
1642
1983
|
entry: CmsEntry;
|
|
1643
|
-
model:
|
|
1984
|
+
model: CmsModel;
|
|
1985
|
+
}
|
|
1986
|
+
/**
|
|
1987
|
+
* Unpublish
|
|
1988
|
+
*/
|
|
1989
|
+
export interface OnEntryBeforeUnpublishTopicParams {
|
|
1990
|
+
entry: CmsEntry;
|
|
1991
|
+
model: CmsModel;
|
|
1644
1992
|
}
|
|
1645
|
-
export interface
|
|
1993
|
+
export interface OnEntryAfterUnpublishTopicParams {
|
|
1646
1994
|
entry: CmsEntry;
|
|
1647
|
-
model:
|
|
1995
|
+
model: CmsModel;
|
|
1648
1996
|
storageEntry: CmsEntry;
|
|
1649
1997
|
}
|
|
1650
|
-
export interface
|
|
1998
|
+
export interface OnEntryUnpublishErrorTopicParams {
|
|
1999
|
+
error: Error;
|
|
1651
2000
|
entry: CmsEntry;
|
|
1652
|
-
model:
|
|
2001
|
+
model: CmsModel;
|
|
1653
2002
|
}
|
|
1654
|
-
export interface
|
|
2003
|
+
export interface OnEntryBeforeDeleteTopicParams {
|
|
1655
2004
|
entry: CmsEntry;
|
|
1656
|
-
model:
|
|
1657
|
-
storageEntry: CmsEntry;
|
|
2005
|
+
model: CmsModel;
|
|
1658
2006
|
}
|
|
1659
|
-
export interface
|
|
2007
|
+
export interface OnEntryAfterDeleteTopicParams {
|
|
1660
2008
|
entry: CmsEntry;
|
|
1661
|
-
model:
|
|
2009
|
+
model: CmsModel;
|
|
2010
|
+
}
|
|
2011
|
+
export interface OnEntryDeleteErrorTopicParams {
|
|
2012
|
+
error: Error;
|
|
2013
|
+
entry: CmsEntry;
|
|
2014
|
+
model: CmsModel;
|
|
1662
2015
|
}
|
|
1663
|
-
export interface
|
|
2016
|
+
export interface OnEntryRevisionBeforeDeleteTopicParams {
|
|
1664
2017
|
entry: CmsEntry;
|
|
1665
|
-
model:
|
|
2018
|
+
model: CmsModel;
|
|
1666
2019
|
}
|
|
1667
|
-
export interface
|
|
2020
|
+
export interface OnEntryRevisionAfterDeleteTopicParams {
|
|
1668
2021
|
entry: CmsEntry;
|
|
1669
|
-
model:
|
|
2022
|
+
model: CmsModel;
|
|
1670
2023
|
}
|
|
1671
|
-
export interface
|
|
2024
|
+
export interface OnEntryRevisionDeleteErrorTopicParams {
|
|
2025
|
+
error: Error;
|
|
1672
2026
|
entry: CmsEntry;
|
|
1673
|
-
model:
|
|
2027
|
+
model: CmsModel;
|
|
2028
|
+
}
|
|
2029
|
+
export interface OnEntryBeforeDeleteMultipleTopicParams {
|
|
2030
|
+
model: CmsModel;
|
|
2031
|
+
entries: CmsEntry[];
|
|
2032
|
+
ids: string[];
|
|
2033
|
+
}
|
|
2034
|
+
export interface OnEntryAfterDeleteMultipleTopicParams {
|
|
2035
|
+
model: CmsModel;
|
|
2036
|
+
entries: CmsEntry[];
|
|
2037
|
+
ids: string[];
|
|
1674
2038
|
}
|
|
1675
|
-
export interface
|
|
1676
|
-
model:
|
|
2039
|
+
export interface OnEntryDeleteMultipleErrorTopicParams {
|
|
2040
|
+
model: CmsModel;
|
|
2041
|
+
entries: CmsEntry[];
|
|
2042
|
+
ids: string[];
|
|
2043
|
+
error: Error;
|
|
2044
|
+
}
|
|
2045
|
+
export interface OnEntryBeforeGetTopicParams {
|
|
2046
|
+
model: CmsModel;
|
|
1677
2047
|
where: CmsEntryListWhere;
|
|
1678
2048
|
}
|
|
1679
|
-
export interface
|
|
2049
|
+
export interface EntryBeforeListTopicParams {
|
|
1680
2050
|
where: CmsEntryListWhere;
|
|
1681
|
-
model:
|
|
2051
|
+
model: CmsModel;
|
|
1682
2052
|
}
|
|
1683
2053
|
/**
|
|
1684
2054
|
* @category Context
|
|
1685
2055
|
* @category CmsEntry
|
|
1686
2056
|
*/
|
|
1687
2057
|
export interface CreateCmsEntryInput {
|
|
2058
|
+
id?: string;
|
|
2059
|
+
wbyAco_location?: {
|
|
2060
|
+
folderId?: string | null;
|
|
2061
|
+
};
|
|
1688
2062
|
[key: string]: any;
|
|
1689
2063
|
}
|
|
1690
2064
|
/**
|
|
@@ -1699,8 +2073,39 @@ export interface CreateFromCmsEntryInput {
|
|
|
1699
2073
|
* @category CmsEntry
|
|
1700
2074
|
*/
|
|
1701
2075
|
export interface UpdateCmsEntryInput {
|
|
2076
|
+
wbyAco_location?: {
|
|
2077
|
+
folderId?: string | null;
|
|
2078
|
+
};
|
|
1702
2079
|
[key: string]: any;
|
|
1703
2080
|
}
|
|
2081
|
+
/**
|
|
2082
|
+
* @category Context
|
|
2083
|
+
* @category CmsEntry
|
|
2084
|
+
*/
|
|
2085
|
+
export interface GetUniqueFieldValuesParams {
|
|
2086
|
+
where: CmsEntryListWhere;
|
|
2087
|
+
fieldId: string;
|
|
2088
|
+
}
|
|
2089
|
+
/**
|
|
2090
|
+
* @category CmsEntry
|
|
2091
|
+
*/
|
|
2092
|
+
export interface CmsDeleteEntryOptions {
|
|
2093
|
+
/**
|
|
2094
|
+
* Runs the delete commands even if the entry is not found in the DynamoDB.
|
|
2095
|
+
* This is to force clean the entry records that might have been left behind a failed delete.
|
|
2096
|
+
*/
|
|
2097
|
+
force?: boolean;
|
|
2098
|
+
}
|
|
2099
|
+
/**
|
|
2100
|
+
* @category Context
|
|
2101
|
+
* @category CmsEntry
|
|
2102
|
+
*/
|
|
2103
|
+
export interface DeleteMultipleEntriesParams {
|
|
2104
|
+
entries: string[];
|
|
2105
|
+
}
|
|
2106
|
+
export declare type DeleteMultipleEntriesResponse = {
|
|
2107
|
+
id: string;
|
|
2108
|
+
}[];
|
|
1704
2109
|
/**
|
|
1705
2110
|
* Cms Entry CRUD methods in the context.
|
|
1706
2111
|
*
|
|
@@ -1711,7 +2116,7 @@ export interface CmsEntryContext {
|
|
|
1711
2116
|
/**
|
|
1712
2117
|
* Get a single content entry for a model.
|
|
1713
2118
|
*/
|
|
1714
|
-
getEntry: (model: CmsModel, params: CmsEntryGetParams) => Promise<CmsEntry
|
|
2119
|
+
getEntry: (model: CmsModel, params: CmsEntryGetParams) => Promise<CmsEntry>;
|
|
1715
2120
|
/**
|
|
1716
2121
|
* Get a list of entries for a model by a given ID (revision).
|
|
1717
2122
|
*/
|
|
@@ -1723,15 +2128,15 @@ export interface CmsEntryContext {
|
|
|
1723
2128
|
/**
|
|
1724
2129
|
* List entries for a model. Internal method used by get, listLatest and listPublished.
|
|
1725
2130
|
*/
|
|
1726
|
-
listEntries: (model: CmsModel, params: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
2131
|
+
listEntries: <T = CmsEntryValues>(model: CmsModel, params: CmsEntryListParams) => Promise<[CmsEntry<T>[], CmsEntryMeta]>;
|
|
1727
2132
|
/**
|
|
1728
|
-
* Lists latest entries. Used for manage API.
|
|
2133
|
+
* Lists the latest entries. Used for manage API.
|
|
1729
2134
|
*/
|
|
1730
|
-
listLatestEntries: (model: CmsModel, params?: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
2135
|
+
listLatestEntries: <T = CmsEntryValues>(model: CmsModel, params?: CmsEntryListParams) => Promise<[CmsEntry<T>[], CmsEntryMeta]>;
|
|
1731
2136
|
/**
|
|
1732
2137
|
* List published entries. Used for read API.
|
|
1733
2138
|
*/
|
|
1734
|
-
listPublishedEntries: (model: CmsModel, params?: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
2139
|
+
listPublishedEntries: <T = CmsEntryValues>(model: CmsModel, params?: CmsEntryListParams) => Promise<[CmsEntry<T>[], CmsEntryMeta]>;
|
|
1735
2140
|
/**
|
|
1736
2141
|
* List published entries by IDs.
|
|
1737
2142
|
*/
|
|
@@ -1764,7 +2169,11 @@ export interface CmsEntryContext {
|
|
|
1764
2169
|
/**
|
|
1765
2170
|
* Delete entry with all its revisions.
|
|
1766
2171
|
*/
|
|
1767
|
-
deleteEntry: (model: CmsModel, id: string) => Promise<void>;
|
|
2172
|
+
deleteEntry: (model: CmsModel, id: string, options?: CmsDeleteEntryOptions) => Promise<void>;
|
|
2173
|
+
/**
|
|
2174
|
+
* Delete multiple entries
|
|
2175
|
+
*/
|
|
2176
|
+
deleteMultipleEntries: (model: CmsModel, params: DeleteMultipleEntriesParams) => Promise<DeleteMultipleEntriesResponse>;
|
|
1768
2177
|
/**
|
|
1769
2178
|
* Publish entry.
|
|
1770
2179
|
*/
|
|
@@ -1774,40 +2183,111 @@ export interface CmsEntryContext {
|
|
|
1774
2183
|
*/
|
|
1775
2184
|
unpublishEntry: (model: CmsModel, id: string) => Promise<CmsEntry>;
|
|
1776
2185
|
/**
|
|
1777
|
-
*
|
|
2186
|
+
* Get all entry revisions.
|
|
2187
|
+
*/
|
|
2188
|
+
getEntryRevisions: (model: CmsModel, id: string) => Promise<CmsEntry[]>;
|
|
2189
|
+
/**
|
|
2190
|
+
* List all unique values for a given field.
|
|
2191
|
+
*
|
|
2192
|
+
* @internal
|
|
1778
2193
|
*/
|
|
1779
|
-
|
|
2194
|
+
getUniqueFieldValues: (model: CmsModel, params: GetUniqueFieldValuesParams) => Promise<CmsEntryUniqueValue[]>;
|
|
1780
2195
|
/**
|
|
1781
|
-
*
|
|
2196
|
+
* Lifecycle events - deprecated.
|
|
1782
2197
|
*/
|
|
1783
|
-
requestEntryChanges: (model: CmsModel, id: string) => Promise<CmsEntry>;
|
|
1784
2198
|
/**
|
|
1785
|
-
*
|
|
2199
|
+
* @deprecated
|
|
1786
2200
|
*/
|
|
1787
|
-
|
|
2201
|
+
onBeforeEntryCreate: Topic<OnEntryBeforeCreateTopicParams>;
|
|
2202
|
+
/**
|
|
2203
|
+
* @deprecated
|
|
2204
|
+
*/
|
|
2205
|
+
onAfterEntryCreate: Topic<OnEntryAfterCreateTopicParams>;
|
|
2206
|
+
/**
|
|
2207
|
+
* @deprecated
|
|
2208
|
+
*/
|
|
2209
|
+
onBeforeEntryCreateRevision: Topic<OnEntryRevisionBeforeCreateTopicParams>;
|
|
2210
|
+
/**
|
|
2211
|
+
* @deprecated
|
|
2212
|
+
*/
|
|
2213
|
+
onAfterEntryCreateRevision: Topic<OnEntryRevisionAfterCreateTopicParams>;
|
|
2214
|
+
/**
|
|
2215
|
+
* @deprecated
|
|
2216
|
+
*/
|
|
2217
|
+
onBeforeEntryUpdate: Topic<OnEntryBeforeUpdateTopicParams>;
|
|
2218
|
+
/**
|
|
2219
|
+
* @deprecated
|
|
2220
|
+
*/
|
|
2221
|
+
onAfterEntryUpdate: Topic<OnEntryAfterUpdateTopicParams>;
|
|
2222
|
+
/**
|
|
2223
|
+
* @deprecated
|
|
2224
|
+
*/
|
|
2225
|
+
onBeforeEntryDelete: Topic<OnEntryBeforeDeleteTopicParams>;
|
|
2226
|
+
/**
|
|
2227
|
+
* @deprecated
|
|
2228
|
+
*/
|
|
2229
|
+
onAfterEntryDelete: Topic<OnEntryAfterDeleteTopicParams>;
|
|
2230
|
+
/**
|
|
2231
|
+
* @deprecated
|
|
2232
|
+
*/
|
|
2233
|
+
onBeforeEntryDeleteRevision: Topic<OnEntryRevisionBeforeDeleteTopicParams>;
|
|
1788
2234
|
/**
|
|
1789
|
-
*
|
|
1790
|
-
*/
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
onBeforeEntryUnpublish: Topic<
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
2235
|
+
* @deprecated
|
|
2236
|
+
*/
|
|
2237
|
+
onAfterEntryDeleteRevision: Topic<OnEntryRevisionAfterDeleteTopicParams>;
|
|
2238
|
+
/**
|
|
2239
|
+
* @deprecated
|
|
2240
|
+
*/
|
|
2241
|
+
onBeforeEntryPublish: Topic<OnEntryBeforePublishTopicParams>;
|
|
2242
|
+
/**
|
|
2243
|
+
* @deprecated
|
|
2244
|
+
*/
|
|
2245
|
+
onAfterEntryPublish: Topic<OnEntryAfterPublishTopicParams>;
|
|
2246
|
+
/**
|
|
2247
|
+
* @deprecated
|
|
2248
|
+
*/
|
|
2249
|
+
onBeforeEntryUnpublish: Topic<OnEntryBeforeUnpublishTopicParams>;
|
|
2250
|
+
/**
|
|
2251
|
+
* @deprecated
|
|
2252
|
+
*/
|
|
2253
|
+
onAfterEntryUnpublish: Topic<OnEntryAfterUnpublishTopicParams>;
|
|
2254
|
+
/**
|
|
2255
|
+
* @deprecated
|
|
2256
|
+
*/
|
|
2257
|
+
onBeforeEntryGet: Topic<OnEntryBeforeGetTopicParams>;
|
|
2258
|
+
/**
|
|
2259
|
+
* @deprecated
|
|
2260
|
+
*/
|
|
2261
|
+
onBeforeEntryList: Topic<EntryBeforeListTopicParams>;
|
|
2262
|
+
/**
|
|
2263
|
+
* Lifecycle events released in 5.33.0
|
|
2264
|
+
*/
|
|
2265
|
+
onEntryBeforeCreate: Topic<OnEntryBeforeCreateTopicParams>;
|
|
2266
|
+
onEntryAfterCreate: Topic<OnEntryAfterCreateTopicParams>;
|
|
2267
|
+
onEntryCreateError: Topic<OnEntryCreateErrorTopicParams>;
|
|
2268
|
+
onEntryRevisionBeforeCreate: Topic<OnEntryRevisionBeforeCreateTopicParams>;
|
|
2269
|
+
onEntryRevisionAfterCreate: Topic<OnEntryRevisionAfterCreateTopicParams>;
|
|
2270
|
+
onEntryRevisionCreateError: Topic<OnEntryCreateRevisionErrorTopicParams>;
|
|
2271
|
+
onEntryBeforeUpdate: Topic<OnEntryBeforeUpdateTopicParams>;
|
|
2272
|
+
onEntryAfterUpdate: Topic<OnEntryAfterUpdateTopicParams>;
|
|
2273
|
+
onEntryUpdateError: Topic<OnEntryUpdateErrorTopicParams>;
|
|
2274
|
+
onEntryBeforeDelete: Topic<OnEntryBeforeDeleteTopicParams>;
|
|
2275
|
+
onEntryAfterDelete: Topic<OnEntryAfterDeleteTopicParams>;
|
|
2276
|
+
onEntryDeleteError: Topic<OnEntryDeleteErrorTopicParams>;
|
|
2277
|
+
onEntryRevisionBeforeDelete: Topic<OnEntryRevisionBeforeDeleteTopicParams>;
|
|
2278
|
+
onEntryRevisionAfterDelete: Topic<OnEntryRevisionAfterDeleteTopicParams>;
|
|
2279
|
+
onEntryRevisionDeleteError: Topic<OnEntryRevisionDeleteErrorTopicParams>;
|
|
2280
|
+
onEntryBeforePublish: Topic<OnEntryBeforePublishTopicParams>;
|
|
2281
|
+
onEntryAfterPublish: Topic<OnEntryAfterPublishTopicParams>;
|
|
2282
|
+
onEntryPublishError: Topic<OnEntryPublishErrorTopicParams>;
|
|
2283
|
+
onEntryBeforeRepublish: Topic<OnEntryBeforeRepublishTopicParams>;
|
|
2284
|
+
onEntryAfterRepublish: Topic<OnEntryAfterRepublishTopicParams>;
|
|
2285
|
+
onEntryRepublishError: Topic<OnEntryRepublishErrorTopicParams>;
|
|
2286
|
+
onEntryBeforeUnpublish: Topic<OnEntryBeforeUnpublishTopicParams>;
|
|
2287
|
+
onEntryAfterUnpublish: Topic<OnEntryAfterUnpublishTopicParams>;
|
|
2288
|
+
onEntryUnpublishError: Topic<OnEntryUnpublishErrorTopicParams>;
|
|
2289
|
+
onEntryBeforeGet: Topic<OnEntryBeforeGetTopicParams>;
|
|
2290
|
+
onEntryBeforeList: Topic<EntryBeforeListTopicParams>;
|
|
1811
2291
|
}
|
|
1812
2292
|
/**
|
|
1813
2293
|
* Parameters for CmsEntryResolverFactory.
|
|
@@ -1851,13 +2331,13 @@ export interface BaseCmsSecurityPermission extends SecurityPermission {
|
|
|
1851
2331
|
*/
|
|
1852
2332
|
export interface CmsModelPermission extends BaseCmsSecurityPermission {
|
|
1853
2333
|
/**
|
|
1854
|
-
*
|
|
2334
|
+
* An object representing `key: model.modelId` values where key is locale code.
|
|
1855
2335
|
*/
|
|
1856
2336
|
models?: {
|
|
1857
2337
|
[key: string]: string[];
|
|
1858
2338
|
};
|
|
1859
2339
|
/**
|
|
1860
|
-
*
|
|
2340
|
+
* {locale: groupId[]} map, where key is a locale code.
|
|
1861
2341
|
*/
|
|
1862
2342
|
groups?: {
|
|
1863
2343
|
[key: string]: string[];
|
|
@@ -1871,7 +2351,7 @@ export interface CmsModelPermission extends BaseCmsSecurityPermission {
|
|
|
1871
2351
|
*/
|
|
1872
2352
|
export interface CmsGroupPermission extends BaseCmsSecurityPermission {
|
|
1873
2353
|
/**
|
|
1874
|
-
*
|
|
2354
|
+
* {locale: groupId[]} map, where key is a locale code.
|
|
1875
2355
|
*/
|
|
1876
2356
|
groups?: {
|
|
1877
2357
|
[key: string]: string[];
|
|
@@ -1886,13 +2366,13 @@ export interface CmsGroupPermission extends BaseCmsSecurityPermission {
|
|
|
1886
2366
|
export interface CmsEntryPermission extends BaseCmsSecurityPermission {
|
|
1887
2367
|
pw?: string;
|
|
1888
2368
|
/**
|
|
1889
|
-
*
|
|
2369
|
+
* An object representing `key: model.modelId` values where key is locale code.
|
|
1890
2370
|
*/
|
|
1891
2371
|
models?: {
|
|
1892
2372
|
[key: string]: string[];
|
|
1893
2373
|
};
|
|
1894
2374
|
/**
|
|
1895
|
-
*
|
|
2375
|
+
* {locale: groupId[]} map, where key is a locale code.
|
|
1896
2376
|
*/
|
|
1897
2377
|
groups?: {
|
|
1898
2378
|
[key: string]: string[];
|
|
@@ -2007,7 +2487,7 @@ export interface CmsEntryStorageOperationsListParams {
|
|
|
2007
2487
|
sort?: CmsEntryListSort;
|
|
2008
2488
|
search?: string;
|
|
2009
2489
|
fields?: string[];
|
|
2010
|
-
limit
|
|
2490
|
+
limit: number;
|
|
2011
2491
|
after?: string | null;
|
|
2012
2492
|
}
|
|
2013
2493
|
export interface CmsEntryStorageOperationsCreateParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
@@ -2059,11 +2539,11 @@ export interface CmsEntryStorageOperationsDeleteRevisionParams<T extends CmsStor
|
|
|
2059
2539
|
latestStorageEntry: T | null;
|
|
2060
2540
|
}
|
|
2061
2541
|
export interface CmsEntryStorageOperationsDeleteParams {
|
|
2062
|
-
/**
|
|
2063
|
-
* Entry that is going to be deleted.
|
|
2064
|
-
*/
|
|
2065
2542
|
entry: CmsEntry;
|
|
2066
2543
|
}
|
|
2544
|
+
export interface CmsEntryStorageOperationsDeleteEntriesParams {
|
|
2545
|
+
entries: string[];
|
|
2546
|
+
}
|
|
2067
2547
|
export interface CmsEntryStorageOperationsPublishParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
2068
2548
|
/**
|
|
2069
2549
|
* The modified entry that is going to be saved as published.
|
|
@@ -2085,25 +2565,9 @@ export interface CmsEntryStorageOperationsUnpublishParams<T extends CmsStorageEn
|
|
|
2085
2565
|
*/
|
|
2086
2566
|
storageEntry: T;
|
|
2087
2567
|
}
|
|
2088
|
-
export interface
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
*/
|
|
2092
|
-
entry: CmsEntry;
|
|
2093
|
-
/**
|
|
2094
|
-
* Entry that is prepared for the storageOperations, with the transformations.
|
|
2095
|
-
*/
|
|
2096
|
-
storageEntry: T;
|
|
2097
|
-
}
|
|
2098
|
-
export interface CmsEntryStorageOperationsRequestReviewParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
2099
|
-
/**
|
|
2100
|
-
* Entry that is prepared for the storageOperations.
|
|
2101
|
-
*/
|
|
2102
|
-
entry: CmsEntry;
|
|
2103
|
-
/**
|
|
2104
|
-
* Entry that is prepared for the storageOperations, with the transformations.
|
|
2105
|
-
*/
|
|
2106
|
-
storageEntry: T;
|
|
2568
|
+
export interface CmsEntryStorageOperationsGetUniqueFieldValuesParams {
|
|
2569
|
+
where: CmsEntryListWhere;
|
|
2570
|
+
fieldId: string;
|
|
2107
2571
|
}
|
|
2108
2572
|
export interface CmsEntryStorageOperationsGetByIdsParams {
|
|
2109
2573
|
ids: readonly string[];
|
|
@@ -2161,86 +2625,86 @@ export interface CmsEntryStorageOperations<T extends CmsStorageEntry = CmsStorag
|
|
|
2161
2625
|
/**
|
|
2162
2626
|
* Get all the entries of the ids.
|
|
2163
2627
|
*/
|
|
2164
|
-
getByIds: (model:
|
|
2628
|
+
getByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetByIdsParams) => Promise<T[]>;
|
|
2165
2629
|
/**
|
|
2166
2630
|
* Get all the published entries of the ids.
|
|
2167
2631
|
*/
|
|
2168
|
-
getPublishedByIds: (model:
|
|
2632
|
+
getPublishedByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetPublishedByIdsParams) => Promise<T[]>;
|
|
2169
2633
|
/**
|
|
2170
2634
|
* Get all the latest entries of the ids.
|
|
2171
2635
|
*/
|
|
2172
|
-
getLatestByIds: (model:
|
|
2636
|
+
getLatestByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetLatestByIdsParams) => Promise<T[]>;
|
|
2173
2637
|
/**
|
|
2174
2638
|
* Get all revisions of the given entry id.
|
|
2175
2639
|
*/
|
|
2176
|
-
getRevisions: (model:
|
|
2640
|
+
getRevisions: (model: CmsModel, params: CmsEntryStorageOperationsGetRevisionsParams) => Promise<T[]>;
|
|
2177
2641
|
/**
|
|
2178
2642
|
* Get the entry by the given revision id.
|
|
2179
2643
|
*/
|
|
2180
|
-
getRevisionById: (model:
|
|
2644
|
+
getRevisionById: (model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams) => Promise<T | null>;
|
|
2181
2645
|
/**
|
|
2182
2646
|
* Get the published entry by given entryId.
|
|
2183
2647
|
*/
|
|
2184
|
-
getPublishedRevisionByEntryId: (model:
|
|
2648
|
+
getPublishedRevisionByEntryId: (model: CmsModel, params: CmsEntryStorageOperationsGetPublishedRevisionParams) => Promise<T | null>;
|
|
2185
2649
|
/**
|
|
2186
2650
|
* Get the latest entry by given entryId.
|
|
2187
2651
|
*/
|
|
2188
|
-
getLatestRevisionByEntryId: (model:
|
|
2652
|
+
getLatestRevisionByEntryId: (model: CmsModel, params: CmsEntryStorageOperationsGetLatestRevisionParams) => Promise<T | null>;
|
|
2189
2653
|
/**
|
|
2190
2654
|
* Get the revision of the entry before given one.
|
|
2191
2655
|
*/
|
|
2192
|
-
getPreviousRevision: (model:
|
|
2656
|
+
getPreviousRevision: (model: CmsModel, params: CmsEntryStorageOperationsGetPreviousRevisionParams) => Promise<T | null>;
|
|
2193
2657
|
/**
|
|
2194
2658
|
* Gets entry by given params.
|
|
2195
2659
|
*/
|
|
2196
|
-
get: (model:
|
|
2660
|
+
get: (model: CmsModel, params: CmsEntryStorageOperationsGetParams) => Promise<T | null>;
|
|
2197
2661
|
/**
|
|
2198
2662
|
* List all entries. Filterable via params.
|
|
2199
2663
|
*/
|
|
2200
|
-
list: (model:
|
|
2664
|
+
list: (model: CmsModel, params: CmsEntryStorageOperationsListParams) => Promise<CmsEntryStorageOperationsListResponse<T>>;
|
|
2201
2665
|
/**
|
|
2202
2666
|
* Create a new entry.
|
|
2203
2667
|
*/
|
|
2204
|
-
create: (model:
|
|
2668
|
+
create: (model: CmsModel, params: CmsEntryStorageOperationsCreateParams<T>) => Promise<T>;
|
|
2205
2669
|
/**
|
|
2206
2670
|
* Create a new entry from existing one.
|
|
2207
2671
|
*/
|
|
2208
|
-
createRevisionFrom: (model:
|
|
2672
|
+
createRevisionFrom: (model: CmsModel, params: CmsEntryStorageOperationsCreateRevisionFromParams<T>) => Promise<T>;
|
|
2209
2673
|
/**
|
|
2210
2674
|
* Update existing entry.
|
|
2211
2675
|
*/
|
|
2212
|
-
update: (model:
|
|
2676
|
+
update: (model: CmsModel, params: CmsEntryStorageOperationsUpdateParams<T>) => Promise<T>;
|
|
2213
2677
|
/**
|
|
2214
2678
|
* Delete the entry revision.
|
|
2215
2679
|
*/
|
|
2216
|
-
deleteRevision: (model:
|
|
2680
|
+
deleteRevision: (model: CmsModel, params: CmsEntryStorageOperationsDeleteRevisionParams<T>) => Promise<void>;
|
|
2217
2681
|
/**
|
|
2218
2682
|
* Delete the entry.
|
|
2219
2683
|
*/
|
|
2220
|
-
delete: (model:
|
|
2684
|
+
delete: (model: CmsModel, params: CmsEntryStorageOperationsDeleteParams) => Promise<void>;
|
|
2221
2685
|
/**
|
|
2222
|
-
*
|
|
2686
|
+
* Delete multiple entries, with a limit on how much can be deleted in one call.
|
|
2223
2687
|
*/
|
|
2224
|
-
|
|
2688
|
+
deleteMultipleEntries: (model: CmsModel, params: CmsEntryStorageOperationsDeleteEntriesParams) => Promise<void>;
|
|
2225
2689
|
/**
|
|
2226
|
-
*
|
|
2690
|
+
* Publish the entry.
|
|
2227
2691
|
*/
|
|
2228
|
-
|
|
2692
|
+
publish: (model: CmsModel, params: CmsEntryStorageOperationsPublishParams<T>) => Promise<T>;
|
|
2229
2693
|
/**
|
|
2230
|
-
*
|
|
2694
|
+
* Unpublish the entry.
|
|
2231
2695
|
*/
|
|
2232
|
-
|
|
2696
|
+
unpublish: (model: CmsModel, params: CmsEntryStorageOperationsUnpublishParams<T>) => Promise<T>;
|
|
2233
2697
|
/**
|
|
2234
|
-
*
|
|
2698
|
+
* Method to list all the unique values for the given field id.
|
|
2699
|
+
* Simplest use case would be to aggregate tags for some content.
|
|
2700
|
+
* @internal
|
|
2235
2701
|
*/
|
|
2236
|
-
|
|
2702
|
+
getUniqueFieldValues: (model: CmsModel, params: CmsEntryStorageOperationsGetUniqueFieldValuesParams) => Promise<CmsEntryUniqueValue[]>;
|
|
2237
2703
|
}
|
|
2238
2704
|
export declare enum CONTENT_ENTRY_STATUS {
|
|
2239
2705
|
DRAFT = "draft",
|
|
2240
2706
|
PUBLISHED = "published",
|
|
2241
|
-
UNPUBLISHED = "unpublished"
|
|
2242
|
-
CHANGES_REQUESTED = "changesRequested",
|
|
2243
|
-
REVIEW_REQUESTED = "reviewRequested"
|
|
2707
|
+
UNPUBLISHED = "unpublished"
|
|
2244
2708
|
}
|
|
2245
2709
|
export interface CmsSettingsStorageOperationsGetParams {
|
|
2246
2710
|
locale: string;
|
|
@@ -2297,7 +2761,8 @@ export interface CmsSystemStorageOperations {
|
|
|
2297
2761
|
*/
|
|
2298
2762
|
update: (params: CmsSystemStorageOperationsUpdateParams) => Promise<CmsSystem>;
|
|
2299
2763
|
}
|
|
2300
|
-
export interface HeadlessCmsStorageOperations {
|
|
2764
|
+
export interface HeadlessCmsStorageOperations<C = CmsContext> {
|
|
2765
|
+
name: string;
|
|
2301
2766
|
system: CmsSystemStorageOperations;
|
|
2302
2767
|
settings: CmsSettingsStorageOperations;
|
|
2303
2768
|
groups: CmsGroupStorageOperations;
|
|
@@ -2306,11 +2771,7 @@ export interface HeadlessCmsStorageOperations {
|
|
|
2306
2771
|
/**
|
|
2307
2772
|
* Either attach something from the storage operations or run something in it.
|
|
2308
2773
|
*/
|
|
2309
|
-
beforeInit
|
|
2310
|
-
init?: (context:
|
|
2311
|
-
/**
|
|
2312
|
-
* An upgrade to run if necessary.
|
|
2313
|
-
*/
|
|
2314
|
-
upgrade?: UpgradePlugin | null;
|
|
2774
|
+
beforeInit: (context: C) => Promise<void>;
|
|
2775
|
+
init?: (context: C) => Promise<void>;
|
|
2315
2776
|
}
|
|
2316
2777
|
export {};
|