@webiny/api-headless-cms 0.0.0-unstable.5e7233243f → 0.0.0-unstable.615a930a68
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 +3 -7
- package/context.js.map +1 -1
- package/crud/contentEntry/afterDelete.d.ts +2 -2
- package/crud/contentEntry/afterDelete.js +2 -2
- package/crud/contentEntry/afterDelete.js.map +1 -1
- package/crud/contentEntry/beforeCreate.d.ts +2 -2
- package/crud/contentEntry/beforeCreate.js +2 -2
- package/crud/contentEntry/beforeCreate.js.map +1 -1
- package/crud/contentEntry/beforeUpdate.d.ts +2 -2
- package/crud/contentEntry/beforeUpdate.js +2 -2
- package/crud/contentEntry/beforeUpdate.js.map +1 -1
- package/crud/contentEntry/entryDataValidation.js +3 -7
- package/crud/contentEntry/entryDataValidation.js.map +1 -1
- package/crud/contentEntry/markLockedFields.js +6 -10
- package/crud/contentEntry/markLockedFields.js.map +1 -1
- package/crud/contentEntry/referenceFieldsMapping.js +3 -9
- package/crud/contentEntry/referenceFieldsMapping.js.map +1 -1
- package/crud/contentEntry/searchableFields.d.ts +9 -0
- package/crud/contentEntry/searchableFields.js +83 -0
- package/crud/contentEntry/searchableFields.js.map +1 -0
- package/crud/contentEntry.crud.d.ts +0 -2
- package/crud/contentEntry.crud.js +200 -269
- package/crud/contentEntry.crud.js.map +1 -1
- package/crud/contentModel/afterCreate.d.ts +3 -3
- package/crud/contentModel/afterCreate.js +5 -5
- package/crud/contentModel/afterCreate.js.map +1 -1
- package/crud/contentModel/afterCreateFrom.d.ts +3 -3
- package/crud/contentModel/afterCreateFrom.js +5 -5
- package/crud/contentModel/afterCreateFrom.js.map +1 -1
- package/crud/contentModel/afterDelete.d.ts +3 -3
- package/crud/contentModel/afterDelete.js +5 -5
- package/crud/contentModel/afterDelete.js.map +1 -1
- package/crud/contentModel/afterUpdate.d.ts +3 -3
- package/crud/contentModel/afterUpdate.js +5 -5
- package/crud/contentModel/afterUpdate.js.map +1 -1
- package/crud/contentModel/beforeCreate.d.ts +4 -4
- package/crud/contentModel/beforeCreate.js +10 -10
- package/crud/contentModel/beforeCreate.js.map +1 -1
- package/crud/contentModel/beforeDelete.d.ts +3 -3
- package/crud/contentModel/beforeDelete.js +6 -6
- package/crud/contentModel/beforeDelete.js.map +1 -1
- package/crud/contentModel/beforeUpdate.d.ts +3 -3
- package/crud/contentModel/beforeUpdate.js +5 -5
- package/crud/contentModel/beforeUpdate.js.map +1 -1
- package/crud/contentModel/validateModel.js +1 -1
- package/crud/contentModel/validateModelFields.js +3 -7
- package/crud/contentModel/validateModelFields.js.map +1 -1
- package/crud/contentModel.crud.js +84 -60
- package/crud/contentModel.crud.js.map +1 -1
- package/crud/contentModelGroup/beforeCreate.d.ts +2 -2
- package/crud/contentModelGroup/beforeCreate.js +3 -3
- package/crud/contentModelGroup/beforeCreate.js.map +1 -1
- package/crud/contentModelGroup/beforeDelete.d.ts +2 -2
- package/crud/contentModelGroup/beforeDelete.js +3 -3
- package/crud/contentModelGroup/beforeDelete.js.map +1 -1
- package/crud/contentModelGroup/beforeUpdate.d.ts +2 -2
- package/crud/contentModelGroup/beforeUpdate.js +2 -2
- package/crud/contentModelGroup/beforeUpdate.js.map +1 -1
- package/crud/contentModelGroup.crud.js +58 -38
- package/crud/contentModelGroup.crud.js.map +1 -1
- package/crud/index.js +3 -7
- package/crud/index.js.map +1 -1
- package/crud/settings.crud.js +3 -8
- package/crud/settings.crud.js.map +1 -1
- package/crud/system.crud.js +63 -51
- package/crud/system.crud.js.map +1 -1
- package/fieldConverters/CmsModelDefaultFieldConverterPlugin.js +1 -1
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.js +17 -19
- package/fieldConverters/CmsModelObjectFieldConverterPlugin.js.map +1 -1
- package/graphql/graphQLHandlerFactory.js +1 -1
- package/graphql/schema/baseContentSchema.js +5 -9
- package/graphql/schema/baseContentSchema.js.map +1 -1
- package/graphql/schema/contentEntries.js +1 -1
- package/graphql/schema/contentModels.js +19 -0
- package/graphql/schema/contentModels.js.map +1 -1
- package/graphql/schema/createFieldResolvers.js +4 -10
- package/graphql/schema/createFieldResolvers.js.map +1 -1
- package/graphql/schema/createManageResolvers.js +4 -18
- package/graphql/schema/createManageResolvers.js.map +1 -1
- package/graphql/schema/createManageSDL.js +6 -8
- 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 +3 -7
- package/graphql/schema/createReadResolvers.js.map +1 -1
- package/graphql/schema/createReadSDL.js +3 -1
- package/graphql/schema/createReadSDL.js.map +1 -1
- package/graphql/schema/resolvers/manage/resolveGet.js +5 -9
- package/graphql/schema/resolvers/manage/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/preview/resolveGet.js +3 -7
- package/graphql/schema/resolvers/preview/resolveGet.js.map +1 -1
- package/graphql/schema/resolvers/read/resolveGet.js +3 -7
- package/graphql/schema/resolvers/read/resolveGet.js.map +1 -1
- package/graphqlFields/number.js +4 -0
- package/graphqlFields/number.js.map +1 -1
- package/graphqlFields/object.js +102 -16
- package/graphqlFields/object.js.map +1 -1
- package/graphqlFields/ref.js +4 -8
- package/graphqlFields/ref.js.map +1 -1
- package/modelManager/DefaultCmsModelManager.d.ts +7 -7
- package/modelManager/DefaultCmsModelManager.js +1 -1
- package/package.json +27 -28
- package/parameters/header.js +1 -1
- package/parameters/manual.js +7 -8
- package/parameters/manual.js.map +1 -1
- package/parameters/path.js +1 -1
- package/plugins/CmsGroupPlugin.js +1 -1
- package/plugins/CmsModelFieldConverterPlugin.js +1 -1
- package/plugins/CmsModelPlugin.d.ts +6 -2
- package/plugins/CmsModelPlugin.js +18 -13
- package/plugins/CmsModelPlugin.js.map +1 -1
- package/plugins/CmsParametersPlugin.js +1 -1
- package/plugins/StorageTransformPlugin.d.ts +1 -1
- package/plugins/StorageTransformPlugin.js +1 -1
- package/plugins/StorageTransformPlugin.js.map +1 -1
- package/storage/object.js +3 -7
- package/storage/object.js.map +1 -1
- package/types.d.ts +276 -127
- package/types.js +0 -2
- package/types.js.map +1 -1
- package/upgrades/5.33.0/index.js +5 -9
- package/upgrades/5.33.0/index.js.map +1 -1
- package/utils/converters/Converter.js +1 -1
- package/utils/converters/ConverterCollection.d.ts +7 -0
- package/utils/converters/ConverterCollection.js +31 -7
- package/utils/converters/ConverterCollection.js.map +1 -1
- package/utils/converters/valueKeyStorageConverter.js +3 -7
- package/utils/converters/valueKeyStorageConverter.js.map +1 -1
- package/utils/createTypeName.js +1 -1
- package/utils/entryStorage.js +3 -7
- package/utils/entryStorage.js.map +1 -1
- package/utils/filterModelFields.js +5 -9
- package/utils/filterModelFields.js.map +1 -1
- package/utils/permissions.js +1 -5
- package/utils/permissions.js.map +1 -1
- package/utils/pluralizedTypeName.js +1 -1
- package/utils/renderListFilterFields.js +9 -1
- package/utils/renderListFilterFields.js.map +1 -1
- package/utils/toSlug.js +1 -1
- package/validators/unique.js +1 -1
package/types.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Plugin } from "@webiny/plugins/types";
|
|
2
2
|
import { I18NContext, I18NLocale } from "@webiny/api-i18n/types";
|
|
3
3
|
import { Context } from "@webiny/api/types";
|
|
4
|
-
import { TenancyContext } from "@webiny/api-tenancy/types";
|
|
5
4
|
import { GraphQLFieldResolver, GraphQLSchemaDefinition, Resolvers } from "@webiny/handler-graphql/types";
|
|
6
5
|
import { SecurityPermission } from "@webiny/api-security/types";
|
|
7
6
|
import { DbContext } from "@webiny/handler-db/types";
|
|
@@ -45,7 +44,7 @@ export interface HeadlessCms extends CmsSettingsContext, CmsSystemContext, CmsGr
|
|
|
45
44
|
*
|
|
46
45
|
* @category Context
|
|
47
46
|
*/
|
|
48
|
-
export interface CmsContext extends Context, DbContext, I18NContext, FileManagerContext
|
|
47
|
+
export interface CmsContext extends Context, DbContext, I18NContext, FileManagerContext {
|
|
49
48
|
cms: HeadlessCms;
|
|
50
49
|
}
|
|
51
50
|
interface CmsModelFieldPredefinedValuesValue {
|
|
@@ -550,6 +549,7 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
550
549
|
createListFilters?(params: {
|
|
551
550
|
model: CmsModel;
|
|
552
551
|
field: CmsModelField;
|
|
552
|
+
plugins: CmsFieldTypePlugins;
|
|
553
553
|
}): string;
|
|
554
554
|
/**
|
|
555
555
|
* Definition of the field type for GraphQL - be aware if multiple values is selected.
|
|
@@ -629,6 +629,7 @@ export interface CmsModelFieldToGraphQLPlugin extends Plugin {
|
|
|
629
629
|
createListFilters?: (params: {
|
|
630
630
|
model: CmsModel;
|
|
631
631
|
field: CmsModelField;
|
|
632
|
+
plugins: CmsFieldTypePlugins;
|
|
632
633
|
}) => string;
|
|
633
634
|
/**
|
|
634
635
|
* Manage API schema definitions for the field and resolvers for them. Probably similar to `read.createSchema`.
|
|
@@ -800,11 +801,16 @@ export interface CmsSettingsContext {
|
|
|
800
801
|
*/
|
|
801
802
|
getModelLastChange: () => Promise<Date>;
|
|
802
803
|
}
|
|
803
|
-
export interface
|
|
804
|
+
export interface OnSystemBeforeInstallTopicParams {
|
|
804
805
|
tenant: string;
|
|
805
806
|
locale: string;
|
|
806
807
|
}
|
|
807
|
-
export interface
|
|
808
|
+
export interface OnSystemAfterInstallTopicParams {
|
|
809
|
+
tenant: string;
|
|
810
|
+
locale: string;
|
|
811
|
+
}
|
|
812
|
+
export interface OnSystemInstallErrorTopicParams {
|
|
813
|
+
error: Error;
|
|
808
814
|
tenant: string;
|
|
809
815
|
locale: string;
|
|
810
816
|
}
|
|
@@ -815,10 +821,22 @@ export declare type CmsSystemContext = {
|
|
|
815
821
|
installSystem: () => Promise<void>;
|
|
816
822
|
upgradeSystem: (version: string) => Promise<boolean>;
|
|
817
823
|
/**
|
|
818
|
-
*
|
|
824
|
+
* Lifecycle events - deprecated
|
|
825
|
+
*/
|
|
826
|
+
/**
|
|
827
|
+
* @deprecated
|
|
828
|
+
*/
|
|
829
|
+
onBeforeSystemInstall: Topic<OnSystemBeforeInstallTopicParams>;
|
|
830
|
+
/**
|
|
831
|
+
* @deprecated
|
|
819
832
|
*/
|
|
820
|
-
|
|
821
|
-
|
|
833
|
+
onAfterSystemInstall: Topic<OnSystemAfterInstallTopicParams>;
|
|
834
|
+
/**
|
|
835
|
+
* Released in 5.34.0
|
|
836
|
+
*/
|
|
837
|
+
onSystemBeforeInstall: Topic<OnSystemBeforeInstallTopicParams>;
|
|
838
|
+
onSystemAfterInstall: Topic<OnSystemAfterInstallTopicParams>;
|
|
839
|
+
onSystemInstallError: Topic<OnSystemInstallErrorTopicParams>;
|
|
822
840
|
};
|
|
823
841
|
/**
|
|
824
842
|
* A GraphQL params.data parameter received when creating content model group.
|
|
@@ -919,21 +937,21 @@ export interface CmsGroupListParams {
|
|
|
919
937
|
* @category CmsGroup
|
|
920
938
|
* @category Topic
|
|
921
939
|
*/
|
|
922
|
-
export interface
|
|
940
|
+
export interface OnGroupBeforeCreateTopicParams {
|
|
923
941
|
group: CmsGroup;
|
|
924
942
|
}
|
|
925
943
|
/**
|
|
926
944
|
* @category CmsGroup
|
|
927
945
|
* @category Topic
|
|
928
946
|
*/
|
|
929
|
-
export interface
|
|
947
|
+
export interface OnGroupAfterCreateTopicParams {
|
|
930
948
|
group: CmsGroup;
|
|
931
949
|
}
|
|
932
950
|
/**
|
|
933
951
|
* @category CmsGroup
|
|
934
952
|
* @category Topic
|
|
935
953
|
*/
|
|
936
|
-
export interface
|
|
954
|
+
export interface OnGroupBeforeUpdateTopicParams {
|
|
937
955
|
original: CmsGroup;
|
|
938
956
|
group: CmsGroup;
|
|
939
957
|
}
|
|
@@ -941,7 +959,7 @@ export interface BeforeGroupUpdateTopicParams {
|
|
|
941
959
|
* @category CmsGroup
|
|
942
960
|
* @category Topic
|
|
943
961
|
*/
|
|
944
|
-
export interface
|
|
962
|
+
export interface OnGroupAfterUpdateTopicParams {
|
|
945
963
|
original: CmsGroup;
|
|
946
964
|
group: CmsGroup;
|
|
947
965
|
}
|
|
@@ -949,14 +967,14 @@ export interface AfterGroupUpdateTopicParams {
|
|
|
949
967
|
* @category CmsGroup
|
|
950
968
|
* @category Topic
|
|
951
969
|
*/
|
|
952
|
-
export interface
|
|
970
|
+
export interface OnGroupBeforeDeleteTopicParams {
|
|
953
971
|
group: CmsGroup;
|
|
954
972
|
}
|
|
955
973
|
/**
|
|
956
974
|
* @category CmsGroup
|
|
957
975
|
* @category Topic
|
|
958
976
|
*/
|
|
959
|
-
export interface
|
|
977
|
+
export interface OnGroupAfterDeleteTopicParams {
|
|
960
978
|
group: CmsGroup;
|
|
961
979
|
}
|
|
962
980
|
/**
|
|
@@ -991,14 +1009,41 @@ export interface CmsGroupContext {
|
|
|
991
1009
|
*/
|
|
992
1010
|
clearGroupsCache: () => void;
|
|
993
1011
|
/**
|
|
994
|
-
*
|
|
1012
|
+
* Lifecycle events - deprecated
|
|
1013
|
+
*/
|
|
1014
|
+
/**
|
|
1015
|
+
* @deprecated
|
|
1016
|
+
*/
|
|
1017
|
+
onBeforeGroupCreate: Topic<OnGroupBeforeCreateTopicParams>;
|
|
1018
|
+
/**
|
|
1019
|
+
* @deprecated
|
|
1020
|
+
*/
|
|
1021
|
+
onAfterGroupCreate: Topic<OnGroupAfterCreateTopicParams>;
|
|
1022
|
+
/**
|
|
1023
|
+
* @deprecated
|
|
995
1024
|
*/
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1025
|
+
onBeforeGroupUpdate: Topic<OnGroupBeforeUpdateTopicParams>;
|
|
1026
|
+
/**
|
|
1027
|
+
* @deprecated
|
|
1028
|
+
*/
|
|
1029
|
+
onAfterGroupUpdate: Topic<OnGroupAfterUpdateTopicParams>;
|
|
1030
|
+
/**
|
|
1031
|
+
* @deprecated
|
|
1032
|
+
*/
|
|
1033
|
+
onBeforeGroupDelete: Topic<OnGroupBeforeDeleteTopicParams>;
|
|
1034
|
+
/**
|
|
1035
|
+
* @deprecated
|
|
1036
|
+
*/
|
|
1037
|
+
onAfterGroupDelete: Topic<OnGroupAfterDeleteTopicParams>;
|
|
1038
|
+
/**
|
|
1039
|
+
* Lifecycle events released in 5.33.0
|
|
1040
|
+
*/
|
|
1041
|
+
onGroupBeforeCreate: Topic<OnGroupBeforeCreateTopicParams>;
|
|
1042
|
+
onGroupAfterCreate: Topic<OnGroupAfterCreateTopicParams>;
|
|
1043
|
+
onGroupBeforeUpdate: Topic<OnGroupBeforeUpdateTopicParams>;
|
|
1044
|
+
onGroupAfterUpdate: Topic<OnGroupAfterUpdateTopicParams>;
|
|
1045
|
+
onGroupBeforeDelete: Topic<OnGroupBeforeDeleteTopicParams>;
|
|
1046
|
+
onGroupAfterDelete: Topic<OnGroupAfterDeleteTopicParams>;
|
|
1002
1047
|
}
|
|
1003
1048
|
/**
|
|
1004
1049
|
* Definition for content model field validator.
|
|
@@ -1212,7 +1257,7 @@ export interface CmsEntryValues {
|
|
|
1212
1257
|
* @category Database model
|
|
1213
1258
|
* @category CmsEntry
|
|
1214
1259
|
*/
|
|
1215
|
-
export interface CmsEntry {
|
|
1260
|
+
export interface CmsEntry<T = CmsEntryValues> {
|
|
1216
1261
|
/**
|
|
1217
1262
|
* A version of the webiny this entry was created with.
|
|
1218
1263
|
* This can be used when upgrading the system so we know which entries to update.
|
|
@@ -1281,7 +1326,7 @@ export interface CmsEntry {
|
|
|
1281
1326
|
*
|
|
1282
1327
|
* @see CmsModelField
|
|
1283
1328
|
*/
|
|
1284
|
-
values:
|
|
1329
|
+
values: T;
|
|
1285
1330
|
/**
|
|
1286
1331
|
* Settings for the given entry.
|
|
1287
1332
|
*
|
|
@@ -1341,38 +1386,41 @@ export interface CmsModelManager {
|
|
|
1341
1386
|
*/
|
|
1342
1387
|
delete: (id: string) => Promise<void>;
|
|
1343
1388
|
}
|
|
1344
|
-
export interface
|
|
1389
|
+
export interface OnModelBeforeCreateTopicParams {
|
|
1345
1390
|
input: CmsModelCreateInput;
|
|
1346
1391
|
model: CmsModel;
|
|
1347
1392
|
}
|
|
1348
|
-
export interface
|
|
1393
|
+
export interface OnModelAfterCreateTopicParams {
|
|
1349
1394
|
input: CmsModelCreateInput;
|
|
1350
1395
|
model: CmsModel;
|
|
1351
1396
|
}
|
|
1352
|
-
export interface
|
|
1397
|
+
export interface OnModelBeforeCreateFromTopicParams {
|
|
1353
1398
|
input: CmsModelCreateInput;
|
|
1354
1399
|
original: CmsModel;
|
|
1355
1400
|
model: CmsModel;
|
|
1356
1401
|
}
|
|
1357
|
-
export interface
|
|
1402
|
+
export interface OnModelAfterCreateFromTopicParams {
|
|
1358
1403
|
input: CmsModelCreateInput;
|
|
1359
1404
|
original: CmsModel;
|
|
1360
1405
|
model: CmsModel;
|
|
1361
1406
|
}
|
|
1362
|
-
export interface
|
|
1407
|
+
export interface OnModelBeforeUpdateTopicParams {
|
|
1363
1408
|
input: CmsModelUpdateInput;
|
|
1364
1409
|
original: CmsModel;
|
|
1365
1410
|
model: CmsModel;
|
|
1366
1411
|
}
|
|
1367
|
-
export interface
|
|
1412
|
+
export interface OnModelAfterUpdateTopicParams {
|
|
1368
1413
|
input: CmsModelUpdateInput;
|
|
1369
1414
|
original: CmsModel;
|
|
1370
1415
|
model: CmsModel;
|
|
1371
1416
|
}
|
|
1372
|
-
export interface
|
|
1417
|
+
export interface OnModelBeforeDeleteTopicParams {
|
|
1373
1418
|
model: CmsModel;
|
|
1374
1419
|
}
|
|
1375
|
-
export interface
|
|
1420
|
+
export interface OnModelAfterDeleteTopicParams {
|
|
1421
|
+
model: CmsModel;
|
|
1422
|
+
}
|
|
1423
|
+
export interface OnModelInitializeParams {
|
|
1376
1424
|
model: CmsModel;
|
|
1377
1425
|
}
|
|
1378
1426
|
export interface CmsModelUpdateDirectParams {
|
|
@@ -1415,6 +1463,13 @@ export interface CmsModelContext {
|
|
|
1415
1463
|
* Delete content model. Should not allow deletion if there are entries connected to it.
|
|
1416
1464
|
*/
|
|
1417
1465
|
deleteModel: (modelId: string) => Promise<void>;
|
|
1466
|
+
/**
|
|
1467
|
+
* Possibility for users to trigger the model initialization.
|
|
1468
|
+
* They can hook into it and do what ever they want to.
|
|
1469
|
+
*
|
|
1470
|
+
* Primary idea behind this is creating the index, for the code models, in the ES.
|
|
1471
|
+
*/
|
|
1472
|
+
initializeModel: (modelId: string) => Promise<boolean>;
|
|
1418
1473
|
/**
|
|
1419
1474
|
* Get a instance of CmsModelManager for given content modelId.
|
|
1420
1475
|
*
|
|
@@ -1436,23 +1491,59 @@ export interface CmsModelContext {
|
|
|
1436
1491
|
*/
|
|
1437
1492
|
clearModelsCache: () => void;
|
|
1438
1493
|
/**
|
|
1439
|
-
*
|
|
1494
|
+
* Lifecycle events - deprecated.
|
|
1495
|
+
*/
|
|
1496
|
+
/**
|
|
1497
|
+
* @deprecated
|
|
1440
1498
|
*/
|
|
1441
|
-
onBeforeModelCreate: Topic<
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1499
|
+
onBeforeModelCreate: Topic<OnModelBeforeCreateTopicParams>;
|
|
1500
|
+
/**
|
|
1501
|
+
* @deprecated
|
|
1502
|
+
*/
|
|
1503
|
+
onAfterModelCreate: Topic<OnModelAfterCreateTopicParams>;
|
|
1504
|
+
/**
|
|
1505
|
+
* @deprecated
|
|
1506
|
+
*/
|
|
1507
|
+
onBeforeModelCreateFrom: Topic<OnModelBeforeCreateFromTopicParams>;
|
|
1508
|
+
/**
|
|
1509
|
+
* @deprecated
|
|
1510
|
+
*/
|
|
1511
|
+
onAfterModelCreateFrom: Topic<OnModelAfterCreateFromTopicParams>;
|
|
1512
|
+
/**
|
|
1513
|
+
* @deprecated
|
|
1514
|
+
*/
|
|
1515
|
+
onBeforeModelUpdate: Topic<OnModelBeforeUpdateTopicParams>;
|
|
1516
|
+
/**
|
|
1517
|
+
* @deprecated
|
|
1518
|
+
*/
|
|
1519
|
+
onAfterModelUpdate: Topic<OnModelAfterUpdateTopicParams>;
|
|
1520
|
+
/**
|
|
1521
|
+
* @deprecated
|
|
1522
|
+
*/
|
|
1523
|
+
onBeforeModelDelete: Topic<OnModelBeforeDeleteTopicParams>;
|
|
1524
|
+
/**
|
|
1525
|
+
* @deprecated
|
|
1526
|
+
*/
|
|
1527
|
+
onAfterModelDelete: Topic<OnModelAfterDeleteTopicParams>;
|
|
1528
|
+
/**
|
|
1529
|
+
* Lifecycle events - released in 5.33.0
|
|
1530
|
+
*/
|
|
1531
|
+
onModelBeforeCreate: Topic<OnModelBeforeCreateTopicParams>;
|
|
1532
|
+
onModelAfterCreate: Topic<OnModelAfterCreateTopicParams>;
|
|
1533
|
+
onModelBeforeCreateFrom: Topic<OnModelBeforeCreateFromTopicParams>;
|
|
1534
|
+
onModelAfterCreateFrom: Topic<OnModelAfterCreateFromTopicParams>;
|
|
1535
|
+
onModelBeforeUpdate: Topic<OnModelBeforeUpdateTopicParams>;
|
|
1536
|
+
onModelAfterUpdate: Topic<OnModelAfterUpdateTopicParams>;
|
|
1537
|
+
onModelBeforeDelete: Topic<OnModelBeforeDeleteTopicParams>;
|
|
1538
|
+
onModelAfterDelete: Topic<OnModelAfterDeleteTopicParams>;
|
|
1539
|
+
onModelInitialize: Topic<OnModelInitializeParams>;
|
|
1449
1540
|
}
|
|
1450
1541
|
/**
|
|
1451
1542
|
* Available statuses for content entry.
|
|
1452
1543
|
*
|
|
1453
1544
|
* @category CmsEntry
|
|
1454
1545
|
*/
|
|
1455
|
-
export declare type CmsEntryStatus = "published" | "unpublished" | "
|
|
1546
|
+
export declare type CmsEntryStatus = "published" | "unpublished" | "draft";
|
|
1456
1547
|
export interface CmsEntryListWhereRef {
|
|
1457
1548
|
id?: string;
|
|
1458
1549
|
id_in?: string[];
|
|
@@ -1530,7 +1621,12 @@ export interface CmsEntryListWhere {
|
|
|
1530
1621
|
/**
|
|
1531
1622
|
* This is to allow querying by any content model field defined by the user.
|
|
1532
1623
|
*/
|
|
1533
|
-
[key: string]:
|
|
1624
|
+
[key: string]: string | number | boolean | undefined | string[] | number[] | null | CmsEntryListWhere[] | CmsEntryListWhere | CmsEntryListWhereRef;
|
|
1625
|
+
/**
|
|
1626
|
+
* To allow querying via nested queries, we added the AND / OR properties.
|
|
1627
|
+
*/
|
|
1628
|
+
AND?: CmsEntryListWhere[];
|
|
1629
|
+
OR?: CmsEntryListWhere[];
|
|
1534
1630
|
}
|
|
1535
1631
|
/**
|
|
1536
1632
|
* Entry listing sort.
|
|
@@ -1583,100 +1679,120 @@ export interface CmsEntryMeta {
|
|
|
1583
1679
|
*/
|
|
1584
1680
|
totalCount: number;
|
|
1585
1681
|
}
|
|
1586
|
-
export interface
|
|
1682
|
+
export interface OnEntryBeforeCreateTopicParams {
|
|
1587
1683
|
input: CreateCmsEntryInput;
|
|
1588
1684
|
entry: CmsEntry;
|
|
1589
1685
|
model: StorageOperationsCmsModel;
|
|
1590
1686
|
}
|
|
1591
|
-
export interface
|
|
1687
|
+
export interface OnEntryAfterCreateTopicParams {
|
|
1592
1688
|
input: CreateCmsEntryInput;
|
|
1593
1689
|
entry: CmsEntry;
|
|
1594
1690
|
model: StorageOperationsCmsModel;
|
|
1595
1691
|
storageEntry: CmsEntry;
|
|
1596
1692
|
}
|
|
1597
|
-
export interface
|
|
1693
|
+
export interface OnEntryCreateErrorTopicParams {
|
|
1694
|
+
error: Error;
|
|
1695
|
+
input: CreateCmsEntryInput;
|
|
1696
|
+
entry: CmsEntry;
|
|
1697
|
+
model: CmsModel;
|
|
1698
|
+
}
|
|
1699
|
+
export interface OnEntryRevisionBeforeCreateTopicParams {
|
|
1598
1700
|
input: CreateFromCmsEntryInput;
|
|
1599
1701
|
entry: CmsEntry;
|
|
1600
1702
|
original: CmsEntry;
|
|
1601
1703
|
model: StorageOperationsCmsModel;
|
|
1602
1704
|
}
|
|
1603
|
-
export interface
|
|
1705
|
+
export interface OnEntryRevisionAfterCreateTopicParams {
|
|
1604
1706
|
input: CreateFromCmsEntryInput;
|
|
1605
1707
|
entry: CmsEntry;
|
|
1606
1708
|
original: CmsEntry;
|
|
1607
1709
|
model: StorageOperationsCmsModel;
|
|
1608
1710
|
storageEntry: CmsEntry;
|
|
1609
1711
|
}
|
|
1610
|
-
export interface
|
|
1712
|
+
export interface OnEntryCreateRevisionErrorTopicParams {
|
|
1713
|
+
error: Error;
|
|
1714
|
+
input: CreateFromCmsEntryInput;
|
|
1715
|
+
entry: CmsEntry;
|
|
1716
|
+
model: CmsModel;
|
|
1717
|
+
}
|
|
1718
|
+
export interface OnEntryBeforeUpdateTopicParams {
|
|
1611
1719
|
input: UpdateCmsEntryInput;
|
|
1612
1720
|
original: CmsEntry;
|
|
1613
1721
|
entry: CmsEntry;
|
|
1614
1722
|
model: StorageOperationsCmsModel;
|
|
1615
1723
|
}
|
|
1616
|
-
export interface
|
|
1724
|
+
export interface OnEntryAfterUpdateTopicParams {
|
|
1617
1725
|
input: UpdateCmsEntryInput;
|
|
1618
1726
|
original: CmsEntry;
|
|
1619
1727
|
entry: CmsEntry;
|
|
1620
1728
|
model: StorageOperationsCmsModel;
|
|
1621
1729
|
storageEntry: CmsEntry;
|
|
1622
1730
|
}
|
|
1623
|
-
export interface
|
|
1731
|
+
export interface OnEntryUpdateErrorTopicParams {
|
|
1732
|
+
error: Error;
|
|
1733
|
+
input: CreateFromCmsEntryInput;
|
|
1624
1734
|
entry: CmsEntry;
|
|
1625
|
-
model:
|
|
1735
|
+
model: CmsModel;
|
|
1626
1736
|
}
|
|
1627
|
-
export interface
|
|
1737
|
+
export interface OnEntryBeforePublishTopicParams {
|
|
1628
1738
|
entry: CmsEntry;
|
|
1629
1739
|
model: StorageOperationsCmsModel;
|
|
1630
|
-
storageEntry: CmsEntry;
|
|
1631
1740
|
}
|
|
1632
|
-
export interface
|
|
1741
|
+
export interface OnEntryAfterPublishTopicParams {
|
|
1633
1742
|
entry: CmsEntry;
|
|
1634
1743
|
model: StorageOperationsCmsModel;
|
|
1744
|
+
storageEntry: CmsEntry;
|
|
1635
1745
|
}
|
|
1636
|
-
export interface
|
|
1746
|
+
export interface OnEntryPublishErrorTopicParams {
|
|
1747
|
+
error: Error;
|
|
1637
1748
|
entry: CmsEntry;
|
|
1638
1749
|
model: StorageOperationsCmsModel;
|
|
1639
|
-
storageEntry: CmsEntry;
|
|
1640
1750
|
}
|
|
1641
|
-
export interface
|
|
1751
|
+
export interface OnEntryBeforeUnpublishTopicParams {
|
|
1642
1752
|
entry: CmsEntry;
|
|
1643
1753
|
model: StorageOperationsCmsModel;
|
|
1644
1754
|
}
|
|
1645
|
-
export interface
|
|
1755
|
+
export interface OnEntryAfterUnpublishTopicParams {
|
|
1646
1756
|
entry: CmsEntry;
|
|
1647
1757
|
model: StorageOperationsCmsModel;
|
|
1648
1758
|
storageEntry: CmsEntry;
|
|
1649
1759
|
}
|
|
1650
|
-
export interface
|
|
1760
|
+
export interface OnEntryUnpublishErrorTopicParams {
|
|
1761
|
+
error: Error;
|
|
1762
|
+
entry: CmsEntry;
|
|
1763
|
+
model: CmsModel;
|
|
1764
|
+
}
|
|
1765
|
+
export interface OnEntryBeforeDeleteTopicParams {
|
|
1651
1766
|
entry: CmsEntry;
|
|
1652
1767
|
model: StorageOperationsCmsModel;
|
|
1653
1768
|
}
|
|
1654
|
-
export interface
|
|
1769
|
+
export interface OnEntryAfterDeleteTopicParams {
|
|
1655
1770
|
entry: CmsEntry;
|
|
1656
1771
|
model: StorageOperationsCmsModel;
|
|
1657
|
-
storageEntry: CmsEntry;
|
|
1658
1772
|
}
|
|
1659
|
-
export interface
|
|
1773
|
+
export interface OnEntryDeleteErrorTopicParams {
|
|
1774
|
+
error: Error;
|
|
1660
1775
|
entry: CmsEntry;
|
|
1661
1776
|
model: StorageOperationsCmsModel;
|
|
1662
1777
|
}
|
|
1663
|
-
export interface
|
|
1778
|
+
export interface OnEntryRevisionBeforeDeleteTopicParams {
|
|
1664
1779
|
entry: CmsEntry;
|
|
1665
1780
|
model: StorageOperationsCmsModel;
|
|
1666
1781
|
}
|
|
1667
|
-
export interface
|
|
1782
|
+
export interface OnEntryRevisionAfterDeleteTopicParams {
|
|
1668
1783
|
entry: CmsEntry;
|
|
1669
1784
|
model: StorageOperationsCmsModel;
|
|
1670
1785
|
}
|
|
1671
|
-
export interface
|
|
1786
|
+
export interface OnEntryRevisionDeleteErrorTopicParams {
|
|
1787
|
+
error: Error;
|
|
1672
1788
|
entry: CmsEntry;
|
|
1673
1789
|
model: StorageOperationsCmsModel;
|
|
1674
1790
|
}
|
|
1675
|
-
export interface
|
|
1791
|
+
export interface OnEntryBeforeGetTopicParams {
|
|
1676
1792
|
model: StorageOperationsCmsModel;
|
|
1677
1793
|
where: CmsEntryListWhere;
|
|
1678
1794
|
}
|
|
1679
|
-
export interface
|
|
1795
|
+
export interface EntryBeforeListTopicParams {
|
|
1680
1796
|
where: CmsEntryListWhere;
|
|
1681
1797
|
model: StorageOperationsCmsModel;
|
|
1682
1798
|
}
|
|
@@ -1774,40 +1890,102 @@ export interface CmsEntryContext {
|
|
|
1774
1890
|
*/
|
|
1775
1891
|
unpublishEntry: (model: CmsModel, id: string) => Promise<CmsEntry>;
|
|
1776
1892
|
/**
|
|
1777
|
-
*
|
|
1893
|
+
* Get all entry revisions.
|
|
1778
1894
|
*/
|
|
1779
|
-
|
|
1895
|
+
getEntryRevisions: (model: CmsModel, id: string) => Promise<CmsEntry[]>;
|
|
1780
1896
|
/**
|
|
1781
|
-
*
|
|
1897
|
+
* Lifecyle events - deprecated.
|
|
1782
1898
|
*/
|
|
1783
|
-
requestEntryChanges: (model: CmsModel, id: string) => Promise<CmsEntry>;
|
|
1784
1899
|
/**
|
|
1785
|
-
*
|
|
1900
|
+
* @deprecated
|
|
1786
1901
|
*/
|
|
1787
|
-
|
|
1902
|
+
onBeforeEntryCreate: Topic<OnEntryBeforeCreateTopicParams>;
|
|
1903
|
+
/**
|
|
1904
|
+
* @deprecated
|
|
1905
|
+
*/
|
|
1906
|
+
onAfterEntryCreate: Topic<OnEntryAfterCreateTopicParams>;
|
|
1907
|
+
/**
|
|
1908
|
+
* @deprecated
|
|
1909
|
+
*/
|
|
1910
|
+
onBeforeEntryCreateRevision: Topic<OnEntryRevisionBeforeCreateTopicParams>;
|
|
1911
|
+
/**
|
|
1912
|
+
* @deprecated
|
|
1913
|
+
*/
|
|
1914
|
+
onAfterEntryCreateRevision: Topic<OnEntryRevisionAfterCreateTopicParams>;
|
|
1915
|
+
/**
|
|
1916
|
+
* @deprecated
|
|
1917
|
+
*/
|
|
1918
|
+
onBeforeEntryUpdate: Topic<OnEntryBeforeUpdateTopicParams>;
|
|
1919
|
+
/**
|
|
1920
|
+
* @deprecated
|
|
1921
|
+
*/
|
|
1922
|
+
onAfterEntryUpdate: Topic<OnEntryAfterUpdateTopicParams>;
|
|
1923
|
+
/**
|
|
1924
|
+
* @deprecated
|
|
1925
|
+
*/
|
|
1926
|
+
onBeforeEntryDelete: Topic<OnEntryBeforeDeleteTopicParams>;
|
|
1927
|
+
/**
|
|
1928
|
+
* @deprecated
|
|
1929
|
+
*/
|
|
1930
|
+
onAfterEntryDelete: Topic<OnEntryAfterDeleteTopicParams>;
|
|
1931
|
+
/**
|
|
1932
|
+
* @deprecated
|
|
1933
|
+
*/
|
|
1934
|
+
onBeforeEntryDeleteRevision: Topic<OnEntryRevisionBeforeDeleteTopicParams>;
|
|
1935
|
+
/**
|
|
1936
|
+
* @deprecated
|
|
1937
|
+
*/
|
|
1938
|
+
onAfterEntryDeleteRevision: Topic<OnEntryRevisionAfterDeleteTopicParams>;
|
|
1939
|
+
/**
|
|
1940
|
+
* @deprecated
|
|
1941
|
+
*/
|
|
1942
|
+
onBeforeEntryPublish: Topic<OnEntryBeforePublishTopicParams>;
|
|
1788
1943
|
/**
|
|
1789
|
-
*
|
|
1790
|
-
*/
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1944
|
+
* @deprecated
|
|
1945
|
+
*/
|
|
1946
|
+
onAfterEntryPublish: Topic<OnEntryAfterPublishTopicParams>;
|
|
1947
|
+
/**
|
|
1948
|
+
* @deprecated
|
|
1949
|
+
*/
|
|
1950
|
+
onBeforeEntryUnpublish: Topic<OnEntryBeforeUnpublishTopicParams>;
|
|
1951
|
+
/**
|
|
1952
|
+
* @deprecated
|
|
1953
|
+
*/
|
|
1954
|
+
onAfterEntryUnpublish: Topic<OnEntryAfterUnpublishTopicParams>;
|
|
1955
|
+
/**
|
|
1956
|
+
* @deprecated
|
|
1957
|
+
*/
|
|
1958
|
+
onBeforeEntryGet: Topic<OnEntryBeforeGetTopicParams>;
|
|
1959
|
+
/**
|
|
1960
|
+
* @deprecated
|
|
1961
|
+
*/
|
|
1962
|
+
onBeforeEntryList: Topic<EntryBeforeListTopicParams>;
|
|
1963
|
+
/**
|
|
1964
|
+
* Lifecycle events released in 5.33.0
|
|
1965
|
+
*/
|
|
1966
|
+
onEntryBeforeCreate: Topic<OnEntryBeforeCreateTopicParams>;
|
|
1967
|
+
onEntryAfterCreate: Topic<OnEntryAfterCreateTopicParams>;
|
|
1968
|
+
onEntryCreateError: Topic<OnEntryCreateErrorTopicParams>;
|
|
1969
|
+
onEntryRevisionBeforeCreate: Topic<OnEntryRevisionBeforeCreateTopicParams>;
|
|
1970
|
+
onEntryRevisionAfterCreate: Topic<OnEntryRevisionAfterCreateTopicParams>;
|
|
1971
|
+
onEntryRevisionCreateError: Topic<OnEntryCreateRevisionErrorTopicParams>;
|
|
1972
|
+
onEntryBeforeUpdate: Topic<OnEntryBeforeUpdateTopicParams>;
|
|
1973
|
+
onEntryAfterUpdate: Topic<OnEntryAfterUpdateTopicParams>;
|
|
1974
|
+
onEntryUpdateError: Topic<OnEntryUpdateErrorTopicParams>;
|
|
1975
|
+
onEntryBeforeDelete: Topic<OnEntryBeforeDeleteTopicParams>;
|
|
1976
|
+
onEntryAfterDelete: Topic<OnEntryAfterDeleteTopicParams>;
|
|
1977
|
+
onEntryDeleteError: Topic<OnEntryDeleteErrorTopicParams>;
|
|
1978
|
+
onEntryRevisionBeforeDelete: Topic<OnEntryRevisionBeforeDeleteTopicParams>;
|
|
1979
|
+
onEntryRevisionAfterDelete: Topic<OnEntryRevisionAfterDeleteTopicParams>;
|
|
1980
|
+
onEntryRevisionDeleteError: Topic<OnEntryRevisionDeleteErrorTopicParams>;
|
|
1981
|
+
onEntryBeforePublish: Topic<OnEntryBeforePublishTopicParams>;
|
|
1982
|
+
onEntryAfterPublish: Topic<OnEntryAfterPublishTopicParams>;
|
|
1983
|
+
onEntryPublishError: Topic<OnEntryPublishErrorTopicParams>;
|
|
1984
|
+
onEntryBeforeUnpublish: Topic<OnEntryBeforeUnpublishTopicParams>;
|
|
1985
|
+
onEntryAfterUnpublish: Topic<OnEntryAfterUnpublishTopicParams>;
|
|
1986
|
+
onEntryUnpublishError: Topic<OnEntryUnpublishErrorTopicParams>;
|
|
1987
|
+
onEntryBeforeGet: Topic<OnEntryBeforeGetTopicParams>;
|
|
1988
|
+
onEntryBeforeList: Topic<EntryBeforeListTopicParams>;
|
|
1811
1989
|
}
|
|
1812
1990
|
/**
|
|
1813
1991
|
* Parameters for CmsEntryResolverFactory.
|
|
@@ -2085,26 +2263,6 @@ export interface CmsEntryStorageOperationsUnpublishParams<T extends CmsStorageEn
|
|
|
2085
2263
|
*/
|
|
2086
2264
|
storageEntry: T;
|
|
2087
2265
|
}
|
|
2088
|
-
export interface CmsEntryStorageOperationsRequestChangesParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
2089
|
-
/**
|
|
2090
|
-
* Entry data updated with the required properties.
|
|
2091
|
-
*/
|
|
2092
|
-
entry: CmsEntry;
|
|
2093
|
-
/**
|
|
2094
|
-
* Entry that is prepared for the storageOperations, with the transformations.
|
|
2095
|
-
*/
|
|
2096
|
-
storageEntry: T;
|
|
2097
|
-
}
|
|
2098
|
-
export interface CmsEntryStorageOperationsRequestReviewParams<T extends CmsStorageEntry = CmsStorageEntry> {
|
|
2099
|
-
/**
|
|
2100
|
-
* Entry that is prepared for the storageOperations.
|
|
2101
|
-
*/
|
|
2102
|
-
entry: CmsEntry;
|
|
2103
|
-
/**
|
|
2104
|
-
* Entry that is prepared for the storageOperations, with the transformations.
|
|
2105
|
-
*/
|
|
2106
|
-
storageEntry: T;
|
|
2107
|
-
}
|
|
2108
2266
|
export interface CmsEntryStorageOperationsGetByIdsParams {
|
|
2109
2267
|
ids: readonly string[];
|
|
2110
2268
|
}
|
|
@@ -2226,21 +2384,11 @@ export interface CmsEntryStorageOperations<T extends CmsStorageEntry = CmsStorag
|
|
|
2226
2384
|
* Unpublish the entry.
|
|
2227
2385
|
*/
|
|
2228
2386
|
unpublish: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsUnpublishParams<T>) => Promise<T>;
|
|
2229
|
-
/**
|
|
2230
|
-
* Request changes the entry.
|
|
2231
|
-
*/
|
|
2232
|
-
requestChanges: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsRequestChangesParams<T>) => Promise<T>;
|
|
2233
|
-
/**
|
|
2234
|
-
* Request review the entry.
|
|
2235
|
-
*/
|
|
2236
|
-
requestReview: (model: StorageOperationsCmsModel, params: CmsEntryStorageOperationsRequestReviewParams<T>) => Promise<CmsEntry>;
|
|
2237
2387
|
}
|
|
2238
2388
|
export declare enum CONTENT_ENTRY_STATUS {
|
|
2239
2389
|
DRAFT = "draft",
|
|
2240
2390
|
PUBLISHED = "published",
|
|
2241
|
-
UNPUBLISHED = "unpublished"
|
|
2242
|
-
CHANGES_REQUESTED = "changesRequested",
|
|
2243
|
-
REVIEW_REQUESTED = "reviewRequested"
|
|
2391
|
+
UNPUBLISHED = "unpublished"
|
|
2244
2392
|
}
|
|
2245
2393
|
export interface CmsSettingsStorageOperationsGetParams {
|
|
2246
2394
|
locale: string;
|
|
@@ -2297,7 +2445,8 @@ export interface CmsSystemStorageOperations {
|
|
|
2297
2445
|
*/
|
|
2298
2446
|
update: (params: CmsSystemStorageOperationsUpdateParams) => Promise<CmsSystem>;
|
|
2299
2447
|
}
|
|
2300
|
-
export interface HeadlessCmsStorageOperations {
|
|
2448
|
+
export interface HeadlessCmsStorageOperations<C = CmsContext> {
|
|
2449
|
+
name: string;
|
|
2301
2450
|
system: CmsSystemStorageOperations;
|
|
2302
2451
|
settings: CmsSettingsStorageOperations;
|
|
2303
2452
|
groups: CmsGroupStorageOperations;
|
|
@@ -2306,8 +2455,8 @@ export interface HeadlessCmsStorageOperations {
|
|
|
2306
2455
|
/**
|
|
2307
2456
|
* Either attach something from the storage operations or run something in it.
|
|
2308
2457
|
*/
|
|
2309
|
-
beforeInit?: (context:
|
|
2310
|
-
init?: (context:
|
|
2458
|
+
beforeInit?: (context: C) => Promise<void>;
|
|
2459
|
+
init?: (context: C) => Promise<void>;
|
|
2311
2460
|
/**
|
|
2312
2461
|
* An upgrade to run if necessary.
|
|
2313
2462
|
*/
|
package/types.js
CHANGED
|
@@ -413,6 +413,4 @@ exports.CONTENT_ENTRY_STATUS = CONTENT_ENTRY_STATUS;
|
|
|
413
413
|
CONTENT_ENTRY_STATUS["DRAFT"] = "draft";
|
|
414
414
|
CONTENT_ENTRY_STATUS["PUBLISHED"] = "published";
|
|
415
415
|
CONTENT_ENTRY_STATUS["UNPUBLISHED"] = "unpublished";
|
|
416
|
-
CONTENT_ENTRY_STATUS["CHANGES_REQUESTED"] = "changesRequested";
|
|
417
|
-
CONTENT_ENTRY_STATUS["REVIEW_REQUESTED"] = "reviewRequested";
|
|
418
416
|
})(CONTENT_ENTRY_STATUS || (exports.CONTENT_ENTRY_STATUS = CONTENT_ENTRY_STATUS = {}));
|