@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
@@ -378,6 +378,14 @@ export declare type ItemTypeCreateHrefSchema = {
378
378
  * Skip the creation of a menu item linked to the model
379
379
  */
380
380
  skip_menu_item_creation?: boolean;
381
+ /**
382
+ * Explicitely specify the ID of the menu item that will be linked to the model
383
+ */
384
+ menu_item_id?: string;
385
+ /**
386
+ * Explicitely specify the ID of the schema menu item that will be linked to the model
387
+ */
388
+ schema_menu_item_id?: string;
381
389
  [k: string]: unknown;
382
390
  };
383
391
  /**
@@ -507,7 +515,7 @@ export declare type BuildTriggerType = 'build_trigger';
507
515
  */
508
516
  export declare type ItemInstancesHrefSchema = {
509
517
  /**
510
- * For Modular Content fields and Structured Text fields. If set, returns full payload for nested blocks instead of IDs
518
+ * For Modular Content, Structured Text and Single Block fields. If set, returns full payload for nested blocks instead of IDs
511
519
  */
512
520
  nested?: boolean;
513
521
  /**
@@ -572,7 +580,7 @@ export declare type ItemInstancesHrefSchema = {
572
580
  */
573
581
  export declare type ItemReferencesHrefSchema = {
574
582
  /**
575
- * For Modular Content fields and Structured Text fields, return full payload for nested blocks instead of IDs
583
+ * For Modular Content, Structured Text and Single Block fields, return full payload for nested blocks instead of IDs
576
584
  */
577
585
  nested?: boolean;
578
586
  /**
@@ -587,7 +595,7 @@ export declare type ItemReferencesHrefSchema = {
587
595
  */
588
596
  export declare type ItemSelfHrefSchema = {
589
597
  /**
590
- * For Modular Content fields and Structured Text fields. If set, returns full payload for nested blocks instead of IDs
598
+ * For Modular Content, Structured Text and Single Block fields. If set, returns full payload for nested blocks instead of IDs
591
599
  */
592
600
  nested?: boolean;
593
601
  /**
@@ -662,7 +670,7 @@ export declare type ItemVersionIdentity = string;
662
670
  */
663
671
  export declare type ItemVersionInstancesHrefSchema = {
664
672
  /**
665
- * For Modular Content fields and Structured Text fields. If set, returns full payload for nested blocks instead of IDs
673
+ * For Modular Content, Structured Text and Single Block fields. If set, returns full payload for nested blocks instead of IDs
666
674
  */
667
675
  nested?: boolean;
668
676
  /**
@@ -862,7 +870,7 @@ export declare type UploadBatchDestroyHrefSchema = {
862
870
  */
863
871
  export declare type UploadReferencesHrefSchema = {
864
872
  /**
865
- * For Modular Content fields and Structured Text fields, return full payload for nested blocks instead of IDs
873
+ * For Modular Content, Structured Text and Single Block fields, return full payload for nested blocks instead of IDs
866
874
  */
867
875
  nested?: boolean;
868
876
  /**
@@ -1120,6 +1128,32 @@ export declare type SsoSettingsType = 'sso_settings';
1120
1128
  * via the `definition` "id".
1121
1129
  */
1122
1130
  export declare type SsoSettingsIdentity = string;
1131
+ /**
1132
+ * This interface was referenced by `EmojiSuggestions`'s JSON-Schema
1133
+ * via the `definition` "type".
1134
+ */
1135
+ export declare type EmojiSuggestionsType = 'emoji_suggestions';
1136
+ /**
1137
+ * ID
1138
+ *
1139
+ * This interface was referenced by `EmojiSuggestions`'s JSON-Schema
1140
+ * via the `definition` "identity".
1141
+ *
1142
+ * This interface was referenced by `EmojiSuggestions`'s JSON-Schema
1143
+ * via the `definition` "id".
1144
+ */
1145
+ export declare type EmojiSuggestionsIdentity = string;
1146
+ /**
1147
+ * This interface was referenced by `EmojiSuggestions`'s JSON-Schema
1148
+ * via the `self.hrefSchema` link.
1149
+ */
1150
+ export declare type EmojiSuggestionsSelfHrefSchema = {
1151
+ /**
1152
+ * The term for which we are seeking suggestions for emojis
1153
+ */
1154
+ term?: string;
1155
+ [k: string]: unknown;
1156
+ };
1123
1157
  /**
1124
1158
  * This interface was referenced by `WhiteLabelSettings`'s JSON-Schema
1125
1159
  * via the `definition` "type".
@@ -1349,6 +1383,7 @@ export declare type DatoApi = {
1349
1383
  form_data?: FormData;
1350
1384
  sso_group?: SsoGroup;
1351
1385
  sso_settings?: SsoSettings;
1386
+ emoji_suggestions?: EmojiSuggestions;
1352
1387
  white_label_settings?: WhiteLabelSettings;
1353
1388
  public_info?: PublicInfo;
1354
1389
  daily_usage?: DailyUsage;
@@ -3089,6 +3124,10 @@ export declare type SitePlanAttributes = {
3089
3124
  * Maximum size in bytes for a single file upload
3090
3125
  */
3091
3126
  maximum_single_upload_bytes: number;
3127
+ /**
3128
+ * Maximum size (in bytes) for a record, including its block records
3129
+ */
3130
+ item_byte_size: number;
3092
3131
  /**
3093
3132
  * Available extra packets
3094
3133
  */
@@ -4367,6 +4406,18 @@ export declare type ItemTypeDestroyJobSchema = {
4367
4406
  * </details>
4368
4407
  *
4369
4408
  * <details>
4409
+ * <summary>Single Block (<code>single_block</code>)</summary>
4410
+ *
4411
+ * | Property | Value |
4412
+ * | ------------------------------ | ----------------------------------------------- |
4413
+ * | Code | `single_block` |
4414
+ * | Built-in editors for the field | `framed_single_block`, `frameless_single_block` |
4415
+ * | Required validators | `single_block_blocks` |
4416
+ * | Other validators available | `required` |
4417
+ *
4418
+ * </details>
4419
+ *
4420
+ * <details>
4370
4421
  * <summary>Structured text (<code>structured_text</code>)</summary>
4371
4422
  *
4372
4423
  * | Property | Value |
@@ -4668,6 +4719,17 @@ export declare type ItemTypeDestroyJobSchema = {
4668
4719
  *
4669
4720
  * Only accept references to block records of the specified block models.
4670
4721
  *
4722
+ * | Parameter | Type | Required | Description |
4723
+ * | ------------ | ----------------------- | -------- | ------------------------------ |
4724
+ * | `item_types` | `Array<Block Model ID>` | ✅ | Set of allowed Block Model IDs |
4725
+ *
4726
+ * </details>
4727
+ *
4728
+ * <details>
4729
+ * <summary><code>single_block_blocks</code></summary>
4730
+ *
4731
+ * Only accept references to block records of the specified block models.
4732
+ *
4671
4733
  * | Parameter | Type | Required | Description |
4672
4734
  * | ------------ | ----------------------- | -------- | ------------------------------ |
4673
4735
  * | `item_types` | `Array<Block Model ID>` | ✅ | Set of allowed Block Model IDs |
@@ -4887,10 +4949,10 @@ export declare type ItemTypeDestroyJobSchema = {
4887
4949
  *
4888
4950
  * Built-in editor for _seo_ fields.
4889
4951
  *
4890
- * | Parameter | Type | Required | Description |
4891
- * | ---------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
4892
- * | `fields` | `Array<String>` | ✅ | Specify which fields of the SEO input should be visible to editors. Valid values: `"title"`, `"description"`, `"image"`, `"no_index"`, `"twitter_card"` |
4893
- * | `previews` | `Array<String>` | ✅ | Specify which previews should be visible to editors. Valid values: `"google_search"`, `"twitter"`, `"slack"`, `"whatsapp"`, `"telegram"`, `"facebook"` |
4952
+ * | Parameter | Type | Required | Description |
4953
+ * | ---------- | --------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
4954
+ * | `fields` | `Array<String>` | ✅ | Specify which fields of the SEO input should be visible to editors. Valid values: `"title"`, `"description"`, `"image"`, `"no_index"`, `"twitter_card"` |
4955
+ * | `previews` | `Array<String>` | ✅ | Specify which previews should be visible to editors. Valid values: `"google_search"`, `"twitter"`, `"slack"`, `"whatsapp"`, `"telegram"`, `"facebook"`, `"linkedin"` |
4894
4956
  *
4895
4957
  * </details>
4896
4958
  *
@@ -4906,6 +4968,17 @@ export declare type ItemTypeDestroyJobSchema = {
4906
4968
  * </details>
4907
4969
  *
4908
4970
  * <details>
4971
+ * <summary><code>framed_single_block</code></summary>
4972
+ *
4973
+ * Built-in editor for _Single block_ fields.
4974
+ *
4975
+ * | Parameter | Type | Required | Description |
4976
+ * | ----------------- | --------- | -------- | ---------------------------------------------------------- |
4977
+ * | `start_collapsed` | `Boolean` | | Whether you want block record collapsed by default or not |
4978
+ *
4979
+ * </details>
4980
+ *
4981
+ * <details>
4909
4982
  * <summary><code>structured_text</code></summary>
4910
4983
  *
4911
4984
  * Built-in editor for _Structured text_ fields.
@@ -4959,7 +5032,7 @@ export declare type FieldAttributes = {
4959
5032
  /**
4960
5033
  * Type of input
4961
5034
  */
4962
- field_type: 'string' | 'text' | 'boolean' | 'integer' | 'float' | 'date' | 'date_time' | 'color' | 'json' | 'lat_lon' | 'seo' | 'slug' | 'video' | 'file' | 'gallery' | 'link' | 'links' | 'rich_text' | 'structured_text';
5035
+ field_type: 'boolean' | 'color' | 'date' | 'date_time' | 'file' | 'float' | 'gallery' | 'integer' | 'json' | 'lat_lon' | 'link' | 'links' | 'rich_text' | 'seo' | 'single_block' | 'slug' | 'string' | 'structured_text' | 'text' | 'video';
4963
5036
  /**
4964
5037
  * Whether the field needs to be multilanguage or not
4965
5038
  */
@@ -5079,7 +5152,7 @@ export declare type FieldCreateSchema = {
5079
5152
  /**
5080
5153
  * Type of input
5081
5154
  */
5082
- field_type: 'string' | 'text' | 'boolean' | 'integer' | 'float' | 'date' | 'date_time' | 'color' | 'json' | 'lat_lon' | 'seo' | 'slug' | 'video' | 'file' | 'gallery' | 'link' | 'links' | 'rich_text' | 'structured_text';
5155
+ field_type: 'boolean' | 'color' | 'date' | 'date_time' | 'file' | 'float' | 'gallery' | 'integer' | 'json' | 'lat_lon' | 'link' | 'links' | 'rich_text' | 'seo' | 'single_block' | 'slug' | 'string' | 'structured_text' | 'text' | 'video';
5083
5156
  /**
5084
5157
  * Field API key
5085
5158
  */
@@ -5275,7 +5348,7 @@ export declare type FieldUpdateSchema = {
5275
5348
  /**
5276
5349
  * Type of input
5277
5350
  */
5278
- field_type?: 'string' | 'text' | 'boolean' | 'integer' | 'float' | 'date' | 'date_time' | 'color' | 'json' | 'lat_lon' | 'seo' | 'slug' | 'video' | 'file' | 'gallery' | 'link' | 'links' | 'rich_text' | 'structured_text';
5351
+ field_type?: 'boolean' | 'color' | 'date' | 'date_time' | 'file' | 'float' | 'gallery' | 'integer' | 'json' | 'lat_lon' | 'link' | 'links' | 'rich_text' | 'seo' | 'single_block' | 'slug' | 'string' | 'structured_text' | 'text' | 'video';
5279
5352
  /**
5280
5353
  * Field hint
5281
5354
  */
@@ -9315,6 +9388,46 @@ export declare type SsoSettingsUpdateSchema = {
9315
9388
  export declare type SsoSettingsUpdateTargetSchema = {
9316
9389
  data: SsoSettings;
9317
9390
  };
9391
+ /**
9392
+ * The entity suggests several emojis that are connected to a specific term
9393
+ *
9394
+ * This interface was referenced by `DatoApi`'s JSON-Schema
9395
+ * via the `definition` "emoji_suggestions".
9396
+ */
9397
+ export declare type EmojiSuggestions = {
9398
+ type: EmojiSuggestionsType;
9399
+ id: EmojiSuggestionsIdentity;
9400
+ attributes: EmojiSuggestionsAttributes;
9401
+ };
9402
+ /**
9403
+ * JSON API attributes
9404
+ *
9405
+ * This interface was referenced by `EmojiSuggestions`'s JSON-Schema
9406
+ * via the `definition` "attributes".
9407
+ */
9408
+ export declare type EmojiSuggestionsAttributes = {
9409
+ /**
9410
+ * Emojis connected to a specific term
9411
+ */
9412
+ emojis: string[];
9413
+ };
9414
+ /**
9415
+ * JSON API data
9416
+ *
9417
+ * This interface was referenced by `EmojiSuggestions`'s JSON-Schema
9418
+ * via the `definition` "data".
9419
+ */
9420
+ export declare type EmojiSuggestionsData = {
9421
+ type: EmojiSuggestionsType;
9422
+ id: EmojiSuggestionsIdentity;
9423
+ };
9424
+ /**
9425
+ * This interface was referenced by `EmojiSuggestions`'s JSON-Schema
9426
+ * via the `self.targetSchema` link.
9427
+ */
9428
+ export declare type EmojiSuggestionsSelfTargetSchema = {
9429
+ data: EmojiSuggestions;
9430
+ };
9318
9431
  /**
9319
9432
  * Represents the white-label settings of the current DatoCMS project
9320
9433
  *
@@ -9759,6 +9872,37 @@ export declare type SiteAttributes = {
9759
9872
  * If enabled, blocks schema changes of primary environment
9760
9873
  */
9761
9874
  force_use_of_sandbox_environments: boolean;
9875
+ /**
9876
+ * Allows setting default parameters for assets served through the CDN
9877
+ */
9878
+ assets_cdn_default_settings: {
9879
+ /**
9880
+ * Allows setting default parameters for optimizing images served by the CDN
9881
+ */
9882
+ image: {
9883
+ /**
9884
+ * 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.
9885
+ */
9886
+ q?: number;
9887
+ /**
9888
+ * The auto parameter helps automating a baseline level of optimization. Specify one or more settings
9889
+ */
9890
+ auto?: ('compress' | 'format' | 'enhance' | 'true' | 'redeye')[];
9891
+ /**
9892
+ * Specifies the color space of the output image
9893
+ */
9894
+ cs?: 'srgb' | 'adobergb1998' | 'tinysrgb' | 'strip';
9895
+ };
9896
+ /**
9897
+ * Allows setting default parameters for optimizing videos served by the CDN
9898
+ */
9899
+ video: {
9900
+ /**
9901
+ * When true, attempting to retrieve raw video files directly instead of their optimized counterparts will result in a HTTP 422 status code
9902
+ */
9903
+ disable_serving_raw_videos?: boolean;
9904
+ };
9905
+ };
9762
9906
  /**
9763
9907
  * Specifies the theme to use in administrative area
9764
9908
  */
@@ -9883,6 +10027,10 @@ export declare type SiteMeta = {
9883
10027
  * Whether the Improved boolean fields option is active or not
9884
10028
  */
9885
10029
  improved_boolean_fields: boolean;
10030
+ /**
10031
+ * Whether the site has custom upload storage settings
10032
+ */
10033
+ custom_upload_storage_settings?: boolean;
9886
10034
  };
9887
10035
  /**
9888
10036
  * JSON API data
@@ -10049,6 +10197,10 @@ export declare type SiteUpdateSchema = {
10049
10197
  * Whether the Improved boolean fields option is active or not
10050
10198
  */
10051
10199
  improved_boolean_fields?: boolean;
10200
+ /**
10201
+ * Whether the site has custom upload storage settings
10202
+ */
10203
+ custom_upload_storage_settings?: boolean;
10052
10204
  };
10053
10205
  relationships?: {
10054
10206
  sso_default_role?: {
@@ -10113,6 +10265,55 @@ export declare type SiteActivateImprovedGqlVisibilityControlTargetSchema = {
10113
10265
  export declare type SiteActivateImprovedBooleanFieldsTargetSchema = {
10114
10266
  data: Site;
10115
10267
  };
10268
+ /**
10269
+ * This interface was referenced by `Site`'s JSON-Schema
10270
+ * via the `update_assets_cdn_default_settings.schema` link.
10271
+ */
10272
+ export declare type SiteUpdateAssetsCdnDefaultSettingsSchema = {
10273
+ data: {
10274
+ type: string;
10275
+ attributes: {
10276
+ /**
10277
+ * Allows setting default parameters for assets served through the CDN
10278
+ */
10279
+ assets_cdn_default_settings: {
10280
+ /**
10281
+ * Allows setting default parameters for optimizing images served by the CDN
10282
+ */
10283
+ image: {
10284
+ /**
10285
+ * 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.
10286
+ */
10287
+ q?: number;
10288
+ /**
10289
+ * The auto parameter helps automating a baseline level of optimization. Specify one or more settings
10290
+ */
10291
+ auto?: ('compress' | 'format' | 'enhance' | 'true' | 'redeye')[];
10292
+ /**
10293
+ * Specifies the color space of the output image
10294
+ */
10295
+ cs?: 'srgb' | 'adobergb1998' | 'tinysrgb' | 'strip';
10296
+ };
10297
+ /**
10298
+ * Allows setting default parameters for optimizing videos served by the CDN
10299
+ */
10300
+ video: {
10301
+ /**
10302
+ * When true, attempting to retrieve raw video files directly instead of their optimized counterparts will result in a HTTP 422 status code
10303
+ */
10304
+ disable_serving_raw_videos?: boolean;
10305
+ };
10306
+ };
10307
+ };
10308
+ };
10309
+ };
10310
+ /**
10311
+ * This interface was referenced by `Site`'s JSON-Schema
10312
+ * via the `update_assets_cdn_default_settings.targetSchema` link.
10313
+ */
10314
+ export declare type SiteUpdateAssetsCdnDefaultSettingsTargetSchema = {
10315
+ data: Site;
10316
+ };
10116
10317
  /**
10117
10318
  * 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.
10118
10319
  *