@webiny/api-headless-cms 5.39.3 → 5.40.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.
@@ -24,26 +24,26 @@ export declare const createModelCreateValidation: () => zod.ZodObject<{
24
24
  label: zod.ZodString;
25
25
  selected: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
26
26
  }, "strip", zod.ZodTypeAny, {
27
- label: string;
28
27
  value: string;
28
+ label: string;
29
29
  selected: boolean;
30
30
  }, {
31
- label: string;
32
31
  value: string;
32
+ label: string;
33
33
  selected?: boolean | undefined;
34
34
  }>, "many">>;
35
35
  }, "strip", zod.ZodTypeAny, {
36
36
  values: {
37
- label: string;
38
37
  value: string;
38
+ label: string;
39
39
  selected: boolean;
40
40
  }[];
41
41
  enabled: boolean;
42
42
  }, {
43
43
  enabled: boolean;
44
44
  values?: {
45
- label: string;
46
45
  value: string;
46
+ label: string;
47
47
  selected?: boolean | undefined;
48
48
  }[] | undefined;
49
49
  }>>>;
@@ -59,21 +59,21 @@ export declare const createModelCreateValidation: () => zod.ZodObject<{
59
59
  message: zod.ZodDefault<zod.ZodOptional<zod.ZodString>>;
60
60
  settings: zod.ZodDefault<zod.ZodEffects<zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodObject<{}, "passthrough", zod.ZodTypeAny, zod.objectOutputType<{}, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{}, zod.ZodTypeAny, "passthrough">>>>>, zod.objectOutputType<{}, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{}, zod.ZodTypeAny, "passthrough"> | null | undefined>>;
61
61
  }, "strip", zod.ZodTypeAny, {
62
+ message: string;
62
63
  name: string;
63
64
  settings: {} & {
64
65
  [k: string]: unknown;
65
66
  };
66
- message: string;
67
67
  }, {
68
68
  name: string;
69
69
  message?: string | undefined;
70
70
  settings?: zod.objectInputType<{}, zod.ZodTypeAny, "passthrough"> | null | undefined;
71
71
  }>, "many">>>>>, {
72
+ message: string;
72
73
  name: string;
73
74
  settings: {} & {
74
75
  [k: string]: unknown;
75
76
  };
76
- message: string;
77
77
  }[], {
78
78
  name: string;
79
79
  message?: string | undefined;
@@ -84,21 +84,21 @@ export declare const createModelCreateValidation: () => zod.ZodObject<{
84
84
  message: zod.ZodDefault<zod.ZodOptional<zod.ZodString>>;
85
85
  settings: zod.ZodDefault<zod.ZodEffects<zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodObject<{}, "passthrough", zod.ZodTypeAny, zod.objectOutputType<{}, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{}, zod.ZodTypeAny, "passthrough">>>>>, zod.objectOutputType<{}, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{}, zod.ZodTypeAny, "passthrough"> | null | undefined>>;
86
86
  }, "strip", zod.ZodTypeAny, {
87
+ message: string;
87
88
  name: string;
88
89
  settings: {} & {
89
90
  [k: string]: unknown;
90
91
  };
91
- message: string;
92
92
  }, {
93
93
  name: string;
94
94
  message?: string | undefined;
95
95
  settings?: zod.objectInputType<{}, zod.ZodTypeAny, "passthrough"> | null | undefined;
96
96
  }>, "many">>>>>, {
97
+ message: string;
97
98
  name: string;
98
99
  settings: {} & {
99
100
  [k: string]: unknown;
100
101
  };
101
- message: string;
102
102
  }[], {
103
103
  name: string;
104
104
  message?: string | undefined;
@@ -106,36 +106,36 @@ export declare const createModelCreateValidation: () => zod.ZodObject<{
106
106
  }[] | null | undefined>;
107
107
  settings: zod.ZodDefault<zod.ZodEffects<zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodObject<{}, "passthrough", zod.ZodTypeAny, zod.objectOutputType<{}, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{}, zod.ZodTypeAny, "passthrough">>>>>, zod.objectOutputType<{}, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{}, zod.ZodTypeAny, "passthrough"> | null | undefined>>;
108
108
  }, "strip", zod.ZodTypeAny, {
109
- id: string;
110
109
  type: string;
110
+ id: string;
111
+ label: string;
112
+ settings: {} & {
113
+ [k: string]: unknown;
114
+ };
111
115
  storageId: string;
112
116
  fieldId: string;
113
- label: string;
114
117
  helpText: string | null;
115
118
  placeholderText: string | null;
116
119
  validation: {
120
+ message: string;
117
121
  name: string;
118
122
  settings: {} & {
119
123
  [k: string]: unknown;
120
124
  };
121
- message: string;
122
125
  }[];
123
126
  listValidation: {
127
+ message: string;
124
128
  name: string;
125
129
  settings: {} & {
126
130
  [k: string]: unknown;
127
131
  };
128
- message: string;
129
132
  }[];
130
133
  multipleValues: boolean;
131
134
  tags: string[];
132
- settings: {} & {
133
- [k: string]: unknown;
134
- };
135
135
  predefinedValues?: {
136
136
  values: {
137
- label: string;
138
137
  value: string;
138
+ label: string;
139
139
  selected: boolean;
140
140
  }[];
141
141
  enabled: boolean;
@@ -144,10 +144,10 @@ export declare const createModelCreateValidation: () => zod.ZodObject<{
144
144
  name: string;
145
145
  } | undefined;
146
146
  }, {
147
- id: string;
148
147
  type: string;
149
- fieldId: string;
148
+ id: string;
150
149
  label: string;
150
+ fieldId: string;
151
151
  storageId?: string | undefined;
152
152
  helpText?: string | null | undefined;
153
153
  placeholderText?: string | null | undefined;
@@ -156,8 +156,8 @@ export declare const createModelCreateValidation: () => zod.ZodObject<{
156
156
  predefinedValues?: {
157
157
  enabled: boolean;
158
158
  values?: {
159
- label: string;
160
159
  value: string;
160
+ label: string;
161
161
  selected?: boolean | undefined;
162
162
  }[] | undefined;
163
163
  } | undefined;
@@ -184,37 +184,38 @@ export declare const createModelCreateValidation: () => zod.ZodObject<{
184
184
  defaultFields: zod.ZodOptional<zod.ZodNullable<zod.ZodBoolean>>;
185
185
  }, "strip", zod.ZodTypeAny, {
186
186
  name: string;
187
+ group: string;
187
188
  fields: {
188
- id: string;
189
189
  type: string;
190
+ id: string;
191
+ label: string;
192
+ settings: {} & {
193
+ [k: string]: unknown;
194
+ };
190
195
  storageId: string;
191
196
  fieldId: string;
192
- label: string;
193
197
  helpText: string | null;
194
198
  placeholderText: string | null;
195
199
  validation: {
200
+ message: string;
196
201
  name: string;
197
202
  settings: {} & {
198
203
  [k: string]: unknown;
199
204
  };
200
- message: string;
201
205
  }[];
202
206
  listValidation: {
207
+ message: string;
203
208
  name: string;
204
209
  settings: {} & {
205
210
  [k: string]: unknown;
206
211
  };
207
- message: string;
208
212
  }[];
209
213
  multipleValues: boolean;
210
214
  tags: string[];
211
- settings: {} & {
212
- [k: string]: unknown;
213
- };
214
215
  predefinedValues?: {
215
216
  values: {
216
- label: string;
217
217
  value: string;
218
+ label: string;
218
219
  selected: boolean;
219
220
  }[];
220
221
  enabled: boolean;
@@ -226,7 +227,6 @@ export declare const createModelCreateValidation: () => zod.ZodObject<{
226
227
  layout: string[][];
227
228
  singularApiName: string;
228
229
  pluralApiName: string;
229
- group: string;
230
230
  modelId?: string | undefined;
231
231
  description?: string | null | undefined;
232
232
  icon?: string | null | undefined;
@@ -237,17 +237,17 @@ export declare const createModelCreateValidation: () => zod.ZodObject<{
237
237
  defaultFields?: boolean | null | undefined;
238
238
  }, {
239
239
  name: string;
240
+ group: string;
240
241
  singularApiName: string;
241
242
  pluralApiName: string;
242
- group: string;
243
243
  modelId?: string | undefined;
244
244
  description?: string | null | undefined;
245
245
  icon?: string | null | undefined;
246
246
  fields?: {
247
- id: string;
248
247
  type: string;
249
- fieldId: string;
248
+ id: string;
250
249
  label: string;
250
+ fieldId: string;
251
251
  storageId?: string | undefined;
252
252
  helpText?: string | null | undefined;
253
253
  placeholderText?: string | null | undefined;
@@ -256,8 +256,8 @@ export declare const createModelCreateValidation: () => zod.ZodObject<{
256
256
  predefinedValues?: {
257
257
  enabled: boolean;
258
258
  values?: {
259
- label: string;
260
259
  value: string;
260
+ label: string;
261
261
  selected?: boolean | undefined;
262
262
  }[] | undefined;
263
263
  } | undefined;
@@ -308,26 +308,26 @@ export declare const createModelImportValidation: () => zod.ZodObject<{
308
308
  label: zod.ZodString;
309
309
  selected: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
310
310
  }, "strip", zod.ZodTypeAny, {
311
- label: string;
312
311
  value: string;
312
+ label: string;
313
313
  selected: boolean;
314
314
  }, {
315
- label: string;
316
315
  value: string;
316
+ label: string;
317
317
  selected?: boolean | undefined;
318
318
  }>, "many">>;
319
319
  }, "strip", zod.ZodTypeAny, {
320
320
  values: {
321
- label: string;
322
321
  value: string;
322
+ label: string;
323
323
  selected: boolean;
324
324
  }[];
325
325
  enabled: boolean;
326
326
  }, {
327
327
  enabled: boolean;
328
328
  values?: {
329
- label: string;
330
329
  value: string;
330
+ label: string;
331
331
  selected?: boolean | undefined;
332
332
  }[] | undefined;
333
333
  }>>>;
@@ -343,21 +343,21 @@ export declare const createModelImportValidation: () => zod.ZodObject<{
343
343
  message: zod.ZodDefault<zod.ZodOptional<zod.ZodString>>;
344
344
  settings: zod.ZodDefault<zod.ZodEffects<zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodObject<{}, "passthrough", zod.ZodTypeAny, zod.objectOutputType<{}, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{}, zod.ZodTypeAny, "passthrough">>>>>, zod.objectOutputType<{}, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{}, zod.ZodTypeAny, "passthrough"> | null | undefined>>;
345
345
  }, "strip", zod.ZodTypeAny, {
346
+ message: string;
346
347
  name: string;
347
348
  settings: {} & {
348
349
  [k: string]: unknown;
349
350
  };
350
- message: string;
351
351
  }, {
352
352
  name: string;
353
353
  message?: string | undefined;
354
354
  settings?: zod.objectInputType<{}, zod.ZodTypeAny, "passthrough"> | null | undefined;
355
355
  }>, "many">>>>>, {
356
+ message: string;
356
357
  name: string;
357
358
  settings: {} & {
358
359
  [k: string]: unknown;
359
360
  };
360
- message: string;
361
361
  }[], {
362
362
  name: string;
363
363
  message?: string | undefined;
@@ -368,21 +368,21 @@ export declare const createModelImportValidation: () => zod.ZodObject<{
368
368
  message: zod.ZodDefault<zod.ZodOptional<zod.ZodString>>;
369
369
  settings: zod.ZodDefault<zod.ZodEffects<zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodObject<{}, "passthrough", zod.ZodTypeAny, zod.objectOutputType<{}, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{}, zod.ZodTypeAny, "passthrough">>>>>, zod.objectOutputType<{}, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{}, zod.ZodTypeAny, "passthrough"> | null | undefined>>;
370
370
  }, "strip", zod.ZodTypeAny, {
371
+ message: string;
371
372
  name: string;
372
373
  settings: {} & {
373
374
  [k: string]: unknown;
374
375
  };
375
- message: string;
376
376
  }, {
377
377
  name: string;
378
378
  message?: string | undefined;
379
379
  settings?: zod.objectInputType<{}, zod.ZodTypeAny, "passthrough"> | null | undefined;
380
380
  }>, "many">>>>>, {
381
+ message: string;
381
382
  name: string;
382
383
  settings: {} & {
383
384
  [k: string]: unknown;
384
385
  };
385
- message: string;
386
386
  }[], {
387
387
  name: string;
388
388
  message?: string | undefined;
@@ -390,36 +390,36 @@ export declare const createModelImportValidation: () => zod.ZodObject<{
390
390
  }[] | null | undefined>;
391
391
  settings: zod.ZodDefault<zod.ZodEffects<zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodObject<{}, "passthrough", zod.ZodTypeAny, zod.objectOutputType<{}, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{}, zod.ZodTypeAny, "passthrough">>>>>, zod.objectOutputType<{}, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{}, zod.ZodTypeAny, "passthrough"> | null | undefined>>;
392
392
  }, "strip", zod.ZodTypeAny, {
393
- id: string;
394
393
  type: string;
394
+ id: string;
395
+ label: string;
396
+ settings: {} & {
397
+ [k: string]: unknown;
398
+ };
395
399
  storageId: string;
396
400
  fieldId: string;
397
- label: string;
398
401
  helpText: string | null;
399
402
  placeholderText: string | null;
400
403
  validation: {
404
+ message: string;
401
405
  name: string;
402
406
  settings: {} & {
403
407
  [k: string]: unknown;
404
408
  };
405
- message: string;
406
409
  }[];
407
410
  listValidation: {
411
+ message: string;
408
412
  name: string;
409
413
  settings: {} & {
410
414
  [k: string]: unknown;
411
415
  };
412
- message: string;
413
416
  }[];
414
417
  multipleValues: boolean;
415
418
  tags: string[];
416
- settings: {} & {
417
- [k: string]: unknown;
418
- };
419
419
  predefinedValues?: {
420
420
  values: {
421
- label: string;
422
421
  value: string;
422
+ label: string;
423
423
  selected: boolean;
424
424
  }[];
425
425
  enabled: boolean;
@@ -428,10 +428,10 @@ export declare const createModelImportValidation: () => zod.ZodObject<{
428
428
  name: string;
429
429
  } | undefined;
430
430
  }, {
431
- id: string;
432
431
  type: string;
433
- fieldId: string;
432
+ id: string;
434
433
  label: string;
434
+ fieldId: string;
435
435
  storageId?: string | undefined;
436
436
  helpText?: string | null | undefined;
437
437
  placeholderText?: string | null | undefined;
@@ -440,8 +440,8 @@ export declare const createModelImportValidation: () => zod.ZodObject<{
440
440
  predefinedValues?: {
441
441
  enabled: boolean;
442
442
  values?: {
443
- label: string;
444
443
  value: string;
444
+ label: string;
445
445
  selected?: boolean | undefined;
446
446
  }[] | undefined;
447
447
  } | undefined;
@@ -467,37 +467,38 @@ export declare const createModelImportValidation: () => zod.ZodObject<{
467
467
  imageFieldId: zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodString>>>;
468
468
  }, "strip", zod.ZodTypeAny, {
469
469
  name: string;
470
+ group: string;
470
471
  fields: {
471
- id: string;
472
472
  type: string;
473
+ id: string;
474
+ label: string;
475
+ settings: {} & {
476
+ [k: string]: unknown;
477
+ };
473
478
  storageId: string;
474
479
  fieldId: string;
475
- label: string;
476
480
  helpText: string | null;
477
481
  placeholderText: string | null;
478
482
  validation: {
483
+ message: string;
479
484
  name: string;
480
485
  settings: {} & {
481
486
  [k: string]: unknown;
482
487
  };
483
- message: string;
484
488
  }[];
485
489
  listValidation: {
490
+ message: string;
486
491
  name: string;
487
492
  settings: {} & {
488
493
  [k: string]: unknown;
489
494
  };
490
- message: string;
491
495
  }[];
492
496
  multipleValues: boolean;
493
497
  tags: string[];
494
- settings: {} & {
495
- [k: string]: unknown;
496
- };
497
498
  predefinedValues?: {
498
499
  values: {
499
- label: string;
500
500
  value: string;
501
+ label: string;
501
502
  selected: boolean;
502
503
  }[];
503
504
  enabled: boolean;
@@ -509,7 +510,6 @@ export declare const createModelImportValidation: () => zod.ZodObject<{
509
510
  layout: string[][];
510
511
  singularApiName: string;
511
512
  pluralApiName: string;
512
- group: string;
513
513
  modelId?: string | undefined;
514
514
  description?: string | null | undefined;
515
515
  icon?: string | null | undefined;
@@ -519,11 +519,12 @@ export declare const createModelImportValidation: () => zod.ZodObject<{
519
519
  imageFieldId?: string | null | undefined;
520
520
  }, {
521
521
  name: string;
522
+ group: string;
522
523
  fields: {
523
- id: string;
524
524
  type: string;
525
- fieldId: string;
525
+ id: string;
526
526
  label: string;
527
+ fieldId: string;
527
528
  storageId?: string | undefined;
528
529
  helpText?: string | null | undefined;
529
530
  placeholderText?: string | null | undefined;
@@ -532,8 +533,8 @@ export declare const createModelImportValidation: () => zod.ZodObject<{
532
533
  predefinedValues?: {
533
534
  enabled: boolean;
534
535
  values?: {
535
- label: string;
536
536
  value: string;
537
+ label: string;
537
538
  selected?: boolean | undefined;
538
539
  }[] | undefined;
539
540
  } | undefined;
@@ -556,7 +557,6 @@ export declare const createModelImportValidation: () => zod.ZodObject<{
556
557
  singularApiName: string;
557
558
  pluralApiName: string;
558
559
  modelId: string;
559
- group: string;
560
560
  description?: string | null | undefined;
561
561
  icon?: string | null | undefined;
562
562
  tags?: string[] | undefined;
@@ -575,18 +575,18 @@ export declare const createModelCreateFromValidation: () => zod.ZodObject<{
575
575
  locale: zod.ZodOptional<zod.ZodString>;
576
576
  }, "strip", zod.ZodTypeAny, {
577
577
  name: string;
578
+ group: string;
578
579
  singularApiName: string;
579
580
  pluralApiName: string;
580
- group: string;
581
581
  modelId?: string | undefined;
582
582
  description?: string | null | undefined;
583
583
  icon?: string | null | undefined;
584
584
  locale?: string | undefined;
585
585
  }, {
586
586
  name: string;
587
+ group: string;
587
588
  singularApiName: string;
588
589
  pluralApiName: string;
589
- group: string;
590
590
  modelId?: string | undefined;
591
591
  description?: string | null | undefined;
592
592
  icon?: string | null | undefined;
@@ -616,26 +616,26 @@ export declare const createModelUpdateValidation: () => zod.ZodObject<{
616
616
  label: zod.ZodString;
617
617
  selected: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
618
618
  }, "strip", zod.ZodTypeAny, {
619
- label: string;
620
619
  value: string;
620
+ label: string;
621
621
  selected: boolean;
622
622
  }, {
623
- label: string;
624
623
  value: string;
624
+ label: string;
625
625
  selected?: boolean | undefined;
626
626
  }>, "many">>;
627
627
  }, "strip", zod.ZodTypeAny, {
628
628
  values: {
629
- label: string;
630
629
  value: string;
630
+ label: string;
631
631
  selected: boolean;
632
632
  }[];
633
633
  enabled: boolean;
634
634
  }, {
635
635
  enabled: boolean;
636
636
  values?: {
637
- label: string;
638
637
  value: string;
638
+ label: string;
639
639
  selected?: boolean | undefined;
640
640
  }[] | undefined;
641
641
  }>>>;
@@ -651,21 +651,21 @@ export declare const createModelUpdateValidation: () => zod.ZodObject<{
651
651
  message: zod.ZodDefault<zod.ZodOptional<zod.ZodString>>;
652
652
  settings: zod.ZodDefault<zod.ZodEffects<zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodObject<{}, "passthrough", zod.ZodTypeAny, zod.objectOutputType<{}, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{}, zod.ZodTypeAny, "passthrough">>>>>, zod.objectOutputType<{}, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{}, zod.ZodTypeAny, "passthrough"> | null | undefined>>;
653
653
  }, "strip", zod.ZodTypeAny, {
654
+ message: string;
654
655
  name: string;
655
656
  settings: {} & {
656
657
  [k: string]: unknown;
657
658
  };
658
- message: string;
659
659
  }, {
660
660
  name: string;
661
661
  message?: string | undefined;
662
662
  settings?: zod.objectInputType<{}, zod.ZodTypeAny, "passthrough"> | null | undefined;
663
663
  }>, "many">>>>>, {
664
+ message: string;
664
665
  name: string;
665
666
  settings: {} & {
666
667
  [k: string]: unknown;
667
668
  };
668
- message: string;
669
669
  }[], {
670
670
  name: string;
671
671
  message?: string | undefined;
@@ -676,21 +676,21 @@ export declare const createModelUpdateValidation: () => zod.ZodObject<{
676
676
  message: zod.ZodDefault<zod.ZodOptional<zod.ZodString>>;
677
677
  settings: zod.ZodDefault<zod.ZodEffects<zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodObject<{}, "passthrough", zod.ZodTypeAny, zod.objectOutputType<{}, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{}, zod.ZodTypeAny, "passthrough">>>>>, zod.objectOutputType<{}, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{}, zod.ZodTypeAny, "passthrough"> | null | undefined>>;
678
678
  }, "strip", zod.ZodTypeAny, {
679
+ message: string;
679
680
  name: string;
680
681
  settings: {} & {
681
682
  [k: string]: unknown;
682
683
  };
683
- message: string;
684
684
  }, {
685
685
  name: string;
686
686
  message?: string | undefined;
687
687
  settings?: zod.objectInputType<{}, zod.ZodTypeAny, "passthrough"> | null | undefined;
688
688
  }>, "many">>>>>, {
689
+ message: string;
689
690
  name: string;
690
691
  settings: {} & {
691
692
  [k: string]: unknown;
692
693
  };
693
- message: string;
694
694
  }[], {
695
695
  name: string;
696
696
  message?: string | undefined;
@@ -698,36 +698,36 @@ export declare const createModelUpdateValidation: () => zod.ZodObject<{
698
698
  }[] | null | undefined>;
699
699
  settings: zod.ZodDefault<zod.ZodEffects<zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodObject<{}, "passthrough", zod.ZodTypeAny, zod.objectOutputType<{}, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{}, zod.ZodTypeAny, "passthrough">>>>>, zod.objectOutputType<{}, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{}, zod.ZodTypeAny, "passthrough"> | null | undefined>>;
700
700
  }, "strip", zod.ZodTypeAny, {
701
- id: string;
702
701
  type: string;
702
+ id: string;
703
+ label: string;
704
+ settings: {} & {
705
+ [k: string]: unknown;
706
+ };
703
707
  storageId: string;
704
708
  fieldId: string;
705
- label: string;
706
709
  helpText: string | null;
707
710
  placeholderText: string | null;
708
711
  validation: {
712
+ message: string;
709
713
  name: string;
710
714
  settings: {} & {
711
715
  [k: string]: unknown;
712
716
  };
713
- message: string;
714
717
  }[];
715
718
  listValidation: {
719
+ message: string;
716
720
  name: string;
717
721
  settings: {} & {
718
722
  [k: string]: unknown;
719
723
  };
720
- message: string;
721
724
  }[];
722
725
  multipleValues: boolean;
723
726
  tags: string[];
724
- settings: {} & {
725
- [k: string]: unknown;
726
- };
727
727
  predefinedValues?: {
728
728
  values: {
729
- label: string;
730
729
  value: string;
730
+ label: string;
731
731
  selected: boolean;
732
732
  }[];
733
733
  enabled: boolean;
@@ -736,10 +736,10 @@ export declare const createModelUpdateValidation: () => zod.ZodObject<{
736
736
  name: string;
737
737
  } | undefined;
738
738
  }, {
739
- id: string;
740
739
  type: string;
741
- fieldId: string;
740
+ id: string;
742
741
  label: string;
742
+ fieldId: string;
743
743
  storageId?: string | undefined;
744
744
  helpText?: string | null | undefined;
745
745
  placeholderText?: string | null | undefined;
@@ -748,8 +748,8 @@ export declare const createModelUpdateValidation: () => zod.ZodObject<{
748
748
  predefinedValues?: {
749
749
  enabled: boolean;
750
750
  values?: {
751
- label: string;
752
751
  value: string;
752
+ label: string;
753
753
  selected?: boolean | undefined;
754
754
  }[] | undefined;
755
755
  } | undefined;
@@ -775,36 +775,36 @@ export declare const createModelUpdateValidation: () => zod.ZodObject<{
775
775
  tags: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
776
776
  }, "strip", zod.ZodTypeAny, {
777
777
  fields: {
778
- id: string;
779
778
  type: string;
779
+ id: string;
780
+ label: string;
781
+ settings: {} & {
782
+ [k: string]: unknown;
783
+ };
780
784
  storageId: string;
781
785
  fieldId: string;
782
- label: string;
783
786
  helpText: string | null;
784
787
  placeholderText: string | null;
785
788
  validation: {
789
+ message: string;
786
790
  name: string;
787
791
  settings: {} & {
788
792
  [k: string]: unknown;
789
793
  };
790
- message: string;
791
794
  }[];
792
795
  listValidation: {
796
+ message: string;
793
797
  name: string;
794
798
  settings: {} & {
795
799
  [k: string]: unknown;
796
800
  };
797
- message: string;
798
801
  }[];
799
802
  multipleValues: boolean;
800
803
  tags: string[];
801
- settings: {} & {
802
- [k: string]: unknown;
803
- };
804
804
  predefinedValues?: {
805
805
  values: {
806
- label: string;
807
806
  value: string;
807
+ label: string;
808
808
  selected: boolean;
809
809
  }[];
810
810
  enabled: boolean;
@@ -826,10 +826,10 @@ export declare const createModelUpdateValidation: () => zod.ZodObject<{
826
826
  tags?: string[] | undefined;
827
827
  }, {
828
828
  fields: {
829
- id: string;
830
829
  type: string;
831
- fieldId: string;
830
+ id: string;
832
831
  label: string;
832
+ fieldId: string;
833
833
  storageId?: string | undefined;
834
834
  helpText?: string | null | undefined;
835
835
  placeholderText?: string | null | undefined;
@@ -838,8 +838,8 @@ export declare const createModelUpdateValidation: () => zod.ZodObject<{
838
838
  predefinedValues?: {
839
839
  enabled: boolean;
840
840
  values?: {
841
- label: string;
842
841
  value: string;
842
+ label: string;
843
843
  selected?: boolean | undefined;
844
844
  }[] | undefined;
845
845
  } | undefined;
@@ -6,9 +6,9 @@ export declare const createGroupCreateValidation: () => zod.ZodObject<{
6
6
  description: zod.ZodEffects<zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodString>>>, string, string | null | undefined>;
7
7
  icon: zod.ZodString;
8
8
  }, "strip", zod.ZodTypeAny, {
9
+ description: string;
9
10
  name: string;
10
11
  slug: string;
11
- description: string;
12
12
  icon: string;
13
13
  id?: string | null | undefined;
14
14
  }, {
@@ -1,3 +1,3 @@
1
1
  import { GraphQLHandlerFactoryParams } from "./graphQLHandlerFactory";
2
2
  export declare type CreateGraphQLParams = GraphQLHandlerFactoryParams;
3
- export declare const createGraphQL: (params: CreateGraphQLParams) => (import("@webiny/handler-graphql").GraphQLSchemaPlugin<import("../types").CmsContext> | import("@webiny/plugins/types").PluginCollection | import("@webiny/api").ContextPlugin<import("@webiny/api/types").Context>)[];
3
+ export declare const createGraphQL: (params: CreateGraphQLParams) => (import("@webiny/plugins/types").PluginCollection | import("@webiny/handler-graphql").GraphQLSchemaPlugin<import("../types").CmsContext> | import("@webiny/api").ContextPlugin<import("@webiny/api/types").Context>)[];
package/graphql/system.js CHANGED
@@ -43,7 +43,8 @@ const plugin = new _handlerGraphql.GraphQLSchemaPlugin({
43
43
  CmsQuery: {
44
44
  version: async (_, __, context) => {
45
45
  try {
46
- return context.cms.getSystemVersion();
46
+ const version = await context.cms.getSystemVersion();
47
+ return version ? "true" : null;
47
48
  } catch (e) {
48
49
  return new _handlerGraphql.ErrorResponse(e);
49
50
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_handlerGraphql","require","emptyResolver","plugin","GraphQLSchemaPlugin","typeDefs","resolvers","Query","cms","Mutation","CmsQuery","version","_","__","context","getSystemVersion","e","ErrorResponse","CmsMutation","install","code","message","installSystem","Response","name","createSystemSchemaPlugin","exports"],"sources":["system.ts"],"sourcesContent":["import { ErrorResponse, GraphQLSchemaPlugin, Response } from \"@webiny/handler-graphql\";\nimport { CmsContext } from \"~/types\";\n\nconst emptyResolver = () => ({});\n\nconst plugin = new GraphQLSchemaPlugin({\n typeDefs: /* GraphQL */ `\n extend type Query {\n cms: CmsQuery\n }\n\n extend type Mutation {\n cms: CmsMutation\n }\n\n type CmsQuery {\n _empty: String\n }\n\n type CmsMutation {\n _empty: String\n }\n extend type CmsQuery {\n # Get installed version\n version: String\n }\n\n extend type CmsMutation {\n # Install CMS\n install: CmsBooleanResponse\n }\n `,\n resolvers: {\n Query: {\n cms: emptyResolver\n },\n Mutation: {\n cms: emptyResolver\n },\n CmsQuery: {\n version: async (_: any, __: any, context: CmsContext) => {\n try {\n return context.cms.getSystemVersion();\n } catch (e) {\n return new ErrorResponse(e);\n }\n }\n },\n CmsMutation: {\n install: async (_: any, __: any, { cms }: CmsContext) => {\n try {\n const version = await cms.getSystemVersion();\n if (version) {\n return new ErrorResponse({\n code: \"CMS_INSTALLATION_ERROR\",\n message: \"CMS is already installed.\"\n });\n }\n\n await cms.installSystem();\n return new Response(true);\n } catch (e) {\n return new ErrorResponse(e);\n }\n }\n }\n }\n});\nplugin.name = \"cms.graphql.schema.system\";\n\nexport const createSystemSchemaPlugin = () => {\n return plugin;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAGA,MAAMC,aAAa,GAAGA,CAAA,MAAO,CAAC,CAAC,CAAC;AAEhC,MAAMC,MAAM,GAAG,IAAIC,mCAAmB,CAAC;EACnCC,QAAQ,EAAE,aAAe;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;EACDC,SAAS,EAAE;IACPC,KAAK,EAAE;MACHC,GAAG,EAAEN;IACT,CAAC;IACDO,QAAQ,EAAE;MACND,GAAG,EAAEN;IACT,CAAC;IACDQ,QAAQ,EAAE;MACNC,OAAO,EAAE,MAAAA,CAAOC,CAAM,EAAEC,EAAO,EAAEC,OAAmB,KAAK;QACrD,IAAI;UACA,OAAOA,OAAO,CAACN,GAAG,CAACO,gBAAgB,CAAC,CAAC;QACzC,CAAC,CAAC,OAAOC,CAAC,EAAE;UACR,OAAO,IAAIC,6BAAa,CAACD,CAAC,CAAC;QAC/B;MACJ;IACJ,CAAC;IACDE,WAAW,EAAE;MACTC,OAAO,EAAE,MAAAA,CAAOP,CAAM,EAAEC,EAAO,EAAE;QAAEL;MAAgB,CAAC,KAAK;QACrD,IAAI;UACA,MAAMG,OAAO,GAAG,MAAMH,GAAG,CAACO,gBAAgB,CAAC,CAAC;UAC5C,IAAIJ,OAAO,EAAE;YACT,OAAO,IAAIM,6BAAa,CAAC;cACrBG,IAAI,EAAE,wBAAwB;cAC9BC,OAAO,EAAE;YACb,CAAC,CAAC;UACN;UAEA,MAAMb,GAAG,CAACc,aAAa,CAAC,CAAC;UACzB,OAAO,IAAIC,wBAAQ,CAAC,IAAI,CAAC;QAC7B,CAAC,CAAC,OAAOP,CAAC,EAAE;UACR,OAAO,IAAIC,6BAAa,CAACD,CAAC,CAAC;QAC/B;MACJ;IACJ;EACJ;AACJ,CAAC,CAAC;AACFb,MAAM,CAACqB,IAAI,GAAG,2BAA2B;AAElC,MAAMC,wBAAwB,GAAGA,CAAA,KAAM;EAC1C,OAAOtB,MAAM;AACjB,CAAC;AAACuB,OAAA,CAAAD,wBAAA,GAAAA,wBAAA"}
1
+ {"version":3,"names":["_handlerGraphql","require","emptyResolver","plugin","GraphQLSchemaPlugin","typeDefs","resolvers","Query","cms","Mutation","CmsQuery","version","_","__","context","getSystemVersion","e","ErrorResponse","CmsMutation","install","code","message","installSystem","Response","name","createSystemSchemaPlugin","exports"],"sources":["system.ts"],"sourcesContent":["import { ErrorResponse, GraphQLSchemaPlugin, Response } from \"@webiny/handler-graphql\";\nimport { CmsContext } from \"~/types\";\n\nconst emptyResolver = () => ({});\n\nconst plugin = new GraphQLSchemaPlugin({\n typeDefs: /* GraphQL */ `\n extend type Query {\n cms: CmsQuery\n }\n\n extend type Mutation {\n cms: CmsMutation\n }\n\n type CmsQuery {\n _empty: String\n }\n\n type CmsMutation {\n _empty: String\n }\n extend type CmsQuery {\n # Get installed version\n version: String\n }\n\n extend type CmsMutation {\n # Install CMS\n install: CmsBooleanResponse\n }\n `,\n resolvers: {\n Query: {\n cms: emptyResolver\n },\n Mutation: {\n cms: emptyResolver\n },\n CmsQuery: {\n version: async (_: any, __: any, context: CmsContext) => {\n try {\n const version = await context.cms.getSystemVersion();\n return version ? \"true\" : null;\n } catch (e) {\n return new ErrorResponse(e);\n }\n }\n },\n CmsMutation: {\n install: async (_: any, __: any, { cms }: CmsContext) => {\n try {\n const version = await cms.getSystemVersion();\n if (version) {\n return new ErrorResponse({\n code: \"CMS_INSTALLATION_ERROR\",\n message: \"CMS is already installed.\"\n });\n }\n\n await cms.installSystem();\n return new Response(true);\n } catch (e) {\n return new ErrorResponse(e);\n }\n }\n }\n }\n});\nplugin.name = \"cms.graphql.schema.system\";\n\nexport const createSystemSchemaPlugin = () => {\n return plugin;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAGA,MAAMC,aAAa,GAAGA,CAAA,MAAO,CAAC,CAAC,CAAC;AAEhC,MAAMC,MAAM,GAAG,IAAIC,mCAAmB,CAAC;EACnCC,QAAQ,EAAE,aAAe;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;EACDC,SAAS,EAAE;IACPC,KAAK,EAAE;MACHC,GAAG,EAAEN;IACT,CAAC;IACDO,QAAQ,EAAE;MACND,GAAG,EAAEN;IACT,CAAC;IACDQ,QAAQ,EAAE;MACNC,OAAO,EAAE,MAAAA,CAAOC,CAAM,EAAEC,EAAO,EAAEC,OAAmB,KAAK;QACrD,IAAI;UACA,MAAMH,OAAO,GAAG,MAAMG,OAAO,CAACN,GAAG,CAACO,gBAAgB,CAAC,CAAC;UACpD,OAAOJ,OAAO,GAAG,MAAM,GAAG,IAAI;QAClC,CAAC,CAAC,OAAOK,CAAC,EAAE;UACR,OAAO,IAAIC,6BAAa,CAACD,CAAC,CAAC;QAC/B;MACJ;IACJ,CAAC;IACDE,WAAW,EAAE;MACTC,OAAO,EAAE,MAAAA,CAAOP,CAAM,EAAEC,EAAO,EAAE;QAAEL;MAAgB,CAAC,KAAK;QACrD,IAAI;UACA,MAAMG,OAAO,GAAG,MAAMH,GAAG,CAACO,gBAAgB,CAAC,CAAC;UAC5C,IAAIJ,OAAO,EAAE;YACT,OAAO,IAAIM,6BAAa,CAAC;cACrBG,IAAI,EAAE,wBAAwB;cAC9BC,OAAO,EAAE;YACb,CAAC,CAAC;UACN;UAEA,MAAMb,GAAG,CAACc,aAAa,CAAC,CAAC;UACzB,OAAO,IAAIC,wBAAQ,CAAC,IAAI,CAAC;QAC7B,CAAC,CAAC,OAAOP,CAAC,EAAE;UACR,OAAO,IAAIC,6BAAa,CAACD,CAAC,CAAC;QAC/B;MACJ;IACJ;EACJ;AACJ,CAAC,CAAC;AACFb,MAAM,CAACqB,IAAI,GAAG,2BAA2B;AAElC,MAAMC,wBAAwB,GAAGA,CAAA,KAAM;EAC1C,OAAOtB,MAAM;AACjB,CAAC;AAACuB,OAAA,CAAAD,wBAAA,GAAAA,wBAAA"}
package/index.d.ts CHANGED
@@ -4,7 +4,7 @@ import { entryFieldFromStorageTransform, entryFromStorageTransform, entryToStora
4
4
  export * from "./utils/isHeadlessCmsReady";
5
5
  export * from "./utils/createModelField";
6
6
  export declare type CreateHeadlessCmsGraphQLParams = CreateGraphQLParams;
7
- export declare const createHeadlessCmsGraphQL: (params?: CreateHeadlessCmsGraphQLParams) => (import("./plugins").CmsParametersPlugin | import("@webiny/handler-graphql").GraphQLSchemaPlugin<import("./types").CmsContext> | import("@webiny/plugins/types").PluginCollection | import("@webiny/api").ContextPlugin<import("@webiny/api/types").Context> | import("./plugins").CmsRichTextRendererPlugin<string | undefined>)[];
7
+ export declare const createHeadlessCmsGraphQL: (params?: CreateHeadlessCmsGraphQLParams) => (import("@webiny/plugins/types").PluginCollection | import("./plugins").CmsParametersPlugin | import("@webiny/handler-graphql").GraphQLSchemaPlugin<import("./types").CmsContext> | import("@webiny/api").ContextPlugin<import("@webiny/api/types").Context> | import("./plugins").CmsRichTextRendererPlugin<string | undefined>)[];
8
8
  export declare type ContentContextParams = CrudParams;
9
9
  export declare const createHeadlessCmsContext: (params: ContentContextParams) => (import("./types").ModelManagerPlugin | import("./plugins").StorageTransformPlugin<any, any, import("./types").CmsModelField> | import("@webiny/api").ContextPlugin<import("./types").CmsContext> | import("./plugins").StorageTransformPlugin<any, any, import("./types").CmsModelDynamicZoneField> | import("./types").CmsModelFieldToGraphQLPlugin<any>[] | (import("./types").CmsModelFieldValidatorPlugin | import("./types").CmsModelFieldPatternValidatorPlugin[])[] | (import("./fieldConverters/CmsModelObjectFieldConverterPlugin").CmsModelObjectFieldConverterPlugin | import("./fieldConverters/CmsModelDefaultFieldConverterPlugin").CmsModelDefaultFieldConverterPlugin | import("./fieldConverters/CmsModelDynamicZoneFieldConverterPlugin").CmsModelDynamicZoneFieldConverterPlugin)[])[];
10
10
  export * from "./graphqlFields";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/api-headless-cms",
3
- "version": "5.39.3",
3
+ "version": "5.40.0-beta.0",
4
4
  "main": "index.js",
5
5
  "keywords": [
6
6
  "cms:base"
@@ -20,20 +20,20 @@
20
20
  "dependencies": {
21
21
  "@babel/runtime": "7.22.6",
22
22
  "@graphql-tools/schema": "7.1.5",
23
- "@webiny/api": "5.39.3",
24
- "@webiny/api-i18n": "5.39.3",
25
- "@webiny/api-security": "5.39.3",
26
- "@webiny/api-tenancy": "5.39.3",
27
- "@webiny/error": "5.39.3",
28
- "@webiny/handler": "5.39.3",
29
- "@webiny/handler-aws": "5.39.3",
30
- "@webiny/handler-db": "5.39.3",
31
- "@webiny/handler-graphql": "5.39.3",
32
- "@webiny/lexical-converter": "5.39.3",
33
- "@webiny/plugins": "5.39.3",
34
- "@webiny/pubsub": "5.39.3",
35
- "@webiny/utils": "5.39.3",
36
- "@webiny/validation": "5.39.3",
23
+ "@webiny/api": "5.40.0-beta.0",
24
+ "@webiny/api-i18n": "5.40.0-beta.0",
25
+ "@webiny/api-security": "5.40.0-beta.0",
26
+ "@webiny/api-tenancy": "5.40.0-beta.0",
27
+ "@webiny/error": "5.40.0-beta.0",
28
+ "@webiny/handler": "5.40.0-beta.0",
29
+ "@webiny/handler-aws": "5.40.0-beta.0",
30
+ "@webiny/handler-db": "5.40.0-beta.0",
31
+ "@webiny/handler-graphql": "5.40.0-beta.0",
32
+ "@webiny/lexical-converter": "5.40.0-beta.0",
33
+ "@webiny/plugins": "5.40.0-beta.0",
34
+ "@webiny/pubsub": "5.40.0-beta.0",
35
+ "@webiny/utils": "5.40.0-beta.0",
36
+ "@webiny/validation": "5.40.0-beta.0",
37
37
  "code-frame": "5.0.0",
38
38
  "dot-prop": "6.0.1",
39
39
  "graphql-tag": "2.12.6",
@@ -50,9 +50,9 @@
50
50
  "@babel/cli": "7.22.6",
51
51
  "@babel/core": "7.22.8",
52
52
  "@babel/preset-env": "7.22.7",
53
- "@webiny/api-wcp": "5.39.3",
54
- "@webiny/cli": "5.39.3",
55
- "@webiny/project-utils": "5.39.3",
53
+ "@webiny/api-wcp": "5.40.0-beta.0",
54
+ "@webiny/cli": "5.40.0-beta.0",
55
+ "@webiny/project-utils": "5.40.0-beta.0",
56
56
  "apollo-graphql": "0.9.7",
57
57
  "get-yarn-workspaces": "1.0.2",
58
58
  "graphql": "15.8.0",
@@ -72,5 +72,5 @@
72
72
  "build": "yarn webiny run build",
73
73
  "watch": "yarn webiny run watch"
74
74
  },
75
- "gitHead": "27c219c64a0a056e9b7e57112e76c8a87185f178"
75
+ "gitHead": "d716758f56ca020dfaf8147cd908dddfaaf0937f"
76
76
  }
package/types.d.ts CHANGED
@@ -245,6 +245,7 @@ export interface CmsDynamicZoneTemplate {
245
245
  fields: CmsModelField[];
246
246
  layout: string[][];
247
247
  validation: CmsModelFieldValidation[];
248
+ tags?: string[];
248
249
  }
249
250
  /**
250
251
  * A definition for dynamic-zone field to show possible type of the field in settings.
package/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["CONTENT_ENTRY_STATUS","exports"],"sources":["types.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins/types\";\nimport { I18NContext, I18NLocale } from \"@webiny/api-i18n/types\";\nimport { Context } from \"@webiny/api/types\";\nimport {\n GraphQLFieldResolver,\n GraphQLSchemaDefinition,\n Resolvers\n} from \"@webiny/handler-graphql/types\";\nimport { SecurityPermission } from \"@webiny/api-security/types\";\nimport { DbContext } from \"@webiny/handler-db/types\";\nimport { Topic } from \"@webiny/pubsub/types\";\nimport { CmsModelConverterCallable } from \"~/utils/converters/ConverterCollection\";\nimport { HeadlessCmsExport, HeadlessCmsImport } from \"~/export/types\";\nimport { AccessControl } from \"~/crud/AccessControl/AccessControl\";\nimport { ModelGroupsPermissions } from \"~/utils/permissions/ModelGroupsPermissions\";\nimport { ModelsPermissions } from \"~/utils/permissions/ModelsPermissions\";\nimport { EntriesPermissions } from \"~/utils/permissions/EntriesPermissions\";\n\nexport type ApiEndpoint = \"manage\" | \"preview\" | \"read\";\n\ninterface HeadlessCmsPermissions {\n groups: ModelGroupsPermissions;\n models: ModelsPermissions;\n entries: EntriesPermissions;\n}\n\nexport interface HeadlessCms\n extends CmsSystemContext,\n CmsGroupContext,\n CmsModelContext,\n CmsEntryContext {\n /**\n * API type\n */\n type: ApiEndpoint | null;\n /**\n * Requested locale\n */\n locale: string;\n /**\n * returns an instance of current locale\n */\n getLocale: () => I18NLocale;\n /**\n * Means this request is a READ API\n */\n READ: boolean;\n /**\n * Means this request is a MANAGE API\n */\n MANAGE: boolean;\n /**\n * Means this request is a PREVIEW API\n */\n PREVIEW: boolean;\n /**\n * The storage operations loaded for current context.\n */\n storageOperations: HeadlessCmsStorageOperations;\n\n /**\n * Use to ensure perform authorization and ensure identities have access to the groups, models and entries.\n */\n accessControl: AccessControl;\n\n /**\n * Permissions for groups, models and entries.\n * @internal\n * @deprecated Will be removed with the 5.40.0 release. Use `accessControl` instead.\n */\n permissions: HeadlessCmsPermissions;\n\n /**\n * Export operations.\n */\n export: HeadlessCmsExport;\n importing: HeadlessCmsImport;\n}\n\n/**\n * @description This combines all contexts used in the CMS into a single one.\n *\n * @category Context\n */\nexport interface CmsContext extends Context, DbContext, I18NContext {\n cms: HeadlessCms;\n}\n\ninterface CmsModelFieldPredefinedValuesValue {\n value: string;\n label: string;\n /**\n * Default selected predefined value.\n */\n selected?: boolean;\n}\n\n/**\n * Object containing content model field predefined options and values.\n *\n * @category CmsModelField\n */\nexport interface CmsModelFieldPredefinedValues {\n /**\n * Are predefined field values enabled?\n */\n enabled: boolean;\n /**\n * Predefined values array.\n */\n values: CmsModelFieldPredefinedValuesValue[];\n}\n\n/**\n * Object containing content model field renderer options.\n *\n * @category CmsModelField\n */\ninterface CmsModelFieldRenderer {\n /**\n * Name of the field renderer. Must have one in field renderer plugins.\n * Can be blank to let automatically determine the renderer.\n */\n name: string;\n}\n\n/**\n * A definition for content model field settings.\n *\n * @category ModelField\n * @category Database model\n */\nexport interface CmsModelFieldSettings {\n /**\n * Predefined values (text, number)\n * The default value for the field in case it is not predefined values field.\n */\n defaultValue?: string | number | null | undefined;\n /**\n * Object field has child fields.\n */\n fields?: CmsModelField[];\n /**\n * Is the file field images only one?\n */\n imagesOnly?: boolean;\n /**\n * Object field has child fields - so it needs to have a layout.\n */\n layout?: string[][];\n /**\n * Ref field.\n */\n models?: Pick<CmsModel, \"modelId\">[];\n /**\n * Date field.\n */\n type?: string;\n /**\n * Disable full text search explicitly on this field.\n */\n disableFullTextSearch?: boolean;\n\n /**\n * There are a lot of other settings that are possible to add, so we keep the type opened.\n */\n [key: string]: any;\n}\n\nexport type CmsModelFieldType =\n | \"boolean\"\n | \"datetime\"\n | \"file\"\n | \"long-text\"\n | \"number\"\n | \"json\"\n | \"object\"\n | \"ref\"\n | \"rich-text\"\n | \"text\"\n | \"dynamicZone\"\n | string;\n\n/**\n * A definition for content model field. This type exists on the app side as well.\n *\n * @category ModelField\n * @category Database model\n */\nexport interface CmsModelField {\n /**\n * A generated unique ID for the model field.\n * MUST be absolute unique throughout the models.\n * Must be in form of a-zA-Z0-9.\n *\n * We generate a unique id value when you're building a model via UI,\n * but when user is creating a model via a plugin it is up to them to be careful about this.\n */\n id: string;\n /**\n * A type of the field.\n * We are defining our built-in fields, so people know which are available by the default.\n */\n type: CmsModelFieldType;\n /**\n * A unique storage ID for storing actual values.\n * Must in form of a-zA-Z0-9@a-zA-Z0-9\n *\n * This is an auto-generated value: uses `id` and `type`\n *\n * This is used as path for the entry value.\n */\n storageId: `${string}@${string}` | string;\n /**\n * Field identifier for the model field that will be available to the outside world.\n * `storageId` is used as path (or column) to store the data.\n *\n * Must in form of a-zA-Z0-9.\n *\n * This value MUST be unique in the CmsModel.\n */\n fieldId: string;\n /**\n * A label for the field\n */\n label: string;\n /**\n * Text below the field to clarify what is it meant to be in the field value\n */\n helpText?: string | null;\n /**\n * Text to be displayed in the field\n */\n placeholderText?: string | null;\n /**\n * Are predefined values enabled? And list of them\n */\n predefinedValues?: CmsModelFieldPredefinedValues;\n /**\n * Field renderer. Blank if determined automatically.\n */\n renderer?: CmsModelFieldRenderer;\n /**\n * List of validations for the field\n *\n * @default []\n */\n validation?: CmsModelFieldValidation[];\n /**\n * List of validations for the list of values, when a field is set to accept a list of values.\n * These validations will be applied to the entire list, and `validation` (see above) will be applied\n * to each individual value in the list.\n *\n * @default []\n */\n listValidation?: CmsModelFieldValidation[];\n /**\n * Is this a multiple values field?\n *\n */\n multipleValues?: boolean;\n /**\n * Fields can be tagged to give them contextual meaning.\n */\n tags?: string[];\n /**\n * Any user defined settings.\n *\n * @default {}\n */\n settings?: CmsModelFieldSettings;\n}\n\nexport interface CmsDynamicZoneTemplate {\n id: string;\n name: string;\n gqlTypeName: string;\n description: string;\n icon: string;\n fields: CmsModelField[];\n layout: string[][];\n validation: CmsModelFieldValidation[];\n}\n\n/**\n * A definition for dynamic-zone field to show possible type of the field in settings.\n */\nexport interface CmsModelDynamicZoneField extends CmsModelField {\n /**\n * Settings object for the field. Contains `templates` property.\n */\n settings: {\n templates: CmsDynamicZoneTemplate[];\n };\n}\n\n/**\n * Used for our internal functionality.\n */\nexport interface CmsModelFieldWithParent extends CmsModelField {\n parent?: CmsModelFieldWithParent | null;\n}\n\n/**\n * A definition for dateTime field to show possible type of the field in settings.\n */\nexport interface CmsModelDateTimeField extends CmsModelField {\n /**\n * Settings object for the field. Contains `type` property.\n */\n settings: {\n type: \"time\" | \"date\" | \"dateTimeWithoutTimezone\" | \"dateTimeWithTimezone\";\n };\n}\n\n/**\n * Arguments for the field validator validate method.\n *\n * @category ModelField\n * @category FieldValidation\n */\nexport interface CmsModelFieldValidatorValidateParams<T = any> {\n /**\n * A value to be validated.\n */\n value: T;\n /**\n * Options from the CmsModelField validations.\n *\n * @see CmsModelField.validation\n * @see CmsModelField.listValidation\n */\n validator: CmsModelFieldValidation;\n /**\n * An instance of the current context.\n */\n context: CmsContext;\n /**\n * Field being validated.\n */\n field: CmsModelField;\n /**\n * An instance of the content model being validated.\n */\n model: CmsModel;\n /**\n * If entry is sent it means it is an update operation.\n * First usage is for the unique field value.\n */\n entry?: CmsEntry;\n}\n\n/**\n * Definition for the field validator.\n *\n * @category Plugin\n * @category ModelField\n * @category FieldValidation\n */\nexport interface CmsModelFieldValidatorPluginValidateCb {\n (params: CmsModelFieldValidatorValidateParams): Promise<boolean>;\n}\n\nexport interface CmsModelFieldValidatorPlugin extends Plugin {\n /**\n * A plugin type.\n */\n type: \"cms-model-field-validator\";\n /**\n * Actual validator definition.\n */\n validator: {\n /**\n * Name of the validator.\n */\n name: string;\n /**\n * Validation method.\n */\n validate: CmsModelFieldValidatorPluginValidateCb;\n };\n}\n\n/**\n * A pattern validator for the content entry field value.\n *\n * @category Plugin\n * @category ModelField\n * @category FieldValidation\n */\nexport interface CmsModelFieldPatternValidatorPlugin extends Plugin {\n /**\n * A plugin type\n */\n type: \"cms-model-field-validator-pattern\";\n /**\n * A pattern object for the validator.\n */\n pattern: {\n /**\n * name of the pattern.\n */\n name: string;\n /**\n * RegExp of the validator.\n */\n regex: string;\n /**\n * RegExp flags\n */\n flags: string;\n };\n}\n\n/**\n * Locked field in the content model\n *\n * @see CmsModel.lockedFields\n *\n * @category ModelField\n */\nexport interface LockedField {\n /**\n * Locked field storage ID - one used to store values.\n * We cannot change this due to old systems.\n */\n fieldId: string;\n /**\n * Is the field multiple values field?\n */\n multipleValues: boolean;\n /**\n * Field type.\n */\n type: string;\n\n [key: string]: any;\n}\n\n/**\n * @category Database model\n * @category CmsModel\n */\nexport interface CmsModelGroup {\n /**\n * Generated ID of the group\n */\n id: string;\n /**\n * Name of the group\n */\n name: string;\n}\n\nexport interface CmsModelAuthorization {\n permissions: boolean;\n\n [key: string]: any;\n}\n\n/**\n * Base CMS Model. Should not be exported and used outside of this package.\n *\n * @category Database model\n * @category CmsModel\n */\nexport interface CmsModel {\n /**\n * Name of the content model.\n */\n name: string;\n /**\n * Unique ID for the content model. Created from name if not defined by user.\n */\n modelId: string;\n /**\n * Name of the content model in singular form to be used in the API.\n * example:\n * - Article\n * - Fruit\n * - Vegetable\n * - Car\n */\n singularApiName: string;\n /**\n * Name of the content model in plural form to be used in the API.\n * example:\n * - Articles\n * - Fruits\n * - Vegetables\n * - Cars\n */\n pluralApiName: string;\n /**\n * Model tenant.\n */\n tenant: string;\n /**\n * Locale this model belongs to.\n */\n locale: string;\n /**\n * Cms Group reference object.\n */\n group: CmsModelGroup;\n /**\n * Icon for the content model.\n */\n icon?: string | null;\n /**\n * Description for the content model.\n */\n description: string | null;\n /**\n * Date created\n */\n createdOn?: string;\n /**\n * Date saved. Changes on both save and create.\n */\n savedOn?: string;\n /**\n * CreatedBy object wrapper. Contains id, name and type of the user.\n */\n createdBy?: CmsIdentity;\n /**\n * List of fields defining entry values.\n */\n fields: CmsModelField[];\n /**\n * Admin UI field layout\n *\n * ```ts\n * layout: [\n * [field1id, field2id],\n * [field3id]\n * ]\n * ```\n */\n layout: string[][];\n /**\n * Models can be tagged to give them contextual meaning.\n */\n tags?: string[];\n /**\n * List of locked fields. Updated when entry is saved and a field has been used.\n */\n lockedFields?: LockedField[];\n /**\n * The field that is being displayed as entry title.\n * It is picked as first available text field. Or user can select own field.\n */\n titleFieldId: string;\n /**\n * The field which is displayed as the description one.\n * Only way this is null or undefined is that there are no long-text fields to be set as description.\n */\n descriptionFieldId?: string | null;\n /**\n * The field which is displayed as the image.\n * Only way this is null or undefined is that there are no file fields, with images only set, to be set as image.\n */\n imageFieldId?: string | null;\n /**\n * The version of Webiny which this record was stored with.\n */\n webinyVersion: string;\n\n /**\n * Is model private?\n * This is meant to be used for some internal models - will not be visible in the schema.\n * Only available for the plugin constructed models.\n */\n isPrivate?: boolean;\n\n /**\n * Does this model require authorization to be performed?\n * Only available for models created via plugins.\n */\n authorization?: boolean | CmsModelAuthorization;\n\n /**\n * Is this model created via plugin?\n */\n isPlugin?: boolean;\n}\n\n/**\n * When sending model to the storage operations, it must contain createValueKeyToStorageConverter and createValueKeyFromStorageConverter\n *\n * @category CmsModel\n */\nexport interface StorageOperationsCmsModel extends CmsModel {\n convertValueKeyToStorage: CmsModelConverterCallable;\n convertValueKeyFromStorage: CmsModelConverterCallable;\n}\n\n/**\n * @category ModelField\n */\nexport interface CmsModelFieldDefinition {\n fields: string;\n typeDefs?: string;\n}\n\ninterface CmsModelFieldToGraphQLCreateResolverParams<TField> {\n models: CmsModel[];\n model: CmsModel;\n graphQLType: string;\n field: TField;\n createFieldResolvers: any;\n fieldTypePlugins: CmsFieldTypePlugins;\n}\n\nexport interface CmsModelFieldToGraphQLCreateResolver<TField = CmsModelField> {\n (params: CmsModelFieldToGraphQLCreateResolverParams<TField>):\n | GraphQLFieldResolver\n | {\n resolver: GraphQLFieldResolver | null;\n typeResolvers: Resolvers<CmsContext>;\n }\n | false;\n}\n\nexport interface CmsModelFieldToGraphQLPluginValidateChildFieldsValidateParams<\n TField extends CmsModelField = CmsModelField\n> {\n fields: TField[];\n originalFields: TField[];\n}\n\nexport interface CmsModelFieldToGraphQLPluginValidateChildFieldsValidate {\n (params: CmsModelFieldToGraphQLPluginValidateChildFieldsValidateParams): void;\n}\n\nexport interface CmsModelFieldToGraphQLPluginValidateChildFieldsParams<\n TField extends CmsModelField = CmsModelField\n> {\n field: TField;\n originalField?: TField;\n validate: CmsModelFieldToGraphQLPluginValidateChildFieldsValidate;\n}\n\nexport interface CmsModelFieldToGraphQLPluginValidateChildFields<\n TField extends CmsModelField = CmsModelField\n> {\n (params: CmsModelFieldToGraphQLPluginValidateChildFieldsParams<TField>): void;\n}\n\n/**\n * @category Plugin\n * @category ModelField\n * @category GraphQL\n */\nexport interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = CmsModelField>\n extends Plugin {\n /**\n * A plugin type\n */\n type: \"cms-model-field-to-graphql\";\n /**\n * Field type name which must be exact as the one in `CmsEditorFieldTypePlugin` plugin.\n *\n * ```ts\n * fieldType: \"myField\"\n * ```\n */\n fieldType: CmsModelFieldType;\n /**\n * Is the field searchable via the GraphQL?\n *\n * ```ts\n * isSearchable: false\n * ```\n */\n isSearchable: boolean;\n /**\n * Is the field searchable via full text search?\n *\n * Field is not full text searchable by default.\n * ```ts\n * fullTextSearch: false\n * ```\n */\n fullTextSearch?: boolean;\n /**\n * Is the field sortable via the GraphQL?\n *\n * ```ts\n * isSortable: true\n * ```\n */\n isSortable: boolean;\n /**\n * Optional method which creates the storageId.\n * Primary use is for the datetime field, but if users has some specific fields, they can customize the storageId to their needs.\n *\n * ```ts\n * createStorageId: ({field}) => {\n * if (field.settings.type === \"time) {\n * return `${field.type}_time@${field.id}`\n * }\n * // use default method\n * return undefined;\n * }\n * ```\n */\n createStorageId?: (params: {\n model: CmsModel;\n field: Omit<TField, \"storageId\"> & Partial<Pick<TField, \"storageId\">>;\n }) => string | null | undefined;\n /**\n * Read API methods.\n */\n read: {\n /**\n * Definition for get filtering for GraphQL.\n *\n * ```ts\n * read: {\n * createGetFilters({ field }) {\n * return `${field.fieldId}: MyField`;\n * }\n * }\n * ```\n */\n createGetFilters?(params: { field: TField }): string;\n /**\n * Definition for list filtering for GraphQL.\n *\n * ```ts\n * read: {\n * createListFilters({ field }) {\n * return `\n * ${field.fieldId}: MyType\n * ${field.fieldId}_not: MyType\n * ${field.fieldId}_in: [MyType]\n * ${field.fieldId}_not_in: [MyType]\n * `;\n * }\n * }\n * ```\n */\n createListFilters?(params: {\n model: Pick<CmsModel, \"singularApiName\">;\n field: TField;\n plugins: CmsFieldTypePlugins;\n }): string;\n /**\n * Definition of the field type for GraphQL - be aware if multiple values is selected.\n *\n * ```ts\n * read: {\n * createTypeField({ field }) {\n * if (field.multipleValues) {\n * return `${field.fieldId}: [MyFieldType]`;\n * }\n *\n * return `${field.fieldId}: MyField`;\n * }\n * }\n * ```\n */\n createTypeField(params: {\n models: CmsModel[];\n model: CmsModel;\n field: TField;\n fieldTypePlugins: CmsFieldTypePlugins;\n }): CmsModelFieldDefinition | string | null;\n /**\n * Definition for field resolver.\n * By default, it is simple return of the `instance.values[storageId]` but if required, users can define their own.\n *\n * ```ts\n * read: {\n * createResolver({ field }) {\n * return instance => {\n * return instance.values[field.storageId];\n * };\n * }\n * }\n * ```\n */\n createResolver?: CmsModelFieldToGraphQLCreateResolver<TField>;\n /**\n * Read API schema definitions for the field and resolvers for them.\n *\n * ```ts\n * read: {\n * createSchema() {\n * return {\n * typeDefs: `\n * myField {\n * id\n * date\n * }\n * `,\n * resolvers: {}\n * }\n * }\n * }\n * ```\n */\n createSchema?: (params: { models: CmsModel[] }) => GraphQLSchemaDefinition<CmsContext>;\n };\n manage: {\n /**\n * Definition for list filtering for GraphQL.\n *\n * ```ts\n * manage: {\n * createListFilters({ field }) {\n * return `\n * ${field.fieldId}: MyType\n * ${field.fieldId}_not: MyType\n * ${field.fieldId}_in: [MyType]\n * ${field.fieldId}_not_in: [MyType]\n * `;\n * }\n * }\n * ```\n */\n createListFilters?: (params: {\n model: Pick<CmsModel, \"singularApiName\">;\n field: TField;\n plugins: CmsFieldTypePlugins;\n }) => string;\n /**\n * Manage API schema definitions for the field and resolvers for them. Probably similar to `read.createSchema`.\n *\n * ```ts\n * createSchema() {\n * return {\n * typeDefs: `\n * myField {\n * id\n * date\n * }\n * `,\n * resolvers: {}\n * }\n * }\n * ```\n */\n createSchema?: (params: { models: CmsModel[] }) => GraphQLSchemaDefinition<CmsContext>;\n /**\n * Definition of the field type for GraphQL - be aware if multiple values is selected. Probably same as `read.createTypeField`.\n *\n * ```ts\n * manage: {\n * createTypeField({ field }) {\n * if (field.multipleValues) {\n * return field.fieldId + \": [MyType]\";\n * }\n *\n * return field.fieldId + \": MyType\";\n * }\n * }\n * ```\n */\n createTypeField: (params: {\n models: CmsModel[];\n model: CmsModel;\n field: TField;\n fieldTypePlugins: CmsFieldTypePlugins;\n }) => CmsModelFieldDefinition | string | null;\n /**\n * Definition for input GraphQL field type.\n *\n * ```ts\n * manage: {\n * createInputField({ field }) {\n * if (field.multipleValues) {\n * return field.fieldId + \": [MyField]\";\n * }\n *\n * return field.fieldId + \": MyField\";\n * }\n * }\n * ```\n */\n createInputField: (params: {\n models: CmsModel[];\n model: CmsModel;\n field: TField;\n fieldTypePlugins: CmsFieldTypePlugins;\n }) => CmsModelFieldDefinition | string | null;\n /**\n * Definition for field resolver.\n * By default, it is simple return of the `instance.values[storageId]` but if required, users can define their own.\n *\n * ```ts\n * manage: {\n * createResolver({ field }) {\n * return instance => {\n * return instance.values[field.storageId];\n * };\n * }\n * }\n * ```\n */\n createResolver?: CmsModelFieldToGraphQLCreateResolver<TField>;\n };\n /**\n *\n * @param field\n */\n validateChildFields?: CmsModelFieldToGraphQLPluginValidateChildFields<TField>;\n}\n\n/**\n * Check for content model locked field.\n * A custom plugin definable by the user.\n *\n * @category CmsModel\n * @category Plugin\n */\nexport interface CmsModelLockedFieldPlugin extends Plugin {\n /**\n * A plugin type\n */\n type: \"cms-model-locked-field\";\n /**\n * A unique identifier of the field type (text, number, json, myField, ...).\n */\n fieldType: string;\n /**\n * A method to check if field really is locked.\n */\n checkLockedField?: (params: { lockedField: LockedField; field: CmsModelField }) => void;\n /**\n * A method to get the locked field data.\n */\n getLockedFieldData?: (params: { field: CmsModelField }) => Record<string, any>;\n}\n\n/**\n * @category ModelField\n */\nexport interface CmsFieldTypePlugins {\n [key: string]: CmsModelFieldToGraphQLPlugin;\n}\n\n/**\n * An interface describing the reference to a user that created some data in the database.\n *\n * @category General\n */\nexport interface CmsIdentity {\n /**\n * ID if the user.\n */\n id: string;\n /**\n * Full name of the user.\n */\n displayName: string | null;\n /**\n * Type of the user (admin, user)\n */\n type: string;\n}\n\nexport interface OnSystemBeforeInstallTopicParams {\n tenant: string;\n locale: string;\n}\n\nexport interface OnSystemAfterInstallTopicParams {\n tenant: string;\n locale: string;\n}\n\nexport interface OnSystemInstallErrorTopicParams {\n error: Error;\n tenant: string;\n locale: string;\n}\n\nexport type CmsSystemContext = {\n getSystemVersion: () => Promise<string | null>;\n setSystemVersion: (version: string) => Promise<void>;\n installSystem: () => Promise<void>;\n /**\n * Lifecycle Events\n */\n onSystemBeforeInstall: Topic<OnSystemBeforeInstallTopicParams>;\n onSystemAfterInstall: Topic<OnSystemAfterInstallTopicParams>;\n onSystemInstallError: Topic<OnSystemInstallErrorTopicParams>;\n};\n\n/**\n * A GraphQL `params.data` parameter received when creating content model group.\n *\n * @category CmsGroup\n * @category GraphQL params\n */\nexport interface CmsGroupCreateInput {\n id?: string;\n name: string;\n slug?: string;\n description?: string | null;\n icon: string;\n}\n\n/**\n * A GraphQL `params.data` parameter received when updating content model group.\n *\n * @category CmsGroup\n * @category GraphQL params\n */\nexport interface CmsGroupUpdateInput {\n name?: string;\n slug?: string;\n description?: string;\n icon?: string;\n}\n\n/**\n * A representation of content model group in the database.\n *\n * @category CmsGroup\n * @category Database model\n */\nexport interface CmsGroup {\n /**\n * Generated ID.\n */\n id: string;\n /**\n * Name of the group.\n */\n name: string;\n /**\n * Slug for the group. Must be unique.\n */\n slug: string;\n /**\n * Group tenant.\n */\n tenant: string;\n /**\n * Locale this group belongs to.\n */\n locale: string;\n /**\n * Description for the group.\n */\n description: string | null;\n /**\n * Icon for the group. In a form of \"ico/ico\".\n */\n icon: string;\n /**\n * CreatedBy reference object.\n */\n createdBy?: CmsIdentity;\n /**\n * Date group was created on.\n */\n createdOn?: string;\n /**\n * Date group was created or changed on.\n */\n savedOn?: string;\n /**\n * Which Webiny version was this record stored with.\n */\n webinyVersion: string;\n /**\n * Is group private?\n * This is meant to be used for some internal groups - will not be visible in the schema.\n * Only available for the plugin constructed groups.\n */\n isPrivate?: boolean;\n /**\n * Is this group created via plugin?\n */\n isPlugin?: boolean;\n}\n\n/**\n * A `data.where` parameter received when listing content model groups.\n *\n * @category CmsGroup\n * @category GraphQL params\n */\nexport interface CmsGroupListParams {\n where: {\n tenant: string;\n locale: string;\n };\n}\n\n/**\n * @category CmsGroup\n * @category Topic\n */\nexport interface OnGroupBeforeCreateTopicParams {\n group: CmsGroup;\n}\n\n/**\n * @category CmsGroup\n * @category Topic\n */\nexport interface OnGroupAfterCreateTopicParams {\n group: CmsGroup;\n}\n\n/**\n * @category CmsGroup\n * @category Topic\n */\nexport interface OnGroupCreateErrorTopicParams {\n input: CmsGroupCreateInput;\n group: CmsGroup;\n error: Error;\n}\n\n/**\n * @category CmsGroup\n * @category Topic\n */\nexport interface OnGroupBeforeUpdateTopicParams {\n original: CmsGroup;\n group: CmsGroup;\n}\n\n/**\n * @category CmsGroup\n * @category Topic\n */\nexport interface OnGroupAfterUpdateTopicParams {\n original: CmsGroup;\n group: CmsGroup;\n}\n\n/**\n * @category CmsGroup\n * @category Topic\n */\nexport interface OnGroupUpdateErrorTopicParams {\n input: CmsGroupUpdateInput;\n original: CmsGroup;\n group: CmsGroup;\n error: Error;\n}\n\n/**\n * @category CmsGroup\n * @category Topic\n */\nexport interface OnGroupBeforeDeleteTopicParams {\n group: CmsGroup;\n}\n\n/**\n * @category CmsGroup\n * @category Topic\n */\nexport interface OnGroupAfterDeleteTopicParams {\n group: CmsGroup;\n}\n\n/**\n * @category CmsGroup\n * @category Topic\n */\nexport interface OnGroupDeleteErrorTopicParams {\n group: CmsGroup;\n error: Error;\n}\n\n/**\n * Cms Group in context.\n *\n * @category Context\n * @category CmsGroup\n */\nexport interface CmsGroupContext {\n /**\n * Gets content model group by given id.\n */\n getGroup: (id: string) => Promise<CmsGroup>;\n /**\n * List all content model groups. Filterable via params.\n */\n listGroups: (params?: CmsGroupListParams) => Promise<CmsGroup[]>;\n /**\n * Create a new content model group.\n */\n createGroup: (data: CmsGroupCreateInput) => Promise<CmsGroup>;\n /**\n * Update existing content model group.\n */\n updateGroup: (id: string, data: CmsGroupUpdateInput) => Promise<CmsGroup>;\n /**\n * Delete content model group by given id.\n */\n deleteGroup: (id: string) => Promise<boolean>;\n /**\n * Clear the cached groups.\n */\n clearGroupsCache: () => void;\n /**\n * Lifecycle Events\n */\n onGroupBeforeCreate: Topic<OnGroupBeforeCreateTopicParams>;\n onGroupAfterCreate: Topic<OnGroupAfterCreateTopicParams>;\n onGroupCreateError: Topic<OnGroupCreateErrorTopicParams>;\n onGroupBeforeUpdate: Topic<OnGroupBeforeUpdateTopicParams>;\n onGroupAfterUpdate: Topic<OnGroupAfterUpdateTopicParams>;\n onGroupUpdateError: Topic<OnGroupUpdateErrorTopicParams>;\n onGroupBeforeDelete: Topic<OnGroupBeforeDeleteTopicParams>;\n onGroupAfterDelete: Topic<OnGroupAfterDeleteTopicParams>;\n onGroupDeleteError: Topic<OnGroupDeleteErrorTopicParams>;\n}\n\n/**\n * Definition for content model field validator.\n *\n * @category ModelField\n * @category FieldValidation\n */\nexport interface CmsModelFieldValidation {\n name: string;\n message: string;\n settings?: {\n value?: string | number;\n values?: string[];\n preset?: string;\n [key: string]: any;\n };\n}\n\n/**\n * A GraphQL `params.data` parameter received when creating content model.\n *\n * @category GraphQL params\n * @category CmsModel\n */\nexport interface CmsModelCreateInput {\n /**\n * Name of the content model.\n */\n name: string;\n /**\n * Singular name of the content model to be used in the API.\n */\n singularApiName: string;\n /**\n * Plural name of the content model to be used in the API.\n */\n pluralApiName: string;\n /**\n * Unique ID of the content model. Created from name if not sent by the user. Cannot be changed.\n */\n modelId?: string;\n /**\n * Description of the content model.\n */\n description?: string | null;\n /**\n * Group where to put the content model in.\n */\n group: string;\n /**\n * A list of content model fields to define the entry values.\n */\n fields?: CmsModelFieldInput[];\n /**\n * Admin UI field layout\n *\n * ```ts\n * layout: [\n * [field1id, field2id],\n * [field3id]\n * ]\n * ```\n */\n layout?: string[][];\n /**\n * Models can be tagged to give them contextual meaning.\n */\n tags?: string[];\n /**\n * Fields fieldId which are picked to represent the CMS entry.\n */\n titleFieldId?: string | null;\n descriptionFieldId?: string | null;\n imageFieldId?: string | null;\n}\n\n/**\n * A GraphQL `params.data` parameter received when creating content model from existing model.\n *\n * @category GraphQL params\n * @category CmsModel\n */\nexport interface CmsModelCreateFromInput extends CmsModelCreateInput {\n /**\n * Locale into which we want to clone the model into.\n */\n locale?: string;\n}\n\n/**\n * A definition for content model field received from the user.\n *\n * Input type for `CmsModelField`.\n * @see CmsModelField\n *\n * @category GraphQL params\n * @category ModelField\n */\nexport interface CmsModelFieldInput {\n /**\n * Generated ID.\n */\n id: string;\n /**\n * Type of the field. A plugin for the field must be defined.\n * @see CmsModelFieldToGraphQLPlugin\n */\n type: string;\n /**\n * Field outside world identifier for the field. Must be unique in the model.\n */\n fieldId: string;\n /**\n * Label for the field.\n */\n label: string;\n /**\n * Text to display below the field to help user what to write in the field.\n */\n helpText?: string | null;\n /**\n * Text to display in the field.\n */\n placeholderText?: string | null;\n /**\n * Fields can be tagged to give them contextual meaning.\n */\n tags?: string[];\n /**\n * Are multiple values allowed?\n */\n multipleValues?: boolean;\n /**\n * Predefined values options for the field. Check the reference for more information.\n */\n predefinedValues?: CmsModelFieldPredefinedValues;\n /**\n * Renderer options for the field. Check the reference for more information.\n */\n renderer?: CmsModelFieldRenderer;\n /**\n * List of validations for the field.\n */\n validation?: CmsModelFieldValidation[];\n /**\n * @see CmsModelField.listValidation\n */\n listValidation?: CmsModelFieldValidation[];\n /**\n * User defined settings.\n */\n settings?: Record<string, any>;\n}\n\n/**\n * A GraphQL `params.data` parameter received when updating content model.\n *\n * @category GraphQL params\n * @category CmsModel\n */\nexport interface CmsModelUpdateInput {\n /**\n * A new content model name.\n */\n name?: string;\n /**\n * A new singular name of the content model to be used in the API.\n */\n singularApiName?: string;\n /**\n * A new plural name of the content model to be used in the API.\n */\n pluralApiName?: string;\n /**\n * A group we want to move the model to.\n */\n group?: string;\n /**\n * A new description of the content model.\n */\n description?: string | null;\n /**\n * A list of content model fields to define the entry values.\n */\n fields: CmsModelFieldInput[];\n /**\n * Admin UI field layout\n *\n * ```ts\n * layout: [\n * [field1id, field2id],\n * [field3id]\n * ]\n * ```\n */\n layout: string[][];\n /**\n * Fields fieldId which are picked to represent the CMS entry.\n */\n titleFieldId?: string | null;\n descriptionFieldId?: string | null;\n imageFieldId?: string | null;\n}\n\n/**\n * A plugin to load a CmsModelManager.\n *\n * @see CmsModelManager\n *\n * @category Plugin\n * @category CmsModel\n * @category CmsEntry\n */\nexport interface ModelManagerPlugin extends Plugin {\n /**\n * A plugin type.\n */\n type: \"cms-content-model-manager\";\n /**\n * Specific model CmsModelManager loader. Can target exact modelId(s).\n * Be aware that if you define multiple plugins without `modelId`, last one will run.\n */\n modelId?: string[] | string;\n /**\n * Create a CmsModelManager for specific type - or new default one.\n * For reference in how is this plugin run check [contentModelManagerFactory](https://github.com/webiny/webiny-js/blob/f15676/packages/api-headless-cms/src/content/plugins/CRUD/contentModel/contentModelManagerFactory.ts)\n */\n create: (context: CmsContext, model: CmsModel) => Promise<CmsModelManager>;\n}\n\n/**\n * A content entry values definition for and from the database.\n *\n * @category Database model\n * @category CmsEntry\n */\nexport interface CmsEntryValues {\n [key: string]: any;\n}\n\n/**\n * A content entry definition for and from the database.\n *\n * @category Database model\n * @category CmsEntry\n */\nexport interface CmsEntry<T = CmsEntryValues> {\n /**\n * A version of the webiny this entry was created with.\n * This can be used when upgrading the system, so we know which entries to update.\n */\n webinyVersion: string;\n /**\n * Tenant id which is this entry for. Can be used in case of shared storage.\n */\n tenant: string;\n /**\n * Generated ID of the entry. It is shared across all the records in the database that represent a single entry.\n * So version 1, 2, ..., 2371 will have the same value in this field to link them together.\n */\n entryId: string;\n /**\n * Generated ID + version of the entry.\n */\n id: string;\n\n /**\n * Revision-level meta fields. 👇\n */\n\n /**\n * An ISO 8601 date/time string.\n */\n revisionCreatedOn: string;\n /**\n * An ISO 8601 date/time string.\n */\n revisionSavedOn: string;\n /**\n * An ISO 8601 date/time string.\n */\n revisionModifiedOn: string | null;\n /**\n * An ISO 8601 date/time string.\n */\n revisionFirstPublishedOn: string | null;\n /**\n * An ISO 8601 date/time string.\n */\n revisionLastPublishedOn: string | null;\n\n /**\n * Identity that last ionCreated the entry.\n */\n revisionCreatedBy: CmsIdentity;\n /**\n * Identity that last ionSaved the entry.\n */\n revisionSavedBy: CmsIdentity;\n /**\n * Identity that last ionModified the entry.\n */\n revisionModifiedBy: CmsIdentity | null;\n /**\n * Identity that first published the entry.\n */\n revisionFirstPublishedBy: CmsIdentity | null;\n /**\n * Identity that last published the entry.\n */\n revisionLastPublishedBy: CmsIdentity | null;\n\n /**\n * An ISO 8601 date/time string.\n */\n createdOn: string;\n /**\n * An ISO 8601 date/time string.\n */\n savedOn: string;\n /**\n * An ISO 8601 date/time string.\n */\n modifiedOn: string | null;\n /**\n * An ISO 8601 date/time string.\n */\n firstPublishedOn: string | null;\n /**\n * An ISO 8601 date/time string.\n */\n lastPublishedOn: string | null;\n\n /**\n * Identity that last created the entry.\n */\n createdBy: CmsIdentity;\n /**\n * Identity that last saved the entry.\n */\n savedBy: CmsIdentity;\n /**\n * Identity that last modified the entry.\n */\n modifiedBy: CmsIdentity | null;\n /**\n * Identity that first published the entry.\n */\n firstPublishedBy: CmsIdentity | null;\n /**\n * Identity that last published the entry.\n */\n lastPublishedBy: CmsIdentity | null;\n\n /**\n * Model ID of the definition for the entry.\n * @see CmsModel\n */\n modelId: string;\n /**\n * A locale of the entry.\n * @see I18NLocale.code\n */\n locale: string;\n /**\n * A revision version of the entry.\n */\n version: number;\n /**\n * Is the entry locked?\n */\n locked: boolean;\n /**\n * Status type of the entry.\n */\n status: CmsEntryStatus;\n /**\n * A mapped storageId -> value object.\n *\n * @see CmsModelField\n */\n values: T;\n /**\n * Advanced Content Organization\n */\n location?: {\n folderId?: string | null;\n };\n /**\n * Settings for the given entry.\n *\n * Introduced with Advanced Publishing Workflow. Will always be inserted once this PR is merged.\n * Be aware that when accessing properties in it on old systems, it will break if not checked first.\n *\n * Available only on the Manage API in entry GraphQL type `meta.data` property.\n */\n meta?: {\n [key: string]: any;\n };\n}\n\nexport interface CmsStorageEntry extends CmsEntry {\n [key: string]: any;\n}\n\nexport interface CmsEntryUniqueValue {\n value: string;\n count: number;\n}\n\n/**\n * A definition for content model manager to be used in the code.\n * The default one uses `CmsEntryContext` methods internally, but devs can change to what every they want.\n *\n * @see CmsEntryContext\n *\n * @category Context\n * @category CmsEntry\n * @category CmsModel\n */\nexport interface CmsModelManager {\n /**\n * List only published entries in the content model.\n */\n listPublished: (params: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;\n /**\n * List latest entries in the content model. Used for administration.\n */\n listLatest: (params: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;\n /**\n * Get a list of published entries by the ID list.\n */\n getPublishedByIds: (ids: string[]) => Promise<CmsEntry[]>;\n /**\n * Get a list of the latest entries by the ID list.\n */\n getLatestByIds: (ids: string[]) => Promise<CmsEntry[]>;\n /**\n * Get an entry filtered by given params. Will always get one.\n */\n get: (id: string) => Promise<CmsEntry>;\n /**\n * Create an entry.\n */\n create: (data: CreateCmsEntryInput) => Promise<CmsEntry>;\n /**\n * Update an entry.\n */\n update: (id: string, data: UpdateCmsEntryInput) => Promise<CmsEntry>;\n /**\n * Delete an entry.\n */\n delete: (id: string) => Promise<void>;\n}\n\n/**\n * Create\n */\nexport interface OnModelBeforeCreateTopicParams {\n input: CmsModelCreateInput;\n model: CmsModel;\n}\n\nexport interface OnModelAfterCreateTopicParams {\n input: CmsModelCreateInput;\n model: CmsModel;\n}\n\nexport interface OnModelCreateErrorTopicParams {\n input: CmsModelCreateInput;\n model: CmsModel;\n error: Error;\n}\n\n/**\n * Create From / Clone\n */\nexport interface OnModelBeforeCreateFromTopicParams {\n input: CmsModelCreateInput;\n original: CmsModel;\n model: CmsModel;\n}\n\nexport interface OnModelAfterCreateFromTopicParams {\n input: CmsModelCreateInput;\n original: CmsModel;\n model: CmsModel;\n}\n\nexport interface OnModelCreateFromErrorParams {\n input: CmsModelCreateInput;\n original: CmsModel;\n model: CmsModel;\n error: Error;\n}\n\n/**\n * Update\n */\nexport interface OnModelBeforeUpdateTopicParams {\n input: CmsModelUpdateInput;\n original: CmsModel;\n model: CmsModel;\n}\n\nexport interface OnModelAfterUpdateTopicParams {\n input: CmsModelUpdateInput;\n original: CmsModel;\n model: CmsModel;\n}\n\nexport interface OnModelUpdateErrorTopicParams {\n input: CmsModelUpdateInput;\n original: CmsModel;\n model: CmsModel;\n error: Error;\n}\n\n/**\n * Delete\n */\nexport interface OnModelBeforeDeleteTopicParams {\n model: CmsModel;\n}\n\nexport interface OnModelAfterDeleteTopicParams {\n model: CmsModel;\n}\n\nexport interface OnModelDeleteErrorTopicParams {\n model: CmsModel;\n error: Error;\n}\n\n/**\n * Initialize\n */\nexport interface OnModelInitializeParams {\n model: CmsModel;\n data: Record<string, any>;\n}\n\n/**\n *\n */\nexport interface CmsModelUpdateDirectParams {\n model: CmsModel;\n original: CmsModel;\n}\n\n/**\n * Cms Model in the context.\n *\n * @category Context\n * @category CmsModel\n */\nexport interface CmsModelContext {\n /**\n * Get a single content model.\n */\n getModel: (modelId: string) => Promise<CmsModel | null>;\n /**\n * Get all content models.\n */\n listModels: () => Promise<CmsModel[]>;\n /**\n * Create a content model.\n */\n createModel: (data: CmsModelCreateInput) => Promise<CmsModel>;\n /**\n * Create a content model from the given model - clone.\n */\n createModelFrom: (modelId: string, data: CmsModelCreateFromInput) => Promise<CmsModel>;\n /**\n * Update content model without data validation. Used internally.\n * @hidden\n */\n updateModelDirect: (params: CmsModelUpdateDirectParams) => Promise<CmsModel>;\n /**\n * Update content model.\n */\n updateModel: (modelId: string, data: CmsModelUpdateInput) => Promise<CmsModel>;\n /**\n * Delete content model. Should not allow deletion if there are entries connected to it.\n */\n deleteModel: (modelId: string) => Promise<void>;\n /**\n * Possibility for users to trigger the model initialization.\n * They can hook into it and do what ever they want to.\n *\n * Primary idea behind this is creating the index, for the code models, in the ES.\n */\n initializeModel: (modelId: string, data: Record<string, any>) => Promise<boolean>;\n /**\n * Get an instance of CmsModelManager for given content modelId.\n *\n * @see CmsModelManager\n */\n getEntryManager: (model: CmsModel | string) => Promise<CmsModelManager>;\n /**\n * Get all content model managers mapped by modelId.\n * @see CmsModelManager\n */\n getEntryManagers: () => Map<string, CmsModelManager>;\n /**\n * Clear all the model caches.\n */\n clearModelsCache: () => void;\n /**\n * Lifecycle Events\n */\n onModelBeforeCreate: Topic<OnModelBeforeCreateTopicParams>;\n onModelAfterCreate: Topic<OnModelAfterCreateTopicParams>;\n onModelCreateError: Topic<OnModelCreateErrorTopicParams>;\n onModelBeforeCreateFrom: Topic<OnModelBeforeCreateFromTopicParams>;\n onModelAfterCreateFrom: Topic<OnModelAfterCreateFromTopicParams>;\n onModelCreateFromError: Topic<OnModelCreateFromErrorParams>;\n onModelBeforeUpdate: Topic<OnModelBeforeUpdateTopicParams>;\n onModelAfterUpdate: Topic<OnModelAfterUpdateTopicParams>;\n onModelUpdateError: Topic<OnModelUpdateErrorTopicParams>;\n onModelBeforeDelete: Topic<OnModelBeforeDeleteTopicParams>;\n onModelAfterDelete: Topic<OnModelAfterDeleteTopicParams>;\n onModelDeleteError: Topic<OnModelDeleteErrorTopicParams>;\n onModelInitialize: Topic<OnModelInitializeParams>;\n}\n\n/**\n * Available statuses for content entry.\n *\n * @category CmsEntry\n */\nexport type CmsEntryStatus = \"published\" | \"unpublished\" | \"draft\";\n\nexport interface CmsEntryListWhereRef {\n id?: string;\n id_in?: string[];\n id_not?: string;\n id_not_in?: string[];\n entryId?: string;\n entryId_not?: string;\n entryId_in?: string[];\n entryId_not_in?: string[];\n}\n\n/**\n * Entry listing where params.\n *\n * @category CmsEntry\n * @category GraphQL params\n */\nexport interface CmsEntryListWhere {\n /**\n * Fields.\n */\n id?: string;\n id_in?: string[];\n id_not?: string;\n id_not_in?: string[];\n /**\n * Generated ID without the version.\n */\n entryId?: string;\n entryId_not?: string;\n entryId_in?: string[];\n entryId_not_in?: string[];\n\n /**\n * Revision-level meta fields. 👇\n */\n revisionCreatedBy?: string;\n revisionCreatedBy_not?: string;\n revisionCreatedBy_in?: string[];\n revisionCreatedBy_not_in?: string[];\n\n revisionModifiedBy?: string;\n revisionModifiedBy_not?: string;\n revisionModifiedBy_in?: string[];\n revisionModifiedBy_not_in?: string[];\n\n revisionSavedBy?: string;\n revisionSavedBy_not?: string;\n revisionSavedBy_in?: string[];\n revisionSavedBy_not_in?: string[];\n\n revisionFirstPublishedBy?: string;\n revisionFirstPublishedBy_not?: string;\n revisionFirstPublishedBy_in?: string[];\n revisionFirstPublishedBy_not_in?: string[];\n\n revisionLastPublishedBy?: string;\n revisionLastPublishedBy_not?: string;\n revisionLastPublishedBy_in?: string[];\n revisionLastPublishedBy_not_in?: string[];\n\n /**\n * Entry-level meta fields. 👇\n */\n createdBy?: string;\n createdBy_not?: string;\n createdBy_in?: string[];\n createdBy_not_in?: string[];\n\n modifiedBy?: string;\n modifiedBy_not?: string;\n modifiedBy_in?: string[];\n modifiedBy_not_in?: string[];\n\n savedBy?: string;\n savedBy_not?: string;\n savedBy_in?: string[];\n savedBy_not_in?: string[];\n\n firstPublishedBy?: string;\n firstPublishedBy_not?: string;\n firstPublishedBy_in?: string[];\n firstPublishedBy_not_in?: string[];\n\n lastPublishedBy?: string;\n lastPublishedBy_not?: string;\n lastPublishedBy_in?: string[];\n lastPublishedBy_not_in?: string[];\n\n /**\n * Version of the entry.\n *\n * It is not meant to be used via the API.\n * @internal\n */\n version?: number;\n version_lt?: number;\n version_gt?: number;\n /**\n * Each storage operations implementation MUST determine how to use this field.\n * In SQL, it can be a `published` field, and in DynamoDB it can be an SK.\n *\n * It is not meant to be used via the API.\n * @internal\n */\n published?: boolean;\n /**\n * Each storage operations implementation MUST determine how to use this field.\n * In SQL, it can be a `latest` field, and in DynamoDB it can be an SK.\n *\n * It is not meant to be used via the API.\n * @internal\n */\n latest?: boolean;\n /**\n * ACO related parameters.\n */\n wbyAco_location?: {\n folderId?: string;\n folderId_not?: string;\n folderId_in?: string[];\n folderId_not_in?: string[];\n AND?: CmsEntryListWhere[];\n OR?: CmsEntryListWhere[];\n };\n\n /**\n * This is to allow querying by any content model field defined by the user.\n */\n [key: string]:\n | string\n | number\n | boolean\n | undefined\n | string[]\n | number[]\n | null\n | CmsEntryListWhere[]\n | CmsEntryListWhere\n | CmsEntryListWhereRef;\n\n /**\n * To allow querying via nested queries, we added the AND / OR properties.\n */\n AND?: CmsEntryListWhere[];\n OR?: CmsEntryListWhere[];\n}\n\n/**\n * Entry listing sort.\n *\n * @category CmsEntry\n * @category GraphQL params\n */\nexport type CmsEntryListSort = string[];\n\n/**\n * Get entry GraphQL resolver params.\n *\n * @category CmsEntry\n * @category GraphQL params\n */\nexport interface CmsEntryGetParams {\n where: CmsEntryListWhere;\n sort?: CmsEntryListSort;\n}\n\n/**\n * List entries GraphQL resolver params.\n *\n * @category CmsEntry\n * @category GraphQL params\n */\nexport interface CmsEntryListParams {\n where?: CmsEntryListWhere;\n sort?: CmsEntryListSort;\n search?: string;\n fields?: string[];\n limit?: number;\n after?: string | null;\n}\n\n/**\n * Meta information for GraphQL output.\n *\n * @category CmsEntry\n * @category GraphQL output\n */\nexport interface CmsEntryMeta {\n /**\n * A cursor for pagination.\n */\n cursor: string | null;\n /**\n * Is there more items to load?\n */\n hasMoreItems: boolean;\n /**\n * Total count of the items in the storage.\n */\n totalCount: number;\n}\n\n/**\n * Create\n */\nexport interface OnEntryBeforeCreateTopicParams {\n input: CreateCmsEntryInput;\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryAfterCreateTopicParams {\n input: CreateCmsEntryInput;\n entry: CmsEntry;\n model: CmsModel;\n storageEntry: CmsEntry;\n}\n\nexport interface OnEntryCreateErrorTopicParams {\n error: Error;\n input: CreateCmsEntryInput;\n entry: CmsEntry;\n model: CmsModel;\n}\n\n/**\n * Revision Create\n */\nexport interface OnEntryRevisionBeforeCreateTopicParams {\n input: CreateFromCmsEntryInput;\n entry: CmsEntry;\n original: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryRevisionAfterCreateTopicParams {\n input: CreateFromCmsEntryInput;\n entry: CmsEntry;\n original: CmsEntry;\n model: CmsModel;\n storageEntry: CmsEntry;\n}\n\nexport interface OnEntryCreateRevisionErrorTopicParams {\n error: Error;\n input: CreateFromCmsEntryInput;\n original: CmsEntry;\n entry: CmsEntry;\n model: CmsModel;\n}\n\n/**\n * Update\n */\nexport interface OnEntryBeforeUpdateTopicParams {\n input: UpdateCmsEntryInput;\n original: CmsEntry;\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryAfterUpdateTopicParams {\n input: UpdateCmsEntryInput;\n original: CmsEntry;\n entry: CmsEntry;\n model: CmsModel;\n storageEntry: CmsEntry;\n}\n\nexport interface OnEntryUpdateErrorTopicParams {\n error: Error;\n input: UpdateCmsEntryInput;\n entry: CmsEntry;\n model: CmsModel;\n}\n\n/**\n * Move\n */\nexport interface OnEntryBeforeMoveTopicParams {\n folderId: string;\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryAfterMoveTopicParams {\n folderId: string;\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryMoveErrorTopicParams {\n error: Error;\n folderId: string;\n entry: CmsEntry;\n model: CmsModel;\n}\n\n/**\n * Publish\n */\n\nexport interface OnEntryBeforePublishTopicParams {\n original: CmsEntry;\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryAfterPublishTopicParams {\n original: CmsEntry;\n entry: CmsEntry;\n model: CmsModel;\n storageEntry: CmsEntry;\n}\n\nexport interface OnEntryPublishErrorTopicParams {\n error: Error;\n original: CmsEntry;\n entry: CmsEntry;\n model: CmsModel;\n}\n\n/**\n * Republish\n */\nexport interface OnEntryBeforeRepublishTopicParams {\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryAfterRepublishTopicParams {\n entry: CmsEntry;\n model: CmsModel;\n storageEntry: CmsEntry;\n}\n\nexport interface OnEntryRepublishErrorTopicParams {\n error: Error;\n entry: CmsEntry;\n model: CmsModel;\n}\n\n/**\n * Unpublish\n */\n\nexport interface OnEntryBeforeUnpublishTopicParams {\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryAfterUnpublishTopicParams {\n entry: CmsEntry;\n model: CmsModel;\n storageEntry: CmsEntry;\n}\n\nexport interface OnEntryUnpublishErrorTopicParams {\n error: Error;\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryBeforeDeleteTopicParams {\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryAfterDeleteTopicParams {\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryDeleteErrorTopicParams {\n error: Error;\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryRevisionBeforeDeleteTopicParams {\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryRevisionAfterDeleteTopicParams {\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryRevisionDeleteErrorTopicParams {\n error: Error;\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryBeforeDeleteMultipleTopicParams {\n model: CmsModel;\n entries: CmsEntry[];\n ids: string[];\n}\n\nexport interface OnEntryAfterDeleteMultipleTopicParams {\n model: CmsModel;\n entries: CmsEntry[];\n ids: string[];\n}\n\nexport interface OnEntryDeleteMultipleErrorTopicParams {\n model: CmsModel;\n entries: CmsEntry[];\n ids: string[];\n error: Error;\n}\n\nexport interface OnEntryBeforeGetTopicParams {\n model: CmsModel;\n where: CmsEntryListWhere;\n}\n\nexport interface EntryBeforeListTopicParams {\n where: CmsEntryListWhere;\n model: CmsModel;\n}\n\n/**\n * @category Context\n * @category CmsEntry\n */\nexport interface CreateCmsEntryInput {\n id?: string;\n status?: CmsEntryStatus;\n\n /**\n * Entry-level meta fields. 👇\n */\n createdOn?: Date | string;\n modifiedOn?: Date | string | null;\n savedOn?: Date | string;\n createdBy?: CmsIdentity;\n modifiedBy?: CmsIdentity | null;\n savedBy?: CmsIdentity;\n firstPublishedOn?: Date | string;\n lastPublishedOn?: Date | string;\n firstPublishedBy?: CmsIdentity;\n lastPublishedBy?: CmsIdentity;\n\n /**\n * Revision-level meta fields. 👇\n */\n revisionCreatedOn?: Date | string;\n revisionModifiedOn?: Date | string | null;\n revisionSavedOn?: Date | string;\n revisionCreatedBy?: CmsIdentity;\n revisionModifiedBy?: CmsIdentity | null;\n revisionSavedBy?: CmsIdentity;\n revisionFirstPublishedOn?: Date | string;\n revisionLastPublishedOn?: Date | string;\n revisionFirstPublishedBy?: CmsIdentity;\n revisionLastPublishedBy?: CmsIdentity;\n\n wbyAco_location?: {\n folderId?: string | null;\n };\n\n [key: string]: any;\n}\n\nexport interface CreateCmsEntryOptionsInput {\n skipValidators?: string[];\n}\n\n/**\n * @category Context\n * @category CmsEntry\n */\nexport interface CreateFromCmsEntryInput {\n /**\n * Revision-level meta fields. 👇\n */\n revisionCreatedOn?: Date;\n revisionSavedOn?: Date;\n revisionModifiedOn?: Date;\n revisionCreatedBy?: CmsIdentity;\n revisionModifiedBy?: CmsIdentity;\n revisionSavedBy?: CmsIdentity;\n revisionFirstPublishedOn?: Date | string;\n revisionLastPublishedOn?: Date | string;\n revisionFirstPublishedBy?: CmsIdentity;\n revisionLastPublishedBy?: CmsIdentity;\n\n /**\n * Entry-level meta fields. 👇\n */\n createdOn?: Date;\n savedOn?: Date;\n modifiedOn?: Date;\n createdBy?: CmsIdentity;\n modifiedBy?: CmsIdentity;\n savedBy?: CmsIdentity;\n firstPublishedOn?: Date | string;\n lastPublishedOn?: Date | string;\n firstPublishedBy?: CmsIdentity;\n lastPublishedBy?: CmsIdentity;\n\n [key: string]: any;\n}\n\nexport interface CreateRevisionCmsEntryOptionsInput {\n skipValidators?: string[];\n}\n\n/**\n * @category Context\n * @category CmsEntry\n */\nexport interface UpdateCmsEntryInput {\n /**\n * Revision-level meta fields. 👇\n */\n revisionCreatedOn?: Date | string | null;\n revisionModifiedOn?: Date | string | null;\n revisionSavedOn?: Date | string | null;\n revisionFirstPublishedOn?: Date | string | null;\n revisionLastPublishedOn?: Date | string | null;\n revisionModifiedBy?: CmsIdentity | null;\n revisionCreatedBy?: CmsIdentity | null;\n revisionSavedBy?: CmsIdentity | null;\n revisionFirstPublishedBy?: CmsIdentity | null;\n revisionLastPublishedBy?: CmsIdentity | null;\n\n /**\n * Entry-level meta fields. 👇\n */\n createdOn?: Date | string | null;\n modifiedOn?: Date | string | null;\n savedOn?: Date | string | null;\n firstPublishedOn?: Date | string | null;\n lastPublishedOn?: Date | string | null;\n createdBy?: CmsIdentity | null;\n modifiedBy?: CmsIdentity | null;\n savedBy?: CmsIdentity | null;\n firstPublishedBy?: CmsIdentity | null;\n lastPublishedBy?: CmsIdentity | null;\n\n wbyAco_location?: {\n folderId?: string | null;\n };\n\n [key: string]: any;\n}\n\nexport interface UpdateCmsEntryOptionsInput {\n skipValidators?: string[];\n}\n\n/**\n * @category Context\n * @category CmsEntry\n */\nexport interface GetUniqueFieldValuesParams {\n where: CmsEntryListWhere;\n fieldId: string;\n}\n\n/**\n * @category CmsEntry\n */\nexport interface CmsDeleteEntryOptions {\n /**\n * Runs the delete commands even if the entry is not found in the DynamoDB.\n * This is to force clean the entry records that might have been left behind a failed delete.\n */\n force?: boolean;\n}\n\n/**\n * @category Context\n * @category CmsEntry\n */\nexport interface DeleteMultipleEntriesParams {\n entries: string[];\n}\n\nexport type DeleteMultipleEntriesResponse = {\n id: string;\n}[];\n\nexport interface CmsEntryValidateResponse {\n [key: string]: any;\n}\n\n/**\n * Cms Entry CRUD methods in the context.\n *\n * @category Context\n * @category CmsEntry\n */\nexport interface CmsEntryContext {\n /**\n * Get a single content entry for a model.\n */\n getEntry: (model: CmsModel, params: CmsEntryGetParams) => Promise<CmsEntry>;\n /**\n * Get a list of entries for a model by a given ID (revision).\n */\n getEntriesByIds: (model: CmsModel, revisions: string[]) => Promise<CmsEntry[]>;\n /**\n * Get the entry for a model by a given ID.\n */\n getEntryById: (model: CmsModel, revision: string) => Promise<CmsEntry>;\n /**\n * List entries for a model. Internal method used by get, listLatest and listPublished.\n */\n listEntries: <T = CmsEntryValues>(\n model: CmsModel,\n params: CmsEntryListParams\n ) => Promise<[CmsEntry<T>[], CmsEntryMeta]>;\n /**\n * Lists the latest entries. Used for manage API.\n */\n listLatestEntries: <T = CmsEntryValues>(\n model: CmsModel,\n params?: CmsEntryListParams\n ) => Promise<[CmsEntry<T>[], CmsEntryMeta]>;\n /**\n * List published entries. Used for read API.\n */\n listPublishedEntries: <T = CmsEntryValues>(\n model: CmsModel,\n params?: CmsEntryListParams\n ) => Promise<[CmsEntry<T>[], CmsEntryMeta]>;\n /**\n * List published entries by IDs.\n */\n getPublishedEntriesByIds: (model: CmsModel, ids: string[]) => Promise<CmsEntry[]>;\n /**\n * List latest entries by IDs.\n */\n getLatestEntriesByIds: (model: CmsModel, ids: string[]) => Promise<CmsEntry[]>;\n /**\n * Create a new content entry.\n */\n createEntry: (\n model: CmsModel,\n input: CreateCmsEntryInput,\n options?: CreateCmsEntryOptionsInput\n ) => Promise<CmsEntry>;\n /**\n * Create a new entry from already existing entry.\n */\n createEntryRevisionFrom: (\n model: CmsModel,\n id: string,\n input: CreateFromCmsEntryInput,\n options?: CreateRevisionCmsEntryOptionsInput\n ) => Promise<CmsEntry>;\n /**\n * Update existing entry.\n */\n updateEntry: (\n model: CmsModel,\n id: string,\n input: UpdateCmsEntryInput,\n meta?: Record<string, any>,\n options?: UpdateCmsEntryOptionsInput\n ) => Promise<CmsEntry>;\n /**\n * Validate the entry - either new one or existing one.\n */\n validateEntry: (\n model: CmsModel,\n id?: string,\n input?: UpdateCmsEntryInput\n ) => Promise<CmsEntryValidateResponse>;\n /**\n * Move entry, and all its revisions, to a new folder.\n */\n moveEntry: (model: CmsModel, id: string, folderId: string) => Promise<CmsEntry>;\n /**\n * Method that republishes entry with given identifier.\n * @internal\n */\n republishEntry: (model: CmsModel, id: string) => Promise<CmsEntry>;\n /**\n * Delete only a certain revision of the entry.\n */\n deleteEntryRevision: (model: CmsModel, id: string) => Promise<void>;\n /**\n * Delete entry with all its revisions.\n */\n deleteEntry: (model: CmsModel, id: string, options?: CmsDeleteEntryOptions) => Promise<void>;\n /**\n * Delete multiple entries\n */\n deleteMultipleEntries: (\n model: CmsModel,\n params: DeleteMultipleEntriesParams\n ) => Promise<DeleteMultipleEntriesResponse>;\n /**\n * Publish entry.\n */\n publishEntry: (model: CmsModel, id: string) => Promise<CmsEntry>;\n /**\n * Unpublish entry.\n */\n unpublishEntry: (model: CmsModel, id: string) => Promise<CmsEntry>;\n /**\n * Get all entry revisions.\n */\n getEntryRevisions: (model: CmsModel, id: string) => Promise<CmsEntry[]>;\n /**\n * List all unique values for a given field.\n *\n * @internal\n */\n getUniqueFieldValues: (\n model: CmsModel,\n params: GetUniqueFieldValuesParams\n ) => Promise<CmsEntryUniqueValue[]>;\n /**\n * Lifecycle Events\n */\n onEntryBeforeCreate: Topic<OnEntryBeforeCreateTopicParams>;\n onEntryAfterCreate: Topic<OnEntryAfterCreateTopicParams>;\n onEntryCreateError: Topic<OnEntryCreateErrorTopicParams>;\n\n onEntryRevisionBeforeCreate: Topic<OnEntryRevisionBeforeCreateTopicParams>;\n onEntryRevisionAfterCreate: Topic<OnEntryRevisionAfterCreateTopicParams>;\n onEntryRevisionCreateError: Topic<OnEntryCreateRevisionErrorTopicParams>;\n\n onEntryBeforeUpdate: Topic<OnEntryBeforeUpdateTopicParams>;\n onEntryAfterUpdate: Topic<OnEntryAfterUpdateTopicParams>;\n onEntryUpdateError: Topic<OnEntryUpdateErrorTopicParams>;\n\n onEntryBeforeMove: Topic<OnEntryBeforeMoveTopicParams>;\n onEntryAfterMove: Topic<OnEntryAfterMoveTopicParams>;\n onEntryMoveError: Topic<OnEntryMoveErrorTopicParams>;\n\n onEntryBeforeDelete: Topic<OnEntryBeforeDeleteTopicParams>;\n onEntryAfterDelete: Topic<OnEntryAfterDeleteTopicParams>;\n onEntryDeleteError: Topic<OnEntryDeleteErrorTopicParams>;\n\n onEntryRevisionBeforeDelete: Topic<OnEntryRevisionBeforeDeleteTopicParams>;\n onEntryRevisionAfterDelete: Topic<OnEntryRevisionAfterDeleteTopicParams>;\n onEntryRevisionDeleteError: Topic<OnEntryRevisionDeleteErrorTopicParams>;\n\n onEntryBeforePublish: Topic<OnEntryBeforePublishTopicParams>;\n onEntryAfterPublish: Topic<OnEntryAfterPublishTopicParams>;\n onEntryPublishError: Topic<OnEntryPublishErrorTopicParams>;\n\n onEntryBeforeRepublish: Topic<OnEntryBeforeRepublishTopicParams>;\n onEntryAfterRepublish: Topic<OnEntryAfterRepublishTopicParams>;\n onEntryRepublishError: Topic<OnEntryRepublishErrorTopicParams>;\n\n onEntryBeforeUnpublish: Topic<OnEntryBeforeUnpublishTopicParams>;\n onEntryAfterUnpublish: Topic<OnEntryAfterUnpublishTopicParams>;\n onEntryUnpublishError: Topic<OnEntryUnpublishErrorTopicParams>;\n\n onEntryBeforeGet: Topic<OnEntryBeforeGetTopicParams>;\n onEntryBeforeList: Topic<EntryBeforeListTopicParams>;\n}\n\n/**\n * Parameters for CmsEntryResolverFactory.\n *\n * @category GraphQL resolver\n * @category CmsEntry\n */\ninterface CmsEntryResolverFactoryParams {\n model: CmsModel;\n}\n\n/**\n * A type for EntryResolvers. Used when creating get, list, update, publish, ...etc.\n *\n * @category GraphQL resolver\n * @category CmsEntry\n */\nexport type CmsEntryResolverFactory<TSource = any, TArgs = any, TContext = CmsContext> = {\n (params: CmsEntryResolverFactoryParams): GraphQLFieldResolver<TSource, TArgs, TContext>;\n};\n\n/**\n * A base security permission for CMS.\n *\n * @category SecurityPermission\n */\nexport interface BaseCmsSecurityPermission extends SecurityPermission {\n own?: boolean;\n rwd: string;\n}\n\n/**\n * A security permission for content model.\n *\n * @category SecurityPermission\n * @category CmsModel\n */\nexport interface CmsModelPermission extends BaseCmsSecurityPermission {\n /**\n * An object representing `key: model.modelId` values where key is locale code.\n */\n models?: {\n [key: string]: string[];\n };\n /**\n * {locale: groupId[]} map, where key is a locale code.\n */\n groups?: {\n [key: string]: string[];\n };\n}\n\n/**\n * The security permission for content model groups.\n *\n * @category SecurityPermission\n * @category CmsGroup\n */\nexport interface CmsGroupPermission extends BaseCmsSecurityPermission {\n /**\n * {locale: groupId[]} map, where key is a locale code.\n */\n groups?: {\n [key: string]: string[];\n };\n}\n\n/**\n * The security permission for content entry.\n *\n * @category SecurityPermission\n * @category CmsEntry\n */\nexport interface CmsEntryPermission extends BaseCmsSecurityPermission {\n pw?: string;\n /**\n * An object representing `key: model.modelId` values where key is locale code.\n */\n models?: {\n [key: string]: string[];\n };\n /**\n * {locale: groupId[]} map, where key is a locale code.\n */\n groups?: {\n [key: string]: string[];\n };\n}\n\nexport interface CmsGroupStorageOperationsGetParams {\n id: string;\n tenant: string;\n locale: string;\n}\n\nexport interface CmsGroupStorageOperationsListWhereParams {\n tenant: string;\n locale: string;\n\n [key: string]: any;\n}\n\nexport interface CmsGroupStorageOperationsListParams {\n where: CmsGroupStorageOperationsListWhereParams;\n sort?: string[];\n}\n\nexport interface CmsGroupStorageOperationsCreateParams {\n group: CmsGroup;\n}\n\nexport interface CmsGroupStorageOperationsUpdateParams {\n group: CmsGroup;\n}\n\nexport interface CmsGroupStorageOperationsDeleteParams {\n group: CmsGroup;\n}\n\n/**\n * Description of the CmsGroup CRUD operations.\n * If user wants to add another database to the application, this is how it is done.\n * This is just plain read, update, write, delete and list - no authentication or permission checks.\n */\nexport interface CmsGroupStorageOperations {\n /**\n * Gets content model group by given id.\n */\n get: (params: CmsGroupStorageOperationsGetParams) => Promise<CmsGroup | null>;\n /**\n * List all content model groups. Filterable via params.\n */\n list: (params: CmsGroupStorageOperationsListParams) => Promise<CmsGroup[]>;\n /**\n * Create a new content model group.\n */\n create: (params: CmsGroupStorageOperationsCreateParams) => Promise<CmsGroup>;\n /**\n * Update existing content model group.\n */\n update: (params: CmsGroupStorageOperationsUpdateParams) => Promise<CmsGroup>;\n /**\n * Delete the content model group.\n */\n delete: (params: CmsGroupStorageOperationsDeleteParams) => Promise<CmsGroup>;\n}\n\nexport interface CmsModelStorageOperationsGetParams {\n tenant: string;\n locale: string;\n modelId: string;\n}\n\nexport interface CmsModelStorageOperationsListWhereParams {\n tenant: string;\n locale: string;\n\n [key: string]: string;\n}\n\nexport interface CmsModelStorageOperationsListParams {\n where: CmsModelStorageOperationsListWhereParams;\n}\n\nexport interface CmsModelStorageOperationsCreateParams {\n model: CmsModel;\n}\n\nexport interface CmsModelStorageOperationsUpdateParams {\n model: CmsModel;\n}\n\nexport interface CmsModelStorageOperationsDeleteParams {\n model: CmsModel;\n}\n\n/**\n * Description of the CmsModel storage operations.\n * If user wants to add another database to the application, this is how it is done.\n * This is just plain read, update, write, delete and list - no authentication or permission checks.\n */\nexport interface CmsModelStorageOperations {\n /**\n * Gets content model by given id.\n */\n get: (params: CmsModelStorageOperationsGetParams) => Promise<CmsModel | null>;\n /**\n * List all content models. Filterable via params.\n */\n list: (params: CmsModelStorageOperationsListParams) => Promise<CmsModel[]>;\n /**\n * Create a new content model.\n */\n create: (params: CmsModelStorageOperationsCreateParams) => Promise<CmsModel>;\n /**\n * Update existing content model.\n */\n update: (params: CmsModelStorageOperationsUpdateParams) => Promise<CmsModel>;\n /**\n * Delete the content model.\n */\n delete: (params: CmsModelStorageOperationsDeleteParams) => Promise<CmsModel>;\n}\n\nexport interface CmsEntryStorageOperationsGetParams {\n where: CmsEntryListWhere;\n sort?: CmsEntryListSort;\n limit?: number;\n}\n\nexport interface CmsEntryStorageOperationsListParams {\n where: CmsEntryListWhere;\n sort?: CmsEntryListSort;\n search?: string;\n fields?: string[];\n limit: number;\n after?: string | null;\n}\n\nexport interface CmsEntryStorageOperationsCreateParams<\n T extends CmsStorageEntry = CmsStorageEntry\n> {\n /**\n * Real entry, with no transformations on it.\n */\n entry: CmsEntry;\n /**\n * Entry prepared for the storage.\n */\n storageEntry: T;\n}\n\nexport interface CmsEntryStorageOperationsCreateRevisionFromParams<\n T extends CmsStorageEntry = CmsStorageEntry\n> {\n /**\n * Real entry, with no transformations on it.\n */\n entry: CmsEntry;\n /**\n * Entry prepared for the storage.\n */\n storageEntry: T;\n}\n\nexport interface CmsEntryStorageOperationsUpdateParams<\n T extends CmsStorageEntry = CmsStorageEntry\n> {\n /**\n * Real entry, with no transformations on it.\n */\n entry: CmsEntry;\n /**\n * Entry prepared for the storage.\n */\n storageEntry: T;\n}\n\nexport interface CmsEntryStorageOperationsDeleteRevisionParams<\n T extends CmsStorageEntry = CmsStorageEntry\n> {\n /**\n * Entry that was deleted.\n */\n entry: CmsEntry;\n /**\n * Entry that was deleted, directly from storage, with transformations.\n */\n storageEntry: T;\n /**\n * Entry that was set as latest.\n */\n latestEntry: CmsEntry | null;\n /**\n * Entry that was set as latest, directly from storage, with transformations.\n */\n latestStorageEntry: T | null;\n}\n\nexport interface CmsEntryStorageOperationsDeleteParams {\n entry: CmsEntry;\n}\n\nexport interface CmsEntryStorageOperationsDeleteEntriesParams {\n entries: string[];\n}\n\nexport interface CmsEntryStorageOperationsPublishParams<\n T extends CmsStorageEntry = CmsStorageEntry\n> {\n /**\n * The modified entry that is going to be saved as published.\n * Entry is in its original form.\n */\n entry: CmsEntry;\n /**\n * The modified entry and prepared for the storage.\n */\n storageEntry: T;\n}\n\nexport interface CmsEntryStorageOperationsUnpublishParams<\n T extends CmsStorageEntry = CmsStorageEntry\n> {\n /**\n * The modified entry that is going to be saved as unpublished.\n */\n entry: CmsEntry;\n /**\n * The modified entry that is going to be saved as unpublished, with transformations on it.\n */\n storageEntry: T;\n}\n\nexport interface CmsEntryStorageOperationsGetUniqueFieldValuesParams {\n where: CmsEntryListWhere;\n fieldId: string;\n}\n\nexport interface CmsEntryStorageOperationsGetByIdsParams {\n ids: readonly string[];\n}\n\nexport interface CmsEntryStorageOperationsGetLatestByIdsParams {\n ids: readonly string[];\n}\n\nexport interface CmsEntryStorageOperationsGetPublishedByIdsParams {\n ids: readonly string[];\n}\n\nexport interface CmsEntryStorageOperationsGetRevisionsParams {\n id: string;\n}\n\nexport interface CmsEntryStorageOperationsGetRevisionParams {\n id: string;\n}\n\nexport interface CmsEntryStorageOperationsGetPublishedRevisionParams {\n id: string;\n}\n\nexport interface CmsEntryStorageOperationsGetLatestRevisionParams {\n id: string;\n}\n\nexport interface CmsEntryStorageOperationsGetPreviousRevisionParams {\n entryId: string;\n version: number;\n}\n\nexport interface CmsEntryStorageOperationsListResponse<\n T extends CmsStorageEntry = CmsStorageEntry\n> {\n /**\n * Has more items to load with the current filtering?\n */\n hasMoreItems: boolean;\n /**\n * Items loaded with current filtering.\n */\n items: T[];\n /**\n * Pointer for where to start the new item set.\n */\n cursor: string | null;\n /**\n * Total amount of items with the current filter.\n */\n totalCount: number;\n}\n\n/**\n * Description of the CmsModel storage operations.\n * If user wants to add another database to the application, this is how it is done.\n * This is just plain read, update, write, delete and list - no authentication or permission checks.\n *\n *\n * @category StorageOperations\n * @category CmsEntry\n */\nexport interface CmsEntryStorageOperations<T extends CmsStorageEntry = CmsStorageEntry> {\n /**\n * Get all the entries of the ids.\n */\n getByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetByIdsParams) => Promise<T[]>;\n /**\n * Get all the published entries of the ids.\n */\n getPublishedByIds: (\n model: CmsModel,\n params: CmsEntryStorageOperationsGetPublishedByIdsParams\n ) => Promise<T[]>;\n /**\n * Get all the latest entries of the ids.\n */\n getLatestByIds: (\n model: CmsModel,\n params: CmsEntryStorageOperationsGetLatestByIdsParams\n ) => Promise<T[]>;\n /**\n * Get all revisions of the given entry id.\n */\n getRevisions: (\n model: CmsModel,\n params: CmsEntryStorageOperationsGetRevisionsParams\n ) => Promise<T[]>;\n /**\n * Get the entry by the given revision id.\n */\n getRevisionById: (\n model: CmsModel,\n params: CmsEntryStorageOperationsGetRevisionParams\n ) => Promise<T | null>;\n /**\n * Get the published entry by given entryId.\n */\n getPublishedRevisionByEntryId: (\n model: CmsModel,\n params: CmsEntryStorageOperationsGetPublishedRevisionParams\n ) => Promise<T | null>;\n /**\n * Get the latest entry by given entryId.\n */\n getLatestRevisionByEntryId: (\n model: CmsModel,\n params: CmsEntryStorageOperationsGetLatestRevisionParams\n ) => Promise<T | null>;\n /**\n * Get the revision of the entry before given one.\n */\n getPreviousRevision: (\n model: CmsModel,\n params: CmsEntryStorageOperationsGetPreviousRevisionParams\n ) => Promise<T | null>;\n /**\n * Gets entry by given params.\n */\n get: (model: CmsModel, params: CmsEntryStorageOperationsGetParams) => Promise<T | null>;\n /**\n * List all entries. Filterable via params.\n */\n list: (\n model: CmsModel,\n params: CmsEntryStorageOperationsListParams\n ) => Promise<CmsEntryStorageOperationsListResponse<T>>;\n /**\n * Create a new entry.\n */\n create: (model: CmsModel, params: CmsEntryStorageOperationsCreateParams<T>) => Promise<T>;\n /**\n * Create a new entry from existing one.\n */\n createRevisionFrom: (\n model: CmsModel,\n params: CmsEntryStorageOperationsCreateRevisionFromParams<T>\n ) => Promise<T>;\n /**\n * Update existing entry.\n */\n update: (model: CmsModel, params: CmsEntryStorageOperationsUpdateParams<T>) => Promise<T>;\n /**\n * Move entry and all its entries into a new folder.\n */\n move: (model: CmsModel, id: string, folderId: string) => Promise<void>;\n /**\n * Delete the entry revision.\n */\n deleteRevision: (\n model: CmsModel,\n params: CmsEntryStorageOperationsDeleteRevisionParams<T>\n ) => Promise<void>;\n /**\n * Delete the entry.\n */\n delete: (model: CmsModel, params: CmsEntryStorageOperationsDeleteParams) => Promise<void>;\n /**\n * Delete multiple entries, with a limit on how much can be deleted in one call.\n */\n deleteMultipleEntries: (\n model: CmsModel,\n params: CmsEntryStorageOperationsDeleteEntriesParams\n ) => Promise<void>;\n /**\n * Publish the entry.\n */\n publish: (model: CmsModel, params: CmsEntryStorageOperationsPublishParams<T>) => Promise<T>;\n /**\n * Unpublish the entry.\n */\n unpublish: (model: CmsModel, params: CmsEntryStorageOperationsUnpublishParams<T>) => Promise<T>;\n /**\n * Method to list all the unique values for the given field id.\n * Simplest use case would be to aggregate tags for some content.\n * @internal\n */\n getUniqueFieldValues: (\n model: CmsModel,\n params: CmsEntryStorageOperationsGetUniqueFieldValuesParams\n ) => Promise<CmsEntryUniqueValue[]>;\n}\n\nexport enum CONTENT_ENTRY_STATUS {\n DRAFT = \"draft\",\n PUBLISHED = \"published\",\n UNPUBLISHED = \"unpublished\"\n}\n\nexport interface CmsSystem {\n version?: string;\n readAPIKey?: string;\n /**\n * System tenant.\n */\n tenant: string;\n}\n\nexport interface CmsSystemStorageOperationsGetParams {\n tenant: string;\n}\n\nexport interface CmsSystemStorageOperationsCreateParams {\n system: CmsSystem;\n}\n\nexport interface CmsSystemStorageOperationsUpdateParams {\n system: CmsSystem;\n}\n\nexport interface CmsSystemStorageOperations {\n /**\n * Get the system data.\n */\n get: (params: CmsSystemStorageOperationsGetParams) => Promise<CmsSystem | null>;\n /**\n * Create the system info in the storage.\n */\n create: (params: CmsSystemStorageOperationsCreateParams) => Promise<CmsSystem>;\n /**\n * Update the system info in the storage.\n */\n update: (params: CmsSystemStorageOperationsUpdateParams) => Promise<CmsSystem>;\n}\n\nexport interface HeadlessCmsStorageOperations<C = CmsContext> {\n name: string;\n system: CmsSystemStorageOperations;\n groups: CmsGroupStorageOperations;\n models: CmsModelStorageOperations;\n entries: CmsEntryStorageOperations;\n /**\n * Either attach something from the storage operations or run something in it.\n */\n beforeInit: (context: C) => Promise<void>;\n init?: (context: C) => Promise<void>;\n}\n"],"mappings":";;;;;;AA+EA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AAYA;AACA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AAoDA;AACA;AACA;AACA;AACA;AACA;AAgGA;AACA;AACA;AAUA;AACA;AACA;AAKA;AACA;AACA;AAUA;AACA;AACA;AACA;AACA;AACA;AAgCA;AACA;AACA;AACA;AACA;AACA;AACA;AAyBA;AACA;AACA;AACA;AACA;AACA;AACA;AAyBA;AACA;AACA;AACA;AACA;AACA;AACA;AAmBA;AACA;AACA;AACA;AAkBA;AACA;AACA;AACA;AACA;AACA;AA0HA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AAkDA;AACA;AACA;AACA;AACA;AAiQA;AACA;AACA;AACA;AACA;AACA;AACA;AAoBA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AA4CA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AA0DA;AACA;AACA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AAwCA;AACA;AACA;AACA;AACA;AACA;AAYA;AACA;AACA;AACA;AACA;AACA;AAqDA;AACA;AACA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAyDA;AACA;AACA;AACA;AACA;AACA;AA6CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkBA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AAqKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAoCA;AACA;AACA;AAiBA;AACA;AACA;AAoBA;AACA;AACA;AAoBA;AACA;AACA;AAcA;AACA;AACA;AAMA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AAuEA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AACA;AAoIA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AAUA;AACA;AACA;AACA;AACA;AACA;AAgBA;AACA;AACA;AAqBA;AACA;AACA;AAwBA;AACA;AACA;AAuBA;AACA;AACA;AAoBA;AACA;AACA;AAsBA;AACA;AACA;AAkBA;AACA;AACA;AAgFA;AACA;AACA;AACA;AA4CA;AACA;AACA;AACA;AAqCA;AACA;AACA;AACA;AAyCA;AACA;AACA;AACA;AAMA;AACA;AACA;AASA;AACA;AACA;AACA;AAaA;AACA;AACA;AACA;AACA;AACA;AAsKA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AAgBA;AACA;AACA;AACA;AACA;AACA;AAUA;AACA;AACA;AACA;AACA;AACA;AA+CA;AACA;AACA;AACA;AACA;AAqDA;AACA;AACA;AACA;AACA;AAiMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA,IAkIYA,oBAAoB,0BAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAAA,OAApBA,oBAAoB;AAAA;AAAAC,OAAA,CAAAD,oBAAA,GAAAA,oBAAA"}
1
+ {"version":3,"names":["CONTENT_ENTRY_STATUS","exports"],"sources":["types.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins/types\";\nimport { I18NContext, I18NLocale } from \"@webiny/api-i18n/types\";\nimport { Context } from \"@webiny/api/types\";\nimport {\n GraphQLFieldResolver,\n GraphQLSchemaDefinition,\n Resolvers\n} from \"@webiny/handler-graphql/types\";\nimport { SecurityPermission } from \"@webiny/api-security/types\";\nimport { DbContext } from \"@webiny/handler-db/types\";\nimport { Topic } from \"@webiny/pubsub/types\";\nimport { CmsModelConverterCallable } from \"~/utils/converters/ConverterCollection\";\nimport { HeadlessCmsExport, HeadlessCmsImport } from \"~/export/types\";\nimport { AccessControl } from \"~/crud/AccessControl/AccessControl\";\nimport { ModelGroupsPermissions } from \"~/utils/permissions/ModelGroupsPermissions\";\nimport { ModelsPermissions } from \"~/utils/permissions/ModelsPermissions\";\nimport { EntriesPermissions } from \"~/utils/permissions/EntriesPermissions\";\n\nexport type ApiEndpoint = \"manage\" | \"preview\" | \"read\";\n\ninterface HeadlessCmsPermissions {\n groups: ModelGroupsPermissions;\n models: ModelsPermissions;\n entries: EntriesPermissions;\n}\n\nexport interface HeadlessCms\n extends CmsSystemContext,\n CmsGroupContext,\n CmsModelContext,\n CmsEntryContext {\n /**\n * API type\n */\n type: ApiEndpoint | null;\n /**\n * Requested locale\n */\n locale: string;\n /**\n * returns an instance of current locale\n */\n getLocale: () => I18NLocale;\n /**\n * Means this request is a READ API\n */\n READ: boolean;\n /**\n * Means this request is a MANAGE API\n */\n MANAGE: boolean;\n /**\n * Means this request is a PREVIEW API\n */\n PREVIEW: boolean;\n /**\n * The storage operations loaded for current context.\n */\n storageOperations: HeadlessCmsStorageOperations;\n\n /**\n * Use to ensure perform authorization and ensure identities have access to the groups, models and entries.\n */\n accessControl: AccessControl;\n\n /**\n * Permissions for groups, models and entries.\n * @internal\n * @deprecated Will be removed with the 5.40.0 release. Use `accessControl` instead.\n */\n permissions: HeadlessCmsPermissions;\n\n /**\n * Export operations.\n */\n export: HeadlessCmsExport;\n importing: HeadlessCmsImport;\n}\n\n/**\n * @description This combines all contexts used in the CMS into a single one.\n *\n * @category Context\n */\nexport interface CmsContext extends Context, DbContext, I18NContext {\n cms: HeadlessCms;\n}\n\ninterface CmsModelFieldPredefinedValuesValue {\n value: string;\n label: string;\n /**\n * Default selected predefined value.\n */\n selected?: boolean;\n}\n\n/**\n * Object containing content model field predefined options and values.\n *\n * @category CmsModelField\n */\nexport interface CmsModelFieldPredefinedValues {\n /**\n * Are predefined field values enabled?\n */\n enabled: boolean;\n /**\n * Predefined values array.\n */\n values: CmsModelFieldPredefinedValuesValue[];\n}\n\n/**\n * Object containing content model field renderer options.\n *\n * @category CmsModelField\n */\ninterface CmsModelFieldRenderer {\n /**\n * Name of the field renderer. Must have one in field renderer plugins.\n * Can be blank to let automatically determine the renderer.\n */\n name: string;\n}\n\n/**\n * A definition for content model field settings.\n *\n * @category ModelField\n * @category Database model\n */\nexport interface CmsModelFieldSettings {\n /**\n * Predefined values (text, number)\n * The default value for the field in case it is not predefined values field.\n */\n defaultValue?: string | number | null | undefined;\n /**\n * Object field has child fields.\n */\n fields?: CmsModelField[];\n /**\n * Is the file field images only one?\n */\n imagesOnly?: boolean;\n /**\n * Object field has child fields - so it needs to have a layout.\n */\n layout?: string[][];\n /**\n * Ref field.\n */\n models?: Pick<CmsModel, \"modelId\">[];\n /**\n * Date field.\n */\n type?: string;\n /**\n * Disable full text search explicitly on this field.\n */\n disableFullTextSearch?: boolean;\n\n /**\n * There are a lot of other settings that are possible to add, so we keep the type opened.\n */\n [key: string]: any;\n}\n\nexport type CmsModelFieldType =\n | \"boolean\"\n | \"datetime\"\n | \"file\"\n | \"long-text\"\n | \"number\"\n | \"json\"\n | \"object\"\n | \"ref\"\n | \"rich-text\"\n | \"text\"\n | \"dynamicZone\"\n | string;\n\n/**\n * A definition for content model field. This type exists on the app side as well.\n *\n * @category ModelField\n * @category Database model\n */\nexport interface CmsModelField {\n /**\n * A generated unique ID for the model field.\n * MUST be absolute unique throughout the models.\n * Must be in form of a-zA-Z0-9.\n *\n * We generate a unique id value when you're building a model via UI,\n * but when user is creating a model via a plugin it is up to them to be careful about this.\n */\n id: string;\n /**\n * A type of the field.\n * We are defining our built-in fields, so people know which are available by the default.\n */\n type: CmsModelFieldType;\n /**\n * A unique storage ID for storing actual values.\n * Must in form of a-zA-Z0-9@a-zA-Z0-9\n *\n * This is an auto-generated value: uses `id` and `type`\n *\n * This is used as path for the entry value.\n */\n storageId: `${string}@${string}` | string;\n /**\n * Field identifier for the model field that will be available to the outside world.\n * `storageId` is used as path (or column) to store the data.\n *\n * Must in form of a-zA-Z0-9.\n *\n * This value MUST be unique in the CmsModel.\n */\n fieldId: string;\n /**\n * A label for the field\n */\n label: string;\n /**\n * Text below the field to clarify what is it meant to be in the field value\n */\n helpText?: string | null;\n /**\n * Text to be displayed in the field\n */\n placeholderText?: string | null;\n /**\n * Are predefined values enabled? And list of them\n */\n predefinedValues?: CmsModelFieldPredefinedValues;\n /**\n * Field renderer. Blank if determined automatically.\n */\n renderer?: CmsModelFieldRenderer;\n /**\n * List of validations for the field\n *\n * @default []\n */\n validation?: CmsModelFieldValidation[];\n /**\n * List of validations for the list of values, when a field is set to accept a list of values.\n * These validations will be applied to the entire list, and `validation` (see above) will be applied\n * to each individual value in the list.\n *\n * @default []\n */\n listValidation?: CmsModelFieldValidation[];\n /**\n * Is this a multiple values field?\n *\n */\n multipleValues?: boolean;\n /**\n * Fields can be tagged to give them contextual meaning.\n */\n tags?: string[];\n /**\n * Any user defined settings.\n *\n * @default {}\n */\n settings?: CmsModelFieldSettings;\n}\n\nexport interface CmsDynamicZoneTemplate {\n id: string;\n name: string;\n gqlTypeName: string;\n description: string;\n icon: string;\n fields: CmsModelField[];\n layout: string[][];\n validation: CmsModelFieldValidation[];\n tags?: string[];\n}\n\n/**\n * A definition for dynamic-zone field to show possible type of the field in settings.\n */\nexport interface CmsModelDynamicZoneField extends CmsModelField {\n /**\n * Settings object for the field. Contains `templates` property.\n */\n settings: {\n templates: CmsDynamicZoneTemplate[];\n };\n}\n\n/**\n * Used for our internal functionality.\n */\nexport interface CmsModelFieldWithParent extends CmsModelField {\n parent?: CmsModelFieldWithParent | null;\n}\n\n/**\n * A definition for dateTime field to show possible type of the field in settings.\n */\nexport interface CmsModelDateTimeField extends CmsModelField {\n /**\n * Settings object for the field. Contains `type` property.\n */\n settings: {\n type: \"time\" | \"date\" | \"dateTimeWithoutTimezone\" | \"dateTimeWithTimezone\";\n };\n}\n\n/**\n * Arguments for the field validator validate method.\n *\n * @category ModelField\n * @category FieldValidation\n */\nexport interface CmsModelFieldValidatorValidateParams<T = any> {\n /**\n * A value to be validated.\n */\n value: T;\n /**\n * Options from the CmsModelField validations.\n *\n * @see CmsModelField.validation\n * @see CmsModelField.listValidation\n */\n validator: CmsModelFieldValidation;\n /**\n * An instance of the current context.\n */\n context: CmsContext;\n /**\n * Field being validated.\n */\n field: CmsModelField;\n /**\n * An instance of the content model being validated.\n */\n model: CmsModel;\n /**\n * If entry is sent it means it is an update operation.\n * First usage is for the unique field value.\n */\n entry?: CmsEntry;\n}\n\n/**\n * Definition for the field validator.\n *\n * @category Plugin\n * @category ModelField\n * @category FieldValidation\n */\nexport interface CmsModelFieldValidatorPluginValidateCb {\n (params: CmsModelFieldValidatorValidateParams): Promise<boolean>;\n}\n\nexport interface CmsModelFieldValidatorPlugin extends Plugin {\n /**\n * A plugin type.\n */\n type: \"cms-model-field-validator\";\n /**\n * Actual validator definition.\n */\n validator: {\n /**\n * Name of the validator.\n */\n name: string;\n /**\n * Validation method.\n */\n validate: CmsModelFieldValidatorPluginValidateCb;\n };\n}\n\n/**\n * A pattern validator for the content entry field value.\n *\n * @category Plugin\n * @category ModelField\n * @category FieldValidation\n */\nexport interface CmsModelFieldPatternValidatorPlugin extends Plugin {\n /**\n * A plugin type\n */\n type: \"cms-model-field-validator-pattern\";\n /**\n * A pattern object for the validator.\n */\n pattern: {\n /**\n * name of the pattern.\n */\n name: string;\n /**\n * RegExp of the validator.\n */\n regex: string;\n /**\n * RegExp flags\n */\n flags: string;\n };\n}\n\n/**\n * Locked field in the content model\n *\n * @see CmsModel.lockedFields\n *\n * @category ModelField\n */\nexport interface LockedField {\n /**\n * Locked field storage ID - one used to store values.\n * We cannot change this due to old systems.\n */\n fieldId: string;\n /**\n * Is the field multiple values field?\n */\n multipleValues: boolean;\n /**\n * Field type.\n */\n type: string;\n\n [key: string]: any;\n}\n\n/**\n * @category Database model\n * @category CmsModel\n */\nexport interface CmsModelGroup {\n /**\n * Generated ID of the group\n */\n id: string;\n /**\n * Name of the group\n */\n name: string;\n}\n\nexport interface CmsModelAuthorization {\n permissions: boolean;\n\n [key: string]: any;\n}\n\n/**\n * Base CMS Model. Should not be exported and used outside of this package.\n *\n * @category Database model\n * @category CmsModel\n */\nexport interface CmsModel {\n /**\n * Name of the content model.\n */\n name: string;\n /**\n * Unique ID for the content model. Created from name if not defined by user.\n */\n modelId: string;\n /**\n * Name of the content model in singular form to be used in the API.\n * example:\n * - Article\n * - Fruit\n * - Vegetable\n * - Car\n */\n singularApiName: string;\n /**\n * Name of the content model in plural form to be used in the API.\n * example:\n * - Articles\n * - Fruits\n * - Vegetables\n * - Cars\n */\n pluralApiName: string;\n /**\n * Model tenant.\n */\n tenant: string;\n /**\n * Locale this model belongs to.\n */\n locale: string;\n /**\n * Cms Group reference object.\n */\n group: CmsModelGroup;\n /**\n * Icon for the content model.\n */\n icon?: string | null;\n /**\n * Description for the content model.\n */\n description: string | null;\n /**\n * Date created\n */\n createdOn?: string;\n /**\n * Date saved. Changes on both save and create.\n */\n savedOn?: string;\n /**\n * CreatedBy object wrapper. Contains id, name and type of the user.\n */\n createdBy?: CmsIdentity;\n /**\n * List of fields defining entry values.\n */\n fields: CmsModelField[];\n /**\n * Admin UI field layout\n *\n * ```ts\n * layout: [\n * [field1id, field2id],\n * [field3id]\n * ]\n * ```\n */\n layout: string[][];\n /**\n * Models can be tagged to give them contextual meaning.\n */\n tags?: string[];\n /**\n * List of locked fields. Updated when entry is saved and a field has been used.\n */\n lockedFields?: LockedField[];\n /**\n * The field that is being displayed as entry title.\n * It is picked as first available text field. Or user can select own field.\n */\n titleFieldId: string;\n /**\n * The field which is displayed as the description one.\n * Only way this is null or undefined is that there are no long-text fields to be set as description.\n */\n descriptionFieldId?: string | null;\n /**\n * The field which is displayed as the image.\n * Only way this is null or undefined is that there are no file fields, with images only set, to be set as image.\n */\n imageFieldId?: string | null;\n /**\n * The version of Webiny which this record was stored with.\n */\n webinyVersion: string;\n\n /**\n * Is model private?\n * This is meant to be used for some internal models - will not be visible in the schema.\n * Only available for the plugin constructed models.\n */\n isPrivate?: boolean;\n\n /**\n * Does this model require authorization to be performed?\n * Only available for models created via plugins.\n */\n authorization?: boolean | CmsModelAuthorization;\n\n /**\n * Is this model created via plugin?\n */\n isPlugin?: boolean;\n}\n\n/**\n * When sending model to the storage operations, it must contain createValueKeyToStorageConverter and createValueKeyFromStorageConverter\n *\n * @category CmsModel\n */\nexport interface StorageOperationsCmsModel extends CmsModel {\n convertValueKeyToStorage: CmsModelConverterCallable;\n convertValueKeyFromStorage: CmsModelConverterCallable;\n}\n\n/**\n * @category ModelField\n */\nexport interface CmsModelFieldDefinition {\n fields: string;\n typeDefs?: string;\n}\n\ninterface CmsModelFieldToGraphQLCreateResolverParams<TField> {\n models: CmsModel[];\n model: CmsModel;\n graphQLType: string;\n field: TField;\n createFieldResolvers: any;\n fieldTypePlugins: CmsFieldTypePlugins;\n}\n\nexport interface CmsModelFieldToGraphQLCreateResolver<TField = CmsModelField> {\n (params: CmsModelFieldToGraphQLCreateResolverParams<TField>):\n | GraphQLFieldResolver\n | {\n resolver: GraphQLFieldResolver | null;\n typeResolvers: Resolvers<CmsContext>;\n }\n | false;\n}\n\nexport interface CmsModelFieldToGraphQLPluginValidateChildFieldsValidateParams<\n TField extends CmsModelField = CmsModelField\n> {\n fields: TField[];\n originalFields: TField[];\n}\n\nexport interface CmsModelFieldToGraphQLPluginValidateChildFieldsValidate {\n (params: CmsModelFieldToGraphQLPluginValidateChildFieldsValidateParams): void;\n}\n\nexport interface CmsModelFieldToGraphQLPluginValidateChildFieldsParams<\n TField extends CmsModelField = CmsModelField\n> {\n field: TField;\n originalField?: TField;\n validate: CmsModelFieldToGraphQLPluginValidateChildFieldsValidate;\n}\n\nexport interface CmsModelFieldToGraphQLPluginValidateChildFields<\n TField extends CmsModelField = CmsModelField\n> {\n (params: CmsModelFieldToGraphQLPluginValidateChildFieldsParams<TField>): void;\n}\n\n/**\n * @category Plugin\n * @category ModelField\n * @category GraphQL\n */\nexport interface CmsModelFieldToGraphQLPlugin<TField extends CmsModelField = CmsModelField>\n extends Plugin {\n /**\n * A plugin type\n */\n type: \"cms-model-field-to-graphql\";\n /**\n * Field type name which must be exact as the one in `CmsEditorFieldTypePlugin` plugin.\n *\n * ```ts\n * fieldType: \"myField\"\n * ```\n */\n fieldType: CmsModelFieldType;\n /**\n * Is the field searchable via the GraphQL?\n *\n * ```ts\n * isSearchable: false\n * ```\n */\n isSearchable: boolean;\n /**\n * Is the field searchable via full text search?\n *\n * Field is not full text searchable by default.\n * ```ts\n * fullTextSearch: false\n * ```\n */\n fullTextSearch?: boolean;\n /**\n * Is the field sortable via the GraphQL?\n *\n * ```ts\n * isSortable: true\n * ```\n */\n isSortable: boolean;\n /**\n * Optional method which creates the storageId.\n * Primary use is for the datetime field, but if users has some specific fields, they can customize the storageId to their needs.\n *\n * ```ts\n * createStorageId: ({field}) => {\n * if (field.settings.type === \"time) {\n * return `${field.type}_time@${field.id}`\n * }\n * // use default method\n * return undefined;\n * }\n * ```\n */\n createStorageId?: (params: {\n model: CmsModel;\n field: Omit<TField, \"storageId\"> & Partial<Pick<TField, \"storageId\">>;\n }) => string | null | undefined;\n /**\n * Read API methods.\n */\n read: {\n /**\n * Definition for get filtering for GraphQL.\n *\n * ```ts\n * read: {\n * createGetFilters({ field }) {\n * return `${field.fieldId}: MyField`;\n * }\n * }\n * ```\n */\n createGetFilters?(params: { field: TField }): string;\n /**\n * Definition for list filtering for GraphQL.\n *\n * ```ts\n * read: {\n * createListFilters({ field }) {\n * return `\n * ${field.fieldId}: MyType\n * ${field.fieldId}_not: MyType\n * ${field.fieldId}_in: [MyType]\n * ${field.fieldId}_not_in: [MyType]\n * `;\n * }\n * }\n * ```\n */\n createListFilters?(params: {\n model: Pick<CmsModel, \"singularApiName\">;\n field: TField;\n plugins: CmsFieldTypePlugins;\n }): string;\n /**\n * Definition of the field type for GraphQL - be aware if multiple values is selected.\n *\n * ```ts\n * read: {\n * createTypeField({ field }) {\n * if (field.multipleValues) {\n * return `${field.fieldId}: [MyFieldType]`;\n * }\n *\n * return `${field.fieldId}: MyField`;\n * }\n * }\n * ```\n */\n createTypeField(params: {\n models: CmsModel[];\n model: CmsModel;\n field: TField;\n fieldTypePlugins: CmsFieldTypePlugins;\n }): CmsModelFieldDefinition | string | null;\n /**\n * Definition for field resolver.\n * By default, it is simple return of the `instance.values[storageId]` but if required, users can define their own.\n *\n * ```ts\n * read: {\n * createResolver({ field }) {\n * return instance => {\n * return instance.values[field.storageId];\n * };\n * }\n * }\n * ```\n */\n createResolver?: CmsModelFieldToGraphQLCreateResolver<TField>;\n /**\n * Read API schema definitions for the field and resolvers for them.\n *\n * ```ts\n * read: {\n * createSchema() {\n * return {\n * typeDefs: `\n * myField {\n * id\n * date\n * }\n * `,\n * resolvers: {}\n * }\n * }\n * }\n * ```\n */\n createSchema?: (params: { models: CmsModel[] }) => GraphQLSchemaDefinition<CmsContext>;\n };\n manage: {\n /**\n * Definition for list filtering for GraphQL.\n *\n * ```ts\n * manage: {\n * createListFilters({ field }) {\n * return `\n * ${field.fieldId}: MyType\n * ${field.fieldId}_not: MyType\n * ${field.fieldId}_in: [MyType]\n * ${field.fieldId}_not_in: [MyType]\n * `;\n * }\n * }\n * ```\n */\n createListFilters?: (params: {\n model: Pick<CmsModel, \"singularApiName\">;\n field: TField;\n plugins: CmsFieldTypePlugins;\n }) => string;\n /**\n * Manage API schema definitions for the field and resolvers for them. Probably similar to `read.createSchema`.\n *\n * ```ts\n * createSchema() {\n * return {\n * typeDefs: `\n * myField {\n * id\n * date\n * }\n * `,\n * resolvers: {}\n * }\n * }\n * ```\n */\n createSchema?: (params: { models: CmsModel[] }) => GraphQLSchemaDefinition<CmsContext>;\n /**\n * Definition of the field type for GraphQL - be aware if multiple values is selected. Probably same as `read.createTypeField`.\n *\n * ```ts\n * manage: {\n * createTypeField({ field }) {\n * if (field.multipleValues) {\n * return field.fieldId + \": [MyType]\";\n * }\n *\n * return field.fieldId + \": MyType\";\n * }\n * }\n * ```\n */\n createTypeField: (params: {\n models: CmsModel[];\n model: CmsModel;\n field: TField;\n fieldTypePlugins: CmsFieldTypePlugins;\n }) => CmsModelFieldDefinition | string | null;\n /**\n * Definition for input GraphQL field type.\n *\n * ```ts\n * manage: {\n * createInputField({ field }) {\n * if (field.multipleValues) {\n * return field.fieldId + \": [MyField]\";\n * }\n *\n * return field.fieldId + \": MyField\";\n * }\n * }\n * ```\n */\n createInputField: (params: {\n models: CmsModel[];\n model: CmsModel;\n field: TField;\n fieldTypePlugins: CmsFieldTypePlugins;\n }) => CmsModelFieldDefinition | string | null;\n /**\n * Definition for field resolver.\n * By default, it is simple return of the `instance.values[storageId]` but if required, users can define their own.\n *\n * ```ts\n * manage: {\n * createResolver({ field }) {\n * return instance => {\n * return instance.values[field.storageId];\n * };\n * }\n * }\n * ```\n */\n createResolver?: CmsModelFieldToGraphQLCreateResolver<TField>;\n };\n /**\n *\n * @param field\n */\n validateChildFields?: CmsModelFieldToGraphQLPluginValidateChildFields<TField>;\n}\n\n/**\n * Check for content model locked field.\n * A custom plugin definable by the user.\n *\n * @category CmsModel\n * @category Plugin\n */\nexport interface CmsModelLockedFieldPlugin extends Plugin {\n /**\n * A plugin type\n */\n type: \"cms-model-locked-field\";\n /**\n * A unique identifier of the field type (text, number, json, myField, ...).\n */\n fieldType: string;\n /**\n * A method to check if field really is locked.\n */\n checkLockedField?: (params: { lockedField: LockedField; field: CmsModelField }) => void;\n /**\n * A method to get the locked field data.\n */\n getLockedFieldData?: (params: { field: CmsModelField }) => Record<string, any>;\n}\n\n/**\n * @category ModelField\n */\nexport interface CmsFieldTypePlugins {\n [key: string]: CmsModelFieldToGraphQLPlugin;\n}\n\n/**\n * An interface describing the reference to a user that created some data in the database.\n *\n * @category General\n */\nexport interface CmsIdentity {\n /**\n * ID if the user.\n */\n id: string;\n /**\n * Full name of the user.\n */\n displayName: string | null;\n /**\n * Type of the user (admin, user)\n */\n type: string;\n}\n\nexport interface OnSystemBeforeInstallTopicParams {\n tenant: string;\n locale: string;\n}\n\nexport interface OnSystemAfterInstallTopicParams {\n tenant: string;\n locale: string;\n}\n\nexport interface OnSystemInstallErrorTopicParams {\n error: Error;\n tenant: string;\n locale: string;\n}\n\nexport type CmsSystemContext = {\n getSystemVersion: () => Promise<string | null>;\n setSystemVersion: (version: string) => Promise<void>;\n installSystem: () => Promise<void>;\n /**\n * Lifecycle Events\n */\n onSystemBeforeInstall: Topic<OnSystemBeforeInstallTopicParams>;\n onSystemAfterInstall: Topic<OnSystemAfterInstallTopicParams>;\n onSystemInstallError: Topic<OnSystemInstallErrorTopicParams>;\n};\n\n/**\n * A GraphQL `params.data` parameter received when creating content model group.\n *\n * @category CmsGroup\n * @category GraphQL params\n */\nexport interface CmsGroupCreateInput {\n id?: string;\n name: string;\n slug?: string;\n description?: string | null;\n icon: string;\n}\n\n/**\n * A GraphQL `params.data` parameter received when updating content model group.\n *\n * @category CmsGroup\n * @category GraphQL params\n */\nexport interface CmsGroupUpdateInput {\n name?: string;\n slug?: string;\n description?: string;\n icon?: string;\n}\n\n/**\n * A representation of content model group in the database.\n *\n * @category CmsGroup\n * @category Database model\n */\nexport interface CmsGroup {\n /**\n * Generated ID.\n */\n id: string;\n /**\n * Name of the group.\n */\n name: string;\n /**\n * Slug for the group. Must be unique.\n */\n slug: string;\n /**\n * Group tenant.\n */\n tenant: string;\n /**\n * Locale this group belongs to.\n */\n locale: string;\n /**\n * Description for the group.\n */\n description: string | null;\n /**\n * Icon for the group. In a form of \"ico/ico\".\n */\n icon: string;\n /**\n * CreatedBy reference object.\n */\n createdBy?: CmsIdentity;\n /**\n * Date group was created on.\n */\n createdOn?: string;\n /**\n * Date group was created or changed on.\n */\n savedOn?: string;\n /**\n * Which Webiny version was this record stored with.\n */\n webinyVersion: string;\n /**\n * Is group private?\n * This is meant to be used for some internal groups - will not be visible in the schema.\n * Only available for the plugin constructed groups.\n */\n isPrivate?: boolean;\n /**\n * Is this group created via plugin?\n */\n isPlugin?: boolean;\n}\n\n/**\n * A `data.where` parameter received when listing content model groups.\n *\n * @category CmsGroup\n * @category GraphQL params\n */\nexport interface CmsGroupListParams {\n where: {\n tenant: string;\n locale: string;\n };\n}\n\n/**\n * @category CmsGroup\n * @category Topic\n */\nexport interface OnGroupBeforeCreateTopicParams {\n group: CmsGroup;\n}\n\n/**\n * @category CmsGroup\n * @category Topic\n */\nexport interface OnGroupAfterCreateTopicParams {\n group: CmsGroup;\n}\n\n/**\n * @category CmsGroup\n * @category Topic\n */\nexport interface OnGroupCreateErrorTopicParams {\n input: CmsGroupCreateInput;\n group: CmsGroup;\n error: Error;\n}\n\n/**\n * @category CmsGroup\n * @category Topic\n */\nexport interface OnGroupBeforeUpdateTopicParams {\n original: CmsGroup;\n group: CmsGroup;\n}\n\n/**\n * @category CmsGroup\n * @category Topic\n */\nexport interface OnGroupAfterUpdateTopicParams {\n original: CmsGroup;\n group: CmsGroup;\n}\n\n/**\n * @category CmsGroup\n * @category Topic\n */\nexport interface OnGroupUpdateErrorTopicParams {\n input: CmsGroupUpdateInput;\n original: CmsGroup;\n group: CmsGroup;\n error: Error;\n}\n\n/**\n * @category CmsGroup\n * @category Topic\n */\nexport interface OnGroupBeforeDeleteTopicParams {\n group: CmsGroup;\n}\n\n/**\n * @category CmsGroup\n * @category Topic\n */\nexport interface OnGroupAfterDeleteTopicParams {\n group: CmsGroup;\n}\n\n/**\n * @category CmsGroup\n * @category Topic\n */\nexport interface OnGroupDeleteErrorTopicParams {\n group: CmsGroup;\n error: Error;\n}\n\n/**\n * Cms Group in context.\n *\n * @category Context\n * @category CmsGroup\n */\nexport interface CmsGroupContext {\n /**\n * Gets content model group by given id.\n */\n getGroup: (id: string) => Promise<CmsGroup>;\n /**\n * List all content model groups. Filterable via params.\n */\n listGroups: (params?: CmsGroupListParams) => Promise<CmsGroup[]>;\n /**\n * Create a new content model group.\n */\n createGroup: (data: CmsGroupCreateInput) => Promise<CmsGroup>;\n /**\n * Update existing content model group.\n */\n updateGroup: (id: string, data: CmsGroupUpdateInput) => Promise<CmsGroup>;\n /**\n * Delete content model group by given id.\n */\n deleteGroup: (id: string) => Promise<boolean>;\n /**\n * Clear the cached groups.\n */\n clearGroupsCache: () => void;\n /**\n * Lifecycle Events\n */\n onGroupBeforeCreate: Topic<OnGroupBeforeCreateTopicParams>;\n onGroupAfterCreate: Topic<OnGroupAfterCreateTopicParams>;\n onGroupCreateError: Topic<OnGroupCreateErrorTopicParams>;\n onGroupBeforeUpdate: Topic<OnGroupBeforeUpdateTopicParams>;\n onGroupAfterUpdate: Topic<OnGroupAfterUpdateTopicParams>;\n onGroupUpdateError: Topic<OnGroupUpdateErrorTopicParams>;\n onGroupBeforeDelete: Topic<OnGroupBeforeDeleteTopicParams>;\n onGroupAfterDelete: Topic<OnGroupAfterDeleteTopicParams>;\n onGroupDeleteError: Topic<OnGroupDeleteErrorTopicParams>;\n}\n\n/**\n * Definition for content model field validator.\n *\n * @category ModelField\n * @category FieldValidation\n */\nexport interface CmsModelFieldValidation {\n name: string;\n message: string;\n settings?: {\n value?: string | number;\n values?: string[];\n preset?: string;\n [key: string]: any;\n };\n}\n\n/**\n * A GraphQL `params.data` parameter received when creating content model.\n *\n * @category GraphQL params\n * @category CmsModel\n */\nexport interface CmsModelCreateInput {\n /**\n * Name of the content model.\n */\n name: string;\n /**\n * Singular name of the content model to be used in the API.\n */\n singularApiName: string;\n /**\n * Plural name of the content model to be used in the API.\n */\n pluralApiName: string;\n /**\n * Unique ID of the content model. Created from name if not sent by the user. Cannot be changed.\n */\n modelId?: string;\n /**\n * Description of the content model.\n */\n description?: string | null;\n /**\n * Group where to put the content model in.\n */\n group: string;\n /**\n * A list of content model fields to define the entry values.\n */\n fields?: CmsModelFieldInput[];\n /**\n * Admin UI field layout\n *\n * ```ts\n * layout: [\n * [field1id, field2id],\n * [field3id]\n * ]\n * ```\n */\n layout?: string[][];\n /**\n * Models can be tagged to give them contextual meaning.\n */\n tags?: string[];\n /**\n * Fields fieldId which are picked to represent the CMS entry.\n */\n titleFieldId?: string | null;\n descriptionFieldId?: string | null;\n imageFieldId?: string | null;\n}\n\n/**\n * A GraphQL `params.data` parameter received when creating content model from existing model.\n *\n * @category GraphQL params\n * @category CmsModel\n */\nexport interface CmsModelCreateFromInput extends CmsModelCreateInput {\n /**\n * Locale into which we want to clone the model into.\n */\n locale?: string;\n}\n\n/**\n * A definition for content model field received from the user.\n *\n * Input type for `CmsModelField`.\n * @see CmsModelField\n *\n * @category GraphQL params\n * @category ModelField\n */\nexport interface CmsModelFieldInput {\n /**\n * Generated ID.\n */\n id: string;\n /**\n * Type of the field. A plugin for the field must be defined.\n * @see CmsModelFieldToGraphQLPlugin\n */\n type: string;\n /**\n * Field outside world identifier for the field. Must be unique in the model.\n */\n fieldId: string;\n /**\n * Label for the field.\n */\n label: string;\n /**\n * Text to display below the field to help user what to write in the field.\n */\n helpText?: string | null;\n /**\n * Text to display in the field.\n */\n placeholderText?: string | null;\n /**\n * Fields can be tagged to give them contextual meaning.\n */\n tags?: string[];\n /**\n * Are multiple values allowed?\n */\n multipleValues?: boolean;\n /**\n * Predefined values options for the field. Check the reference for more information.\n */\n predefinedValues?: CmsModelFieldPredefinedValues;\n /**\n * Renderer options for the field. Check the reference for more information.\n */\n renderer?: CmsModelFieldRenderer;\n /**\n * List of validations for the field.\n */\n validation?: CmsModelFieldValidation[];\n /**\n * @see CmsModelField.listValidation\n */\n listValidation?: CmsModelFieldValidation[];\n /**\n * User defined settings.\n */\n settings?: Record<string, any>;\n}\n\n/**\n * A GraphQL `params.data` parameter received when updating content model.\n *\n * @category GraphQL params\n * @category CmsModel\n */\nexport interface CmsModelUpdateInput {\n /**\n * A new content model name.\n */\n name?: string;\n /**\n * A new singular name of the content model to be used in the API.\n */\n singularApiName?: string;\n /**\n * A new plural name of the content model to be used in the API.\n */\n pluralApiName?: string;\n /**\n * A group we want to move the model to.\n */\n group?: string;\n /**\n * A new description of the content model.\n */\n description?: string | null;\n /**\n * A list of content model fields to define the entry values.\n */\n fields: CmsModelFieldInput[];\n /**\n * Admin UI field layout\n *\n * ```ts\n * layout: [\n * [field1id, field2id],\n * [field3id]\n * ]\n * ```\n */\n layout: string[][];\n /**\n * Fields fieldId which are picked to represent the CMS entry.\n */\n titleFieldId?: string | null;\n descriptionFieldId?: string | null;\n imageFieldId?: string | null;\n}\n\n/**\n * A plugin to load a CmsModelManager.\n *\n * @see CmsModelManager\n *\n * @category Plugin\n * @category CmsModel\n * @category CmsEntry\n */\nexport interface ModelManagerPlugin extends Plugin {\n /**\n * A plugin type.\n */\n type: \"cms-content-model-manager\";\n /**\n * Specific model CmsModelManager loader. Can target exact modelId(s).\n * Be aware that if you define multiple plugins without `modelId`, last one will run.\n */\n modelId?: string[] | string;\n /**\n * Create a CmsModelManager for specific type - or new default one.\n * For reference in how is this plugin run check [contentModelManagerFactory](https://github.com/webiny/webiny-js/blob/f15676/packages/api-headless-cms/src/content/plugins/CRUD/contentModel/contentModelManagerFactory.ts)\n */\n create: (context: CmsContext, model: CmsModel) => Promise<CmsModelManager>;\n}\n\n/**\n * A content entry values definition for and from the database.\n *\n * @category Database model\n * @category CmsEntry\n */\nexport interface CmsEntryValues {\n [key: string]: any;\n}\n\n/**\n * A content entry definition for and from the database.\n *\n * @category Database model\n * @category CmsEntry\n */\nexport interface CmsEntry<T = CmsEntryValues> {\n /**\n * A version of the webiny this entry was created with.\n * This can be used when upgrading the system, so we know which entries to update.\n */\n webinyVersion: string;\n /**\n * Tenant id which is this entry for. Can be used in case of shared storage.\n */\n tenant: string;\n /**\n * Generated ID of the entry. It is shared across all the records in the database that represent a single entry.\n * So version 1, 2, ..., 2371 will have the same value in this field to link them together.\n */\n entryId: string;\n /**\n * Generated ID + version of the entry.\n */\n id: string;\n\n /**\n * Revision-level meta fields. 👇\n */\n\n /**\n * An ISO 8601 date/time string.\n */\n revisionCreatedOn: string;\n /**\n * An ISO 8601 date/time string.\n */\n revisionSavedOn: string;\n /**\n * An ISO 8601 date/time string.\n */\n revisionModifiedOn: string | null;\n /**\n * An ISO 8601 date/time string.\n */\n revisionFirstPublishedOn: string | null;\n /**\n * An ISO 8601 date/time string.\n */\n revisionLastPublishedOn: string | null;\n\n /**\n * Identity that last ionCreated the entry.\n */\n revisionCreatedBy: CmsIdentity;\n /**\n * Identity that last ionSaved the entry.\n */\n revisionSavedBy: CmsIdentity;\n /**\n * Identity that last ionModified the entry.\n */\n revisionModifiedBy: CmsIdentity | null;\n /**\n * Identity that first published the entry.\n */\n revisionFirstPublishedBy: CmsIdentity | null;\n /**\n * Identity that last published the entry.\n */\n revisionLastPublishedBy: CmsIdentity | null;\n\n /**\n * An ISO 8601 date/time string.\n */\n createdOn: string;\n /**\n * An ISO 8601 date/time string.\n */\n savedOn: string;\n /**\n * An ISO 8601 date/time string.\n */\n modifiedOn: string | null;\n /**\n * An ISO 8601 date/time string.\n */\n firstPublishedOn: string | null;\n /**\n * An ISO 8601 date/time string.\n */\n lastPublishedOn: string | null;\n\n /**\n * Identity that last created the entry.\n */\n createdBy: CmsIdentity;\n /**\n * Identity that last saved the entry.\n */\n savedBy: CmsIdentity;\n /**\n * Identity that last modified the entry.\n */\n modifiedBy: CmsIdentity | null;\n /**\n * Identity that first published the entry.\n */\n firstPublishedBy: CmsIdentity | null;\n /**\n * Identity that last published the entry.\n */\n lastPublishedBy: CmsIdentity | null;\n\n /**\n * Model ID of the definition for the entry.\n * @see CmsModel\n */\n modelId: string;\n /**\n * A locale of the entry.\n * @see I18NLocale.code\n */\n locale: string;\n /**\n * A revision version of the entry.\n */\n version: number;\n /**\n * Is the entry locked?\n */\n locked: boolean;\n /**\n * Status type of the entry.\n */\n status: CmsEntryStatus;\n /**\n * A mapped storageId -> value object.\n *\n * @see CmsModelField\n */\n values: T;\n /**\n * Advanced Content Organization\n */\n location?: {\n folderId?: string | null;\n };\n /**\n * Settings for the given entry.\n *\n * Introduced with Advanced Publishing Workflow. Will always be inserted once this PR is merged.\n * Be aware that when accessing properties in it on old systems, it will break if not checked first.\n *\n * Available only on the Manage API in entry GraphQL type `meta.data` property.\n */\n meta?: {\n [key: string]: any;\n };\n}\n\nexport interface CmsStorageEntry extends CmsEntry {\n [key: string]: any;\n}\n\nexport interface CmsEntryUniqueValue {\n value: string;\n count: number;\n}\n\n/**\n * A definition for content model manager to be used in the code.\n * The default one uses `CmsEntryContext` methods internally, but devs can change to what every they want.\n *\n * @see CmsEntryContext\n *\n * @category Context\n * @category CmsEntry\n * @category CmsModel\n */\nexport interface CmsModelManager {\n /**\n * List only published entries in the content model.\n */\n listPublished: (params: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;\n /**\n * List latest entries in the content model. Used for administration.\n */\n listLatest: (params: CmsEntryListParams) => Promise<[CmsEntry[], CmsEntryMeta]>;\n /**\n * Get a list of published entries by the ID list.\n */\n getPublishedByIds: (ids: string[]) => Promise<CmsEntry[]>;\n /**\n * Get a list of the latest entries by the ID list.\n */\n getLatestByIds: (ids: string[]) => Promise<CmsEntry[]>;\n /**\n * Get an entry filtered by given params. Will always get one.\n */\n get: (id: string) => Promise<CmsEntry>;\n /**\n * Create an entry.\n */\n create: (data: CreateCmsEntryInput) => Promise<CmsEntry>;\n /**\n * Update an entry.\n */\n update: (id: string, data: UpdateCmsEntryInput) => Promise<CmsEntry>;\n /**\n * Delete an entry.\n */\n delete: (id: string) => Promise<void>;\n}\n\n/**\n * Create\n */\nexport interface OnModelBeforeCreateTopicParams {\n input: CmsModelCreateInput;\n model: CmsModel;\n}\n\nexport interface OnModelAfterCreateTopicParams {\n input: CmsModelCreateInput;\n model: CmsModel;\n}\n\nexport interface OnModelCreateErrorTopicParams {\n input: CmsModelCreateInput;\n model: CmsModel;\n error: Error;\n}\n\n/**\n * Create From / Clone\n */\nexport interface OnModelBeforeCreateFromTopicParams {\n input: CmsModelCreateInput;\n original: CmsModel;\n model: CmsModel;\n}\n\nexport interface OnModelAfterCreateFromTopicParams {\n input: CmsModelCreateInput;\n original: CmsModel;\n model: CmsModel;\n}\n\nexport interface OnModelCreateFromErrorParams {\n input: CmsModelCreateInput;\n original: CmsModel;\n model: CmsModel;\n error: Error;\n}\n\n/**\n * Update\n */\nexport interface OnModelBeforeUpdateTopicParams {\n input: CmsModelUpdateInput;\n original: CmsModel;\n model: CmsModel;\n}\n\nexport interface OnModelAfterUpdateTopicParams {\n input: CmsModelUpdateInput;\n original: CmsModel;\n model: CmsModel;\n}\n\nexport interface OnModelUpdateErrorTopicParams {\n input: CmsModelUpdateInput;\n original: CmsModel;\n model: CmsModel;\n error: Error;\n}\n\n/**\n * Delete\n */\nexport interface OnModelBeforeDeleteTopicParams {\n model: CmsModel;\n}\n\nexport interface OnModelAfterDeleteTopicParams {\n model: CmsModel;\n}\n\nexport interface OnModelDeleteErrorTopicParams {\n model: CmsModel;\n error: Error;\n}\n\n/**\n * Initialize\n */\nexport interface OnModelInitializeParams {\n model: CmsModel;\n data: Record<string, any>;\n}\n\n/**\n *\n */\nexport interface CmsModelUpdateDirectParams {\n model: CmsModel;\n original: CmsModel;\n}\n\n/**\n * Cms Model in the context.\n *\n * @category Context\n * @category CmsModel\n */\nexport interface CmsModelContext {\n /**\n * Get a single content model.\n */\n getModel: (modelId: string) => Promise<CmsModel | null>;\n /**\n * Get all content models.\n */\n listModels: () => Promise<CmsModel[]>;\n /**\n * Create a content model.\n */\n createModel: (data: CmsModelCreateInput) => Promise<CmsModel>;\n /**\n * Create a content model from the given model - clone.\n */\n createModelFrom: (modelId: string, data: CmsModelCreateFromInput) => Promise<CmsModel>;\n /**\n * Update content model without data validation. Used internally.\n * @hidden\n */\n updateModelDirect: (params: CmsModelUpdateDirectParams) => Promise<CmsModel>;\n /**\n * Update content model.\n */\n updateModel: (modelId: string, data: CmsModelUpdateInput) => Promise<CmsModel>;\n /**\n * Delete content model. Should not allow deletion if there are entries connected to it.\n */\n deleteModel: (modelId: string) => Promise<void>;\n /**\n * Possibility for users to trigger the model initialization.\n * They can hook into it and do what ever they want to.\n *\n * Primary idea behind this is creating the index, for the code models, in the ES.\n */\n initializeModel: (modelId: string, data: Record<string, any>) => Promise<boolean>;\n /**\n * Get an instance of CmsModelManager for given content modelId.\n *\n * @see CmsModelManager\n */\n getEntryManager: (model: CmsModel | string) => Promise<CmsModelManager>;\n /**\n * Get all content model managers mapped by modelId.\n * @see CmsModelManager\n */\n getEntryManagers: () => Map<string, CmsModelManager>;\n /**\n * Clear all the model caches.\n */\n clearModelsCache: () => void;\n /**\n * Lifecycle Events\n */\n onModelBeforeCreate: Topic<OnModelBeforeCreateTopicParams>;\n onModelAfterCreate: Topic<OnModelAfterCreateTopicParams>;\n onModelCreateError: Topic<OnModelCreateErrorTopicParams>;\n onModelBeforeCreateFrom: Topic<OnModelBeforeCreateFromTopicParams>;\n onModelAfterCreateFrom: Topic<OnModelAfterCreateFromTopicParams>;\n onModelCreateFromError: Topic<OnModelCreateFromErrorParams>;\n onModelBeforeUpdate: Topic<OnModelBeforeUpdateTopicParams>;\n onModelAfterUpdate: Topic<OnModelAfterUpdateTopicParams>;\n onModelUpdateError: Topic<OnModelUpdateErrorTopicParams>;\n onModelBeforeDelete: Topic<OnModelBeforeDeleteTopicParams>;\n onModelAfterDelete: Topic<OnModelAfterDeleteTopicParams>;\n onModelDeleteError: Topic<OnModelDeleteErrorTopicParams>;\n onModelInitialize: Topic<OnModelInitializeParams>;\n}\n\n/**\n * Available statuses for content entry.\n *\n * @category CmsEntry\n */\nexport type CmsEntryStatus = \"published\" | \"unpublished\" | \"draft\";\n\nexport interface CmsEntryListWhereRef {\n id?: string;\n id_in?: string[];\n id_not?: string;\n id_not_in?: string[];\n entryId?: string;\n entryId_not?: string;\n entryId_in?: string[];\n entryId_not_in?: string[];\n}\n\n/**\n * Entry listing where params.\n *\n * @category CmsEntry\n * @category GraphQL params\n */\nexport interface CmsEntryListWhere {\n /**\n * Fields.\n */\n id?: string;\n id_in?: string[];\n id_not?: string;\n id_not_in?: string[];\n /**\n * Generated ID without the version.\n */\n entryId?: string;\n entryId_not?: string;\n entryId_in?: string[];\n entryId_not_in?: string[];\n\n /**\n * Revision-level meta fields. 👇\n */\n revisionCreatedBy?: string;\n revisionCreatedBy_not?: string;\n revisionCreatedBy_in?: string[];\n revisionCreatedBy_not_in?: string[];\n\n revisionModifiedBy?: string;\n revisionModifiedBy_not?: string;\n revisionModifiedBy_in?: string[];\n revisionModifiedBy_not_in?: string[];\n\n revisionSavedBy?: string;\n revisionSavedBy_not?: string;\n revisionSavedBy_in?: string[];\n revisionSavedBy_not_in?: string[];\n\n revisionFirstPublishedBy?: string;\n revisionFirstPublishedBy_not?: string;\n revisionFirstPublishedBy_in?: string[];\n revisionFirstPublishedBy_not_in?: string[];\n\n revisionLastPublishedBy?: string;\n revisionLastPublishedBy_not?: string;\n revisionLastPublishedBy_in?: string[];\n revisionLastPublishedBy_not_in?: string[];\n\n /**\n * Entry-level meta fields. 👇\n */\n createdBy?: string;\n createdBy_not?: string;\n createdBy_in?: string[];\n createdBy_not_in?: string[];\n\n modifiedBy?: string;\n modifiedBy_not?: string;\n modifiedBy_in?: string[];\n modifiedBy_not_in?: string[];\n\n savedBy?: string;\n savedBy_not?: string;\n savedBy_in?: string[];\n savedBy_not_in?: string[];\n\n firstPublishedBy?: string;\n firstPublishedBy_not?: string;\n firstPublishedBy_in?: string[];\n firstPublishedBy_not_in?: string[];\n\n lastPublishedBy?: string;\n lastPublishedBy_not?: string;\n lastPublishedBy_in?: string[];\n lastPublishedBy_not_in?: string[];\n\n /**\n * Version of the entry.\n *\n * It is not meant to be used via the API.\n * @internal\n */\n version?: number;\n version_lt?: number;\n version_gt?: number;\n /**\n * Each storage operations implementation MUST determine how to use this field.\n * In SQL, it can be a `published` field, and in DynamoDB it can be an SK.\n *\n * It is not meant to be used via the API.\n * @internal\n */\n published?: boolean;\n /**\n * Each storage operations implementation MUST determine how to use this field.\n * In SQL, it can be a `latest` field, and in DynamoDB it can be an SK.\n *\n * It is not meant to be used via the API.\n * @internal\n */\n latest?: boolean;\n /**\n * ACO related parameters.\n */\n wbyAco_location?: {\n folderId?: string;\n folderId_not?: string;\n folderId_in?: string[];\n folderId_not_in?: string[];\n AND?: CmsEntryListWhere[];\n OR?: CmsEntryListWhere[];\n };\n\n /**\n * This is to allow querying by any content model field defined by the user.\n */\n [key: string]:\n | string\n | number\n | boolean\n | undefined\n | string[]\n | number[]\n | null\n | CmsEntryListWhere[]\n | CmsEntryListWhere\n | CmsEntryListWhereRef;\n\n /**\n * To allow querying via nested queries, we added the AND / OR properties.\n */\n AND?: CmsEntryListWhere[];\n OR?: CmsEntryListWhere[];\n}\n\n/**\n * Entry listing sort.\n *\n * @category CmsEntry\n * @category GraphQL params\n */\nexport type CmsEntryListSort = string[];\n\n/**\n * Get entry GraphQL resolver params.\n *\n * @category CmsEntry\n * @category GraphQL params\n */\nexport interface CmsEntryGetParams {\n where: CmsEntryListWhere;\n sort?: CmsEntryListSort;\n}\n\n/**\n * List entries GraphQL resolver params.\n *\n * @category CmsEntry\n * @category GraphQL params\n */\nexport interface CmsEntryListParams {\n where?: CmsEntryListWhere;\n sort?: CmsEntryListSort;\n search?: string;\n fields?: string[];\n limit?: number;\n after?: string | null;\n}\n\n/**\n * Meta information for GraphQL output.\n *\n * @category CmsEntry\n * @category GraphQL output\n */\nexport interface CmsEntryMeta {\n /**\n * A cursor for pagination.\n */\n cursor: string | null;\n /**\n * Is there more items to load?\n */\n hasMoreItems: boolean;\n /**\n * Total count of the items in the storage.\n */\n totalCount: number;\n}\n\n/**\n * Create\n */\nexport interface OnEntryBeforeCreateTopicParams {\n input: CreateCmsEntryInput;\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryAfterCreateTopicParams {\n input: CreateCmsEntryInput;\n entry: CmsEntry;\n model: CmsModel;\n storageEntry: CmsEntry;\n}\n\nexport interface OnEntryCreateErrorTopicParams {\n error: Error;\n input: CreateCmsEntryInput;\n entry: CmsEntry;\n model: CmsModel;\n}\n\n/**\n * Revision Create\n */\nexport interface OnEntryRevisionBeforeCreateTopicParams {\n input: CreateFromCmsEntryInput;\n entry: CmsEntry;\n original: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryRevisionAfterCreateTopicParams {\n input: CreateFromCmsEntryInput;\n entry: CmsEntry;\n original: CmsEntry;\n model: CmsModel;\n storageEntry: CmsEntry;\n}\n\nexport interface OnEntryCreateRevisionErrorTopicParams {\n error: Error;\n input: CreateFromCmsEntryInput;\n original: CmsEntry;\n entry: CmsEntry;\n model: CmsModel;\n}\n\n/**\n * Update\n */\nexport interface OnEntryBeforeUpdateTopicParams {\n input: UpdateCmsEntryInput;\n original: CmsEntry;\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryAfterUpdateTopicParams {\n input: UpdateCmsEntryInput;\n original: CmsEntry;\n entry: CmsEntry;\n model: CmsModel;\n storageEntry: CmsEntry;\n}\n\nexport interface OnEntryUpdateErrorTopicParams {\n error: Error;\n input: UpdateCmsEntryInput;\n entry: CmsEntry;\n model: CmsModel;\n}\n\n/**\n * Move\n */\nexport interface OnEntryBeforeMoveTopicParams {\n folderId: string;\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryAfterMoveTopicParams {\n folderId: string;\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryMoveErrorTopicParams {\n error: Error;\n folderId: string;\n entry: CmsEntry;\n model: CmsModel;\n}\n\n/**\n * Publish\n */\n\nexport interface OnEntryBeforePublishTopicParams {\n original: CmsEntry;\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryAfterPublishTopicParams {\n original: CmsEntry;\n entry: CmsEntry;\n model: CmsModel;\n storageEntry: CmsEntry;\n}\n\nexport interface OnEntryPublishErrorTopicParams {\n error: Error;\n original: CmsEntry;\n entry: CmsEntry;\n model: CmsModel;\n}\n\n/**\n * Republish\n */\nexport interface OnEntryBeforeRepublishTopicParams {\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryAfterRepublishTopicParams {\n entry: CmsEntry;\n model: CmsModel;\n storageEntry: CmsEntry;\n}\n\nexport interface OnEntryRepublishErrorTopicParams {\n error: Error;\n entry: CmsEntry;\n model: CmsModel;\n}\n\n/**\n * Unpublish\n */\n\nexport interface OnEntryBeforeUnpublishTopicParams {\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryAfterUnpublishTopicParams {\n entry: CmsEntry;\n model: CmsModel;\n storageEntry: CmsEntry;\n}\n\nexport interface OnEntryUnpublishErrorTopicParams {\n error: Error;\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryBeforeDeleteTopicParams {\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryAfterDeleteTopicParams {\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryDeleteErrorTopicParams {\n error: Error;\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryRevisionBeforeDeleteTopicParams {\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryRevisionAfterDeleteTopicParams {\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryRevisionDeleteErrorTopicParams {\n error: Error;\n entry: CmsEntry;\n model: CmsModel;\n}\n\nexport interface OnEntryBeforeDeleteMultipleTopicParams {\n model: CmsModel;\n entries: CmsEntry[];\n ids: string[];\n}\n\nexport interface OnEntryAfterDeleteMultipleTopicParams {\n model: CmsModel;\n entries: CmsEntry[];\n ids: string[];\n}\n\nexport interface OnEntryDeleteMultipleErrorTopicParams {\n model: CmsModel;\n entries: CmsEntry[];\n ids: string[];\n error: Error;\n}\n\nexport interface OnEntryBeforeGetTopicParams {\n model: CmsModel;\n where: CmsEntryListWhere;\n}\n\nexport interface EntryBeforeListTopicParams {\n where: CmsEntryListWhere;\n model: CmsModel;\n}\n\n/**\n * @category Context\n * @category CmsEntry\n */\nexport interface CreateCmsEntryInput {\n id?: string;\n status?: CmsEntryStatus;\n\n /**\n * Entry-level meta fields. 👇\n */\n createdOn?: Date | string;\n modifiedOn?: Date | string | null;\n savedOn?: Date | string;\n createdBy?: CmsIdentity;\n modifiedBy?: CmsIdentity | null;\n savedBy?: CmsIdentity;\n firstPublishedOn?: Date | string;\n lastPublishedOn?: Date | string;\n firstPublishedBy?: CmsIdentity;\n lastPublishedBy?: CmsIdentity;\n\n /**\n * Revision-level meta fields. 👇\n */\n revisionCreatedOn?: Date | string;\n revisionModifiedOn?: Date | string | null;\n revisionSavedOn?: Date | string;\n revisionCreatedBy?: CmsIdentity;\n revisionModifiedBy?: CmsIdentity | null;\n revisionSavedBy?: CmsIdentity;\n revisionFirstPublishedOn?: Date | string;\n revisionLastPublishedOn?: Date | string;\n revisionFirstPublishedBy?: CmsIdentity;\n revisionLastPublishedBy?: CmsIdentity;\n\n wbyAco_location?: {\n folderId?: string | null;\n };\n\n [key: string]: any;\n}\n\nexport interface CreateCmsEntryOptionsInput {\n skipValidators?: string[];\n}\n\n/**\n * @category Context\n * @category CmsEntry\n */\nexport interface CreateFromCmsEntryInput {\n /**\n * Revision-level meta fields. 👇\n */\n revisionCreatedOn?: Date;\n revisionSavedOn?: Date;\n revisionModifiedOn?: Date;\n revisionCreatedBy?: CmsIdentity;\n revisionModifiedBy?: CmsIdentity;\n revisionSavedBy?: CmsIdentity;\n revisionFirstPublishedOn?: Date | string;\n revisionLastPublishedOn?: Date | string;\n revisionFirstPublishedBy?: CmsIdentity;\n revisionLastPublishedBy?: CmsIdentity;\n\n /**\n * Entry-level meta fields. 👇\n */\n createdOn?: Date;\n savedOn?: Date;\n modifiedOn?: Date;\n createdBy?: CmsIdentity;\n modifiedBy?: CmsIdentity;\n savedBy?: CmsIdentity;\n firstPublishedOn?: Date | string;\n lastPublishedOn?: Date | string;\n firstPublishedBy?: CmsIdentity;\n lastPublishedBy?: CmsIdentity;\n\n [key: string]: any;\n}\n\nexport interface CreateRevisionCmsEntryOptionsInput {\n skipValidators?: string[];\n}\n\n/**\n * @category Context\n * @category CmsEntry\n */\nexport interface UpdateCmsEntryInput {\n /**\n * Revision-level meta fields. 👇\n */\n revisionCreatedOn?: Date | string | null;\n revisionModifiedOn?: Date | string | null;\n revisionSavedOn?: Date | string | null;\n revisionFirstPublishedOn?: Date | string | null;\n revisionLastPublishedOn?: Date | string | null;\n revisionModifiedBy?: CmsIdentity | null;\n revisionCreatedBy?: CmsIdentity | null;\n revisionSavedBy?: CmsIdentity | null;\n revisionFirstPublishedBy?: CmsIdentity | null;\n revisionLastPublishedBy?: CmsIdentity | null;\n\n /**\n * Entry-level meta fields. 👇\n */\n createdOn?: Date | string | null;\n modifiedOn?: Date | string | null;\n savedOn?: Date | string | null;\n firstPublishedOn?: Date | string | null;\n lastPublishedOn?: Date | string | null;\n createdBy?: CmsIdentity | null;\n modifiedBy?: CmsIdentity | null;\n savedBy?: CmsIdentity | null;\n firstPublishedBy?: CmsIdentity | null;\n lastPublishedBy?: CmsIdentity | null;\n\n wbyAco_location?: {\n folderId?: string | null;\n };\n\n [key: string]: any;\n}\n\nexport interface UpdateCmsEntryOptionsInput {\n skipValidators?: string[];\n}\n\n/**\n * @category Context\n * @category CmsEntry\n */\nexport interface GetUniqueFieldValuesParams {\n where: CmsEntryListWhere;\n fieldId: string;\n}\n\n/**\n * @category CmsEntry\n */\nexport interface CmsDeleteEntryOptions {\n /**\n * Runs the delete commands even if the entry is not found in the DynamoDB.\n * This is to force clean the entry records that might have been left behind a failed delete.\n */\n force?: boolean;\n}\n\n/**\n * @category Context\n * @category CmsEntry\n */\nexport interface DeleteMultipleEntriesParams {\n entries: string[];\n}\n\nexport type DeleteMultipleEntriesResponse = {\n id: string;\n}[];\n\nexport interface CmsEntryValidateResponse {\n [key: string]: any;\n}\n\n/**\n * Cms Entry CRUD methods in the context.\n *\n * @category Context\n * @category CmsEntry\n */\nexport interface CmsEntryContext {\n /**\n * Get a single content entry for a model.\n */\n getEntry: (model: CmsModel, params: CmsEntryGetParams) => Promise<CmsEntry>;\n /**\n * Get a list of entries for a model by a given ID (revision).\n */\n getEntriesByIds: (model: CmsModel, revisions: string[]) => Promise<CmsEntry[]>;\n /**\n * Get the entry for a model by a given ID.\n */\n getEntryById: (model: CmsModel, revision: string) => Promise<CmsEntry>;\n /**\n * List entries for a model. Internal method used by get, listLatest and listPublished.\n */\n listEntries: <T = CmsEntryValues>(\n model: CmsModel,\n params: CmsEntryListParams\n ) => Promise<[CmsEntry<T>[], CmsEntryMeta]>;\n /**\n * Lists the latest entries. Used for manage API.\n */\n listLatestEntries: <T = CmsEntryValues>(\n model: CmsModel,\n params?: CmsEntryListParams\n ) => Promise<[CmsEntry<T>[], CmsEntryMeta]>;\n /**\n * List published entries. Used for read API.\n */\n listPublishedEntries: <T = CmsEntryValues>(\n model: CmsModel,\n params?: CmsEntryListParams\n ) => Promise<[CmsEntry<T>[], CmsEntryMeta]>;\n /**\n * List published entries by IDs.\n */\n getPublishedEntriesByIds: (model: CmsModel, ids: string[]) => Promise<CmsEntry[]>;\n /**\n * List latest entries by IDs.\n */\n getLatestEntriesByIds: (model: CmsModel, ids: string[]) => Promise<CmsEntry[]>;\n /**\n * Create a new content entry.\n */\n createEntry: (\n model: CmsModel,\n input: CreateCmsEntryInput,\n options?: CreateCmsEntryOptionsInput\n ) => Promise<CmsEntry>;\n /**\n * Create a new entry from already existing entry.\n */\n createEntryRevisionFrom: (\n model: CmsModel,\n id: string,\n input: CreateFromCmsEntryInput,\n options?: CreateRevisionCmsEntryOptionsInput\n ) => Promise<CmsEntry>;\n /**\n * Update existing entry.\n */\n updateEntry: (\n model: CmsModel,\n id: string,\n input: UpdateCmsEntryInput,\n meta?: Record<string, any>,\n options?: UpdateCmsEntryOptionsInput\n ) => Promise<CmsEntry>;\n /**\n * Validate the entry - either new one or existing one.\n */\n validateEntry: (\n model: CmsModel,\n id?: string,\n input?: UpdateCmsEntryInput\n ) => Promise<CmsEntryValidateResponse>;\n /**\n * Move entry, and all its revisions, to a new folder.\n */\n moveEntry: (model: CmsModel, id: string, folderId: string) => Promise<CmsEntry>;\n /**\n * Method that republishes entry with given identifier.\n * @internal\n */\n republishEntry: (model: CmsModel, id: string) => Promise<CmsEntry>;\n /**\n * Delete only a certain revision of the entry.\n */\n deleteEntryRevision: (model: CmsModel, id: string) => Promise<void>;\n /**\n * Delete entry with all its revisions.\n */\n deleteEntry: (model: CmsModel, id: string, options?: CmsDeleteEntryOptions) => Promise<void>;\n /**\n * Delete multiple entries\n */\n deleteMultipleEntries: (\n model: CmsModel,\n params: DeleteMultipleEntriesParams\n ) => Promise<DeleteMultipleEntriesResponse>;\n /**\n * Publish entry.\n */\n publishEntry: (model: CmsModel, id: string) => Promise<CmsEntry>;\n /**\n * Unpublish entry.\n */\n unpublishEntry: (model: CmsModel, id: string) => Promise<CmsEntry>;\n /**\n * Get all entry revisions.\n */\n getEntryRevisions: (model: CmsModel, id: string) => Promise<CmsEntry[]>;\n /**\n * List all unique values for a given field.\n *\n * @internal\n */\n getUniqueFieldValues: (\n model: CmsModel,\n params: GetUniqueFieldValuesParams\n ) => Promise<CmsEntryUniqueValue[]>;\n /**\n * Lifecycle Events\n */\n onEntryBeforeCreate: Topic<OnEntryBeforeCreateTopicParams>;\n onEntryAfterCreate: Topic<OnEntryAfterCreateTopicParams>;\n onEntryCreateError: Topic<OnEntryCreateErrorTopicParams>;\n\n onEntryRevisionBeforeCreate: Topic<OnEntryRevisionBeforeCreateTopicParams>;\n onEntryRevisionAfterCreate: Topic<OnEntryRevisionAfterCreateTopicParams>;\n onEntryRevisionCreateError: Topic<OnEntryCreateRevisionErrorTopicParams>;\n\n onEntryBeforeUpdate: Topic<OnEntryBeforeUpdateTopicParams>;\n onEntryAfterUpdate: Topic<OnEntryAfterUpdateTopicParams>;\n onEntryUpdateError: Topic<OnEntryUpdateErrorTopicParams>;\n\n onEntryBeforeMove: Topic<OnEntryBeforeMoveTopicParams>;\n onEntryAfterMove: Topic<OnEntryAfterMoveTopicParams>;\n onEntryMoveError: Topic<OnEntryMoveErrorTopicParams>;\n\n onEntryBeforeDelete: Topic<OnEntryBeforeDeleteTopicParams>;\n onEntryAfterDelete: Topic<OnEntryAfterDeleteTopicParams>;\n onEntryDeleteError: Topic<OnEntryDeleteErrorTopicParams>;\n\n onEntryRevisionBeforeDelete: Topic<OnEntryRevisionBeforeDeleteTopicParams>;\n onEntryRevisionAfterDelete: Topic<OnEntryRevisionAfterDeleteTopicParams>;\n onEntryRevisionDeleteError: Topic<OnEntryRevisionDeleteErrorTopicParams>;\n\n onEntryBeforePublish: Topic<OnEntryBeforePublishTopicParams>;\n onEntryAfterPublish: Topic<OnEntryAfterPublishTopicParams>;\n onEntryPublishError: Topic<OnEntryPublishErrorTopicParams>;\n\n onEntryBeforeRepublish: Topic<OnEntryBeforeRepublishTopicParams>;\n onEntryAfterRepublish: Topic<OnEntryAfterRepublishTopicParams>;\n onEntryRepublishError: Topic<OnEntryRepublishErrorTopicParams>;\n\n onEntryBeforeUnpublish: Topic<OnEntryBeforeUnpublishTopicParams>;\n onEntryAfterUnpublish: Topic<OnEntryAfterUnpublishTopicParams>;\n onEntryUnpublishError: Topic<OnEntryUnpublishErrorTopicParams>;\n\n onEntryBeforeGet: Topic<OnEntryBeforeGetTopicParams>;\n onEntryBeforeList: Topic<EntryBeforeListTopicParams>;\n}\n\n/**\n * Parameters for CmsEntryResolverFactory.\n *\n * @category GraphQL resolver\n * @category CmsEntry\n */\ninterface CmsEntryResolverFactoryParams {\n model: CmsModel;\n}\n\n/**\n * A type for EntryResolvers. Used when creating get, list, update, publish, ...etc.\n *\n * @category GraphQL resolver\n * @category CmsEntry\n */\nexport type CmsEntryResolverFactory<TSource = any, TArgs = any, TContext = CmsContext> = {\n (params: CmsEntryResolverFactoryParams): GraphQLFieldResolver<TSource, TArgs, TContext>;\n};\n\n/**\n * A base security permission for CMS.\n *\n * @category SecurityPermission\n */\nexport interface BaseCmsSecurityPermission extends SecurityPermission {\n own?: boolean;\n rwd: string;\n}\n\n/**\n * A security permission for content model.\n *\n * @category SecurityPermission\n * @category CmsModel\n */\nexport interface CmsModelPermission extends BaseCmsSecurityPermission {\n /**\n * An object representing `key: model.modelId` values where key is locale code.\n */\n models?: {\n [key: string]: string[];\n };\n /**\n * {locale: groupId[]} map, where key is a locale code.\n */\n groups?: {\n [key: string]: string[];\n };\n}\n\n/**\n * The security permission for content model groups.\n *\n * @category SecurityPermission\n * @category CmsGroup\n */\nexport interface CmsGroupPermission extends BaseCmsSecurityPermission {\n /**\n * {locale: groupId[]} map, where key is a locale code.\n */\n groups?: {\n [key: string]: string[];\n };\n}\n\n/**\n * The security permission for content entry.\n *\n * @category SecurityPermission\n * @category CmsEntry\n */\nexport interface CmsEntryPermission extends BaseCmsSecurityPermission {\n pw?: string;\n /**\n * An object representing `key: model.modelId` values where key is locale code.\n */\n models?: {\n [key: string]: string[];\n };\n /**\n * {locale: groupId[]} map, where key is a locale code.\n */\n groups?: {\n [key: string]: string[];\n };\n}\n\nexport interface CmsGroupStorageOperationsGetParams {\n id: string;\n tenant: string;\n locale: string;\n}\n\nexport interface CmsGroupStorageOperationsListWhereParams {\n tenant: string;\n locale: string;\n\n [key: string]: any;\n}\n\nexport interface CmsGroupStorageOperationsListParams {\n where: CmsGroupStorageOperationsListWhereParams;\n sort?: string[];\n}\n\nexport interface CmsGroupStorageOperationsCreateParams {\n group: CmsGroup;\n}\n\nexport interface CmsGroupStorageOperationsUpdateParams {\n group: CmsGroup;\n}\n\nexport interface CmsGroupStorageOperationsDeleteParams {\n group: CmsGroup;\n}\n\n/**\n * Description of the CmsGroup CRUD operations.\n * If user wants to add another database to the application, this is how it is done.\n * This is just plain read, update, write, delete and list - no authentication or permission checks.\n */\nexport interface CmsGroupStorageOperations {\n /**\n * Gets content model group by given id.\n */\n get: (params: CmsGroupStorageOperationsGetParams) => Promise<CmsGroup | null>;\n /**\n * List all content model groups. Filterable via params.\n */\n list: (params: CmsGroupStorageOperationsListParams) => Promise<CmsGroup[]>;\n /**\n * Create a new content model group.\n */\n create: (params: CmsGroupStorageOperationsCreateParams) => Promise<CmsGroup>;\n /**\n * Update existing content model group.\n */\n update: (params: CmsGroupStorageOperationsUpdateParams) => Promise<CmsGroup>;\n /**\n * Delete the content model group.\n */\n delete: (params: CmsGroupStorageOperationsDeleteParams) => Promise<CmsGroup>;\n}\n\nexport interface CmsModelStorageOperationsGetParams {\n tenant: string;\n locale: string;\n modelId: string;\n}\n\nexport interface CmsModelStorageOperationsListWhereParams {\n tenant: string;\n locale: string;\n\n [key: string]: string;\n}\n\nexport interface CmsModelStorageOperationsListParams {\n where: CmsModelStorageOperationsListWhereParams;\n}\n\nexport interface CmsModelStorageOperationsCreateParams {\n model: CmsModel;\n}\n\nexport interface CmsModelStorageOperationsUpdateParams {\n model: CmsModel;\n}\n\nexport interface CmsModelStorageOperationsDeleteParams {\n model: CmsModel;\n}\n\n/**\n * Description of the CmsModel storage operations.\n * If user wants to add another database to the application, this is how it is done.\n * This is just plain read, update, write, delete and list - no authentication or permission checks.\n */\nexport interface CmsModelStorageOperations {\n /**\n * Gets content model by given id.\n */\n get: (params: CmsModelStorageOperationsGetParams) => Promise<CmsModel | null>;\n /**\n * List all content models. Filterable via params.\n */\n list: (params: CmsModelStorageOperationsListParams) => Promise<CmsModel[]>;\n /**\n * Create a new content model.\n */\n create: (params: CmsModelStorageOperationsCreateParams) => Promise<CmsModel>;\n /**\n * Update existing content model.\n */\n update: (params: CmsModelStorageOperationsUpdateParams) => Promise<CmsModel>;\n /**\n * Delete the content model.\n */\n delete: (params: CmsModelStorageOperationsDeleteParams) => Promise<CmsModel>;\n}\n\nexport interface CmsEntryStorageOperationsGetParams {\n where: CmsEntryListWhere;\n sort?: CmsEntryListSort;\n limit?: number;\n}\n\nexport interface CmsEntryStorageOperationsListParams {\n where: CmsEntryListWhere;\n sort?: CmsEntryListSort;\n search?: string;\n fields?: string[];\n limit: number;\n after?: string | null;\n}\n\nexport interface CmsEntryStorageOperationsCreateParams<\n T extends CmsStorageEntry = CmsStorageEntry\n> {\n /**\n * Real entry, with no transformations on it.\n */\n entry: CmsEntry;\n /**\n * Entry prepared for the storage.\n */\n storageEntry: T;\n}\n\nexport interface CmsEntryStorageOperationsCreateRevisionFromParams<\n T extends CmsStorageEntry = CmsStorageEntry\n> {\n /**\n * Real entry, with no transformations on it.\n */\n entry: CmsEntry;\n /**\n * Entry prepared for the storage.\n */\n storageEntry: T;\n}\n\nexport interface CmsEntryStorageOperationsUpdateParams<\n T extends CmsStorageEntry = CmsStorageEntry\n> {\n /**\n * Real entry, with no transformations on it.\n */\n entry: CmsEntry;\n /**\n * Entry prepared for the storage.\n */\n storageEntry: T;\n}\n\nexport interface CmsEntryStorageOperationsDeleteRevisionParams<\n T extends CmsStorageEntry = CmsStorageEntry\n> {\n /**\n * Entry that was deleted.\n */\n entry: CmsEntry;\n /**\n * Entry that was deleted, directly from storage, with transformations.\n */\n storageEntry: T;\n /**\n * Entry that was set as latest.\n */\n latestEntry: CmsEntry | null;\n /**\n * Entry that was set as latest, directly from storage, with transformations.\n */\n latestStorageEntry: T | null;\n}\n\nexport interface CmsEntryStorageOperationsDeleteParams {\n entry: CmsEntry;\n}\n\nexport interface CmsEntryStorageOperationsDeleteEntriesParams {\n entries: string[];\n}\n\nexport interface CmsEntryStorageOperationsPublishParams<\n T extends CmsStorageEntry = CmsStorageEntry\n> {\n /**\n * The modified entry that is going to be saved as published.\n * Entry is in its original form.\n */\n entry: CmsEntry;\n /**\n * The modified entry and prepared for the storage.\n */\n storageEntry: T;\n}\n\nexport interface CmsEntryStorageOperationsUnpublishParams<\n T extends CmsStorageEntry = CmsStorageEntry\n> {\n /**\n * The modified entry that is going to be saved as unpublished.\n */\n entry: CmsEntry;\n /**\n * The modified entry that is going to be saved as unpublished, with transformations on it.\n */\n storageEntry: T;\n}\n\nexport interface CmsEntryStorageOperationsGetUniqueFieldValuesParams {\n where: CmsEntryListWhere;\n fieldId: string;\n}\n\nexport interface CmsEntryStorageOperationsGetByIdsParams {\n ids: readonly string[];\n}\n\nexport interface CmsEntryStorageOperationsGetLatestByIdsParams {\n ids: readonly string[];\n}\n\nexport interface CmsEntryStorageOperationsGetPublishedByIdsParams {\n ids: readonly string[];\n}\n\nexport interface CmsEntryStorageOperationsGetRevisionsParams {\n id: string;\n}\n\nexport interface CmsEntryStorageOperationsGetRevisionParams {\n id: string;\n}\n\nexport interface CmsEntryStorageOperationsGetPublishedRevisionParams {\n id: string;\n}\n\nexport interface CmsEntryStorageOperationsGetLatestRevisionParams {\n id: string;\n}\n\nexport interface CmsEntryStorageOperationsGetPreviousRevisionParams {\n entryId: string;\n version: number;\n}\n\nexport interface CmsEntryStorageOperationsListResponse<\n T extends CmsStorageEntry = CmsStorageEntry\n> {\n /**\n * Has more items to load with the current filtering?\n */\n hasMoreItems: boolean;\n /**\n * Items loaded with current filtering.\n */\n items: T[];\n /**\n * Pointer for where to start the new item set.\n */\n cursor: string | null;\n /**\n * Total amount of items with the current filter.\n */\n totalCount: number;\n}\n\n/**\n * Description of the CmsModel storage operations.\n * If user wants to add another database to the application, this is how it is done.\n * This is just plain read, update, write, delete and list - no authentication or permission checks.\n *\n *\n * @category StorageOperations\n * @category CmsEntry\n */\nexport interface CmsEntryStorageOperations<T extends CmsStorageEntry = CmsStorageEntry> {\n /**\n * Get all the entries of the ids.\n */\n getByIds: (model: CmsModel, params: CmsEntryStorageOperationsGetByIdsParams) => Promise<T[]>;\n /**\n * Get all the published entries of the ids.\n */\n getPublishedByIds: (\n model: CmsModel,\n params: CmsEntryStorageOperationsGetPublishedByIdsParams\n ) => Promise<T[]>;\n /**\n * Get all the latest entries of the ids.\n */\n getLatestByIds: (\n model: CmsModel,\n params: CmsEntryStorageOperationsGetLatestByIdsParams\n ) => Promise<T[]>;\n /**\n * Get all revisions of the given entry id.\n */\n getRevisions: (\n model: CmsModel,\n params: CmsEntryStorageOperationsGetRevisionsParams\n ) => Promise<T[]>;\n /**\n * Get the entry by the given revision id.\n */\n getRevisionById: (\n model: CmsModel,\n params: CmsEntryStorageOperationsGetRevisionParams\n ) => Promise<T | null>;\n /**\n * Get the published entry by given entryId.\n */\n getPublishedRevisionByEntryId: (\n model: CmsModel,\n params: CmsEntryStorageOperationsGetPublishedRevisionParams\n ) => Promise<T | null>;\n /**\n * Get the latest entry by given entryId.\n */\n getLatestRevisionByEntryId: (\n model: CmsModel,\n params: CmsEntryStorageOperationsGetLatestRevisionParams\n ) => Promise<T | null>;\n /**\n * Get the revision of the entry before given one.\n */\n getPreviousRevision: (\n model: CmsModel,\n params: CmsEntryStorageOperationsGetPreviousRevisionParams\n ) => Promise<T | null>;\n /**\n * Gets entry by given params.\n */\n get: (model: CmsModel, params: CmsEntryStorageOperationsGetParams) => Promise<T | null>;\n /**\n * List all entries. Filterable via params.\n */\n list: (\n model: CmsModel,\n params: CmsEntryStorageOperationsListParams\n ) => Promise<CmsEntryStorageOperationsListResponse<T>>;\n /**\n * Create a new entry.\n */\n create: (model: CmsModel, params: CmsEntryStorageOperationsCreateParams<T>) => Promise<T>;\n /**\n * Create a new entry from existing one.\n */\n createRevisionFrom: (\n model: CmsModel,\n params: CmsEntryStorageOperationsCreateRevisionFromParams<T>\n ) => Promise<T>;\n /**\n * Update existing entry.\n */\n update: (model: CmsModel, params: CmsEntryStorageOperationsUpdateParams<T>) => Promise<T>;\n /**\n * Move entry and all its entries into a new folder.\n */\n move: (model: CmsModel, id: string, folderId: string) => Promise<void>;\n /**\n * Delete the entry revision.\n */\n deleteRevision: (\n model: CmsModel,\n params: CmsEntryStorageOperationsDeleteRevisionParams<T>\n ) => Promise<void>;\n /**\n * Delete the entry.\n */\n delete: (model: CmsModel, params: CmsEntryStorageOperationsDeleteParams) => Promise<void>;\n /**\n * Delete multiple entries, with a limit on how much can be deleted in one call.\n */\n deleteMultipleEntries: (\n model: CmsModel,\n params: CmsEntryStorageOperationsDeleteEntriesParams\n ) => Promise<void>;\n /**\n * Publish the entry.\n */\n publish: (model: CmsModel, params: CmsEntryStorageOperationsPublishParams<T>) => Promise<T>;\n /**\n * Unpublish the entry.\n */\n unpublish: (model: CmsModel, params: CmsEntryStorageOperationsUnpublishParams<T>) => Promise<T>;\n /**\n * Method to list all the unique values for the given field id.\n * Simplest use case would be to aggregate tags for some content.\n * @internal\n */\n getUniqueFieldValues: (\n model: CmsModel,\n params: CmsEntryStorageOperationsGetUniqueFieldValuesParams\n ) => Promise<CmsEntryUniqueValue[]>;\n}\n\nexport enum CONTENT_ENTRY_STATUS {\n DRAFT = \"draft\",\n PUBLISHED = \"published\",\n UNPUBLISHED = \"unpublished\"\n}\n\nexport interface CmsSystem {\n version?: string;\n readAPIKey?: string;\n /**\n * System tenant.\n */\n tenant: string;\n}\n\nexport interface CmsSystemStorageOperationsGetParams {\n tenant: string;\n}\n\nexport interface CmsSystemStorageOperationsCreateParams {\n system: CmsSystem;\n}\n\nexport interface CmsSystemStorageOperationsUpdateParams {\n system: CmsSystem;\n}\n\nexport interface CmsSystemStorageOperations {\n /**\n * Get the system data.\n */\n get: (params: CmsSystemStorageOperationsGetParams) => Promise<CmsSystem | null>;\n /**\n * Create the system info in the storage.\n */\n create: (params: CmsSystemStorageOperationsCreateParams) => Promise<CmsSystem>;\n /**\n * Update the system info in the storage.\n */\n update: (params: CmsSystemStorageOperationsUpdateParams) => Promise<CmsSystem>;\n}\n\nexport interface HeadlessCmsStorageOperations<C = CmsContext> {\n name: string;\n system: CmsSystemStorageOperations;\n groups: CmsGroupStorageOperations;\n models: CmsModelStorageOperations;\n entries: CmsEntryStorageOperations;\n /**\n * Either attach something from the storage operations or run something in it.\n */\n beforeInit: (context: C) => Promise<void>;\n init?: (context: C) => Promise<void>;\n}\n"],"mappings":";;;;;;AA+EA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AAYA;AACA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AAoDA;AACA;AACA;AACA;AACA;AACA;AAiGA;AACA;AACA;AAUA;AACA;AACA;AAKA;AACA;AACA;AAUA;AACA;AACA;AACA;AACA;AACA;AAgCA;AACA;AACA;AACA;AACA;AACA;AACA;AAyBA;AACA;AACA;AACA;AACA;AACA;AACA;AAyBA;AACA;AACA;AACA;AACA;AACA;AACA;AAmBA;AACA;AACA;AACA;AAkBA;AACA;AACA;AACA;AACA;AACA;AA0HA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AAkDA;AACA;AACA;AACA;AACA;AAiQA;AACA;AACA;AACA;AACA;AACA;AACA;AAoBA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AA4CA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AA0DA;AACA;AACA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AAwCA;AACA;AACA;AACA;AACA;AACA;AAYA;AACA;AACA;AACA;AACA;AACA;AAqDA;AACA;AACA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAyDA;AACA;AACA;AACA;AACA;AACA;AA6CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkBA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AAqKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAoCA;AACA;AACA;AAiBA;AACA;AACA;AAoBA;AACA;AACA;AAoBA;AACA;AACA;AAcA;AACA;AACA;AAMA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AAuEA;AACA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AACA;AACA;AAoIA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AAUA;AACA;AACA;AACA;AACA;AACA;AAgBA;AACA;AACA;AAqBA;AACA;AACA;AAwBA;AACA;AACA;AAuBA;AACA;AACA;AAoBA;AACA;AACA;AAsBA;AACA;AACA;AAkBA;AACA;AACA;AAgFA;AACA;AACA;AACA;AA4CA;AACA;AACA;AACA;AAqCA;AACA;AACA;AACA;AAyCA;AACA;AACA;AACA;AAMA;AACA;AACA;AASA;AACA;AACA;AACA;AAaA;AACA;AACA;AACA;AACA;AACA;AAsKA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AAgBA;AACA;AACA;AACA;AACA;AACA;AAUA;AACA;AACA;AACA;AACA;AACA;AA+CA;AACA;AACA;AACA;AACA;AAqDA;AACA;AACA;AACA;AACA;AAiMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA,IAkIYA,oBAAoB,0BAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAAA,OAApBA,oBAAoB;AAAA;AAAAC,OAAA,CAAAD,oBAAA,GAAAA,oBAAA"}