@datocms/cma-client 0.1.8 → 1.0.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/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 +1323 -443
- package/dist/esm/generated/SimpleSchemaTypes.d.ts +1332 -460
- 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 +1323 -443
- package/dist/types/generated/SimpleSchemaTypes.d.ts +1332 -460
- 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 +6 -0
- package/src/generated/SchemaTypes.ts +1368 -476
- package/src/generated/SimpleSchemaTypes.ts +1338 -466
- package/src/generated/resources/Site.ts +6 -3
- package/src/generated/resources/User.ts +36 -3
|
@@ -87,19 +87,20 @@ export declare type UserType = 'user';
|
|
|
87
87
|
export declare type UserInstancesTargetSchema = User[];
|
|
88
88
|
/**
|
|
89
89
|
* This interface was referenced by `User`'s JSON-Schema
|
|
90
|
-
* via the `
|
|
90
|
+
* via the `self.hrefSchema` link.
|
|
91
91
|
*/
|
|
92
|
-
export declare type
|
|
93
|
-
/**
|
|
94
|
-
* New owner for resources previously owned by the deleted user. This argument specifies the new owner type.
|
|
95
|
-
*/
|
|
96
|
-
destination_user_type?: 'account' | 'user' | 'access_token' | 'sso_user';
|
|
92
|
+
export declare type UserSelfHrefSchema = {
|
|
97
93
|
/**
|
|
98
|
-
*
|
|
94
|
+
* Comma-separated list of [relationship paths](https://jsonapi.org/format/#fetching-includes). A relationship path is a dot-separated list of relationship names. Allowed relationship paths: `role`.
|
|
99
95
|
*/
|
|
100
|
-
|
|
96
|
+
include?: string;
|
|
101
97
|
[k: string]: unknown;
|
|
102
98
|
};
|
|
99
|
+
/**
|
|
100
|
+
* This interface was referenced by `User`'s JSON-Schema
|
|
101
|
+
* via the `me.targetSchema` link.
|
|
102
|
+
*/
|
|
103
|
+
export declare type UserMeTargetSchema = User | SsoUser | AccessToken | Account;
|
|
103
104
|
/**
|
|
104
105
|
* ID of user
|
|
105
106
|
*
|
|
@@ -160,27 +161,42 @@ export declare type SsoUserDestroyHrefSchema = {
|
|
|
160
161
|
[k: string]: unknown;
|
|
161
162
|
};
|
|
162
163
|
/**
|
|
163
|
-
*
|
|
164
|
+
* ID of access_token
|
|
164
165
|
*
|
|
165
|
-
* This interface was referenced by `
|
|
166
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
166
167
|
* via the `definition` "identity".
|
|
167
168
|
*
|
|
168
|
-
* This interface was referenced by `
|
|
169
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
169
170
|
* via the `definition` "id".
|
|
170
171
|
*/
|
|
171
|
-
export declare type
|
|
172
|
+
export declare type AccessTokenIdentity = string;
|
|
172
173
|
/**
|
|
173
174
|
* JSON API type field
|
|
174
175
|
*
|
|
175
|
-
* This interface was referenced by `
|
|
176
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
176
177
|
* via the `definition` "type".
|
|
177
178
|
*/
|
|
178
|
-
export declare type
|
|
179
|
+
export declare type AccessTokenType = 'access_token';
|
|
179
180
|
/**
|
|
180
|
-
* This interface was referenced by `
|
|
181
|
-
* via the `
|
|
181
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
182
|
+
* via the `instances.targetSchema` link.
|
|
182
183
|
*/
|
|
183
|
-
export declare type
|
|
184
|
+
export declare type AccessTokenInstancesTargetSchema = AccessToken[];
|
|
185
|
+
/**
|
|
186
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
187
|
+
* via the `destroy.hrefSchema` link.
|
|
188
|
+
*/
|
|
189
|
+
export declare type AccessTokenDestroyHrefSchema = {
|
|
190
|
+
/**
|
|
191
|
+
* New owner for resources previously owned by the deleted access token. This argument specifies the new owner type.
|
|
192
|
+
*/
|
|
193
|
+
destination_user_type?: 'account' | 'user' | 'access_token' | 'sso_user';
|
|
194
|
+
/**
|
|
195
|
+
* New owner for resources previously owned by the deleted access token. This argument specifies the new owner ID.
|
|
196
|
+
*/
|
|
197
|
+
destination_user_id?: string;
|
|
198
|
+
[k: string]: unknown;
|
|
199
|
+
};
|
|
184
200
|
/**
|
|
185
201
|
* ID of account
|
|
186
202
|
*
|
|
@@ -198,6 +214,54 @@ export declare type AccountIdentity = string;
|
|
|
198
214
|
* via the `definition` "type".
|
|
199
215
|
*/
|
|
200
216
|
export declare type AccountType = 'account';
|
|
217
|
+
/**
|
|
218
|
+
* This interface was referenced by `User`'s JSON-Schema
|
|
219
|
+
* via the `me.hrefSchema` link.
|
|
220
|
+
*/
|
|
221
|
+
export declare type UserMeHrefSchema = {
|
|
222
|
+
/**
|
|
223
|
+
* Comma-separated list of [relationship paths](https://jsonapi.org/format/#fetching-includes). A relationship path is a dot-separated list of relationship names. Allowed relationship paths: `role`.
|
|
224
|
+
*/
|
|
225
|
+
include?: string;
|
|
226
|
+
[k: string]: unknown;
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* This interface was referenced by `User`'s JSON-Schema
|
|
230
|
+
* via the `destroy.hrefSchema` link.
|
|
231
|
+
*/
|
|
232
|
+
export declare type UserDestroyHrefSchema = {
|
|
233
|
+
/**
|
|
234
|
+
* New owner for resources previously owned by the deleted user. This argument specifies the new owner type.
|
|
235
|
+
*/
|
|
236
|
+
destination_user_type?: 'account' | 'user' | 'access_token' | 'sso_user';
|
|
237
|
+
/**
|
|
238
|
+
* New owner for resources previously owned by the deleted user. This argument specifies the new owner ID.
|
|
239
|
+
*/
|
|
240
|
+
destination_user_id?: string;
|
|
241
|
+
[k: string]: unknown;
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* ULID of event (https://github.com/ulid/spec)
|
|
245
|
+
*
|
|
246
|
+
* This interface was referenced by `AuditLogEvent`'s JSON-Schema
|
|
247
|
+
* via the `definition` "identity".
|
|
248
|
+
*
|
|
249
|
+
* This interface was referenced by `AuditLogEvent`'s JSON-Schema
|
|
250
|
+
* via the `definition` "id".
|
|
251
|
+
*/
|
|
252
|
+
export declare type AuditLogEventIdentity = string;
|
|
253
|
+
/**
|
|
254
|
+
* JSON API type field
|
|
255
|
+
*
|
|
256
|
+
* This interface was referenced by `AuditLogEvent`'s JSON-Schema
|
|
257
|
+
* via the `definition` "type".
|
|
258
|
+
*/
|
|
259
|
+
export declare type AuditLogEventType = 'audit_log_event';
|
|
260
|
+
/**
|
|
261
|
+
* This interface was referenced by `AuditLogEvent`'s JSON-Schema
|
|
262
|
+
* via the `query.targetSchema` link.
|
|
263
|
+
*/
|
|
264
|
+
export declare type AuditLogEventQueryTargetSchema = AuditLogEvent[];
|
|
201
265
|
/**
|
|
202
266
|
* ID of plan
|
|
203
267
|
*
|
|
@@ -290,6 +354,23 @@ export declare type FieldType = 'field';
|
|
|
290
354
|
* via the `definition` "id".
|
|
291
355
|
*/
|
|
292
356
|
export declare type FieldIdentity = string;
|
|
357
|
+
/**
|
|
358
|
+
* JSON API type fieldset
|
|
359
|
+
*
|
|
360
|
+
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
361
|
+
* via the `definition` "type".
|
|
362
|
+
*/
|
|
363
|
+
export declare type FieldsetType = 'fieldset';
|
|
364
|
+
/**
|
|
365
|
+
* ID of fieldset
|
|
366
|
+
*
|
|
367
|
+
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
368
|
+
* via the `definition` "identity".
|
|
369
|
+
*
|
|
370
|
+
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
371
|
+
* via the `definition` "id".
|
|
372
|
+
*/
|
|
373
|
+
export declare type FieldsetIdentity = string;
|
|
293
374
|
/**
|
|
294
375
|
* JSON API type field
|
|
295
376
|
*
|
|
@@ -319,23 +400,6 @@ export declare type JobType = 'job';
|
|
|
319
400
|
* via the `instances.targetSchema` link.
|
|
320
401
|
*/
|
|
321
402
|
export declare type ItemTypeInstancesTargetSchema = ItemType[];
|
|
322
|
-
/**
|
|
323
|
-
* JSON API type fieldset
|
|
324
|
-
*
|
|
325
|
-
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
326
|
-
* via the `definition` "type".
|
|
327
|
-
*/
|
|
328
|
-
export declare type FieldsetType = 'fieldset';
|
|
329
|
-
/**
|
|
330
|
-
* ID of fieldset
|
|
331
|
-
*
|
|
332
|
-
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
333
|
-
* via the `definition` "identity".
|
|
334
|
-
*
|
|
335
|
-
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
336
|
-
* via the `definition` "id".
|
|
337
|
-
*/
|
|
338
|
-
export declare type FieldsetIdentity = string;
|
|
339
403
|
/**
|
|
340
404
|
* This interface was referenced by `Field`'s JSON-Schema
|
|
341
405
|
* via the `instances.targetSchema` link.
|
|
@@ -373,43 +437,6 @@ export declare type SessionIdentity = string;
|
|
|
373
437
|
* via the `definition` "type".
|
|
374
438
|
*/
|
|
375
439
|
export declare type SessionType = 'session';
|
|
376
|
-
/**
|
|
377
|
-
* ID of access_token
|
|
378
|
-
*
|
|
379
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
380
|
-
* via the `definition` "identity".
|
|
381
|
-
*
|
|
382
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
383
|
-
* via the `definition` "id".
|
|
384
|
-
*/
|
|
385
|
-
export declare type AccessTokenIdentity = string;
|
|
386
|
-
/**
|
|
387
|
-
* JSON API type field
|
|
388
|
-
*
|
|
389
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
390
|
-
* via the `definition` "type".
|
|
391
|
-
*/
|
|
392
|
-
export declare type AccessTokenType = 'access_token';
|
|
393
|
-
/**
|
|
394
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
395
|
-
* via the `instances.targetSchema` link.
|
|
396
|
-
*/
|
|
397
|
-
export declare type AccessTokenInstancesTargetSchema = AccessToken[];
|
|
398
|
-
/**
|
|
399
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
400
|
-
* via the `destroy.hrefSchema` link.
|
|
401
|
-
*/
|
|
402
|
-
export declare type AccessTokenDestroyHrefSchema = {
|
|
403
|
-
/**
|
|
404
|
-
* New owner for resources previously owned by the deleted access token. This argument specifies the new owner type.
|
|
405
|
-
*/
|
|
406
|
-
destination_user_type?: 'account' | 'user' | 'access_token' | 'sso_user';
|
|
407
|
-
/**
|
|
408
|
-
* New owner for resources previously owned by the deleted access token. This argument specifies the new owner ID.
|
|
409
|
-
*/
|
|
410
|
-
destination_user_id?: string;
|
|
411
|
-
[k: string]: unknown;
|
|
412
|
-
};
|
|
413
440
|
/**
|
|
414
441
|
* ID of plugin
|
|
415
442
|
*
|
|
@@ -1463,6 +1490,17 @@ export declare type SiteIdentity = string;
|
|
|
1463
1490
|
* via the `definition` "type".
|
|
1464
1491
|
*/
|
|
1465
1492
|
export declare type SiteType = 'site';
|
|
1493
|
+
/**
|
|
1494
|
+
* This interface was referenced by `Site`'s JSON-Schema
|
|
1495
|
+
* via the `self.hrefSchema` link.
|
|
1496
|
+
*/
|
|
1497
|
+
export declare type SiteSelfHrefSchema = {
|
|
1498
|
+
/**
|
|
1499
|
+
* 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`.
|
|
1500
|
+
*/
|
|
1501
|
+
include?: string;
|
|
1502
|
+
[k: string]: unknown;
|
|
1503
|
+
};
|
|
1466
1504
|
/**
|
|
1467
1505
|
* This interface was referenced by `Workflow`'s JSON-Schema
|
|
1468
1506
|
* via the `instances.targetSchema` link.
|
|
@@ -2711,130 +2749,216 @@ export declare type SsoUserRelationships = {
|
|
|
2711
2749
|
role: RoleData | null;
|
|
2712
2750
|
};
|
|
2713
2751
|
/**
|
|
2714
|
-
*
|
|
2752
|
+
* An API token allows access to our API. It is linked to a Role, which describes what actions can be performed.
|
|
2715
2753
|
*
|
|
2716
2754
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
2717
|
-
* via the `definition` "
|
|
2755
|
+
* via the `definition` "access_token".
|
|
2718
2756
|
*/
|
|
2719
|
-
export declare type
|
|
2720
|
-
id:
|
|
2721
|
-
type:
|
|
2722
|
-
/**
|
|
2723
|
-
* The actual action performed
|
|
2724
|
-
*/
|
|
2725
|
-
action_name: string;
|
|
2757
|
+
export declare type AccessToken = {
|
|
2758
|
+
id: AccessTokenIdentity;
|
|
2759
|
+
type: AccessTokenType;
|
|
2726
2760
|
/**
|
|
2727
|
-
*
|
|
2761
|
+
* Name of API token
|
|
2728
2762
|
*/
|
|
2729
|
-
|
|
2730
|
-
/**
|
|
2731
|
-
* The type of actor (can be `account`, `user`, `sso_user` or `access_token`)
|
|
2732
|
-
*/
|
|
2733
|
-
type: string;
|
|
2734
|
-
/**
|
|
2735
|
-
* The ID of the actor
|
|
2736
|
-
*/
|
|
2737
|
-
id: string;
|
|
2738
|
-
/**
|
|
2739
|
-
* An human representation of the actor (name/email/username depending on the type of actor)
|
|
2740
|
-
*/
|
|
2741
|
-
name: string;
|
|
2742
|
-
};
|
|
2763
|
+
name: string;
|
|
2743
2764
|
/**
|
|
2744
|
-
* The
|
|
2765
|
+
* The actual API token (or null if the current user has no permission to read the token)
|
|
2745
2766
|
*/
|
|
2746
|
-
|
|
2747
|
-
/**
|
|
2748
|
-
* The name of the role
|
|
2749
|
-
*/
|
|
2750
|
-
name: string;
|
|
2751
|
-
/**
|
|
2752
|
-
* The ID of the role
|
|
2753
|
-
*/
|
|
2754
|
-
id: string;
|
|
2755
|
-
};
|
|
2767
|
+
token?: null | string;
|
|
2756
2768
|
/**
|
|
2757
|
-
*
|
|
2769
|
+
* Whether this API token can access the Content Delivery API published content endpoint
|
|
2758
2770
|
*/
|
|
2759
|
-
|
|
2760
|
-
/**
|
|
2761
|
-
* The ID of the environment
|
|
2762
|
-
*/
|
|
2763
|
-
id: string;
|
|
2764
|
-
/**
|
|
2765
|
-
* Whether the environment was the primary one at the time the action was performed
|
|
2766
|
-
*/
|
|
2767
|
-
primary: boolean;
|
|
2768
|
-
};
|
|
2771
|
+
can_access_cda: boolean;
|
|
2769
2772
|
/**
|
|
2770
|
-
*
|
|
2773
|
+
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
2771
2774
|
*/
|
|
2772
|
-
|
|
2773
|
-
/**
|
|
2774
|
-
* The full path of the request
|
|
2775
|
-
*/
|
|
2776
|
-
path: string;
|
|
2777
|
-
/**
|
|
2778
|
-
* The HTTP method of the request
|
|
2779
|
-
*/
|
|
2780
|
-
method: string;
|
|
2781
|
-
/**
|
|
2782
|
-
* The X-Request-ID header of the request
|
|
2783
|
-
*/
|
|
2784
|
-
id?: string;
|
|
2785
|
-
/**
|
|
2786
|
-
* The full HTTP body of the request
|
|
2787
|
-
*/
|
|
2788
|
-
payload?: null | {
|
|
2789
|
-
[k: string]: unknown;
|
|
2790
|
-
};
|
|
2791
|
-
};
|
|
2775
|
+
can_access_cda_preview: boolean;
|
|
2792
2776
|
/**
|
|
2793
|
-
*
|
|
2777
|
+
* Whether this API token can access the Content Management API
|
|
2794
2778
|
*/
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
*/
|
|
2799
|
-
status: number;
|
|
2800
|
-
/**
|
|
2801
|
-
* The full HTTP body of the response
|
|
2802
|
-
*/
|
|
2803
|
-
payload: {
|
|
2804
|
-
[k: string]: unknown;
|
|
2805
|
-
};
|
|
2806
|
-
};
|
|
2807
|
-
meta: AuditLogEventMeta;
|
|
2779
|
+
can_access_cma: boolean;
|
|
2780
|
+
hardcoded_type: null | string;
|
|
2781
|
+
role: RoleData | null;
|
|
2808
2782
|
};
|
|
2783
|
+
export declare type AccessTokenCreateTargetSchema = AccessToken;
|
|
2784
|
+
export declare type AccessTokenUpdateTargetSchema = AccessToken;
|
|
2785
|
+
export declare type AccessTokenSelfTargetSchema = AccessToken;
|
|
2786
|
+
export declare type AccessTokenRegenerateTokenTargetSchema = AccessToken;
|
|
2787
|
+
export declare type AccessTokenDestroyTargetSchema = AccessToken;
|
|
2809
2788
|
/**
|
|
2810
|
-
* JSON API
|
|
2789
|
+
* JSON API data
|
|
2811
2790
|
*
|
|
2812
|
-
* This interface was referenced by `
|
|
2813
|
-
* via the `definition` "
|
|
2791
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
2792
|
+
* via the `definition` "data".
|
|
2814
2793
|
*/
|
|
2815
|
-
export declare type
|
|
2794
|
+
export declare type AccessTokenData = {
|
|
2795
|
+
type: AccessTokenType;
|
|
2796
|
+
id: AccessTokenIdentity;
|
|
2797
|
+
};
|
|
2798
|
+
/**
|
|
2799
|
+
* JSON API attributes
|
|
2800
|
+
*
|
|
2801
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
2802
|
+
* via the `definition` "attributes".
|
|
2803
|
+
*/
|
|
2804
|
+
export declare type AccessTokenAttributes = {
|
|
2816
2805
|
/**
|
|
2817
|
-
*
|
|
2806
|
+
* Name of API token
|
|
2818
2807
|
*/
|
|
2819
|
-
|
|
2808
|
+
name: string;
|
|
2809
|
+
/**
|
|
2810
|
+
* The actual API token (or null if the current user has no permission to read the token)
|
|
2811
|
+
*/
|
|
2812
|
+
token?: null | string;
|
|
2813
|
+
/**
|
|
2814
|
+
* Whether this API token can access the Content Delivery API published content endpoint
|
|
2815
|
+
*/
|
|
2816
|
+
can_access_cda: boolean;
|
|
2817
|
+
/**
|
|
2818
|
+
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
2819
|
+
*/
|
|
2820
|
+
can_access_cda_preview: boolean;
|
|
2821
|
+
/**
|
|
2822
|
+
* Whether this API token can access the Content Management API
|
|
2823
|
+
*/
|
|
2824
|
+
can_access_cma: boolean;
|
|
2825
|
+
hardcoded_type: null | string;
|
|
2826
|
+
};
|
|
2827
|
+
/**
|
|
2828
|
+
* JSON API links
|
|
2829
|
+
*
|
|
2830
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
2831
|
+
* via the `definition` "relationships".
|
|
2832
|
+
*/
|
|
2833
|
+
export declare type AccessTokenRelationships = {
|
|
2834
|
+
role: RoleData | null;
|
|
2835
|
+
};
|
|
2836
|
+
/**
|
|
2837
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
2838
|
+
* via the `create.schema` link.
|
|
2839
|
+
*/
|
|
2840
|
+
export declare type AccessTokenCreateSchema = {
|
|
2841
|
+
type?: AccessTokenType;
|
|
2842
|
+
/**
|
|
2843
|
+
* Name of API token
|
|
2844
|
+
*/
|
|
2845
|
+
name: string;
|
|
2846
|
+
/**
|
|
2847
|
+
* Whether this API token can access the Content Delivery API published content endpoint
|
|
2848
|
+
*/
|
|
2849
|
+
can_access_cda: boolean;
|
|
2850
|
+
/**
|
|
2851
|
+
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
2852
|
+
*/
|
|
2853
|
+
can_access_cda_preview: boolean;
|
|
2854
|
+
/**
|
|
2855
|
+
* Whether this API token can access the Content Management API
|
|
2856
|
+
*/
|
|
2857
|
+
can_access_cma: boolean;
|
|
2858
|
+
role: RoleData | null;
|
|
2859
|
+
};
|
|
2860
|
+
/**
|
|
2861
|
+
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
2862
|
+
* via the `update.schema` link.
|
|
2863
|
+
*/
|
|
2864
|
+
export declare type AccessTokenUpdateSchema = {
|
|
2865
|
+
id?: AccessTokenIdentity;
|
|
2866
|
+
type?: AccessTokenType;
|
|
2867
|
+
/**
|
|
2868
|
+
* Name of API token
|
|
2869
|
+
*/
|
|
2870
|
+
name: string;
|
|
2871
|
+
/**
|
|
2872
|
+
* Whether this API token can access the Content Delivery API published content endpoint
|
|
2873
|
+
*/
|
|
2874
|
+
can_access_cda: boolean;
|
|
2875
|
+
/**
|
|
2876
|
+
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
2877
|
+
*/
|
|
2878
|
+
can_access_cda_preview: boolean;
|
|
2879
|
+
/**
|
|
2880
|
+
* Whether this API token can access the Content Management API
|
|
2881
|
+
*/
|
|
2882
|
+
can_access_cma: boolean;
|
|
2883
|
+
role: RoleData | null;
|
|
2884
|
+
};
|
|
2885
|
+
/**
|
|
2886
|
+
* DatoCMS account
|
|
2887
|
+
*
|
|
2888
|
+
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
2889
|
+
* via the `definition` "account".
|
|
2890
|
+
*/
|
|
2891
|
+
export declare type Account = {
|
|
2892
|
+
id: AccountIdentity;
|
|
2893
|
+
type: AccountType;
|
|
2894
|
+
/**
|
|
2895
|
+
* Email
|
|
2896
|
+
*/
|
|
2897
|
+
email: string;
|
|
2898
|
+
/**
|
|
2899
|
+
* First name
|
|
2900
|
+
*/
|
|
2901
|
+
first_name: string | null;
|
|
2902
|
+
/**
|
|
2903
|
+
* Last name
|
|
2904
|
+
*/
|
|
2905
|
+
last_name: string | null;
|
|
2906
|
+
/**
|
|
2907
|
+
* Company name
|
|
2908
|
+
*/
|
|
2909
|
+
company: string | null;
|
|
2910
|
+
/**
|
|
2911
|
+
* Password
|
|
2912
|
+
*/
|
|
2913
|
+
password?: string;
|
|
2820
2914
|
};
|
|
2821
2915
|
/**
|
|
2822
2916
|
* JSON API data
|
|
2823
2917
|
*
|
|
2824
|
-
* This interface was referenced by `
|
|
2918
|
+
* This interface was referenced by `Account`'s JSON-Schema
|
|
2825
2919
|
* via the `definition` "data".
|
|
2826
2920
|
*/
|
|
2827
|
-
export declare type
|
|
2828
|
-
type:
|
|
2829
|
-
id:
|
|
2921
|
+
export declare type AccountData = {
|
|
2922
|
+
type: AccountType;
|
|
2923
|
+
id: AccountIdentity;
|
|
2830
2924
|
};
|
|
2831
2925
|
/**
|
|
2832
2926
|
* JSON API attributes
|
|
2833
2927
|
*
|
|
2834
|
-
* This interface was referenced by `
|
|
2928
|
+
* This interface was referenced by `Account`'s JSON-Schema
|
|
2835
2929
|
* via the `definition` "attributes".
|
|
2836
2930
|
*/
|
|
2837
|
-
export declare type
|
|
2931
|
+
export declare type AccountAttributes = {
|
|
2932
|
+
/**
|
|
2933
|
+
* Email
|
|
2934
|
+
*/
|
|
2935
|
+
email: string;
|
|
2936
|
+
/**
|
|
2937
|
+
* First name
|
|
2938
|
+
*/
|
|
2939
|
+
first_name: string | null;
|
|
2940
|
+
/**
|
|
2941
|
+
* Last name
|
|
2942
|
+
*/
|
|
2943
|
+
last_name: string | null;
|
|
2944
|
+
/**
|
|
2945
|
+
* Company name
|
|
2946
|
+
*/
|
|
2947
|
+
company: string | null;
|
|
2948
|
+
/**
|
|
2949
|
+
* Password
|
|
2950
|
+
*/
|
|
2951
|
+
password?: string;
|
|
2952
|
+
};
|
|
2953
|
+
/**
|
|
2954
|
+
* 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.
|
|
2955
|
+
*
|
|
2956
|
+
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
2957
|
+
* via the `definition` "audit_log_event".
|
|
2958
|
+
*/
|
|
2959
|
+
export declare type AuditLogEvent = {
|
|
2960
|
+
id: AuditLogEventIdentity;
|
|
2961
|
+
type: AuditLogEventType;
|
|
2838
2962
|
/**
|
|
2839
2963
|
* The actual action performed
|
|
2840
2964
|
*/
|
|
@@ -2920,96 +3044,144 @@ export declare type AuditLogEventAttributes = {
|
|
|
2920
3044
|
[k: string]: unknown;
|
|
2921
3045
|
};
|
|
2922
3046
|
};
|
|
3047
|
+
meta: AuditLogEventMeta;
|
|
2923
3048
|
};
|
|
2924
3049
|
/**
|
|
2925
|
-
*
|
|
2926
|
-
* via the `query.schema` link.
|
|
2927
|
-
*/
|
|
2928
|
-
export declare type AuditLogEventQuerySchema = {
|
|
2929
|
-
/**
|
|
2930
|
-
* JSON API type field
|
|
2931
|
-
*/
|
|
2932
|
-
type?: 'audit_log_query';
|
|
2933
|
-
/**
|
|
2934
|
-
* An SQL-like expression to filter the events
|
|
2935
|
-
*/
|
|
2936
|
-
filter?: string;
|
|
2937
|
-
/**
|
|
2938
|
-
* Set this value to get remaining results, if a meta.next_token was returned in the previous query response
|
|
2939
|
-
*/
|
|
2940
|
-
next_token?: string;
|
|
2941
|
-
/**
|
|
2942
|
-
* Whether a detailed log complete with full request and response payload must be returned or not
|
|
2943
|
-
*/
|
|
2944
|
-
detailed_log?: boolean;
|
|
2945
|
-
};
|
|
2946
|
-
/**
|
|
2947
|
-
* DatoCMS account
|
|
3050
|
+
* JSON API meta
|
|
2948
3051
|
*
|
|
2949
|
-
* This interface was referenced by `
|
|
2950
|
-
* via the `definition` "
|
|
3052
|
+
* This interface was referenced by `AuditLogEvent`'s JSON-Schema
|
|
3053
|
+
* via the `definition` "meta".
|
|
2951
3054
|
*/
|
|
2952
|
-
export declare type
|
|
2953
|
-
id: AccountIdentity;
|
|
2954
|
-
type: AccountType;
|
|
2955
|
-
/**
|
|
2956
|
-
* Email
|
|
2957
|
-
*/
|
|
2958
|
-
email: string;
|
|
2959
|
-
/**
|
|
2960
|
-
* First name
|
|
2961
|
-
*/
|
|
2962
|
-
first_name: string | null;
|
|
2963
|
-
/**
|
|
2964
|
-
* Last name
|
|
2965
|
-
*/
|
|
2966
|
-
last_name: string | null;
|
|
2967
|
-
/**
|
|
2968
|
-
* Company name
|
|
2969
|
-
*/
|
|
2970
|
-
company: string | null;
|
|
3055
|
+
export declare type AuditLogEventMeta = {
|
|
2971
3056
|
/**
|
|
2972
|
-
*
|
|
3057
|
+
* The date of the event
|
|
2973
3058
|
*/
|
|
2974
|
-
|
|
3059
|
+
occurred_at: string;
|
|
2975
3060
|
};
|
|
2976
3061
|
/**
|
|
2977
3062
|
* JSON API data
|
|
2978
3063
|
*
|
|
2979
|
-
* This interface was referenced by `
|
|
3064
|
+
* This interface was referenced by `AuditLogEvent`'s JSON-Schema
|
|
2980
3065
|
* via the `definition` "data".
|
|
2981
3066
|
*/
|
|
2982
|
-
export declare type
|
|
2983
|
-
type:
|
|
2984
|
-
id:
|
|
3067
|
+
export declare type AuditLogEventData = {
|
|
3068
|
+
type: AuditLogEventType;
|
|
3069
|
+
id: AuditLogEventIdentity;
|
|
2985
3070
|
};
|
|
2986
3071
|
/**
|
|
2987
3072
|
* JSON API attributes
|
|
2988
3073
|
*
|
|
2989
|
-
* This interface was referenced by `
|
|
3074
|
+
* This interface was referenced by `AuditLogEvent`'s JSON-Schema
|
|
2990
3075
|
* via the `definition` "attributes".
|
|
2991
3076
|
*/
|
|
2992
|
-
export declare type
|
|
2993
|
-
/**
|
|
2994
|
-
* Email
|
|
2995
|
-
*/
|
|
2996
|
-
email: string;
|
|
3077
|
+
export declare type AuditLogEventAttributes = {
|
|
2997
3078
|
/**
|
|
2998
|
-
*
|
|
3079
|
+
* The actual action performed
|
|
2999
3080
|
*/
|
|
3000
|
-
|
|
3081
|
+
action_name: string;
|
|
3001
3082
|
/**
|
|
3002
|
-
*
|
|
3083
|
+
* The actor who performed the action
|
|
3003
3084
|
*/
|
|
3004
|
-
|
|
3085
|
+
actor: {
|
|
3086
|
+
/**
|
|
3087
|
+
* The type of actor (can be `account`, `user`, `sso_user` or `access_token`)
|
|
3088
|
+
*/
|
|
3089
|
+
type: string;
|
|
3090
|
+
/**
|
|
3091
|
+
* The ID of the actor
|
|
3092
|
+
*/
|
|
3093
|
+
id: string;
|
|
3094
|
+
/**
|
|
3095
|
+
* An human representation of the actor (name/email/username depending on the type of actor)
|
|
3096
|
+
*/
|
|
3097
|
+
name: string;
|
|
3098
|
+
};
|
|
3005
3099
|
/**
|
|
3006
|
-
*
|
|
3100
|
+
* The role of the actor at the time the action was performed
|
|
3007
3101
|
*/
|
|
3008
|
-
|
|
3102
|
+
role: null | {
|
|
3103
|
+
/**
|
|
3104
|
+
* The name of the role
|
|
3105
|
+
*/
|
|
3106
|
+
name: string;
|
|
3107
|
+
/**
|
|
3108
|
+
* The ID of the role
|
|
3109
|
+
*/
|
|
3110
|
+
id: string;
|
|
3111
|
+
};
|
|
3009
3112
|
/**
|
|
3010
|
-
*
|
|
3113
|
+
* The environment inside of which the action was performed
|
|
3011
3114
|
*/
|
|
3012
|
-
|
|
3115
|
+
environment: {
|
|
3116
|
+
/**
|
|
3117
|
+
* The ID of the environment
|
|
3118
|
+
*/
|
|
3119
|
+
id: string;
|
|
3120
|
+
/**
|
|
3121
|
+
* Whether the environment was the primary one at the time the action was performed
|
|
3122
|
+
*/
|
|
3123
|
+
primary: boolean;
|
|
3124
|
+
};
|
|
3125
|
+
/**
|
|
3126
|
+
* The actual request being performed
|
|
3127
|
+
*/
|
|
3128
|
+
request: {
|
|
3129
|
+
/**
|
|
3130
|
+
* The full path of the request
|
|
3131
|
+
*/
|
|
3132
|
+
path: string;
|
|
3133
|
+
/**
|
|
3134
|
+
* The HTTP method of the request
|
|
3135
|
+
*/
|
|
3136
|
+
method: string;
|
|
3137
|
+
/**
|
|
3138
|
+
* The X-Request-ID header of the request
|
|
3139
|
+
*/
|
|
3140
|
+
id?: string;
|
|
3141
|
+
/**
|
|
3142
|
+
* The full HTTP body of the request
|
|
3143
|
+
*/
|
|
3144
|
+
payload?: null | {
|
|
3145
|
+
[k: string]: unknown;
|
|
3146
|
+
};
|
|
3147
|
+
};
|
|
3148
|
+
/**
|
|
3149
|
+
* The actual response being returned by DatoCMS
|
|
3150
|
+
*/
|
|
3151
|
+
response: null | {
|
|
3152
|
+
/**
|
|
3153
|
+
* The HTTP status code of the response
|
|
3154
|
+
*/
|
|
3155
|
+
status: number;
|
|
3156
|
+
/**
|
|
3157
|
+
* The full HTTP body of the response
|
|
3158
|
+
*/
|
|
3159
|
+
payload: {
|
|
3160
|
+
[k: string]: unknown;
|
|
3161
|
+
};
|
|
3162
|
+
};
|
|
3163
|
+
};
|
|
3164
|
+
/**
|
|
3165
|
+
* This interface was referenced by `AuditLogEvent`'s JSON-Schema
|
|
3166
|
+
* via the `query.schema` link.
|
|
3167
|
+
*/
|
|
3168
|
+
export declare type AuditLogEventQuerySchema = {
|
|
3169
|
+
/**
|
|
3170
|
+
* JSON API type field
|
|
3171
|
+
*/
|
|
3172
|
+
type?: 'audit_log_query';
|
|
3173
|
+
/**
|
|
3174
|
+
* An SQL-like expression to filter the events
|
|
3175
|
+
*/
|
|
3176
|
+
filter?: string;
|
|
3177
|
+
/**
|
|
3178
|
+
* Set this value to get remaining results, if a meta.next_token was returned in the previous query response
|
|
3179
|
+
*/
|
|
3180
|
+
next_token?: string;
|
|
3181
|
+
/**
|
|
3182
|
+
* Whether a detailed log complete with full request and response payload must be returned or not
|
|
3183
|
+
*/
|
|
3184
|
+
detailed_log?: boolean;
|
|
3013
3185
|
};
|
|
3014
3186
|
/**
|
|
3015
3187
|
* Stores the information regarding the current plan for the project.
|
|
@@ -3641,6 +3813,7 @@ export declare type ItemType = {
|
|
|
3641
3813
|
hint: string | null;
|
|
3642
3814
|
singleton_item: ItemData | null;
|
|
3643
3815
|
fields: FieldData[];
|
|
3816
|
+
fieldsets: FieldsetData[];
|
|
3644
3817
|
title_field: FieldData | null;
|
|
3645
3818
|
image_preview_field: FieldData | null;
|
|
3646
3819
|
excerpt_field: FieldData | null;
|
|
@@ -3672,6 +3845,16 @@ export declare type FieldData = {
|
|
|
3672
3845
|
type: FieldType;
|
|
3673
3846
|
id: FieldIdentity;
|
|
3674
3847
|
};
|
|
3848
|
+
/**
|
|
3849
|
+
* JSON API data
|
|
3850
|
+
*
|
|
3851
|
+
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
3852
|
+
* via the `definition` "data".
|
|
3853
|
+
*/
|
|
3854
|
+
export declare type FieldsetData = {
|
|
3855
|
+
type: FieldsetType;
|
|
3856
|
+
id: FieldsetIdentity;
|
|
3857
|
+
};
|
|
3675
3858
|
/**
|
|
3676
3859
|
* JSON API data
|
|
3677
3860
|
*
|
|
@@ -3755,6 +3938,7 @@ export declare type ItemTypeAttributes = {
|
|
|
3755
3938
|
export declare type ItemTypeRelationships = {
|
|
3756
3939
|
singleton_item: ItemData | null;
|
|
3757
3940
|
fields: FieldData[];
|
|
3941
|
+
fieldsets: FieldsetData[];
|
|
3758
3942
|
title_field: FieldData | null;
|
|
3759
3943
|
image_preview_field: FieldData | null;
|
|
3760
3944
|
excerpt_field: FieldData | null;
|
|
@@ -3898,118 +4082,950 @@ export declare type ItemTypeUpdateSchema = {
|
|
|
3898
4082
|
* This interface was referenced by `ItemType`'s JSON-Schema
|
|
3899
4083
|
* via the `update.targetSchema` link.
|
|
3900
4084
|
*
|
|
3901
|
-
* This interface was referenced by `ItemType`'s JSON-Schema
|
|
3902
|
-
* via the `destroy.targetSchema` link.
|
|
4085
|
+
* This interface was referenced by `ItemType`'s JSON-Schema
|
|
4086
|
+
* via the `destroy.targetSchema` link.
|
|
4087
|
+
*
|
|
4088
|
+
* This interface was referenced by `Field`'s JSON-Schema
|
|
4089
|
+
* via the `create.targetSchema` link.
|
|
4090
|
+
*
|
|
4091
|
+
* This interface was referenced by `Field`'s JSON-Schema
|
|
4092
|
+
* via the `update.targetSchema` link.
|
|
4093
|
+
*
|
|
4094
|
+
* This interface was referenced by `Field`'s JSON-Schema
|
|
4095
|
+
* via the `destroy.targetSchema` link.
|
|
4096
|
+
*
|
|
4097
|
+
* This interface was referenced by `Field`'s JSON-Schema
|
|
4098
|
+
* via the `duplicate.targetSchema` link.
|
|
4099
|
+
*
|
|
4100
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4101
|
+
* via the `duplicate.targetSchema` link.
|
|
4102
|
+
*
|
|
4103
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4104
|
+
* via the `destroy.targetSchema` link.
|
|
4105
|
+
*
|
|
4106
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4107
|
+
* via the `batch_destroy.targetSchema` link.
|
|
4108
|
+
*
|
|
4109
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4110
|
+
* via the `batch_publish.targetSchema` link.
|
|
4111
|
+
*
|
|
4112
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4113
|
+
* via the `batch_unpublish.targetSchema` link.
|
|
4114
|
+
*
|
|
4115
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4116
|
+
* via the `bulk_publish.targetSchema` link.
|
|
4117
|
+
*
|
|
4118
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4119
|
+
* via the `bulk_unpublish.targetSchema` link.
|
|
4120
|
+
*
|
|
4121
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4122
|
+
* via the `bulk_destroy.targetSchema` link.
|
|
4123
|
+
*
|
|
4124
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
4125
|
+
* via the `bulk_move_to_stage.targetSchema` link.
|
|
4126
|
+
*
|
|
4127
|
+
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
4128
|
+
* via the `restore.targetSchema` link.
|
|
4129
|
+
*
|
|
4130
|
+
* This interface was referenced by `Upload`'s JSON-Schema
|
|
4131
|
+
* via the `create.targetSchema` link.
|
|
4132
|
+
*
|
|
4133
|
+
* This interface was referenced by `Upload`'s JSON-Schema
|
|
4134
|
+
* via the `update.targetSchema` link.
|
|
4135
|
+
*
|
|
4136
|
+
* This interface was referenced by `Upload`'s JSON-Schema
|
|
4137
|
+
* via the `batch_add_tags.targetSchema` link.
|
|
4138
|
+
*
|
|
4139
|
+
* This interface was referenced by `Upload`'s JSON-Schema
|
|
4140
|
+
* via the `batch_destroy.targetSchema` link.
|
|
4141
|
+
*
|
|
4142
|
+
* This interface was referenced by `Upload`'s JSON-Schema
|
|
4143
|
+
* via the `bulk_tag.targetSchema` link.
|
|
4144
|
+
*
|
|
4145
|
+
* This interface was referenced by `Upload`'s JSON-Schema
|
|
4146
|
+
* via the `bulk_destroy.targetSchema` link.
|
|
4147
|
+
*
|
|
4148
|
+
* This interface was referenced by `Site`'s JSON-Schema
|
|
4149
|
+
* via the `update.targetSchema` link.
|
|
4150
|
+
*
|
|
4151
|
+
* This interface was referenced by `Site`'s JSON-Schema
|
|
4152
|
+
* via the `activate_improved_timezone_management.targetSchema` link.
|
|
4153
|
+
*
|
|
4154
|
+
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
4155
|
+
* via the `definition` "job".
|
|
4156
|
+
*/
|
|
4157
|
+
export declare type Job = {
|
|
4158
|
+
id: JobIdentity;
|
|
4159
|
+
type: JobType;
|
|
4160
|
+
};
|
|
4161
|
+
export declare type ItemTypeUpdateTargetSchema = Job;
|
|
4162
|
+
export declare type ItemTypeDestroyTargetSchema = Job;
|
|
4163
|
+
export declare type FieldCreateTargetSchema = Job;
|
|
4164
|
+
export declare type FieldUpdateTargetSchema = Job;
|
|
4165
|
+
export declare type FieldDestroyTargetSchema = Job;
|
|
4166
|
+
export declare type FieldDuplicateTargetSchema = Job;
|
|
4167
|
+
export declare type ItemDuplicateTargetSchema = Job;
|
|
4168
|
+
export declare type ItemDestroyTargetSchema = Job;
|
|
4169
|
+
export declare type ItemBatchDestroyTargetSchema = Job;
|
|
4170
|
+
export declare type ItemBatchPublishTargetSchema = Job;
|
|
4171
|
+
export declare type ItemBatchUnpublishTargetSchema = Job;
|
|
4172
|
+
export declare type ItemBulkPublishTargetSchema = Job;
|
|
4173
|
+
export declare type ItemBulkUnpublishTargetSchema = Job;
|
|
4174
|
+
export declare type ItemBulkDestroyTargetSchema = Job;
|
|
4175
|
+
export declare type ItemBulkMoveToStageTargetSchema = Job;
|
|
4176
|
+
export declare type ItemVersionRestoreTargetSchema = Job;
|
|
4177
|
+
export declare type UploadCreateTargetSchema = Job;
|
|
4178
|
+
export declare type UploadUpdateTargetSchema = Job;
|
|
4179
|
+
export declare type UploadBatchAddTagsTargetSchema = Job;
|
|
4180
|
+
export declare type UploadBatchDestroyTargetSchema = Job;
|
|
4181
|
+
export declare type UploadBulkTagTargetSchema = Job;
|
|
4182
|
+
export declare type UploadBulkDestroyTargetSchema = Job;
|
|
4183
|
+
export declare type SiteUpdateTargetSchema = Job;
|
|
4184
|
+
export declare type SiteActivateImprovedTimezoneManagementTargetSchema = Job;
|
|
4185
|
+
/**
|
|
4186
|
+
* JSON API data
|
|
4187
|
+
*
|
|
4188
|
+
* This interface was referenced by `Job`'s JSON-Schema
|
|
4189
|
+
* via the `definition` "data".
|
|
4190
|
+
*/
|
|
4191
|
+
export declare type JobData = {
|
|
4192
|
+
type: JobType;
|
|
4193
|
+
id: JobIdentity;
|
|
4194
|
+
};
|
|
4195
|
+
/**
|
|
4196
|
+
* 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.
|
|
4197
|
+
*
|
|
4198
|
+
* ### Different field types require different settings
|
|
4199
|
+
*
|
|
4200
|
+
* When looking at a field resource, you have to pay attention to two particular properties, `validators` and `appearance`.
|
|
4201
|
+
*
|
|
4202
|
+
* 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.
|
|
4203
|
+
*
|
|
4204
|
+
* 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.
|
|
4205
|
+
*
|
|
4206
|
+
* ### Specifying validations
|
|
4207
|
+
*
|
|
4208
|
+
* 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.
|
|
4209
|
+
*
|
|
4210
|
+
* This is a valid example for a _Single-line string_ field:
|
|
4211
|
+
*
|
|
4212
|
+
* ```js
|
|
4213
|
+
* {
|
|
4214
|
+
* "validators": {
|
|
4215
|
+
* // "required" validator has no settings
|
|
4216
|
+
* "required": {},
|
|
4217
|
+
* // "length" validator requires "min" and/or "max" properties
|
|
4218
|
+
* "length": { "min": 80 }
|
|
4219
|
+
* }
|
|
4220
|
+
* }
|
|
4221
|
+
* ```
|
|
4222
|
+
*
|
|
4223
|
+
* Below you'll find a summary of all the validators available for each field type with their settings.
|
|
4224
|
+
*
|
|
4225
|
+
* 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.
|
|
4226
|
+
*
|
|
4227
|
+
* ### Specifying the appearance
|
|
4228
|
+
*
|
|
4229
|
+
* The `appearance` property requires an object with three specific properties: `editor`, `parameters` and `addons`.
|
|
4230
|
+
*
|
|
4231
|
+
* 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.
|
|
4232
|
+
*
|
|
4233
|
+
* This is a valid example for a _Single-line string_ field:
|
|
4234
|
+
*
|
|
4235
|
+
* ```js
|
|
4236
|
+
* {
|
|
4237
|
+
* "appearance": {
|
|
4238
|
+
* // single_line is a DatoCMS built-in editor that you can use with single-line string fields
|
|
4239
|
+
* "editor": "single_line",
|
|
4240
|
+
* // each built-in editor has specific settings
|
|
4241
|
+
* "parameters": { "heading": true },
|
|
4242
|
+
* "addons": []
|
|
4243
|
+
* },
|
|
4244
|
+
* }
|
|
4245
|
+
* ```
|
|
4246
|
+
*
|
|
4247
|
+
* Following you'll find a summary of all the editors available for each field type with their settings.
|
|
4248
|
+
*
|
|
4249
|
+
* #### Setting the appearance to a field editor provided by a plugin
|
|
4250
|
+
*
|
|
4251
|
+
* 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.
|
|
4252
|
+
*
|
|
4253
|
+
* In this case:
|
|
4254
|
+
*
|
|
4255
|
+
* - the `editor` property must be the ID of the plugin;
|
|
4256
|
+
* - the `field_extension` property must be the ID of the specific manual field editor that the plugin exposes;
|
|
4257
|
+
* - 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.
|
|
4258
|
+
*
|
|
4259
|
+
* ```js
|
|
4260
|
+
* {
|
|
4261
|
+
* "appearance": {
|
|
4262
|
+
* // "2132" is a the ID of a plugin exposing a manual field editor
|
|
4263
|
+
* "editor": "2134",
|
|
4264
|
+
* // "starRating" is a manual field editor exposed by the plugin
|
|
4265
|
+
* "field_extension": "starRating",
|
|
4266
|
+
* // this is a valid configuration for the "starRating" field editor
|
|
4267
|
+
* "parameters": { "maxRating": 5, "starsColor": "#ff0000" },
|
|
4268
|
+
* "addons": []
|
|
4269
|
+
* },
|
|
4270
|
+
* }
|
|
4271
|
+
* ```
|
|
4272
|
+
*
|
|
4273
|
+
* #### Configuring manual field addons
|
|
4274
|
+
*
|
|
4275
|
+
* 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.
|
|
4276
|
+
*
|
|
4277
|
+
* ```js
|
|
4278
|
+
* {
|
|
4279
|
+
* "appearance": {
|
|
4280
|
+
* "editor": "single_line",
|
|
4281
|
+
* "parameters": { "heading": true },
|
|
4282
|
+
* "addons": [
|
|
4283
|
+
* {
|
|
4284
|
+
* // "2138" is a the ID of a plugin exposing a manual addon editor
|
|
4285
|
+
* "id": "2138",
|
|
4286
|
+
* // "loremIpsumGenerator" is a manual field addon exposed by the plugin
|
|
4287
|
+
* "field_extension": "loremIpsumGenerator",
|
|
4288
|
+
* // this is a valid configuration for the "loremIpsumGenerator" field addon
|
|
4289
|
+
* "parameters": { "sentences": 2 },
|
|
4290
|
+
* }
|
|
4291
|
+
* ]
|
|
4292
|
+
* },
|
|
4293
|
+
* }
|
|
4294
|
+
* ```
|
|
4295
|
+
*
|
|
4296
|
+
* ### Available field types
|
|
4297
|
+
*
|
|
4298
|
+
* <details>
|
|
4299
|
+
* <summary>Single-line string (<code>string</code>)</summary>
|
|
4300
|
+
*
|
|
4301
|
+
* | Property | Value |
|
|
4302
|
+
* | ------------------------------ | ---------------------------------------------------- |
|
|
4303
|
+
* | Code | `string` |
|
|
4304
|
+
* | Built-in editors for the field | `single_line`, `string_radio_group`, `string_select` |
|
|
4305
|
+
* | Available validators | `required`, `unique`, `length`, `format`, `enum` |
|
|
4306
|
+
*
|
|
4307
|
+
* </details>
|
|
4308
|
+
*
|
|
4309
|
+
* <details>
|
|
4310
|
+
* <summary>Multi-line text (<code>text</code>)</summary>
|
|
4311
|
+
*
|
|
4312
|
+
* | Property | Value |
|
|
4313
|
+
* | ------------------------------ | --------------------------------- |
|
|
4314
|
+
* | Code | `text` |
|
|
4315
|
+
* | Built-in editors for the field | `markdown`, `wysiwyg`, `textarea` |
|
|
4316
|
+
* | Available validators | `required`, `length`, `format` |
|
|
4317
|
+
*
|
|
4318
|
+
* </details>
|
|
4319
|
+
*
|
|
4320
|
+
* <details>
|
|
4321
|
+
* <summary>Boolean (<code>boolean</code>)</summary>
|
|
4322
|
+
*
|
|
4323
|
+
* | Property | Value |
|
|
4324
|
+
* | ------------------------------ | -------------------------------- |
|
|
4325
|
+
* | Code | `boolean` |
|
|
4326
|
+
* | Built-in editors for the field | `boolean`, `boolean_radio_group` |
|
|
4327
|
+
* | Available validators | no validators available |
|
|
4328
|
+
*
|
|
4329
|
+
* </details>
|
|
4330
|
+
*
|
|
4331
|
+
* <details>
|
|
4332
|
+
* <summary>Integer (<code>integer</code>)</summary>
|
|
4333
|
+
*
|
|
4334
|
+
* | Property | Value |
|
|
4335
|
+
* | ------------------------------ | -------------------------- |
|
|
4336
|
+
* | Code | `integer` |
|
|
4337
|
+
* | Built-in editors for the field | `integer` |
|
|
4338
|
+
* | Available validators | `required`, `number_range` |
|
|
4339
|
+
*
|
|
4340
|
+
* </details>
|
|
4341
|
+
*
|
|
4342
|
+
* <details>
|
|
4343
|
+
* <summary>Float (<code>float</code>)</summary>
|
|
4344
|
+
*
|
|
4345
|
+
* | Property | Value |
|
|
4346
|
+
* | ------------------------------ | -------------------------- |
|
|
4347
|
+
* | Code | `float` |
|
|
4348
|
+
* | Built-in editors for the field | `float` |
|
|
4349
|
+
* | Available validators | `required`, `number_range` |
|
|
4350
|
+
*
|
|
4351
|
+
* </details>
|
|
4352
|
+
*
|
|
4353
|
+
* <details>
|
|
4354
|
+
* <summary>Date (<code>date</code>)</summary>
|
|
4355
|
+
*
|
|
4356
|
+
* | Property | Value |
|
|
4357
|
+
* | ------------------------------ | ------------------------ |
|
|
4358
|
+
* | Code | `date` |
|
|
4359
|
+
* | Built-in editors for the field | `date_picker` |
|
|
4360
|
+
* | Available validators | `required`, `date_range` |
|
|
4361
|
+
*
|
|
4362
|
+
* </details>
|
|
4363
|
+
*
|
|
4364
|
+
* <details>
|
|
4365
|
+
* <summary>Date time (<code>date_time</code>)</summary>
|
|
4366
|
+
*
|
|
4367
|
+
* | Property | Value |
|
|
4368
|
+
* | ------------------------------ | ----------------------------- |
|
|
4369
|
+
* | Code | `date_time` |
|
|
4370
|
+
* | Built-in editors for the field | `date_time_picker` |
|
|
4371
|
+
* | Available validators | `required`, `date_time_range` |
|
|
4372
|
+
*
|
|
4373
|
+
* </details>
|
|
4374
|
+
*
|
|
4375
|
+
* <details>
|
|
4376
|
+
* <summary>Color (<code>color</code>)</summary>
|
|
4377
|
+
*
|
|
4378
|
+
* | Property | Value |
|
|
4379
|
+
* | ------------------------------ | -------------- |
|
|
4380
|
+
* | Code | `color` |
|
|
4381
|
+
* | Built-in editors for the field | `color_picker` |
|
|
4382
|
+
* | Available validators | `required` |
|
|
4383
|
+
*
|
|
4384
|
+
* </details>
|
|
4385
|
+
*
|
|
4386
|
+
* <details>
|
|
4387
|
+
* <summary>JSON (<code>json</code>)</summary>
|
|
4388
|
+
*
|
|
4389
|
+
* | Property | Value |
|
|
4390
|
+
* | ------------------------------ | ------------------------------------------------------ |
|
|
4391
|
+
* | Code | `json` |
|
|
4392
|
+
* | Built-in editors for the field | `json`, `string_multi_select`, `string_checkbox_group` |
|
|
4393
|
+
* | Available validators | `required` |
|
|
4394
|
+
*
|
|
4395
|
+
* </details>
|
|
4396
|
+
*
|
|
4397
|
+
* <details>
|
|
4398
|
+
* <summary>Location (<code>lat_lon</code>)</summary>
|
|
4399
|
+
*
|
|
4400
|
+
* | Property | Value |
|
|
4401
|
+
* | ------------------------------ | ---------- |
|
|
4402
|
+
* | Code | `lat_lon` |
|
|
4403
|
+
* | Built-in editors for the field | `map` |
|
|
4404
|
+
* | Available validators | `required` |
|
|
4405
|
+
*
|
|
4406
|
+
* </details>
|
|
4407
|
+
*
|
|
4408
|
+
* <details>
|
|
4409
|
+
* <summary>SEO (<code>seo</code>)</summary>
|
|
4410
|
+
*
|
|
4411
|
+
* | Property | Value |
|
|
4412
|
+
* | ------------------------------ | -------------------------------------------------------------------------------------------- |
|
|
4413
|
+
* | Code | `seo` |
|
|
4414
|
+
* | Built-in editors for the field | `seo` |
|
|
4415
|
+
* | Available validators | `required_seo_fields`, `file_size`, `image_dimensions`, `title_length`, `description_length` |
|
|
4416
|
+
*
|
|
4417
|
+
* </details>
|
|
4418
|
+
*
|
|
4419
|
+
* <details>
|
|
4420
|
+
* <summary>Slug (<code>slug</code>)</summary>
|
|
4421
|
+
*
|
|
4422
|
+
* | Property | Value |
|
|
4423
|
+
* | ------------------------------ | ----------------------------------- |
|
|
4424
|
+
* | Code | `slug` |
|
|
4425
|
+
* | Built-in editors for the field | `slug` |
|
|
4426
|
+
* | Required validators | `slug_title_field` |
|
|
4427
|
+
* | Other validators available | `required`, `length`, `slug_format` |
|
|
4428
|
+
*
|
|
4429
|
+
* </details>
|
|
4430
|
+
*
|
|
4431
|
+
* <details>
|
|
4432
|
+
* <summary>External video (<code>video</code>)</summary>
|
|
4433
|
+
*
|
|
4434
|
+
* | Property | Value |
|
|
4435
|
+
* | ------------------------------ | ---------- |
|
|
4436
|
+
* | Code | `video` |
|
|
4437
|
+
* | Built-in editors for the field | `video` |
|
|
4438
|
+
* | Available validators | `required` |
|
|
4439
|
+
*
|
|
4440
|
+
* </details>
|
|
4441
|
+
*
|
|
4442
|
+
* <details>
|
|
4443
|
+
* <summary>Single-asset (<code>file</code>)</summary>
|
|
4444
|
+
*
|
|
4445
|
+
* | Property | Value |
|
|
4446
|
+
* | ------------------------------ | ------------------------------------------------------------------------------ |
|
|
4447
|
+
* | Code | `file` |
|
|
4448
|
+
* | Built-in editors for the field | `file` |
|
|
4449
|
+
* | Available validators | `required`, `file_size`, `image_dimensions`, `extension`, `required_alt_title` |
|
|
4450
|
+
*
|
|
4451
|
+
* </details>
|
|
4452
|
+
*
|
|
4453
|
+
* <details>
|
|
4454
|
+
* <summary>Asset gallery (<code>gallery</code>)</summary>
|
|
4455
|
+
*
|
|
4456
|
+
* | Property | Value |
|
|
4457
|
+
* | ------------------------------ | -------------------------------------------------------------------------- |
|
|
4458
|
+
* | Code | `gallery` |
|
|
4459
|
+
* | Built-in editors for the field | `gallery` |
|
|
4460
|
+
* | Available validators | `size`, `file_size`, `image_dimensions`, `extension`, `required_alt_title` |
|
|
4461
|
+
*
|
|
4462
|
+
* </details>
|
|
4463
|
+
*
|
|
4464
|
+
* <details>
|
|
4465
|
+
* <summary>Single link (<code>link</code>)</summary>
|
|
4466
|
+
*
|
|
4467
|
+
* | Property | Value |
|
|
4468
|
+
* | ------------------------------ | --------------------------- |
|
|
4469
|
+
* | Code | `link` |
|
|
4470
|
+
* | Built-in editors for the field | `link_select`, `link_embed` |
|
|
4471
|
+
* | Default `editor` | `link_select` |
|
|
4472
|
+
* | Required validators | `item_item_type` |
|
|
4473
|
+
* | Other validators available | `required`, `unique` |
|
|
4474
|
+
*
|
|
4475
|
+
* </details>
|
|
4476
|
+
*
|
|
4477
|
+
* <details>
|
|
4478
|
+
* <summary>Multiple links (<code>links</code>)</summary>
|
|
4479
|
+
*
|
|
4480
|
+
* | Property | Value |
|
|
4481
|
+
* | ------------------------------ | ----------------------------- |
|
|
4482
|
+
* | Code | `links` |
|
|
4483
|
+
* | Built-in editors for the field | `links_select`, `links_embed` |
|
|
4484
|
+
* | Default `editor` | `links_select` |
|
|
4485
|
+
* | Required validators | `items_item_type` |
|
|
4486
|
+
* | Other validators available | `size` |
|
|
4487
|
+
*
|
|
4488
|
+
* </details>
|
|
4489
|
+
*
|
|
4490
|
+
* <details>
|
|
4491
|
+
* <summary>Modular content (<code>rich_text</code>)</summary>
|
|
4492
|
+
*
|
|
4493
|
+
* | Property | Value |
|
|
4494
|
+
* | ------------------------------ | ------------------ |
|
|
4495
|
+
* | Code | `rich_text` |
|
|
4496
|
+
* | Built-in editors for the field | `rich_text` |
|
|
4497
|
+
* | Required validators | `rich_text_blocks` |
|
|
4498
|
+
* | Other validators available | `size` |
|
|
4499
|
+
*
|
|
4500
|
+
* </details>
|
|
4501
|
+
*
|
|
4502
|
+
* <details>
|
|
4503
|
+
* <summary>Structured text (<code>structured_text</code>)</summary>
|
|
4504
|
+
*
|
|
4505
|
+
* | Property | Value |
|
|
4506
|
+
* | ------------------------------ | ------------------------------------------------- |
|
|
4507
|
+
* | Code | `structured_text` |
|
|
4508
|
+
* | Built-in editors for the field | `structured_text` |
|
|
4509
|
+
* | Required validators | `structured_text_blocks`, `structured_text_links` |
|
|
4510
|
+
* | Other validators available | `length` |
|
|
4511
|
+
*
|
|
4512
|
+
* </details>
|
|
4513
|
+
*
|
|
4514
|
+
* ### Validators
|
|
4515
|
+
*
|
|
4516
|
+
* <details>
|
|
4517
|
+
* <summary><code>date_range</code></summary>
|
|
4518
|
+
*
|
|
4519
|
+
* Accept dates only inside a specified date range.
|
|
4520
|
+
*
|
|
4521
|
+
* | Parameter | Type | Required | Description |
|
|
4522
|
+
* | --------- | ------------- | -------- | ------------ |
|
|
4523
|
+
* | `min` | ISO 8601 date | | Minimum date |
|
|
4524
|
+
* | `max` | ISO 8601 date | | Maximum date |
|
|
4525
|
+
*
|
|
4526
|
+
* At least one of the parameters must be specified.
|
|
4527
|
+
*
|
|
4528
|
+
* </details>
|
|
4529
|
+
*
|
|
4530
|
+
* <details>
|
|
4531
|
+
* <summary><code>date_time_range</code></summary>
|
|
4532
|
+
*
|
|
4533
|
+
* Accept date times only inside a specified date range.
|
|
4534
|
+
*
|
|
4535
|
+
* | Parameter | Type | Required | Description |
|
|
4536
|
+
* | --------- | ----------------- | -------- | ---------------- |
|
|
4537
|
+
* | `min` | ISO 8601 datetime | | Minimum datetime |
|
|
4538
|
+
* | `max` | ISO 8601 datetime | | Maximum datetime |
|
|
4539
|
+
*
|
|
4540
|
+
* At least one of the parameters must be specified.
|
|
4541
|
+
*
|
|
4542
|
+
* </details>
|
|
4543
|
+
*
|
|
4544
|
+
* <details>
|
|
4545
|
+
* <summary><code>enum</code></summary>
|
|
4546
|
+
*
|
|
4547
|
+
* Only accept a specific set of values
|
|
4548
|
+
*
|
|
4549
|
+
* | Parameter | Type | Required | Description |
|
|
4550
|
+
* | --------- | --------------- | -------- | --------------------- |
|
|
4551
|
+
* | `values` | `Array<String>` | ✅ | Set of allowed values |
|
|
4552
|
+
*
|
|
4553
|
+
* </details>
|
|
4554
|
+
*
|
|
4555
|
+
* <details>
|
|
4556
|
+
* <summary><code>extension</code></summary>
|
|
4557
|
+
*
|
|
4558
|
+
* Only accept assets with specific file extensions.
|
|
4559
|
+
*
|
|
4560
|
+
* | Parameter | Type | Required | Description |
|
|
4561
|
+
* | ----------------- | ----------------------------------------- | -------- | ------------------------------ |
|
|
4562
|
+
* | `extensions` | `Array<String>` | | Set of allowed file extensions |
|
|
4563
|
+
* | `predefined_list` | one of `"image"`, `"video"`, `"document"` | | Allowed file type |
|
|
4564
|
+
*
|
|
4565
|
+
* Only one of the parameters must be specified.
|
|
4566
|
+
*
|
|
4567
|
+
* </details>
|
|
4568
|
+
*
|
|
4569
|
+
* <details>
|
|
4570
|
+
* <summary><code>file_size</code></summary>
|
|
4571
|
+
*
|
|
4572
|
+
* Accept assets only inside a specified date range.
|
|
4573
|
+
*
|
|
4574
|
+
* | Parameter | Type | Required | Description |
|
|
4575
|
+
* | ----------- | ---------------------------- | -------- | ---------------------------------- |
|
|
4576
|
+
* | `min_value` | `Integer` | | Numeric value for minimum filesize |
|
|
4577
|
+
* | `min_unit` | one of `"B"`, `"KB"`, `"MB"` | | Unit for minimum filesize |
|
|
4578
|
+
* | `max_value` | `Integer` | | Numeric value for maximum filesize |
|
|
4579
|
+
* | `max_unit` | one of `"B"`, `"KB"`, `"MB"` | | Unit for maximum filesize |
|
|
4580
|
+
*
|
|
4581
|
+
* At least one couple of value/unit must be specified.
|
|
4582
|
+
*
|
|
4583
|
+
* </details>
|
|
4584
|
+
*
|
|
4585
|
+
* <details>
|
|
4586
|
+
* <summary><code>format</code></summary>
|
|
4587
|
+
*
|
|
4588
|
+
* Only accept strings having a specific format.
|
|
4589
|
+
*
|
|
4590
|
+
* | Parameter | Type | Required | Description |
|
|
4591
|
+
* | -------------------- | ------------------------- | -------- | ---------------------------------- |
|
|
4592
|
+
* | `custom_pattern` | `Regexp` | | Regular expression to be validated |
|
|
4593
|
+
* | `predefined_pattern` | one of `"email"`, `"url"` | | Allowed format |
|
|
4594
|
+
*
|
|
4595
|
+
* Only one of the parameters must be specified.
|
|
4596
|
+
*
|
|
4597
|
+
* </details>
|
|
4598
|
+
*
|
|
4599
|
+
* <details>
|
|
4600
|
+
* <summary><code>slug_format</code></summary>
|
|
4601
|
+
*
|
|
4602
|
+
* Only accept slugs having a specific format.
|
|
4603
|
+
*
|
|
4604
|
+
* | Parameter | Type | Required | Description |
|
|
4605
|
+
* | -------------------- | ---------------- | -------- | ---------------------------------- |
|
|
4606
|
+
* | `custom_pattern` | `Regexp` | | Regular expression to be validated |
|
|
4607
|
+
* | `predefined_pattern` | `"webpage_slug"` | | Allowed format |
|
|
4608
|
+
*
|
|
4609
|
+
* Only one of the parameters must be specified.
|
|
4610
|
+
*
|
|
4611
|
+
* </details>
|
|
4612
|
+
*
|
|
4613
|
+
* <details>
|
|
4614
|
+
* <summary><code>image_dimensions</code></summary>
|
|
4615
|
+
*
|
|
4616
|
+
* Accept assets only within a specified height/width range.
|
|
4617
|
+
*
|
|
4618
|
+
* | Parameter | Type | Required | Description |
|
|
4619
|
+
* | ------------------ | --------- | -------- | -------------------------------- |
|
|
4620
|
+
* | `width_min_value` | `Integer` | | Numeric value for minimum width |
|
|
4621
|
+
* | `width_max_value` | `Integer` | | Numeric value for maximum height |
|
|
4622
|
+
* | `height_min_value` | `Integer` | | Numeric value for minimum width |
|
|
4623
|
+
* | `height_max_value` | `Integer` | | Numeric value for maximum height |
|
|
4624
|
+
*
|
|
4625
|
+
* At least one parameter must be specified.
|
|
4626
|
+
*
|
|
4627
|
+
* </details>
|
|
4628
|
+
*
|
|
4629
|
+
* <details>
|
|
4630
|
+
* <summary><code>item_item_type</code></summary>
|
|
4631
|
+
*
|
|
4632
|
+
* Only accept references to records of the specified models.
|
|
4633
|
+
*
|
|
4634
|
+
* | Parameter | Type | Required | Description |
|
|
4635
|
+
* | ------------------------------------------------- | ------------------------------------------------------------------------ | -------- | --------------------------------------------------------------------------------------------------- |
|
|
4636
|
+
* | `item_types` | `Array<Model ID>` | ✅ | Set of allowed model IDs |
|
|
4637
|
+
* | `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 |
|
|
4638
|
+
* | `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 |
|
|
4639
|
+
* | `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 |
|
|
4640
|
+
*
|
|
4641
|
+
* Possible values for `on_publish_with_unpublished_references_strategy`:
|
|
4642
|
+
*
|
|
4643
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4644
|
+
* - `"publish_references"`: Publish also the referenced records
|
|
4645
|
+
*
|
|
4646
|
+
* Possible values for `on_reference_unpublish_strategy`:
|
|
4647
|
+
*
|
|
4648
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4649
|
+
* - `"unpublish"`: Unpublish also this record
|
|
4650
|
+
* - `"delete_references"`: Try to remove the reference to the unpublished record (if the field has a `required` validation it will fail)
|
|
4651
|
+
*
|
|
4652
|
+
* Possible values for `on_reference_delete_strategy`:
|
|
4653
|
+
*
|
|
4654
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4655
|
+
* - `"delete_references"`: Try to remove the reference to the deleted record (if the field has a `required` validation it will fail)
|
|
4656
|
+
* </details>
|
|
4657
|
+
*
|
|
4658
|
+
* <details>
|
|
4659
|
+
* <summary><code>items_item_type</code></summary>
|
|
4660
|
+
*
|
|
4661
|
+
* Only accept references to records of the specified models.
|
|
4662
|
+
*
|
|
4663
|
+
* | Parameter | Type | Required | Description |
|
|
4664
|
+
* | ------------------------------------------------- | ------------------------------------------------------------------------ | -------- | --------------------------------------------------------------------------------------------------- |
|
|
4665
|
+
* | `item_types` | `Array<Model ID>` | ✅ | Set of allowed model IDs |
|
|
4666
|
+
* | `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 |
|
|
4667
|
+
* | `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 |
|
|
4668
|
+
* | `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 |
|
|
4669
|
+
*
|
|
4670
|
+
* Possible values for `on_publish_with_unpublished_references_strategy`:
|
|
4671
|
+
*
|
|
4672
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4673
|
+
* - `"publish_references"`: Publish also the referenced records
|
|
4674
|
+
*
|
|
4675
|
+
* Possible values for `on_reference_unpublish_strategy`:
|
|
4676
|
+
*
|
|
4677
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4678
|
+
* - `"unpublish"`: Unpublish also this record
|
|
4679
|
+
* - `"delete_references"`: Try to remove the reference to the unpublished record (if the field has a `required` validation it will fail)
|
|
4680
|
+
*
|
|
4681
|
+
* Possible values for `on_reference_delete_strategy`:
|
|
4682
|
+
*
|
|
4683
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4684
|
+
* - `"delete_references"`: Try to remove the reference to the deleted record (if the field has a `required` validation it will fail)
|
|
4685
|
+
* </details>
|
|
4686
|
+
*
|
|
4687
|
+
* <details>
|
|
4688
|
+
* <summary><code>length</code></summary>
|
|
4689
|
+
*
|
|
4690
|
+
* Accept strings only with a specified number of characters.
|
|
4691
|
+
*
|
|
4692
|
+
* | Parameter | Type | Required | Description |
|
|
4693
|
+
* | --------- | --------- | -------- | --------------- |
|
|
4694
|
+
* | `min` | `Integer` | | Minimum length |
|
|
4695
|
+
* | `eq` | `Integer` | | Expected length |
|
|
4696
|
+
* | `max` | `Integer` | | Maximum length |
|
|
4697
|
+
*
|
|
4698
|
+
* At least one parameter must be specified.
|
|
4699
|
+
*
|
|
4700
|
+
* </details>
|
|
4701
|
+
*
|
|
4702
|
+
* <details>
|
|
4703
|
+
* <summary><code>number_range</code></summary>
|
|
4704
|
+
*
|
|
4705
|
+
* Accept numbers only inside a specified range.
|
|
4706
|
+
*
|
|
4707
|
+
* | Parameter | Type | Required | Description |
|
|
4708
|
+
* | --------- | ------- | -------- | ------------- |
|
|
4709
|
+
* | `min` | `Float` | | Minimum value |
|
|
4710
|
+
* | `max` | `Float` | | Maximum value |
|
|
4711
|
+
*
|
|
4712
|
+
* At least one of the parameters must be specified.
|
|
4713
|
+
*
|
|
4714
|
+
* </details>
|
|
4715
|
+
*
|
|
4716
|
+
* <details>
|
|
4717
|
+
* <summary><code>required</code></summary>
|
|
4718
|
+
*
|
|
4719
|
+
* Value must be specified or it won't be valid.
|
|
4720
|
+
*
|
|
4721
|
+
* </details>
|
|
4722
|
+
*
|
|
4723
|
+
* <details>
|
|
4724
|
+
* <summary><code>required_alt_title</code></summary>
|
|
4725
|
+
*
|
|
4726
|
+
* Assets contained in the field are required to specify custom title or alternate text, or they won't be valid.
|
|
4727
|
+
*
|
|
4728
|
+
* | Parameter | Type | Required | Description |
|
|
4729
|
+
* | --------- | --------- | -------- | ---------------------------------------------------------- |
|
|
4730
|
+
* | `title` | `Boolean` | | Whether the title for the asset must be specified |
|
|
4731
|
+
* | `alt` | `Boolean` | | Whether the alternate text for the asset must be specified |
|
|
4732
|
+
*
|
|
4733
|
+
* At least one of the parameters must be specified.
|
|
4734
|
+
*
|
|
4735
|
+
* </details>
|
|
4736
|
+
*
|
|
4737
|
+
* <details>
|
|
4738
|
+
* <summary><code>required_seo_fields</code></summary>
|
|
4739
|
+
*
|
|
4740
|
+
* SEO field is to specify one or more properties, or it won't be valid.
|
|
4741
|
+
*
|
|
4742
|
+
* | Parameter | Type | Required | Description |
|
|
4743
|
+
* | -------------- | --------- | -------- | -------------------------------------------------- |
|
|
4744
|
+
* | `title` | `Boolean` | | Whether the meta title must be specified |
|
|
4745
|
+
* | `description` | `Boolean` | | Whether the meta description must be specified |
|
|
4746
|
+
* | `image` | `Boolean` | | Whether the social sharing image must be specified |
|
|
4747
|
+
* | `twitter_card` | `Boolean` | | Whether the type of Twitter card must be specified |
|
|
4748
|
+
*
|
|
4749
|
+
* At least one of the parameters must be specified.
|
|
4750
|
+
*
|
|
4751
|
+
* </details>
|
|
4752
|
+
*
|
|
4753
|
+
* <details>
|
|
4754
|
+
* <summary><code>title_length</code></summary>
|
|
4755
|
+
*
|
|
4756
|
+
* 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.
|
|
4757
|
+
*
|
|
4758
|
+
* | Parameter | Type | Required | Description |
|
|
4759
|
+
* | --------- | --------- | -------- | ------------- |
|
|
4760
|
+
* | `min` | `Integer` | | Minimum value |
|
|
4761
|
+
* | `max` | `Integer` | | Maximum value |
|
|
4762
|
+
*
|
|
4763
|
+
* At least one of the parameters must be specified.
|
|
4764
|
+
*
|
|
4765
|
+
* </details>
|
|
4766
|
+
*
|
|
4767
|
+
* <details>
|
|
4768
|
+
* <summary><code>description_length</code></summary>
|
|
4769
|
+
*
|
|
4770
|
+
* 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.
|
|
4771
|
+
*
|
|
4772
|
+
* | Parameter | Type | Required | Description |
|
|
4773
|
+
* | --------- | --------- | -------- | ------------- |
|
|
4774
|
+
* | `min` | `Integer` | | Minimum value |
|
|
4775
|
+
* | `max` | `Integer` | | Maximum value |
|
|
4776
|
+
*
|
|
4777
|
+
* At least one of the parameters must be specified.
|
|
4778
|
+
*
|
|
4779
|
+
* </details>
|
|
4780
|
+
*
|
|
4781
|
+
* <details>
|
|
4782
|
+
* <summary><code>rich_text_blocks</code></summary>
|
|
4783
|
+
*
|
|
4784
|
+
* Only accept references to block records of the specified block models.
|
|
4785
|
+
*
|
|
4786
|
+
* | Parameter | Type | Required | Description |
|
|
4787
|
+
* | ------------ | ----------------------- | -------- | ------------------------------ |
|
|
4788
|
+
* | `item_types` | `Array<Block Model ID>` | ✅ | Set of allowed Block Model IDs |
|
|
4789
|
+
*
|
|
4790
|
+
* </details>
|
|
4791
|
+
*
|
|
4792
|
+
* <details>
|
|
4793
|
+
* <summary><code>structured_text_blocks</code></summary>
|
|
4794
|
+
*
|
|
4795
|
+
* Only accept references to block records of the specified block models.
|
|
4796
|
+
*
|
|
4797
|
+
* | Parameter | Type | Required | Description |
|
|
4798
|
+
* | ------------ | ----------------------- | -------- | ------------------------------ |
|
|
4799
|
+
* | `item_types` | `Array<Block Model ID>` | ✅ | Set of allowed Block Model IDs |
|
|
4800
|
+
*
|
|
4801
|
+
* </details>
|
|
4802
|
+
*
|
|
4803
|
+
* <details>
|
|
4804
|
+
* <summary><code>structured_text_links</code></summary>
|
|
4805
|
+
*
|
|
4806
|
+
* Only accept `itemLink` to `inlineItem` nodes for records of the specified models.
|
|
4807
|
+
*
|
|
4808
|
+
* | Parameter | Type | Required | Description |
|
|
4809
|
+
* | ------------------------------------------------- | ------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------- |
|
|
4810
|
+
* | `item_types` | `Array<Model ID>` | ✅ | Set of allowed model IDs |
|
|
4811
|
+
* | `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 |
|
|
4812
|
+
* | `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 |
|
|
4813
|
+
* | `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 |
|
|
4814
|
+
*
|
|
4815
|
+
* Possible values for `on_publish_with_unpublished_references_strategy`:
|
|
4816
|
+
*
|
|
4817
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4818
|
+
* - `"publish_references"`: Publish also the referenced records
|
|
4819
|
+
*
|
|
4820
|
+
* Possible values for `on_reference_unpublish_strategy`:
|
|
4821
|
+
*
|
|
4822
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4823
|
+
* - `"unpublish"`: Unpublish also this record
|
|
4824
|
+
* - `"delete_references"`: Try to remove the reference to the unpublished record (if the field has a `required` validation it will fail)
|
|
4825
|
+
*
|
|
4826
|
+
* Possible values for `on_reference_delete_strategy`:
|
|
4827
|
+
*
|
|
4828
|
+
* - `"fail"`: Fail the operation and notify the user
|
|
4829
|
+
* - `"delete_references"`: Try to remove the reference to the deleted record (if the field has a `required` validation it will fail)
|
|
4830
|
+
* </details>
|
|
4831
|
+
*
|
|
4832
|
+
* <details>
|
|
4833
|
+
* <summary><code>size</code></summary>
|
|
4834
|
+
*
|
|
4835
|
+
* Only accept a number of items within the specified range.
|
|
4836
|
+
*
|
|
4837
|
+
* | Parameter | Type | Required | Description |
|
|
4838
|
+
* | ------------- | --------- | -------- | -------------------------------------------------- |
|
|
4839
|
+
* | `min` | `Integer` | | Minimum length |
|
|
4840
|
+
* | `eq` | `Integer` | | Expected length |
|
|
4841
|
+
* | `max` | `Integer` | | Maximum length |
|
|
4842
|
+
* | `multiple_of` | `Integer` | | The number of items must be multiple of this value |
|
|
4843
|
+
*
|
|
4844
|
+
* At least one parameter must be specified.
|
|
4845
|
+
*
|
|
4846
|
+
* </details>
|
|
4847
|
+
*
|
|
4848
|
+
* <details>
|
|
4849
|
+
* <summary><code>slug_title_field</code></summary>
|
|
4850
|
+
*
|
|
4851
|
+
* Specifies the ID of the _Single-line string_ field that will be used to generate the slug
|
|
4852
|
+
*
|
|
4853
|
+
* | Parameter | Type | Required | Description |
|
|
4854
|
+
* | ---------------- | ---------- | -------- | ------------------------------------------------ |
|
|
4855
|
+
* | `title_field_id` | `Field ID` | ✅ | The field that will be used to generate the slug |
|
|
4856
|
+
*
|
|
4857
|
+
* </details>
|
|
4858
|
+
*
|
|
4859
|
+
* <details>
|
|
4860
|
+
* <summary><code>unique</code></summary>
|
|
4861
|
+
*
|
|
4862
|
+
* The value must be unique across the whole collection of records.
|
|
4863
|
+
*
|
|
4864
|
+
* </details>
|
|
4865
|
+
*
|
|
4866
|
+
* ### Configuration parameters for DatoCMS built-in field editors
|
|
4867
|
+
*
|
|
4868
|
+
* If a field editor is not specified in this table, just pass an empty object `{}` as its configuration parameters.
|
|
4869
|
+
*
|
|
4870
|
+
* <details>
|
|
4871
|
+
* <summary><code>boolean_radio_group</code></summary>
|
|
4872
|
+
*
|
|
4873
|
+
* Radio group input for _boolean_ fields.
|
|
4874
|
+
*
|
|
4875
|
+
* | Parameter | Type | Required | Description |
|
|
4876
|
+
* | ---------------- | ---------------------------------- | -------- | ----------------------------------------- |
|
|
4877
|
+
* | `positive_radio` | `{ label: string, hint?: string }` | ✅ | Radio input for positive choice (`true`) |
|
|
4878
|
+
* | `negative_radio` | `{ label: string, hint?: string }` | ✅ | Radio input for negative choice (`false`) |
|
|
4879
|
+
*
|
|
4880
|
+
* </details>
|
|
4881
|
+
*
|
|
4882
|
+
* <details>
|
|
4883
|
+
* <summary><code>string_radio_group</code></summary>
|
|
3903
4884
|
*
|
|
3904
|
-
*
|
|
3905
|
-
* via the `create.targetSchema` link.
|
|
4885
|
+
* Radio group input for _string_ fields.
|
|
3906
4886
|
*
|
|
3907
|
-
*
|
|
3908
|
-
*
|
|
4887
|
+
* | Parameter | Type | Required | Description |
|
|
4888
|
+
* | --------- | -------------------------------------------------------- | -------- | --------------------------- |
|
|
4889
|
+
* | `radios` | `Array<{ label: string, value: string, hint?: string }>` | ✅ | The different radio options |
|
|
3909
4890
|
*
|
|
3910
|
-
*
|
|
3911
|
-
* via the `destroy.targetSchema` link.
|
|
4891
|
+
* </details>
|
|
3912
4892
|
*
|
|
3913
|
-
*
|
|
3914
|
-
*
|
|
4893
|
+
* <details>
|
|
4894
|
+
* <summary><code>string_select</code></summary>
|
|
3915
4895
|
*
|
|
3916
|
-
*
|
|
3917
|
-
* via the `duplicate.targetSchema` link.
|
|
4896
|
+
* Select input for _string_ fields.
|
|
3918
4897
|
*
|
|
3919
|
-
*
|
|
3920
|
-
*
|
|
4898
|
+
* | Parameter | Type | Required | Description |
|
|
4899
|
+
* | --------- | -------------------------------------------------------- | -------- | ---------------------------- |
|
|
4900
|
+
* | `options` | `Array<{ label: string, value: string, hint?: string }>` | ✅ | The different select options |
|
|
3921
4901
|
*
|
|
3922
|
-
*
|
|
3923
|
-
* via the `batch_destroy.targetSchema` link.
|
|
4902
|
+
* </details>
|
|
3924
4903
|
*
|
|
3925
|
-
*
|
|
3926
|
-
*
|
|
4904
|
+
* <details>
|
|
4905
|
+
* <summary><code>string_multi_select</code></summary>
|
|
3927
4906
|
*
|
|
3928
|
-
*
|
|
3929
|
-
* via the `batch_unpublish.targetSchema` link.
|
|
4907
|
+
* Select input for _JSON_ fields, to edit an array of strings.
|
|
3930
4908
|
*
|
|
3931
|
-
*
|
|
3932
|
-
*
|
|
4909
|
+
* | Parameter | Type | Required | Description |
|
|
4910
|
+
* | --------- | -------------------------------------------------------- | -------- | ---------------------------- |
|
|
4911
|
+
* | `options` | `Array<{ label: string, value: string, hint?: string }>` | ✅ | The different select options |
|
|
3933
4912
|
*
|
|
3934
|
-
*
|
|
3935
|
-
* via the `bulk_unpublish.targetSchema` link.
|
|
4913
|
+
* </details>
|
|
3936
4914
|
*
|
|
3937
|
-
*
|
|
3938
|
-
*
|
|
4915
|
+
* <details>
|
|
4916
|
+
* <summary><code>string_checkbox_group</code></summary>
|
|
3939
4917
|
*
|
|
3940
|
-
*
|
|
3941
|
-
* via the `bulk_move_to_stage.targetSchema` link.
|
|
4918
|
+
* Multiple chechboxes input for _JSON_ fields, to edit an array of strings.
|
|
3942
4919
|
*
|
|
3943
|
-
*
|
|
3944
|
-
*
|
|
4920
|
+
* | Parameter | Type | Required | Description |
|
|
4921
|
+
* | --------- | -------------------------------------------------------- | -------- | ---------------------------- |
|
|
4922
|
+
* | `options` | `Array<{ label: string, value: string, hint?: string }>` | ✅ | The different select options |
|
|
3945
4923
|
*
|
|
3946
|
-
*
|
|
3947
|
-
* via the `create.targetSchema` link.
|
|
4924
|
+
* </details>
|
|
3948
4925
|
*
|
|
3949
|
-
*
|
|
3950
|
-
*
|
|
4926
|
+
* <details>
|
|
4927
|
+
* <summary><code>single_line</code></summary>
|
|
3951
4928
|
*
|
|
3952
|
-
*
|
|
3953
|
-
* via the `batch_add_tags.targetSchema` link.
|
|
4929
|
+
* Simple textual input for _Single-line string_ fields.
|
|
3954
4930
|
*
|
|
3955
|
-
*
|
|
3956
|
-
*
|
|
4931
|
+
* | Parameter | Type | Required | Description |
|
|
4932
|
+
* | --------- | --------- | -------- | -------------------------------------------------------------------------------- |
|
|
4933
|
+
* | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
|
|
3957
4934
|
*
|
|
3958
|
-
*
|
|
3959
|
-
* via the `bulk_tag.targetSchema` link.
|
|
4935
|
+
* </details>
|
|
3960
4936
|
*
|
|
3961
|
-
*
|
|
3962
|
-
*
|
|
4937
|
+
* <details>
|
|
4938
|
+
* <summary><code>markdown</code></summary>
|
|
3963
4939
|
*
|
|
3964
|
-
*
|
|
3965
|
-
* via the `update.targetSchema` link.
|
|
4940
|
+
* Markdown editor for _Multiple-paragraph text_ fields.
|
|
3966
4941
|
*
|
|
3967
|
-
*
|
|
3968
|
-
*
|
|
4942
|
+
* | Parameter | Type | Required | Description |
|
|
4943
|
+
* | --------- | --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
4944
|
+
* | `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"` |
|
|
3969
4945
|
*
|
|
3970
|
-
*
|
|
3971
|
-
*
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
*
|
|
4946
|
+
* </details>
|
|
4947
|
+
*
|
|
4948
|
+
* <details>
|
|
4949
|
+
* <summary><code>wysiwyg</code></summary>
|
|
4950
|
+
*
|
|
4951
|
+
* HTML editor for _Multiple-paragraph text_ fields.
|
|
4952
|
+
*
|
|
4953
|
+
* | Parameter | Type | Required | Description |
|
|
4954
|
+
* | --------- | --------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
4955
|
+
* | `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"` |
|
|
4956
|
+
*
|
|
4957
|
+
* </details>
|
|
4958
|
+
*
|
|
4959
|
+
* <details>
|
|
4960
|
+
* <summary><code>textarea</code></summary>
|
|
4961
|
+
*
|
|
4962
|
+
* Basic textarea editor for _Multiple-paragraph text_ fields.
|
|
4963
|
+
*
|
|
4964
|
+
* </details>
|
|
4965
|
+
*
|
|
4966
|
+
* <details>
|
|
4967
|
+
* <summary><code>color_picker</code></summary>
|
|
4968
|
+
*
|
|
4969
|
+
* Built-in editor for _Color_ fields.
|
|
4970
|
+
*
|
|
4971
|
+
* | Parameter | Type | Required | Description |
|
|
4972
|
+
* | --------------- | ------------------------- | -------- | --------------------------------------------------------- |
|
|
4973
|
+
* | `enable_alpha` | `Boolean` | ✅ | Should the color picker allow to specify the alpha value? |
|
|
4974
|
+
* | `preset_colors` | `Array<Hex color string>` | ✅ | List of preset colors to offer to the user |
|
|
4975
|
+
*
|
|
4976
|
+
* </details>
|
|
4977
|
+
*
|
|
4978
|
+
* <details>
|
|
4979
|
+
* <summary><code>slug</code></summary>
|
|
4980
|
+
*
|
|
4981
|
+
* Built-in editor for _Slug_ fields.
|
|
4982
|
+
*
|
|
4983
|
+
* | Parameter | Type | Required | Description |
|
|
4984
|
+
* | ------------ | -------- | -------- | -------------------------------------------------------------------------------------- |
|
|
4985
|
+
* | `url_prefix` | `String` | | A prefix that will be shown in the editor's form to give some context to your editors. |
|
|
4986
|
+
*
|
|
4987
|
+
* </details>
|
|
4988
|
+
*
|
|
4989
|
+
* <details>
|
|
4990
|
+
* <summary><code>rich_text</code></summary>
|
|
4991
|
+
*
|
|
4992
|
+
* Built-in editor for _Modular content_ fields.
|
|
4993
|
+
*
|
|
4994
|
+
* | Parameter | Type | Required | Description |
|
|
4995
|
+
* | ----------------- | --------- | -------- | ---------------------------------------------------------- |
|
|
4996
|
+
* | `start_collapsed` | `Boolean` | | Whether you want block records collapsed by default or not |
|
|
4997
|
+
*
|
|
4998
|
+
* </details>
|
|
4999
|
+
*
|
|
5000
|
+
* <details>
|
|
5001
|
+
* <summary><code>structured_text</code></summary>
|
|
5002
|
+
*
|
|
5003
|
+
* Built-in editor for _Structured text_ fields.
|
|
5004
|
+
*
|
|
5005
|
+
* | Parameter | Type | Required | Description |
|
|
5006
|
+
* | ------------------------- | --------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
5007
|
+
* | `nodes` | `Array<String>` | ✅ | Specify which nodes the field should allow. Valid values: `"blockquote"`, `"code"`, `"heading"`, `"link"`, `"list"`, `"thematicBreak"` |
|
|
5008
|
+
* | `marks` | `Array<String>` | ✅ | Specify which marks the field should allow. Valid values: `"strong"`, `"emphasis"`, `"underline"`, `"strikethrough"`, `"code"`, `"highlight"` |
|
|
5009
|
+
* | `blocks_start_collapsed` | `Boolean` | | Whether you want block nodes collapsed by default or not |
|
|
5010
|
+
* | `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 |
|
|
5011
|
+
* | `show_links_meta_editor` | `Boolean` | | Whether you want to show the complete meta editor for links |
|
|
5012
|
+
*
|
|
5013
|
+
* </details>
|
|
5014
|
+
*
|
|
5015
|
+
* <details>
|
|
5016
|
+
* <summary><code>link_select</code> and <code>links_select</code></summary>
|
|
5017
|
+
*
|
|
5018
|
+
* Use a select input with auto-completion to pick the records to reference inside the field.
|
|
5019
|
+
*
|
|
5020
|
+
* </details>
|
|
5021
|
+
*
|
|
5022
|
+
* <details>
|
|
5023
|
+
* <summary><code>link_embed</code> and <code>links_embed</code></summary>
|
|
5024
|
+
*
|
|
5025
|
+
* Use an expanded view with records' image preview to pick the records to reference inside the field.
|
|
5026
|
+
*
|
|
5027
|
+
* </details>
|
|
4003
5028
|
*
|
|
4004
|
-
* This interface was referenced by `Job`'s JSON-Schema
|
|
4005
|
-
* via the `definition` "data".
|
|
4006
|
-
*/
|
|
4007
|
-
export declare type JobData = {
|
|
4008
|
-
type: JobType;
|
|
4009
|
-
id: JobIdentity;
|
|
4010
|
-
};
|
|
4011
|
-
/**
|
|
4012
|
-
* Each Model consists of a set of fields. Using the database metaphore, fields are like table columns, and when creating them you need to specify their type (`string`, `file`, `float`, etc.) and any required validation.
|
|
4013
5029
|
*
|
|
4014
5030
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
4015
5031
|
* via the `definition` "field".
|
|
@@ -4108,16 +5124,6 @@ export declare type FieldUpdateJobSchema = Field;
|
|
|
4108
5124
|
export declare type FieldSelfTargetSchema = Field;
|
|
4109
5125
|
export declare type FieldDestroyJobSchema = Field;
|
|
4110
5126
|
export declare type FieldDuplicateJobSchema = Field;
|
|
4111
|
-
/**
|
|
4112
|
-
* JSON API data
|
|
4113
|
-
*
|
|
4114
|
-
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
4115
|
-
* via the `definition` "data".
|
|
4116
|
-
*/
|
|
4117
|
-
export declare type FieldsetData = {
|
|
4118
|
-
type: FieldsetType;
|
|
4119
|
-
id: FieldsetIdentity;
|
|
4120
|
-
};
|
|
4121
5127
|
/**
|
|
4122
5128
|
* JSON API attributes
|
|
4123
5129
|
*
|
|
@@ -4582,140 +5588,6 @@ export declare type SessionCreateSchema = {
|
|
|
4582
5588
|
*/
|
|
4583
5589
|
otp_code?: string;
|
|
4584
5590
|
};
|
|
4585
|
-
/**
|
|
4586
|
-
* An API token allows access to our API. It is linked to a Role, which describes what actions can be performed.
|
|
4587
|
-
*
|
|
4588
|
-
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
4589
|
-
* via the `definition` "access_token".
|
|
4590
|
-
*/
|
|
4591
|
-
export declare type AccessToken = {
|
|
4592
|
-
id: AccessTokenIdentity;
|
|
4593
|
-
type: AccessTokenType;
|
|
4594
|
-
/**
|
|
4595
|
-
* Name of API token
|
|
4596
|
-
*/
|
|
4597
|
-
name: string;
|
|
4598
|
-
/**
|
|
4599
|
-
* The actual API token
|
|
4600
|
-
*/
|
|
4601
|
-
token?: string;
|
|
4602
|
-
/**
|
|
4603
|
-
* Whether this API token can access the Content Delivery API published content endpoint
|
|
4604
|
-
*/
|
|
4605
|
-
can_access_cda: boolean;
|
|
4606
|
-
/**
|
|
4607
|
-
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
4608
|
-
*/
|
|
4609
|
-
can_access_cda_preview: boolean;
|
|
4610
|
-
/**
|
|
4611
|
-
* Whether this API token can access the Content Management API
|
|
4612
|
-
*/
|
|
4613
|
-
can_access_cma: boolean;
|
|
4614
|
-
hardcoded_type: null | string;
|
|
4615
|
-
role: RoleData | null;
|
|
4616
|
-
};
|
|
4617
|
-
export declare type AccessTokenCreateTargetSchema = AccessToken;
|
|
4618
|
-
export declare type AccessTokenUpdateTargetSchema = AccessToken;
|
|
4619
|
-
export declare type AccessTokenSelfTargetSchema = AccessToken;
|
|
4620
|
-
export declare type AccessTokenRegenerateTokenTargetSchema = AccessToken;
|
|
4621
|
-
export declare type AccessTokenDestroyTargetSchema = AccessToken;
|
|
4622
|
-
/**
|
|
4623
|
-
* JSON API data
|
|
4624
|
-
*
|
|
4625
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
4626
|
-
* via the `definition` "data".
|
|
4627
|
-
*/
|
|
4628
|
-
export declare type AccessTokenData = {
|
|
4629
|
-
type: AccessTokenType;
|
|
4630
|
-
id: AccessTokenIdentity;
|
|
4631
|
-
};
|
|
4632
|
-
/**
|
|
4633
|
-
* JSON API attributes
|
|
4634
|
-
*
|
|
4635
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
4636
|
-
* via the `definition` "attributes".
|
|
4637
|
-
*/
|
|
4638
|
-
export declare type AccessTokenAttributes = {
|
|
4639
|
-
/**
|
|
4640
|
-
* Name of API token
|
|
4641
|
-
*/
|
|
4642
|
-
name: string;
|
|
4643
|
-
/**
|
|
4644
|
-
* The actual API token
|
|
4645
|
-
*/
|
|
4646
|
-
token?: string;
|
|
4647
|
-
/**
|
|
4648
|
-
* Whether this API token can access the Content Delivery API published content endpoint
|
|
4649
|
-
*/
|
|
4650
|
-
can_access_cda: boolean;
|
|
4651
|
-
/**
|
|
4652
|
-
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
4653
|
-
*/
|
|
4654
|
-
can_access_cda_preview: boolean;
|
|
4655
|
-
/**
|
|
4656
|
-
* Whether this API token can access the Content Management API
|
|
4657
|
-
*/
|
|
4658
|
-
can_access_cma: boolean;
|
|
4659
|
-
hardcoded_type: null | string;
|
|
4660
|
-
};
|
|
4661
|
-
/**
|
|
4662
|
-
* JSON API links
|
|
4663
|
-
*
|
|
4664
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
4665
|
-
* via the `definition` "relationships".
|
|
4666
|
-
*/
|
|
4667
|
-
export declare type AccessTokenRelationships = {
|
|
4668
|
-
role: RoleData | null;
|
|
4669
|
-
};
|
|
4670
|
-
/**
|
|
4671
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
4672
|
-
* via the `create.schema` link.
|
|
4673
|
-
*/
|
|
4674
|
-
export declare type AccessTokenCreateSchema = {
|
|
4675
|
-
type?: AccessTokenType;
|
|
4676
|
-
/**
|
|
4677
|
-
* Name of API token
|
|
4678
|
-
*/
|
|
4679
|
-
name: string;
|
|
4680
|
-
/**
|
|
4681
|
-
* Whether this API token can access the Content Delivery API published content endpoint
|
|
4682
|
-
*/
|
|
4683
|
-
can_access_cda: boolean;
|
|
4684
|
-
/**
|
|
4685
|
-
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
4686
|
-
*/
|
|
4687
|
-
can_access_cda_preview: boolean;
|
|
4688
|
-
/**
|
|
4689
|
-
* Whether this API token can access the Content Management API
|
|
4690
|
-
*/
|
|
4691
|
-
can_access_cma: boolean;
|
|
4692
|
-
role: RoleData | null;
|
|
4693
|
-
};
|
|
4694
|
-
/**
|
|
4695
|
-
* This interface was referenced by `AccessToken`'s JSON-Schema
|
|
4696
|
-
* via the `update.schema` link.
|
|
4697
|
-
*/
|
|
4698
|
-
export declare type AccessTokenUpdateSchema = {
|
|
4699
|
-
id?: AccessTokenIdentity;
|
|
4700
|
-
type?: AccessTokenType;
|
|
4701
|
-
/**
|
|
4702
|
-
* Name of API token
|
|
4703
|
-
*/
|
|
4704
|
-
name: string;
|
|
4705
|
-
/**
|
|
4706
|
-
* Whether this API token can access the Content Delivery API published content endpoint
|
|
4707
|
-
*/
|
|
4708
|
-
can_access_cda: boolean;
|
|
4709
|
-
/**
|
|
4710
|
-
* Whether this API token can access the Content Delivery API draft content endpoint
|
|
4711
|
-
*/
|
|
4712
|
-
can_access_cda_preview: boolean;
|
|
4713
|
-
/**
|
|
4714
|
-
* Whether this API token can access the Content Management API
|
|
4715
|
-
*/
|
|
4716
|
-
can_access_cma: boolean;
|
|
4717
|
-
role: RoleData | null;
|
|
4718
|
-
};
|
|
4719
5591
|
/**
|
|
4720
5592
|
* Plugins enable developers to replace DatoCMS field components with HTML5 applications so the editing experiences of the DatoCMS web app can be customized.
|
|
4721
5593
|
*
|