@datocms/cma-client 3.1.0 → 3.1.1

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.
@@ -128,7 +128,7 @@ var Client = /** @class */ (function () {
128
128
  });
129
129
  Client.prototype.request = function (options) {
130
130
  var _this = this;
131
- return (0, rest_client_utils_1.request)(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v3.1.0', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: __assign(__assign(__assign({}, (this.config.extraHeaders || {})), (this.config.environment
131
+ return (0, rest_client_utils_1.request)(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v3.1.1', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: __assign(__assign(__assign({}, (this.config.extraHeaders || {})), (this.config.environment
132
132
  ? { 'X-Environment': this.config.environment }
133
133
  : {})), { 'X-API-Version': '3' }), fetchJobResult: function (jobId) {
134
134
  return _this.jobResultsFetcher
@@ -102,7 +102,7 @@ var Client = /** @class */ (function () {
102
102
  });
103
103
  Client.prototype.request = function (options) {
104
104
  var _this = this;
105
- return request(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v3.1.0', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: __assign(__assign(__assign({}, (this.config.extraHeaders || {})), (this.config.environment
105
+ return request(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v3.1.1', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: __assign(__assign(__assign({}, (this.config.extraHeaders || {})), (this.config.environment
106
106
  ? { 'X-Environment': this.config.environment }
107
107
  : {})), { 'X-API-Version': '3' }), fetchJobResult: function (jobId) {
108
108
  return _this.jobResultsFetcher
@@ -9420,35 +9420,31 @@ export declare type PublicInfoAttributes = {
9420
9420
  * Specifies the color-scheme for the project
9421
9421
  */
9422
9422
  theme: {
9423
- primary_color?: {
9423
+ primary_color: {
9424
9424
  red: number;
9425
9425
  green: number;
9426
9426
  blue: number;
9427
9427
  alpha: number;
9428
9428
  [k: string]: unknown;
9429
9429
  };
9430
- light_color?: {
9430
+ light_color: {
9431
9431
  red: number;
9432
9432
  green: number;
9433
9433
  blue: number;
9434
9434
  alpha: number;
9435
- [k: string]: unknown;
9436
9435
  };
9437
- accent_color?: {
9436
+ accent_color: {
9438
9437
  red: number;
9439
9438
  green: number;
9440
9439
  blue: number;
9441
9440
  alpha: number;
9442
- [k: string]: unknown;
9443
9441
  };
9444
- dark_color?: {
9442
+ dark_color: {
9445
9443
  red: number;
9446
9444
  green: number;
9447
9445
  blue: number;
9448
9446
  alpha: number;
9449
- [k: string]: unknown;
9450
9447
  };
9451
- [k: string]: unknown;
9452
9448
  };
9453
9449
  /**
9454
9450
  * Additional information (only returned on authenticated requests)
@@ -9767,39 +9763,42 @@ export declare type SiteAttributes = {
9767
9763
  * Specifies the theme to use in administrative area
9768
9764
  */
9769
9765
  theme: {
9766
+ /**
9767
+ * 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
9768
+ */
9769
+ type: 'custom' | 'monochromatic';
9770
+ /**
9771
+ * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
9772
+ */
9773
+ hue: number | null;
9770
9774
  primary_color: {
9771
9775
  red: number;
9772
9776
  green: number;
9773
9777
  blue: number;
9774
9778
  alpha: number;
9775
- [k: string]: unknown;
9776
9779
  };
9777
9780
  light_color: {
9778
9781
  red: number;
9779
9782
  green: number;
9780
9783
  blue: number;
9781
9784
  alpha: number;
9782
- [k: string]: unknown;
9783
9785
  };
9784
9786
  accent_color: {
9785
9787
  red: number;
9786
9788
  green: number;
9787
9789
  blue: number;
9788
9790
  alpha: number;
9789
- [k: string]: unknown;
9790
9791
  };
9791
9792
  dark_color: {
9792
9793
  red: number;
9793
9794
  green: number;
9794
9795
  blue: number;
9795
9796
  alpha: number;
9796
- [k: string]: unknown;
9797
9797
  };
9798
9798
  /**
9799
- * The site logo
9799
+ * The upload ID that is used as the logo for the project
9800
9800
  */
9801
9801
  logo: string | null;
9802
- [k: string]: unknown;
9803
9802
  };
9804
9803
  /**
9805
9804
  * Specifies default global settings
@@ -9959,42 +9958,53 @@ export declare type SiteUpdateSchema = {
9959
9958
  * Site name
9960
9959
  */
9961
9960
  name?: string;
9962
- /**
9963
- * Specifies the theme to use in administrative area
9964
- */
9965
9961
  theme?: {
9962
+ /**
9963
+ * Type of theme color palette
9964
+ */
9965
+ type: 'monochromatic';
9966
+ /**
9967
+ * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
9968
+ */
9969
+ hue: number | null;
9970
+ /**
9971
+ * The upload ID that is used as the logo for the project
9972
+ */
9973
+ logo: string | null;
9974
+ [k: string]: unknown;
9975
+ } | {
9976
+ /**
9977
+ * Type of theme color palette
9978
+ */
9979
+ type?: 'custom';
9980
+ /**
9981
+ * The upload ID that is used as the logo for the project
9982
+ */
9983
+ logo: string | null;
9966
9984
  primary_color: {
9967
9985
  red: number;
9968
9986
  green: number;
9969
9987
  blue: number;
9970
9988
  alpha: number;
9971
- [k: string]: unknown;
9972
9989
  };
9973
9990
  light_color: {
9974
9991
  red: number;
9975
9992
  green: number;
9976
9993
  blue: number;
9977
9994
  alpha: number;
9978
- [k: string]: unknown;
9979
9995
  };
9980
9996
  accent_color: {
9981
9997
  red: number;
9982
9998
  green: number;
9983
9999
  blue: number;
9984
10000
  alpha: number;
9985
- [k: string]: unknown;
9986
10001
  };
9987
- dark_color: {
10002
+ dark_color?: {
9988
10003
  red: number;
9989
10004
  green: number;
9990
10005
  blue: number;
9991
10006
  alpha: number;
9992
- [k: string]: unknown;
9993
10007
  };
9994
- /**
9995
- * The site logo
9996
- */
9997
- logo: string | null;
9998
10008
  [k: string]: unknown;
9999
10009
  };
10000
10010
  /**
@@ -9094,35 +9094,31 @@ export declare type PublicInfo = {
9094
9094
  * Specifies the color-scheme for the project
9095
9095
  */
9096
9096
  theme: {
9097
- primary_color?: {
9097
+ primary_color: {
9098
9098
  red: number;
9099
9099
  green: number;
9100
9100
  blue: number;
9101
9101
  alpha: number;
9102
9102
  [k: string]: unknown;
9103
9103
  };
9104
- light_color?: {
9104
+ light_color: {
9105
9105
  red: number;
9106
9106
  green: number;
9107
9107
  blue: number;
9108
9108
  alpha: number;
9109
- [k: string]: unknown;
9110
9109
  };
9111
- accent_color?: {
9110
+ accent_color: {
9112
9111
  red: number;
9113
9112
  green: number;
9114
9113
  blue: number;
9115
9114
  alpha: number;
9116
- [k: string]: unknown;
9117
9115
  };
9118
- dark_color?: {
9116
+ dark_color: {
9119
9117
  red: number;
9120
9118
  green: number;
9121
9119
  blue: number;
9122
9120
  alpha: number;
9123
- [k: string]: unknown;
9124
9121
  };
9125
- [k: string]: unknown;
9126
9122
  };
9127
9123
  /**
9128
9124
  * Additional information (only returned on authenticated requests)
@@ -9176,35 +9172,31 @@ export declare type PublicInfoAttributes = {
9176
9172
  * Specifies the color-scheme for the project
9177
9173
  */
9178
9174
  theme: {
9179
- primary_color?: {
9175
+ primary_color: {
9180
9176
  red: number;
9181
9177
  green: number;
9182
9178
  blue: number;
9183
9179
  alpha: number;
9184
9180
  [k: string]: unknown;
9185
9181
  };
9186
- light_color?: {
9182
+ light_color: {
9187
9183
  red: number;
9188
9184
  green: number;
9189
9185
  blue: number;
9190
9186
  alpha: number;
9191
- [k: string]: unknown;
9192
9187
  };
9193
- accent_color?: {
9188
+ accent_color: {
9194
9189
  red: number;
9195
9190
  green: number;
9196
9191
  blue: number;
9197
9192
  alpha: number;
9198
- [k: string]: unknown;
9199
9193
  };
9200
- dark_color?: {
9194
+ dark_color: {
9201
9195
  red: number;
9202
9196
  green: number;
9203
9197
  blue: number;
9204
9198
  alpha: number;
9205
- [k: string]: unknown;
9206
9199
  };
9207
- [k: string]: unknown;
9208
9200
  };
9209
9201
  /**
9210
9202
  * Additional information (only returned on authenticated requests)
@@ -9490,39 +9482,42 @@ export declare type Site = {
9490
9482
  * Specifies the theme to use in administrative area
9491
9483
  */
9492
9484
  theme: {
9485
+ /**
9486
+ * 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
9487
+ */
9488
+ type: 'custom' | 'monochromatic';
9489
+ /**
9490
+ * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
9491
+ */
9492
+ hue: number | null;
9493
9493
  primary_color: {
9494
9494
  red: number;
9495
9495
  green: number;
9496
9496
  blue: number;
9497
9497
  alpha: number;
9498
- [k: string]: unknown;
9499
9498
  };
9500
9499
  light_color: {
9501
9500
  red: number;
9502
9501
  green: number;
9503
9502
  blue: number;
9504
9503
  alpha: number;
9505
- [k: string]: unknown;
9506
9504
  };
9507
9505
  accent_color: {
9508
9506
  red: number;
9509
9507
  green: number;
9510
9508
  blue: number;
9511
9509
  alpha: number;
9512
- [k: string]: unknown;
9513
9510
  };
9514
9511
  dark_color: {
9515
9512
  red: number;
9516
9513
  green: number;
9517
9514
  blue: number;
9518
9515
  alpha: number;
9519
- [k: string]: unknown;
9520
9516
  };
9521
9517
  /**
9522
- * The site logo
9518
+ * The upload ID that is used as the logo for the project
9523
9519
  */
9524
9520
  logo: string | null;
9525
- [k: string]: unknown;
9526
9521
  };
9527
9522
  /**
9528
9523
  * Specifies default global settings
@@ -9675,39 +9670,42 @@ export declare type SiteAttributes = {
9675
9670
  * Specifies the theme to use in administrative area
9676
9671
  */
9677
9672
  theme: {
9673
+ /**
9674
+ * 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
9675
+ */
9676
+ type: 'custom' | 'monochromatic';
9677
+ /**
9678
+ * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
9679
+ */
9680
+ hue: number | null;
9678
9681
  primary_color: {
9679
9682
  red: number;
9680
9683
  green: number;
9681
9684
  blue: number;
9682
9685
  alpha: number;
9683
- [k: string]: unknown;
9684
9686
  };
9685
9687
  light_color: {
9686
9688
  red: number;
9687
9689
  green: number;
9688
9690
  blue: number;
9689
9691
  alpha: number;
9690
- [k: string]: unknown;
9691
9692
  };
9692
9693
  accent_color: {
9693
9694
  red: number;
9694
9695
  green: number;
9695
9696
  blue: number;
9696
9697
  alpha: number;
9697
- [k: string]: unknown;
9698
9698
  };
9699
9699
  dark_color: {
9700
9700
  red: number;
9701
9701
  green: number;
9702
9702
  blue: number;
9703
9703
  alpha: number;
9704
- [k: string]: unknown;
9705
9704
  };
9706
9705
  /**
9707
- * The site logo
9706
+ * The upload ID that is used as the logo for the project
9708
9707
  */
9709
9708
  logo: string | null;
9710
- [k: string]: unknown;
9711
9709
  };
9712
9710
  /**
9713
9711
  * Specifies default global settings
@@ -9813,42 +9811,53 @@ export declare type SiteUpdateSchema = {
9813
9811
  * Site name
9814
9812
  */
9815
9813
  name?: string;
9816
- /**
9817
- * Specifies the theme to use in administrative area
9818
- */
9819
9814
  theme?: {
9815
+ /**
9816
+ * Type of theme color palette
9817
+ */
9818
+ type: 'monochromatic';
9819
+ /**
9820
+ * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
9821
+ */
9822
+ hue: number | null;
9823
+ /**
9824
+ * The upload ID that is used as the logo for the project
9825
+ */
9826
+ logo: string | null;
9827
+ [k: string]: unknown;
9828
+ } | {
9829
+ /**
9830
+ * Type of theme color palette
9831
+ */
9832
+ type?: 'custom';
9833
+ /**
9834
+ * The upload ID that is used as the logo for the project
9835
+ */
9836
+ logo: string | null;
9820
9837
  primary_color: {
9821
9838
  red: number;
9822
9839
  green: number;
9823
9840
  blue: number;
9824
9841
  alpha: number;
9825
- [k: string]: unknown;
9826
9842
  };
9827
9843
  light_color: {
9828
9844
  red: number;
9829
9845
  green: number;
9830
9846
  blue: number;
9831
9847
  alpha: number;
9832
- [k: string]: unknown;
9833
9848
  };
9834
9849
  accent_color: {
9835
9850
  red: number;
9836
9851
  green: number;
9837
9852
  blue: number;
9838
9853
  alpha: number;
9839
- [k: string]: unknown;
9840
9854
  };
9841
- dark_color: {
9855
+ dark_color?: {
9842
9856
  red: number;
9843
9857
  green: number;
9844
9858
  blue: number;
9845
9859
  alpha: number;
9846
- [k: string]: unknown;
9847
9860
  };
9848
- /**
9849
- * The site logo
9850
- */
9851
- logo: string | null;
9852
9861
  [k: string]: unknown;
9853
9862
  };
9854
9863
  /**
@@ -9420,35 +9420,31 @@ export declare type PublicInfoAttributes = {
9420
9420
  * Specifies the color-scheme for the project
9421
9421
  */
9422
9422
  theme: {
9423
- primary_color?: {
9423
+ primary_color: {
9424
9424
  red: number;
9425
9425
  green: number;
9426
9426
  blue: number;
9427
9427
  alpha: number;
9428
9428
  [k: string]: unknown;
9429
9429
  };
9430
- light_color?: {
9430
+ light_color: {
9431
9431
  red: number;
9432
9432
  green: number;
9433
9433
  blue: number;
9434
9434
  alpha: number;
9435
- [k: string]: unknown;
9436
9435
  };
9437
- accent_color?: {
9436
+ accent_color: {
9438
9437
  red: number;
9439
9438
  green: number;
9440
9439
  blue: number;
9441
9440
  alpha: number;
9442
- [k: string]: unknown;
9443
9441
  };
9444
- dark_color?: {
9442
+ dark_color: {
9445
9443
  red: number;
9446
9444
  green: number;
9447
9445
  blue: number;
9448
9446
  alpha: number;
9449
- [k: string]: unknown;
9450
9447
  };
9451
- [k: string]: unknown;
9452
9448
  };
9453
9449
  /**
9454
9450
  * Additional information (only returned on authenticated requests)
@@ -9767,39 +9763,42 @@ export declare type SiteAttributes = {
9767
9763
  * Specifies the theme to use in administrative area
9768
9764
  */
9769
9765
  theme: {
9766
+ /**
9767
+ * 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
9768
+ */
9769
+ type: 'custom' | 'monochromatic';
9770
+ /**
9771
+ * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
9772
+ */
9773
+ hue: number | null;
9770
9774
  primary_color: {
9771
9775
  red: number;
9772
9776
  green: number;
9773
9777
  blue: number;
9774
9778
  alpha: number;
9775
- [k: string]: unknown;
9776
9779
  };
9777
9780
  light_color: {
9778
9781
  red: number;
9779
9782
  green: number;
9780
9783
  blue: number;
9781
9784
  alpha: number;
9782
- [k: string]: unknown;
9783
9785
  };
9784
9786
  accent_color: {
9785
9787
  red: number;
9786
9788
  green: number;
9787
9789
  blue: number;
9788
9790
  alpha: number;
9789
- [k: string]: unknown;
9790
9791
  };
9791
9792
  dark_color: {
9792
9793
  red: number;
9793
9794
  green: number;
9794
9795
  blue: number;
9795
9796
  alpha: number;
9796
- [k: string]: unknown;
9797
9797
  };
9798
9798
  /**
9799
- * The site logo
9799
+ * The upload ID that is used as the logo for the project
9800
9800
  */
9801
9801
  logo: string | null;
9802
- [k: string]: unknown;
9803
9802
  };
9804
9803
  /**
9805
9804
  * Specifies default global settings
@@ -9959,42 +9958,53 @@ export declare type SiteUpdateSchema = {
9959
9958
  * Site name
9960
9959
  */
9961
9960
  name?: string;
9962
- /**
9963
- * Specifies the theme to use in administrative area
9964
- */
9965
9961
  theme?: {
9962
+ /**
9963
+ * Type of theme color palette
9964
+ */
9965
+ type: 'monochromatic';
9966
+ /**
9967
+ * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
9968
+ */
9969
+ hue: number | null;
9970
+ /**
9971
+ * The upload ID that is used as the logo for the project
9972
+ */
9973
+ logo: string | null;
9974
+ [k: string]: unknown;
9975
+ } | {
9976
+ /**
9977
+ * Type of theme color palette
9978
+ */
9979
+ type?: 'custom';
9980
+ /**
9981
+ * The upload ID that is used as the logo for the project
9982
+ */
9983
+ logo: string | null;
9966
9984
  primary_color: {
9967
9985
  red: number;
9968
9986
  green: number;
9969
9987
  blue: number;
9970
9988
  alpha: number;
9971
- [k: string]: unknown;
9972
9989
  };
9973
9990
  light_color: {
9974
9991
  red: number;
9975
9992
  green: number;
9976
9993
  blue: number;
9977
9994
  alpha: number;
9978
- [k: string]: unknown;
9979
9995
  };
9980
9996
  accent_color: {
9981
9997
  red: number;
9982
9998
  green: number;
9983
9999
  blue: number;
9984
10000
  alpha: number;
9985
- [k: string]: unknown;
9986
10001
  };
9987
- dark_color: {
10002
+ dark_color?: {
9988
10003
  red: number;
9989
10004
  green: number;
9990
10005
  blue: number;
9991
10006
  alpha: number;
9992
- [k: string]: unknown;
9993
10007
  };
9994
- /**
9995
- * The site logo
9996
- */
9997
- logo: string | null;
9998
10008
  [k: string]: unknown;
9999
10009
  };
10000
10010
  /**
@@ -9094,35 +9094,31 @@ export declare type PublicInfo = {
9094
9094
  * Specifies the color-scheme for the project
9095
9095
  */
9096
9096
  theme: {
9097
- primary_color?: {
9097
+ primary_color: {
9098
9098
  red: number;
9099
9099
  green: number;
9100
9100
  blue: number;
9101
9101
  alpha: number;
9102
9102
  [k: string]: unknown;
9103
9103
  };
9104
- light_color?: {
9104
+ light_color: {
9105
9105
  red: number;
9106
9106
  green: number;
9107
9107
  blue: number;
9108
9108
  alpha: number;
9109
- [k: string]: unknown;
9110
9109
  };
9111
- accent_color?: {
9110
+ accent_color: {
9112
9111
  red: number;
9113
9112
  green: number;
9114
9113
  blue: number;
9115
9114
  alpha: number;
9116
- [k: string]: unknown;
9117
9115
  };
9118
- dark_color?: {
9116
+ dark_color: {
9119
9117
  red: number;
9120
9118
  green: number;
9121
9119
  blue: number;
9122
9120
  alpha: number;
9123
- [k: string]: unknown;
9124
9121
  };
9125
- [k: string]: unknown;
9126
9122
  };
9127
9123
  /**
9128
9124
  * Additional information (only returned on authenticated requests)
@@ -9176,35 +9172,31 @@ export declare type PublicInfoAttributes = {
9176
9172
  * Specifies the color-scheme for the project
9177
9173
  */
9178
9174
  theme: {
9179
- primary_color?: {
9175
+ primary_color: {
9180
9176
  red: number;
9181
9177
  green: number;
9182
9178
  blue: number;
9183
9179
  alpha: number;
9184
9180
  [k: string]: unknown;
9185
9181
  };
9186
- light_color?: {
9182
+ light_color: {
9187
9183
  red: number;
9188
9184
  green: number;
9189
9185
  blue: number;
9190
9186
  alpha: number;
9191
- [k: string]: unknown;
9192
9187
  };
9193
- accent_color?: {
9188
+ accent_color: {
9194
9189
  red: number;
9195
9190
  green: number;
9196
9191
  blue: number;
9197
9192
  alpha: number;
9198
- [k: string]: unknown;
9199
9193
  };
9200
- dark_color?: {
9194
+ dark_color: {
9201
9195
  red: number;
9202
9196
  green: number;
9203
9197
  blue: number;
9204
9198
  alpha: number;
9205
- [k: string]: unknown;
9206
9199
  };
9207
- [k: string]: unknown;
9208
9200
  };
9209
9201
  /**
9210
9202
  * Additional information (only returned on authenticated requests)
@@ -9490,39 +9482,42 @@ export declare type Site = {
9490
9482
  * Specifies the theme to use in administrative area
9491
9483
  */
9492
9484
  theme: {
9485
+ /**
9486
+ * 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
9487
+ */
9488
+ type: 'custom' | 'monochromatic';
9489
+ /**
9490
+ * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
9491
+ */
9492
+ hue: number | null;
9493
9493
  primary_color: {
9494
9494
  red: number;
9495
9495
  green: number;
9496
9496
  blue: number;
9497
9497
  alpha: number;
9498
- [k: string]: unknown;
9499
9498
  };
9500
9499
  light_color: {
9501
9500
  red: number;
9502
9501
  green: number;
9503
9502
  blue: number;
9504
9503
  alpha: number;
9505
- [k: string]: unknown;
9506
9504
  };
9507
9505
  accent_color: {
9508
9506
  red: number;
9509
9507
  green: number;
9510
9508
  blue: number;
9511
9509
  alpha: number;
9512
- [k: string]: unknown;
9513
9510
  };
9514
9511
  dark_color: {
9515
9512
  red: number;
9516
9513
  green: number;
9517
9514
  blue: number;
9518
9515
  alpha: number;
9519
- [k: string]: unknown;
9520
9516
  };
9521
9517
  /**
9522
- * The site logo
9518
+ * The upload ID that is used as the logo for the project
9523
9519
  */
9524
9520
  logo: string | null;
9525
- [k: string]: unknown;
9526
9521
  };
9527
9522
  /**
9528
9523
  * Specifies default global settings
@@ -9675,39 +9670,42 @@ export declare type SiteAttributes = {
9675
9670
  * Specifies the theme to use in administrative area
9676
9671
  */
9677
9672
  theme: {
9673
+ /**
9674
+ * 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
9675
+ */
9676
+ type: 'custom' | 'monochromatic';
9677
+ /**
9678
+ * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
9679
+ */
9680
+ hue: number | null;
9678
9681
  primary_color: {
9679
9682
  red: number;
9680
9683
  green: number;
9681
9684
  blue: number;
9682
9685
  alpha: number;
9683
- [k: string]: unknown;
9684
9686
  };
9685
9687
  light_color: {
9686
9688
  red: number;
9687
9689
  green: number;
9688
9690
  blue: number;
9689
9691
  alpha: number;
9690
- [k: string]: unknown;
9691
9692
  };
9692
9693
  accent_color: {
9693
9694
  red: number;
9694
9695
  green: number;
9695
9696
  blue: number;
9696
9697
  alpha: number;
9697
- [k: string]: unknown;
9698
9698
  };
9699
9699
  dark_color: {
9700
9700
  red: number;
9701
9701
  green: number;
9702
9702
  blue: number;
9703
9703
  alpha: number;
9704
- [k: string]: unknown;
9705
9704
  };
9706
9705
  /**
9707
- * The site logo
9706
+ * The upload ID that is used as the logo for the project
9708
9707
  */
9709
9708
  logo: string | null;
9710
- [k: string]: unknown;
9711
9709
  };
9712
9710
  /**
9713
9711
  * Specifies default global settings
@@ -9813,42 +9811,53 @@ export declare type SiteUpdateSchema = {
9813
9811
  * Site name
9814
9812
  */
9815
9813
  name?: string;
9816
- /**
9817
- * Specifies the theme to use in administrative area
9818
- */
9819
9814
  theme?: {
9815
+ /**
9816
+ * Type of theme color palette
9817
+ */
9818
+ type: 'monochromatic';
9819
+ /**
9820
+ * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
9821
+ */
9822
+ hue: number | null;
9823
+ /**
9824
+ * The upload ID that is used as the logo for the project
9825
+ */
9826
+ logo: string | null;
9827
+ [k: string]: unknown;
9828
+ } | {
9829
+ /**
9830
+ * Type of theme color palette
9831
+ */
9832
+ type?: 'custom';
9833
+ /**
9834
+ * The upload ID that is used as the logo for the project
9835
+ */
9836
+ logo: string | null;
9820
9837
  primary_color: {
9821
9838
  red: number;
9822
9839
  green: number;
9823
9840
  blue: number;
9824
9841
  alpha: number;
9825
- [k: string]: unknown;
9826
9842
  };
9827
9843
  light_color: {
9828
9844
  red: number;
9829
9845
  green: number;
9830
9846
  blue: number;
9831
9847
  alpha: number;
9832
- [k: string]: unknown;
9833
9848
  };
9834
9849
  accent_color: {
9835
9850
  red: number;
9836
9851
  green: number;
9837
9852
  blue: number;
9838
9853
  alpha: number;
9839
- [k: string]: unknown;
9840
9854
  };
9841
- dark_color: {
9855
+ dark_color?: {
9842
9856
  red: number;
9843
9857
  green: number;
9844
9858
  blue: number;
9845
9859
  alpha: number;
9846
- [k: string]: unknown;
9847
9860
  };
9848
- /**
9849
- * The site logo
9850
- */
9851
- logo: string | null;
9852
9861
  [k: string]: unknown;
9853
9862
  };
9854
9863
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datocms/cma-client",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "description": "JS client for DatoCMS REST Content Management API",
5
5
  "keywords": [
6
6
  "datocms",
@@ -41,8 +41,8 @@
41
41
  "uuid": "^9.0.1"
42
42
  },
43
43
  "devDependencies": {
44
- "@datocms/dashboard-client": "^3.1.0",
44
+ "@datocms/dashboard-client": "^3.1.1",
45
45
  "@types/uuid": "^9.0.7"
46
46
  },
47
- "gitHead": "cfcc70b05dee4ecf9cf6ee7769ba334f37abec8b"
47
+ "gitHead": "bbf149d515f4bd089bcfb934ead55324620eb057"
48
48
  }
@@ -137,7 +137,7 @@ export class Client {
137
137
  ...this.config,
138
138
  ...options,
139
139
  logFn: this.config.logFn || console.log,
140
- userAgent: '@datocms/cma-client v3.1.0',
140
+ userAgent: '@datocms/cma-client v3.1.1',
141
141
  baseUrl: this.baseUrl,
142
142
  preCallStack: new Error().stack,
143
143
  extraHeaders: {
@@ -10139,35 +10139,31 @@ export type PublicInfoAttributes = {
10139
10139
  * Specifies the color-scheme for the project
10140
10140
  */
10141
10141
  theme: {
10142
- primary_color?: {
10142
+ primary_color: {
10143
10143
  red: number;
10144
10144
  green: number;
10145
10145
  blue: number;
10146
10146
  alpha: number;
10147
10147
  [k: string]: unknown;
10148
10148
  };
10149
- light_color?: {
10149
+ light_color: {
10150
10150
  red: number;
10151
10151
  green: number;
10152
10152
  blue: number;
10153
10153
  alpha: number;
10154
- [k: string]: unknown;
10155
10154
  };
10156
- accent_color?: {
10155
+ accent_color: {
10157
10156
  red: number;
10158
10157
  green: number;
10159
10158
  blue: number;
10160
10159
  alpha: number;
10161
- [k: string]: unknown;
10162
10160
  };
10163
- dark_color?: {
10161
+ dark_color: {
10164
10162
  red: number;
10165
10163
  green: number;
10166
10164
  blue: number;
10167
10165
  alpha: number;
10168
- [k: string]: unknown;
10169
10166
  };
10170
- [k: string]: unknown;
10171
10167
  };
10172
10168
  /**
10173
10169
  * Additional information (only returned on authenticated requests)
@@ -10508,39 +10504,42 @@ export type SiteAttributes = {
10508
10504
  * Specifies the theme to use in administrative area
10509
10505
  */
10510
10506
  theme: {
10507
+ /**
10508
+ * 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
10509
+ */
10510
+ type: 'custom' | 'monochromatic';
10511
+ /**
10512
+ * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
10513
+ */
10514
+ hue: number | null;
10511
10515
  primary_color: {
10512
10516
  red: number;
10513
10517
  green: number;
10514
10518
  blue: number;
10515
10519
  alpha: number;
10516
- [k: string]: unknown;
10517
10520
  };
10518
10521
  light_color: {
10519
10522
  red: number;
10520
10523
  green: number;
10521
10524
  blue: number;
10522
10525
  alpha: number;
10523
- [k: string]: unknown;
10524
10526
  };
10525
10527
  accent_color: {
10526
10528
  red: number;
10527
10529
  green: number;
10528
10530
  blue: number;
10529
10531
  alpha: number;
10530
- [k: string]: unknown;
10531
10532
  };
10532
10533
  dark_color: {
10533
10534
  red: number;
10534
10535
  green: number;
10535
10536
  blue: number;
10536
10537
  alpha: number;
10537
- [k: string]: unknown;
10538
10538
  };
10539
10539
  /**
10540
- * The site logo
10540
+ * The upload ID that is used as the logo for the project
10541
10541
  */
10542
10542
  logo: string | null;
10543
- [k: string]: unknown;
10544
10543
  };
10545
10544
  /**
10546
10545
  * Specifies default global settings
@@ -10705,44 +10704,57 @@ export type SiteUpdateSchema = {
10705
10704
  * Site name
10706
10705
  */
10707
10706
  name?: string;
10708
- /**
10709
- * Specifies the theme to use in administrative area
10710
- */
10711
- theme?: {
10712
- primary_color: {
10713
- red: number;
10714
- green: number;
10715
- blue: number;
10716
- alpha: number;
10717
- [k: string]: unknown;
10718
- };
10719
- light_color: {
10720
- red: number;
10721
- green: number;
10722
- blue: number;
10723
- alpha: number;
10724
- [k: string]: unknown;
10725
- };
10726
- accent_color: {
10727
- red: number;
10728
- green: number;
10729
- blue: number;
10730
- alpha: number;
10731
- [k: string]: unknown;
10732
- };
10733
- dark_color: {
10734
- red: number;
10735
- green: number;
10736
- blue: number;
10737
- alpha: number;
10738
- [k: string]: unknown;
10739
- };
10740
- /**
10741
- * The site logo
10742
- */
10743
- logo: string | null;
10744
- [k: string]: unknown;
10745
- };
10707
+ theme?:
10708
+ | {
10709
+ /**
10710
+ * Type of theme color palette
10711
+ */
10712
+ type: 'monochromatic';
10713
+ /**
10714
+ * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
10715
+ */
10716
+ hue: number | null;
10717
+ /**
10718
+ * The upload ID that is used as the logo for the project
10719
+ */
10720
+ logo: string | null;
10721
+ [k: string]: unknown;
10722
+ }
10723
+ | {
10724
+ /**
10725
+ * Type of theme color palette
10726
+ */
10727
+ type?: 'custom';
10728
+ /**
10729
+ * The upload ID that is used as the logo for the project
10730
+ */
10731
+ logo: string | null;
10732
+ primary_color: {
10733
+ red: number;
10734
+ green: number;
10735
+ blue: number;
10736
+ alpha: number;
10737
+ };
10738
+ light_color: {
10739
+ red: number;
10740
+ green: number;
10741
+ blue: number;
10742
+ alpha: number;
10743
+ };
10744
+ accent_color: {
10745
+ red: number;
10746
+ green: number;
10747
+ blue: number;
10748
+ alpha: number;
10749
+ };
10750
+ dark_color?: {
10751
+ red: number;
10752
+ green: number;
10753
+ blue: number;
10754
+ alpha: number;
10755
+ };
10756
+ [k: string]: unknown;
10757
+ };
10746
10758
  /**
10747
10759
  * Available locales
10748
10760
  */
@@ -9722,35 +9722,31 @@ export type PublicInfo = {
9722
9722
  * Specifies the color-scheme for the project
9723
9723
  */
9724
9724
  theme: {
9725
- primary_color?: {
9725
+ primary_color: {
9726
9726
  red: number;
9727
9727
  green: number;
9728
9728
  blue: number;
9729
9729
  alpha: number;
9730
9730
  [k: string]: unknown;
9731
9731
  };
9732
- light_color?: {
9732
+ light_color: {
9733
9733
  red: number;
9734
9734
  green: number;
9735
9735
  blue: number;
9736
9736
  alpha: number;
9737
- [k: string]: unknown;
9738
9737
  };
9739
- accent_color?: {
9738
+ accent_color: {
9740
9739
  red: number;
9741
9740
  green: number;
9742
9741
  blue: number;
9743
9742
  alpha: number;
9744
- [k: string]: unknown;
9745
9743
  };
9746
- dark_color?: {
9744
+ dark_color: {
9747
9745
  red: number;
9748
9746
  green: number;
9749
9747
  blue: number;
9750
9748
  alpha: number;
9751
- [k: string]: unknown;
9752
9749
  };
9753
- [k: string]: unknown;
9754
9750
  };
9755
9751
  /**
9756
9752
  * Additional information (only returned on authenticated requests)
@@ -9805,35 +9801,31 @@ export type PublicInfoAttributes = {
9805
9801
  * Specifies the color-scheme for the project
9806
9802
  */
9807
9803
  theme: {
9808
- primary_color?: {
9804
+ primary_color: {
9809
9805
  red: number;
9810
9806
  green: number;
9811
9807
  blue: number;
9812
9808
  alpha: number;
9813
9809
  [k: string]: unknown;
9814
9810
  };
9815
- light_color?: {
9811
+ light_color: {
9816
9812
  red: number;
9817
9813
  green: number;
9818
9814
  blue: number;
9819
9815
  alpha: number;
9820
- [k: string]: unknown;
9821
9816
  };
9822
- accent_color?: {
9817
+ accent_color: {
9823
9818
  red: number;
9824
9819
  green: number;
9825
9820
  blue: number;
9826
9821
  alpha: number;
9827
- [k: string]: unknown;
9828
9822
  };
9829
- dark_color?: {
9823
+ dark_color: {
9830
9824
  red: number;
9831
9825
  green: number;
9832
9826
  blue: number;
9833
9827
  alpha: number;
9834
- [k: string]: unknown;
9835
9828
  };
9836
- [k: string]: unknown;
9837
9829
  };
9838
9830
  /**
9839
9831
  * Additional information (only returned on authenticated requests)
@@ -10131,39 +10123,42 @@ export type Site = {
10131
10123
  * Specifies the theme to use in administrative area
10132
10124
  */
10133
10125
  theme: {
10126
+ /**
10127
+ * 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
10128
+ */
10129
+ type: 'custom' | 'monochromatic';
10130
+ /**
10131
+ * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
10132
+ */
10133
+ hue: number | null;
10134
10134
  primary_color: {
10135
10135
  red: number;
10136
10136
  green: number;
10137
10137
  blue: number;
10138
10138
  alpha: number;
10139
- [k: string]: unknown;
10140
10139
  };
10141
10140
  light_color: {
10142
10141
  red: number;
10143
10142
  green: number;
10144
10143
  blue: number;
10145
10144
  alpha: number;
10146
- [k: string]: unknown;
10147
10145
  };
10148
10146
  accent_color: {
10149
10147
  red: number;
10150
10148
  green: number;
10151
10149
  blue: number;
10152
10150
  alpha: number;
10153
- [k: string]: unknown;
10154
10151
  };
10155
10152
  dark_color: {
10156
10153
  red: number;
10157
10154
  green: number;
10158
10155
  blue: number;
10159
10156
  alpha: number;
10160
- [k: string]: unknown;
10161
10157
  };
10162
10158
  /**
10163
- * The site logo
10159
+ * The upload ID that is used as the logo for the project
10164
10160
  */
10165
10161
  logo: string | null;
10166
- [k: string]: unknown;
10167
10162
  };
10168
10163
  /**
10169
10164
  * Specifies default global settings
@@ -10318,39 +10313,42 @@ export type SiteAttributes = {
10318
10313
  * Specifies the theme to use in administrative area
10319
10314
  */
10320
10315
  theme: {
10316
+ /**
10317
+ * 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
10318
+ */
10319
+ type: 'custom' | 'monochromatic';
10320
+ /**
10321
+ * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
10322
+ */
10323
+ hue: number | null;
10321
10324
  primary_color: {
10322
10325
  red: number;
10323
10326
  green: number;
10324
10327
  blue: number;
10325
10328
  alpha: number;
10326
- [k: string]: unknown;
10327
10329
  };
10328
10330
  light_color: {
10329
10331
  red: number;
10330
10332
  green: number;
10331
10333
  blue: number;
10332
10334
  alpha: number;
10333
- [k: string]: unknown;
10334
10335
  };
10335
10336
  accent_color: {
10336
10337
  red: number;
10337
10338
  green: number;
10338
10339
  blue: number;
10339
10340
  alpha: number;
10340
- [k: string]: unknown;
10341
10341
  };
10342
10342
  dark_color: {
10343
10343
  red: number;
10344
10344
  green: number;
10345
10345
  blue: number;
10346
10346
  alpha: number;
10347
- [k: string]: unknown;
10348
10347
  };
10349
10348
  /**
10350
- * The site logo
10349
+ * The upload ID that is used as the logo for the project
10351
10350
  */
10352
10351
  logo: string | null;
10353
- [k: string]: unknown;
10354
10352
  };
10355
10353
  /**
10356
10354
  * Specifies default global settings
@@ -10458,44 +10456,57 @@ export type SiteUpdateSchema = {
10458
10456
  * Site name
10459
10457
  */
10460
10458
  name?: string;
10461
- /**
10462
- * Specifies the theme to use in administrative area
10463
- */
10464
- theme?: {
10465
- primary_color: {
10466
- red: number;
10467
- green: number;
10468
- blue: number;
10469
- alpha: number;
10470
- [k: string]: unknown;
10471
- };
10472
- light_color: {
10473
- red: number;
10474
- green: number;
10475
- blue: number;
10476
- alpha: number;
10477
- [k: string]: unknown;
10478
- };
10479
- accent_color: {
10480
- red: number;
10481
- green: number;
10482
- blue: number;
10483
- alpha: number;
10484
- [k: string]: unknown;
10485
- };
10486
- dark_color: {
10487
- red: number;
10488
- green: number;
10489
- blue: number;
10490
- alpha: number;
10491
- [k: string]: unknown;
10492
- };
10493
- /**
10494
- * The site logo
10495
- */
10496
- logo: string | null;
10497
- [k: string]: unknown;
10498
- };
10459
+ theme?:
10460
+ | {
10461
+ /**
10462
+ * Type of theme color palette
10463
+ */
10464
+ type: 'monochromatic';
10465
+ /**
10466
+ * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
10467
+ */
10468
+ hue: number | null;
10469
+ /**
10470
+ * The upload ID that is used as the logo for the project
10471
+ */
10472
+ logo: string | null;
10473
+ [k: string]: unknown;
10474
+ }
10475
+ | {
10476
+ /**
10477
+ * Type of theme color palette
10478
+ */
10479
+ type?: 'custom';
10480
+ /**
10481
+ * The upload ID that is used as the logo for the project
10482
+ */
10483
+ logo: string | null;
10484
+ primary_color: {
10485
+ red: number;
10486
+ green: number;
10487
+ blue: number;
10488
+ alpha: number;
10489
+ };
10490
+ light_color: {
10491
+ red: number;
10492
+ green: number;
10493
+ blue: number;
10494
+ alpha: number;
10495
+ };
10496
+ accent_color: {
10497
+ red: number;
10498
+ green: number;
10499
+ blue: number;
10500
+ alpha: number;
10501
+ };
10502
+ dark_color?: {
10503
+ red: number;
10504
+ green: number;
10505
+ blue: number;
10506
+ alpha: number;
10507
+ };
10508
+ [k: string]: unknown;
10509
+ };
10499
10510
  /**
10500
10511
  * Available locales
10501
10512
  */