@webiny/api-headless-cms 0.0.0-unstable.5e7233243f → 0.0.0-unstable.606fc9c866
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 +5 -2
- package/context.js +63 -29
- 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 +8 -7
- package/crud/contentEntry.crud.js +1002 -1022
- 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 +133 -154
- package/crud/contentModel/validateModelFields.js.map +1 -1
- package/crud/contentModel/validation.d.ts +551 -0
- package/crud/contentModel/validation.js +145 -0
- package/crud/contentModel/validation.js.map +1 -0
- package/crud/contentModel.crud.js +410 -375
- 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.js +227 -221
- package/crud/contentModelGroup.crud.js.map +1 -1
- package/crud/settings.crud.d.ts +1 -1
- package/crud/settings.crud.js +8 -30
- 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 +16 -71
- 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 +6 -14
- 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 +53 -0
- package/graphql/schema/baseSchema.js.map +1 -0
- package/graphql/schema/contentEntries.d.ts +6 -2
- package/graphql/schema/contentEntries.js +119 -108
- 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 +1 -1
- package/graphql/schema/createFieldResolvers.js +26 -38
- package/graphql/schema/createFieldResolvers.js.map +1 -1
- package/graphql/schema/createManageResolvers.d.ts +1 -1
- package/graphql/schema/createManageResolvers.js +42 -60
- package/graphql/schema/createManageResolvers.js.map +1 -1
- package/graphql/schema/createManageSDL.d.ts +3 -0
- package/graphql/schema/createManageSDL.js +66 -73
- 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 +33 -35
- 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.js +0 -6
- package/graphql/schema/resolvers/manage/resolveDelete.js.map +1 -1
- 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/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 +64 -66
- package/graphql/schema/schemaPlugins.js.map +1 -1
- package/graphql/system.js +55 -87
- 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 +4 -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 +0 -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 +30 -32
- package/parameters/context.js +0 -4
- package/parameters/context.js.map +1 -1
- package/parameters/header.js +1 -12
- 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 +1 -8
- 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 +642 -239
- package/types.js +67 -72
- package/types.js.map +1 -1
- package/utils/access.js +11 -25
- package/utils/access.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 +23 -50
- 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 +4 -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.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/ownership.d.ts +3 -3
- package/utils/ownership.js +0 -8
- package/utils/ownership.js.map +1 -1
- package/utils/permissions.js +7 -26
- package/utils/permissions.js.map +1 -1
- package/utils/renderFields.d.ts +2 -1
- package/utils/renderFields.js +10 -10
- package/utils/renderFields.js.map +1 -1
- package/utils/renderGetFilterFields.js +6 -14
- package/utils/renderGetFilterFields.js.map +1 -1
- package/utils/renderInputFields.d.ts +2 -1
- package/utils/renderInputFields.js +6 -9
- package/utils/renderInputFields.js.map +1 -1
- package/utils/renderListFilterFields.js +10 -9
- package/utils/renderListFilterFields.js.map +1 -1
- package/utils/renderSortEnum.d.ts +7 -4
- package/utils/renderSortEnum.js +21 -11
- 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/filterModelFields.d.ts +0 -16
- package/utils/filterModelFields.js +0 -81
- package/utils/filterModelFields.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,10 @@
|
|
|
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
7
|
import { FileManagerContext } from "@webiny/api-file-manager/types";
|
|
9
|
-
import { UpgradePlugin } from "@webiny/api-upgrade/types";
|
|
10
8
|
import { Topic } from "@webiny/pubsub/types";
|
|
11
9
|
import { CmsModelConverterCallable } from "./utils/converters/ConverterCollection";
|
|
12
10
|
export declare type ApiEndpoint = "manage" | "preview" | "read";
|
|
@@ -45,7 +43,7 @@ export interface HeadlessCms extends CmsSettingsContext, CmsSystemContext, CmsGr
|
|
|
45
43
|
*
|
|
46
44
|
* @category Context
|
|
47
45
|
*/
|
|
48
|
-
export interface CmsContext extends Context, DbContext, I18NContext, FileManagerContext
|
|
46
|
+
export interface CmsContext extends Context, DbContext, I18NContext, FileManagerContext {
|
|
49
47
|
cms: HeadlessCms;
|
|
50
48
|
}
|
|
51
49
|
interface CmsModelFieldPredefinedValuesValue {
|
|
@@ -99,6 +97,10 @@ export interface CmsModelFieldSettings {
|
|
|
99
97
|
* Object field has child fields.
|
|
100
98
|
*/
|
|
101
99
|
fields?: CmsModelField[];
|
|
100
|
+
/**
|
|
101
|
+
* Is the file field images only one?
|
|
102
|
+
*/
|
|
103
|
+
imagesOnly?: boolean;
|
|
102
104
|
/**
|
|
103
105
|
* Object field has child fields - so it needs to have a layout.
|
|
104
106
|
*/
|
|
@@ -116,6 +118,7 @@ export interface CmsModelFieldSettings {
|
|
|
116
118
|
*/
|
|
117
119
|
[key: string]: any;
|
|
118
120
|
}
|
|
121
|
+
export declare type CmsModelFieldType = "boolean" | "datetime" | "file" | "long-text" | "number" | "object" | "ref" | "rich-text" | "text" | "dynamicZone" | string;
|
|
119
122
|
/**
|
|
120
123
|
* A definition for content model field. This type exists on the app side as well.
|
|
121
124
|
*
|
|
@@ -136,18 +139,16 @@ export interface CmsModelField {
|
|
|
136
139
|
* A type of the field.
|
|
137
140
|
* We are defining our built-in fields, so people know which are available by the default.
|
|
138
141
|
*/
|
|
139
|
-
type:
|
|
142
|
+
type: CmsModelFieldType;
|
|
140
143
|
/**
|
|
141
144
|
* A unique storage ID for storing actual values.
|
|
142
|
-
* Must in form of a-zA-Z0-9@a-zA-Z0-9
|
|
145
|
+
* Must in form of a-zA-Z0-9@a-zA-Z0-9
|
|
143
146
|
*
|
|
144
147
|
* This is an auto-generated value: uses `id` and `type`
|
|
145
148
|
*
|
|
146
149
|
* This is used as path for the entry value.
|
|
147
|
-
*
|
|
148
|
-
* @internal
|
|
149
150
|
*/
|
|
150
|
-
storageId: string;
|
|
151
|
+
storageId: `${string}@${string}` | string;
|
|
151
152
|
/**
|
|
152
153
|
* Field identifier for the model field that will be available to the outside world.
|
|
153
154
|
* `storageId` is used as path (or column) to store the data.
|
|
@@ -196,6 +197,10 @@ export interface CmsModelField {
|
|
|
196
197
|
*
|
|
197
198
|
*/
|
|
198
199
|
multipleValues?: boolean;
|
|
200
|
+
/**
|
|
201
|
+
* Fields can be tagged to give them contextual meaning.
|
|
202
|
+
*/
|
|
203
|
+
tags?: string[];
|
|
199
204
|
/**
|
|
200
205
|
* Any user defined settings.
|
|
201
206
|
*
|
|
@@ -203,18 +208,42 @@ export interface CmsModelField {
|
|
|
203
208
|
*/
|
|
204
209
|
settings?: CmsModelFieldSettings;
|
|
205
210
|
}
|
|
211
|
+
export interface CmsDynamicZoneTemplate {
|
|
212
|
+
id: string;
|
|
213
|
+
name: string;
|
|
214
|
+
gqlTypeName: string;
|
|
215
|
+
description: string;
|
|
216
|
+
icon: string;
|
|
217
|
+
fields: CmsModelField[];
|
|
218
|
+
layout: string[][];
|
|
219
|
+
validation: CmsModelFieldValidation[];
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* A definition for dynamic-zone field to show possible type of the field in settings.
|
|
223
|
+
*/
|
|
224
|
+
export interface CmsModelDynamicZoneField extends CmsModelField {
|
|
225
|
+
/**
|
|
226
|
+
* Settings object for the field. Contains `templates` property.
|
|
227
|
+
*/
|
|
228
|
+
settings: {
|
|
229
|
+
templates: CmsDynamicZoneTemplate[];
|
|
230
|
+
};
|
|
231
|
+
}
|
|
206
232
|
/**
|
|
207
233
|
* Used for our internal functionality.
|
|
208
234
|
*/
|
|
209
235
|
export interface CmsModelFieldWithParent extends CmsModelField {
|
|
210
236
|
parent?: CmsModelFieldWithParent | null;
|
|
211
237
|
}
|
|
238
|
+
export interface CmsModelDynamicZoneFieldWithParent extends CmsModelDynamicZoneField {
|
|
239
|
+
parent?: CmsModelDynamicZoneFieldWithParent | null;
|
|
240
|
+
}
|
|
212
241
|
/**
|
|
213
242
|
* A definition for dateTime field to show possible type of the field in settings.
|
|
214
243
|
*/
|
|
215
244
|
export interface CmsModelDateTimeField extends CmsModelField {
|
|
216
245
|
/**
|
|
217
|
-
* Settings object for the field. Contains type property.
|
|
246
|
+
* Settings object for the field. Contains `type` property.
|
|
218
247
|
*/
|
|
219
248
|
settings: {
|
|
220
249
|
type: "time" | "date" | "dateTimeWithoutTimezone" | "dateTimeWithTimezone";
|
|
@@ -336,7 +365,21 @@ export interface LockedField {
|
|
|
336
365
|
[key: string]: any;
|
|
337
366
|
}
|
|
338
367
|
/**
|
|
339
|
-
*
|
|
368
|
+
* @category Database model
|
|
369
|
+
* @category CmsModel
|
|
370
|
+
*/
|
|
371
|
+
export interface CmsModelGroup {
|
|
372
|
+
/**
|
|
373
|
+
* Generated ID of the group
|
|
374
|
+
*/
|
|
375
|
+
id: string;
|
|
376
|
+
/**
|
|
377
|
+
* Name of the group
|
|
378
|
+
*/
|
|
379
|
+
name: string;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Base CMS Model. Should not be exported and used outside of this package.
|
|
340
383
|
*
|
|
341
384
|
* @category Database model
|
|
342
385
|
* @category CmsModel
|
|
@@ -350,6 +393,24 @@ export interface CmsModel {
|
|
|
350
393
|
* Unique ID for the content model. Created from name if not defined by user.
|
|
351
394
|
*/
|
|
352
395
|
modelId: string;
|
|
396
|
+
/**
|
|
397
|
+
* Name of the content model in singular form to be used in the API.
|
|
398
|
+
* example:
|
|
399
|
+
* - Article
|
|
400
|
+
* - Fruit
|
|
401
|
+
* - Vegetable
|
|
402
|
+
* - Car
|
|
403
|
+
*/
|
|
404
|
+
singularApiName: string;
|
|
405
|
+
/**
|
|
406
|
+
* Name of the content model in plural form to be used in the API.
|
|
407
|
+
* example:
|
|
408
|
+
* - Articles
|
|
409
|
+
* - Fruits
|
|
410
|
+
* - Vegetables
|
|
411
|
+
* - Cars
|
|
412
|
+
*/
|
|
413
|
+
pluralApiName: string;
|
|
353
414
|
/**
|
|
354
415
|
* Model tenant.
|
|
355
416
|
*/
|
|
@@ -361,20 +422,15 @@ export interface CmsModel {
|
|
|
361
422
|
/**
|
|
362
423
|
* Cms Group reference object.
|
|
363
424
|
*/
|
|
364
|
-
group:
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
/**
|
|
370
|
-
* Name of the group
|
|
371
|
-
*/
|
|
372
|
-
name: string;
|
|
373
|
-
};
|
|
425
|
+
group: CmsModelGroup;
|
|
426
|
+
/**
|
|
427
|
+
* Icon for the content model.
|
|
428
|
+
*/
|
|
429
|
+
icon?: string | null;
|
|
374
430
|
/**
|
|
375
431
|
* Description for the content model.
|
|
376
432
|
*/
|
|
377
|
-
description: string;
|
|
433
|
+
description: string | null;
|
|
378
434
|
/**
|
|
379
435
|
* Date created
|
|
380
436
|
*/
|
|
@@ -386,7 +442,7 @@ export interface CmsModel {
|
|
|
386
442
|
/**
|
|
387
443
|
* CreatedBy object wrapper. Contains id, name and type of the user.
|
|
388
444
|
*/
|
|
389
|
-
createdBy?:
|
|
445
|
+
createdBy?: CmsIdentity;
|
|
390
446
|
/**
|
|
391
447
|
* List of fields defining entry values.
|
|
392
448
|
*/
|
|
@@ -402,6 +458,10 @@ export interface CmsModel {
|
|
|
402
458
|
* ```
|
|
403
459
|
*/
|
|
404
460
|
layout: string[][];
|
|
461
|
+
/**
|
|
462
|
+
* Models can be tagged to give them contextual meaning.
|
|
463
|
+
*/
|
|
464
|
+
tags?: string[];
|
|
405
465
|
/**
|
|
406
466
|
* List of locked fields. Updated when entry is saved and a field has been used.
|
|
407
467
|
*/
|
|
@@ -411,6 +471,16 @@ export interface CmsModel {
|
|
|
411
471
|
* It is picked as first available text field. Or user can select own field.
|
|
412
472
|
*/
|
|
413
473
|
titleFieldId: string;
|
|
474
|
+
/**
|
|
475
|
+
* The field which is displayed as the description one.
|
|
476
|
+
* Only way this is null or undefined is that there are no long-text fields to be set as description.
|
|
477
|
+
*/
|
|
478
|
+
descriptionFieldId?: string | null;
|
|
479
|
+
/**
|
|
480
|
+
* The field which is displayed as the image.
|
|
481
|
+
* Only way this is null or undefined is that there are no file fields, with images only set, to be set as image.
|
|
482
|
+
*/
|
|
483
|
+
imageFieldId?: string | null;
|
|
414
484
|
/**
|
|
415
485
|
* The version of Webiny which this record was stored with.
|
|
416
486
|
*/
|
|
@@ -438,25 +508,41 @@ export interface CmsModelFieldDefinition {
|
|
|
438
508
|
fields: string;
|
|
439
509
|
typeDefs?: string;
|
|
440
510
|
}
|
|
441
|
-
interface CmsModelFieldToGraphQLCreateResolverParams {
|
|
511
|
+
interface CmsModelFieldToGraphQLCreateResolverParams<TField> {
|
|
442
512
|
models: CmsModel[];
|
|
443
513
|
model: CmsModel;
|
|
444
514
|
graphQLType: string;
|
|
445
|
-
field:
|
|
515
|
+
field: TField;
|
|
446
516
|
createFieldResolvers: any;
|
|
517
|
+
fieldTypePlugins: CmsFieldTypePlugins;
|
|
447
518
|
}
|
|
448
|
-
export interface CmsModelFieldToGraphQLCreateResolver {
|
|
449
|
-
(params: CmsModelFieldToGraphQLCreateResolverParams): GraphQLFieldResolver | {
|
|
519
|
+
export interface CmsModelFieldToGraphQLCreateResolver<TField = CmsModelField> {
|
|
520
|
+
(params: CmsModelFieldToGraphQLCreateResolverParams<TField>): GraphQLFieldResolver | {
|
|
450
521
|
resolver: GraphQLFieldResolver | null;
|
|
451
522
|
typeResolvers: Resolvers<CmsContext>;
|
|
452
523
|
} | false;
|
|
453
524
|
}
|
|
525
|
+
export interface CmsModelFieldToGraphQLPluginValidateChildFieldsValidateParams<TField extends CmsModelField = CmsModelField> {
|
|
526
|
+
fields: TField[];
|
|
527
|
+
originalFields: TField[];
|
|
528
|
+
}
|
|
529
|
+
export interface CmsModelFieldToGraphQLPluginValidateChildFieldsValidate {
|
|
530
|
+
(params: CmsModelFieldToGraphQLPluginValidateChildFieldsValidateParams): void;
|
|
531
|
+
}
|
|
532
|
+
export interface CmsModelFieldToGraphQLPluginValidateChildFieldsParams<TField extends CmsModelField = CmsModelField> {
|
|
533
|
+
field: TField;
|
|
534
|
+
originalField?: TField;
|
|
535
|
+
validate: CmsModelFieldToGraphQLPluginValidateChildFieldsValidate;
|
|
536
|
+
}
|
|
537
|
+
export interface CmsModelFieldToGraphQLPluginValidateChildFields<TField extends CmsModelField = CmsModelField> {
|
|
538
|
+
(params: CmsModelFieldToGraphQLPluginValidateChildFieldsParams<TField>): void;
|
|
539
|
+
}
|
|
454
540
|
/**
|
|
455
541
|
* @category Plugin
|
|
456
542
|
* @category ModelField
|
|
457
543
|
* @category GraphQL
|
|
458
544
|
*/
|
|
459
|
-
export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
545
|
+
export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = CmsModelField> extends Plugin {
|
|
460
546
|
/**
|
|
461
547
|
* A plugin type
|
|
462
548
|
*/
|
|
@@ -510,7 +596,7 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
510
596
|
*/
|
|
511
597
|
createStorageId?: (params: {
|
|
512
598
|
model: CmsModel;
|
|
513
|
-
field:
|
|
599
|
+
field: TField;
|
|
514
600
|
}) => string | null | undefined;
|
|
515
601
|
/**
|
|
516
602
|
* Read API methods.
|
|
@@ -529,7 +615,7 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
529
615
|
*/
|
|
530
616
|
createGetFilters?(params: {
|
|
531
617
|
model: CmsModel;
|
|
532
|
-
field:
|
|
618
|
+
field: TField;
|
|
533
619
|
}): string;
|
|
534
620
|
/**
|
|
535
621
|
* Definition for list filtering for GraphQL.
|
|
@@ -549,7 +635,8 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
549
635
|
*/
|
|
550
636
|
createListFilters?(params: {
|
|
551
637
|
model: CmsModel;
|
|
552
|
-
field:
|
|
638
|
+
field: TField;
|
|
639
|
+
plugins: CmsFieldTypePlugins;
|
|
553
640
|
}): string;
|
|
554
641
|
/**
|
|
555
642
|
* Definition of the field type for GraphQL - be aware if multiple values is selected.
|
|
@@ -567,13 +654,14 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
567
654
|
* ```
|
|
568
655
|
*/
|
|
569
656
|
createTypeField(params: {
|
|
657
|
+
models: CmsModel[];
|
|
570
658
|
model: CmsModel;
|
|
571
|
-
field:
|
|
659
|
+
field: TField;
|
|
572
660
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
573
661
|
}): CmsModelFieldDefinition | string | null;
|
|
574
662
|
/**
|
|
575
663
|
* Definition for field resolver.
|
|
576
|
-
* By default it is simple return of the `instance.values[storageId]` but if required, users can define their own.
|
|
664
|
+
* By default, it is simple return of the `instance.values[storageId]` but if required, users can define their own.
|
|
577
665
|
*
|
|
578
666
|
* ```ts
|
|
579
667
|
* read: {
|
|
@@ -585,7 +673,7 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
585
673
|
* }
|
|
586
674
|
* ```
|
|
587
675
|
*/
|
|
588
|
-
createResolver?: CmsModelFieldToGraphQLCreateResolver
|
|
676
|
+
createResolver?: CmsModelFieldToGraphQLCreateResolver<TField>;
|
|
589
677
|
/**
|
|
590
678
|
* Read API schema definitions for the field and resolvers for them.
|
|
591
679
|
*
|
|
@@ -628,7 +716,8 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
628
716
|
*/
|
|
629
717
|
createListFilters?: (params: {
|
|
630
718
|
model: CmsModel;
|
|
631
|
-
field:
|
|
719
|
+
field: TField;
|
|
720
|
+
plugins: CmsFieldTypePlugins;
|
|
632
721
|
}) => string;
|
|
633
722
|
/**
|
|
634
723
|
* Manage API schema definitions for the field and resolvers for them. Probably similar to `read.createSchema`.
|
|
@@ -666,8 +755,9 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
666
755
|
* ```
|
|
667
756
|
*/
|
|
668
757
|
createTypeField: (params: {
|
|
758
|
+
models: CmsModel[];
|
|
669
759
|
model: CmsModel;
|
|
670
|
-
field:
|
|
760
|
+
field: TField;
|
|
671
761
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
672
762
|
}) => CmsModelFieldDefinition | string | null;
|
|
673
763
|
/**
|
|
@@ -686,13 +776,14 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
686
776
|
* ```
|
|
687
777
|
*/
|
|
688
778
|
createInputField: (params: {
|
|
779
|
+
models: CmsModel[];
|
|
689
780
|
model: CmsModel;
|
|
690
|
-
field:
|
|
781
|
+
field: TField;
|
|
691
782
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
692
783
|
}) => CmsModelFieldDefinition | string | null;
|
|
693
784
|
/**
|
|
694
785
|
* Definition for field resolver.
|
|
695
|
-
* By default it is simple return of the `instance.values[storageId]` but if required, users can define their own.
|
|
786
|
+
* By default, it is simple return of the `instance.values[storageId]` but if required, users can define their own.
|
|
696
787
|
*
|
|
697
788
|
* ```ts
|
|
698
789
|
* manage: {
|
|
@@ -704,8 +795,13 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
704
795
|
* }
|
|
705
796
|
* ```
|
|
706
797
|
*/
|
|
707
|
-
createResolver?: CmsModelFieldToGraphQLCreateResolver
|
|
798
|
+
createResolver?: CmsModelFieldToGraphQLCreateResolver<TField>;
|
|
708
799
|
};
|
|
800
|
+
/**
|
|
801
|
+
*
|
|
802
|
+
* @param field
|
|
803
|
+
*/
|
|
804
|
+
validateChildFields?: CmsModelFieldToGraphQLPluginValidateChildFields<TField>;
|
|
709
805
|
}
|
|
710
806
|
/**
|
|
711
807
|
* Check for content model locked field.
|
|
@@ -744,11 +840,11 @@ export interface CmsFieldTypePlugins {
|
|
|
744
840
|
[key: string]: CmsModelFieldToGraphQLPlugin;
|
|
745
841
|
}
|
|
746
842
|
/**
|
|
747
|
-
*
|
|
843
|
+
* An interface describing the reference to a user that created some data in the database.
|
|
748
844
|
*
|
|
749
845
|
* @category General
|
|
750
846
|
*/
|
|
751
|
-
export interface
|
|
847
|
+
export interface CmsIdentity {
|
|
752
848
|
/**
|
|
753
849
|
* ID if the user.
|
|
754
850
|
*/
|
|
@@ -798,30 +894,45 @@ export interface CmsSettingsContext {
|
|
|
798
894
|
/**
|
|
799
895
|
* Get the datetime when content model last changed.
|
|
800
896
|
*/
|
|
801
|
-
getModelLastChange: () => Promise<Date>;
|
|
897
|
+
getModelLastChange: () => Promise<Date | null>;
|
|
802
898
|
}
|
|
803
|
-
export interface
|
|
899
|
+
export interface OnSystemBeforeInstallTopicParams {
|
|
804
900
|
tenant: string;
|
|
805
901
|
locale: string;
|
|
806
902
|
}
|
|
807
|
-
export interface
|
|
903
|
+
export interface OnSystemAfterInstallTopicParams {
|
|
904
|
+
tenant: string;
|
|
905
|
+
locale: string;
|
|
906
|
+
}
|
|
907
|
+
export interface OnSystemInstallErrorTopicParams {
|
|
908
|
+
error: Error;
|
|
808
909
|
tenant: string;
|
|
809
910
|
locale: string;
|
|
810
911
|
}
|
|
811
912
|
export declare type CmsSystemContext = {
|
|
812
913
|
getSystemVersion: () => Promise<string | null>;
|
|
813
914
|
setSystemVersion: (version: string) => Promise<void>;
|
|
814
|
-
getReadAPIKey(): Promise<string | null>;
|
|
815
915
|
installSystem: () => Promise<void>;
|
|
816
|
-
upgradeSystem: (version: string) => Promise<boolean>;
|
|
817
916
|
/**
|
|
818
|
-
*
|
|
917
|
+
* Lifecycle events - deprecated
|
|
819
918
|
*/
|
|
820
|
-
|
|
821
|
-
|
|
919
|
+
/**
|
|
920
|
+
* @deprecated
|
|
921
|
+
*/
|
|
922
|
+
onBeforeSystemInstall: Topic<OnSystemBeforeInstallTopicParams>;
|
|
923
|
+
/**
|
|
924
|
+
* @deprecated
|
|
925
|
+
*/
|
|
926
|
+
onAfterSystemInstall: Topic<OnSystemAfterInstallTopicParams>;
|
|
927
|
+
/**
|
|
928
|
+
* Released in 5.34.0
|
|
929
|
+
*/
|
|
930
|
+
onSystemBeforeInstall: Topic<OnSystemBeforeInstallTopicParams>;
|
|
931
|
+
onSystemAfterInstall: Topic<OnSystemAfterInstallTopicParams>;
|
|
932
|
+
onSystemInstallError: Topic<OnSystemInstallErrorTopicParams>;
|
|
822
933
|
};
|
|
823
934
|
/**
|
|
824
|
-
* A GraphQL params.data parameter received when creating content model group.
|
|
935
|
+
* A GraphQL `params.data` parameter received when creating content model group.
|
|
825
936
|
*
|
|
826
937
|
* @category CmsGroup
|
|
827
938
|
* @category GraphQL params
|
|
@@ -833,7 +944,7 @@ export interface CmsGroupCreateInput {
|
|
|
833
944
|
icon: string;
|
|
834
945
|
}
|
|
835
946
|
/**
|
|
836
|
-
* A GraphQL params.data parameter received when updating content model group.
|
|
947
|
+
* A GraphQL `params.data` parameter received when updating content model group.
|
|
837
948
|
*
|
|
838
949
|
* @category CmsGroup
|
|
839
950
|
* @category GraphQL params
|
|
@@ -882,7 +993,7 @@ export interface CmsGroup {
|
|
|
882
993
|
/**
|
|
883
994
|
* CreatedBy reference object.
|
|
884
995
|
*/
|
|
885
|
-
createdBy?:
|
|
996
|
+
createdBy?: CmsIdentity;
|
|
886
997
|
/**
|
|
887
998
|
* Date group was created on.
|
|
888
999
|
*/
|
|
@@ -903,7 +1014,7 @@ export interface CmsGroup {
|
|
|
903
1014
|
isPrivate?: boolean;
|
|
904
1015
|
}
|
|
905
1016
|
/**
|
|
906
|
-
* A data.where parameter received when listing content model groups.
|
|
1017
|
+
* A `data.where` parameter received when listing content model groups.
|
|
907
1018
|
*
|
|
908
1019
|
* @category CmsGroup
|
|
909
1020
|
* @category GraphQL params
|
|
@@ -919,21 +1030,38 @@ export interface CmsGroupListParams {
|
|
|
919
1030
|
* @category CmsGroup
|
|
920
1031
|
* @category Topic
|
|
921
1032
|
*/
|
|
922
|
-
export interface
|
|
1033
|
+
export interface OnGroupBeforeCreateTopicParams {
|
|
1034
|
+
group: CmsGroup;
|
|
1035
|
+
}
|
|
1036
|
+
/**
|
|
1037
|
+
* @category CmsGroup
|
|
1038
|
+
* @category Topic
|
|
1039
|
+
*/
|
|
1040
|
+
export interface OnGroupAfterCreateTopicParams {
|
|
1041
|
+
group: CmsGroup;
|
|
1042
|
+
}
|
|
1043
|
+
/**
|
|
1044
|
+
* @category CmsGroup
|
|
1045
|
+
* @category Topic
|
|
1046
|
+
*/
|
|
1047
|
+
export interface OnGroupCreateErrorTopicParams {
|
|
1048
|
+
input: CmsGroupCreateInput;
|
|
923
1049
|
group: CmsGroup;
|
|
1050
|
+
error: Error;
|
|
924
1051
|
}
|
|
925
1052
|
/**
|
|
926
1053
|
* @category CmsGroup
|
|
927
1054
|
* @category Topic
|
|
928
1055
|
*/
|
|
929
|
-
export interface
|
|
1056
|
+
export interface OnGroupBeforeUpdateTopicParams {
|
|
1057
|
+
original: CmsGroup;
|
|
930
1058
|
group: CmsGroup;
|
|
931
1059
|
}
|
|
932
1060
|
/**
|
|
933
1061
|
* @category CmsGroup
|
|
934
1062
|
* @category Topic
|
|
935
1063
|
*/
|
|
936
|
-
export interface
|
|
1064
|
+
export interface OnGroupAfterUpdateTopicParams {
|
|
937
1065
|
original: CmsGroup;
|
|
938
1066
|
group: CmsGroup;
|
|
939
1067
|
}
|
|
@@ -941,24 +1069,34 @@ export interface BeforeGroupUpdateTopicParams {
|
|
|
941
1069
|
* @category CmsGroup
|
|
942
1070
|
* @category Topic
|
|
943
1071
|
*/
|
|
944
|
-
export interface
|
|
1072
|
+
export interface OnGroupUpdateErrorTopicParams {
|
|
1073
|
+
input: CmsGroupUpdateInput;
|
|
945
1074
|
original: CmsGroup;
|
|
946
1075
|
group: CmsGroup;
|
|
1076
|
+
error: Error;
|
|
947
1077
|
}
|
|
948
1078
|
/**
|
|
949
1079
|
* @category CmsGroup
|
|
950
1080
|
* @category Topic
|
|
951
1081
|
*/
|
|
952
|
-
export interface
|
|
1082
|
+
export interface OnGroupBeforeDeleteTopicParams {
|
|
953
1083
|
group: CmsGroup;
|
|
954
1084
|
}
|
|
955
1085
|
/**
|
|
956
1086
|
* @category CmsGroup
|
|
957
1087
|
* @category Topic
|
|
958
1088
|
*/
|
|
959
|
-
export interface
|
|
1089
|
+
export interface OnGroupAfterDeleteTopicParams {
|
|
960
1090
|
group: CmsGroup;
|
|
961
1091
|
}
|
|
1092
|
+
/**
|
|
1093
|
+
* @category CmsGroup
|
|
1094
|
+
* @category Topic
|
|
1095
|
+
*/
|
|
1096
|
+
export interface OnGroupDeleteErrorTopicParams {
|
|
1097
|
+
group: CmsGroup;
|
|
1098
|
+
error: Error;
|
|
1099
|
+
}
|
|
962
1100
|
/**
|
|
963
1101
|
* Cms Group in context.
|
|
964
1102
|
*
|
|
@@ -991,14 +1129,44 @@ export interface CmsGroupContext {
|
|
|
991
1129
|
*/
|
|
992
1130
|
clearGroupsCache: () => void;
|
|
993
1131
|
/**
|
|
994
|
-
*
|
|
1132
|
+
* Lifecycle events - deprecated
|
|
1133
|
+
*/
|
|
1134
|
+
/**
|
|
1135
|
+
* @deprecated
|
|
1136
|
+
*/
|
|
1137
|
+
onBeforeGroupCreate: Topic<OnGroupBeforeCreateTopicParams>;
|
|
1138
|
+
/**
|
|
1139
|
+
* @deprecated
|
|
995
1140
|
*/
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1141
|
+
onAfterGroupCreate: Topic<OnGroupAfterCreateTopicParams>;
|
|
1142
|
+
/**
|
|
1143
|
+
* @deprecated
|
|
1144
|
+
*/
|
|
1145
|
+
onBeforeGroupUpdate: Topic<OnGroupBeforeUpdateTopicParams>;
|
|
1146
|
+
/**
|
|
1147
|
+
* @deprecated
|
|
1148
|
+
*/
|
|
1149
|
+
onAfterGroupUpdate: Topic<OnGroupAfterUpdateTopicParams>;
|
|
1150
|
+
/**
|
|
1151
|
+
* @deprecated
|
|
1152
|
+
*/
|
|
1153
|
+
onBeforeGroupDelete: Topic<OnGroupBeforeDeleteTopicParams>;
|
|
1154
|
+
/**
|
|
1155
|
+
* @deprecated
|
|
1156
|
+
*/
|
|
1157
|
+
onAfterGroupDelete: Topic<OnGroupAfterDeleteTopicParams>;
|
|
1158
|
+
/**
|
|
1159
|
+
* Lifecycle events released in 5.33.0
|
|
1160
|
+
*/
|
|
1161
|
+
onGroupBeforeCreate: Topic<OnGroupBeforeCreateTopicParams>;
|
|
1162
|
+
onGroupAfterCreate: Topic<OnGroupAfterCreateTopicParams>;
|
|
1163
|
+
onGroupCreateError: Topic<OnGroupCreateErrorTopicParams>;
|
|
1164
|
+
onGroupBeforeUpdate: Topic<OnGroupBeforeUpdateTopicParams>;
|
|
1165
|
+
onGroupAfterUpdate: Topic<OnGroupAfterUpdateTopicParams>;
|
|
1166
|
+
onGroupUpdateError: Topic<OnGroupUpdateErrorTopicParams>;
|
|
1167
|
+
onGroupBeforeDelete: Topic<OnGroupBeforeDeleteTopicParams>;
|
|
1168
|
+
onGroupAfterDelete: Topic<OnGroupAfterDeleteTopicParams>;
|
|
1169
|
+
onGroupDeleteError: Topic<OnGroupDeleteErrorTopicParams>;
|
|
1002
1170
|
}
|
|
1003
1171
|
/**
|
|
1004
1172
|
* Definition for content model field validator.
|
|
@@ -1017,7 +1185,7 @@ export interface CmsModelFieldValidation {
|
|
|
1017
1185
|
};
|
|
1018
1186
|
}
|
|
1019
1187
|
/**
|
|
1020
|
-
* A GraphQL params.data parameter received when creating content model.
|
|
1188
|
+
* A GraphQL `params.data` parameter received when creating content model.
|
|
1021
1189
|
*
|
|
1022
1190
|
* @category GraphQL params
|
|
1023
1191
|
* @category CmsModel
|
|
@@ -1027,6 +1195,14 @@ export interface CmsModelCreateInput {
|
|
|
1027
1195
|
* Name of the content model.
|
|
1028
1196
|
*/
|
|
1029
1197
|
name: string;
|
|
1198
|
+
/**
|
|
1199
|
+
* Singular name of the content model to be used in the API.
|
|
1200
|
+
*/
|
|
1201
|
+
singularApiName: string;
|
|
1202
|
+
/**
|
|
1203
|
+
* Plural name of the content model to be used in the API.
|
|
1204
|
+
*/
|
|
1205
|
+
pluralApiName: string;
|
|
1030
1206
|
/**
|
|
1031
1207
|
* Unique ID of the content model. Created from name if not sent by the user. Cannot be changed.
|
|
1032
1208
|
*/
|
|
@@ -1034,7 +1210,7 @@ export interface CmsModelCreateInput {
|
|
|
1034
1210
|
/**
|
|
1035
1211
|
* Description of the content model.
|
|
1036
1212
|
*/
|
|
1037
|
-
description?: string;
|
|
1213
|
+
description?: string | null;
|
|
1038
1214
|
/**
|
|
1039
1215
|
* Group where to put the content model in.
|
|
1040
1216
|
*/
|
|
@@ -1055,13 +1231,18 @@ export interface CmsModelCreateInput {
|
|
|
1055
1231
|
*/
|
|
1056
1232
|
layout?: string[][];
|
|
1057
1233
|
/**
|
|
1058
|
-
*
|
|
1059
|
-
|
|
1234
|
+
* Models can be tagged to give them contextual meaning.
|
|
1235
|
+
*/
|
|
1236
|
+
tags?: string[];
|
|
1237
|
+
/**
|
|
1238
|
+
* Fields fieldId which are picked to represent the CMS entry.
|
|
1060
1239
|
*/
|
|
1061
|
-
titleFieldId?: string;
|
|
1240
|
+
titleFieldId?: string | null;
|
|
1241
|
+
descriptionFieldId?: string | null;
|
|
1242
|
+
imageFieldId?: string | null;
|
|
1062
1243
|
}
|
|
1063
1244
|
/**
|
|
1064
|
-
* A GraphQL params.data parameter received when creating content model from existing model.
|
|
1245
|
+
* A GraphQL `params.data` parameter received when creating content model from existing model.
|
|
1065
1246
|
*
|
|
1066
1247
|
* @category GraphQL params
|
|
1067
1248
|
* @category CmsModel
|
|
@@ -1102,11 +1283,15 @@ export interface CmsModelFieldInput {
|
|
|
1102
1283
|
/**
|
|
1103
1284
|
* Text to display below the field to help user what to write in the field.
|
|
1104
1285
|
*/
|
|
1105
|
-
helpText?: string;
|
|
1286
|
+
helpText?: string | null;
|
|
1106
1287
|
/**
|
|
1107
1288
|
* Text to display in the field.
|
|
1108
1289
|
*/
|
|
1109
|
-
placeholderText?: string;
|
|
1290
|
+
placeholderText?: string | null;
|
|
1291
|
+
/**
|
|
1292
|
+
* Fields can be tagged to give them contextual meaning.
|
|
1293
|
+
*/
|
|
1294
|
+
tags?: string[];
|
|
1110
1295
|
/**
|
|
1111
1296
|
* Are multiple values allowed?
|
|
1112
1297
|
*/
|
|
@@ -1126,14 +1311,14 @@ export interface CmsModelFieldInput {
|
|
|
1126
1311
|
/**
|
|
1127
1312
|
* @see CmsModelField.listValidation
|
|
1128
1313
|
*/
|
|
1129
|
-
listValidation
|
|
1314
|
+
listValidation?: CmsModelFieldValidation[];
|
|
1130
1315
|
/**
|
|
1131
1316
|
* User defined settings.
|
|
1132
1317
|
*/
|
|
1133
1318
|
settings?: Record<string, any>;
|
|
1134
1319
|
}
|
|
1135
1320
|
/**
|
|
1136
|
-
* A GraphQL params.data parameter received when updating content model.
|
|
1321
|
+
* A GraphQL `params.data` parameter received when updating content model.
|
|
1137
1322
|
*
|
|
1138
1323
|
* @category GraphQL params
|
|
1139
1324
|
* @category CmsModel
|
|
@@ -1143,6 +1328,14 @@ export interface CmsModelUpdateInput {
|
|
|
1143
1328
|
* A new content model name.
|
|
1144
1329
|
*/
|
|
1145
1330
|
name?: string;
|
|
1331
|
+
/**
|
|
1332
|
+
* A new singular name of the content model to be used in the API.
|
|
1333
|
+
*/
|
|
1334
|
+
singularApiName?: string;
|
|
1335
|
+
/**
|
|
1336
|
+
* A new plural name of the content model to be used in the API.
|
|
1337
|
+
*/
|
|
1338
|
+
pluralApiName?: string;
|
|
1146
1339
|
/**
|
|
1147
1340
|
* A group we want to move the model to.
|
|
1148
1341
|
*/
|
|
@@ -1150,7 +1343,7 @@ export interface CmsModelUpdateInput {
|
|
|
1150
1343
|
/**
|
|
1151
1344
|
* A new description of the content model.
|
|
1152
1345
|
*/
|
|
1153
|
-
description?: string;
|
|
1346
|
+
description?: string | null;
|
|
1154
1347
|
/**
|
|
1155
1348
|
* A list of content model fields to define the entry values.
|
|
1156
1349
|
*/
|
|
@@ -1167,10 +1360,11 @@ export interface CmsModelUpdateInput {
|
|
|
1167
1360
|
*/
|
|
1168
1361
|
layout: string[][];
|
|
1169
1362
|
/**
|
|
1170
|
-
*
|
|
1171
|
-
* It is picked as first available text field. Or user can select own field.
|
|
1363
|
+
* Fields fieldId which are picked to represent the CMS entry.
|
|
1172
1364
|
*/
|
|
1173
|
-
titleFieldId?: string;
|
|
1365
|
+
titleFieldId?: string | null;
|
|
1366
|
+
descriptionFieldId?: string | null;
|
|
1367
|
+
imageFieldId?: string | null;
|
|
1174
1368
|
}
|
|
1175
1369
|
/**
|
|
1176
1370
|
* A plugin to load a CmsModelManager.
|
|
@@ -1212,10 +1406,10 @@ export interface CmsEntryValues {
|
|
|
1212
1406
|
* @category Database model
|
|
1213
1407
|
* @category CmsEntry
|
|
1214
1408
|
*/
|
|
1215
|
-
export interface CmsEntry {
|
|
1409
|
+
export interface CmsEntry<T = CmsEntryValues> {
|
|
1216
1410
|
/**
|
|
1217
1411
|
* 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.
|
|
1412
|
+
* This can be used when upgrading the system, so we know which entries to update.
|
|
1219
1413
|
*/
|
|
1220
1414
|
webinyVersion: string;
|
|
1221
1415
|
/**
|
|
@@ -1234,11 +1428,15 @@ export interface CmsEntry {
|
|
|
1234
1428
|
/**
|
|
1235
1429
|
* CreatedBy object reference.
|
|
1236
1430
|
*/
|
|
1237
|
-
createdBy:
|
|
1431
|
+
createdBy: CmsIdentity;
|
|
1238
1432
|
/**
|
|
1239
1433
|
* OwnedBy object reference. Can be different from CreatedBy.
|
|
1240
1434
|
*/
|
|
1241
|
-
ownedBy:
|
|
1435
|
+
ownedBy: CmsIdentity;
|
|
1436
|
+
/**
|
|
1437
|
+
* ModifiedBy object reference. Last person who modified the entry.
|
|
1438
|
+
*/
|
|
1439
|
+
modifiedBy?: CmsIdentity | null;
|
|
1242
1440
|
/**
|
|
1243
1441
|
* A string of Date.toISOString() type.
|
|
1244
1442
|
* Populated on creation.
|
|
@@ -1281,14 +1479,14 @@ export interface CmsEntry {
|
|
|
1281
1479
|
*
|
|
1282
1480
|
* @see CmsModelField
|
|
1283
1481
|
*/
|
|
1284
|
-
values:
|
|
1482
|
+
values: T;
|
|
1285
1483
|
/**
|
|
1286
1484
|
* Settings for the given entry.
|
|
1287
1485
|
*
|
|
1288
|
-
* Introduced with Advanced Publishing Workflow
|
|
1289
|
-
* Be aware that when accessing properties in it on old systems
|
|
1486
|
+
* Introduced with Advanced Publishing Workflow. Will always be inserted once this PR is merged.
|
|
1487
|
+
* Be aware that when accessing properties in it on old systems, it will break if not checked first.
|
|
1290
1488
|
*
|
|
1291
|
-
* Available only on the Manage API in entry GraphQL type meta.data property.
|
|
1489
|
+
* Available only on the Manage API in entry GraphQL type `meta.data` property.
|
|
1292
1490
|
*/
|
|
1293
1491
|
meta?: {
|
|
1294
1492
|
[key: string]: any;
|
|
@@ -1321,7 +1519,7 @@ export interface CmsModelManager {
|
|
|
1321
1519
|
*/
|
|
1322
1520
|
getPublishedByIds: (ids: string[]) => Promise<CmsEntry[]>;
|
|
1323
1521
|
/**
|
|
1324
|
-
* Get a list of latest entries by the ID list.
|
|
1522
|
+
* Get a list of the latest entries by the ID list.
|
|
1325
1523
|
*/
|
|
1326
1524
|
getLatestByIds: (ids: string[]) => Promise<CmsEntry[]>;
|
|
1327
1525
|
/**
|
|
@@ -1329,52 +1527,95 @@ export interface CmsModelManager {
|
|
|
1329
1527
|
*/
|
|
1330
1528
|
get: (id: string) => Promise<CmsEntry>;
|
|
1331
1529
|
/**
|
|
1332
|
-
* Create
|
|
1530
|
+
* Create an entry.
|
|
1333
1531
|
*/
|
|
1334
1532
|
create: (data: CreateCmsEntryInput) => Promise<CmsEntry>;
|
|
1335
1533
|
/**
|
|
1336
|
-
* Update
|
|
1534
|
+
* Update an entry.
|
|
1337
1535
|
*/
|
|
1338
1536
|
update: (id: string, data: UpdateCmsEntryInput) => Promise<CmsEntry>;
|
|
1339
1537
|
/**
|
|
1340
|
-
* Delete
|
|
1538
|
+
* Delete an entry.
|
|
1341
1539
|
*/
|
|
1342
1540
|
delete: (id: string) => Promise<void>;
|
|
1343
1541
|
}
|
|
1344
|
-
|
|
1542
|
+
/**
|
|
1543
|
+
* Create
|
|
1544
|
+
*/
|
|
1545
|
+
export interface OnModelBeforeCreateTopicParams {
|
|
1546
|
+
input: CmsModelCreateInput;
|
|
1547
|
+
model: CmsModel;
|
|
1548
|
+
}
|
|
1549
|
+
export interface OnModelAfterCreateTopicParams {
|
|
1345
1550
|
input: CmsModelCreateInput;
|
|
1346
1551
|
model: CmsModel;
|
|
1347
1552
|
}
|
|
1348
|
-
export interface
|
|
1553
|
+
export interface OnModelCreateErrorTopicParams {
|
|
1349
1554
|
input: CmsModelCreateInput;
|
|
1350
1555
|
model: CmsModel;
|
|
1556
|
+
error: Error;
|
|
1351
1557
|
}
|
|
1352
|
-
|
|
1558
|
+
/**
|
|
1559
|
+
* Create From / Clone
|
|
1560
|
+
*/
|
|
1561
|
+
export interface OnModelBeforeCreateFromTopicParams {
|
|
1562
|
+
input: CmsModelCreateInput;
|
|
1563
|
+
original: CmsModel;
|
|
1564
|
+
model: CmsModel;
|
|
1565
|
+
}
|
|
1566
|
+
export interface OnModelAfterCreateFromTopicParams {
|
|
1353
1567
|
input: CmsModelCreateInput;
|
|
1354
1568
|
original: CmsModel;
|
|
1355
1569
|
model: CmsModel;
|
|
1356
1570
|
}
|
|
1357
|
-
export interface
|
|
1571
|
+
export interface OnModelCreateFromErrorParams {
|
|
1358
1572
|
input: CmsModelCreateInput;
|
|
1359
1573
|
original: CmsModel;
|
|
1360
1574
|
model: CmsModel;
|
|
1575
|
+
error: Error;
|
|
1361
1576
|
}
|
|
1362
|
-
|
|
1577
|
+
/**
|
|
1578
|
+
* Update
|
|
1579
|
+
*/
|
|
1580
|
+
export interface OnModelBeforeUpdateTopicParams {
|
|
1363
1581
|
input: CmsModelUpdateInput;
|
|
1364
1582
|
original: CmsModel;
|
|
1365
1583
|
model: CmsModel;
|
|
1366
1584
|
}
|
|
1367
|
-
export interface
|
|
1585
|
+
export interface OnModelAfterUpdateTopicParams {
|
|
1368
1586
|
input: CmsModelUpdateInput;
|
|
1369
1587
|
original: CmsModel;
|
|
1370
1588
|
model: CmsModel;
|
|
1371
1589
|
}
|
|
1372
|
-
export interface
|
|
1590
|
+
export interface OnModelUpdateErrorTopicParams {
|
|
1591
|
+
input: CmsModelUpdateInput;
|
|
1592
|
+
original: CmsModel;
|
|
1373
1593
|
model: CmsModel;
|
|
1594
|
+
error: Error;
|
|
1374
1595
|
}
|
|
1375
|
-
|
|
1596
|
+
/**
|
|
1597
|
+
* Delete
|
|
1598
|
+
*/
|
|
1599
|
+
export interface OnModelBeforeDeleteTopicParams {
|
|
1376
1600
|
model: CmsModel;
|
|
1377
1601
|
}
|
|
1602
|
+
export interface OnModelAfterDeleteTopicParams {
|
|
1603
|
+
model: CmsModel;
|
|
1604
|
+
}
|
|
1605
|
+
export interface OnModelDeleteErrorTopicParams {
|
|
1606
|
+
model: CmsModel;
|
|
1607
|
+
error: Error;
|
|
1608
|
+
}
|
|
1609
|
+
/**
|
|
1610
|
+
* Initialize
|
|
1611
|
+
*/
|
|
1612
|
+
export interface OnModelInitializeParams {
|
|
1613
|
+
model: CmsModel;
|
|
1614
|
+
data: Record<string, any>;
|
|
1615
|
+
}
|
|
1616
|
+
/**
|
|
1617
|
+
*
|
|
1618
|
+
*/
|
|
1378
1619
|
export interface CmsModelUpdateDirectParams {
|
|
1379
1620
|
model: CmsModel;
|
|
1380
1621
|
original: CmsModel;
|
|
@@ -1416,7 +1657,14 @@ export interface CmsModelContext {
|
|
|
1416
1657
|
*/
|
|
1417
1658
|
deleteModel: (modelId: string) => Promise<void>;
|
|
1418
1659
|
/**
|
|
1419
|
-
*
|
|
1660
|
+
* Possibility for users to trigger the model initialization.
|
|
1661
|
+
* They can hook into it and do what ever they want to.
|
|
1662
|
+
*
|
|
1663
|
+
* Primary idea behind this is creating the index, for the code models, in the ES.
|
|
1664
|
+
*/
|
|
1665
|
+
initializeModel: (modelId: string, data: Record<string, any>) => Promise<boolean>;
|
|
1666
|
+
/**
|
|
1667
|
+
* Get an instance of CmsModelManager for given content modelId.
|
|
1420
1668
|
*
|
|
1421
1669
|
* @see CmsModelManager
|
|
1422
1670
|
*
|
|
@@ -1436,23 +1684,63 @@ export interface CmsModelContext {
|
|
|
1436
1684
|
*/
|
|
1437
1685
|
clearModelsCache: () => void;
|
|
1438
1686
|
/**
|
|
1439
|
-
*
|
|
1687
|
+
* Lifecycle events - deprecated.
|
|
1688
|
+
*/
|
|
1689
|
+
/**
|
|
1690
|
+
* @deprecated
|
|
1691
|
+
*/
|
|
1692
|
+
onBeforeModelCreate: Topic<OnModelBeforeCreateTopicParams>;
|
|
1693
|
+
/**
|
|
1694
|
+
* @deprecated
|
|
1695
|
+
*/
|
|
1696
|
+
onAfterModelCreate: Topic<OnModelAfterCreateTopicParams>;
|
|
1697
|
+
/**
|
|
1698
|
+
* @deprecated
|
|
1699
|
+
*/
|
|
1700
|
+
onBeforeModelCreateFrom: Topic<OnModelBeforeCreateFromTopicParams>;
|
|
1701
|
+
/**
|
|
1702
|
+
* @deprecated
|
|
1703
|
+
*/
|
|
1704
|
+
onAfterModelCreateFrom: Topic<OnModelAfterCreateFromTopicParams>;
|
|
1705
|
+
/**
|
|
1706
|
+
* @deprecated
|
|
1707
|
+
*/
|
|
1708
|
+
onBeforeModelUpdate: Topic<OnModelBeforeUpdateTopicParams>;
|
|
1709
|
+
/**
|
|
1710
|
+
* @deprecated
|
|
1440
1711
|
*/
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1712
|
+
onAfterModelUpdate: Topic<OnModelAfterUpdateTopicParams>;
|
|
1713
|
+
/**
|
|
1714
|
+
* @deprecated
|
|
1715
|
+
*/
|
|
1716
|
+
onBeforeModelDelete: Topic<OnModelBeforeDeleteTopicParams>;
|
|
1717
|
+
/**
|
|
1718
|
+
* @deprecated
|
|
1719
|
+
*/
|
|
1720
|
+
onAfterModelDelete: Topic<OnModelAfterDeleteTopicParams>;
|
|
1721
|
+
/**
|
|
1722
|
+
* Lifecycle events - released in 5.33.0
|
|
1723
|
+
*/
|
|
1724
|
+
onModelBeforeCreate: Topic<OnModelBeforeCreateTopicParams>;
|
|
1725
|
+
onModelAfterCreate: Topic<OnModelAfterCreateTopicParams>;
|
|
1726
|
+
onModelCreateError: Topic<OnModelCreateErrorTopicParams>;
|
|
1727
|
+
onModelBeforeCreateFrom: Topic<OnModelBeforeCreateFromTopicParams>;
|
|
1728
|
+
onModelAfterCreateFrom: Topic<OnModelAfterCreateFromTopicParams>;
|
|
1729
|
+
onModelCreateFromError: Topic<OnModelCreateFromErrorParams>;
|
|
1730
|
+
onModelBeforeUpdate: Topic<OnModelBeforeUpdateTopicParams>;
|
|
1731
|
+
onModelAfterUpdate: Topic<OnModelAfterUpdateTopicParams>;
|
|
1732
|
+
onModelUpdateError: Topic<OnModelUpdateErrorTopicParams>;
|
|
1733
|
+
onModelBeforeDelete: Topic<OnModelBeforeDeleteTopicParams>;
|
|
1734
|
+
onModelAfterDelete: Topic<OnModelAfterDeleteTopicParams>;
|
|
1735
|
+
onModelDeleteError: Topic<OnModelDeleteErrorTopicParams>;
|
|
1736
|
+
onModelInitialize: Topic<OnModelInitializeParams>;
|
|
1449
1737
|
}
|
|
1450
1738
|
/**
|
|
1451
1739
|
* Available statuses for content entry.
|
|
1452
1740
|
*
|
|
1453
1741
|
* @category CmsEntry
|
|
1454
1742
|
*/
|
|
1455
|
-
export declare type CmsEntryStatus = "published" | "unpublished" | "
|
|
1743
|
+
export declare type CmsEntryStatus = "published" | "unpublished" | "draft";
|
|
1456
1744
|
export interface CmsEntryListWhereRef {
|
|
1457
1745
|
id?: string;
|
|
1458
1746
|
id_in?: string[];
|
|
@@ -1530,7 +1818,12 @@ export interface CmsEntryListWhere {
|
|
|
1530
1818
|
/**
|
|
1531
1819
|
* This is to allow querying by any content model field defined by the user.
|
|
1532
1820
|
*/
|
|
1533
|
-
[key: string]:
|
|
1821
|
+
[key: string]: string | number | boolean | undefined | string[] | number[] | null | CmsEntryListWhere[] | CmsEntryListWhere | CmsEntryListWhereRef;
|
|
1822
|
+
/**
|
|
1823
|
+
* To allow querying via nested queries, we added the AND / OR properties.
|
|
1824
|
+
*/
|
|
1825
|
+
AND?: CmsEntryListWhere[];
|
|
1826
|
+
OR?: CmsEntryListWhere[];
|
|
1534
1827
|
}
|
|
1535
1828
|
/**
|
|
1536
1829
|
* Entry listing sort.
|
|
@@ -1583,108 +1876,162 @@ export interface CmsEntryMeta {
|
|
|
1583
1876
|
*/
|
|
1584
1877
|
totalCount: number;
|
|
1585
1878
|
}
|
|
1586
|
-
|
|
1879
|
+
/**
|
|
1880
|
+
* Create
|
|
1881
|
+
*/
|
|
1882
|
+
export interface OnEntryBeforeCreateTopicParams {
|
|
1587
1883
|
input: CreateCmsEntryInput;
|
|
1588
1884
|
entry: CmsEntry;
|
|
1589
|
-
model:
|
|
1885
|
+
model: CmsModel;
|
|
1590
1886
|
}
|
|
1591
|
-
export interface
|
|
1887
|
+
export interface OnEntryAfterCreateTopicParams {
|
|
1592
1888
|
input: CreateCmsEntryInput;
|
|
1593
1889
|
entry: CmsEntry;
|
|
1594
|
-
model:
|
|
1890
|
+
model: CmsModel;
|
|
1595
1891
|
storageEntry: CmsEntry;
|
|
1596
1892
|
}
|
|
1597
|
-
export interface
|
|
1893
|
+
export interface OnEntryCreateErrorTopicParams {
|
|
1894
|
+
error: Error;
|
|
1895
|
+
input: CreateCmsEntryInput;
|
|
1896
|
+
entry: CmsEntry;
|
|
1897
|
+
model: CmsModel;
|
|
1898
|
+
}
|
|
1899
|
+
/**
|
|
1900
|
+
* Revision Create
|
|
1901
|
+
*/
|
|
1902
|
+
export interface OnEntryRevisionBeforeCreateTopicParams {
|
|
1598
1903
|
input: CreateFromCmsEntryInput;
|
|
1599
1904
|
entry: CmsEntry;
|
|
1600
1905
|
original: CmsEntry;
|
|
1601
|
-
model:
|
|
1906
|
+
model: CmsModel;
|
|
1602
1907
|
}
|
|
1603
|
-
export interface
|
|
1908
|
+
export interface OnEntryRevisionAfterCreateTopicParams {
|
|
1604
1909
|
input: CreateFromCmsEntryInput;
|
|
1605
1910
|
entry: CmsEntry;
|
|
1606
1911
|
original: CmsEntry;
|
|
1607
|
-
model:
|
|
1912
|
+
model: CmsModel;
|
|
1608
1913
|
storageEntry: CmsEntry;
|
|
1609
1914
|
}
|
|
1610
|
-
export interface
|
|
1915
|
+
export interface OnEntryCreateRevisionErrorTopicParams {
|
|
1916
|
+
error: Error;
|
|
1917
|
+
input: CreateFromCmsEntryInput;
|
|
1918
|
+
original: CmsEntry;
|
|
1919
|
+
entry: CmsEntry;
|
|
1920
|
+
model: CmsModel;
|
|
1921
|
+
}
|
|
1922
|
+
/**
|
|
1923
|
+
* Update
|
|
1924
|
+
*/
|
|
1925
|
+
export interface OnEntryBeforeUpdateTopicParams {
|
|
1611
1926
|
input: UpdateCmsEntryInput;
|
|
1612
1927
|
original: CmsEntry;
|
|
1613
1928
|
entry: CmsEntry;
|
|
1614
|
-
model:
|
|
1929
|
+
model: CmsModel;
|
|
1615
1930
|
}
|
|
1616
|
-
export interface
|
|
1931
|
+
export interface OnEntryAfterUpdateTopicParams {
|
|
1617
1932
|
input: UpdateCmsEntryInput;
|
|
1618
1933
|
original: CmsEntry;
|
|
1619
1934
|
entry: CmsEntry;
|
|
1620
|
-
model:
|
|
1935
|
+
model: CmsModel;
|
|
1621
1936
|
storageEntry: CmsEntry;
|
|
1622
1937
|
}
|
|
1623
|
-
export interface
|
|
1938
|
+
export interface OnEntryUpdateErrorTopicParams {
|
|
1939
|
+
error: Error;
|
|
1940
|
+
input: CreateFromCmsEntryInput;
|
|
1624
1941
|
entry: CmsEntry;
|
|
1625
|
-
model:
|
|
1942
|
+
model: CmsModel;
|
|
1626
1943
|
}
|
|
1627
|
-
|
|
1944
|
+
/**
|
|
1945
|
+
* Publish
|
|
1946
|
+
*/
|
|
1947
|
+
export interface OnEntryBeforePublishTopicParams {
|
|
1628
1948
|
entry: CmsEntry;
|
|
1629
|
-
model:
|
|
1949
|
+
model: CmsModel;
|
|
1950
|
+
}
|
|
1951
|
+
export interface OnEntryAfterPublishTopicParams {
|
|
1952
|
+
entry: CmsEntry;
|
|
1953
|
+
model: CmsModel;
|
|
1630
1954
|
storageEntry: CmsEntry;
|
|
1631
1955
|
}
|
|
1632
|
-
export interface
|
|
1956
|
+
export interface OnEntryPublishErrorTopicParams {
|
|
1957
|
+
error: Error;
|
|
1958
|
+
entry: CmsEntry;
|
|
1959
|
+
model: CmsModel;
|
|
1960
|
+
}
|
|
1961
|
+
/**
|
|
1962
|
+
* Republish
|
|
1963
|
+
*/
|
|
1964
|
+
export interface OnEntryBeforeRepublishTopicParams {
|
|
1633
1965
|
entry: CmsEntry;
|
|
1634
|
-
model:
|
|
1966
|
+
model: CmsModel;
|
|
1635
1967
|
}
|
|
1636
|
-
export interface
|
|
1968
|
+
export interface OnEntryAfterRepublishTopicParams {
|
|
1637
1969
|
entry: CmsEntry;
|
|
1638
|
-
model:
|
|
1970
|
+
model: CmsModel;
|
|
1639
1971
|
storageEntry: CmsEntry;
|
|
1640
1972
|
}
|
|
1641
|
-
export interface
|
|
1973
|
+
export interface OnEntryRepublishErrorTopicParams {
|
|
1974
|
+
error: Error;
|
|
1642
1975
|
entry: CmsEntry;
|
|
1643
|
-
model:
|
|
1976
|
+
model: CmsModel;
|
|
1644
1977
|
}
|
|
1645
|
-
|
|
1978
|
+
/**
|
|
1979
|
+
* Unpublish
|
|
1980
|
+
*/
|
|
1981
|
+
export interface OnEntryBeforeUnpublishTopicParams {
|
|
1646
1982
|
entry: CmsEntry;
|
|
1647
|
-
model:
|
|
1983
|
+
model: CmsModel;
|
|
1984
|
+
}
|
|
1985
|
+
export interface OnEntryAfterUnpublishTopicParams {
|
|
1986
|
+
entry: CmsEntry;
|
|
1987
|
+
model: CmsModel;
|
|
1648
1988
|
storageEntry: CmsEntry;
|
|
1649
1989
|
}
|
|
1650
|
-
export interface
|
|
1990
|
+
export interface OnEntryUnpublishErrorTopicParams {
|
|
1991
|
+
error: Error;
|
|
1651
1992
|
entry: CmsEntry;
|
|
1652
|
-
model:
|
|
1993
|
+
model: CmsModel;
|
|
1653
1994
|
}
|
|
1654
|
-
export interface
|
|
1995
|
+
export interface OnEntryBeforeDeleteTopicParams {
|
|
1655
1996
|
entry: CmsEntry;
|
|
1656
|
-
model:
|
|
1657
|
-
storageEntry: CmsEntry;
|
|
1997
|
+
model: CmsModel;
|
|
1658
1998
|
}
|
|
1659
|
-
export interface
|
|
1999
|
+
export interface OnEntryAfterDeleteTopicParams {
|
|
1660
2000
|
entry: CmsEntry;
|
|
1661
|
-
model:
|
|
2001
|
+
model: CmsModel;
|
|
1662
2002
|
}
|
|
1663
|
-
export interface
|
|
2003
|
+
export interface OnEntryDeleteErrorTopicParams {
|
|
2004
|
+
error: Error;
|
|
1664
2005
|
entry: CmsEntry;
|
|
1665
|
-
model:
|
|
2006
|
+
model: CmsModel;
|
|
1666
2007
|
}
|
|
1667
|
-
export interface
|
|
2008
|
+
export interface OnEntryRevisionBeforeDeleteTopicParams {
|
|
1668
2009
|
entry: CmsEntry;
|
|
1669
|
-
model:
|
|
2010
|
+
model: CmsModel;
|
|
1670
2011
|
}
|
|
1671
|
-
export interface
|
|
2012
|
+
export interface OnEntryRevisionAfterDeleteTopicParams {
|
|
1672
2013
|
entry: CmsEntry;
|
|
1673
|
-
model:
|
|
2014
|
+
model: CmsModel;
|
|
1674
2015
|
}
|
|
1675
|
-
export interface
|
|
1676
|
-
|
|
2016
|
+
export interface OnEntryRevisionDeleteErrorTopicParams {
|
|
2017
|
+
error: Error;
|
|
2018
|
+
entry: CmsEntry;
|
|
2019
|
+
model: CmsModel;
|
|
2020
|
+
}
|
|
2021
|
+
export interface OnEntryBeforeGetTopicParams {
|
|
2022
|
+
model: CmsModel;
|
|
1677
2023
|
where: CmsEntryListWhere;
|
|
1678
2024
|
}
|
|
1679
|
-
export interface
|
|
2025
|
+
export interface EntryBeforeListTopicParams {
|
|
1680
2026
|
where: CmsEntryListWhere;
|
|
1681
|
-
model:
|
|
2027
|
+
model: CmsModel;
|
|
1682
2028
|
}
|
|
1683
2029
|
/**
|
|
1684
2030
|
* @category Context
|
|
1685
2031
|
* @category CmsEntry
|
|
1686
2032
|
*/
|
|
1687
2033
|
export interface CreateCmsEntryInput {
|
|
2034
|
+
id?: string;
|
|
1688
2035
|
[key: string]: any;
|
|
1689
2036
|
}
|
|
1690
2037
|
/**
|
|
@@ -1701,6 +2048,14 @@ export interface CreateFromCmsEntryInput {
|
|
|
1701
2048
|
export interface UpdateCmsEntryInput {
|
|
1702
2049
|
[key: string]: any;
|
|
1703
2050
|
}
|
|
2051
|
+
/**
|
|
2052
|
+
* @category Context
|
|
2053
|
+
* @category CmsEntry
|
|
2054
|
+
*/
|
|
2055
|
+
export interface GetUniqueFieldValuesParams {
|
|
2056
|
+
where: CmsEntryListWhere;
|
|
2057
|
+
fieldId: string;
|
|
2058
|
+
}
|
|
1704
2059
|
/**
|
|
1705
2060
|
* Cms Entry CRUD methods in the context.
|
|
1706
2061
|
*
|
|
@@ -1725,7 +2080,7 @@ export interface CmsEntryContext {
|
|
|
1725
2080
|
*/
|
|
1726
2081
|
listEntries: (model: CmsModel, params: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
1727
2082
|
/**
|
|
1728
|
-
* Lists latest entries. Used for manage API.
|
|
2083
|
+
* Lists the latest entries. Used for manage API.
|
|
1729
2084
|
*/
|
|
1730
2085
|
listLatestEntries: (model: CmsModel, params?: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
1731
2086
|
/**
|
|
@@ -1774,40 +2129,111 @@ export interface CmsEntryContext {
|
|
|
1774
2129
|
*/
|
|
1775
2130
|
unpublishEntry: (model: CmsModel, id: string) => Promise<CmsEntry>;
|
|
1776
2131
|
/**
|
|
1777
|
-
*
|
|
2132
|
+
* Get all entry revisions.
|
|
1778
2133
|
*/
|
|
1779
|
-
|
|
2134
|
+
getEntryRevisions: (model: CmsModel, id: string) => Promise<CmsEntry[]>;
|
|
1780
2135
|
/**
|
|
1781
|
-
*
|
|
2136
|
+
* List all unique values for a given field.
|
|
2137
|
+
*
|
|
2138
|
+
* @internal
|
|
1782
2139
|
*/
|
|
1783
|
-
|
|
2140
|
+
getUniqueFieldValues: (model: CmsModel, params: GetUniqueFieldValuesParams) => Promise<string[]>;
|
|
1784
2141
|
/**
|
|
1785
|
-
*
|
|
2142
|
+
* Lifecycle events - deprecated.
|
|
1786
2143
|
*/
|
|
1787
|
-
getEntryRevisions: (model: CmsModel, id: string) => Promise<CmsEntry[]>;
|
|
1788
2144
|
/**
|
|
1789
|
-
*
|
|
1790
|
-
*/
|
|
1791
|
-
onBeforeEntryCreate: Topic<
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
2145
|
+
* @deprecated
|
|
2146
|
+
*/
|
|
2147
|
+
onBeforeEntryCreate: Topic<OnEntryBeforeCreateTopicParams>;
|
|
2148
|
+
/**
|
|
2149
|
+
* @deprecated
|
|
2150
|
+
*/
|
|
2151
|
+
onAfterEntryCreate: Topic<OnEntryAfterCreateTopicParams>;
|
|
2152
|
+
/**
|
|
2153
|
+
* @deprecated
|
|
2154
|
+
*/
|
|
2155
|
+
onBeforeEntryCreateRevision: Topic<OnEntryRevisionBeforeCreateTopicParams>;
|
|
2156
|
+
/**
|
|
2157
|
+
* @deprecated
|
|
2158
|
+
*/
|
|
2159
|
+
onAfterEntryCreateRevision: Topic<OnEntryRevisionAfterCreateTopicParams>;
|
|
2160
|
+
/**
|
|
2161
|
+
* @deprecated
|
|
2162
|
+
*/
|
|
2163
|
+
onBeforeEntryUpdate: Topic<OnEntryBeforeUpdateTopicParams>;
|
|
2164
|
+
/**
|
|
2165
|
+
* @deprecated
|
|
2166
|
+
*/
|
|
2167
|
+
onAfterEntryUpdate: Topic<OnEntryAfterUpdateTopicParams>;
|
|
2168
|
+
/**
|
|
2169
|
+
* @deprecated
|
|
2170
|
+
*/
|
|
2171
|
+
onBeforeEntryDelete: Topic<OnEntryBeforeDeleteTopicParams>;
|
|
2172
|
+
/**
|
|
2173
|
+
* @deprecated
|
|
2174
|
+
*/
|
|
2175
|
+
onAfterEntryDelete: Topic<OnEntryAfterDeleteTopicParams>;
|
|
2176
|
+
/**
|
|
2177
|
+
* @deprecated
|
|
2178
|
+
*/
|
|
2179
|
+
onBeforeEntryDeleteRevision: Topic<OnEntryRevisionBeforeDeleteTopicParams>;
|
|
2180
|
+
/**
|
|
2181
|
+
* @deprecated
|
|
2182
|
+
*/
|
|
2183
|
+
onAfterEntryDeleteRevision: Topic<OnEntryRevisionAfterDeleteTopicParams>;
|
|
2184
|
+
/**
|
|
2185
|
+
* @deprecated
|
|
2186
|
+
*/
|
|
2187
|
+
onBeforeEntryPublish: Topic<OnEntryBeforePublishTopicParams>;
|
|
2188
|
+
/**
|
|
2189
|
+
* @deprecated
|
|
2190
|
+
*/
|
|
2191
|
+
onAfterEntryPublish: Topic<OnEntryAfterPublishTopicParams>;
|
|
2192
|
+
/**
|
|
2193
|
+
* @deprecated
|
|
2194
|
+
*/
|
|
2195
|
+
onBeforeEntryUnpublish: Topic<OnEntryBeforeUnpublishTopicParams>;
|
|
2196
|
+
/**
|
|
2197
|
+
* @deprecated
|
|
2198
|
+
*/
|
|
2199
|
+
onAfterEntryUnpublish: Topic<OnEntryAfterUnpublishTopicParams>;
|
|
2200
|
+
/**
|
|
2201
|
+
* @deprecated
|
|
2202
|
+
*/
|
|
2203
|
+
onBeforeEntryGet: Topic<OnEntryBeforeGetTopicParams>;
|
|
2204
|
+
/**
|
|
2205
|
+
* @deprecated
|
|
2206
|
+
*/
|
|
2207
|
+
onBeforeEntryList: Topic<EntryBeforeListTopicParams>;
|
|
2208
|
+
/**
|
|
2209
|
+
* Lifecycle events released in 5.33.0
|
|
2210
|
+
*/
|
|
2211
|
+
onEntryBeforeCreate: Topic<OnEntryBeforeCreateTopicParams>;
|
|
2212
|
+
onEntryAfterCreate: Topic<OnEntryAfterCreateTopicParams>;
|
|
2213
|
+
onEntryCreateError: Topic<OnEntryCreateErrorTopicParams>;
|
|
2214
|
+
onEntryRevisionBeforeCreate: Topic<OnEntryRevisionBeforeCreateTopicParams>;
|
|
2215
|
+
onEntryRevisionAfterCreate: Topic<OnEntryRevisionAfterCreateTopicParams>;
|
|
2216
|
+
onEntryRevisionCreateError: Topic<OnEntryCreateRevisionErrorTopicParams>;
|
|
2217
|
+
onEntryBeforeUpdate: Topic<OnEntryBeforeUpdateTopicParams>;
|
|
2218
|
+
onEntryAfterUpdate: Topic<OnEntryAfterUpdateTopicParams>;
|
|
2219
|
+
onEntryUpdateError: Topic<OnEntryUpdateErrorTopicParams>;
|
|
2220
|
+
onEntryBeforeDelete: Topic<OnEntryBeforeDeleteTopicParams>;
|
|
2221
|
+
onEntryAfterDelete: Topic<OnEntryAfterDeleteTopicParams>;
|
|
2222
|
+
onEntryDeleteError: Topic<OnEntryDeleteErrorTopicParams>;
|
|
2223
|
+
onEntryRevisionBeforeDelete: Topic<OnEntryRevisionBeforeDeleteTopicParams>;
|
|
2224
|
+
onEntryRevisionAfterDelete: Topic<OnEntryRevisionAfterDeleteTopicParams>;
|
|
2225
|
+
onEntryRevisionDeleteError: Topic<OnEntryRevisionDeleteErrorTopicParams>;
|
|
2226
|
+
onEntryBeforePublish: Topic<OnEntryBeforePublishTopicParams>;
|
|
2227
|
+
onEntryAfterPublish: Topic<OnEntryAfterPublishTopicParams>;
|
|
2228
|
+
onEntryPublishError: Topic<OnEntryPublishErrorTopicParams>;
|
|
2229
|
+
onEntryBeforeRepublish: Topic<OnEntryBeforeRepublishTopicParams>;
|
|
2230
|
+
onEntryAfterRepublish: Topic<OnEntryAfterRepublishTopicParams>;
|
|
2231
|
+
onEntryRepublishError: Topic<OnEntryRepublishErrorTopicParams>;
|
|
2232
|
+
onEntryBeforeUnpublish: Topic<OnEntryBeforeUnpublishTopicParams>;
|
|
2233
|
+
onEntryAfterUnpublish: Topic<OnEntryAfterUnpublishTopicParams>;
|
|
2234
|
+
onEntryUnpublishError: Topic<OnEntryUnpublishErrorTopicParams>;
|
|
2235
|
+
onEntryBeforeGet: Topic<OnEntryBeforeGetTopicParams>;
|
|
2236
|
+
onEntryBeforeList: Topic<EntryBeforeListTopicParams>;
|
|
1811
2237
|
}
|
|
1812
2238
|
/**
|
|
1813
2239
|
* Parameters for CmsEntryResolverFactory.
|
|
@@ -1851,13 +2277,13 @@ export interface BaseCmsSecurityPermission extends SecurityPermission {
|
|
|
1851
2277
|
*/
|
|
1852
2278
|
export interface CmsModelPermission extends BaseCmsSecurityPermission {
|
|
1853
2279
|
/**
|
|
1854
|
-
*
|
|
2280
|
+
* An object representing `key: model.modelId` values where key is locale code.
|
|
1855
2281
|
*/
|
|
1856
2282
|
models?: {
|
|
1857
2283
|
[key: string]: string[];
|
|
1858
2284
|
};
|
|
1859
2285
|
/**
|
|
1860
|
-
*
|
|
2286
|
+
* {locale: groupId[]} map, where key is a locale code.
|
|
1861
2287
|
*/
|
|
1862
2288
|
groups?: {
|
|
1863
2289
|
[key: string]: string[];
|
|
@@ -1871,7 +2297,7 @@ export interface CmsModelPermission extends BaseCmsSecurityPermission {
|
|
|
1871
2297
|
*/
|
|
1872
2298
|
export interface CmsGroupPermission extends BaseCmsSecurityPermission {
|
|
1873
2299
|
/**
|
|
1874
|
-
*
|
|
2300
|
+
* {locale: groupId[]} map, where key is a locale code.
|
|
1875
2301
|
*/
|
|
1876
2302
|
groups?: {
|
|
1877
2303
|
[key: string]: string[];
|
|
@@ -1886,13 +2312,13 @@ export interface CmsGroupPermission extends BaseCmsSecurityPermission {
|
|
|
1886
2312
|
export interface CmsEntryPermission extends BaseCmsSecurityPermission {
|
|
1887
2313
|
pw?: string;
|
|
1888
2314
|
/**
|
|
1889
|
-
*
|
|
2315
|
+
* An object representing `key: model.modelId` values where key is locale code.
|
|
1890
2316
|
*/
|
|
1891
2317
|
models?: {
|
|
1892
2318
|
[key: string]: string[];
|
|
1893
2319
|
};
|
|
1894
2320
|
/**
|
|
1895
|
-
*
|
|
2321
|
+
* {locale: groupId[]} map, where key is a locale code.
|
|
1896
2322
|
*/
|
|
1897
2323
|
groups?: {
|
|
1898
2324
|
[key: string]: string[];
|
|
@@ -2007,7 +2433,7 @@ export interface CmsEntryStorageOperationsListParams {
|
|
|
2007
2433
|
sort?: CmsEntryListSort;
|
|
2008
2434
|
search?: string;
|
|
2009
2435
|
fields?: string[];
|
|
2010
|
-
limit
|
|
2436
|
+
limit: number;
|
|
2011
2437
|
after?: string | null;
|
|
2012
2438
|
}
|
|
2013
2439
|
export interface CmsEntryStorageOperationsCreateParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
@@ -2085,25 +2511,9 @@ export interface CmsEntryStorageOperationsUnpublishParams<T extends CmsStorageEn
|
|
|
2085
2511
|
*/
|
|
2086
2512
|
storageEntry: T;
|
|
2087
2513
|
}
|
|
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;
|
|
2514
|
+
export interface CmsEntryStorageOperationsGetUniqueFieldValuesParams {
|
|
2515
|
+
where: CmsEntryListWhere;
|
|
2516
|
+
fieldId: string;
|
|
2107
2517
|
}
|
|
2108
2518
|
export interface CmsEntryStorageOperationsGetByIdsParams {
|
|
2109
2519
|
ids: readonly string[];
|
|
@@ -2161,86 +2571,82 @@ export interface CmsEntryStorageOperations<T extends CmsStorageEntry = CmsStorag
|
|
|
2161
2571
|
/**
|
|
2162
2572
|
* Get all the entries of the ids.
|
|
2163
2573
|
*/
|
|
2164
|
-
getByIds: (model:
|
|
2574
|
+
getByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetByIdsParams) => Promise<T[]>;
|
|
2165
2575
|
/**
|
|
2166
2576
|
* Get all the published entries of the ids.
|
|
2167
2577
|
*/
|
|
2168
|
-
getPublishedByIds: (model:
|
|
2578
|
+
getPublishedByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetPublishedByIdsParams) => Promise<T[]>;
|
|
2169
2579
|
/**
|
|
2170
2580
|
* Get all the latest entries of the ids.
|
|
2171
2581
|
*/
|
|
2172
|
-
getLatestByIds: (model:
|
|
2582
|
+
getLatestByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetLatestByIdsParams) => Promise<T[]>;
|
|
2173
2583
|
/**
|
|
2174
2584
|
* Get all revisions of the given entry id.
|
|
2175
2585
|
*/
|
|
2176
|
-
getRevisions: (model:
|
|
2586
|
+
getRevisions: (model: CmsModel, params: CmsEntryStorageOperationsGetRevisionsParams) => Promise<T[]>;
|
|
2177
2587
|
/**
|
|
2178
2588
|
* Get the entry by the given revision id.
|
|
2179
2589
|
*/
|
|
2180
|
-
getRevisionById: (model:
|
|
2590
|
+
getRevisionById: (model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams) => Promise<T | null>;
|
|
2181
2591
|
/**
|
|
2182
2592
|
* Get the published entry by given entryId.
|
|
2183
2593
|
*/
|
|
2184
|
-
getPublishedRevisionByEntryId: (model:
|
|
2594
|
+
getPublishedRevisionByEntryId: (model: CmsModel, params: CmsEntryStorageOperationsGetPublishedRevisionParams) => Promise<T | null>;
|
|
2185
2595
|
/**
|
|
2186
2596
|
* Get the latest entry by given entryId.
|
|
2187
2597
|
*/
|
|
2188
|
-
getLatestRevisionByEntryId: (model:
|
|
2598
|
+
getLatestRevisionByEntryId: (model: CmsModel, params: CmsEntryStorageOperationsGetLatestRevisionParams) => Promise<T | null>;
|
|
2189
2599
|
/**
|
|
2190
2600
|
* Get the revision of the entry before given one.
|
|
2191
2601
|
*/
|
|
2192
|
-
getPreviousRevision: (model:
|
|
2602
|
+
getPreviousRevision: (model: CmsModel, params: CmsEntryStorageOperationsGetPreviousRevisionParams) => Promise<T | null>;
|
|
2193
2603
|
/**
|
|
2194
2604
|
* Gets entry by given params.
|
|
2195
2605
|
*/
|
|
2196
|
-
get: (model:
|
|
2606
|
+
get: (model: CmsModel, params: CmsEntryStorageOperationsGetParams) => Promise<T | null>;
|
|
2197
2607
|
/**
|
|
2198
2608
|
* List all entries. Filterable via params.
|
|
2199
2609
|
*/
|
|
2200
|
-
list: (model:
|
|
2610
|
+
list: (model: CmsModel, params: CmsEntryStorageOperationsListParams) => Promise<CmsEntryStorageOperationsListResponse<T>>;
|
|
2201
2611
|
/**
|
|
2202
2612
|
* Create a new entry.
|
|
2203
2613
|
*/
|
|
2204
|
-
create: (model:
|
|
2614
|
+
create: (model: CmsModel, params: CmsEntryStorageOperationsCreateParams<T>) => Promise<T>;
|
|
2205
2615
|
/**
|
|
2206
2616
|
* Create a new entry from existing one.
|
|
2207
2617
|
*/
|
|
2208
|
-
createRevisionFrom: (model:
|
|
2618
|
+
createRevisionFrom: (model: CmsModel, params: CmsEntryStorageOperationsCreateRevisionFromParams<T>) => Promise<T>;
|
|
2209
2619
|
/**
|
|
2210
2620
|
* Update existing entry.
|
|
2211
2621
|
*/
|
|
2212
|
-
update: (model:
|
|
2622
|
+
update: (model: CmsModel, params: CmsEntryStorageOperationsUpdateParams<T>) => Promise<T>;
|
|
2213
2623
|
/**
|
|
2214
2624
|
* Delete the entry revision.
|
|
2215
2625
|
*/
|
|
2216
|
-
deleteRevision: (model:
|
|
2626
|
+
deleteRevision: (model: CmsModel, params: CmsEntryStorageOperationsDeleteRevisionParams<T>) => Promise<void>;
|
|
2217
2627
|
/**
|
|
2218
2628
|
* Delete the entry.
|
|
2219
2629
|
*/
|
|
2220
|
-
delete: (model:
|
|
2630
|
+
delete: (model: CmsModel, params: CmsEntryStorageOperationsDeleteParams) => Promise<void>;
|
|
2221
2631
|
/**
|
|
2222
2632
|
* Publish the entry.
|
|
2223
2633
|
*/
|
|
2224
|
-
publish: (model:
|
|
2634
|
+
publish: (model: CmsModel, params: CmsEntryStorageOperationsPublishParams<T>) => Promise<T>;
|
|
2225
2635
|
/**
|
|
2226
2636
|
* Unpublish the entry.
|
|
2227
2637
|
*/
|
|
2228
|
-
unpublish: (model:
|
|
2229
|
-
/**
|
|
2230
|
-
* Request changes the entry.
|
|
2231
|
-
*/
|
|
2232
|
-
requestChanges: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsRequestChangesParams<T>) => Promise<T>;
|
|
2638
|
+
unpublish: (model: CmsModel, params: CmsEntryStorageOperationsUnpublishParams<T>) => Promise<T>;
|
|
2233
2639
|
/**
|
|
2234
|
-
*
|
|
2640
|
+
* Method to list all the unique values for the given field id.
|
|
2641
|
+
* Simplest use case would be to aggregate tags for some content.
|
|
2642
|
+
* @internal
|
|
2235
2643
|
*/
|
|
2236
|
-
|
|
2644
|
+
getUniqueFieldValues: (model: CmsModel, params: CmsEntryStorageOperationsGetUniqueFieldValuesParams) => Promise<string[]>;
|
|
2237
2645
|
}
|
|
2238
2646
|
export declare enum CONTENT_ENTRY_STATUS {
|
|
2239
2647
|
DRAFT = "draft",
|
|
2240
2648
|
PUBLISHED = "published",
|
|
2241
|
-
UNPUBLISHED = "unpublished"
|
|
2242
|
-
CHANGES_REQUESTED = "changesRequested",
|
|
2243
|
-
REVIEW_REQUESTED = "reviewRequested"
|
|
2649
|
+
UNPUBLISHED = "unpublished"
|
|
2244
2650
|
}
|
|
2245
2651
|
export interface CmsSettingsStorageOperationsGetParams {
|
|
2246
2652
|
locale: string;
|
|
@@ -2297,7 +2703,8 @@ export interface CmsSystemStorageOperations {
|
|
|
2297
2703
|
*/
|
|
2298
2704
|
update: (params: CmsSystemStorageOperationsUpdateParams) => Promise<CmsSystem>;
|
|
2299
2705
|
}
|
|
2300
|
-
export interface HeadlessCmsStorageOperations {
|
|
2706
|
+
export interface HeadlessCmsStorageOperations<C = CmsContext> {
|
|
2707
|
+
name: string;
|
|
2301
2708
|
system: CmsSystemStorageOperations;
|
|
2302
2709
|
settings: CmsSettingsStorageOperations;
|
|
2303
2710
|
groups: CmsGroupStorageOperations;
|
|
@@ -2306,11 +2713,7 @@ export interface HeadlessCmsStorageOperations {
|
|
|
2306
2713
|
/**
|
|
2307
2714
|
* Either attach something from the storage operations or run something in it.
|
|
2308
2715
|
*/
|
|
2309
|
-
beforeInit
|
|
2310
|
-
init?: (context:
|
|
2311
|
-
/**
|
|
2312
|
-
* An upgrade to run if necessary.
|
|
2313
|
-
*/
|
|
2314
|
-
upgrade?: UpgradePlugin | null;
|
|
2716
|
+
beforeInit: (context: C) => Promise<void>;
|
|
2717
|
+
init?: (context: C) => Promise<void>;
|
|
2315
2718
|
}
|
|
2316
2719
|
export {};
|