@datocms/cma-client 5.1.11 → 5.1.13

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.
Files changed (118) hide show
  1. package/README.md +313 -178
  2. package/dist/cjs/fieldTypes/file.js +6 -6
  3. package/dist/cjs/fieldTypes/gallery.js +7 -7
  4. package/dist/cjs/fieldTypes/rich_text.js +14 -12
  5. package/dist/cjs/fieldTypes/rich_text.js.map +1 -1
  6. package/dist/cjs/fieldTypes/schema.js +3 -0
  7. package/dist/cjs/fieldTypes/schema.js.map +1 -0
  8. package/dist/cjs/fieldTypes/single_block.js +13 -12
  9. package/dist/cjs/fieldTypes/single_block.js.map +1 -1
  10. package/dist/cjs/fieldTypes/structured_text.js +13 -12
  11. package/dist/cjs/fieldTypes/structured_text.js.map +1 -1
  12. package/dist/cjs/generated/Client.js +1 -1
  13. package/dist/cjs/generated/resources/Item.js.map +1 -1
  14. package/dist/cjs/generated/resources/ScheduledPublication.js.map +1 -1
  15. package/dist/cjs/generated/resources/ScheduledUnpublishing.js.map +1 -1
  16. package/dist/cjs/generated/resources/Upload.js.map +1 -1
  17. package/dist/cjs/index.js +1 -0
  18. package/dist/cjs/index.js.map +1 -1
  19. package/dist/cjs/utilities/buildBlockRecord.js +1 -46
  20. package/dist/cjs/utilities/buildBlockRecord.js.map +1 -1
  21. package/dist/cjs/utilities/duplicateBlockRecord.js +50 -0
  22. package/dist/cjs/utilities/duplicateBlockRecord.js.map +1 -0
  23. package/dist/cjs/utilities/inspectItem.js +50 -20
  24. package/dist/cjs/utilities/inspectItem.js.map +1 -1
  25. package/dist/cjs/utilities/nonRecursiveBlocks.js +1 -170
  26. package/dist/cjs/utilities/nonRecursiveBlocks.js.map +1 -1
  27. package/dist/cjs/utilities/recursiveBlocks.js +52 -112
  28. package/dist/cjs/utilities/recursiveBlocks.js.map +1 -1
  29. package/dist/esm/fieldTypes/file.d.ts +3 -3
  30. package/dist/esm/fieldTypes/file.js +3 -3
  31. package/dist/esm/fieldTypes/gallery.d.ts +5 -5
  32. package/dist/esm/fieldTypes/gallery.js +5 -5
  33. package/dist/esm/fieldTypes/rich_text.d.ts +8 -9
  34. package/dist/esm/fieldTypes/rich_text.js +9 -7
  35. package/dist/esm/fieldTypes/rich_text.js.map +1 -1
  36. package/dist/esm/fieldTypes/schema.d.ts +59 -0
  37. package/dist/esm/fieldTypes/schema.js +2 -0
  38. package/dist/esm/fieldTypes/schema.js.map +1 -0
  39. package/dist/esm/fieldTypes/single_block.d.ts +30 -15
  40. package/dist/esm/fieldTypes/single_block.js +8 -7
  41. package/dist/esm/fieldTypes/single_block.js.map +1 -1
  42. package/dist/esm/fieldTypes/structured_text.d.ts +14 -15
  43. package/dist/esm/fieldTypes/structured_text.js +8 -7
  44. package/dist/esm/fieldTypes/structured_text.js.map +1 -1
  45. package/dist/esm/generated/ApiTypes.d.ts +94 -980
  46. package/dist/esm/generated/Client.js +1 -1
  47. package/dist/esm/generated/RawApiTypes.d.ts +160 -999
  48. package/dist/esm/generated/resources/Field.d.ts +300 -300
  49. package/dist/esm/generated/resources/Item.d.ts +34 -34
  50. package/dist/esm/generated/resources/Item.js.map +1 -1
  51. package/dist/esm/generated/resources/ItemVersion.d.ts +3 -1
  52. package/dist/esm/generated/resources/ScheduledPublication.d.ts +3 -3
  53. package/dist/esm/generated/resources/ScheduledPublication.js.map +1 -1
  54. package/dist/esm/generated/resources/ScheduledUnpublishing.d.ts +3 -3
  55. package/dist/esm/generated/resources/ScheduledUnpublishing.js.map +1 -1
  56. package/dist/esm/generated/resources/Upload.d.ts +6 -6
  57. package/dist/esm/generated/resources/Upload.js.map +1 -1
  58. package/dist/esm/index.d.ts +1 -0
  59. package/dist/esm/index.js +1 -0
  60. package/dist/esm/index.js.map +1 -1
  61. package/dist/esm/utilities/buildBlockRecord.d.ts +11 -5
  62. package/dist/esm/utilities/buildBlockRecord.js +0 -44
  63. package/dist/esm/utilities/buildBlockRecord.js.map +1 -1
  64. package/dist/esm/utilities/duplicateBlockRecord.d.ts +6 -0
  65. package/dist/esm/utilities/duplicateBlockRecord.js +46 -0
  66. package/dist/esm/utilities/duplicateBlockRecord.js.map +1 -0
  67. package/dist/esm/utilities/inspectItem.d.ts +3 -3
  68. package/dist/esm/utilities/inspectItem.js +28 -21
  69. package/dist/esm/utilities/inspectItem.js.map +1 -1
  70. package/dist/esm/utilities/itemDefinition.d.ts +25 -27
  71. package/dist/esm/utilities/nonRecursiveBlocks.d.ts +10 -75
  72. package/dist/esm/utilities/nonRecursiveBlocks.js +1 -164
  73. package/dist/esm/utilities/nonRecursiveBlocks.js.map +1 -1
  74. package/dist/esm/utilities/recursiveBlocks.d.ts +53 -23
  75. package/dist/esm/utilities/recursiveBlocks.js +52 -112
  76. package/dist/esm/utilities/recursiveBlocks.js.map +1 -1
  77. package/dist/types/fieldTypes/file.d.ts +3 -3
  78. package/dist/types/fieldTypes/gallery.d.ts +5 -5
  79. package/dist/types/fieldTypes/rich_text.d.ts +8 -9
  80. package/dist/types/fieldTypes/schema.d.ts +59 -0
  81. package/dist/types/fieldTypes/single_block.d.ts +30 -15
  82. package/dist/types/fieldTypes/structured_text.d.ts +14 -15
  83. package/dist/types/generated/ApiTypes.d.ts +94 -980
  84. package/dist/types/generated/RawApiTypes.d.ts +160 -999
  85. package/dist/types/generated/resources/Field.d.ts +300 -300
  86. package/dist/types/generated/resources/Item.d.ts +34 -34
  87. package/dist/types/generated/resources/ItemVersion.d.ts +3 -1
  88. package/dist/types/generated/resources/ScheduledPublication.d.ts +3 -3
  89. package/dist/types/generated/resources/ScheduledUnpublishing.d.ts +3 -3
  90. package/dist/types/generated/resources/Upload.d.ts +6 -6
  91. package/dist/types/index.d.ts +1 -0
  92. package/dist/types/utilities/buildBlockRecord.d.ts +11 -5
  93. package/dist/types/utilities/duplicateBlockRecord.d.ts +6 -0
  94. package/dist/types/utilities/inspectItem.d.ts +3 -3
  95. package/dist/types/utilities/itemDefinition.d.ts +25 -27
  96. package/dist/types/utilities/nonRecursiveBlocks.d.ts +10 -75
  97. package/dist/types/utilities/recursiveBlocks.d.ts +53 -23
  98. package/package.json +4 -4
  99. package/src/fieldTypes/file.ts +6 -6
  100. package/src/fieldTypes/gallery.ts +10 -10
  101. package/src/fieldTypes/rich_text.ts +26 -24
  102. package/src/fieldTypes/schema.ts +657 -0
  103. package/src/fieldTypes/single_block.ts +61 -38
  104. package/src/fieldTypes/structured_text.ts +57 -51
  105. package/src/generated/ApiTypes.ts +221 -1880
  106. package/src/generated/Client.ts +1 -1
  107. package/src/generated/RawApiTypes.ts +276 -2113
  108. package/src/generated/resources/Item.ts +93 -187
  109. package/src/generated/resources/ScheduledPublication.ts +4 -15
  110. package/src/generated/resources/ScheduledUnpublishing.ts +4 -15
  111. package/src/generated/resources/Upload.ts +9 -32
  112. package/src/index.ts +1 -0
  113. package/src/utilities/buildBlockRecord.ts +16 -56
  114. package/src/utilities/duplicateBlockRecord.ts +53 -0
  115. package/src/utilities/inspectItem.ts +64 -52
  116. package/src/utilities/itemDefinition.ts +109 -98
  117. package/src/utilities/nonRecursiveBlocks.ts +25 -279
  118. package/src/utilities/recursiveBlocks.ts +337 -72
@@ -1,711 +1,64 @@
1
1
  import type {
2
- BooleanFieldAppearance,
3
- BooleanFieldValidators,
4
- BooleanFieldValue,
5
- ColorFieldAppearance,
6
- ColorFieldValidators,
7
- ColorFieldValue,
8
- DateFieldAppearance,
9
- DateFieldValidators,
10
- DateFieldValue,
11
- DateTimeFieldAppearance,
12
- DateTimeFieldValidators,
13
- DateTimeFieldValue,
14
- FileFieldAppearance,
15
- FileFieldValidators,
16
- FloatFieldAppearance,
17
- FloatFieldValidators,
18
- FloatFieldValue,
19
- GalleryFieldAppearance,
20
- GalleryFieldValidators,
21
- IntegerFieldAppearance,
22
- IntegerFieldValidators,
23
- IntegerFieldValue,
24
- JsonFieldAppearance,
25
- JsonFieldValidators,
26
- JsonFieldValue,
27
- LatLonFieldAppearance,
28
- LatLonFieldValidators,
29
- LatLonFieldValue,
30
- LinkFieldAppearance,
31
- LinkFieldValidators,
32
- LinksFieldAppearance,
33
- LinksFieldValidators,
34
- RichTextFieldAppearance,
35
- RichTextFieldValidators,
36
- SeoFieldAppearance,
37
- SeoFieldValidators,
38
- SingleBlockFieldAppearance,
39
- SingleBlockFieldValidators,
40
- SlugFieldAppearance,
41
- SlugFieldValidators,
42
- StringFieldAppearance,
43
- StringFieldValidators,
44
- StringFieldValue,
45
- StructuredTextFieldAppearance,
46
- StructuredTextFieldValidators,
47
- TextFieldAppearance,
48
- TextFieldValidators,
49
- TextFieldValue,
50
- VideoFieldAppearance,
51
- VideoFieldValidators,
52
- } from '../fieldTypes';
2
+ FieldCreateConfig,
3
+ FieldUpdateConfig,
4
+ GenericFieldAttributes,
5
+ } from '../fieldTypes/schema';
53
6
 
54
- import type { ItemDefinition } from '../utilities/itemDefinition';
55
-
56
- /**
57
- * Enhanced appearance configuration with field-specific types and addon support
58
- */
59
- type FieldAppearanceConfig<TAppearance> = TAppearance &
60
- Omit<RawFieldAttributes['appearance'], keyof TAppearance>;
61
-
62
- /**
63
- * Base field configuration for attributes (non-localized), extending the original RawApiTypes
64
- */
65
- type NonLocalizedFieldAttributesForFieldType<
66
- SourceType,
67
- FieldType extends RawFieldAttributes['field_type'],
68
- FieldValue,
69
- FieldValidators,
70
- FieldAppearance,
71
- > = Omit<
72
- SourceType,
73
- 'field_type' | 'default_value' | 'validators' | 'appearance' | 'localized'
74
- > & {
75
- field_type: FieldType;
76
- localized: false;
77
- default_value: FieldValue;
78
- validators: FieldValidators;
79
- appearance: FieldAppearanceConfig<FieldAppearance>;
80
- };
81
-
82
- /**
83
- * Base field configuration for attributes (localized), extending the original RawApiTypes
84
- */
85
- type LocalizedFieldAttributesForFieldType<
86
- SourceType,
87
- FieldType extends RawFieldAttributes['field_type'],
88
- FieldValue,
89
- FieldValidators,
90
- FieldAppearance,
91
- > = Omit<
92
- SourceType,
93
- 'field_type' | 'default_value' | 'validators' | 'appearance' | 'localized'
94
- > & {
95
- field_type: FieldType;
96
- localized: true;
97
- default_value: FieldValue | Record<string, FieldValue>;
98
- validators: FieldValidators;
99
- appearance: FieldAppearanceConfig<FieldAppearance>;
100
- };
101
-
102
- /**
103
- * Union of localized and non-localized field configurations for attributes
104
- */
105
- type FieldAttributesForFieldType<
106
- SourceType,
107
- FieldType extends RawFieldAttributes['field_type'],
108
- FieldValue,
109
- FieldValidators,
110
- FieldAppearance,
111
- > =
112
- | NonLocalizedFieldAttributesForFieldType<
113
- SourceType,
114
- FieldType,
115
- FieldValue,
116
- FieldValidators,
117
- FieldAppearance
118
- >
119
- | LocalizedFieldAttributesForFieldType<
120
- SourceType,
121
- FieldType,
122
- FieldValue,
123
- FieldValidators,
124
- FieldAppearance
125
- >;
126
-
127
- type GenericFieldAttributes<SourceType> =
128
- | FieldAttributesForFieldType<
129
- SourceType,
130
- 'boolean',
131
- BooleanFieldValue,
132
- BooleanFieldValidators,
133
- BooleanFieldAppearance
134
- >
135
- | FieldAttributesForFieldType<
136
- SourceType,
137
- 'color',
138
- ColorFieldValue,
139
- ColorFieldValidators,
140
- ColorFieldAppearance
141
- >
142
- | FieldAttributesForFieldType<
143
- SourceType,
144
- 'date',
145
- DateFieldValue,
146
- DateFieldValidators,
147
- DateFieldAppearance
148
- >
149
- | FieldAttributesForFieldType<
150
- SourceType,
151
- 'date_time',
152
- DateTimeFieldValue,
153
- DateTimeFieldValidators,
154
- DateTimeFieldAppearance
155
- >
156
- | FieldAttributesForFieldType<
157
- SourceType,
158
- 'file',
159
- // this field type does not support default values
160
- null,
161
- FileFieldValidators,
162
- FileFieldAppearance
163
- >
164
- | FieldAttributesForFieldType<
165
- SourceType,
166
- 'float',
167
- FloatFieldValue,
168
- FloatFieldValidators,
169
- FloatFieldAppearance
170
- >
171
- | FieldAttributesForFieldType<
172
- SourceType,
173
- 'gallery',
174
- // this field type does not support default values
175
- null,
176
- GalleryFieldValidators,
177
- GalleryFieldAppearance
178
- >
179
- | FieldAttributesForFieldType<
180
- SourceType,
181
- 'integer',
182
- IntegerFieldValue,
183
- IntegerFieldValidators,
184
- IntegerFieldAppearance
185
- >
186
- | FieldAttributesForFieldType<
187
- SourceType,
188
- 'json',
189
- JsonFieldValue,
190
- JsonFieldValidators,
191
- JsonFieldAppearance
192
- >
193
- | FieldAttributesForFieldType<
194
- SourceType,
195
- 'lat_lon',
196
- LatLonFieldValue,
197
- LatLonFieldValidators,
198
- LatLonFieldAppearance
199
- >
200
- | FieldAttributesForFieldType<
201
- SourceType,
202
- 'link',
203
- // this field type does not support default values
204
- null,
205
- LinkFieldValidators,
206
- LinkFieldAppearance
207
- >
208
- | FieldAttributesForFieldType<
209
- SourceType,
210
- 'links',
211
- // this field type does not support default values
212
- null,
213
- LinksFieldValidators,
214
- LinksFieldAppearance
215
- >
216
- | FieldAttributesForFieldType<
217
- SourceType,
218
- 'rich_text',
219
- // this field type does not support default values
220
- null,
221
- RichTextFieldValidators,
222
- RichTextFieldAppearance
223
- >
224
- | FieldAttributesForFieldType<
225
- SourceType,
226
- 'seo',
227
- // this field type does not support default values
228
- null,
229
- SeoFieldValidators,
230
- SeoFieldAppearance
231
- >
232
- | FieldAttributesForFieldType<
233
- SourceType,
234
- 'single_block',
235
- // this field type does not support default values
236
- null,
237
- SingleBlockFieldValidators,
238
- SingleBlockFieldAppearance
239
- >
240
- | FieldAttributesForFieldType<
241
- SourceType,
242
- 'slug',
243
- // this field type does not support default values
244
- null,
245
- SlugFieldValidators,
246
- SlugFieldAppearance
247
- >
248
- | FieldAttributesForFieldType<
249
- SourceType,
250
- 'string',
251
- StringFieldValue,
252
- StringFieldValidators,
253
- StringFieldAppearance
254
- >
255
- | FieldAttributesForFieldType<
256
- SourceType,
257
- 'structured_text',
258
- // this field type does not support default values
259
- null,
260
- StructuredTextFieldValidators,
261
- StructuredTextFieldAppearance
262
- >
263
- | FieldAttributesForFieldType<
264
- SourceType,
265
- 'text',
266
- TextFieldValue,
267
- TextFieldValidators,
268
- TextFieldAppearance
269
- >
270
- | FieldAttributesForFieldType<
271
- SourceType,
272
- 'video',
273
- // this field type does not support default values
274
- null,
275
- VideoFieldValidators,
276
- VideoFieldAppearance
277
- >;
278
-
279
- export type FieldAttributes = GenericFieldAttributes<RawFieldAttributes>;
280
-
281
- export type Field = GenericFieldAttributes<RawField>;
282
-
283
- type LocalizedFieldCreateConfigForFieldType<
284
- SourceType,
285
- FieldType extends RawFieldAttributes['field_type'],
286
- FieldValue,
287
- FieldValidators,
288
- FieldAppearance,
289
- > = Omit<
290
- SourceType,
291
- 'field_type' | 'default_value' | 'validators' | 'appearance' | 'localized'
292
- > & {
293
- field_type: FieldType;
294
- localized: true;
295
- default_value?: Record<string, FieldValue>;
296
- validators?: FieldValidators;
297
- appearance?: FieldAppearanceConfig<FieldAppearance>;
298
- };
299
-
300
- type NonLocalizedFieldCreateConfigForFieldType<
301
- SourceType,
302
- FieldType extends RawFieldAttributes['field_type'],
303
- FieldValue,
304
- FieldValidators,
305
- FieldAppearance,
306
- > = Omit<
307
- SourceType,
308
- 'field_type' | 'default_value' | 'validators' | 'appearance' | 'localized'
309
- > & {
310
- field_type: FieldType;
311
- localized?: false;
312
- default_value?: FieldValue;
313
- validators?: FieldValidators;
314
- appearance?: FieldAppearanceConfig<FieldAppearance>;
315
- };
316
-
317
- type FieldCreateConfigForFieldType<
318
- SourceType,
319
- FieldType extends RawFieldAttributes['field_type'],
320
- FieldValue,
321
- FieldValidators,
322
- FieldAppearance,
323
- > =
324
- | LocalizedFieldCreateConfigForFieldType<
325
- SourceType,
326
- FieldType,
327
- FieldValue,
328
- FieldValidators,
329
- FieldAppearance
330
- >
331
- | NonLocalizedFieldCreateConfigForFieldType<
332
- SourceType,
333
- FieldType,
334
- FieldValue,
335
- FieldValidators,
336
- FieldAppearance
337
- >;
338
-
339
- type FieldCreateConfig<SourceType> =
340
- | FieldCreateConfigForFieldType<
341
- SourceType,
342
- 'boolean',
343
- BooleanFieldValue,
344
- BooleanFieldValidators,
345
- BooleanFieldAppearance
346
- >
347
- | FieldCreateConfigForFieldType<
348
- SourceType,
349
- 'color',
350
- ColorFieldValue,
351
- ColorFieldValidators,
352
- ColorFieldAppearance
353
- >
354
- | FieldCreateConfigForFieldType<
355
- SourceType,
356
- 'date',
357
- DateFieldValue,
358
- DateFieldValidators,
359
- DateFieldAppearance
360
- >
361
- | FieldCreateConfigForFieldType<
362
- SourceType,
363
- 'date_time',
364
- DateTimeFieldValue,
365
- DateTimeFieldValidators,
366
- DateTimeFieldAppearance
367
- >
368
- | FieldCreateConfigForFieldType<
369
- SourceType,
370
- 'file',
371
- // this field type does not support default values
372
- null,
373
- FileFieldValidators,
374
- FileFieldAppearance
375
- >
376
- | FieldCreateConfigForFieldType<
377
- SourceType,
378
- 'float',
379
- FloatFieldValue,
380
- FloatFieldValidators,
381
- FloatFieldAppearance
382
- >
383
- | FieldCreateConfigForFieldType<
384
- SourceType,
385
- 'gallery',
386
- // this field type does not support default values
387
- null,
388
- GalleryFieldValidators,
389
- GalleryFieldAppearance
390
- >
391
- | FieldCreateConfigForFieldType<
392
- SourceType,
393
- 'integer',
394
- IntegerFieldValue,
395
- IntegerFieldValidators,
396
- IntegerFieldAppearance
397
- >
398
- | FieldCreateConfigForFieldType<
399
- SourceType,
400
- 'json',
401
- JsonFieldValue,
402
- JsonFieldValidators,
403
- JsonFieldAppearance
404
- >
405
- | FieldCreateConfigForFieldType<
406
- SourceType,
407
- 'lat_lon',
408
- LatLonFieldValue,
409
- LatLonFieldValidators,
410
- LatLonFieldAppearance
411
- >
412
- | FieldCreateConfigForFieldType<
413
- SourceType,
414
- 'link',
415
- // this field type does not support default values
416
- null,
417
- LinkFieldValidators,
418
- LinkFieldAppearance
419
- >
420
- | FieldCreateConfigForFieldType<
421
- SourceType,
422
- 'links',
423
- // this field type does not support default values
424
- null,
425
- LinksFieldValidators,
426
- LinksFieldAppearance
427
- >
428
- | FieldCreateConfigForFieldType<
429
- SourceType,
430
- 'rich_text',
431
- // this field type does not support default values
432
- null,
433
- RichTextFieldValidators,
434
- RichTextFieldAppearance
435
- >
436
- | FieldCreateConfigForFieldType<
437
- SourceType,
438
- 'seo',
439
- // this field type does not support default values
440
- null,
441
- SeoFieldValidators,
442
- SeoFieldAppearance
443
- >
444
- | FieldCreateConfigForFieldType<
445
- SourceType,
446
- 'single_block',
447
- // this field type does not support default values
448
- null,
449
- SingleBlockFieldValidators,
450
- SingleBlockFieldAppearance
451
- >
452
- | FieldCreateConfigForFieldType<
453
- SourceType,
454
- 'slug',
455
- // this field type does not support default values
456
- null,
457
- SlugFieldValidators,
458
- SlugFieldAppearance
459
- >
460
- | FieldCreateConfigForFieldType<
461
- SourceType,
462
- 'string',
463
- StringFieldValue,
464
- StringFieldValidators,
465
- StringFieldAppearance
466
- >
467
- | FieldCreateConfigForFieldType<
468
- SourceType,
469
- 'structured_text',
470
- // this field type does not support default values
471
- null,
472
- StructuredTextFieldValidators,
473
- StructuredTextFieldAppearance
474
- >
475
- | FieldCreateConfigForFieldType<
476
- SourceType,
477
- 'text',
478
- TextFieldValue,
479
- TextFieldValidators,
480
- TextFieldAppearance
481
- >
482
- | FieldCreateConfigForFieldType<
483
- SourceType,
484
- 'video',
485
- // this field type does not support default values
486
- null,
487
- VideoFieldValidators,
488
- VideoFieldAppearance
489
- >;
490
-
491
- export type FieldCreateSchema = FieldCreateConfig<RawFieldCreateSchema>;
492
-
493
- /**
494
- * Helper type to conditionally handle default values based on localization for field updates
495
- */
496
- type FieldUpdateDefaultValue<T> = T | Record<string, T> | undefined;
497
-
498
- type FieldUpdateConfigForFieldType<
499
- SourceType,
500
- FieldType extends RawFieldAttributes['field_type'],
501
- FieldValue,
502
- FieldValidators,
503
- FieldAppearance,
504
- > = Omit<
505
- SourceType,
506
- 'field_type' | 'default_value' | 'validators' | 'appearance'
507
- > & {
508
- field_type?: FieldType;
509
- default_value?: FieldUpdateDefaultValue<FieldValue>;
510
- validators?: FieldValidators;
511
- appearance?: FieldAppearanceConfig<FieldAppearance>;
512
- };
7
+ import type {
8
+ ItemTypeDefinition,
9
+ ToItemAttributes,
10
+ ToItemAttributesInNestedResponse,
11
+ ToItemAttributesInRequest,
12
+ } from '../utilities/itemDefinition';
513
13
 
