@datocms/cma-client 3.1.1 → 3.1.3

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 (36) hide show
  1. package/dist/cjs/generated/Client.js +2 -1
  2. package/dist/cjs/generated/Client.js.map +1 -1
  3. package/dist/cjs/generated/resources/EmojiSuggestions.js +87 -0
  4. package/dist/cjs/generated/resources/EmojiSuggestions.js.map +1 -0
  5. package/dist/cjs/generated/resources/Site.js +36 -0
  6. package/dist/cjs/generated/resources/Site.js.map +1 -1
  7. package/dist/cjs/generated/resources/index.js +3 -1
  8. package/dist/cjs/generated/resources/index.js.map +1 -1
  9. package/dist/esm/generated/Client.d.ts +1 -0
  10. package/dist/esm/generated/Client.js +2 -1
  11. package/dist/esm/generated/Client.js.map +1 -1
  12. package/dist/esm/generated/SchemaTypes.d.ts +213 -12
  13. package/dist/esm/generated/SimpleSchemaTypes.d.ts +236 -13
  14. package/dist/esm/generated/resources/EmojiSuggestions.d.ts +28 -0
  15. package/dist/esm/generated/resources/EmojiSuggestions.js +59 -0
  16. package/dist/esm/generated/resources/EmojiSuggestions.js.map +1 -0
  17. package/dist/esm/generated/resources/Site.d.ts +22 -0
  18. package/dist/esm/generated/resources/Site.js +36 -0
  19. package/dist/esm/generated/resources/Site.js.map +1 -1
  20. package/dist/esm/generated/resources/index.d.ts +1 -0
  21. package/dist/esm/generated/resources/index.js +1 -0
  22. package/dist/esm/generated/resources/index.js.map +1 -1
  23. package/dist/types/generated/Client.d.ts +1 -0
  24. package/dist/types/generated/SchemaTypes.d.ts +213 -12
  25. package/dist/types/generated/SimpleSchemaTypes.d.ts +236 -13
  26. package/dist/types/generated/resources/EmojiSuggestions.d.ts +28 -0
  27. package/dist/types/generated/resources/Site.d.ts +22 -0
  28. package/dist/types/generated/resources/index.d.ts +1 -0
  29. package/package.json +3 -3
  30. package/resources.json +44 -0
  31. package/src/generated/Client.ts +3 -1
  32. package/src/generated/SchemaTypes.ts +252 -42
  33. package/src/generated/SimpleSchemaTypes.ts +283 -53
  34. package/src/generated/resources/EmojiSuggestions.ts +46 -0
  35. package/src/generated/resources/Site.ts +51 -0
  36. package/src/generated/resources/index.ts +1 -0
@@ -380,6 +380,14 @@ export type ItemTypeCreateHrefSchema = {
380
380
  * Skip the creation of a menu item linked to the model
381
381
  */
382
382
  skip_menu_item_creation?: boolean;
383
+ /**
384
+ * Explicitely specify the ID of the menu item that will be linked to the model
385
+ */
386
+ menu_item_id?: string;
387
+ /**
388
+ * Explicitely specify the ID of the schema menu item that will be linked to the model
389
+ */
390
+ schema_menu_item_id?: string;
383
391
  [k: string]: unknown;
384
392
  };
385
393
  /**
@@ -509,7 +517,7 @@ export type BuildTriggerType = 'build_trigger';
509
517
  */
