@webiny/api-headless-cms 0.0.0-unstable.aad28a72ae → 0.0.0-unstable.b14eaecf38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/context.d.ts +5 -2
- package/context.js +61 -23
- 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 +5 -61
- 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 +5 -2
- package/crud/contentEntry.crud.js +871 -936
- 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 +97 -126
- package/crud/contentModel/validateModelFields.js.map +1 -1
- package/crud/contentModel/validation.d.ts +551 -0
- package/crud/contentModel/validation.js +145 -0
- package/crud/contentModel/validation.js.map +1 -0
- package/crud/contentModel.crud.js +357 -391
- 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.js +177 -221
- package/crud/contentModelGroup.crud.js.map +1 -1
- package/crud/settings.crud.d.ts +1 -1
- package/crud/settings.crud.js +5 -22
- 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 +0 -53
- 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 +6 -14
- package/graphql/buildSchemaPlugins.js.map +1 -1
- package/graphql/checkEndpointAccess.d.ts +2 -0
- package/graphql/checkEndpointAccess.js +18 -0
- package/graphql/checkEndpointAccess.js.map +1 -0
- package/graphql/createExecutableSchema.d.ts +6 -0
- package/graphql/createExecutableSchema.js +29 -0
- package/graphql/createExecutableSchema.js.map +1 -0
- package/graphql/createRequestBody.d.ts +2 -0
- package/graphql/createRequestBody.js +14 -0
- package/graphql/createRequestBody.js.map +1 -0
- package/graphql/formatErrorPayload.d.ts +1 -0
- package/graphql/formatErrorPayload.js +25 -0
- package/graphql/formatErrorPayload.js.map +1 -0
- package/graphql/generateSchema.d.ts +8 -0
- package/graphql/generateSchema.js +31 -0
- package/graphql/generateSchema.js.map +1 -0
- package/graphql/getSchema.d.ts +17 -0
- package/graphql/getSchema.js +102 -0
- package/graphql/getSchema.js.map +1 -0
- package/graphql/graphQLHandlerFactory.js +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 +53 -0
- package/graphql/schema/baseSchema.js.map +1 -0
- package/graphql/schema/contentEntries.d.ts +6 -2
- package/graphql/schema/contentEntries.js +118 -107
- 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.js +13 -24
- package/graphql/schema/createFieldResolvers.js.map +1 -1
- package/graphql/schema/createManageResolvers.d.ts +1 -1
- package/graphql/schema/createManageResolvers.js +33 -43
- package/graphql/schema/createManageResolvers.js.map +1 -1
- package/graphql/schema/createManageSDL.d.ts +3 -0
- package/graphql/schema/createManageSDL.js +61 -65
- 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 +30 -34
- package/graphql/schema/createReadSDL.js.map +1 -1
- package/graphql/schema/resolvers/commonFieldResolvers.d.ts +3 -2
- package/graphql/schema/resolvers/commonFieldResolvers.js +2 -3
- package/graphql/schema/resolvers/commonFieldResolvers.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveCreate.js +0 -3
- package/graphql/schema/resolvers/manage/resolveCreate.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveCreateFrom.js +0 -3
- package/graphql/schema/resolvers/manage/resolveCreateFrom.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveDelete.js +0 -6
- package/graphql/schema/resolvers/manage/resolveDelete.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGet.js +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/resolveList.js +0 -3
- package/graphql/schema/resolvers/manage/resolveList.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolvePublish.js +0 -3
- package/graphql/schema/resolvers/manage/resolvePublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveRepublish.js +0 -3
- package/graphql/schema/resolvers/manage/resolveRepublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveUnpublish.js +0 -3
- package/graphql/schema/resolvers/manage/resolveUnpublish.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveUpdate.js +0 -3
- package/graphql/schema/resolvers/manage/resolveUpdate.js.map +1 -1
- package/graphql/schema/resolvers/preview/resolveGet.js +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 +64 -66
- package/graphql/schema/schemaPlugins.js.map +1 -1
- package/graphql/system.js +55 -87
- package/graphql/system.js.map +1 -1
- package/graphqlFields/boolean.js +0 -12
- package/graphqlFields/boolean.js.map +1 -1
- package/graphqlFields/datetime.js +0 -17
- package/graphqlFields/datetime.js.map +1 -1
- package/graphqlFields/dynamicZone/dynamicZoneField.d.ts +1 -1
- package/graphqlFields/dynamicZone/dynamicZoneField.js +27 -33
- 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 +0 -12
- package/graphqlFields/number.js.map +1 -1
- package/graphqlFields/object.js +22 -39
- 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 +0 -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 +26 -28
- package/parameters/context.js +0 -4
- package/parameters/context.js.map +1 -1
- package/parameters/header.js +0 -11
- 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 +19 -3
- package/plugins/CmsModelPlugin.js +30 -40
- package/plugins/CmsModelPlugin.js.map +1 -1
- package/plugins/CmsParametersPlugin.js +0 -7
- package/plugins/CmsParametersPlugin.js.map +1 -1
- package/plugins/StorageOperationsCmsModelPlugin.d.ts +23 -0
- package/plugins/StorageOperationsCmsModelPlugin.js +42 -0
- package/plugins/StorageOperationsCmsModelPlugin.js.map +1 -0
- package/plugins/StorageTransformPlugin.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 +173 -79
- package/types.js +23 -73
- package/types.js.map +1 -1
- package/utils/access.js +11 -25
- package/utils/access.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 +21 -44
- package/utils/converters/valueKeyStorageConverter.js.map +1 -1
- package/utils/createTypeFromFields.d.ts +1 -0
- package/utils/createTypeFromFields.js +11 -20
- 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.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.js +0 -9
- package/utils/getEntryTitle.js.map +1 -1
- package/utils/getSchemaFromFieldPlugins.d.ts +4 -7
- package/utils/getSchemaFromFieldPlugins.js +23 -19
- package/utils/getSchemaFromFieldPlugins.js.map +1 -1
- package/utils/incrementEntryIdVersion.d.ts +5 -0
- package/utils/incrementEntryIdVersion.js +29 -0
- package/utils/incrementEntryIdVersion.js.map +1 -0
- package/utils/ownership.d.ts +3 -3
- package/utils/ownership.js +0 -8
- package/utils/ownership.js.map +1 -1
- package/utils/permissions.js +8 -23
- package/utils/permissions.js.map +1 -1
- package/utils/renderFields.d.ts +2 -1
- package/utils/renderFields.js +8 -10
- package/utils/renderFields.js.map +1 -1
- package/utils/renderGetFilterFields.js +0 -13
- package/utils/renderGetFilterFields.js.map +1 -1
- package/utils/renderInputFields.d.ts +2 -1
- package/utils/renderInputFields.js +4 -9
- package/utils/renderInputFields.js.map +1 -1
- package/utils/renderListFilterFields.js +1 -10
- package/utils/renderListFilterFields.js.map +1 -1
- package/utils/renderSortEnum.d.ts +7 -4
- package/utils/renderSortEnum.js +19 -11
- 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/index.d.ts +0 -6
- package/crud/index.js +0 -85
- package/crud/index.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/types.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ import { GraphQLFieldResolver, GraphQLSchemaDefinition, Resolvers } from "@webin
|
|
|
5
5
|
import { SecurityPermission } from "@webiny/api-security/types";
|
|
6
6
|
import { DbContext } from "@webiny/handler-db/types";
|
|
7
7
|
import { FileManagerContext } from "@webiny/api-file-manager/types";
|
|
8
|
-
import { UpgradePlugin } from "@webiny/api-upgrade/types";
|
|
9
8
|
import { Topic } from "@webiny/pubsub/types";
|
|
10
9
|
import { CmsModelConverterCallable } from "./utils/converters/ConverterCollection";
|
|
11
10
|
export declare type ApiEndpoint = "manage" | "preview" | "read";
|
|
@@ -98,6 +97,10 @@ export interface CmsModelFieldSettings {
|
|
|
98
97
|
* Object field has child fields.
|
|
99
98
|
*/
|
|
100
99
|
fields?: CmsModelField[];
|
|
100
|
+
/**
|
|
101
|
+
* Is the file field images only one?
|
|
102
|
+
*/
|
|
103
|
+
imagesOnly?: boolean;
|
|
101
104
|
/**
|
|
102
105
|
* Object field has child fields - so it needs to have a layout.
|
|
103
106
|
*/
|
|
@@ -115,6 +118,7 @@ export interface CmsModelFieldSettings {
|
|
|
115
118
|
*/
|
|
116
119
|
[key: string]: any;
|
|
117
120
|
}
|
|
121
|
+
export declare type CmsModelFieldType = "boolean" | "datetime" | "file" | "long-text" | "number" | "object" | "ref" | "rich-text" | "text" | "dynamicZone" | string;
|
|
118
122
|
/**
|
|
119
123
|
* A definition for content model field. This type exists on the app side as well.
|
|
120
124
|
*
|
|
@@ -135,18 +139,16 @@ export interface CmsModelField {
|
|
|
135
139
|
* A type of the field.
|
|
136
140
|
* We are defining our built-in fields, so people know which are available by the default.
|
|
137
141
|
*/
|
|
138
|
-
type:
|
|
142
|
+
type: CmsModelFieldType;
|
|
139
143
|
/**
|
|
140
144
|
* A unique storage ID for storing actual values.
|
|
141
|
-
* Must in form of a-zA-Z0-9@a-zA-Z0-9
|
|
145
|
+
* Must in form of a-zA-Z0-9@a-zA-Z0-9
|
|
142
146
|
*
|
|
143
147
|
* This is an auto-generated value: uses `id` and `type`
|
|
144
148
|
*
|
|
145
149
|
* This is used as path for the entry value.
|
|
146
|
-
*
|
|
147
|
-
* @internal
|
|
148
150
|
*/
|
|
149
|
-
storageId: string;
|
|
151
|
+
storageId: `${string}@${string}` | string;
|
|
150
152
|
/**
|
|
151
153
|
* Field identifier for the model field that will be available to the outside world.
|
|
152
154
|
* `storageId` is used as path (or column) to store the data.
|
|
@@ -363,7 +365,21 @@ export interface LockedField {
|
|
|
363
365
|
[key: string]: any;
|
|
364
366
|
}
|
|
365
367
|
/**
|
|
366
|
-
*
|
|
368
|
+
* @category Database model
|
|
369
|
+
* @category CmsModel
|
|
370
|
+
*/
|
|
371
|
+
export interface CmsModelGroup {
|
|
372
|
+
/**
|
|
373
|
+
* Generated ID of the group
|
|
374
|
+
*/
|
|
375
|
+
id: string;
|
|
376
|
+
/**
|
|
377
|
+
* Name of the group
|
|
378
|
+
*/
|
|
379
|
+
name: string;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Base CMS Model. Should not be exported and used outside of this package.
|
|
367
383
|
*
|
|
368
384
|
* @category Database model
|
|
369
385
|
* @category CmsModel
|
|
@@ -377,6 +393,24 @@ export interface CmsModel {
|
|
|
377
393
|
* Unique ID for the content model. Created from name if not defined by user.
|
|
378
394
|
*/
|
|
379
395
|
modelId: string;
|
|
396
|
+
/**
|
|
397
|
+
* Name of the content model in singular form to be used in the API.
|
|
398
|
+
* example:
|
|
399
|
+
* - Article
|
|
400
|
+
* - Fruit
|
|
401
|
+
* - Vegetable
|
|
402
|
+
* - Car
|
|
403
|
+
*/
|
|
404
|
+
singularApiName: string;
|
|
405
|
+
/**
|
|
406
|
+
* Name of the content model in plural form to be used in the API.
|
|
407
|
+
* example:
|
|
408
|
+
* - Articles
|
|
409
|
+
* - Fruits
|
|
410
|
+
* - Vegetables
|
|
411
|
+
* - Cars
|
|
412
|
+
*/
|
|
413
|
+
pluralApiName: string;
|
|
380
414
|
/**
|
|
381
415
|
* Model tenant.
|
|
382
416
|
*/
|
|
@@ -388,20 +422,15 @@ export interface CmsModel {
|
|
|
388
422
|
/**
|
|
389
423
|
* Cms Group reference object.
|
|
390
424
|
*/
|
|
391
|
-
group:
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
/**
|
|
397
|
-
* Name of the group
|
|
398
|
-
*/
|
|
399
|
-
name: string;
|
|
400
|
-
};
|
|
425
|
+
group: CmsModelGroup;
|
|
426
|
+
/**
|
|
427
|
+
* Icon for the content model.
|
|
428
|
+
*/
|
|
429
|
+
icon?: string | null;
|
|
401
430
|
/**
|
|
402
431
|
* Description for the content model.
|
|
403
432
|
*/
|
|
404
|
-
description: string;
|
|
433
|
+
description: string | null;
|
|
405
434
|
/**
|
|
406
435
|
* Date created
|
|
407
436
|
*/
|
|
@@ -413,7 +442,7 @@ export interface CmsModel {
|
|
|
413
442
|
/**
|
|
414
443
|
* CreatedBy object wrapper. Contains id, name and type of the user.
|
|
415
444
|
*/
|
|
416
|
-
createdBy?:
|
|
445
|
+
createdBy?: CmsIdentity;
|
|
417
446
|
/**
|
|
418
447
|
* List of fields defining entry values.
|
|
419
448
|
*/
|
|
@@ -442,6 +471,16 @@ export interface CmsModel {
|
|
|
442
471
|
* It is picked as first available text field. Or user can select own field.
|
|
443
472
|
*/
|
|
444
473
|
titleFieldId: string;
|
|
474
|
+
/**
|
|
475
|
+
* The field which is displayed as the description one.
|
|
476
|
+
* Only way this is null or undefined is that there are no long-text fields to be set as description.
|
|
477
|
+
*/
|
|
478
|
+
descriptionFieldId?: string | null;
|
|
479
|
+
/**
|
|
480
|
+
* The field which is displayed as the image.
|
|
481
|
+
* Only way this is null or undefined is that there are no file fields, with images only set, to be set as image.
|
|
482
|
+
*/
|
|
483
|
+
imageFieldId?: string | null;
|
|
445
484
|
/**
|
|
446
485
|
* The version of Webiny which this record was stored with.
|
|
447
486
|
*/
|
|
@@ -614,6 +653,7 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
614
653
|
* ```
|
|
615
654
|
*/
|
|
616
655
|
createTypeField(params: {
|
|
656
|
+
models: CmsModel[];
|
|
617
657
|
model: CmsModel;
|
|
618
658
|
field: TField;
|
|
619
659
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
@@ -714,6 +754,7 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
714
754
|
* ```
|
|
715
755
|
*/
|
|
716
756
|
createTypeField: (params: {
|
|
757
|
+
models: CmsModel[];
|
|
717
758
|
model: CmsModel;
|
|
718
759
|
field: TField;
|
|
719
760
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
@@ -734,6 +775,7 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
734
775
|
* ```
|
|
735
776
|
*/
|
|
736
777
|
createInputField: (params: {
|
|
778
|
+
models: CmsModel[];
|
|
737
779
|
model: CmsModel;
|
|
738
780
|
field: TField;
|
|
739
781
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
@@ -801,7 +843,7 @@ export interface CmsFieldTypePlugins {
|
|
|
801
843
|
*
|
|
802
844
|
* @category General
|
|
803
845
|
*/
|
|
804
|
-
export interface
|
|
846
|
+
export interface CmsIdentity {
|
|
805
847
|
/**
|
|
806
848
|
* ID if the user.
|
|
807
849
|
*/
|
|
@@ -851,7 +893,7 @@ export interface CmsSettingsContext {
|
|
|
851
893
|
/**
|
|
852
894
|
* Get the datetime when content model last changed.
|
|
853
895
|
*/
|
|
854
|
-
getModelLastChange: () => Promise<Date>;
|
|
896
|
+
getModelLastChange: () => Promise<Date | null>;
|
|
855
897
|
}
|
|
856
898
|
export interface OnSystemBeforeInstallTopicParams {
|
|
857
899
|
tenant: string;
|
|
@@ -869,9 +911,7 @@ export interface OnSystemInstallErrorTopicParams {
|
|
|
869
911
|
export declare type CmsSystemContext = {
|
|
870
912
|
getSystemVersion: () => Promise<string | null>;
|
|
871
913
|
setSystemVersion: (version: string) => Promise<void>;
|
|
872
|
-
getReadAPIKey(): Promise<string | null>;
|
|
873
914
|
installSystem: () => Promise<void>;
|
|
874
|
-
upgradeSystem: (version: string) => Promise<boolean>;
|
|
875
915
|
/**
|
|
876
916
|
* Lifecycle events - deprecated
|
|
877
917
|
*/
|
|
@@ -952,7 +992,7 @@ export interface CmsGroup {
|
|
|
952
992
|
/**
|
|
953
993
|
* CreatedBy reference object.
|
|
954
994
|
*/
|
|
955
|
-
createdBy?:
|
|
995
|
+
createdBy?: CmsIdentity;
|
|
956
996
|
/**
|
|
957
997
|
* Date group was created on.
|
|
958
998
|
*/
|
|
@@ -1154,6 +1194,14 @@ export interface CmsModelCreateInput {
|
|
|
1154
1194
|
* Name of the content model.
|
|
1155
1195
|
*/
|
|
1156
1196
|
name: string;
|
|
1197
|
+
/**
|
|
1198
|
+
* Singular name of the content model to be used in the API.
|
|
1199
|
+
*/
|
|
1200
|
+
singularApiName: string;
|
|
1201
|
+
/**
|
|
1202
|
+
* Plural name of the content model to be used in the API.
|
|
1203
|
+
*/
|
|
1204
|
+
pluralApiName: string;
|
|
1157
1205
|
/**
|
|
1158
1206
|
* Unique ID of the content model. Created from name if not sent by the user. Cannot be changed.
|
|
1159
1207
|
*/
|
|
@@ -1161,7 +1209,7 @@ export interface CmsModelCreateInput {
|
|
|
1161
1209
|
/**
|
|
1162
1210
|
* Description of the content model.
|
|
1163
1211
|
*/
|
|
1164
|
-
description?: string;
|
|
1212
|
+
description?: string | null;
|
|
1165
1213
|
/**
|
|
1166
1214
|
* Group where to put the content model in.
|
|
1167
1215
|
*/
|
|
@@ -1186,10 +1234,11 @@ export interface CmsModelCreateInput {
|
|
|
1186
1234
|
*/
|
|
1187
1235
|
tags?: string[];
|
|
1188
1236
|
/**
|
|
1189
|
-
*
|
|
1190
|
-
* It is picked as first available text field. Or user can select own field.
|
|
1237
|
+
* Fields fieldId which are picked to represent the CMS entry.
|
|
1191
1238
|
*/
|
|
1192
|
-
titleFieldId?: string;
|
|
1239
|
+
titleFieldId?: string | null;
|
|
1240
|
+
descriptionFieldId?: string | null;
|
|
1241
|
+
imageFieldId?: string | null;
|
|
1193
1242
|
}
|
|
1194
1243
|
/**
|
|
1195
1244
|
* A GraphQL `params.data` parameter received when creating content model from existing model.
|
|
@@ -1233,11 +1282,11 @@ export interface CmsModelFieldInput {
|
|
|
1233
1282
|
/**
|
|
1234
1283
|
* Text to display below the field to help user what to write in the field.
|
|
1235
1284
|
*/
|
|
1236
|
-
helpText?: string;
|
|
1285
|
+
helpText?: string | null;
|
|
1237
1286
|
/**
|
|
1238
1287
|
* Text to display in the field.
|
|
1239
1288
|
*/
|
|
1240
|
-
placeholderText?: string;
|
|
1289
|
+
placeholderText?: string | null;
|
|
1241
1290
|
/**
|
|
1242
1291
|
* Fields can be tagged to give them contextual meaning.
|
|
1243
1292
|
*/
|
|
@@ -1261,7 +1310,7 @@ export interface CmsModelFieldInput {
|
|
|
1261
1310
|
/**
|
|
1262
1311
|
* @see CmsModelField.listValidation
|
|
1263
1312
|
*/
|
|
1264
|
-
listValidation
|
|
1313
|
+
listValidation?: CmsModelFieldValidation[];
|
|
1265
1314
|
/**
|
|
1266
1315
|
* User defined settings.
|
|
1267
1316
|
*/
|
|
@@ -1278,6 +1327,14 @@ export interface CmsModelUpdateInput {
|
|
|
1278
1327
|
* A new content model name.
|
|
1279
1328
|
*/
|
|
1280
1329
|
name?: string;
|
|
1330
|
+
/**
|
|
1331
|
+
* A new singular name of the content model to be used in the API.
|
|
1332
|
+
*/
|
|
1333
|
+
singularApiName?: string;
|
|
1334
|
+
/**
|
|
1335
|
+
* A new plural name of the content model to be used in the API.
|
|
1336
|
+
*/
|
|
1337
|
+
pluralApiName?: string;
|
|
1281
1338
|
/**
|
|
1282
1339
|
* A group we want to move the model to.
|
|
1283
1340
|
*/
|
|
@@ -1285,7 +1342,7 @@ export interface CmsModelUpdateInput {
|
|
|
1285
1342
|
/**
|
|
1286
1343
|
* A new description of the content model.
|
|
1287
1344
|
*/
|
|
1288
|
-
description?: string;
|
|
1345
|
+
description?: string | null;
|
|
1289
1346
|
/**
|
|
1290
1347
|
* A list of content model fields to define the entry values.
|
|
1291
1348
|
*/
|
|
@@ -1302,10 +1359,11 @@ export interface CmsModelUpdateInput {
|
|
|
1302
1359
|
*/
|
|
1303
1360
|
layout: string[][];
|
|
1304
1361
|
/**
|
|
1305
|
-
*
|
|
1306
|
-
* It is picked as first available text field. Or user can select own field.
|
|
1362
|
+
* Fields fieldId which are picked to represent the CMS entry.
|
|
1307
1363
|
*/
|
|
1308
|
-
titleFieldId?: string;
|
|
1364
|
+
titleFieldId?: string | null;
|
|
1365
|
+
descriptionFieldId?: string | null;
|
|
1366
|
+
imageFieldId?: string | null;
|
|
1309
1367
|
}
|
|
1310
1368
|
/**
|
|
1311
1369
|
* A plugin to load a CmsModelManager.
|
|
@@ -1369,11 +1427,15 @@ export interface CmsEntry<T = CmsEntryValues> {
|
|
|
1369
1427
|
/**
|
|
1370
1428
|
* CreatedBy object reference.
|
|
1371
1429
|
*/
|
|
1372
|
-
createdBy:
|
|
1430
|
+
createdBy: CmsIdentity;
|
|
1373
1431
|
/**
|
|
1374
1432
|
* OwnedBy object reference. Can be different from CreatedBy.
|
|
1375
1433
|
*/
|
|
1376
|
-
ownedBy:
|
|
1434
|
+
ownedBy: CmsIdentity;
|
|
1435
|
+
/**
|
|
1436
|
+
* ModifiedBy object reference. Last person who modified the entry.
|
|
1437
|
+
*/
|
|
1438
|
+
modifiedBy?: CmsIdentity | null;
|
|
1377
1439
|
/**
|
|
1378
1440
|
* A string of Date.toISOString() type.
|
|
1379
1441
|
* Populated on creation.
|
|
@@ -1813,15 +1875,18 @@ export interface CmsEntryMeta {
|
|
|
1813
1875
|
*/
|
|
1814
1876
|
totalCount: number;
|
|
1815
1877
|
}
|
|
1878
|
+
/**
|
|
1879
|
+
* Create
|
|
1880
|
+
*/
|
|
1816
1881
|
export interface OnEntryBeforeCreateTopicParams {
|
|
1817
1882
|
input: CreateCmsEntryInput;
|
|
1818
1883
|
entry: CmsEntry;
|
|
1819
|
-
model:
|
|
1884
|
+
model: CmsModel;
|
|
1820
1885
|
}
|
|
1821
1886
|
export interface OnEntryAfterCreateTopicParams {
|
|
1822
1887
|
input: CreateCmsEntryInput;
|
|
1823
1888
|
entry: CmsEntry;
|
|
1824
|
-
model:
|
|
1889
|
+
model: CmsModel;
|
|
1825
1890
|
storageEntry: CmsEntry;
|
|
1826
1891
|
}
|
|
1827
1892
|
export interface OnEntryCreateErrorTopicParams {
|
|
@@ -1830,17 +1895,20 @@ export interface OnEntryCreateErrorTopicParams {
|
|
|
1830
1895
|
entry: CmsEntry;
|
|
1831
1896
|
model: CmsModel;
|
|
1832
1897
|
}
|
|
1898
|
+
/**
|
|
1899
|
+
* Revision Create
|
|
1900
|
+
*/
|
|
1833
1901
|
export interface OnEntryRevisionBeforeCreateTopicParams {
|
|
1834
1902
|
input: CreateFromCmsEntryInput;
|
|
1835
1903
|
entry: CmsEntry;
|
|
1836
1904
|
original: CmsEntry;
|
|
1837
|
-
model:
|
|
1905
|
+
model: CmsModel;
|
|
1838
1906
|
}
|
|
1839
1907
|
export interface OnEntryRevisionAfterCreateTopicParams {
|
|
1840
1908
|
input: CreateFromCmsEntryInput;
|
|
1841
1909
|
entry: CmsEntry;
|
|
1842
1910
|
original: CmsEntry;
|
|
1843
|
-
model:
|
|
1911
|
+
model: CmsModel;
|
|
1844
1912
|
storageEntry: CmsEntry;
|
|
1845
1913
|
}
|
|
1846
1914
|
export interface OnEntryCreateRevisionErrorTopicParams {
|
|
@@ -1850,17 +1918,20 @@ export interface OnEntryCreateRevisionErrorTopicParams {
|
|
|
1850
1918
|
entry: CmsEntry;
|
|
1851
1919
|
model: CmsModel;
|
|
1852
1920
|
}
|
|
1921
|
+
/**
|
|
1922
|
+
* Update
|
|
1923
|
+
*/
|
|
1853
1924
|
export interface OnEntryBeforeUpdateTopicParams {
|
|
1854
1925
|
input: UpdateCmsEntryInput;
|
|
1855
1926
|
original: CmsEntry;
|
|
1856
1927
|
entry: CmsEntry;
|
|
1857
|
-
model:
|
|
1928
|
+
model: CmsModel;
|
|
1858
1929
|
}
|
|
1859
1930
|
export interface OnEntryAfterUpdateTopicParams {
|
|
1860
1931
|
input: UpdateCmsEntryInput;
|
|
1861
1932
|
original: CmsEntry;
|
|
1862
1933
|
entry: CmsEntry;
|
|
1863
|
-
model:
|
|
1934
|
+
model: CmsModel;
|
|
1864
1935
|
storageEntry: CmsEntry;
|
|
1865
1936
|
}
|
|
1866
1937
|
export interface OnEntryUpdateErrorTopicParams {
|
|
@@ -1869,27 +1940,50 @@ export interface OnEntryUpdateErrorTopicParams {
|
|
|
1869
1940
|
entry: CmsEntry;
|
|
1870
1941
|
model: CmsModel;
|
|
1871
1942
|
}
|
|
1943
|
+
/**
|
|
1944
|
+
* Publish
|
|
1945
|
+
*/
|
|
1872
1946
|
export interface OnEntryBeforePublishTopicParams {
|
|
1873
1947
|
entry: CmsEntry;
|
|
1874
|
-
model:
|
|
1948
|
+
model: CmsModel;
|
|
1875
1949
|
}
|
|
1876
1950
|
export interface OnEntryAfterPublishTopicParams {
|
|
1877
1951
|
entry: CmsEntry;
|
|
1878
|
-
model:
|
|
1952
|
+
model: CmsModel;
|
|
1879
1953
|
storageEntry: CmsEntry;
|
|
1880
1954
|
}
|
|
1881
1955
|
export interface OnEntryPublishErrorTopicParams {
|
|
1882
1956
|
error: Error;
|
|
1883
1957
|
entry: CmsEntry;
|
|
1884
|
-
model:
|
|
1958
|
+
model: CmsModel;
|
|
1885
1959
|
}
|
|
1960
|
+
/**
|
|
1961
|
+
* Republish
|
|
1962
|
+
*/
|
|
1963
|
+
export interface OnEntryBeforeRepublishTopicParams {
|
|
1964
|
+
entry: CmsEntry;
|
|
1965
|
+
model: CmsModel;
|
|
1966
|
+
}
|
|
1967
|
+
export interface OnEntryAfterRepublishTopicParams {
|
|
1968
|
+
entry: CmsEntry;
|
|
1969
|
+
model: CmsModel;
|
|
1970
|
+
storageEntry: CmsEntry;
|
|
1971
|
+
}
|
|
1972
|
+
export interface OnEntryRepublishErrorTopicParams {
|
|
1973
|
+
error: Error;
|
|
1974
|
+
entry: CmsEntry;
|
|
1975
|
+
model: CmsModel;
|
|
1976
|
+
}
|
|
1977
|
+
/**
|
|
1978
|
+
* Unpublish
|
|
1979
|
+
*/
|
|
1886
1980
|
export interface OnEntryBeforeUnpublishTopicParams {
|
|
1887
1981
|
entry: CmsEntry;
|
|
1888
|
-
model:
|
|
1982
|
+
model: CmsModel;
|
|
1889
1983
|
}
|
|
1890
1984
|
export interface OnEntryAfterUnpublishTopicParams {
|
|
1891
1985
|
entry: CmsEntry;
|
|
1892
|
-
model:
|
|
1986
|
+
model: CmsModel;
|
|
1893
1987
|
storageEntry: CmsEntry;
|
|
1894
1988
|
}
|
|
1895
1989
|
export interface OnEntryUnpublishErrorTopicParams {
|
|
@@ -1899,43 +1993,44 @@ export interface OnEntryUnpublishErrorTopicParams {
|
|
|
1899
1993
|
}
|
|
1900
1994
|
export interface OnEntryBeforeDeleteTopicParams {
|
|
1901
1995
|
entry: CmsEntry;
|
|
1902
|
-
model:
|
|
1996
|
+
model: CmsModel;
|
|
1903
1997
|
}
|
|
1904
1998
|
export interface OnEntryAfterDeleteTopicParams {
|
|
1905
1999
|
entry: CmsEntry;
|
|
1906
|
-
model:
|
|
2000
|
+
model: CmsModel;
|
|
1907
2001
|
}
|
|
1908
2002
|
export interface OnEntryDeleteErrorTopicParams {
|
|
1909
2003
|
error: Error;
|
|
1910
2004
|
entry: CmsEntry;
|
|
1911
|
-
model:
|
|
2005
|
+
model: CmsModel;
|
|
1912
2006
|
}
|
|
1913
2007
|
export interface OnEntryRevisionBeforeDeleteTopicParams {
|
|
1914
2008
|
entry: CmsEntry;
|
|
1915
|
-
model:
|
|
2009
|
+
model: CmsModel;
|
|
1916
2010
|
}
|
|
1917
2011
|
export interface OnEntryRevisionAfterDeleteTopicParams {
|
|
1918
2012
|
entry: CmsEntry;
|
|
1919
|
-
model:
|
|
2013
|
+
model: CmsModel;
|
|
1920
2014
|
}
|
|
1921
2015
|
export interface OnEntryRevisionDeleteErrorTopicParams {
|
|
1922
2016
|
error: Error;
|
|
1923
2017
|
entry: CmsEntry;
|
|
1924
|
-
model:
|
|
2018
|
+
model: CmsModel;
|
|
1925
2019
|
}
|
|
1926
2020
|
export interface OnEntryBeforeGetTopicParams {
|
|
1927
|
-
model:
|
|
2021
|
+
model: CmsModel;
|
|
1928
2022
|
where: CmsEntryListWhere;
|
|
1929
2023
|
}
|
|
1930
2024
|
export interface EntryBeforeListTopicParams {
|
|
1931
2025
|
where: CmsEntryListWhere;
|
|
1932
|
-
model:
|
|
2026
|
+
model: CmsModel;
|
|
1933
2027
|
}
|
|
1934
2028
|
/**
|
|
1935
2029
|
* @category Context
|
|
1936
2030
|
* @category CmsEntry
|
|
1937
2031
|
*/
|
|
1938
2032
|
export interface CreateCmsEntryInput {
|
|
2033
|
+
id?: string;
|
|
1939
2034
|
[key: string]: any;
|
|
1940
2035
|
}
|
|
1941
2036
|
/**
|
|
@@ -2116,6 +2211,9 @@ export interface CmsEntryContext {
|
|
|
2116
2211
|
onEntryBeforePublish: Topic<OnEntryBeforePublishTopicParams>;
|
|
2117
2212
|
onEntryAfterPublish: Topic<OnEntryAfterPublishTopicParams>;
|
|
2118
2213
|
onEntryPublishError: Topic<OnEntryPublishErrorTopicParams>;
|
|
2214
|
+
onEntryBeforeRepublish: Topic<OnEntryBeforeRepublishTopicParams>;
|
|
2215
|
+
onEntryAfterRepublish: Topic<OnEntryAfterRepublishTopicParams>;
|
|
2216
|
+
onEntryRepublishError: Topic<OnEntryRepublishErrorTopicParams>;
|
|
2119
2217
|
onEntryBeforeUnpublish: Topic<OnEntryBeforeUnpublishTopicParams>;
|
|
2120
2218
|
onEntryAfterUnpublish: Topic<OnEntryAfterUnpublishTopicParams>;
|
|
2121
2219
|
onEntryUnpublishError: Topic<OnEntryUnpublishErrorTopicParams>;
|
|
@@ -2320,7 +2418,7 @@ export interface CmsEntryStorageOperationsListParams {
|
|
|
2320
2418
|
sort?: CmsEntryListSort;
|
|
2321
2419
|
search?: string;
|
|
2322
2420
|
fields?: string[];
|
|
2323
|
-
limit
|
|
2421
|
+
limit: number;
|
|
2324
2422
|
after?: string | null;
|
|
2325
2423
|
}
|
|
2326
2424
|
export interface CmsEntryStorageOperationsCreateParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
@@ -2454,71 +2552,71 @@ export interface CmsEntryStorageOperations<T extends CmsStorageEntry = CmsStorag
|
|
|
2454
2552
|
/**
|
|
2455
2553
|
* Get all the entries of the ids.
|
|
2456
2554
|
*/
|
|
2457
|
-
getByIds: (model:
|
|
2555
|
+
getByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetByIdsParams) => Promise<T[]>;
|
|
2458
2556
|
/**
|
|
2459
2557
|
* Get all the published entries of the ids.
|
|
2460
2558
|
*/
|
|
2461
|
-
getPublishedByIds: (model:
|
|
2559
|
+
getPublishedByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetPublishedByIdsParams) => Promise<T[]>;
|
|
2462
2560
|
/**
|
|
2463
2561
|
* Get all the latest entries of the ids.
|
|
2464
2562
|
*/
|
|
2465
|
-
getLatestByIds: (model:
|
|
2563
|
+
getLatestByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetLatestByIdsParams) => Promise<T[]>;
|
|
2466
2564
|
/**
|
|
2467
2565
|
* Get all revisions of the given entry id.
|
|
2468
2566
|
*/
|
|
2469
|
-
getRevisions: (model:
|
|
2567
|
+
getRevisions: (model: CmsModel, params: CmsEntryStorageOperationsGetRevisionsParams) => Promise<T[]>;
|
|
2470
2568
|
/**
|
|
2471
2569
|
* Get the entry by the given revision id.
|
|
2472
2570
|
*/
|
|
2473
|
-
getRevisionById: (model:
|
|
2571
|
+
getRevisionById: (model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams) => Promise<T | null>;
|
|
2474
2572
|
/**
|
|
2475
2573
|
* Get the published entry by given entryId.
|
|
2476
2574
|
*/
|
|
2477
|
-
getPublishedRevisionByEntryId: (model:
|
|
2575
|
+
getPublishedRevisionByEntryId: (model: CmsModel, params: CmsEntryStorageOperationsGetPublishedRevisionParams) => Promise<T | null>;
|
|
2478
2576
|
/**
|
|
2479
2577
|
* Get the latest entry by given entryId.
|
|
2480
2578
|
*/
|
|
2481
|
-
getLatestRevisionByEntryId: (model:
|
|
2579
|
+
getLatestRevisionByEntryId: (model: CmsModel, params: CmsEntryStorageOperationsGetLatestRevisionParams) => Promise<T | null>;
|
|
2482
2580
|
/**
|
|
2483
2581
|
* Get the revision of the entry before given one.
|
|
2484
2582
|
*/
|
|
2485
|
-
getPreviousRevision: (model:
|
|
2583
|
+
getPreviousRevision: (model: CmsModel, params: CmsEntryStorageOperationsGetPreviousRevisionParams) => Promise<T | null>;
|
|
2486
2584
|
/**
|
|
2487
2585
|
* Gets entry by given params.
|
|
2488
2586
|
*/
|
|
2489
|
-
get: (model:
|
|
2587
|
+
get: (model: CmsModel, params: CmsEntryStorageOperationsGetParams) => Promise<T | null>;
|
|
2490
2588
|
/**
|
|
2491
2589
|
* List all entries. Filterable via params.
|
|
2492
2590
|
*/
|
|
2493
|
-
list: (model:
|
|
2591
|
+
list: (model: CmsModel, params: CmsEntryStorageOperationsListParams) => Promise<CmsEntryStorageOperationsListResponse<T>>;
|
|
2494
2592
|
/**
|
|
2495
2593
|
* Create a new entry.
|
|
2496
2594
|
*/
|
|
2497
|
-
create: (model:
|
|
2595
|
+
create: (model: CmsModel, params: CmsEntryStorageOperationsCreateParams<T>) => Promise<T>;
|
|
2498
2596
|
/**
|
|
2499
2597
|
* Create a new entry from existing one.
|
|
2500
2598
|
*/
|
|
2501
|
-
createRevisionFrom: (model:
|
|
2599
|
+
createRevisionFrom: (model: CmsModel, params: CmsEntryStorageOperationsCreateRevisionFromParams<T>) => Promise<T>;
|
|
2502
2600
|
/**
|
|
2503
2601
|
* Update existing entry.
|
|
2504
2602
|
*/
|
|
2505
|
-
update: (model:
|
|
2603
|
+
update: (model: CmsModel, params: CmsEntryStorageOperationsUpdateParams<T>) => Promise<T>;
|
|
2506
2604
|
/**
|
|
2507
2605
|
* Delete the entry revision.
|
|
2508
2606
|
*/
|
|
2509
|
-
deleteRevision: (model:
|
|
2607
|
+
deleteRevision: (model: CmsModel, params: CmsEntryStorageOperationsDeleteRevisionParams<T>) => Promise<void>;
|
|
2510
2608
|
/**
|
|
2511
2609
|
* Delete the entry.
|
|
2512
2610
|
*/
|
|
2513
|
-
delete: (model:
|
|
2611
|
+
delete: (model: CmsModel, params: CmsEntryStorageOperationsDeleteParams) => Promise<void>;
|
|
2514
2612
|
/**
|
|
2515
2613
|
* Publish the entry.
|
|
2516
2614
|
*/
|
|
2517
|
-
publish: (model:
|
|
2615
|
+
publish: (model: CmsModel, params: CmsEntryStorageOperationsPublishParams<T>) => Promise<T>;
|
|
2518
2616
|
/**
|
|
2519
2617
|
* Unpublish the entry.
|
|
2520
2618
|
*/
|
|
2521
|
-
unpublish: (model:
|
|
2619
|
+
unpublish: (model: CmsModel, params: CmsEntryStorageOperationsUnpublishParams<T>) => Promise<T>;
|
|
2522
2620
|
}
|
|
2523
2621
|
export declare enum CONTENT_ENTRY_STATUS {
|
|
2524
2622
|
DRAFT = "draft",
|
|
@@ -2590,11 +2688,7 @@ export interface HeadlessCmsStorageOperations<C = CmsContext> {
|
|
|
2590
2688
|
/**
|
|
2591
2689
|
* Either attach something from the storage operations or run something in it.
|
|
2592
2690
|
*/
|
|
2593
|
-
beforeInit
|
|
2691
|
+
beforeInit: (context: C) => Promise<void>;
|
|
2594
2692
|
init?: (context: C) => Promise<void>;
|
|
2595
|
-
/**
|
|
2596
|
-
* An upgrade to run if necessary.
|
|
2597
|
-
*/
|
|
2598
|
-
upgrade?: UpgradePlugin | null;
|
|
2599
2693
|
}
|
|
2600
2694
|
export {};
|