514
- type FieldUpdateConfig<SourceType> =
515
- | FieldUpdateConfigForFieldType<
516
- SourceType,
517
- 'boolean',
518
- BooleanFieldValue,
519
- BooleanFieldValidators,
520
- BooleanFieldAppearance
521
- >
522
- | FieldUpdateConfigForFieldType<
523
- SourceType,
524
- 'color',
525
- ColorFieldValue,
526
- ColorFieldValidators,
527
- ColorFieldAppearance
528
- >
529
- | FieldUpdateConfigForFieldType<
530
- SourceType,
531
- 'date',
532
- DateFieldValue,
533
- DateFieldValidators,
534
- DateFieldAppearance
535
- >
536
- | FieldUpdateConfigForFieldType<
537
- SourceType,
538
- 'date_time',
539
- DateTimeFieldValue,
540
- DateTimeFieldValidators,
541
- DateTimeFieldAppearance
542
- >
543
- | FieldUpdateConfigForFieldType<
544
- SourceType,
545
- 'file',
546
- // this field type does not support default values
547
- null,
548
- FileFieldValidators,
549
- FileFieldAppearance
550
- >
551
- | FieldUpdateConfigForFieldType<
552
- SourceType,
553
- 'float',
554
- FloatFieldValue,
555
- FloatFieldValidators,
556
- FloatFieldAppearance
557
- >
558
- | FieldUpdateConfigForFieldType<
559
- SourceType,
560
- 'gallery',
561
- // this field type does not support default values
562
- null,
563
- GalleryFieldValidators,
564
- GalleryFieldAppearance
565
- >
566
- | FieldUpdateConfigForFieldType<
567
- SourceType,
568
- 'integer',
569
- IntegerFieldValue,
570
- IntegerFieldValidators,
571
- IntegerFieldAppearance
572
- >
573
- | FieldUpdateConfigForFieldType<
574
- SourceType,
575
- 'json',
576
- JsonFieldValue,
577
- JsonFieldValidators,
578
- JsonFieldAppearance
579
- >
580
- | FieldUpdateConfigForFieldType<
581
- SourceType,
582
- 'lat_lon',
583
- LatLonFieldValue,
584
- LatLonFieldValidators,
585
- LatLonFieldAppearance
586
- >
587
- | FieldUpdateConfigForFieldType<
588
- SourceType,
589
- 'link',
590
- // this field type does not support default values
591
- null,
592
- LinkFieldValidators,
593
- LinkFieldAppearance
594
- >
595
- | FieldUpdateConfigForFieldType<
596
- SourceType,
597
- 'links',
598
- // this field type does not support default values
599
- null,
600
- LinksFieldValidators,
601
- LinksFieldAppearance
602
- >
603
- | FieldUpdateConfigForFieldType<
604
- SourceType,
605
- 'rich_text',
606
- // this field type does not support default values
607
- null,
608
- RichTextFieldValidators,
609
- RichTextFieldAppearance
610
- >
611
- | FieldUpdateConfigForFieldType<
612
- SourceType,
613
- 'seo',
614
- // this field type does not support default values
615
- null,
616
- SeoFieldValidators,
617
- SeoFieldAppearance
618
- >
619
- | FieldUpdateConfigForFieldType<
620
- SourceType,
621
- 'single_block',
622
- // this field type does not support default values
623
- null,
624
- SingleBlockFieldValidators,
625
- SingleBlockFieldAppearance
626
- >
627
- | FieldUpdateConfigForFieldType<
628
- SourceType,
629
- 'slug',
630
- // this field type does not support default values
631
- null,
632
- SlugFieldValidators,
633
- SlugFieldAppearance
634
- >
635
- | FieldUpdateConfigForFieldType<
636
- SourceType,
637
- 'string',
638
- StringFieldValue,
639
- StringFieldValidators,
640
- StringFieldAppearance
641
- >
642
- | FieldUpdateConfigForFieldType<
643
- SourceType,
644
- 'structured_text',
645
- // this field type does not support default values
646
- null,
647
- StructuredTextFieldValidators,
648
- StructuredTextFieldAppearance
649
- >
650
- | FieldUpdateConfigForFieldType<
651
- SourceType,
652
- 'text',
653
- TextFieldValue,
654
- TextFieldValidators,
655
- TextFieldAppearance
656
- >
657
- | FieldUpdateConfigForFieldType<
658
- SourceType,
659
- 'video',
660
- // this field type does not support default values
661
- null,
662
- VideoFieldValidators,
663
- VideoFieldAppearance
664
- >;
14
+ export type Field = GenericFieldAttributes<FieldStableShell>;
665
15
 
666
- export type FieldUpdateSchema = FieldUpdateConfig<RawFieldUpdateSchema>;
16
+ export type FieldAttributes =
17
+ GenericFieldAttributes<FieldAttributesStableShell>;
667
18
 
668
- type ForceItemTypeDataId<ItemTypeId> = Omit<ItemTypeData, 'id'> & {
669
- id: ItemTypeId;
670
- };
19
+ export type FieldCreateSchema = FieldCreateConfig<FieldCreateSchemaStableShell>;
671
20
 
672
- type ForceItemTypeData<T, ItemTypeId> = {
673
- [K in keyof T]: T[K] extends ItemTypeData
674
- ? ForceItemTypeDataId<ItemTypeId>
675
- : T[K] extends object
676
- ? ForceItemTypeData<T[K], ItemTypeId>
677
- : T[K];
678
- };
21
+ export type FieldUpdateSchema = FieldUpdateConfig<FieldUpdateSchemaStableShell>;
679
22
 