510
518
  export type ItemInstancesHrefSchema = {
511
519
  /**
512
- * For Modular Content fields and Structured Text fields. If set, returns full payload for nested blocks instead of IDs
520
+ * For Modular Content, Structured Text and Single Block fields. If set, returns full payload for nested blocks instead of IDs
513
521
  */
514
522
  nested?: boolean;
515
523
  /**
@@ -574,7 +582,7 @@ export type ItemInstancesHrefSchema = {
574
582
  */
575
583
  export type ItemReferencesHrefSchema = {
576
584
  /**
577
- * For Modular Content fields and Structured Text fields, return full payload for nested blocks instead of IDs
585
+ * For Modular Content, Structured Text and Single Block fields, return full payload for nested blocks instead of IDs
578
586
  */
579
587
  nested?: boolean;
580
588
  /**
@@ -589,7 +597,7 @@ export type ItemReferencesHrefSchema = {
589
597
  */
590
598
  export type ItemSelfHrefSchema = {
591
599
  /**
592
- * For Modular Content fields and Structured Text fields. If set, returns full payload for nested blocks instead of IDs
600
+ * For Modular Content, Structured Text and Single Block fields. If set, returns full payload for nested blocks instead of IDs
593
601
  */
594
602
  nested?: boolean;
595
603
  /**
@@ -664,7 +672,7 @@ export type ItemVersionIdentity = string;
664
672
  */
665
673
  export type ItemVersionInstancesHrefSchema = {
666
674
  /**
667
- * For Modular Content fields and Structured Text fields. If set, returns full payload for nested blocks instead of IDs
675
+ * For Modular Content, Structured Text and Single Block fields. If set, returns full payload for nested blocks instead of IDs
668
676
  */
669
677
  nested?: boolean;
670
678
  /**
@@ -864,7 +872,7 @@ export type UploadBatchDestroyHrefSchema = {
864
872
  */
865
873
  export type UploadReferencesHrefSchema = {
866
874
  /**
867
- * For Modular Content fields and Structured Text fields, return full payload for nested blocks instead of IDs
875
+ * For Modular Content, Structured Text and Single Block fields, return full payload for nested blocks instead of IDs
868
876
  */
869
877
  nested?: boolean;
870
878
  /**
@@ -1122,6 +1130,32 @@ export type SsoSettingsType = 'sso_settings';
1122
1130
  * via the `definition` "id".
1123
1131
  */
1124
1132
  export type SsoSettingsIdentity = string;
1133
+ /**
1134
+ * This interface was referenced by `EmojiSuggestions`'s JSON-Schema
1135
+ * via the `definition` "type".
1136
+ */
1137
+ export type EmojiSuggestionsType = 'emoji_suggestions';
1138
+ /**
1139
+ * ID
1140
+ *
1141
+ * This interface was referenced by `EmojiSuggestions`'s JSON-Schema
1142
+ * via the `definition` "identity".
1143
+ *
1144
+ * This interface was referenced by `EmojiSuggestions`'s JSON-Schema
1145
+ * via the `definition` "id".
1146
+ */
1147
+ export type EmojiSuggestionsIdentity = string;
1148
+ /**
1149
+ * This interface was referenced by `EmojiSuggestions`'s JSON-Schema
1150
+ * via the `self.hrefSchema` link.
1151
+ */
1152
+ export type EmojiSuggestionsSelfHrefSchema = {
1153
+ /**
1154
+ * The term for which we are seeking suggestions for emojis
1155
+ */
1156
+ term?: string;
1157
+ [k: string]: unknown;
1158
+ };
1125
1159
  /**
1126
1160
  * This interface was referenced by `WhiteLabelSettings`'s JSON-Schema
1127
1161
  * via the `definition` "type".
@@ -1371,6 +1405,7 @@ export type DatoApi = {
1371
1405
  form_data?: FormData;
1372
1406
  sso_group?: SsoGroup;
1373
1407
  sso_settings?: SsoSettings;
1408
+ emoji_suggestions?: EmojiSuggestions;
1374
1409
  white_label_settings?: WhiteLabelSettings;
1375
1410
  public_info?: PublicInfo;
1376
1411
  daily_usage?: DailyUsage;
@@ -3306,6 +3341,10 @@ export type SitePlanAttributes = {
3306
3341
  * Maximum size in bytes for a single file upload
3307
3342
  */
3308
3343
  maximum_single_upload_bytes: number;
3344
+ /**
3345
+ * Maximum size (in bytes) for a record, including its block records
3346
+ */
3347
+ item_byte_size: number;
3309
3348
  /**
3310
3349
  * Available extra packets
3311
3350
  */
@@ -4645,6 +4684,18 @@ export type ItemTypeDestroyJobSchema = {
4645
4684
  * </details>
4646
4685
  *
4647
4686
  * <details>
4687
+ * <summary>Single Block (<code>single_block</code>)</summary>
4688
+ *
4689
+ * | Property | Value |
4690
+ * | ------------------------------ | ----------------------------------------------- |
4691
+ * | Code | `single_block` |
4692
+ * | Built-in editors for the field | `framed_single_block`, `frameless_single_block` |
4693
+ * | Required validators | `single_block_blocks` |
4694
+ * | Other validators available | `required` |
4695
+ *
4696
+ * </details>
4697
+ *
4698
+ * <details>
4648
4699
  * <summary>Structured text (<code>structured_text</code>)</summary>
4649
4700
  *
4650
4701
  * | Property | Value |
@@ -4946,6 +4997,17 @@ export type ItemTypeDestroyJobSchema = {
4946
4997
  *
4947
4998
  * Only accept references to block records of the specified block models.
4948
4999
  *
5000
+ * | Parameter | Type | Required | Description |
5001
+ * | ------------ | ----------------------- | -------- | ------------------------------ |
5002
+ * | `item_types` | `Array<Block Model ID>` | ✅ | Set of allowed Block Model IDs |
5003
+ *
5004
+ * </details>
5005
+ *
5006
+ * <details>
5007
+ * <summary><code>single_block_blocks</code></summary>
5008
+ *
5009
+ * Only accept references to block records of the specified block models.
5010
+ *
4949
5011
  * | Parameter | Type | Required | Description |
4950
5012
  * | ------------ | ----------------------- | -------- | ------------------------------ |
4951
5013
  * | `item_types` | `Array<Block Model ID>` | ✅ | Set of allowed Block Model IDs |
@@ -5165,10 +5227,10 @@ export type ItemTypeDestroyJobSchema = {
5165
5227
  *
5166
5228
  * Built-in editor for _seo_ fields.
5167
5229
  *
5168
- * | Parameter | Type | Required | Description |
5169
- * | ---------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
5170
- * | `fields` | `Array<String>` | ✅ | Specify which fields of the SEO input should be visible to editors. Valid values: `"title"`, `"description"`, `"image"`, `"no_index"`, `"twitter_card"` |
5171
- * | `previews` | `Array<String>` | ✅ | Specify which previews should be visible to editors. Valid values: `"google_search"`, `"twitter"`, `"slack"`, `"whatsapp"`, `"telegram"`, `"facebook"` |
5230
+ * | Parameter | Type | Required | Description |
5231
+ * | ---------- | --------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
5232
+ * | `fields` | `Array<String>` | ✅ | Specify which fields of the SEO input should be visible to editors. Valid values: `"title"`, `"description"`, `"image"`, `"no_index"`, `"twitter_card"` |
5233
+ * | `previews` | `Array<String>` | ✅ | Specify which previews should be visible to editors. Valid values: `"google_search"`, `"twitter"`, `"slack"`, `"whatsapp"`, `"telegram"`, `"facebook"`, `"linkedin"` |
5172
5234
  *
5173
5235
  * </details>
5174
5236
  *
@@ -5184,6 +5246,17 @@ export type ItemTypeDestroyJobSchema = {
5184
5246
  * </details>
5185
5247
  *
5186
5248
  * <details>
5249
+ * <summary><code>framed_single_block</code></summary>
5250
+ *
5251
+ * Built-in editor for _Single block_ fields.
5252
+ *
5253
+ * | Parameter | Type | Required | Description |
5254
+ * | ----------------- | --------- | -------- | ---------------------------------------------------------- |
5255
+ * | `start_collapsed` | `Boolean` | | Whether you want block record collapsed by default or not |
5256
+ *
5257
+ * </details>
5258
+ *
5259
+ * <details>
5187
5260
  * <summary><code>structured_text</code></summary>
5188
5261
  *
5189
5262
  * Built-in editor for _Structured text_ fields.
@@ -5239,25 +5312,26 @@ export type FieldAttributes = {
5239
5312
  * Type of input
5240
5313
  */
5241
5314
  field_type:
5242
- | 'string'
5243
- | 'text'
5244
5315
  | 'boolean'
5245
- | 'integer'
5246
- | 'float'
5316
+ | 'color'
5247
5317
  | 'date'
5248
5318
  | 'date_time'
5249
- | 'color'
5250
- | 'json'
5251
- | 'lat_lon'
5252
- | 'seo'
5253
- | 'slug'
5254
- | 'video'
5255
5319
  | 'file'
5320
+ | 'float'
5256
5321
  | 'gallery'
5322
+ | 'integer'
5323
+ | 'json'
5324
+ | 'lat_lon'
5257
5325
  | 'link'
5258
5326
  | 'links'
5259
5327
  | 'rich_text'
5260
- | 'structured_text';
5328
+ | 'seo'
5329
+ | 'single_block'
5330
+ | 'slug'
5331
+ | 'string'
5332
+ | 'structured_text'
5333
+ | 'text'
5334
+ | 'video';
5261
5335
  /**
5262
5336
  * Whether the field needs to be multilanguage or not
5263
5337
  */
@@ -5385,25 +5459,26 @@ export type FieldCreateSchema = {
5385
5459
  * Type of input
5386
5460
  */
5387
5461
  field_type:
5388
- | 'string'
5389
- | 'text'
5390
5462
  | 'boolean'
5391
- | 'integer'
5392
- | 'float'
5463
+ | 'color'
5393
5464
  | 'date'
5394
5465
  | 'date_time'
5395
- | 'color'
5396
- | 'json'
5397
- | 'lat_lon'
5398
- | 'seo'
5399
- | 'slug'
5400
- | 'video'
5401
5466
  | 'file'
5467
+ | 'float'
5402
5468
  | 'gallery'
5469
+ | 'integer'
5470
+ | 'json'
5471
+ | 'lat_lon'
5403
5472
  | 'link'
5404
5473
  | 'links'
5405
5474
  | 'rich_text'
5406
- | 'structured_text';
5475
+ | 'seo'
5476
+ | 'single_block'
5477
+ | 'slug'
5478
+ | 'string'
5479
+ | 'structured_text'
5480
+ | 'text'
5481
+ | 'video';
5407
5482
  /**
5408
5483
  * Field API key
5409
5484
  */
@@ -5613,25 +5688,26 @@ export type FieldUpdateSchema = {
5613
5688
  * Type of input
5614
5689
  */
5615
5690
  field_type?:
5616
- | 'string'
5617
- | 'text'
5618
5691
  | 'boolean'
5619
- | 'integer'
5620
- | 'float'
5692
+ | 'color'
5621
5693
  | 'date'
5622
5694
  | 'date_time'
5623
- | 'color'
5624
- | 'json'
5625
- | 'lat_lon'
5626
- | 'seo'
5627
- | 'slug'
5628
- | 'video'
5629
5695
  | 'file'
5696
+ | 'float'
5630
5697
  | 'gallery'
5698
+ | 'integer'
5699
+ | 'json'
5700
+ | 'lat_lon'
5631
5701
  | 'link'
5632
5702
  | 'links'
5633
5703
  | 'rich_text'
5634
- | 'structured_text';
5704
+ | 'seo'
5705
+ | 'single_block'
5706
+ | 'slug'
5707
+ | 'string'
5708
+ | 'structured_text'
5709
+ | 'text'
5710
+ | 'video';
5635
5711
  /**
5636
5712
  * Field hint
5637
5713
  */
@@ -10027,6 +10103,50 @@ export type SsoSettingsUpdateTargetSchema = {
10027
10103
  data: SsoSettings;
10028
10104
  };
10029
10105
 
10106
+ /**
10107
+ * The entity suggests several emojis that are connected to a specific term
10108
+ *
10109
+ * This interface was referenced by `DatoApi`'s JSON-Schema
10110
+ * via the `definition` "emoji_suggestions".
10111
+ */
10112
+ export type EmojiSuggestions = {
10113
+ type: EmojiSuggestionsType;
10114
+ id: EmojiSuggestionsIdentity;
10115
+ attributes: EmojiSuggestionsAttributes;
10116
+ };
10117
+
10118
+ /**
10119
+ * JSON API attributes
10120
+ *
10121
+ * This interface was referenced by `EmojiSuggestions`'s JSON-Schema
10122
+ * via the `definition` "attributes".
10123
+ */
10124
+ export type EmojiSuggestionsAttributes = {
10125
+ /**
10126
+ * Emojis connected to a specific term
10127
+ */
10128
+ emojis: string[];
10129
+ };
10130
+
10131
+ /**
10132
+ * JSON API data
10133
+ *
10134
+ * This interface was referenced by `EmojiSuggestions`'s JSON-Schema
10135
+ * via the `definition` "data".
10136
+ */
10137
+ export type EmojiSuggestionsData = {
10138
+ type: EmojiSuggestionsType;
10139
+ id: EmojiSuggestionsIdentity;
10140
+ };
10141
+
10142
+ /**
10143
+ * This interface was referenced by `EmojiSuggestions`'s JSON-Schema
10144
+ * via the `self.targetSchema` link.
10145
+ */
10146
+ export type EmojiSuggestionsSelfTargetSchema = {
10147
+ data: EmojiSuggestions;
10148
+ };
10149
+
10030
10150
  /**
10031
10151
  * Represents the white-label settings of the current DatoCMS project
10032
10152
  *
@@ -10500,6 +10620,37 @@ export type SiteAttributes = {
10500
10620
  * If enabled, blocks schema changes of primary environment
10501
10621
  */
10502
10622
  force_use_of_sandbox_environments: boolean;
10623
+ /**
10624
+ * Allows setting default parameters for assets served through the CDN
10625
+ */
10626
+ assets_cdn_default_settings: {
10627
+ /**
10628
+ * Allows setting default parameters for optimizing images served by the CDN
10629
+ */
10630
+ image: {
10631
+ /**
10632
+ * Controls the output quality of lossy file formats (jpg, pjpg, webp, avif, or jxr). Valid values are in the range 0 – 100 and the default is 75.
10633
+ */
10634
+ q?: number;
10635
+ /**
10636
+ * The auto parameter helps automating a baseline level of optimization. Specify one or more settings
10637
+ */
10638
+ auto?: ('compress' | 'format' | 'enhance' | 'true' | 'redeye')[];
10639
+ /**
10640
+ * Specifies the color space of the output image
10641
+ */
10642
+ cs?: 'srgb' | 'adobergb1998' | 'tinysrgb' | 'strip';
10643
+ };
10644
+ /**
10645
+ * Allows setting default parameters for optimizing videos served by the CDN
10646
+ */
10647
+ video: {
10648
+ /**
10649
+ * When true, attempting to retrieve raw video files directly instead of their optimized counterparts will result in a HTTP 422 status code
10650
+ */
10651
+ disable_serving_raw_videos?: boolean;
10652
+ };
10653
+ };
10503
10654
  /**
10504
10655
  * Specifies the theme to use in administrative area
10505
10656
  */
@@ -10626,6 +10777,10 @@ export type SiteMeta = {
10626
10777
  * Whether the Improved boolean fields option is active or not
10627
10778
  */
10628
10779
  improved_boolean_fields: boolean;
10780
+ /**
10781
+ * Whether the site has custom upload storage settings
10782
+ */
10783
+ custom_upload_storage_settings?: boolean;
10629
10784
  };
10630
10785
 
10631
10786
  /**
@@ -10797,6 +10952,10 @@ export type SiteUpdateSchema = {
10797
10952
  * Whether the Improved boolean fields option is active or not
10798
10953
  */
10799
10954
  improved_boolean_fields?: boolean;
10955
+ /**
10956
+ * Whether the site has custom upload storage settings
10957
+ */
10958
+ custom_upload_storage_settings?: boolean;
10800
10959
  };
10801
10960
  relationships?: {
10802
10961
  sso_default_role?: {
@@ -10870,6 +11029,57 @@ export type SiteActivateImprovedBooleanFieldsTargetSchema = {
10870
11029
  data: Site;
10871
11030
  };
10872
11031
 
11032
+ /**
11033
+ * This interface was referenced by `Site`'s JSON-Schema
11034
+ * via the `update_assets_cdn_default_settings.schema` link.
11035
+ */
11036
+ export type SiteUpdateAssetsCdnDefaultSettingsSchema = {
11037
+ data: {
11038
+ type: string;
11039
+ attributes: {
11040
+ /**
11041
+ * Allows setting default parameters for assets served through the CDN
11042
+ */
11043
+ assets_cdn_default_settings: {
11044
+ /**
11045
+ * Allows setting default parameters for optimizing images served by the CDN
11046
+ */
11047
+ image: {
11048
+ /**
11049
+ * Controls the output quality of lossy file formats (jpg, pjpg, webp, avif, or jxr). Valid values are in the range 0 – 100 and the default is 75.
11050
+ */
11051
+ q?: number;
11052
+ /**
11053
+ * The auto parameter helps automating a baseline level of optimization. Specify one or more settings
11054
+ */
11055
+ auto?: ('compress' | 'format' | 'enhance' | 'true' | 'redeye')[];
11056
+ /**
11057
+ * Specifies the color space of the output image
11058
+ */
11059
+ cs?: 'srgb' | 'adobergb1998' | 'tinysrgb' | 'strip';
11060
+ };
11061
+ /**
11062
+ * Allows setting default parameters for optimizing videos served by the CDN
11063
+ */
11064
+ video: {
11065
+ /**
11066
+ * When true, attempting to retrieve raw video files directly instead of their optimized counterparts will result in a HTTP 422 status code
11067
+ */
11068
+ disable_serving_raw_videos?: boolean;
11069
+ };
11070
+ };
11071
+ };
11072
+ };
11073
+ };
11074
+
11075
+ /**
11076
+ * This interface was referenced by `Site`'s JSON-Schema
11077
+ * via the `update_assets_cdn_default_settings.targetSchema` link.
11078
+ */
11079
+ export type SiteUpdateAssetsCdnDefaultSettingsTargetSchema = {
11080
+ data: Site;
11081
+ };
11082
+
10873
11083
  /**
10874
11084
  * Through workflows it is possible to set up a precise state machine able to bring a draft content up to the final publication (and beyond), through a series of intermediate, fully customizable approval steps.
10875
11085
  *