@webiny/api-headless-cms 5.34.8 → 5.35.0-beta.0
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.js +47 -68
- 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 +5 -26
- package/crud/contentEntry/markLockedFields.js.map +1 -1
- package/crud/contentEntry/referenceFieldsMapping.js +39 -66
- package/crud/contentEntry/referenceFieldsMapping.js.map +1 -1
- package/crud/contentEntry/searchableFields.js +1 -12
- package/crud/contentEntry/searchableFields.js.map +1 -1
- package/crud/contentEntry.crud.d.ts +5 -2
- package/crud/contentEntry.crud.js +859 -941
- 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.js +39 -105
- 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.js +31 -8
- 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 +1 -0
- package/crud/contentModel/validateModel.js +0 -8
- package/crud/contentModel/validateModel.js.map +1 -1
- package/crud/contentModel/validateModelFields.d.ts +2 -1
- package/crud/contentModel/validateModelFields.js +25 -133
- 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 +354 -373
- 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 +2 -2
- package/graphql/buildSchemaPlugins.js +4 -9
- 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 +2 -3
- package/graphql/createExecutableSchema.js +2 -6
- package/graphql/createExecutableSchema.js.map +1 -1
- 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.js +2 -9
- package/graphql/generateSchema.js.map +1 -1
- package/graphql/getSchema.d.ts +17 -0
- package/graphql/getSchema.js +102 -0
- package/graphql/getSchema.js.map +1 -0
- package/graphql/graphQLHandlerFactory.js +6 -173
- 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 -1
- package/graphql/index.js +0 -5
- package/graphql/index.js.map +1 -1
- package/graphql/schema/baseContentSchema.d.ts +2 -2
- package/graphql/schema/baseContentSchema.js +5 -19
- package/graphql/schema/baseContentSchema.js.map +1 -1
- package/graphql/schema/baseSchema.d.ts +1 -1
- package/graphql/schema/baseSchema.js +5 -10
- package/graphql/schema/baseSchema.js.map +1 -1
- package/graphql/schema/contentEntries.d.ts +2 -2
- package/graphql/schema/contentEntries.js +98 -100
- package/graphql/schema/contentEntries.js.map +1 -1
- package/graphql/schema/contentModelGroups.d.ts +2 -2
- package/graphql/schema/contentModelGroups.js +12 -29
- package/graphql/schema/contentModelGroups.js.map +1 -1
- package/graphql/schema/contentModels.d.ts +2 -2
- package/graphql/schema/contentModels.js +28 -31
- package/graphql/schema/contentModels.js.map +1 -1
- package/graphql/schema/createFieldResolvers.js +7 -29
- 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 +1 -0
- package/graphql/schema/createManageSDL.js +56 -63
- 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 +4 -18
- package/graphql/schema/createReadResolvers.js.map +1 -1
- package/graphql/schema/createReadSDL.d.ts +1 -0
- package/graphql/schema/createReadSDL.js +24 -32
- 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 +2 -2
- package/graphql/schema/schemaPlugins.js +21 -30
- 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 +57 -48
- package/graphqlFields/dynamicZone/dynamicZoneField.js.map +1 -1
- package/graphqlFields/dynamicZone/dynamicZoneStorage.js +2 -18
- package/graphqlFields/dynamicZone/dynamicZoneStorage.js.map +1 -1
- package/graphqlFields/dynamicZone/index.js +0 -2
- package/graphqlFields/dynamicZone/index.js.map +1 -1
- package/graphqlFields/file.js +0 -8
- package/graphqlFields/file.js.map +1 -1
- package/graphqlFields/helpers.js +0 -10
- package/graphqlFields/helpers.js.map +1 -1
- package/graphqlFields/index.js +0 -12
- package/graphqlFields/index.js.map +1 -1
- package/graphqlFields/longText.js +0 -10
- package/graphqlFields/longText.js.map +1 -1
- package/graphqlFields/number.js +0 -12
- package/graphqlFields/number.js.map +1 -1
- package/graphqlFields/object.js +21 -38
- package/graphqlFields/object.js.map +1 -1
- package/graphqlFields/ref.js +59 -65
- 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 +4 -2
- package/index.js +26 -22
- 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.js +0 -10
- package/plugins/CmsGraphQLSchemaSorterPlugin.js.map +1 -1
- package/plugins/CmsGroupPlugin.js +0 -8
- package/plugins/CmsGroupPlugin.js.map +1 -1
- package/plugins/CmsModelFieldConverterPlugin.js +0 -5
- package/plugins/CmsModelFieldConverterPlugin.js.map +1 -1
- package/plugins/CmsModelPlugin.d.ts +21 -3
- package/plugins/CmsModelPlugin.js +30 -40
- package/plugins/CmsModelPlugin.js.map +1 -1
- package/plugins/CmsParametersPlugin.js +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 +2 -0
- package/plugins/index.js +22 -12
- 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.js +0 -9
- 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/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
|
*/
|
|
@@ -475,6 +514,7 @@ interface CmsModelFieldToGraphQLCreateResolverParams<TField> {
|
|
|
475
514
|
graphQLType: string;
|
|
476
515
|
field: TField;
|
|
477
516
|
createFieldResolvers: any;
|
|
517
|
+
fieldTypePlugins: CmsFieldTypePlugins;
|
|
478
518
|
}
|
|
479
519
|
export interface CmsModelFieldToGraphQLCreateResolver<TField = CmsModelField> {
|
|
480
520
|
(params: CmsModelFieldToGraphQLCreateResolverParams<TField>): GraphQLFieldResolver | {
|
|
@@ -614,6 +654,7 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
614
654
|
* ```
|
|
615
655
|
*/
|
|
616
656
|
createTypeField(params: {
|
|
657
|
+
models: CmsModel[];
|
|
617
658
|
model: CmsModel;
|
|
618
659
|
field: TField;
|
|
619
660
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
@@ -714,6 +755,7 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
714
755
|
* ```
|
|
715
756
|
*/
|
|
716
757
|
createTypeField: (params: {
|
|
758
|
+
models: CmsModel[];
|
|
717
759
|
model: CmsModel;
|
|
718
760
|
field: TField;
|
|
719
761
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
@@ -734,6 +776,7 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
734
776
|
* ```
|
|
735
777
|
*/
|
|
736
778
|
createInputField: (params: {
|
|
779
|
+
models: CmsModel[];
|
|
737
780
|
model: CmsModel;
|
|
738
781
|
field: TField;
|
|
739
782
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
@@ -801,7 +844,7 @@ export interface CmsFieldTypePlugins {
|
|
|
801
844
|
*
|
|
802
845
|
* @category General
|
|
803
846
|
*/
|
|
804
|
-
export interface
|
|
847
|
+
export interface CmsIdentity {
|
|
805
848
|
/**
|
|
806
849
|
* ID if the user.
|
|
807
850
|
*/
|
|
@@ -851,7 +894,7 @@ export interface CmsSettingsContext {
|
|
|
851
894
|
/**
|
|
852
895
|
* Get the datetime when content model last changed.
|
|
853
896
|
*/
|
|
854
|
-
getModelLastChange: () => Promise<Date>;
|
|
897
|
+
getModelLastChange: () => Promise<Date | null>;
|
|
855
898
|
}
|
|
856
899
|
export interface OnSystemBeforeInstallTopicParams {
|
|
857
900
|
tenant: string;
|
|
@@ -869,9 +912,7 @@ export interface OnSystemInstallErrorTopicParams {
|
|
|
869
912
|
export declare type CmsSystemContext = {
|
|
870
913
|
getSystemVersion: () => Promise<string | null>;
|
|
871
914
|
setSystemVersion: (version: string) => Promise<void>;
|
|
872
|
-
getReadAPIKey(): Promise<string | null>;
|
|
873
915
|
installSystem: () => Promise<void>;
|
|
874
|
-
upgradeSystem: (version: string) => Promise<boolean>;
|
|
875
916
|
/**
|
|
876
917
|
* Lifecycle events - deprecated
|
|
877
918
|
*/
|
|
@@ -952,7 +993,7 @@ export interface CmsGroup {
|
|
|
952
993
|
/**
|
|
953
994
|
* CreatedBy reference object.
|
|
954
995
|
*/
|
|
955
|
-
createdBy?:
|
|
996
|
+
createdBy?: CmsIdentity;
|
|
956
997
|
/**
|
|
957
998
|
* Date group was created on.
|
|
958
999
|
*/
|
|
@@ -1154,6 +1195,14 @@ export interface CmsModelCreateInput {
|
|
|
1154
1195
|
* Name of the content model.
|
|
1155
1196
|
*/
|
|
1156
1197
|
name: string;
|
|
1198
|
+
/**
|
|
1199
|
+
* Singular name of the content model to be used in the API.
|
|
1200
|
+
*/
|
|
1201
|
+
singularApiName: string;
|
|
1202
|
+
/**
|
|
1203
|
+
* Plural name of the content model to be used in the API.
|
|
1204
|
+
*/
|
|
1205
|
+
pluralApiName: string;
|
|
1157
1206
|
/**
|
|
1158
1207
|
* Unique ID of the content model. Created from name if not sent by the user. Cannot be changed.
|
|
1159
1208
|
*/
|
|
@@ -1161,7 +1210,7 @@ export interface CmsModelCreateInput {
|
|
|
1161
1210
|
/**
|
|
1162
1211
|
* Description of the content model.
|
|
1163
1212
|
*/
|
|
1164
|
-
description?: string;
|
|
1213
|
+
description?: string | null;
|
|
1165
1214
|
/**
|
|
1166
1215
|
* Group where to put the content model in.
|
|
1167
1216
|
*/
|
|
@@ -1186,10 +1235,11 @@ export interface CmsModelCreateInput {
|
|
|
1186
1235
|
*/
|
|
1187
1236
|
tags?: string[];
|
|
1188
1237
|
/**
|
|
1189
|
-
*
|
|
1190
|
-
* It is picked as first available text field. Or user can select own field.
|
|
1238
|
+
* Fields fieldId which are picked to represent the CMS entry.
|
|
1191
1239
|
*/
|
|
1192
|
-
titleFieldId?: string;
|
|
1240
|
+
titleFieldId?: string | null;
|
|
1241
|
+
descriptionFieldId?: string | null;
|
|
1242
|
+
imageFieldId?: string | null;
|
|
1193
1243
|
}
|
|
1194
1244
|
/**
|
|
1195
1245
|
* A GraphQL `params.data` parameter received when creating content model from existing model.
|
|
@@ -1233,11 +1283,11 @@ export interface CmsModelFieldInput {
|
|
|
1233
1283
|
/**
|
|
1234
1284
|
* Text to display below the field to help user what to write in the field.
|
|
1235
1285
|
*/
|
|
1236
|
-
helpText?: string;
|
|
1286
|
+
helpText?: string | null;
|
|
1237
1287
|
/**
|
|
1238
1288
|
* Text to display in the field.
|
|
1239
1289
|
*/
|
|
1240
|
-
placeholderText?: string;
|
|
1290
|
+
placeholderText?: string | null;
|
|
1241
1291
|
/**
|
|
1242
1292
|
* Fields can be tagged to give them contextual meaning.
|
|
1243
1293
|
*/
|
|
@@ -1261,7 +1311,7 @@ export interface CmsModelFieldInput {
|
|
|
1261
1311
|
/**
|
|
1262
1312
|
* @see CmsModelField.listValidation
|
|
1263
1313
|
*/
|
|
1264
|
-
listValidation
|
|
1314
|
+
listValidation?: CmsModelFieldValidation[];
|
|
1265
1315
|
/**
|
|
1266
1316
|
* User defined settings.
|
|
1267
1317
|
*/
|
|
@@ -1278,6 +1328,14 @@ export interface CmsModelUpdateInput {
|
|
|
1278
1328
|
* A new content model name.
|
|
1279
1329
|
*/
|
|
1280
1330
|
name?: string;
|
|
1331
|
+
/**
|
|
1332
|
+
* A new singular name of the content model to be used in the API.
|
|
1333
|
+
*/
|
|
1334
|
+
singularApiName?: string;
|
|
1335
|
+
/**
|
|
1336
|
+
* A new plural name of the content model to be used in the API.
|
|
1337
|
+
*/
|
|
1338
|
+
pluralApiName?: string;
|
|
1281
1339
|
/**
|
|
1282
1340
|
* A group we want to move the model to.
|
|
1283
1341
|
*/
|
|
@@ -1285,7 +1343,7 @@ export interface CmsModelUpdateInput {
|
|
|
1285
1343
|
/**
|
|
1286
1344
|
* A new description of the content model.
|
|
1287
1345
|
*/
|
|
1288
|
-
description?: string;
|
|
1346
|
+
description?: string | null;
|
|
1289
1347
|
/**
|
|
1290
1348
|
* A list of content model fields to define the entry values.
|
|
1291
1349
|
*/
|
|
@@ -1302,10 +1360,11 @@ export interface CmsModelUpdateInput {
|
|
|
1302
1360
|
*/
|
|
1303
1361
|
layout: string[][];
|
|
1304
1362
|
/**
|
|
1305
|
-
*
|
|
1306
|
-
* It is picked as first available text field. Or user can select own field.
|
|
1363
|
+
* Fields fieldId which are picked to represent the CMS entry.
|
|
1307
1364
|
*/
|
|
1308
|
-
titleFieldId?: string;
|
|
1365
|
+
titleFieldId?: string | null;
|
|
1366
|
+
descriptionFieldId?: string | null;
|
|
1367
|
+
imageFieldId?: string | null;
|
|
1309
1368
|
}
|
|
1310
1369
|
/**
|
|
1311
1370
|
* A plugin to load a CmsModelManager.
|
|
@@ -1369,11 +1428,15 @@ export interface CmsEntry<T = CmsEntryValues> {
|
|
|
1369
1428
|
/**
|
|
1370
1429
|
* CreatedBy object reference.
|
|
1371
1430
|
*/
|
|
1372
|
-
createdBy:
|
|
1431
|
+
createdBy: CmsIdentity;
|
|
1373
1432
|
/**
|
|
1374
1433
|
* OwnedBy object reference. Can be different from CreatedBy.
|
|
1375
1434
|
*/
|
|
1376
|
-
ownedBy:
|
|
1435
|
+
ownedBy: CmsIdentity;
|
|
1436
|
+
/**
|
|
1437
|
+
* ModifiedBy object reference. Last person who modified the entry.
|
|
1438
|
+
*/
|
|
1439
|
+
modifiedBy?: CmsIdentity | null;
|
|
1377
1440
|
/**
|
|
1378
1441
|
* A string of Date.toISOString() type.
|
|
1379
1442
|
* Populated on creation.
|
|
@@ -1813,15 +1876,18 @@ export interface CmsEntryMeta {
|
|
|
1813
1876
|
*/
|
|
1814
1877
|
totalCount: number;
|
|
1815
1878
|
}
|
|
1879
|
+
/**
|
|
1880
|
+
* Create
|
|
1881
|
+
*/
|
|
1816
1882
|
export interface OnEntryBeforeCreateTopicParams {
|
|
1817
1883
|
input: CreateCmsEntryInput;
|
|
1818
1884
|
entry: CmsEntry;
|
|
1819
|
-
model:
|
|
1885
|
+
model: CmsModel;
|
|
1820
1886
|
}
|
|
1821
1887
|
export interface OnEntryAfterCreateTopicParams {
|
|
1822
1888
|
input: CreateCmsEntryInput;
|
|
1823
1889
|
entry: CmsEntry;
|
|
1824
|
-
model:
|
|
1890
|
+
model: CmsModel;
|
|
1825
1891
|
storageEntry: CmsEntry;
|
|
1826
1892
|
}
|
|
1827
1893
|
export interface OnEntryCreateErrorTopicParams {
|
|
@@ -1830,17 +1896,20 @@ export interface OnEntryCreateErrorTopicParams {
|
|
|
1830
1896
|
entry: CmsEntry;
|
|
1831
1897
|
model: CmsModel;
|
|
1832
1898
|
}
|
|
1899
|
+
/**
|
|
1900
|
+
* Revision Create
|
|
1901
|
+
*/
|
|
1833
1902
|
export interface OnEntryRevisionBeforeCreateTopicParams {
|
|
1834
1903
|
input: CreateFromCmsEntryInput;
|
|
1835
1904
|
entry: CmsEntry;
|
|
1836
1905
|
original: CmsEntry;
|
|
1837
|
-
model:
|
|
1906
|
+
model: CmsModel;
|
|
1838
1907
|
}
|
|
1839
1908
|
export interface OnEntryRevisionAfterCreateTopicParams {
|
|
1840
1909
|
input: CreateFromCmsEntryInput;
|
|
1841
1910
|
entry: CmsEntry;
|
|
1842
1911
|
original: CmsEntry;
|
|
1843
|
-
model:
|
|
1912
|
+
model: CmsModel;
|
|
1844
1913
|
storageEntry: CmsEntry;
|
|
1845
1914
|
}
|
|
1846
1915
|
export interface OnEntryCreateRevisionErrorTopicParams {
|
|
@@ -1850,17 +1919,20 @@ export interface OnEntryCreateRevisionErrorTopicParams {
|
|
|
1850
1919
|
entry: CmsEntry;
|
|
1851
1920
|
model: CmsModel;
|
|
1852
1921
|
}
|
|
1922
|
+
/**
|
|
1923
|
+
* Update
|
|
1924
|
+
*/
|
|
1853
1925
|
export interface OnEntryBeforeUpdateTopicParams {
|
|
1854
1926
|
input: UpdateCmsEntryInput;
|
|
1855
1927
|
original: CmsEntry;
|
|
1856
1928
|
entry: CmsEntry;
|
|
1857
|
-
model:
|
|
1929
|
+
model: CmsModel;
|
|
1858
1930
|
}
|
|
1859
1931
|
export interface OnEntryAfterUpdateTopicParams {
|
|
1860
1932
|
input: UpdateCmsEntryInput;
|
|
1861
1933
|
original: CmsEntry;
|
|
1862
1934
|
entry: CmsEntry;
|
|
1863
|
-
model:
|
|
1935
|
+
model: CmsModel;
|
|
1864
1936
|
storageEntry: CmsEntry;
|
|
1865
1937
|
}
|
|
1866
1938
|
export interface OnEntryUpdateErrorTopicParams {
|
|
@@ -1869,27 +1941,50 @@ export interface OnEntryUpdateErrorTopicParams {
|
|
|
1869
1941
|
entry: CmsEntry;
|
|
1870
1942
|
model: CmsModel;
|
|
1871
1943
|
}
|
|
1944
|
+
/**
|
|
1945
|
+
* Publish
|
|
1946
|
+
*/
|
|
1872
1947
|
export interface OnEntryBeforePublishTopicParams {
|
|
1873
1948
|
entry: CmsEntry;
|
|
1874
|
-
model:
|
|
1949
|
+
model: CmsModel;
|
|
1875
1950
|
}
|
|
1876
1951
|
export interface OnEntryAfterPublishTopicParams {
|
|
1877
1952
|
entry: CmsEntry;
|
|
1878
|
-
model:
|
|
1953
|
+
model: CmsModel;
|
|
1879
1954
|
storageEntry: CmsEntry;
|
|
1880
1955
|
}
|
|
1881
1956
|
export interface OnEntryPublishErrorTopicParams {
|
|
1882
1957
|
error: Error;
|
|
1883
1958
|
entry: CmsEntry;
|
|
1884
|
-
model:
|
|
1959
|
+
model: CmsModel;
|
|
1960
|
+
}
|
|
1961
|
+
/**
|
|
1962
|
+
* Republish
|
|
1963
|
+
*/
|
|
1964
|
+
export interface OnEntryBeforeRepublishTopicParams {
|
|
1965
|
+
entry: CmsEntry;
|
|
1966
|
+
model: CmsModel;
|
|
1967
|
+
}
|
|
1968
|
+
export interface OnEntryAfterRepublishTopicParams {
|
|
1969
|
+
entry: CmsEntry;
|
|
1970
|
+
model: CmsModel;
|
|
1971
|
+
storageEntry: CmsEntry;
|
|
1972
|
+
}
|
|
1973
|
+
export interface OnEntryRepublishErrorTopicParams {
|
|
1974
|
+
error: Error;
|
|
1975
|
+
entry: CmsEntry;
|
|
1976
|
+
model: CmsModel;
|
|
1885
1977
|
}
|
|
1978
|
+
/**
|
|
1979
|
+
* Unpublish
|
|
1980
|
+
*/
|
|
1886
1981
|
export interface OnEntryBeforeUnpublishTopicParams {
|
|
1887
1982
|
entry: CmsEntry;
|
|
1888
|
-
model:
|
|
1983
|
+
model: CmsModel;
|
|
1889
1984
|
}
|
|
1890
1985
|
export interface OnEntryAfterUnpublishTopicParams {
|
|
1891
1986
|
entry: CmsEntry;
|
|
1892
|
-
model:
|
|
1987
|
+
model: CmsModel;
|
|
1893
1988
|
storageEntry: CmsEntry;
|
|
1894
1989
|
}
|
|
1895
1990
|
export interface OnEntryUnpublishErrorTopicParams {
|
|
@@ -1899,37 +1994,37 @@ export interface OnEntryUnpublishErrorTopicParams {
|
|
|
1899
1994
|
}
|
|
1900
1995
|
export interface OnEntryBeforeDeleteTopicParams {
|
|
1901
1996
|
entry: CmsEntry;
|
|
1902
|
-
model:
|
|
1997
|
+
model: CmsModel;
|
|
1903
1998
|
}
|
|
1904
1999
|
export interface OnEntryAfterDeleteTopicParams {
|
|
1905
2000
|
entry: CmsEntry;
|
|
1906
|
-
model:
|
|
2001
|
+
model: CmsModel;
|
|
1907
2002
|
}
|
|
1908
2003
|
export interface OnEntryDeleteErrorTopicParams {
|
|
1909
2004
|
error: Error;
|
|
1910
2005
|
entry: CmsEntry;
|
|
1911
|
-
model:
|
|
2006
|
+
model: CmsModel;
|
|
1912
2007
|
}
|
|
1913
2008
|
export interface OnEntryRevisionBeforeDeleteTopicParams {
|
|
1914
2009
|
entry: CmsEntry;
|
|
1915
|
-
model:
|
|
2010
|
+
model: CmsModel;
|
|
1916
2011
|
}
|
|
1917
2012
|
export interface OnEntryRevisionAfterDeleteTopicParams {
|
|
1918
2013
|
entry: CmsEntry;
|
|
1919
|
-
model:
|
|
2014
|
+
model: CmsModel;
|
|
1920
2015
|
}
|
|
1921
2016
|
export interface OnEntryRevisionDeleteErrorTopicParams {
|
|
1922
2017
|
error: Error;
|
|
1923
2018
|
entry: CmsEntry;
|
|
1924
|
-
model:
|
|
2019
|
+
model: CmsModel;
|
|
1925
2020
|
}
|
|
1926
2021
|
export interface OnEntryBeforeGetTopicParams {
|
|
1927
|
-
model:
|
|
2022
|
+
model: CmsModel;
|
|
1928
2023
|
where: CmsEntryListWhere;
|
|
1929
2024
|
}
|
|
1930
2025
|
export interface EntryBeforeListTopicParams {
|
|
1931
2026
|
where: CmsEntryListWhere;
|
|
1932
|
-
model:
|
|
2027
|
+
model: CmsModel;
|
|
1933
2028
|
}
|
|
1934
2029
|
/**
|
|
1935
2030
|
* @category Context
|
|
@@ -2117,6 +2212,9 @@ export interface CmsEntryContext {
|
|
|
2117
2212
|
onEntryBeforePublish: Topic<OnEntryBeforePublishTopicParams>;
|
|
2118
2213
|
onEntryAfterPublish: Topic<OnEntryAfterPublishTopicParams>;
|
|
2119
2214
|
onEntryPublishError: Topic<OnEntryPublishErrorTopicParams>;
|
|
2215
|
+
onEntryBeforeRepublish: Topic<OnEntryBeforeRepublishTopicParams>;
|
|
2216
|
+
onEntryAfterRepublish: Topic<OnEntryAfterRepublishTopicParams>;
|
|
2217
|
+
onEntryRepublishError: Topic<OnEntryRepublishErrorTopicParams>;
|
|
2120
2218
|
onEntryBeforeUnpublish: Topic<OnEntryBeforeUnpublishTopicParams>;
|
|
2121
2219
|
onEntryAfterUnpublish: Topic<OnEntryAfterUnpublishTopicParams>;
|
|
2122
2220
|
onEntryUnpublishError: Topic<OnEntryUnpublishErrorTopicParams>;
|
|
@@ -2321,7 +2419,7 @@ export interface CmsEntryStorageOperationsListParams {
|
|
|
2321
2419
|
sort?: CmsEntryListSort;
|
|
2322
2420
|
search?: string;
|
|
2323
2421
|
fields?: string[];
|
|
2324
|
-
limit
|
|
2422
|
+
limit: number;
|
|
2325
2423
|
after?: string | null;
|
|
2326
2424
|
}
|
|
2327
2425
|
export interface CmsEntryStorageOperationsCreateParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
@@ -2455,71 +2553,71 @@ export interface CmsEntryStorageOperations<T extends CmsStorageEntry = CmsStorag
|
|
|
2455
2553
|
/**
|
|
2456
2554
|
* Get all the entries of the ids.
|
|
2457
2555
|
*/
|
|
2458
|
-
getByIds: (model:
|
|
2556
|
+
getByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetByIdsParams) => Promise<T[]>;
|
|
2459
2557
|
/**
|
|
2460
2558
|
* Get all the published entries of the ids.
|
|
2461
2559
|
*/
|
|
2462
|
-
getPublishedByIds: (model:
|
|
2560
|
+
getPublishedByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetPublishedByIdsParams) => Promise<T[]>;
|
|
2463
2561
|
/**
|
|
2464
2562
|
* Get all the latest entries of the ids.
|
|
2465
2563
|
*/
|
|
2466
|
-
getLatestByIds: (model:
|
|
2564
|
+
getLatestByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetLatestByIdsParams) => Promise<T[]>;
|
|
2467
2565
|
/**
|
|
2468
2566
|
* Get all revisions of the given entry id.
|
|
2469
2567
|
*/
|
|
2470
|
-
getRevisions: (model:
|
|
2568
|
+
getRevisions: (model: CmsModel, params: CmsEntryStorageOperationsGetRevisionsParams) => Promise<T[]>;
|
|
2471
2569
|
/**
|
|
2472
2570
|
* Get the entry by the given revision id.
|
|
2473
2571
|
*/
|
|
2474
|
-
getRevisionById: (model:
|
|
2572
|
+
getRevisionById: (model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams) => Promise<T | null>;
|
|
2475
2573
|
/**
|
|
2476
2574
|
* Get the published entry by given entryId.
|
|
2477
2575
|
*/
|
|
2478
|
-
getPublishedRevisionByEntryId: (model:
|
|
2576
|
+
getPublishedRevisionByEntryId: (model: CmsModel, params: CmsEntryStorageOperationsGetPublishedRevisionParams) => Promise<T | null>;
|
|
2479
2577
|
/**
|
|
2480
2578
|
* Get the latest entry by given entryId.
|
|
2481
2579
|
*/
|
|
2482
|
-
getLatestRevisionByEntryId: (model:
|
|
2580
|
+
getLatestRevisionByEntryId: (model: CmsModel, params: CmsEntryStorageOperationsGetLatestRevisionParams) => Promise<T | null>;
|
|
2483
2581
|
/**
|
|
2484
2582
|
* Get the revision of the entry before given one.
|
|
2485
2583
|
*/
|
|
2486
|
-
getPreviousRevision: (model:
|
|
2584
|
+
getPreviousRevision: (model: CmsModel, params: CmsEntryStorageOperationsGetPreviousRevisionParams) => Promise<T | null>;
|
|
2487
2585
|
/**
|
|
2488
2586
|
* Gets entry by given params.
|
|
2489
2587
|
*/
|
|
2490
|
-
get: (model:
|
|
2588
|
+
get: (model: CmsModel, params: CmsEntryStorageOperationsGetParams) => Promise<T | null>;
|
|
2491
2589
|
/**
|
|
2492
2590
|
* List all entries. Filterable via params.
|
|
2493
2591
|
*/
|
|
2494
|
-
list: (model:
|
|
2592
|
+
list: (model: CmsModel, params: CmsEntryStorageOperationsListParams) => Promise<CmsEntryStorageOperationsListResponse<T>>;
|
|
2495
2593
|
/**
|
|
2496
2594
|
* Create a new entry.
|
|
2497
2595
|
*/
|
|
2498
|
-
create: (model:
|
|
2596
|
+
create: (model: CmsModel, params: CmsEntryStorageOperationsCreateParams<T>) => Promise<T>;
|
|
2499
2597
|
/**
|
|
2500
2598
|
* Create a new entry from existing one.
|
|
2501
2599
|
*/
|
|
2502
|
-
createRevisionFrom: (model:
|
|
2600
|
+
createRevisionFrom: (model: CmsModel, params: CmsEntryStorageOperationsCreateRevisionFromParams<T>) => Promise<T>;
|
|
2503
2601
|
/**
|
|
2504
2602
|
* Update existing entry.
|
|
2505
2603
|
*/
|
|
2506
|
-
update: (model:
|
|
2604
|
+
update: (model: CmsModel, params: CmsEntryStorageOperationsUpdateParams<T>) => Promise<T>;
|
|
2507
2605
|
/**
|
|
2508
2606
|
* Delete the entry revision.
|
|
2509
2607
|
*/
|
|
2510
|
-
deleteRevision: (model:
|
|
2608
|
+
deleteRevision: (model: CmsModel, params: CmsEntryStorageOperationsDeleteRevisionParams<T>) => Promise<void>;
|
|
2511
2609
|
/**
|
|
2512
2610
|
* Delete the entry.
|
|
2513
2611
|
*/
|
|
2514
|
-
delete: (model:
|
|
2612
|
+
delete: (model: CmsModel, params: CmsEntryStorageOperationsDeleteParams) => Promise<void>;
|
|
2515
2613
|
/**
|
|
2516
2614
|
* Publish the entry.
|
|
2517
2615
|
*/
|
|
2518
|
-
publish: (model:
|
|
2616
|
+
publish: (model: CmsModel, params: CmsEntryStorageOperationsPublishParams<T>) => Promise<T>;
|
|
2519
2617
|
/**
|
|
2520
2618
|
* Unpublish the entry.
|
|
2521
2619
|
*/
|
|
2522
|
-
unpublish: (model:
|
|
2620
|
+
unpublish: (model: CmsModel, params: CmsEntryStorageOperationsUnpublishParams<T>) => Promise<T>;
|
|
2523
2621
|
}
|
|
2524
2622
|
export declare enum CONTENT_ENTRY_STATUS {
|
|
2525
2623
|
DRAFT = "draft",
|
|
@@ -2591,11 +2689,7 @@ export interface HeadlessCmsStorageOperations<C = CmsContext> {
|
|
|
2591
2689
|
/**
|
|
2592
2690
|
* Either attach something from the storage operations or run something in it.
|
|
2593
2691
|
*/
|
|
2594
|
-
beforeInit
|
|
2692
|
+
beforeInit: (context: C) => Promise<void>;
|
|
2595
2693
|
init?: (context: C) => Promise<void>;
|
|
2596
|
-
/**
|
|
2597
|
-
* An upgrade to run if necessary.
|
|
2598
|
-
*/
|
|
2599
|
-
upgrade?: UpgradePlugin | null;
|
|
2600
2694
|
}
|
|
2601
2695
|
export {};
|