@webiny/api-headless-cms 0.0.0-unstable.d7f521b032 → 0.0.0-unstable.de38392959
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 +32 -0
- package/constants.js +57 -0
- package/constants.js.map +1 -0
- package/context.js +88 -47
- package/context.js.map +1 -1
- package/crud/contentEntry/afterDelete.js +3 -1
- package/crud/contentEntry/afterDelete.js.map +1 -1
- package/crud/contentEntry/beforeCreate.js +3 -1
- package/crud/contentEntry/beforeCreate.js.map +1 -1
- package/crud/contentEntry/beforeUpdate.js +3 -1
- package/crud/contentEntry/beforeUpdate.js.map +1 -1
- package/crud/contentEntry/entryDataFactories/createEntryData.d.ts +20 -0
- package/crud/contentEntry/entryDataFactories/createEntryData.js +228 -0
- package/crud/contentEntry/entryDataFactories/createEntryData.js.map +1 -0
- package/crud/contentEntry/entryDataFactories/createEntryRevisionFromData.d.ts +21 -0
- package/crud/contentEntry/entryDataFactories/createEntryRevisionFromData.js +114 -0
- package/crud/contentEntry/entryDataFactories/createEntryRevisionFromData.js.map +1 -0
- package/crud/contentEntry/entryDataFactories/createPublishEntryData.d.ts +13 -0
- package/crud/contentEntry/entryDataFactories/createPublishEntryData.js +61 -0
- package/crud/contentEntry/entryDataFactories/createPublishEntryData.js.map +1 -0
- package/crud/contentEntry/entryDataFactories/createRepublishEntryData.d.ts +12 -0
- package/crud/contentEntry/entryDataFactories/createRepublishEntryData.js +57 -0
- package/crud/contentEntry/entryDataFactories/createRepublishEntryData.js.map +1 -0
- package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.d.ts +12 -0
- package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.js +38 -0
- package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.js.map +1 -0
- package/crud/contentEntry/entryDataFactories/createUpdateEntryData.d.ts +20 -0
- package/crud/contentEntry/entryDataFactories/createUpdateEntryData.js +122 -0
- package/crud/contentEntry/entryDataFactories/createUpdateEntryData.js.map +1 -0
- package/crud/contentEntry/entryDataFactories/index.d.ts +8 -0
- package/crud/contentEntry/entryDataFactories/index.js +95 -0
- package/crud/contentEntry/entryDataFactories/index.js.map +1 -0
- package/crud/contentEntry/entryDataFactories/mapAndCleanUpdatedInputData.d.ts +5 -0
- package/crud/contentEntry/entryDataFactories/mapAndCleanUpdatedInputData.js +36 -0
- package/crud/contentEntry/entryDataFactories/mapAndCleanUpdatedInputData.js.map +1 -0
- package/crud/contentEntry/entryDataFactories/statuses.d.ts +4 -0
- package/crud/contentEntry/entryDataFactories/statuses.js +15 -0
- package/crud/contentEntry/entryDataFactories/statuses.js.map +1 -0
- package/crud/contentEntry/entryDataValidation.d.ts +4 -2
- package/crud/contentEntry/entryDataValidation.js +223 -45
- package/crud/contentEntry/entryDataValidation.js.map +1 -1
- package/crud/contentEntry/markLockedFields.d.ts +1 -1
- package/crud/contentEntry/markLockedFields.js +20 -10
- package/crud/contentEntry/markLockedFields.js.map +1 -1
- package/crud/contentEntry/referenceFieldsMapping.d.ts +6 -0
- package/crud/contentEntry/referenceFieldsMapping.js +142 -90
- package/crud/contentEntry/referenceFieldsMapping.js.map +1 -1
- package/crud/contentEntry/searchableFields.js +5 -4
- package/crud/contentEntry/searchableFields.js.map +1 -1
- package/crud/contentEntry.crud.d.ts +9 -5
- package/crud/contentEntry.crud.js +1093 -981
- package/crud/contentEntry.crud.js.map +1 -1
- package/crud/contentModel/beforeCreate.d.ts +1 -1
- package/crud/contentModel/beforeCreate.js +50 -85
- package/crud/contentModel/beforeCreate.js.map +1 -1
- package/crud/contentModel/beforeDelete.d.ts +1 -1
- package/crud/contentModel/beforeDelete.js +4 -6
- package/crud/contentModel/beforeDelete.js.map +1 -1
- package/crud/contentModel/beforeUpdate.d.ts +1 -1
- package/crud/contentModel/beforeUpdate.js +31 -6
- package/crud/contentModel/beforeUpdate.js.map +1 -1
- package/crud/contentModel/compatibility/modelApiName.d.ts +3 -0
- package/crud/contentModel/compatibility/modelApiName.js +26 -0
- package/crud/contentModel/compatibility/modelApiName.js.map +1 -0
- package/crud/contentModel/contentModelManagerFactory.js +3 -1
- package/crud/contentModel/contentModelManagerFactory.js.map +1 -1
- package/crud/contentModel/createFieldStorageId.js +3 -1
- package/crud/contentModel/createFieldStorageId.js.map +1 -1
- package/crud/contentModel/defaultFields.d.ts +5 -0
- package/crud/contentModel/defaultFields.js +60 -0
- package/crud/contentModel/defaultFields.js.map +1 -0
- package/crud/contentModel/ensureTypeTag.d.ts +5 -0
- package/crud/contentModel/ensureTypeTag.js +21 -0
- package/crud/contentModel/ensureTypeTag.js.map +1 -0
- package/crud/contentModel/fields/descriptionField.d.ts +2 -0
- package/crud/contentModel/fields/descriptionField.js +44 -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 +44 -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 +60 -0
- package/crud/contentModel/fields/titleField.js.map +1 -0
- package/crud/contentModel/listModelsFromDatabase.d.ts +10 -0
- package/crud/contentModel/listModelsFromDatabase.js +38 -0
- package/crud/contentModel/listModelsFromDatabase.js.map +1 -0
- package/crud/contentModel/validate/endingAllowed.d.ts +6 -0
- package/crud/contentModel/validate/endingAllowed.js +28 -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 +26 -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 +38 -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 +26 -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 +26 -0
- package/crud/contentModel/validate/singularApiName.js.map +1 -0
- package/crud/contentModel/validateModel.d.ts +1 -0
- package/crud/contentModel/validateModel.js +3 -1
- package/crud/contentModel/validateModel.js.map +1 -1
- package/crud/contentModel/validateModelFields.d.ts +2 -1
- package/crud/contentModel/validateModelFields.js +27 -64
- package/crud/contentModel/validateModelFields.js.map +1 -1
- package/crud/contentModel/validation.d.ts +595 -200
- package/crud/contentModel/validation.js +125 -17
- package/crud/contentModel/validation.js.map +1 -1
- package/crud/contentModel.crud.d.ts +2 -0
- package/crud/contentModel.crud.js +437 -411
- package/crud/contentModel.crud.js.map +1 -1
- package/crud/contentModelGroup/beforeCreate.d.ts +1 -1
- package/crud/contentModelGroup/beforeCreate.js +15 -1
- package/crud/contentModelGroup/beforeCreate.js.map +1 -1
- package/crud/contentModelGroup/beforeDelete.js +3 -1
- package/crud/contentModelGroup/beforeDelete.js.map +1 -1
- package/crud/contentModelGroup/beforeUpdate.js +3 -1
- package/crud/contentModelGroup/beforeUpdate.js.map +1 -1
- package/crud/contentModelGroup/listGroupsFromDatabase.d.ts +8 -0
- package/crud/contentModelGroup/listGroupsFromDatabase.js +22 -0
- package/crud/contentModelGroup/listGroupsFromDatabase.js.map +1 -0
- package/crud/contentModelGroup/validation.d.ts +10 -7
- package/crud/contentModelGroup/validation.js +5 -2
- package/crud/contentModelGroup/validation.js.map +1 -1
- package/crud/contentModelGroup.crud.d.ts +3 -1
- package/crud/contentModelGroup.crud.js +272 -228
- package/crud/contentModelGroup.crud.js.map +1 -1
- package/crud/system.crud.js +8 -71
- package/crud/system.crud.js.map +1 -1
- package/export/crud/exporting.d.ts +3 -0
- package/export/crud/exporting.js +49 -0
- package/export/crud/exporting.js.map +1 -0
- package/export/crud/importing.d.ts +3 -0
- package/export/crud/importing.js +79 -0
- package/export/crud/importing.js.map +1 -0
- package/export/crud/imports/importData.d.ts +14 -0
- package/export/crud/imports/importData.js +52 -0
- package/export/crud/imports/importData.js.map +1 -0
- package/export/crud/imports/importGroups.d.ts +8 -0
- package/export/crud/imports/importGroups.js +104 -0
- package/export/crud/imports/importGroups.js.map +1 -0
- package/export/crud/imports/importModels.d.ts +8 -0
- package/export/crud/imports/importModels.js +136 -0
- package/export/crud/imports/importModels.js.map +1 -0
- package/export/crud/imports/validateGroups.d.ts +8 -0
- package/export/crud/imports/validateGroups.js +112 -0
- package/export/crud/imports/validateGroups.js.map +1 -0
- package/export/crud/imports/validateInput.d.ts +19 -0
- package/export/crud/imports/validateInput.js +55 -0
- package/export/crud/imports/validateInput.js.map +1 -0
- package/export/crud/imports/validateModels.d.ts +12 -0
- package/export/crud/imports/validateModels.js +203 -0
- package/export/crud/imports/validateModels.js.map +1 -0
- package/export/crud/index.d.ts +4 -0
- package/export/crud/index.js +15 -0
- package/export/crud/index.js.map +1 -0
- package/export/crud/sanitize.d.ts +4 -0
- package/export/crud/sanitize.js +35 -0
- package/export/crud/sanitize.js.map +1 -0
- package/export/graphql/index.d.ts +3 -0
- package/export/graphql/index.js +188 -0
- package/export/graphql/index.js.map +1 -0
- package/export/index.d.ts +2 -0
- package/export/index.js +29 -0
- package/export/index.js.map +1 -0
- package/export/types.d.ts +113 -0
- package/export/types.js +22 -0
- package/export/types.js.map +1 -0
- package/fieldConverters/CmsModelDefaultFieldConverterPlugin.js +4 -7
- package/fieldConverters/CmsModelDefaultFieldConverterPlugin.js.map +1 -1
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js +5 -8
- package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js.map +1 -1
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.js +47 -38
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.js.map +1 -1
- package/fieldConverters/index.js +3 -1
- package/fieldConverters/index.js.map +1 -1
- package/graphql/buildSchemaPlugins.js +7 -1
- package/graphql/buildSchemaPlugins.js.map +1 -1
- package/graphql/checkEndpointAccess.d.ts +2 -0
- package/graphql/checkEndpointAccess.js +20 -0
- package/graphql/checkEndpointAccess.js.map +1 -0
- package/graphql/createExecutableSchema.d.ts +2 -3
- package/graphql/createExecutableSchema.js +3 -1
- package/graphql/createExecutableSchema.js.map +1 -1
- package/graphql/createRequestBody.d.ts +2 -0
- package/graphql/createRequestBody.js +16 -0
- package/graphql/createRequestBody.js.map +1 -0
- package/graphql/formatErrorPayload.d.ts +1 -0
- package/graphql/formatErrorPayload.js +27 -0
- package/graphql/formatErrorPayload.js.map +1 -0
- package/graphql/generateSchema.js +3 -1
- package/graphql/generateSchema.js.map +1 -1
- package/graphql/getSchema.d.ts +16 -0
- package/graphql/getSchema.js +118 -0
- package/graphql/getSchema.js.map +1 -0
- package/graphql/graphQLHandlerFactory.js +9 -146
- package/graphql/graphQLHandlerFactory.js.map +1 -1
- package/graphql/handleRequest.d.ts +11 -0
- package/graphql/handleRequest.js +79 -0
- package/graphql/handleRequest.js.map +1 -0
- package/graphql/index.d.ts +1 -1
- package/graphql/index.js +4 -2
- package/graphql/index.js.map +1 -1
- package/graphql/schema/baseContentSchema.js +10 -15
- package/graphql/schema/baseContentSchema.js.map +1 -1
- package/graphql/schema/baseSchema.d.ts +2 -3
- package/graphql/schema/baseSchema.js +95 -2
- package/graphql/schema/baseSchema.js.map +1 -1
- package/graphql/schema/contentEntries.js +134 -59
- package/graphql/schema/contentEntries.js.map +1 -1
- package/graphql/schema/contentModelGroups.js +12 -9
- package/graphql/schema/contentModelGroups.js.map +1 -1
- package/graphql/schema/contentModels.js +33 -14
- package/graphql/schema/contentModels.js.map +1 -1
- package/graphql/schema/createFieldResolvers.d.ts +1 -1
- package/graphql/schema/createFieldResolvers.js +18 -22
- package/graphql/schema/createFieldResolvers.js.map +1 -1
- package/graphql/schema/createFieldTypePluginRecords.d.ts +3 -0
- package/graphql/schema/createFieldTypePluginRecords.js +15 -0
- package/graphql/schema/createFieldTypePluginRecords.js.map +1 -0
- package/graphql/schema/createManageResolvers.d.ts +1 -1
- package/graphql/schema/createManageResolvers.js +60 -27
- package/graphql/schema/createManageResolvers.js.map +1 -1
- package/graphql/schema/createManageSDL.d.ts +1 -0
- package/graphql/schema/createManageSDL.js +116 -69
- package/graphql/schema/createManageSDL.js.map +1 -1
- package/graphql/schema/createPreviewResolvers.js +10 -13
- package/graphql/schema/createPreviewResolvers.js.map +1 -1
- package/graphql/schema/createReadResolvers.js +11 -14
- package/graphql/schema/createReadResolvers.js.map +1 -1
- package/graphql/schema/createReadSDL.d.ts +1 -0
- package/graphql/schema/createReadSDL.js +51 -38
- package/graphql/schema/createReadSDL.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveCreate.d.ts +2 -1
- package/graphql/schema/resolvers/manage/resolveCreate.js +4 -2
- package/graphql/schema/resolvers/manage/resolveCreate.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveCreateFrom.d.ts +2 -1
- package/graphql/schema/resolvers/manage/resolveCreateFrom.js +4 -2
- 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 +16 -4
- 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 +22 -0
- package/graphql/schema/resolvers/manage/resolveDeleteMultiple.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveGet.js +12 -5
- package/graphql/schema/resolvers/manage/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGetByIds.js +3 -1
- package/graphql/schema/resolvers/manage/resolveGetByIds.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGetRevisions.js +3 -1
- 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 +20 -0
- package/graphql/schema/resolvers/manage/resolveGetUniqueFieldValues.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolveList.js +3 -1
- 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 +27 -0
- package/graphql/schema/resolvers/manage/resolveMove.js.map +1 -0
- package/graphql/schema/resolvers/manage/resolvePublish.js +3 -1
- package/graphql/schema/resolvers/manage/resolvePublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveRepublish.js +3 -1
- package/graphql/schema/resolvers/manage/resolveRepublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveUnpublish.js +3 -1
- package/graphql/schema/resolvers/manage/resolveUnpublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveUpdate.d.ts +2 -1
- package/graphql/schema/resolvers/manage/resolveUpdate.js +4 -2
- package/graphql/schema/resolvers/manage/resolveUpdate.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveValidate.d.ts +8 -0
- package/graphql/schema/resolvers/manage/resolveValidate.js +20 -0
- package/graphql/schema/resolvers/manage/resolveValidate.js.map +1 -0
- package/graphql/schema/resolvers/preview/resolveGet.js +6 -5
- package/graphql/schema/resolvers/preview/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/preview/resolveList.js +3 -1
- package/graphql/schema/resolvers/preview/resolveList.js.map +1 -1
- package/graphql/schema/resolvers/read/resolveGet.js +6 -5
- package/graphql/schema/resolvers/read/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/read/resolveList.js +3 -1
- package/graphql/schema/resolvers/read/resolveList.js.map +1 -1
- package/graphql/schema/schemaPlugins.js +10 -17
- package/graphql/schema/schemaPlugins.js.map +1 -1
- package/graphql/system.d.ts +2 -5
- package/graphql/system.js +4 -28
- package/graphql/system.js.map +1 -1
- package/graphqlFields/boolean.js +3 -1
- package/graphqlFields/boolean.js.map +1 -1
- package/graphqlFields/datetime.js +5 -5
- package/graphqlFields/datetime.js.map +1 -1
- package/graphqlFields/dynamicZone/dynamicZoneField.d.ts +1 -1
- package/graphqlFields/dynamicZone/dynamicZoneField.js +86 -28
- package/graphqlFields/dynamicZone/dynamicZoneField.js.map +1 -1
- package/graphqlFields/dynamicZone/dynamicZoneStorage.js +60 -12
- package/graphqlFields/dynamicZone/dynamicZoneStorage.js.map +1 -1
- package/graphqlFields/dynamicZone/index.js +3 -1
- package/graphqlFields/dynamicZone/index.js.map +1 -1
- package/graphqlFields/file.js +3 -1
- package/graphqlFields/file.js.map +1 -1
- package/graphqlFields/helpers.d.ts +0 -1
- package/graphqlFields/helpers.js +6 -18
- package/graphqlFields/helpers.js.map +1 -1
- package/graphqlFields/index.js +5 -2
- package/graphqlFields/index.js.map +1 -1
- package/graphqlFields/json.d.ts +2 -0
- package/graphqlFields/json.js +49 -0
- package/graphqlFields/json.js.map +1 -0
- package/graphqlFields/longText.js +14 -3
- package/graphqlFields/longText.js.map +1 -1
- package/graphqlFields/number.js +4 -1
- package/graphqlFields/number.js.map +1 -1
- package/graphqlFields/object.js +33 -34
- package/graphqlFields/object.js.map +1 -1
- package/graphqlFields/ref.js +68 -28
- package/graphqlFields/ref.js.map +1 -1
- package/graphqlFields/richText/RichTextPluginsProcessor.d.ts +6 -0
- package/graphqlFields/richText/RichTextPluginsProcessor.js +34 -0
- package/graphqlFields/richText/RichTextPluginsProcessor.js.map +1 -0
- package/graphqlFields/richText/richTextResolver.d.ts +7 -0
- package/graphqlFields/richText/richTextResolver.js +39 -0
- package/graphqlFields/richText/richTextResolver.js.map +1 -0
- package/graphqlFields/richText.js +11 -3
- package/graphqlFields/richText.js.map +1 -1
- package/graphqlFields/text.js +5 -1
- package/graphqlFields/text.js.map +1 -1
- package/htmlRenderer/LexicalRenderer.d.ts +5 -0
- package/htmlRenderer/LexicalRenderer.js +28 -0
- package/htmlRenderer/LexicalRenderer.js.map +1 -0
- package/htmlRenderer/createLexicalHTMLRenderer.d.ts +2 -0
- package/htmlRenderer/createLexicalHTMLRenderer.js +31 -0
- package/htmlRenderer/createLexicalHTMLRenderer.js.map +1 -0
- package/index.d.ts +5 -2
- package/index.js +44 -6
- package/index.js.map +1 -1
- package/modelManager/DefaultCmsModelManager.js +3 -5
- package/modelManager/DefaultCmsModelManager.js.map +1 -1
- package/modelManager/index.js +3 -1
- package/modelManager/index.js.map +1 -1
- package/package.json +36 -40
- package/parameters/context.js +4 -2
- package/parameters/context.js.map +1 -1
- package/parameters/header.js +7 -6
- package/parameters/header.js.map +1 -1
- package/parameters/index.js +3 -1
- package/parameters/index.js.map +1 -1
- package/parameters/manual.js +9 -4
- package/parameters/manual.js.map +1 -1
- package/parameters/path.js +4 -3
- package/parameters/path.js.map +1 -1
- package/plugins/CmsGraphQLSchemaPlugin.js +5 -4
- package/plugins/CmsGraphQLSchemaPlugin.js.map +1 -1
- package/plugins/CmsGraphQLSchemaSorterPlugin.js +4 -5
- package/plugins/CmsGraphQLSchemaSorterPlugin.js.map +1 -1
- package/plugins/CmsGroupPlugin.d.ts +6 -3
- package/plugins/CmsGroupPlugin.js +8 -6
- package/plugins/CmsGroupPlugin.js.map +1 -1
- package/plugins/CmsModelFieldConverterPlugin.js +5 -4
- package/plugins/CmsModelFieldConverterPlugin.js.map +1 -1
- package/plugins/CmsModelPlugin.d.ts +25 -5
- package/plugins/CmsModelPlugin.js +75 -20
- package/plugins/CmsModelPlugin.js.map +1 -1
- package/plugins/CmsParametersPlugin.js +7 -4
- package/plugins/CmsParametersPlugin.js.map +1 -1
- package/plugins/CmsRichTextRendererPlugin.d.ts +24 -0
- package/plugins/CmsRichTextRendererPlugin.js +28 -0
- package/plugins/CmsRichTextRendererPlugin.js.map +1 -0
- package/plugins/StorageOperationsCmsModelPlugin.d.ts +23 -0
- package/plugins/StorageOperationsCmsModelPlugin.js +41 -0
- package/plugins/StorageOperationsCmsModelPlugin.js.map +1 -0
- package/plugins/StorageTransformPlugin.d.ts +2 -2
- package/plugins/StorageTransformPlugin.js +3 -4
- package/plugins/StorageTransformPlugin.js.map +1 -1
- package/plugins/index.d.ts +2 -0
- package/plugins/index.js +25 -1
- package/plugins/index.js.map +1 -1
- package/storage/default.js +3 -1
- package/storage/default.js.map +1 -1
- package/storage/index.d.ts +1 -0
- package/storage/index.js +15 -0
- package/storage/index.js.map +1 -0
- package/storage/json.d.ts +2 -0
- package/storage/json.js +27 -0
- package/storage/json.js.map +1 -0
- package/storage/object.js +8 -8
- package/storage/object.js.map +1 -1
- package/types.d.ts +510 -334
- package/types.js +21 -21
- package/types.js.map +1 -1
- package/utils/access.d.ts +9 -8
- package/utils/access.js +12 -62
- package/utils/access.js.map +1 -1
- package/utils/caching/Cache.d.ts +2 -0
- package/utils/caching/Cache.js +51 -0
- package/utils/caching/Cache.js.map +1 -0
- package/utils/caching/CacheKey.d.ts +2 -0
- package/utils/caching/CacheKey.js +40 -0
- package/utils/caching/CacheKey.js.map +1 -0
- package/utils/caching/index.d.ts +2 -0
- package/utils/caching/index.js +29 -0
- package/utils/caching/index.js.map +1 -0
- package/utils/caching/types.d.ts +11 -0
- package/utils/caching/types.js +7 -0
- package/utils/caching/types.js.map +1 -0
- package/utils/converters/Converter.js +4 -5
- package/utils/converters/Converter.js.map +1 -1
- package/utils/converters/ConverterCollection.js +13 -7
- package/utils/converters/ConverterCollection.js.map +1 -1
- package/utils/converters/valueKeyStorageConverter.d.ts +1 -5
- package/utils/converters/valueKeyStorageConverter.js +34 -21
- package/utils/converters/valueKeyStorageConverter.js.map +1 -1
- package/utils/createTypeFromFields.d.ts +1 -0
- package/utils/createTypeFromFields.js +14 -7
- package/utils/createTypeFromFields.js.map +1 -1
- package/utils/createTypeName.d.ts +0 -2
- package/utils/createTypeName.js +3 -9
- package/utils/createTypeName.js.map +1 -1
- package/utils/date.d.ts +10 -0
- package/utils/date.js +36 -0
- package/utils/date.js.map +1 -0
- package/utils/entryStorage.d.ts +4 -4
- package/utils/entryStorage.js +6 -4
- package/utils/entryStorage.js.map +1 -1
- package/utils/filterAsync.js +9 -8
- package/utils/filterAsync.js.map +1 -1
- package/utils/getBaseFieldType.d.ts +1 -3
- package/utils/getBaseFieldType.js +3 -1
- package/utils/getBaseFieldType.js.map +1 -1
- package/utils/getEntryDescription.d.ts +2 -0
- package/utils/getEntryDescription.js +19 -0
- package/utils/getEntryDescription.js.map +1 -0
- package/utils/getEntryImage.d.ts +2 -0
- package/utils/getEntryImage.js +19 -0
- package/utils/getEntryImage.js.map +1 -0
- package/utils/getEntryTitle.d.ts +1 -1
- package/utils/getEntryTitle.js +3 -1
- package/utils/getEntryTitle.js.map +1 -1
- package/utils/getSchemaFromFieldPlugins.d.ts +13 -2
- package/utils/getSchemaFromFieldPlugins.js +22 -4
- package/utils/getSchemaFromFieldPlugins.js.map +1 -1
- package/utils/identity.d.ts +2 -0
- package/utils/identity.js +20 -0
- package/utils/identity.js.map +1 -0
- package/utils/incrementEntryIdVersion.d.ts +5 -0
- package/utils/incrementEntryIdVersion.js +31 -0
- package/utils/incrementEntryIdVersion.js.map +1 -0
- package/utils/index.d.ts +1 -0
- package/utils/index.js +18 -0
- package/utils/index.js.map +1 -0
- package/utils/permissions/EntriesPermissions.d.ts +4 -0
- package/utils/permissions/EntriesPermissions.js +11 -0
- package/utils/permissions/EntriesPermissions.js.map +1 -0
- package/utils/permissions/ModelGroupsPermissions.d.ts +9 -0
- package/utils/permissions/ModelGroupsPermissions.js +50 -0
- package/utils/permissions/ModelGroupsPermissions.js.map +1 -0
- package/utils/permissions/ModelsPermissions.d.ts +22 -0
- package/utils/permissions/ModelsPermissions.js +90 -0
- package/utils/permissions/ModelsPermissions.js.map +1 -0
- package/utils/renderFields.d.ts +4 -2
- package/utils/renderFields.js +13 -3
- package/utils/renderFields.js.map +1 -1
- package/utils/renderGetFilterFields.d.ts +2 -2
- package/utils/renderGetFilterFields.js +9 -21
- package/utils/renderGetFilterFields.js.map +1 -1
- package/utils/renderInputFields.d.ts +4 -2
- package/utils/renderInputFields.js +20 -6
- package/utils/renderInputFields.js.map +1 -1
- package/utils/renderListFilterFields.d.ts +3 -1
- package/utils/renderListFilterFields.js +25 -22
- package/utils/renderListFilterFields.js.map +1 -1
- package/utils/renderSortEnum.d.ts +3 -2
- package/utils/renderSortEnum.js +10 -3
- package/utils/renderSortEnum.js.map +1 -1
- package/utils/toSlug.js +3 -1
- package/utils/toSlug.js.map +1 -1
- package/validators/dateGte.js +3 -1
- package/validators/dateGte.js.map +1 -1
- package/validators/dateLte.js +3 -1
- package/validators/dateLte.js.map +1 -1
- package/validators/gte.js +4 -3
- package/validators/gte.js.map +1 -1
- package/validators/in.js +4 -3
- package/validators/in.js.map +1 -1
- package/validators/index.js +4 -3
- package/validators/index.js.map +1 -1
- package/validators/lte.js +4 -3
- package/validators/lte.js.map +1 -1
- package/validators/maxLength.js +4 -3
- package/validators/maxLength.js.map +1 -1
- package/validators/minLength.js +4 -3
- package/validators/minLength.js.map +1 -1
- package/validators/pattern.js +5 -3
- package/validators/pattern.js.map +1 -1
- package/validators/patternPlugins/email.js +3 -1
- package/validators/patternPlugins/email.js.map +1 -1
- package/validators/patternPlugins/index.js +3 -1
- package/validators/patternPlugins/index.js.map +1 -1
- package/validators/patternPlugins/lowerCase.js +3 -1
- package/validators/patternPlugins/lowerCase.js.map +1 -1
- package/validators/patternPlugins/lowerCaseSpace.js +3 -1
- package/validators/patternPlugins/lowerCaseSpace.js.map +1 -1
- package/validators/patternPlugins/upperCase.js +3 -1
- package/validators/patternPlugins/upperCase.js.map +1 -1
- package/validators/patternPlugins/upperCaseSpace.js +3 -1
- package/validators/patternPlugins/upperCaseSpace.js.map +1 -1
- package/validators/patternPlugins/url.js +3 -1
- package/validators/patternPlugins/url.js.map +1 -1
- package/validators/required.js +3 -1
- package/validators/required.js.map +1 -1
- package/validators/timeGte.js +4 -3
- package/validators/timeGte.js.map +1 -1
- package/validators/timeLte.js +4 -3
- package/validators/timeLte.js.map +1 -1
- package/validators/unique.js +4 -2
- package/validators/unique.js.map +1 -1
- package/crud/contentModel/afterCreate.d.ts +0 -8
- package/crud/contentModel/afterCreate.js +0 -16
- package/crud/contentModel/afterCreate.js.map +0 -1
- package/crud/contentModel/afterCreateFrom.d.ts +0 -8
- package/crud/contentModel/afterCreateFrom.js +0 -16
- package/crud/contentModel/afterCreateFrom.js.map +0 -1
- package/crud/contentModel/afterDelete.d.ts +0 -8
- package/crud/contentModel/afterDelete.js +0 -16
- package/crud/contentModel/afterDelete.js.map +0 -1
- package/crud/contentModel/afterUpdate.d.ts +0 -8
- package/crud/contentModel/afterUpdate.js +0 -16
- package/crud/contentModel/afterUpdate.js.map +0 -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/contentModel/validateLayout.d.ts +0 -2
- package/crud/contentModel/validateLayout.js +0 -28
- package/crud/contentModel/validateLayout.js.map +0 -1
- package/crud/settings.crud.d.ts +0 -10
- package/crud/settings.crud.js +0 -71
- package/crud/settings.crud.js.map +0 -1
- package/graphql/schema/resolvers/commonFieldResolvers.d.ts +0 -6
- package/graphql/schema/resolvers/commonFieldResolvers.js +0 -12
- package/graphql/schema/resolvers/commonFieldResolvers.js.map +0 -1
- package/upgrades/5.33.0/index.d.ts +0 -3
- package/upgrades/5.33.0/index.js +0 -159
- package/upgrades/5.33.0/index.js.map +0 -1
- package/upgrades/index.d.ts +0 -1
- package/upgrades/index.js +0 -9
- package/upgrades/index.js.map +0 -1
- package/utils/ownership.d.ts +0 -8
- package/utils/ownership.js +0 -33
- package/utils/ownership.js.map +0 -1
- package/utils/permissions.d.ts +0 -7
- package/utils/permissions.js +0 -91
- package/utils/permissions.js.map +0 -1
- package/utils/pluralizedTypeName.d.ts +0 -1
- package/utils/pluralizedTypeName.js +0 -20
- package/utils/pluralizedTypeName.js.map +0 -1
- package/validators/dynamicZone.d.ts +0 -2
- package/validators/dynamicZone.js +0 -20
- package/validators/dynamicZone.js.map +0 -1
package/types.d.ts
CHANGED
|
@@ -4,12 +4,19 @@ 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";
|
|
9
|
+
import { ModelGroupsPermissions } from "./utils/permissions/ModelGroupsPermissions";
|
|
10
|
+
import { ModelsPermissions } from "./utils/permissions/ModelsPermissions";
|
|
11
|
+
import { EntriesPermissions } from "./utils/permissions/EntriesPermissions";
|
|
12
|
+
import { HeadlessCmsExport, HeadlessCmsImport } from "./export/types";
|
|
11
13
|
export declare type ApiEndpoint = "manage" | "preview" | "read";
|
|
12
|
-
|
|
14
|
+
interface HeadlessCmsPermissions {
|
|
15
|
+
groups: ModelGroupsPermissions;
|
|
16
|
+
models: ModelsPermissions;
|
|
17
|
+
entries: EntriesPermissions;
|
|
18
|
+
}
|
|
19
|
+
export interface HeadlessCms extends CmsSystemContext, CmsGroupContext, CmsModelContext, CmsEntryContext {
|
|
13
20
|
/**
|
|
14
21
|
* API type
|
|
15
22
|
*/
|
|
@@ -38,13 +45,24 @@ export interface HeadlessCms extends CmsSettingsContext, CmsSystemContext, CmsGr
|
|
|
38
45
|
* The storage operations loaded for current context.
|
|
39
46
|
*/
|
|
40
47
|
storageOperations: HeadlessCmsStorageOperations;
|
|
48
|
+
/**
|
|
49
|
+
* Permissions for groups, models and entries.
|
|
50
|
+
*
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
permissions: HeadlessCmsPermissions;
|
|
54
|
+
/**
|
|
55
|
+
* Export operations.
|
|
56
|
+
*/
|
|
57
|
+
export: HeadlessCmsExport;
|
|
58
|
+
importing: HeadlessCmsImport;
|
|
41
59
|
}
|
|
42
60
|
/**
|
|
43
61
|
* @description This combines all contexts used in the CMS into a single one.
|
|
44
62
|
*
|
|
45
63
|
* @category Context
|
|
46
64
|
*/
|
|
47
|
-
export interface CmsContext extends Context, DbContext, I18NContext
|
|
65
|
+
export interface CmsContext extends Context, DbContext, I18NContext {
|
|
48
66
|
cms: HeadlessCms;
|
|
49
67
|
}
|
|
50
68
|
interface CmsModelFieldPredefinedValuesValue {
|
|
@@ -98,6 +116,10 @@ export interface CmsModelFieldSettings {
|
|
|
98
116
|
* Object field has child fields.
|
|
99
117
|
*/
|
|
100
118
|
fields?: CmsModelField[];
|
|
119
|
+
/**
|
|
120
|
+
* Is the file field images only one?
|
|
121
|
+
*/
|
|
122
|
+
imagesOnly?: boolean;
|
|
101
123
|
/**
|
|
102
124
|
* Object field has child fields - so it needs to have a layout.
|
|
103
125
|
*/
|
|
@@ -110,11 +132,16 @@ export interface CmsModelFieldSettings {
|
|
|
110
132
|
* Date field.
|
|
111
133
|
*/
|
|
112
134
|
type?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Disable full text search explicitly on this field.
|
|
137
|
+
*/
|
|
138
|
+
disableFullTextSearch?: boolean;
|
|
113
139
|
/**
|
|
114
140
|
* There are a lot of other settings that are possible to add, so we keep the type opened.
|
|
115
141
|
*/
|
|
116
142
|
[key: string]: any;
|
|
117
143
|
}
|
|
144
|
+
export declare type CmsModelFieldType = "boolean" | "datetime" | "file" | "long-text" | "number" | "json" | "object" | "ref" | "rich-text" | "text" | "dynamicZone" | string;
|
|
118
145
|
/**
|
|
119
146
|
* A definition for content model field. This type exists on the app side as well.
|
|
120
147
|
*
|
|
@@ -135,18 +162,16 @@ export interface CmsModelField {
|
|
|
135
162
|
* A type of the field.
|
|
136
163
|
* We are defining our built-in fields, so people know which are available by the default.
|
|
137
164
|
*/
|
|
138
|
-
type:
|
|
165
|
+
type: CmsModelFieldType;
|
|
139
166
|
/**
|
|
140
167
|
* A unique storage ID for storing actual values.
|
|
141
|
-
* Must in form of a-zA-Z0-9@a-zA-Z0-9
|
|
168
|
+
* Must in form of a-zA-Z0-9@a-zA-Z0-9
|
|
142
169
|
*
|
|
143
170
|
* This is an auto-generated value: uses `id` and `type`
|
|
144
171
|
*
|
|
145
172
|
* This is used as path for the entry value.
|
|
146
|
-
*
|
|
147
|
-
* @internal
|
|
148
173
|
*/
|
|
149
|
-
storageId: string;
|
|
174
|
+
storageId: `${string}@${string}` | string;
|
|
150
175
|
/**
|
|
151
176
|
* Field identifier for the model field that will be available to the outside world.
|
|
152
177
|
* `storageId` is used as path (or column) to store the data.
|
|
@@ -233,9 +258,6 @@ export interface CmsModelDynamicZoneField extends CmsModelField {
|
|
|
233
258
|
export interface CmsModelFieldWithParent extends CmsModelField {
|
|
234
259
|
parent?: CmsModelFieldWithParent | null;
|
|
235
260
|
}
|
|
236
|
-
export interface CmsModelDynamicZoneFieldWithParent extends CmsModelDynamicZoneField {
|
|
237
|
-
parent?: CmsModelDynamicZoneFieldWithParent | null;
|
|
238
|
-
}
|
|
239
261
|
/**
|
|
240
262
|
* A definition for dateTime field to show possible type of the field in settings.
|
|
241
263
|
*/
|
|
@@ -290,6 +312,9 @@ export interface CmsModelFieldValidatorValidateParams<T = any> {
|
|
|
290
312
|
* @category ModelField
|
|
291
313
|
* @category FieldValidation
|
|
292
314
|
*/
|
|
315
|
+
export interface CmsModelFieldValidatorPluginValidateCb {
|
|
316
|
+
(params: CmsModelFieldValidatorValidateParams): Promise<boolean>;
|
|
317
|
+
}
|
|
293
318
|
export interface CmsModelFieldValidatorPlugin extends Plugin {
|
|
294
319
|
/**
|
|
295
320
|
* A plugin type.
|
|
@@ -306,7 +331,7 @@ export interface CmsModelFieldValidatorPlugin extends Plugin {
|
|
|
306
331
|
/**
|
|
307
332
|
* Validation method.
|
|
308
333
|
*/
|
|
309
|
-
validate
|
|
334
|
+
validate: CmsModelFieldValidatorPluginValidateCb;
|
|
310
335
|
};
|
|
311
336
|
}
|
|
312
337
|
/**
|
|
@@ -377,7 +402,7 @@ export interface CmsModelGroup {
|
|
|
377
402
|
name: string;
|
|
378
403
|
}
|
|
379
404
|
/**
|
|
380
|
-
*
|
|
405
|
+
* Base CMS Model. Should not be exported and used outside of this package.
|
|
381
406
|
*
|
|
382
407
|
* @category Database model
|
|
383
408
|
* @category CmsModel
|
|
@@ -391,6 +416,24 @@ export interface CmsModel {
|
|
|
391
416
|
* Unique ID for the content model. Created from name if not defined by user.
|
|
392
417
|
*/
|
|
393
418
|
modelId: string;
|
|
419
|
+
/**
|
|
420
|
+
* Name of the content model in singular form to be used in the API.
|
|
421
|
+
* example:
|
|
422
|
+
* - Article
|
|
423
|
+
* - Fruit
|
|
424
|
+
* - Vegetable
|
|
425
|
+
* - Car
|
|
426
|
+
*/
|
|
427
|
+
singularApiName: string;
|
|
428
|
+
/**
|
|
429
|
+
* Name of the content model in plural form to be used in the API.
|
|
430
|
+
* example:
|
|
431
|
+
* - Articles
|
|
432
|
+
* - Fruits
|
|
433
|
+
* - Vegetables
|
|
434
|
+
* - Cars
|
|
435
|
+
*/
|
|
436
|
+
pluralApiName: string;
|
|
394
437
|
/**
|
|
395
438
|
* Model tenant.
|
|
396
439
|
*/
|
|
@@ -403,10 +446,14 @@ export interface CmsModel {
|
|
|
403
446
|
* Cms Group reference object.
|
|
404
447
|
*/
|
|
405
448
|
group: CmsModelGroup;
|
|
449
|
+
/**
|
|
450
|
+
* Icon for the content model.
|
|
451
|
+
*/
|
|
452
|
+
icon?: string | null;
|
|
406
453
|
/**
|
|
407
454
|
* Description for the content model.
|
|
408
455
|
*/
|
|
409
|
-
description: string;
|
|
456
|
+
description: string | null;
|
|
410
457
|
/**
|
|
411
458
|
* Date created
|
|
412
459
|
*/
|
|
@@ -418,7 +465,7 @@ export interface CmsModel {
|
|
|
418
465
|
/**
|
|
419
466
|
* CreatedBy object wrapper. Contains id, name and type of the user.
|
|
420
467
|
*/
|
|
421
|
-
createdBy?:
|
|
468
|
+
createdBy?: CmsIdentity;
|
|
422
469
|
/**
|
|
423
470
|
* List of fields defining entry values.
|
|
424
471
|
*/
|
|
@@ -447,6 +494,16 @@ export interface CmsModel {
|
|
|
447
494
|
* It is picked as first available text field. Or user can select own field.
|
|
448
495
|
*/
|
|
449
496
|
titleFieldId: string;
|
|
497
|
+
/**
|
|
498
|
+
* The field which is displayed as the description one.
|
|
499
|
+
* Only way this is null or undefined is that there are no long-text fields to be set as description.
|
|
500
|
+
*/
|
|
501
|
+
descriptionFieldId?: string | null;
|
|
502
|
+
/**
|
|
503
|
+
* The field which is displayed as the image.
|
|
504
|
+
* Only way this is null or undefined is that there are no file fields, with images only set, to be set as image.
|
|
505
|
+
*/
|
|
506
|
+
imageFieldId?: string | null;
|
|
450
507
|
/**
|
|
451
508
|
* The version of Webiny which this record was stored with.
|
|
452
509
|
*/
|
|
@@ -457,6 +514,10 @@ export interface CmsModel {
|
|
|
457
514
|
* Only available for the plugin constructed models.
|
|
458
515
|
*/
|
|
459
516
|
isPrivate?: boolean;
|
|
517
|
+
/**
|
|
518
|
+
* Is this model created via plugin?
|
|
519
|
+
*/
|
|
520
|
+
isPlugin?: boolean;
|
|
460
521
|
}
|
|
461
522
|
/**
|
|
462
523
|
* When sending model to the storage operations, it must contain createValueKeyToStorageConverter and createValueKeyFromStorageConverter
|
|
@@ -480,6 +541,7 @@ interface CmsModelFieldToGraphQLCreateResolverParams<TField> {
|
|
|
480
541
|
graphQLType: string;
|
|
481
542
|
field: TField;
|
|
482
543
|
createFieldResolvers: any;
|
|
544
|
+
fieldTypePlugins: CmsFieldTypePlugins;
|
|
483
545
|
}
|
|
484
546
|
export interface CmsModelFieldToGraphQLCreateResolver<TField = CmsModelField> {
|
|
485
547
|
(params: CmsModelFieldToGraphQLCreateResolverParams<TField>): GraphQLFieldResolver | {
|
|
@@ -519,7 +581,7 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
519
581
|
* fieldType: "myField"
|
|
520
582
|
* ```
|
|
521
583
|
*/
|
|
522
|
-
fieldType:
|
|
584
|
+
fieldType: CmsModelFieldType;
|
|
523
585
|
/**
|
|
524
586
|
* Is the field searchable via the GraphQL?
|
|
525
587
|
*
|
|
@@ -561,7 +623,7 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
561
623
|
*/
|
|
562
624
|
createStorageId?: (params: {
|
|
563
625
|
model: CmsModel;
|
|
564
|
-
field: TField
|
|
626
|
+
field: Omit<TField, "storageId"> & Partial<Pick<TField, "storageId">>;
|
|
565
627
|
}) => string | null | undefined;
|
|
566
628
|
/**
|
|
567
629
|
* Read API methods.
|
|
@@ -579,7 +641,6 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
579
641
|
* ```
|
|
580
642
|
*/
|
|
581
643
|
createGetFilters?(params: {
|
|
582
|
-
model: CmsModel;
|
|
583
644
|
field: TField;
|
|
584
645
|
}): string;
|
|
585
646
|
/**
|
|
@@ -599,7 +660,7 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
599
660
|
* ```
|
|
600
661
|
*/
|
|
601
662
|
createListFilters?(params: {
|
|
602
|
-
model: CmsModel
|
|
663
|
+
model: Pick<CmsModel, "singularApiName">;
|
|
603
664
|
field: TField;
|
|
604
665
|
plugins: CmsFieldTypePlugins;
|
|
605
666
|
}): string;
|
|
@@ -619,6 +680,7 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
619
680
|
* ```
|
|
620
681
|
*/
|
|
621
682
|
createTypeField(params: {
|
|
683
|
+
models: CmsModel[];
|
|
622
684
|
model: CmsModel;
|
|
623
685
|
field: TField;
|
|
624
686
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
@@ -679,7 +741,7 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
679
741
|
* ```
|
|
680
742
|
*/
|
|
681
743
|
createListFilters?: (params: {
|
|
682
|
-
model: CmsModel
|
|
744
|
+
model: Pick<CmsModel, "singularApiName">;
|
|
683
745
|
field: TField;
|
|
684
746
|
plugins: CmsFieldTypePlugins;
|
|
685
747
|
}) => string;
|
|
@@ -719,6 +781,7 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
719
781
|
* ```
|
|
720
782
|
*/
|
|
721
783
|
createTypeField: (params: {
|
|
784
|
+
models: CmsModel[];
|
|
722
785
|
model: CmsModel;
|
|
723
786
|
field: TField;
|
|
724
787
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
@@ -739,6 +802,7 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
739
802
|
* ```
|
|
740
803
|
*/
|
|
741
804
|
createInputField: (params: {
|
|
805
|
+
models: CmsModel[];
|
|
742
806
|
model: CmsModel;
|
|
743
807
|
field: TField;
|
|
744
808
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
@@ -806,7 +870,7 @@ export interface CmsFieldTypePlugins {
|
|
|
806
870
|
*
|
|
807
871
|
* @category General
|
|
808
872
|
*/
|
|
809
|
-
export interface
|
|
873
|
+
export interface CmsIdentity {
|
|
810
874
|
/**
|
|
811
875
|
* ID if the user.
|
|
812
876
|
*/
|
|
@@ -820,44 +884,6 @@ export interface CreatedBy {
|
|
|
820
884
|
*/
|
|
821
885
|
type: string;
|
|
822
886
|
}
|
|
823
|
-
/**
|
|
824
|
-
* Representation of settings database model.
|
|
825
|
-
*
|
|
826
|
-
* @category Database model
|
|
827
|
-
*/
|
|
828
|
-
export interface CmsSettings {
|
|
829
|
-
/**
|
|
830
|
-
* Last content model change. Used to cache GraphQL schema.
|
|
831
|
-
*/
|
|
832
|
-
contentModelLastChange: Date;
|
|
833
|
-
/**
|
|
834
|
-
* Settings tenant.
|
|
835
|
-
*/
|
|
836
|
-
tenant: string;
|
|
837
|
-
/**
|
|
838
|
-
* Settings locale.
|
|
839
|
-
*/
|
|
840
|
-
locale: string;
|
|
841
|
-
}
|
|
842
|
-
/**
|
|
843
|
-
* Settings CRUD in context.
|
|
844
|
-
*
|
|
845
|
-
* @category Context
|
|
846
|
-
*/
|
|
847
|
-
export interface CmsSettingsContext {
|
|
848
|
-
/**
|
|
849
|
-
* Gets settings model from the database.
|
|
850
|
-
*/
|
|
851
|
-
getSettings: () => Promise<CmsSettings | null>;
|
|
852
|
-
/**
|
|
853
|
-
* Updates settings model with a new date.
|
|
854
|
-
*/
|
|
855
|
-
updateModelLastChange: () => Promise<void>;
|
|
856
|
-
/**
|
|
857
|
-
* Get the datetime when content model last changed.
|
|
858
|
-
*/
|
|
859
|
-
getModelLastChange: () => Promise<Date>;
|
|
860
|
-
}
|
|
861
887
|
export interface OnSystemBeforeInstallTopicParams {
|
|
862
888
|
tenant: string;
|
|
863
889
|
locale: string;
|
|
@@ -874,22 +900,9 @@ export interface OnSystemInstallErrorTopicParams {
|
|
|
874
900
|
export declare type CmsSystemContext = {
|
|
875
901
|
getSystemVersion: () => Promise<string | null>;
|
|
876
902
|
setSystemVersion: (version: string) => Promise<void>;
|
|
877
|
-
getReadAPIKey(): Promise<string | null>;
|
|
878
903
|
installSystem: () => Promise<void>;
|
|
879
|
-
upgradeSystem: (version: string) => Promise<boolean>;
|
|
880
904
|
/**
|
|
881
|
-
* Lifecycle
|
|
882
|
-
*/
|
|
883
|
-
/**
|
|
884
|
-
* @deprecated
|
|
885
|
-
*/
|
|
886
|
-
onBeforeSystemInstall: Topic<OnSystemBeforeInstallTopicParams>;
|
|
887
|
-
/**
|
|
888
|
-
* @deprecated
|
|
889
|
-
*/
|
|
890
|
-
onAfterSystemInstall: Topic<OnSystemAfterInstallTopicParams>;
|
|
891
|
-
/**
|
|
892
|
-
* Released in 5.34.0
|
|
905
|
+
* Lifecycle Events
|
|
893
906
|
*/
|
|
894
907
|
onSystemBeforeInstall: Topic<OnSystemBeforeInstallTopicParams>;
|
|
895
908
|
onSystemAfterInstall: Topic<OnSystemAfterInstallTopicParams>;
|
|
@@ -902,9 +915,10 @@ export declare type CmsSystemContext = {
|
|
|
902
915
|
* @category GraphQL params
|
|
903
916
|
*/
|
|
904
917
|
export interface CmsGroupCreateInput {
|
|
918
|
+
id?: string;
|
|
905
919
|
name: string;
|
|
906
920
|
slug?: string;
|
|
907
|
-
description?: string;
|
|
921
|
+
description?: string | null;
|
|
908
922
|
icon: string;
|
|
909
923
|
}
|
|
910
924
|
/**
|
|
@@ -949,7 +963,7 @@ export interface CmsGroup {
|
|
|
949
963
|
/**
|
|
950
964
|
* Description for the group.
|
|
951
965
|
*/
|
|
952
|
-
description: string;
|
|
966
|
+
description: string | null;
|
|
953
967
|
/**
|
|
954
968
|
* Icon for the group. In a form of "ico/ico".
|
|
955
969
|
*/
|
|
@@ -957,7 +971,7 @@ export interface CmsGroup {
|
|
|
957
971
|
/**
|
|
958
972
|
* CreatedBy reference object.
|
|
959
973
|
*/
|
|
960
|
-
createdBy?:
|
|
974
|
+
createdBy?: CmsIdentity;
|
|
961
975
|
/**
|
|
962
976
|
* Date group was created on.
|
|
963
977
|
*/
|
|
@@ -976,6 +990,10 @@ export interface CmsGroup {
|
|
|
976
990
|
* Only available for the plugin constructed groups.
|
|
977
991
|
*/
|
|
978
992
|
isPrivate?: boolean;
|
|
993
|
+
/**
|
|
994
|
+
* Is this group created via plugin?
|
|
995
|
+
*/
|
|
996
|
+
isPlugin?: boolean;
|
|
979
997
|
}
|
|
980
998
|
/**
|
|
981
999
|
* A `data.where` parameter received when listing content model groups.
|
|
@@ -987,7 +1005,6 @@ export interface CmsGroupListParams {
|
|
|
987
1005
|
where: {
|
|
988
1006
|
tenant: string;
|
|
989
1007
|
locale: string;
|
|
990
|
-
[key: string]: any;
|
|
991
1008
|
};
|
|
992
1009
|
}
|
|
993
1010
|
/**
|
|
@@ -1071,7 +1088,7 @@ export interface CmsGroupContext {
|
|
|
1071
1088
|
/**
|
|
1072
1089
|
* Gets content model group by given id.
|
|
1073
1090
|
*/
|
|
1074
|
-
getGroup: (id: string) => Promise<CmsGroup
|
|
1091
|
+
getGroup: (id: string) => Promise<CmsGroup>;
|
|
1075
1092
|
/**
|
|
1076
1093
|
* List all content model groups. Filterable via params.
|
|
1077
1094
|
*/
|
|
@@ -1093,34 +1110,7 @@ export interface CmsGroupContext {
|
|
|
1093
1110
|
*/
|
|
1094
1111
|
clearGroupsCache: () => void;
|
|
1095
1112
|
/**
|
|
1096
|
-
* Lifecycle
|
|
1097
|
-
*/
|
|
1098
|
-
/**
|
|
1099
|
-
* @deprecated
|
|
1100
|
-
*/
|
|
1101
|
-
onBeforeGroupCreate: Topic<OnGroupBeforeCreateTopicParams>;
|
|
1102
|
-
/**
|
|
1103
|
-
* @deprecated
|
|
1104
|
-
*/
|
|
1105
|
-
onAfterGroupCreate: Topic<OnGroupAfterCreateTopicParams>;
|
|
1106
|
-
/**
|
|
1107
|
-
* @deprecated
|
|
1108
|
-
*/
|
|
1109
|
-
onBeforeGroupUpdate: Topic<OnGroupBeforeUpdateTopicParams>;
|
|
1110
|
-
/**
|
|
1111
|
-
* @deprecated
|
|
1112
|
-
*/
|
|
1113
|
-
onAfterGroupUpdate: Topic<OnGroupAfterUpdateTopicParams>;
|
|
1114
|
-
/**
|
|
1115
|
-
* @deprecated
|
|
1116
|
-
*/
|
|
1117
|
-
onBeforeGroupDelete: Topic<OnGroupBeforeDeleteTopicParams>;
|
|
1118
|
-
/**
|
|
1119
|
-
* @deprecated
|
|
1120
|
-
*/
|
|
1121
|
-
onAfterGroupDelete: Topic<OnGroupAfterDeleteTopicParams>;
|
|
1122
|
-
/**
|
|
1123
|
-
* Lifecycle events released in 5.33.0
|
|
1113
|
+
* Lifecycle Events
|
|
1124
1114
|
*/
|
|
1125
1115
|
onGroupBeforeCreate: Topic<OnGroupBeforeCreateTopicParams>;
|
|
1126
1116
|
onGroupAfterCreate: Topic<OnGroupAfterCreateTopicParams>;
|
|
@@ -1159,6 +1149,14 @@ export interface CmsModelCreateInput {
|
|
|
1159
1149
|
* Name of the content model.
|
|
1160
1150
|
*/
|
|
1161
1151
|
name: string;
|
|
1152
|
+
/**
|
|
1153
|
+
* Singular name of the content model to be used in the API.
|
|
1154
|
+
*/
|
|
1155
|
+
singularApiName: string;
|
|
1156
|
+
/**
|
|
1157
|
+
* Plural name of the content model to be used in the API.
|
|
1158
|
+
*/
|
|
1159
|
+
pluralApiName: string;
|
|
1162
1160
|
/**
|
|
1163
1161
|
* Unique ID of the content model. Created from name if not sent by the user. Cannot be changed.
|
|
1164
1162
|
*/
|
|
@@ -1191,10 +1189,11 @@ export interface CmsModelCreateInput {
|
|
|
1191
1189
|
*/
|
|
1192
1190
|
tags?: string[];
|
|
1193
1191
|
/**
|
|
1194
|
-
*
|
|
1195
|
-
* It is picked as first available text field. Or user can select own field.
|
|
1192
|
+
* Fields fieldId which are picked to represent the CMS entry.
|
|
1196
1193
|
*/
|
|
1197
|
-
titleFieldId?: string;
|
|
1194
|
+
titleFieldId?: string | null;
|
|
1195
|
+
descriptionFieldId?: string | null;
|
|
1196
|
+
imageFieldId?: string | null;
|
|
1198
1197
|
}
|
|
1199
1198
|
/**
|
|
1200
1199
|
* A GraphQL `params.data` parameter received when creating content model from existing model.
|
|
@@ -1266,7 +1265,7 @@ export interface CmsModelFieldInput {
|
|
|
1266
1265
|
/**
|
|
1267
1266
|
* @see CmsModelField.listValidation
|
|
1268
1267
|
*/
|
|
1269
|
-
listValidation
|
|
1268
|
+
listValidation?: CmsModelFieldValidation[];
|
|
1270
1269
|
/**
|
|
1271
1270
|
* User defined settings.
|
|
1272
1271
|
*/
|
|
@@ -1283,6 +1282,14 @@ export interface CmsModelUpdateInput {
|
|
|
1283
1282
|
* A new content model name.
|
|
1284
1283
|
*/
|
|
1285
1284
|
name?: string;
|
|
1285
|
+
/**
|
|
1286
|
+
* A new singular name of the content model to be used in the API.
|
|
1287
|
+
*/
|
|
1288
|
+
singularApiName?: string;
|
|
1289
|
+
/**
|
|
1290
|
+
* A new plural name of the content model to be used in the API.
|
|
1291
|
+
*/
|
|
1292
|
+
pluralApiName?: string;
|
|
1286
1293
|
/**
|
|
1287
1294
|
* A group we want to move the model to.
|
|
1288
1295
|
*/
|
|
@@ -1307,10 +1314,11 @@ export interface CmsModelUpdateInput {
|
|
|
1307
1314
|
*/
|
|
1308
1315
|
layout: string[][];
|
|
1309
1316
|
/**
|
|
1310
|
-
*
|
|
1311
|
-
* It is picked as first available text field. Or user can select own field.
|
|
1317
|
+
* Fields fieldId which are picked to represent the CMS entry.
|
|
1312
1318
|
*/
|
|
1313
|
-
titleFieldId?: string;
|
|
1319
|
+
titleFieldId?: string | null;
|
|
1320
|
+
descriptionFieldId?: string | null;
|
|
1321
|
+
imageFieldId?: string | null;
|
|
1314
1322
|
}
|
|
1315
1323
|
/**
|
|
1316
1324
|
* A plugin to load a CmsModelManager.
|
|
@@ -1372,23 +1380,88 @@ export interface CmsEntry<T = CmsEntryValues> {
|
|
|
1372
1380
|
*/
|
|
1373
1381
|
id: string;
|
|
1374
1382
|
/**
|
|
1375
|
-
*
|
|
1383
|
+
* Revision-level meta fields. 👇
|
|
1384
|
+
*/
|
|
1385
|
+
/**
|
|
1386
|
+
* An ISO 8601 date/time string.
|
|
1387
|
+
*/
|
|
1388
|
+
revisionCreatedOn: string;
|
|
1389
|
+
/**
|
|
1390
|
+
* An ISO 8601 date/time string.
|
|
1391
|
+
*/
|
|
1392
|
+
revisionSavedOn: string;
|
|
1393
|
+
/**
|
|
1394
|
+
* An ISO 8601 date/time string.
|
|
1395
|
+
*/
|
|
1396
|
+
revisionModifiedOn: string | null;
|
|
1397
|
+
/**
|
|
1398
|
+
* An ISO 8601 date/time string.
|
|
1399
|
+
*/
|
|
1400
|
+
revisionFirstPublishedOn: string | null;
|
|
1401
|
+
/**
|
|
1402
|
+
* An ISO 8601 date/time string.
|
|
1403
|
+
*/
|
|
1404
|
+
revisionLastPublishedOn: string | null;
|
|
1405
|
+
/**
|
|
1406
|
+
* Identity that last ionCreated the entry.
|
|
1407
|
+
*/
|
|
1408
|
+
revisionCreatedBy: CmsIdentity;
|
|
1409
|
+
/**
|
|
1410
|
+
* Identity that last ionSaved the entry.
|
|
1411
|
+
*/
|
|
1412
|
+
revisionSavedBy: CmsIdentity;
|
|
1413
|
+
/**
|
|
1414
|
+
* Identity that last ionModified the entry.
|
|
1415
|
+
*/
|
|
1416
|
+
revisionModifiedBy: CmsIdentity | null;
|
|
1417
|
+
/**
|
|
1418
|
+
* Identity that first published the entry.
|
|
1376
1419
|
*/
|
|
1377
|
-
|
|
1420
|
+
revisionFirstPublishedBy: CmsIdentity | null;
|
|
1378
1421
|
/**
|
|
1379
|
-
*
|
|
1422
|
+
* Identity that last published the entry.
|
|
1380
1423
|
*/
|
|
1381
|
-
|
|
1424
|
+
revisionLastPublishedBy: CmsIdentity | null;
|
|
1382
1425
|
/**
|
|
1383
|
-
*
|
|
1384
|
-
* Populated on creation.
|
|
1426
|
+
* An ISO 8601 date/time string.
|
|
1385
1427
|
*/
|
|
1386
1428
|
createdOn: string;
|
|
1387
1429
|
/**
|
|
1388
|
-
*
|
|
1389
|
-
* Populated every time entry is saved.
|
|
1430
|
+
* An ISO 8601 date/time string.
|
|
1390
1431
|
*/
|
|
1391
1432
|
savedOn: string;
|
|
1433
|
+
/**
|
|
1434
|
+
* An ISO 8601 date/time string.
|
|
1435
|
+
*/
|
|
1436
|
+
modifiedOn: string | null;
|
|
1437
|
+
/**
|
|
1438
|
+
* An ISO 8601 date/time string.
|
|
1439
|
+
*/
|
|
1440
|
+
firstPublishedOn: string | null;
|
|
1441
|
+
/**
|
|
1442
|
+
* An ISO 8601 date/time string.
|
|
1443
|
+
*/
|
|
1444
|
+
lastPublishedOn: string | null;
|
|
1445
|
+
/**
|
|
1446
|
+
* Identity that last created the entry.
|
|
1447
|
+
*/
|
|
1448
|
+
createdBy: CmsIdentity;
|
|
1449
|
+
/**
|
|
1450
|
+
* Identity that last saved the entry.
|
|
1451
|
+
*/
|
|
1452
|
+
savedBy: CmsIdentity;
|
|
1453
|
+
/**
|
|
1454
|
+
* Identity that last modified the entry.
|
|
1455
|
+
*/
|
|
1456
|
+
modifiedBy: CmsIdentity | null;
|
|
1457
|
+
/**
|
|
1458
|
+
* Identity that first published the entry.
|
|
1459
|
+
*/
|
|
1460
|
+
firstPublishedBy: CmsIdentity | null;
|
|
1461
|
+
/**
|
|
1462
|
+
* Identity that last published the entry.
|
|
1463
|
+
*/
|
|
1464
|
+
lastPublishedBy: CmsIdentity | null;
|
|
1392
1465
|
/**
|
|
1393
1466
|
* Model ID of the definition for the entry.
|
|
1394
1467
|
* @see CmsModel
|
|
@@ -1399,11 +1472,6 @@ export interface CmsEntry<T = CmsEntryValues> {
|
|
|
1399
1472
|
* @see I18NLocale.code
|
|
1400
1473
|
*/
|
|
1401
1474
|
locale: string;
|
|
1402
|
-
/**
|
|
1403
|
-
* A string of Date.toISOString() type - if published.
|
|
1404
|
-
* Populated when entry is published.
|
|
1405
|
-
*/
|
|
1406
|
-
publishedOn?: string;
|
|
1407
1475
|
/**
|
|
1408
1476
|
* A revision version of the entry.
|
|
1409
1477
|
*/
|
|
@@ -1422,6 +1490,12 @@ export interface CmsEntry<T = CmsEntryValues> {
|
|
|
1422
1490
|
* @see CmsModelField
|
|
1423
1491
|
*/
|
|
1424
1492
|
values: T;
|
|
1493
|
+
/**
|
|
1494
|
+
* Advanced Content Organization
|
|
1495
|
+
*/
|
|
1496
|
+
location?: {
|
|
1497
|
+
folderId?: string | null;
|
|
1498
|
+
};
|
|
1425
1499
|
/**
|
|
1426
1500
|
* Settings for the given entry.
|
|
1427
1501
|
*
|
|
@@ -1437,6 +1511,10 @@ export interface CmsEntry<T = CmsEntryValues> {
|
|
|
1437
1511
|
export interface CmsStorageEntry extends CmsEntry {
|
|
1438
1512
|
[key: string]: any;
|
|
1439
1513
|
}
|
|
1514
|
+
export interface CmsEntryUniqueValue {
|
|
1515
|
+
value: string;
|
|
1516
|
+
count: number;
|
|
1517
|
+
}
|
|
1440
1518
|
/**
|
|
1441
1519
|
* A definition for content model manager to be used in the code.
|
|
1442
1520
|
* The default one uses `CmsEntryContext` methods internally, but devs can change to what every they want.
|
|
@@ -1609,59 +1687,19 @@ export interface CmsModelContext {
|
|
|
1609
1687
|
* Get an instance of CmsModelManager for given content modelId.
|
|
1610
1688
|
*
|
|
1611
1689
|
* @see CmsModelManager
|
|
1612
|
-
*
|
|
1613
|
-
* @deprecated use the getEntryManager() method instead
|
|
1614
1690
|
*/
|
|
1615
|
-
getModelManager: (model: CmsModel | string) => Promise<CmsModelManager>;
|
|
1616
1691
|
getEntryManager: (model: CmsModel | string) => Promise<CmsModelManager>;
|
|
1617
1692
|
/**
|
|
1618
1693
|
* Get all content model managers mapped by modelId.
|
|
1619
1694
|
* @see CmsModelManager
|
|
1620
|
-
* @deprecated use getEntryManagers instead
|
|
1621
1695
|
*/
|
|
1622
|
-
getManagers: () => Map<string, CmsModelManager>;
|
|
1623
1696
|
getEntryManagers: () => Map<string, CmsModelManager>;
|
|
1624
1697
|
/**
|
|
1625
1698
|
* Clear all the model caches.
|
|
1626
1699
|
*/
|
|
1627
1700
|
clearModelsCache: () => void;
|
|
1628
1701
|
/**
|
|
1629
|
-
* Lifecycle
|
|
1630
|
-
*/
|
|
1631
|
-
/**
|
|
1632
|
-
* @deprecated
|
|
1633
|
-
*/
|
|
1634
|
-
onBeforeModelCreate: Topic<OnModelBeforeCreateTopicParams>;
|
|
1635
|
-
/**
|
|
1636
|
-
* @deprecated
|
|
1637
|
-
*/
|
|
1638
|
-
onAfterModelCreate: Topic<OnModelAfterCreateTopicParams>;
|
|
1639
|
-
/**
|
|
1640
|
-
* @deprecated
|
|
1641
|
-
*/
|
|
1642
|
-
onBeforeModelCreateFrom: Topic<OnModelBeforeCreateFromTopicParams>;
|
|
1643
|
-
/**
|
|
1644
|
-
* @deprecated
|
|
1645
|
-
*/
|
|
1646
|
-
onAfterModelCreateFrom: Topic<OnModelAfterCreateFromTopicParams>;
|
|
1647
|
-
/**
|
|
1648
|
-
* @deprecated
|
|
1649
|
-
*/
|
|
1650
|
-
onBeforeModelUpdate: Topic<OnModelBeforeUpdateTopicParams>;
|
|
1651
|
-
/**
|
|
1652
|
-
* @deprecated
|
|
1653
|
-
*/
|
|
1654
|
-
onAfterModelUpdate: Topic<OnModelAfterUpdateTopicParams>;
|
|
1655
|
-
/**
|
|
1656
|
-
* @deprecated
|
|
1657
|
-
*/
|
|
1658
|
-
onBeforeModelDelete: Topic<OnModelBeforeDeleteTopicParams>;
|
|
1659
|
-
/**
|
|
1660
|
-
* @deprecated
|
|
1661
|
-
*/
|
|
1662
|
-
onAfterModelDelete: Topic<OnModelAfterDeleteTopicParams>;
|
|
1663
|
-
/**
|
|
1664
|
-
* Lifecycle events - released in 5.33.0
|
|
1702
|
+
* Lifecycle Events
|
|
1665
1703
|
*/
|
|
1666
1704
|
onModelBeforeCreate: Topic<OnModelBeforeCreateTopicParams>;
|
|
1667
1705
|
onModelAfterCreate: Topic<OnModelAfterCreateTopicParams>;
|
|
@@ -1715,23 +1753,51 @@ export interface CmsEntryListWhere {
|
|
|
1715
1753
|
entryId_in?: string[];
|
|
1716
1754
|
entryId_not_in?: string[];
|
|
1717
1755
|
/**
|
|
1718
|
-
*
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1756
|
+
* Revision-level meta fields. 👇
|
|
1757
|
+
*/
|
|
1758
|
+
revisionCreatedBy?: string;
|
|
1759
|
+
revisionCreatedBy_not?: string;
|
|
1760
|
+
revisionCreatedBy_in?: string[];
|
|
1761
|
+
revisionCreatedBy_not_in?: string[];
|
|
1762
|
+
revisionModifiedBy?: string;
|
|
1763
|
+
revisionModifiedBy_not?: string;
|
|
1764
|
+
revisionModifiedBy_in?: string[];
|
|
1765
|
+
revisionModifiedBy_not_in?: string[];
|
|
1766
|
+
revisionSavedBy?: string;
|
|
1767
|
+
revisionSavedBy_not?: string;
|
|
1768
|
+
revisionSavedBy_in?: string[];
|
|
1769
|
+
revisionSavedBy_not_in?: string[];
|
|
1770
|
+
revisionFirstPublishedBy?: string;
|
|
1771
|
+
revisionFirstPublishedBy_not?: string;
|
|
1772
|
+
revisionFirstPublishedBy_in?: string[];
|
|
1773
|
+
revisionFirstPublishedBy_not_in?: string[];
|
|
1774
|
+
revisionLastPublishedBy?: string;
|
|
1775
|
+
revisionLastPublishedBy_not?: string;
|
|
1776
|
+
revisionLastPublishedBy_in?: string[];
|
|
1777
|
+
revisionLastPublishedBy_not_in?: string[];
|
|
1778
|
+
/**
|
|
1779
|
+
* Entry-level meta fields. 👇
|
|
1730
1780
|
*/
|
|
1731
1781
|
createdBy?: string;
|
|
1732
1782
|
createdBy_not?: string;
|
|
1733
1783
|
createdBy_in?: string[];
|
|
1734
1784
|
createdBy_not_in?: string[];
|
|
1785
|
+
modifiedBy?: string;
|
|
1786
|
+
modifiedBy_not?: string;
|
|
1787
|
+
modifiedBy_in?: string[];
|
|
1788
|
+
modifiedBy_not_in?: string[];
|
|
1789
|
+
savedBy?: string;
|
|
1790
|
+
savedBy_not?: string;
|
|
1791
|
+
savedBy_in?: string[];
|
|
1792
|
+
savedBy_not_in?: string[];
|
|
1793
|
+
firstPublishedBy?: string;
|
|
1794
|
+
firstPublishedBy_not?: string;
|
|
1795
|
+
firstPublishedBy_in?: string[];
|
|
1796
|
+
firstPublishedBy_not_in?: string[];
|
|
1797
|
+
lastPublishedBy?: string;
|
|
1798
|
+
lastPublishedBy_not?: string;
|
|
1799
|
+
lastPublishedBy_in?: string[];
|
|
1800
|
+
lastPublishedBy_not_in?: string[];
|
|
1735
1801
|
/**
|
|
1736
1802
|
* Version of the entry.
|
|
1737
1803
|
*
|
|
@@ -1757,6 +1823,17 @@ export interface CmsEntryListWhere {
|
|
|
1757
1823
|
* @internal
|
|
1758
1824
|
*/
|
|
1759
1825
|
latest?: boolean;
|
|
1826
|
+
/**
|
|
1827
|
+
* ACO related parameters.
|
|
1828
|
+
*/
|
|
1829
|
+
wbyAco_location?: {
|
|
1830
|
+
folderId?: string;
|
|
1831
|
+
folderId_not?: string;
|
|
1832
|
+
folderId_in?: string[];
|
|
1833
|
+
folderId_not_in?: string[];
|
|
1834
|
+
AND?: CmsEntryListWhere[];
|
|
1835
|
+
OR?: CmsEntryListWhere[];
|
|
1836
|
+
};
|
|
1760
1837
|
/**
|
|
1761
1838
|
* This is to allow querying by any content model field defined by the user.
|
|
1762
1839
|
*/
|
|
@@ -1824,12 +1901,12 @@ export interface CmsEntryMeta {
|
|
|
1824
1901
|
export interface OnEntryBeforeCreateTopicParams {
|
|
1825
1902
|
input: CreateCmsEntryInput;
|
|
1826
1903
|
entry: CmsEntry;
|
|
1827
|
-
model:
|
|
1904
|
+
model: CmsModel;
|
|
1828
1905
|
}
|
|
1829
1906
|
export interface OnEntryAfterCreateTopicParams {
|
|
1830
1907
|
input: CreateCmsEntryInput;
|
|
1831
1908
|
entry: CmsEntry;
|
|
1832
|
-
model:
|
|
1909
|
+
model: CmsModel;
|
|
1833
1910
|
storageEntry: CmsEntry;
|
|
1834
1911
|
}
|
|
1835
1912
|
export interface OnEntryCreateErrorTopicParams {
|
|
@@ -1845,13 +1922,13 @@ export interface OnEntryRevisionBeforeCreateTopicParams {
|
|
|
1845
1922
|
input: CreateFromCmsEntryInput;
|
|
1846
1923
|
entry: CmsEntry;
|
|
1847
1924
|
original: CmsEntry;
|
|
1848
|
-
model:
|
|
1925
|
+
model: CmsModel;
|
|
1849
1926
|
}
|
|
1850
1927
|
export interface OnEntryRevisionAfterCreateTopicParams {
|
|
1851
1928
|
input: CreateFromCmsEntryInput;
|
|
1852
1929
|
entry: CmsEntry;
|
|
1853
1930
|
original: CmsEntry;
|
|
1854
|
-
model:
|
|
1931
|
+
model: CmsModel;
|
|
1855
1932
|
storageEntry: CmsEntry;
|
|
1856
1933
|
}
|
|
1857
1934
|
export interface OnEntryCreateRevisionErrorTopicParams {
|
|
@@ -1868,18 +1945,37 @@ export interface OnEntryBeforeUpdateTopicParams {
|
|
|
1868
1945
|
input: UpdateCmsEntryInput;
|
|
1869
1946
|
original: CmsEntry;
|
|
1870
1947
|
entry: CmsEntry;
|
|
1871
|
-
model:
|
|
1948
|
+
model: CmsModel;
|
|
1872
1949
|
}
|
|
1873
1950
|
export interface OnEntryAfterUpdateTopicParams {
|
|
1874
1951
|
input: UpdateCmsEntryInput;
|
|
1875
1952
|
original: CmsEntry;
|
|
1876
1953
|
entry: CmsEntry;
|
|
1877
|
-
model:
|
|
1954
|
+
model: CmsModel;
|
|
1878
1955
|
storageEntry: CmsEntry;
|
|
1879
1956
|
}
|
|
1880
1957
|
export interface OnEntryUpdateErrorTopicParams {
|
|
1881
1958
|
error: Error;
|
|
1882
|
-
input:
|
|
1959
|
+
input: UpdateCmsEntryInput;
|
|
1960
|
+
entry: CmsEntry;
|
|
1961
|
+
model: CmsModel;
|
|
1962
|
+
}
|
|
1963
|
+
/**
|
|
1964
|
+
* Move
|
|
1965
|
+
*/
|
|
1966
|
+
export interface OnEntryBeforeMoveTopicParams {
|
|
1967
|
+
folderId: string;
|
|
1968
|
+
entry: CmsEntry;
|
|
1969
|
+
model: CmsModel;
|
|
1970
|
+
}
|
|
1971
|
+
export interface OnEntryAfterMoveTopicParams {
|
|
1972
|
+
folderId: string;
|
|
1973
|
+
entry: CmsEntry;
|
|
1974
|
+
model: CmsModel;
|
|
1975
|
+
}
|
|
1976
|
+
export interface OnEntryMoveErrorTopicParams {
|
|
1977
|
+
error: Error;
|
|
1978
|
+
folderId: string;
|
|
1883
1979
|
entry: CmsEntry;
|
|
1884
1980
|
model: CmsModel;
|
|
1885
1981
|
}
|
|
@@ -1887,46 +1983,49 @@ export interface OnEntryUpdateErrorTopicParams {
|
|
|
1887
1983
|
* Publish
|
|
1888
1984
|
*/
|
|
1889
1985
|
export interface OnEntryBeforePublishTopicParams {
|
|
1986
|
+
original: CmsEntry;
|
|
1890
1987
|
entry: CmsEntry;
|
|
1891
|
-
model:
|
|
1988
|
+
model: CmsModel;
|
|
1892
1989
|
}
|
|
1893
1990
|
export interface OnEntryAfterPublishTopicParams {
|
|
1991
|
+
original: CmsEntry;
|
|
1894
1992
|
entry: CmsEntry;
|
|
1895
|
-
model:
|
|
1993
|
+
model: CmsModel;
|
|
1896
1994
|
storageEntry: CmsEntry;
|
|
1897
1995
|
}
|
|
1898
1996
|
export interface OnEntryPublishErrorTopicParams {
|
|
1899
1997
|
error: Error;
|
|
1998
|
+
original: CmsEntry;
|
|
1900
1999
|
entry: CmsEntry;
|
|
1901
|
-
model:
|
|
2000
|
+
model: CmsModel;
|
|
1902
2001
|
}
|
|
1903
2002
|
/**
|
|
1904
2003
|
* Republish
|
|
1905
2004
|
*/
|
|
1906
2005
|
export interface OnEntryBeforeRepublishTopicParams {
|
|
1907
2006
|
entry: CmsEntry;
|
|
1908
|
-
model:
|
|
2007
|
+
model: CmsModel;
|
|
1909
2008
|
}
|
|
1910
2009
|
export interface OnEntryAfterRepublishTopicParams {
|
|
1911
2010
|
entry: CmsEntry;
|
|
1912
|
-
model:
|
|
2011
|
+
model: CmsModel;
|
|
1913
2012
|
storageEntry: CmsEntry;
|
|
1914
2013
|
}
|
|
1915
2014
|
export interface OnEntryRepublishErrorTopicParams {
|
|
1916
2015
|
error: Error;
|
|
1917
2016
|
entry: CmsEntry;
|
|
1918
|
-
model:
|
|
2017
|
+
model: CmsModel;
|
|
1919
2018
|
}
|
|
1920
2019
|
/**
|
|
1921
2020
|
* Unpublish
|
|
1922
2021
|
*/
|
|
1923
2022
|
export interface OnEntryBeforeUnpublishTopicParams {
|
|
1924
2023
|
entry: CmsEntry;
|
|
1925
|
-
model:
|
|
2024
|
+
model: CmsModel;
|
|
1926
2025
|
}
|
|
1927
2026
|
export interface OnEntryAfterUnpublishTopicParams {
|
|
1928
2027
|
entry: CmsEntry;
|
|
1929
|
-
model:
|
|
2028
|
+
model: CmsModel;
|
|
1930
2029
|
storageEntry: CmsEntry;
|
|
1931
2030
|
}
|
|
1932
2031
|
export interface OnEntryUnpublishErrorTopicParams {
|
|
@@ -1936,37 +2035,53 @@ export interface OnEntryUnpublishErrorTopicParams {
|
|
|
1936
2035
|
}
|
|
1937
2036
|
export interface OnEntryBeforeDeleteTopicParams {
|
|
1938
2037
|
entry: CmsEntry;
|
|
1939
|
-
model:
|
|
2038
|
+
model: CmsModel;
|
|
1940
2039
|
}
|
|
1941
2040
|
export interface OnEntryAfterDeleteTopicParams {
|
|
1942
2041
|
entry: CmsEntry;
|
|
1943
|
-
model:
|
|
2042
|
+
model: CmsModel;
|
|
1944
2043
|
}
|
|
1945
2044
|
export interface OnEntryDeleteErrorTopicParams {
|
|
1946
2045
|
error: Error;
|
|
1947
2046
|
entry: CmsEntry;
|
|
1948
|
-
model:
|
|
2047
|
+
model: CmsModel;
|
|
1949
2048
|
}
|
|
1950
2049
|
export interface OnEntryRevisionBeforeDeleteTopicParams {
|
|
1951
2050
|
entry: CmsEntry;
|
|
1952
|
-
model:
|
|
2051
|
+
model: CmsModel;
|
|
1953
2052
|
}
|
|
1954
2053
|
export interface OnEntryRevisionAfterDeleteTopicParams {
|
|
1955
2054
|
entry: CmsEntry;
|
|
1956
|
-
model:
|
|
2055
|
+
model: CmsModel;
|
|
1957
2056
|
}
|
|
1958
2057
|
export interface OnEntryRevisionDeleteErrorTopicParams {
|
|
1959
2058
|
error: Error;
|
|
1960
2059
|
entry: CmsEntry;
|
|
1961
|
-
model:
|
|
2060
|
+
model: CmsModel;
|
|
2061
|
+
}
|
|
2062
|
+
export interface OnEntryBeforeDeleteMultipleTopicParams {
|
|
2063
|
+
model: CmsModel;
|
|
2064
|
+
entries: CmsEntry[];
|
|
2065
|
+
ids: string[];
|
|
2066
|
+
}
|
|
2067
|
+
export interface OnEntryAfterDeleteMultipleTopicParams {
|
|
2068
|
+
model: CmsModel;
|
|
2069
|
+
entries: CmsEntry[];
|
|
2070
|
+
ids: string[];
|
|
2071
|
+
}
|
|
2072
|
+
export interface OnEntryDeleteMultipleErrorTopicParams {
|
|
2073
|
+
model: CmsModel;
|
|
2074
|
+
entries: CmsEntry[];
|
|
2075
|
+
ids: string[];
|
|
2076
|
+
error: Error;
|
|
1962
2077
|
}
|
|
1963
2078
|
export interface OnEntryBeforeGetTopicParams {
|
|
1964
|
-
model:
|
|
2079
|
+
model: CmsModel;
|
|
1965
2080
|
where: CmsEntryListWhere;
|
|
1966
2081
|
}
|
|
1967
2082
|
export interface EntryBeforeListTopicParams {
|
|
1968
2083
|
where: CmsEntryListWhere;
|
|
1969
|
-
model:
|
|
2084
|
+
model: CmsModel;
|
|
1970
2085
|
}
|
|
1971
2086
|
/**
|
|
1972
2087
|
* @category Context
|
|
@@ -1974,20 +2089,145 @@ export interface EntryBeforeListTopicParams {
|
|
|
1974
2089
|
*/
|
|
1975
2090
|
export interface CreateCmsEntryInput {
|
|
1976
2091
|
id?: string;
|
|
2092
|
+
status?: CmsEntryStatus;
|
|
2093
|
+
/**
|
|
2094
|
+
* Entry-level meta fields. 👇
|
|
2095
|
+
*/
|
|
2096
|
+
createdOn?: Date | string;
|
|
2097
|
+
modifiedOn?: Date | string | null;
|
|
2098
|
+
savedOn?: Date | string;
|
|
2099
|
+
createdBy?: CmsIdentity;
|
|
2100
|
+
modifiedBy?: CmsIdentity | null;
|
|
2101
|
+
savedBy?: CmsIdentity;
|
|
2102
|
+
firstPublishedOn?: Date | string;
|
|
2103
|
+
lastPublishedOn?: Date | string;
|
|
2104
|
+
firstPublishedBy?: CmsIdentity;
|
|
2105
|
+
lastPublishedBy?: CmsIdentity;
|
|
2106
|
+
/**
|
|
2107
|
+
* Revision-level meta fields. 👇
|
|
2108
|
+
*/
|
|
2109
|
+
revisionCreatedOn?: Date | string;
|
|
2110
|
+
revisionModifiedOn?: Date | string | null;
|
|
2111
|
+
revisionSavedOn?: Date | string;
|
|
2112
|
+
revisionCreatedBy?: CmsIdentity;
|
|
2113
|
+
revisionModifiedBy?: CmsIdentity | null;
|
|
2114
|
+
revisionSavedBy?: CmsIdentity;
|
|
2115
|
+
revisionFirstPublishedOn?: Date | string;
|
|
2116
|
+
revisionLastPublishedOn?: Date | string;
|
|
2117
|
+
revisionFirstPublishedBy?: CmsIdentity;
|
|
2118
|
+
revisionLastPublishedBy?: CmsIdentity;
|
|
2119
|
+
wbyAco_location?: {
|
|
2120
|
+
folderId?: string | null;
|
|
2121
|
+
};
|
|
1977
2122
|
[key: string]: any;
|
|
1978
2123
|
}
|
|
2124
|
+
export interface CreateCmsEntryOptionsInput {
|
|
2125
|
+
skipValidators?: string[];
|
|
2126
|
+
}
|
|
1979
2127
|
/**
|
|
1980
2128
|
* @category Context
|
|
1981
2129
|
* @category CmsEntry
|
|
1982
2130
|
*/
|
|
1983
2131
|
export interface CreateFromCmsEntryInput {
|
|
2132
|
+
/**
|
|
2133
|
+
* Revision-level meta fields. 👇
|
|
2134
|
+
*/
|
|
2135
|
+
revisionCreatedOn?: Date;
|
|
2136
|
+
revisionSavedOn?: Date;
|
|
2137
|
+
revisionModifiedOn?: Date;
|
|
2138
|
+
revisionCreatedBy?: CmsIdentity;
|
|
2139
|
+
revisionModifiedBy?: CmsIdentity;
|
|
2140
|
+
revisionSavedBy?: CmsIdentity;
|
|
2141
|
+
revisionFirstPublishedOn?: Date | string;
|
|
2142
|
+
revisionLastPublishedOn?: Date | string;
|
|
2143
|
+
revisionFirstPublishedBy?: CmsIdentity;
|
|
2144
|
+
revisionLastPublishedBy?: CmsIdentity;
|
|
2145
|
+
/**
|
|
2146
|
+
* Entry-level meta fields. 👇
|
|
2147
|
+
*/
|
|
2148
|
+
createdOn?: Date;
|
|
2149
|
+
savedOn?: Date;
|
|
2150
|
+
modifiedOn?: Date;
|
|
2151
|
+
createdBy?: CmsIdentity;
|
|
2152
|
+
modifiedBy?: CmsIdentity;
|
|
2153
|
+
savedBy?: CmsIdentity;
|
|
2154
|
+
firstPublishedOn?: Date | string;
|
|
2155
|
+
lastPublishedOn?: Date | string;
|
|
2156
|
+
firstPublishedBy?: CmsIdentity;
|
|
2157
|
+
lastPublishedBy?: CmsIdentity;
|
|
1984
2158
|
[key: string]: any;
|
|
1985
2159
|
}
|
|
2160
|
+
export interface CreateRevisionCmsEntryOptionsInput {
|
|
2161
|
+
skipValidators?: string[];
|
|
2162
|
+
}
|
|
1986
2163
|
/**
|
|
1987
2164
|
* @category Context
|
|
1988
2165
|
* @category CmsEntry
|
|
1989
2166
|
*/
|
|
1990
2167
|
export interface UpdateCmsEntryInput {
|
|
2168
|
+
/**
|
|
2169
|
+
* Revision-level meta fields. 👇
|
|
2170
|
+
*/
|
|
2171
|
+
revisionCreatedOn?: Date | string | null;
|
|
2172
|
+
revisionModifiedOn?: Date | string | null;
|
|
2173
|
+
revisionSavedOn?: Date | string | null;
|
|
2174
|
+
revisionFirstPublishedOn?: Date | string | null;
|
|
2175
|
+
revisionLastPublishedOn?: Date | string | null;
|
|
2176
|
+
revisionModifiedBy?: CmsIdentity | null;
|
|
2177
|
+
revisionCreatedBy?: CmsIdentity | null;
|
|
2178
|
+
revisionSavedBy?: CmsIdentity | null;
|
|
2179
|
+
revisionFirstPublishedBy?: CmsIdentity | null;
|
|
2180
|
+
revisionLastPublishedBy?: CmsIdentity | null;
|
|
2181
|
+
/**
|
|
2182
|
+
* Entry-level meta fields. 👇
|
|
2183
|
+
*/
|
|
2184
|
+
createdOn?: Date | string | null;
|
|
2185
|
+
modifiedOn?: Date | string | null;
|
|
2186
|
+
savedOn?: Date | string | null;
|
|
2187
|
+
firstPublishedOn?: Date | string | null;
|
|
2188
|
+
lastPublishedOn?: Date | string | null;
|
|
2189
|
+
createdBy?: CmsIdentity | null;
|
|
2190
|
+
modifiedBy?: CmsIdentity | null;
|
|
2191
|
+
savedBy?: CmsIdentity | null;
|
|
2192
|
+
firstPublishedBy?: CmsIdentity | null;
|
|
2193
|
+
lastPublishedBy?: CmsIdentity | null;
|
|
2194
|
+
wbyAco_location?: {
|
|
2195
|
+
folderId?: string | null;
|
|
2196
|
+
};
|
|
2197
|
+
[key: string]: any;
|
|
2198
|
+
}
|
|
2199
|
+
export interface UpdateCmsEntryOptionsInput {
|
|
2200
|
+
skipValidators?: string[];
|
|
2201
|
+
}
|
|
2202
|
+
/**
|
|
2203
|
+
* @category Context
|
|
2204
|
+
* @category CmsEntry
|
|
2205
|
+
*/
|
|
2206
|
+
export interface GetUniqueFieldValuesParams {
|
|
2207
|
+
where: CmsEntryListWhere;
|
|
2208
|
+
fieldId: string;
|
|
2209
|
+
}
|
|
2210
|
+
/**
|
|
2211
|
+
* @category CmsEntry
|
|
2212
|
+
*/
|
|
2213
|
+
export interface CmsDeleteEntryOptions {
|
|
2214
|
+
/**
|
|
2215
|
+
* Runs the delete commands even if the entry is not found in the DynamoDB.
|
|
2216
|
+
* This is to force clean the entry records that might have been left behind a failed delete.
|
|
2217
|
+
*/
|
|
2218
|
+
force?: boolean;
|
|
2219
|
+
}
|
|
2220
|
+
/**
|
|
2221
|
+
* @category Context
|
|
2222
|
+
* @category CmsEntry
|
|
2223
|
+
*/
|
|
2224
|
+
export interface DeleteMultipleEntriesParams {
|
|
2225
|
+
entries: string[];
|
|
2226
|
+
}
|
|
2227
|
+
export declare type DeleteMultipleEntriesResponse = {
|
|
2228
|
+
id: string;
|
|
2229
|
+
}[];
|
|
2230
|
+
export interface CmsEntryValidateResponse {
|
|
1991
2231
|
[key: string]: any;
|
|
1992
2232
|
}
|
|
1993
2233
|
/**
|
|
@@ -2000,7 +2240,7 @@ export interface CmsEntryContext {
|
|
|
2000
2240
|
/**
|
|
2001
2241
|
* Get a single content entry for a model.
|
|
2002
2242
|
*/
|
|
2003
|
-
getEntry: (model: CmsModel, params: CmsEntryGetParams) => Promise<CmsEntry
|
|
2243
|
+
getEntry: (model: CmsModel, params: CmsEntryGetParams) => Promise<CmsEntry>;
|
|
2004
2244
|
/**
|
|
2005
2245
|
* Get a list of entries for a model by a given ID (revision).
|
|
2006
2246
|
*/
|
|
@@ -2012,15 +2252,15 @@ export interface CmsEntryContext {
|
|
|
2012
2252
|
/**
|
|
2013
2253
|
* List entries for a model. Internal method used by get, listLatest and listPublished.
|
|
2014
2254
|
*/
|
|
2015
|
-
listEntries: (model: CmsModel, params: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
2255
|
+
listEntries: <T = CmsEntryValues>(model: CmsModel, params: CmsEntryListParams) => Promise<[CmsEntry<T>[], CmsEntryMeta]>;
|
|
2016
2256
|
/**
|
|
2017
2257
|
* Lists the latest entries. Used for manage API.
|
|
2018
2258
|
*/
|
|
2019
|
-
listLatestEntries: (model: CmsModel, params?: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
2259
|
+
listLatestEntries: <T = CmsEntryValues>(model: CmsModel, params?: CmsEntryListParams) => Promise<[CmsEntry<T>[], CmsEntryMeta]>;
|
|
2020
2260
|
/**
|
|
2021
2261
|
* List published entries. Used for read API.
|
|
2022
2262
|
*/
|
|
2023
|
-
listPublishedEntries: (model: CmsModel, params?: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;
|
|
2263
|
+
listPublishedEntries: <T = CmsEntryValues>(model: CmsModel, params?: CmsEntryListParams) => Promise<[CmsEntry<T>[], CmsEntryMeta]>;
|
|
2024
2264
|
/**
|
|
2025
2265
|
* List published entries by IDs.
|
|
2026
2266
|
*/
|
|
@@ -2032,15 +2272,23 @@ export interface CmsEntryContext {
|
|
|
2032
2272
|
/**
|
|
2033
2273
|
* Create a new content entry.
|
|
2034
2274
|
*/
|
|
2035
|
-
createEntry: (model: CmsModel, input: CreateCmsEntryInput) => Promise<CmsEntry>;
|
|
2275
|
+
createEntry: (model: CmsModel, input: CreateCmsEntryInput, options?: CreateCmsEntryOptionsInput) => Promise<CmsEntry>;
|
|
2036
2276
|
/**
|
|
2037
2277
|
* Create a new entry from already existing entry.
|
|
2038
2278
|
*/
|
|
2039
|
-
createEntryRevisionFrom: (model: CmsModel, id: string, input: CreateFromCmsEntryInput) => Promise<CmsEntry>;
|
|
2279
|
+
createEntryRevisionFrom: (model: CmsModel, id: string, input: CreateFromCmsEntryInput, options?: CreateRevisionCmsEntryOptionsInput) => Promise<CmsEntry>;
|
|
2040
2280
|
/**
|
|
2041
2281
|
* Update existing entry.
|
|
2042
2282
|
*/
|
|
2043
|
-
updateEntry: (model: CmsModel, id: string, input: UpdateCmsEntryInput, meta?: Record<string, any
|
|
2283
|
+
updateEntry: (model: CmsModel, id: string, input: UpdateCmsEntryInput, meta?: Record<string, any>, options?: UpdateCmsEntryOptionsInput) => Promise<CmsEntry>;
|
|
2284
|
+
/**
|
|
2285
|
+
* Validate the entry - either new one or existing one.
|
|
2286
|
+
*/
|
|
2287
|
+
validateEntry: (model: CmsModel, id?: string, input?: UpdateCmsEntryInput) => Promise<CmsEntryValidateResponse>;
|
|
2288
|
+
/**
|
|
2289
|
+
* Move entry, and all its revisions, to a new folder.
|
|
2290
|
+
*/
|
|
2291
|
+
moveEntry: (model: CmsModel, id: string, folderId: string) => Promise<CmsEntry>;
|
|
2044
2292
|
/**
|
|
2045
2293
|
* Method that republishes entry with given identifier.
|
|
2046
2294
|
* @internal
|
|
@@ -2053,7 +2301,11 @@ export interface CmsEntryContext {
|
|
|
2053
2301
|
/**
|
|
2054
2302
|
* Delete entry with all its revisions.
|
|
2055
2303
|
*/
|
|
2056
|
-
deleteEntry: (model: CmsModel, id: string) => Promise<void>;
|
|
2304
|
+
deleteEntry: (model: CmsModel, id: string, options?: CmsDeleteEntryOptions) => Promise<void>;
|
|
2305
|
+
/**
|
|
2306
|
+
* Delete multiple entries
|
|
2307
|
+
*/
|
|
2308
|
+
deleteMultipleEntries: (model: CmsModel, params: DeleteMultipleEntriesParams) => Promise<DeleteMultipleEntriesResponse>;
|
|
2057
2309
|
/**
|
|
2058
2310
|
* Publish entry.
|
|
2059
2311
|
*/
|
|
@@ -2067,74 +2319,13 @@ export interface CmsEntryContext {
|
|
|
2067
2319
|
*/
|
|
2068
2320
|
getEntryRevisions: (model: CmsModel, id: string) => Promise<CmsEntry[]>;
|
|
2069
2321
|
/**
|
|
2070
|
-
*
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
* @deprecated
|
|
2074
|
-
*/
|
|
2075
|
-
onBeforeEntryCreate: Topic<OnEntryBeforeCreateTopicParams>;
|
|
2076
|
-
/**
|
|
2077
|
-
* @deprecated
|
|
2078
|
-
*/
|
|
2079
|
-
onAfterEntryCreate: Topic<OnEntryAfterCreateTopicParams>;
|
|
2080
|
-
/**
|
|
2081
|
-
* @deprecated
|
|
2082
|
-
*/
|
|
2083
|
-
onBeforeEntryCreateRevision: Topic<OnEntryRevisionBeforeCreateTopicParams>;
|
|
2084
|
-
/**
|
|
2085
|
-
* @deprecated
|
|
2086
|
-
*/
|
|
2087
|
-
onAfterEntryCreateRevision: Topic<OnEntryRevisionAfterCreateTopicParams>;
|
|
2088
|
-
/**
|
|
2089
|
-
* @deprecated
|
|
2090
|
-
*/
|
|
2091
|
-
onBeforeEntryUpdate: Topic<OnEntryBeforeUpdateTopicParams>;
|
|
2092
|
-
/**
|
|
2093
|
-
* @deprecated
|
|
2094
|
-
*/
|
|
2095
|
-
onAfterEntryUpdate: Topic<OnEntryAfterUpdateTopicParams>;
|
|
2096
|
-
/**
|
|
2097
|
-
* @deprecated
|
|
2098
|
-
*/
|
|
2099
|
-
onBeforeEntryDelete: Topic<OnEntryBeforeDeleteTopicParams>;
|
|
2100
|
-
/**
|
|
2101
|
-
* @deprecated
|
|
2102
|
-
*/
|
|
2103
|
-
onAfterEntryDelete: Topic<OnEntryAfterDeleteTopicParams>;
|
|
2104
|
-
/**
|
|
2105
|
-
* @deprecated
|
|
2106
|
-
*/
|
|
2107
|
-
onBeforeEntryDeleteRevision: Topic<OnEntryRevisionBeforeDeleteTopicParams>;
|
|
2108
|
-
/**
|
|
2109
|
-
* @deprecated
|
|
2110
|
-
*/
|
|
2111
|
-
onAfterEntryDeleteRevision: Topic<OnEntryRevisionAfterDeleteTopicParams>;
|
|
2112
|
-
/**
|
|
2113
|
-
* @deprecated
|
|
2114
|
-
*/
|
|
2115
|
-
onBeforeEntryPublish: Topic<OnEntryBeforePublishTopicParams>;
|
|
2116
|
-
/**
|
|
2117
|
-
* @deprecated
|
|
2118
|
-
*/
|
|
2119
|
-
onAfterEntryPublish: Topic<OnEntryAfterPublishTopicParams>;
|
|
2120
|
-
/**
|
|
2121
|
-
* @deprecated
|
|
2122
|
-
*/
|
|
2123
|
-
onBeforeEntryUnpublish: Topic<OnEntryBeforeUnpublishTopicParams>;
|
|
2124
|
-
/**
|
|
2125
|
-
* @deprecated
|
|
2126
|
-
*/
|
|
2127
|
-
onAfterEntryUnpublish: Topic<OnEntryAfterUnpublishTopicParams>;
|
|
2128
|
-
/**
|
|
2129
|
-
* @deprecated
|
|
2130
|
-
*/
|
|
2131
|
-
onBeforeEntryGet: Topic<OnEntryBeforeGetTopicParams>;
|
|
2132
|
-
/**
|
|
2133
|
-
* @deprecated
|
|
2322
|
+
* List all unique values for a given field.
|
|
2323
|
+
*
|
|
2324
|
+
* @internal
|
|
2134
2325
|
*/
|
|
2135
|
-
|
|
2326
|
+
getUniqueFieldValues: (model: CmsModel, params: GetUniqueFieldValuesParams) => Promise<CmsEntryUniqueValue[]>;
|
|
2136
2327
|
/**
|
|
2137
|
-
* Lifecycle
|
|
2328
|
+
* Lifecycle Events
|
|
2138
2329
|
*/
|
|
2139
2330
|
onEntryBeforeCreate: Topic<OnEntryBeforeCreateTopicParams>;
|
|
2140
2331
|
onEntryAfterCreate: Topic<OnEntryAfterCreateTopicParams>;
|
|
@@ -2145,6 +2336,9 @@ export interface CmsEntryContext {
|
|
|
2145
2336
|
onEntryBeforeUpdate: Topic<OnEntryBeforeUpdateTopicParams>;
|
|
2146
2337
|
onEntryAfterUpdate: Topic<OnEntryAfterUpdateTopicParams>;
|
|
2147
2338
|
onEntryUpdateError: Topic<OnEntryUpdateErrorTopicParams>;
|
|
2339
|
+
onEntryBeforeMove: Topic<OnEntryBeforeMoveTopicParams>;
|
|
2340
|
+
onEntryAfterMove: Topic<OnEntryAfterMoveTopicParams>;
|
|
2341
|
+
onEntryMoveError: Topic<OnEntryMoveErrorTopicParams>;
|
|
2148
2342
|
onEntryBeforeDelete: Topic<OnEntryBeforeDeleteTopicParams>;
|
|
2149
2343
|
onEntryAfterDelete: Topic<OnEntryAfterDeleteTopicParams>;
|
|
2150
2344
|
onEntryDeleteError: Topic<OnEntryDeleteErrorTopicParams>;
|
|
@@ -2181,13 +2375,6 @@ interface CmsEntryResolverFactoryParams {
|
|
|
2181
2375
|
export declare type CmsEntryResolverFactory<TSource = any, TArgs = any, TContext = CmsContext> = {
|
|
2182
2376
|
(params: CmsEntryResolverFactoryParams): GraphQLFieldResolver<TSource, TArgs, TContext>;
|
|
2183
2377
|
};
|
|
2184
|
-
/**
|
|
2185
|
-
* Settings security permission.
|
|
2186
|
-
*
|
|
2187
|
-
* @category SecurityPermission
|
|
2188
|
-
*/
|
|
2189
|
-
export interface CmsSettingsPermission extends SecurityPermission {
|
|
2190
|
-
}
|
|
2191
2378
|
/**
|
|
2192
2379
|
* A base security permission for CMS.
|
|
2193
2380
|
*
|
|
@@ -2413,11 +2600,11 @@ export interface CmsEntryStorageOperationsDeleteRevisionParams<T extends CmsStor
|
|
|
2413
2600
|
latestStorageEntry: T | null;
|
|
2414
2601
|
}
|
|
2415
2602
|
export interface CmsEntryStorageOperationsDeleteParams {
|
|
2416
|
-
/**
|
|
2417
|
-
* Entry that is going to be deleted.
|
|
2418
|
-
*/
|
|
2419
2603
|
entry: CmsEntry;
|
|
2420
2604
|
}
|
|
2605
|
+
export interface CmsEntryStorageOperationsDeleteEntriesParams {
|
|
2606
|
+
entries: string[];
|
|
2607
|
+
}
|
|
2421
2608
|
export interface CmsEntryStorageOperationsPublishParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
2422
2609
|
/**
|
|
2423
2610
|
* The modified entry that is going to be saved as published.
|
|
@@ -2439,6 +2626,10 @@ export interface CmsEntryStorageOperationsUnpublishParams<T extends CmsStorageEn
|
|
|
2439
2626
|
*/
|
|
2440
2627
|
storageEntry: T;
|
|
2441
2628
|
}
|
|
2629
|
+
export interface CmsEntryStorageOperationsGetUniqueFieldValuesParams {
|
|
2630
|
+
where: CmsEntryListWhere;
|
|
2631
|
+
fieldId: string;
|
|
2632
|
+
}
|
|
2442
2633
|
export interface CmsEntryStorageOperationsGetByIdsParams {
|
|
2443
2634
|
ids: readonly string[];
|
|
2444
2635
|
}
|
|
@@ -2495,101 +2686,91 @@ export interface CmsEntryStorageOperations<T extends CmsStorageEntry = CmsStorag
|
|
|
2495
2686
|
/**
|
|
2496
2687
|
* Get all the entries of the ids.
|
|
2497
2688
|
*/
|
|
2498
|
-
getByIds: (model:
|
|
2689
|
+
getByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetByIdsParams) => Promise<T[]>;
|
|
2499
2690
|
/**
|
|
2500
2691
|
* Get all the published entries of the ids.
|
|
2501
2692
|
*/
|
|
2502
|
-
getPublishedByIds: (model:
|
|
2693
|
+
getPublishedByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetPublishedByIdsParams) => Promise<T[]>;
|
|
2503
2694
|
/**
|
|
2504
2695
|
* Get all the latest entries of the ids.
|
|
2505
2696
|
*/
|
|
2506
|
-
getLatestByIds: (model:
|
|
2697
|
+
getLatestByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetLatestByIdsParams) => Promise<T[]>;
|
|
2507
2698
|
/**
|
|
2508
2699
|
* Get all revisions of the given entry id.
|
|
2509
2700
|
*/
|
|
2510
|
-
getRevisions: (model:
|
|
2701
|
+
getRevisions: (model: CmsModel, params: CmsEntryStorageOperationsGetRevisionsParams) => Promise<T[]>;
|
|
2511
2702
|
/**
|
|
2512
2703
|
* Get the entry by the given revision id.
|
|
2513
2704
|
*/
|
|
2514
|
-
getRevisionById: (model:
|
|
2705
|
+
getRevisionById: (model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams) => Promise<T | null>;
|
|
2515
2706
|
/**
|
|
2516
2707
|
* Get the published entry by given entryId.
|
|
2517
2708
|
*/
|
|
2518
|
-
getPublishedRevisionByEntryId: (model:
|
|
2709
|
+
getPublishedRevisionByEntryId: (model: CmsModel, params: CmsEntryStorageOperationsGetPublishedRevisionParams) => Promise<T | null>;
|
|
2519
2710
|
/**
|
|
2520
2711
|
* Get the latest entry by given entryId.
|
|
2521
2712
|
*/
|
|
2522
|
-
getLatestRevisionByEntryId: (model:
|
|
2713
|
+
getLatestRevisionByEntryId: (model: CmsModel, params: CmsEntryStorageOperationsGetLatestRevisionParams) => Promise<T | null>;
|
|
2523
2714
|
/**
|
|
2524
2715
|
* Get the revision of the entry before given one.
|
|
2525
2716
|
*/
|
|
2526
|
-
getPreviousRevision: (model:
|
|
2717
|
+
getPreviousRevision: (model: CmsModel, params: CmsEntryStorageOperationsGetPreviousRevisionParams) => Promise<T | null>;
|
|
2527
2718
|
/**
|
|
2528
2719
|
* Gets entry by given params.
|
|
2529
2720
|
*/
|
|
2530
|
-
get: (model:
|
|
2721
|
+
get: (model: CmsModel, params: CmsEntryStorageOperationsGetParams) => Promise<T | null>;
|
|
2531
2722
|
/**
|
|
2532
2723
|
* List all entries. Filterable via params.
|
|
2533
2724
|
*/
|
|
2534
|
-
list: (model:
|
|
2725
|
+
list: (model: CmsModel, params: CmsEntryStorageOperationsListParams) => Promise<CmsEntryStorageOperationsListResponse<T>>;
|
|
2535
2726
|
/**
|
|
2536
2727
|
* Create a new entry.
|
|
2537
2728
|
*/
|
|
2538
|
-
create: (model:
|
|
2729
|
+
create: (model: CmsModel, params: CmsEntryStorageOperationsCreateParams<T>) => Promise<T>;
|
|
2539
2730
|
/**
|
|
2540
2731
|
* Create a new entry from existing one.
|
|
2541
2732
|
*/
|
|
2542
|
-
createRevisionFrom: (model:
|
|
2733
|
+
createRevisionFrom: (model: CmsModel, params: CmsEntryStorageOperationsCreateRevisionFromParams<T>) => Promise<T>;
|
|
2543
2734
|
/**
|
|
2544
2735
|
* Update existing entry.
|
|
2545
2736
|
*/
|
|
2546
|
-
update: (model:
|
|
2737
|
+
update: (model: CmsModel, params: CmsEntryStorageOperationsUpdateParams<T>) => Promise<T>;
|
|
2738
|
+
/**
|
|
2739
|
+
* Move entry and all its entries into a new folder.
|
|
2740
|
+
*/
|
|
2741
|
+
move: (model: CmsModel, id: string, folderId: string) => Promise<void>;
|
|
2547
2742
|
/**
|
|
2548
2743
|
* Delete the entry revision.
|
|
2549
2744
|
*/
|
|
2550
|
-
deleteRevision: (model:
|
|
2745
|
+
deleteRevision: (model: CmsModel, params: CmsEntryStorageOperationsDeleteRevisionParams<T>) => Promise<void>;
|
|
2551
2746
|
/**
|
|
2552
2747
|
* Delete the entry.
|
|
2553
2748
|
*/
|
|
2554
|
-
delete: (model:
|
|
2749
|
+
delete: (model: CmsModel, params: CmsEntryStorageOperationsDeleteParams) => Promise<void>;
|
|
2750
|
+
/**
|
|
2751
|
+
* Delete multiple entries, with a limit on how much can be deleted in one call.
|
|
2752
|
+
*/
|
|
2753
|
+
deleteMultipleEntries: (model: CmsModel, params: CmsEntryStorageOperationsDeleteEntriesParams) => Promise<void>;
|
|
2555
2754
|
/**
|
|
2556
2755
|
* Publish the entry.
|
|
2557
2756
|
*/
|
|
2558
|
-
publish: (model:
|
|
2757
|
+
publish: (model: CmsModel, params: CmsEntryStorageOperationsPublishParams<T>) => Promise<T>;
|
|
2559
2758
|
/**
|
|
2560
2759
|
* Unpublish the entry.
|
|
2561
2760
|
*/
|
|
2562
|
-
unpublish: (model:
|
|
2761
|
+
unpublish: (model: CmsModel, params: CmsEntryStorageOperationsUnpublishParams<T>) => Promise<T>;
|
|
2762
|
+
/**
|
|
2763
|
+
* Method to list all the unique values for the given field id.
|
|
2764
|
+
* Simplest use case would be to aggregate tags for some content.
|
|
2765
|
+
* @internal
|
|
2766
|
+
*/
|
|
2767
|
+
getUniqueFieldValues: (model: CmsModel, params: CmsEntryStorageOperationsGetUniqueFieldValuesParams) => Promise<CmsEntryUniqueValue[]>;
|
|
2563
2768
|
}
|
|
2564
2769
|
export declare enum CONTENT_ENTRY_STATUS {
|
|
2565
2770
|
DRAFT = "draft",
|
|
2566
2771
|
PUBLISHED = "published",
|
|
2567
2772
|
UNPUBLISHED = "unpublished"
|
|
2568
2773
|
}
|
|
2569
|
-
export interface CmsSettingsStorageOperationsGetParams {
|
|
2570
|
-
locale: string;
|
|
2571
|
-
tenant: string;
|
|
2572
|
-
}
|
|
2573
|
-
export interface CmsSettingsStorageOperationsCreateParams {
|
|
2574
|
-
settings: CmsSettings;
|
|
2575
|
-
}
|
|
2576
|
-
export interface CmsSettingsStorageOperationsUpdateParams {
|
|
2577
|
-
settings: CmsSettings;
|
|
2578
|
-
}
|
|
2579
|
-
export interface CmsSettingsStorageOperations {
|
|
2580
|
-
/**
|
|
2581
|
-
* Get the settings from the storage.
|
|
2582
|
-
*/
|
|
2583
|
-
get: (params: CmsSettingsStorageOperationsGetParams) => Promise<CmsSettings | null>;
|
|
2584
|
-
/**
|
|
2585
|
-
* Create settings in the storage.
|
|
2586
|
-
*/
|
|
2587
|
-
create: (params: CmsSettingsStorageOperationsCreateParams) => Promise<CmsSettings>;
|
|
2588
|
-
/**
|
|
2589
|
-
* Update the settings in the storage.
|
|
2590
|
-
*/
|
|
2591
|
-
update: (params: CmsSettingsStorageOperationsUpdateParams) => Promise<CmsSettings>;
|
|
2592
|
-
}
|
|
2593
2774
|
export interface CmsSystem {
|
|
2594
2775
|
version?: string;
|
|
2595
2776
|
readAPIKey?: string;
|
|
@@ -2624,18 +2805,13 @@ export interface CmsSystemStorageOperations {
|
|
|
2624
2805
|
export interface HeadlessCmsStorageOperations<C = CmsContext> {
|
|
2625
2806
|
name: string;
|
|
2626
2807
|
system: CmsSystemStorageOperations;
|
|
2627
|
-
settings: CmsSettingsStorageOperations;
|
|
2628
2808
|
groups: CmsGroupStorageOperations;
|
|
2629
2809
|
models: CmsModelStorageOperations;
|
|
2630
2810
|
entries: CmsEntryStorageOperations;
|
|
2631
2811
|
/**
|
|
2632
2812
|
* Either attach something from the storage operations or run something in it.
|
|
2633
2813
|
*/
|
|
2634
|
-
beforeInit
|
|
2814
|
+
beforeInit: (context: C) => Promise<void>;
|
|
2635
2815
|
init?: (context: C) => Promise<void>;
|
|
2636
|
-
/**
|
|
2637
|
-
* An upgrade to run if necessary.
|
|
2638
|
-
*/
|
|
2639
|
-
upgrade?: UpgradePlugin | null;
|
|
2640
2816
|
}
|
|
2641
2817
|
export {};
|