@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
|
@@ -91,19 +91,20 @@ export type UserType = 'user';
|
|
|
91
91
|
export type UserInstancesTargetSchema = User[];
|
|
92
92
|
/**
|
|
93
93
|
* This interface was referenced by `User`'s JSON-Schema
|
|
94
|
-
* via the `
|
|
94
|
+
* via the `self.hrefSchema` link.
|
|
95
95
|
*/
|
|
96
|
-
export type
|
|
97
|
-
/**
|
|
98
|
-
* New owner for resources previously owned by the deleted user. This argument specifies the new owner type.
|
|
99
|
-
*/
|
|
100
|
-
destination_user_type?: 'account' | 'user' | 'access_token' | 'sso_user';
|
|
96
|
+
export type UserSelfHrefSchema = {
|
|
101
97
|
/**
|
|
102
|
-
*
|
|
98
|
+
* 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`.
|
|
103
99
|
*/
|
|
104
|
-
|
|
100
|
+
include?: string;
|
|
105
101
|
[k: string]: unknown;
|
|
106
102
|
};
|
|
103
|
+
/**
|
|
104
|
+
* This interface was referenced by `User`'s JSON-Schema
|
|
105
|
+
* via the `me.targetSchema` link.
|
|
106
|
+
*/
|
|
107
|
+
export type UserMeTargetSchema = User | SsoUser | AccessToken | Account;
|
|
107
108
|
/**
|
|
108
109
|
* ID of user
|
|
109
110
|
*
|
|
@@ -164,27 +165,42 @@ export type SsoUserDestroyHrefSchema = {
|
|
|
164
165
|
[k: string]: unknown;
|
|
165
166
|
};
|
|
166
167
|
/**
|
|
167
|
-
*
|
|
168
|
+
* ID of access_token
|
|
168
169
|
*
|
|
169
|
-
* This interface was referenced by `
|
|
170
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
170
171
|
* via the `definition` "identity".
|
|
171
172
|
*
|
|
172
|
-
* This interface was referenced by `
|
|
173
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
173
174
|
* via the `definition` "id".
|
|
174
175
|
*/
|
|
175
|
-
export type
|
|
176
|
+
export type AccessTokenIdentity = string;
|
|
176
177
|
/**
|
|
177
178
|
* JSON API type field
|
|
178
179
|
*
|
|
179
|
-
* This interface was referenced by `
|
|
180
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
180
181
|
* via the `definition` "type".
|
|
181
182
|
*/
|
|
182
|
-
export type
|
|
183
|
+
export type AccessTokenType = 'access_token';
|
|
183
184
|
/**
|
|
184
|
-
* This interface was referenced by `
|
|
185
|
-
* via the `
|
|
185
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
186
|
+
* via the `instances.targetSchema` link.
|
|
186
187
|
*/
|
|
187
|
-
export type
|
|
188
|
+
export type AccessTokenInstancesTargetSchema = AccessToken[];
|
|
189
|
+
/**
|
|
190
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
191
|
+
* via the `destroy.hrefSchema` link.
|
|
192
|
+
*/
|
|
193
|
+
export type AccessTokenDestroyHrefSchema = {
|
|
194
|
+
/**
|
|
195
|
+
* New owner for resources previously owned by the deleted access token. This argument specifies the new owner type.
|
|
196
|
+
*/
|
|
197
|
+
destination_user_type?: 'account' | 'user' | 'access_token' | 'sso_user';
|
|
198
|
+
/**
|
|
199
|
+
* New owner for resources previously owned by the deleted access token. This argument specifies the new owner ID.
|
|
200
|
+
*/
|
|
201
|
+
destination_user_id?: string;
|
|
202
|
+
[k: string]: unknown;
|
|
203
|
+
};
|
|
188
204
|
/**
|
|
189
205
|
* ID of account
|
|
190
206
|
*
|
|
@@ -202,6 +218,54 @@ export type AccountIdentity = string;
|
|
|
202
218
|
* via the `definition` "type".
|
|
203
219
|
*/
|
|
204
220
|
export type AccountType = 'account';
|
|
221
|
+
/**
|
|
222
|
+
* This interface was referenced by `User`'s JSON-Schema
|
|
223
|
+
* via the `me.hrefSchema` link.
|
|
224
|
+
*/
|
|
225
|
+
export type UserMeHrefSchema = {
|
|
226
|
+
/**
|
|
227
|
+
* 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`.
|
|
228
|
+
*/
|
|
229
|
+
include?: string;
|
|
230
|
+
[k: string]: unknown;
|
|
231
|
+
};
|
|
232
|
+
/**
|
|
233
|
+
* This interface was referenced by `User`'s JSON-Schema
|
|
234
|
+
* via the `destroy.hrefSchema` link.
|
|
235
|
+
*/
|
|
236
|
+
export type UserDestroyHrefSchema = {
|
|
237
|
+
/**
|
|
238
|
+
* New owner for resources previously owned by the deleted user. This argument specifies the new owner type.
|
|
239
|
+
*/
|
|
240
|
+
destination_user_type?: 'account' | 'user' | 'access_token' | 'sso_user';
|
|
241
|
+
/**
|
|
242
|
+
* New owner for resources previously owned by the deleted user. This argument specifies the new owner ID.
|
|
243
|
+
*/
|
|
244
|
+
destination_user_id?: string;
|
|
245
|
+
[k: string]: unknown;
|
|
246
|
+
};
|
|
247
|
+
/**
|
|
248
|
+
* ULID of event (https://github.com/ulid/spec)
|
|
249
|
+
*
|
|
250
|
+
* This interface was referenced by `AuditLogEvent`'s JSON-Schema
|
|
251
|
+
* via the `definition` "identity".
|
|
252
|
+
*
|
|
253
|
+
* This interface was referenced by `AuditLogEvent`'s JSON-Schema
|
|
254
|
+
* via the `definition` "id".
|
|
255
|
+
*/
|
|
256
|
+
export type AuditLogEventIdentity = string;
|
|
257
|
+
/**
|
|
258
|
+
* JSON API type field
|
|
259
|
+
*
|
|
260
|
+
* This interface was referenced by `AuditLogEvent`'s JSON-Schema
|
|
261
|
+
* via the `definition` "type".
|
|
262
|
+
*/
|
|
263
|
+
export type AuditLogEventType = 'audit_log_event';
|
|
264
|
+
/**
|
|
265
|
+
* This interface was referenced by `AuditLogEvent`'s JSON-Schema
|
|
266
|
+
* via the `query.targetSchema` link.
|
|
267
|
+
*/
|
|
268
|
+
export type AuditLogEventQueryTargetSchema = AuditLogEvent[];
|
|
205
269
|
/**
|
|
206
270
|
* ID of plan
|
|
207
271
|
*
|
|
@@ -294,6 +358,23 @@ export type FieldType = 'field';
|
|
|
294
358
|
* via the `definition` "id".
|
|
295
359
|
*/
|
|
296
360
|
export type FieldIdentity = string;
|
|
361
|
+
/**
|
|
362
|
+
* JSON API type fieldset
|
|
363
|
+
*
|
|
364
|
+
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
365
|
+
* via the `definition` "type".
|
|
366
|
+
*/
|
|
367
|
+
export type FieldsetType = 'fieldset';
|
|
368
|
+
/**
|
|
369
|
+
* ID of fieldset
|
|
370
|
+
*
|
|
371
|
+
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
372
|
+
* via the `definition` "identity".
|
|
373
|
+
*
|
|
374
|
+
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
375
|
+
* via the `definition` "id".
|
|
376
|
+
*/
|
|
377
|
+
export type FieldsetIdentity = string;
|
|
297
378
|
/**
|
|
298
379
|
* JSON API type field
|
|
299
380
|
*
|
|
@@ -323,23 +404,6 @@ export type JobType = 'job';
|
|
|
323
404
|
* via the `instances.targetSchema` link.
|
|
324
405
|
*/
|
|
325
406
|
export type ItemTypeInstancesTargetSchema = ItemType[];
|
|
326
|
-
/**
|
|
327
|
-
* JSON API type fieldset
|
|
328
|
-
*
|
|
329
|
-
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
330
|
-
* via the `definition` "type".
|
|
331
|
-
*/
|
|
332
|
-
export type FieldsetType = 'fieldset';
|
|
333
|
-
/**
|
|
334
|
-
* ID of fieldset
|
|
335
|
-
*
|
|
336
|
-
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
337
|
-
* via the `definition` "identity".
|
|
338
|
-
*
|
|
339
|
-
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
340
|
-
* via the `definition` "id".
|
|
341
|
-
*/
|
|
342
|
-
export type FieldsetIdentity = string;
|
|
343
407
|
/**
|
|
344
408
|
* This interface was referenced by `Field`'s JSON-Schema
|
|
345
409
|
* via the `instances.targetSchema` link.
|
|
@@ -377,43 +441,6 @@ export type SessionIdentity = string;
|
|
|
377
441
|
* via the `definition` "type".
|
|
378
442
|
*/
|
|
379
443
|
export type SessionType = 'session';
|
|
380
|
-
/**
|
|
381
|
-
* ID of access_token
|
|
382
|
-
*
|
|
383
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
384
|
-
* via the `definition` "identity".
|
|
385
|
-
*
|
|
386
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
387
|
-
* via the `definition` "id".
|
|
388
|
-
*/
|
|
389
|
-
export type AccessTokenIdentity = string;
|
|
390
|
-
/**
|
|
391
|
-
* JSON API type field
|
|
392
|
-
*
|
|
393
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
394
|
-
* via the `definition` "type".
|
|
395
|
-
*/
|
|
396
|
-
export type AccessTokenType = 'access_token';
|
|
397
|
-
/**
|
|
398
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
399
|
-
* via the `instances.targetSchema` link.
|
|
400
|
-
*/
|
|
401
|
-
export type AccessTokenInstancesTargetSchema = AccessToken[];
|
|
402
|
-
/**
|
|
403
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
404
|
-
* via the `destroy.hrefSchema` link.
|
|
405
|
-
*/
|
|
406
|
-
export type AccessTokenDestroyHrefSchema = {
|
|
407
|
-
/**
|
|
408
|
-
* New owner for resources previously owned by the deleted access token. This argument specifies the new owner type.
|
|
409
|
-
*/
|
|
410
|
-
destination_user_type?: 'account' | 'user' | 'access_token' | 'sso_user';
|
|
411
|
-
/**
|
|
412
|
-
* New owner for resources previously owned by the deleted access token. This argument specifies the new owner ID.
|
|
413
|
-
*/
|
|
414
|
-
destination_user_id?: string;
|
|
415
|
-
[k: string]: unknown;
|
|
416
|
-
};
|
|
417
444
|
/**
|
|
418
445
|
* ID of plugin
|
|
419
446
|
*
|
|
@@ -983,25 +1010,37 @@ export type SearchResultInstancesTargetSchema = SearchResult[];
|
|
|
983
1010
|
*/
|
|
984
1011
|
export type SearchResultInstancesHrefSchema = {
|
|
985
1012
|
/**
|
|
986
|
-
*
|
|
987
|
-
*/
|
|
988
|
-
q: string;
|
|
989
|
-
/**
|
|
990
|
-
* The build trigger ID on which the search will be performed
|
|
991
|
-
*/
|
|
992
|
-
build_trigger_id?: string;
|
|
993
|
-
/**
|
|
994
|
-
* Restrict the search on one locale
|
|
995
|
-
*/
|
|
996
|
-
locale?: string;
|
|
997
|
-
/**
|
|
998
|
-
* Maximum number of results to return (defaults to 20, maximum is 100)
|
|
1013
|
+
* Attributes to manage results pagination
|
|
999
1014
|
*/
|
|
1000
|
-
|
|
1015
|
+
page?: {
|
|
1016
|
+
/**
|
|
1017
|
+
* Index of first element to fetch (defaults to 0)
|
|
1018
|
+
*/
|
|
1019
|
+
offset?: number;
|
|
1020
|
+
/**
|
|
1021
|
+
* Number of elements to fetch (defaults to 20, maximum is 100)
|
|
1022
|
+
*/
|
|
1023
|
+
limit?: number;
|
|
1024
|
+
[k: string]: unknown;
|
|
1025
|
+
};
|
|
1001
1026
|
/**
|
|
1002
|
-
*
|
|
1027
|
+
* Attributes to filter search results
|
|
1003
1028
|
*/
|
|
1004
|
-
|
|
1029
|
+
filter: {
|
|
1030
|
+
/**
|
|
1031
|
+
* Text to search
|
|
1032
|
+
*/
|
|
1033
|
+
query: string;
|
|
1034
|
+
/**
|
|
1035
|
+
* The build trigger ID on which the search will be performed. Required if more than one build trigger is present in a project
|
|
1036
|
+
*/
|
|
1037
|
+
build_trigger_id?: string;
|
|
1038
|
+
/**
|
|
1039
|
+
* Restrict the search on pages in a specific locale
|
|
1040
|
+
*/
|
|
1041
|
+
locale?: string;
|
|
1042
|
+
[k: string]: unknown;
|
|
1043
|
+
};
|
|
1005
1044
|
[k: string]: unknown;
|
|
1006
1045
|
};
|
|
1007
1046
|
/**
|
|
@@ -1490,6 +1529,17 @@ export type SiteIdentity = string;
|
|
|
1490
1529
|
* via the `definition` "type".
|
|
1491
1530
|
*/
|
|
1492
1531
|
export type SiteType = 'site';
|
|
1532
|
+
/**
|
|
1533
|
+
* This interface was referenced by `Site`'s JSON-Schema
|
|
1534
|
+
* via the `self.hrefSchema` link.
|
|
1535
|
+
*/
|
|
1536
|
+
export type SiteSelfHrefSchema = {
|
|
1537
|
+
/**
|
|
1538
|
+
* 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`.
|
|
1539
|
+
*/
|
|
1540
|
+
include?: string;
|
|
1541
|
+
[k: string]: unknown;
|
|
1542
|
+
};
|
|
1493
1543
|
/**
|
|
1494
1544
|
* This interface was referenced by `Workflow`'s JSON-Schema
|
|
1495
1545
|
* via the `instances.targetSchema` link.
|
|
@@ -2926,68 +2976,278 @@ export type SsoUserRelationships = {
|
|
|
2926
2976
|
};
|
|
2927
2977
|
|
|
2928
2978
|
/**
|
|
2929
|
-
*
|
|
2979
|
+
* An API token allows access to our API. It is linked to a Role, which describes what actions can be performed.
|
|
2930
2980
|
*
|
|
2931
2981
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
2932
|
-
* via the `definition` "
|
|
2982
|
+
* via the `definition` "access_token".
|
|
2933
2983
|
*/
|
|
2934
|
-
export type
|
|
2935
|
-
id:
|
|
2936
|
-
type:
|
|
2984
|
+
export type AccessToken = {
|
|
2985
|
+
id: AccessTokenIdentity;
|
|
2986
|
+
type: AccessTokenType;
|
|
2937
2987
|
/**
|
|
2938
|
-
*
|
|
2988
|
+
* Name of API token
|
|
2939
2989
|
*/
|
|
2940
|
-
|
|
2990
|
+
name: string;
|
|
2941
2991
|
/**
|
|
2942
|
-
* The
|
|
2992
|
+
* The actual API token (or null if the current user has no permission to read the token)
|
|
2943
2993
|
*/
|
|
2944
|
-
|
|
2945
|
-
/**
|
|
2946
|
-
* The type of actor (can be `account`, `user`, `sso_user` or `access_token`)
|
|
2947
|
-
*/
|
|
2948
|
-
type: string;
|
|
2949
|
-
/**
|
|
2950
|
-
* The ID of the actor
|
|
2951
|
-
*/
|
|
2952
|
-
id: string;
|
|
2953
|
-
/**
|
|
2954
|
-
* An human representation of the actor (name/email/username depending on the type of actor)
|
|
2955
|
-
*/
|
|
2956
|
-
name: string;
|
|
2957
|
-
};
|
|
2994
|
+
token?: null | string;
|
|
2958
2995
|
/**
|
|
2959
|
-
*
|
|
2996
|
+
* Whether this API token can access the Content Delivery API published content endpoint
|
|
2960
2997
|
*/
|
|
2961
|
-
|
|
2962
|
-
/**
|
|
2963
|
-
* The name of the role
|
|
2964
|
-
*/
|
|
2965
|
-
name: string;
|
|
2966
|
-
/**
|
|
2967
|
-
* The ID of the role
|
|
2968
|
-
*/
|
|
2969
|
-
id: string;
|
|
2970
|
-
};
|
|
2998
|
+
can_access_cda: boolean;
|
|
2971
2999
|
/**
|
|
2972
|
-
*
|
|
3000
|
+
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
2973
3001
|
*/
|
|
2974
|
-
|
|
2975
|
-
/**
|
|
2976
|
-
* The ID of the environment
|
|
2977
|
-
*/
|
|
2978
|
-
id: string;
|
|
2979
|
-
/**
|
|
2980
|
-
* Whether the environment was the primary one at the time the action was performed
|
|
2981
|
-
*/
|
|
2982
|
-
primary: boolean;
|
|
2983
|
-
};
|
|
3002
|
+
can_access_cda_preview: boolean;
|
|
2984
3003
|
/**
|
|
2985
|
-
*
|
|
3004
|
+
* Whether this API token can access the Content Management API
|
|
2986
3005
|
*/
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
3006
|
+
can_access_cma: boolean;
|
|
3007
|
+
hardcoded_type: null | string;
|
|
3008
|
+
role: RoleData | null;
|
|
3009
|
+
};
|
|
3010
|
+
export type AccessTokenCreateTargetSchema = AccessToken;
|
|
3011
|
+
export type AccessTokenUpdateTargetSchema = AccessToken;
|
|
3012
|
+
export type AccessTokenSelfTargetSchema = AccessToken;
|
|
3013
|
+
export type AccessTokenRegenerateTokenTargetSchema = AccessToken;
|
|
3014
|
+
export type AccessTokenDestroyTargetSchema = AccessToken;
|
|
3015
|
+
/**
|
|
3016
|
+
* JSON API data
|
|
3017
|
+
*
|
|
3018
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
3019
|
+
* via the `definition` "data".
|
|
3020
|
+
*/
|
|
3021
|
+
export type AccessTokenData = {
|
|
3022
|
+
type: AccessTokenType;
|
|
3023
|
+
id: AccessTokenIdentity;
|
|
3024
|
+
};
|
|
3025
|
+
|
|
3026
|
+
/**
|
|
3027
|
+
* JSON API attributes
|
|
3028
|
+
*
|
|
3029
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
3030
|
+
* via the `definition` "attributes".
|
|
3031
|
+
*/
|
|
3032
|
+
export type AccessTokenAttributes = {
|
|
3033
|
+
/**
|
|
3034
|
+
* Name of API token
|
|
3035
|
+
*/
|
|
3036
|
+
name: string;
|
|
3037
|
+
/**
|
|
3038
|
+
* The actual API token (or null if the current user has no permission to read the token)
|
|
3039
|
+
*/
|
|
3040
|
+
token?: null | string;
|
|
3041
|
+
/**
|
|
3042
|
+
* Whether this API token can access the Content Delivery API published content endpoint
|
|
3043
|
+
*/
|
|
3044
|
+
can_access_cda: boolean;
|
|
3045
|
+
/**
|
|
3046
|
+
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
3047
|
+
*/
|
|
3048
|
+
can_access_cda_preview: boolean;
|
|
3049
|
+
/**
|
|
3050
|
+
* Whether this API token can access the Content Management API
|
|
3051
|
+
*/
|
|
3052
|
+
can_access_cma: boolean;
|
|
3053
|
+
hardcoded_type: null | string;
|
|
3054
|
+
};
|
|
3055
|
+
|
|
3056
|
+
/**
|
|
3057
|
+
* JSON API links
|
|
3058
|
+
*
|
|
3059
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
3060
|
+
* via the `definition` "relationships".
|
|
3061
|
+
*/
|
|
3062
|
+
export type AccessTokenRelationships = {
|
|
3063
|
+
role: RoleData | null;
|
|
3064
|
+
};
|
|
3065
|
+
|
|
3066
|
+
/**
|
|
3067
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
3068
|
+
* via the `create.schema` link.
|
|
3069
|
+
*/
|
|
3070
|
+
export type AccessTokenCreateSchema = {
|
|
3071
|
+
type?: AccessTokenType;
|
|
3072
|
+
/**
|
|
3073
|
+
* Name of API token
|
|
3074
|
+
*/
|
|
3075
|
+
name: string;
|
|
3076
|
+
/**
|
|
3077
|
+
* Whether this API token can access the Content Delivery API published content endpoint
|
|
3078
|
+
*/
|
|
3079
|
+
can_access_cda: boolean;
|
|
3080
|
+
/**
|
|
3081
|
+
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
3082
|
+
*/
|
|
3083
|
+
can_access_cda_preview: boolean;
|
|
3084
|
+
/**
|
|
3085
|
+
* Whether this API token can access the Content Management API
|
|
3086
|
+
*/
|
|
3087
|
+
can_access_cma: boolean;
|
|
3088
|
+
role: RoleData | null;
|
|
3089
|
+
};
|
|
3090
|
+
|
|
3091
|
+
/**
|
|
3092
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
3093
|
+
* via the `update.schema` link.
|
|
3094
|
+
*/
|
|
3095
|
+
export type AccessTokenUpdateSchema = {
|
|
3096
|
+
id?: AccessTokenIdentity;
|
|
3097
|
+
type?: AccessTokenType;
|
|
3098
|
+
/**
|
|
3099
|
+
* Name of API token
|
|
3100
|
+
*/
|
|
3101
|
+
name: string;
|
|
3102
|
+
/**
|
|
3103
|
+
* Whether this API token can access the Content Delivery API published content endpoint
|
|
3104
|
+
*/
|
|
3105
|
+
can_access_cda: boolean;
|
|
3106
|
+
/**
|
|
3107
|
+
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
3108
|
+
*/
|
|
3109
|
+
can_access_cda_preview: boolean;
|
|
3110
|
+
/**
|
|
3111
|
+
* Whether this API token can access the Content Management API
|
|
3112
|
+
*/
|
|
3113
|
+
can_access_cma: boolean;
|
|
3114
|
+
role: RoleData | null;
|
|
3115
|
+
};
|
|
3116
|
+
|
|
3117
|
+
/**
|
|
3118
|
+
* DatoCMS account
|
|
3119
|
+
*
|
|
3120
|
+
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
3121
|
+
* via the `definition` "account".
|
|
3122
|
+
*/
|
|
3123
|
+
export type Account = {
|
|
3124
|
+
id: AccountIdentity;
|
|
3125
|
+
type: AccountType;
|
|
3126
|
+
/**
|
|
3127
|
+
* Email
|
|
3128
|
+
*/
|
|
3129
|
+
email: string;
|
|
3130
|
+
/**
|
|
3131
|
+
* First name
|
|
3132
|
+
*/
|
|
3133
|
+
first_name: string | null;
|
|
3134
|
+
/**
|
|
3135
|
+
* Last name
|
|
3136
|
+
*/
|
|
3137
|
+
last_name: string | null;
|
|
3138
|
+
/**
|
|
3139
|
+
* Company name
|
|
3140
|
+
*/
|
|
3141
|
+
company: string | null;
|
|
3142
|
+
/**
|
|
3143
|
+
* Password
|
|
3144
|
+
*/
|
|
3145
|
+
password?: string;
|
|
3146
|
+
};
|
|
3147
|
+
|
|
3148
|
+
/**
|
|
3149
|
+
* JSON API data
|
|
3150
|
+
*
|
|
3151
|
+
* This interface was referenced by `Account`'s JSON-Schema
|
|
3152
|
+
* via the `definition` "data".
|
|
3153
|
+
*/
|
|
3154
|
+
export type AccountData = {
|
|
3155
|
+
type: AccountType;
|
|
3156
|
+
id: AccountIdentity;
|
|
3157
|
+
};
|
|
3158
|
+
|
|
3159
|
+
/**
|
|
3160
|
+
* JSON API attributes
|
|
3161
|
+
*
|
|
3162
|
+
* This interface was referenced by `Account`'s JSON-Schema
|
|
3163
|
+
* via the `definition` "attributes".
|
|
3164
|
+
*/
|
|
3165
|
+
export type AccountAttributes = {
|
|
3166
|
+
/**
|
|
3167
|
+
* Email
|
|
3168
|
+
*/
|
|
3169
|
+
email: string;
|
|
3170
|
+
/**
|
|
3171
|
+
* First name
|
|
3172
|
+
*/
|
|
3173
|
+
first_name: string | null;
|
|
3174
|
+
/**
|
|
3175
|
+
* Last name
|
|
3176
|
+
*/
|
|
3177
|
+
last_name: string | null;
|
|
3178
|
+
/**
|
|
3179
|
+
* Company name
|
|
3180
|
+
*/
|
|
3181
|
+
company: string | null;
|
|
3182
|
+
/**
|
|
3183
|
+
* Password
|
|
3184
|
+
*/
|
|
3185
|
+
password?: string;
|
|
3186
|
+
};
|
|
3187
|
+
|
|
3188
|
+
/**
|
|
3189
|
+
* 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.
|
|
3190
|
+
*
|
|
3191
|
+
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
3192
|
+
* via the `definition` "audit_log_event".
|
|
3193
|
+
*/
|
|
3194
|
+
export type AuditLogEvent = {
|
|
3195
|
+
id: AuditLogEventIdentity;
|
|
3196
|
+
type: AuditLogEventType;
|
|
3197
|
+
/**
|
|
3198
|
+
* The actual action performed
|
|
3199
|
+
*/
|
|
3200
|
+
action_name: string;
|
|
3201
|
+
/**
|
|
3202
|
+
* The actor who performed the action
|
|
3203
|
+
*/
|
|
3204
|
+
actor: {
|
|
3205
|
+
/**
|
|
3206
|
+
* The type of actor (can be `account`, `user`, `sso_user` or `access_token`)
|
|
3207
|
+
*/
|
|
3208
|
+
type: string;
|
|
3209
|
+
/**
|
|
3210
|
+
* The ID of the actor
|
|
3211
|
+
*/
|
|
3212
|
+
id: string;
|
|
3213
|
+
/**
|
|
3214
|
+
* An human representation of the actor (name/email/username depending on the type of actor)
|
|
3215
|
+
*/
|
|
3216
|
+
name: string;
|
|
3217
|
+
};
|
|
3218
|
+
/**
|
|
3219
|
+
* The role of the actor at the time the action was performed
|
|
3220
|
+
*/
|
|
3221
|
+
role: null | {
|
|
3222
|
+
/**
|
|
3223
|
+
* The name of the role
|
|
3224
|
+
*/
|
|
3225
|
+
name: string;
|
|
3226
|
+
/**
|
|
3227
|
+
* The ID of the role
|
|
3228
|
+
*/
|
|
3229
|
+
id: string;
|
|
3230
|
+
};
|
|
3231
|
+
/**
|
|
3232
|
+
* The environment inside of which the action was performed
|
|
3233
|
+
*/
|
|
3234
|
+
environment: {
|
|
3235
|
+
/**
|
|
3236
|
+
* The ID of the environment
|
|
3237
|
+
*/
|
|
3238
|
+
id: string;
|
|
3239
|
+
/**
|
|
3240
|
+
* Whether the environment was the primary one at the time the action was performed
|
|
3241
|
+
*/
|
|
3242
|
+
primary: boolean;
|
|
3243
|
+
};
|
|
3244
|
+
/**
|
|
3245
|
+
* The actual request being performed
|
|
3246
|
+
*/
|
|
3247
|
+
request: {
|
|
3248
|
+
/**
|
|
3249
|
+
* The full path of the request
|
|
3250
|
+
*/
|
|
2991
3251
|
path: string;
|
|
2992
3252
|
/**
|
|
2993
3253
|
* The HTTP method of the request
|
|
@@ -3164,87 +3424,16 @@ export type AuditLogEventQuerySchema = {
|
|
|
3164
3424
|
};
|
|
3165
3425
|
|
|
3166
3426
|
/**
|
|
3167
|
-
*
|
|
3427
|
+
* Stores the information regarding the current plan for the project.
|
|
3168
3428
|
*
|
|
3169
3429
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
3170
|
-
* via the `definition` "
|
|
3430
|
+
* via the `definition` "site_plan".
|
|
3171
3431
|
*/
|
|
3172
|
-
export type
|
|
3173
|
-
id:
|
|
3174
|
-
type:
|
|
3432
|
+
export type SitePlan = {
|
|
3433
|
+
id: SitePlanIdentity;
|
|
3434
|
+
type: SitePlanType;
|
|
3175
3435
|
/**
|
|
3176
|
-
*
|
|
3177
|
-
*/
|
|
3178
|
-
email: string;
|
|
3179
|
-
/**
|
|
3180
|
-
* First name
|
|
3181
|
-
*/
|
|
3182
|
-
first_name: string | null;
|
|
3183
|
-
/**
|
|
3184
|
-
* Last name
|
|
3185
|
-
*/
|
|
3186
|
-
last_name: string | null;
|
|
3187
|
-
/**
|
|
3188
|
-
* Company name
|
|
3189
|
-
*/
|
|
3190
|
-
company: string | null;
|
|
3191
|
-
/**
|
|
3192
|
-
* Password
|
|
3193
|
-
*/
|
|
3194
|
-
password?: string;
|
|
3195
|
-
};
|
|
3196
|
-
|
|
3197
|
-
/**
|
|
3198
|
-
* JSON API data
|
|
3199
|
-
*
|
|
3200
|
-
* This interface was referenced by `Account`'s JSON-Schema
|
|
3201
|
-
* via the `definition` "data".
|
|
3202
|
-
*/
|
|
3203
|
-
export type AccountData = {
|
|
3204
|
-
type: AccountType;
|
|
3205
|
-
id: AccountIdentity;
|
|
3206
|
-
};
|
|
3207
|
-
|
|
3208
|
-
/**
|
|
3209
|
-
* JSON API attributes
|
|
3210
|
-
*
|
|
3211
|
-
* This interface was referenced by `Account`'s JSON-Schema
|
|
3212
|
-
* via the `definition` "attributes".
|
|
3213
|
-
*/
|
|
3214
|
-
export type AccountAttributes = {
|
|
3215
|
-
/**
|
|
3216
|
-
* Email
|
|
3217
|
-
*/
|
|
3218
|
-
email: string;
|
|
3219
|
-
/**
|
|
3220
|
-
* First name
|
|
3221
|
-
*/
|
|
3222
|
-
first_name: string | null;
|
|
3223
|
-
/**
|
|
3224
|
-
* Last name
|
|
3225
|
-
*/
|
|
3226
|
-
last_name: string | null;
|
|
3227
|
-
/**
|
|
3228
|
-
* Company name
|
|
3229
|
-
*/
|
|
3230
|
-
company: string | null;
|
|
3231
|
-
/**
|
|
3232
|
-
* Password
|
|
3233
|
-
*/
|
|
3234
|
-
password?: string;
|
|
3235
|
-
};
|
|
3236
|
-
|
|
3237
|
-
/**
|
|
3238
|
-
* Stores the information regarding the current plan for the project.
|
|
3239
|
-
*
|
|
3240
|
-
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
3241
|
-
* via the `definition` "site_plan".
|
|
3242
|
-
*/
|
|
3243
|
-
export type SitePlan = {
|
|
3244
|
-
id: SitePlanIdentity;
|
|
3245
|
-
type: SitePlanType;
|
|
3246
|
-
/**
|
|
3247
|
-
* The name of the plan
|
|
3436
|
+
* The name of the plan
|
|
3248
3437
|
*/
|
|
3249
3438
|
name: string;
|
|
3250
3439
|
/**
|
|
@@ -3387,6 +3576,14 @@ export type SitePlan = {
|
|
|
3387
3576
|
* Whether translator roles are enabled or not
|
|
3388
3577
|
*/
|
|
3389
3578
|
translator_roles: boolean;
|
|
3579
|
+
/**
|
|
3580
|
+
* Whether or not use a static IP when sending webhooks
|
|
3581
|
+
*/
|
|
3582
|
+
static_webhooks_ip: boolean;
|
|
3583
|
+
/**
|
|
3584
|
+
* Maximum size in bytes for a single file upload
|
|
3585
|
+
*/
|
|
3586
|
+
maximum_single_upload_bytes: number;
|
|
3390
3587
|
/**
|
|
3391
3588
|
* Available extra packets
|
|
3392
3589
|
*/
|
|
@@ -3605,6 +3802,14 @@ export type SitePlanAttributes = {
|
|
|
3605
3802
|
* Whether translator roles are enabled or not
|
|
3606
3803
|
*/
|
|
3607
3804
|
translator_roles: boolean;
|
|
3805
|
+
/**
|
|
3806
|
+
* Whether or not use a static IP when sending webhooks
|
|
3807
|
+
*/
|
|
3808
|
+
static_webhooks_ip: boolean;
|
|
3809
|
+
/**
|
|
3810
|
+
* Maximum size in bytes for a single file upload
|
|
3811
|
+
*/
|
|
3812
|
+
maximum_single_upload_bytes: number;
|
|
3608
3813
|
/**
|
|
3609
3814
|
* Available extra packets
|
|
3610
3815
|
*/
|
|
@@ -3878,6 +4083,7 @@ export type ItemType = {
|
|
|
3878
4083
|
hint: string | null;
|
|
3879
4084
|
singleton_item: ItemData | null;
|
|
3880
4085
|
fields: FieldData[];
|
|
4086
|
+
fieldsets: FieldsetData[];
|
|
3881
4087
|
title_field: FieldData | null;
|
|
3882
4088
|
image_preview_field: FieldData | null;
|
|
3883
4089
|
excerpt_field: FieldData | null;
|
|
@@ -3911,6 +4117,17 @@ export type FieldData = {
|
|
|
3911
4117
|
id: FieldIdentity;
|
|
3912
4118
|
};
|
|
3913
4119
|
|
|
4120
|
+
/**
|
|
4121
|
+
* JSON API data
|
|
4122
|
+
*
|
|
4123
|
+
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
4124
|
+
* via the `definition` "data".
|
|
4125
|
+
*/
|
|
4126
|
+
export type FieldsetData = {
|
|
4127
|
+
type: FieldsetType;
|
|
4128
|
+
id: FieldsetIdentity;
|
|
4129
|
+
};
|
|
4130
|
+
|
|
3914
4131
|
/**
|
|
3915
4132
|
* JSON API data
|
|
3916
4133
|
*
|
|
@@ -4001,6 +4218,7 @@ export type ItemTypeAttributes = {
|
|
|
4001
4218
|
export type ItemTypeRelationships = {
|
|
4002
4219
|
singleton_item: ItemData | null;
|
|
4003
4220
|
fields: FieldData[];
|
|
4221
|
+
fieldsets: FieldsetData[];
|
|
4004
4222
|
title_field: FieldData | null;
|
|
4005
4223
|
image_preview_field: FieldData | null;
|
|
4006
4224
|
excerpt_field: FieldData | null;
|
|
@@ -4169,107 +4387,939 @@ export type ItemTypeUpdateSchema = {
|
|
|
4169
4387
|
* This interface was referenced by `Field`'s JSON-Schema
|
|
4170
4388
|
* via the `destroy.targetSchema` link.
|
|
4171
4389
|
*
|
|
4172
|
-
* This interface was referenced by `Field`'s JSON-Schema
|
|
4173
|
-
* via the `duplicate.targetSchema` link.
|
|
4390
|
+
* This interface was referenced by `Field`'s JSON-Schema
|
|
4391
|
+
* via the `duplicate.targetSchema` link.
|
|
4392
|
+
*
|
|
4393
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4394
|
+
* via the `duplicate.targetSchema` link.
|
|
4395
|
+
*
|
|
4396
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4397
|
+
* via the `destroy.targetSchema` link.
|
|
4398
|
+
*
|
|
4399
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4400
|
+
* via the `batch_destroy.targetSchema` link.
|
|
4401
|
+
*
|
|
4402
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4403
|
+
* via the `batch_publish.targetSchema` link.
|
|
4404
|
+
*
|
|
4405
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4406
|
+
* via the `batch_unpublish.targetSchema` link.
|
|
4407
|
+
*
|
|
4408
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4409
|
+
* via the `bulk_publish.targetSchema` link.
|
|
4410
|
+
*
|
|
4411
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4412
|
+
* via the `bulk_unpublish.targetSchema` link.
|
|
4413
|
+
*
|
|
4414
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4415
|
+
* via the `bulk_destroy.targetSchema` link.
|
|
4416
|
+
*
|
|
4417
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4418
|
+
* via the `bulk_move_to_stage.targetSchema` link.
|
|
4419
|
+
*
|
|
4420
|
+
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
4421
|
+
* via the `restore.targetSchema` link.
|
|
4422
|
+
*
|
|
4423
|
+
* This interface was referenced by `Upload`'s JSON-Schema
|
|
4424
|
+
* via the `create.targetSchema` link.
|
|
4425
|
+
*
|
|
4426
|
+
* This interface was referenced by `Upload`'s JSON-Schema
|
|
4427
|
+
* via the `update.targetSchema` link.
|
|
4428
|
+
*
|
|
4429
|
+
* This interface was referenced by `Upload`'s JSON-Schema
|
|
4430
|
+
* via the `batch_add_tags.targetSchema` link.
|
|
4431
|
+
*
|
|
4432
|
+
* This interface was referenced by `Upload`'s JSON-Schema
|
|
4433
|
+
* via the `batch_destroy.targetSchema` link.
|
|
4434
|
+
*
|
|
4435
|
+
* This interface was referenced by `Upload`'s JSON-Schema
|
|
4436
|
+
* via the `bulk_tag.targetSchema` link.
|
|
4437
|
+
*
|
|
4438
|
+
* This interface was referenced by `Upload`'s JSON-Schema
|
|
4439
|
+
* via the `bulk_destroy.targetSchema` link.
|
|
4440
|
+
*
|
|
4441
|
+
* This interface was referenced by `Site`'s JSON-Schema
|
|
4442
|
+
* via the `update.targetSchema` link.
|
|
4443
|
+
*
|
|
4444
|
+
* This interface was referenced by `Site`'s JSON-Schema
|
|
4445
|
+
* via the `activate_improved_timezone_management.targetSchema` link.
|
|
4446
|
+
*
|
|
4447
|
+
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
4448
|
+
* via the `definition` "job".
|
|
4449
|
+
*/
|
|
4450
|
+
export type Job = {
|
|
4451
|
+
id: JobIdentity;
|
|
4452
|
+
type: JobType;
|
|
4453
|
+
};
|
|
4454
|
+
export type ItemTypeUpdateTargetSchema = Job;
|
|
4455
|
+
export type ItemTypeDestroyTargetSchema = Job;
|
|
4456
|
+
export type FieldCreateTargetSchema = Job;
|
|
4457
|
+
export type FieldUpdateTargetSchema = Job;
|
|
4458
|
+
export type FieldDestroyTargetSchema = Job;
|
|
4459
|
+
export type FieldDuplicateTargetSchema = Job;
|
|
4460
|
+
export type ItemDuplicateTargetSchema = Job;
|
|
4461
|
+
export type ItemDestroyTargetSchema = Job;
|
|
4462
|
+
export type ItemBatchDestroyTargetSchema = Job;
|
|
4463
|
+
export type ItemBatchPublishTargetSchema = Job;
|
|
4464
|
+
export type ItemBatchUnpublishTargetSchema = Job;
|
|
4465
|
+
export type ItemBulkPublishTargetSchema = Job;
|
|
4466
|
+
export type ItemBulkUnpublishTargetSchema = Job;
|
|
4467
|
+
export type ItemBulkDestroyTargetSchema = Job;
|
|
4468
|
+
export type ItemBulkMoveToStageTargetSchema = Job;
|
|
4469
|
+
export type ItemVersionRestoreTargetSchema = Job;
|
|
4470
|
+
export type UploadCreateTargetSchema = Job;
|
|
4471
|
+
export type UploadUpdateTargetSchema = Job;
|
|
4472
|
+
export type UploadBatchAddTagsTargetSchema = Job;
|
|
4473
|
+
export type UploadBatchDestroyTargetSchema = Job;
|
|
4474
|
+
export type UploadBulkTagTargetSchema = Job;
|
|
4475
|
+
export type UploadBulkDestroyTargetSchema = Job;
|
|
4476
|
+
export type SiteUpdateTargetSchema = Job;
|
|
4477
|
+
export type SiteActivateImprovedTimezoneManagementTargetSchema = Job;
|
|
4478
|
+
/**
|
|
4479
|
+
* JSON API data
|
|
4480
|
+
*
|
|
4481
|
+
* This interface was referenced by `Job`'s JSON-Schema
|
|
4482
|
+
* via the `definition` "data".
|
|
4483
|
+
*/
|
|
4484
|
+
export type JobData = {
|
|
4485
|
+
type: JobType;
|
|
4486
|
+
id: JobIdentity;
|
|
4487
|
+
};
|
|
4488
|
+
|
|
4489
|
+
/**
|
|
4490
|
+
* 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.
|
|
4491
|
+
*
|
|
4492
|
+
* ### Different field types require different settings
|
|
4493
|
+
*
|
|
4494
|
+
* When looking at a field resource, you have to pay attention to two particular properties, `validators` and `appearance`.
|
|
4495
|
+
*
|
|
4496
|
+
* 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.
|
|
4497
|
+
*
|
|
4498
|
+
* 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.
|
|
4499
|
+
*
|
|
4500
|
+
* ### Specifying validations
|
|
4501
|
+
*
|
|
4502
|
+
* 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.
|
|
4503
|
+
*
|
|
4504
|
+
* This is a valid example for a _Single-line string_ field:
|
|
4505
|
+
*
|
|
4506
|
+
* ```js
|
|
4507
|
+
* {
|
|
4508
|
+
* "validators": {
|
|
4509
|
+
* // "required" validator has no settings
|
|
4510
|
+
* "required": {},
|
|
4511
|
+
* // "length" validator requires "min" and/or "max" properties
|
|
4512
|
+
* "length": { "min": 80 }
|
|
4513
|
+
* }
|
|
4514
|
+
* }
|
|
4515
|
+
* ```
|
|
4516
|
+
*
|
|
4517
|
+
* Below you'll find a summary of all the validators available for each field type with their settings.
|
|
4518
|
+
*
|
|
4519
|
+
* 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.
|
|
4520
|
+
*
|
|
4521
|
+
* ### Specifying the appearance
|
|
4522
|
+
*
|
|
4523
|
+
* The `appearance` property requires an object with three specific properties: `editor`, `parameters` and `addons`.
|
|
4524
|
+
*
|
|
4525
|
+
* 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.
|
|
4526
|
+
*
|
|
4527
|
+
* This is a valid example for a _Single-line string_ field:
|
|
4528
|
+
*
|
|
4529
|
+
* ```js
|
|
4530
|
+
* {
|
|
4531
|
+
* "appearance": {
|
|
4532
|
+
* // single_line is a DatoCMS built-in editor that you can use with single-line string fields
|
|
4533
|
+
* "editor": "single_line",
|
|
4534
|
+
* // each built-in editor has specific settings
|
|
4535
|
+
* "parameters": { "heading": true },
|
|
4536
|
+
* "addons": []
|
|
4537
|
+
* },
|
|
4538
|
+
* }
|
|
4539
|
+
* ```
|
|
4540
|
+
*
|
|
4541
|
+
* Following you'll find a summary of all the editors available for each field type with their settings.
|
|
4542
|
+
*
|
|
4543
|
+
* #### Setting the appearance to a field editor provided by a plugin
|
|
4544
|
+
*
|
|
4545
|
+
* 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.
|
|
4546
|
+
*
|
|
4547
|
+
* In this case:
|
|
4548
|
+
*
|
|
4549
|
+
* - the `editor` property must be the ID of the plugin;
|
|
4550
|
+
* - the `field_extension` property must be the ID of the specific manual field editor that the plugin exposes;
|
|
4551
|
+
* - 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.
|
|
4552
|
+
*
|
|
4553
|
+
* ```js
|
|
4554
|
+
* {
|
|
4555
|
+
* "appearance": {
|
|
4556
|
+
* // "2132" is a the ID of a plugin exposing a manual field editor
|
|
4557
|
+
* "editor": "2134",
|
|
4558
|
+
* // "starRating" is a manual field editor exposed by the plugin
|
|
4559
|
+
* "field_extension": "starRating",
|
|
4560
|
+
* // this is a valid configuration for the "starRating" field editor
|
|
4561
|
+
* "parameters": { "maxRating": 5, "starsColor": "#ff0000" },
|
|
4562
|
+
* "addons": []
|
|
4563
|
+
* },
|
|
4564
|
+
* }
|
|
4565
|
+
* ```
|
|
4566
|
+
*
|
|
4567
|
+
* #### Configuring manual field addons
|
|
4568
|
+
*
|
|
4569
|
+
* 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.
|
|
4570
|
+
*
|
|
4571
|
+
* ```js
|
|
4572
|
+
* {
|
|
4573
|
+
* "appearance": {
|
|
4574
|
+
* "editor": "single_line",
|
|
4575
|
+
* "parameters": { "heading": true },
|
|
4576
|
+
* "addons": [
|
|
4577
|
+
* {
|
|
4578
|
+
* // "2138" is a the ID of a plugin exposing a manual addon editor
|
|
4579
|
+
* "id": "2138",
|
|
4580
|
+
* // "loremIpsumGenerator" is a manual field addon exposed by the plugin
|
|
4581
|
+
* "field_extension": "loremIpsumGenerator",
|
|
4582
|
+
* // this is a valid configuration for the "loremIpsumGenerator" field addon
|
|
4583
|
+
* "parameters": { "sentences": 2 },
|
|
4584
|
+
* }
|
|
4585
|
+
* ]
|
|
4586
|
+
* },
|
|
4587
|
+
* }
|
|
4588
|
+
* ```
|
|
4589
|
+
*
|
|
4590
|
+
* ### Available field types
|
|
4591
|
+
*
|
|
4592
|
+
* <details>
|
|
4593
|
+
* <summary>Single-line string (<code>string</code>)</summary>
|
|
4594
|
+
*
|
|
4595
|
+
* | Property | Value |
|
|
4596
|
+
* | ------------------------------ | ---------------------------------------------------- |
|
|
4597
|
+
* | Code | `string` |
|
|
4598
|
+
* | Built-in editors for the field | `single_line`, `string_radio_group`, `string_select` |
|
|
4599
|
+
* | Available validators | `required`, `unique`, `length`, `format`, `enum` |
|
|
4600
|
+
*
|
|
4601
|
+
* </details>
|
|
4602
|
+
*
|
|
4603
|
+
* <details>
|
|
4604
|
+
* <summary>Multi-line text (<code>text</code>)</summary>
|
|
4605
|
+
*
|
|
4606
|
+
* | Property | Value |
|
|
4607
|
+
* | ------------------------------ | --------------------------------- |
|
|
4608
|
+
* | Code | `text` |
|
|
4609
|
+
* | Built-in editors for the field | `markdown`, `wysiwyg`, `textarea` |
|
|
4610
|
+
* | Available validators | `required`, `length`, `format` |
|
|
4611
|
+
*
|
|
4612
|
+
* </details>
|
|
4613
|
+
*
|
|
4614
|
+
* <details>
|
|
4615
|
+
* <summary>Boolean (<code>boolean</code>)</summary>
|
|
4616
|
+
*
|
|
4617
|
+
* | Property | Value |
|
|
4618
|
+
* | ------------------------------ | -------------------------------- |
|
|
4619
|
+
* | Code | `boolean` |
|
|
4620
|
+
* | Built-in editors for the field | `boolean`, `boolean_radio_group` |
|
|
4621
|
+
* | Available validators | no validators available |
|
|
4622
|
+
*
|
|
4623
|
+
* </details>
|
|
4624
|
+
*
|
|
4625
|
+
* <details>
|
|
4626
|
+
* <summary>Integer (<code>integer</code>)</summary>
|
|
4627
|
+
*
|
|
4628
|
+
* | Property | Value |
|
|
4629
|
+
* | ------------------------------ | -------------------------- |
|
|
4630
|
+
* | Code | `integer` |
|
|
4631
|
+
* | Built-in editors for the field | `integer` |
|
|
4632
|
+
* | Available validators | `required`, `number_range` |
|
|
4633
|
+
*
|
|
4634
|
+
* </details>
|
|
4635
|
+
*
|
|
4636
|
+
* <details>
|
|
4637
|
+
* <summary>Float (<code>float</code>)</summary>
|
|
4638
|
+
*
|
|
4639
|
+
* | Property | Value |
|
|
4640
|
+
* | ------------------------------ | -------------------------- |
|
|
4641
|
+
* | Code | `float` |
|
|
4642
|
+
* | Built-in editors for the field | `float` |
|
|
4643
|
+
* | Available validators | `required`, `number_range` |
|
|
4644
|
+
*
|
|
4645
|
+
* </details>
|
|
4646
|
+
*
|
|
4647
|
+
* <details>
|
|
4648
|
+
* <summary>Date (<code>date</code>)</summary>
|
|
4649
|
+
*
|
|
4650
|
+
* | Property | Value |
|
|
4651
|
+
* | ------------------------------ | ------------------------ |
|
|
4652
|
+
* | Code | `date` |
|
|
4653
|
+
* | Built-in editors for the field | `date_picker` |
|
|
4654
|
+
* | Available validators | `required`, `date_range` |
|
|
4655
|
+
*
|
|
4656
|
+
* </details>
|
|
4657
|
+
*
|
|
4658
|
+
* <details>
|
|
4659
|
+
* <summary>Date time (<code>date_time</code>)</summary>
|
|
4660
|
+
*
|
|
4661
|
+
* | Property | Value |
|
|
4662
|
+
* | ------------------------------ | ----------------------------- |
|
|
4663
|
+
* | Code | `date_time` |
|
|
4664
|
+
* | Built-in editors for the field | `date_time_picker` |
|
|
4665
|
+
* | Available validators | `required`, `date_time_range` |
|
|
4666
|
+
*
|
|
4667
|
+
* </details>
|
|
4668
|
+
*
|
|
4669
|
+
* <details>
|
|
4670
|
+
* <summary>Color (<code>color</code>)</summary>
|
|
4671
|
+
*
|
|
4672
|
+
* | Property | Value |
|
|
4673
|
+
* | ------------------------------ | -------------- |
|
|
4674
|
+
* | Code | `color` |
|
|
4675
|
+
* | Built-in editors for the field | `color_picker` |
|
|
4676
|
+
* | Available validators | `required` |
|
|
4677
|
+
*
|
|
4678
|
+
* </details>
|
|
4679
|
+
*
|
|
4680
|
+
* <details>
|
|
4681
|
+
* <summary>JSON (<code>json</code>)</summary>
|
|
4682
|
+
*
|
|
4683
|
+
* | Property | Value |
|
|
4684
|
+
* | ------------------------------ | ------------------------------------------------------ |
|
|
4685
|
+
* | Code | `json` |
|
|
4686
|
+
* | Built-in editors for the field | `json`, `string_multi_select`, `string_checkbox_group` |
|
|
4687
|
+
* | Available validators | `required` |
|
|
4688
|
+
*
|
|
4689
|
+
* </details>
|
|
4690
|
+
*
|
|
4691
|
+
* <details>
|
|
4692
|
+
* <summary>Location (<code>lat_lon</code>)</summary>
|
|
4693
|
+
*
|
|
4694
|
+
* | Property | Value |
|
|
4695
|
+
* | ------------------------------ | ---------- |
|
|
4696
|
+
* | Code | `lat_lon` |
|
|
4697
|
+
* | Built-in editors for the field | `map` |
|
|
4698
|
+
* | Available validators | `required` |
|
|
4699
|
+
*
|
|
4700
|
+
* </details>
|
|
4701
|
+
*
|
|
4702
|
+
* <details>
|
|
4703
|
+
* <summary>SEO (<code>seo</code>)</summary>
|
|
4704
|
+
*
|
|
4705
|
+
* | Property | Value |
|
|
4706
|
+
* | ------------------------------ | -------------------------------------------------------------------------------------------- |
|
|
4707
|
+
* | Code | `seo` |
|
|
4708
|
+
* | Built-in editors for the field | `seo` |
|
|
4709
|
+
* | Available validators | `required_seo_fields`, `file_size`, `image_dimensions`, `title_length`, `description_length` |
|
|
4710
|
+
*
|
|
4711
|
+
* </details>
|
|
4712
|
+
*
|
|
4713
|
+
* <details>
|
|
4714
|
+
* <summary>Slug (<code>slug</code>)</summary>
|
|
4715
|
+
*
|
|
4716
|
+
* | Property | Value |
|
|
4717
|
+
* | ------------------------------ | ----------------------------------- |
|
|
4718
|
+
* | Code | `slug` |
|
|
4719
|
+
* | Built-in editors for the field | `slug` |
|
|
4720
|
+
* | Required validators | `slug_title_field` |
|
|
4721
|
+
* | Other validators available | `required`, `length`, `slug_format` |
|
|
4722
|
+
*
|
|
4723
|
+
* </details>
|
|
4724
|
+
*
|
|
4725
|
+
* <details>
|
|
4726
|
+
* <summary>External video (<code>video</code>)</summary>
|
|
4727
|
+
*
|
|
4728
|
+
* | Property | Value |
|
|
4729
|
+
* | ------------------------------ | ---------- |
|
|
4730
|
+
* | Code | `video` |
|
|
4731
|
+
* | Built-in editors for the field | `video` |
|
|
4732
|
+
* | Available validators | `required` |
|
|
4733
|
+
*
|
|
4734
|
+
* </details>
|
|
4735
|
+
*
|
|
4736
|
+
* <details>
|
|
4737
|
+
* <summary>Single-asset (<code>file</code>)</summary>
|
|
4738
|
+
*
|
|
4739
|
+
* | Property | Value |
|
|
4740
|
+
* | ------------------------------ | ------------------------------------------------------------------------------ |
|
|
4741
|
+
* | Code | `file` |
|
|
4742
|
+
* | Built-in editors for the field | `file` |
|
|
4743
|
+
* | Available validators | `required`, `file_size`, `image_dimensions`, `extension`, `required_alt_title` |
|
|
4744
|
+
*
|
|
4745
|
+
* </details>
|
|
4746
|
+
*
|
|
4747
|
+
* <details>
|
|
4748
|
+
* <summary>Asset gallery (<code>gallery</code>)</summary>
|
|
4749
|
+
*
|
|
4750
|
+
* | Property | Value |
|
|
4751
|
+
* | ------------------------------ | -------------------------------------------------------------------------- |
|
|
4752
|
+
* | Code | `gallery` |
|
|
4753
|
+
* | Built-in editors for the field | `gallery` |
|
|
4754
|
+
* | Available validators | `size`, `file_size`, `image_dimensions`, `extension`, `required_alt_title` |
|
|
4755
|
+
*
|
|
4756
|
+
* </details>
|
|
4757
|
+
*
|
|
4758
|
+
* <details>
|
|
4759
|
+
* <summary>Single link (<code>link</code>)</summary>
|
|
4760
|
+
*
|
|
4761
|
+
* | Property | Value |
|
|
4762
|
+
* | ------------------------------ | --------------------------- |
|
|
4763
|
+
* | Code | `link` |
|
|
4764
|
+
* | Built-in editors for the field | `link_select`, `link_embed` |
|
|
4765
|
+
* | Default `editor` | `link_select` |
|
|
4766
|
+
* | Required validators | `item_item_type` |
|
|
4767
|
+
* | Other validators available | `required`, `unique` |
|
|
4768
|
+
*
|
|
4769
|
+
* </details>
|
|
4770
|
+
*
|
|
4771
|
+
* <details>
|
|
4772
|
+
* <summary>Multiple links (<code>links</code>)</summary>
|
|
4773
|
+
*
|
|
4774
|
+
* | Property | Value |
|
|
4775
|
+
* | ------------------------------ | ----------------------------- |
|
|
4776
|
+
* | Code | `links` |
|
|
4777
|
+
* | Built-in editors for the field | `links_select`, `links_embed` |
|
|
4778
|
+
* | Default `editor` | `links_select` |
|
|
4779
|
+
* | Required validators | `items_item_type` |
|
|
4780
|
+
* | Other validators available | `size` |
|
|
4781
|
+
*
|
|
4782
|
+
* </details>
|
|
4783
|
+
*
|
|
4784
|
+
* <details>
|
|
4785
|
+
* <summary>Modular content (<code>rich_text</code>)</summary>
|
|
4786
|
+
*
|
|
4787
|
+
* | Property | Value |
|
|
4788
|
+
* | ------------------------------ | ------------------ |
|
|
4789
|
+
* | Code | `rich_text` |
|
|
4790
|
+
* | Built-in editors for the field | `rich_text` |
|
|
4791
|
+
* | Required validators | `rich_text_blocks` |
|
|
4792
|
+
* | Other validators available | `size` |
|
|
4793
|
+
*
|
|
4794
|
+
* </details>
|
|
4795
|
+
*
|
|
4796
|
+
* <details>
|
|
4797
|
+
* <summary>Structured text (<code>structured_text</code>)</summary>
|
|
4798
|
+
*
|
|
4799
|
+
* | Property | Value |
|
|
4800
|
+
* | ------------------------------ | ------------------------------------------------- |
|
|
4801
|
+
* | Code | `structured_text` |
|
|
4802
|
+
* | Built-in editors for the field | `structured_text` |
|
|
4803
|
+
* | Required validators | `structured_text_blocks`, `structured_text_links` |
|
|
4804
|
+
* | Other validators available | `length` |
|
|
4805
|
+
*
|
|
4806
|
+
* </details>
|
|
4807
|
+
*
|
|
4808
|
+
* ### Validators
|
|
4809
|
+
*
|
|
4810
|
+
* <details>
|
|
4811
|
+
* <summary><code>date_range</code></summary>
|
|
4812
|
+
*
|
|
4813
|
+
* Accept dates only inside a specified date range.
|
|
4814
|
+
*
|
|
4815
|
+
* | Parameter | Type | Required | Description |
|
|
4816
|
+
* | --------- | ------------- | -------- | ------------ |
|
|
4817
|
+
* | `min` | ISO 8601 date | | Minimum date |
|
|
4818
|
+
* | `max` | ISO 8601 date | | Maximum date |
|
|
4819
|
+
*
|
|
4820
|
+
* At least one of the parameters must be specified.
|
|
4821
|
+
*
|
|
4822
|
+
* </details>
|
|
4823
|
+
*
|
|
4824
|
+
* <details>
|
|
4825
|
+
* <summary><code>date_time_range</code></summary>
|
|
4826
|
+
*
|
|
4827
|
+
* Accept date times only inside a specified date range.
|
|
4828
|
+
*
|
|
4829
|
+
* | Parameter | Type | Required | Description |
|
|
4830
|
+
* | --------- | ----------------- | -------- | ---------------- |
|
|
4831
|
+
* | `min` | ISO 8601 datetime | | Minimum datetime |
|
|
4832
|
+
* | `max` | ISO 8601 datetime | | Maximum datetime |
|
|
4833
|
+
*
|
|
4834
|
+
* At least one of the parameters must be specified.
|
|
4835
|
+
*
|
|
4836
|
+
* </details>
|
|
4837
|
+
*
|
|
4838
|
+
* <details>
|
|
4839
|
+
* <summary><code>enum</code></summary>
|
|
4840
|
+
*
|
|
4841
|
+
* Only accept a specific set of values
|
|
4842
|
+
*
|
|
4843
|
+
* | Parameter | Type | Required | Description |
|
|
4844
|
+
* | --------- | --------------- | -------- | --------------------- |
|
|
4845
|
+
* | `values` | `Array<String>` | ✅ | Set of allowed values |
|
|
4846
|
+
*
|
|
4847
|
+
* </details>
|
|
4848
|
+
*
|
|
4849
|
+
* <details>
|
|
4850
|
+
* <summary><code>extension</code></summary>
|
|
4851
|
+
*
|
|
4852
|
+
* Only accept assets with specific file extensions.
|
|
4853
|
+
*
|
|
4854
|
+
* | Parameter | Type | Required | Description |
|
|
4855
|
+
* | ----------------- | ----------------------------------------- | -------- | ------------------------------ |
|
|
4856
|
+
* | `extensions` | `Array<String>` | | Set of allowed file extensions |
|
|
4857
|
+
* | `predefined_list` | one of `"image"`, `"transformable_image"`, `"video"`, `"document"` | | Allowed file type |
|
|
4858
|
+
*
|
|
4859
|
+
* Only one of the parameters must be specified.
|
|
4860
|
+
*
|
|
4861
|
+
* </details>
|
|
4862
|
+
*
|
|
4863
|
+
* <details>
|
|
4864
|
+
* <summary><code>file_size</code></summary>
|
|
4865
|
+
*
|
|
4866
|
+
* Accept assets only inside a specified date range.
|
|
4867
|
+
*
|
|
4868
|
+
* | Parameter | Type | Required | Description |
|
|
4869
|
+
* | ----------- | ---------------------------- | -------- | ---------------------------------- |
|
|
4870
|
+
* | `min_value` | `Integer` | | Numeric value for minimum filesize |
|
|
4871
|
+
* | `min_unit` | one of `"B"`, `"KB"`, `"MB"` | | Unit for minimum filesize |
|
|
4872
|
+
* | `max_value` | `Integer` | | Numeric value for maximum filesize |
|
|
4873
|
+
* | `max_unit` | one of `"B"`, `"KB"`, `"MB"` | | Unit for maximum filesize |
|
|
4874
|
+
*
|
|
4875
|
+
* At least one couple of value/unit must be specified.
|
|
4876
|
+
*
|
|
4877
|
+
* </details>
|
|
4878
|
+
*
|
|
4879
|
+
* <details>
|
|
4880
|
+
* <summary><code>format</code></summary>
|
|
4881
|
+
*
|
|
4882
|
+
* Only accept strings having a specific format.
|
|
4883
|
+
*
|
|
4884
|
+
* | Parameter | Type | Required | Description |
|
|
4885
|
+
* | -------------------- | ------------------------- | -------- | ---------------------------------- |
|
|
4886
|
+
* | `custom_pattern` | `Regexp` | | Regular expression to be validated |
|
|
4887
|
+
* | `predefined_pattern` | one of `"email"`, `"url"` | | Allowed format |
|
|
4888
|
+
*
|
|
4889
|
+
* Only one of the parameters must be specified.
|
|
4890
|
+
*
|
|
4891
|
+
* </details>
|
|
4892
|
+
*
|
|
4893
|
+
* <details>
|
|
4894
|
+
* <summary><code>slug_format</code></summary>
|
|
4895
|
+
*
|
|
4896
|
+
* Only accept slugs having a specific format.
|
|
4897
|
+
*
|
|
4898
|
+
* | Parameter | Type | Required | Description |
|
|
4899
|
+
* | -------------------- | ---------------- | -------- | ---------------------------------- |
|
|
4900
|
+
* | `custom_pattern` | `Regexp` | | Regular expression to be validated |
|
|
4901
|
+
* | `predefined_pattern` | `"webpage_slug"` | | Allowed format |
|
|
4902
|
+
*
|
|
4903
|
+
* Only one of the parameters must be specified.
|
|
4904
|
+
*
|
|
4905
|
+
* </details>
|
|
4906
|
+
*
|
|
4907
|
+
* <details>
|
|
4908
|
+
* <summary><code>image_dimensions</code></summary>
|
|
4909
|
+
*
|
|
4910
|
+
* Accept assets only within a specified height/width range.
|
|
4911
|
+
*
|
|
4912
|
+
* | Parameter | Type | Required | Description |
|
|
4913
|
+
* | ------------------ | --------- | -------- | -------------------------------- |
|
|
4914
|
+
* | `width_min_value` | `Integer` | | Numeric value for minimum width |
|
|
4915
|
+
* | `width_max_value` | `Integer` | | Numeric value for maximum height |
|
|
4916
|
+
* | `height_min_value` | `Integer` | | Numeric value for minimum width |
|
|
4917
|
+
* | `height_max_value` | `Integer` | | Numeric value for maximum height |
|
|
4918
|
+
*
|
|
4919
|
+
* At least one parameter must be specified.
|
|
4920
|
+
*
|
|
4921
|
+
* </details>
|
|
4922
|
+
*
|
|
4923
|
+
* <details>
|
|
4924
|
+
* <summary><code>item_item_type</code></summary>
|
|
4925
|
+
*
|
|
4926
|
+
* Only accept references to records of the specified models.
|
|
4927
|
+
*
|
|
4928
|
+
* | Parameter | Type | Required | Description |
|
|
4929
|
+
* | ------------------------------------------------- | ------------------------------------------------------------------------ | -------- | --------------------------------------------------------------------------------------------------- |
|
|
4930
|
+
* | `item_types` | `Array<Model ID>` | ✅ | Set of allowed model IDs |
|
|
4931
|
+
* | `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 |
|
|
4932
|
+
* | `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 |
|
|
4933
|
+
* | `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 |
|
|
4934
|
+
*
|
|
4935
|
+
* Possible values for `on_publish_with_unpublished_references_strategy`:
|
|
4936
|
+
*
|
|
4937
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4938
|
+
* - `"publish_references"`: Publish also the referenced records
|
|
4939
|
+
*
|
|
4940
|
+
* Possible values for `on_reference_unpublish_strategy`:
|
|
4941
|
+
*
|
|
4942
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4943
|
+
* - `"unpublish"`: Unpublish also this record
|
|
4944
|
+
* - `"delete_references"`: Try to remove the reference to the unpublished record (if the field has a `required` validation it will fail)
|
|
4945
|
+
*
|
|
4946
|
+
* Possible values for `on_reference_delete_strategy`:
|
|
4947
|
+
*
|
|
4948
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4949
|
+
* - `"delete_references"`: Try to remove the reference to the deleted record (if the field has a `required` validation it will fail)
|
|
4950
|
+
* </details>
|
|
4951
|
+
*
|
|
4952
|
+
* <details>
|
|
4953
|
+
* <summary><code>items_item_type</code></summary>
|
|
4954
|
+
*
|
|
4955
|
+
* Only accept references to records of the specified models.
|
|
4956
|
+
*
|
|
4957
|
+
* | Parameter | Type | Required | Description |
|
|
4958
|
+
* | ------------------------------------------------- | ------------------------------------------------------------------------ | -------- | --------------------------------------------------------------------------------------------------- |
|
|
4959
|
+
* | `item_types` | `Array<Model ID>` | ✅ | Set of allowed model IDs |
|
|
4960
|
+
* | `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 |
|
|
4961
|
+
* | `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 |
|
|
4962
|
+
* | `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 |
|
|
4963
|
+
*
|
|
4964
|
+
* Possible values for `on_publish_with_unpublished_references_strategy`:
|
|
4965
|
+
*
|
|
4966
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4967
|
+
* - `"publish_references"`: Publish also the referenced records
|
|
4968
|
+
*
|
|
4969
|
+
* Possible values for `on_reference_unpublish_strategy`:
|
|
4970
|
+
*
|
|
4971
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4972
|
+
* - `"unpublish"`: Unpublish also this record
|
|
4973
|
+
* - `"delete_references"`: Try to remove the reference to the unpublished record (if the field has a `required` validation it will fail)
|
|
4974
|
+
*
|
|
4975
|
+
* Possible values for `on_reference_delete_strategy`:
|
|
4976
|
+
*
|
|
4977
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4978
|
+
* - `"delete_references"`: Try to remove the reference to the deleted record (if the field has a `required` validation it will fail)
|
|
4979
|
+
* </details>
|
|
4980
|
+
*
|
|
4981
|
+
* <details>
|
|
4982
|
+
* <summary><code>length</code></summary>
|
|
4983
|
+
*
|
|
4984
|
+
* Accept strings only with a specified number of characters.
|
|
4985
|
+
*
|
|
4986
|
+
* | Parameter | Type | Required | Description |
|
|
4987
|
+
* | --------- | --------- | -------- | --------------- |
|
|
4988
|
+
* | `min` | `Integer` | | Minimum length |
|
|
4989
|
+
* | `eq` | `Integer` | | Expected length |
|
|
4990
|
+
* | `max` | `Integer` | | Maximum length |
|
|
4991
|
+
*
|
|
4992
|
+
* At least one parameter must be specified.
|
|
4993
|
+
*
|
|
4994
|
+
* </details>
|
|
4995
|
+
*
|
|
4996
|
+
* <details>
|
|
4997
|
+
* <summary><code>number_range</code></summary>
|
|
4998
|
+
*
|
|
4999
|
+
* Accept numbers only inside a specified range.
|
|
5000
|
+
*
|
|
5001
|
+
* | Parameter | Type | Required | Description |
|
|
5002
|
+
* | --------- | ------- | -------- | ------------- |
|
|
5003
|
+
* | `min` | `Float` | | Minimum value |
|
|
5004
|
+
* | `max` | `Float` | | Maximum value |
|
|
5005
|
+
*
|
|
5006
|
+
* At least one of the parameters must be specified.
|
|
5007
|
+
*
|
|
5008
|
+
* </details>
|
|
5009
|
+
*
|
|
5010
|
+
* <details>
|
|
5011
|
+
* <summary><code>required</code></summary>
|
|
5012
|
+
*
|
|
5013
|
+
* Value must be specified or it won't be valid.
|
|
5014
|
+
*
|
|
5015
|
+
* </details>
|
|
5016
|
+
*
|
|
5017
|
+
* <details>
|
|
5018
|
+
* <summary><code>required_alt_title</code></summary>
|
|
5019
|
+
*
|
|
5020
|
+
* Assets contained in the field are required to specify custom title or alternate text, or they won't be valid.
|
|
5021
|
+
*
|
|
5022
|
+
* | Parameter | Type | Required | Description |
|
|
5023
|
+
* | --------- | --------- | -------- | ---------------------------------------------------------- |
|
|
5024
|
+
* | `title` | `Boolean` | | Whether the title for the asset must be specified |
|
|
5025
|
+
* | `alt` | `Boolean` | | Whether the alternate text for the asset must be specified |
|
|
5026
|
+
*
|
|
5027
|
+
* At least one of the parameters must be specified.
|
|
5028
|
+
*
|
|
5029
|
+
* </details>
|
|
5030
|
+
*
|
|
5031
|
+
* <details>
|
|
5032
|
+
* <summary><code>required_seo_fields</code></summary>
|
|
5033
|
+
*
|
|
5034
|
+
* SEO field is to specify one or more properties, or it won't be valid.
|
|
5035
|
+
*
|
|
5036
|
+
* | Parameter | Type | Required | Description |
|
|
5037
|
+
* | -------------- | --------- | -------- | -------------------------------------------------- |
|
|
5038
|
+
* | `title` | `Boolean` | | Whether the meta title must be specified |
|
|
5039
|
+
* | `description` | `Boolean` | | Whether the meta description must be specified |
|
|
5040
|
+
* | `image` | `Boolean` | | Whether the social sharing image must be specified |
|
|
5041
|
+
* | `twitter_card` | `Boolean` | | Whether the type of Twitter card must be specified |
|
|
5042
|
+
*
|
|
5043
|
+
* At least one of the parameters must be specified.
|
|
5044
|
+
*
|
|
5045
|
+
* </details>
|
|
5046
|
+
*
|
|
5047
|
+
* <details>
|
|
5048
|
+
* <summary><code>title_length</code></summary>
|
|
5049
|
+
*
|
|
5050
|
+
* 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.
|
|
5051
|
+
*
|
|
5052
|
+
* | Parameter | Type | Required | Description |
|
|
5053
|
+
* | --------- | --------- | -------- | ------------- |
|
|
5054
|
+
* | `min` | `Integer` | | Minimum value |
|
|
5055
|
+
* | `max` | `Integer` | | Maximum value |
|
|
5056
|
+
*
|
|
5057
|
+
* At least one of the parameters must be specified.
|
|
5058
|
+
*
|
|
5059
|
+
* </details>
|
|
5060
|
+
*
|
|
5061
|
+
* <details>
|
|
5062
|
+
* <summary><code>description_length</code></summary>
|
|
5063
|
+
*
|
|
5064
|
+
* 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.
|
|
5065
|
+
*
|
|
5066
|
+
* | Parameter | Type | Required | Description |
|
|
5067
|
+
* | --------- | --------- | -------- | ------------- |
|
|
5068
|
+
* | `min` | `Integer` | | Minimum value |
|
|
5069
|
+
* | `max` | `Integer` | | Maximum value |
|
|
5070
|
+
*
|
|
5071
|
+
* At least one of the parameters must be specified.
|
|
5072
|
+
*
|
|
5073
|
+
* </details>
|
|
5074
|
+
*
|
|
5075
|
+
* <details>
|
|
5076
|
+
* <summary><code>rich_text_blocks</code></summary>
|
|
5077
|
+
*
|
|
5078
|
+
* Only accept references to block records of the specified block models.
|
|
5079
|
+
*
|
|
5080
|
+
* | Parameter | Type | Required | Description |
|
|
5081
|
+
* | ------------ | ----------------------- | -------- | ------------------------------ |
|
|
5082
|
+
* | `item_types` | `Array<Block Model ID>` | ✅ | Set of allowed Block Model IDs |
|
|
5083
|
+
*
|
|
5084
|
+
* </details>
|
|
5085
|
+
*
|
|
5086
|
+
* <details>
|
|
5087
|
+
* <summary><code>structured_text_blocks</code></summary>
|
|
5088
|
+
*
|
|
5089
|
+
* Only accept references to block records of the specified block models.
|
|
5090
|
+
*
|
|
5091
|
+
* | Parameter | Type | Required | Description |
|
|
5092
|
+
* | ------------ | ----------------------- | -------- | ------------------------------ |
|
|
5093
|
+
* | `item_types` | `Array<Block Model ID>` | ✅ | Set of allowed Block Model IDs |
|
|
5094
|
+
*
|
|
5095
|
+
* </details>
|
|
5096
|
+
*
|
|
5097
|
+
* <details>
|
|
5098
|
+
* <summary><code>structured_text_links</code></summary>
|
|
5099
|
+
*
|
|
5100
|
+
* Only accept `itemLink` to `inlineItem` nodes for records of the specified models.
|
|
5101
|
+
*
|
|
5102
|
+
* | Parameter | Type | Required | Description |
|
|
5103
|
+
* | ------------------------------------------------- | ------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------- |
|
|
5104
|
+
* | `item_types` | `Array<Model ID>` | ✅ | Set of allowed model IDs |
|
|
5105
|
+
* | `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 |
|
|
5106
|
+
* | `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 |
|
|
5107
|
+
* | `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 |
|
|
5108
|
+
*
|
|
5109
|
+
* Possible values for `on_publish_with_unpublished_references_strategy`:
|
|
5110
|
+
*
|
|
5111
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
5112
|
+
* - `"publish_references"`: Publish also the referenced records
|
|
5113
|
+
*
|
|
5114
|
+
* Possible values for `on_reference_unpublish_strategy`:
|
|
5115
|
+
*
|
|
5116
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
5117
|
+
* - `"unpublish"`: Unpublish also this record
|
|
5118
|
+
* - `"delete_references"`: Try to remove the reference to the unpublished record (if the field has a `required` validation it will fail)
|
|
5119
|
+
*
|
|
5120
|
+
* Possible values for `on_reference_delete_strategy`:
|
|
5121
|
+
*
|
|
5122
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
5123
|
+
* - `"delete_references"`: Try to remove the reference to the deleted record (if the field has a `required` validation it will fail)
|
|
5124
|
+
* </details>
|
|
5125
|
+
*
|
|
5126
|
+
* <details>
|
|
5127
|
+
* <summary><code>size</code></summary>
|
|
5128
|
+
*
|
|
5129
|
+
* Only accept a number of items within the specified range.
|
|
5130
|
+
*
|
|
5131
|
+
* | Parameter | Type | Required | Description |
|
|
5132
|
+
* | ------------- | --------- | -------- | -------------------------------------------------- |
|
|
5133
|
+
* | `min` | `Integer` | | Minimum length |
|
|
5134
|
+
* | `eq` | `Integer` | | Expected length |
|
|
5135
|
+
* | `max` | `Integer` | | Maximum length |
|
|
5136
|
+
* | `multiple_of` | `Integer` | | The number of items must be multiple of this value |
|
|
5137
|
+
*
|
|
5138
|
+
* At least one parameter must be specified.
|
|
5139
|
+
*
|
|
5140
|
+
* </details>
|
|
5141
|
+
*
|
|
5142
|
+
* <details>
|
|
5143
|
+
* <summary><code>slug_title_field</code></summary>
|
|
5144
|
+
*
|
|
5145
|
+
* Specifies the ID of the _Single-line string_ field that will be used to generate the slug
|
|
5146
|
+
*
|
|
5147
|
+
* | Parameter | Type | Required | Description |
|
|
5148
|
+
* | ---------------- | ---------- | -------- | ------------------------------------------------ |
|
|
5149
|
+
* | `title_field_id` | `Field ID` | ✅ | The field that will be used to generate the slug |
|
|
5150
|
+
*
|
|
5151
|
+
* </details>
|
|
5152
|
+
*
|
|
5153
|
+
* <details>
|
|
5154
|
+
* <summary><code>unique</code></summary>
|
|
5155
|
+
*
|
|
5156
|
+
* The value must be unique across the whole collection of records.
|
|
5157
|
+
*
|
|
5158
|
+
* </details>
|
|
5159
|
+
*
|
|
5160
|
+
* ### Configuration parameters for DatoCMS built-in field editors
|
|
5161
|
+
*
|
|
5162
|
+
* If a field editor is not specified in this table, just pass an empty object `{}` as its configuration parameters.
|
|
5163
|
+
*
|
|
5164
|
+
* <details>
|
|
5165
|
+
* <summary><code>boolean_radio_group</code></summary>
|
|
5166
|
+
*
|
|
5167
|
+
* Radio group input for _boolean_ fields.
|
|
5168
|
+
*
|
|
5169
|
+
* | Parameter | Type | Required | Description |
|
|
5170
|
+
* | ---------------- | ---------------------------------- | -------- | ----------------------------------------- |
|
|
5171
|
+
* | `positive_radio` | `{ label: string, hint?: string }` | ✅ | Radio input for positive choice (`true`) |
|
|
5172
|
+
* | `negative_radio` | `{ label: string, hint?: string }` | ✅ | Radio input for negative choice (`false`) |
|
|
5173
|
+
*
|
|
5174
|
+
* </details>
|
|
5175
|
+
*
|
|
5176
|
+
* <details>
|
|
5177
|
+
* <summary><code>string_radio_group</code></summary>
|
|
5178
|
+
*
|
|
5179
|
+
* Radio group input for _string_ fields.
|
|
5180
|
+
*
|
|
5181
|
+
* | Parameter | Type | Required | Description |
|
|
5182
|
+
* | --------- | -------------------------------------------------------- | -------- | --------------------------- |
|
|
5183
|
+
* | `radios` | `Array<{ label: string, value: string, hint?: string }>` | ✅ | The different radio options |
|
|
5184
|
+
*
|
|
5185
|
+
* </details>
|
|
5186
|
+
*
|
|
5187
|
+
* <details>
|
|
5188
|
+
* <summary><code>string_select</code></summary>
|
|
5189
|
+
*
|
|
5190
|
+
* Select input for _string_ fields.
|
|
5191
|
+
*
|
|
5192
|
+
* | Parameter | Type | Required | Description |
|
|
5193
|
+
* | --------- | -------------------------------------------------------- | -------- | ---------------------------- |
|
|
5194
|
+
* | `options` | `Array<{ label: string, value: string, hint?: string }>` | ✅ | The different select options |
|
|
5195
|
+
*
|
|
5196
|
+
* </details>
|
|
5197
|
+
*
|
|
5198
|
+
* <details>
|
|
5199
|
+
* <summary><code>string_multi_select</code></summary>
|
|
5200
|
+
*
|
|
5201
|
+
* Select input for _JSON_ fields, to edit an array of strings.
|
|
5202
|
+
*
|
|
5203
|
+
* | Parameter | Type | Required | Description |
|
|
5204
|
+
* | --------- | -------------------------------------------------------- | -------- | ---------------------------- |
|
|
5205
|
+
* | `options` | `Array<{ label: string, value: string, hint?: string }>` | ✅ | The different select options |
|
|
5206
|
+
*
|
|
5207
|
+
* </details>
|
|
5208
|
+
*
|
|
5209
|
+
* <details>
|
|
5210
|
+
* <summary><code>string_checkbox_group</code></summary>
|
|
5211
|
+
*
|
|
5212
|
+
* Multiple chechboxes input for _JSON_ fields, to edit an array of strings.
|
|
5213
|
+
*
|
|
5214
|
+
* | Parameter | Type | Required | Description |
|
|
5215
|
+
* | --------- | -------------------------------------------------------- | -------- | ---------------------------- |
|
|
5216
|
+
* | `options` | `Array<{ label: string, value: string, hint?: string }>` | ✅ | The different select options |
|
|
5217
|
+
*
|
|
5218
|
+
* </details>
|
|
5219
|
+
*
|
|
5220
|
+
* <details>
|
|
5221
|
+
* <summary><code>single_line</code></summary>
|
|
5222
|
+
*
|
|
5223
|
+
* Simple textual input for _Single-line string_ fields.
|
|
5224
|
+
*
|
|
5225
|
+
* | Parameter | Type | Required | Description |
|
|
5226
|
+
* | --------- | --------- | -------- | -------------------------------------------------------------------------------- |
|
|
5227
|
+
* | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
|
|
5228
|
+
*
|
|
5229
|
+
* </details>
|
|
5230
|
+
*
|
|
5231
|
+
* <details>
|
|
5232
|
+
* <summary><code>markdown</code></summary>
|
|
5233
|
+
*
|
|
5234
|
+
* Markdown editor for _Multiple-paragraph text_ fields.
|
|
5235
|
+
*
|
|
5236
|
+
* | Parameter | Type | Required | Description |
|
|
5237
|
+
* | --------- | --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
5238
|
+
* | `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"` |
|
|
5239
|
+
*
|
|
5240
|
+
* </details>
|
|
5241
|
+
*
|
|
5242
|
+
* <details>
|
|
5243
|
+
* <summary><code>wysiwyg</code></summary>
|
|
5244
|
+
*
|
|
5245
|
+
* HTML editor for _Multiple-paragraph text_ fields.
|
|
5246
|
+
*
|
|
5247
|
+
* | Parameter | Type | Required | Description |
|
|
5248
|
+
* | --------- | --------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
5249
|
+
* | `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"` |
|
|
5250
|
+
*
|
|
5251
|
+
* </details>
|
|
5252
|
+
*
|
|
5253
|
+
* <details>
|
|
5254
|
+
* <summary><code>textarea</code></summary>
|
|
5255
|
+
*
|
|
5256
|
+
* Basic textarea editor for _Multiple-paragraph text_ fields.
|
|
5257
|
+
*
|
|
5258
|
+
* </details>
|
|
5259
|
+
*
|
|
5260
|
+
* <details>
|
|
5261
|
+
* <summary><code>color_picker</code></summary>
|
|
5262
|
+
*
|
|
5263
|
+
* Built-in editor for _Color_ fields.
|
|
5264
|
+
*
|
|
5265
|
+
* | Parameter | Type | Required | Description |
|
|
5266
|
+
* | --------------- | ------------------------- | -------- | --------------------------------------------------------- |
|
|
5267
|
+
* | `enable_alpha` | `Boolean` | ✅ | Should the color picker allow to specify the alpha value? |
|
|
5268
|
+
* | `preset_colors` | `Array<Hex color string>` | ✅ | List of preset colors to offer to the user |
|
|
4174
5269
|
*
|
|
4175
|
-
*
|
|
4176
|
-
* via the `duplicate.targetSchema` link.
|
|
5270
|
+
* </details>
|
|
4177
5271
|
*
|
|
4178
|
-
*
|
|
4179
|
-
*
|
|
5272
|
+
* <details>
|
|
5273
|
+
* <summary><code>slug</code></summary>
|
|
4180
5274
|
*
|
|
4181
|
-
*
|
|
4182
|
-
* via the `batch_destroy.targetSchema` link.
|
|
5275
|
+
* Built-in editor for _Slug_ fields.
|
|
4183
5276
|
*
|
|
4184
|
-
*
|
|
4185
|
-
*
|
|
5277
|
+
* | Parameter | Type | Required | Description |
|
|
5278
|
+
* | ------------ | -------- | -------- | -------------------------------------------------------------------------------------- |
|
|
5279
|
+
* | `url_prefix` | `String` | | A prefix that will be shown in the editor's form to give some context to your editors. |
|
|
4186
5280
|
*
|
|
4187
|
-
*
|
|
4188
|
-
* via the `batch_unpublish.targetSchema` link.
|
|
5281
|
+
* </details>
|
|
4189
5282
|
*
|
|
4190
|
-
*
|
|
4191
|
-
*
|
|
5283
|
+
* <details>
|
|
5284
|
+
* <summary><code>rich_text</code></summary>
|
|
4192
5285
|
*
|
|
4193
|
-
*
|
|
4194
|
-
* via the `bulk_unpublish.targetSchema` link.
|
|
5286
|
+
* Built-in editor for _Modular content_ fields.
|
|
4195
5287
|
*
|
|
4196
|
-
*
|
|
4197
|
-
*
|
|
5288
|
+
* | Parameter | Type | Required | Description |
|
|
5289
|
+
* | ----------------- | --------- | -------- | ---------------------------------------------------------- |
|
|
5290
|
+
* | `start_collapsed` | `Boolean` | | Whether you want block records collapsed by default or not |
|
|
4198
5291
|
*
|
|
4199
|
-
*
|
|
4200
|
-
* via the `bulk_move_to_stage.targetSchema` link.
|
|
5292
|
+
* </details>
|
|
4201
5293
|
*
|
|
4202
|
-
*
|
|
4203
|
-
*
|
|
5294
|
+
* <details>
|
|
5295
|
+
* <summary><code>structured_text</code></summary>
|
|
4204
5296
|
*
|
|
4205
|
-
*
|
|
4206
|
-
* via the `create.targetSchema` link.
|
|
5297
|
+
* Built-in editor for _Structured text_ fields.
|
|
4207
5298
|
*
|
|
4208
|
-
*
|
|
4209
|
-
*
|
|
5299
|
+
* | Parameter | Type | Required | Description |
|
|
5300
|
+
* | ------------------------- | --------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
5301
|
+
* | `nodes` | `Array<String>` | ✅ | Specify which nodes the field should allow. Valid values: `"blockquote"`, `"code"`, `"heading"`, `"link"`, `"list"`, `"thematicBreak"` |
|
|
5302
|
+
* | `marks` | `Array<String>` | ✅ | Specify which marks the field should allow. Valid values: `"strong"`, `"emphasis"`, `"underline"`, `"strikethrough"`, `"code"`, `"highlight"` |
|
|
5303
|
+
* | `blocks_start_collapsed` | `Boolean` | | Whether you want block nodes collapsed by default or not |
|
|
5304
|
+
* | `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 |
|
|
5305
|
+
* | `show_links_meta_editor` | `Boolean` | | Whether you want to show the complete meta editor for links |
|
|
4210
5306
|
*
|
|
4211
|
-
*
|
|
4212
|
-
* via the `batch_add_tags.targetSchema` link.
|
|
5307
|
+
* </details>
|
|
4213
5308
|
*
|
|
4214
|
-
*
|
|
4215
|
-
*
|
|
5309
|
+
* <details>
|
|
5310
|
+
* <summary><code>link_select</code> and <code>links_select</code></summary>
|
|
4216
5311
|
*
|
|
4217
|
-
*
|
|
4218
|
-
* via the `bulk_tag.targetSchema` link.
|
|
5312
|
+
* Use a select input with auto-completion to pick the records to reference inside the field.
|
|
4219
5313
|
*
|
|
4220
|
-
*
|
|
4221
|
-
* via the `bulk_destroy.targetSchema` link.
|
|
5314
|
+
* </details>
|
|
4222
5315
|
*
|
|
4223
|
-
*
|
|
4224
|
-
*
|
|
5316
|
+
* <details>
|
|
5317
|
+
* <summary><code>link_embed</code> and <code>links_embed</code></summary>
|
|
4225
5318
|
*
|
|
4226
|
-
*
|
|
4227
|
-
* via the `activate_improved_timezone_management.targetSchema` link.
|
|
5319
|
+
* Use an expanded view with records' image preview to pick the records to reference inside the field.
|
|
4228
5320
|
*
|
|
4229
|
-
*
|
|
4230
|
-
* via the `definition` "job".
|
|
4231
|
-
*/
|
|
4232
|
-
export type Job = {
|
|
4233
|
-
id: JobIdentity;
|
|
4234
|
-
type: JobType;
|
|
4235
|
-
};
|
|
4236
|
-
export type ItemTypeUpdateTargetSchema = Job;
|
|
4237
|
-
export type ItemTypeDestroyTargetSchema = Job;
|
|
4238
|
-
export type FieldCreateTargetSchema = Job;
|
|
4239
|
-
export type FieldUpdateTargetSchema = Job;
|
|
4240
|
-
export type FieldDestroyTargetSchema = Job;
|
|
4241
|
-
export type FieldDuplicateTargetSchema = Job;
|
|
4242
|
-
export type ItemDuplicateTargetSchema = Job;
|
|
4243
|
-
export type ItemDestroyTargetSchema = Job;
|
|
4244
|
-
export type ItemBatchDestroyTargetSchema = Job;
|
|
4245
|
-
export type ItemBatchPublishTargetSchema = Job;
|
|
4246
|
-
export type ItemBatchUnpublishTargetSchema = Job;
|
|
4247
|
-
export type ItemBulkPublishTargetSchema = Job;
|
|
4248
|
-
export type ItemBulkUnpublishTargetSchema = Job;
|
|
4249
|
-
export type ItemBulkDestroyTargetSchema = Job;
|
|
4250
|
-
export type ItemBulkMoveToStageTargetSchema = Job;
|
|
4251
|
-
export type ItemVersionRestoreTargetSchema = Job;
|
|
4252
|
-
export type UploadCreateTargetSchema = Job;
|
|
4253
|
-
export type UploadUpdateTargetSchema = Job;
|
|
4254
|
-
export type UploadBatchAddTagsTargetSchema = Job;
|
|
4255
|
-
export type UploadBatchDestroyTargetSchema = Job;
|
|
4256
|
-
export type UploadBulkTagTargetSchema = Job;
|
|
4257
|
-
export type UploadBulkDestroyTargetSchema = Job;
|
|
4258
|
-
export type SiteUpdateTargetSchema = Job;
|
|
4259
|
-
export type SiteActivateImprovedTimezoneManagementTargetSchema = Job;
|
|
4260
|
-
/**
|
|
4261
|
-
* JSON API data
|
|
5321
|
+
* </details>
|
|
4262
5322
|
*
|
|
4263
|
-
* This interface was referenced by `Job`'s JSON-Schema
|
|
4264
|
-
* via the `definition` "data".
|
|
4265
|
-
*/
|
|
4266
|
-
export type JobData = {
|
|
4267
|
-
type: JobType;
|
|
4268
|
-
id: JobIdentity;
|
|
4269
|
-
};
|
|
4270
|
-
|
|
4271
|
-
/**
|
|
4272
|
-
* 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.
|
|
4273
5323
|
*
|
|
4274
5324
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
4275
5325
|
* via the `definition` "field".
|
|
@@ -4373,17 +5423,6 @@ export type FieldUpdateJobSchema = Field;
|
|
|
4373
5423
|
export type FieldSelfTargetSchema = Field;
|
|
4374
5424
|
export type FieldDestroyJobSchema = Field;
|
|
4375
5425
|
export type FieldDuplicateJobSchema = Field;
|
|
4376
|
-
/**
|
|
4377
|
-
* JSON API data
|
|
4378
|
-
*
|
|
4379
|
-
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
4380
|
-
* via the `definition` "data".
|
|
4381
|
-
*/
|
|
4382
|
-
export type FieldsetData = {
|
|
4383
|
-
type: FieldsetType;
|
|
4384
|
-
id: FieldsetIdentity;
|
|
4385
|
-
};
|
|
4386
|
-
|
|
4387
5426
|
/**
|
|
4388
5427
|
* JSON API attributes
|
|
4389
5428
|
*
|
|
@@ -4874,145 +5913,6 @@ export type SessionCreateSchema = {
|
|
|
4874
5913
|
otp_code?: string;
|
|
4875
5914
|
};
|
|
4876
5915
|
|
|
4877
|
-
/**
|
|
4878
|
-
* An API token allows access to our API. It is linked to a Role, which describes what actions can be performed.
|
|
4879
|
-
*
|
|
4880
|
-
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
4881
|
-
* via the `definition` "access_token".
|
|
4882
|
-
*/
|
|
4883
|
-
export type AccessToken = {
|
|
4884
|
-
id: AccessTokenIdentity;
|
|
4885
|
-
type: AccessTokenType;
|
|
4886
|
-
/**
|
|
4887
|
-
* Name of API token
|
|
4888
|
-
*/
|
|
4889
|
-
name: string;
|
|
4890
|
-
/**
|
|
4891
|
-
* The actual API token
|
|
4892
|
-
*/
|
|
4893
|
-
token?: string;
|
|
4894
|
-
/**
|
|
4895
|
-
* Whether this API token can access the Content Delivery API published content endpoint
|
|
4896
|
-
*/
|
|
4897
|
-
can_access_cda: boolean;
|
|
4898
|
-
/**
|
|
4899
|
-
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
4900
|
-
*/
|
|
4901
|
-
can_access_cda_preview: boolean;
|
|
4902
|
-
/**
|
|
4903
|
-
* Whether this API token can access the Content Management API
|
|
4904
|
-
*/
|
|
4905
|
-
can_access_cma: boolean;
|
|
4906
|
-
hardcoded_type: null | string;
|
|
4907
|
-
role: RoleData | null;
|
|
4908
|
-
};
|
|
4909
|
-
export type AccessTokenCreateTargetSchema = AccessToken;
|
|
4910
|
-
export type AccessTokenUpdateTargetSchema = AccessToken;
|
|
4911
|
-
export type AccessTokenSelfTargetSchema = AccessToken;
|
|
4912
|
-
export type AccessTokenRegenerateTokenTargetSchema = AccessToken;
|
|
4913
|
-
export type AccessTokenDestroyTargetSchema = AccessToken;
|
|
4914
|
-
/**
|
|
4915
|
-
* JSON API data
|
|
4916
|
-
*
|
|
4917
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
4918
|
-
* via the `definition` "data".
|
|
4919
|
-
*/
|
|
4920
|
-
export type AccessTokenData = {
|
|
4921
|
-
type: AccessTokenType;
|
|
4922
|
-
id: AccessTokenIdentity;
|
|
4923
|
-
};
|
|
4924
|
-
|
|
4925
|
-
/**
|
|
4926
|
-
* JSON API attributes
|
|
4927
|
-
*
|
|
4928
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
4929
|
-
* via the `definition` "attributes".
|
|
4930
|
-
*/
|
|
4931
|
-
export type AccessTokenAttributes = {
|
|
4932
|
-
/**
|
|
4933
|
-
* Name of API token
|
|
4934
|
-
*/
|
|
4935
|
-
name: string;
|
|
4936
|
-
/**
|
|
4937
|
-
* The actual API token
|
|
4938
|
-
*/
|
|
4939
|
-
token?: string;
|
|
4940
|
-
/**
|
|
4941
|
-
* Whether this API token can access the Content Delivery API published content endpoint
|
|
4942
|
-
*/
|
|
4943
|
-
can_access_cda: boolean;
|
|
4944
|
-
/**
|
|
4945
|
-
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
4946
|
-
*/
|
|
4947
|
-
can_access_cda_preview: boolean;
|
|
4948
|
-
/**
|
|
4949
|
-
* Whether this API token can access the Content Management API
|
|
4950
|
-
*/
|
|
4951
|
-
can_access_cma: boolean;
|
|
4952
|
-
hardcoded_type: null | string;
|
|
4953
|
-
};
|
|
4954
|
-
|
|
4955
|
-
/**
|
|
4956
|
-
* JSON API links
|
|
4957
|
-
*
|
|
4958
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
4959
|
-
* via the `definition` "relationships".
|
|
4960
|
-
*/
|
|
4961
|
-
export type AccessTokenRelationships = {
|
|
4962
|
-
role: RoleData | null;
|
|
4963
|
-
};
|
|
4964
|
-
|
|
4965
|
-
/**
|
|
4966
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
4967
|
-
* via the `create.schema` link.
|
|
4968
|
-
*/
|
|
4969
|
-
export type AccessTokenCreateSchema = {
|
|
4970
|
-
type?: AccessTokenType;
|
|
4971
|
-
/**
|
|
4972
|
-
* Name of API token
|
|
4973
|
-
*/
|
|
4974
|
-
name: string;
|
|
4975
|
-
/**
|
|
4976
|
-
* Whether this API token can access the Content Delivery API published content endpoint
|
|
4977
|
-
*/
|
|
4978
|
-
can_access_cda: boolean;
|
|
4979
|
-
/**
|
|
4980
|
-
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
4981
|
-
*/
|
|
4982
|
-
can_access_cda_preview: boolean;
|
|
4983
|
-
/**
|
|
4984
|
-
* Whether this API token can access the Content Management API
|
|
4985
|
-
*/
|
|
4986
|
-
can_access_cma: boolean;
|
|
4987
|
-
role: RoleData | null;
|
|
4988
|
-
};
|
|
4989
|
-
|
|
4990
|
-
/**
|
|
4991
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
4992
|
-
* via the `update.schema` link.
|
|
4993
|
-
*/
|
|
4994
|
-
export type AccessTokenUpdateSchema = {
|
|
4995
|
-
id?: AccessTokenIdentity;
|
|
4996
|
-
type?: AccessTokenType;
|
|
4997
|
-
/**
|
|
4998
|
-
* Name of API token
|
|
4999
|
-
*/
|
|
5000
|
-
name: string;
|
|
5001
|
-
/**
|
|
5002
|
-
* Whether this API token can access the Content Delivery API published content endpoint
|
|
5003
|
-
*/
|
|
5004
|
-
can_access_cda: boolean;
|
|
5005
|
-
/**
|
|
5006
|
-
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
5007
|
-
*/
|
|
5008
|
-
can_access_cda_preview: boolean;
|
|
5009
|
-
/**
|
|
5010
|
-
* Whether this API token can access the Content Management API
|
|
5011
|
-
*/
|
|
5012
|
-
can_access_cma: boolean;
|
|
5013
|
-
role: RoleData | null;
|
|
5014
|
-
};
|
|
5015
|
-
|
|
5016
5916
|
/**
|
|
5017
5917
|
* Plugins enable developers to replace DatoCMS field components with HTML5 applications so the editing experiences of the DatoCMS web app can be customized.
|
|
5018
5918
|
*
|
|
@@ -6618,11 +7518,11 @@ export type SearchResult = {
|
|
|
6618
7518
|
id: SearchResultIdentity;
|
|
6619
7519
|
type: SearchResultType;
|
|
6620
7520
|
/**
|
|
6621
|
-
*
|
|
7521
|
+
* Title of the page
|
|
6622
7522
|
*/
|
|
6623
7523
|
title: string;
|
|
6624
7524
|
/**
|
|
6625
|
-
* First
|
|
7525
|
+
* First 200 characters of page body, unformatted
|
|
6626
7526
|
*/
|
|
6627
7527
|
body_excerpt: string;
|
|
6628
7528
|
/**
|
|
@@ -6630,7 +7530,7 @@ export type SearchResult = {
|
|
|
6630
7530
|
*/
|
|
6631
7531
|
url: string;
|
|
6632
7532
|
/**
|
|
6633
|
-
*
|
|
7533
|
+
* Search score
|
|
6634
7534
|
*/
|
|
6635
7535
|
score: number;
|
|
6636
7536
|
highlight: {
|
|
@@ -6658,11 +7558,11 @@ export type SearchResultData = {
|
|
|
6658
7558
|
*/
|
|
6659
7559
|
export type SearchResultAttributes = {
|
|
6660
7560
|
/**
|
|
6661
|
-
*
|
|
7561
|
+
* Title of the page
|
|
6662
7562
|
*/
|
|
6663
7563
|
title: string;
|
|
6664
7564
|
/**
|
|
6665
|
-
* First
|
|
7565
|
+
* First 200 characters of page body, unformatted
|
|
6666
7566
|
*/
|
|
6667
7567
|
body_excerpt: string;
|
|
6668
7568
|
/**
|
|
@@ -6670,7 +7570,7 @@ export type SearchResultAttributes = {
|
|
|
6670
7570
|
*/
|
|
6671
7571
|
url: string;
|
|
6672
7572
|
/**
|
|
6673
|
-
*
|
|
7573
|
+
* Search score
|
|
6674
7574
|
*/
|
|
6675
7575
|
score: number;
|
|
6676
7576
|
highlight: {
|
|
@@ -8017,6 +8917,7 @@ export type PublicInfo = {
|
|
|
8017
8917
|
extras: null | {
|
|
8018
8918
|
blocks_depth: number;
|
|
8019
8919
|
blocks_per_item: number;
|
|
8920
|
+
maximum_single_upload_bytes: number;
|
|
8020
8921
|
[k: string]: unknown;
|
|
8021
8922
|
};
|
|
8022
8923
|
};
|
|
@@ -8099,6 +9000,7 @@ export type PublicInfoAttributes = {
|
|
|
8099
9000
|
extras: null | {
|
|
8100
9001
|
blocks_depth: number;
|
|
8101
9002
|
blocks_per_item: number;
|
|
9003
|
+
maximum_single_upload_bytes: number;
|
|
8102
9004
|
[k: string]: unknown;
|
|
8103
9005
|
};
|
|
8104
9006
|
};
|
|
@@ -8372,10 +9274,6 @@ export type Site = {
|
|
|
8372
9274
|
* Specifies the last time when a change of data occurred
|
|
8373
9275
|
*/
|
|
8374
9276
|
last_data_change_at: null | string;
|
|
8375
|
-
/**
|
|
8376
|
-
* Frontend website url
|
|
8377
|
-
*/
|
|
8378
|
-
frontend_url: string | null;
|
|
8379
9277
|
/**
|
|
8380
9278
|
* Specifies whether all users of this site need to authenticate using two-factor authentication
|
|
8381
9279
|
*/
|
|
@@ -8459,33 +9357,9 @@ export type Site = {
|
|
|
8459
9357
|
} | null;
|
|
8460
9358
|
account: AccountData;
|
|
8461
9359
|
/**
|
|
8462
|
-
* The list
|
|
8463
|
-
*/
|
|
8464
|
-
build_triggers?: BuildTriggerData[];
|
|
8465
|
-
/**
|
|
8466
|
-
* The list of site menu items
|
|
8467
|
-
*/
|
|
8468
|
-
menu_items: MenuItemData[];
|
|
8469
|
-
/**
|
|
8470
|
-
* The list of site SSO users
|
|
8471
|
-
*/
|
|
8472
|
-
sso_users: SsoUserData[];
|
|
8473
|
-
/**
|
|
8474
|
-
* The list of site users
|
|
8475
|
-
*/
|
|
8476
|
-
users: UserData[];
|
|
8477
|
-
/**
|
|
8478
|
-
* The list of site item types
|
|
9360
|
+
* The list item types for the site
|
|
8479
9361
|
*/
|
|
8480
9362
|
item_types: ItemTypeData[];
|
|
8481
|
-
/**
|
|
8482
|
-
* Specifies the default role for newly created identity providers users
|
|
8483
|
-
*/
|
|
8484
|
-
sso_default_role?: RoleData[];
|
|
8485
|
-
/**
|
|
8486
|
-
* The list of site roles
|
|
8487
|
-
*/
|
|
8488
|
-
roles: RoleData[];
|
|
8489
9363
|
meta: SiteMeta;
|
|
8490
9364
|
};
|
|
8491
9365
|
export type SiteSelfTargetSchema = Site;
|
|
@@ -8562,10 +9436,6 @@ export type SiteAttributes = {
|
|
|
8562
9436
|
* Specifies the last time when a change of data occurred
|
|
8563
9437
|
*/
|
|
8564
9438
|
last_data_change_at: null | string;
|
|
8565
|
-
/**
|
|
8566
|
-
* Frontend website url
|
|
8567
|
-
*/
|
|
8568
|
-
frontend_url: string | null;
|
|
8569
9439
|
/**
|
|
8570
9440
|
* Specifies whether all users of this site need to authenticate using two-factor authentication
|
|
8571
9441
|
*/
|
|
@@ -8658,33 +9528,9 @@ export type SiteAttributes = {
|
|
|
8658
9528
|
export type SiteRelationships = {
|
|
8659
9529
|
account: AccountData;
|
|
8660
9530
|
/**
|
|
8661
|
-
* The list
|
|
8662
|
-
*/
|
|
8663
|
-
build_triggers?: BuildTriggerData[];
|
|
8664
|
-
/**
|
|
8665
|
-
* The list of site menu items
|
|
8666
|
-
*/
|
|
8667
|
-
menu_items: MenuItemData[];
|
|
8668
|
-
/**
|
|
8669
|
-
* The list of site SSO users
|
|
8670
|
-
*/
|
|
8671
|
-
sso_users: SsoUserData[];
|
|
8672
|
-
/**
|
|
8673
|
-
* The list of site users
|
|
8674
|
-
*/
|
|
8675
|
-
users: UserData[];
|
|
8676
|
-
/**
|
|
8677
|
-
* The list of site item types
|
|
9531
|
+
* The list item types for the site
|
|
8678
9532
|
*/
|
|
8679
9533
|
item_types: ItemTypeData[];
|
|
8680
|
-
/**
|
|
8681
|
-
* Specifies the default role for newly created identity providers users
|
|
8682
|
-
*/
|
|
8683
|
-
sso_default_role?: RoleData[];
|
|
8684
|
-
/**
|
|
8685
|
-
* The list of site roles
|
|
8686
|
-
*/
|
|
8687
|
-
roles: RoleData[];
|
|
8688
9534
|
};
|
|
8689
9535
|
|
|
8690
9536
|
/**
|