680
- type ForceItemTypeId<T, ItemTypeId> = ForceItemTypeData<T, ItemTypeId> & {
681
- /** Useful for type narrowing */
682
- __itemTypeId?: ItemTypeId;
23
+ export type ItemTypeData<D extends ItemTypeDefinition = ItemTypeDefinition> = {
24
+ type: ItemTypeType;
25
+ id: D extends ItemTypeDefinition ? D['itemTypeId'] : ItemTypeIdentity;
683
26
  };
684
27
 
685
- export type ApplyItemDefinitionToSchema<
686
- Schema,
687
- D extends ItemDefinition = ItemDefinition,
688
- > = D extends any
689
- ? ForceItemTypeId<Schema, D['itemTypeId']> & D['fields']
690
- : never;
28
+ export type Item<D extends ItemTypeDefinition = ItemTypeDefinition> = {
29
+ __itemTypeId?: D['itemTypeId'];
30
+ id: ItemIdentity;
31
+ type: ItemType1;
32
+ item_type: ItemTypeData<D>;
33
+ creator?:
34
+ | AccountData
35
+ | AccessTokenData
36
+ | UserData
37
+ | SsoUserData
38
+ | OrganizationData;
39
+ meta: ItemMeta;
40
+ } & ToItemAttributes<D>;
691
41
 
692
- export type Item<D extends ItemDefinition = ItemDefinition> =
693
- ApplyItemDefinitionToSchema<RawItem, D>;
694
- export type ItemValidateExistingSchema<
695
- D extends ItemDefinition = ItemDefinition,
696
- > = ApplyItemDefinitionToSchema<RawItemValidateExistingSchema, D>;
697
- export type ItemValidateNewSchema<D extends ItemDefinition = ItemDefinition> =
698
- ApplyItemDefinitionToSchema<RawItemValidateNewSchema, D>;
699
- export type ItemCreateSchema<D extends ItemDefinition = ItemDefinition> =
700
- ApplyItemDefinitionToSchema<RawItemCreateSchema, D>;
701
- export type ItemUpdateSchema<D extends ItemDefinition = ItemDefinition> =
702
- ApplyItemDefinitionToSchema<RawItemUpdateSchema, D>;
42
+ export type ItemInNestedResponse<
43
+ D extends ItemTypeDefinition = ItemTypeDefinition,
44
+ > = {
45
+ __itemTypeId?: D['itemTypeId'];
46
+ id: ItemIdentity;
47
+ type: ItemType1;
48
+ item_type: ItemTypeData<D>;
49
+ creator?:
50
+ | AccountData
51
+ | AccessTokenData
52
+ | UserData
53
+ | SsoUserData
54
+ | OrganizationData;
55
+ meta: ItemMeta;
56
+ } & ToItemAttributesInNestedResponse<D>;
703
57
 
704
58
  /* tslint:disable */
705
59
  /**
706
60
  * This file was automatically generated by hyperschema-to-ts: DO NOT MODIFY IT BY HAND.
707
61
  */
708
-
709
62
  /**
710
63
  * ID of role
711
64
  *
@@ -1173,17 +526,17 @@ export type UploadCollectionReorderSchema = {
1173
526
  */
1174
527
  export type UploadCollectionReorderJobSchema = UploadCollection[];
1175
528
  /**
1176
- * This interface was referenced by `Item<D>`'s JSON-Schema
529
+ * This interface was referenced by `Item`'s JSON-Schema
1177
530
  * via the `definition` "type".
1178
531
  */
1179
532
  export type ItemType1 = 'item';
1180
533
  /**
1181
534
  * RFC 4122 UUID of record expressed in URL-safe base64 format
1182
535
  *
1183
- * This interface was referenced by `Item<D>`'s JSON-Schema
536
+ * This interface was referenced by `Item`'s JSON-Schema
1184
537
  * via the `definition` "identity".
1185
538
  *
1186
- * This interface was referenced by `Item<D>`'s JSON-Schema
539
+ * This interface was referenced by `Item`'s JSON-Schema
1187
540
  * via the `definition` "id".
1188
541
  */
1189
542
  export type ItemIdentity = string;
@@ -1489,14 +842,15 @@ export type BuildEventInstancesHrefSchema = {
1489
842
  [k: string]: unknown;
1490
843
  };
1491
844
  /**
1492
- * This interface was referenced by `Item<D>`'s JSON-Schema
845
+ * This interface was referenced by `Item`'s JSON-Schema
1493
846
  * via the `instances.targetSchema` link.
1494
847
  */
1495
848
  export type ItemInstancesTargetSchema<
1496
- D extends ItemDefinition = ItemDefinition,
1497
- > = Item<D>[];
849
+ D extends ItemTypeDefinition = ItemTypeDefinition,
850
+ NestedMode extends boolean = false,
851
+ > = NestedMode extends false ? Item<D>[] : ItemInNestedResponse<D>[];
1498
852
  /**
1499
- * This interface was referenced by `Item<D>`'s JSON-Schema
853
+ * This interface was referenced by `Item`'s JSON-Schema
1500
854
  * via the `instances.hrefSchema` link.
1501
855
  */
1502
856
  export type ItemInstancesHrefSchema = {
@@ -1560,14 +914,15 @@ export type ItemInstancesHrefSchema = {
1560
914
  [k: string]: unknown;
1561
915
  };
1562
916
  /**
1563
- * This interface was referenced by `Item<D>`'s JSON-Schema
917
+ * This interface was referenced by `Item`'s JSON-Schema
1564
918
  * via the `references.targetSchema` link.
1565
919
  */
1566
920
  export type ItemReferencesTargetSchema<
1567
- D extends ItemDefinition = ItemDefinition,
1568
- > = Item<D>[];
921
+ D extends ItemTypeDefinition = ItemTypeDefinition,
922
+ NestedMode extends boolean = false,
923
+ > = NestedMode extends false ? Item<D>[] : ItemInNestedResponse<D>[];
1569
924
  /**
1570
- * This interface was referenced by `Item<D>`'s JSON-Schema
925
+ * This interface was referenced by `Item`'s JSON-Schema
1571
926
  * via the `references.hrefSchema` link.
1572
927
  */
1573
928
  export type ItemReferencesHrefSchema = {
@@ -1582,7 +937,7 @@ export type ItemReferencesHrefSchema = {
1582
937
  [k: string]: unknown;
1583
938
  };
1584
939
  /**
1585
- * This interface was referenced by `Item<D>`'s JSON-Schema
940
+ * This interface was referenced by `Item`'s JSON-Schema
1586
941
  * via the `self.hrefSchema` link.
1587
942
  */
1588
943
  export type ItemSelfHrefSchema = {
@@ -1657,7 +1012,7 @@ export type ItemVersionType = 'item_version';
1657
1012
  */
1658
1013
  export type ItemVersionIdentity = string;
1659
1014
  /**
1660
- * This interface was referenced by `Item<D>`'s JSON-Schema
1015
+ * This interface was referenced by `Item`'s JSON-Schema
1661
1016
  * via the `publish.schema` link.
1662
1017
  */
1663
1018
  export type ItemPublishSchema = {
@@ -1675,7 +1030,7 @@ export type ItemPublishSchema = {
1675
1030
  non_localized_content: boolean;
1676
1031
  } | null;
1677
1032
  /**
1678
- * This interface was referenced by `Item<D>`'s JSON-Schema
1033
+ * This interface was referenced by `Item`'s JSON-Schema
1679
1034
  * via the `publish.hrefSchema` link.
1680
1035
  */
1681
1036
  export type ItemPublishHrefSchema = {
@@ -1686,7 +1041,7 @@ export type ItemPublishHrefSchema = {
1686
1041
  [k: string]: unknown;
1687
1042
  };
1688
1043
  /**
1689
- * This interface was referenced by `Item<D>`'s JSON-Schema
1044
+ * This interface was referenced by `Item`'s JSON-Schema
1690
1045
  * via the `unpublish.schema` link.
1691
1046
  */
1692
1047
  export type ItemUnpublishSchema = {
@@ -1697,7 +1052,7 @@ export type ItemUnpublishSchema = {
1697
1052
  content_in_locales: string[];
1698
1053
  } | null;
1699
1054
  /**
1700
- * This interface was referenced by `Item<D>`'s JSON-Schema
1055
+ * This interface was referenced by `Item`'s JSON-Schema
1701
1056
  * via the `unpublish.hrefSchema` link.
1702
1057
  */
1703
1058
  export type ItemUnpublishHrefSchema = {
@@ -1708,22 +1063,22 @@ export type ItemUnpublishHrefSchema = {
1708
1063
  [k: string]: unknown;
1709
1064
  };
1710
1065
  /**
1711
- * This interface was referenced by `Item<D>`'s JSON-Schema
1066
+ * This interface was referenced by `Item`'s JSON-Schema
1712
1067
  * via the `bulk_publish.jobSchema` link.
1713
1068
  */
1714
1069
  export type ItemBulkPublishJobSchema = unknown[];
1715
1070
  /**
1716
- * This interface was referenced by `Item<D>`'s JSON-Schema
1071
+ * This interface was referenced by `Item`'s JSON-Schema
1717
1072
  * via the `bulk_unpublish.jobSchema` link.
1718
1073
  */
1719
1074
  export type ItemBulkUnpublishJobSchema = unknown[];
1720
1075
  /**
1721
- * This interface was referenced by `Item<D>`'s JSON-Schema
1076
+ * This interface was referenced by `Item`'s JSON-Schema
1722
1077
  * via the `bulk_destroy.jobSchema` link.
1723
1078
  */
1724
1079
  export type ItemBulkDestroyJobSchema = unknown[];
1725
1080
  /**
1726
- * This interface was referenced by `Item<D>`'s JSON-Schema
1081
+ * This interface was referenced by `Item`'s JSON-Schema
1727
1082
  * via the `bulk_move_to_stage.jobSchema` link.
1728
1083
  */
1729
1084
  export type ItemBulkMoveToStageJobSchema = unknown[];
@@ -1732,8 +1087,11 @@ export type ItemBulkMoveToStageJobSchema = unknown[];
1732
1087
  * via the `restore.jobSchema` link.
1733
1088
  */
1734
1089
  export type ItemVersionRestoreJobSchema<
1735
- D extends ItemDefinition = ItemDefinition,
1736
- > = [Item<D>, ItemVersion];
1090
+ D extends ItemTypeDefinition = ItemTypeDefinition,
1091
+ NestedMode extends boolean = false,
1092
+ > = NestedMode extends false
1093
+ ? [Item<D>, ItemVersion]
1094
+ : [ItemInNestedResponse<D>, ItemVersion];
1737
1095
  /**
1738
1096
  * This interface was referenced by `ItemVersion`'s JSON-Schema
1739
1097
  * via the `instances.targetSchema` link.
@@ -1836,8 +1194,9 @@ export type UploadInstancesHrefSchema = {
1836
1194
  * via the `references.targetSchema` link.
1837
1195
  */
1838
1196
  export type UploadReferencesTargetSchema<
1839
- D extends ItemDefinition = ItemDefinition,
1840
- > = Item<D>[];
1197
+ D extends ItemTypeDefinition = ItemTypeDefinition,
1198
+ NestedMode extends boolean = false,
1199
+ > = NestedMode extends false ? Item<D>[] : ItemInNestedResponse<D>[];
1841
1200
  /**
1842
1201
  * This interface was referenced by `Upload`'s JSON-Schema
1843
1202
  * via the `references.hrefSchema` link.
@@ -2560,62 +1919,6 @@ export type SiteSelfHrefSchema = {
2560
1919
  * via the `instances.targetSchema` link.
2561
1920
  */
2562
1921
  export type WorkflowInstancesTargetSchema = Workflow[];
2563
-
2564
- export type DatoApi = {
2565
- role?: Role;
2566
- user?: User;
2567
- sso_user?: SsoUser;
2568
- audit_log_event?: AuditLogEvent;
2569
- account?: Account;
2570
- organization?: Organization;
2571
- site_plan?: SitePlan;
2572
- menu_item?: MenuItem;
2573
- schema_menu_item?: SchemaMenuItem;
2574
- upload_collection?: UploadCollection;
2575
- item_type?: ItemType;
2576
- field?: Field;
2577
- fieldset?: Fieldset;
2578
- job?: Job;
2579
- session?: Session;
2580
- access_token?: AccessToken;
2581
- plugin?: Plugin;
2582
- job_result?: JobResult;
2583
- subscription_limit?: SubscriptionLimit;
2584
- subscription_feature?: SubscriptionFeature;
2585
- build_event?: BuildEvent;
2586
- item?: Item;
2587
- item_current_vs_published_state?: ItemCurrentVsPublishedState;
2588
- item_version?: ItemVersion;
2589
- upload?: Upload;
2590
- upload_request?: UploadRequest;
2591
- upload_track?: UploadTrack;
2592
- scheduled_publication?: ScheduledPublication;
2593
- scheduled_unpublishing?: ScheduledUnpublishing;
2594
- search_result?: SearchResult;
2595
- environment?: Environment;
2596
- maintenance_mode?: MaintenanceMode;
2597
- webhook?: Webhook;
2598
- webhook_call?: WebhookCall;
2599
- build_trigger?: BuildTrigger;
2600
- item_type_filter?: ItemTypeFilter;
2601
- upload_filter?: UploadFilter;
2602
- site_invitation?: SiteInvitation;
2603
- editing_session?: EditingSession;
2604
- form_data?: FormData;
2605
- sso_group?: SsoGroup;
2606
- sso_settings?: SsoSettings;
2607
- emoji_suggestions?: EmojiSuggestions;
2608
- white_label_settings?: WhiteLabelSettings;
2609
- public_info?: PublicInfo;
2610
- daily_usage?: DailyUsage;
2611
- usage_counter?: UsageCounter;
2612
- upload_tag?: UploadTag;
2613
- upload_smart_tag?: UploadSmartTag;
2614
- site?: Site;
2615
- workflow?: Workflow;
2616
- [k: string]: unknown;
2617
- };
2618
-
2619
1922
  /**
2620
1923
  * A Role represents a specific set of actions an editor (or an API token) can perform on your administrative area.
2621
1924
  *
@@ -2865,7 +2168,6 @@ export type RoleData = {
2865
2168
  type: RoleType;
2866
2169
  id: RoleIdentity;
2867
2170
  };
2868
-
2869
2171
  /**
2870
2172
  * Meta information regarding the record
2871
2173
  *
@@ -3097,7 +2399,6 @@ export type RoleMeta = {
3097
2399
  }[];
3098
2400
  };
3099
2401
  };
3100
-
3101
2402
  /**
3102
2403
  * JSON API attributes
3103
2404
  *
@@ -3328,7 +2629,6 @@ export type RoleAttributes = {
3328
2629
  build_trigger?: BuildTriggerIdentity | null;
3329
2630
  }[];
3330
2631
  };
3331
-
3332
2632
  /**
3333
2633
  * JSON API links
3334
2634
  *
@@ -3338,7 +2638,6 @@ export type RoleAttributes = {
3338
2638
  export type RoleRelationships = {
3339
2639
  inherits_permissions_from: RoleData[];
3340
2640
  };
3341
-
3342
2641
  /**
3343
2642
  * This interface was referenced by `Role`'s JSON-Schema
3344
2643
  * via the `create.schema` link.
@@ -3570,7 +2869,6 @@ export type RoleCreateSchema = {
3570
2869
  inherits_permissions_from?: RoleData[];
3571
2870
  meta?: RoleMeta;
3572
2871
  };
3573
-
3574
2872
  /**
3575
2873
  * This interface was referenced by `Role`'s JSON-Schema
3576
2874
  * via the `update.schema` link.
@@ -3803,7 +3101,6 @@ export type RoleUpdateSchema = {
3803
3101
  inherits_permissions_from?: RoleData[];
3804
3102
  meta?: RoleMeta;
3805
3103
  };
3806
-
3807
3104
  /**
3808
3105
  * A DatoCMS administrative area can be accessed by multiple people. Every collaborator is linked to a specific Role, which describes what actions it will be able to perform once logged in.
3809
3106
  *
@@ -3847,7 +3144,6 @@ export type UserMeta = {
3847
3144
  */
3848
3145
  last_access: string | null;
3849
3146
  };
3850
-
3851
3147
  /**
3852
3148
  * JSON API data
3853
3149
  *
@@ -3858,7 +3154,6 @@ export type UserData = {
3858
3154
  type: UserType;
3859
3155
  id: UserIdentity;
3860
3156
  };
3861
-
3862
3157
  /**
3863
3158
  * JSON API attributes
3864
3159
  *
@@ -3883,7 +3178,6 @@ export type UserAttributes = {
3883
3178
  */
3884
3179
  is_active: boolean;
3885
3180
  };
3886
-
3887
3181
  /**
3888
3182
  * JSON API links
3889
3183
  *
@@ -3893,7 +3187,6 @@ export type UserAttributes = {
3893
3187
  export type UserRelationships = {
3894
3188
  role: RoleData;
3895
3189
  };
3896
-
3897
3190
  /**
3898
3191
  * This interface was referenced by `User`'s JSON-Schema
3899
3192
  * via the `update.schema` link.
@@ -3907,7 +3200,6 @@ export type UserUpdateSchema = {
3907
3200
  is_active?: boolean;
3908
3201
  role?: RoleData;
3909
3202
  };
3910
-
3911
3203
  /**
3912
3204
  * A Single Sign-On user exists when a DatoCMS project is connected to an external Identity Provider. An SSO user will not use the standard login procedure but has to go through SAML authentication. It can also be linked to one or more IdP groups.
3913
3205
  *
@@ -3953,7 +3245,6 @@ export type SsoGroupData = {
3953
3245
  type: SsoGroupType;
3954
3246
  id: SsoGroupIdentity;
3955
3247
  };
3956
-
3957
3248
  /**
3958
3249
  * Meta information on the user
3959
3250
  *
@@ -3966,7 +3257,6 @@ export type SsoUserMeta = {
3966
3257
  */
3967
3258
  last_access: string | null;
3968
3259
  };
3969
-
3970
3260
  /**
3971
3261
  * JSON API data
3972
3262
  *
@@ -3977,7 +3267,6 @@ export type SsoUserData = {
3977
3267
  type: SsoUserType;
3978
3268
  id: SsoUserIdentity;
3979
3269
  };
3980
-
3981
3270
  /**
3982
3271
  * JSON API attributes
3983
3272
  *
@@ -4006,7 +3295,6 @@ export type SsoUserAttributes = {
4006
3295
  */
4007
3296
  last_name: string | null;
4008
3297
  };
4009
-
4010
3298
  /**
4011
3299
  * JSON API links
4012
3300
  *
@@ -4017,7 +3305,6 @@ export type SsoUserRelationships = {
4017
3305
  groups: SsoGroupData[];
4018
3306
  role: RoleData | null;
4019
3307
  };
4020
-
4021
3308
  /**
4022
3309
  * An API token allows access to our API. It is linked to a Role, which describes what actions can be performed.
4023
3310
  *
@@ -4065,7 +3352,6 @@ export type AccessTokenData = {
4065
3352
  type: AccessTokenType;
4066
3353
  id: AccessTokenIdentity;
4067
3354
  };
4068
-
4069
3355
  /**
4070
3356
  * JSON API attributes
4071
3357
  *
@@ -4095,7 +3381,6 @@ export type AccessTokenAttributes = {
4095
3381
  can_access_cma: boolean;
4096
3382
  hardcoded_type: null | string;
4097
3383
  };
4098
-
4099
3384
  /**
4100
3385
  * JSON API links
4101
3386
  *
@@ -4105,7 +3390,6 @@ export type AccessTokenAttributes = {
4105
3390
  export type AccessTokenRelationships = {
4106
3391
  role: RoleData | null;
4107
3392
  };
4108
-
4109
3393
  /**
4110
3394
  * This interface was referenced by `AccessToken`'s JSON-Schema
4111
3395
  * via the `create.schema` link.
@@ -4130,7 +3414,6 @@ export type AccessTokenCreateSchema = {
4130
3414
  can_access_cma: boolean;
4131
3415
  role: RoleData | null;
4132
3416
  };
4133
-
4134
3417
  /**
4135
3418
  * This interface was referenced by `AccessToken`'s JSON-Schema
4136
3419
  * via the `update.schema` link.
@@ -4156,7 +3439,6 @@ export type AccessTokenUpdateSchema = {
4156
3439
  can_access_cma: boolean;
4157
3440
  role: RoleData | null;
4158
3441
  };
4159
-
4160
3442
  /**
4161
3443
  * DatoCMS account
4162
3444
  *
@@ -4183,7 +3465,6 @@ export type Account = {
4183
3465
  */
4184
3466
  company: string | null;
4185
3467
  };
4186
-
4187
3468
  /**
4188
3469
  * JSON API data
4189
3470
  *
@@ -4194,7 +3475,6 @@ export type AccountData = {
4194
3475
  type: AccountType;
4195
3476
  id: AccountIdentity;
4196
3477
  };
4197
-
4198
3478
  /**
4199
3479
  * JSON API attributes
4200
3480
  *
@@ -4219,7 +3499,6 @@ export type AccountAttributes = {
4219
3499
  */
4220
3500
  company: string | null;
4221
3501
  };
4222
-
4223
3502
  /**
4224
3503
  * If the Audit log functionality is enabled in a project, logged events can be queried using SQL-like language and fetched in full detail so that they can be exported or analyzed.
4225
3504
  *
@@ -4316,7 +3595,6 @@ export type AuditLogEvent = {
4316
3595
  };
4317
3596
  meta: AuditLogEventMeta;
4318
3597
  };
4319
-
4320
3598
  /**
4321
3599
  * JSON API meta
4322
3600
  *
@@ -4329,7 +3607,6 @@ export type AuditLogEventMeta = {
4329
3607
  */
4330
3608
  occurred_at: string;
4331
3609
  };
4332
-
4333
3610
  /**
4334
3611
  * JSON API data
4335
3612
  *
@@ -4340,7 +3617,6 @@ export type AuditLogEventData = {
4340
3617
  type: AuditLogEventType;
4341
3618
  id: AuditLogEventIdentity;
4342
3619
  };
4343
-
4344
3620
  /**
4345
3621
  * JSON API attributes
4346
3622
  *
@@ -4434,7 +3710,6 @@ export type AuditLogEventAttributes = {
4434
3710
  };
4435
3711
  };
4436
3712
  };
4437
-
4438
3713
  /**
4439
3714
  * This interface was referenced by `AuditLogEvent`'s JSON-Schema
4440
3715
  * via the `query.schema` link.
@@ -4454,7 +3729,6 @@ export type AuditLogEventQuerySchema = {
4454
3729
  */
4455
3730
  detailed_log?: boolean;
4456
3731
  };
4457
-
4458
3732
  /**
4459
3733
  * DatoCMS organization
4460
3734
  *
@@ -4469,7 +3743,6 @@ export type Organization = {
4469
3743
  */
4470
3744
  name: string;
4471
3745
  };
4472
-
4473
3746
  /**
4474
3747
  * JSON API data
4475
3748
  *
@@ -4480,7 +3753,6 @@ export type OrganizationData = {
4480
3753
  type: OrganizationType;
4481
3754
  id: OrganizationIdentity;
4482
3755
  };
4483
-
4484
3756
  /**
4485
3757
  * JSON API attributes
4486
3758
  *
@@ -4493,7 +3765,6 @@ export type OrganizationAttributes = {
4493
3765
  */
4494
3766
  name: string;
4495
3767
  };
4496
-
4497
3768
  /**
4498
3769
  * Stores the information regarding the current plan for the project.
4499
3770
  *
@@ -4722,7 +3993,6 @@ export type SitePlan = {
4722
3993
  };
4723
3994
  };
4724
3995
  };
4725
-
4726
3996
  /**
4727
3997
  * JSON API data
4728
3998
  *
@@ -4733,7 +4003,6 @@ export type SitePlanData = {
4733
4003
  type: SitePlanType;
4734
4004
  id: SitePlanIdentity;
4735
4005
  };
4736
-
4737
4006
  /**
4738
4007
  * JSON API attributes
4739
4008
  *
@@ -4960,7 +4229,6 @@ export type SitePlanAttributes = {
4960
4229
  };
4961
4230
  };
4962
4231
  };
4963
-
4964
4232
  /**
4965
4233
  * In DatoCMS you can organize the different Models present in your administrative area reordering and grouping them, so that their purpose will be more clear to the final editor.
4966
4234
  *
@@ -4995,17 +4263,6 @@ export type MenuItemCreateTargetSchema = MenuItem;
4995
4263
  export type MenuItemUpdateTargetSchema = MenuItem;
4996
4264
  export type MenuItemSelfTargetSchema = MenuItem;
4997
4265
  export type MenuItemDestroyTargetSchema = MenuItem;
4998
- /**
4999
- * JSON API data
5000
- *
5001
- * This interface was referenced by `ItemType`'s JSON-Schema
5002
- * via the `definition` "data".
5003
- */
5004
- export type ItemTypeData = {
5005
- type: ItemTypeType;
5006
- id: ItemTypeIdentity;
5007
- };
5008
-
5009
4266
  /**
5010
4267
  * JSON API data
5011
4268
  *
@@ -5016,7 +4273,6 @@ export type ItemTypeFilterData = {
5016
4273
  type: ItemTypeFilterType;
5017
4274
  id: ItemTypeFilterIdentity;
5018
4275
  };
5019
-
5020
4276
  /**
5021
4277
  * JSON API data
5022
4278
  *
@@ -5027,7 +4283,6 @@ export type MenuItemData = {
5027
4283
  type: MenuItemType;
5028
4284
  id: MenuItemIdentity;
5029
4285
  };
5030
-
5031
4286
  /**
5032
4287
  * JSON API attributes
5033
4288
  *
@@ -5052,7 +4307,6 @@ export type MenuItemAttributes = {
5052
4307
  */
5053
4308
  open_in_new_tab: boolean;
5054
4309
  };
5055
-
5056
4310
  /**
5057
4311
  * JSON API links
5058
4312
  *
@@ -5065,7 +4319,6 @@ export type MenuItemRelationships = {
5065
4319
  parent: null | MenuItemData;
5066
4320
  children: MenuItemData[];
5067
4321
  };
5068
-
5069
4322
  /**
5070
4323
  * This interface was referenced by `MenuItem`'s JSON-Schema
5071
4324
  * via the `create.schema` link.
@@ -5093,7 +4346,6 @@ export type MenuItemCreateSchema = {
5093
4346
  item_type_filter?: ItemTypeFilterData | null;
5094
4347
  parent?: null | MenuItemData;
5095
4348
  };
5096
-
5097
4349
  /**
5098
4350
  * This interface was referenced by `MenuItem`'s JSON-Schema
5099
4351
  * via the `update.schema` link.
@@ -5121,7 +4373,6 @@ export type MenuItemUpdateSchema = {
5121
4373
  item_type_filter?: ItemTypeFilterData | null;
5122
4374
  parent?: null | MenuItemData;
5123
4375
  };
5124
-
5125
4376
  /**
5126
4377
  * This interface was referenced by `MenuItem`'s JSON-Schema
5127
4378
  * via the `reorder.targetSchema` link.
@@ -5153,22 +4404,22 @@ export type MenuItemUpdateSchema = {
5153
4404
  * This interface was referenced by `Field`'s JSON-Schema
5154
4405
  * via the `duplicate.targetSchema` link.
5155
4406
  *
5156
- * This interface was referenced by `Item<D>`'s JSON-Schema
4407
+ * This interface was referenced by `Item`'s JSON-Schema
5157
4408
  * via the `duplicate.targetSchema` link.
5158
4409
  *
5159
- * This interface was referenced by `Item<D>`'s JSON-Schema
4410
+ * This interface was referenced by `Item`'s JSON-Schema
5160
4411
  * via the `destroy.targetSchema` link.
5161
4412
  *
5162
- * This interface was referenced by `Item<D>`'s JSON-Schema
4413
+ * This interface was referenced by `Item`'s JSON-Schema
5163
4414
  * via the `bulk_publish.targetSchema` link.
5164
4415
  *
5165
- * This interface was referenced by `Item<D>`'s JSON-Schema
4416
+ * This interface was referenced by `Item`'s JSON-Schema
5166
4417
  * via the `bulk_unpublish.targetSchema` link.
5167
4418
  *
5168
- * This interface was referenced by `Item<D>`'s JSON-Schema
4419
+ * This interface was referenced by `Item`'s JSON-Schema
5169
4420
  * via the `bulk_destroy.targetSchema` link.
5170
4421
  *
5171
- * This interface was referenced by `Item<D>`'s JSON-Schema
4422
+ * This interface was referenced by `Item`'s JSON-Schema
5172
4423
  * via the `bulk_move_to_stage.targetSchema` link.
5173
4424
  *
5174
4425
  * This interface was referenced by `ItemVersion`'s JSON-Schema
@@ -5248,7 +4499,6 @@ export type JobData = {
5248
4499
  type: JobType;
5249
4500
  id: JobIdentity;
5250
4501
  };
5251
-
5252
4502
  /**
5253
4503
  * In DatoCMS you can organize the different models and blocks present in your administrative area reordering and grouping them, so that their purpose will be more clear to the final editor.
5254
4504
  *
@@ -5288,7 +4538,6 @@ export type SchemaMenuItemData = {
5288
4538
  type: SchemaMenuItemType;
5289
4539
  id: SchemaMenuItemIdentity;
5290
4540
  };
5291
-
5292
4541
  /**
5293
4542
  * JSON API attributes
5294
4543
  *
@@ -5309,7 +4558,6 @@ export type SchemaMenuItemAttributes = {
5309
4558
  */
