@datocms/cma-client 0.1.5 → 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.
Files changed (38) hide show
  1. package/dist/cjs/generated/resources/BuildTrigger.js +40 -2
  2. package/dist/cjs/generated/resources/BuildTrigger.js.map +1 -1
  3. package/dist/cjs/generated/resources/Site.js +25 -3
  4. package/dist/cjs/generated/resources/Site.js.map +1 -1
  5. package/dist/cjs/generated/resources/User.js +26 -3
  6. package/dist/cjs/generated/resources/User.js.map +1 -1
  7. package/dist/esm/buildBlockRecord.d.ts +1 -1
  8. package/dist/esm/generated/SchemaTypes.d.ts +1296 -379
  9. package/dist/esm/generated/SimpleSchemaTypes.d.ts +1357 -457
  10. package/dist/esm/generated/resources/BuildTrigger.d.ts +26 -2
  11. package/dist/esm/generated/resources/BuildTrigger.js +40 -2
  12. package/dist/esm/generated/resources/BuildTrigger.js.map +1 -1
  13. package/dist/esm/generated/resources/Site.d.ts +14 -2
  14. package/dist/esm/generated/resources/Site.js +25 -3
  15. package/dist/esm/generated/resources/Site.js.map +1 -1
  16. package/dist/esm/generated/resources/User.d.ts +14 -2
  17. package/dist/esm/generated/resources/User.js +26 -3
  18. package/dist/esm/generated/resources/User.js.map +1 -1
  19. package/dist/types/buildBlockRecord.d.ts +1 -1
  20. package/dist/types/generated/SchemaTypes.d.ts +1296 -379
  21. package/dist/types/generated/SimpleSchemaTypes.d.ts +1357 -457
  22. package/dist/types/generated/resources/BuildTrigger.d.ts +26 -2
  23. package/dist/types/generated/resources/Site.d.ts +14 -2
  24. package/dist/types/generated/resources/User.d.ts +14 -2
  25. package/package.json +6 -5
  26. package/resources.json +1278 -0
  27. package/src/generated/SchemaTypes.ts +1320 -388
  28. package/src/generated/SimpleSchemaTypes.ts +1364 -463
  29. package/src/generated/resources/BuildTrigger.ts +44 -2
  30. package/src/generated/resources/Site.ts +33 -3
  31. package/src/generated/resources/User.ts +36 -3
  32. package/dist/cjs/generated/schemaInfo.js +0 -3063
  33. package/dist/cjs/generated/schemaInfo.js.map +0 -1
  34. package/dist/esm/generated/schemaInfo.d.ts +0 -940
  35. package/dist/esm/generated/schemaInfo.js +0 -3061
  36. package/dist/esm/generated/schemaInfo.js.map +0 -1
  37. package/dist/types/generated/schemaInfo.d.ts +0 -940
  38. package/src/generated/schemaInfo.ts +0 -3231
@@ -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 `destroy.hrefSchema` link.
94
+ * via the `self.hrefSchema` link.
95
95
  */
