@webiny/api-headless-cms 0.0.0-unstable.bca7b3e350 → 0.0.0-unstable.c2780f51fe
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 -43
- package/context.js.map +1 -1
- package/crud/contentEntry/markLockedFields.d.ts +1 -1
- package/crud/contentEntry/markLockedFields.js +3 -0
- package/crud/contentEntry/markLockedFields.js.map +1 -1
- package/crud/contentEntry.crud.d.ts +5 -2
- package/crud/contentEntry.crud.js +848 -830
- package/crud/contentEntry.crud.js.map +1 -1
- package/crud/contentModel/beforeCreate.js +39 -76
- package/crud/contentModel/beforeCreate.js.map +1 -1
- package/crud/contentModel/beforeDelete.d.ts +1 -1
- package/crud/contentModel/beforeDelete.js +1 -5
- package/crud/contentModel/beforeDelete.js.map +1 -1
- package/crud/contentModel/beforeUpdate.js +31 -3
- 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/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/systemFields.js.map +1 -1
- 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/validateModel.d.ts +1 -0
- package/crud/contentModel/validateModel.js.map +1 -1
- package/crud/contentModel/validateModelFields.d.ts +2 -1
- package/crud/contentModel/validateModelFields.js +19 -57
- package/crud/contentModel/validateModelFields.js.map +1 -1
- package/crud/contentModel/validation.d.ts +136 -62
- package/crud/contentModel/validation.js +61 -13
- package/crud/contentModel/validation.js.map +1 -1
- package/crud/contentModel.crud.js +346 -285
- package/crud/contentModel.crud.js.map +1 -1
- package/crud/contentModelGroup.crud.js +170 -142
- package/crud/contentModelGroup.crud.js.map +1 -1
- package/crud/settings.crud.d.ts +1 -1
- package/crud/settings.crud.js +5 -10
- package/crud/settings.crud.js.map +1 -1
- package/crud/system.crud.js +0 -60
- package/crud/system.crud.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.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.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 -145
- 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/schema/baseContentSchema.js +1 -7
- package/graphql/schema/baseContentSchema.js.map +1 -1
- package/graphql/schema/contentEntries.js +90 -53
- package/graphql/schema/contentEntries.js.map +1 -1
- package/graphql/schema/contentModelGroups.js +7 -7
- package/graphql/schema/contentModelGroups.js.map +1 -1
- package/graphql/schema/contentModels.js +23 -4
- package/graphql/schema/contentModels.js.map +1 -1
- package/graphql/schema/createManageResolvers.d.ts +1 -1
- package/graphql/schema/createManageResolvers.js +33 -17
- package/graphql/schema/createManageResolvers.js.map +1 -1
- package/graphql/schema/createManageSDL.d.ts +1 -0
- package/graphql/schema/createManageSDL.js +55 -49
- package/graphql/schema/createManageSDL.js.map +1 -1
- package/graphql/schema/createPreviewResolvers.js +3 -7
- package/graphql/schema/createPreviewResolvers.js.map +1 -1
- package/graphql/schema/createReadResolvers.js +4 -8
- package/graphql/schema/createReadResolvers.js.map +1 -1
- package/graphql/schema/createReadSDL.d.ts +1 -0
- package/graphql/schema/createReadSDL.js +24 -22
- package/graphql/schema/createReadSDL.js.map +1 -1
- package/graphql/schema/resolvers/commonFieldResolvers.d.ts +3 -2
- package/graphql/schema/resolvers/commonFieldResolvers.js +2 -1
- package/graphql/schema/resolvers/commonFieldResolvers.js.map +1 -1
- package/graphql/schema/schemaPlugins.js +12 -12
- package/graphql/schema/schemaPlugins.js.map +1 -1
- package/graphql/system.js +0 -16
- package/graphql/system.js.map +1 -1
- package/graphqlFields/dynamicZone/dynamicZoneField.d.ts +1 -1
- package/graphqlFields/dynamicZone/dynamicZoneField.js +24 -4
- package/graphqlFields/dynamicZone/dynamicZoneField.js.map +1 -1
- package/graphqlFields/object.js +21 -2
- package/graphqlFields/object.js.map +1 -1
- package/graphqlFields/ref.js +42 -14
- package/graphqlFields/ref.js.map +1 -1
- package/index.d.ts +3 -1
- package/index.js +25 -2
- package/index.js.map +1 -1
- package/package.json +22 -23
- package/plugins/CmsModelPlugin.d.ts +19 -3
- package/plugins/CmsModelPlugin.js +28 -2
- package/plugins/CmsModelPlugin.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/index.d.ts +1 -0
- package/plugins/index.js +11 -0
- package/plugins/index.js.map +1 -1
- package/types.d.ts +118 -66
- package/types.js +1 -1
- package/types.js.map +1 -1
- package/upgrades/5.33.0/index.js +26 -3
- package/upgrades/5.33.0/index.js.map +1 -1
- package/upgrades/index.js +3 -0
- package/upgrades/index.js.map +1 -1
- package/utils/converters/valueKeyStorageConverter.d.ts +1 -5
- package/utils/converters/valueKeyStorageConverter.js +21 -18
- package/utils/converters/valueKeyStorageConverter.js.map +1 -1
- package/utils/createTypeFromFields.d.ts +1 -0
- package/utils/createTypeFromFields.js +7 -5
- package/utils/createTypeFromFields.js.map +1 -1
- package/utils/createTypeName.d.ts +0 -2
- package/utils/createTypeName.js +2 -10
- package/utils/createTypeName.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/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.map +1 -1
- package/utils/pluralizedTypeName.js +6 -0
- package/utils/pluralizedTypeName.js.map +1 -1
- package/utils/renderFields.d.ts +2 -1
- package/utils/renderFields.js +8 -1
- package/utils/renderFields.js.map +1 -1
- package/utils/renderInputFields.d.ts +2 -1
- package/utils/renderInputFields.js +4 -0
- package/utils/renderInputFields.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
|
*/
|
|
@@ -138,15 +141,13 @@ export interface CmsModelField {
|
|
|
138
141
|
type: "boolean" | "datetime" | "file" | "long-text" | "number" | "object" | "ref" | "rich-text" | "text" | "dynamicZone" | string;
|
|
139
142
|
/**
|
|
140
143
|
* A unique storage ID for storing actual values.
|
|
141
|
-
* Must in form of a-zA-Z0-9@a-zA-Z0-9
|
|
144
|
+
* Must in form of a-zA-Z0-9@a-zA-Z0-9
|
|
142
145
|
*
|
|
143
146
|
* This is an auto-generated value: uses `id` and `type`
|
|
144
147
|
*
|
|
145
148
|
* This is used as path for the entry value.
|
|
146
|
-
*
|
|
147
|
-
* @internal
|
|
148
149
|
*/
|
|
149
|
-
storageId: string;
|
|
150
|
+
storageId: `${string}@${string}` | string;
|
|
150
151
|
/**
|
|
151
152
|
* Field identifier for the model field that will be available to the outside world.
|
|
152
153
|
* `storageId` is used as path (or column) to store the data.
|
|
@@ -377,7 +378,7 @@ export interface CmsModelGroup {
|
|
|
377
378
|
name: string;
|
|
378
379
|
}
|
|
379
380
|
/**
|
|
380
|
-
*
|
|
381
|
+
* Base CMS Model. Should not be exported and used outside of this package.
|
|
381
382
|
*
|
|
382
383
|
* @category Database model
|
|
383
384
|
* @category CmsModel
|
|
@@ -391,6 +392,24 @@ export interface CmsModel {
|
|
|
391
392
|
* Unique ID for the content model. Created from name if not defined by user.
|
|
392
393
|
*/
|
|
393
394
|
modelId: string;
|
|
395
|
+
/**
|
|
396
|
+
* Name of the content model in singular form to be used in the API.
|
|
397
|
+
* example:
|
|
398
|
+
* - Article
|
|
399
|
+
* - Fruit
|
|
400
|
+
* - Vegetable
|
|
401
|
+
* - Car
|
|
402
|
+
*/
|
|
403
|
+
singularApiName: string;
|
|
404
|
+
/**
|
|
405
|
+
* Name of the content model in plural form to be used in the API.
|
|
406
|
+
* example:
|
|
407
|
+
* - Articles
|
|
408
|
+
* - Fruits
|
|
409
|
+
* - Vegetables
|
|
410
|
+
* - Cars
|
|
411
|
+
*/
|
|
412
|
+
pluralApiName: string;
|
|
394
413
|
/**
|
|
395
414
|
* Model tenant.
|
|
396
415
|
*/
|
|
@@ -403,10 +422,14 @@ export interface CmsModel {
|
|
|
403
422
|
* Cms Group reference object.
|
|
404
423
|
*/
|
|
405
424
|
group: CmsModelGroup;
|
|
425
|
+
/**
|
|
426
|
+
* Icon for the content model.
|
|
427
|
+
*/
|
|
428
|
+
icon?: string | null;
|
|
406
429
|
/**
|
|
407
430
|
* Description for the content model.
|
|
408
431
|
*/
|
|
409
|
-
description: string;
|
|
432
|
+
description: string | null;
|
|
410
433
|
/**
|
|
411
434
|
* Date created
|
|
412
435
|
*/
|
|
@@ -418,7 +441,7 @@ export interface CmsModel {
|
|
|
418
441
|
/**
|
|
419
442
|
* CreatedBy object wrapper. Contains id, name and type of the user.
|
|
420
443
|
*/
|
|
421
|
-
createdBy?:
|
|
444
|
+
createdBy?: CmsIdentity;
|
|
422
445
|
/**
|
|
423
446
|
* List of fields defining entry values.
|
|
424
447
|
*/
|
|
@@ -447,6 +470,16 @@ export interface CmsModel {
|
|
|
447
470
|
* It is picked as first available text field. Or user can select own field.
|
|
448
471
|
*/
|
|
449
472
|
titleFieldId: string;
|
|
473
|
+
/**
|
|
474
|
+
* The field which is displayed as the description one.
|
|
475
|
+
* Only way this is null or undefined is that there are no long-text fields to be set as description.
|
|
476
|
+
*/
|
|
477
|
+
descriptionFieldId?: string | null;
|
|
478
|
+
/**
|
|
479
|
+
* The field which is displayed as the image.
|
|
480
|
+
* Only way this is null or undefined is that there are no file fields, with images only set, to be set as image.
|
|
481
|
+
*/
|
|
482
|
+
imageFieldId?: string | null;
|
|
450
483
|
/**
|
|
451
484
|
* The version of Webiny which this record was stored with.
|
|
452
485
|
*/
|
|
@@ -619,6 +652,7 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
619
652
|
* ```
|
|
620
653
|
*/
|
|
621
654
|
createTypeField(params: {
|
|
655
|
+
models: CmsModel[];
|
|
622
656
|
model: CmsModel;
|
|
623
657
|
field: TField;
|
|
624
658
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
@@ -719,6 +753,7 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
719
753
|
* ```
|
|
720
754
|
*/
|
|
721
755
|
createTypeField: (params: {
|
|
756
|
+
models: CmsModel[];
|
|
722
757
|
model: CmsModel;
|
|
723
758
|
field: TField;
|
|
724
759
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
@@ -739,6 +774,7 @@ export interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = Cms
|
|
|
739
774
|
* ```
|
|
740
775
|
*/
|
|
741
776
|
createInputField: (params: {
|
|
777
|
+
models: CmsModel[];
|
|
742
778
|
model: CmsModel;
|
|
743
779
|
field: TField;
|
|
744
780
|
fieldTypePlugins: CmsFieldTypePlugins;
|
|
@@ -806,7 +842,7 @@ export interface CmsFieldTypePlugins {
|
|
|
806
842
|
*
|
|
807
843
|
* @category General
|
|
808
844
|
*/
|
|
809
|
-
export interface
|
|
845
|
+
export interface CmsIdentity {
|
|
810
846
|
/**
|
|
811
847
|
* ID if the user.
|
|
812
848
|
*/
|
|
@@ -856,7 +892,7 @@ export interface CmsSettingsContext {
|
|
|
856
892
|
/**
|
|
857
893
|
* Get the datetime when content model last changed.
|
|
858
894
|
*/
|
|
859
|
-
getModelLastChange: () => Promise<Date>;
|
|
895
|
+
getModelLastChange: () => Promise<Date | null>;
|
|
860
896
|
}
|
|
861
897
|
export interface OnSystemBeforeInstallTopicParams {
|
|
862
898
|
tenant: string;
|
|
@@ -874,9 +910,7 @@ export interface OnSystemInstallErrorTopicParams {
|
|
|
874
910
|
export declare type CmsSystemContext = {
|
|
875
911
|
getSystemVersion: () => Promise<string | null>;
|
|
876
912
|
setSystemVersion: (version: string) => Promise<void>;
|
|
877
|
-
getReadAPIKey(): Promise<string | null>;
|
|
878
913
|
installSystem: () => Promise<void>;
|
|
879
|
-
upgradeSystem: (version: string) => Promise<boolean>;
|
|
880
914
|
/**
|
|
881
915
|
* Lifecycle events - deprecated
|
|
882
916
|
*/
|
|
@@ -957,7 +991,7 @@ export interface CmsGroup {
|
|
|
957
991
|
/**
|
|
958
992
|
* CreatedBy reference object.
|
|
959
993
|
*/
|
|
960
|
-
createdBy?:
|
|
994
|
+
createdBy?: CmsIdentity;
|
|
961
995
|
/**
|
|
962
996
|
* Date group was created on.
|
|
963
997
|
*/
|
|
@@ -1159,6 +1193,14 @@ export interface CmsModelCreateInput {
|
|
|
1159
1193
|
* Name of the content model.
|
|
1160
1194
|
*/
|
|
1161
1195
|
name: string;
|
|
1196
|
+
/**
|
|
1197
|
+
* Singular name of the content model to be used in the API.
|
|
1198
|
+
*/
|
|
1199
|
+
singularApiName: string;
|
|
1200
|
+
/**
|
|
1201
|
+
* Plural name of the content model to be used in the API.
|
|
1202
|
+
*/
|
|
1203
|
+
pluralApiName: string;
|
|
1162
1204
|
/**
|
|
1163
1205
|
* Unique ID of the content model. Created from name if not sent by the user. Cannot be changed.
|
|
1164
1206
|
*/
|
|
@@ -1191,10 +1233,11 @@ export interface CmsModelCreateInput {
|
|
|
1191
1233
|
*/
|
|
1192
1234
|
tags?: string[];
|
|
1193
1235
|
/**
|
|
1194
|
-
*
|
|
1195
|
-
* It is picked as first available text field. Or user can select own field.
|
|
1236
|
+
* Fields fieldId which are picked to represent the CMS entry.
|
|
1196
1237
|
*/
|
|
1197
|
-
titleFieldId?: string;
|
|
1238
|
+
titleFieldId?: string | null;
|
|
1239
|
+
descriptionFieldId?: string | null;
|
|
1240
|
+
imageFieldId?: string | null;
|
|
1198
1241
|
}
|
|
1199
1242
|
/**
|
|
1200
1243
|
* A GraphQL `params.data` parameter received when creating content model from existing model.
|
|
@@ -1266,7 +1309,7 @@ export interface CmsModelFieldInput {
|
|
|
1266
1309
|
/**
|
|
1267
1310
|
* @see CmsModelField.listValidation
|
|
1268
1311
|
*/
|
|
1269
|
-
listValidation
|
|
1312
|
+
listValidation?: CmsModelFieldValidation[];
|
|
1270
1313
|
/**
|
|
1271
1314
|
* User defined settings.
|
|
1272
1315
|
*/
|
|
@@ -1283,6 +1326,14 @@ export interface CmsModelUpdateInput {
|
|
|
1283
1326
|
* A new content model name.
|
|
1284
1327
|
*/
|
|
1285
1328
|
name?: string;
|
|
1329
|
+
/**
|
|
1330
|
+
* A new singular name of the content model to be used in the API.
|
|
1331
|
+
*/
|
|
1332
|
+
singularApiName?: string;
|
|
1333
|
+
/**
|
|
1334
|
+
* A new plural name of the content model to be used in the API.
|
|
1335
|
+
*/
|
|
1336
|
+
pluralApiName?: string;
|
|
1286
1337
|
/**
|
|
1287
1338
|
* A group we want to move the model to.
|
|
1288
1339
|
*/
|
|
@@ -1307,10 +1358,11 @@ export interface CmsModelUpdateInput {
|
|
|
1307
1358
|
*/
|
|
1308
1359
|
layout: string[][];
|
|
1309
1360
|
/**
|
|
1310
|
-
*
|
|
1311
|
-
* It is picked as first available text field. Or user can select own field.
|
|
1361
|
+
* Fields fieldId which are picked to represent the CMS entry.
|
|
1312
1362
|
*/
|
|
1313
|
-
titleFieldId?: string;
|
|
1363
|
+
titleFieldId?: string | null;
|
|
1364
|
+
descriptionFieldId?: string | null;
|
|
1365
|
+
imageFieldId?: string | null;
|
|
1314
1366
|
}
|
|
1315
1367
|
/**
|
|
1316
1368
|
* A plugin to load a CmsModelManager.
|
|
@@ -1374,11 +1426,15 @@ export interface CmsEntry<T = CmsEntryValues> {
|
|
|
1374
1426
|
/**
|
|
1375
1427
|
* CreatedBy object reference.
|
|
1376
1428
|
*/
|
|
1377
|
-
createdBy:
|
|
1429
|
+
createdBy: CmsIdentity;
|
|
1378
1430
|
/**
|
|
1379
1431
|
* OwnedBy object reference. Can be different from CreatedBy.
|
|
1380
1432
|
*/
|
|
1381
|
-
ownedBy:
|
|
1433
|
+
ownedBy: CmsIdentity;
|
|
1434
|
+
/**
|
|
1435
|
+
* ModifiedBy object reference. Last person who modified the entry.
|
|
1436
|
+
*/
|
|
1437
|
+
modifiedBy?: CmsIdentity | null;
|
|
1382
1438
|
/**
|
|
1383
1439
|
* A string of Date.toISOString() type.
|
|
1384
1440
|
* Populated on creation.
|
|
@@ -1824,12 +1880,12 @@ export interface CmsEntryMeta {
|
|
|
1824
1880
|
export interface OnEntryBeforeCreateTopicParams {
|
|
1825
1881
|
input: CreateCmsEntryInput;
|
|
1826
1882
|
entry: CmsEntry;
|
|
1827
|
-
model:
|
|
1883
|
+
model: CmsModel;
|
|
1828
1884
|
}
|
|
1829
1885
|
export interface OnEntryAfterCreateTopicParams {
|
|
1830
1886
|
input: CreateCmsEntryInput;
|
|
1831
1887
|
entry: CmsEntry;
|
|
1832
|
-
model:
|
|
1888
|
+
model: CmsModel;
|
|
1833
1889
|
storageEntry: CmsEntry;
|
|
1834
1890
|
}
|
|
1835
1891
|
export interface OnEntryCreateErrorTopicParams {
|
|
@@ -1845,13 +1901,13 @@ export interface OnEntryRevisionBeforeCreateTopicParams {
|
|
|
1845
1901
|
input: CreateFromCmsEntryInput;
|
|
1846
1902
|
entry: CmsEntry;
|
|
1847
1903
|
original: CmsEntry;
|
|
1848
|
-
model:
|
|
1904
|
+
model: CmsModel;
|
|
1849
1905
|
}
|
|
1850
1906
|
export interface OnEntryRevisionAfterCreateTopicParams {
|
|
1851
1907
|
input: CreateFromCmsEntryInput;
|
|
1852
1908
|
entry: CmsEntry;
|
|
1853
1909
|
original: CmsEntry;
|
|
1854
|
-
model:
|
|
1910
|
+
model: CmsModel;
|
|
1855
1911
|
storageEntry: CmsEntry;
|
|
1856
1912
|
}
|
|
1857
1913
|
export interface OnEntryCreateRevisionErrorTopicParams {
|
|
@@ -1868,13 +1924,13 @@ export interface OnEntryBeforeUpdateTopicParams {
|
|
|
1868
1924
|
input: UpdateCmsEntryInput;
|
|
1869
1925
|
original: CmsEntry;
|
|
1870
1926
|
entry: CmsEntry;
|
|
1871
|
-
model:
|
|
1927
|
+
model: CmsModel;
|
|
1872
1928
|
}
|
|
1873
1929
|
export interface OnEntryAfterUpdateTopicParams {
|
|
1874
1930
|
input: UpdateCmsEntryInput;
|
|
1875
1931
|
original: CmsEntry;
|
|
1876
1932
|
entry: CmsEntry;
|
|
1877
|
-
model:
|
|
1933
|
+
model: CmsModel;
|
|
1878
1934
|
storageEntry: CmsEntry;
|
|
1879
1935
|
}
|
|
1880
1936
|
export interface OnEntryUpdateErrorTopicParams {
|
|
@@ -1888,45 +1944,45 @@ export interface OnEntryUpdateErrorTopicParams {
|
|
|
1888
1944
|
*/
|
|
1889
1945
|
export interface OnEntryBeforePublishTopicParams {
|
|
1890
1946
|
entry: CmsEntry;
|
|
1891
|
-
model:
|
|
1947
|
+
model: CmsModel;
|
|
1892
1948
|
}
|
|
1893
1949
|
export interface OnEntryAfterPublishTopicParams {
|
|
1894
1950
|
entry: CmsEntry;
|
|
1895
|
-
model:
|
|
1951
|
+
model: CmsModel;
|
|
1896
1952
|
storageEntry: CmsEntry;
|
|
1897
1953
|
}
|
|
1898
1954
|
export interface OnEntryPublishErrorTopicParams {
|
|
1899
1955
|
error: Error;
|
|
1900
1956
|
entry: CmsEntry;
|
|
1901
|
-
model:
|
|
1957
|
+
model: CmsModel;
|
|
1902
1958
|
}
|
|
1903
1959
|
/**
|
|
1904
1960
|
* Republish
|
|
1905
1961
|
*/
|
|
1906
1962
|
export interface OnEntryBeforeRepublishTopicParams {
|
|
1907
1963
|
entry: CmsEntry;
|
|
1908
|
-
model:
|
|
1964
|
+
model: CmsModel;
|
|
1909
1965
|
}
|
|
1910
1966
|
export interface OnEntryAfterRepublishTopicParams {
|
|
1911
1967
|
entry: CmsEntry;
|
|
1912
|
-
model:
|
|
1968
|
+
model: CmsModel;
|
|
1913
1969
|
storageEntry: CmsEntry;
|
|
1914
1970
|
}
|
|
1915
1971
|
export interface OnEntryRepublishErrorTopicParams {
|
|
1916
1972
|
error: Error;
|
|
1917
1973
|
entry: CmsEntry;
|
|
1918
|
-
model:
|
|
1974
|
+
model: CmsModel;
|
|
1919
1975
|
}
|
|
1920
1976
|
/**
|
|
1921
1977
|
* Unpublish
|
|
1922
1978
|
*/
|
|
1923
1979
|
export interface OnEntryBeforeUnpublishTopicParams {
|
|
1924
1980
|
entry: CmsEntry;
|
|
1925
|
-
model:
|
|
1981
|
+
model: CmsModel;
|
|
1926
1982
|
}
|
|
1927
1983
|
export interface OnEntryAfterUnpublishTopicParams {
|
|
1928
1984
|
entry: CmsEntry;
|
|
1929
|
-
model:
|
|
1985
|
+
model: CmsModel;
|
|
1930
1986
|
storageEntry: CmsEntry;
|
|
1931
1987
|
}
|
|
1932
1988
|
export interface OnEntryUnpublishErrorTopicParams {
|
|
@@ -1936,37 +1992,37 @@ export interface OnEntryUnpublishErrorTopicParams {
|
|
|
1936
1992
|
}
|
|
1937
1993
|
export interface OnEntryBeforeDeleteTopicParams {
|
|
1938
1994
|
entry: CmsEntry;
|
|
1939
|
-
model:
|
|
1995
|
+
model: CmsModel;
|
|
1940
1996
|
}
|
|
1941
1997
|
export interface OnEntryAfterDeleteTopicParams {
|
|
1942
1998
|
entry: CmsEntry;
|
|
1943
|
-
model:
|
|
1999
|
+
model: CmsModel;
|
|
1944
2000
|
}
|
|
1945
2001
|
export interface OnEntryDeleteErrorTopicParams {
|
|
1946
2002
|
error: Error;
|
|
1947
2003
|
entry: CmsEntry;
|
|
1948
|
-
model:
|
|
2004
|
+
model: CmsModel;
|
|
1949
2005
|
}
|
|
1950
2006
|
export interface OnEntryRevisionBeforeDeleteTopicParams {
|
|
1951
2007
|
entry: CmsEntry;
|
|
1952
|
-
model:
|
|
2008
|
+
model: CmsModel;
|
|
1953
2009
|
}
|
|
1954
2010
|
export interface OnEntryRevisionAfterDeleteTopicParams {
|
|
1955
2011
|
entry: CmsEntry;
|
|
1956
|
-
model:
|
|
2012
|
+
model: CmsModel;
|
|
1957
2013
|
}
|
|
1958
2014
|
export interface OnEntryRevisionDeleteErrorTopicParams {
|
|
1959
2015
|
error: Error;
|
|
1960
2016
|
entry: CmsEntry;
|
|
1961
|
-
model:
|
|
2017
|
+
model: CmsModel;
|
|
1962
2018
|
}
|
|
1963
2019
|
export interface OnEntryBeforeGetTopicParams {
|
|
1964
|
-
model:
|
|
2020
|
+
model: CmsModel;
|
|
1965
2021
|
where: CmsEntryListWhere;
|
|
1966
2022
|
}
|
|
1967
2023
|
export interface EntryBeforeListTopicParams {
|
|
1968
2024
|
where: CmsEntryListWhere;
|
|
1969
|
-
model:
|
|
2025
|
+
model: CmsModel;
|
|
1970
2026
|
}
|
|
1971
2027
|
/**
|
|
1972
2028
|
* @category Context
|
|
@@ -2495,71 +2551,71 @@ export interface CmsEntryStorageOperations<T extends CmsStorageEntry = CmsStorag
|
|
|
2495
2551
|
/**
|
|
2496
2552
|
* Get all the entries of the ids.
|
|
2497
2553
|
*/
|
|
2498
|
-
getByIds: (model:
|
|
2554
|
+
getByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetByIdsParams) => Promise<T[]>;
|
|
2499
2555
|
/**
|
|
2500
2556
|
* Get all the published entries of the ids.
|
|
2501
2557
|
*/
|
|
2502
|
-
getPublishedByIds: (model:
|
|
2558
|
+
getPublishedByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetPublishedByIdsParams) => Promise<T[]>;
|
|
2503
2559
|
/**
|
|
2504
2560
|
* Get all the latest entries of the ids.
|
|
2505
2561
|
*/
|
|
2506
|
-
getLatestByIds: (model:
|
|
2562
|
+
getLatestByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetLatestByIdsParams) => Promise<T[]>;
|
|
2507
2563
|
/**
|
|
2508
2564
|
* Get all revisions of the given entry id.
|
|
2509
2565
|
*/
|
|
2510
|
-
getRevisions: (model:
|
|
2566
|
+
getRevisions: (model: CmsModel, params: CmsEntryStorageOperationsGetRevisionsParams) => Promise<T[]>;
|
|
2511
2567
|
/**
|
|
2512
2568
|
* Get the entry by the given revision id.
|
|
2513
2569
|
*/
|
|
2514
|
-
getRevisionById: (model:
|
|
2570
|
+
getRevisionById: (model: CmsModel, params: CmsEntryStorageOperationsGetRevisionParams) => Promise<T | null>;
|
|
2515
2571
|
/**
|
|
2516
2572
|
* Get the published entry by given entryId.
|
|
2517
2573
|
*/
|
|
2518
|
-
getPublishedRevisionByEntryId: (model:
|
|
2574
|
+
getPublishedRevisionByEntryId: (model: CmsModel, params: CmsEntryStorageOperationsGetPublishedRevisionParams) => Promise<T | null>;
|
|
2519
2575
|
/**
|
|
2520
2576
|
* Get the latest entry by given entryId.
|
|
2521
2577
|
*/
|
|
2522
|
-
getLatestRevisionByEntryId: (model:
|
|
2578
|
+
getLatestRevisionByEntryId: (model: CmsModel, params: CmsEntryStorageOperationsGetLatestRevisionParams) => Promise<T | null>;
|
|
2523
2579
|
/**
|
|
2524
2580
|
* Get the revision of the entry before given one.
|
|
2525
2581
|
*/
|
|
2526
|
-
getPreviousRevision: (model:
|
|
2582
|
+
getPreviousRevision: (model: CmsModel, params: CmsEntryStorageOperationsGetPreviousRevisionParams) => Promise<T | null>;
|
|
2527
2583
|
/**
|
|
2528
2584
|
* Gets entry by given params.
|
|
2529
2585
|
*/
|
|
2530
|
-
get: (model:
|
|
2586
|
+
get: (model: CmsModel, params: CmsEntryStorageOperationsGetParams) => Promise<T | null>;
|
|
2531
2587
|
/**
|
|
2532
2588
|
* List all entries. Filterable via params.
|
|
2533
2589
|
*/
|
|
2534
|
-
list: (model:
|
|
2590
|
+
list: (model: CmsModel, params: CmsEntryStorageOperationsListParams) => Promise<CmsEntryStorageOperationsListResponse<T>>;
|
|
2535
2591
|
/**
|
|
2536
2592
|
* Create a new entry.
|
|
2537
2593
|
*/
|
|
2538
|
-
create: (model:
|
|
2594
|
+
create: (model: CmsModel, params: CmsEntryStorageOperationsCreateParams<T>) => Promise<T>;
|
|
2539
2595
|
/**
|
|
2540
2596
|
* Create a new entry from existing one.
|
|
2541
2597
|
*/
|
|
2542
|
-
createRevisionFrom: (model:
|
|
2598
|
+
createRevisionFrom: (model: CmsModel, params: CmsEntryStorageOperationsCreateRevisionFromParams<T>) => Promise<T>;
|
|
2543
2599
|
/**
|
|
2544
2600
|
* Update existing entry.
|
|
2545
2601
|
*/
|
|
2546
|
-
update: (model:
|
|
2602
|
+
update: (model: CmsModel, params: CmsEntryStorageOperationsUpdateParams<T>) => Promise<T>;
|
|
2547
2603
|
/**
|
|
2548
2604
|
* Delete the entry revision.
|
|
2549
2605
|
*/
|
|
2550
|
-
deleteRevision: (model:
|
|
2606
|
+
deleteRevision: (model: CmsModel, params: CmsEntryStorageOperationsDeleteRevisionParams<T>) => Promise<void>;
|
|
2551
2607
|
/**
|
|
2552
2608
|
* Delete the entry.
|
|
2553
2609
|
*/
|
|
2554
|
-
delete: (model:
|
|
2610
|
+
delete: (model: CmsModel, params: CmsEntryStorageOperationsDeleteParams) => Promise<void>;
|
|
2555
2611
|
/**
|
|
2556
2612
|
* Publish the entry.
|
|
2557
2613
|
*/
|
|
2558
|
-
publish: (model:
|
|
2614
|
+
publish: (model: CmsModel, params: CmsEntryStorageOperationsPublishParams<T>) => Promise<T>;
|
|
2559
2615
|
/**
|
|
2560
2616
|
* Unpublish the entry.
|
|
2561
2617
|
*/
|
|
2562
|
-
unpublish: (model:
|
|
2618
|
+
unpublish: (model: CmsModel, params: CmsEntryStorageOperationsUnpublishParams<T>) => Promise<T>;
|
|
2563
2619
|
}
|
|
2564
2620
|
export declare enum CONTENT_ENTRY_STATUS {
|
|
2565
2621
|
DRAFT = "draft",
|
|
@@ -2631,11 +2687,7 @@ export interface HeadlessCmsStorageOperations<C = CmsContext> {
|
|
|
2631
2687
|
/**
|
|
2632
2688
|
* Either attach something from the storage operations or run something in it.
|
|
2633
2689
|
*/
|
|
2634
|
-
beforeInit
|
|
2690
|
+
beforeInit: (context: C) => Promise<void>;
|
|
2635
2691
|
init?: (context: C) => Promise<void>;
|
|
2636
|
-
/**
|
|
2637
|
-
* An upgrade to run if necessary.
|
|
2638
|
-
*/
|
|
2639
|
-
upgrade?: UpgradePlugin | null;
|
|
2640
2692
|
}
|
|
2641
2693
|
export {};
|
package/types.js
CHANGED