5310
4559
  kind: 'item_type' | 'modular_block';
5311
4560
  };
5312
-
5313
4561
  /**
5314
4562
  * JSON API links
5315
4563
  *
@@ -5321,7 +4569,6 @@ export type SchemaMenuItemRelationships = {
5321
4569
  parent: null | SchemaMenuItemData;
5322
4570
  children: SchemaMenuItemData[];
5323
4571
  };
5324
-
5325
4572
  /**
5326
4573
  * This interface was referenced by `SchemaMenuItem`'s JSON-Schema
5327
4574
  * via the `create.schema` link.
@@ -5344,7 +4591,6 @@ export type SchemaMenuItemCreateSchema = {
5344
4591
  item_type?: ItemTypeData | null;
5345
4592
  parent?: null | SchemaMenuItemData;
5346
4593
  };
5347
-
5348
4594
  /**
5349
4595
  * This interface was referenced by `SchemaMenuItem`'s JSON-Schema
5350
4596
  * via the `update.schema` link.
@@ -5368,7 +4614,6 @@ export type SchemaMenuItemUpdateSchema = {
5368
4614
  parent?: null | SchemaMenuItemData;
5369
4615
  children?: SchemaMenuItemData[];
5370
4616
  };
5371
-
5372
4617
  /**
5373
4618
  * In DatoCMS you can organize the uploads present in your administrative area in collection, so that the final editors can easily navigate uploads.
5374
4619
  *
@@ -5403,7 +4648,6 @@ export type UploadCollectionData = {
5403
4648
  type: UploadCollectionType;
5404
4649
  id: UploadCollectionIdentity;
5405
4650
  };
5406
-
5407
4651
  /**
5408
4652
  * JSON API attributes
5409
4653
  *
@@ -5420,7 +4664,6 @@ export type UploadCollectionAttributes = {
5420
4664
  */
5421
4665
  position: number;
5422
4666
  };
5423
-
5424
4667
  /**
5425
4668
  * JSON API links
5426
4669
  *
@@ -5431,7 +4674,6 @@ export type UploadCollectionRelationships = {
5431
4674
  parent: null | UploadCollectionData;
5432
4675
  children: UploadCollectionData[];
5433
4676
  };
5434
-
5435
4677
  /**
5436
4678
  * This interface was referenced by `UploadCollection`'s JSON-Schema
5437
4679
  * via the `create.schema` link.
@@ -5449,7 +4691,6 @@ export type UploadCollectionCreateSchema = {
5449
4691
  position?: number;
5450
4692
  parent?: null | UploadCollectionData;
5451
4693
  };
5452
-
5453
4694
  /**
5454
4695
  * This interface was referenced by `UploadCollection`'s JSON-Schema
5455
4696
  * via the `update.schema` link.
@@ -5468,7 +4709,6 @@ export type UploadCollectionUpdateSchema = {
5468
4709
  parent?: null | UploadCollectionData;
5469
4710
  children?: UploadCollectionData[];
5470
4711
  };
5471
-
5472
4712
  /**
5473
4713
  * The way you define the kind of content you can edit inside your administrative area passes through the concept of Models, which are much like database tables. For backward-compatibility reasons, the API refers to models as "item types".
5474
4714
  *
@@ -5567,14 +4807,13 @@ export type ItemTypeDestroyJobSchema = ItemType;
5567
4807
  /**
5568
4808
  * JSON API data
5569
4809
  *
5570
- * This interface was referenced by `Item<D>`'s JSON-Schema
4810
+ * This interface was referenced by `Item`'s JSON-Schema
5571
4811
  * via the `definition` "data".
5572
4812
  */
5573
4813
  export type ItemData = {
5574
4814
  type: ItemType1;
5575
4815
  id: ItemIdentity;
5576
4816
  };
5577
-
5578
4817
  /**
5579
4818
  * JSON API data
5580
4819
  *
@@ -5585,7 +4824,6 @@ export type FieldData = {
5585
4824
  type: FieldType;
5586
4825
  id: FieldIdentity;
5587
4826
  };
5588
-
5589
4827
  /**
5590
4828
  * JSON API data
5591
4829
  *
@@ -5596,7 +4834,6 @@ export type FieldsetData = {
5596
4834
  type: FieldsetType;
5597
4835
  id: FieldsetIdentity;
5598
4836
  };
5599
-
5600
4837
  /**
5601
4838
  * JSON API data
5602
4839
  *
@@ -5607,7 +4844,6 @@ export type WorkflowData = {
5607
4844
  type: WorkflowType;
5608
4845
  id: WorkflowIdentity;
5609
4846
  };
5610
-
5611
4847
  /**
5612
4848
  * Meta information regarding the item type
5613
4849
  *
@@ -5620,7 +4856,6 @@ export type ItemTypeMeta = {
5620
4856
  */
5621
4857
  has_singleton_item: boolean;
5622
4858
  };
5623
-
5624
4859
  /**
5625
4860
  * JSON API attributes
5626
4861
  *
@@ -5698,7 +4933,6 @@ export type ItemTypeAttributes = {
5698
4933
  */
5699
4934
  inverse_relationships_enabled: boolean;
5700
4935
  };
5701
-
5702
4936
  /**
5703
4937
  * JSON API links
5704
4938
  *
@@ -5717,7 +4951,6 @@ export type ItemTypeRelationships = {
5717
4951
  ordering_field: FieldData | null;
5718
4952
  workflow: WorkflowData | null;
5719
4953
  };
5720
-
5721
4954
  /**
5722
4955
  * This interface was referenced by `ItemType`'s JSON-Schema
5723
4956
  * via the `create.schema` link.
@@ -5798,7 +5031,6 @@ export type ItemTypeCreateSchema = {
5798
5031
  excerpt_field?: FieldData | null;
5799
5032
  workflow?: WorkflowData | null;
5800
5033
  };
5801
-
5802
5034
  /**
5803
5035
  * This interface was referenced by `ItemType`'s JSON-Schema
5804
5036
  * via the `update.schema` link.
@@ -5889,7 +5121,6 @@ export type ItemTypeUpdateSchema = {
5889
5121
  has_singleton_item?: boolean;
5890
5122
  };
5891
5123
  };
5892
-
5893
5124
  /**
5894
5125
  * DatoCMS offers a number of different fields that you can combine together to create a [Model](/docs/content-management-api/resources/item-type). Using the database metaphore, fields are like table columns, and when creating them you need to specify their type (`string`, `float`, etc.) and any required validation.
5895
5126
  *
@@ -6844,7 +6075,7 @@ export type ItemTypeUpdateSchema = {
6844
6075
  * This interface was referenced by `DatoApi`'s JSON-Schema
6845
6076
  * via the `definition` "field".
6846
6077
  */
6847
- export type RawField = {
6078
+ export type FieldStableShell = {
6848
6079
  id: FieldIdentity;
6849
6080
  type: FieldType;
6850
6081
  /**
@@ -6973,7 +6204,7 @@ export type FieldDuplicateJobSchema = Field;
6973
6204
  * This interface was referenced by `Field`'s JSON-Schema
6974
6205
  * via the `definition` "attributes".
6975
6206
  */
6976
- export type RawFieldAttributes = {
6207
+ export type FieldAttributesStableShell = {
6977
6208
  /**
6978
6209
  * The label of the field
6979
6210
  */
@@ -7087,7 +6318,6 @@ export type RawFieldAttributes = {
7087
6318
  */
7088
6319
  deep_filtering_enabled: boolean;
7089
6320
  };
7090
-
7091
6321
  /**
7092
6322
  * JSON API links
7093
6323
  *
@@ -7098,12 +6328,11 @@ export type FieldRelationships = {
7098
6328
  item_type: ItemTypeData;
7099
6329
  fieldset: null | FieldsetData;
7100
6330
  };
7101
-
7102
6331
  /**
7103
6332
  * This interface was referenced by `Field`'s JSON-Schema
7104
6333
  * via the `create.schema` link.
7105
6334
  */
7106
- export type RawFieldCreateSchema = {
6335
+ export type FieldCreateSchemaStableShell = {
7107
6336
  id?: FieldIdentity;
7108
6337
  type?: FieldType;
7109
6338
  /**
@@ -7220,12 +6449,11 @@ export type RawFieldCreateSchema = {
7220
6449
  deep_filtering_enabled?: boolean;
7221
6450
  fieldset?: null | FieldsetData;
7222
6451
  };
7223
-
7224
6452
  /**
7225
6453
  * This interface was referenced by `Field`'s JSON-Schema
7226
6454
  * via the `update.schema` link.
7227
6455
  */
7228
- export type RawFieldUpdateSchema = {
6456
+ export type FieldUpdateSchemaStableShell = {
7229
6457
  id?: FieldIdentity;
7230
6458
  type?: FieldType;
7231
6459
  /**
@@ -7342,7 +6570,6 @@ export type RawFieldUpdateSchema = {
7342
6570
  deep_filtering_enabled?: boolean;
7343
6571
  fieldset?: null | FieldsetData;
7344
6572
  };
7345
-
7346
6573
  /**
7347
6574
  * Fields can be organized and grouped into fieldset to better present them to editors.
7348
6575
  *
@@ -7406,7 +6633,6 @@ export type FieldsetAttributes = {
7406
6633
  */
7407
6634
  position: number;
7408
6635
  };
7409
-
7410
6636
  /**
7411
6637
  * JSON API links
7412
6638
  *
@@ -7416,7 +6642,6 @@ export type FieldsetAttributes = {
7416
6642
  export type FieldsetRelationships = {
7417
6643
  item_type: ItemTypeData;
7418
6644
  };
7419
-
7420
6645
  /**
7421
6646
  * This interface was referenced by `Fieldset`'s JSON-Schema
7422
6647
  * via the `create.schema` link.
@@ -7445,7 +6670,6 @@ export type FieldsetCreateSchema = {
7445
6670
  */
7446
6671
  start_collapsed?: boolean;
7447
6672
  };
7448
-
7449
6673
  /**
7450
6674
  * This interface was referenced by `Fieldset`'s JSON-Schema
7451
6675
  * via the `update.schema` link.
@@ -7474,7 +6698,6 @@ export type FieldsetUpdateSchema = {
7474
6698
  */
7475
6699
  start_collapsed?: boolean;
7476
6700
  };
7477
-
7478
6701
  /**
7479
6702
  * A session is required to access to read-and-write API endpoints
7480
6703
  *
@@ -7502,7 +6725,6 @@ export type SessionData = {
7502
6725
  type: SessionType;
7503
6726
  id: SessionIdentity;
7504
6727
  };
7505
-
7506
6728
  /**
7507
6729
  * JSON API links
7508
6730
  *
@@ -7517,7 +6739,6 @@ export type SessionRelationships = {
7517
6739
  | SsoUserData
7518
6740
  | OrganizationData;
7519
6741
  };
7520
-
7521
6742
  /**
7522
6743
  * This interface was referenced by `Session`'s JSON-Schema
7523
6744
  * via the `create.schema` link.
@@ -7537,7 +6758,6 @@ export type SessionCreateSchema = {
7537
6758
  */
7538
6759
  otp_code?: string;
7539
6760
  };
7540
-
7541
6761
  /**
7542
6762
  * Plugins enable developers to replace DatoCMS field components with HTML5 applications so the editing experiences of the DatoCMS web app can be customized.
7543
6763
  *
@@ -7631,7 +6851,6 @@ export type PluginMeta = {
7631
6851
  */
7632
6852
  version: string;
7633
6853
  };
7634
-
7635
6854
  /**
7636
6855
  * JSON API data
7637
6856
  *
@@ -7642,7 +6861,6 @@ export type PluginData = {
7642
6861
  type: PluginType;
7643
6862
  id: PluginIdentity;
7644
6863
  };
7645
-
7646
6864
  /**
7647
6865
  * JSON API attributes
7648
6866
  *
@@ -7717,7 +6935,6 @@ export type PluginAttributes = {
7717
6935
  instance: unknown[];
7718
6936
  };
7719
6937
  };
7720
-
7721
6938
  /**
7722
6939
  * This interface was referenced by `Plugin`'s JSON-Schema
7723
6940
  * via the `create.schema` link.
@@ -7784,7 +7001,6 @@ export type PluginCreateSchema = {
7784
7001
  */
7785
7002
  package_version?: null | string;
7786
7003
  };
7787
-
7788
7004
  /**
7789
7005
  * This interface was referenced by `Plugin`'s JSON-Schema
7790
7006
  * via the `update.schema` link.
@@ -7822,7 +7038,6 @@ export type PluginUpdateSchema = {
7822
7038
  [k: string]: unknown;
7823
7039
  };
7824
7040
  };
7825
-
7826
7041
  /**
7827
7042
  * Some API endpoint give results asynchronously, returning the ID of a job.
7828
7043
  *
@@ -7854,7 +7069,6 @@ export type JobResultData = {
7854
7069
  type: JobResultType;
7855
7070
  id: JobResultIdentity;
7856
7071
  };
7857
-
7858
7072
  /**
7859
7073
  * JSON API attributes
7860
7074
  *
@@ -7873,7 +7087,6 @@ export type JobResultAttributes = {
7873
7087
  [k: string]: unknown;
7874
7088
  };
7875
7089
  };
7876
-
7877
7090
  /**
7878
7091
  * This interface was referenced by `DatoApi`'s JSON-Schema
7879
7092
  * via the `definition` "subscription_limit".
@@ -7905,7 +7118,6 @@ export type SubscriptionLimitData = {
7905
7118
  type: SubscriptionLimitType;
7906
7119
  id: SubscriptionLimitIdentity;
7907
7120
  };
7908
-
7909
7121
  /**
7910
7122
  * JSON API attributes
7911
7123
  *
@@ -7926,7 +7138,6 @@ export type SubscriptionLimitAttributes = {
7926
7138
  */
7927
7139
  limit: number | null;
7928
7140
  };
7929
-
7930
7141
  /**
7931
7142
  * This interface was referenced by `DatoApi`'s JSON-Schema
7932
7143
  * via the `definition` "subscription_feature".
@@ -7947,7 +7158,6 @@ export type SubscriptionFeature = {
7947
7158
  */
7948
7159
  enabled: boolean;
7949
7160
  };
7950
-
7951
7161
  /**
7952
7162
  * JSON API data
7953
7163
  *
@@ -7958,7 +7168,6 @@ export type SubscriptionFeatureData = {
7958
7168
  type: SubscriptionFeatureType;
7959
7169
  id: SubscriptionFeatureIdentity;
7960
7170
  };
7961
-
7962
7171
  /**
7963
7172
  * JSON API attributes
7964
7173
  *
@@ -7979,7 +7188,6 @@ export type SubscriptionFeatureAttributes = {
7979
7188
  */
7980
7189
  enabled: boolean;
7981
7190
  };