96
- export type UserDestroyHrefSchema = {
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
- * New owner for resources previously owned by the deleted user. This argument specifies the new owner ID.
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
- destination_user_id?: string;
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
- * ULID of event (https://github.com/ulid/spec)
168
+ * ID of access_token
168
169
  *
169
- * This interface was referenced by `AuditLogEvent`'s JSON-Schema
170
+ * This interface was referenced by `AccessToken`'s JSON-Schema
170
171
  * via the `definition` "identity".
171
172
  *
172
- * This interface was referenced by `AuditLogEvent`'s JSON-Schema
173
+ * This interface was referenced by `AccessToken`'s JSON-Schema
173
174
  * via the `definition` "id".
174
175
  */
175
- export type AuditLogEventIdentity = string;
176
+ export type AccessTokenIdentity = string;
176
177
  /**
177
178
  * JSON API type field
178
179
  *
179
- * This interface was referenced by `AuditLogEvent`'s JSON-Schema
180
+ * This interface was referenced by `AccessToken`'s JSON-Schema
180
181
  * via the `definition` "type".
181
182
  */
182
- export type AuditLogEventType = 'audit_log_event';
183
+ export type AccessTokenType = 'access_token';
183
184
  /**
184
- * This interface was referenced by `AuditLogEvent`'s JSON-Schema
185
- * via the `query.targetSchema` link.
185
+ * This interface was referenced by `AccessToken`'s JSON-Schema
186
+ * via the `instances.targetSchema` link.
186
187
  */
187
- export type AuditLogEventQueryTargetSchema = AuditLogEvent[];
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
  *
@@ -1490,6 +1517,17 @@ export type SiteIdentity = string;
1490
1517
  * via the `definition` "type".
1491
1518
  */
1492
1519
  export type SiteType = 'site';
1520
+ /**
1521
+ * This interface was referenced by `Site`'s JSON-Schema
1522
+ * via the `self.hrefSchema` link.
1523
+ */
1524
+ export type SiteSelfHrefSchema = {
1525
+ /**
1526
+ * 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`.
1527
+ */
1528
+ include?: string;
1529
+ [k: string]: unknown;
1530
+ };
1493
1531
  /**
1494
1532
  * This interface was referenced by `Workflow`'s JSON-Schema
1495
1533
  * via the `instances.targetSchema` link.
@@ -2926,133 +2964,224 @@ export type SsoUserRelationships = {
2926
2964
  };
2927
2965
 
2928
2966
  /**
2929
- * If the Audit log functionality is enabled in a project, logged events can be queried using SQL-like language and fetched in full detail so that they can be exported or analyzed.
2967
+ * An API token allows access to our API. It is linked to a Role, which describes what actions can be performed.
2930
2968
  *
2931
2969
  * This interface was referenced by `DatoApi`'s JSON-Schema
2932
- * via the `definition` "audit_log_event".
2970
+ * via the `definition` "access_token".
2933
2971
  */
2934
- export type AuditLogEvent = {
2935
- id: AuditLogEventIdentity;
2936
- type: AuditLogEventType;
2937
- /**
2938
- * The actual action performed
2939
- */
2940
- action_name: string;
2972
+ export type AccessToken = {
2973
+ id: AccessTokenIdentity;
2974
+ type: AccessTokenType;
2941
2975
  /**
2942
- * The actor who performed the action
2976
+ * Name of API token
2943
2977
  */
2944
- actor: {
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
- };
2978
+ name: string;
2958
2979
  /**
2959
- * The role of the actor at the time the action was performed
2980
+ * The actual API token (or null if the current user has no permission to read the token)
2960
2981
  */
2961
- role: null | {
2962
- /**
2963
- * The name of the role
2964
- */
2965
- name: string;
2966
- /**
2967
- * The ID of the role
2968
- */
2969
- id: string;
2970
- };
2982
+ token?: null | string;
2971
2983
  /**
2972
- * The environment inside of which the action was performed
2984
+ * Whether this API token can access the Content Delivery API published content endpoint
2973
2985
  */
2974
- environment: {
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
- };
2986
+ can_access_cda: boolean;
2984
2987
  /**
2985
- * The actual request being performed
2988
+ * Whether this API token can access the Content Delivery API draft content endpoint
2986
2989
  */
2987
- request: {
2988
- /**
2989
- * The full path of the request
2990
- */
2991
- path: string;
2992
- /**
2993
- * The HTTP method of the request
2994
- */
2995
- method: string;
2996
- /**
2997
- * The X-Request-ID header of the request
2998
- */
2999
- id?: string;
3000
- /**
3001
- * The full HTTP body of the request
3002
- */
3003
- payload?: null | {
3004
- [k: string]: unknown;
3005
- };
3006
- };
2990
+ can_access_cda_preview: boolean;
3007
2991
  /**
3008
- * The actual response being returned by DatoCMS
2992
+ * Whether this API token can access the Content Management API
3009
2993
  */
3010
- response: null | {
3011
- /**
3012
- * The HTTP status code of the response
3013
- */
3014
- status: number;
3015
- /**
3016
- * The full HTTP body of the response
3017
- */
3018
- payload: {
3019
- [k: string]: unknown;
3020
- };
3021
- };
3022
- meta: AuditLogEventMeta;
2994
+ can_access_cma: boolean;
2995
+ hardcoded_type: null | string;
2996
+ role: RoleData | null;
2997
+ };
2998
+ export type AccessTokenCreateTargetSchema = AccessToken;
2999
+ export type AccessTokenUpdateTargetSchema = AccessToken;
3000
+ export type AccessTokenSelfTargetSchema = AccessToken;
3001
+ export type AccessTokenRegenerateTokenTargetSchema = AccessToken;
3002
+ export type AccessTokenDestroyTargetSchema = AccessToken;
3003
+ /**
3004
+ * JSON API data
3005
+ *
3006
+ * This interface was referenced by `AccessToken`'s JSON-Schema
3007
+ * via the `definition` "data".
3008
+ */
3009
+ export type AccessTokenData = {
3010
+ type: AccessTokenType;
3011
+ id: AccessTokenIdentity;
3023
3012
  };
3024
3013
 
3025
3014
  /**
3026
- * JSON API meta
3015
+ * JSON API attributes
3027
3016
  *
3028
- * This interface was referenced by `AuditLogEvent`'s JSON-Schema
3029
- * via the `definition` "meta".
3017
+ * This interface was referenced by `AccessToken`'s JSON-Schema
3018
+ * via the `definition` "attributes".
3030
3019
  */
3031
- export type AuditLogEventMeta = {
3020
+ export type AccessTokenAttributes = {
3032
3021
  /**
3033
- * The date of the event
3022
+ * Name of API token
3034
3023
  */
3035
- occurred_at: string;
3024
+ name: string;
3025
+ /**
3026
+ * The actual API token (or null if the current user has no permission to read the token)
3027
+ */
3028
+ token?: null | string;
3029
+ /**
3030
+ * Whether this API token can access the Content Delivery API published content endpoint
3031
+ */
3032
+ can_access_cda: boolean;
3033
+ /**
3034
+ * Whether this API token can access the Content Delivery API draft content endpoint
3035
+ */
3036
+ can_access_cda_preview: boolean;
3037
+ /**
3038
+ * Whether this API token can access the Content Management API
3039
+ */
3040
+ can_access_cma: boolean;
3041
+ hardcoded_type: null | string;
3042
+ };
3043
+
3044
+ /**
3045
+ * JSON API links
3046
+ *
3047
+ * This interface was referenced by `AccessToken`'s JSON-Schema
3048
+ * via the `definition` "relationships".
3049
+ */
3050
+ export type AccessTokenRelationships = {
3051
+ role: RoleData | null;
3052
+ };
3053
+
3054
+ /**
3055
+ * This interface was referenced by `AccessToken`'s JSON-Schema
3056
+ * via the `create.schema` link.
3057
+ */
3058
+ export type AccessTokenCreateSchema = {
3059
+ type?: AccessTokenType;
3060
+ /**
3061
+ * Name of API token
3062
+ */
3063
+ name: string;
3064
+ /**
3065
+ * Whether this API token can access the Content Delivery API published content endpoint
3066
+ */
3067
+ can_access_cda: boolean;
3068
+ /**
3069
+ * Whether this API token can access the Content Delivery API draft content endpoint
3070
+ */
3071
+ can_access_cda_preview: boolean;
3072
+ /**
3073
+ * Whether this API token can access the Content Management API
3074
+ */
3075
+ can_access_cma: boolean;
3076
+ role: RoleData | null;
3077
+ };
3078
+
3079
+ /**
3080
+ * This interface was referenced by `AccessToken`'s JSON-Schema
3081
+ * via the `update.schema` link.
3082
+ */
3083
+ export type AccessTokenUpdateSchema = {
3084
+ id?: AccessTokenIdentity;
3085
+ type?: AccessTokenType;
3086
+ /**
3087
+ * Name of API token
3088
+ */
3089
+ name: string;
3090
+ /**
3091
+ * Whether this API token can access the Content Delivery API published content endpoint
3092
+ */
3093
+ can_access_cda: boolean;
3094
+ /**
3095
+ * Whether this API token can access the Content Delivery API draft content endpoint
3096
+ */
3097
+ can_access_cda_preview: boolean;
3098
+ /**
3099
+ * Whether this API token can access the Content Management API
3100
+ */
3101
+ can_access_cma: boolean;
3102
+ role: RoleData | null;
3103
+ };
3104
+
3105
+ /**
3106
+ * DatoCMS account
3107
+ *
3108
+ * This interface was referenced by `DatoApi`'s JSON-Schema
3109
+ * via the `definition` "account".
3110
+ */
3111
+ export type Account = {
3112
+ id: AccountIdentity;
3113
+ type: AccountType;
3114
+ /**
3115
+ * Email
3116
+ */
3117
+ email: string;
3118
+ /**
3119
+ * First name
3120
+ */
3121
+ first_name: string | null;
3122
+ /**
3123
+ * Last name
3124
+ */
3125
+ last_name: string | null;
3126
+ /**
3127
+ * Company name
3128
+ */
3129
+ company: string | null;
3130
+ /**
3131
+ * Password
3132
+ */
3133
+ password?: string;
3036
3134
  };
3037
3135
 
3038
3136
  /**
3039
3137
  * JSON API data
3040
3138
  *
3041
- * This interface was referenced by `AuditLogEvent`'s JSON-Schema
3139
+ * This interface was referenced by `Account`'s JSON-Schema
3042
3140
  * via the `definition` "data".
3043
3141
  */
3044
- export type AuditLogEventData = {
3045
- type: AuditLogEventType;
3046
- id: AuditLogEventIdentity;
3142
+ export type AccountData = {
3143
+ type: AccountType;
3144
+ id: AccountIdentity;
3047
3145
  };
3048
3146
 
3049
3147
  /**
3050
3148
  * JSON API attributes
3051
3149
  *
3052
- * This interface was referenced by `AuditLogEvent`'s JSON-Schema
3150
+ * This interface was referenced by `Account`'s JSON-Schema
3053
3151
  * via the `definition` "attributes".
3054
3152
  */
3055
- export type AuditLogEventAttributes = {
3153
+ export type AccountAttributes = {
3154
+ /**
3155
+ * Email
3156
+ */
3157
+ email: string;
3158
+ /**
3159
+ * First name
3160
+ */
3161
+ first_name: string | null;
3162
+ /**
3163
+ * Last name
3164
+ */
3165
+ last_name: string | null;
3166
+ /**
3167
+ * Company name
3168
+ */
3169
+ company: string | null;
3170
+ /**
3171
+ * Password
3172
+ */
3173
+ password?: string;
3174
+ };
3175
+
3176
+ /**
3177
+ * 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.
3178
+ *
3179
+ * This interface was referenced by `DatoApi`'s JSON-Schema
3180
+ * via the `definition` "audit_log_event".
3181
+ */
3182
+ export type AuditLogEvent = {
3183
+ id: AuditLogEventIdentity;
3184
+ type: AuditLogEventType;
3056
3185
  /**
3057
3186
  * The actual action performed
3058
3187
  */
@@ -3138,100 +3267,148 @@ export type AuditLogEventAttributes = {
3138
3267
  [k: string]: unknown;
3139
3268
  };
3140
3269
  };
3270
+ meta: AuditLogEventMeta;
3141
3271
  };
3142
3272
 
3143
3273
  /**
3144
- * This interface was referenced by `AuditLogEvent`'s JSON-Schema
3145
- * via the `query.schema` link.
3146
- */
3147
- export type AuditLogEventQuerySchema = {
3148
- /**
3149
- * JSON API type field
3150
- */
3151
- type?: 'audit_log_query';
3152
- /**
3153
- * An SQL-like expression to filter the events
3154
- */
3155
- filter?: string;
3156
- /**
3157
- * Set this value to get remaining results, if a meta.next_token was returned in the previous query response
3158
- */
3159
- next_token?: string;
3160
- /**
3161
- * Whether a detailed log complete with full request and response payload must be returned or not
3162
- */
3163
- detailed_log?: boolean;
3164
- };
3165
-
3166
- /**
3167
- * DatoCMS account
3274
+ * JSON API meta
3168
3275
  *
3169
- * This interface was referenced by `DatoApi`'s JSON-Schema
3170
- * via the `definition` "account".
3276
+ * This interface was referenced by `AuditLogEvent`'s JSON-Schema
3277
+ * via the `definition` "meta".
3171
3278
  */
3172
- export type Account = {
3173
- id: AccountIdentity;
3174
- type: AccountType;
3175
- /**
3176
- * Email
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;
3279
+ export type AuditLogEventMeta = {
3191
3280
  /**
3192
- * Password
3281
+ * The date of the event
3193
3282
  */
3194
- password?: string;
3283
+ occurred_at: string;
3195
3284
  };
3196
3285
 
3197
3286
  /**
3198
3287
  * JSON API data
3199
3288
  *
3200
- * This interface was referenced by `Account`'s JSON-Schema
3289
+ * This interface was referenced by `AuditLogEvent`'s JSON-Schema
3201
3290
  * via the `definition` "data".
3202
3291
  */
3203
- export type AccountData = {
3204
- type: AccountType;
3205
- id: AccountIdentity;
3292
+ export type AuditLogEventData = {
3293
+ type: AuditLogEventType;
3294
+ id: AuditLogEventIdentity;
3206
3295
  };
3207
3296
 
3208
3297
  /**
3209
3298
  * JSON API attributes
3210
3299
  *
3211
- * This interface was referenced by `Account`'s JSON-Schema
3300
+ * This interface was referenced by `AuditLogEvent`'s JSON-Schema
3212
3301
  * via the `definition` "attributes".
3213
3302
  */
3214
- export type AccountAttributes = {
3303
+ export type AuditLogEventAttributes = {
3215
3304
  /**
3216
- * Email
3305
+ * The actual action performed
3217
3306
  */
3218
- email: string;
3307
+ action_name: string;
3219
3308
  /**
3220
- * First name
3309
+ * The actor who performed the action
3221
3310
  */
3222
- first_name: string | null;
3311
+ actor: {
3312
+ /**
3313
+ * The type of actor (can be `account`, `user`, `sso_user` or `access_token`)
3314
+ */
3315
+ type: string;
3316
+ /**
3317
+ * The ID of the actor
3318
+ */
3319
+ id: string;
3320
+ /**
3321
+ * An human representation of the actor (name/email/username depending on the type of actor)
3322
+ */
3323
+ name: string;
3324
+ };
3223
3325
  /**
3224
- * Last name
3326
+ * The role of the actor at the time the action was performed
3225
3327
  */
3226
- last_name: string | null;
3328
+ role: null | {
3329
+ /**
3330
+ * The name of the role
3331
+ */
3332
+ name: string;
3333
+ /**
3334
+ * The ID of the role
3335
+ */
3336
+ id: string;
3337
+ };
3227
3338
  /**
3228
- * Company name
3339
+ * The environment inside of which the action was performed
3229
3340
  */
3230
- company: string | null;
3341
+ environment: {
3342
+ /**
3343
+ * The ID of the environment
3344
+ */
3345
+ id: string;
3346
+ /**
3347
+ * Whether the environment was the primary one at the time the action was performed
3348
+ */
3349
+ primary: boolean;
3350
+ };
3231
3351
  /**
3232
- * Password
3352
+ * The actual request being performed
3233
3353
  */
3234
- password?: string;
3354
+ request: {
3355
+ /**
3356
+ * The full path of the request
3357
+ */
3358
+ path: string;
3359
+ /**
3360
+ * The HTTP method of the request
3361
+ */
3362
+ method: string;
3363
+ /**
3364
+ * The X-Request-ID header of the request
3365
+ */
3366
+ id?: string;
3367
+ /**
3368
+ * The full HTTP body of the request
3369
+ */
3370
+ payload?: null | {
3371
+ [k: string]: unknown;
3372
+ };
3373
+ };
3374
+ /**
3375
+ * The actual response being returned by DatoCMS
3376
+ */
3377
+ response: null | {
3378
+ /**
3379
+ * The HTTP status code of the response
3380
+ */
3381
+ status: number;
3382
+ /**
3383
+ * The full HTTP body of the response
3384
+ */
3385
+ payload: {
3386
+ [k: string]: unknown;
3387
+ };
3388
+ };
3389
+ };
3390
+
3391
+ /**
3392
+ * This interface was referenced by `AuditLogEvent`'s JSON-Schema
3393
+ * via the `query.schema` link.
3394
+ */
3395
+ export type AuditLogEventQuerySchema = {
3396
+ /**
3397
+ * JSON API type field
3398
+ */
3399
+ type?: 'audit_log_query';
3400
+ /**
3401
+ * An SQL-like expression to filter the events
3402
+ */
3403
+ filter?: string;
3404
+ /**
3405
+ * Set this value to get remaining results, if a meta.next_token was returned in the previous query response
3406
+ */
3407
+ next_token?: string;
3408
+ /**
3409
+ * Whether a detailed log complete with full request and response payload must be returned or not
3410
+ */
3411
+ detailed_log?: boolean;
3235
3412
  };
3236
3413
 
3237
3414
  /**
@@ -3878,6 +4055,7 @@ export type ItemType = {
3878
4055
  hint: string | null;
3879
4056
  singleton_item: ItemData | null;
3880
4057
  fields: FieldData[];
4058
+ fieldsets: FieldsetData[];
3881
4059
  title_field: FieldData | null;
3882
4060
  image_preview_field: FieldData | null;
3883
4061
  excerpt_field: FieldData | null;
@@ -3911,6 +4089,17 @@ export type FieldData = {
3911
4089
  id: FieldIdentity;
3912
4090
  };
3913
4091
 
4092
+ /**
4093
+ * JSON API data
4094
+ *
4095
+ * This interface was referenced by `Fieldset`'s JSON-Schema
4096
+ * via the `definition` "data".
4097
+ */
4098
+ export type FieldsetData = {
4099
+ type: FieldsetType;
4100
+ id: FieldsetIdentity;
4101
+ };
4102
+
3914
4103
  /**
3915
4104
  * JSON API data
3916
4105
  *
@@ -4001,6 +4190,7 @@ export type ItemTypeAttributes = {
4001
4190
  export type ItemTypeRelationships = {
4002
4191
  singleton_item: ItemData | null;
4003
4192
  fields: FieldData[];
4193
+ fieldsets: FieldsetData[];
4004
4194
  title_field: FieldData | null;
4005
4195
  image_preview_field: FieldData | null;
4006
4196
  excerpt_field: FieldData | null;
@@ -4157,115 +4347,951 @@ export type ItemTypeUpdateSchema = {
4157
4347
  * This interface was referenced by `ItemType`'s JSON-Schema
4158
4348
  * via the `update.targetSchema` link.
4159
4349
  *
4160
- * This interface was referenced by `ItemType`'s JSON-Schema
4161
- * via the `destroy.targetSchema` link.
4350
+ * This interface was referenced by `ItemType`'s JSON-Schema
4351
+ * via the `destroy.targetSchema` link.
4352
+ *
4353
+ * This interface was referenced by `Field`'s JSON-Schema
4354
+ * via the `create.targetSchema` link.
4355
+ *
4356
+ * This interface was referenced by `Field`'s JSON-Schema
4357
+ * via the `update.targetSchema` link.
4358
+ *
4359
+ * This interface was referenced by `Field`'s JSON-Schema
4360
+ * via the `destroy.targetSchema` link.
4361
+ *
4362
+ * This interface was referenced by `Field`'s JSON-Schema
4363
+ * via the `duplicate.targetSchema` link.
4364
+ *
4365
+ * This interface was referenced by `Item`'s JSON-Schema
4366
+ * via the `duplicate.targetSchema` link.
4367
+ *
4368
+ * This interface was referenced by `Item`'s JSON-Schema
4369
+ * via the `destroy.targetSchema` link.
4370
+ *
4371
+ * This interface was referenced by `Item`'s JSON-Schema
4372
+ * via the `batch_destroy.targetSchema` link.
4373
+ *
4374
+ * This interface was referenced by `Item`'s JSON-Schema
4375
+ * via the `batch_publish.targetSchema` link.
4376
+ *
4377
+ * This interface was referenced by `Item`'s JSON-Schema
4378
+ * via the `batch_unpublish.targetSchema` link.
4379
+ *
4380
+ * This interface was referenced by `Item`'s JSON-Schema
4381
+ * via the `bulk_publish.targetSchema` link.
4382
+ *
4383
+ * This interface was referenced by `Item`'s JSON-Schema
4384
+ * via the `bulk_unpublish.targetSchema` link.
4385
+ *
4386
+ * This interface was referenced by `Item`'s JSON-Schema
4387
+ * via the `bulk_destroy.targetSchema` link.
4388
+ *
4389
+ * This interface was referenced by `Item`'s JSON-Schema
4390
+ * via the `bulk_move_to_stage.targetSchema` link.
4391
+ *
4392
+ * This interface was referenced by `ItemVersion`'s JSON-Schema
4393
+ * via the `restore.targetSchema` link.
4394
+ *
4395
+ * This interface was referenced by `Upload`'s JSON-Schema
4396
+ * via the `create.targetSchema` link.
4397
+ *
4398
+ * This interface was referenced by `Upload`'s JSON-Schema
4399
+ * via the `update.targetSchema` link.
4400
+ *
4401
+ * This interface was referenced by `Upload`'s JSON-Schema
4402
+ * via the `batch_add_tags.targetSchema` link.
4403
+ *
4404
+ * This interface was referenced by `Upload`'s JSON-Schema
4405
+ * via the `batch_destroy.targetSchema` link.
4406
+ *
4407
+ * This interface was referenced by `Upload`'s JSON-Schema
4408
+ * via the `bulk_tag.targetSchema` link.
4409
+ *
4410
+ * This interface was referenced by `Upload`'s JSON-Schema
4411
+ * via the `bulk_destroy.targetSchema` link.
4412
+ *
4413
+ * This interface was referenced by `Site`'s JSON-Schema
4414
+ * via the `update.targetSchema` link.
4415
+ *
4416
+ * This interface was referenced by `Site`'s JSON-Schema
4417
+ * via the `activate_improved_timezone_management.targetSchema` link.
4418
+ *
4419
+ * This interface was referenced by `DatoApi`'s JSON-Schema
4420
+ * via the `definition` "job".
4421
+ */
4422
+ export type Job = {
4423
+ id: JobIdentity;
4424
+ type: JobType;
4425
+ };
4426
+ export type ItemTypeUpdateTargetSchema = Job;
4427
+ export type ItemTypeDestroyTargetSchema = Job;
4428
+ export type FieldCreateTargetSchema = Job;
4429
+ export type FieldUpdateTargetSchema = Job;
4430
+ export type FieldDestroyTargetSchema = Job;
4431
+ export type FieldDuplicateTargetSchema = Job;
4432
+ export type ItemDuplicateTargetSchema = Job;
4433
+ export type ItemDestroyTargetSchema = Job;
4434
+ export type ItemBatchDestroyTargetSchema = Job;
4435
+ export type ItemBatchPublishTargetSchema = Job;
4436
+ export type ItemBatchUnpublishTargetSchema = Job;
4437
+ export type ItemBulkPublishTargetSchema = Job;
4438
+ export type ItemBulkUnpublishTargetSchema = Job;
4439
+ export type ItemBulkDestroyTargetSchema = Job;
4440
+ export type ItemBulkMoveToStageTargetSchema = Job;
4441
+ export type ItemVersionRestoreTargetSchema = Job;
4442
+ export type UploadCreateTargetSchema = Job;
4443
+ export type UploadUpdateTargetSchema = Job;
4444
+ export type UploadBatchAddTagsTargetSchema = Job;
4445
+ export type UploadBatchDestroyTargetSchema = Job;
4446
+ export type UploadBulkTagTargetSchema = Job;
4447
+ export type UploadBulkDestroyTargetSchema = Job;
4448
+ export type SiteUpdateTargetSchema = Job;
4449
+ export type SiteActivateImprovedTimezoneManagementTargetSchema = Job;
4450
+ /**
4451
+ * JSON API data
4452
+ *
4453
+ * This interface was referenced by `Job`'s JSON-Schema
4454
+ * via the `definition` "data".
4455
+ */
4456
+ export type JobData = {
4457
+ type: JobType;
4458
+ id: JobIdentity;
4459
+ };
4460
+
4461
+ /**
4462
+ * 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.
4463
+ *
4464
+ * ### Different field types require different settings
4465
+ *
4466
+ * When looking at a field resource, you have to pay attention to two particular properties, `validators` and `appearance`.
4467
+ *
4468
+ * 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.
4469
+ *
4470
+ * 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.
4471
+ *
4472
+ * ### Specifying validations
4473
+ *
4474
+ * 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.
4475
+ *
4476
+ * This is a valid example for a _Single-line string_ field:
4477
+ *
4478
+ * ```js
4479
+ * {
4480
+ * "validators": {
4481
+ * // "required" validator has no settings
4482
+ * "required": {},
4483
+ * // "length" validator requires "min" and/or "max" properties
4484
+ * "length": { "min": 80 }
4485
+ * }
4486
+ * }
4487
+ * ```
4488
+ *
4489
+ * Below you'll find a summary of all the validators available for each field type with their settings.
4490
+ *
4491
+ * 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.
4492
+ *
4493
+ * ### Specifying the appearance
4494
+ *
4495
+ * The `appearance` property requires an object with three specific properties: `editor`, `parameters` and `addons`.
4496
+ *
4497
+ * 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.
4498
+ *
4499
+ * This is a valid example for a _Single-line string_ field:
4500
+ *
4501
+ * ```js
4502
+ * {
4503
+ * "appearance": {
4504
+ * // single_line is a DatoCMS built-in editor that you can use with single-line string fields
4505
+ * "editor": "single_line",
4506
+ * // each built-in editor has specific settings
4507
+ * "parameters": { "heading": true },
4508
+ * "addons": []
4509
+ * },
4510
+ * }
4511
+ * ```
4512
+ *
4513
+ * Following you'll find a summary of all the editors available for each field type with their settings.
4514
+ *
4515
+ * #### Setting the appearance to a field editor provided by a plugin
4516
+ *
4517
+ * 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.
4518
+ *
4519
+ * In this case:
4520
+ *
4521
+ * - the `editor` property must be the ID of the plugin;
4522
+ * - the `field_extension` property must be the ID of the specific manual field editor that the plugin exposes;
4523
+ * - 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.
4524
+ *
4525
+ * ```js
4526
+ * {
4527
+ * "appearance": {
4528
+ * // "2132" is a the ID of a plugin exposing a manual field editor
4529
+ * "editor": "2134",
4530
+ * // "starRating" is a manual field editor exposed by the plugin
4531
+ * "field_extension": "starRating",
4532
+ * // this is a valid configuration for the "starRating" field editor
4533
+ * "parameters": { "maxRating": 5, "starsColor": "#ff0000" },
4534
+ * "addons": []
4535
+ * },
4536
+ * }
4537
+ * ```
4538
+ *
4539
+ * #### Configuring manual field addons
4540
+ *
4541
+ * 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.
4542
+ *
4543
+ * ```js
4544
+ * {
4545
+ * "appearance": {
4546
+ * "editor": "single_line",
4547
+ * "parameters": { "heading": true },
4548
+ * "addons": [
4549
+ * {
4550
+ * // "2138" is a the ID of a plugin exposing a manual addon editor
4551
+ * "id": "2138",
4552
+ * // "loremIpsumGenerator" is a manual field addon exposed by the plugin
4553
+ * "field_extension": "loremIpsumGenerator",
4554
+ * // this is a valid configuration for the "loremIpsumGenerator" field addon
4555
+ * "parameters": { "sentences": 2 },
4556
+ * }
4557
+ * ]
4558
+ * },
4559
+ * }
4560
+ * ```
4561
+ *
4562
+ * ### Available field types
4563
+ *
4564
+ * <details>
4565
+ * <summary>Single-line string (<code>string</code>)</summary>
4566
+ *
4567
+ * | Property | Value |
4568
+ * | ------------------------------ | ---------------------------------------------------- |
4569
+ * | Code | `string` |
4570
+ * | Built-in editors for the field | `single_line`, `string_radio_group`, `string_select` |
4571
+ * | Available validators | `required`, `unique`, `length`, `format`, `enum` |
4572
+ *
4573
+ * </details>
4574
+ *
4575
+ * <details>
4576
+ * <summary>Multi-line text (<code>text</code>)</summary>
4577
+ *
4578
+ * | Property | Value |
4579
+ * | ------------------------------ | --------------------------------- |
4580
+ * | Code | `text` |
4581
+ * | Built-in editors for the field | `markdown`, `wysiwyg`, `textarea` |
4582
+ * | Available validators | `required`, `length`, `format` |
4583
+ *
4584
+ * </details>
4585
+ *
4586
+ * <details>
4587
+ * <summary>Boolean (<code>boolean</code>)</summary>
4588
+ *
4589
+ * | Property | Value |
4590
+ * | ------------------------------ | -------------------------------- |
4591
+ * | Code | `boolean` |
4592
+ * | Built-in editors for the field | `boolean`, `boolean_radio_group` |
4593
+ * | Available validators | no validators available |
4594
+ *
4595
+ * </details>
4596
+ *
4597
+ * <details>
4598
+ * <summary>Integer (<code>integer</code>)</summary>
4599
+ *
4600
+ * | Property | Value |
4601
+ * | ------------------------------ | -------------------------- |
4602
+ * | Code | `integer` |
4603
+ * | Built-in editors for the field | `integer` |
4604
+ * | Available validators | `required`, `number_range` |
4605
+ *
4606
+ * </details>
4607
+ *
4608
+ * <details>
4609
+ * <summary>Float (<code>float</code>)</summary>
4610
+ *
4611
+ * | Property | Value |
4612
+ * | ------------------------------ | -------------------------- |
4613
+ * | Code | `float` |
4614
+ * | Built-in editors for the field | `float` |
4615
+ * | Available validators | `required`, `number_range` |
4616
+ *
4617
+ * </details>
4618
+ *
4619
+ * <details>
4620
+ * <summary>Date (<code>date</code>)</summary>
4621
+ *
4622
+ * | Property | Value |
4623
+ * | ------------------------------ | ------------------------ |
4624
+ * | Code | `date` |
4625
+ * | Built-in editors for the field | `date_picker` |
4626
+ * | Available validators | `required`, `date_range` |
4627
+ *
4628
+ * </details>
4629
+ *
4630
+ * <details>
4631
+ * <summary>Date time (<code>date_time</code>)</summary>
4632
+ *
4633
+ * | Property | Value |
4634
+ * | ------------------------------ | ----------------------------- |
4635
+ * | Code | `date_time` |
4636
+ * | Built-in editors for the field | `date_time_picker` |
4637
+ * | Available validators | `required`, `date_time_range` |
4638
+ *
4639
+ * </details>
4640
+ *
4641
+ * <details>
4642
+ * <summary>Color (<code>color</code>)</summary>
4643
+ *
4644
+ * | Property | Value |
4645
+ * | ------------------------------ | -------------- |
4646
+ * | Code | `color` |
4647
+ * | Built-in editors for the field | `color_picker` |
4648
+ * | Available validators | `required` |
4649
+ *
4650
+ * </details>
4651
+ *
4652
+ * <details>
4653
+ * <summary>JSON (<code>json</code>)</summary>
4654
+ *
4655
+ * | Property | Value |
4656
+ * | ------------------------------ | ------------------------------------------------------ |
4657
+ * | Code | `json` |
4658
+ * | Built-in editors for the field | `json`, `string_multi_select`, `string_checkbox_group` |
4659
+ * | Available validators | `required` |
4660
+ *
4661
+ * </details>
4662
+ *
4663
+ * <details>
4664
+ * <summary>Location (<code>lat_lon</code>)</summary>
4665
+ *
4666
+ * | Property | Value |
4667
+ * | ------------------------------ | ---------- |
4668
+ * | Code | `lat_lon` |
4669
+ * | Built-in editors for the field | `map` |
4670
+ * | Available validators | `required` |
4671
+ *
4672
+ * </details>
4673
+ *
4674
+ * <details>
4675
+ * <summary>SEO (<code>seo</code>)</summary>
4676
+ *
4677
+ * | Property | Value |
4678
+ * | ------------------------------ | -------------------------------------------------------------------------------------------- |
4679
+ * | Code | `seo` |
4680
+ * | Built-in editors for the field | `seo` |
4681
+ * | Available validators | `required_seo_fields`, `file_size`, `image_dimensions`, `title_length`, `description_length` |
4682
+ *
4683
+ * </details>
4684
+ *
4685
+ * <details>
4686
+ * <summary>Slug (<code>slug</code>)</summary>
4687
+ *
4688
+ * | Property | Value |
4689
+ * | ------------------------------ | ----------------------------------- |
4690
+ * | Code | `slug` |
4691
+ * | Built-in editors for the field | `slug` |
4692
+ * | Required validators | `slug_title_field` |
4693
+ * | Other validators available | `required`, `length`, `slug_format` |
4694
+ *
4695
+ * </details>
4696
+ *
4697
+ * <details>
4698
+ * <summary>External video (<code>video</code>)</summary>
4699
+ *
4700
+ * | Property | Value |
4701
+ * | ------------------------------ | ---------- |
4702
+ * | Code | `video` |
4703
+ * | Built-in editors for the field | `video` |
4704
+ * | Available validators | `required` |
4705
+ *
4706
+ * </details>
4707
+ *
4708
+ * <details>
4709
+ * <summary>Single-asset (<code>file</code>)</summary>
4710
+ *
4711
+ * | Property | Value |
4712
+ * | ------------------------------ | ------------------------------------------------------------------------------ |
4713
+ * | Code | `file` |
4714
+ * | Built-in editors for the field | `file` |
4715
+ * | Available validators | `required`, `file_size`, `image_dimensions`, `extension`, `required_alt_title` |
4716
+ *
4717
+ * </details>
4718
+ *
4719
+ * <details>
4720
+ * <summary>Asset gallery (<code>gallery</code>)</summary>
4721
+ *
4722
+ * | Property | Value |
4723
+ * | ------------------------------ | -------------------------------------------------------------------------- |
4724
+ * | Code | `gallery` |
4725
+ * | Built-in editors for the field | `gallery` |
4726
+ * | Available validators | `size`, `file_size`, `image_dimensions`, `extension`, `required_alt_title` |
4727
+ *
4728
+ * </details>
4729
+ *
4730
+ * <details>
4731
+ * <summary>Single link (<code>link</code>)</summary>
4732
+ *
4733
+ * | Property | Value |
4734
+ * | ------------------------------ | --------------------------- |
4735
+ * | Code | `link` |
4736
+ * | Built-in editors for the field | `link_select`, `link_embed` |
4737
+ * | Default `editor` | `link_select` |
4738
+ * | Required validators | `item_item_type` |
4739
+ * | Other validators available | `required`, `unique` |
4740
+ *
4741
+ * </details>
4742
+ *
4743
+ * <details>
4744
+ * <summary>Multiple links (<code>links</code>)</summary>
4745
+ *
4746
+ * | Property | Value |
4747
+ * | ------------------------------ | ----------------------------- |
4748
+ * | Code | `links` |
4749
+ * | Built-in editors for the field | `links_select`, `links_embed` |
4750
+ * | Default `editor` | `links_select` |
4751
+ * | Required validators | `items_item_type` |
4752
+ * | Other validators available | `size` |
4753
+ *
4754
+ * </details>
4755
+ *
4756
+ * <details>
4757
+ * <summary>Modular content (<code>rich_text</code>)</summary>
4758
+ *
4759
+ * | Property | Value |
4760
+ * | ------------------------------ | ------------------ |
4761
+ * | Code | `rich_text` |
4762
+ * | Built-in editors for the field | `rich_text` |
4763
+ * | Required validators | `rich_text_blocks` |
4764
+ * | Other validators available | `size` |
4765
+ *
4766
+ * </details>
4767
+ *
4768
+ * <details>
4769
+ * <summary>Structured text (<code>structured_text</code>)</summary>
4770
+ *
4771
+ * | Property | Value |
4772
+ * | ------------------------------ | ------------------------------------------------- |
4773
+ * | Code | `structured_text` |
4774
+ * | Built-in editors for the field | `structured_text` |
4775
+ * | Required validators | `structured_text_blocks`, `structured_text_links` |
4776
+ * | Other validators available | `length` |
4777
+ *
4778
+ * </details>
4779
+ *
4780
+ * ### Validators
4781
+ *
4782
+ * <details>
4783
+ * <summary><code>date_range</code></summary>
4784
+ *
4785
+ * Accept dates only inside a specified date range.
4786
+ *
4787
+ * | Parameter | Type | Required | Description |
4788
+ * | --------- | ------------- | -------- | ------------ |
4789
+ * | `min` | ISO 8601 date | | Minimum date |
4790
+ * | `max` | ISO 8601 date | | Maximum date |
4791
+ *
4792
+ * At least one of the parameters must be specified.
4793
+ *
4794
+ * </details>
4795
+ *
4796
+ * <details>
4797
+ * <summary><code>date_time_range</code></summary>
4798
+ *
4799
+ * Accept date times only inside a specified date range.
4800
+ *
4801
+ * | Parameter | Type | Required | Description |
4802
+ * | --------- | ----------------- | -------- | ---------------- |
4803
+ * | `min` | ISO 8601 datetime | | Minimum datetime |
4804
+ * | `max` | ISO 8601 datetime | | Maximum datetime |
4805
+ *
4806
+ * At least one of the parameters must be specified.
4807
+ *
4808
+ * </details>
4809
+ *
4810
+ * <details>
4811
+ * <summary><code>enum</code></summary>
4812
+ *
4813
+ * Only accept a specific set of values
4814
+ *
4815
+ * | Parameter | Type | Required | Description |
4816
+ * | --------- | --------------- | -------- | --------------------- |
4817
+ * | `values` | `Array<String>` | ✅ | Set of allowed values |
4818
+ *
4819
+ * </details>
4820
+ *
4821
+ * <details>
4822
+ * <summary><code>extension</code></summary>
4823
+ *
4824
+ * Only accept assets with specific file extensions.
4825
+ *
4826
+ * | Parameter | Type | Required | Description |
4827
+ * | ----------------- | ----------------------------------------- | -------- | ------------------------------ |
4828
+ * | `extensions` | `Array<String>` | | Set of allowed file extensions |
4829
+ * | `predefined_list` | one of `"image"`, `"video"`, `"document"` | | Allowed file type |
4830
+ *
4831
+ * Only one of the parameters must be specified.
4832
+ *
4833
+ * </details>
4834
+ *
4835
+ * <details>
4836
+ * <summary><code>file_size</code></summary>
4837
+ *
4838
+ * Accept assets only inside a specified date range.
4839
+ *
4840
+ * | Parameter | Type | Required | Description |
4841
+ * | ----------- | ---------------------------- | -------- | ---------------------------------- |
4842
+ * | `min_value` | `Integer` | | Numeric value for minimum filesize |
4843
+ * | `min_unit` | one of `"B"`, `"KB"`, `"MB"` | | Unit for minimum filesize |
4844
+ * | `max_value` | `Integer` | | Numeric value for maximum filesize |
4845
+ * | `max_unit` | one of `"B"`, `"KB"`, `"MB"` | | Unit for maximum filesize |
4846
+ *
4847
+ * At least one couple of value/unit must be specified.
4848
+ *
4849
+ * </details>
4850
+ *
4851
+ * <details>
4852
+ * <summary><code>format</code></summary>
4853
+ *
4854
+ * Only accept strings having a specific format.
4855
+ *
4856
+ * | Parameter | Type | Required | Description |
4857
+ * | -------------------- | ------------------------- | -------- | ---------------------------------- |
4858
+ * | `custom_pattern` | `Regexp` | | Regular expression to be validated |
4859
+ * | `predefined_pattern` | one of `"email"`, `"url"` | | Allowed format |
4860
+ *
4861
+ * Only one of the parameters must be specified.
4862
+ *
4863
+ * </details>
4864
+ *
4865
+ * <details>
4866
+ * <summary><code>slug_format</code></summary>
4867
+ *
4868
+ * Only accept slugs having a specific format.
4869
+ *
4870
+ * | Parameter | Type | Required | Description |
4871
+ * | -------------------- | ---------------- | -------- | ---------------------------------- |
4872
+ * | `custom_pattern` | `Regexp` | | Regular expression to be validated |
4873
+ * | `predefined_pattern` | `"webpage_slug"` | | Allowed format |
4874
+ *
4875
+ * Only one of the parameters must be specified.
4876
+ *
4877
+ * </details>
4878
+ *
4879
+ * <details>
4880
+ * <summary><code>image_dimensions</code></summary>
4881
+ *
4882
+ * Accept assets only within a specified height/width range.
4883
+ *
4884
+ * | Parameter | Type | Required | Description |
4885
+ * | ------------------ | --------- | -------- | -------------------------------- |
4886
+ * | `width_min_value` | `Integer` | | Numeric value for minimum width |
4887
+ * | `width_max_value` | `Integer` | | Numeric value for maximum height |
4888
+ * | `height_min_value` | `Integer` | | Numeric value for minimum width |
4889
+ * | `height_max_value` | `Integer` | | Numeric value for maximum height |
4890
+ *
4891
+ * At least one parameter must be specified.
4892
+ *
4893
+ * </details>
4894
+ *
4895
+ * <details>
4896
+ * <summary><code>item_item_type</code></summary>
4897
+ *
4898
+ * Only accept references to records of the specified models.
4899
+ *
4900
+ * | Parameter | Type | Required | Description |
4901
+ * | ------------------------------------------------- | ------------------------------------------------------------------------ | -------- | --------------------------------------------------------------------------------------------------- |
4902
+ * | `item_types` | `Array<Model ID>` | ✅ | Set of allowed model IDs |
4903
+ * | `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 |
4904
+ * | `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 |
4905
+ * | `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 |
4906
+ *
4907
+ * Possible values for `on_publish_with_unpublished_references_strategy`:
4908
+ *
4909
+ * - `"fail"`: Fail the operation and notify the user
4910
+ * - `"publish_references"`: Publish also the referenced records
4911
+ *
4912
+ * Possible values for `on_reference_unpublish_strategy`:
4913
+ *
4914
+ * - `"fail"`: Fail the operation and notify the user
4915
+ * - `"unpublish"`: Unpublish also this record
4916
+ * - `"delete_references"`: Try to remove the reference to the unpublished record (if the field has a `required` validation it will fail)
4917
+ *
4918
+ * Possible values for `on_reference_delete_strategy`:
4919
+ *
4920
+ * - `"fail"`: Fail the operation and notify the user
4921
+ * - `"delete_references"`: Try to remove the reference to the deleted record (if the field has a `required` validation it will fail)
4922
+ * </details>
4923
+ *
4924
+ * <details>
4925
+ * <summary><code>items_item_type</code></summary>
4926
+ *
4927
+ * Only accept references to records of the specified models.
4928
+ *
4929
+ * | Parameter | Type | Required | Description |
4930
+ * | ------------------------------------------------- | ------------------------------------------------------------------------ | -------- | --------------------------------------------------------------------------------------------------- |
4931
+ * | `item_types` | `Array<Model ID>` | ✅ | Set of allowed model IDs |
4932
+ * | `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 |
4933
+ * | `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 |
4934
+ * | `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 |
4935
+ *
4936
+ * Possible values for `on_publish_with_unpublished_references_strategy`:
4937
+ *
4938
+ * - `"fail"`: Fail the operation and notify the user
4939
+ * - `"publish_references"`: Publish also the referenced records
4940
+ *
4941
+ * Possible values for `on_reference_unpublish_strategy`:
4942
+ *
4943
+ * - `"fail"`: Fail the operation and notify the user
4944
+ * - `"unpublish"`: Unpublish also this record
4945
+ * - `"delete_references"`: Try to remove the reference to the unpublished record (if the field has a `required` validation it will fail)
4946
+ *
4947
+ * Possible values for `on_reference_delete_strategy`:
4948
+ *
4949
+ * - `"fail"`: Fail the operation and notify the user
4950
+ * - `"delete_references"`: Try to remove the reference to the deleted record (if the field has a `required` validation it will fail)
4951
+ * </details>
4952
+ *
4953
+ * <details>
4954
+ * <summary><code>length</code></summary>
4955
+ *
4956
+ * Accept strings only with a specified number of characters.
4957
+ *
4958
+ * | Parameter | Type | Required | Description |
4959
+ * | --------- | --------- | -------- | --------------- |
4960
+ * | `min` | `Integer` | | Minimum length |
4961
+ * | `eq` | `Integer` | | Expected length |
4962
+ * | `max` | `Integer` | | Maximum length |
4963
+ *
4964
+ * At least one parameter must be specified.
4965
+ *
4966
+ * </details>
4967
+ *
4968
+ * <details>
4969
+ * <summary><code>number_range</code></summary>
4970
+ *
4971
+ * Accept numbers only inside a specified range.
4972
+ *
4973
+ * | Parameter | Type | Required | Description |
4974
+ * | --------- | ------- | -------- | ------------- |
4975
+ * | `min` | `Float` | | Minimum value |
4976
+ * | `max` | `Float` | | Maximum value |
4977
+ *
4978
+ * At least one of the parameters must be specified.
4979
+ *
4980
+ * </details>
4981
+ *
4982
+ * <details>
4983
+ * <summary><code>required</code></summary>
4984
+ *
4985
+ * Value must be specified or it won't be valid.
4986
+ *
4987
+ * </details>
4988
+ *
4989
+ * <details>
4990
+ * <summary><code>required_alt_title</code></summary>
4991
+ *
4992
+ * Assets contained in the field are required to specify custom title or alternate text, or they won't be valid.
4993
+ *
4994
+ * | Parameter | Type | Required | Description |
4995
+ * | --------- | --------- | -------- | ---------------------------------------------------------- |
4996
+ * | `title` | `Boolean` | | Whether the title for the asset must be specified |
4997
+ * | `alt` | `Boolean` | | Whether the alternate text for the asset must be specified |
4998
+ *
4999
+ * At least one of the parameters must be specified.
5000
+ *
5001
+ * </details>
5002
+ *
5003
+ * <details>
5004
+ * <summary><code>required_seo_fields</code></summary>
5005
+ *
5006
+ * SEO field is to specify one or more properties, or it won't be valid.
5007
+ *
5008
+ * | Parameter | Type | Required | Description |
5009
+ * | -------------- | --------- | -------- | -------------------------------------------------- |
5010
+ * | `title` | `Boolean` | | Whether the meta title must be specified |
5011
+ * | `description` | `Boolean` | | Whether the meta description must be specified |
5012
+ * | `image` | `Boolean` | | Whether the social sharing image must be specified |
5013
+ * | `twitter_card` | `Boolean` | | Whether the type of Twitter card must be specified |
5014
+ *
5015
+ * At least one of the parameters must be specified.
5016
+ *
5017
+ * </details>
5018
+ *
5019
+ * <details>
5020
+ * <summary><code>title_length</code></summary>
5021
+ *
5022
+ * 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.
5023
+ *
5024
+ * | Parameter | Type | Required | Description |
5025
+ * | --------- | --------- | -------- | ------------- |
5026
+ * | `min` | `Integer` | | Minimum value |
5027
+ * | `max` | `Integer` | | Maximum value |
5028
+ *
5029
+ * At least one of the parameters must be specified.
5030
+ *
5031
+ * </details>
5032
+ *
5033
+ * <details>
5034
+ * <summary><code>description_length</code></summary>
5035
+ *
5036
+ * 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.
5037
+ *
5038
+ * | Parameter | Type | Required | Description |
5039
+ * | --------- | --------- | -------- | ------------- |
5040
+ * | `min` | `Integer` | | Minimum value |
5041
+ * | `max` | `Integer` | | Maximum value |
5042
+ *
5043
+ * At least one of the parameters must be specified.
5044
+ *
5045
+ * </details>
5046
+ *
5047
+ * <details>
5048
+ * <summary><code>rich_text_blocks</code></summary>
5049
+ *
5050
+ * Only accept references to block records of the specified block models.
5051
+ *
5052
+ * | Parameter | Type | Required | Description |
5053
+ * | ------------ | ----------------------- | -------- | ------------------------------ |
5054
+ * | `item_types` | `Array<Block Model ID>` | ✅ | Set of allowed Block Model IDs |
5055
+ *
5056
+ * </details>
5057
+ *
5058
+ * <details>
5059
+ * <summary><code>structured_text_blocks</code></summary>
5060
+ *
5061
+ * Only accept references to block records of the specified block models.
5062
+ *
5063
+ * | Parameter | Type | Required | Description |
5064
+ * | ------------ | ----------------------- | -------- | ------------------------------ |
5065
+ * | `item_types` | `Array<Block Model ID>` | ✅ | Set of allowed Block Model IDs |
5066
+ *
5067
+ * </details>
5068
+ *
5069
+ * <details>
5070
+ * <summary><code>structured_text_links</code></summary>
5071
+ *
5072
+ * Only accept `itemLink` to `inlineItem` nodes for records of the specified models.
5073
+ *
5074
+ * | Parameter | Type | Required | Description |
5075
+ * | ------------------------------------------------- | ------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------- |
5076
+ * | `item_types` | `Array<Model ID>` | ✅ | Set of allowed model IDs |
5077
+ * | `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 |
5078
+ * | `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 |
5079
+ * | `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 |
5080
+ *
5081
+ * Possible values for `on_publish_with_unpublished_references_strategy`:
5082
+ *
5083
+ * - `"fail"`: Fail the operation and notify the user
5084
+ * - `"publish_references"`: Publish also the referenced records
5085
+ *
5086
+ * Possible values for `on_reference_unpublish_strategy`:
5087
+ *
5088
+ * - `"fail"`: Fail the operation and notify the user
5089
+ * - `"unpublish"`: Unpublish also this record
5090
+ * - `"delete_references"`: Try to remove the reference to the unpublished record (if the field has a `required` validation it will fail)
5091
+ *
5092
+ * Possible values for `on_reference_delete_strategy`:
5093
+ *
5094
+ * - `"fail"`: Fail the operation and notify the user
5095
+ * - `"delete_references"`: Try to remove the reference to the deleted record (if the field has a `required` validation it will fail)
5096
+ * </details>
5097
+ *
5098
+ * <details>
5099
+ * <summary><code>size</code></summary>
5100
+ *
5101
+ * Only accept a number of items within the specified range.
5102
+ *
5103
+ * | Parameter | Type | Required | Description |
5104
+ * | ------------- | --------- | -------- | -------------------------------------------------- |
5105
+ * | `min` | `Integer` | | Minimum length |
5106
+ * | `eq` | `Integer` | | Expected length |
5107
+ * | `max` | `Integer` | | Maximum length |
5108
+ * | `multiple_of` | `Integer` | | The number of items must be multiple of this value |
5109
+ *
5110
+ * At least one parameter must be specified.
5111
+ *
5112
+ * </details>
5113
+ *
5114
+ * <details>
5115
+ * <summary><code>slug_title_field</code></summary>
5116
+ *
5117
+ * Specifies the ID of the _Single-line string_ field that will be used to generate the slug
5118
+ *
5119
+ * | Parameter | Type | Required | Description |
5120
+ * | ---------------- | ---------- | -------- | ------------------------------------------------ |
5121
+ * | `title_field_id` | `Field ID` | ✅ | The field that will be used to generate the slug |
5122
+ *
5123
+ * </details>
5124
+ *
5125
+ * <details>
5126
+ * <summary><code>unique</code></summary>
5127
+ *
5128
+ * The value must be unique across the whole collection of records.
5129
+ *
5130
+ * </details>
5131
+ *
5132
+ * ### Configuration parameters for DatoCMS built-in field editors
5133
+ *
5134
+ * If a field editor is not specified in this table, just pass an empty object `{}` as its configuration parameters.
5135
+ *
5136
+ * <details>
5137
+ * <summary><code>boolean_radio_group</code></summary>
5138
+ *
5139
+ * Radio group input for _boolean_ fields.
5140
+ *
5141
+ * | Parameter | Type | Required | Description |
5142
+ * | ---------------- | ---------------------------------- | -------- | ----------------------------------------- |
5143
+ * | `positive_radio` | `{ label: string, hint?: string }` | ✅ | Radio input for positive choice (`true`) |
5144
+ * | `negative_radio` | `{ label: string, hint?: string }` | ✅ | Radio input for negative choice (`false`) |
5145
+ *
5146
+ * </details>
5147
+ *
5148
+ * <details>
5149
+ * <summary><code>string_radio_group</code></summary>
5150
+ *
5151
+ * Radio group input for _string_ fields.
5152
+ *
5153
+ * | Parameter | Type | Required | Description |
5154
+ * | --------- | -------------------------------------------------------- | -------- | --------------------------- |
5155
+ * | `radios` | `Array<{ label: string, value: string, hint?: string }>` | ✅ | The different radio options |
5156
+ *
5157
+ * </details>
5158
+ *
5159
+ * <details>
5160
+ * <summary><code>string_select</code></summary>
5161
+ *
5162
+ * Select input for _string_ fields.
5163
+ *
5164
+ * | Parameter | Type | Required | Description |
5165
+ * | --------- | -------------------------------------------------------- | -------- | ---------------------------- |
5166
+ * | `options` | `Array<{ label: string, value: string, hint?: string }>` | ✅ | The different select options |
5167
+ *
5168
+ * </details>
5169
+ *
5170
+ * <details>
5171
+ * <summary><code>string_multi_select</code></summary>
5172
+ *
5173
+ * Select input for _JSON_ fields, to edit an array of strings.
5174
+ *
5175
+ * | Parameter | Type | Required | Description |
5176
+ * | --------- | -------------------------------------------------------- | -------- | ---------------------------- |
5177
+ * | `options` | `Array<{ label: string, value: string, hint?: string }>` | ✅ | The different select options |
5178
+ *
5179
+ * </details>
5180
+ *
5181
+ * <details>
5182
+ * <summary><code>string_checkbox_group</code></summary>
5183
+ *
5184
+ * Multiple chechboxes input for _JSON_ fields, to edit an array of strings.
5185
+ *
5186
+ * | Parameter | Type | Required | Description |
5187
+ * | --------- | -------------------------------------------------------- | -------- | ---------------------------- |
5188
+ * | `options` | `Array<{ label: string, value: string, hint?: string }>` | ✅ | The different select options |
5189
+ *
5190
+ * </details>
5191
+ *
5192
+ * <details>
5193
+ * <summary><code>single_line</code></summary>
5194
+ *
5195
+ * Simple textual input for _Single-line string_ fields.
5196
+ *
5197
+ * | Parameter | Type | Required | Description |
5198
+ * | --------- | --------- | -------- | -------------------------------------------------------------------------------- |
5199
+ * | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
5200
+ *
5201
+ * </details>
5202
+ *
5203
+ * <details>
5204
+ * <summary><code>markdown</code></summary>
5205
+ *
5206
+ * Markdown editor for _Multiple-paragraph text_ fields.
4162
5207
  *
4163
- * This interface was referenced by `Field`'s JSON-Schema
4164
- * via the `create.targetSchema` link.
5208
+ * | Parameter | Type | Required | Description |
5209
+ * | --------- | --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
5210
+ * | `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"` |
4165
5211
  *
4166
- * This interface was referenced by `Field`'s JSON-Schema
4167
- * via the `update.targetSchema` link.
5212
+ * </details>
4168
5213
  *
4169
- * This interface was referenced by `Field`'s JSON-Schema
4170
- * via the `destroy.targetSchema` link.
5214
+ * <details>
5215
+ * <summary><code>wysiwyg</code></summary>
4171
5216
  *
4172
- * This interface was referenced by `Field`'s JSON-Schema
4173
- * via the `duplicate.targetSchema` link.
5217
+ * HTML editor for _Multiple-paragraph text_ fields.
4174
5218
  *
4175
- * This interface was referenced by `Item`'s JSON-Schema
4176
- * via the `duplicate.targetSchema` link.
5219
+ * | Parameter | Type | Required | Description |
5220
+ * | --------- | --------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
5221
+ * | `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"` |
4177
5222
  *
4178
- * This interface was referenced by `Item`'s JSON-Schema
4179
- * via the `destroy.targetSchema` link.
5223
+ * </details>
4180
5224
  *
4181
- * This interface was referenced by `Item`'s JSON-Schema
4182
- * via the `batch_destroy.targetSchema` link.
5225
+ * <details>
5226
+ * <summary><code>textarea</code></summary>
4183
5227
  *
4184
- * This interface was referenced by `Item`'s JSON-Schema
4185
- * via the `batch_publish.targetSchema` link.
5228
+ * Basic textarea editor for _Multiple-paragraph text_ fields.
4186
5229
  *
4187
- * This interface was referenced by `Item`'s JSON-Schema
4188
- * via the `batch_unpublish.targetSchema` link.
5230
+ * </details>
4189
5231
  *
4190
- * This interface was referenced by `Item`'s JSON-Schema
4191
- * via the `bulk_publish.targetSchema` link.
5232
+ * <details>
5233
+ * <summary><code>color_picker</code></summary>
4192
5234
  *
4193
- * This interface was referenced by `Item`'s JSON-Schema
4194
- * via the `bulk_unpublish.targetSchema` link.
5235
+ * Built-in editor for _Color_ fields.
4195
5236
  *
4196
- * This interface was referenced by `Item`'s JSON-Schema
4197
- * via the `bulk_destroy.targetSchema` link.
5237
+ * | Parameter | Type | Required | Description |
5238
+ * | --------------- | ------------------------- | -------- | --------------------------------------------------------- |
5239
+ * | `enable_alpha` | `Boolean` | ✅ | Should the color picker allow to specify the alpha value? |
5240
+ * | `preset_colors` | `Array<Hex color string>` | ✅ | List of preset colors to offer to the user |
4198
5241
  *
4199
- * This interface was referenced by `Item`'s JSON-Schema
4200
- * via the `bulk_move_to_stage.targetSchema` link.
5242
+ * </details>
4201
5243
  *
4202
- * This interface was referenced by `ItemVersion`'s JSON-Schema
4203
- * via the `restore.targetSchema` link.
5244
+ * <details>
5245
+ * <summary><code>slug</code></summary>
4204
5246
  *
4205
- * This interface was referenced by `Upload`'s JSON-Schema
4206
- * via the `create.targetSchema` link.
5247
+ * Built-in editor for _Slug_ fields.
4207
5248
  *
4208
- * This interface was referenced by `Upload`'s JSON-Schema
4209
- * via the `update.targetSchema` link.
5249
+ * | Parameter | Type | Required | Description |
5250
+ * | ------------ | -------- | -------- | -------------------------------------------------------------------------------------- |
5251
+ * | `url_prefix` | `String` | | A prefix that will be shown in the editor's form to give some context to your editors. |
4210
5252
  *
4211
- * This interface was referenced by `Upload`'s JSON-Schema
4212
- * via the `batch_add_tags.targetSchema` link.
5253
+ * </details>
4213
5254
  *
4214
- * This interface was referenced by `Upload`'s JSON-Schema
4215
- * via the `batch_destroy.targetSchema` link.
5255
+ * <details>
5256
+ * <summary><code>rich_text</code></summary>
4216
5257
  *
4217
- * This interface was referenced by `Upload`'s JSON-Schema
4218
- * via the `bulk_tag.targetSchema` link.
5258
+ * Built-in editor for _Modular content_ fields.
4219
5259
  *
4220
- * This interface was referenced by `Upload`'s JSON-Schema
4221
- * via the `bulk_destroy.targetSchema` link.
5260
+ * | Parameter | Type | Required | Description |
5261
+ * | ----------------- | --------- | -------- | ---------------------------------------------------------- |
5262
+ * | `start_collapsed` | `Boolean` | | Whether you want block records collapsed by default or not |
4222
5263
  *
4223
- * This interface was referenced by `Site`'s JSON-Schema
4224
- * via the `update.targetSchema` link.
5264
+ * </details>
4225
5265
  *
4226
- * This interface was referenced by `DatoApi`'s JSON-Schema
4227
- * via the `definition` "job".
4228
- */
4229
- export type Job = {
4230
- id: JobIdentity;
4231
- type: JobType;
4232
- };
4233
- export type ItemTypeUpdateTargetSchema = Job;
4234
- export type ItemTypeDestroyTargetSchema = Job;
4235
- export type FieldCreateTargetSchema = Job;
4236
- export type FieldUpdateTargetSchema = Job;
4237
- export type FieldDestroyTargetSchema = Job;
4238
- export type FieldDuplicateTargetSchema = Job;
4239
- export type ItemDuplicateTargetSchema = Job;
4240
- export type ItemDestroyTargetSchema = Job;
4241
- export type ItemBatchDestroyTargetSchema = Job;
4242
- export type ItemBatchPublishTargetSchema = Job;
4243
- export type ItemBatchUnpublishTargetSchema = Job;
4244
- export type ItemBulkPublishTargetSchema = Job;
4245
- export type ItemBulkUnpublishTargetSchema = Job;
4246
- export type ItemBulkDestroyTargetSchema = Job;
4247
- export type ItemBulkMoveToStageTargetSchema = Job;
4248
- export type ItemVersionRestoreTargetSchema = Job;
4249
- export type UploadCreateTargetSchema = Job;
4250
- export type UploadUpdateTargetSchema = Job;
4251
- export type UploadBatchAddTagsTargetSchema = Job;
4252
- export type UploadBatchDestroyTargetSchema = Job;
4253
- export type UploadBulkTagTargetSchema = Job;
4254
- export type UploadBulkDestroyTargetSchema = Job;
4255
- export type SiteUpdateTargetSchema = Job;
4256
- /**
4257
- * JSON API data
5266
+ * <details>
5267
+ * <summary><code>structured_text</code></summary>
5268
+ *
5269
+ * Built-in editor for _Structured text_ fields.
5270
+ *
5271
+ * | Parameter | Type | Required | Description |
5272
+ * | ------------------------- | --------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
5273
+ * | `nodes` | `Array<String>` | ✅ | Specify which nodes the field should allow. Valid values: `"blockquote"`, `"code"`, `"heading"`, `"link"`, `"list"`, `"thematicBreak"` |
5274
+ * | `marks` | `Array<String>` | ✅ | Specify which marks the field should allow. Valid values: `"strong"`, `"emphasis"`, `"underline"`, `"strikethrough"`, `"code"`, `"highlight"` |
5275
+ * | `blocks_start_collapsed` | `Boolean` | | Whether you want block nodes collapsed by default or not |
5276
+ * | `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 |
5277
+ * | `show_links_meta_editor` | `Boolean` | | Whether you want to show the complete meta editor for links |
5278
+ *
5279
+ * </details>
5280
+ *
5281
+ * <details>
5282
+ * <summary><code>link_select</code> and <code>links_select</code></summary>
5283
+ *
5284
+ * Use a select input with auto-completion to pick the records to reference inside the field.
5285
+ *
5286
+ * </details>
5287
+ *
5288
+ * <details>
5289
+ * <summary><code>link_embed</code> and <code>links_embed</code></summary>
5290
+ *
5291
+ * Use an expanded view with records' image preview to pick the records to reference inside the field.
5292
+ *
5293
+ * </details>
4258
5294
  *
4259
- * This interface was referenced by `Job`'s JSON-Schema
4260
- * via the `definition` "data".
4261
- */
4262
- export type JobData = {
4263
- type: JobType;
4264
- id: JobIdentity;
4265
- };
4266
-
4267
- /**
4268
- * 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.
4269
5295
  *
4270
5296
  * This interface was referenced by `DatoApi`'s JSON-Schema
4271
5297
  * via the `definition` "field".
@@ -4369,17 +5395,6 @@ export type FieldUpdateJobSchema = Field;
4369
5395
  export type FieldSelfTargetSchema = Field;
4370
5396
  export type FieldDestroyJobSchema = Field;
4371
5397
  export type FieldDuplicateJobSchema = Field;
4372
- /**
4373
- * JSON API data
4374
- *
4375
- * This interface was referenced by `Fieldset`'s JSON-Schema
4376
- * via the `definition` "data".
4377
- */
4378
- export type FieldsetData = {
4379
- type: FieldsetType;
4380
- id: FieldsetIdentity;
4381
- };
4382
-
4383
5398
  /**
4384
5399
  * JSON API attributes
4385
5400
  *
@@ -4870,145 +5885,6 @@ export type SessionCreateSchema = {
4870
5885
  otp_code?: string;
4871
5886
  };
4872
5887
 
4873
- /**
4874
- * An API token allows access to our API. It is linked to a Role, which describes what actions can be performed.
4875
- *
4876
- * This interface was referenced by `DatoApi`'s JSON-Schema
4877
- * via the `definition` "access_token".
4878
- */
4879
- export type AccessToken = {
4880
- id: AccessTokenIdentity;
4881
- type: AccessTokenType;
4882
- /**
4883
- * Name of API token
4884
- */
4885
- name: string;
4886
- /**
4887
- * The actual API token
4888
- */
4889
- token?: string;
4890
- /**
4891
- * Whether this API token can access the Content Delivery API published content endpoint
4892
- */
4893
- can_access_cda: boolean;
4894
- /**
4895
- * Whether this API token can access the Content Delivery API draft content endpoint
4896
- */
4897
- can_access_cda_preview: boolean;
4898
- /**
4899
- * Whether this API token can access the Content Management API
4900
- */
4901
- can_access_cma: boolean;
4902
- hardcoded_type: null | string;
4903
- role: RoleData | null;
4904
- };
4905
- export type AccessTokenCreateTargetSchema = AccessToken;
4906
- export type AccessTokenUpdateTargetSchema = AccessToken;
4907
- export type AccessTokenSelfTargetSchema = AccessToken;
4908
- export type AccessTokenRegenerateTokenTargetSchema = AccessToken;
4909
- export type AccessTokenDestroyTargetSchema = AccessToken;
4910
- /**
4911
- * JSON API data
4912
- *
4913
- * This interface was referenced by `AccessToken`'s JSON-Schema
4914
- * via the `definition` "data".
4915
- */
4916
- export type AccessTokenData = {
4917
- type: AccessTokenType;
4918
- id: AccessTokenIdentity;
4919
- };
4920
-
4921
- /**
4922
- * JSON API attributes
4923
- *
4924
- * This interface was referenced by `AccessToken`'s JSON-Schema
4925
- * via the `definition` "attributes".
4926
- */
4927
- export type AccessTokenAttributes = {
4928
- /**
4929
- * Name of API token
4930
- */
4931
- name: string;
4932
- /**
4933
- * The actual API token
4934
- */
4935
- token?: string;
4936
- /**
4937
- * Whether this API token can access the Content Delivery API published content endpoint
4938
- */
4939
- can_access_cda: boolean;
4940
- /**
4941
- * Whether this API token can access the Content Delivery API draft content endpoint
4942
- */
4943
- can_access_cda_preview: boolean;
4944
- /**
4945
- * Whether this API token can access the Content Management API
4946
- */
4947
- can_access_cma: boolean;
4948
- hardcoded_type: null | string;
4949
- };
4950
-
4951
- /**
4952
- * JSON API links
4953
- *
4954
- * This interface was referenced by `AccessToken`'s JSON-Schema
4955
- * via the `definition` "relationships".
4956
- */
4957
- export type AccessTokenRelationships = {
4958
- role: RoleData | null;
4959
- };
4960
-
4961
- /**
4962
- * This interface was referenced by `AccessToken`'s JSON-Schema
4963
- * via the `create.schema` link.
4964
- */
4965
- export type AccessTokenCreateSchema = {
4966
- type?: AccessTokenType;
4967
- /**
4968
- * Name of API token
4969
- */
4970
- name: string;
4971
- /**
4972
- * Whether this API token can access the Content Delivery API published content endpoint
4973
- */
4974
- can_access_cda: boolean;
4975
- /**
4976
- * Whether this API token can access the Content Delivery API draft content endpoint
4977
- */
4978
- can_access_cda_preview: boolean;
4979
- /**
4980
- * Whether this API token can access the Content Management API
4981
- */
4982
- can_access_cma: boolean;
4983
- role: RoleData | null;
4984
- };
4985
-
4986
- /**
4987
- * This interface was referenced by `AccessToken`'s JSON-Schema
4988
- * via the `update.schema` link.
4989
- */
4990
- export type AccessTokenUpdateSchema = {
4991
- id?: AccessTokenIdentity;
4992
- type?: AccessTokenType;
4993
- /**
4994
- * Name of API token
4995
- */
4996
- name: string;
4997
- /**
4998
- * Whether this API token can access the Content Delivery API published content endpoint
4999
- */
5000
- can_access_cda: boolean;
5001
- /**
5002
- * Whether this API token can access the Content Delivery API draft content endpoint
5003
- */
5004
- can_access_cda_preview: boolean;
5005
- /**
5006
- * Whether this API token can access the Content Management API
5007
- */
5008
- can_access_cma: boolean;
5009
- role: RoleData | null;
5010
- };
5011
-
5012
5888
  /**
5013
5889
  * Plugins enable developers to replace DatoCMS field components with HTML5 applications so the editing experiences of the DatoCMS web app can be customized.
5014
5890
  *
@@ -6730,6 +7606,10 @@ export type EnvironmentMeta = {
6730
7606
  * Is this environment the primary for the project?
6731
7607
  */
6732
7608
  primary: boolean;
7609
+ /**
7610
+ * ID of the environment that's been forked to generate this one
7611
+ */
7612
+ forked_from?: string | null;
6733
7613
  };
6734
7614
 
6735
7615
  /**
@@ -8478,9 +9358,24 @@ export type Site = {
8478
9358
  * The list of site roles
8479
9359
  */
8480
9360
  roles: RoleData[];
9361
+ meta: SiteMeta;
8481
9362
  };
8482
9363
  export type SiteSelfTargetSchema = Site;
8483
9364
  export type SiteUpdateJobSchema = Site;
9365
+ export type SiteActivateImprovedTimezoneManagementJobSchema = Site;
9366
+ /**
9367
+ * Meta attributes
9368
+ *
9369
+ * This interface was referenced by `Site`'s JSON-Schema
9370
+ * via the `definition` "meta".
9371
+ */
9372
+ export type SiteMeta = {
9373
+ /**
9374
+ * Whether the Improved API Timezone Management option is active or not
9375
+ */
9376
+ improved_timezone_management: boolean;
9377
+ };
9378
+
8484
9379
  /**
8485
9380
  * JSON API data
8486
9381
  *
@@ -8773,6 +9668,12 @@ export type SiteUpdateSchema = {
8773
9668
  */
8774
9669
  ip_tracking_enabled?: boolean;
8775
9670
  sso_default_role?: RoleData;
9671
+ meta?: {
9672
+ /**
9673
+ * Whether the Improved API Timezone Management option is active or not
9674
+ */
9675
+ improved_timezone_management?: boolean;
9676
+ };
8776
9677
  };
8777
9678
 
8778
9679
  /**