@datocms/cma-client 0.1.8 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/generated/resources/Item.js.map +1 -1
- package/dist/cjs/generated/resources/SearchResult.js +116 -0
- package/dist/cjs/generated/resources/SearchResult.js.map +1 -1
- package/dist/cjs/generated/resources/Site.js +4 -3
- package/dist/cjs/generated/resources/Site.js.map +1 -1
- package/dist/cjs/generated/resources/User.js +26 -3
- package/dist/cjs/generated/resources/User.js.map +1 -1
- package/dist/esm/buildBlockRecord.d.ts +1 -1
- package/dist/esm/generated/SchemaTypes.d.ts +1301 -440
- package/dist/esm/generated/SimpleSchemaTypes.d.ts +1354 -508
- package/dist/esm/generated/resources/Item.d.ts +6 -6
- package/dist/esm/generated/resources/Item.js.map +1 -1
- package/dist/esm/generated/resources/SearchResult.d.ts +15 -2
- package/dist/esm/generated/resources/SearchResult.js +116 -0
- package/dist/esm/generated/resources/SearchResult.js.map +1 -1
- package/dist/esm/generated/resources/Site.d.ts +2 -2
- package/dist/esm/generated/resources/Site.js +4 -3
- package/dist/esm/generated/resources/Site.js.map +1 -1
- package/dist/esm/generated/resources/User.d.ts +14 -2
- package/dist/esm/generated/resources/User.js +26 -3
- package/dist/esm/generated/resources/User.js.map +1 -1
- package/dist/types/buildBlockRecord.d.ts +1 -1
- package/dist/types/generated/SchemaTypes.d.ts +1301 -440
- package/dist/types/generated/SimpleSchemaTypes.d.ts +1354 -508
- package/dist/types/generated/resources/Item.d.ts +6 -6
- package/dist/types/generated/resources/SearchResult.d.ts +15 -2
- package/dist/types/generated/resources/Site.d.ts +2 -2
- package/dist/types/generated/resources/User.d.ts +14 -2
- package/package.json +4 -4
- package/resources.json +10 -0
- package/src/generated/SchemaTypes.ts +1308 -446
- package/src/generated/SimpleSchemaTypes.ts +1354 -508
- package/src/generated/resources/Item.ts +6 -6
- package/src/generated/resources/SearchResult.ts +42 -2
- package/src/generated/resources/Site.ts +6 -3
- package/src/generated/resources/User.ts +36 -3
|
@@ -87,19 +87,20 @@ export declare type UserType = 'user';
|
|
|
87
87
|
export declare type UserInstancesTargetSchema = User[];
|
|
88
88
|
/**
|
|
89
89
|
* This interface was referenced by `User`'s JSON-Schema
|
|
90
|
-
* via the `
|
|
90
|
+
* via the `self.hrefSchema` link.
|
|
91
91
|
*/
|
|
92
|
-
export declare type
|
|
93
|
-
/**
|
|
94
|
-
* New owner for resources previously owned by the deleted user. This argument specifies the new owner type.
|
|
95
|
-
*/
|
|
96
|
-
destination_user_type?: 'account' | 'user' | 'access_token' | 'sso_user';
|
|
92
|
+
export declare type UserSelfHrefSchema = {
|
|
97
93
|
/**
|
|
98
|
-
*
|
|
94
|
+
* Comma-separated list of [relationship paths](https://jsonapi.org/format/#fetching-includes). A relationship path is a dot-separated list of relationship names. Allowed relationship paths: `role`.
|
|
99
95
|
*/
|
|
100
|
-
|
|
96
|
+
include?: string;
|
|
101
97
|
[k: string]: unknown;
|
|
102
98
|
};
|
|
99
|
+
/**
|
|
100
|
+
* This interface was referenced by `User`'s JSON-Schema
|
|
101
|
+
* via the `me.targetSchema` link.
|
|
102
|
+
*/
|
|
103
|
+
export declare type UserMeTargetSchema = User | SsoUser | AccessToken | Account;
|
|
103
104
|
/**
|
|
104
105
|
* ID of user
|
|
105
106
|
*
|
|
@@ -160,27 +161,42 @@ export declare type SsoUserDestroyHrefSchema = {
|
|
|
160
161
|
[k: string]: unknown;
|
|
161
162
|
};
|
|
162
163
|
/**
|
|
163
|
-
*
|
|
164
|
+
* ID of access_token
|
|
164
165
|
*
|
|
165
|
-
* This interface was referenced by `
|
|
166
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
166
167
|
* via the `definition` "identity".
|
|
167
168
|
*
|
|
168
|
-
* This interface was referenced by `
|
|
169
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
169
170
|
* via the `definition` "id".
|
|
170
171
|
*/
|
|
171
|
-
export declare type
|
|
172
|
+
export declare type AccessTokenIdentity = string;
|
|
172
173
|
/**
|
|
173
174
|
* JSON API type field
|
|
174
175
|
*
|
|
175
|
-
* This interface was referenced by `
|
|
176
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
176
177
|
* via the `definition` "type".
|
|
177
178
|
*/
|
|
178
|
-
export declare type
|
|
179
|
+
export declare type AccessTokenType = 'access_token';
|
|
179
180
|
/**
|
|
180
|
-
* This interface was referenced by `
|
|
181
|
-
* via the `
|
|
181
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
182
|
+
* via the `instances.targetSchema` link.
|
|
182
183
|
*/
|
|
183
|
-
export declare type
|
|
184
|
+
export declare type AccessTokenInstancesTargetSchema = AccessToken[];
|
|
185
|
+
/**
|
|
186
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
187
|
+
* via the `destroy.hrefSchema` link.
|
|
188
|
+
*/
|
|
189
|
+
export declare type AccessTokenDestroyHrefSchema = {
|
|
190
|
+
/**
|
|
191
|
+
* New owner for resources previously owned by the deleted access token. This argument specifies the new owner type.
|
|
192
|
+
*/
|
|
193
|
+
destination_user_type?: 'account' | 'user' | 'access_token' | 'sso_user';
|
|
194
|
+
/**
|
|
195
|
+
* New owner for resources previously owned by the deleted access token. This argument specifies the new owner ID.
|
|
196
|
+
*/
|
|
197
|
+
destination_user_id?: string;
|
|
198
|
+
[k: string]: unknown;
|
|
199
|
+
};
|
|
184
200
|
/**
|
|
185
201
|
* ID of account
|
|
186
202
|
*
|
|
@@ -198,6 +214,54 @@ export declare type AccountIdentity = string;
|
|
|
198
214
|
* via the `definition` "type".
|
|
199
215
|
*/
|
|
200
216
|
export declare type AccountType = 'account';
|
|
217
|
+
/**
|
|
218
|
+
* This interface was referenced by `User`'s JSON-Schema
|
|
219
|
+
* via the `me.hrefSchema` link.
|
|
220
|
+
*/
|
|
221
|
+
export declare type UserMeHrefSchema = {
|
|
222
|
+
/**
|
|
223
|
+
* Comma-separated list of [relationship paths](https://jsonapi.org/format/#fetching-includes). A relationship path is a dot-separated list of relationship names. Allowed relationship paths: `role`.
|
|
224
|
+
*/
|
|
225
|
+
include?: string;
|
|
226
|
+
[k: string]: unknown;
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* This interface was referenced by `User`'s JSON-Schema
|
|
230
|
+
* via the `destroy.hrefSchema` link.
|
|
231
|
+
*/
|
|
232
|
+
export declare type UserDestroyHrefSchema = {
|
|
233
|
+
/**
|
|
234
|
+
* New owner for resources previously owned by the deleted user. This argument specifies the new owner type.
|
|
235
|
+
*/
|
|
236
|
+
destination_user_type?: 'account' | 'user' | 'access_token' | 'sso_user';
|
|
237
|
+
/**
|
|
238
|
+
* New owner for resources previously owned by the deleted user. This argument specifies the new owner ID.
|
|
239
|
+
*/
|
|
240
|
+
destination_user_id?: string;
|
|
241
|
+
[k: string]: unknown;
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* ULID of event (https://github.com/ulid/spec)
|
|
245
|
+
*
|
|
246
|
+
* This interface was referenced by `AuditLogEvent`'s JSON-Schema
|
|
247
|
+
* via the `definition` "identity".
|
|
248
|
+
*
|
|
249
|
+
* This interface was referenced by `AuditLogEvent`'s JSON-Schema
|
|
250
|
+
* via the `definition` "id".
|
|
251
|
+
*/
|
|
252
|
+
export declare type AuditLogEventIdentity = string;
|
|
253
|
+
/**
|
|
254
|
+
* JSON API type field
|
|
255
|
+
*
|
|
256
|
+
* This interface was referenced by `AuditLogEvent`'s JSON-Schema
|
|
257
|
+
* via the `definition` "type".
|
|
258
|
+
*/
|
|
259
|
+
export declare type AuditLogEventType = 'audit_log_event';
|
|
260
|
+
/**
|
|
261
|
+
* This interface was referenced by `AuditLogEvent`'s JSON-Schema
|
|
262
|
+
* via the `query.targetSchema` link.
|
|
263
|
+
*/
|
|
264
|
+
export declare type AuditLogEventQueryTargetSchema = AuditLogEvent[];
|
|
201
265
|
/**
|
|
202
266
|
* ID of plan
|
|
203
267
|
*
|
|
@@ -290,6 +354,23 @@ export declare type FieldType = 'field';
|
|
|
290
354
|
* via the `definition` "id".
|
|
291
355
|
*/
|
|
292
356
|
export declare type FieldIdentity = string;
|
|
357
|
+
/**
|
|
358
|
+
* JSON API type fieldset
|
|
359
|
+
*
|
|
360
|
+
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
361
|
+
* via the `definition` "type".
|
|
362
|
+
*/
|
|
363
|
+
export declare type FieldsetType = 'fieldset';
|
|
364
|
+
/**
|
|
365
|
+
* ID of fieldset
|
|
366
|
+
*
|
|
367
|
+
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
368
|
+
* via the `definition` "identity".
|
|
369
|
+
*
|
|
370
|
+
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
371
|
+
* via the `definition` "id".
|
|
372
|
+
*/
|
|
373
|
+
export declare type FieldsetIdentity = string;
|
|
293
374
|
/**
|
|
294
375
|
* JSON API type field
|
|
295
376
|
*
|
|
@@ -319,23 +400,6 @@ export declare type JobType = 'job';
|
|
|
319
400
|
* via the `instances.targetSchema` link.
|
|
320
401
|
*/
|
|
321
402
|
export declare type ItemTypeInstancesTargetSchema = ItemType[];
|
|
322
|
-
/**
|
|
323
|
-
* JSON API type fieldset
|
|
324
|
-
*
|
|
325
|
-
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
326
|
-
* via the `definition` "type".
|
|
327
|
-
*/
|
|
328
|
-
export declare type FieldsetType = 'fieldset';
|
|
329
|
-
/**
|
|
330
|
-
* ID of fieldset
|
|
331
|
-
*
|
|
332
|
-
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
333
|
-
* via the `definition` "identity".
|
|
334
|
-
*
|
|
335
|
-
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
336
|
-
* via the `definition` "id".
|
|
337
|
-
*/
|
|
338
|
-
export declare type FieldsetIdentity = string;
|
|
339
403
|
/**
|
|
340
404
|
* This interface was referenced by `Field`'s JSON-Schema
|
|
341
405
|
* via the `instances.targetSchema` link.
|
|
@@ -373,43 +437,6 @@ export declare type SessionIdentity = string;
|
|
|
373
437
|
* via the `definition` "type".
|
|
374
438
|
*/
|
|
375
439
|
export declare type SessionType = 'session';
|
|
376
|
-
/**
|
|
377
|
-
* ID of access_token
|
|
378
|
-
*
|
|
379
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
380
|
-
* via the `definition` "identity".
|
|
381
|
-
*
|
|
382
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
383
|
-
* via the `definition` "id".
|
|
384
|
-
*/
|
|
385
|
-
export declare type AccessTokenIdentity = string;
|
|
386
|
-
/**
|
|
387
|
-
* JSON API type field
|
|
388
|
-
*
|
|
389
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
390
|
-
* via the `definition` "type".
|
|
391
|
-
*/
|
|
392
|
-
export declare type AccessTokenType = 'access_token';
|
|
393
|
-
/**
|
|
394
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
395
|
-
* via the `instances.targetSchema` link.
|
|
396
|
-
*/
|
|
397
|
-
export declare type AccessTokenInstancesTargetSchema = AccessToken[];
|
|
398
|
-
/**
|
|
399
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
400
|
-
* via the `destroy.hrefSchema` link.
|
|
401
|
-
*/
|
|
402
|
-
export declare type AccessTokenDestroyHrefSchema = {
|
|
403
|
-
/**
|
|
404
|
-
* New owner for resources previously owned by the deleted access token. This argument specifies the new owner type.
|
|
405
|
-
*/
|
|
406
|
-
destination_user_type?: 'account' | 'user' | 'access_token' | 'sso_user';
|
|
407
|
-
/**
|
|
408
|
-
* New owner for resources previously owned by the deleted access token. This argument specifies the new owner ID.
|
|
409
|
-
*/
|
|
410
|
-
destination_user_id?: string;
|
|
411
|
-
[k: string]: unknown;
|
|
412
|
-
};
|
|
413
440
|
/**
|
|
414
441
|
* ID of plugin
|
|
415
442
|
*
|
|
@@ -979,25 +1006,37 @@ export declare type SearchResultInstancesTargetSchema = SearchResult[];
|
|
|
979
1006
|
*/
|
|
980
1007
|
export declare type SearchResultInstancesHrefSchema = {
|
|
981
1008
|
/**
|
|
982
|
-
*
|
|
983
|
-
*/
|
|
984
|
-
q: string;
|
|
985
|
-
/**
|
|
986
|
-
* The build trigger ID on which the search will be performed
|
|
987
|
-
*/
|
|
988
|
-
build_trigger_id?: string;
|
|
989
|
-
/**
|
|
990
|
-
* Restrict the search on one locale
|
|
991
|
-
*/
|
|
992
|
-
locale?: string;
|
|
993
|
-
/**
|
|
994
|
-
* Maximum number of results to return (defaults to 20, maximum is 100)
|
|
1009
|
+
* Attributes to manage results pagination
|
|
995
1010
|
*/
|
|
996
|
-
|
|
1011
|
+
page?: {
|
|
1012
|
+
/**
|
|
1013
|
+
* Index of first element to fetch (defaults to 0)
|
|
1014
|
+
*/
|
|
1015
|
+
offset?: number;
|
|
1016
|
+
/**
|
|
1017
|
+
* Number of elements to fetch (defaults to 20, maximum is 100)
|
|
1018
|
+
*/
|
|
1019
|
+
limit?: number;
|
|
1020
|
+
[k: string]: unknown;
|
|
1021
|
+
};
|
|
997
1022
|
/**
|
|
998
|
-
*
|
|
1023
|
+
* Attributes to filter search results
|
|
999
1024
|
*/
|
|
1000
|
-
|
|
1025
|
+
filter: {
|
|
1026
|
+
/**
|
|
1027
|
+
* Text to search
|
|
1028
|
+
*/
|
|
1029
|
+
query: string;
|
|
1030
|
+
/**
|
|
1031
|
+
* The build trigger ID on which the search will be performed. Required if more than one build trigger is present in a project
|
|
1032
|
+
*/
|
|
1033
|
+
build_trigger_id?: string;
|
|
1034
|
+
/**
|
|
1035
|
+
* Restrict the search on pages in a specific locale
|
|
1036
|
+
*/
|
|
1037
|
+
locale?: string;
|
|
1038
|
+
[k: string]: unknown;
|
|
1039
|
+
};
|
|
1001
1040
|
[k: string]: unknown;
|
|
1002
1041
|
};
|
|
1003
1042
|
/**
|
|
@@ -1463,6 +1502,17 @@ export declare type SiteIdentity = string;
|
|
|
1463
1502
|
* via the `definition` "type".
|
|
1464
1503
|
*/
|
|
1465
1504
|
export declare type SiteType = 'site';
|
|
1505
|
+
/**
|
|
1506
|
+
* This interface was referenced by `Site`'s JSON-Schema
|
|
1507
|
+
* via the `self.hrefSchema` link.
|
|
1508
|
+
*/
|
|
1509
|
+
export declare type SiteSelfHrefSchema = {
|
|
1510
|
+
/**
|
|
1511
|
+
* Comma-separated list of [relationship paths](https://jsonapi.org/format/#fetching-includes). A relationship path is a dot-separated list of relationship names. Allowed relationship paths: `item_types`, `item_types.fields`, `item_types.fieldsets`, `item_types.singleton_item`, `account`.
|
|
1512
|
+
*/
|
|
1513
|
+
include?: string;
|
|
1514
|
+
[k: string]: unknown;
|
|
1515
|
+
};
|
|
1466
1516
|
/**
|
|
1467
1517
|
* This interface was referenced by `Workflow`'s JSON-Schema
|
|
1468
1518
|
* via the `instances.targetSchema` link.
|
|
@@ -2711,68 +2761,270 @@ export declare type SsoUserRelationships = {
|
|
|
2711
2761
|
role: RoleData | null;
|
|
2712
2762
|
};
|
|
2713
2763
|
/**
|
|
2714
|
-
*
|
|
2764
|
+
* An API token allows access to our API. It is linked to a Role, which describes what actions can be performed.
|
|
2715
2765
|
*
|
|
2716
2766
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
2717
|
-
* via the `definition` "
|
|
2767
|
+
* via the `definition` "access_token".
|
|
2718
2768
|
*/
|
|
2719
|
-
export declare type
|
|
2720
|
-
id:
|
|
2721
|
-
type:
|
|
2769
|
+
export declare type AccessToken = {
|
|
2770
|
+
id: AccessTokenIdentity;
|
|
2771
|
+
type: AccessTokenType;
|
|
2722
2772
|
/**
|
|
2723
|
-
*
|
|
2773
|
+
* Name of API token
|
|
2724
2774
|
*/
|
|
2725
|
-
|
|
2775
|
+
name: string;
|
|
2726
2776
|
/**
|
|
2727
|
-
* The
|
|
2777
|
+
* The actual API token (or null if the current user has no permission to read the token)
|
|
2728
2778
|
*/
|
|
2729
|
-
|
|
2730
|
-
/**
|
|
2731
|
-
* The type of actor (can be `account`, `user`, `sso_user` or `access_token`)
|
|
2732
|
-
*/
|
|
2733
|
-
type: string;
|
|
2734
|
-
/**
|
|
2735
|
-
* The ID of the actor
|
|
2736
|
-
*/
|
|
2737
|
-
id: string;
|
|
2738
|
-
/**
|
|
2739
|
-
* An human representation of the actor (name/email/username depending on the type of actor)
|
|
2740
|
-
*/
|
|
2741
|
-
name: string;
|
|
2742
|
-
};
|
|
2779
|
+
token?: null | string;
|
|
2743
2780
|
/**
|
|
2744
|
-
*
|
|
2781
|
+
* Whether this API token can access the Content Delivery API published content endpoint
|
|
2745
2782
|
*/
|
|
2746
|
-
|
|
2747
|
-
/**
|
|
2748
|
-
* The name of the role
|
|
2749
|
-
*/
|
|
2750
|
-
name: string;
|
|
2751
|
-
/**
|
|
2752
|
-
* The ID of the role
|
|
2753
|
-
*/
|
|
2754
|
-
id: string;
|
|
2755
|
-
};
|
|
2783
|
+
can_access_cda: boolean;
|
|
2756
2784
|
/**
|
|
2757
|
-
*
|
|
2785
|
+
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
2758
2786
|
*/
|
|
2759
|
-
|
|
2760
|
-
/**
|
|
2761
|
-
* The ID of the environment
|
|
2762
|
-
*/
|
|
2763
|
-
id: string;
|
|
2764
|
-
/**
|
|
2765
|
-
* Whether the environment was the primary one at the time the action was performed
|
|
2766
|
-
*/
|
|
2767
|
-
primary: boolean;
|
|
2768
|
-
};
|
|
2787
|
+
can_access_cda_preview: boolean;
|
|
2769
2788
|
/**
|
|
2770
|
-
*
|
|
2789
|
+
* Whether this API token can access the Content Management API
|
|
2771
2790
|
*/
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2791
|
+
can_access_cma: boolean;
|
|
2792
|
+
hardcoded_type: null | string;
|
|
2793
|
+
role: RoleData | null;
|
|
2794
|
+
};
|
|
2795
|
+
export declare type AccessTokenCreateTargetSchema = AccessToken;
|
|
2796
|
+
export declare type AccessTokenUpdateTargetSchema = AccessToken;
|
|
2797
|
+
export declare type AccessTokenSelfTargetSchema = AccessToken;
|
|
2798
|
+
export declare type AccessTokenRegenerateTokenTargetSchema = AccessToken;
|
|
2799
|
+
export declare type AccessTokenDestroyTargetSchema = AccessToken;
|
|
2800
|
+
/**
|
|
2801
|
+
* JSON API data
|
|
2802
|
+
*
|
|
2803
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
2804
|
+
* via the `definition` "data".
|
|
2805
|
+
*/
|
|
2806
|
+
export declare type AccessTokenData = {
|
|
2807
|
+
type: AccessTokenType;
|
|
2808
|
+
id: AccessTokenIdentity;
|
|
2809
|
+
};
|
|
2810
|
+
/**
|
|
2811
|
+
* JSON API attributes
|
|
2812
|
+
*
|
|
2813
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
2814
|
+
* via the `definition` "attributes".
|
|
2815
|
+
*/
|
|
2816
|
+
export declare type AccessTokenAttributes = {
|
|
2817
|
+
/**
|
|
2818
|
+
* Name of API token
|
|
2819
|
+
*/
|
|
2820
|
+
name: string;
|
|
2821
|
+
/**
|
|
2822
|
+
* The actual API token (or null if the current user has no permission to read the token)
|
|
2823
|
+
*/
|
|
2824
|
+
token?: null | string;
|
|
2825
|
+
/**
|
|
2826
|
+
* Whether this API token can access the Content Delivery API published content endpoint
|
|
2827
|
+
*/
|
|
2828
|
+
can_access_cda: boolean;
|
|
2829
|
+
/**
|
|
2830
|
+
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
2831
|
+
*/
|
|
2832
|
+
can_access_cda_preview: boolean;
|
|
2833
|
+
/**
|
|
2834
|
+
* Whether this API token can access the Content Management API
|
|
2835
|
+
*/
|
|
2836
|
+
can_access_cma: boolean;
|
|
2837
|
+
hardcoded_type: null | string;
|
|
2838
|
+
};
|
|
2839
|
+
/**
|
|
2840
|
+
* JSON API links
|
|
2841
|
+
*
|
|
2842
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
2843
|
+
* via the `definition` "relationships".
|
|
2844
|
+
*/
|
|
2845
|
+
export declare type AccessTokenRelationships = {
|
|
2846
|
+
role: RoleData | null;
|
|
2847
|
+
};
|
|
2848
|
+
/**
|
|
2849
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
2850
|
+
* via the `create.schema` link.
|
|
2851
|
+
*/
|
|
2852
|
+
export declare type AccessTokenCreateSchema = {
|
|
2853
|
+
type?: AccessTokenType;
|
|
2854
|
+
/**
|
|
2855
|
+
* Name of API token
|
|
2856
|
+
*/
|
|
2857
|
+
name: string;
|
|
2858
|
+
/**
|
|
2859
|
+
* Whether this API token can access the Content Delivery API published content endpoint
|
|
2860
|
+
*/
|
|
2861
|
+
can_access_cda: boolean;
|
|
2862
|
+
/**
|
|
2863
|
+
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
2864
|
+
*/
|
|
2865
|
+
can_access_cda_preview: boolean;
|
|
2866
|
+
/**
|
|
2867
|
+
* Whether this API token can access the Content Management API
|
|
2868
|
+
*/
|
|
2869
|
+
can_access_cma: boolean;
|
|
2870
|
+
role: RoleData | null;
|
|
2871
|
+
};
|
|
2872
|
+
/**
|
|
2873
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
2874
|
+
* via the `update.schema` link.
|
|
2875
|
+
*/
|
|
2876
|
+
export declare type AccessTokenUpdateSchema = {
|
|
2877
|
+
id?: AccessTokenIdentity;
|
|
2878
|
+
type?: AccessTokenType;
|
|
2879
|
+
/**
|
|
2880
|
+
* Name of API token
|
|
2881
|
+
*/
|
|
2882
|
+
name: string;
|
|
2883
|
+
/**
|
|
2884
|
+
* Whether this API token can access the Content Delivery API published content endpoint
|
|
2885
|
+
*/
|
|
2886
|
+
can_access_cda: boolean;
|
|
2887
|
+
/**
|
|
2888
|
+
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
2889
|
+
*/
|
|
2890
|
+
can_access_cda_preview: boolean;
|
|
2891
|
+
/**
|
|
2892
|
+
* Whether this API token can access the Content Management API
|
|
2893
|
+
*/
|
|
2894
|
+
can_access_cma: boolean;
|
|
2895
|
+
role: RoleData | null;
|
|
2896
|
+
};
|
|
2897
|
+
/**
|
|
2898
|
+
* DatoCMS account
|
|
2899
|
+
*
|
|
2900
|
+
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
2901
|
+
* via the `definition` "account".
|
|
2902
|
+
*/
|
|
2903
|
+
export declare type Account = {
|
|
2904
|
+
id: AccountIdentity;
|
|
2905
|
+
type: AccountType;
|
|
2906
|
+
/**
|
|
2907
|
+
* Email
|
|
2908
|
+
*/
|
|
2909
|
+
email: string;
|
|
2910
|
+
/**
|
|
2911
|
+
* First name
|
|
2912
|
+
*/
|
|
2913
|
+
first_name: string | null;
|
|
2914
|
+
/**
|
|
2915
|
+
* Last name
|
|
2916
|
+
*/
|
|
2917
|
+
last_name: string | null;
|
|
2918
|
+
/**
|
|
2919
|
+
* Company name
|
|
2920
|
+
*/
|
|
2921
|
+
company: string | null;
|
|
2922
|
+
/**
|
|
2923
|
+
* Password
|
|
2924
|
+
*/
|
|
2925
|
+
password?: string;
|
|
2926
|
+
};
|
|
2927
|
+
/**
|
|
2928
|
+
* JSON API data
|
|
2929
|
+
*
|
|
2930
|
+
* This interface was referenced by `Account`'s JSON-Schema
|
|
2931
|
+
* via the `definition` "data".
|
|
2932
|
+
*/
|
|
2933
|
+
export declare type AccountData = {
|
|
2934
|
+
type: AccountType;
|
|
2935
|
+
id: AccountIdentity;
|
|
2936
|
+
};
|
|
2937
|
+
/**
|
|
2938
|
+
* JSON API attributes
|
|
2939
|
+
*
|
|
2940
|
+
* This interface was referenced by `Account`'s JSON-Schema
|
|
2941
|
+
* via the `definition` "attributes".
|
|
2942
|
+
*/
|
|
2943
|
+
export declare type AccountAttributes = {
|
|
2944
|
+
/**
|
|
2945
|
+
* Email
|
|
2946
|
+
*/
|
|
2947
|
+
email: string;
|
|
2948
|
+
/**
|
|
2949
|
+
* First name
|
|
2950
|
+
*/
|
|
2951
|
+
first_name: string | null;
|
|
2952
|
+
/**
|
|
2953
|
+
* Last name
|
|
2954
|
+
*/
|
|
2955
|
+
last_name: string | null;
|
|
2956
|
+
/**
|
|
2957
|
+
* Company name
|
|
2958
|
+
*/
|
|
2959
|
+
company: string | null;
|
|
2960
|
+
/**
|
|
2961
|
+
* Password
|
|
2962
|
+
*/
|
|
2963
|
+
password?: string;
|
|
2964
|
+
};
|
|
2965
|
+
/**
|
|
2966
|
+
* 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.
|
|
2967
|
+
*
|
|
2968
|
+
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
2969
|
+
* via the `definition` "audit_log_event".
|
|
2970
|
+
*/
|
|
2971
|
+
export declare type AuditLogEvent = {
|
|
2972
|
+
id: AuditLogEventIdentity;
|
|
2973
|
+
type: AuditLogEventType;
|
|
2974
|
+
/**
|
|
2975
|
+
* The actual action performed
|
|
2976
|
+
*/
|
|
2977
|
+
action_name: string;
|
|
2978
|
+
/**
|
|
2979
|
+
* The actor who performed the action
|
|
2980
|
+
*/
|
|
2981
|
+
actor: {
|
|
2982
|
+
/**
|
|
2983
|
+
* The type of actor (can be `account`, `user`, `sso_user` or `access_token`)
|
|
2984
|
+
*/
|
|
2985
|
+
type: string;
|
|
2986
|
+
/**
|
|
2987
|
+
* The ID of the actor
|
|
2988
|
+
*/
|
|
2989
|
+
id: string;
|
|
2990
|
+
/**
|
|
2991
|
+
* An human representation of the actor (name/email/username depending on the type of actor)
|
|
2992
|
+
*/
|
|
2993
|
+
name: string;
|
|
2994
|
+
};
|
|
2995
|
+
/**
|
|
2996
|
+
* The role of the actor at the time the action was performed
|
|
2997
|
+
*/
|
|
2998
|
+
role: null | {
|
|
2999
|
+
/**
|
|
3000
|
+
* The name of the role
|
|
3001
|
+
*/
|
|
3002
|
+
name: string;
|
|
3003
|
+
/**
|
|
3004
|
+
* The ID of the role
|
|
3005
|
+
*/
|
|
3006
|
+
id: string;
|
|
3007
|
+
};
|
|
3008
|
+
/**
|
|
3009
|
+
* The environment inside of which the action was performed
|
|
3010
|
+
*/
|
|
3011
|
+
environment: {
|
|
3012
|
+
/**
|
|
3013
|
+
* The ID of the environment
|
|
3014
|
+
*/
|
|
3015
|
+
id: string;
|
|
3016
|
+
/**
|
|
3017
|
+
* Whether the environment was the primary one at the time the action was performed
|
|
3018
|
+
*/
|
|
3019
|
+
primary: boolean;
|
|
3020
|
+
};
|
|
3021
|
+
/**
|
|
3022
|
+
* The actual request being performed
|
|
3023
|
+
*/
|
|
3024
|
+
request: {
|
|
3025
|
+
/**
|
|
3026
|
+
* The full path of the request
|
|
3027
|
+
*/
|
|
2776
3028
|
path: string;
|
|
2777
3029
|
/**
|
|
2778
3030
|
* The HTTP method of the request
|
|
@@ -2944,92 +3196,24 @@ export declare type AuditLogEventQuerySchema = {
|
|
|
2944
3196
|
detailed_log?: boolean;
|
|
2945
3197
|
};
|
|
2946
3198
|
/**
|
|
2947
|
-
*
|
|
3199
|
+
* Stores the information regarding the current plan for the project.
|
|
2948
3200
|
*
|
|
2949
3201
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
2950
|
-
* via the `definition` "
|
|
3202
|
+
* via the `definition` "site_plan".
|
|
2951
3203
|
*/
|
|
2952
|
-
export declare type
|
|
2953
|
-
id:
|
|
2954
|
-
type:
|
|
3204
|
+
export declare type SitePlan = {
|
|
3205
|
+
id: SitePlanIdentity;
|
|
3206
|
+
type: SitePlanType;
|
|
2955
3207
|
/**
|
|
2956
|
-
*
|
|
3208
|
+
* The name of the plan
|
|
2957
3209
|
*/
|
|
2958
|
-
|
|
3210
|
+
name: string;
|
|
2959
3211
|
/**
|
|
2960
|
-
*
|
|
3212
|
+
* Whether this plan is active or legacy
|
|
2961
3213
|
*/
|
|
2962
|
-
|
|
3214
|
+
active: boolean;
|
|
2963
3215
|
/**
|
|
2964
|
-
*
|
|
2965
|
-
*/
|
|
2966
|
-
last_name: string | null;
|
|
2967
|
-
/**
|
|
2968
|
-
* Company name
|
|
2969
|
-
*/
|
|
2970
|
-
company: string | null;
|
|
2971
|
-
/**
|
|
2972
|
-
* Password
|
|
2973
|
-
*/
|
|
2974
|
-
password?: string;
|
|
2975
|
-
};
|
|
2976
|
-
/**
|
|
2977
|
-
* JSON API data
|
|
2978
|
-
*
|
|
2979
|
-
* This interface was referenced by `Account`'s JSON-Schema
|
|
2980
|
-
* via the `definition` "data".
|
|
2981
|
-
*/
|
|
2982
|
-
export declare type AccountData = {
|
|
2983
|
-
type: AccountType;
|
|
2984
|
-
id: AccountIdentity;
|
|
2985
|
-
};
|
|
2986
|
-
/**
|
|
2987
|
-
* JSON API attributes
|
|
2988
|
-
*
|
|
2989
|
-
* This interface was referenced by `Account`'s JSON-Schema
|
|
2990
|
-
* via the `definition` "attributes".
|
|
2991
|
-
*/
|
|
2992
|
-
export declare type AccountAttributes = {
|
|
2993
|
-
/**
|
|
2994
|
-
* Email
|
|
2995
|
-
*/
|
|
2996
|
-
email: string;
|
|
2997
|
-
/**
|
|
2998
|
-
* First name
|
|
2999
|
-
*/
|
|
3000
|
-
first_name: string | null;
|
|
3001
|
-
/**
|
|
3002
|
-
* Last name
|
|
3003
|
-
*/
|
|
3004
|
-
last_name: string | null;
|
|
3005
|
-
/**
|
|
3006
|
-
* Company name
|
|
3007
|
-
*/
|
|
3008
|
-
company: string | null;
|
|
3009
|
-
/**
|
|
3010
|
-
* Password
|
|
3011
|
-
*/
|
|
3012
|
-
password?: string;
|
|
3013
|
-
};
|
|
3014
|
-
/**
|
|
3015
|
-
* Stores the information regarding the current plan for the project.
|
|
3016
|
-
*
|
|
3017
|
-
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
3018
|
-
* via the `definition` "site_plan".
|
|
3019
|
-
*/
|
|
3020
|
-
export declare type SitePlan = {
|
|
3021
|
-
id: SitePlanIdentity;
|
|
3022
|
-
type: SitePlanType;
|
|
3023
|
-
/**
|
|
3024
|
-
* The name of the plan
|
|
3025
|
-
*/
|
|
3026
|
-
name: string;
|
|
3027
|
-
/**
|
|
3028
|
-
* Whether this plan is active or legacy
|
|
3029
|
-
*/
|
|
3030
|
-
active: boolean;
|
|
3031
|
-
/**
|
|
3032
|
-
* Whether custom domain can be enabled or not
|
|
3216
|
+
* Whether custom domain can be enabled or not
|
|
3033
3217
|
*/
|
|
3034
3218
|
custom_domain: boolean;
|
|
3035
3219
|
/**
|
|
@@ -3164,6 +3348,14 @@ export declare type SitePlan = {
|
|
|
3164
3348
|
* Whether translator roles are enabled or not
|
|
3165
3349
|
*/
|
|
3166
3350
|
translator_roles: boolean;
|
|
3351
|
+
/**
|
|
3352
|
+
* Whether or not use a static IP when sending webhooks
|
|
3353
|
+
*/
|
|
3354
|
+
static_webhooks_ip: boolean;
|
|
3355
|
+
/**
|
|
3356
|
+
* Maximum size in bytes for a single file upload
|
|
3357
|
+
*/
|
|
3358
|
+
maximum_single_upload_bytes: number;
|
|
3167
3359
|
/**
|
|
3168
3360
|
* Available extra packets
|
|
3169
3361
|
*/
|
|
@@ -3380,6 +3572,14 @@ export declare type SitePlanAttributes = {
|
|
|
3380
3572
|
* Whether translator roles are enabled or not
|
|
3381
3573
|
*/
|
|
3382
3574
|
translator_roles: boolean;
|
|
3575
|
+
/**
|
|
3576
|
+
* Whether or not use a static IP when sending webhooks
|
|
3577
|
+
*/
|
|
3578
|
+
static_webhooks_ip: boolean;
|
|
3579
|
+
/**
|
|
3580
|
+
* Maximum size in bytes for a single file upload
|
|
3581
|
+
*/
|
|
3582
|
+
maximum_single_upload_bytes: number;
|
|
3383
3583
|
/**
|
|
3384
3584
|
* Available extra packets
|
|
3385
3585
|
*/
|
|
@@ -3641,6 +3841,7 @@ export declare type ItemType = {
|
|
|
3641
3841
|
hint: string | null;
|
|
3642
3842
|
singleton_item: ItemData | null;
|
|
3643
3843
|
fields: FieldData[];
|
|
3844
|
+
fieldsets: FieldsetData[];
|
|
3644
3845
|
title_field: FieldData | null;
|
|
3645
3846
|
image_preview_field: FieldData | null;
|
|
3646
3847
|
excerpt_field: FieldData | null;
|
|
@@ -3672,6 +3873,16 @@ export declare type FieldData = {
|
|
|
3672
3873
|
type: FieldType;
|
|
3673
3874
|
id: FieldIdentity;
|
|
3674
3875
|
};
|
|
3876
|
+
/**
|
|
3877
|
+
* JSON API data
|
|
3878
|
+
*
|
|
3879
|
+
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
3880
|
+
* via the `definition` "data".
|
|
3881
|
+
*/
|
|
3882
|
+
export declare type FieldsetData = {
|
|
3883
|
+
type: FieldsetType;
|
|
3884
|
+
id: FieldsetIdentity;
|
|
3885
|
+
};
|
|
3675
3886
|
/**
|
|
3676
3887
|
* JSON API data
|
|
3677
3888
|
*
|
|
@@ -3755,6 +3966,7 @@ export declare type ItemTypeAttributes = {
|
|
|
3755
3966
|
export declare type ItemTypeRelationships = {
|
|
3756
3967
|
singleton_item: ItemData | null;
|
|
3757
3968
|
fields: FieldData[];
|
|
3969
|
+
fieldsets: FieldsetData[];
|
|
3758
3970
|
title_field: FieldData | null;
|
|
3759
3971
|
image_preview_field: FieldData | null;
|
|
3760
3972
|
excerpt_field: FieldData | null;
|
|
@@ -3901,115 +4113,947 @@ export declare type ItemTypeUpdateSchema = {
|
|
|
3901
4113
|
* This interface was referenced by `ItemType`'s JSON-Schema
|
|
3902
4114
|
* via the `destroy.targetSchema` link.
|
|
3903
4115
|
*
|
|
3904
|
-
* This interface was referenced by `Field`'s JSON-Schema
|
|
3905
|
-
* via the `create.targetSchema` link.
|
|
4116
|
+
* This interface was referenced by `Field`'s JSON-Schema
|
|
4117
|
+
* via the `create.targetSchema` link.
|
|
4118
|
+
*
|
|
4119
|
+
* This interface was referenced by `Field`'s JSON-Schema
|
|
4120
|
+
* via the `update.targetSchema` link.
|
|
4121
|
+
*
|
|
4122
|
+
* This interface was referenced by `Field`'s JSON-Schema
|
|
4123
|
+
* via the `destroy.targetSchema` link.
|
|
4124
|
+
*
|
|
4125
|
+
* This interface was referenced by `Field`'s JSON-Schema
|
|
4126
|
+
* via the `duplicate.targetSchema` link.
|
|
4127
|
+
*
|
|
4128
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4129
|
+
* via the `duplicate.targetSchema` link.
|
|
4130
|
+
*
|
|
4131
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4132
|
+
* via the `destroy.targetSchema` link.
|
|
4133
|
+
*
|
|
4134
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4135
|
+
* via the `batch_destroy.targetSchema` link.
|
|
4136
|
+
*
|
|
4137
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4138
|
+
* via the `batch_publish.targetSchema` link.
|
|
4139
|
+
*
|
|
4140
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4141
|
+
* via the `batch_unpublish.targetSchema` link.
|
|
4142
|
+
*
|
|
4143
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4144
|
+
* via the `bulk_publish.targetSchema` link.
|
|
4145
|
+
*
|
|
4146
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4147
|
+
* via the `bulk_unpublish.targetSchema` link.
|
|
4148
|
+
*
|
|
4149
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4150
|
+
* via the `bulk_destroy.targetSchema` link.
|
|
4151
|
+
*
|
|
4152
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4153
|
+
* via the `bulk_move_to_stage.targetSchema` link.
|
|
4154
|
+
*
|
|
4155
|
+
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
4156
|
+
* via the `restore.targetSchema` link.
|
|
4157
|
+
*
|
|
4158
|
+
* This interface was referenced by `Upload`'s JSON-Schema
|
|
4159
|
+
* via the `create.targetSchema` link.
|
|
4160
|
+
*
|
|
4161
|
+
* This interface was referenced by `Upload`'s JSON-Schema
|
|
4162
|
+
* via the `update.targetSchema` link.
|
|
4163
|
+
*
|
|
4164
|
+
* This interface was referenced by `Upload`'s JSON-Schema
|
|
4165
|
+
* via the `batch_add_tags.targetSchema` link.
|
|
4166
|
+
*
|
|
4167
|
+
* This interface was referenced by `Upload`'s JSON-Schema
|
|
4168
|
+
* via the `batch_destroy.targetSchema` link.
|
|
4169
|
+
*
|
|
4170
|
+
* This interface was referenced by `Upload`'s JSON-Schema
|
|
4171
|
+
* via the `bulk_tag.targetSchema` link.
|
|
4172
|
+
*
|
|
4173
|
+
* This interface was referenced by `Upload`'s JSON-Schema
|
|
4174
|
+
* via the `bulk_destroy.targetSchema` link.
|
|
4175
|
+
*
|
|
4176
|
+
* This interface was referenced by `Site`'s JSON-Schema
|
|
4177
|
+
* via the `update.targetSchema` link.
|
|
4178
|
+
*
|
|
4179
|
+
* This interface was referenced by `Site`'s JSON-Schema
|
|
4180
|
+
* via the `activate_improved_timezone_management.targetSchema` link.
|
|
4181
|
+
*
|
|
4182
|
+
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
4183
|
+
* via the `definition` "job".
|
|
4184
|
+
*/
|
|
4185
|
+
export declare type Job = {
|
|
4186
|
+
id: JobIdentity;
|
|
4187
|
+
type: JobType;
|
|
4188
|
+
};
|
|
4189
|
+
export declare type ItemTypeUpdateTargetSchema = Job;
|
|
4190
|
+
export declare type ItemTypeDestroyTargetSchema = Job;
|
|
4191
|
+
export declare type FieldCreateTargetSchema = Job;
|
|
4192
|
+
export declare type FieldUpdateTargetSchema = Job;
|
|
4193
|
+
export declare type FieldDestroyTargetSchema = Job;
|
|
4194
|
+
export declare type FieldDuplicateTargetSchema = Job;
|
|
4195
|
+
export declare type ItemDuplicateTargetSchema = Job;
|
|
4196
|
+
export declare type ItemDestroyTargetSchema = Job;
|
|
4197
|
+
export declare type ItemBatchDestroyTargetSchema = Job;
|
|
4198
|
+
export declare type ItemBatchPublishTargetSchema = Job;
|
|
4199
|
+
export declare type ItemBatchUnpublishTargetSchema = Job;
|
|
4200
|
+
export declare type ItemBulkPublishTargetSchema = Job;
|
|
4201
|
+
export declare type ItemBulkUnpublishTargetSchema = Job;
|
|
4202
|
+
export declare type ItemBulkDestroyTargetSchema = Job;
|
|
4203
|
+
export declare type ItemBulkMoveToStageTargetSchema = Job;
|
|
4204
|
+
export declare type ItemVersionRestoreTargetSchema = Job;
|
|
4205
|
+
export declare type UploadCreateTargetSchema = Job;
|
|
4206
|
+
export declare type UploadUpdateTargetSchema = Job;
|
|
4207
|
+
export declare type UploadBatchAddTagsTargetSchema = Job;
|
|
4208
|
+
export declare type UploadBatchDestroyTargetSchema = Job;
|
|
4209
|
+
export declare type UploadBulkTagTargetSchema = Job;
|
|
4210
|
+
export declare type UploadBulkDestroyTargetSchema = Job;
|
|
4211
|
+
export declare type SiteUpdateTargetSchema = Job;
|
|
4212
|
+
export declare type SiteActivateImprovedTimezoneManagementTargetSchema = Job;
|
|
4213
|
+
/**
|
|
4214
|
+
* JSON API data
|
|
4215
|
+
*
|
|
4216
|
+
* This interface was referenced by `Job`'s JSON-Schema
|
|
4217
|
+
* via the `definition` "data".
|
|
4218
|
+
*/
|
|
4219
|
+
export declare type JobData = {
|
|
4220
|
+
type: JobType;
|
|
4221
|
+
id: JobIdentity;
|
|
4222
|
+
};
|
|
4223
|
+
/**
|
|
4224
|
+
* DatoCMS offers a number of different fields that you can combine togheter 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.
|
|
4225
|
+
*
|
|
4226
|
+
* ### Different field types require different settings
|
|
4227
|
+
*
|
|
4228
|
+
* When looking at a field resource, you have to pay attention to two particular properties, `validators` and `appearance`.
|
|
4229
|
+
*
|
|
4230
|
+
* The `validators` property expresses the set of validations to be performed server-side on a specific field value for it to be considered valid, while the `appearance` property lets you specify _how_ the field itself will be presented inside the form to the final editor.
|
|
4231
|
+
*
|
|
4232
|
+
* For both properties, the value to specify depends on the type of field itself. For example, you can add a "Limit character count" validation to a _Single-line string_ field, or set its appearence to "Show it as heading", but they won't be accepted for a ie. _Color_ field, as it supports different validations and appearance settings.
|
|
4233
|
+
*
|
|
4234
|
+
* ### Specifying validations
|
|
4235
|
+
*
|
|
4236
|
+
* The `validators` property requires an object whose keys are the validations that you want to be enforced, and the values are objects representing any settings that the validation itself requires. If the validation doesn't have additional settings, you just pass down an empty object.
|
|
4237
|
+
*
|
|
4238
|
+
* This is a valid example for a _Single-line string_ field:
|
|
4239
|
+
*
|
|
4240
|
+
* ```js
|
|
4241
|
+
* {
|
|
4242
|
+
* "validators": {
|
|
4243
|
+
* // "required" validator has no settings
|
|
4244
|
+
* "required": {},
|
|
4245
|
+
* // "length" validator requires "min" and/or "max" properties
|
|
4246
|
+
* "length": { "min": 80 }
|
|
4247
|
+
* }
|
|
4248
|
+
* }
|
|
4249
|
+
* ```
|
|
4250
|
+
*
|
|
4251
|
+
* Below you'll find a summary of all the validators available for each field type with their settings.
|
|
4252
|
+
*
|
|
4253
|
+
* Some validators are required for a specific type of field. For example, the _Slug_ field needs to have a `slug_title_field` validator to specify the ID of the _Single-line string_ field that will be used to generate the slug itself.
|
|
4254
|
+
*
|
|
4255
|
+
* ### Specifying the appearance
|
|
4256
|
+
*
|
|
4257
|
+
* The `appearance` property requires an object with three specific properties: `editor`, `parameters` and `addons`.
|
|
4258
|
+
*
|
|
4259
|
+
* The `editor` represents the type of editor that the users will see inside the form to change the value of this specific field. Depending on the type of field, DatoCMS offers a number of different editors for you to choose from. The `parameters` property is an object representing any additional settings that the editor itself might require.
|
|
4260
|
+
*
|
|
4261
|
+
* This is a valid example for a _Single-line string_ field:
|
|
4262
|
+
*
|
|
4263
|
+
* ```js
|
|
4264
|
+
* {
|
|
4265
|
+
* "appearance": {
|
|
4266
|
+
* // single_line is a DatoCMS built-in editor that you can use with single-line string fields
|
|
4267
|
+
* "editor": "single_line",
|
|
4268
|
+
* // each built-in editor has specific settings
|
|
4269
|
+
* "parameters": { "heading": true },
|
|
4270
|
+
* "addons": []
|
|
4271
|
+
* },
|
|
4272
|
+
* }
|
|
4273
|
+
* ```
|
|
4274
|
+
*
|
|
4275
|
+
* Following you'll find a summary of all the editors available for each field type with their settings.
|
|
4276
|
+
*
|
|
4277
|
+
* #### Setting the appearance to a field editor provided by a plugin
|
|
4278
|
+
*
|
|
4279
|
+
* If the project contains a plugin that exposes [manual field editors](/docs/plugin-sdk/manual-field-extensions), you can also configure the field to be presented with it instead of using one of the build-in editors.
|
|
4280
|
+
*
|
|
4281
|
+
* In this case:
|
|
4282
|
+
*
|
|
4283
|
+
* - the `editor` property must be the ID of the plugin;
|
|
4284
|
+
* - the `field_extension` property must be the ID of the specific manual field editor that the plugin exposes;
|
|
4285
|
+
* - the `parameters` property must provide a configuration object compatible with the [config screen of the manual field extension](/docs/plugin-sdk/manual-field-extensions#add-per-field-config-screens-to-manual-field-extensions), or an empty object if it doesn't require any configuration.
|
|
4286
|
+
*
|
|
4287
|
+
* ```js
|
|
4288
|
+
* {
|
|
4289
|
+
* "appearance": {
|
|
4290
|
+
* // "2132" is a the ID of a plugin exposing a manual field editor
|
|
4291
|
+
* "editor": "2134",
|
|
4292
|
+
* // "starRating" is a manual field editor exposed by the plugin
|
|
4293
|
+
* "field_extension": "starRating",
|
|
4294
|
+
* // this is a valid configuration for the "starRating" field editor
|
|
4295
|
+
* "parameters": { "maxRating": 5, "starsColor": "#ff0000" },
|
|
4296
|
+
* "addons": []
|
|
4297
|
+
* },
|
|
4298
|
+
* }
|
|
4299
|
+
* ```
|
|
4300
|
+
*
|
|
4301
|
+
* #### Configuring manual field addons
|
|
4302
|
+
*
|
|
4303
|
+
* If the project contains plugins that expose [manual field addons](/docs/plugin-sdk/manual-field-extensions), you can also add them to the field via the `addons` property.
|
|
4304
|
+
*
|
|
4305
|
+
* ```js
|
|
4306
|
+
* {
|
|
4307
|
+
* "appearance": {
|
|
4308
|
+
* "editor": "single_line",
|
|
4309
|
+
* "parameters": { "heading": true },
|
|
4310
|
+
* "addons": [
|
|
4311
|
+
* {
|
|
4312
|
+
* // "2138" is a the ID of a plugin exposing a manual addon editor
|
|
4313
|
+
* "id": "2138",
|
|
4314
|
+
* // "loremIpsumGenerator" is a manual field addon exposed by the plugin
|
|
4315
|
+
* "field_extension": "loremIpsumGenerator",
|
|
4316
|
+
* // this is a valid configuration for the "loremIpsumGenerator" field addon
|
|
4317
|
+
* "parameters": { "sentences": 2 },
|
|
4318
|
+
* }
|
|
4319
|
+
* ]
|
|
4320
|
+
* },
|
|
4321
|
+
* }
|
|
4322
|
+
* ```
|
|
4323
|
+
*
|
|
4324
|
+
* ### Available field types
|
|
4325
|
+
*
|
|
4326
|
+
* <details>
|
|
4327
|
+
* <summary>Single-line string (<code>string</code>)</summary>
|
|
4328
|
+
*
|
|
4329
|
+
* | Property | Value |
|
|
4330
|
+
* | ------------------------------ | ---------------------------------------------------- |
|
|
4331
|
+
* | Code | `string` |
|
|
4332
|
+
* | Built-in editors for the field | `single_line`, `string_radio_group`, `string_select` |
|
|
4333
|
+
* | Available validators | `required`, `unique`, `length`, `format`, `enum` |
|
|
4334
|
+
*
|
|
4335
|
+
* </details>
|
|
4336
|
+
*
|
|
4337
|
+
* <details>
|
|
4338
|
+
* <summary>Multi-line text (<code>text</code>)</summary>
|
|
4339
|
+
*
|
|
4340
|
+
* | Property | Value |
|
|
4341
|
+
* | ------------------------------ | --------------------------------- |
|
|
4342
|
+
* | Code | `text` |
|
|
4343
|
+
* | Built-in editors for the field | `markdown`, `wysiwyg`, `textarea` |
|
|
4344
|
+
* | Available validators | `required`, `length`, `format` |
|
|
4345
|
+
*
|
|
4346
|
+
* </details>
|
|
4347
|
+
*
|
|
4348
|
+
* <details>
|
|
4349
|
+
* <summary>Boolean (<code>boolean</code>)</summary>
|
|
4350
|
+
*
|
|
4351
|
+
* | Property | Value |
|
|
4352
|
+
* | ------------------------------ | -------------------------------- |
|
|
4353
|
+
* | Code | `boolean` |
|
|
4354
|
+
* | Built-in editors for the field | `boolean`, `boolean_radio_group` |
|
|
4355
|
+
* | Available validators | no validators available |
|
|
4356
|
+
*
|
|
4357
|
+
* </details>
|
|
4358
|
+
*
|
|
4359
|
+
* <details>
|
|
4360
|
+
* <summary>Integer (<code>integer</code>)</summary>
|
|
4361
|
+
*
|
|
4362
|
+
* | Property | Value |
|
|
4363
|
+
* | ------------------------------ | -------------------------- |
|
|
4364
|
+
* | Code | `integer` |
|
|
4365
|
+
* | Built-in editors for the field | `integer` |
|
|
4366
|
+
* | Available validators | `required`, `number_range` |
|
|
4367
|
+
*
|
|
4368
|
+
* </details>
|
|
4369
|
+
*
|
|
4370
|
+
* <details>
|
|
4371
|
+
* <summary>Float (<code>float</code>)</summary>
|
|
4372
|
+
*
|
|
4373
|
+
* | Property | Value |
|
|
4374
|
+
* | ------------------------------ | -------------------------- |
|
|
4375
|
+
* | Code | `float` |
|
|
4376
|
+
* | Built-in editors for the field | `float` |
|
|
4377
|
+
* | Available validators | `required`, `number_range` |
|
|
4378
|
+
*
|
|
4379
|
+
* </details>
|
|
4380
|
+
*
|
|
4381
|
+
* <details>
|
|
4382
|
+
* <summary>Date (<code>date</code>)</summary>
|
|
4383
|
+
*
|
|
4384
|
+
* | Property | Value |
|
|
4385
|
+
* | ------------------------------ | ------------------------ |
|
|
4386
|
+
* | Code | `date` |
|
|
4387
|
+
* | Built-in editors for the field | `date_picker` |
|
|
4388
|
+
* | Available validators | `required`, `date_range` |
|
|
4389
|
+
*
|
|
4390
|
+
* </details>
|
|
4391
|
+
*
|
|
4392
|
+
* <details>
|
|
4393
|
+
* <summary>Date time (<code>date_time</code>)</summary>
|
|
4394
|
+
*
|
|
4395
|
+
* | Property | Value |
|
|
4396
|
+
* | ------------------------------ | ----------------------------- |
|
|
4397
|
+
* | Code | `date_time` |
|
|
4398
|
+
* | Built-in editors for the field | `date_time_picker` |
|
|
4399
|
+
* | Available validators | `required`, `date_time_range` |
|
|
4400
|
+
*
|
|
4401
|
+
* </details>
|
|
4402
|
+
*
|
|
4403
|
+
* <details>
|
|
4404
|
+
* <summary>Color (<code>color</code>)</summary>
|
|
4405
|
+
*
|
|
4406
|
+
* | Property | Value |
|
|
4407
|
+
* | ------------------------------ | -------------- |
|
|
4408
|
+
* | Code | `color` |
|
|
4409
|
+
* | Built-in editors for the field | `color_picker` |
|
|
4410
|
+
* | Available validators | `required` |
|
|
4411
|
+
*
|
|
4412
|
+
* </details>
|
|
4413
|
+
*
|
|
4414
|
+
* <details>
|
|
4415
|
+
* <summary>JSON (<code>json</code>)</summary>
|
|
4416
|
+
*
|
|
4417
|
+
* | Property | Value |
|
|
4418
|
+
* | ------------------------------ | ------------------------------------------------------ |
|
|
4419
|
+
* | Code | `json` |
|
|
4420
|
+
* | Built-in editors for the field | `json`, `string_multi_select`, `string_checkbox_group` |
|
|
4421
|
+
* | Available validators | `required` |
|
|
4422
|
+
*
|
|
4423
|
+
* </details>
|
|
4424
|
+
*
|
|
4425
|
+
* <details>
|
|
4426
|
+
* <summary>Location (<code>lat_lon</code>)</summary>
|
|
4427
|
+
*
|
|
4428
|
+
* | Property | Value |
|
|
4429
|
+
* | ------------------------------ | ---------- |
|
|
4430
|
+
* | Code | `lat_lon` |
|
|
4431
|
+
* | Built-in editors for the field | `map` |
|
|
4432
|
+
* | Available validators | `required` |
|
|
4433
|
+
*
|
|
4434
|
+
* </details>
|
|
4435
|
+
*
|
|
4436
|
+
* <details>
|
|
4437
|
+
* <summary>SEO (<code>seo</code>)</summary>
|
|
4438
|
+
*
|
|
4439
|
+
* | Property | Value |
|
|
4440
|
+
* | ------------------------------ | -------------------------------------------------------------------------------------------- |
|
|
4441
|
+
* | Code | `seo` |
|
|
4442
|
+
* | Built-in editors for the field | `seo` |
|
|
4443
|
+
* | Available validators | `required_seo_fields`, `file_size`, `image_dimensions`, `title_length`, `description_length` |
|
|
4444
|
+
*
|
|
4445
|
+
* </details>
|
|
4446
|
+
*
|
|
4447
|
+
* <details>
|
|
4448
|
+
* <summary>Slug (<code>slug</code>)</summary>
|
|
4449
|
+
*
|
|
4450
|
+
* | Property | Value |
|
|
4451
|
+
* | ------------------------------ | ----------------------------------- |
|
|
4452
|
+
* | Code | `slug` |
|
|
4453
|
+
* | Built-in editors for the field | `slug` |
|
|
4454
|
+
* | Required validators | `slug_title_field` |
|
|
4455
|
+
* | Other validators available | `required`, `length`, `slug_format` |
|
|
4456
|
+
*
|
|
4457
|
+
* </details>
|
|
4458
|
+
*
|
|
4459
|
+
* <details>
|
|
4460
|
+
* <summary>External video (<code>video</code>)</summary>
|
|
4461
|
+
*
|
|
4462
|
+
* | Property | Value |
|
|
4463
|
+
* | ------------------------------ | ---------- |
|
|
4464
|
+
* | Code | `video` |
|
|
4465
|
+
* | Built-in editors for the field | `video` |
|
|
4466
|
+
* | Available validators | `required` |
|
|
4467
|
+
*
|
|
4468
|
+
* </details>
|
|
4469
|
+
*
|
|
4470
|
+
* <details>
|
|
4471
|
+
* <summary>Single-asset (<code>file</code>)</summary>
|
|
4472
|
+
*
|
|
4473
|
+
* | Property | Value |
|
|
4474
|
+
* | ------------------------------ | ------------------------------------------------------------------------------ |
|
|
4475
|
+
* | Code | `file` |
|
|
4476
|
+
* | Built-in editors for the field | `file` |
|
|
4477
|
+
* | Available validators | `required`, `file_size`, `image_dimensions`, `extension`, `required_alt_title` |
|
|
4478
|
+
*
|
|
4479
|
+
* </details>
|
|
4480
|
+
*
|
|
4481
|
+
* <details>
|
|
4482
|
+
* <summary>Asset gallery (<code>gallery</code>)</summary>
|
|
4483
|
+
*
|
|
4484
|
+
* | Property | Value |
|
|
4485
|
+
* | ------------------------------ | -------------------------------------------------------------------------- |
|
|
4486
|
+
* | Code | `gallery` |
|
|
4487
|
+
* | Built-in editors for the field | `gallery` |
|
|
4488
|
+
* | Available validators | `size`, `file_size`, `image_dimensions`, `extension`, `required_alt_title` |
|
|
4489
|
+
*
|
|
4490
|
+
* </details>
|
|
4491
|
+
*
|
|
4492
|
+
* <details>
|
|
4493
|
+
* <summary>Single link (<code>link</code>)</summary>
|
|
4494
|
+
*
|
|
4495
|
+
* | Property | Value |
|
|
4496
|
+
* | ------------------------------ | --------------------------- |
|
|
4497
|
+
* | Code | `link` |
|
|
4498
|
+
* | Built-in editors for the field | `link_select`, `link_embed` |
|
|
4499
|
+
* | Default `editor` | `link_select` |
|
|
4500
|
+
* | Required validators | `item_item_type` |
|
|
4501
|
+
* | Other validators available | `required`, `unique` |
|
|
4502
|
+
*
|
|
4503
|
+
* </details>
|
|
4504
|
+
*
|
|
4505
|
+
* <details>
|
|
4506
|
+
* <summary>Multiple links (<code>links</code>)</summary>
|
|
4507
|
+
*
|
|
4508
|
+
* | Property | Value |
|
|
4509
|
+
* | ------------------------------ | ----------------------------- |
|
|
4510
|
+
* | Code | `links` |
|
|
4511
|
+
* | Built-in editors for the field | `links_select`, `links_embed` |
|
|
4512
|
+
* | Default `editor` | `links_select` |
|
|
4513
|
+
* | Required validators | `items_item_type` |
|
|
4514
|
+
* | Other validators available | `size` |
|
|
4515
|
+
*
|
|
4516
|
+
* </details>
|
|
4517
|
+
*
|
|
4518
|
+
* <details>
|
|
4519
|
+
* <summary>Modular content (<code>rich_text</code>)</summary>
|
|
4520
|
+
*
|
|
4521
|
+
* | Property | Value |
|
|
4522
|
+
* | ------------------------------ | ------------------ |
|
|
4523
|
+
* | Code | `rich_text` |
|
|
4524
|
+
* | Built-in editors for the field | `rich_text` |
|
|
4525
|
+
* | Required validators | `rich_text_blocks` |
|
|
4526
|
+
* | Other validators available | `size` |
|
|
4527
|
+
*
|
|
4528
|
+
* </details>
|
|
4529
|
+
*
|
|
4530
|
+
* <details>
|
|
4531
|
+
* <summary>Structured text (<code>structured_text</code>)</summary>
|
|
4532
|
+
*
|
|
4533
|
+
* | Property | Value |
|
|
4534
|
+
* | ------------------------------ | ------------------------------------------------- |
|
|
4535
|
+
* | Code | `structured_text` |
|
|
4536
|
+
* | Built-in editors for the field | `structured_text` |
|
|
4537
|
+
* | Required validators | `structured_text_blocks`, `structured_text_links` |
|
|
4538
|
+
* | Other validators available | `length` |
|
|
4539
|
+
*
|
|
4540
|
+
* </details>
|
|
4541
|
+
*
|
|
4542
|
+
* ### Validators
|
|
4543
|
+
*
|
|
4544
|
+
* <details>
|
|
4545
|
+
* <summary><code>date_range</code></summary>
|
|
4546
|
+
*
|
|
4547
|
+
* Accept dates only inside a specified date range.
|
|
4548
|
+
*
|
|
4549
|
+
* | Parameter | Type | Required | Description |
|
|
4550
|
+
* | --------- | ------------- | -------- | ------------ |
|
|
4551
|
+
* | `min` | ISO 8601 date | | Minimum date |
|
|
4552
|
+
* | `max` | ISO 8601 date | | Maximum date |
|
|
4553
|
+
*
|
|
4554
|
+
* At least one of the parameters must be specified.
|
|
4555
|
+
*
|
|
4556
|
+
* </details>
|
|
4557
|
+
*
|
|
4558
|
+
* <details>
|
|
4559
|
+
* <summary><code>date_time_range</code></summary>
|
|
4560
|
+
*
|
|
4561
|
+
* Accept date times only inside a specified date range.
|
|
4562
|
+
*
|
|
4563
|
+
* | Parameter | Type | Required | Description |
|
|
4564
|
+
* | --------- | ----------------- | -------- | ---------------- |
|
|
4565
|
+
* | `min` | ISO 8601 datetime | | Minimum datetime |
|
|
4566
|
+
* | `max` | ISO 8601 datetime | | Maximum datetime |
|
|
4567
|
+
*
|
|
4568
|
+
* At least one of the parameters must be specified.
|
|
4569
|
+
*
|
|
4570
|
+
* </details>
|
|
4571
|
+
*
|
|
4572
|
+
* <details>
|
|
4573
|
+
* <summary><code>enum</code></summary>
|
|
4574
|
+
*
|
|
4575
|
+
* Only accept a specific set of values
|
|
4576
|
+
*
|
|
4577
|
+
* | Parameter | Type | Required | Description |
|
|
4578
|
+
* | --------- | --------------- | -------- | --------------------- |
|
|
4579
|
+
* | `values` | `Array<String>` | ✅ | Set of allowed values |
|
|
4580
|
+
*
|
|
4581
|
+
* </details>
|
|
4582
|
+
*
|
|
4583
|
+
* <details>
|
|
4584
|
+
* <summary><code>extension</code></summary>
|
|
4585
|
+
*
|
|
4586
|
+
* Only accept assets with specific file extensions.
|
|
4587
|
+
*
|
|
4588
|
+
* | Parameter | Type | Required | Description |
|
|
4589
|
+
* | ----------------- | ----------------------------------------- | -------- | ------------------------------ |
|
|
4590
|
+
* | `extensions` | `Array<String>` | | Set of allowed file extensions |
|
|
4591
|
+
* | `predefined_list` | one of `"image"`, `"transformable_image"`, `"video"`, `"document"` | | Allowed file type |
|
|
4592
|
+
*
|
|
4593
|
+
* Only one of the parameters must be specified.
|
|
4594
|
+
*
|
|
4595
|
+
* </details>
|
|
4596
|
+
*
|
|
4597
|
+
* <details>
|
|
4598
|
+
* <summary><code>file_size</code></summary>
|
|
4599
|
+
*
|
|
4600
|
+
* Accept assets only inside a specified date range.
|
|
4601
|
+
*
|
|
4602
|
+
* | Parameter | Type | Required | Description |
|
|
4603
|
+
* | ----------- | ---------------------------- | -------- | ---------------------------------- |
|
|
4604
|
+
* | `min_value` | `Integer` | | Numeric value for minimum filesize |
|
|
4605
|
+
* | `min_unit` | one of `"B"`, `"KB"`, `"MB"` | | Unit for minimum filesize |
|
|
4606
|
+
* | `max_value` | `Integer` | | Numeric value for maximum filesize |
|
|
4607
|
+
* | `max_unit` | one of `"B"`, `"KB"`, `"MB"` | | Unit for maximum filesize |
|
|
4608
|
+
*
|
|
4609
|
+
* At least one couple of value/unit must be specified.
|
|
4610
|
+
*
|
|
4611
|
+
* </details>
|
|
4612
|
+
*
|
|
4613
|
+
* <details>
|
|
4614
|
+
* <summary><code>format</code></summary>
|
|
4615
|
+
*
|
|
4616
|
+
* Only accept strings having a specific format.
|
|
4617
|
+
*
|
|
4618
|
+
* | Parameter | Type | Required | Description |
|
|
4619
|
+
* | -------------------- | ------------------------- | -------- | ---------------------------------- |
|
|
4620
|
+
* | `custom_pattern` | `Regexp` | | Regular expression to be validated |
|
|
4621
|
+
* | `predefined_pattern` | one of `"email"`, `"url"` | | Allowed format |
|
|
4622
|
+
*
|
|
4623
|
+
* Only one of the parameters must be specified.
|
|
4624
|
+
*
|
|
4625
|
+
* </details>
|
|
4626
|
+
*
|
|
4627
|
+
* <details>
|
|
4628
|
+
* <summary><code>slug_format</code></summary>
|
|
4629
|
+
*
|
|
4630
|
+
* Only accept slugs having a specific format.
|
|
4631
|
+
*
|
|
4632
|
+
* | Parameter | Type | Required | Description |
|
|
4633
|
+
* | -------------------- | ---------------- | -------- | ---------------------------------- |
|
|
4634
|
+
* | `custom_pattern` | `Regexp` | | Regular expression to be validated |
|
|
4635
|
+
* | `predefined_pattern` | `"webpage_slug"` | | Allowed format |
|
|
4636
|
+
*
|
|
4637
|
+
* Only one of the parameters must be specified.
|
|
4638
|
+
*
|
|
4639
|
+
* </details>
|
|
4640
|
+
*
|
|
4641
|
+
* <details>
|
|
4642
|
+
* <summary><code>image_dimensions</code></summary>
|
|
4643
|
+
*
|
|
4644
|
+
* Accept assets only within a specified height/width range.
|
|
4645
|
+
*
|
|
4646
|
+
* | Parameter | Type | Required | Description |
|
|
4647
|
+
* | ------------------ | --------- | -------- | -------------------------------- |
|
|
4648
|
+
* | `width_min_value` | `Integer` | | Numeric value for minimum width |
|
|
4649
|
+
* | `width_max_value` | `Integer` | | Numeric value for maximum height |
|
|
4650
|
+
* | `height_min_value` | `Integer` | | Numeric value for minimum width |
|
|
4651
|
+
* | `height_max_value` | `Integer` | | Numeric value for maximum height |
|
|
4652
|
+
*
|
|
4653
|
+
* At least one parameter must be specified.
|
|
4654
|
+
*
|
|
4655
|
+
* </details>
|
|
4656
|
+
*
|
|
4657
|
+
* <details>
|
|
4658
|
+
* <summary><code>item_item_type</code></summary>
|
|
4659
|
+
*
|
|
4660
|
+
* Only accept references to records of the specified models.
|
|
4661
|
+
*
|
|
4662
|
+
* | Parameter | Type | Required | Description |
|
|
4663
|
+
* | ------------------------------------------------- | ------------------------------------------------------------------------ | -------- | --------------------------------------------------------------------------------------------------- |
|
|
4664
|
+
* | `item_types` | `Array<Model ID>` | ✅ | Set of allowed model IDs |
|
|
4665
|
+
* | `on_publish_with_unpublished_references_strategy` | `"fail"`, `"publish_references"` (default value: `"fail"`) | | Strategy to apply when a publishing is requested and this field references some unpublished records |
|
|
4666
|
+
* | `on_reference_unpublish_strategy` | `"fail"`, `"unpublish"`, `"delete_references"` (default value: `"fail"`) | | Strategy to apply when unpublishing is requested for a record referenced by this field |
|
|
4667
|
+
* | `on_reference_delete_strategy` | `"fail"`, `"delete_references"` (default value: `"delete_references"`) | | Strategy to apply when deletion is requested for a record referenced by this field |
|
|
4668
|
+
*
|
|
4669
|
+
* Possible values for `on_publish_with_unpublished_references_strategy`:
|
|
4670
|
+
*
|
|
4671
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4672
|
+
* - `"publish_references"`: Publish also the referenced records
|
|
4673
|
+
*
|
|
4674
|
+
* Possible values for `on_reference_unpublish_strategy`:
|
|
4675
|
+
*
|
|
4676
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4677
|
+
* - `"unpublish"`: Unpublish also this record
|
|
4678
|
+
* - `"delete_references"`: Try to remove the reference to the unpublished record (if the field has a `required` validation it will fail)
|
|
4679
|
+
*
|
|
4680
|
+
* Possible values for `on_reference_delete_strategy`:
|
|
4681
|
+
*
|
|
4682
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4683
|
+
* - `"delete_references"`: Try to remove the reference to the deleted record (if the field has a `required` validation it will fail)
|
|
4684
|
+
* </details>
|
|
4685
|
+
*
|
|
4686
|
+
* <details>
|
|
4687
|
+
* <summary><code>items_item_type</code></summary>
|
|
4688
|
+
*
|
|
4689
|
+
* Only accept references to records of the specified models.
|
|
4690
|
+
*
|
|
4691
|
+
* | Parameter | Type | Required | Description |
|
|
4692
|
+
* | ------------------------------------------------- | ------------------------------------------------------------------------ | -------- | --------------------------------------------------------------------------------------------------- |
|
|
4693
|
+
* | `item_types` | `Array<Model ID>` | ✅ | Set of allowed model IDs |
|
|
4694
|
+
* | `on_publish_with_unpublished_references_strategy` | `"fail"`, `"publish_references"` (default value: `"fail"`) | | Strategy to apply when a publishing is requested and this field references some unpublished records |
|
|
4695
|
+
* | `on_reference_unpublish_strategy` | `"fail"`, `"unpublish"`, `"delete_references"` (default value: `"fail"`) | | Strategy to apply when unpublishing is requested for a record referenced by this field |
|
|
4696
|
+
* | `on_reference_delete_strategy` | `"fail"`, `"delete_references"` (default value: `"delete_references"`) | | Strategy to apply when deletion is requested for a record referenced by this field |
|
|
4697
|
+
*
|
|
4698
|
+
* Possible values for `on_publish_with_unpublished_references_strategy`:
|
|
4699
|
+
*
|
|
4700
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4701
|
+
* - `"publish_references"`: Publish also the referenced records
|
|
4702
|
+
*
|
|
4703
|
+
* Possible values for `on_reference_unpublish_strategy`:
|
|
4704
|
+
*
|
|
4705
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4706
|
+
* - `"unpublish"`: Unpublish also this record
|
|
4707
|
+
* - `"delete_references"`: Try to remove the reference to the unpublished record (if the field has a `required` validation it will fail)
|
|
4708
|
+
*
|
|
4709
|
+
* Possible values for `on_reference_delete_strategy`:
|
|
4710
|
+
*
|
|
4711
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4712
|
+
* - `"delete_references"`: Try to remove the reference to the deleted record (if the field has a `required` validation it will fail)
|
|
4713
|
+
* </details>
|
|
4714
|
+
*
|
|
4715
|
+
* <details>
|
|
4716
|
+
* <summary><code>length</code></summary>
|
|
4717
|
+
*
|
|
4718
|
+
* Accept strings only with a specified number of characters.
|
|
4719
|
+
*
|
|
4720
|
+
* | Parameter | Type | Required | Description |
|
|
4721
|
+
* | --------- | --------- | -------- | --------------- |
|
|
4722
|
+
* | `min` | `Integer` | | Minimum length |
|
|
4723
|
+
* | `eq` | `Integer` | | Expected length |
|
|
4724
|
+
* | `max` | `Integer` | | Maximum length |
|
|
4725
|
+
*
|
|
4726
|
+
* At least one parameter must be specified.
|
|
4727
|
+
*
|
|
4728
|
+
* </details>
|
|
4729
|
+
*
|
|
4730
|
+
* <details>
|
|
4731
|
+
* <summary><code>number_range</code></summary>
|
|
4732
|
+
*
|
|
4733
|
+
* Accept numbers only inside a specified range.
|
|
4734
|
+
*
|
|
4735
|
+
* | Parameter | Type | Required | Description |
|
|
4736
|
+
* | --------- | ------- | -------- | ------------- |
|
|
4737
|
+
* | `min` | `Float` | | Minimum value |
|
|
4738
|
+
* | `max` | `Float` | | Maximum value |
|
|
4739
|
+
*
|
|
4740
|
+
* At least one of the parameters must be specified.
|
|
4741
|
+
*
|
|
4742
|
+
* </details>
|
|
4743
|
+
*
|
|
4744
|
+
* <details>
|
|
4745
|
+
* <summary><code>required</code></summary>
|
|
4746
|
+
*
|
|
4747
|
+
* Value must be specified or it won't be valid.
|
|
4748
|
+
*
|
|
4749
|
+
* </details>
|
|
4750
|
+
*
|
|
4751
|
+
* <details>
|
|
4752
|
+
* <summary><code>required_alt_title</code></summary>
|
|
4753
|
+
*
|
|
4754
|
+
* Assets contained in the field are required to specify custom title or alternate text, or they won't be valid.
|
|
4755
|
+
*
|
|
4756
|
+
* | Parameter | Type | Required | Description |
|
|
4757
|
+
* | --------- | --------- | -------- | ---------------------------------------------------------- |
|
|
4758
|
+
* | `title` | `Boolean` | | Whether the title for the asset must be specified |
|
|
4759
|
+
* | `alt` | `Boolean` | | Whether the alternate text for the asset must be specified |
|
|
4760
|
+
*
|
|
4761
|
+
* At least one of the parameters must be specified.
|
|
4762
|
+
*
|
|
4763
|
+
* </details>
|
|
4764
|
+
*
|
|
4765
|
+
* <details>
|
|
4766
|
+
* <summary><code>required_seo_fields</code></summary>
|
|
4767
|
+
*
|
|
4768
|
+
* SEO field is to specify one or more properties, or it won't be valid.
|
|
4769
|
+
*
|
|
4770
|
+
* | Parameter | Type | Required | Description |
|
|
4771
|
+
* | -------------- | --------- | -------- | -------------------------------------------------- |
|
|
4772
|
+
* | `title` | `Boolean` | | Whether the meta title must be specified |
|
|
4773
|
+
* | `description` | `Boolean` | | Whether the meta description must be specified |
|
|
4774
|
+
* | `image` | `Boolean` | | Whether the social sharing image must be specified |
|
|
4775
|
+
* | `twitter_card` | `Boolean` | | Whether the type of Twitter card must be specified |
|
|
4776
|
+
*
|
|
4777
|
+
* At least one of the parameters must be specified.
|
|
4778
|
+
*
|
|
4779
|
+
* </details>
|
|
4780
|
+
*
|
|
4781
|
+
* <details>
|
|
4782
|
+
* <summary><code>title_length</code></summary>
|
|
4783
|
+
*
|
|
4784
|
+
* Limits the length of the title for a SEO field. Search engines usually truncate title tags to 60 character so it is a good practice to keep the title around this length.
|
|
4785
|
+
*
|
|
4786
|
+
* | Parameter | Type | Required | Description |
|
|
4787
|
+
* | --------- | --------- | -------- | ------------- |
|
|
4788
|
+
* | `min` | `Integer` | | Minimum value |
|
|
4789
|
+
* | `max` | `Integer` | | Maximum value |
|
|
4790
|
+
*
|
|
4791
|
+
* At least one of the parameters must be specified.
|
|
4792
|
+
*
|
|
4793
|
+
* </details>
|
|
4794
|
+
*
|
|
4795
|
+
* <details>
|
|
4796
|
+
* <summary><code>description_length</code></summary>
|
|
4797
|
+
*
|
|
4798
|
+
* Limits the length of the description for a SEO field. Search engines usually truncate description tags to 160 character so it is a good practice to keep the description around this length.
|
|
4799
|
+
*
|
|
4800
|
+
* | Parameter | Type | Required | Description |
|
|
4801
|
+
* | --------- | --------- | -------- | ------------- |
|
|
4802
|
+
* | `min` | `Integer` | | Minimum value |
|
|
4803
|
+
* | `max` | `Integer` | | Maximum value |
|
|
4804
|
+
*
|
|
4805
|
+
* At least one of the parameters must be specified.
|
|
4806
|
+
*
|
|
4807
|
+
* </details>
|
|
4808
|
+
*
|
|
4809
|
+
* <details>
|
|
4810
|
+
* <summary><code>rich_text_blocks</code></summary>
|
|
4811
|
+
*
|
|
4812
|
+
* Only accept references to block records of the specified block models.
|
|
4813
|
+
*
|
|
4814
|
+
* | Parameter | Type | Required | Description |
|
|
4815
|
+
* | ------------ | ----------------------- | -------- | ------------------------------ |
|
|
4816
|
+
* | `item_types` | `Array<Block Model ID>` | ✅ | Set of allowed Block Model IDs |
|
|
4817
|
+
*
|
|
4818
|
+
* </details>
|
|
4819
|
+
*
|
|
4820
|
+
* <details>
|
|
4821
|
+
* <summary><code>structured_text_blocks</code></summary>
|
|
4822
|
+
*
|
|
4823
|
+
* Only accept references to block records of the specified block models.
|
|
4824
|
+
*
|
|
4825
|
+
* | Parameter | Type | Required | Description |
|
|
4826
|
+
* | ------------ | ----------------------- | -------- | ------------------------------ |
|
|
4827
|
+
* | `item_types` | `Array<Block Model ID>` | ✅ | Set of allowed Block Model IDs |
|
|
4828
|
+
*
|
|
4829
|
+
* </details>
|
|
4830
|
+
*
|
|
4831
|
+
* <details>
|
|
4832
|
+
* <summary><code>structured_text_links</code></summary>
|
|
4833
|
+
*
|
|
4834
|
+
* Only accept `itemLink` to `inlineItem` nodes for records of the specified models.
|
|
4835
|
+
*
|
|
4836
|
+
* | Parameter | Type | Required | Description |
|
|
4837
|
+
* | ------------------------------------------------- | ------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------- |
|
|
4838
|
+
* | `item_types` | `Array<Model ID>` | ✅ | Set of allowed model IDs |
|
|
4839
|
+
* | `on_publish_with_unpublished_references_strategy` | `"fail"`, `"publish_references"` (default value: `"fail"`) | | Strategy to apply when a publishing is requested and this field references some unpublished records |
|
|
4840
|
+
* | `on_reference_unpublish_strategy` | `"fail"`, `"unpublish"`, `"delete_references"` (default value: `"delete_references"`) | | Strategy to apply when unpublishing is requested for a record referenced by this field |
|
|
4841
|
+
* | `on_reference_delete_strategy` | `"fail"`, `"delete_references"` (default value: `"delete_references"`) | | Strategy to apply when deletion is requested for a record referenced by this field |
|
|
4842
|
+
*
|
|
4843
|
+
* Possible values for `on_publish_with_unpublished_references_strategy`:
|
|
4844
|
+
*
|
|
4845
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4846
|
+
* - `"publish_references"`: Publish also the referenced records
|
|
4847
|
+
*
|
|
4848
|
+
* Possible values for `on_reference_unpublish_strategy`:
|
|
4849
|
+
*
|
|
4850
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4851
|
+
* - `"unpublish"`: Unpublish also this record
|
|
4852
|
+
* - `"delete_references"`: Try to remove the reference to the unpublished record (if the field has a `required` validation it will fail)
|
|
4853
|
+
*
|
|
4854
|
+
* Possible values for `on_reference_delete_strategy`:
|
|
4855
|
+
*
|
|
4856
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4857
|
+
* - `"delete_references"`: Try to remove the reference to the deleted record (if the field has a `required` validation it will fail)
|
|
4858
|
+
* </details>
|
|
4859
|
+
*
|
|
4860
|
+
* <details>
|
|
4861
|
+
* <summary><code>size</code></summary>
|
|
4862
|
+
*
|
|
4863
|
+
* Only accept a number of items within the specified range.
|
|
4864
|
+
*
|
|
4865
|
+
* | Parameter | Type | Required | Description |
|
|
4866
|
+
* | ------------- | --------- | -------- | -------------------------------------------------- |
|
|
4867
|
+
* | `min` | `Integer` | | Minimum length |
|
|
4868
|
+
* | `eq` | `Integer` | | Expected length |
|
|
4869
|
+
* | `max` | `Integer` | | Maximum length |
|
|
4870
|
+
* | `multiple_of` | `Integer` | | The number of items must be multiple of this value |
|
|
4871
|
+
*
|
|
4872
|
+
* At least one parameter must be specified.
|
|
4873
|
+
*
|
|
4874
|
+
* </details>
|
|
4875
|
+
*
|
|
4876
|
+
* <details>
|
|
4877
|
+
* <summary><code>slug_title_field</code></summary>
|
|
4878
|
+
*
|
|
4879
|
+
* Specifies the ID of the _Single-line string_ field that will be used to generate the slug
|
|
4880
|
+
*
|
|
4881
|
+
* | Parameter | Type | Required | Description |
|
|
4882
|
+
* | ---------------- | ---------- | -------- | ------------------------------------------------ |
|
|
4883
|
+
* | `title_field_id` | `Field ID` | ✅ | The field that will be used to generate the slug |
|
|
4884
|
+
*
|
|
4885
|
+
* </details>
|
|
4886
|
+
*
|
|
4887
|
+
* <details>
|
|
4888
|
+
* <summary><code>unique</code></summary>
|
|
4889
|
+
*
|
|
4890
|
+
* The value must be unique across the whole collection of records.
|
|
4891
|
+
*
|
|
4892
|
+
* </details>
|
|
4893
|
+
*
|
|
4894
|
+
* ### Configuration parameters for DatoCMS built-in field editors
|
|
4895
|
+
*
|
|
4896
|
+
* If a field editor is not specified in this table, just pass an empty object `{}` as its configuration parameters.
|
|
4897
|
+
*
|
|
4898
|
+
* <details>
|
|
4899
|
+
* <summary><code>boolean_radio_group</code></summary>
|
|
4900
|
+
*
|
|
4901
|
+
* Radio group input for _boolean_ fields.
|
|
4902
|
+
*
|
|
4903
|
+
* | Parameter | Type | Required | Description |
|
|
4904
|
+
* | ---------------- | ---------------------------------- | -------- | ----------------------------------------- |
|
|
4905
|
+
* | `positive_radio` | `{ label: string, hint?: string }` | ✅ | Radio input for positive choice (`true`) |
|
|
4906
|
+
* | `negative_radio` | `{ label: string, hint?: string }` | ✅ | Radio input for negative choice (`false`) |
|
|
4907
|
+
*
|
|
4908
|
+
* </details>
|
|
4909
|
+
*
|
|
4910
|
+
* <details>
|
|
4911
|
+
* <summary><code>string_radio_group</code></summary>
|
|
4912
|
+
*
|
|
4913
|
+
* Radio group input for _string_ fields.
|
|
4914
|
+
*
|
|
4915
|
+
* | Parameter | Type | Required | Description |
|
|
4916
|
+
* | --------- | -------------------------------------------------------- | -------- | --------------------------- |
|
|
4917
|
+
* | `radios` | `Array<{ label: string, value: string, hint?: string }>` | ✅ | The different radio options |
|
|
4918
|
+
*
|
|
4919
|
+
* </details>
|
|
4920
|
+
*
|
|
4921
|
+
* <details>
|
|
4922
|
+
* <summary><code>string_select</code></summary>
|
|
4923
|
+
*
|
|
4924
|
+
* Select input for _string_ fields.
|
|
4925
|
+
*
|
|
4926
|
+
* | Parameter | Type | Required | Description |
|
|
4927
|
+
* | --------- | -------------------------------------------------------- | -------- | ---------------------------- |
|
|
4928
|
+
* | `options` | `Array<{ label: string, value: string, hint?: string }>` | ✅ | The different select options |
|
|
4929
|
+
*
|
|
4930
|
+
* </details>
|
|
4931
|
+
*
|
|
4932
|
+
* <details>
|
|
4933
|
+
* <summary><code>string_multi_select</code></summary>
|
|
4934
|
+
*
|
|
4935
|
+
* Select input for _JSON_ fields, to edit an array of strings.
|
|
4936
|
+
*
|
|
4937
|
+
* | Parameter | Type | Required | Description |
|
|
4938
|
+
* | --------- | -------------------------------------------------------- | -------- | ---------------------------- |
|
|
4939
|
+
* | `options` | `Array<{ label: string, value: string, hint?: string }>` | ✅ | The different select options |
|
|
4940
|
+
*
|
|
4941
|
+
* </details>
|
|
4942
|
+
*
|
|
4943
|
+
* <details>
|
|
4944
|
+
* <summary><code>string_checkbox_group</code></summary>
|
|
4945
|
+
*
|
|
4946
|
+
* Multiple chechboxes input for _JSON_ fields, to edit an array of strings.
|
|
4947
|
+
*
|
|
4948
|
+
* | Parameter | Type | Required | Description |
|
|
4949
|
+
* | --------- | -------------------------------------------------------- | -------- | ---------------------------- |
|
|
4950
|
+
* | `options` | `Array<{ label: string, value: string, hint?: string }>` | ✅ | The different select options |
|
|
4951
|
+
*
|
|
4952
|
+
* </details>
|
|
4953
|
+
*
|
|
4954
|
+
* <details>
|
|
4955
|
+
* <summary><code>single_line</code></summary>
|
|
4956
|
+
*
|
|
4957
|
+
* Simple textual input for _Single-line string_ fields.
|
|
4958
|
+
*
|
|
4959
|
+
* | Parameter | Type | Required | Description |
|
|
4960
|
+
* | --------- | --------- | -------- | -------------------------------------------------------------------------------- |
|
|
4961
|
+
* | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
|
|
4962
|
+
*
|
|
4963
|
+
* </details>
|
|
4964
|
+
*
|
|
4965
|
+
* <details>
|
|
4966
|
+
* <summary><code>markdown</code></summary>
|
|
4967
|
+
*
|
|
4968
|
+
* Markdown editor for _Multiple-paragraph text_ fields.
|
|
4969
|
+
*
|
|
4970
|
+
* | Parameter | Type | Required | Description |
|
|
4971
|
+
* | --------- | --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
4972
|
+
* | `toolbar` | `Array<String>` | ✅ | Specify which buttons the toolbar should have. Valid values: `"heading"`, `"bold"`, `"italic"`, `"strikethrough"`, `"code"`, `"unordered_list"`, `"ordered_list"`, `"quote"`, `"link"`, `"image"`, `"fullscreen"` |
|
|
4973
|
+
*
|
|
4974
|
+
* </details>
|
|
4975
|
+
*
|
|
4976
|
+
* <details>
|
|
4977
|
+
* <summary><code>wysiwyg</code></summary>
|
|
4978
|
+
*
|
|
4979
|
+
* HTML editor for _Multiple-paragraph text_ fields.
|
|
4980
|
+
*
|
|
4981
|
+
* | Parameter | Type | Required | Description |
|
|
4982
|
+
* | --------- | --------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
4983
|
+
* | `toolbar` | `Array<String>` | ✅ | Specify which buttons the toolbar should have. Valid values: `"format"`, `"bold"`, `"italic"`, `"strikethrough"`, `"code"`, `"ordered_list"`, `"unordered_list"`, `"quote"`, `"table"`, `"link"`, `"image"`, `"show_source"`, `"undo"`, `"redo"`, `"align_left"`, `"align_center"`, `"align_right"`, `"align_justify"`, `"outdent"`, `"indent"`, `"fullscreen"` |
|
|
4984
|
+
*
|
|
4985
|
+
* </details>
|
|
4986
|
+
*
|
|
4987
|
+
* <details>
|
|
4988
|
+
* <summary><code>textarea</code></summary>
|
|
4989
|
+
*
|
|
4990
|
+
* Basic textarea editor for _Multiple-paragraph text_ fields.
|
|
3906
4991
|
*
|
|
3907
|
-
*
|
|
3908
|
-
* via the `update.targetSchema` link.
|
|
4992
|
+
* </details>
|
|
3909
4993
|
*
|
|
3910
|
-
*
|
|
3911
|
-
*
|
|
4994
|
+
* <details>
|
|
4995
|
+
* <summary><code>color_picker</code></summary>
|
|
3912
4996
|
*
|
|
3913
|
-
*
|
|
3914
|
-
* via the `duplicate.targetSchema` link.
|
|
4997
|
+
* Built-in editor for _Color_ fields.
|
|
3915
4998
|
*
|
|
3916
|
-
*
|
|
3917
|
-
*
|
|
4999
|
+
* | Parameter | Type | Required | Description |
|
|
5000
|
+
* | --------------- | ------------------------- | -------- | --------------------------------------------------------- |
|
|
5001
|
+
* | `enable_alpha` | `Boolean` | ✅ | Should the color picker allow to specify the alpha value? |
|
|
5002
|
+
* | `preset_colors` | `Array<Hex color string>` | ✅ | List of preset colors to offer to the user |
|
|
3918
5003
|
*
|
|
3919
|
-
*
|
|
3920
|
-
* via the `destroy.targetSchema` link.
|
|
5004
|
+
* </details>
|
|
3921
5005
|
*
|
|
3922
|
-
*
|
|
3923
|
-
*
|
|
5006
|
+
* <details>
|
|
5007
|
+
* <summary><code>slug</code></summary>
|
|
3924
5008
|
*
|
|
3925
|
-
*
|
|
3926
|
-
* via the `batch_publish.targetSchema` link.
|
|
5009
|
+
* Built-in editor for _Slug_ fields.
|
|
3927
5010
|
*
|
|
3928
|
-
*
|
|
3929
|
-
*
|
|
5011
|
+
* | Parameter | Type | Required | Description |
|
|
5012
|
+
* | ------------ | -------- | -------- | -------------------------------------------------------------------------------------- |
|
|
5013
|
+
* | `url_prefix` | `String` | | A prefix that will be shown in the editor's form to give some context to your editors. |
|
|
3930
5014
|
*
|
|
3931
|
-
*
|
|
3932
|
-
* via the `bulk_publish.targetSchema` link.
|
|
5015
|
+
* </details>
|
|
3933
5016
|
*
|
|
3934
|
-
*
|
|
3935
|
-
*
|
|
5017
|
+
* <details>
|
|
5018
|
+
* <summary><code>rich_text</code></summary>
|
|
3936
5019
|
*
|
|
3937
|
-
*
|
|
3938
|
-
* via the `bulk_destroy.targetSchema` link.
|
|
5020
|
+
* Built-in editor for _Modular content_ fields.
|
|
3939
5021
|
*
|
|
3940
|
-
*
|
|
3941
|
-
*
|
|
5022
|
+
* | Parameter | Type | Required | Description |
|
|
5023
|
+
* | ----------------- | --------- | -------- | ---------------------------------------------------------- |
|
|
5024
|
+
* | `start_collapsed` | `Boolean` | | Whether you want block records collapsed by default or not |
|
|
3942
5025
|
*
|
|
3943
|
-
*
|
|
3944
|
-
* via the `restore.targetSchema` link.
|
|
5026
|
+
* </details>
|
|
3945
5027
|
*
|
|
3946
|
-
*
|
|
3947
|
-
*
|
|
5028
|
+
* <details>
|
|
5029
|
+
* <summary><code>structured_text</code></summary>
|
|
3948
5030
|
*
|
|
3949
|
-
*
|
|
3950
|
-
* via the `update.targetSchema` link.
|
|
5031
|
+
* Built-in editor for _Structured text_ fields.
|
|
3951
5032
|
*
|
|
3952
|
-
*
|
|
3953
|
-
*
|
|
5033
|
+
* | Parameter | Type | Required | Description |
|
|
5034
|
+
* | ------------------------- | --------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
5035
|
+
* | `nodes` | `Array<String>` | ✅ | Specify which nodes the field should allow. Valid values: `"blockquote"`, `"code"`, `"heading"`, `"link"`, `"list"`, `"thematicBreak"` |
|
|
5036
|
+
* | `marks` | `Array<String>` | ✅ | Specify which marks the field should allow. Valid values: `"strong"`, `"emphasis"`, `"underline"`, `"strikethrough"`, `"code"`, `"highlight"` |
|
|
5037
|
+
* | `blocks_start_collapsed` | `Boolean` | | Whether you want block nodes collapsed by default or not |
|
|
5038
|
+
* | `show_links_target_blank` | `Boolean` | | Whether you want to show the "Open this link in a new tab?" checkbox, that fills in the `target: "_blank"` meta attribute for links |
|
|
5039
|
+
* | `show_links_meta_editor` | `Boolean` | | Whether you want to show the complete meta editor for links |
|
|
3954
5040
|
*
|
|
3955
|
-
*
|
|
3956
|
-
* via the `batch_destroy.targetSchema` link.
|
|
5041
|
+
* </details>
|
|
3957
5042
|
*
|
|
3958
|
-
*
|
|
3959
|
-
*
|
|
5043
|
+
* <details>
|
|
5044
|
+
* <summary><code>link_select</code> and <code>links_select</code></summary>
|
|
3960
5045
|
*
|
|
3961
|
-
*
|
|
3962
|
-
* via the `bulk_destroy.targetSchema` link.
|
|
5046
|
+
* Use a select input with auto-completion to pick the records to reference inside the field.
|
|
3963
5047
|
*
|
|
3964
|
-
*
|
|
3965
|
-
* via the `update.targetSchema` link.
|
|
5048
|
+
* </details>
|
|
3966
5049
|
*
|
|
3967
|
-
*
|
|
3968
|
-
*
|
|
5050
|
+
* <details>
|
|
5051
|
+
* <summary><code>link_embed</code> and <code>links_embed</code></summary>
|
|
3969
5052
|
*
|
|
3970
|
-
*
|
|
3971
|
-
*
|
|
3972
|
-
|
|
3973
|
-
export declare type Job = {
|
|
3974
|
-
id: JobIdentity;
|
|
3975
|
-
type: JobType;
|
|
3976
|
-
};
|
|
3977
|
-
export declare type ItemTypeUpdateTargetSchema = Job;
|
|
3978
|
-
export declare type ItemTypeDestroyTargetSchema = Job;
|
|
3979
|
-
export declare type FieldCreateTargetSchema = Job;
|
|
3980
|
-
export declare type FieldUpdateTargetSchema = Job;
|
|
3981
|
-
export declare type FieldDestroyTargetSchema = Job;
|
|
3982
|
-
export declare type FieldDuplicateTargetSchema = Job;
|
|
3983
|
-
export declare type ItemDuplicateTargetSchema = Job;
|
|
3984
|
-
export declare type ItemDestroyTargetSchema = Job;
|
|
3985
|
-
export declare type ItemBatchDestroyTargetSchema = Job;
|
|
3986
|
-
export declare type ItemBatchPublishTargetSchema = Job;
|
|
3987
|
-
export declare type ItemBatchUnpublishTargetSchema = Job;
|
|
3988
|
-
export declare type ItemBulkPublishTargetSchema = Job;
|
|
3989
|
-
export declare type ItemBulkUnpublishTargetSchema = Job;
|
|
3990
|
-
export declare type ItemBulkDestroyTargetSchema = Job;
|
|
3991
|
-
export declare type ItemBulkMoveToStageTargetSchema = Job;
|
|
3992
|
-
export declare type ItemVersionRestoreTargetSchema = Job;
|
|
3993
|
-
export declare type UploadCreateTargetSchema = Job;
|
|
3994
|
-
export declare type UploadUpdateTargetSchema = Job;
|
|
3995
|
-
export declare type UploadBatchAddTagsTargetSchema = Job;
|
|
3996
|
-
export declare type UploadBatchDestroyTargetSchema = Job;
|
|
3997
|
-
export declare type UploadBulkTagTargetSchema = Job;
|
|
3998
|
-
export declare type UploadBulkDestroyTargetSchema = Job;
|
|
3999
|
-
export declare type SiteUpdateTargetSchema = Job;
|
|
4000
|
-
export declare type SiteActivateImprovedTimezoneManagementTargetSchema = Job;
|
|
4001
|
-
/**
|
|
4002
|
-
* JSON API data
|
|
5053
|
+
* Use an expanded view with records' image preview to pick the records to reference inside the field.
|
|
5054
|
+
*
|
|
5055
|
+
* </details>
|
|
4003
5056
|
*
|
|
4004
|
-
* This interface was referenced by `Job`'s JSON-Schema
|
|
4005
|
-
* via the `definition` "data".
|
|
4006
|
-
*/
|
|
4007
|
-
export declare type JobData = {
|
|
4008
|
-
type: JobType;
|
|
4009
|
-
id: JobIdentity;
|
|
4010
|
-
};
|
|
4011
|
-
/**
|
|
4012
|
-
* Each Model consists of a set of fields. Using the database metaphore, fields are like table columns, and when creating them you need to specify their type (`string`, `file`, `float`, etc.) and any required validation.
|
|
4013
5057
|
*
|
|
4014
5058
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
4015
5059
|
* via the `definition` "field".
|
|
@@ -4108,16 +5152,6 @@ export declare type FieldUpdateJobSchema = Field;
|
|
|
4108
5152
|
export declare type FieldSelfTargetSchema = Field;
|
|
4109
5153
|
export declare type FieldDestroyJobSchema = Field;
|
|
4110
5154
|
export declare type FieldDuplicateJobSchema = Field;
|
|
4111
|
-
/**
|
|
4112
|
-
* JSON API data
|
|
4113
|
-
*
|
|
4114
|
-
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
4115
|
-
* via the `definition` "data".
|
|
4116
|
-
*/
|
|
4117
|
-
export declare type FieldsetData = {
|
|
4118
|
-
type: FieldsetType;
|
|
4119
|
-
id: FieldsetIdentity;
|
|
4120
|
-
};
|
|
4121
5155
|
/**
|
|
4122
5156
|
* JSON API attributes
|
|
4123
5157
|
*
|
|
@@ -4582,140 +5616,6 @@ export declare type SessionCreateSchema = {
|
|
|
4582
5616
|
*/
|
|
4583
5617
|
otp_code?: string;
|
|
4584
5618
|
};
|
|
4585
|
-
/**
|
|
4586
|
-
* An API token allows access to our API. It is linked to a Role, which describes what actions can be performed.
|
|
4587
|
-
*
|
|
4588
|
-
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
4589
|
-
* via the `definition` "access_token".
|
|
4590
|
-
*/
|
|
4591
|
-
export declare type AccessToken = {
|
|
4592
|
-
id: AccessTokenIdentity;
|
|
4593
|
-
type: AccessTokenType;
|
|
4594
|
-
/**
|
|
4595
|
-
* Name of API token
|
|
4596
|
-
*/
|
|
4597
|
-
name: string;
|
|
4598
|
-
/**
|
|
4599
|
-
* The actual API token
|
|
4600
|
-
*/
|
|
4601
|
-
token?: string;
|
|
4602
|
-
/**
|
|
4603
|
-
* Whether this API token can access the Content Delivery API published content endpoint
|
|
4604
|
-
*/
|
|
4605
|
-
can_access_cda: boolean;
|
|
4606
|
-
/**
|
|
4607
|
-
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
4608
|
-
*/
|
|
4609
|
-
can_access_cda_preview: boolean;
|
|
4610
|
-
/**
|
|
4611
|
-
* Whether this API token can access the Content Management API
|
|
4612
|
-
*/
|
|
4613
|
-
can_access_cma: boolean;
|
|
4614
|
-
hardcoded_type: null | string;
|
|
4615
|
-
role: RoleData | null;
|
|
4616
|
-
};
|
|
4617
|
-
export declare type AccessTokenCreateTargetSchema = AccessToken;
|
|
4618
|
-
export declare type AccessTokenUpdateTargetSchema = AccessToken;
|
|
4619
|
-
export declare type AccessTokenSelfTargetSchema = AccessToken;
|
|
4620
|
-
export declare type AccessTokenRegenerateTokenTargetSchema = AccessToken;
|
|
4621
|
-
export declare type AccessTokenDestroyTargetSchema = AccessToken;
|
|
4622
|
-
/**
|
|
4623
|
-
* JSON API data
|
|
4624
|
-
*
|
|
4625
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
4626
|
-
* via the `definition` "data".
|
|
4627
|
-
*/
|
|
4628
|
-
export declare type AccessTokenData = {
|
|
4629
|
-
type: AccessTokenType;
|
|
4630
|
-
id: AccessTokenIdentity;
|
|
4631
|
-
};
|
|
4632
|
-
/**
|
|
4633
|
-
* JSON API attributes
|
|
4634
|
-
*
|
|
4635
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
4636
|
-
* via the `definition` "attributes".
|
|
4637
|
-
*/
|
|
4638
|
-
export declare type AccessTokenAttributes = {
|
|
4639
|
-
/**
|
|
4640
|
-
* Name of API token
|
|
4641
|
-
*/
|
|
4642
|
-
name: string;
|
|
4643
|
-
/**
|
|
4644
|
-
* The actual API token
|
|
4645
|
-
*/
|
|
4646
|
-
token?: string;
|
|
4647
|
-
/**
|
|
4648
|
-
* Whether this API token can access the Content Delivery API published content endpoint
|
|
4649
|
-
*/
|
|
4650
|
-
can_access_cda: boolean;
|
|
4651
|
-
/**
|
|
4652
|
-
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
4653
|
-
*/
|
|
4654
|
-
can_access_cda_preview: boolean;
|
|
4655
|
-
/**
|
|
4656
|
-
* Whether this API token can access the Content Management API
|
|
4657
|
-
*/
|
|
4658
|
-
can_access_cma: boolean;
|
|
4659
|
-
hardcoded_type: null | string;
|
|
4660
|
-
};
|
|
4661
|
-
/**
|
|
4662
|
-
* JSON API links
|
|
4663
|
-
*
|
|
4664
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
4665
|
-
* via the `definition` "relationships".
|
|
4666
|
-
*/
|
|
4667
|
-
export declare type AccessTokenRelationships = {
|
|
4668
|
-
role: RoleData | null;
|
|
4669
|
-
};
|
|
4670
|
-
/**
|
|
4671
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
4672
|
-
* via the `create.schema` link.
|
|
4673
|
-
*/
|
|
4674
|
-
export declare type AccessTokenCreateSchema = {
|
|
4675
|
-
type?: AccessTokenType;
|
|
4676
|
-
/**
|
|
4677
|
-
* Name of API token
|
|
4678
|
-
*/
|
|
4679
|
-
name: string;
|
|
4680
|
-
/**
|
|
4681
|
-
* Whether this API token can access the Content Delivery API published content endpoint
|
|
4682
|
-
*/
|
|
4683
|
-
can_access_cda: boolean;
|
|
4684
|
-
/**
|
|
4685
|
-
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
4686
|
-
*/
|
|
4687
|
-
can_access_cda_preview: boolean;
|
|
4688
|
-
/**
|
|
4689
|
-
* Whether this API token can access the Content Management API
|
|
4690
|
-
*/
|
|
4691
|
-
can_access_cma: boolean;
|
|
4692
|
-
role: RoleData | null;
|
|
4693
|
-
};
|
|
4694
|
-
/**
|
|
4695
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
4696
|
-
* via the `update.schema` link.
|
|
4697
|
-
*/
|
|
4698
|
-
export declare type AccessTokenUpdateSchema = {
|
|
4699
|
-
id?: AccessTokenIdentity;
|
|
4700
|
-
type?: AccessTokenType;
|
|
4701
|
-
/**
|
|
4702
|
-
* Name of API token
|
|
4703
|
-
*/
|
|
4704
|
-
name: string;
|
|
4705
|
-
/**
|
|
4706
|
-
* Whether this API token can access the Content Delivery API published content endpoint
|
|
4707
|
-
*/
|
|
4708
|
-
can_access_cda: boolean;
|
|
4709
|
-
/**
|
|
4710
|
-
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
4711
|
-
*/
|
|
4712
|
-
can_access_cda_preview: boolean;
|
|
4713
|
-
/**
|
|
4714
|
-
* Whether this API token can access the Content Management API
|
|
4715
|
-
*/
|
|
4716
|
-
can_access_cma: boolean;
|
|
4717
|
-
role: RoleData | null;
|
|
4718
|
-
};
|
|
4719
5619
|
/**
|
|
4720
5620
|
* Plugins enable developers to replace DatoCMS field components with HTML5 applications so the editing experiences of the DatoCMS web app can be customized.
|
|
4721
5621
|
*
|
|
@@ -6193,11 +7093,11 @@ export declare type SearchResult = {
|
|
|
6193
7093
|
id: SearchResultIdentity;
|
|
6194
7094
|
type: SearchResultType;
|
|
6195
7095
|
/**
|
|
6196
|
-
*
|
|
7096
|
+
* Title of the page
|
|
6197
7097
|
*/
|
|
6198
7098
|
title: string;
|
|
6199
7099
|
/**
|
|
6200
|
-
* First
|
|
7100
|
+
* First 200 characters of page body, unformatted
|
|
6201
7101
|
*/
|
|
6202
7102
|
body_excerpt: string;
|
|
6203
7103
|
/**
|
|
@@ -6205,7 +7105,7 @@ export declare type SearchResult = {
|
|
|
6205
7105
|
*/
|
|
6206
7106
|
url: string;
|
|
6207
7107
|
/**
|
|
6208
|
-
*
|
|
7108
|
+
* Search score
|
|
6209
7109
|
*/
|
|
6210
7110
|
score: number;
|
|
6211
7111
|
highlight: {
|
|
@@ -6231,11 +7131,11 @@ export declare type SearchResultData = {
|
|
|
6231
7131
|
*/
|
|
6232
7132
|
export declare type SearchResultAttributes = {
|
|
6233
7133
|
/**
|
|
6234
|
-
*
|
|
7134
|
+
* Title of the page
|
|
6235
7135
|
*/
|
|
6236
7136
|
title: string;
|
|
6237
7137
|
/**
|
|
6238
|
-
* First
|
|
7138
|
+
* First 200 characters of page body, unformatted
|
|
6239
7139
|
*/
|
|
6240
7140
|
body_excerpt: string;
|
|
6241
7141
|
/**
|
|
@@ -6243,7 +7143,7 @@ export declare type SearchResultAttributes = {
|
|
|
6243
7143
|
*/
|
|
6244
7144
|
url: string;
|
|
6245
7145
|
/**
|
|
6246
|
-
*
|
|
7146
|
+
* Search score
|
|
6247
7147
|
*/
|
|
6248
7148
|
score: number;
|
|
6249
7149
|
highlight: {
|
|
@@ -7545,6 +8445,7 @@ export declare type PublicInfo = {
|
|
|
7545
8445
|
extras: null | {
|
|
7546
8446
|
blocks_depth: number;
|
|
7547
8447
|
blocks_per_item: number;
|
|
8448
|
+
maximum_single_upload_bytes: number;
|
|
7548
8449
|
[k: string]: unknown;
|
|
7549
8450
|
};
|
|
7550
8451
|
};
|
|
@@ -7626,6 +8527,7 @@ export declare type PublicInfoAttributes = {
|
|
|
7626
8527
|
extras: null | {
|
|
7627
8528
|
blocks_depth: number;
|
|
7628
8529
|
blocks_per_item: number;
|
|
8530
|
+
maximum_single_upload_bytes: number;
|
|
7629
8531
|
[k: string]: unknown;
|
|
7630
8532
|
};
|
|
7631
8533
|
};
|
|
@@ -7888,10 +8790,6 @@ export declare type Site = {
|
|
|
7888
8790
|
* Specifies the last time when a change of data occurred
|
|
7889
8791
|
*/
|
|
7890
8792
|
last_data_change_at: null | string;
|
|
7891
|
-
/**
|
|
7892
|
-
* Frontend website url
|
|
7893
|
-
*/
|
|
7894
|
-
frontend_url: string | null;
|
|
7895
8793
|
/**
|
|
7896
8794
|
* Specifies whether all users of this site need to authenticate using two-factor authentication
|
|
7897
8795
|
*/
|
|
@@ -7975,33 +8873,9 @@ export declare type Site = {
|
|
|
7975
8873
|
} | null;
|
|
7976
8874
|
account: AccountData;
|
|
7977
8875
|
/**
|
|
7978
|
-
* The list
|
|
7979
|
-
*/
|
|
7980
|
-
build_triggers?: BuildTriggerData[];
|
|
7981
|
-
/**
|
|
7982
|
-
* The list of site menu items
|
|
7983
|
-
*/
|
|
7984
|
-
menu_items: MenuItemData[];
|
|
7985
|
-
/**
|
|
7986
|
-
* The list of site SSO users
|
|
7987
|
-
*/
|
|
7988
|
-
sso_users: SsoUserData[];
|
|
7989
|
-
/**
|
|
7990
|
-
* The list of site users
|
|
7991
|
-
*/
|
|
7992
|
-
users: UserData[];
|
|
7993
|
-
/**
|
|
7994
|
-
* The list of site item types
|
|
8876
|
+
* The list item types for the site
|
|
7995
8877
|
*/
|
|
7996
8878
|
item_types: ItemTypeData[];
|
|
7997
|
-
/**
|
|
7998
|
-
* Specifies the default role for newly created identity providers users
|
|
7999
|
-
*/
|
|
8000
|
-
sso_default_role?: RoleData[];
|
|
8001
|
-
/**
|
|
8002
|
-
* The list of site roles
|
|
8003
|
-
*/
|
|
8004
|
-
roles: RoleData[];
|
|
8005
8879
|
meta: SiteMeta;
|
|
8006
8880
|
};
|
|
8007
8881
|
export declare type SiteSelfTargetSchema = Site;
|
|
@@ -8076,10 +8950,6 @@ export declare type SiteAttributes = {
|
|
|
8076
8950
|
* Specifies the last time when a change of data occurred
|
|
8077
8951
|
*/
|
|
8078
8952
|
last_data_change_at: null | string;
|
|
8079
|
-
/**
|
|
8080
|
-
* Frontend website url
|
|
8081
|
-
*/
|
|
8082
|
-
frontend_url: string | null;
|
|
8083
8953
|
/**
|
|
8084
8954
|
* Specifies whether all users of this site need to authenticate using two-factor authentication
|
|
8085
8955
|
*/
|
|
@@ -8171,33 +9041,9 @@ export declare type SiteAttributes = {
|
|
|
8171
9041
|
export declare type SiteRelationships = {
|
|
8172
9042
|
account: AccountData;
|
|
8173
9043
|
/**
|
|
8174
|
-
* The list
|
|
8175
|
-
*/
|
|
8176
|
-
build_triggers?: BuildTriggerData[];
|
|
8177
|
-
/**
|
|
8178
|
-
* The list of site menu items
|
|
8179
|
-
*/
|
|
8180
|
-
menu_items: MenuItemData[];
|
|
8181
|
-
/**
|
|
8182
|
-
* The list of site SSO users
|
|
8183
|
-
*/
|
|
8184
|
-
sso_users: SsoUserData[];
|
|
8185
|
-
/**
|
|
8186
|
-
* The list of site users
|
|
8187
|
-
*/
|
|
8188
|
-
users: UserData[];
|
|
8189
|
-
/**
|
|
8190
|
-
* The list of site item types
|
|
9044
|
+
* The list item types for the site
|
|
8191
9045
|
*/
|
|
8192
9046
|
item_types: ItemTypeData[];
|
|
8193
|
-
/**
|
|
8194
|
-
* Specifies the default role for newly created identity providers users
|
|
8195
|
-
*/
|
|
8196
|
-
sso_default_role?: RoleData[];
|
|
8197
|
-
/**
|
|
8198
|
-
* The list of site roles
|
|
8199
|
-
*/
|
|
8200
|
-
roles: RoleData[];
|
|
8201
9047
|
};
|
|
8202
9048
|
/**
|
|
8203
9049
|
* This interface was referenced by `Site`'s JSON-Schema
|