7982
-
7983
7191
  /**
7984
7192
  * Represents an event occurred during the deploy process of your administrative area.
7985
7193
  *
@@ -8025,7 +7233,6 @@ export type BuildTriggerData = {
8025
7233
  type: BuildTriggerType;
8026
7234
  id: BuildTriggerIdentity;
8027
7235
  };
8028
-
8029
7236
  /**
8030
7237
  * JSON API data
8031
7238
  *
@@ -8036,7 +7243,6 @@ export type BuildEventData = {
8036
7243
  type: BuildEventType;
8037
7244
  id: BuildEventIdentity;
8038
7245
  };
8039
-
8040
7246
  /**
8041
7247
  * JSON API attributes
8042
7248
  *
@@ -8068,7 +7274,6 @@ export type BuildEventAttributes = {
8068
7274
  [k: string]: unknown;
8069
7275
  };
8070
7276
  };
8071
-
8072
7277
  /**
8073
7278
  * JSON API links
8074
7279
  *
@@ -8078,876 +7283,112 @@ export type BuildEventAttributes = {
8078
7283
  export type BuildEventRelationships = {
8079
7284
  build_trigger: BuildTriggerData;
8080
7285
  };
8081
-
7286
+ export type ItemCreateTargetSchema<
7287
+ D extends ItemTypeDefinition = ItemTypeDefinition,
7288
+ NestedMode extends boolean = false,
7289
+ > = NestedMode extends false ? Item<D> : ItemInNestedResponse<D>;
7290
+ export type ItemDuplicateJobSchema<
7291
+ D extends ItemTypeDefinition = ItemTypeDefinition,
7292
+ NestedMode extends boolean = false,
7293
+ > = NestedMode extends false ? Item<D> : ItemInNestedResponse<D>;
7294
+ export type ItemUpdateTargetSchema<
7295
+ D extends ItemTypeDefinition = ItemTypeDefinition,
7296
+ NestedMode extends boolean = false,
7297
+ > = NestedMode extends false ? Item<D> : ItemInNestedResponse<D>;
7298
+ export type ItemSelfTargetSchema<
7299
+ D extends ItemTypeDefinition = ItemTypeDefinition,
7300
+ NestedMode extends boolean = false,
7301
+ > = NestedMode extends false ? Item<D> : ItemInNestedResponse<D>;
7302
+ export type ItemDestroyJobSchema<
7303
+ D extends ItemTypeDefinition = ItemTypeDefinition,
7304
+ NestedMode extends boolean = false,
7305
+ > = NestedMode extends false ? Item<D> : ItemInNestedResponse<D>;
7306
+ export type ItemPublishTargetSchema<
7307
+ D extends ItemTypeDefinition = ItemTypeDefinition,
7308
+ NestedMode extends boolean = false,
7309
+ > = NestedMode extends false ? Item<D> : ItemInNestedResponse<D>;
7310
+ export type ItemUnpublishTargetSchema<
7311
+ D extends ItemTypeDefinition = ItemTypeDefinition,
7312
+ NestedMode extends boolean = false,
7313
+ > = NestedMode extends false ? Item<D> : ItemInNestedResponse<D>;
7314
+ export type ScheduledPublicationDestroyTargetSchema<
7315
+ D extends ItemTypeDefinition = ItemTypeDefinition,
7316
+ NestedMode extends boolean = false,
7317
+ > = NestedMode extends false ? Item<D> : ItemInNestedResponse<D>;
7318
+ export type ScheduledUnpublishingDestroyTargetSchema<
7319
+ D extends ItemTypeDefinition = ItemTypeDefinition,
7320
+ NestedMode extends boolean = false,
7321
+ > = NestedMode extends false ? Item<D> : ItemInNestedResponse<D>;
8082
7322
  /**
8083
- * DatoCMS stores the individual pieces of content you create from a model as records (for backwards compatibility the API calls these `item`). The shape of a record’s attributes depends on the fields defined by that record’s model — see the [Object payload](#object-payload) section for the full object payload documentation.
8084
- *
8085
- * ```json
8086
- * // A simple record
8087
- * {
8088
- * "id": "A4gkL_8pTZmcyJ-IlIEd2w",
8089
- * "type": "item",
8090
- * "attributes": {
8091
- * "title": "My Blog Post",
8092
- * "publication_date": "2024-01-15"
8093
- * },
8094
- * "relationships": {
8095
- * "item_type": {
8096
- * "data": { "id": "BxZ9Y2aKQVeTnM4hP8wLpD", "type": "item_type" }
8097
- * }
8098
- * }
8099
- * }
8100
- * ```
8101
- *
8102
- * > [!PROTIP] 📘 New to content modeling?
8103
- * > Check out the [Content Modeling Guide](/docs/content-modelling) to understand how to design models, fields, and relationships before diving into API usage.
8104
- *
8105
- * ---
8106
- *
8107
- * ## Field types overview
8108
- *
8109
- * ###### Scalar fields
8110
- * These store basic data types (ie. strings, numbers, booleans):
8111
- *
8112
- * <details>
8113
- * <summary>Single-line string</summary>
8114
- *
8115
- * The field accepts `String` values or `null`.
8116
- *
8117
- * </details>
8118
- *
8119
- * <details>
8120
- * <summary>Slug</summary>
8121
- *
8122
- * The field accepts `String` values or `null`.
8123
- * </details>
8124
- *
8125
- * <details>
8126
- * <summary>Multi-line text</summary>
8127
- *
8128
- * The field accepts simple `String` values (can include newlines) or `null`
8129
- * </details>
8130
- *
8131
- * <details>
8132
- * <summary>Boolean</summary>
8133
- *
8134
- * The field accepts simple `Boolean` values or `null`.
8135
- * </details>
8136
- *
8137
- * <details>
8138
- * <summary>Integer</summary>
8139
- *
8140
- * The field accepts simple `Integer` values or `null`.
8141
- * </details>
8142
- *
8143
- * <details>
8144
- * <summary>Float</summary>
8145
- *
8146
- * The field accepts simple `Float` values or `null`.
8147
- *
8148
- * </details>
8149
- *
8150
- * <details>
8151
- * <summary>Date</summary>
8152
- *
8153
- * The field accepts `String` values in ISO 8601 date format (ie. `"2015-12-29"`) or `null`.
8154
- *
8155
- * </details>
7323
+ * Meta information regarding the record
8156
7324
  *
8157
- * <details>
8158
- * <summary>Date time</summary>
7325
+ * This interface was referenced by `Item`'s JSON-Schema
7326
+ * via the `definition` "meta".
7327
+ */
7328
+ export type ItemMeta = {
7329
+ /**
7330
+ * Date of creation
7331
+ */
7332
+ created_at: string;
7333
+ /**
7334
+ * Last update time
7335
+ */
7336
+ updated_at: string;
7337
+ /**
7338
+ * Date of last publication
7339
+ */
7340
+ published_at: null | string;
7341
+ /**
7342
+ * Date of first publication
7343
+ */
7344
+ first_published_at: null | string;
7345
+ /**
7346
+ * Date of future publication
7347
+ */
7348
+ publication_scheduled_at: null | string;
7349
+ /**
7350
+ * Date of future unpublishing
7351
+ */
7352
+ unpublishing_scheduled_at: null | string;
7353
+ /**
7354
+ * Status
7355
+ */
7356
+ status: null | ('draft' | 'updated' | 'published');
7357
+ /**
7358
+ * Whether the current record is valid or not
7359
+ */
7360
+ is_valid: boolean;
7361
+ /**
7362
+ * Whether the current version of the record is valid or not
7363
+ */
7364
+ is_current_version_valid: null | boolean;
7365
+ /**
7366
+ * Whether the published version of record is valid or not
7367
+ */
7368
+ is_published_version_valid: null | boolean;
7369
+ /**
7370
+ * The ID of the current record version
7371
+ */
7372
+ current_version: string;
7373
+ /**
7374
+ * Workflow stage in which the item is
7375
+ */
7376
+ stage: null | string;
7377
+ /**
7378
+ * When the records can be organized in a tree, indicates whether the record has children
7379
+ */
7380
+ has_children: null | boolean;
7381
+ };
7382
+ /**
7383
+ * JSON API links
8159
7384
  *
8160
- * The field accepts `String` values in ISO 8601 date-time format (ie. `"2020-04-17T16:34:31.981+01:00"`) or `null`.
8161
- *
8162
- * If you're on [legacy timezone management](/product-updates/improved-timezone-management), remember that when sending an ISO8601 datetime you should keep in mind that the system will ignore any provided timezone, and will use the project's timezone instead.
8163
- * </details>
8164
- *
8165
- * <details>
8166
- * <summary>JSON</summary>
8167
- *
8168
- * The field accepts `String` values that are valid JSON or `null`.
8169
- *
8170
- * **Note**: Must be a JSON-serialized string, not a JavaScript object!
8171
- *
8172
- * </details>
8173
- *
8174
- * ###### Object Fields
8175
- * These require structured objects:
8176
- *
8177
- * <details>
8178
- * <summary>Color</summary>
8179
- *
8180
- * The field accepts an object with the following properties, or `null`:
8181
- *
8182
- * | Property | Required | Type |
8183
- * | -------- | -------- | --------------------------- |
8184
- * | `red` | ✅ | `Integer` between 0 and 255 |
8185
- * | `green` | ✅ | `Integer` between 0 and 255 |
8186
- * | `blue` | ✅ | `Integer` between 0 and 255 |
8187
- * | `alpha` | ✅ | `Integer` between 0 and 255 |
8188
- *
8189
- * </details>
8190
- *
8191
- *
8192
- * <details>
8193
- * <summary>Location</summary>
8194
- *
8195
- * The field accepts an object with the following properties, or `null`:
8196
- *
8197
- * | Property | Required | Type |
8198
- * | ----------- | -------- | ----------------------------- |
8199
- * | `latitude` | ✅ | `Float` between -90.0 to 90 |
8200
- * | `longitude` | ✅ | `Float` between -180.0 to 180 |
8201
- *
8202
- * </details>
8203
- *
8204
- * <details>
8205
- * <summary>SEO</summary>
8206
- *
8207
- * The field accepts an object with the following properties, or `null`:
8208
- *
8209
- * | Property | Required | Type | Description |
8210
- * | -------------- | -------- | ------------------------------------ | ----------------------------------------------- |
8211
- * | `title` | | `String` | Title meta tag (max. 320 characters) |
8212
- * | `description` | | `String` | Description meta tag (max. 320 characters) |
8213
- * | `image` | | `Upload ID` | Asset to be used for social shares |
8214
- * | `twitter_card` | | `"summary"`, `"summary_large_image"` | Type of Twitter card to use |
8215
- * | `no_index` | | `Boolean` | Whether the noindex meta tag should be returned |
8216
- *
8217
- * </details>
8218
- *
8219
- * <details>
8220
- * <summary>External video</summary>
8221
- *
8222
- * The field accepts an object with the following properties, or `null`:
8223
- *
8224
- * | Property | Required | Type | Description | Example |
8225
- * | --------------- | -------- | ------------------------------------ | -------------------------------------------------- | ---------------------------------------------------- |
8226
- * | `provider` | ✅ | `"youtube"`, `"vimeo"`, `"facebook"` | External video provider | `"youtube"` |
8227
- * | `provider_uid` | ✅ | `String` | Unique identifier of the video within the provider | `"vUdGBEb1i9g"` |
8228
- * | `url` | ✅ | `URL` | URL of the video | `"https://www.youtube.com/watch?v=qJhobECFQYk"` |
8229
- * | `width` | ✅ | `Integer` | Video width | `459` |
8230
- * | `height` | ✅ | `Integer` | Video height | `344` |
8231
- * | `thumbnail_url` | ✅ | `URL` | URL for the video thumb | `"https://i.ytimg.com/vi/vUdGBEb1i9g/hqdefault.jpg"` |
8232
- * | `title` | ✅ | `String` | Title of the video | `"Next.js Conf Booth Welcoming!"` |
8233
- *
8234
- * </details>
8235
- *
8236
- * ###### Reference Fields
8237
- *
8238
- * These point to other resources (either assets or other records):
8239
- *
8240
- * <details>
8241
- * <summary>Single-asset</summary>
8242
- *
8243
- * The field accepts an object with the following properties, or `null`:
8244
- *
8245
- * | Property | Required | Type | Description | Example |
8246
- * | ------------- | -------- | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- |
8247
- * | `upload_id` | ✅ | `Upload ID` | ID of an asset | `"dhVR2HqgRVCTGFi0bWqLqA"` |
8248
- * | `title` | | `String` | Title for the asset, if you want to override the asset's default value (see Upload `default_field_metadata`) | `"From my trip to Italy"` |
8249
- * | `alt` | | `String` | Alternate text for the asset, if you want to override the asset's default value (see Upload `default_field_metadata`) | `"Florence skyline"` |
8250
- * | `focal_point` | | `{ x: Float, y: Float }`, `null` | Focal point for the asset, if you want to override the asset's default value (see Upload `default_field_metadata`). Values must be expressed as `Float` between 0 and 1. Focal point can only be specified for image assets. | `{ "x": 0.34, "y": 0.45 }` |
8251
- * | `custom_data` | | `Record<String, String>` | An object containing custom keys that you can use on your frontend projects | `{ "watermark_image": "true" }` |
8252
- *
8253
- * **API responses**: Always returns asset ID only (use separate asset API for details)
8254
- *
8255
- * </details>
8256
- *
8257
- * <details>
8258
- * <summary>Asset gallery</summary>
8259
- *
8260
- * This field accepts an `Array` of objects with the following properties, or `null`:
8261
- *
8262
- * | Property | Required | Type | Description | Example |
8263
- * | ------------- | -------- | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- |
8264
- * | `upload_id` | ✅ | `Upload ID` | ID of an asset | `"dhVR2HqgRVCTGFi0bWqLqA"` |
8265
- * | `title` | | `String` | Title for the asset, if you want to override the asset's default value (see Upload `default_field_metadata`) | `"Gallery Image Title"` |
8266
- * | `alt` | | `String` | Alternate text for the asset, if you want to override the asset's default value (see Upload `default_field_metadata`) | `"Gallery image description"` |
8267
- * | `focal_point` | | `{ x: Float, y: Float }`, `null` | Focal point for the asset, if you want to override the asset's default value (see Upload `default_field_metadata`). Values must be expressed as `Float` between 0 and 1. Focal point can only be specified for image assets. | `{ "x": 0.34, "y": 0.45 }` |
8268
- * | `custom_data` | | `Record<String, String>` | An object containing custom keys that you can use on your frontend projects | `{ "watermark_image": "true" }` |
8269
- *
8270
- * **API responses**: Always returns array of asset IDs only
8271
- *
8272
- * </details>
8273
- *
8274
- * <details>
8275
- * <summary>Single link</summary>
8276
- *
8277
- * This field accepts a `String` representing the ID of the linked record, or `null`. See [Link Fields Guide](/docs/content-modelling/links) for relationship modeling concepts.
8278
- *
8279
- * **API responses**: Always returns record ID only
8280
- *
8281
- * </details>
8282
- *
8283
- * <details>
8284
- * <summary>Multiple links</summary>
8285
- *
8286
- * This field accepts an `Array<String>` representing the IDs of the linked records, or `null`. See [Link Fields Guide](/docs/content-modelling/links) for relationship modeling concepts.
8287
- *
8288
- * **API responses**: Always returns array of record IDs only
8289
- *
8290
- * </details>
8291
- *
8292
- * ###### Block Fields
8293
- *
8294
- * These are special fields that contain **blocks within records**:
8295
- *
8296
- * | Field Type | What it contains |
8297
- * | ------------------- | ------------------------------------------------------------------------------------------------------------------------- |
8298
- * | **Modular content** | An array of blocks, perfect for building dynamic page sections |
8299
- * | **Single block** | A single block instance or `null` |
8300
- * | **Structured text** | A rich text document that can have blocks embedded within the flow of content ([DAST format](/docs/structured-text/dast)) |
8301
- *
8302
- * Blocks are **records within records** - they're separate items that live inside fields of other records.
8303
- *
8304
- * > [!PROTIP] 📚 Content Modeling Context
8305
- * > To understand when and how to design blocks vs models, see [Blocks Guide](/docs/content-modelling/blocks). For field-specific concepts, see [Modular Content](/docs/content-modelling/modular-content) and [Structured Text](/docs/content-modelling/structured-text).
8306
- *
8307
- * Blocks inside those fields are unique because they can be represented in two different ways depending on the context: as a lightweight reference (an ID) or as a full content object. Understanding this duality is key to working with them effectively:
8308
- *
8309
- * * **Block ID (Lightweight Reference)**: A simple `String` that uniquely identifies the block (ie. `"dhVR2HqgRVCTGFi_0bWqLqA"`). This is useful when you only need to know *which* block is there, not what's inside it.
8310
- *
8311
- * * **Block Object (Full Content)**: The complete record object for the block, containing its own `id`, `type`, `attributes`, and `relationships`. This is used when you need to read or modify the block's actual content.
8312
- *
8313
- * ```json
8314
- * {
8315
- * "id": "dhVR2HqgRVCTGFi_0bWqLqA",
8316
- * "type": "item",
8317
- * "attributes": {
8318
- * "title": "Block Title",
8319
- * "content": "Block content..."
8320
- * },
8321
- * "relationships": {
8322
- * "item_type": {
8323
- * "data": { "id": "BxZ9Y2aKQVeTnM4hP8wLpD", "type": "item_type" }
8324
- * }
8325
- * }
8326
- * }
8327
- * ```
8328
- *
8329
- * <details>
8330
- * <summary>Modular Content</summary>
8331
- *
8332
- * A Modular Content field holds an array of blocks.
8333
- *
8334
- * **As an array of IDs:**
8335
- * ```json
8336
- * {
8337
- * "content_blocks": [
8338
- * "dhVR2HqgRVCTGFi_0bWqLqA",
8339
- * "kL9mN3pQrStUvWxYzAbCdE"
8340
- * ]
8341
- * }
8342
- * ```
8343
- *
8344
- * **As an array of full objects:**
8345
- *
8346
- * ```json
8347
- * {
8348
- * "content_blocks": [
8349
- * {
8350
- * "id": "dhVR2HqgRVCTGFi_0bWqLqA",
8351
- * "type": "item",
8352
- * "attributes": { "title": "Hero Section", "content": "Welcome to our site" },
8353
- * "relationships": { "item_type": { "data": { "id": "...", "type": "item_type" } } }
8354
- * },
8355
- * {
8356
- * "id": "kL9mN3pQrStUvWxYzAbCdE",
8357
- * "type": "item",
8358
- * "attributes": { "title": "Image Gallery", "images": [...] },
8359
- * "relationships": { "item_type": { "data": { "id": "...", "type": "item_type" } } }
8360
- * }
8361
- * ]
8362
- * }
8363
- * ```
8364
- * </details>
8365
- *
8366
- * <details>
8367
- * <summary>Single Block</summary>
8368
- *
8369
- * A Single Block field holds exactly one block, or `null`.
8370
- *
8371
- * **As an ID:**
8372
- * ```json
8373
- * {
8374
- * "featured_block": "dhVR2HqgRVCTGFi_0bWqLqA"
8375
- * }
8376
- * ```
8377
- *
8378
- * **As an full object:**
8379
- *
8380
- * ```json
8381
- * {
8382
- * "featured_block": {
8383
- * "id": "dhVR2HqgRVCTGFi_0bWqLqA",
8384
- * "type": "item",
8385
- * "attributes": { "title": "Featured Content", "summary": "A summary..." },
8386
- * "relationships": { "item_type": { "data": { "id": "...", "type": "item_type" } } }
8387
- * }
8388
- * }
8389
- * ```
8390
- * </details>
8391
- *
8392
- * <details>
8393
- * <summary>Structured Text</summary>
8394
- *
8395
- * A Structured Text field can contain blocks within its document structure ([DAST format](/docs/structured-text/dast)). The item property of a `block` or `inlineBlock` node will hold either the ID or the full object.
8396
- *
8397
- * **With block IDs:**
8398
- *
8399
- * ```json
8400
- * {
8401
- * "rich_text_content": {
8402
- * "schema": "dast",
8403
- * "document": {
8404
- * "type": "root",
8405
- * "children": [
8406
- * {
8407
- * "type": "paragraph",
8408
- * "children": [{ "type": "span", "value": "Text before block." }]
8409
- * },
8410
- * {
8411
- * "type": "block",
8412
- * "item": "dhVR2HqgRVCTGFi_0bWqLqA"
8413
- * }
8414
- * ]
8415
- * }
8416
- * }
8417
- * }
8418
- * ```
8419
- *
8420
- * **With full objects:**
8421
- *
8422
- * ```json
8423
- * {
8424
- * "rich_text_content": {
8425
- * "schema": "dast",
8426
- * "document": {
8427
- * "type": "root",
8428
- * "children": [
8429
- * {
8430
- * "type": "paragraph",
8431
- * "children": [{ "type": "span", "value": "Text before block." }]
8432
- * },
8433
- * {
8434
- * "type": "block",
8435
- * "item": {
8436
- * "id": "dhVR2HqgRVCTGFi_0bWqLqA",
8437
- * "type": "item",
8438
- * "attributes": { "title": "Embedded Block", "content": "..." },
8439
- * "relationships": { "item_type": { "data": { "id": "...", "type": "item_type" } } }
8440
- * }
8441
- * }
8442
- * ]
8443
- * }
8444
- * }
8445
- * }
8446
- * ```
8447
- * </details>
8448
- *
8449
- * ---
8450
- *
8451
- * ## API response modes: Regular vs. Nested
8452
- *
8453
- * When fetching record data, the API gives you control over how block fields are represented in the response. These two modes, **Regular** and **Nested**, are available on the following endpoints:
8454
- *
8455
- * * [Retrieve a single record (`GET /items/:id`)](/docs/content-management-api/resources/item/self)
8456
- * * [Retrieve multiple records (`GET /items`)](/docs/content-management-api/resources/item/instances)
8457
- * * [Retrieve records referenced by a record (`GET /items/:id/references`)](/docs/content-management-api/resources/item/references)
8458
- * * [Retrieve records linked to an asset (`GET /upload/:id/references`)](/docs/content-management-api/resources/upload/references)
8459
- *
8460
- * ###### Regular mode (default)
8461
- *
8462
- * By default, the API returns block fields as IDs only. This is efficient and fast, making it ideal for listings or when you don't need the blocks' content immediately.
8463
- *
8464
- * ```json
8465
- * GET /items/A4gkL_8pTZmcyJ-IlIEd2w
8466
- *
8467
- * {
8468
- * "id": "A4gkL_8pTZmcyJ-IlIEd2w",
8469
- * "type": "item",
8470
- * "attributes": {
8471
- * "title": "My Blog Post",
8472
- * "content_blocks": ["dhVR2HqgRVCTGFi_0bWqLqA", "kL9mN3pQrStUvWxYzAbCdE"],
8473
- * "featured_block": "nZ8xY2vWqTuJkL3mNcBeFg"
8474
- * }
8475
- * }
8476
- * ```
8477
- *
8478
- * ###### Nested mode (`?nested=true`)
8479
- *
8480
- * The same endpoint, when passing the `?nested=true` option, returns **block fields as full objects**. This is essential when you need to display or edit the content within the blocks.
8481
- *
8482
- * ```json
8483
- * GET /items/A4gkL_8pTZmcyJ-IlIEd2w?nested=true
8484
- *
8485
- * {
8486
- * "id": "A4gkL_8pTZmcyJ-IlIEd2w",
8487
- * "type": "item",
8488
- * "attributes": {
8489
- * "title": "My Blog Post",
8490
- * "content_blocks": [
8491
- * {
8492
- * "id": "dhVR2HqgRVCTGFi_0bWqLqA",
8493
- * "type": "item",
8494
- * "attributes": { "title": "Hero Section", "content": "Welcome to our site" },
8495
- * "relationships": { ... }
8496
- * },
8497
- * {
8498
- * "id": "kL9mN3pQrStUvWxYzAbCdE",
8499
- * "type": "item",
8500
- * "attributes": { "title": "Image Gallery", "images": [...] },
8501
- * "relationships": { ... }
8502
- * }
8503
- * ],
8504
- * "featured_block": {
8505
- * "id": "nZ8xY2vWqTuJkL3mNcBeFg",
8506
- * "type": "item",
8507
- * "attributes": { ... },
8508
- * "relationships": { ... }
8509
- * }
8510
- * }
8511
- * }
8512
- * ```
8513
- *
8514
- * > [!WARNING] Block Fields vs. Other Reference Fields
8515
- * > Block fields are the **only** field type that change representation between modes! Asset and link fields always return IDs. To get full details for assets or linked records, you need to make separate API calls using their IDs.
8516
- *
8517
- * ###### When to use each mode?
8518
- *
8519
- * | Use "Regular Mode" when... | Use "Nested Mode" when... |
8520
- * | -------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
8521
- * | Listing many records or building navigation. | Displaying or editing block content, as it provides the actual content needed. |
8522
- * | You only need to know which blocks exist. | You need to read the actual block content for display or updates. |
8523
- * | Building navigation | Preparing to update blocks |
8524
- * | Performance is critical; it's faster because it returns smaller responses (block IDs instead of full content). | You are building content editing interfaces where usability is more important than raw speed. |
8525
- *
8526
- *
8527
- * ---
8528
- *
8529
- * ## Creating and updating blocks
8530
- *
8531
- * Working with blocks follows one fundamental constraint:
8532
- *
8533
- * **You cannot create, edit, or delete blocks directly. You must always update the parent record that contains them.**
8534
- *
8535
- * This ensures data integrity. To create/modify blocks, you send a payload to the parent record's endpoint, using a mix of Block IDs and Block Objects to describe the desired changes.
8536
- *
8537
- * ###### Key rules for block operations
8538
- *
8539
- * 1. **To create a new block**: Provide the **full object**, including `type`, `attributes`, and the `relationships.item_type` which specifies the Block Model being used.
8540
- * 2. **To update an existing block**: Provide the **full object**, including its `id` and the changed `attributes`. You only need to include the specific attributes that you want to change - unchanged attributes will be preserved. You don't need to specify `relationships.item_type`.
8541
- * 3. **To keep an existing block unchanged**: Simply provide its **Block ID** string. This is the most efficient way to handle unchanged blocks.
8542
- * 4. **To delete a block**: Omit it from the payload. For a Modular Content array, remove its ID. For a Single Block field, set the value to `null`.
8543
- * 5. **To reorder blocks** (in Modular Content): Send an array of Block IDs in the new desired order.
8544
- *
8545
- *
8546
- * The following examples show how to apply these rules.
8547
- *
8548
- * <details>
8549
- * <summary>Working with Modular Content Fields</summary>
8550
- *
8551
- * **Current state** (from a regular API response):
8552
- * ```json
8553
- * {
8554
- * "content_blocks": ["dhVR2HqgRVCTGFi_0bWqLqA", "kL9mN3pQrStUvWxYzAbCdE", "fG8hI1jKlMnOpQrStUvWxY"]
8555
- * }
8556
- * ```
8557
- *
8558
- * **To update the second block and reorder the others:**
8559
- * ```json
8560
- * {
8561
- * "content_blocks": [
8562
- * "fG8hI1jKlMnOpQrStUvWxY", // Reordered: kept as ID
8563
- * {
8564
- * "id": "kL9mN3pQrStUvWxYzAbCdE", // Updated: sent as object
8565
- * "type": "item",
8566
- * "attributes": { "title": "Updated Title" }
8567
- * },
8568
- * "dhVR2HqgRVCTGFi_0bWqLqA" // Reordered: kept as ID
8569
- * ]
8570
- * }
8571
- * ```
8572
- *
8573
- * **To add a new block at the end and remove the first block:**
8574
- * ```json
8575
- * {
8576
- * "content_blocks": [
8577
- * "kL9mN3pQrStUvWxYzAbCdE", // Kept as ID
8578
- * "fG8hI1jKlMnOpQrStUvWxY", // Kept as ID
8579
- * {
8580
- * "type": "item", // New block: sent as object with relationships
8581
- * "attributes": { "title": "A Brand New Block" },
8582
- * "relationships": {
8583
- * "item_type": {
8584
- * "data": { "id": "BxZ9Y2aKQVeTnM4hP8wLpD", "type": "item_type" }
8585
- * }
8586
- * }
8587
- * }
8588
- * ]
8589
- * }
8590
- * ```
8591
- *
8592
- * </details>
8593
- *
8594
- * <details>
8595
- * <summary>Working with Single Block Fields</summary>
8596
- *
8597
- * **Current state** (from a regular API response):
8598
- * ```json
8599
- * {
8600
- * "hero_block": "dhVR2HqgRVCTGFi_0bWqLqA"
8601
- * }
8602
- * ```
8603
- *
8604
- * **To update the block's content:**
8605
- * ```json
8606
- * {
8607
- * "hero_block": {
8608
- * "id": "dhVR2HqgRVCTGFi_0bWqLqA",
8609
- * "type": "item",
8610
- * "attributes": { "title": "Updated Hero Title" }
8611
- * }
8612
- * }
8613
- * ```
8614
- *
8615
- * **To replace it with a new block:**
8616
- * ```json
8617
- * {
8618
- * "hero_block": {
8619
- * "type": "item",
8620
- * "attributes": { "title": "New Hero Block" },
8621
- * "relationships": {
8622
- * "item_type": {
8623
- * "data": { "id": "BxZ9Y2aKQVeTnM4hP8wLpD", "type": "item_type" }
8624
- * }
8625
- * }
8626
- * }
8627
- * }
8628
- * ```
8629
- *
8630
- * **To remove (delete) the block:**
8631
- * ```json
8632
- * {
8633
- * "hero_block": null
8634
- * }
8635
- * ```
8636
- * </details>
8637
- *
8638
- * <details>
8639
- * <summary>Working with Structured Text Fields</summary>
8640
- *
8641
- * Updating blocks within Structured Text follows the same pattern: you replace the `item`'s ID with a full object for the block you want to change.
8642
- *
8643
- * **Current state** (from a regular API response):
8644
- * ```json
8645
- * {
8646
- * "rich_content": {
8647
- * "schema": "dast",
8648
- * "document": {
8649
- * "type": "root",
8650
- * "children": [
8651
- * { "type": "block", "item": "dhVR2HqgRVCTGFi_0bWqLqA" },
8652
- * { "type": "paragraph", "children": [{ "type": "span", "value": "Some text." }] }
8653
- * ]
8654
- * }
8655
- * }
8656
- * }
8657
- * ```
8658
- *
8659
- * **To update the block's content:**
8660
- * ```json
8661
- * {
8662
- * "rich_content": {
8663
- * "schema": "dast",
8664
- * "document": {
8665
- * "type": "root",
8666
- * "children": [
8667
- * {
8668
- * "type": "block",
8669
- * "item": {
8670
- * "id": "dhVR2HqgRVCTGFi_0bWqLqA", // The block to update
8671
- * "type": "item",
8672
- * "attributes": { "title": "Updated DAST Block Title" }
8673
- * }
8674
- * },
8675
- * { "type": "paragraph", "children": [{ "type": "span", "value": "Some text." }] }
8676
- * ]
8677
- * }
8678
- * }
8679
- * }
8680
- * ```
8681
- * </details>
8682
- *
8683
- * ###### Deeply-nested blocks
8684
- *
8685
- * Blocks can contain other blocks, creating hierarchies multiple levels deep. **The same principles apply recursively.** When you fetch a record with `?nested=true`, the API will expand nested blocks at all levels.
8686
- *
8687
- * When updating, you are always sending a payload to the top-level parent record, but you can specify changes to deeply nested blocks using the same ID vs. object rules.
8688
- *
8689
- * <details>
8690
- * <summary>Example: Updating a nested block</summary>
8691
- *
8692
- * Imagine a "Wrapper" block that contains a Modular Content field with "Child" blocks inside it. To update "Child Block 1" while leaving "Child Block 2" untouched:
8693
- *
8694
- * ```json
8695
- * // This payload is sent to the top-level record containing the "Parent Block"
8696
- * {
8697
- * "wrapper_block": {
8698
- * "id": "dhVR2HqgRVCTGFi_0bWqLqA", // ID of the parent block being updated
8699
- * "type": "item",
8700
- * "attributes": {
8701
- * "nested_content": [
8702
- * {
8703
- * "id": "kL9mN3pQrStUvWxYzAbCdE", // ID of the nested block being updated
8704
- * "type": "item",
8705
- * "attributes": { "title": "Updated Child Block 1" }
8706
- * },
8707
- * "fG8hI1jKlMnOpQrStUvWxY" // Unchanged nested block, sent as ID
8708
- * ],
8709
- * // You can skip any attribute that does not need to change
8710
- * }
8711
- * }
8712
- * }
8713
- * ```
8714
- * </details>
8715
- *
8716
- * ---
8717
- *
8718
- * ## Localization
8719
- *
8720
- * Localization allows you to store different versions of your content for different languages or regions. When you mark a field as "localizable" in your model, its structure in the API changes to accommodate multiple values.
8721
- *
8722
- * The fundamental change is that the field's value is no longer a single piece of data but an **object keyed by locale codes**.
8723
- *
8724
- * For example, a simple non-localized `title` field looks like this:
8725
- * ```json
8726
- * {
8727
- * "title": "Hello World"
8728
- * }
8729
- * ```
8730
- *
8731
- * When localized, it becomes an object containing a value for each configured locale:
8732
- * ```json
8733
- * {
8734
- * "title": {
8735
- * "en": "Hello World",
8736
- * "it": "Ciao Mondo",
8737
- * "fr": "Bonjour le Monde"
8738
- * }
8739
- * }
8740
- * ```
8741
- * This principle applies to **every type of field**, from simple strings to **Modular Content**, **Single Block**, and **Structured Text** fields. For instance, a localized Modular Content field will contain a separate array of blocks for each language. This powerful feature allows you to have completely different block structures for each locale.
8742
- *
8743
- * <details>
8744
- * <summary>Example: Localized Modular Content field</summary>
8745
- *
8746
- * In a `regular` API response, you would see different arrays of block IDs for each locale.
8747
- *
8748
- * ```json
8749
- * {
8750
- * "content_blocks": {
8751
- * "en": ["dhVR2HqgRVCTGFi0bWqLqA", "kL9mN3pQrStUvWxYzAbCdE"],
8752
- * "it": ["fG8hI1jKlMnOpQrStUvWxY", "dhVR2HqgRVCTGFi0bWqLqA"]
8753
- * }
8754
- * }
8755
- * ```
8756
- * </details>
8757
- *
8758
- * <details>
8759
- * <summary>Example: Localized Single Block field</summary>
8760
- * A different block can be assigned to each locale.
8761
- *
8762
- * ```json
8763
- * {
8764
- * "hero_block": {
8765
- * "en": "dhVR2HqgRVCTGFi0bWqLqA",
8766
- * "it": "kL9mN3pQrStUvWxYzAbCdE"
8767
- * }
8768
- * }
8769
- * ```
8770
- * </details>
8771
- *
8772
- * <details>
8773
- * <summary>Example: Localized Structured Text field</summary>
8774
- *
8775
- * The entire DAST document is localized, allowing for different text and different embedded blocks per locale.
8776
- *
8777
- * ```json
8778
- * {
8779
- * "rich_content": {
8780
- * "en": {
8781
- * "schema": "dast",
8782
- * "document": {
8783
- * "type": "root",
8784
- * "children": [{ "type": "block", "item": "dhVR2HqgRVCTGFi0bWqLqA" }]
8785
- * }
8786
- * },
8787
- * "it": {
8788
- * "schema": "dast",
8789
- * "document": {
8790
- * "type": "root",
8791
- * "children": [{ "type": "block", "item": "kL9mN3pQrStUvWxYzAbCdE" }]
8792
- * }
8793
- * }
8794
- * }
8795
- * }
8796
- * ```
8797
- * </details>
8798
- *
8799
- * When reading or writing localized content, there are a few key rules to follow to ensure data integrity.
8800
- *
8801
- * ###### Locale consistency
8802
- * Within a single record, all localized fields must have a consistent set of locales. You cannot have a `title` with English and Italian, and a `description` with English and French in the same record.
8803
- *
8804
- * ```json
8805
- * // ❌ This will FAIL due to inconsistent locales ("it" vs "fr")
8806
- * {
8807
- * "title": { "en": "Title", "it": "Titolo" },
8808
- * "description": { "en": "Description", "fr": "Description" }
8809
- * }
8810
- *
8811
- * // ✅ This is VALID because locales are consistent across all fields
8812
- * {
8813
- * "title": { "en": "Title", "it": "Titolo" },
8814
- * "description": { "en": "Description", "it": "Descrizione" }
8815
- * }
8816
- * ```
8817
- *
8818
- * ###### Required locales
8819
- *
8820
- * Your model can be configured to require that all project's locales are always present ([`attributes.all_locales_required`](/docs/content-management-api/resources/item-type#object-payload)). If that's the case, when creating or updating a record, you must provide a value for all required locales.
8821
- *
8822
- * ```json
8823
- * // ❌ This will FAIL if all locales are required for the model
8824
- * {
8825
- * "title": { "en": "Title" }
8826
- * }
8827
- * ```
8828
- *
8829
- *
8830
- * This interface was referenced by `ScheduledPublication`'s JSON-Schema
8831
- * via the `destroy.targetSchema` link.
8832
- *
8833
- * This interface was referenced by `ScheduledUnpublishing`'s JSON-Schema
8834
- * via the `destroy.targetSchema` link.
8835
- *
8836
- * This interface was referenced by `DatoApi`'s JSON-Schema
8837
- * via the `definition` "item".
8838
- */
8839
- export type RawItem = {
8840
- id: ItemIdentity;
8841
- type: ItemType1;
8842
- item_type: ItemTypeData;
8843
- creator?:
8844
- | AccountData
8845
- | AccessTokenData
8846
- | UserData
8847
- | SsoUserData
8848
- | OrganizationData;
8849
- meta: ItemMeta;
8850
- };
8851
- export type ItemCreateTargetSchema<D extends ItemDefinition = ItemDefinition> =
8852
- Item<D>;
8853
- export type ItemDuplicateJobSchema<D extends ItemDefinition = ItemDefinition> =
8854
- Item<D>;
8855
- export type ItemUpdateTargetSchema<D extends ItemDefinition = ItemDefinition> =
8856
- Item<D>;
8857
- export type ItemSelfTargetSchema<D extends ItemDefinition = ItemDefinition> =
8858
- Item<D>;
8859
- export type ItemDestroyJobSchema<D extends ItemDefinition = ItemDefinition> =
8860
- Item<D>;
8861
- export type ItemPublishTargetSchema<D extends ItemDefinition = ItemDefinition> =
8862
- Item<D>;
8863
- export type ItemUnpublishTargetSchema<
8864
- D extends ItemDefinition = ItemDefinition,
8865
- > = Item<D>;
8866
- export type ScheduledPublicationDestroyTargetSchema<
8867
- D extends ItemDefinition = ItemDefinition,
8868
- > = Item<D>;
8869
- export type ScheduledUnpublishingDestroyTargetSchema<
8870
- D extends ItemDefinition = ItemDefinition,
8871
- > = Item<D>;
8872
- /**
8873
- * Meta information regarding the record
8874
- *
8875
- * This interface was referenced by `Item<D>`'s JSON-Schema
8876
- * via the `definition` "meta".
8877
- */
8878
- export type ItemMeta = {
8879
- /**
8880
- * Date of creation
8881
- */
8882
- created_at: string;
8883
- /**
8884
- * Last update time
8885
- */
8886
- updated_at: string;
8887
- /**
8888
- * Date of last publication
8889
- */
8890
- published_at: null | string;
8891
- /**
8892
- * Date of first publication
8893
- */
8894
- first_published_at: null | string;
8895
- /**
8896
- * Date of future publication
8897
- */
8898
- publication_scheduled_at: null | string;
8899
- /**
8900
- * Date of future unpublishing
8901
- */
8902
- unpublishing_scheduled_at: null | string;
8903
- /**
8904
- * Status
8905
- */
8906
- status: null | ('draft' | 'updated' | 'published');
8907
- /**
8908
- * Whether the current record is valid or not
8909
- */
8910
- is_valid: boolean;
8911
- /**
8912
- * Whether the current version of the record is valid or not
8913
- */
8914
- is_current_version_valid: null | boolean;
8915
- /**
8916
- * Whether the published version of record is valid or not
8917
- */
8918
- is_published_version_valid: null | boolean;
8919
- /**
8920
- * The ID of the current record version
8921
- */
8922
- current_version: string;
8923
- /**
8924
- * Workflow stage in which the item is
8925
- */
8926
- stage: null | string;
8927
- /**
8928
- * When the records can be organized in a tree, indicates whether the record has children
8929
- */
8930
- has_children: null | boolean;
8931
- };
8932
-
8933
- /**
8934
- * The JSON data associated to the record
8935
- *
8936
- * This interface was referenced by `Item<D>`'s JSON-Schema
8937
- * via the `definition` "attributes".
8938
- */
8939
- export type ItemAttributes = {
8940
- [k: string]: unknown;
8941
- };
8942
-
8943
- /**
8944
- * JSON API links
8945
- *
8946
- * This interface was referenced by `Item<D>`'s JSON-Schema
7385
+ * This interface was referenced by `Item`'s JSON-Schema
8947
7386
  * via the `definition` "relationships".
8948
7387
  */
