@webiny/api-headless-cms 0.0.0-unstable.aad28a72ae → 0.0.0-unstable.acacc54f0e
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 +94 -24
- package/context.js.map +1 -1
- package/crud/contentEntry/afterDelete.js +0 -5
- package/crud/contentEntry/afterDelete.js.map +1 -1
- package/crud/contentEntry/beforeCreate.js +0 -3
- package/crud/contentEntry/beforeCreate.js.map +1 -1
- package/crud/contentEntry/beforeUpdate.js +0 -3
- package/crud/contentEntry/beforeUpdate.js.map +1 -1
- package/crud/contentEntry/entryDataValidation.js +1 -40
- package/crud/contentEntry/entryDataValidation.js.map +1 -1
- package/crud/contentEntry/markLockedFields.d.ts +1 -1
- package/crud/contentEntry/markLockedFields.js +15 -28
- package/crud/contentEntry/markLockedFields.js.map +1 -1
- package/crud/contentEntry/referenceFieldsMapping.js +39 -66
- package/crud/contentEntry/referenceFieldsMapping.js.map +1 -1
- package/crud/contentEntry/searchableFields.js +1 -12
- package/crud/contentEntry/searchableFields.js.map +1 -1
- package/crud/contentEntry.crud.d.ts +12 -5
- package/crud/contentEntry.crud.js +1183 -921
- package/crud/contentEntry.crud.js.map +1 -1
- package/crud/contentModel/afterCreate.js +0 -2
- package/crud/contentModel/afterCreate.js.map +1 -1
- package/crud/contentModel/afterCreateFrom.js +0 -2
- package/crud/contentModel/afterCreateFrom.js.map +1 -1
- package/crud/contentModel/afterDelete.js +0 -2
- package/crud/contentModel/afterDelete.js.map +1 -1
- package/crud/contentModel/afterUpdate.js +0 -2
- package/crud/contentModel/afterUpdate.js.map +1 -1
- package/crud/contentModel/beforeCreate.d.ts +2 -3
- package/crud/contentModel/beforeCreate.js +43 -109
- package/crud/contentModel/beforeCreate.js.map +1 -1
- package/crud/contentModel/beforeDelete.d.ts +1 -1
- package/crud/contentModel/beforeDelete.js +1 -15
- package/crud/contentModel/beforeDelete.js.map +1 -1
- package/crud/contentModel/beforeUpdate.d.ts +2 -4
- package/crud/contentModel/beforeUpdate.js +33 -10
- 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 +0 -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 +6 -11
- package/crud/contentModel/validateModel.js.map +1 -1
- package/crud/contentModel/validateModelFields.d.ts +4 -4
- package/crud/contentModel/validateModelFields.js +98 -127
- 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 +373 -397
- package/crud/contentModel.crud.js.map +1 -1
- package/crud/contentModelGroup/beforeCreate.js +0 -12
- package/crud/contentModelGroup/beforeCreate.js.map +1 -1
- package/crud/contentModelGroup/beforeDelete.js +0 -8
- package/crud/contentModelGroup/beforeDelete.js.map +1 -1
- package/crud/contentModelGroup/beforeUpdate.js +0 -5
- 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 +206 -235
- package/crud/contentModelGroup.crud.js.map +1 -1
- package/crud/settings.crud.d.ts +3 -1
- package/crud/settings.crud.js +7 -28
- package/crud/settings.crud.js.map +1 -1
- package/crud/system.crud.js +1 -96
- package/crud/system.crud.js.map +1 -1
- package/fieldConverters/CmsModelDefaultFieldConverterPlugin.js +0 -13
- package/fieldConverters/CmsModelDefaultFieldConverterPlugin.js.map +1 -1
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js +0 -36
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js.map +1 -1
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.js +1 -54
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.js.map +1 -1
- package/fieldConverters/index.js +0 -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 +8 -169
- 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 +10 -20
- 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 +126 -110
- 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 +41 -24
- package/graphql/schema/contentModels.js.map +1 -1
- package/graphql/schema/createFieldResolvers.d.ts +1 -1
- package/graphql/schema/createFieldResolvers.js +19 -36
- 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 -43
- package/graphql/schema/createManageResolvers.js.map +1 -1
- package/graphql/schema/createManageSDL.d.ts +3 -0
- package/graphql/schema/createManageSDL.js +96 -77
- package/graphql/schema/createManageSDL.js.map +1 -1
- package/graphql/schema/createPreviewResolvers.js +3 -17
- package/graphql/schema/createPreviewResolvers.js.map +1 -1
- package/graphql/schema/createReadResolvers.js +8 -17
- package/graphql/schema/createReadResolvers.js.map +1 -1
- package/graphql/schema/createReadSDL.d.ts +3 -0
- package/graphql/schema/createReadSDL.js +47 -47
- 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 +0 -16
- 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 +25 -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 +0 -8
- 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 +0 -8
- 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 +1 -1
- package/graphqlFields/dynamicZone/dynamicZoneField.js +57 -48
- package/graphqlFields/dynamicZone/dynamicZoneField.js.map +1 -1
- package/graphqlFields/dynamicZone/dynamicZoneStorage.js +2 -18
- package/graphqlFields/dynamicZone/dynamicZoneStorage.js.map +1 -1
- package/graphqlFields/dynamicZone/index.js +0 -2
- package/graphqlFields/dynamicZone/index.js.map +1 -1
- 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.js +0 -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 +1 -12
- package/graphqlFields/number.js.map +1 -1
- package/graphqlFields/object.js +25 -42
- package/graphqlFields/object.js.map +1 -1
- package/graphqlFields/ref.js +64 -66
- 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 +26 -28
- package/index.js.map +1 -1
- package/modelManager/DefaultCmsModelManager.js +0 -16
- package/modelManager/DefaultCmsModelManager.js.map +1 -1
- package/modelManager/index.js +0 -4
- package/modelManager/index.js.map +1 -1
- package/package.json +35 -41
- package/parameters/context.js +0 -4
- package/parameters/context.js.map +1 -1
- package/parameters/header.js +3 -14
- package/parameters/header.js.map +1 -1
- package/parameters/index.js +0 -8
- package/parameters/index.js.map +1 -1
- package/parameters/manual.js +1 -8
- package/parameters/manual.js.map +1 -1
- package/parameters/path.js +0 -11
- 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 +0 -8
- package/plugins/CmsGroupPlugin.js.map +1 -1
- package/plugins/CmsModelFieldConverterPlugin.js +0 -5
- package/plugins/CmsModelFieldConverterPlugin.js.map +1 -1
- package/plugins/CmsModelPlugin.d.ts +21 -3
- package/plugins/CmsModelPlugin.js +30 -40
- package/plugins/CmsModelPlugin.js.map +1 -1
- package/plugins/CmsParametersPlugin.js +3 -6
- 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.js +0 -9
- 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 +0 -19
- package/storage/object.js.map +1 -1
- package/types.d.ts +302 -95
- package/types.js +41 -77
- package/types.js.map +1 -1
- package/utils/converters/Converter.js +0 -13
- package/utils/converters/Converter.js.map +1 -1
- package/utils/converters/ConverterCollection.js +9 -33
- package/utils/converters/ConverterCollection.js.map +1 -1
- package/utils/converters/valueKeyStorageConverter.d.ts +1 -5
- package/utils/converters/valueKeyStorageConverter.js +30 -45
- package/utils/converters/valueKeyStorageConverter.js.map +1 -1
- package/utils/createTypeFromFields.d.ts +1 -0
- package/utils/createTypeFromFields.js +12 -21
- package/utils/createTypeFromFields.js.map +1 -1
- package/utils/createTypeName.d.ts +0 -2
- package/utils/createTypeName.js +2 -19
- package/utils/createTypeName.js.map +1 -1
- package/utils/entryStorage.js +10 -26
- 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 +1 -3
- package/utils/getBaseFieldType.js +0 -2
- package/utils/getBaseFieldType.js.map +1 -1
- 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 +10 -11
- package/utils/renderFields.js.map +1 -1
- package/utils/renderGetFilterFields.d.ts +2 -2
- package/utils/renderGetFilterFields.js +7 -33
- package/utils/renderGetFilterFields.js.map +1 -1
- package/utils/renderInputFields.d.ts +4 -2
- package/utils/renderInputFields.js +17 -14
- package/utils/renderInputFields.js.map +1 -1
- package/utils/renderListFilterFields.d.ts +3 -1
- package/utils/renderListFilterFields.js +16 -30
- package/utils/renderListFilterFields.js.map +1 -1
- package/utils/renderSortEnum.d.ts +9 -5
- package/utils/renderSortEnum.js +24 -12
- package/utils/renderSortEnum.js.map +1 -1
- package/utils/toSlug.js +0 -4
- 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.js +0 -4
- package/validators/dynamicZone.js.map +1 -1
- 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 +0 -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 +0 -7
- 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 -192
- 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 -85
- package/crud/index.js.map +0 -1
- package/upgrades/5.33.0/index.d.ts +0 -3
- package/upgrades/5.33.0/index.js +0 -182
- 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 -77
- 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 -106
- 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
|
@@ -4,8 +4,6 @@ import { Context } from "@webiny/api/types";
|
|
|
4
4
|
import { GraphQLFieldResolver, GraphQLSchemaDefinition, Resolvers } from "@webiny/handler-graphql/types";
|
|
5
5
|
import { SecurityPermission } from "@webiny/api-security/types";
|
|
6
6
|
import { DbContext } from "@webiny/handler-db/types";
|
|
7
|
-
import { FileManagerContext } from "@webiny/api-file-manager/types";
|
|
8
|
-
import { UpgradePlugin } from "@webiny/api-upgrade/types";
|
|
9
7
|
import { Topic } from "@webiny/pubsub/types";
|
|
10
8
|
import { CmsModelConverterCallable } from "./utils/converters/ConverterCollection";
|
|
11
9
|
export declare type ApiEndpoint = "manage" | "preview" | "read";
|
|
@@ -44,7 +42,7 @@ export interface HeadlessCms extends CmsSettingsContext, CmsSystemContext, CmsGr
|
|
|
44
42
|
*
|
|
45
43
|
* @category Context
|
|
46
44
|
*/
|
|
47
|
-
export interface CmsContext extends Context, DbContext, I18NContext
|
|
45
|
+
export interface CmsContext extends Context, DbContext, I18NContext {
|
|
48
46
|
cms: HeadlessCms;
|
|
49
47
|
}
|
|
50
48
|
interface CmsModelFieldPredefinedValuesValue {
|
|
@@ -98,6 +96,10 @@ export interface CmsModelFieldSettings {
|
|
|
98
96
|
* Object field has child fields.
|
|
99
97
|
*/
|
|
100
98
|
fields?: CmsModelField[];
|
|
99
|
+
/**
|
|
100
|
+
* Is the file field images only one?
|
|
101
|
+
*/
|
|
102
|
+
imagesOnly?: boolean;
|
|
101
103
|
/**
|
|
102
104
|
* Object field has child fields - so it needs to have a layout.
|
|
103
105
|
*/
|
|
@@ -115,6 +117,7 @@ export interface CmsModelFieldSettings {
|
|
|
115
117
|
*/
|
|
116
118
|
[key: string]: any;
|
|
117
119
|
}
|
|
120
|
+
export declare type CmsModelFieldType = "boolean" | "datetime" | "file" | "long-text" | "number" | "object" | "ref" | "rich-text" | "text" | "dynamicZone" | string;
|
|
118
121
|
/**
|
|
119
122
|
* A definition for content model field. This type exists on the app side as well.
|
|
120
123
|
*
|
|
@@ -135,18 +138,16 @@ export interface CmsModelField {
|
|
|
135
138
|
* A type of the field.
|
|
136
139
|
* We are defining our built-in fields, so people know which are available by the default.
|
|
137
140
|
*/
|
|
138
|
-
type:
|
|
141
|
+
type: CmsModelFieldType;
|
|
139
142
|
/**
|
|
140
143
|
* A unique storage ID for storing actual values.
|
|
141
|
-
* 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
|
|
142
145
|
*
|
|
143
146
|
* This is an auto-generated value: uses `id` and `type`
|
|
144
147
|
*
|
|
145
148
|
* This is used as path for the entry value.
|
|
146
|
-
*
|
|
147
|
-
* @internal
|
|
148
149
|
*/
|
|
149
|
-
storageId: string;
|
|
150
|
+
storageId: `${string}@${string}` | string;
|
|
150
151
|
/**
|
|
151
152
|
* Field identifier for the model field that will be available to the outside world.
|
|
152
153
|
* `storageId` is used as path (or column) to store the data.
|
|
@@ -363,7 +364,21 @@ export interface LockedField {
|
|
|
363
364
|
[key: string]: any;
|
|
364
365
|
}
|
|
365
366
|
/**
|
|
366
|
-
*
|
|
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.
|
|
367
382
|
*
|
|
368
383
|
* @category Database model
|
|
369
384
|
* @category CmsModel
|
|
@@ -377,6 +392,24 @@ export interface CmsModel {
|
|
|
377
392
|
* Unique ID for the content model. Created from name if not defined by user.
|
|
378
393
|
*/
|
|
379
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;
|
|
380
413
|
/**
|
|
381
414
|
* Model tenant.
|
|
382
415
|
*/
|
|
@@ -388,20 +421,15 @@ export interface CmsModel {
|
|
|
388
421
|
/**
|
|
389
422
|
* Cms Group reference object.
|
|
390
423
|
*/
|
|
391
|
-
group:
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
/**
|
|
397
|
-
* Name of the group
|
|
398
|
-
*/
|
|
399
|
-
name: string;
|
|
400
|
-
};
|
|
424
|
+
group: CmsModelGroup;
|
|
425
|
+
/**
|
|
426
|
+
* Icon for the content model.
|
|
427
|
+
*/
|
|
428
|
+
icon?: string | null;
|
|
401
429
|
/**
|
|
402
430
|
* Description for the content model.
|
|
403
431
|
*/
|
|
404
|
-
description: string;
|
|
432
|
+
description: string | null;
|
|
405
433
|
/**
|
|
406
434
|
* Date created
|
|
407
435
|
*/
|
|
@@ -413,7 +441,7 @@ export interface CmsModel {
|
|
|
413
441
|
/**
|
|
414
442
|
* CreatedBy object wrapper. Contains id, name and type of the user.
|
|
415
443
|
*/
|
|
416
|
-
createdBy?:
|
|
444
|
+
createdBy?: CmsIdentity;
|
|
417
445
|
/**
|
|
418
446
|
* List of fields defining entry values.
|
|
419
447
|
*/
|
|
@@ -442,6 +470,16 @@ export interface CmsModel {
|
|
|
442
470
|
* It is picked as first available text field. Or user can select own field.
|
|
443
471
|
*/
|
|
444
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;
|
|
445
483
|
/**
|
|
446
484
|
* The version of Webiny which this record was stored with.
|
|
447
485
|
*/
|
|
@@ -475,6 +513,7 @@ interface CmsModelFieldToGraphQLCreateResolverParams<TField> {
|
|
|
475
513
|
graphQLType: string;
|
|
476
514
|
field: TField;
|
|
477
515
|
createFieldResolvers: any;
|
|
516
|
+
fieldTypePlugins: CmsFieldTypePlugins;
|
|
478
517
|
}
|
|
479
518
|
export interface CmsModelFieldToGraphQLCreateResolver<TField = CmsModelField> {
|
|
480
519
|
(params: CmsModelFieldToGraphQLCreateResolverParams<TField>): GraphQLFieldResolver | {
|
|
@@ -556,7 +595,7 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
556
595
|
*/
|
|
557
596
|
createStorageId?: (params: {
|
|
558
597
|
model: CmsModel;
|
|
559
|
-
field: TField
|
|
598
|
+
field: Omit<TField, "storageId"> & Partial<Pick<TField, "storageId">>;
|
|
560
599
|
}) => string | null | undefined;
|
|
561
600
|
/**
|
|
562
601
|
* Read API methods.
|
|
@@ -574,7 +613,6 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
574
613
|
* ```
|
|
575
614
|
*/
|
|
576
615
|
createGetFilters?(params: {
|
|
577
|
-
model: CmsModel;
|
|
578
616
|
field: TField;
|
|
579
617
|
}): string;
|
|
580
618
|
/**
|
|
@@ -594,7 +632,7 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
594
632
|
* ```
|
|
595
633
|
*/
|
|
596
634
|
createListFilters?(params: {
|
|
597
|
-
model: CmsModel
|
|
635
|
+
model: Pick<CmsModel, "singularApiName">;
|
|
598
636
|
field: TField;
|
|
599
637
|
plugins: CmsFieldTypePlugins;
|
|
600
638
|
}): string;
|
|
@@ -614,6 +652,7 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
614
652
|
* ```
|
|
615
653
|
*/
|
|
616
654
|
createTypeField(params: {
|
|
655
|
+
models: CmsModel[];
|
|
617
656
|
model: CmsModel;
|
|
618
657
|
field: TField;
|
|
619
658
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
@@ -674,7 +713,7 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
674
713
|
* ```
|
|
675
714
|
*/
|
|
676
715
|
createListFilters?: (params: {
|
|
677
|
-
model: CmsModel
|
|
716
|
+
model: Pick<CmsModel, "singularApiName">;
|
|
678
717
|
field: TField;
|
|
679
718
|
plugins: CmsFieldTypePlugins;
|
|
680
719
|
}) => string;
|
|
@@ -714,6 +753,7 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
714
753
|
* ```
|
|
715
754
|
*/
|
|
716
755
|
createTypeField: (params: {
|
|
756
|
+
models: CmsModel[];
|
|
717
757
|
model: CmsModel;
|
|
718
758
|
field: TField;
|
|
719
759
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
@@ -734,6 +774,7 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
734
774
|
* ```
|
|
735
775
|
*/
|
|
736
776
|
createInputField: (params: {
|
|
777
|
+
models: CmsModel[];
|
|
737
778
|
model: CmsModel;
|
|
738
779
|
field: TField;
|
|
739
780
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
@@ -801,7 +842,7 @@ export interface CmsFieldTypePlugins {
|
|
|
801
842
|
*
|
|
802
843
|
* @category General
|
|
803
844
|
*/
|
|
804
|
-
export interface
|
|
845
|
+
export interface CmsIdentity {
|
|
805
846
|
/**
|
|
806
847
|
* ID if the user.
|
|
807
848
|
*/
|
|
@@ -851,7 +892,7 @@ export interface CmsSettingsContext {
|
|
|
851
892
|
/**
|
|
852
893
|
* Get the datetime when content model last changed.
|
|
853
894
|
*/
|
|
854
|
-
getModelLastChange: () => Promise<Date>;
|
|
895
|
+
getModelLastChange: () => Promise<Date | null>;
|
|
855
896
|
}
|
|
856
897
|
export interface OnSystemBeforeInstallTopicParams {
|
|
857
898
|
tenant: string;
|
|
@@ -869,9 +910,7 @@ export interface OnSystemInstallErrorTopicParams {
|
|
|
869
910
|
export declare type CmsSystemContext = {
|
|
870
911
|
getSystemVersion: () => Promise<string | null>;
|
|
871
912
|
setSystemVersion: (version: string) => Promise<void>;
|
|
872
|
-
getReadAPIKey(): Promise<string | null>;
|
|
873
913
|
installSystem: () => Promise<void>;
|
|
874
|
-
upgradeSystem: (version: string) => Promise<boolean>;
|
|
875
914
|
/**
|
|
876
915
|
* Lifecycle events - deprecated
|
|
877
916
|
*/
|
|
@@ -952,7 +991,7 @@ export interface CmsGroup {
|
|
|
952
991
|
/**
|
|
953
992
|
* CreatedBy reference object.
|
|
954
993
|
*/
|
|
955
|
-
createdBy?:
|
|
994
|
+
createdBy?: CmsIdentity;
|
|
956
995
|
/**
|
|
957
996
|
* Date group was created on.
|
|
958
997
|
*/
|
|
@@ -1154,6 +1193,14 @@ export interface CmsModelCreateInput {
|
|
|
1154
1193
|
* Name of the content model.
|
|
1155
1194
|
*/
|
|
1156
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;
|
|
1157
1204
|
/**
|
|
1158
1205
|
* Unique ID of the content model. Created from name if not sent by the user. Cannot be changed.
|
|
1159
1206
|
*/
|
|
@@ -1161,7 +1208,7 @@ export interface CmsModelCreateInput {
|
|
|
1161
1208
|
/**
|
|
1162
1209
|
* Description of the content model.
|
|
1163
1210
|
*/
|
|
1164
|
-
description?: string;
|
|
1211
|
+
description?: string | null;
|
|
1165
1212
|
/**
|
|
1166
1213
|
* Group where to put the content model in.
|
|
1167
1214
|
*/
|
|
@@ -1186,10 +1233,11 @@ export interface CmsModelCreateInput {
|
|
|
1186
1233
|
*/
|
|
1187
1234
|
tags?: string[];
|
|
1188
1235
|
/**
|
|
1189
|
-
*
|
|
1190
|
-
* It is picked as first available text field. Or user can select own field.
|
|
1236
|
+
* Fields fieldId which are picked to represent the CMS entry.
|
|
1191
1237
|
*/
|
|
1192
|
-
titleFieldId?: string;
|
|
1238
|
+
titleFieldId?: string | null;
|
|
1239
|
+
descriptionFieldId?: string | null;
|
|
1240
|
+
imageFieldId?: string | null;
|
|
1193
1241
|
}
|
|
1194
1242
|
/**
|
|
1195
1243
|
* A GraphQL `params.data` parameter received when creating content model from existing model.
|
|
@@ -1233,11 +1281,11 @@ export interface CmsModelFieldInput {
|
|
|
1233
1281
|
/**
|
|
1234
1282
|
* Text to display below the field to help user what to write in the field.
|
|
1235
1283
|
*/
|
|
1236
|
-
helpText?: string;
|
|
1284
|
+
helpText?: string | null;
|
|
1237
1285
|
/**
|
|
1238
1286
|
* Text to display in the field.
|
|
1239
1287
|
*/
|
|
1240
|
-
placeholderText?: string;
|
|
1288
|
+
placeholderText?: string | null;
|
|
1241
1289
|
/**
|
|
1242
1290
|
* Fields can be tagged to give them contextual meaning.
|
|
1243
1291
|
*/
|
|
@@ -1261,7 +1309,7 @@ export interface CmsModelFieldInput {
|
|
|
1261
1309
|
/**
|
|
1262
1310
|
* @see CmsModelField.listValidation
|
|
1263
1311
|
*/
|
|
1264
|
-
listValidation
|
|
1312
|
+
listValidation?: CmsModelFieldValidation[];
|
|
1265
1313
|
/**
|
|
1266
1314
|
* User defined settings.
|
|
1267
1315
|
*/
|
|
@@ -1278,6 +1326,14 @@ export interface CmsModelUpdateInput {
|
|
|
1278
1326
|
* A new content model name.
|
|
1279
1327
|
*/
|
|
1280
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;
|
|
1281
1337
|
/**
|
|
1282
1338
|
* A group we want to move the model to.
|
|
1283
1339
|
*/
|
|
@@ -1285,7 +1341,7 @@ export interface CmsModelUpdateInput {
|
|
|
1285
1341
|
/**
|
|
1286
1342
|
* A new description of the content model.
|
|
1287
1343
|
*/
|
|
1288
|
-
description?: string;
|
|
1344
|
+
description?: string | null;
|
|
1289
1345
|
/**
|
|
1290
1346
|
* A list of content model fields to define the entry values.
|
|
1291
1347
|
*/
|
|
@@ -1302,10 +1358,11 @@ export interface CmsModelUpdateInput {
|
|
|
1302
1358
|
*/
|
|
1303
1359
|
layout: string[][];
|
|
1304
1360
|
/**
|
|
1305
|
-
*
|
|
1306
|
-
* 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.
|
|
1307
1362
|
*/
|
|
1308
|
-
titleFieldId?: string;
|
|
1363
|
+
titleFieldId?: string | null;
|
|
1364
|
+
descriptionFieldId?: string | null;
|
|
1365
|
+
imageFieldId?: string | null;
|
|
1309
1366
|
}
|
|
1310
1367
|
/**
|
|
1311
1368
|
* A plugin to load a CmsModelManager.
|
|
@@ -1369,11 +1426,15 @@ export interface CmsEntry<T = CmsEntryValues> {
|
|
|
1369
1426
|
/**
|
|
1370
1427
|
* CreatedBy object reference.
|
|
1371
1428
|
*/
|
|
1372
|
-
createdBy:
|
|
1429
|
+
createdBy: CmsIdentity;
|
|
1373
1430
|
/**
|
|
1374
1431
|
* OwnedBy object reference. Can be different from CreatedBy.
|
|
1375
1432
|
*/
|
|
1376
|
-
ownedBy:
|
|
1433
|
+
ownedBy: CmsIdentity;
|
|
1434
|
+
/**
|
|
1435
|
+
* ModifiedBy object reference. Last person who modified the entry.
|
|
1436
|
+
*/
|
|
1437
|
+
modifiedBy?: CmsIdentity | null;
|
|
1377
1438
|
/**
|
|
1378
1439
|
* A string of Date.toISOString() type.
|
|
1379
1440
|
* Populated on creation.
|
|
@@ -1417,6 +1478,12 @@ export interface CmsEntry<T = CmsEntryValues> {
|
|
|
1417
1478
|
* @see CmsModelField
|
|
1418
1479
|
*/
|
|
1419
1480
|
values: T;
|
|
1481
|
+
/**
|
|
1482
|
+
* Advanced Content Organization
|
|
1483
|
+
*/
|
|
1484
|
+
location?: {
|
|
1485
|
+
folderId?: string | null;
|
|
1486
|
+
};
|
|
1420
1487
|
/**
|
|
1421
1488
|
* Settings for the given entry.
|
|
1422
1489
|
*
|
|
@@ -1432,6 +1499,10 @@ export interface CmsEntry<T = CmsEntryValues> {
|
|
|
1432
1499
|
export interface CmsStorageEntry extends CmsEntry {
|
|
1433
1500
|
[key: string]: any;
|
|
1434
1501
|
}
|
|
1502
|
+
export interface CmsEntryUniqueValue {
|
|
1503
|
+
value: string;
|
|
1504
|
+
count: number;
|
|
1505
|
+
}
|
|
1435
1506
|
/**
|
|
1436
1507
|
* A definition for content model manager to be used in the code.
|
|
1437
1508
|
* The default one uses `CmsEntryContext` methods internally, but devs can change to what every they want.
|
|
@@ -1813,15 +1884,18 @@ export interface CmsEntryMeta {
|
|
|
1813
1884
|
*/
|
|
1814
1885
|
totalCount: number;
|
|
1815
1886
|
}
|
|
1887
|
+
/**
|
|
1888
|
+
* Create
|
|
1889
|
+
*/
|
|
1816
1890
|
export interface OnEntryBeforeCreateTopicParams {
|
|
1817
1891
|
input: CreateCmsEntryInput;
|
|
1818
1892
|
entry: CmsEntry;
|
|
1819
|
-
model:
|
|
1893
|
+
model: CmsModel;
|
|
1820
1894
|
}
|
|
1821
1895
|
export interface OnEntryAfterCreateTopicParams {
|
|
1822
1896
|
input: CreateCmsEntryInput;
|
|
1823
1897
|
entry: CmsEntry;
|
|
1824
|
-
model:
|
|
1898
|
+
model: CmsModel;
|
|
1825
1899
|
storageEntry: CmsEntry;
|
|
1826
1900
|
}
|
|
1827
1901
|
export interface OnEntryCreateErrorTopicParams {
|
|
@@ -1830,17 +1904,20 @@ export interface OnEntryCreateErrorTopicParams {
|
|
|
1830
1904
|
entry: CmsEntry;
|
|
1831
1905
|
model: CmsModel;
|
|
1832
1906
|
}
|
|
1907
|
+
/**
|
|
1908
|
+
* Revision Create
|
|
1909
|
+
*/
|
|
1833
1910
|
export interface OnEntryRevisionBeforeCreateTopicParams {
|
|
1834
1911
|
input: CreateFromCmsEntryInput;
|
|
1835
1912
|
entry: CmsEntry;
|
|
1836
1913
|
original: CmsEntry;
|
|
1837
|
-
model:
|
|
1914
|
+
model: CmsModel;
|
|
1838
1915
|
}
|
|
1839
1916
|
export interface OnEntryRevisionAfterCreateTopicParams {
|
|
1840
1917
|
input: CreateFromCmsEntryInput;
|
|
1841
1918
|
entry: CmsEntry;
|
|
1842
1919
|
original: CmsEntry;
|
|
1843
|
-
model:
|
|
1920
|
+
model: CmsModel;
|
|
1844
1921
|
storageEntry: CmsEntry;
|
|
1845
1922
|
}
|
|
1846
1923
|
export interface OnEntryCreateRevisionErrorTopicParams {
|
|
@@ -1850,46 +1927,91 @@ export interface OnEntryCreateRevisionErrorTopicParams {
|
|
|
1850
1927
|
entry: CmsEntry;
|
|
1851
1928
|
model: CmsModel;
|
|
1852
1929
|
}
|
|
1930
|
+
/**
|
|
1931
|
+
* Update
|
|
1932
|
+
*/
|
|
1853
1933
|
export interface OnEntryBeforeUpdateTopicParams {
|
|
1854
1934
|
input: UpdateCmsEntryInput;
|
|
1855
1935
|
original: CmsEntry;
|
|
1856
1936
|
entry: CmsEntry;
|
|
1857
|
-
model:
|
|
1937
|
+
model: CmsModel;
|
|
1858
1938
|
}
|
|
1859
1939
|
export interface OnEntryAfterUpdateTopicParams {
|
|
1860
1940
|
input: UpdateCmsEntryInput;
|
|
1861
1941
|
original: CmsEntry;
|
|
1862
1942
|
entry: CmsEntry;
|
|
1863
|
-
model:
|
|
1943
|
+
model: CmsModel;
|
|
1864
1944
|
storageEntry: CmsEntry;
|
|
1865
1945
|
}
|
|
1866
1946
|
export interface OnEntryUpdateErrorTopicParams {
|
|
1867
1947
|
error: Error;
|
|
1868
|
-
input:
|
|
1948
|
+
input: UpdateCmsEntryInput;
|
|
1949
|
+
entry: CmsEntry;
|
|
1950
|
+
model: CmsModel;
|
|
1951
|
+
}
|
|
1952
|
+
/**
|
|
1953
|
+
* Move
|
|
1954
|
+
*/
|
|
1955
|
+
export interface OnEntryBeforeMoveTopicParams {
|
|
1956
|
+
folderId: string;
|
|
1957
|
+
entry: CmsEntry;
|
|
1958
|
+
model: CmsModel;
|
|
1959
|
+
}
|
|
1960
|
+
export interface OnEntryAfterMoveTopicParams {
|
|
1961
|
+
folderId: string;
|
|
1962
|
+
entry: CmsEntry;
|
|
1963
|
+
model: CmsModel;
|
|
1964
|
+
}
|
|
1965
|
+
export interface OnEntryMoveErrorTopicParams {
|
|
1966
|
+
error: Error;
|
|
1967
|
+
folderId: string;
|
|
1869
1968
|
entry: CmsEntry;
|
|
1870
1969
|
model: CmsModel;
|
|
1871
1970
|
}
|
|
1971
|
+
/**
|
|
1972
|
+
* Publish
|
|
1973
|
+
*/
|
|
1872
1974
|
export interface OnEntryBeforePublishTopicParams {
|
|
1873
1975
|
entry: CmsEntry;
|
|
1874
|
-
model:
|
|
1976
|
+
model: CmsModel;
|
|
1875
1977
|
}
|
|
1876
1978
|
export interface OnEntryAfterPublishTopicParams {
|
|
1877
1979
|
entry: CmsEntry;
|
|
1878
|
-
model:
|
|
1980
|
+
model: CmsModel;
|
|
1879
1981
|
storageEntry: CmsEntry;
|
|
1880
1982
|
}
|
|
1881
1983
|
export interface OnEntryPublishErrorTopicParams {
|
|
1882
1984
|
error: Error;
|
|
1883
1985
|
entry: CmsEntry;
|
|
1884
|
-
model:
|
|
1986
|
+
model: CmsModel;
|
|
1987
|
+
}
|
|
1988
|
+
/**
|
|
1989
|
+
* Republish
|
|
1990
|
+
*/
|
|
1991
|
+
export interface OnEntryBeforeRepublishTopicParams {
|
|
1992
|
+
entry: CmsEntry;
|
|
1993
|
+
model: CmsModel;
|
|
1994
|
+
}
|
|
1995
|
+
export interface OnEntryAfterRepublishTopicParams {
|
|
1996
|
+
entry: CmsEntry;
|
|
1997
|
+
model: CmsModel;
|
|
1998
|
+
storageEntry: CmsEntry;
|
|
1999
|
+
}
|
|
2000
|
+
export interface OnEntryRepublishErrorTopicParams {
|
|
2001
|
+
error: Error;
|
|
2002
|
+
entry: CmsEntry;
|
|
2003
|
+
model: CmsModel;
|
|
1885
2004
|
}
|
|
2005
|
+
/**
|
|
2006
|
+
* Unpublish
|
|
2007
|
+
*/
|
|
1886
2008
|
export interface OnEntryBeforeUnpublishTopicParams {
|
|
1887
2009
|
entry: CmsEntry;
|
|
1888
|
-
model:
|
|
2010
|
+
model: CmsModel;
|
|
1889
2011
|
}
|
|
1890
2012
|
export interface OnEntryAfterUnpublishTopicParams {
|
|
1891
2013
|
entry: CmsEntry;
|
|
1892
|
-
model:
|
|
2014
|
+
model: CmsModel;
|
|
1893
2015
|
storageEntry: CmsEntry;
|
|
1894
2016
|
}
|
|
1895
2017
|
export interface OnEntryUnpublishErrorTopicParams {
|
|
@@ -1899,43 +2021,63 @@ export interface OnEntryUnpublishErrorTopicParams {
|
|
|
1899
2021
|
}
|
|
1900
2022
|
export interface OnEntryBeforeDeleteTopicParams {
|
|
1901
2023
|
entry: CmsEntry;
|
|
1902
|
-
model:
|
|
2024
|
+
model: CmsModel;
|
|
1903
2025
|
}
|
|
1904
2026
|
export interface OnEntryAfterDeleteTopicParams {
|
|
1905
2027
|
entry: CmsEntry;
|
|
1906
|
-
model:
|
|
2028
|
+
model: CmsModel;
|
|
1907
2029
|
}
|
|
1908
2030
|
export interface OnEntryDeleteErrorTopicParams {
|
|
1909
2031
|
error: Error;
|
|
1910
2032
|
entry: CmsEntry;
|
|
1911
|
-
model:
|
|
2033
|
+
model: CmsModel;
|
|
1912
2034
|
}
|
|
1913
2035
|
export interface OnEntryRevisionBeforeDeleteTopicParams {
|
|
1914
2036
|
entry: CmsEntry;
|
|
1915
|
-
model:
|
|
2037
|
+
model: CmsModel;
|
|
1916
2038
|
}
|
|
1917
2039
|
export interface OnEntryRevisionAfterDeleteTopicParams {
|
|
1918
2040
|
entry: CmsEntry;
|
|
1919
|
-
model:
|
|
2041
|
+
model: CmsModel;
|
|
1920
2042
|
}
|
|
1921
2043
|
export interface OnEntryRevisionDeleteErrorTopicParams {
|
|
1922
2044
|
error: Error;
|
|
1923
2045
|
entry: CmsEntry;
|
|
1924
|
-
model:
|
|
2046
|
+
model: CmsModel;
|
|
2047
|
+
}
|
|
2048
|
+
export interface OnEntryBeforeDeleteMultipleTopicParams {
|
|
2049
|
+
model: CmsModel;
|
|
2050
|
+
entries: CmsEntry[];
|
|
2051
|
+
ids: string[];
|
|
2052
|
+
}
|
|
2053
|
+
export interface OnEntryAfterDeleteMultipleTopicParams {
|
|
2054
|
+
model: CmsModel;
|
|
2055
|
+
entries: CmsEntry[];
|
|
2056
|
+
ids: string[];
|
|
2057
|
+
}
|
|
2058
|
+
export interface OnEntryDeleteMultipleErrorTopicParams {
|
|
2059
|
+
model: CmsModel;
|
|
2060
|
+
entries: CmsEntry[];
|
|
2061
|
+
ids: string[];
|
|
2062
|
+
error: Error;
|
|
1925
2063
|
}
|
|
1926
2064
|
export interface OnEntryBeforeGetTopicParams {
|
|
1927
|
-
model:
|
|
2065
|
+
model: CmsModel;
|
|
1928
2066
|
where: CmsEntryListWhere;
|
|
1929
2067
|
}
|
|
1930
2068
|
export interface EntryBeforeListTopicParams {
|
|
1931
2069
|
where: CmsEntryListWhere;
|
|
1932
|
-
model:
|
|
2070
|
+
model: CmsModel;
|
|
1933
2071
|
}
|
|
1934
2072
|
/**
|
|
1935
2073
|
* @category Context
|
|
1936
2074
|
* @category CmsEntry
|
|
1937
2075
|
*/
|
|
1938
2076
|
export interface CreateCmsEntryInput {
|
|
2077
|
+
id?: string;
|
|
2078
|
+
wbyAco_location?: {
|
|
2079
|
+
folderId?: string | null;
|
|
2080
|
+
};
|
|
1939
2081
|
[key: string]: any;
|
|
1940
2082
|
}
|
|
1941
2083
|
/**
|
|
@@ -1950,8 +2092,39 @@ export interface CreateFromCmsEntryInput {
|
|
|
1950
2092
|
* @category CmsEntry
|
|
1951
2093
|
*/
|
|
1952
2094
|
export interface UpdateCmsEntryInput {
|
|
2095
|
+
wbyAco_location?: {
|
|
2096
|
+
folderId?: string | null;
|
|
2097
|
+
};
|
|
1953
2098
|
[key: string]: any;
|
|
1954
2099
|
}
|
|
2100
|
+
/**
|
|
2101
|
+
* @category Context
|
|
2102
|
+
* @category CmsEntry
|
|
2103
|
+
*/
|
|
2104
|
+
export interface GetUniqueFieldValuesParams {
|
|
2105
|
+
where: CmsEntryListWhere;
|
|
2106
|
+
fieldId: string;
|
|
2107
|
+
}
|
|
2108
|
+
/**
|
|
2109
|
+
* @category CmsEntry
|
|
2110
|
+
*/
|
|
2111
|
+
export interface CmsDeleteEntryOptions {
|
|
2112
|
+
/**
|
|
2113
|
+
* Runs the delete commands even if the entry is not found in the DynamoDB.
|
|
2114
|
+
* This is to force clean the entry records that might have been left behind a failed delete.
|
|
2115
|
+
*/
|
|
2116
|
+
force?: boolean;
|
|
2117
|
+
}
|
|
2118
|
+
/**
|
|
2119
|
+
* @category Context
|
|
2120
|
+
* @category CmsEntry
|
|
2121
|
+
*/
|
|
2122
|
+
export interface DeleteMultipleEntriesParams {
|
|
2123
|
+
entries: string[];
|
|
2124
|
+
}
|
|
2125
|
+
export declare type DeleteMultipleEntriesResponse = {
|
|
2126
|
+
id: string;
|
|
2127
|
+
}[];
|
|
1955
2128
|
/**
|
|
1956
2129
|
* Cms Entry CRUD methods in the context.
|
|
1957
2130
|
*
|
|
@@ -1962,7 +2135,7 @@ export interface CmsEntryContext {
|
|
|
1962
2135
|
/**
|
|
1963
2136
|
* Get a single content entry for a model.
|
|
1964
2137
|
*/
|
|
1965
|
-
getEntry: (model: CmsModel, params: CmsEntryGetParams) => Promise<CmsEntry
|
|
2138
|
+
getEntry: (model: CmsModel, params: CmsEntryGetParams) => Promise<CmsEntry>;
|
|
1966
2139
|
/**
|
|
1967
2140
|
* Get a list of entries for a model by a given ID (revision).
|
|
1968
2141
|
*/
|
|
@@ -1974,15 +2147,15 @@ export interface CmsEntryContext {
|
|
|
1974
2147
|
/**
|
|
1975
2148
|
* List entries for a model. Internal method used by get, listLatest and listPublished.
|
|
1976
2149
|
*/
|
|
1977
|
-
listEntries: (model: CmsModel, params: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
2150
|
+
listEntries: <T = CmsEntryValues>(model: CmsModel, params: CmsEntryListParams) => Promise<[CmsEntry<T>[], CmsEntryMeta]>;
|
|
1978
2151
|
/**
|
|
1979
2152
|
* Lists the latest entries. Used for manage API.
|
|
1980
2153
|
*/
|
|
1981
|
-
listLatestEntries: (model: CmsModel, params?: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
2154
|
+
listLatestEntries: <T = CmsEntryValues>(model: CmsModel, params?: CmsEntryListParams) => Promise<[CmsEntry<T>[], CmsEntryMeta]>;
|
|
1982
2155
|
/**
|
|
1983
2156
|
* List published entries. Used for read API.
|
|
1984
2157
|
*/
|
|
1985
|
-
listPublishedEntries: (model: CmsModel, params?: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
2158
|
+
listPublishedEntries: <T = CmsEntryValues>(model: CmsModel, params?: CmsEntryListParams) => Promise<[CmsEntry<T>[], CmsEntryMeta]>;
|
|
1986
2159
|
/**
|
|
1987
2160
|
* List published entries by IDs.
|
|
1988
2161
|
*/
|
|
@@ -2003,6 +2176,10 @@ export interface CmsEntryContext {
|
|
|
2003
2176
|
* Update existing entry.
|
|
2004
2177
|
*/
|
|
2005
2178
|
updateEntry: (model: CmsModel, id: string, input: UpdateCmsEntryInput, meta?: Record<string, any>) => Promise<CmsEntry>;
|
|
2179
|
+
/**
|
|
2180
|
+
* Move entry, and all its revisions, to a new folder.
|
|
2181
|
+
*/
|
|
2182
|
+
moveEntry: (model: CmsModel, id: string, folderId: string) => Promise<CmsEntry>;
|
|
2006
2183
|
/**
|
|
2007
2184
|
* Method that republishes entry with given identifier.
|
|
2008
2185
|
* @internal
|
|
@@ -2015,7 +2192,11 @@ export interface CmsEntryContext {
|
|
|
2015
2192
|
/**
|
|
2016
2193
|
* Delete entry with all its revisions.
|
|
2017
2194
|
*/
|
|
2018
|
-
deleteEntry: (model: CmsModel, id: string) => Promise<void>;
|
|
2195
|
+
deleteEntry: (model: CmsModel, id: string, options?: CmsDeleteEntryOptions) => Promise<void>;
|
|
2196
|
+
/**
|
|
2197
|
+
* Delete multiple entries
|
|
2198
|
+
*/
|
|
2199
|
+
deleteMultipleEntries: (model: CmsModel, params: DeleteMultipleEntriesParams) => Promise<DeleteMultipleEntriesResponse>;
|
|
2019
2200
|
/**
|
|
2020
2201
|
* Publish entry.
|
|
2021
2202
|
*/
|
|
@@ -2029,7 +2210,13 @@ export interface CmsEntryContext {
|
|
|
2029
2210
|
*/
|
|
2030
2211
|
getEntryRevisions: (model: CmsModel, id: string) => Promise<CmsEntry[]>;
|
|
2031
2212
|
/**
|
|
2032
|
-
*
|
|
2213
|
+
* List all unique values for a given field.
|
|
2214
|
+
*
|
|
2215
|
+
* @internal
|
|
2216
|
+
*/
|
|
2217
|
+
getUniqueFieldValues: (model: CmsModel, params: GetUniqueFieldValuesParams) => Promise<CmsEntryUniqueValue[]>;
|
|
2218
|
+
/**
|
|
2219
|
+
* Lifecycle events - deprecated.
|
|
2033
2220
|
*/
|
|
2034
2221
|
/**
|
|
2035
2222
|
* @deprecated
|
|
@@ -2107,6 +2294,9 @@ export interface CmsEntryContext {
|
|
|
2107
2294
|
onEntryBeforeUpdate: Topic<OnEntryBeforeUpdateTopicParams>;
|
|
2108
2295
|
onEntryAfterUpdate: Topic<OnEntryAfterUpdateTopicParams>;
|
|
2109
2296
|
onEntryUpdateError: Topic<OnEntryUpdateErrorTopicParams>;
|
|
2297
|
+
onEntryBeforeMove: Topic<OnEntryBeforeMoveTopicParams>;
|
|
2298
|
+
onEntryAfterMove: Topic<OnEntryAfterMoveTopicParams>;
|
|
2299
|
+
onEntryMoveError: Topic<OnEntryMoveErrorTopicParams>;
|
|
2110
2300
|
onEntryBeforeDelete: Topic<OnEntryBeforeDeleteTopicParams>;
|
|
2111
2301
|
onEntryAfterDelete: Topic<OnEntryAfterDeleteTopicParams>;
|
|
2112
2302
|
onEntryDeleteError: Topic<OnEntryDeleteErrorTopicParams>;
|
|
@@ -2116,6 +2306,9 @@ export interface CmsEntryContext {
|
|
|
2116
2306
|
onEntryBeforePublish: Topic<OnEntryBeforePublishTopicParams>;
|
|
2117
2307
|
onEntryAfterPublish: Topic<OnEntryAfterPublishTopicParams>;
|
|
2118
2308
|
onEntryPublishError: Topic<OnEntryPublishErrorTopicParams>;
|
|
2309
|
+
onEntryBeforeRepublish: Topic<OnEntryBeforeRepublishTopicParams>;
|
|
2310
|
+
onEntryAfterRepublish: Topic<OnEntryAfterRepublishTopicParams>;
|
|
2311
|
+
onEntryRepublishError: Topic<OnEntryRepublishErrorTopicParams>;
|
|
2119
2312
|
onEntryBeforeUnpublish: Topic<OnEntryBeforeUnpublishTopicParams>;
|
|
2120
2313
|
onEntryAfterUnpublish: Topic<OnEntryAfterUnpublishTopicParams>;
|
|
2121
2314
|
onEntryUnpublishError: Topic<OnEntryUnpublishErrorTopicParams>;
|
|
@@ -2320,7 +2513,7 @@ export interface CmsEntryStorageOperationsListParams {
|
|
|
2320
2513
|
sort?: CmsEntryListSort;
|
|
2321
2514
|
search?: string;
|
|
2322
2515
|
fields?: string[];
|
|
2323
|
-
limit
|
|
2516
|
+
limit: number;
|
|
2324
2517
|
after?: string | null;
|
|
2325
2518
|
}
|
|
2326
2519
|
export interface CmsEntryStorageOperationsCreateParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
@@ -2372,11 +2565,11 @@ export interface CmsEntryStorageOperationsDeleteRevisionParams<T extends CmsStor
|
|
|
2372
2565
|
latestStorageEntry: T | null;
|
|
2373
2566
|
}
|
|
2374
2567
|
export interface CmsEntryStorageOperationsDeleteParams {
|
|
2375
|
-
/**
|
|
2376
|
-
* Entry that is going to be deleted.
|
|
2377
|
-
*/
|
|
2378
2568
|
entry: CmsEntry;
|
|
2379
2569
|
}
|
|
2570
|
+
export interface CmsEntryStorageOperationsDeleteEntriesParams {
|
|
2571
|
+
entries: string[];
|
|
2572
|
+
}
|
|
2380
2573
|
export interface CmsEntryStorageOperationsPublishParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
2381
2574
|
/**
|
|
2382
2575
|
* The modified entry that is going to be saved as published.
|
|
@@ -2398,6 +2591,10 @@ export interface CmsEntryStorageOperationsUnpublishParams<T extends CmsStorageEn
|
|
|
2398
2591
|
*/
|
|
2399
2592
|
storageEntry: T;
|
|
2400
2593
|
}
|
|
2594
|
+
export interface CmsEntryStorageOperationsGetUniqueFieldValuesParams {
|
|
2595
|
+
where: CmsEntryListWhere;
|
|
2596
|
+
fieldId: string;
|
|
2597
|
+
}
|
|
2401
2598
|
export interface CmsEntryStorageOperationsGetByIdsParams {
|
|
2402
2599
|
ids: readonly string[];
|
|
2403
2600
|
}
|
|
@@ -2454,71 +2651,85 @@ export interface CmsEntryStorageOperations<T extends CmsStorageEntry = CmsStorag
|
|
|
2454
2651
|
/**
|
|
2455
2652
|
* Get all the entries of the ids.
|
|
2456
2653
|
*/
|
|
2457
|
-
getByIds: (model:
|
|
2654
|
+
getByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetByIdsParams) => Promise<T[]>;
|
|
2458
2655
|
/**
|
|
2459
2656
|
* Get all the published entries of the ids.
|
|
2460
2657
|
*/
|
|
2461
|
-
getPublishedByIds: (model:
|
|
2658
|
+
getPublishedByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetPublishedByIdsParams) => Promise<T[]>;
|
|
2462
2659
|
/**
|
|
2463
2660
|
* Get all the latest entries of the ids.
|
|
2464
2661
|
*/
|
|
2465
|
-
getLatestByIds: (model:
|
|
2662
|
+
getLatestByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetLatestByIdsParams) => Promise<T[]>;
|
|
2466
2663
|
/**
|
|
2467
2664
|
* Get all revisions of the given entry id.
|
|
2468
2665
|
*/
|
|
2469
|
-
getRevisions: (model:
|
|
2666
|
+
getRevisions: (model: CmsModel, params: CmsEntryStorageOperationsGetRevisionsParams) => Promise<T[]>;
|
|
2470
2667
|
/**
|
|
2471
2668
|
* Get the entry by the given revision id.
|
|
2472
2669
|
*/
|
|
2473
|
-
getRevisionById: (model:
|
|
2670
|
+
getRevisionById: (model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams) => Promise<T | null>;
|
|
2474
2671
|
/**
|
|
2475
2672
|
* Get the published entry by given entryId.
|
|
2476
2673
|
*/
|
|
2477
|
-
getPublishedRevisionByEntryId: (model:
|
|
2674
|
+
getPublishedRevisionByEntryId: (model: CmsModel, params: CmsEntryStorageOperationsGetPublishedRevisionParams) => Promise<T | null>;
|
|
2478
2675
|
/**
|
|
2479
2676
|
* Get the latest entry by given entryId.
|
|
2480
2677
|
*/
|
|
2481
|
-
getLatestRevisionByEntryId: (model:
|
|
2678
|
+
getLatestRevisionByEntryId: (model: CmsModel, params: CmsEntryStorageOperationsGetLatestRevisionParams) => Promise<T | null>;
|
|
2482
2679
|
/**
|
|
2483
2680
|
* Get the revision of the entry before given one.
|
|
2484
2681
|
*/
|
|
2485
|
-
getPreviousRevision: (model:
|
|
2682
|
+
getPreviousRevision: (model: CmsModel, params: CmsEntryStorageOperationsGetPreviousRevisionParams) => Promise<T | null>;
|
|
2486
2683
|
/**
|
|
2487
2684
|
* Gets entry by given params.
|
|
2488
2685
|
*/
|
|
2489
|
-
get: (model:
|
|
2686
|
+
get: (model: CmsModel, params: CmsEntryStorageOperationsGetParams) => Promise<T | null>;
|
|
2490
2687
|
/**
|
|
2491
2688
|
* List all entries. Filterable via params.
|
|
2492
2689
|
*/
|
|
2493
|
-
list: (model:
|
|
2690
|
+
list: (model: CmsModel, params: CmsEntryStorageOperationsListParams) => Promise<CmsEntryStorageOperationsListResponse<T>>;
|
|
2494
2691
|
/**
|
|
2495
2692
|
* Create a new entry.
|
|
2496
2693
|
*/
|
|
2497
|
-
create: (model:
|
|
2694
|
+
create: (model: CmsModel, params: CmsEntryStorageOperationsCreateParams<T>) => Promise<T>;
|
|
2498
2695
|
/**
|
|
2499
2696
|
* Create a new entry from existing one.
|
|
2500
2697
|
*/
|
|
2501
|
-
createRevisionFrom: (model:
|
|
2698
|
+
createRevisionFrom: (model: CmsModel, params: CmsEntryStorageOperationsCreateRevisionFromParams<T>) => Promise<T>;
|
|
2502
2699
|
/**
|
|
2503
2700
|
* Update existing entry.
|
|
2504
2701
|
*/
|
|
2505
|
-
update: (model:
|
|
2702
|
+
update: (model: CmsModel, params: CmsEntryStorageOperationsUpdateParams<T>) => Promise<T>;
|
|
2703
|
+
/**
|
|
2704
|
+
* Move entry and all its entries into a new folder.
|
|
2705
|
+
*/
|
|
2706
|
+
move: (model: CmsModel, id: string, folderId: string) => Promise<void>;
|
|
2506
2707
|
/**
|
|
2507
2708
|
* Delete the entry revision.
|
|
2508
2709
|
*/
|
|
2509
|
-
deleteRevision: (model:
|
|
2710
|
+
deleteRevision: (model: CmsModel, params: CmsEntryStorageOperationsDeleteRevisionParams<T>) => Promise<void>;
|
|
2510
2711
|
/**
|
|
2511
2712
|
* Delete the entry.
|
|
2512
2713
|
*/
|
|
2513
|
-
delete: (model:
|
|
2714
|
+
delete: (model: CmsModel, params: CmsEntryStorageOperationsDeleteParams) => Promise<void>;
|
|
2715
|
+
/**
|
|
2716
|
+
* Delete multiple entries, with a limit on how much can be deleted in one call.
|
|
2717
|
+
*/
|
|
2718
|
+
deleteMultipleEntries: (model: CmsModel, params: CmsEntryStorageOperationsDeleteEntriesParams) => Promise<void>;
|
|
2514
2719
|
/**
|
|
2515
2720
|
* Publish the entry.
|
|
2516
2721
|
*/
|
|
2517
|
-
publish: (model:
|
|
2722
|
+
publish: (model: CmsModel, params: CmsEntryStorageOperationsPublishParams<T>) => Promise<T>;
|
|
2518
2723
|
/**
|
|
2519
2724
|
* Unpublish the entry.
|
|
2520
2725
|
*/
|
|
2521
|
-
unpublish: (model:
|
|
2726
|
+
unpublish: (model: CmsModel, params: CmsEntryStorageOperationsUnpublishParams<T>) => Promise<T>;
|
|
2727
|
+
/**
|
|
2728
|
+
* Method to list all the unique values for the given field id.
|
|
2729
|
+
* Simplest use case would be to aggregate tags for some content.
|
|
2730
|
+
* @internal
|
|
2731
|
+
*/
|
|
2732
|
+
getUniqueFieldValues: (model: CmsModel, params: CmsEntryStorageOperationsGetUniqueFieldValuesParams) => Promise<CmsEntryUniqueValue[]>;
|
|
2522
2733
|
}
|
|
2523
2734
|
export declare enum CONTENT_ENTRY_STATUS {
|
|
2524
2735
|
DRAFT = "draft",
|
|
@@ -2590,11 +2801,7 @@ export interface HeadlessCmsStorageOperations<C = CmsContext> {
|
|
|
2590
2801
|
/**
|
|
2591
2802
|
* Either attach something from the storage operations or run something in it.
|
|
2592
2803
|
*/
|
|
2593
|
-
beforeInit
|
|
2804
|
+
beforeInit: (context: C) => Promise<void>;
|
|
2594
2805
|
init?: (context: C) => Promise<void>;
|
|
2595
|
-
/**
|
|
2596
|
-
* An upgrade to run if necessary.
|
|
2597
|
-
*/
|
|
2598
|
-
upgrade?: UpgradePlugin | null;
|
|
2599
2806
|
}
|
|
2600
2807
|
export {};
|