@storyblok/management-api-client 0.2.3 → 1.0.0-alpha.1
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/dist/client.cjs +190 -0
- package/dist/client.cjs.map +1 -0
- package/dist/client.d.cts +624 -0
- package/dist/client.d.mts +624 -0
- package/dist/client.mjs +189 -0
- package/dist/client.mjs.map +1 -0
- package/dist/error.cjs.map +1 -1
- package/dist/error.d.cts +12 -2
- package/dist/error.d.mts +12 -2
- package/dist/error.mjs.map +1 -1
- package/dist/generated/asset_folders/types.gen.d.cts +5 -31
- package/dist/generated/asset_folders/types.gen.d.mts +5 -31
- package/dist/generated/assets/types.gen.d.cts +1 -73
- package/dist/generated/assets/types.gen.d.mts +1 -73
- package/dist/generated/component_folders/types.gen.d.cts +29 -45
- package/dist/generated/component_folders/types.gen.d.mts +29 -45
- package/dist/generated/components/types.gen.d.cts +636 -465
- package/dist/generated/components/types.gen.d.mts +636 -465
- package/dist/generated/datasource_entries/types.gen.d.cts +6 -32
- package/dist/generated/datasource_entries/types.gen.d.mts +6 -32
- package/dist/generated/datasources/types.gen.d.cts +18 -39
- package/dist/generated/datasources/types.gen.d.mts +18 -39
- package/dist/generated/internal_tags/types.gen.d.cts +28 -32
- package/dist/generated/internal_tags/types.gen.d.mts +28 -32
- package/dist/generated/presets/types.gen.d.cts +53 -58
- package/dist/generated/presets/types.gen.d.mts +53 -58
- package/dist/generated/spaces/types.gen.d.cts +1 -41
- package/dist/generated/spaces/types.gen.d.mts +1 -41
- package/dist/generated/stories/types.gen.d.cts +206 -198
- package/dist/generated/stories/types.gen.d.mts +206 -198
- package/dist/generated/users/types.gen.d.cts +13 -112
- package/dist/generated/users/types.gen.d.mts +13 -112
- package/dist/index.cjs +3 -178
- package/dist/index.d.cts +8 -425
- package/dist/index.d.mts +8 -425
- package/dist/index.mjs +2 -176
- package/dist/resources/asset-folders.cjs.map +1 -1
- package/dist/resources/asset-folders.mjs.map +1 -1
- package/dist/resources/assets.cjs +11 -2
- package/dist/resources/assets.cjs.map +1 -1
- package/dist/resources/assets.d.cts +3 -2
- package/dist/resources/assets.d.mts +3 -2
- package/dist/resources/assets.mjs +11 -2
- package/dist/resources/assets.mjs.map +1 -1
- package/dist/resources/component-folders.cjs.map +1 -1
- package/dist/resources/component-folders.mjs.map +1 -1
- package/dist/resources/components.cjs.map +1 -1
- package/dist/resources/components.mjs.map +1 -1
- package/dist/resources/datasource-entries.cjs.map +1 -1
- package/dist/resources/datasource-entries.mjs.map +1 -1
- package/dist/resources/datasources.cjs.map +1 -1
- package/dist/resources/datasources.mjs.map +1 -1
- package/dist/resources/internal-tags.cjs.map +1 -1
- package/dist/resources/internal-tags.mjs.map +1 -1
- package/dist/resources/presets.cjs.map +1 -1
- package/dist/resources/presets.mjs.map +1 -1
- package/dist/resources/spaces.cjs.map +1 -1
- package/dist/resources/spaces.mjs.map +1 -1
- package/dist/resources/stories.cjs.map +1 -1
- package/dist/resources/stories.d.cts +105 -0
- package/dist/resources/stories.d.mts +105 -0
- package/dist/resources/stories.mjs.map +1 -1
- package/dist/resources/users.cjs.map +1 -1
- package/dist/resources/users.mjs.map +1 -1
- package/package.json +13 -10
- package/test/GUIDE.md +59 -0
- package/test/setup.e2e.ts +11 -0
- package/test/specs/mapi-round-trip.spec.e2e.ts +520 -0
- package/vitest.config.e2e.ts +26 -0
- package/vitest.config.ts +3 -0
- package/dist/index.cjs.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/types.d.cts +0 -130
- package/dist/types.d.mts +0 -130
|
@@ -1,21 +1,302 @@
|
|
|
1
1
|
//#region src/generated/components/types.gen.d.ts
|
|
2
|
-
type Component = Component2;
|
|
3
2
|
/**
|
|
4
|
-
* A component
|
|
3
|
+
* A Storyblok component object representing a content type
|
|
4
|
+
*/
|
|
5
|
+
type Component = {
|
|
6
|
+
/**
|
|
7
|
+
* The numeric ID
|
|
8
|
+
*/
|
|
9
|
+
readonly id: number;
|
|
10
|
+
/**
|
|
11
|
+
* Technical name used for component property in entries
|
|
12
|
+
*/
|
|
13
|
+
name: string;
|
|
14
|
+
/**
|
|
15
|
+
* Name that will be used in the editor interface
|
|
16
|
+
*/
|
|
17
|
+
display_name?: string | null;
|
|
18
|
+
/**
|
|
19
|
+
* Creation date
|
|
20
|
+
*/
|
|
21
|
+
readonly created_at: string;
|
|
22
|
+
/**
|
|
23
|
+
* Latest update date
|
|
24
|
+
*/
|
|
25
|
+
readonly updated_at: string;
|
|
26
|
+
/**
|
|
27
|
+
* Component schema definition containing fields and their configurations
|
|
28
|
+
*/
|
|
29
|
+
schema: {
|
|
30
|
+
[key: string]: ComponentSchemaField;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* URL to the preview image
|
|
34
|
+
*/
|
|
35
|
+
image?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* The field that is for preview in the interface (Preview Field)
|
|
38
|
+
*/
|
|
39
|
+
preview_field?: string | null;
|
|
40
|
+
/**
|
|
41
|
+
* Whether the component can be used as a root component
|
|
42
|
+
*/
|
|
43
|
+
is_root?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Preview template for the component
|
|
46
|
+
*/
|
|
47
|
+
preview_tmpl?: string | null;
|
|
48
|
+
/**
|
|
49
|
+
* True if the component is nestable (insertable) in block field types
|
|
50
|
+
*/
|
|
51
|
+
is_nestable?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* An array of presets for this component
|
|
54
|
+
*/
|
|
55
|
+
all_presets?: Array<{
|
|
56
|
+
/**
|
|
57
|
+
* The numeric ID of the preset
|
|
58
|
+
*/
|
|
59
|
+
id?: number;
|
|
60
|
+
/**
|
|
61
|
+
* Name of the preset
|
|
62
|
+
*/
|
|
63
|
+
name?: string;
|
|
64
|
+
/**
|
|
65
|
+
* The ID of the component the preset is for
|
|
66
|
+
*/
|
|
67
|
+
component_id?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Link to the preview image of the preset
|
|
70
|
+
*/
|
|
71
|
+
image?: string | null;
|
|
72
|
+
/**
|
|
73
|
+
* Icon selected for the preset
|
|
74
|
+
*/
|
|
75
|
+
icon?: string | null;
|
|
76
|
+
/**
|
|
77
|
+
* Color of the icon selected for the preset
|
|
78
|
+
*/
|
|
79
|
+
color?: string | null;
|
|
80
|
+
/**
|
|
81
|
+
* The description of the preset
|
|
82
|
+
*/
|
|
83
|
+
description?: string;
|
|
84
|
+
}>;
|
|
85
|
+
/**
|
|
86
|
+
* ID of the preset currently selected for this component
|
|
87
|
+
*/
|
|
88
|
+
preset_id?: number | null;
|
|
89
|
+
/**
|
|
90
|
+
* Duplicated technical name or display name, used for internal tasks
|
|
91
|
+
*/
|
|
92
|
+
real_name?: string;
|
|
93
|
+
/**
|
|
94
|
+
* The component folder ID of the component
|
|
95
|
+
*/
|
|
96
|
+
component_group_uuid?: string;
|
|
97
|
+
/**
|
|
98
|
+
* The color of the icon selected for the component
|
|
99
|
+
*/
|
|
100
|
+
color?: string | null;
|
|
101
|
+
/**
|
|
102
|
+
* Icon selected for the component
|
|
103
|
+
*/
|
|
104
|
+
icon?: string | null;
|
|
105
|
+
/**
|
|
106
|
+
* List of internal tags assigned to the component
|
|
107
|
+
*/
|
|
108
|
+
internal_tags_list?: Array<{
|
|
109
|
+
/**
|
|
110
|
+
* Tag ID
|
|
111
|
+
*/
|
|
112
|
+
id?: number;
|
|
113
|
+
/**
|
|
114
|
+
* Tag name
|
|
115
|
+
*/
|
|
116
|
+
name?: string;
|
|
117
|
+
}>;
|
|
118
|
+
/**
|
|
119
|
+
* List of IDs of the tags assigned to the component
|
|
120
|
+
*/
|
|
121
|
+
internal_tag_ids?: Array<string>;
|
|
122
|
+
/**
|
|
123
|
+
* Asset preview field (Preview Card) for a content type component
|
|
124
|
+
*/
|
|
125
|
+
content_type_asset_preview?: string | null;
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* A component schema field — discriminated union on `type`.
|
|
129
|
+
*/
|
|
130
|
+
type ComponentSchemaField = ({
|
|
131
|
+
type: 'text';
|
|
132
|
+
} & TextField) | ({
|
|
133
|
+
type: 'textarea';
|
|
134
|
+
} & TextareaField) | ({
|
|
135
|
+
type: 'richtext';
|
|
136
|
+
} & RichtextField) | ({
|
|
137
|
+
type: 'markdown';
|
|
138
|
+
} & MarkdownField) | ({
|
|
139
|
+
type: 'number';
|
|
140
|
+
} & NumberField) | ({
|
|
141
|
+
type: 'datetime';
|
|
142
|
+
} & DatetimeField) | ({
|
|
143
|
+
type: 'boolean';
|
|
144
|
+
} & BooleanField) | ({
|
|
145
|
+
type: 'option';
|
|
146
|
+
} & OptionField) | ({
|
|
147
|
+
type: 'options';
|
|
148
|
+
} & OptionsField) | ({
|
|
149
|
+
type: 'asset';
|
|
150
|
+
} & AssetField) | ({
|
|
151
|
+
type: 'multiasset';
|
|
152
|
+
} & MultiassetField) | ({
|
|
153
|
+
type: 'multilink';
|
|
154
|
+
} & MultilinkField) | ({
|
|
155
|
+
type: 'bloks';
|
|
156
|
+
} & BloksField) | ({
|
|
157
|
+
type: 'table';
|
|
158
|
+
} & TableField) | ({
|
|
159
|
+
type: 'section';
|
|
160
|
+
} & SectionField) | ({
|
|
161
|
+
type: 'tab';
|
|
162
|
+
} & TabField) | ({
|
|
163
|
+
type: 'custom';
|
|
164
|
+
} & CustomField);
|
|
165
|
+
/**
|
|
166
|
+
* Input for creating a component.
|
|
5
167
|
*/
|
|
6
|
-
type
|
|
168
|
+
type ComponentCreate = {
|
|
7
169
|
/**
|
|
8
|
-
*
|
|
170
|
+
* Technical name used for component property in entries
|
|
171
|
+
*/
|
|
172
|
+
name: string;
|
|
173
|
+
/**
|
|
174
|
+
* Name that will be used in the editor interface
|
|
175
|
+
*/
|
|
176
|
+
display_name?: string | null;
|
|
177
|
+
/**
|
|
178
|
+
* Component schema definition containing fields and their configurations
|
|
179
|
+
*/
|
|
180
|
+
schema?: {
|
|
181
|
+
[key: string]: ComponentSchemaField;
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* Whether the component can be used as a root component
|
|
185
|
+
*/
|
|
186
|
+
is_root?: boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Whether the component is nestable in block field types
|
|
189
|
+
*/
|
|
190
|
+
is_nestable?: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* The component folder UUID
|
|
193
|
+
*/
|
|
194
|
+
component_group_uuid?: string;
|
|
195
|
+
/**
|
|
196
|
+
* Icon color
|
|
197
|
+
*/
|
|
198
|
+
color?: string;
|
|
199
|
+
/**
|
|
200
|
+
* Icon name
|
|
201
|
+
*/
|
|
202
|
+
icon?: string;
|
|
203
|
+
/**
|
|
204
|
+
* The field used for preview in the interface
|
|
205
|
+
*/
|
|
206
|
+
preview_field?: string;
|
|
207
|
+
/**
|
|
208
|
+
* IDs of internal tags to assign
|
|
209
|
+
*/
|
|
210
|
+
internal_tag_ids?: Array<string>;
|
|
211
|
+
};
|
|
212
|
+
/**
|
|
213
|
+
* Input for updating a component.
|
|
214
|
+
*/
|
|
215
|
+
type ComponentUpdate = {
|
|
216
|
+
/**
|
|
217
|
+
* Technical name used for component property in entries
|
|
218
|
+
*/
|
|
219
|
+
name?: string;
|
|
220
|
+
/**
|
|
221
|
+
* Name that will be used in the editor interface
|
|
222
|
+
*/
|
|
223
|
+
display_name?: string | null;
|
|
224
|
+
/**
|
|
225
|
+
* Component schema definition containing fields and their configurations
|
|
226
|
+
*/
|
|
227
|
+
schema?: {
|
|
228
|
+
[key: string]: ComponentSchemaField;
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* Whether the component can be used as a root component
|
|
232
|
+
*/
|
|
233
|
+
is_root?: boolean;
|
|
234
|
+
/**
|
|
235
|
+
* Whether the component is nestable in block field types
|
|
236
|
+
*/
|
|
237
|
+
is_nestable?: boolean;
|
|
238
|
+
/**
|
|
239
|
+
* The component folder UUID
|
|
240
|
+
*/
|
|
241
|
+
component_group_uuid?: string;
|
|
242
|
+
/**
|
|
243
|
+
* Icon color
|
|
244
|
+
*/
|
|
245
|
+
color?: string;
|
|
246
|
+
/**
|
|
247
|
+
* Icon name
|
|
248
|
+
*/
|
|
249
|
+
icon?: string;
|
|
250
|
+
/**
|
|
251
|
+
* The field used for preview in the interface
|
|
252
|
+
*/
|
|
253
|
+
preview_field?: string;
|
|
254
|
+
/**
|
|
255
|
+
* IDs of internal tags to assign
|
|
256
|
+
*/
|
|
257
|
+
internal_tag_ids?: Array<string>;
|
|
258
|
+
};
|
|
259
|
+
/**
|
|
260
|
+
* Universal identity and display properties shared by every field type
|
|
261
|
+
*/
|
|
262
|
+
type BaseField = {
|
|
263
|
+
/**
|
|
264
|
+
* Field type discriminant
|
|
9
265
|
*/
|
|
10
266
|
type?: string;
|
|
11
267
|
/**
|
|
12
|
-
*
|
|
268
|
+
* The ID of the field
|
|
13
269
|
*/
|
|
14
|
-
|
|
270
|
+
id?: string;
|
|
15
271
|
/**
|
|
16
272
|
* Human-readable display name
|
|
17
273
|
*/
|
|
18
274
|
display_name?: string;
|
|
275
|
+
/**
|
|
276
|
+
* Field description displayed in the editor
|
|
277
|
+
*/
|
|
278
|
+
description?: string;
|
|
279
|
+
/**
|
|
280
|
+
* Whether to display the description as a tooltip
|
|
281
|
+
*/
|
|
282
|
+
tooltip?: boolean;
|
|
283
|
+
/**
|
|
284
|
+
* Position of the field within the block
|
|
285
|
+
*/
|
|
286
|
+
pos?: number;
|
|
287
|
+
/**
|
|
288
|
+
* Conditions set on the field for conditional visibility
|
|
289
|
+
*/
|
|
290
|
+
conditional_settings?: Array<{
|
|
291
|
+
[key: string]: unknown;
|
|
292
|
+
}>;
|
|
293
|
+
};
|
|
294
|
+
/**
|
|
295
|
+
* Properties shared by content-bearing fields (i.e. fields that hold a value).
|
|
296
|
+
* Layout-only field types like `section` and `tab` do not include these.
|
|
297
|
+
*
|
|
298
|
+
*/
|
|
299
|
+
type ValueField = {
|
|
19
300
|
/**
|
|
20
301
|
* Whether the field is required
|
|
21
302
|
*/
|
|
@@ -24,48 +305,72 @@ type ComponentSchemaField = {
|
|
|
24
305
|
* Regular expression for validation
|
|
25
306
|
*/
|
|
26
307
|
regex?: string;
|
|
308
|
+
/**
|
|
309
|
+
* Default value for the field (can be escaped JSON)
|
|
310
|
+
*/
|
|
311
|
+
default_value?: string;
|
|
27
312
|
/**
|
|
28
313
|
* Whether the field is translatable
|
|
29
314
|
*/
|
|
30
315
|
translatable?: boolean;
|
|
31
316
|
/**
|
|
32
|
-
*
|
|
317
|
+
* Exclude the field from translation exports
|
|
33
318
|
*/
|
|
34
|
-
|
|
319
|
+
no_translate?: boolean;
|
|
35
320
|
/**
|
|
36
|
-
*
|
|
321
|
+
* Exclude the field from AI translations
|
|
37
322
|
*/
|
|
38
|
-
|
|
323
|
+
exclude_from_ai_translation?: boolean;
|
|
39
324
|
/**
|
|
40
|
-
*
|
|
325
|
+
* Exclude the field when merging (Dimensions App)
|
|
41
326
|
*/
|
|
42
|
-
|
|
43
|
-
_uid?: string;
|
|
44
|
-
name?: string;
|
|
45
|
-
value?: string;
|
|
46
|
-
}>;
|
|
327
|
+
exclude_from_merge?: boolean;
|
|
47
328
|
/**
|
|
48
|
-
*
|
|
329
|
+
* Exclude the field when overwriting (Dimensions App)
|
|
49
330
|
*/
|
|
50
|
-
|
|
331
|
+
exclude_from_overwrite?: boolean;
|
|
51
332
|
/**
|
|
52
|
-
*
|
|
333
|
+
* Overwrite the field when merging (Dimensions App)
|
|
53
334
|
*/
|
|
54
|
-
|
|
335
|
+
force_merge?: boolean;
|
|
336
|
+
};
|
|
337
|
+
type TextField = BaseField & ValueField & {
|
|
55
338
|
/**
|
|
56
|
-
*
|
|
339
|
+
* Field type discriminant
|
|
57
340
|
*/
|
|
58
|
-
|
|
341
|
+
type: 'text';
|
|
59
342
|
/**
|
|
60
|
-
*
|
|
343
|
+
* Maximum length of the input string
|
|
61
344
|
*/
|
|
62
|
-
|
|
345
|
+
max_length?: number;
|
|
63
346
|
/**
|
|
64
|
-
*
|
|
347
|
+
* Maximum length for text fields (legacy alias for max_length)
|
|
65
348
|
*/
|
|
66
|
-
|
|
349
|
+
maxlength?: number;
|
|
350
|
+
/**
|
|
351
|
+
* Minimum length for text fields
|
|
352
|
+
*/
|
|
353
|
+
minlength?: number;
|
|
354
|
+
/**
|
|
355
|
+
* Field size (small, medium, large)
|
|
356
|
+
*/
|
|
357
|
+
size?: string;
|
|
67
358
|
/**
|
|
68
|
-
*
|
|
359
|
+
* Whether to enable right-to-left text direction
|
|
360
|
+
*/
|
|
361
|
+
rtl?: boolean;
|
|
362
|
+
};
|
|
363
|
+
type TextareaField = BaseField & ValueField & {
|
|
364
|
+
/**
|
|
365
|
+
* Field type discriminant
|
|
366
|
+
*/
|
|
367
|
+
type: 'textarea';
|
|
368
|
+
/**
|
|
369
|
+
* Maximum length of the input string
|
|
370
|
+
*/
|
|
371
|
+
max_length?: number;
|
|
372
|
+
/**
|
|
373
|
+
* Maximum length for text fields (legacy alias for max_length)
|
|
69
374
|
*/
|
|
70
375
|
maxlength?: number;
|
|
71
376
|
/**
|
|
@@ -73,9 +378,13 @@ type ComponentSchemaField = {
|
|
|
73
378
|
*/
|
|
74
379
|
minlength?: number;
|
|
75
380
|
/**
|
|
76
|
-
*
|
|
381
|
+
* Field size (small, medium, large)
|
|
382
|
+
*/
|
|
383
|
+
size?: string;
|
|
384
|
+
/**
|
|
385
|
+
* Whether to enable right-to-left text direction
|
|
77
386
|
*/
|
|
78
|
-
|
|
387
|
+
rtl?: boolean;
|
|
79
388
|
/**
|
|
80
389
|
* Whether rich text is enabled
|
|
81
390
|
*/
|
|
@@ -84,532 +393,520 @@ type ComponentSchemaField = {
|
|
|
84
393
|
* Whether markdown is enabled
|
|
85
394
|
*/
|
|
86
395
|
markdown?: boolean;
|
|
396
|
+
};
|
|
397
|
+
type RichtextField = BaseField & ValueField & {
|
|
87
398
|
/**
|
|
88
|
-
* Field
|
|
399
|
+
* Field type discriminant
|
|
89
400
|
*/
|
|
90
|
-
|
|
401
|
+
type: 'richtext';
|
|
91
402
|
/**
|
|
92
|
-
*
|
|
403
|
+
* Whether to allow toolbar customization
|
|
93
404
|
*/
|
|
94
|
-
|
|
405
|
+
customize_toolbar?: boolean;
|
|
95
406
|
/**
|
|
96
|
-
*
|
|
407
|
+
* Array of enabled toolbar elements
|
|
97
408
|
*/
|
|
98
|
-
|
|
409
|
+
toolbar?: Array<'ai-complete' | 'ai-shorten' | 'ai-extend' | 'ai-rephrase' | 'ai-summarize' | 'ai-simplify' | 'ai-tone' | 'ai-emoji' | 'ai-translate' | 'ai-tldr' | 'ai-spelling' | 'blok' | 'ltr' | 'rtl' | 'export' | 'import' | 'bold' | 'list' | 'inlinecode' | 'code' | 'color' | 'copy' | 'cut' | 'emoji' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'highlight' | 'unset' | 'hrule' | 'image' | 'italic' | 'link' | 'anchor' | 'olist' | 'paragraph' | 'paste-action' | 'paste' | 'quote' | 'redo' | 'strike' | 'subscript' | 'superscript' | 'underline' | 'undo' | 'align-left' | 'align-center' | 'align-right' | 'align-justify'>;
|
|
99
410
|
/**
|
|
100
|
-
*
|
|
411
|
+
* Custom CSS styles for the richtext field
|
|
101
412
|
*/
|
|
102
|
-
|
|
413
|
+
style_options?: Array<{
|
|
414
|
+
_uid?: string;
|
|
415
|
+
name?: string;
|
|
416
|
+
value?: string;
|
|
417
|
+
}>;
|
|
103
418
|
/**
|
|
104
|
-
*
|
|
419
|
+
* Restriction type for component selection (groups, tags, or empty for specific blocks)
|
|
105
420
|
*/
|
|
106
|
-
|
|
421
|
+
restrict_type?: string;
|
|
107
422
|
/**
|
|
108
|
-
*
|
|
423
|
+
* Whether to restrict which components can be inserted
|
|
109
424
|
*/
|
|
110
425
|
restrict_components?: boolean;
|
|
111
426
|
/**
|
|
112
|
-
*
|
|
113
|
-
*/
|
|
114
|
-
restrict_type?: 'groups' | 'tags' | '';
|
|
115
|
-
/**
|
|
116
|
-
* An array of nestable or universal type block names allowed inside Blocks, Link, and Richtext fields
|
|
427
|
+
* List of allowed component names
|
|
117
428
|
*/
|
|
118
429
|
component_whitelist?: Array<string>;
|
|
119
430
|
/**
|
|
120
|
-
*
|
|
431
|
+
* List of denied component names
|
|
121
432
|
*/
|
|
122
433
|
component_denylist?: Array<string>;
|
|
123
434
|
/**
|
|
124
|
-
*
|
|
435
|
+
* List of allowed tag IDs for component filtering
|
|
436
|
+
*/
|
|
437
|
+
component_tag_whitelist?: Array<number>;
|
|
438
|
+
/**
|
|
439
|
+
* List of denied tag IDs for component filtering
|
|
440
|
+
*/
|
|
441
|
+
component_tag_denylist?: Array<number>;
|
|
442
|
+
/**
|
|
443
|
+
* List of allowed component group UUIDs
|
|
125
444
|
*/
|
|
126
445
|
component_group_whitelist?: Array<string>;
|
|
127
446
|
/**
|
|
128
|
-
*
|
|
447
|
+
* List of denied component group UUIDs
|
|
129
448
|
*/
|
|
130
449
|
component_group_denylist?: Array<string>;
|
|
131
450
|
/**
|
|
132
|
-
*
|
|
451
|
+
* Whether to allow links to open in a new tab
|
|
133
452
|
*/
|
|
134
|
-
|
|
453
|
+
allow_target_blank?: boolean;
|
|
135
454
|
/**
|
|
136
|
-
*
|
|
455
|
+
* Whether to allow custom link attributes
|
|
137
456
|
*/
|
|
138
|
-
|
|
457
|
+
allow_custom_attributes?: boolean;
|
|
458
|
+
};
|
|
459
|
+
type MarkdownField = BaseField & ValueField & {
|
|
139
460
|
/**
|
|
140
|
-
*
|
|
461
|
+
* Field type discriminant
|
|
141
462
|
*/
|
|
142
|
-
|
|
463
|
+
type: 'markdown';
|
|
143
464
|
/**
|
|
144
|
-
*
|
|
465
|
+
* Whether to display markdown as rich text
|
|
145
466
|
*/
|
|
146
|
-
|
|
467
|
+
rich_markdown?: boolean;
|
|
147
468
|
/**
|
|
148
|
-
* Whether to
|
|
469
|
+
* Whether to enable right-to-left text direction
|
|
149
470
|
*/
|
|
150
|
-
|
|
471
|
+
rtl?: boolean;
|
|
151
472
|
/**
|
|
152
|
-
*
|
|
473
|
+
* Whether to enable a customized toolbar
|
|
153
474
|
*/
|
|
154
|
-
|
|
475
|
+
customize_toolbar?: boolean;
|
|
155
476
|
/**
|
|
156
|
-
*
|
|
477
|
+
* Array of enabled toolbar elements
|
|
157
478
|
*/
|
|
158
|
-
|
|
479
|
+
toolbar?: Array<'bold' | 'italic' | 'inlinecode' | 'code' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'list' | 'olist' | 'quote' | 'hrule' | 'link' | 'image' | 'paragraph' | 'help' | 'toggle-richtext' | 'auto' | 'ltr' | 'rtl'>;
|
|
159
480
|
/**
|
|
160
|
-
*
|
|
481
|
+
* Whether to allow empty paragraphs
|
|
161
482
|
*/
|
|
162
|
-
|
|
483
|
+
allow_multiline?: boolean;
|
|
163
484
|
/**
|
|
164
|
-
*
|
|
485
|
+
* Maximum length of the input string
|
|
165
486
|
*/
|
|
166
|
-
|
|
487
|
+
max_length?: number;
|
|
488
|
+
};
|
|
489
|
+
type NumberField = BaseField & ValueField & {
|
|
167
490
|
/**
|
|
168
|
-
*
|
|
491
|
+
* Field type discriminant
|
|
169
492
|
*/
|
|
170
|
-
|
|
493
|
+
type: 'number';
|
|
171
494
|
/**
|
|
172
|
-
*
|
|
495
|
+
* Minimum value allowed
|
|
173
496
|
*/
|
|
174
|
-
|
|
497
|
+
min_value?: number;
|
|
175
498
|
/**
|
|
176
|
-
*
|
|
499
|
+
* Maximum value allowed
|
|
177
500
|
*/
|
|
178
|
-
|
|
501
|
+
max_value?: number;
|
|
179
502
|
/**
|
|
180
|
-
*
|
|
503
|
+
* Number of decimal places
|
|
181
504
|
*/
|
|
182
|
-
|
|
505
|
+
decimals?: number;
|
|
183
506
|
/**
|
|
184
|
-
*
|
|
507
|
+
* Step size for the number input
|
|
185
508
|
*/
|
|
186
|
-
|
|
509
|
+
steps?: number;
|
|
510
|
+
};
|
|
511
|
+
type DatetimeField = BaseField & ValueField & {
|
|
187
512
|
/**
|
|
188
|
-
*
|
|
513
|
+
* Field type discriminant
|
|
189
514
|
*/
|
|
190
|
-
|
|
515
|
+
type: 'datetime';
|
|
191
516
|
/**
|
|
192
|
-
*
|
|
517
|
+
* Whether to disable time selection (date-only mode)
|
|
193
518
|
*/
|
|
194
|
-
|
|
519
|
+
disable_time?: boolean;
|
|
520
|
+
};
|
|
521
|
+
type BooleanField = BaseField & ValueField & {
|
|
195
522
|
/**
|
|
196
|
-
*
|
|
523
|
+
* Field type discriminant
|
|
197
524
|
*/
|
|
198
|
-
|
|
525
|
+
type: 'boolean';
|
|
199
526
|
/**
|
|
200
|
-
*
|
|
527
|
+
* Whether to display the label next to the toggle
|
|
201
528
|
*/
|
|
202
|
-
|
|
529
|
+
inline_label?: boolean;
|
|
530
|
+
};
|
|
531
|
+
type OptionField = BaseField & ValueField & {
|
|
203
532
|
/**
|
|
204
|
-
*
|
|
533
|
+
* Field type discriminant
|
|
205
534
|
*/
|
|
206
|
-
|
|
535
|
+
type: 'option';
|
|
207
536
|
/**
|
|
208
|
-
*
|
|
537
|
+
* Array of selectable options
|
|
209
538
|
*/
|
|
210
|
-
|
|
539
|
+
options?: Array<{
|
|
540
|
+
_uid?: string;
|
|
541
|
+
name?: string;
|
|
542
|
+
value?: string;
|
|
543
|
+
}>;
|
|
211
544
|
/**
|
|
212
|
-
*
|
|
545
|
+
* Source of the options (undefined=self, internal_stories, internal_languages, external, internal)
|
|
213
546
|
*/
|
|
214
|
-
|
|
547
|
+
source?: string;
|
|
215
548
|
/**
|
|
216
|
-
*
|
|
549
|
+
* Datasource slug when source is internal
|
|
217
550
|
*/
|
|
218
|
-
|
|
551
|
+
datasource_slug?: string;
|
|
219
552
|
/**
|
|
220
|
-
*
|
|
553
|
+
* External datasource JSON URL when source is external
|
|
221
554
|
*/
|
|
222
|
-
|
|
555
|
+
external_datasource?: string;
|
|
223
556
|
/**
|
|
224
|
-
*
|
|
557
|
+
* Path of allowed stories folder when source is internal_stories
|
|
225
558
|
*/
|
|
226
|
-
|
|
559
|
+
folder_slug?: string;
|
|
227
560
|
/**
|
|
228
|
-
*
|
|
561
|
+
* Allowed content type blocks when source is internal_stories
|
|
229
562
|
*/
|
|
230
|
-
|
|
563
|
+
filter_content_type?: Array<string>;
|
|
231
564
|
/**
|
|
232
|
-
*
|
|
565
|
+
* Whether to exclude the empty option
|
|
233
566
|
*/
|
|
234
|
-
|
|
567
|
+
exclude_empty_option?: boolean;
|
|
235
568
|
/**
|
|
236
|
-
*
|
|
569
|
+
* Whether to include an empty option
|
|
237
570
|
*/
|
|
238
|
-
|
|
571
|
+
include_empty_option?: boolean;
|
|
239
572
|
/**
|
|
240
|
-
*
|
|
573
|
+
* Whether to use UUID for the option value
|
|
241
574
|
*/
|
|
242
|
-
|
|
575
|
+
use_uuid?: boolean;
|
|
243
576
|
/**
|
|
244
|
-
*
|
|
577
|
+
* Display appearance (link or card) when source is internal_stories
|
|
245
578
|
*/
|
|
246
|
-
|
|
579
|
+
entry_appearance?: string;
|
|
247
580
|
/**
|
|
248
|
-
*
|
|
581
|
+
* Whether to allow advanced search in a modal when source is internal_stories
|
|
249
582
|
*/
|
|
250
|
-
|
|
583
|
+
allow_advanced_search?: boolean;
|
|
251
584
|
/**
|
|
252
|
-
*
|
|
585
|
+
* Maximum number of selectable options
|
|
253
586
|
*/
|
|
254
|
-
|
|
587
|
+
max_options?: string;
|
|
255
588
|
/**
|
|
256
|
-
*
|
|
589
|
+
* Minimum number of selectable options
|
|
257
590
|
*/
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
591
|
+
min_options?: string;
|
|
592
|
+
/**
|
|
593
|
+
* Whether multiple values are allowed
|
|
594
|
+
*/
|
|
595
|
+
multiple?: boolean;
|
|
596
|
+
};
|
|
597
|
+
type OptionsField = BaseField & ValueField & {
|
|
598
|
+
/**
|
|
599
|
+
* Field type discriminant
|
|
600
|
+
*/
|
|
601
|
+
type: 'options';
|
|
602
|
+
/**
|
|
603
|
+
* Array of selectable options
|
|
604
|
+
*/
|
|
605
|
+
options?: Array<{
|
|
262
606
|
_uid?: string;
|
|
263
|
-
/**
|
|
264
|
-
* The style's name
|
|
265
|
-
*/
|
|
266
607
|
name?: string;
|
|
267
|
-
/**
|
|
268
|
-
* The style's value
|
|
269
|
-
*/
|
|
270
608
|
value?: string;
|
|
271
609
|
}>;
|
|
272
610
|
/**
|
|
273
|
-
*
|
|
611
|
+
* Source of the options (undefined=self, internal_stories, internal_languages, external, internal)
|
|
274
612
|
*/
|
|
275
|
-
|
|
613
|
+
source?: string;
|
|
276
614
|
/**
|
|
277
|
-
*
|
|
615
|
+
* Datasource slug when source is internal
|
|
278
616
|
*/
|
|
279
|
-
|
|
617
|
+
datasource_slug?: string;
|
|
280
618
|
/**
|
|
281
|
-
*
|
|
619
|
+
* External datasource JSON URL when source is external
|
|
282
620
|
*/
|
|
283
|
-
|
|
621
|
+
external_datasource?: string;
|
|
284
622
|
/**
|
|
285
|
-
*
|
|
623
|
+
* Path of allowed stories folder when source is internal_stories
|
|
286
624
|
*/
|
|
287
|
-
|
|
625
|
+
folder_slug?: string;
|
|
288
626
|
/**
|
|
289
|
-
*
|
|
627
|
+
* Allowed content type blocks when source is internal_stories
|
|
290
628
|
*/
|
|
291
|
-
|
|
629
|
+
filter_content_type?: Array<string>;
|
|
292
630
|
/**
|
|
293
|
-
*
|
|
631
|
+
* Whether to use UUID for the option values
|
|
294
632
|
*/
|
|
295
|
-
|
|
633
|
+
use_uuid?: boolean;
|
|
296
634
|
/**
|
|
297
|
-
*
|
|
635
|
+
* Whether this Multi-Options field is a References field
|
|
298
636
|
*/
|
|
299
|
-
|
|
637
|
+
is_reference_type?: boolean;
|
|
300
638
|
/**
|
|
301
|
-
*
|
|
639
|
+
* Display appearance (link or card) when source is internal_stories
|
|
302
640
|
*/
|
|
303
|
-
|
|
641
|
+
entry_appearance?: string;
|
|
304
642
|
/**
|
|
305
|
-
*
|
|
643
|
+
* Whether to allow advanced search in a modal when source is internal_stories
|
|
306
644
|
*/
|
|
307
|
-
|
|
645
|
+
allow_advanced_search?: boolean;
|
|
308
646
|
/**
|
|
309
|
-
*
|
|
647
|
+
* Maximum number of selectable options
|
|
310
648
|
*/
|
|
311
|
-
|
|
649
|
+
max_options?: string;
|
|
312
650
|
/**
|
|
313
|
-
*
|
|
651
|
+
* Minimum number of selectable options
|
|
314
652
|
*/
|
|
315
|
-
|
|
653
|
+
min_options?: string;
|
|
316
654
|
/**
|
|
317
|
-
*
|
|
655
|
+
* Whether multiple values are allowed
|
|
318
656
|
*/
|
|
319
|
-
|
|
657
|
+
multiple?: boolean;
|
|
658
|
+
};
|
|
659
|
+
type AssetField = BaseField & ValueField & {
|
|
320
660
|
/**
|
|
321
|
-
*
|
|
661
|
+
* Field type discriminant
|
|
322
662
|
*/
|
|
323
|
-
|
|
663
|
+
type: 'asset';
|
|
324
664
|
/**
|
|
325
|
-
*
|
|
665
|
+
* Allowed file types (images, videos, audios, texts)
|
|
326
666
|
*/
|
|
327
|
-
|
|
667
|
+
filetypes?: Array<string>;
|
|
328
668
|
/**
|
|
329
|
-
*
|
|
669
|
+
* Numeric ID of the allowed asset folder
|
|
330
670
|
*/
|
|
331
|
-
|
|
671
|
+
asset_folder_id?: number;
|
|
332
672
|
/**
|
|
333
|
-
*
|
|
673
|
+
* Whether to allow external URLs
|
|
334
674
|
*/
|
|
335
|
-
|
|
675
|
+
allow_external_url?: boolean;
|
|
336
676
|
/**
|
|
337
|
-
*
|
|
677
|
+
* Field height in pixels
|
|
338
678
|
*/
|
|
339
|
-
|
|
340
|
-
[key: string]: unknown;
|
|
341
|
-
}>;
|
|
679
|
+
height?: number;
|
|
342
680
|
/**
|
|
343
|
-
*
|
|
681
|
+
* Field width in pixels
|
|
344
682
|
*/
|
|
345
|
-
|
|
683
|
+
width?: number;
|
|
346
684
|
/**
|
|
347
|
-
*
|
|
685
|
+
* Whether to restrict assets
|
|
348
686
|
*/
|
|
349
|
-
|
|
687
|
+
restrict_assets?: boolean;
|
|
350
688
|
/**
|
|
351
|
-
*
|
|
689
|
+
* List of allowed asset types
|
|
352
690
|
*/
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
*/
|
|
357
|
-
url?: string;
|
|
358
|
-
/**
|
|
359
|
-
* API headers
|
|
360
|
-
*/
|
|
361
|
-
headers?: {
|
|
362
|
-
[key: string]: unknown;
|
|
363
|
-
};
|
|
364
|
-
/**
|
|
365
|
-
* API parameters
|
|
366
|
-
*/
|
|
367
|
-
params?: {
|
|
368
|
-
[key: string]: unknown;
|
|
369
|
-
};
|
|
370
|
-
};
|
|
691
|
+
asset_whitelist?: Array<string>;
|
|
692
|
+
};
|
|
693
|
+
type MultiassetField = BaseField & ValueField & {
|
|
371
694
|
/**
|
|
372
|
-
*
|
|
695
|
+
* Field type discriminant
|
|
373
696
|
*/
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
* Fieldset title
|
|
377
|
-
*/
|
|
378
|
-
title?: string;
|
|
379
|
-
/**
|
|
380
|
-
* Fieldset description
|
|
381
|
-
*/
|
|
382
|
-
description?: string;
|
|
383
|
-
/**
|
|
384
|
-
* Whether the fieldset is collapsible
|
|
385
|
-
*/
|
|
386
|
-
collapsible?: boolean;
|
|
387
|
-
/**
|
|
388
|
-
* Whether the fieldset is collapsed by default
|
|
389
|
-
*/
|
|
390
|
-
collapsed?: boolean;
|
|
391
|
-
};
|
|
392
|
-
};
|
|
393
|
-
type ComponentCreate = ComponentCreate2;
|
|
394
|
-
type ComponentUpdate = ComponentUpdate2;
|
|
395
|
-
/**
|
|
396
|
-
* A Storyblok component object representing a content type
|
|
397
|
-
*/
|
|
398
|
-
type Component2 = {
|
|
697
|
+
type: 'multiasset';
|
|
399
698
|
/**
|
|
400
|
-
*
|
|
699
|
+
* Allowed file types (images, videos, audios, texts)
|
|
401
700
|
*/
|
|
402
|
-
|
|
701
|
+
filetypes?: Array<string>;
|
|
403
702
|
/**
|
|
404
|
-
*
|
|
703
|
+
* Numeric ID of the allowed asset folder
|
|
405
704
|
*/
|
|
406
|
-
|
|
705
|
+
asset_folder_id?: number;
|
|
407
706
|
/**
|
|
408
|
-
*
|
|
707
|
+
* Whether to allow external URLs
|
|
708
|
+
*/
|
|
709
|
+
allow_external_url?: boolean;
|
|
710
|
+
/**
|
|
711
|
+
* Field height in pixels
|
|
712
|
+
*/
|
|
713
|
+
height?: number;
|
|
714
|
+
/**
|
|
715
|
+
* Field width in pixels
|
|
716
|
+
*/
|
|
717
|
+
width?: number;
|
|
718
|
+
/**
|
|
719
|
+
* Whether to restrict assets
|
|
409
720
|
*/
|
|
410
|
-
|
|
721
|
+
restrict_assets?: boolean;
|
|
411
722
|
/**
|
|
412
|
-
*
|
|
723
|
+
* List of allowed asset types
|
|
413
724
|
*/
|
|
414
|
-
|
|
725
|
+
asset_whitelist?: Array<string>;
|
|
415
726
|
/**
|
|
416
|
-
*
|
|
727
|
+
* Maximum number of entries
|
|
417
728
|
*/
|
|
418
|
-
|
|
729
|
+
maximum_entries?: number;
|
|
419
730
|
/**
|
|
420
|
-
*
|
|
731
|
+
* Minimum number of entries
|
|
421
732
|
*/
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
733
|
+
minimum_entries?: number;
|
|
734
|
+
};
|
|
735
|
+
type MultilinkField = BaseField & ValueField & {
|
|
425
736
|
/**
|
|
426
|
-
*
|
|
737
|
+
* Field type discriminant
|
|
427
738
|
*/
|
|
428
|
-
|
|
739
|
+
type: 'multilink';
|
|
429
740
|
/**
|
|
430
|
-
*
|
|
741
|
+
* Whether to restrict linkable content types
|
|
431
742
|
*/
|
|
432
|
-
|
|
743
|
+
restrict_content_types?: boolean;
|
|
433
744
|
/**
|
|
434
|
-
*
|
|
745
|
+
* List of allowed content type blocks for internal links
|
|
435
746
|
*/
|
|
436
|
-
|
|
747
|
+
component_whitelist?: Array<string>;
|
|
437
748
|
/**
|
|
438
|
-
*
|
|
749
|
+
* Whether to allow opening links in a new tab
|
|
439
750
|
*/
|
|
440
|
-
|
|
751
|
+
allow_target_blank?: boolean;
|
|
441
752
|
/**
|
|
442
|
-
*
|
|
753
|
+
* Whether to allow setting custom link attributes
|
|
443
754
|
*/
|
|
444
|
-
|
|
755
|
+
allow_custom_attributes?: boolean;
|
|
445
756
|
/**
|
|
446
|
-
*
|
|
757
|
+
* Whether to restrict to a specific folder
|
|
447
758
|
*/
|
|
448
|
-
|
|
449
|
-
/**
|
|
450
|
-
* The numeric ID of the preset
|
|
451
|
-
*/
|
|
452
|
-
id?: number;
|
|
453
|
-
/**
|
|
454
|
-
* Name of the preset
|
|
455
|
-
*/
|
|
456
|
-
name?: string;
|
|
457
|
-
/**
|
|
458
|
-
* The ID of the component the preset is for
|
|
459
|
-
*/
|
|
460
|
-
component_id?: number;
|
|
461
|
-
/**
|
|
462
|
-
* Link to the preview image of the preset
|
|
463
|
-
*/
|
|
464
|
-
image?: string | null;
|
|
465
|
-
/**
|
|
466
|
-
* Icon selected for the preset
|
|
467
|
-
*/
|
|
468
|
-
icon?: string;
|
|
469
|
-
/**
|
|
470
|
-
* Color of the icon selected for the preset
|
|
471
|
-
*/
|
|
472
|
-
color?: string;
|
|
473
|
-
/**
|
|
474
|
-
* The description of the preset
|
|
475
|
-
*/
|
|
476
|
-
description?: string;
|
|
477
|
-
}>;
|
|
759
|
+
force_link_scope?: boolean;
|
|
478
760
|
/**
|
|
479
|
-
*
|
|
761
|
+
* Path of the allowed folder when force_link_scope is true
|
|
480
762
|
*/
|
|
481
|
-
|
|
763
|
+
link_scope?: string;
|
|
482
764
|
/**
|
|
483
|
-
*
|
|
765
|
+
* Whether to allow defining an anchor ID for internal links
|
|
484
766
|
*/
|
|
485
|
-
|
|
767
|
+
show_anchor?: boolean;
|
|
486
768
|
/**
|
|
487
|
-
*
|
|
769
|
+
* Whether to allow specifying an email address
|
|
488
770
|
*/
|
|
489
|
-
|
|
771
|
+
email_link_type?: boolean;
|
|
490
772
|
/**
|
|
491
|
-
*
|
|
773
|
+
* Whether to allow specifying an asset URL
|
|
492
774
|
*/
|
|
493
|
-
|
|
775
|
+
asset_link_type?: boolean;
|
|
776
|
+
};
|
|
777
|
+
type BloksField = BaseField & ValueField & {
|
|
494
778
|
/**
|
|
495
|
-
*
|
|
779
|
+
* Field type discriminant
|
|
496
780
|
*/
|
|
497
|
-
|
|
781
|
+
type: 'bloks';
|
|
498
782
|
/**
|
|
499
|
-
*
|
|
783
|
+
* Restriction type for component selection (groups, tags, or empty for specific blocks)
|
|
500
784
|
*/
|
|
501
|
-
|
|
502
|
-
/**
|
|
503
|
-
* Tag ID
|
|
504
|
-
*/
|
|
505
|
-
id?: number;
|
|
506
|
-
/**
|
|
507
|
-
* Tag name
|
|
508
|
-
*/
|
|
509
|
-
name?: string;
|
|
510
|
-
}>;
|
|
785
|
+
restrict_type?: string;
|
|
511
786
|
/**
|
|
512
|
-
*
|
|
787
|
+
* Whether to restrict which components can be inserted
|
|
513
788
|
*/
|
|
514
|
-
|
|
789
|
+
restrict_components?: boolean;
|
|
515
790
|
/**
|
|
516
|
-
*
|
|
791
|
+
* List of allowed component names
|
|
517
792
|
*/
|
|
518
|
-
|
|
519
|
-
};
|
|
520
|
-
/**
|
|
521
|
-
* Input for creating a component.
|
|
522
|
-
*/
|
|
523
|
-
type ComponentCreate2 = {
|
|
793
|
+
component_whitelist?: Array<string>;
|
|
524
794
|
/**
|
|
525
|
-
*
|
|
795
|
+
* List of denied component names
|
|
526
796
|
*/
|
|
527
|
-
|
|
797
|
+
component_denylist?: Array<string>;
|
|
528
798
|
/**
|
|
529
|
-
*
|
|
799
|
+
* List of allowed tag IDs for component filtering
|
|
530
800
|
*/
|
|
531
|
-
|
|
801
|
+
component_tag_whitelist?: Array<number>;
|
|
532
802
|
/**
|
|
533
|
-
*
|
|
803
|
+
* List of denied tag IDs for component filtering
|
|
534
804
|
*/
|
|
535
|
-
|
|
536
|
-
[key: string]: unknown;
|
|
537
|
-
};
|
|
805
|
+
component_tag_denylist?: Array<number>;
|
|
538
806
|
/**
|
|
539
|
-
*
|
|
807
|
+
* List of allowed component group UUIDs
|
|
540
808
|
*/
|
|
541
|
-
|
|
809
|
+
component_group_whitelist?: Array<string>;
|
|
542
810
|
/**
|
|
543
|
-
*
|
|
811
|
+
* List of denied component group UUIDs
|
|
544
812
|
*/
|
|
545
|
-
|
|
813
|
+
component_group_denylist?: Array<string>;
|
|
546
814
|
/**
|
|
547
|
-
*
|
|
815
|
+
* Minimum number of bloks
|
|
548
816
|
*/
|
|
549
|
-
|
|
817
|
+
minimum?: number;
|
|
550
818
|
/**
|
|
551
|
-
*
|
|
819
|
+
* Maximum number of bloks
|
|
552
820
|
*/
|
|
553
|
-
|
|
821
|
+
maximum?: number;
|
|
554
822
|
/**
|
|
555
|
-
*
|
|
823
|
+
* Maximum number of entries
|
|
556
824
|
*/
|
|
557
|
-
|
|
825
|
+
maximum_entries?: number;
|
|
558
826
|
/**
|
|
559
|
-
*
|
|
827
|
+
* Minimum number of entries
|
|
560
828
|
*/
|
|
561
|
-
|
|
829
|
+
minimum_entries?: number;
|
|
830
|
+
};
|
|
831
|
+
type TableField = BaseField & ValueField & {
|
|
562
832
|
/**
|
|
563
|
-
*
|
|
833
|
+
* Field type discriminant
|
|
564
834
|
*/
|
|
565
|
-
|
|
835
|
+
type: 'table';
|
|
566
836
|
};
|
|
567
|
-
|
|
568
|
-
* Input for updating a component.
|
|
569
|
-
*/
|
|
570
|
-
type ComponentUpdate2 = {
|
|
837
|
+
type SectionField = BaseField & {
|
|
571
838
|
/**
|
|
572
|
-
*
|
|
839
|
+
* Field type discriminant
|
|
573
840
|
*/
|
|
574
|
-
|
|
841
|
+
type: 'section';
|
|
575
842
|
/**
|
|
576
|
-
*
|
|
843
|
+
* Field keys that belong to this section
|
|
577
844
|
*/
|
|
578
|
-
|
|
845
|
+
keys?: Array<string>;
|
|
579
846
|
/**
|
|
580
|
-
*
|
|
847
|
+
* Fieldset configuration
|
|
581
848
|
*/
|
|
582
|
-
|
|
583
|
-
|
|
849
|
+
fieldset?: {
|
|
850
|
+
/**
|
|
851
|
+
* Fieldset title
|
|
852
|
+
*/
|
|
853
|
+
title?: string;
|
|
854
|
+
/**
|
|
855
|
+
* Fieldset description
|
|
856
|
+
*/
|
|
857
|
+
description?: string;
|
|
858
|
+
/**
|
|
859
|
+
* Whether the fieldset is collapsible
|
|
860
|
+
*/
|
|
861
|
+
collapsible?: boolean;
|
|
862
|
+
/**
|
|
863
|
+
* Whether the fieldset is collapsed by default
|
|
864
|
+
*/
|
|
865
|
+
collapsed?: boolean;
|
|
584
866
|
};
|
|
867
|
+
};
|
|
868
|
+
type TabField = BaseField & {
|
|
585
869
|
/**
|
|
586
|
-
*
|
|
870
|
+
* Field type discriminant
|
|
587
871
|
*/
|
|
588
|
-
|
|
872
|
+
type: 'tab';
|
|
589
873
|
/**
|
|
590
|
-
*
|
|
874
|
+
* Field keys that belong to this tab
|
|
591
875
|
*/
|
|
592
|
-
|
|
876
|
+
keys?: Array<string>;
|
|
877
|
+
};
|
|
878
|
+
type CustomField = BaseField & ValueField & {
|
|
593
879
|
/**
|
|
594
|
-
*
|
|
880
|
+
* Field type discriminant
|
|
595
881
|
*/
|
|
596
|
-
|
|
882
|
+
type: 'custom';
|
|
597
883
|
/**
|
|
598
|
-
*
|
|
884
|
+
* Technical name of the field plugin
|
|
599
885
|
*/
|
|
600
|
-
|
|
886
|
+
field_type?: string;
|
|
601
887
|
/**
|
|
602
|
-
*
|
|
888
|
+
* Plugin-specific options
|
|
603
889
|
*/
|
|
604
|
-
|
|
890
|
+
options?: Array<{
|
|
891
|
+
name?: string;
|
|
892
|
+
value?: string;
|
|
893
|
+
}>;
|
|
605
894
|
/**
|
|
606
|
-
*
|
|
895
|
+
* Comma-separated list of required field names in the plugin
|
|
607
896
|
*/
|
|
608
|
-
|
|
897
|
+
required_fields?: string;
|
|
609
898
|
/**
|
|
610
|
-
*
|
|
899
|
+
* Source for plugin-provided options (`self` or `internal` for datasource)
|
|
611
900
|
*/
|
|
612
|
-
|
|
901
|
+
source?: 'self' | 'internal';
|
|
902
|
+
/**
|
|
903
|
+
* Slug of the internal datasource when `source` is `internal`
|
|
904
|
+
*/
|
|
905
|
+
datasource_slug?: string;
|
|
906
|
+
/**
|
|
907
|
+
* URL to an external datasource when `source` is set accordingly
|
|
908
|
+
*/
|
|
909
|
+
external_datasource?: string;
|
|
613
910
|
};
|
|
614
911
|
type ListData = {
|
|
615
912
|
body?: never;
|
|
@@ -620,14 +917,6 @@ type ListData = {
|
|
|
620
917
|
space_id: number | string;
|
|
621
918
|
};
|
|
622
919
|
query?: {
|
|
623
|
-
/**
|
|
624
|
-
* Page number for pagination. Default is 1.
|
|
625
|
-
*/
|
|
626
|
-
page?: number;
|
|
627
|
-
/**
|
|
628
|
-
* Number of items per page. Default is 25.
|
|
629
|
-
*/
|
|
630
|
-
per_page?: number;
|
|
631
920
|
/**
|
|
632
921
|
* Filter by ids (comma separated)
|
|
633
922
|
*/
|
|
@@ -663,88 +952,6 @@ type ListData = {
|
|
|
663
952
|
};
|
|
664
953
|
url: '/v1/spaces/{space_id}/components';
|
|
665
954
|
};
|
|
666
|
-
type ListResponses = {
|
|
667
|
-
/**
|
|
668
|
-
* List of components
|
|
669
|
-
*/
|
|
670
|
-
200: {
|
|
671
|
-
components?: Array<Component2>;
|
|
672
|
-
};
|
|
673
|
-
};
|
|
674
|
-
type CreateData = {
|
|
675
|
-
body: {
|
|
676
|
-
component?: ComponentCreate2;
|
|
677
|
-
};
|
|
678
|
-
path: {
|
|
679
|
-
/**
|
|
680
|
-
* The ID of the Storyblok space (can be integer or string)
|
|
681
|
-
*/
|
|
682
|
-
space_id: number | string;
|
|
683
|
-
};
|
|
684
|
-
query?: never;
|
|
685
|
-
url: '/v1/spaces/{space_id}/components';
|
|
686
|
-
};
|
|
687
|
-
type CreateResponses = {
|
|
688
|
-
/**
|
|
689
|
-
* Component created
|
|
690
|
-
*/
|
|
691
|
-
201: {
|
|
692
|
-
component?: Component2;
|
|
693
|
-
};
|
|
694
|
-
};
|
|
695
|
-
type DeleteResponses = {
|
|
696
|
-
/**
|
|
697
|
-
* Component deleted
|
|
698
|
-
*/
|
|
699
|
-
200: {
|
|
700
|
-
component?: Component2;
|
|
701
|
-
};
|
|
702
|
-
};
|
|
703
|
-
type GetResponses = {
|
|
704
|
-
/**
|
|
705
|
-
* Component details
|
|
706
|
-
*/
|
|
707
|
-
200: {
|
|
708
|
-
component?: Component2;
|
|
709
|
-
};
|
|
710
|
-
};
|
|
711
|
-
type UpdateData = {
|
|
712
|
-
body: {
|
|
713
|
-
component?: ComponentUpdate2;
|
|
714
|
-
/**
|
|
715
|
-
* Update component name in stories when component name changes
|
|
716
|
-
*/
|
|
717
|
-
update_content?: boolean;
|
|
718
|
-
};
|
|
719
|
-
path: {
|
|
720
|
-
/**
|
|
721
|
-
* The ID of the Storyblok space (can be integer or string)
|
|
722
|
-
*/
|
|
723
|
-
space_id: number | string;
|
|
724
|
-
/**
|
|
725
|
-
* The ID of the component (can be integer or string)
|
|
726
|
-
*/
|
|
727
|
-
component_id: number | string;
|
|
728
|
-
};
|
|
729
|
-
query?: never;
|
|
730
|
-
url: '/v1/spaces/{space_id}/components/{component_id}';
|
|
731
|
-
};
|
|
732
|
-
type UpdateResponses = {
|
|
733
|
-
/**
|
|
734
|
-
* Component updated
|
|
735
|
-
*/
|
|
736
|
-
200: {
|
|
737
|
-
component?: Component2;
|
|
738
|
-
};
|
|
739
|
-
};
|
|
740
|
-
type RestoreResponses = {
|
|
741
|
-
/**
|
|
742
|
-
* Component restored
|
|
743
|
-
*/
|
|
744
|
-
200: {
|
|
745
|
-
component?: Component2;
|
|
746
|
-
};
|
|
747
|
-
};
|
|
748
955
|
type VersionsData = {
|
|
749
956
|
body?: never;
|
|
750
957
|
path: {
|
|
@@ -777,22 +984,6 @@ type VersionsData = {
|
|
|
777
984
|
};
|
|
778
985
|
url: '/v1/spaces/{space_id}/versions';
|
|
779
986
|
};
|
|
780
|
-
type VersionsResponses = {
|
|
781
|
-
/**
|
|
782
|
-
* Component versions
|
|
783
|
-
*/
|
|
784
|
-
200: {
|
|
785
|
-
versions?: Array<{
|
|
786
|
-
id?: number;
|
|
787
|
-
event?: string;
|
|
788
|
-
created_at?: string;
|
|
789
|
-
author_id?: number;
|
|
790
|
-
item_id?: number;
|
|
791
|
-
author?: string;
|
|
792
|
-
is_draft?: boolean;
|
|
793
|
-
}>;
|
|
794
|
-
};
|
|
795
|
-
};
|
|
796
987
|
type VersionData = {
|
|
797
988
|
body?: never;
|
|
798
989
|
path: {
|
|
@@ -812,18 +1003,6 @@ type VersionData = {
|
|
|
812
1003
|
query?: never;
|
|
813
1004
|
url: '/v1/spaces/{space_id}/components/{component_id}/component_versions/{version_id}';
|
|
814
1005
|
};
|
|
815
|
-
type VersionResponses = {
|
|
816
|
-
/**
|
|
817
|
-
* Component version details
|
|
818
|
-
*/
|
|
819
|
-
200: {
|
|
820
|
-
component_version?: {
|
|
821
|
-
schema?: {
|
|
822
|
-
[key: string]: unknown;
|
|
823
|
-
};
|
|
824
|
-
};
|
|
825
|
-
};
|
|
826
|
-
};
|
|
827
1006
|
type RestoreVersionData = {
|
|
828
1007
|
body: {
|
|
829
1008
|
model?: string;
|
|
@@ -842,14 +1021,6 @@ type RestoreVersionData = {
|
|
|
842
1021
|
query?: never;
|
|
843
1022
|
url: '/v1/spaces/{space_id}/versions/{version_id}';
|
|
844
1023
|
};
|
|
845
|
-
type RestoreVersionResponses = {
|
|
846
|
-
/**
|
|
847
|
-
* Component version restored
|
|
848
|
-
*/
|
|
849
|
-
200: {
|
|
850
|
-
component?: Component2;
|
|
851
|
-
};
|
|
852
|
-
};
|
|
853
1024
|
//#endregion
|
|
854
|
-
export { Component, ComponentCreate, ComponentSchemaField, ComponentUpdate,
|
|
1025
|
+
export { Component, ComponentCreate, ComponentSchemaField, ComponentUpdate, ListData, RestoreVersionData, VersionData, VersionsData };
|
|
855
1026
|
//# sourceMappingURL=types.gen.d.cts.map
|