8949
- export type ItemRelationships = {
8950
- item_type: ItemTypeData;
7388
+ export type ItemRelationships<
7389
+ D extends ItemTypeDefinition = ItemTypeDefinition,
7390
+ > = {
7391
+ item_type: ItemTypeData<D>;
8951
7392
  creator?:
8952
7393
  | AccountData
8953
7394
  | AccessTokenData
@@ -8955,46 +7396,51 @@ export type ItemRelationships = {
8955
7396
  | SsoUserData
8956
7397
  | OrganizationData;
8957
7398
  };
8958
-
8959
7399
  /**
8960
- * This interface was referenced by `Item<D>`'s JSON-Schema
7400
+ * This interface was referenced by `Item`'s JSON-Schema
8961
7401
  * via the `validate_existing.schema` link.
8962
7402
  */
8963
- export type RawItemValidateExistingSchema = {
7403
+ export type ItemValidateExistingSchema<
7404
+ D extends ItemTypeDefinition = ItemTypeDefinition,
7405
+ > = {
8964
7406
  id?: ItemIdentity;
8965
7407
  type?: ItemType1;
8966
- item_type: ItemTypeData;
7408
+ item_type: ItemTypeData<D>;
8967
7409
  creator?:
8968
7410
  | AccountData
8969
7411
  | AccessTokenData
8970
7412
  | UserData
8971
7413
  | SsoUserData
8972
7414
  | OrganizationData;
8973
- };
8974
-
7415
+ __itemTypeId?: D['itemTypeId'];
7416
+ } & ToItemAttributesInRequest<D>;
8975
7417
  /**
8976
- * This interface was referenced by `Item<D>`'s JSON-Schema
7418
+ * This interface was referenced by `Item`'s JSON-Schema
8977
7419
  * via the `validate_new.schema` link.
8978
7420
  */
8979
- export type RawItemValidateNewSchema = {
7421
+ export type ItemValidateNewSchema<
7422
+ D extends ItemTypeDefinition = ItemTypeDefinition,
7423
+ > = {
8980
7424
  type?: ItemType1;
8981
- item_type: ItemTypeData;
7425
+ item_type: ItemTypeData<D>;
8982
7426
  creator?:
8983
7427
  | AccountData
8984
7428
  | AccessTokenData
8985
7429
  | UserData
8986
7430
  | SsoUserData
8987
7431
  | OrganizationData;
8988
- };
8989
-
7432
+ __itemTypeId?: D['itemTypeId'];
7433
+ } & ToItemAttributesInRequest<D>;
8990
7434
  /**
8991
- * This interface was referenced by `Item<D>`'s JSON-Schema
7435
+ * This interface was referenced by `Item`'s JSON-Schema
8992
7436
  * via the `create.schema` link.
8993
7437
  */
8994
- export type RawItemCreateSchema = {
7438
+ export type ItemCreateSchema<
7439
+ D extends ItemTypeDefinition = ItemTypeDefinition,
7440
+ > = {
8995
7441
  id?: ItemIdentity;
8996
7442
  type?: ItemType1;
8997
- item_type: ItemTypeData;
7443
+ item_type: ItemTypeData<D>;
8998
7444
  creator?:
8999
7445
  | AccountData
9000
7446
  | AccessTokenData
@@ -9046,16 +7492,18 @@ export type RawItemCreateSchema = {
9046
7492
  */
9047
7493
  current_version?: string;
9048
7494
  };
9049
- };
9050
-
7495
+ __itemTypeId?: D['itemTypeId'];
7496
+ } & ToItemAttributesInRequest<D>;
9051
7497
  /**
9052
- * This interface was referenced by `Item<D>`'s JSON-Schema
7498
+ * This interface was referenced by `Item`'s JSON-Schema
9053
7499
  * via the `update.schema` link.
9054
7500
  */
9055
- export type RawItemUpdateSchema = {
7501
+ export type ItemUpdateSchema<
7502
+ D extends ItemTypeDefinition = ItemTypeDefinition,
7503
+ > = {
9056
7504
  id?: ItemIdentity;
9057
7505
  type?: ItemType1;
9058
- item_type?: ItemTypeData;
7506
+ item_type?: ItemTypeData<D>;
9059
7507
  creator?:
9060
7508
  | AccountData
9061
7509
  | AccessTokenData
@@ -9119,12 +7567,12 @@ export type RawItemUpdateSchema = {
9119
7567
  */
9120
7568
  has_children?: null | boolean;
9121
7569
  };
9122
- };
9123
-
7570
+ __itemTypeId?: D['itemTypeId'];
7571
+ } & ToItemAttributesInRequest<D>;
9124
7572
  /**
9125
7573
  * Information about the record
9126
7574
  *
9127
- * This interface was referenced by `Item<D>`'s JSON-Schema
7575
+ * This interface was referenced by `Item`'s JSON-Schema
9128
7576
  * via the `current_vs_published_state.targetSchema` link.
9129
7577
  *
9130
7578
  * This interface was referenced by `DatoApi`'s JSON-Schema
@@ -9157,7 +7605,6 @@ export type ScheduledPublicationData = {
9157
7605
  type: ScheduledPublicationType;
9158
7606
  id: ScheduledPublicationIdentity;
9159
7607
  };
9160
-
9161
7608
  /**
9162
7609
  * JSON API data
9163
7610
  *
@@ -9168,7 +7615,6 @@ export type ScheduledUnpublishingData = {
9168
7615
  type: ScheduledUnpublishingType;
9169
7616
  id: ScheduledUnpublishingIdentity;
9170
7617
  };
9171
-
9172
7618
  /**
9173
7619
  * JSON API data
9174
7620
  *
@@ -9179,7 +7625,6 @@ export type ItemVersionData = {
9179
7625
  type: ItemVersionType;
9180
7626
  id: ItemVersionIdentity;
9181
7627
  };
9182
-
9183
7628
  /**
9184
7629
  * JSON API data
9185
7630
  *
@@ -9190,7 +7635,6 @@ export type ItemCurrentVsPublishedStateData = {
9190
7635
  type: ItemCurrentVsPublishedStateType;
9191
7636
  id: ItemCurrentVsPublishedStateIdentity;
9192
7637
  };
9193
-
9194
7638
  /**
9195
7639
  * The JSON data associated to the record
9196
7640
  *
@@ -9207,7 +7651,6 @@ export type ItemCurrentVsPublishedStateAttributes = {
9207
7651
  current_version_invalid_locales: string[];
9208
7652
  current_version_non_localized_fields_invalid: boolean;
9209
7653
  };
9210
-
9211
7654
  /**
9212
7655
  * JSON API links
9213
7656
  *
@@ -9219,9 +7662,8 @@ export type ItemCurrentVsPublishedStateRelationships = {
9219
7662
  scheduled_unpublishing: ScheduledUnpublishingData | null;
9220
7663
  published_version: ItemVersionData | null;
9221
7664
  };
9222
-
9223
7665
  /**
9224
- * This interface was referenced by `Item<D>`'s JSON-Schema
7666
+ * This interface was referenced by `Item`'s JSON-Schema
9225
7667
  * via the `bulk_publish.schema` link.
9226
7668
  */
9227
7669
  export type ItemBulkPublishSchema = {
@@ -9229,9 +7671,8 @@ export type ItemBulkPublishSchema = {
9229
7671
  items: ItemData[];
9230
7672
  minItems?: unknown;
9231
7673
  };
9232
-
9233
7674
  /**
9234
- * This interface was referenced by `Item<D>`'s JSON-Schema
7675
+ * This interface was referenced by `Item`'s JSON-Schema
9235
7676
  * via the `bulk_unpublish.schema` link.
9236
7677
  */
9237
7678
  export type ItemBulkUnpublishSchema = {
@@ -9239,9 +7680,8 @@ export type ItemBulkUnpublishSchema = {
9239
7680
  items: ItemData[];
9240
7681
  minItems?: unknown;
9241
7682
  };
9242
-
9243
7683
  /**
9244
- * This interface was referenced by `Item<D>`'s JSON-Schema
7684
+ * This interface was referenced by `Item`'s JSON-Schema
9245
7685
  * via the `bulk_destroy.schema` link.
9246
7686
  */
9247
7687
  export type ItemBulkDestroySchema = {
@@ -9249,9 +7689,8 @@ export type ItemBulkDestroySchema = {
9249
7689
  items: ItemData[];
9250
7690
  minItems?: unknown;
9251
7691
  };
9252
-
9253
7692
  /**
9254
- * This interface was referenced by `Item<D>`'s JSON-Schema
7693
+ * This interface was referenced by `Item`'s JSON-Schema
9255
7694
  * via the `bulk_move_to_stage.schema` link.
9256
7695
  */
9257
7696
  export type ItemBulkMoveToStageSchema = {
@@ -9263,7 +7702,6 @@ export type ItemBulkMoveToStageSchema = {
9263
7702
  items: ItemData[];
9264
7703
  minItems?: unknown;
9265
7704
  };
9266
-
9267
7705
  /**
9268
7706
  * Every change to a record is stored as a separate record version in DatoCMS.
9269
7707
  *
@@ -9309,7 +7747,6 @@ export type ItemVersionMeta = {
9309
7747
  */
9310
7748
  is_current: boolean;
9311
7749
  };
9312
-
9313
7750
  /**
9314
7751
  * The JSON data associated to the record version
9315
7752
  *
@@ -9319,7 +7756,6 @@ export type ItemVersionMeta = {
9319
7756
  export type ItemVersionAttributes = {
9320
7757
  [k: string]: unknown;
9321
7758
  };
9322
-
9323
7759
  /**
9324
7760
  * JSON API links
9325
7761
  *
@@ -9336,7 +7772,6 @@ export type ItemVersionRelationships = {
9336
7772
  | SsoUserData
9337
7773
  | OrganizationData;
9338
7774
  };
9339
-
9340
7775
  /**
9341
7776
  * Each media object you upload to the Media Area of your DatoCMS project is represented as an `upload` entity.
9342
7777
  *
@@ -9529,7 +7964,6 @@ export type UploadData = {
9529
7964
  type: UploadType;
9530
7965
  id: UploadIdentity;
9531
7966
  };
9532
-
9533
7967
  /**
9534
7968
  * JSON API attributes
9535
7969
  *
@@ -9699,7 +8133,6 @@ export type UploadAttributes = {
9699
8133
  alpha: number;
9700
8134
  }[];
9701
8135
  };
9702
-
9703
8136
  /**
9704
8137
  * JSON API links
9705
8138
  *
@@ -9715,7 +8148,6 @@ export type UploadRelationships = {
9715
8148
  | SsoUserData
9716
8149
  | OrganizationData;
9717
8150
  };
9718
-
9719
8151
  /**
9720
8152
  * This interface was referenced by `Upload`'s JSON-Schema
9721
8153
  * via the `create.schema` link.
@@ -9783,7 +8215,6 @@ export type UploadCreateSchema = {
9783
8215
  tags?: string[];
9784
8216
  upload_collection?: UploadCollectionData | null;
9785
8217
  };
9786
-
9787
8218
  /**
9788
8219
  * This interface was referenced by `Upload`'s JSON-Schema
9789
8220
  * via the `update.schema` link.
@@ -9861,7 +8292,6 @@ export type UploadUpdateSchema = {
9861
8292
  | OrganizationData;
9862
8293
  upload_collection?: UploadCollectionData | null;
9863
8294
  };
9864
-
9865
8295
  /**
9866
8296
  * This interface was referenced by `Upload`'s JSON-Schema
9867
8297
  * via the `bulk_tag.schema` link.
@@ -9874,7 +8304,6 @@ export type UploadBulkTagSchema = {
9874
8304
  tags: string[];
9875
8305
  uploads: UploadData[];
9876
8306
  };
9877
-
9878
8307
  /**
9879
8308
  * This interface was referenced by `Upload`'s JSON-Schema
9880
8309
  * via the `bulk_set_upload_collection.schema` link.
@@ -9884,7 +8313,6 @@ export type UploadBulkSetUploadCollectionSchema = {
9884
8313
  upload_collection: null | UploadCollectionData;
9885
8314
  uploads: UploadData[];
9886
8315
  };
9887
-
9888
8316
  /**
9889
8317
  * This interface was referenced by `Upload`'s JSON-Schema
9890
8318
  * via the `bulk_destroy.schema` link.
@@ -9893,7 +8321,6 @@ export type UploadBulkDestroySchema = {
9893
8321
  type?: 'upload_bulk_destroy_operation';
9894
8322
  uploads: UploadData[];
9895
8323
  };
9896
-
9897
8324
  /**
9898
8325
  * To upload a file with the Content Management API, first you need to obtain an upload permission. The `upload_request` entity contains the S3-like URL where you will be able to upload the file with a raw/binary PUT request.
9899
8326
  *
@@ -9934,7 +8361,6 @@ export type UploadRequestAttributes = {
9934
8361
  };
9935
8362
  [k: string]: unknown;
9936
8363
  };
9937
-
9938
8364
  /**
9939
8365
  * This interface was referenced by `UploadRequest`'s JSON-Schema
9940
8366
  * via the `create.schema` link.
@@ -9946,7 +8372,6 @@ export type UploadRequestCreateSchema = {
9946
8372
  */
9947
8373
  filename?: string;
9948
8374
  };
9949
-
9950
8375
  /**
9951
8376
  * If the asset linked to an Upload entity is a video file, you have the option to include additional audio tracks and subtitle tracks to it.
9952
8377
  *
@@ -9997,7 +8422,6 @@ export type UploadTrackData = {
9997
8422
  type: 'subtitles' | 'audio';
9998
8423
  id: UploadTrackIdentity;
9999
8424
  };
10000
-
10001
8425
  /**
10002
8426
  * JSON API attributes
10003
8427
  *
@@ -10030,7 +8454,6 @@ export type UploadTrackAttributes = {
10030
8454
  */
10031
8455
  closed_captions: null | boolean;
10032
8456
  };
10033
-
10034
8457
  /**
10035
8458
  * JSON API links
10036
8459
  *
@@ -10040,7 +8463,6 @@ export type UploadTrackAttributes = {
10040
8463
  export type UploadTrackRelationships = {
10041
8464
  upload: UploadData;
10042
8465
  };
10043
-
10044
8466
  /**
10045
8467
  * This interface was referenced by `UploadTrack`'s JSON-Schema
10046
8468
  * via the `create.schema` link.
@@ -10067,7 +8489,6 @@ export type UploadTrackCreateSchema = {
10067
8489
  */
10068
8490
  closed_captions?: null | boolean;
10069
8491
  };
10070
-
10071
8492
  /**
10072
8493
  * This interface was referenced by `UploadTrack`'s JSON-Schema
10073
8494
  * via the `generate_subtitles.schema` link.
@@ -10083,7 +8504,6 @@ export type UploadTrackGenerateSubtitlesSchema = {
10083
8504
  */
10084
8505
  language_code: string;
10085
8506
  };
10086
-
10087
8507
  /**
10088
8508
  * You can create scheduled publication to publish records in the future
10089
8509
  *
@@ -10138,7 +8558,6 @@ export type ScheduledPublicationAttributes = {
10138
8558
  non_localized_content: boolean;
10139
8559
  };
10140
8560
  };
10141
-
10142
8561
  /**
10143
8562
  * JSON API links
10144
8563
  *
@@ -10148,7 +8567,6 @@ export type ScheduledPublicationAttributes = {
10148
8567
  export type ScheduledPublicationRelationships = {
10149
8568
  item: ItemData;
10150
8569
  };
10151
-
10152
8570
  /**
10153
8571
  * This interface was referenced by `ScheduledPublication`'s JSON-Schema
10154
8572
  * via the `create.schema` link.
@@ -10173,7 +8591,6 @@ export type ScheduledPublicationCreateSchema = {
10173
8591
  non_localized_content: boolean;
10174
8592
  };
10175
8593
  };
10176
-
10177
8594
  /**
10178
8595
  * You can create a scheduled unpublishing to unpublish records in the future
10179
8596
  *
@@ -10210,7 +8627,6 @@ export type ScheduledUnpublishingAttributes = {
10210
8627
  */
10211
8628
  content_in_locales: null | string[];
10212
8629
  };
