@datocms/cma-client 3.1.0 → 3.1.2

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.
@@ -607,7 +607,7 @@ export declare type ItemInstancesTargetSchema = Item[];
607
607
  */
608
608
  export declare type ItemInstancesHrefSchema = {
609
609
  /**
610
- * For Modular Content fields and Structured Text fields. If set, returns full payload for nested blocks instead of IDs
610
+ * For Modular Content, Structured Text and Single Block fields. If set, returns full payload for nested blocks instead of IDs
611
611
  */
612
612
  nested?: boolean;
613
613
  /**
@@ -677,7 +677,7 @@ export declare type ItemReferencesTargetSchema = Item[];
677
677
  */
678
678
  export declare type ItemReferencesHrefSchema = {
679
679
  /**
680
- * For Modular Content fields and Structured Text fields, return full payload for nested blocks instead of IDs
680
+ * For Modular Content, Structured Text and Single Block fields, return full payload for nested blocks instead of IDs
681
681
  */
682
682
  nested?: boolean;
683
683
  /**
@@ -692,7 +692,7 @@ export declare type ItemReferencesHrefSchema = {
692
692
  */
693
693
  export declare type ItemSelfHrefSchema = {
694
694
  /**
695
- * For Modular Content fields and Structured Text fields. If set, returns full payload for nested blocks instead of IDs
695
+ * For Modular Content, Structured Text and Single Block fields. If set, returns full payload for nested blocks instead of IDs
696
696
  */
697
697
  nested?: boolean;
698
698
  /**
@@ -893,7 +893,7 @@ export declare type ItemVersionInstancesTargetSchema = ItemVersion[];
893
893
  */
894
894
  export declare type ItemVersionInstancesHrefSchema = {
895
895
  /**
896
- * For Modular Content fields and Structured Text fields. If set, returns full payload for nested blocks instead of IDs
896
+ * For Modular Content, Structured Text and Single Block fields. If set, returns full payload for nested blocks instead of IDs
897
897
  */
898
898
  nested?: boolean;
899
899
  /**
@@ -1024,7 +1024,7 @@ export declare type UploadReferencesTargetSchema = Item[];
1024
1024
  */
1025
1025
  export declare type UploadReferencesHrefSchema = {
1026
1026
  /**
1027
- * For Modular Content fields and Structured Text fields, return full payload for nested blocks instead of IDs
1027
+ * For Modular Content, Structured Text and Single Block fields, return full payload for nested blocks instead of IDs
1028
1028
  */
1029
1029
  nested?: boolean;
1030
1030
  /**
@@ -4817,6 +4817,18 @@ export declare type JobData = {
4817
4817
  * </details>
4818
4818
  *
4819
4819
  * <details>
4820
+ * <summary>Single Block (<code>single_block</code>)</summary>
4821
+ *
4822
+ * | Property | Value |
4823
+ * | ------------------------------ | ----------------------------------------------- |
4824
+ * | Code | `single_block` |
4825
+ * | Built-in editors for the field | `framed_single_block`, `frameless_single_block` |
4826
+ * | Required validators | `single_block_blocks` |
4827
+ * | Other validators available | `required` |
4828
+ *
4829
+ * </details>
4830
+ *
4831
+ * <details>
4820
4832
  * <summary>Structured text (<code>structured_text</code>)</summary>
4821
4833
  *
4822
4834
  * | Property | Value |
@@ -5118,6 +5130,17 @@ export declare type JobData = {
5118
5130
  *
5119
5131
  * Only accept references to block records of the specified block models.
5120
5132
  *
5133
+ * | Parameter | Type | Required | Description |
5134
+ * | ------------ | ----------------------- | -------- | ------------------------------ |
5135
+ * | `item_types` | `Array<Block Model ID>` | ✅ | Set of allowed Block Model IDs |
5136
+ *
5137
+ * </details>
5138
+ *
5139
+ * <details>
5140
+ * <summary><code>single_block_blocks</code></summary>
5141
+ *
5142
+ * Only accept references to block records of the specified block models.
5143
+ *
5121
5144
  * | Parameter | Type | Required | Description |
5122
5145
  * | ------------ | ----------------------- | -------- | ------------------------------ |
5123
5146
  * | `item_types` | `Array<Block Model ID>` | ✅ | Set of allowed Block Model IDs |
@@ -5337,10 +5360,10 @@ export declare type JobData = {
5337
5360
  *
5338
5361
  * Built-in editor for _seo_ fields.
5339
5362
  *
5340
- * | Parameter | Type | Required | Description |
5341
- * | ---------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
5342
- * | `fields` | `Array<String>` | ✅ | Specify which fields of the SEO input should be visible to editors. Valid values: `"title"`, `"description"`, `"image"`, `"no_index"`, `"twitter_card"` |
5343
- * | `previews` | `Array<String>` | ✅ | Specify which previews should be visible to editors. Valid values: `"google_search"`, `"twitter"`, `"slack"`, `"whatsapp"`, `"telegram"`, `"facebook"` |
5363
+ * | Parameter | Type | Required | Description |
5364
+ * | ---------- | --------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
5365
+ * | `fields` | `Array<String>` | ✅ | Specify which fields of the SEO input should be visible to editors. Valid values: `"title"`, `"description"`, `"image"`, `"no_index"`, `"twitter_card"` |
5366
+ * | `previews` | `Array<String>` | ✅ | Specify which previews should be visible to editors. Valid values: `"google_search"`, `"twitter"`, `"slack"`, `"whatsapp"`, `"telegram"`, `"facebook"`, `"linkedin"` |
5344
5367
  *
5345
5368
  * </details>
5346
5369
  *
@@ -5356,6 +5379,17 @@ export declare type JobData = {
5356
5379
  * </details>
5357
5380
  *
5358
5381
  * <details>
5382
+ * <summary><code>framed_single_block</code></summary>
5383
+ *
5384
+ * Built-in editor for _Single block_ fields.
5385
+ *
5386
+ * | Parameter | Type | Required | Description |
5387
+ * | ----------------- | --------- | -------- | ---------------------------------------------------------- |
5388
+ * | `start_collapsed` | `Boolean` | | Whether you want block record collapsed by default or not |
5389
+ *
5390
+ * </details>
5391
+ *
5392
+ * <details>
5359
5393
  * <summary><code>structured_text</code></summary>
5360
5394
  *
5361
5395
  * Built-in editor for _Structured text_ fields.
@@ -5399,7 +5433,7 @@ export declare type Field = {
5399
5433
  /**
5400
5434
  * Type of input
5401
5435
  */
5402
- 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';
5436
+ 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';
5403
5437
  /**
5404
5438
  * Whether the field needs to be multilanguage or not
5405
5439
  */
@@ -5501,7 +5535,7 @@ export declare type FieldAttributes = {
5501
5535
  /**
5502
5536
  * Type of input
5503
5537
  */
5504
- 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';
5538
+ 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';
5505
5539
  /**
5506
5540
  * Whether the field needs to be multilanguage or not
5507
5541
  */
@@ -5606,7 +5640,7 @@ export declare type FieldCreateSchema = {
5606
5640
  /**
5607
5641
  * Type of input
5608
5642
  */
5609
- 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';
5643
+ 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';
5610
5644
  /**
5611
5645
  * Field API key
5612
5646
  */
@@ -5773,7 +5807,7 @@ export declare type FieldUpdateSchema = {
5773
5807
  /**
5774
5808
  * Type of input
5775
5809
  */
5776
- 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';
5810
+ 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';
5777
5811
  /**
5778
5812
  * Field hint
5779
5813
  */
@@ -9094,35 +9128,31 @@ export declare type PublicInfo = {
9094
9128
  * Specifies the color-scheme for the project
9095
9129
  */
9096
9130
  theme: {
9097
- primary_color?: {
9131
+ primary_color: {
9098
9132
  red: number;
9099
9133
  green: number;
9100
9134
  blue: number;
9101
9135
  alpha: number;
9102
9136
  [k: string]: unknown;
9103
9137
  };
9104
- light_color?: {
9138
+ light_color: {
9105
9139
  red: number;
9106
9140
  green: number;
9107
9141
  blue: number;
9108
9142
  alpha: number;
9109
- [k: string]: unknown;
9110
9143
  };
9111
- accent_color?: {
9144
+ accent_color: {
9112
9145
  red: number;
9113
9146
  green: number;
9114
9147
  blue: number;
9115
9148
  alpha: number;
9116
- [k: string]: unknown;
9117
9149
  };
9118
- dark_color?: {
9150
+ dark_color: {
9119
9151
  red: number;
9120
9152
  green: number;
9121
9153
  blue: number;
9122
9154
  alpha: number;
9123
- [k: string]: unknown;
9124
9155
  };
9125
- [k: string]: unknown;
9126
9156
  };
9127
9157
  /**
9128
9158
  * Additional information (only returned on authenticated requests)
@@ -9176,35 +9206,31 @@ export declare type PublicInfoAttributes = {
9176
9206
  * Specifies the color-scheme for the project
9177
9207
  */
9178
9208
  theme: {
9179
- primary_color?: {
9209
+ primary_color: {
9180
9210
  red: number;
9181
9211
  green: number;
9182
9212
  blue: number;
9183
9213
  alpha: number;
9184
9214
  [k: string]: unknown;
9185
9215
  };
9186
- light_color?: {
9216
+ light_color: {
9187
9217
  red: number;
9188
9218
  green: number;
9189
9219
  blue: number;
9190
9220
  alpha: number;
9191
- [k: string]: unknown;
9192
9221
  };
9193
- accent_color?: {
9222
+ accent_color: {
9194
9223
  red: number;
9195
9224
  green: number;
9196
9225
  blue: number;
9197
9226
  alpha: number;
9198
- [k: string]: unknown;
9199
9227
  };
9200
- dark_color?: {
9228
+ dark_color: {
9201
9229
  red: number;
9202
9230
  green: number;
9203
9231
  blue: number;
9204
9232
  alpha: number;
9205
- [k: string]: unknown;
9206
9233
  };
9207
- [k: string]: unknown;
9208
9234
  };
9209
9235
  /**
9210
9236
  * Additional information (only returned on authenticated requests)
@@ -9490,39 +9516,42 @@ export declare type Site = {
9490
9516
  * Specifies the theme to use in administrative area
9491
9517
  */
9492
9518
  theme: {
9519
+ /**
9520
+ * If type is monochromatic, the hue will determine the color palette. Dark color is a legacy property, and it won't be used on the interface
9521
+ */
9522
+ type: 'custom' | 'monochromatic';
9523
+ /**
9524
+ * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
9525
+ */
9526
+ hue: number | null;
9493
9527
  primary_color: {
9494
9528
  red: number;
9495
9529
  green: number;
9496
9530
  blue: number;
9497
9531
  alpha: number;
9498
- [k: string]: unknown;
9499
9532
  };
9500
9533
  light_color: {
9501
9534
  red: number;
9502
9535
  green: number;
9503
9536
  blue: number;
9504
9537
  alpha: number;
9505
- [k: string]: unknown;
9506
9538
  };
9507
9539
  accent_color: {
9508
9540
  red: number;
9509
9541
  green: number;
9510
9542
  blue: number;
9511
9543
  alpha: number;
9512
- [k: string]: unknown;
9513
9544
  };
9514
9545
  dark_color: {
9515
9546
  red: number;
9516
9547
  green: number;
9517
9548
  blue: number;
9518
9549
  alpha: number;
9519
- [k: string]: unknown;
9520
9550
  };
9521
9551
  /**
9522
- * The site logo
9552
+ * The upload ID that is used as the logo for the project
9523
9553
  */
9524
9554
  logo: string | null;
9525
- [k: string]: unknown;
9526
9555
  };
9527
9556
  /**
9528
9557
  * Specifies default global settings
@@ -9675,39 +9704,42 @@ export declare type SiteAttributes = {
9675
9704
  * Specifies the theme to use in administrative area
9676
9705
  */
9677
9706
  theme: {
9707
+ /**
9708
+ * If type is monochromatic, the hue will determine the color palette. Dark color is a legacy property, and it won't be used on the interface
9709
+ */
9710
+ type: 'custom' | 'monochromatic';
9711
+ /**
9712
+ * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
9713
+ */
9714
+ hue: number | null;
9678
9715
  primary_color: {
9679
9716
  red: number;
9680
9717
  green: number;
9681
9718
  blue: number;
9682
9719
  alpha: number;
9683
- [k: string]: unknown;
9684
9720
  };
9685
9721
  light_color: {
9686
9722
  red: number;
9687
9723
  green: number;
9688
9724
  blue: number;
9689
9725
  alpha: number;
9690
- [k: string]: unknown;
9691
9726
  };
9692
9727
  accent_color: {
9693
9728
  red: number;
9694
9729
  green: number;
9695
9730
  blue: number;
9696
9731
  alpha: number;
9697
- [k: string]: unknown;
9698
9732
  };
9699
9733
  dark_color: {
9700
9734
  red: number;
9701
9735
  green: number;
9702
9736
  blue: number;
9703
9737
  alpha: number;
9704
- [k: string]: unknown;
9705
9738
  };
9706
9739
  /**
9707
- * The site logo
9740
+ * The upload ID that is used as the logo for the project
9708
9741
  */
9709
9742
  logo: string | null;
9710
- [k: string]: unknown;
9711
9743
  };
9712
9744
  /**
9713
9745
  * Specifies default global settings
@@ -9813,42 +9845,53 @@ export declare type SiteUpdateSchema = {
9813
9845
  * Site name
9814
9846
  */
9815
9847
  name?: string;
9816
- /**
9817
- * Specifies the theme to use in administrative area
9818
- */
9819
9848
  theme?: {
9849
+ /**
9850
+ * Type of theme color palette
9851
+ */
9852
+ type: 'monochromatic';
9853
+ /**
9854
+ * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
9855
+ */
9856
+ hue: number | null;
9857
+ /**
9858
+ * The upload ID that is used as the logo for the project
9859
+ */
9860
+ logo: string | null;
9861
+ [k: string]: unknown;
9862
+ } | {
9863
+ /**
9864
+ * Type of theme color palette
9865
+ */
9866
+ type?: 'custom';
9867
+ /**
9868
+ * The upload ID that is used as the logo for the project
9869
+ */
9870
+ logo: string | null;
9820
9871
  primary_color: {
9821
9872
  red: number;
9822
9873
  green: number;
9823
9874
  blue: number;
9824
9875
  alpha: number;
9825
- [k: string]: unknown;
9826
9876
  };
9827
9877
  light_color: {
9828
9878
  red: number;
9829
9879
  green: number;
9830
9880
  blue: number;
9831
9881
  alpha: number;
9832
- [k: string]: unknown;
9833
9882
  };
9834
9883
  accent_color: {
9835
9884
  red: number;
9836
9885
  green: number;
9837
9886
  blue: number;
9838
9887
  alpha: number;
9839
- [k: string]: unknown;
9840
9888
  };
9841
- dark_color: {
9889
+ dark_color?: {
9842
9890
  red: number;
9843
9891
  green: number;
9844
9892
  blue: number;
9845
9893
  alpha: number;
9846
- [k: string]: unknown;
9847
9894
  };
9848
- /**
9849
- * The site logo
9850
- */
9851
- logo: string | null;
9852
9895
  [k: string]: unknown;
9853
9896
  };
9854
9897
  /**