@datocms/cma-client 5.4.20 → 5.4.22

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.
@@ -11108,32 +11108,125 @@ export type PublicInfo = {
11108
11108
  */
11109
11109
  custom_i18n_messages_template_url: null | string;
11110
11110
  /**
11111
- * Specifies the color-scheme for the project
11111
+ * Specifies the color-scheme for the project. For monochromatic themes the response only includes type and hue — frontends must derive the palette from the hue. For custom themes the primary_color, light_color, accent_color, and dark_color fields are returned.
11112
11112
  */
11113
11113
  theme: {
11114
- primary_color: {
11114
+ /**
11115
+ * Whether the project is using a custom color palette or a monochromatic one derived from a hue.
11116
+ */
11117
+ type: 'custom' | 'monochromatic';
11118
+ /**
11119
+ * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
11120
+ */
11121
+ hue: number | null;
11122
+ /**
11123
+ * An integer color channel value (0-255)
11124
+ */
11125
+ color_channel?: number;
11126
+ /**
11127
+ * An RGBA color value
11128
+ */
11129
+ color?: {
11130
+ /**
11131
+ * An integer color channel value (0-255)
11132
+ */
11115
11133
  red: number;
11134
+ /**
11135
+ * An integer color channel value (0-255)
11136
+ */
11116
11137
  green: number;
11138
+ /**
11139
+ * An integer color channel value (0-255)
11140
+ */
11117
11141
  blue: number;
11142
+ /**
11143
+ * An integer color channel value (0-255)
11144
+ */
11118
11145
  alpha: number;
11119
11146
  [k: string]: unknown;
11120
11147
  };
11121
- light_color: {
11148
+ /**
11149
+ * An RGBA color value
11150
+ */
11151
+ primary_color?: {
11152
+ /**
11153
+ * An integer color channel value (0-255)
11154
+ */
11122
11155
  red: number;
11156
+ /**
11157
+ * An integer color channel value (0-255)
11158
+ */
11123
11159
  green: number;
11160
+ /**
11161
+ * An integer color channel value (0-255)
11162
+ */
11124
11163
  blue: number;
11164
+ /**
11165
+ * An integer color channel value (0-255)
11166
+ */
11125
11167
  alpha: number;
11126
11168
  };
11127
- accent_color: {
11169
+ /**
11170
+ * An RGBA color value
11171
+ */
11172
+ light_color?: {
11173
+ /**
11174
+ * An integer color channel value (0-255)
11175
+ */
11128
11176
  red: number;
11177
+ /**
11178
+ * An integer color channel value (0-255)
11179
+ */
11129
11180
  green: number;
11181
+ /**
11182
+ * An integer color channel value (0-255)
11183
+ */
11130
11184
  blue: number;
11185
+ /**
11186
+ * An integer color channel value (0-255)
11187
+ */
11131
11188
  alpha: number;
11132
11189
  };
11133
- dark_color: {
11190
+ /**
11191
+ * An RGBA color value
11192
+ */
11193
+ accent_color?: {
11194
+ /**
11195
+ * An integer color channel value (0-255)
11196
+ */
11134
11197
  red: number;
11198
+ /**
11199
+ * An integer color channel value (0-255)
11200
+ */
11135
11201
  green: number;
11202
+ /**
11203
+ * An integer color channel value (0-255)
11204
+ */
11136
11205
  blue: number;
11206
+ /**
11207
+ * An integer color channel value (0-255)
11208
+ */
11209
+ alpha: number;
11210
+ };
11211
+ /**
11212
+ * An RGBA color value
11213
+ */
11214
+ dark_color?: {
11215
+ /**
11216
+ * An integer color channel value (0-255)
11217
+ */
11218
+ red: number;
11219
+ /**
11220
+ * An integer color channel value (0-255)
11221
+ */
11222
+ green: number;
11223
+ /**
11224
+ * An integer color channel value (0-255)
11225
+ */
11226
+ blue: number;
11227
+ /**
11228
+ * An integer color channel value (0-255)
11229
+ */
11137
11230
  alpha: number;
11138
11231
  };
11139
11232
  };
@@ -11186,32 +11279,125 @@ export type PublicInfoAttributes = {
11186
11279
  */
11187
11280
  custom_i18n_messages_template_url: null | string;
11188
11281
  /**
11189
- * Specifies the color-scheme for the project
11282
+ * Specifies the color-scheme for the project. For monochromatic themes the response only includes type and hue — frontends must derive the palette from the hue. For custom themes the primary_color, light_color, accent_color, and dark_color fields are returned.
11190
11283
  */
11191
11284
  theme: {
11192
- primary_color: {
11285
+ /**
11286
+ * Whether the project is using a custom color palette or a monochromatic one derived from a hue.
11287
+ */
11288
+ type: 'custom' | 'monochromatic';
11289
+ /**
11290
+ * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
11291
+ */
11292
+ hue: number | null;
11293
+ /**
11294
+ * An integer color channel value (0-255)
11295
+ */
11296
+ color_channel?: number;
11297
+ /**
11298
+ * An RGBA color value
11299
+ */
11300
+ color?: {
11301
+ /**
11302
+ * An integer color channel value (0-255)
11303
+ */
11193
11304
  red: number;
11305
+ /**
11306
+ * An integer color channel value (0-255)
11307
+ */
11194
11308
  green: number;
11309
+ /**
11310
+ * An integer color channel value (0-255)
11311
+ */
11195
11312
  blue: number;
11313
+ /**
11314
+ * An integer color channel value (0-255)
11315
+ */
11196
11316
  alpha: number;
11197
11317
  [k: string]: unknown;
11198
11318
  };
11199
- light_color: {
11319
+ /**
11320
+ * An RGBA color value
11321
+ */
11322
+ primary_color?: {
11323
+ /**
11324
+ * An integer color channel value (0-255)
11325
+ */
11200
11326
  red: number;
11327
+ /**
11328
+ * An integer color channel value (0-255)
11329
+ */
11201
11330
  green: number;
11331
+ /**
11332
+ * An integer color channel value (0-255)
11333
+ */
11334
+ blue: number;
11335
+ /**
11336
+ * An integer color channel value (0-255)
11337
+ */
11338
+ alpha: number;
11339
+ };
11340
+ /**
11341
+ * An RGBA color value
11342
+ */
11343
+ light_color?: {
11344
+ /**
11345
+ * An integer color channel value (0-255)
11346
+ */
11347
+ red: number;
11348
+ /**
11349
+ * An integer color channel value (0-255)
11350
+ */
11351
+ green: number;
11352
+ /**
11353
+ * An integer color channel value (0-255)
11354
+ */
11202
11355
  blue: number;
11356
+ /**
11357
+ * An integer color channel value (0-255)
11358
+ */
11203
11359
  alpha: number;
11204
11360
  };
11205
- accent_color: {
11361
+ /**
11362
+ * An RGBA color value
11363
+ */
11364
+ accent_color?: {
11365
+ /**
11366
+ * An integer color channel value (0-255)
11367
+ */
11206
11368
  red: number;
11369
+ /**
11370
+ * An integer color channel value (0-255)
11371
+ */
11207
11372
  green: number;
11373
+ /**
11374
+ * An integer color channel value (0-255)
11375
+ */
11208
11376
  blue: number;
11377
+ /**
11378
+ * An integer color channel value (0-255)
11379
+ */
11209
11380
  alpha: number;
11210
11381
  };
11211
- dark_color: {
11382
+ /**
11383
+ * An RGBA color value
11384
+ */
11385
+ dark_color?: {
11386
+ /**
11387
+ * An integer color channel value (0-255)
11388
+ */
11212
11389
  red: number;
11390
+ /**
11391
+ * An integer color channel value (0-255)
11392
+ */
11213
11393
  green: number;
11394
+ /**
11395
+ * An integer color channel value (0-255)
11396
+ */
11214
11397
  blue: number;
11398
+ /**
11399
+ * An integer color channel value (0-255)
11400
+ */
11215
11401
  alpha: number;
11216
11402
  };
11217
11403
  };
@@ -11559,7 +11745,7 @@ export type Site = {
11559
11745
  };
11560
11746
  };
11561
11747
  /**
11562
- * Specifies the theme to use in administrative area
11748
+ * Specifies the theme to use in administrative area. For monochromatic themes the response only includes type, hue, and logo — frontends must derive the palette from the hue. For custom themes the primary_color, light_color, accent_color, and dark_color fields are returned.
11563
11749
  */
11564
11750
  theme: {
11565
11751
  /**
@@ -11570,28 +11756,113 @@ export type Site = {
11570
11756
  * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
11571
11757
  */
11572
11758
  hue: number | null;
11573
- primary_color: {
11759
+ /**
11760
+ * An integer color channel value (0-255)
11761
+ */
11762
+ color_channel?: number;
11763
+ /**
11764
+ * An RGBA color value
11765
+ */
11766
+ color?: {
11767
+ /**
11768
+ * An integer color channel value (0-255)
11769
+ */
11770
+ red: number;
11771
+ /**
11772
+ * An integer color channel value (0-255)
11773
+ */
11774
+ green: number;
11775
+ /**
11776
+ * An integer color channel value (0-255)
11777
+ */
11778
+ blue: number;
11779
+ /**
11780
+ * An integer color channel value (0-255)
11781
+ */
11782
+ alpha: number;
11783
+ };
11784
+ /**
11785
+ * An RGBA color value
11786
+ */
11787
+ primary_color?: {
11788
+ /**
11789
+ * An integer color channel value (0-255)
11790
+ */
11574
11791
  red: number;
11792
+ /**
11793
+ * An integer color channel value (0-255)
11794
+ */
11575
11795
  green: number;
11796
+ /**
11797
+ * An integer color channel value (0-255)
11798
+ */
11576
11799
  blue: number;
11800
+ /**
11801
+ * An integer color channel value (0-255)
11802
+ */
11577
11803
  alpha: number;
11578
11804
  };
11579
- light_color: {
11805
+ /**
11806
+ * An RGBA color value
11807
+ */
11808
+ light_color?: {
11809
+ /**
11810
+ * An integer color channel value (0-255)
11811
+ */
11580
11812
  red: number;
11813
+ /**
11814
+ * An integer color channel value (0-255)
11815
+ */
11581
11816
  green: number;
11817
+ /**
11818
+ * An integer color channel value (0-255)
11819
+ */
11582
11820
  blue: number;
11821
+ /**
11822
+ * An integer color channel value (0-255)
11823
+ */
11583
11824
  alpha: number;
11584
11825
  };
11585
- accent_color: {
11826
+ /**
11827
+ * An RGBA color value
11828
+ */
11829
+ accent_color?: {
11830
+ /**
11831
+ * An integer color channel value (0-255)
11832
+ */
11586
11833
  red: number;
11834
+ /**
11835
+ * An integer color channel value (0-255)
11836
+ */
11587
11837
  green: number;
11838
+ /**
11839
+ * An integer color channel value (0-255)
11840
+ */
11588
11841
  blue: number;
11842
+ /**
11843
+ * An integer color channel value (0-255)
11844
+ */
11589
11845
  alpha: number;
11590
11846
  };
11591
- dark_color: {
11847
+ /**
11848
+ * An RGBA color value
11849
+ */
11850
+ dark_color?: {
11851
+ /**
11852
+ * An integer color channel value (0-255)
11853
+ */
11592
11854
  red: number;
11855
+ /**
11856
+ * An integer color channel value (0-255)
11857
+ */
11593
11858
  green: number;
11859
+ /**
11860
+ * An integer color channel value (0-255)
11861
+ */
11594
11862
  blue: number;
11863
+ /**
11864
+ * An integer color channel value (0-255)
11865
+ */
11595
11866
  alpha: number;
11596
11867
  };
11597
11868
  /**
@@ -11812,7 +12083,7 @@ export type SiteAttributes = {
11812
12083
  };
11813
12084
  };
11814
12085
  /**
11815
- * Specifies the theme to use in administrative area
12086
+ * Specifies the theme to use in administrative area. For monochromatic themes the response only includes type, hue, and logo — frontends must derive the palette from the hue. For custom themes the primary_color, light_color, accent_color, and dark_color fields are returned.
11816
12087
  */
11817
12088
  theme: {
11818
12089
  /**
@@ -11823,28 +12094,113 @@ export type SiteAttributes = {
11823
12094
  * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
11824
12095
  */
11825
12096
  hue: number | null;
11826
- primary_color: {
12097
+ /**
12098
+ * An integer color channel value (0-255)
12099
+ */
12100
+ color_channel?: number;
12101
+ /**
12102
+ * An RGBA color value
12103
+ */
12104
+ color?: {
12105
+ /**
12106
+ * An integer color channel value (0-255)
12107
+ */
11827
12108
  red: number;
12109
+ /**
12110
+ * An integer color channel value (0-255)
12111
+ */
11828
12112
  green: number;
12113
+ /**
12114
+ * An integer color channel value (0-255)
12115
+ */
11829
12116
  blue: number;
12117
+ /**
12118
+ * An integer color channel value (0-255)
12119
+ */
11830
12120
  alpha: number;
11831
12121
  };
11832
- light_color: {
12122
+ /**
12123
+ * An RGBA color value
12124
+ */
12125
+ primary_color?: {
12126
+ /**
12127
+ * An integer color channel value (0-255)
12128
+ */
11833
12129
  red: number;
12130
+ /**
12131
+ * An integer color channel value (0-255)
12132
+ */
11834
12133
  green: number;
12134
+ /**
12135
+ * An integer color channel value (0-255)
12136
+ */
11835
12137
  blue: number;
12138
+ /**
12139
+ * An integer color channel value (0-255)
12140
+ */
11836
12141
  alpha: number;
11837
12142
  };
11838
- accent_color: {
12143
+ /**
12144
+ * An RGBA color value
12145
+ */
12146
+ light_color?: {
12147
+ /**
12148
+ * An integer color channel value (0-255)
12149
+ */
11839
12150
  red: number;
12151
+ /**
12152
+ * An integer color channel value (0-255)
12153
+ */
11840
12154
  green: number;
12155
+ /**
12156
+ * An integer color channel value (0-255)
12157
+ */
11841
12158
  blue: number;
12159
+ /**
12160
+ * An integer color channel value (0-255)
12161
+ */
11842
12162
  alpha: number;
11843
12163
  };
11844
- dark_color: {
12164
+ /**
12165
+ * An RGBA color value
12166
+ */
12167
+ accent_color?: {
12168
+ /**
12169
+ * An integer color channel value (0-255)
12170
+ */
11845
12171
  red: number;
12172
+ /**
12173
+ * An integer color channel value (0-255)
12174
+ */
11846
12175
  green: number;
12176
+ /**
12177
+ * An integer color channel value (0-255)
12178
+ */
11847
12179
  blue: number;
12180
+ /**
12181
+ * An integer color channel value (0-255)
12182
+ */
12183
+ alpha: number;
12184
+ };
12185
+ /**
12186
+ * An RGBA color value
12187
+ */
12188
+ dark_color?: {
12189
+ /**
12190
+ * An integer color channel value (0-255)
12191
+ */
12192
+ red: number;
12193
+ /**
12194
+ * An integer color channel value (0-255)
12195
+ */
12196
+ green: number;
12197
+ /**
12198
+ * An integer color channel value (0-255)
12199
+ */
12200
+ blue: number;
12201
+ /**
12202
+ * An integer color channel value (0-255)
12203
+ */
11848
12204
  alpha: number;
11849
12205
  };
11850
12206
  /**
@@ -11981,28 +12337,88 @@ export type SiteUpdateSchema = {
11981
12337
  * The upload ID that is used as the logo for the project
11982
12338
  */
11983
12339
  logo: string | null;
12340
+ /**
12341
+ * An RGBA color value
12342
+ */
11984
12343
  primary_color: {
12344
+ /**
12345
+ * An integer color channel value (0-255)
12346
+ */
11985
12347
  red: number;
12348
+ /**
12349
+ * An integer color channel value (0-255)
12350
+ */
11986
12351
  green: number;
12352
+ /**
12353
+ * An integer color channel value (0-255)
12354
+ */
11987
12355
  blue: number;
12356
+ /**
12357
+ * An integer color channel value (0-255)
12358
+ */
11988
12359
  alpha: number;
11989
12360
  };
12361
+ /**
12362
+ * An RGBA color value
12363
+ */
11990
12364
  light_color: {
12365
+ /**
12366
+ * An integer color channel value (0-255)
12367
+ */
11991
12368
  red: number;
12369
+ /**
12370
+ * An integer color channel value (0-255)
12371
+ */
11992
12372
  green: number;
12373
+ /**
12374
+ * An integer color channel value (0-255)
12375
+ */
11993
12376
  blue: number;
12377
+ /**
12378
+ * An integer color channel value (0-255)
12379
+ */
11994
12380
  alpha: number;
11995
12381
  };
12382
+ /**
12383
+ * An RGBA color value
12384
+ */
11996
12385
  accent_color: {
12386
+ /**
12387
+ * An integer color channel value (0-255)
12388
+ */
11997
12389
  red: number;
12390
+ /**
12391
+ * An integer color channel value (0-255)
12392
+ */
11998
12393
  green: number;
12394
+ /**
12395
+ * An integer color channel value (0-255)
12396
+ */
11999
12397
  blue: number;
12398
+ /**
12399
+ * An integer color channel value (0-255)
12400
+ */
12000
12401
  alpha: number;
12001
12402
  };
12403
+ /**
12404
+ * An RGBA color value
12405
+ */
12002
12406
  dark_color?: {
12407
+ /**
12408
+ * An integer color channel value (0-255)
12409
+ */
12003
12410
  red: number;
12411
+ /**
12412
+ * An integer color channel value (0-255)
12413
+ */
12004
12414
  green: number;
12415
+ /**
12416
+ * An integer color channel value (0-255)
12417
+ */
12005
12418
  blue: number;
12419
+ /**
12420
+ * An integer color channel value (0-255)
12421
+ */
12006
12422
  alpha: number;
12007
12423
  };
12008
12424
  [k: string]: unknown;
@@ -151,7 +151,7 @@ export class Client {
151
151
  ...this.config,
152
152
  ...options,
153
153
  logFn: this.config.logFn || console.log,
154
- userAgent: '@datocms/cma-client v5.4.20',
154
+ userAgent: '@datocms/cma-client v5.4.22',
155
155
  baseUrl: this.baseUrl,
156
156
  preCallStack: new Error().stack,
157
157
  extraHeaders: {