@datocms/cma-client 5.1.10 → 5.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +569 -0
- package/dist/cjs/fieldTypes/boolean.js +2 -2
- package/dist/cjs/fieldTypes/boolean.js.map +1 -1
- package/dist/cjs/fieldTypes/color.js +2 -2
- package/dist/cjs/fieldTypes/color.js.map +1 -1
- package/dist/cjs/fieldTypes/date.js +2 -3
- package/dist/cjs/fieldTypes/date.js.map +1 -1
- package/dist/cjs/fieldTypes/date_time.js +2 -2
- package/dist/cjs/fieldTypes/date_time.js.map +1 -1
- package/dist/cjs/fieldTypes/file.js +33 -5
- package/dist/cjs/fieldTypes/file.js.map +1 -1
- package/dist/cjs/fieldTypes/float.js +2 -2
- package/dist/cjs/fieldTypes/float.js.map +1 -1
- package/dist/cjs/fieldTypes/gallery.js +20 -5
- package/dist/cjs/fieldTypes/gallery.js.map +1 -1
- package/dist/cjs/fieldTypes/index.js +2 -2
- package/dist/cjs/fieldTypes/index.js.map +1 -1
- package/dist/cjs/fieldTypes/integer.js +2 -2
- package/dist/cjs/fieldTypes/integer.js.map +1 -1
- package/dist/cjs/fieldTypes/json.js +2 -3
- package/dist/cjs/fieldTypes/json.js.map +1 -1
- package/dist/cjs/fieldTypes/lat_lon.js +2 -2
- package/dist/cjs/fieldTypes/lat_lon.js.map +1 -1
- package/dist/cjs/fieldTypes/link.js +4 -4
- package/dist/cjs/fieldTypes/link.js.map +1 -1
- package/dist/cjs/fieldTypes/links.js +5 -3
- package/dist/cjs/fieldTypes/links.js.map +1 -1
- package/dist/cjs/fieldTypes/rich_text.js +18 -18
- package/dist/cjs/fieldTypes/rich_text.js.map +1 -1
- package/dist/cjs/fieldTypes/schema.js +3 -0
- package/dist/cjs/fieldTypes/schema.js.map +1 -0
- package/dist/cjs/fieldTypes/seo.js +2 -3
- package/dist/cjs/fieldTypes/seo.js.map +1 -1
- package/dist/cjs/fieldTypes/single_block.js +20 -19
- package/dist/cjs/fieldTypes/single_block.js.map +1 -1
- package/dist/cjs/fieldTypes/slug.js +2 -3
- package/dist/cjs/fieldTypes/slug.js.map +1 -1
- package/dist/cjs/fieldTypes/string.js +2 -2
- package/dist/cjs/fieldTypes/string.js.map +1 -1
- package/dist/cjs/fieldTypes/structured_text.js +17 -18
- package/dist/cjs/fieldTypes/structured_text.js.map +1 -1
- package/dist/cjs/fieldTypes/text.js +2 -3
- package/dist/cjs/fieldTypes/text.js.map +1 -1
- package/dist/cjs/fieldTypes/video.js +2 -2
- package/dist/cjs/fieldTypes/video.js.map +1 -1
- package/dist/cjs/generated/Client.js +1 -1
- package/dist/cjs/generated/resources/Item.js.map +1 -1
- package/dist/cjs/generated/resources/ScheduledPublication.js.map +1 -1
- package/dist/cjs/generated/resources/ScheduledUnpublishing.js.map +1 -1
- package/dist/cjs/generated/resources/Upload.js.map +1 -1
- package/dist/cjs/index.js +5 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/utilities/buildBlockRecord.js +1 -45
- package/dist/cjs/utilities/buildBlockRecord.js.map +1 -1
- package/dist/cjs/utilities/duplicateBlockRecord.js +49 -0
- package/dist/cjs/utilities/duplicateBlockRecord.js.map +1 -0
- package/dist/cjs/utilities/inspectItem.js +427 -0
- package/dist/cjs/utilities/inspectItem.js.map +1 -0
- package/dist/cjs/utilities/{blocks.js → nonRecursiveBlocks.js} +60 -234
- package/dist/cjs/utilities/nonRecursiveBlocks.js.map +1 -0
- package/dist/cjs/utilities/{fieldValue.js → normalizedFieldValues.js} +53 -41
- package/dist/cjs/utilities/normalizedFieldValues.js.map +1 -0
- package/dist/cjs/utilities/recursiveBlocks.js +73 -92
- package/dist/cjs/utilities/recursiveBlocks.js.map +1 -1
- package/dist/cjs/utilities/schemaRepository.js +2 -2
- package/dist/esm/fieldTypes/boolean.d.ts +1 -1
- package/dist/esm/fieldTypes/boolean.js +2 -2
- package/dist/esm/fieldTypes/boolean.js.map +1 -1
- package/dist/esm/fieldTypes/color.d.ts +1 -1
- package/dist/esm/fieldTypes/color.js +2 -2
- package/dist/esm/fieldTypes/color.js.map +1 -1
- package/dist/esm/fieldTypes/date.d.ts +1 -1
- package/dist/esm/fieldTypes/date.js +2 -3
- package/dist/esm/fieldTypes/date.js.map +1 -1
- package/dist/esm/fieldTypes/date_time.d.ts +1 -1
- package/dist/esm/fieldTypes/date_time.js +2 -2
- package/dist/esm/fieldTypes/date_time.js.map +1 -1
- package/dist/esm/fieldTypes/file.d.ts +68 -1
- package/dist/esm/fieldTypes/file.js +29 -3
- package/dist/esm/fieldTypes/file.js.map +1 -1
- package/dist/esm/fieldTypes/float.d.ts +1 -1
- package/dist/esm/fieldTypes/float.js +2 -2
- package/dist/esm/fieldTypes/float.js.map +1 -1
- package/dist/esm/fieldTypes/gallery.d.ts +27 -11
- package/dist/esm/fieldTypes/gallery.js +17 -4
- package/dist/esm/fieldTypes/gallery.js.map +1 -1
- package/dist/esm/fieldTypes/index.d.ts +2 -2
- package/dist/esm/fieldTypes/index.js +2 -2
- package/dist/esm/fieldTypes/index.js.map +1 -1
- package/dist/esm/fieldTypes/integer.d.ts +1 -1
- package/dist/esm/fieldTypes/integer.js +2 -2
- package/dist/esm/fieldTypes/integer.js.map +1 -1
- package/dist/esm/fieldTypes/json.d.ts +1 -1
- package/dist/esm/fieldTypes/json.js +2 -3
- package/dist/esm/fieldTypes/json.js.map +1 -1
- package/dist/esm/fieldTypes/lat_lon.d.ts +1 -1
- package/dist/esm/fieldTypes/lat_lon.js +2 -2
- package/dist/esm/fieldTypes/lat_lon.js.map +1 -1
- package/dist/esm/fieldTypes/link.d.ts +1 -1
- package/dist/esm/fieldTypes/link.js +4 -4
- package/dist/esm/fieldTypes/link.js.map +1 -1
- package/dist/esm/fieldTypes/links.d.ts +1 -1
- package/dist/esm/fieldTypes/links.js +5 -3
- package/dist/esm/fieldTypes/links.js.map +1 -1
- package/dist/esm/fieldTypes/rich_text.d.ts +9 -10
- package/dist/esm/fieldTypes/rich_text.js +13 -13
- package/dist/esm/fieldTypes/rich_text.js.map +1 -1
- package/dist/esm/fieldTypes/schema.d.ts +59 -0
- package/dist/esm/fieldTypes/schema.js +2 -0
- package/dist/esm/fieldTypes/schema.js.map +1 -0
- package/dist/esm/fieldTypes/seo.d.ts +1 -1
- package/dist/esm/fieldTypes/seo.js +2 -3
- package/dist/esm/fieldTypes/seo.js.map +1 -1
- package/dist/esm/fieldTypes/single_block.d.ts +31 -16
- package/dist/esm/fieldTypes/single_block.js +15 -14
- package/dist/esm/fieldTypes/single_block.js.map +1 -1
- package/dist/esm/fieldTypes/slug.d.ts +1 -1
- package/dist/esm/fieldTypes/slug.js +2 -3
- package/dist/esm/fieldTypes/slug.js.map +1 -1
- package/dist/esm/fieldTypes/string.d.ts +1 -1
- package/dist/esm/fieldTypes/string.js +2 -2
- package/dist/esm/fieldTypes/string.js.map +1 -1
- package/dist/esm/fieldTypes/structured_text.d.ts +15 -16
- package/dist/esm/fieldTypes/structured_text.js +12 -13
- package/dist/esm/fieldTypes/structured_text.js.map +1 -1
- package/dist/esm/fieldTypes/text.d.ts +1 -1
- package/dist/esm/fieldTypes/text.js +2 -3
- package/dist/esm/fieldTypes/text.js.map +1 -1
- package/dist/esm/fieldTypes/video.d.ts +1 -1
- package/dist/esm/fieldTypes/video.js +2 -2
- package/dist/esm/fieldTypes/video.js.map +1 -1
- package/dist/esm/generated/ApiTypes.d.ts +90 -980
- package/dist/esm/generated/Client.js +1 -1
- package/dist/esm/generated/RawApiTypes.d.ts +156 -999
- package/dist/esm/generated/resources/Field.d.ts +200 -200
- package/dist/esm/generated/resources/Item.d.ts +34 -34
- package/dist/esm/generated/resources/Item.js.map +1 -1
- package/dist/esm/generated/resources/ItemVersion.d.ts +3 -1
- package/dist/esm/generated/resources/ScheduledPublication.d.ts +3 -3
- package/dist/esm/generated/resources/ScheduledPublication.js.map +1 -1
- package/dist/esm/generated/resources/ScheduledUnpublishing.d.ts +3 -3
- package/dist/esm/generated/resources/ScheduledUnpublishing.js.map +1 -1
- package/dist/esm/generated/resources/Upload.d.ts +6 -6
- package/dist/esm/generated/resources/Upload.js.map +1 -1
- package/dist/esm/index.d.ts +5 -4
- package/dist/esm/index.js +5 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utilities/buildBlockRecord.d.ts +3 -5
- package/dist/esm/utilities/buildBlockRecord.js +0 -43
- package/dist/esm/utilities/buildBlockRecord.js.map +1 -1
- package/dist/esm/utilities/duplicateBlockRecord.d.ts +6 -0
- package/dist/esm/utilities/duplicateBlockRecord.js +45 -0
- package/dist/esm/utilities/duplicateBlockRecord.js.map +1 -0
- package/dist/esm/utilities/inspectItem.d.ts +8 -0
- package/dist/esm/utilities/inspectItem.js +400 -0
- package/dist/esm/utilities/inspectItem.js.map +1 -0
- package/dist/esm/utilities/itemDefinition.d.ts +45 -23
- package/dist/esm/utilities/nonRecursiveBlocks.d.ts +114 -0
- package/dist/esm/utilities/{blocks.js → nonRecursiveBlocks.js} +52 -220
- package/dist/esm/utilities/nonRecursiveBlocks.js.map +1 -0
- package/dist/{types/utilities/fieldValue.d.ts → esm/utilities/normalizedFieldValues.d.ts} +15 -14
- package/dist/esm/utilities/{fieldValue.js → normalizedFieldValues.js} +39 -28
- package/dist/esm/utilities/normalizedFieldValues.js.map +1 -0
- package/dist/esm/utilities/recursiveBlocks.d.ts +124 -11
- package/dist/esm/utilities/recursiveBlocks.js +65 -84
- package/dist/esm/utilities/recursiveBlocks.js.map +1 -1
- package/dist/esm/utilities/schemaRepository.d.ts +2 -2
- package/dist/esm/utilities/schemaRepository.js +2 -2
- package/dist/types/fieldTypes/boolean.d.ts +1 -1
- package/dist/types/fieldTypes/color.d.ts +1 -1
- package/dist/types/fieldTypes/date.d.ts +1 -1
- package/dist/types/fieldTypes/date_time.d.ts +1 -1
- package/dist/types/fieldTypes/file.d.ts +68 -1
- package/dist/types/fieldTypes/float.d.ts +1 -1
- package/dist/types/fieldTypes/gallery.d.ts +27 -11
- package/dist/types/fieldTypes/index.d.ts +2 -2
- package/dist/types/fieldTypes/integer.d.ts +1 -1
- package/dist/types/fieldTypes/json.d.ts +1 -1
- package/dist/types/fieldTypes/lat_lon.d.ts +1 -1
- package/dist/types/fieldTypes/link.d.ts +1 -1
- package/dist/types/fieldTypes/links.d.ts +1 -1
- package/dist/types/fieldTypes/rich_text.d.ts +9 -10
- package/dist/types/fieldTypes/schema.d.ts +59 -0
- package/dist/types/fieldTypes/seo.d.ts +1 -1
- package/dist/types/fieldTypes/single_block.d.ts +31 -16
- package/dist/types/fieldTypes/slug.d.ts +1 -1
- package/dist/types/fieldTypes/string.d.ts +1 -1
- package/dist/types/fieldTypes/structured_text.d.ts +15 -16
- package/dist/types/fieldTypes/text.d.ts +1 -1
- package/dist/types/fieldTypes/video.d.ts +1 -1
- package/dist/types/generated/ApiTypes.d.ts +90 -980
- package/dist/types/generated/RawApiTypes.d.ts +156 -999
- package/dist/types/generated/resources/Field.d.ts +200 -200
- package/dist/types/generated/resources/Item.d.ts +34 -34
- package/dist/types/generated/resources/ItemVersion.d.ts +3 -1
- package/dist/types/generated/resources/ScheduledPublication.d.ts +3 -3
- package/dist/types/generated/resources/ScheduledUnpublishing.d.ts +3 -3
- package/dist/types/generated/resources/Upload.d.ts +6 -6
- package/dist/types/index.d.ts +5 -4
- package/dist/types/utilities/buildBlockRecord.d.ts +3 -5
- package/dist/types/utilities/duplicateBlockRecord.d.ts +6 -0
- package/dist/types/utilities/inspectItem.d.ts +8 -0
- package/dist/types/utilities/itemDefinition.d.ts +45 -23
- package/dist/types/utilities/nonRecursiveBlocks.d.ts +114 -0
- package/dist/{esm/utilities/fieldValue.d.ts → types/utilities/normalizedFieldValues.d.ts} +15 -14
- package/dist/types/utilities/recursiveBlocks.d.ts +124 -11
- package/dist/types/utilities/schemaRepository.d.ts +2 -2
- package/package.json +4 -4
- package/src/fieldTypes/boolean.ts +5 -3
- package/src/fieldTypes/color.ts +5 -3
- package/src/fieldTypes/date.ts +5 -4
- package/src/fieldTypes/date_time.ts +5 -3
- package/src/fieldTypes/file.ts +98 -4
- package/src/fieldTypes/float.ts +5 -3
- package/src/fieldTypes/gallery.ts +53 -20
- package/src/fieldTypes/index.ts +2 -3
- package/src/fieldTypes/integer.ts +5 -3
- package/src/fieldTypes/json.ts +5 -4
- package/src/fieldTypes/lat_lon.ts +5 -3
- package/src/fieldTypes/link.ts +7 -5
- package/src/fieldTypes/links.ts +8 -4
- package/src/fieldTypes/rich_text.ts +33 -31
- package/src/fieldTypes/schema.ts +657 -0
- package/src/fieldTypes/seo.ts +5 -4
- package/src/fieldTypes/single_block.ts +71 -46
- package/src/fieldTypes/slug.ts +5 -4
- package/src/fieldTypes/string.ts +5 -3
- package/src/fieldTypes/structured_text.ts +64 -58
- package/src/fieldTypes/text.ts +5 -4
- package/src/fieldTypes/video.ts +5 -3
- package/src/generated/ApiTypes.ts +217 -1880
- package/src/generated/Client.ts +1 -1
- package/src/generated/RawApiTypes.ts +272 -2113
- package/src/generated/resources/Item.ts +93 -187
- package/src/generated/resources/ScheduledPublication.ts +4 -15
- package/src/generated/resources/ScheduledUnpublishing.ts +4 -15
- package/src/generated/resources/Upload.ts +9 -32
- package/src/index.ts +5 -4
- package/src/utilities/buildBlockRecord.ts +4 -59
- package/src/utilities/duplicateBlockRecord.ts +52 -0
- package/src/utilities/inspectItem.ts +602 -0
- package/src/utilities/itemDefinition.ts +130 -92
- package/src/utilities/nonRecursiveBlocks.ts +406 -0
- package/src/utilities/{fieldValue.ts → normalizedFieldValues.ts} +70 -30
- package/src/utilities/recursiveBlocks.ts +484 -204
- package/src/utilities/schemaRepository.ts +2 -2
- package/dist/cjs/utilities/blocks.js.map +0 -1
- package/dist/cjs/utilities/fieldValue.js.map +0 -1
- package/dist/esm/utilities/blocks.d.ts +0 -180
- package/dist/esm/utilities/blocks.js.map +0 -1
- package/dist/esm/utilities/fieldValue.js.map +0 -1
- package/dist/types/utilities/blocks.d.ts +0 -180
- package/src/utilities/blocks.ts +0 -626
|
@@ -1,711 +1,64 @@
|
|
|
1
1
|
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
|
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
|
|
16
|
+
export type FieldAttributes =
|
|
17
|
+
GenericFieldAttributes<FieldAttributesStableShell>;
|
|
667
18
|
|
|
668
|
-
type
|
|
669
|
-
id: ItemTypeId;
|
|
670
|
-
};
|
|
19
|
+
export type FieldCreateSchema = FieldCreateConfig<FieldCreateSchemaStableShell>;
|
|
671
20
|
|
|
672
|
-
type
|
|
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
|
|
681
|
-
|
|
682
|
-
|
|
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
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
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
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
D
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
1497
|
-
|
|
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
|
|
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
|
|
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
|
|
1568
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
1736
|
-
|
|
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
|
|
1840
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
*
|
|
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
|
-
*
|
|
8158
|
-
*
|
|
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
|
-
*
|
|
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
|
-
|
|
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,49 @@ export type ItemRelationships = {
|
|
|
8955
7396
|
| SsoUserData
|
|
8956
7397
|
| OrganizationData;
|
|
8957
7398
|
};
|
|
8958
|
-
|
|
8959
7399
|
/**
|
|
8960
|
-
* This interface was referenced by `Item
|
|
7400
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
8961
7401
|
* via the `validate_existing.schema` link.
|
|
8962
7402
|
*/
|
|
8963
|
-
export type
|
|
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
|
+
} & ToItemAttributesInRequest<D>;
|
|
8975
7416
|
/**
|
|
8976
|
-
* This interface was referenced by `Item
|
|
7417
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
8977
7418
|
* via the `validate_new.schema` link.
|
|
8978
7419
|
*/
|
|
8979
|
-
export type
|
|
7420
|
+
export type ItemValidateNewSchema<
|
|
7421
|
+
D extends ItemTypeDefinition = ItemTypeDefinition,
|
|
7422
|
+
> = {
|
|
8980
7423
|
type?: ItemType1;
|
|
8981
|
-
item_type: ItemTypeData
|
|
7424
|
+
item_type: ItemTypeData<D>;
|
|
8982
7425
|
creator?:
|
|
8983
7426
|
| AccountData
|
|
8984
7427
|
| AccessTokenData
|
|
8985
7428
|
| UserData
|
|
8986
7429
|
| SsoUserData
|
|
8987
7430
|
| OrganizationData;
|
|
8988
|
-
}
|
|
8989
|
-
|
|
7431
|
+
} & ToItemAttributesInRequest<D>;
|
|
8990
7432
|
/**
|
|
8991
|
-
* This interface was referenced by `Item
|
|
7433
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
8992
7434
|
* via the `create.schema` link.
|
|
8993
7435
|
*/
|
|
8994
|
-
export type
|
|
7436
|
+
export type ItemCreateSchema<
|
|
7437
|
+
D extends ItemTypeDefinition = ItemTypeDefinition,
|
|
7438
|
+
> = {
|
|
8995
7439
|
id?: ItemIdentity;
|
|
8996
7440
|
type?: ItemType1;
|
|
8997
|
-
item_type: ItemTypeData
|
|
7441
|
+
item_type: ItemTypeData<D>;
|
|
8998
7442
|
creator?:
|
|
8999
7443
|
| AccountData
|
|
9000
7444
|
| AccessTokenData
|
|
@@ -9046,16 +7490,17 @@ export type RawItemCreateSchema = {
|
|
|
9046
7490
|
*/
|
|
9047
7491
|
current_version?: string;
|
|
9048
7492
|
};
|
|
9049
|
-
}
|
|
9050
|
-
|
|
7493
|
+
} & ToItemAttributesInRequest<D>;
|
|
9051
7494
|
/**
|
|
9052
|
-
* This interface was referenced by `Item
|
|
7495
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
9053
7496
|
* via the `update.schema` link.
|
|
9054
7497
|
*/
|
|
9055
|
-
export type
|
|
7498
|
+
export type ItemUpdateSchema<
|
|
7499
|
+
D extends ItemTypeDefinition = ItemTypeDefinition,
|
|
7500
|
+
> = {
|
|
9056
7501
|
id?: ItemIdentity;
|
|
9057
7502
|
type?: ItemType1;
|
|
9058
|
-
item_type?: ItemTypeData
|
|
7503
|
+
item_type?: ItemTypeData<D>;
|
|
9059
7504
|
creator?:
|
|
9060
7505
|
| AccountData
|
|
9061
7506
|
| AccessTokenData
|
|
@@ -9119,12 +7564,11 @@ export type RawItemUpdateSchema = {
|
|
|
9119
7564
|
*/
|
|
9120
7565
|
has_children?: null | boolean;
|
|
9121
7566
|
};
|
|
9122
|
-
}
|
|
9123
|
-
|
|
7567
|
+
} & ToItemAttributesInRequest<D>;
|
|
9124
7568
|
/**
|
|
9125
7569
|
* Information about the record
|
|
9126
7570
|
*
|
|
9127
|
-
* This interface was referenced by `Item
|
|
7571
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
9128
7572
|
* via the `current_vs_published_state.targetSchema` link.
|
|
9129
7573
|
*
|
|
9130
7574
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
@@ -9157,7 +7601,6 @@ export type ScheduledPublicationData = {
|
|
|
9157
7601
|
type: ScheduledPublicationType;
|
|
9158
7602
|
id: ScheduledPublicationIdentity;
|
|
9159
7603
|
};
|
|
9160
|
-
|
|
9161
7604
|
/**
|
|
9162
7605
|
* JSON API data
|
|
9163
7606
|
*
|
|
@@ -9168,7 +7611,6 @@ export type ScheduledUnpublishingData = {
|
|
|
9168
7611
|
type: ScheduledUnpublishingType;
|
|
9169
7612
|
id: ScheduledUnpublishingIdentity;
|
|
9170
7613
|
};
|
|
9171
|
-
|
|
9172
7614
|
/**
|
|
9173
7615
|
* JSON API data
|
|
9174
7616
|
*
|
|
@@ -9179,7 +7621,6 @@ export type ItemVersionData = {
|
|
|
9179
7621
|
type: ItemVersionType;
|
|
9180
7622
|
id: ItemVersionIdentity;
|
|
9181
7623
|
};
|
|
9182
|
-
|
|
9183
7624
|
/**
|
|
9184
7625
|
* JSON API data
|
|
9185
7626
|
*
|
|
@@ -9190,7 +7631,6 @@ export type ItemCurrentVsPublishedStateData = {
|
|
|
9190
7631
|
type: ItemCurrentVsPublishedStateType;
|
|
9191
7632
|
id: ItemCurrentVsPublishedStateIdentity;
|
|
9192
7633
|
};
|
|
9193
|
-
|
|
9194
7634
|
/**
|
|
9195
7635
|
* The JSON data associated to the record
|
|
9196
7636
|
*
|
|
@@ -9207,7 +7647,6 @@ export type ItemCurrentVsPublishedStateAttributes = {
|
|
|
9207
7647
|
current_version_invalid_locales: string[];
|
|
9208
7648
|
current_version_non_localized_fields_invalid: boolean;
|
|
9209
7649
|
};
|
|
9210
|
-
|
|
9211
7650
|
/**
|
|
9212
7651
|
* JSON API links
|
|
9213
7652
|
*
|
|
@@ -9219,9 +7658,8 @@ export type ItemCurrentVsPublishedStateRelationships = {
|
|
|
9219
7658
|
scheduled_unpublishing: ScheduledUnpublishingData | null;
|
|
9220
7659
|
published_version: ItemVersionData | null;
|
|
9221
7660
|
};
|
|
9222
|
-
|
|
9223
7661
|
/**
|
|
9224
|
-
* This interface was referenced by `Item
|
|
7662
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
9225
7663
|
* via the `bulk_publish.schema` link.
|
|
9226
7664
|
*/
|
|
9227
7665
|
export type ItemBulkPublishSchema = {
|
|
@@ -9229,9 +7667,8 @@ export type ItemBulkPublishSchema = {
|
|
|
9229
7667
|
items: ItemData[];
|
|
9230
7668
|
minItems?: unknown;
|
|
9231
7669
|
};
|
|
9232
|
-
|
|
9233
7670
|
/**
|
|
9234
|
-
* This interface was referenced by `Item
|
|
7671
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
9235
7672
|
* via the `bulk_unpublish.schema` link.
|
|
9236
7673
|
*/
|
|
9237
7674
|
export type ItemBulkUnpublishSchema = {
|
|
@@ -9239,9 +7676,8 @@ export type ItemBulkUnpublishSchema = {
|
|
|
9239
7676
|
items: ItemData[];
|
|
9240
7677
|
minItems?: unknown;
|
|
9241
7678
|
};
|
|
9242
|
-
|
|
9243
7679
|
/**
|
|
9244
|
-
* This interface was referenced by `Item
|
|
7680
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
9245
7681
|
* via the `bulk_destroy.schema` link.
|
|
9246
7682
|
*/
|
|
9247
7683
|
export type ItemBulkDestroySchema = {
|
|
@@ -9249,9 +7685,8 @@ export type ItemBulkDestroySchema = {
|
|
|
9249
7685
|
items: ItemData[];
|
|
9250
7686
|
minItems?: unknown;
|
|
9251
7687
|
};
|
|
9252
|
-
|
|
9253
7688
|
/**
|
|
9254
|
-
* This interface was referenced by `Item
|
|
7689
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
9255
7690
|
* via the `bulk_move_to_stage.schema` link.
|
|
9256
7691
|
*/
|
|
9257
7692
|
export type ItemBulkMoveToStageSchema = {
|
|
@@ -9263,7 +7698,6 @@ export type ItemBulkMoveToStageSchema = {
|
|
|
9263
7698
|
items: ItemData[];
|
|
9264
7699
|
minItems?: unknown;
|
|
9265
7700
|
};
|
|
9266
|
-
|
|
9267
7701
|
/**
|
|
9268
7702
|
* Every change to a record is stored as a separate record version in DatoCMS.
|
|
9269
7703
|
*
|
|
@@ -9309,7 +7743,6 @@ export type ItemVersionMeta = {
|
|
|
9309
7743
|
*/
|
|
9310
7744
|
is_current: boolean;
|
|
9311
7745
|
};
|
|
9312
|
-
|
|
9313
7746
|
/**
|
|
9314
7747
|
* The JSON data associated to the record version
|
|
9315
7748
|
*
|
|
@@ -9319,7 +7752,6 @@ export type ItemVersionMeta = {
|
|
|
9319
7752
|
export type ItemVersionAttributes = {
|
|
9320
7753
|
[k: string]: unknown;
|
|
9321
7754
|
};
|
|
9322
|
-
|
|
9323
7755
|
/**
|
|
9324
7756
|
* JSON API links
|
|
9325
7757
|
*
|
|
@@ -9336,7 +7768,6 @@ export type ItemVersionRelationships = {
|
|
|
9336
7768
|
| SsoUserData
|
|
9337
7769
|
| OrganizationData;
|
|
9338
7770
|
};
|
|
9339
|
-
|
|
9340
7771
|
/**
|
|
9341
7772
|
* Each media object you upload to the Media Area of your DatoCMS project is represented as an `upload` entity.
|
|
9342
7773
|
*
|
|
@@ -9529,7 +7960,6 @@ export type UploadData = {
|
|
|
9529
7960
|
type: UploadType;
|
|
9530
7961
|
id: UploadIdentity;
|
|
9531
7962
|
};
|
|
9532
|
-
|
|
9533
7963
|
/**
|
|
9534
7964
|
* JSON API attributes
|
|
9535
7965
|
*
|
|
@@ -9699,7 +8129,6 @@ export type UploadAttributes = {
|
|
|
9699
8129
|
alpha: number;
|
|
9700
8130
|
}[];
|
|
9701
8131
|
};
|
|
9702
|
-
|
|
9703
8132
|
/**
|
|
9704
8133
|
* JSON API links
|
|
9705
8134
|
*
|
|
@@ -9715,7 +8144,6 @@ export type UploadRelationships = {
|
|
|
9715
8144
|
| SsoUserData
|
|
9716
8145
|
| OrganizationData;
|
|
9717
8146
|
};
|
|
9718
|
-
|
|
9719
8147
|
/**
|
|
9720
8148
|
* This interface was referenced by `Upload`'s JSON-Schema
|
|
9721
8149
|
* via the `create.schema` link.
|
|
@@ -9783,7 +8211,6 @@ export type UploadCreateSchema = {
|
|
|
9783
8211
|
tags?: string[];
|
|
9784
8212
|
upload_collection?: UploadCollectionData | null;
|
|
9785
8213
|
};
|
|
9786
|
-
|
|
9787
8214
|
/**
|
|
9788
8215
|
* This interface was referenced by `Upload`'s JSON-Schema
|
|
9789
8216
|
* via the `update.schema` link.
|
|
@@ -9861,7 +8288,6 @@ export type UploadUpdateSchema = {
|
|
|
9861
8288
|
| OrganizationData;
|
|
9862
8289
|
upload_collection?: UploadCollectionData | null;
|
|
9863
8290
|
};
|
|
9864
|
-
|
|
9865
8291
|
/**
|
|
9866
8292
|
* This interface was referenced by `Upload`'s JSON-Schema
|
|
9867
8293
|
* via the `bulk_tag.schema` link.
|
|
@@ -9874,7 +8300,6 @@ export type UploadBulkTagSchema = {
|
|
|
9874
8300
|
tags: string[];
|
|
9875
8301
|
uploads: UploadData[];
|
|
9876
8302
|
};
|
|
9877
|
-
|
|
9878
8303
|
/**
|
|
9879
8304
|
* This interface was referenced by `Upload`'s JSON-Schema
|
|
9880
8305
|
* via the `bulk_set_upload_collection.schema` link.
|
|
@@ -9884,7 +8309,6 @@ export type UploadBulkSetUploadCollectionSchema = {
|
|
|
9884
8309
|
upload_collection: null | UploadCollectionData;
|
|
9885
8310
|
uploads: UploadData[];
|
|
9886
8311
|
};
|
|
9887
|
-
|
|
9888
8312
|
/**
|
|
9889
8313
|
* This interface was referenced by `Upload`'s JSON-Schema
|
|
9890
8314
|
* via the `bulk_destroy.schema` link.
|
|
@@ -9893,7 +8317,6 @@ export type UploadBulkDestroySchema = {
|
|
|
9893
8317
|
type?: 'upload_bulk_destroy_operation';
|
|
9894
8318
|
uploads: UploadData[];
|
|
9895
8319
|
};
|
|
9896
|
-
|
|
9897
8320
|
/**
|
|
9898
8321
|
* 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
8322
|
*
|
|
@@ -9934,7 +8357,6 @@ export type UploadRequestAttributes = {
|
|
|
9934
8357
|
};
|
|
9935
8358
|
[k: string]: unknown;
|
|
9936
8359
|
};
|
|
9937
|
-
|
|
9938
8360
|
/**
|
|
9939
8361
|
* This interface was referenced by `UploadRequest`'s JSON-Schema
|
|
9940
8362
|
* via the `create.schema` link.
|
|
@@ -9946,7 +8368,6 @@ export type UploadRequestCreateSchema = {
|
|
|
9946
8368
|
*/
|
|
9947
8369
|
filename?: string;
|
|
9948
8370
|
};
|
|
9949
|
-
|
|
9950
8371
|
/**
|
|
9951
8372
|
* 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
8373
|
*
|
|
@@ -9997,7 +8418,6 @@ export type UploadTrackData = {
|
|
|
9997
8418
|
type: 'subtitles' | 'audio';
|
|
9998
8419
|
id: UploadTrackIdentity;
|
|
9999
8420
|
};
|
|
10000
|
-
|
|
10001
8421
|
/**
|
|
10002
8422
|
* JSON API attributes
|
|
10003
8423
|
*
|
|
@@ -10030,7 +8450,6 @@ export type UploadTrackAttributes = {
|
|
|
10030
8450
|
*/
|
|
10031
8451
|
closed_captions: null | boolean;
|
|
10032
8452
|
};
|
|
10033
|
-
|
|
10034
8453
|
/**
|
|
10035
8454
|
* JSON API links
|
|
10036
8455
|
*
|
|
@@ -10040,7 +8459,6 @@ export type UploadTrackAttributes = {
|
|
|
10040
8459
|
export type UploadTrackRelationships = {
|
|
10041
8460
|
upload: UploadData;
|
|
10042
8461
|
};
|
|
10043
|
-
|
|
10044
8462
|
/**
|
|
10045
8463
|
* This interface was referenced by `UploadTrack`'s JSON-Schema
|
|
10046
8464
|
* via the `create.schema` link.
|
|
@@ -10067,7 +8485,6 @@ export type UploadTrackCreateSchema = {
|
|
|
10067
8485
|
*/
|
|
10068
8486
|
closed_captions?: null | boolean;
|
|
10069
8487
|
};
|
|
10070
|
-
|
|
10071
8488
|
/**
|
|
10072
8489
|
* This interface was referenced by `UploadTrack`'s JSON-Schema
|
|
10073
8490
|
* via the `generate_subtitles.schema` link.
|
|
@@ -10083,7 +8500,6 @@ export type UploadTrackGenerateSubtitlesSchema = {
|
|
|
10083
8500
|
*/
|
|
10084
8501
|
language_code: string;
|
|
10085
8502
|
};
|
|
10086
|
-
|
|
10087
8503
|
/**
|
|
10088
8504
|
* You can create scheduled publication to publish records in the future
|
|
10089
8505
|
*
|
|
@@ -10138,7 +8554,6 @@ export type ScheduledPublicationAttributes = {
|
|
|
10138
8554
|
non_localized_content: boolean;
|
|
10139
8555
|
};
|
|
10140
8556
|
};
|
|
10141
|
-
|
|
10142
8557
|
/**
|
|
10143
8558
|
* JSON API links
|
|
10144
8559
|
*
|
|
@@ -10148,7 +8563,6 @@ export type ScheduledPublicationAttributes = {
|
|
|
10148
8563
|
export type ScheduledPublicationRelationships = {
|
|
10149
8564
|
item: ItemData;
|
|
10150
8565
|
};
|
|
10151
|
-
|
|
10152
8566
|
/**
|
|
10153
8567
|
* This interface was referenced by `ScheduledPublication`'s JSON-Schema
|
|
10154
8568
|
* via the `create.schema` link.
|
|
@@ -10173,7 +8587,6 @@ export type ScheduledPublicationCreateSchema = {
|
|
|
10173
8587
|
non_localized_content: boolean;
|
|
10174
8588
|
};
|
|
10175
8589
|
};
|
|
10176
|
-
|
|
10177
8590
|
/**
|
|
10178
8591
|
* You can create a scheduled unpublishing to unpublish records in the future
|
|
10179
8592
|
*
|
|
@@ -10210,7 +8623,6 @@ export type ScheduledUnpublishingAttributes = {
|
|
|
10210
8623
|
*/
|
|
10211
8624
|
content_in_locales: null | string[];
|
|
10212
8625
|
};
|
|
10213
|
-
|
|
10214
8626
|
/**
|
|
10215
8627
|
* JSON API links
|
|
10216
8628
|
*
|
|
@@ -10220,7 +8632,6 @@ export type ScheduledUnpublishingAttributes = {
|
|
|
10220
8632
|
export type ScheduledUnpublishingRelationships = {
|
|
10221
8633
|
item: ItemData;
|
|
10222
8634
|
};
|
|
10223
|
-
|
|
10224
8635
|
/**
|
|
10225
8636
|
* This interface was referenced by `ScheduledUnpublishing`'s JSON-Schema
|
|
10226
8637
|
* via the `create.schema` link.
|
|
@@ -10236,7 +8647,6 @@ export type ScheduledUnpublishingCreateSchema = {
|
|
|
10236
8647
|
*/
|
|
10237
8648
|
content_in_locales?: null | string[];
|
|
10238
8649
|
};
|
|
10239
|
-
|
|
10240
8650
|
/**
|
|
10241
8651
|
* 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
8652
|
*
|
|
@@ -10267,7 +8677,6 @@ export type SearchResult = {
|
|
|
10267
8677
|
body?: string[] | null;
|
|
10268
8678
|
};
|
|
10269
8679
|
};
|
|
10270
|
-
|
|
10271
8680
|
/**
|
|
10272
8681
|
* JSON API data
|
|
10273
8682
|
*
|
|
@@ -10278,7 +8687,6 @@ export type SearchResultData = {
|
|
|
10278
8687
|
type: SearchResultType;
|
|
10279
8688
|
id: SearchResultIdentity;
|
|
10280
8689
|
};
|
|
10281
|
-
|
|
10282
8690
|
/**
|
|
10283
8691
|
* JSON API attributes
|
|
10284
8692
|
*
|
|
@@ -10307,7 +8715,6 @@ export type SearchResultAttributes = {
|
|
|
10307
8715
|
body?: string[] | null;
|
|
10308
8716
|
};
|
|
10309
8717
|
};
|
|
10310
|
-
|
|
10311
8718
|
/**
|
|
10312
8719
|
* [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
8720
|
*
|
|
@@ -10377,7 +8784,6 @@ export type EnvironmentMeta = {
|
|
|
10377
8784
|
*/
|
|
10378
8785
|
forked_from: string | null;
|
|
10379
8786
|
};
|
|
10380
|
-
|
|
10381
8787
|
/**
|
|
10382
8788
|
* JSON API data
|
|
10383
8789
|
*
|
|
@@ -10388,7 +8794,6 @@ export type EnvironmentData = {
|
|
|
10388
8794
|
type: EnvironmentType;
|
|
10389
8795
|
id: EnvironmentIdentity;
|
|
10390
8796
|
};
|
|
10391
|
-
|
|
10392
8797
|
/**
|
|
10393
8798
|
* This interface was referenced by `Environment`'s JSON-Schema
|
|
10394
8799
|
* via the `fork.schema` link.
|
|
@@ -10400,7 +8805,6 @@ export type EnvironmentForkSchema = {
|
|
|
10400
8805
|
id: string;
|
|
10401
8806
|
type?: EnvironmentType;
|
|
10402
8807
|
};
|
|
10403
|
-
|
|
10404
8808
|
/**
|
|
10405
8809
|
* This interface was referenced by `Environment`'s JSON-Schema
|
|
10406
8810
|
* via the `rename.schema` link.
|
|
@@ -10412,7 +8816,6 @@ export type EnvironmentRenameSchema = {
|
|
|
10412
8816
|
id: string;
|
|
10413
8817
|
type?: EnvironmentType;
|
|
10414
8818
|
};
|
|
10415
|
-
|
|
10416
8819
|
/**
|
|
10417
8820
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
10418
8821
|
* via the `definition` "maintenance_mode".
|
|
@@ -10438,7 +8841,6 @@ export type MaintenanceModeData = {
|
|
|
10438
8841
|
type: MaintenanceModeType;
|
|
10439
8842
|
id: MaintenanceModeIdentity;
|
|
10440
8843
|
};
|
|
10441
|
-
|
|
10442
8844
|
/**
|
|
10443
8845
|
* JSON API attributes
|
|
10444
8846
|
*
|
|
@@ -10451,7 +8853,6 @@ export type MaintenanceModeAttributes = {
|
|
|
10451
8853
|
*/
|
|
10452
8854
|
active: boolean;
|
|
10453
8855
|
};
|
|
10454
|
-
|
|
10455
8856
|
/**
|
|
10456
8857
|
* A webhook allows to make requests following certain Dato events. It is linked to a Role, which describes what actions can be performed.
|
|
10457
8858
|
*
|
|
@@ -10556,7 +8957,6 @@ export type WebhookData = {
|
|
|
10556
8957
|
type: WebhookType;
|
|
10557
8958
|
id: WebhookIdentity;
|
|
10558
8959
|
};
|
|
10559
|
-
|
|
10560
8960
|
/**
|
|
10561
8961
|
* JSON API attributes
|
|
10562
8962
|
*
|
|
@@ -10645,7 +9045,6 @@ export type WebhookAttributes = {
|
|
|
10645
9045
|
*/
|
|
10646
9046
|
auto_retry: boolean;
|
|
10647
9047
|
};
|
|
10648
|
-
|
|
10649
9048
|
/**
|
|
10650
9049
|
* This interface was referenced by `Webhook`'s JSON-Schema
|
|
10651
9050
|
* via the `create.schema` link.
|
|
@@ -10733,7 +9132,6 @@ export type WebhookCreateSchema = {
|
|
|
10733
9132
|
*/
|
|
10734
9133
|
auto_retry?: boolean;
|
|
10735
9134
|
};
|
|
10736
|
-
|
|
10737
9135
|
/**
|
|
10738
9136
|
* This interface was referenced by `Webhook`'s JSON-Schema
|
|
10739
9137
|
* via the `update.schema` link.
|
|
@@ -10822,7 +9220,6 @@ export type WebhookUpdateSchema = {
|
|
|
10822
9220
|
*/
|
|
10823
9221
|
auto_retry?: boolean;
|
|
10824
9222
|
};
|
|
10825
|
-
|
|
10826
9223
|
/**
|
|
10827
9224
|
* This represents a log entry in the webhooks activity list, detailing a specific webhook event along with its delivery attempt information.
|
|
10828
9225
|
*
|
|
@@ -10920,7 +9317,6 @@ export type WebhookCallData = {
|
|
|
10920
9317
|
type: WebhookCallType;
|
|
10921
9318
|
id: WebhookCallIdentity;
|
|
10922
9319
|
};
|
|
10923
|
-
|
|
10924
9320
|
/**
|
|
10925
9321
|
* JSON API attributes
|
|
10926
9322
|
*
|
|
@@ -11004,7 +9400,6 @@ export type WebhookCallAttributes = {
|
|
|
11004
9400
|
*/
|
|
11005
9401
|
status: 'pending' | 'success' | 'failed' | 'rescheduled';
|
|
11006
9402
|
};
|
|
11007
|
-
|
|
11008
9403
|
/**
|
|
11009
9404
|
* JSON API links
|
|
11010
9405
|
*
|
|
@@ -11014,7 +9409,6 @@ export type WebhookCallAttributes = {
|
|
|
11014
9409
|
export type WebhookCallRelationships = {
|
|
11015
9410
|
webhook: WebhookData;
|
|
11016
9411
|
};
|
|
11017
|
-
|
|
11018
9412
|
/**
|
|
11019
9413
|
* Configuration for different build triggers. You can have different staging and production environments in order to test your site before final deploy
|
|
11020
9414
|
*
|
|
@@ -11129,7 +9523,6 @@ export type BuildTriggerAttributes = {
|
|
|
11129
9523
|
*/
|
|
11130
9524
|
indexing_enabled: boolean;
|
|
11131
9525
|
};
|
|
11132
|
-
|
|
11133
9526
|
/**
|
|
11134
9527
|
* This interface was referenced by `BuildTrigger`'s JSON-Schema
|
|
11135
9528
|
* via the `create.schema` link.
|
|
@@ -11167,7 +9560,6 @@ export type BuildTriggerCreateSchema = {
|
|
|
11167
9560
|
[k: string]: unknown;
|
|
11168
9561
|
};
|
|
11169
9562
|
};
|
|
11170
|
-
|
|
11171
9563
|
/**
|
|
11172
9564
|
* This interface was referenced by `BuildTrigger`'s JSON-Schema
|
|
11173
9565
|
* via the `update.schema` link.
|
|
@@ -11202,7 +9594,6 @@ export type BuildTriggerUpdateSchema = {
|
|
|
11202
9594
|
[k: string]: unknown;
|
|
11203
9595
|
};
|
|
11204
9596
|
};
|
|
11205
|
-
|
|
11206
9597
|
/**
|
|
11207
9598
|
* In DatoCMS you can create filters to help you (and other editors) quickly search for records
|
|
11208
9599
|
*
|
|
@@ -11316,7 +9707,6 @@ export type ItemTypeFilterAttributes = {
|
|
|
11316
9707
|
*/
|
|
11317
9708
|
shared: boolean;
|
|
11318
9709
|
};
|
|
11319
|
-
|
|
11320
9710
|
/**
|
|
11321
9711
|
* JSON API links
|
|
11322
9712
|
*
|
|
@@ -11326,7 +9716,6 @@ export type ItemTypeFilterAttributes = {
|
|
|
11326
9716
|
export type ItemTypeFilterRelationships = {
|
|
11327
9717
|
item_type: ItemTypeData;
|
|
11328
9718
|
};
|
|
11329
|
-
|
|
11330
9719
|
/**
|
|
11331
9720
|
* This interface was referenced by `ItemTypeFilter`'s JSON-Schema
|
|
11332
9721
|
* via the `create.schema` link.
|
|
@@ -11381,7 +9770,6 @@ export type ItemTypeFilterCreateSchema = {
|
|
|
11381
9770
|
shared?: boolean;
|
|
11382
9771
|
item_type: ItemTypeData;
|
|
11383
9772
|
};
|
|
11384
|
-
|
|
11385
9773
|
/**
|
|
11386
9774
|
* This interface was referenced by `ItemTypeFilter`'s JSON-Schema
|
|
11387
9775
|
* via the `update.schema` link.
|
|
@@ -11436,7 +9824,6 @@ export type ItemTypeFilterUpdateSchema = {
|
|
|
11436
9824
|
};
|
|
11437
9825
|
item_type?: ItemTypeData;
|
|
11438
9826
|
};
|
|
11439
|
-
|
|
11440
9827
|
/**
|
|
11441
9828
|
* In DatoCMS you can create filters to help you (and other editors) quickly search for uploads
|
|
11442
9829
|
*
|
|
@@ -11475,7 +9862,6 @@ export type UploadFilterData = {
|
|
|
11475
9862
|
type: UploadFilterType;
|
|
11476
9863
|
id: UploadFilterIdentity;
|
|
11477
9864
|
};
|
|
11478
|
-
|
|
11479
9865
|
/**
|
|
11480
9866
|
* JSON API attributes
|
|
11481
9867
|
*
|
|
@@ -11498,7 +9884,6 @@ export type UploadFilterAttributes = {
|
|
|
11498
9884
|
*/
|
|
11499
9885
|
shared: boolean;
|
|
11500
9886
|
};
|
|
11501
|
-
|
|
11502
9887
|
/**
|
|
11503
9888
|
* This interface was referenced by `UploadFilter`'s JSON-Schema
|
|
11504
9889
|
* via the `create.schema` link.
|
|
@@ -11521,7 +9906,6 @@ export type UploadFilterCreateSchema = {
|
|
|
11521
9906
|
*/
|
|
11522
9907
|
shared: boolean;
|
|
11523
9908
|
};
|
|
11524
|
-
|
|
11525
9909
|
/**
|
|
11526
9910
|
* This interface was referenced by `UploadFilter`'s JSON-Schema
|
|
11527
9911
|
* via the `update.schema` link.
|
|
@@ -11544,7 +9928,6 @@ export type UploadFilterUpdateSchema = {
|
|
|
11544
9928
|
[k: string]: unknown;
|
|
11545
9929
|
};
|
|
11546
9930
|
};
|
|
11547
|
-
|
|
11548
9931
|
/**
|
|
11549
9932
|
* 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
9933
|
*
|
|
@@ -11583,7 +9966,6 @@ export type SiteInvitationData = {
|
|
|
11583
9966
|
type: SiteInvitationType;
|
|
11584
9967
|
id: SiteInvitationIdentity;
|
|
11585
9968
|
};
|
|
11586
|
-
|
|
11587
9969
|
/**
|
|
11588
9970
|
* JSON API attributes
|
|
11589
9971
|
*
|
|
@@ -11604,7 +9986,6 @@ export type SiteInvitationAttributes = {
|
|
|
11604
9986
|
*/
|
|
11605
9987
|
invitation_link?: null | string;
|
|
11606
9988
|
};
|
|
11607
|
-
|
|
11608
9989
|
/**
|
|
11609
9990
|
* JSON API links
|
|
11610
9991
|
*
|
|
@@ -11614,7 +9995,6 @@ export type SiteInvitationAttributes = {
|
|
|
11614
9995
|
export type SiteInvitationRelationships = {
|
|
11615
9996
|
role: RoleData;
|
|
11616
9997
|
};
|
|
11617
|
-
|
|
11618
9998
|
/**
|
|
11619
9999
|
* This interface was referenced by `SiteInvitation`'s JSON-Schema
|
|
11620
10000
|
* via the `create.schema` link.
|
|
@@ -11627,7 +10007,6 @@ export type SiteInvitationCreateSchema = {
|
|
|
11627
10007
|
email: string;
|
|
11628
10008
|
role: RoleData;
|
|
11629
10009
|
};
|
|
11630
|
-
|
|
11631
10010
|
/**
|
|
11632
10011
|
* This interface was referenced by `SiteInvitation`'s JSON-Schema
|
|
11633
10012
|
* via the `update.schema` link.
|
|
@@ -11637,7 +10016,6 @@ export type SiteInvitationUpdateSchema = {
|
|
|
11637
10016
|
type?: SiteInvitationType;
|
|
11638
10017
|
role?: RoleData;
|
|
11639
10018
|
};
|
|
11640
|
-
|
|
11641
10019
|
/**
|
|
11642
10020
|
* Session track users movements in the administrative area, and allows locking a record when editing it.
|
|
11643
10021
|
*
|
|
@@ -11675,7 +10053,6 @@ export type EditingSessionData = {
|
|
|
11675
10053
|
type: EditingSessionType;
|
|
11676
10054
|
id: EditingSessionIdentity;
|
|
11677
10055
|
};
|
|
11678
|
-
|
|
11679
10056
|
/**
|
|
11680
10057
|
* JSON API attributes
|
|
11681
10058
|
*
|
|
@@ -11692,7 +10069,6 @@ export type EditingSessionAttributes = {
|
|
|
11692
10069
|
*/
|
|
11693
10070
|
locked_at: string | null;
|
|
11694
10071
|
};
|
|
11695
|
-
|
|
11696
10072
|
/**
|
|
11697
10073
|
* JSON API links
|
|
11698
10074
|
*
|
|
@@ -11709,7 +10085,6 @@ export type EditingSessionRelationships = {
|
|
|
11709
10085
|
| SsoUserData
|
|
11710
10086
|
| OrganizationData;
|
|
11711
10087
|
};
|
|
11712
|
-
|
|
11713
10088
|
/**
|
|
11714
10089
|
* Form contents for an editing session
|
|
11715
10090
|
*
|
|
@@ -11724,7 +10099,6 @@ export type FormData = {
|
|
|
11724
10099
|
};
|
|
11725
10100
|
editor: AccountData;
|
|
11726
10101
|
};
|
|
11727
|
-
|
|
11728
10102
|
/**
|
|
11729
10103
|
* JSON API data
|
|
11730
10104
|
*
|
|
@@ -11735,7 +10109,6 @@ export type FormDataData = {
|
|
|
11735
10109
|
type: FormDataType;
|
|
11736
10110
|
id: FormDataIdentity;
|
|
11737
10111
|
};
|
|
11738
|
-
|
|
11739
10112
|
/**
|
|
11740
10113
|
* JSON API attributes
|
|
11741
10114
|
*
|
|
@@ -11747,7 +10120,6 @@ export type FormDataAttributes = {
|
|
|
11747
10120
|
[k: string]: unknown;
|
|
11748
10121
|
};
|
|
11749
10122
|
};
|
|
11750
|
-
|
|
11751
10123
|
/**
|
|
11752
10124
|
* JSON API links
|
|
11753
10125
|
*
|
|
@@ -11757,7 +10129,6 @@ export type FormDataAttributes = {
|
|
|
11757
10129
|
export type FormDataRelationships = {
|
|
11758
10130
|
editor: AccountData;
|
|
11759
10131
|
};
|
|
11760
|
-
|
|
11761
10132
|
/**
|
|
11762
10133
|
* 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
10134
|
*
|
|
@@ -11797,7 +10168,6 @@ export type SsoGroupAttributes = {
|
|
|
11797
10168
|
*/
|
|
11798
10169
|
priority: number;
|
|
11799
10170
|
};
|
|
11800
|
-
|
|
11801
10171
|
/**
|
|
11802
10172
|
* JSON API links
|
|
11803
10173
|
*
|
|
@@ -11808,7 +10178,6 @@ export type SsoGroupRelationships = {
|
|
|
11808
10178
|
role: RoleData;
|
|
11809
10179
|
users: SsoUserData[];
|
|
11810
10180
|
};
|
|
11811
|
-
|
|
11812
10181
|
/**
|
|
11813
10182
|
* This interface was referenced by `SsoGroup`'s JSON-Schema
|
|
11814
10183
|
* via the `update.schema` link.
|
|
@@ -11822,7 +10191,6 @@ export type SsoGroupUpdateSchema = {
|
|
|
11822
10191
|
priority: number;
|
|
11823
10192
|
role: RoleData;
|
|
11824
10193
|
};
|
|
11825
|
-
|
|
11826
10194
|
/**
|
|
11827
10195
|
* Represents the Single Sign-on settings of the current DatoCMS project
|
|
11828
10196
|
*
|
|
@@ -11878,7 +10246,6 @@ export type SsoSettingsData = {
|
|
|
11878
10246
|
type: SsoSettingsType;
|
|
11879
10247
|
id: SsoSettingsIdentity;
|
|
11880
10248
|
};
|
|
11881
|
-
|
|
11882
10249
|
/**
|
|
11883
10250
|
* JSON API attributes
|
|
11884
10251
|
*
|
|
@@ -11919,7 +10286,6 @@ export type SsoSettingsAttributes = {
|
|
|
11919
10286
|
*/
|
|
11920
10287
|
scim_api_token?: string;
|
|
11921
10288
|
};
|
|
11922
|
-
|
|
11923
10289
|
/**
|
|
11924
10290
|
* JSON API links
|
|
11925
10291
|
*
|
|
@@ -11929,7 +10295,6 @@ export type SsoSettingsAttributes = {
|
|
|
11929
10295
|
export type SsoSettingsRelationships = {
|
|
11930
10296
|
default_role: null | RoleData;
|
|
11931
10297
|
};
|
|
11932
|
-
|
|
11933
10298
|
/**
|
|
11934
10299
|
* This interface was referenced by `SsoSettings`'s JSON-Schema
|
|
11935
10300
|
* via the `generate_token.targetSchema` link.
|
|
@@ -11945,7 +10310,6 @@ export type SsoSettingsGenerateTokenTargetSchema = {
|
|
|
11945
10310
|
};
|
|
11946
10311
|
[k: string]: unknown;
|
|
11947
10312
|
};
|
|
11948
|
-
|
|
11949
10313
|
/**
|
|
11950
10314
|
* This interface was referenced by `SsoSettings`'s JSON-Schema
|
|
11951
10315
|
* via the `update.schema` link.
|
|
@@ -11963,7 +10327,6 @@ export type SsoSettingsUpdateSchema = {
|
|
|
11963
10327
|
idp_saml_metadata_xml?: null | string;
|
|
11964
10328
|
default_role?: RoleData;
|
|
11965
10329
|
};
|
|
11966
|
-
|
|
11967
10330
|
/**
|
|
11968
10331
|
* The entity suggests several emojis that are connected to a specific term
|
|
11969
10332
|
*
|
|
@@ -11989,7 +10352,6 @@ export type EmojiSuggestionsData = {
|
|
|
11989
10352
|
type: EmojiSuggestionsType;
|
|
11990
10353
|
id: EmojiSuggestionsIdentity;
|
|
11991
10354
|
};
|
|
11992
|
-
|
|
11993
10355
|
/**
|
|
11994
10356
|
* JSON API attributes
|
|
11995
10357
|
*
|
|
@@ -12002,7 +10364,6 @@ export type EmojiSuggestionsAttributes = {
|
|
|
12002
10364
|
*/
|
|
12003
10365
|
emojis: string[];
|
|
12004
10366
|
};
|
|
12005
|
-
|
|
12006
10367
|
/**
|
|
12007
10368
|
* Represents the white-label settings of the current DatoCMS project
|
|
12008
10369
|
*
|
|
@@ -12029,7 +10390,6 @@ export type WhiteLabelSettingsData = {
|
|
|
12029
10390
|
type: WhiteLabelSettingsType;
|
|
12030
10391
|
id: WhiteLabelSettingsIdentity;
|
|
12031
10392
|
};
|
|
12032
|
-
|
|
12033
10393
|
/**
|
|
12034
10394
|
* JSON API attributes
|
|
12035
10395
|
*
|
|
@@ -12042,7 +10402,6 @@ export type WhiteLabelSettingsAttributes = {
|
|
|
12042
10402
|
*/
|
|
12043
10403
|
custom_i18n_messages_template_url: null | string;
|
|
12044
10404
|
};
|
|
12045
|
-
|
|
12046
10405
|
/**
|
|
12047
10406
|
* This interface was referenced by `WhiteLabelSettings`'s JSON-Schema
|
|
12048
10407
|
* via the `update.schema` link.
|
|
@@ -12055,7 +10414,6 @@ export type WhiteLabelSettingsUpdateSchema = {
|
|
|
12055
10414
|
*/
|
|
12056
10415
|
custom_i18n_messages_template_url?: null | string;
|
|
12057
10416
|
};
|
|
12058
|
-
|
|
12059
10417
|
/**
|
|
12060
10418
|
* Info that can be accessed by unauthorized users
|
|
12061
10419
|
*
|
|
@@ -12136,7 +10494,6 @@ export type PublicInfoData = {
|
|
|
12136
10494
|
type: PublicInfoType;
|
|
12137
10495
|
id: PublicInfoIdentity;
|
|
12138
10496
|
};
|
|
12139
|
-
|
|
12140
10497
|
/**
|
|
12141
10498
|
* JSON API attributes
|
|
12142
10499
|
*
|
|
@@ -12204,7 +10561,6 @@ export type PublicInfoAttributes = {
|
|
|
12204
10561
|
[k: string]: unknown;
|
|
12205
10562
|
};
|
|
12206
10563
|
};
|
|
12207
|
-
|
|
12208
10564
|
/**
|
|
12209
10565
|
* DatoCMS resources usage organized by day
|
|
12210
10566
|
*
|
|
@@ -12251,7 +10607,6 @@ export type DailyUsage = {
|
|
|
12251
10607
|
*/
|
|
12252
10608
|
mux_encoded_seconds: number;
|
|
12253
10609
|
};
|
|
12254
|
-
|
|
12255
10610
|
/**
|
|
12256
10611
|
* JSON API data
|
|
12257
10612
|
*
|
|
@@ -12262,7 +10617,6 @@ export type DailyUsageData = {
|
|
|
12262
10617
|
type: DailyUsageType;
|
|
12263
10618
|
id: DailyUsageIdentity;
|
|
12264
10619
|
};
|
|
12265
|
-
|
|
12266
10620
|
/**
|
|
12267
10621
|
* JSON API attributes
|
|
12268
10622
|
*
|
|
@@ -12307,7 +10661,6 @@ export type DailyUsageAttributes = {
|
|
|
12307
10661
|
*/
|
|
12308
10662
|
mux_encoded_seconds: number;
|
|
12309
10663
|
};
|
|
12310
|
-
|
|
12311
10664
|
/**
|
|
12312
10665
|
* 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
10666
|
*
|
|
@@ -12339,7 +10692,6 @@ export type UsageCounterData = {
|
|
|
12339
10692
|
type: UsageCounterType;
|
|
12340
10693
|
id: UsageCounterIdentity;
|
|
12341
10694
|
};
|
|
12342
|
-
|
|
12343
10695
|
/**
|
|
12344
10696
|
* JSON API attributes
|
|
12345
10697
|
*
|
|
@@ -12358,7 +10710,6 @@ export type UsageCounterAttributes = {
|
|
|
12358
10710
|
counter: number;
|
|
12359
10711
|
}[];
|
|
12360
10712
|
};
|
|
12361
|
-
|
|
12362
10713
|
/**
|
|
12363
10714
|
* All the project's upload tags
|
|
12364
10715
|
*
|
|
@@ -12384,7 +10735,6 @@ export type UploadTagData = {
|
|
|
12384
10735
|
type: UploadTagType;
|
|
12385
10736
|
id: UploadTagIdentity;
|
|
12386
10737
|
};
|
|
12387
|
-
|
|
12388
10738
|
/**
|
|
12389
10739
|
* JSON API attributes
|
|
12390
10740
|
*
|
|
@@ -12397,7 +10747,6 @@ export type UploadTagAttributes = {
|
|
|
12397
10747
|
*/
|
|
12398
10748
|
name: string;
|
|
12399
10749
|
};
|
|
12400
|
-
|
|
12401
10750
|
/**
|
|
12402
10751
|
* This interface was referenced by `UploadTag`'s JSON-Schema
|
|
12403
10752
|
* via the `create.schema` link.
|
|
@@ -12409,7 +10758,6 @@ export type UploadTagCreateSchema = {
|
|
|
12409
10758
|
*/
|
|
12410
10759
|
name: string;
|
|
12411
10760
|
};
|
|
12412
|
-
|
|
12413
10761
|
/**
|
|
12414
10762
|
* All the site's upload automatically generated tags
|
|
12415
10763
|
*
|
|
@@ -12424,7 +10772,6 @@ export type UploadSmartTag = {
|
|
|
12424
10772
|
*/
|
|
12425
10773
|
name: string;
|
|
12426
10774
|
};
|
|
12427
|
-
|
|
12428
10775
|
/**
|
|
12429
10776
|
* JSON API data
|
|
12430
10777
|
*
|
|
@@ -12435,7 +10782,6 @@ export type UploadSmartTagData = {
|
|
|
12435
10782
|
type: UploadSmartTagType;
|
|
12436
10783
|
id: UploadSmartTagIdentity;
|
|
12437
10784
|
};
|
|
12438
|
-
|
|
12439
10785
|
/**
|
|
12440
10786
|
* JSON API attributes
|
|
12441
10787
|
*
|
|
@@ -12448,7 +10794,6 @@ export type UploadSmartTagAttributes = {
|
|
|
12448
10794
|
*/
|
|
12449
10795
|
name: string;
|
|
12450
10796
|
};
|
|
12451
|
-
|
|
12452
10797
|
/**
|
|
12453
10798
|
* A site represents a specific DatoCMS administrative area
|
|
12454
10799
|
*
|
|
@@ -12684,7 +11029,6 @@ export type SiteMeta = {
|
|
|
12684
11029
|
*/
|
|
12685
11030
|
improved_exposure_of_inline_blocks_in_cda: boolean;
|
|
12686
11031
|
};
|
|
12687
|
-
|
|
12688
11032
|
/**
|
|
12689
11033
|
* JSON API data
|
|
12690
11034
|
*
|
|
@@ -12695,7 +11039,6 @@ export type SiteData = {
|
|
|
12695
11039
|
type: SiteType;
|
|
12696
11040
|
id: SiteIdentity;
|
|
12697
11041
|
};
|
|
12698
|
-
|
|
12699
11042
|
/**
|
|
12700
11043
|
* JSON API attributes
|
|
12701
11044
|
*
|
|
@@ -12863,7 +11206,6 @@ export type SiteAttributes = {
|
|
|
12863
11206
|
[k: string]: unknown;
|
|
12864
11207
|
} | null;
|
|
12865
11208
|
};
|
|
12866
|
-
|
|
12867
11209
|
/**
|
|
12868
11210
|
* JSON API links
|
|
12869
11211
|
*
|
|
@@ -12878,7 +11220,6 @@ export type SiteRelationships = {
|
|
|
12878
11220
|
*/
|
|
12879
11221
|
item_types: ItemTypeData[];
|
|
12880
11222
|
};
|
|
12881
|
-
|
|
12882
11223
|
/**
|
|
12883
11224
|
* This interface was referenced by `Site`'s JSON-Schema
|
|
12884
11225
|
* via the `update.schema` link.
|
|
@@ -13044,7 +11385,6 @@ export type SiteUpdateSchema = {
|
|
|
13044
11385
|
improved_exposure_of_inline_blocks_in_cda?: boolean;
|
|
13045
11386
|
};
|
|
13046
11387
|
};
|
|
13047
|
-
|
|
13048
11388
|
/**
|
|
13049
11389
|
* This interface was referenced by `Site`'s JSON-Schema
|
|
13050
11390
|
* via the `update_assets_cdn_default_settings.schema` link.
|
|
@@ -13083,7 +11423,6 @@ export type SiteUpdateAssetsCdnDefaultSettingsSchema = {
|
|
|
13083
11423
|
};
|
|
13084
11424
|
};
|
|
13085
11425
|
};
|
|
13086
|
-
|
|
13087
11426
|
/**
|
|
13088
11427
|
* 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
11428
|
*
|
|
@@ -13203,7 +11542,6 @@ export type WorkflowAttributes = {
|
|
|
13203
11542
|
}[],
|
|
13204
11543
|
];
|
|
13205
11544
|
};
|
|
13206
|
-
|
|
13207
11545
|
/**
|
|
13208
11546
|
* This interface was referenced by `Workflow`'s JSON-Schema
|
|
13209
11547
|
* via the `create.schema` link.
|
|
@@ -13261,7 +11599,6 @@ export type WorkflowCreateSchema = {
|
|
|
13261
11599
|
}[],
|
|
13262
11600
|
];
|
|
13263
11601
|
};
|
|
13264
|
-
|
|
13265
11602
|
/**
|
|
13266
11603
|
* This interface was referenced by `Workflow`'s JSON-Schema
|
|
13267
11604
|
* via the `update.schema` link.
|