10213
-
10214
8630
  /**
10215
8631
  * JSON API links
10216
8632
  *
@@ -10220,7 +8636,6 @@ export type ScheduledUnpublishingAttributes = {
10220
8636
  export type ScheduledUnpublishingRelationships = {
10221
8637
  item: ItemData;
10222
8638
  };
10223
-
10224
8639
  /**
10225
8640
  * This interface was referenced by `ScheduledUnpublishing`'s JSON-Schema
10226
8641
  * via the `create.schema` link.
@@ -10236,7 +8651,6 @@ export type ScheduledUnpublishingCreateSchema = {
10236
8651
  */
10237
8652
  content_in_locales?: null | string[];
10238
8653
  };
10239
-
10240
8654
  /**
10241
8655
  * DatoCMS Site Search is a way to deliver tailored search results to your site visitors. This is the endpoint you can use to query for results.
10242
8656
  *
@@ -10267,7 +8681,6 @@ export type SearchResult = {
10267
8681
  body?: string[] | null;
10268
8682
  };
10269
8683
  };
10270
-
10271
8684
  /**
10272
8685
  * JSON API data
10273
8686
  *
@@ -10278,7 +8691,6 @@ export type SearchResultData = {
10278
8691
  type: SearchResultType;
10279
8692
  id: SearchResultIdentity;
10280
8693
  };
10281
-
10282
8694
  /**
10283
8695
  * JSON API attributes
10284
8696
  *
@@ -10307,7 +8719,6 @@ export type SearchResultAttributes = {
10307
8719
  body?: string[] | null;
10308
8720
  };
10309
8721
  };
10310
-
10311
8722
  /**
10312
8723
  * [Environments](https://www.datocms.com/docs/general-concepts/primary-and-sandbox-environments) make it easier for your development team to **manage and maintain content structure once your content has been published**. You can think of environments like code branches: great for testing, development and pre-production environments.
10313
8724
  *
@@ -10377,7 +8788,6 @@ export type EnvironmentMeta = {
10377
8788
  */
10378
8789
  forked_from: string | null;
10379
8790
  };
10380
-
10381
8791
  /**
10382
8792
  * JSON API data
10383
8793
  *
@@ -10388,7 +8798,6 @@ export type EnvironmentData = {
10388
8798
  type: EnvironmentType;
10389
8799
  id: EnvironmentIdentity;
10390
8800
  };
10391
-
10392
8801
  /**
10393
8802
  * This interface was referenced by `Environment`'s JSON-Schema
10394
8803
  * via the `fork.schema` link.
@@ -10400,7 +8809,6 @@ export type EnvironmentForkSchema = {
10400
8809
  id: string;
10401
8810
  type?: EnvironmentType;
10402
8811
  };
10403
-
10404
8812
  /**
10405
8813
  * This interface was referenced by `Environment`'s JSON-Schema
10406
8814
  * via the `rename.schema` link.
@@ -10412,7 +8820,6 @@ export type EnvironmentRenameSchema = {
10412
8820
  id: string;
10413
8821
  type?: EnvironmentType;
10414
8822
  };
10415
-
10416
8823
  /**
10417
8824
  * This interface was referenced by `DatoApi`'s JSON-Schema
10418
8825
  * via the `definition` "maintenance_mode".
@@ -10438,7 +8845,6 @@ export type MaintenanceModeData = {
10438
8845
  type: MaintenanceModeType;
10439
8846
  id: MaintenanceModeIdentity;
10440
8847
  };
10441
-
10442
8848
  /**
10443
8849
  * JSON API attributes
10444
8850
  *
@@ -10451,7 +8857,6 @@ export type MaintenanceModeAttributes = {
10451
8857
  */
10452
8858
  active: boolean;
10453
8859
  };
10454
-
10455
8860
  /**
10456
8861
  * A webhook allows to make requests following certain Dato events. It is linked to a Role, which describes what actions can be performed.
10457
8862
  *
@@ -10556,7 +8961,6 @@ export type WebhookData = {
10556
8961
  type: WebhookType;
10557
8962
  id: WebhookIdentity;
10558
8963
  };
10559
-
10560
8964
  /**
10561
8965
  * JSON API attributes
10562
8966
  *
@@ -10645,7 +9049,6 @@ export type WebhookAttributes = {
10645
9049
  */
10646
9050
  auto_retry: boolean;
10647
9051
  };
10648
-
10649
9052
  /**
10650
9053
  * This interface was referenced by `Webhook`'s JSON-Schema
10651
9054
  * via the `create.schema` link.
@@ -10733,7 +9136,6 @@ export type WebhookCreateSchema = {
10733
9136
  */
10734
9137
  auto_retry?: boolean;
10735
9138
  };
10736
-
10737
9139
  /**
10738
9140
  * This interface was referenced by `Webhook`'s JSON-Schema
10739
9141
  * via the `update.schema` link.
@@ -10822,7 +9224,6 @@ export type WebhookUpdateSchema = {
10822
9224
  */
10823
9225
  auto_retry?: boolean;
10824
9226
  };
10825
-
10826
9227
  /**
10827
9228
  * This represents a log entry in the webhooks activity list, detailing a specific webhook event along with its delivery attempt information.
10828
9229
  *
@@ -10920,7 +9321,6 @@ export type WebhookCallData = {
10920
9321
  type: WebhookCallType;
10921
9322
  id: WebhookCallIdentity;
10922
9323
  };
10923
-
10924
9324
  /**
10925
9325
  * JSON API attributes
10926
9326
  *
@@ -11004,7 +9404,6 @@ export type WebhookCallAttributes = {
11004
9404
  */
11005
9405
  status: 'pending' | 'success' | 'failed' | 'rescheduled';
11006
9406
  };
11007
-
11008
9407
  /**
11009
9408
  * JSON API links
11010
9409
  *
@@ -11014,7 +9413,6 @@ export type WebhookCallAttributes = {
11014
9413
  export type WebhookCallRelationships = {
11015
9414
  webhook: WebhookData;
11016
9415
  };
11017
-
11018
9416
  /**
11019
9417
  * Configuration for different build triggers. You can have different staging and production environments in order to test your site before final deploy
11020
9418
  *
@@ -11129,7 +9527,6 @@ export type BuildTriggerAttributes = {
11129
9527
  */
11130
9528
  indexing_enabled: boolean;
11131
9529
  };
11132
-
11133
9530
  /**
11134
9531
  * This interface was referenced by `BuildTrigger`'s JSON-Schema
11135
9532
  * via the `create.schema` link.
@@ -11167,7 +9564,6 @@ export type BuildTriggerCreateSchema = {
11167
9564
  [k: string]: unknown;
11168
9565
  };
11169
9566
  };
11170
-
11171
9567
  /**
11172
9568
  * This interface was referenced by `BuildTrigger`'s JSON-Schema
11173
9569
  * via the `update.schema` link.
@@ -11202,7 +9598,6 @@ export type BuildTriggerUpdateSchema = {
11202
9598
  [k: string]: unknown;
11203
9599
  };
11204
9600
  };
11205
-
11206
9601
  /**
11207
9602
  * In DatoCMS you can create filters to help you (and other editors) quickly search for records
11208
9603
  *
@@ -11316,7 +9711,6 @@ export type ItemTypeFilterAttributes = {
11316
9711
  */
11317
9712
  shared: boolean;
11318
9713
  };
11319
-
11320
9714
  /**
11321
9715
  * JSON API links
11322
9716
  *
@@ -11326,7 +9720,6 @@ export type ItemTypeFilterAttributes = {
11326
9720
  export type ItemTypeFilterRelationships = {
11327
9721
  item_type: ItemTypeData;
11328
9722
  };
11329
-
11330
9723
  /**
11331
9724
  * This interface was referenced by `ItemTypeFilter`'s JSON-Schema
11332
9725
  * via the `create.schema` link.
@@ -11381,7 +9774,6 @@ export type ItemTypeFilterCreateSchema = {
11381
9774
  shared?: boolean;
11382
9775
  item_type: ItemTypeData;
11383
9776
  };
11384
-
11385
9777
  /**
11386
9778
  * This interface was referenced by `ItemTypeFilter`'s JSON-Schema
11387
9779
  * via the `update.schema` link.
@@ -11436,7 +9828,6 @@ export type ItemTypeFilterUpdateSchema = {
11436
9828
  };
11437
9829
  item_type?: ItemTypeData;
11438
9830
  };
11439
-
11440
9831
  /**
11441
9832
  * In DatoCMS you can create filters to help you (and other editors) quickly search for uploads
11442
9833
  *
@@ -11475,7 +9866,6 @@ export type UploadFilterData = {
11475
9866
  type: UploadFilterType;
11476
9867
  id: UploadFilterIdentity;
11477
9868
  };
11478
-
11479
9869
  /**
11480
9870
  * JSON API attributes
11481
9871
  *
@@ -11498,7 +9888,6 @@ export type UploadFilterAttributes = {
11498
9888
  */
11499
9889
  shared: boolean;
11500
9890
  };
11501
-
11502
9891
  /**
11503
9892
  * This interface was referenced by `UploadFilter`'s JSON-Schema
11504
9893
  * via the `create.schema` link.
@@ -11521,7 +9910,6 @@ export type UploadFilterCreateSchema = {
11521
9910
  */
11522
9911
  shared: boolean;
11523
9912
  };
11524
-
11525
9913
  /**
11526
9914
  * This interface was referenced by `UploadFilter`'s JSON-Schema
11527
9915
  * via the `update.schema` link.
@@ -11544,7 +9932,6 @@ export type UploadFilterUpdateSchema = {
11544
9932
  [k: string]: unknown;
11545
9933
  };
11546
9934
  };
11547
-
11548
9935
  /**
11549
9936
  * A DatoCMS administrative area can be accessed by multiple people. Every invitation is linked to a specific Role, which describes what actions it will be able to perform once the user will register.
11550
9937
  *
@@ -11583,7 +9970,6 @@ export type SiteInvitationData = {
11583
9970
  type: SiteInvitationType;
11584
9971
  id: SiteInvitationIdentity;
11585
9972
  };
11586
-
11587
9973
  /**
11588
9974
  * JSON API attributes
11589
9975
  *
@@ -11604,7 +9990,6 @@ export type SiteInvitationAttributes = {
11604
9990
  */
11605
9991
  invitation_link?: null | string;
11606
9992
  };
11607
-
11608
9993
  /**
11609
9994
  * JSON API links
11610
9995
  *
@@ -11614,7 +9999,6 @@ export type SiteInvitationAttributes = {
11614
9999
  export type SiteInvitationRelationships = {
11615
10000
  role: RoleData;
11616
10001
  };
11617
-
11618
10002
  /**
11619
10003
  * This interface was referenced by `SiteInvitation`'s JSON-Schema
11620
10004
  * via the `create.schema` link.
@@ -11627,7 +10011,6 @@ export type SiteInvitationCreateSchema = {
11627
10011
  email: string;
11628
10012
  role: RoleData;
11629
10013
  };
11630
-
11631
10014
  /**
11632
10015
  * This interface was referenced by `SiteInvitation`'s JSON-Schema
11633
10016
  * via the `update.schema` link.
@@ -11637,7 +10020,6 @@ export type SiteInvitationUpdateSchema = {
11637
10020
  type?: SiteInvitationType;
11638
10021
  role?: RoleData;
11639
10022
  };
11640
-
11641
10023
  /**
11642
10024
  * Session track users movements in the administrative area, and allows locking a record when editing it.
11643
10025
  *
@@ -11675,7 +10057,6 @@ export type EditingSessionData = {
11675
10057
  type: EditingSessionType;
11676
10058
  id: EditingSessionIdentity;
11677
10059
  };
11678
-
11679
10060
  /**
11680
10061
  * JSON API attributes
11681
10062
  *
@@ -11692,7 +10073,6 @@ export type EditingSessionAttributes = {
11692
10073
  */
11693
10074
  locked_at: string | null;
11694
10075
  };
11695
-
11696
10076
  /**
11697
10077
  * JSON API links
11698
10078
  *
@@ -11709,7 +10089,6 @@ export type EditingSessionRelationships = {
11709
10089
  | SsoUserData
11710
10090
  | OrganizationData;
11711
10091
  };
11712
-
11713
10092
  /**
11714
10093
  * Form contents for an editing session
11715
10094
  *
@@ -11724,7 +10103,6 @@ export type FormData = {
11724
10103
  };
11725
10104
  editor: AccountData;
11726
10105
  };
11727
-
11728
10106
  /**
11729
10107
  * JSON API data
11730
10108
  *
@@ -11735,7 +10113,6 @@ export type FormDataData = {
11735
10113
  type: FormDataType;
11736
10114
  id: FormDataIdentity;
11737
10115
  };
11738
-
11739
10116
  /**
11740
10117
  * JSON API attributes
11741
10118
  *
@@ -11747,7 +10124,6 @@ export type FormDataAttributes = {
11747
10124
  [k: string]: unknown;
11748
10125
  };
11749
10126
  };
11750
-
11751
10127
  /**
11752
10128
  * JSON API links
11753
10129
  *
@@ -11757,7 +10133,6 @@ export type FormDataAttributes = {
11757
10133
  export type FormDataRelationships = {
11758
10134
  editor: AccountData;
11759
10135
  };
11760
-
11761
10136
  /**
11762
10137
  * A Single Sign-On group exists when a DatoCMS project is connected to an Identity Provider. These groups can be used to link DatoCMS roles to the Identity Provider's groups.
11763
10138
  *
@@ -11797,7 +10172,6 @@ export type SsoGroupAttributes = {
11797
10172
  */
11798
10173
  priority: number;
11799
10174
  };
11800
-
11801
10175
  /**
11802
10176
  * JSON API links
11803
10177
  *
@@ -11808,7 +10182,6 @@ export type SsoGroupRelationships = {
11808
10182
  role: RoleData;
11809
10183
  users: SsoUserData[];
11810
10184
  };
11811
-
11812
10185
  /**
11813
10186
  * This interface was referenced by `SsoGroup`'s JSON-Schema
11814
10187
  * via the `update.schema` link.
@@ -11822,7 +10195,6 @@ export type SsoGroupUpdateSchema = {
11822
10195
  priority: number;
11823
10196
  role: RoleData;
11824
10197
  };
11825
-
11826
10198
  /**
11827
10199
  * Represents the Single Sign-on settings of the current DatoCMS project
11828
10200
  *
@@ -11878,7 +10250,6 @@ export type SsoSettingsData = {
11878
10250
  type: SsoSettingsType;
11879
10251
  id: SsoSettingsIdentity;
11880
10252
  };
11881
-
11882
10253
  /**
11883
10254
  * JSON API attributes
11884
10255
  *
@@ -11919,7 +10290,6 @@ export type SsoSettingsAttributes = {
11919
10290
  */
11920
10291
  scim_api_token?: string;
11921
10292
  };
11922
-
11923
10293
  /**
11924
10294
  * JSON API links
11925
10295
  *
@@ -11929,7 +10299,6 @@ export type SsoSettingsAttributes = {
11929
10299
  export type SsoSettingsRelationships = {
11930
10300
  default_role: null | RoleData;
11931
10301
  };
11932
-
11933
10302
  /**
11934
10303
  * This interface was referenced by `SsoSettings`'s JSON-Schema
11935
10304
  * via the `generate_token.targetSchema` link.
@@ -11945,7 +10314,6 @@ export type SsoSettingsGenerateTokenTargetSchema = {
11945
10314
  };
11946
10315
  [k: string]: unknown;
11947
10316
  };
11948
-
11949
10317
  /**
11950
10318
  * This interface was referenced by `SsoSettings`'s JSON-Schema
11951
10319
  * via the `update.schema` link.
@@ -11963,7 +10331,6 @@ export type SsoSettingsUpdateSchema = {
11963
10331
  idp_saml_metadata_xml?: null | string;
11964
10332
  default_role?: RoleData;
11965
10333
  };
11966
-
11967
10334
  /**
11968
10335
  * The entity suggests several emojis that are connected to a specific term
11969
10336
  *
@@ -11989,7 +10356,6 @@ export type EmojiSuggestionsData = {
11989
10356
  type: EmojiSuggestionsType;
11990
10357
  id: EmojiSuggestionsIdentity;
11991
10358
  };
11992
-
11993
10359
  /**
11994
10360
  * JSON API attributes
11995
10361
  *
@@ -12002,7 +10368,6 @@ export type EmojiSuggestionsAttributes = {
12002
10368
  */
12003
10369
  emojis: string[];
12004
10370
  };
12005
-
12006
10371
  /**
12007
10372
  * Represents the white-label settings of the current DatoCMS project
12008
10373
  *
@@ -12029,7 +10394,6 @@ export type WhiteLabelSettingsData = {
12029
10394
  type: WhiteLabelSettingsType;
12030
10395
  id: WhiteLabelSettingsIdentity;
12031
10396
  };
12032
-
12033
10397
  /**
12034
10398
  * JSON API attributes
12035
10399
  *
@@ -12042,7 +10406,6 @@ export type WhiteLabelSettingsAttributes = {
12042
10406
  */
12043
10407
  custom_i18n_messages_template_url: null | string;
12044
10408
  };
12045
-
12046
10409
  /**
12047
10410
  * This interface was referenced by `WhiteLabelSettings`'s JSON-Schema
12048
10411
  * via the `update.schema` link.
@@ -12055,7 +10418,6 @@ export type WhiteLabelSettingsUpdateSchema = {
12055
10418
  */
12056
10419
  custom_i18n_messages_template_url?: null | string;
12057
10420
  };
12058
-
12059
10421
  /**
12060
10422
  * Info that can be accessed by unauthorized users
12061
10423
  *
@@ -12136,7 +10498,6 @@ export type PublicInfoData = {
12136
10498
  type: PublicInfoType;
12137
10499
  id: PublicInfoIdentity;
12138
10500
  };
12139
-
12140
10501
  /**
12141
10502
  * JSON API attributes
12142
10503
  *
@@ -12204,7 +10565,6 @@ export type PublicInfoAttributes = {
12204
10565
  [k: string]: unknown;
12205
10566
  };
12206
10567
  };
12207
-
12208
10568
  /**
12209
10569
  * DatoCMS resources usage organized by day
12210
10570
  *
@@ -12251,7 +10611,6 @@ export type DailyUsage = {
12251
10611
  */
12252
10612
  mux_encoded_seconds: number;
12253
10613
  };
12254
-
12255
10614
  /**
12256
10615
  * JSON API data
12257
10616
  *
@@ -12262,7 +10621,6 @@ export type DailyUsageData = {
12262
10621
  type: DailyUsageType;
12263
10622
  id: DailyUsageIdentity;
12264
10623
  };
12265
-
12266
10624
  /**
12267
10625
  * JSON API attributes
12268
10626
  *
@@ -12307,7 +10665,6 @@ export type DailyUsageAttributes = {
12307
10665
  */
12308
10666
  mux_encoded_seconds: number;
12309
10667
  };
12310
-
12311
10668
  /**
12312
10669
  * You can use counters to analyze your project's data consumption over a period of time. Counters are especially useful if your project is exceeding its API calls/traffic quota limits, to better understand where and how requests are originating. Counters are updated every minute, so you can debug in real-time the results of your changes.
12313
10670
  *
@@ -12339,7 +10696,6 @@ export type UsageCounterData = {
12339
10696
  type: UsageCounterType;
12340
10697
  id: UsageCounterIdentity;
12341
10698
  };
12342
-
12343
10699
  /**
12344
10700
  * JSON API attributes
12345
10701
  *
@@ -12358,7 +10714,6 @@ export type UsageCounterAttributes = {
12358
10714
  counter: number;
12359
10715
  }[];
12360
10716
  };
12361
-
12362
10717
  /**
12363
10718
  * All the project's upload tags
12364
10719
  *
@@ -12384,7 +10739,6 @@ export type UploadTagData = {
12384
10739
  type: UploadTagType;
12385
10740
  id: UploadTagIdentity;
12386
10741
  };
12387
-
12388
10742
  /**
12389
10743
  * JSON API attributes
12390
10744
  *
@@ -12397,7 +10751,6 @@ export type UploadTagAttributes = {
12397
10751
  */
12398
10752
  name: string;
12399
10753
  };
12400
-
12401
10754
  /**
12402
10755
  * This interface was referenced by `UploadTag`'s JSON-Schema
12403
10756
  * via the `create.schema` link.
@@ -12409,7 +10762,6 @@ export type UploadTagCreateSchema = {
12409
10762
  */
12410
10763
  name: string;
12411
10764
  };
12412
-
12413
10765
  /**
12414
10766
  * All the site's upload automatically generated tags
12415
10767
  *
@@ -12424,7 +10776,6 @@ export type UploadSmartTag = {
12424
10776
  */
12425
10777
  name: string;
12426
10778
  };
12427
-
12428
10779
  /**
12429
10780
  * JSON API data
12430
10781
  *
@@ -12435,7 +10786,6 @@ export type UploadSmartTagData = {
12435
10786
  type: UploadSmartTagType;
12436
10787
  id: UploadSmartTagIdentity;
12437
10788
  };
12438
-
12439
10789
  /**
12440
10790
  * JSON API attributes
12441
10791
  *
@@ -12448,7 +10798,6 @@ export type UploadSmartTagAttributes = {
12448
10798
  */
12449
10799
  name: string;
12450
10800
  };
12451
-
12452
10801
  /**
12453
10802
  * A site represents a specific DatoCMS administrative area
12454
10803
  *
@@ -12684,7 +11033,6 @@ export type SiteMeta = {
12684
11033
  */
12685
11034
  improved_exposure_of_inline_blocks_in_cda: boolean;
12686
11035
  };
12687
-
12688
11036
  /**
12689
11037
  * JSON API data
12690
11038
  *
@@ -12695,7 +11043,6 @@ export type SiteData = {
12695
11043
  type: SiteType;
12696
11044
  id: SiteIdentity;
12697
11045
  };
12698
-
12699
11046
  /**
12700
11047
  * JSON API attributes
12701
11048
  *
@@ -12863,7 +11210,6 @@ export type SiteAttributes = {
12863
11210
  [k: string]: unknown;
12864
11211
  } | null;
12865
11212
  };
12866
-
12867
11213
  /**
12868
11214
  * JSON API links
12869
11215
  *
@@ -12878,7 +11224,6 @@ export type SiteRelationships = {
12878
11224
  */
12879
11225
  item_types: ItemTypeData[];
12880
11226
  };
12881
-
12882
11227
  /**
12883
11228
  * This interface was referenced by `Site`'s JSON-Schema
12884
11229
  * via the `update.schema` link.
@@ -13044,7 +11389,6 @@ export type SiteUpdateSchema = {
13044
11389
  improved_exposure_of_inline_blocks_in_cda?: boolean;
13045
11390
  };
13046
11391
  };
13047
-
13048
11392
  /**
13049
11393
  * This interface was referenced by `Site`'s JSON-Schema
13050
11394
  * via the `update_assets_cdn_default_settings.schema` link.
@@ -13083,7 +11427,6 @@ export type SiteUpdateAssetsCdnDefaultSettingsSchema = {
13083
11427
  };
13084
11428
  };
13085
11429
  };
13086
-
13087
11430
  /**
13088
11431
  * Through workflows it is possible to set up a precise state machine able to bring a draft content up to the final publication (and beyond), through a series of intermediate, fully customizable approval steps.
13089
11432
  *
@@ -13203,7 +11546,6 @@ export type WorkflowAttributes = {
13203
11546
  }[],
13204
11547
  ];
13205
11548
  };
13206
-
13207
11549
  /**
13208
11550
  * This interface was referenced by `Workflow`'s JSON-Schema
13209
11551
  * via the `create.schema` link.
@@ -13261,7 +11603,6 @@ export type WorkflowCreateSchema = {
13261
11603
  }[],
13262
11604
  ];
13263
11605
  };
13264
-
13265
11606
  /**
13266
11607
  * This interface was referenced by `Workflow`'s JSON-Schema
13267
11608
  * via the `update.schema` link.