@datocms/cma-client 5.5.0-alpha.1 → 5.5.0

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 (44) hide show
  1. package/dist/cjs/generated/Client.js +1 -1
  2. package/dist/cjs/generated/Client.js.map +1 -1
  3. package/dist/cjs/generated/resources/Site.js +29 -0
  4. package/dist/cjs/generated/resources/Site.js.map +1 -1
  5. package/dist/cjs/generated/resources/index.js +1 -1
  6. package/dist/cjs/generated/resources/index.js.map +1 -1
  7. package/dist/cjs/index.js.map +1 -1
  8. package/dist/cjs/resources/Upload.js +10 -0
  9. package/dist/cjs/resources/Upload.js.map +1 -0
  10. package/dist/cjs/utilities/id.js +1 -1
  11. package/dist/cjs/utilities/id.js.map +1 -1
  12. package/dist/esm/generated/ApiTypes.d.ts +527 -140
  13. package/dist/esm/generated/Client.js +1 -1
  14. package/dist/esm/generated/Client.js.map +1 -1
  15. package/dist/esm/generated/RawApiTypes.d.ts +334 -102
  16. package/dist/esm/generated/resources/Site.d.ts +22 -0
  17. package/dist/esm/generated/resources/Site.js +29 -0
  18. package/dist/esm/generated/resources/Site.js.map +1 -1
  19. package/dist/esm/generated/resources/index.d.ts +1 -1
  20. package/dist/esm/generated/resources/index.js +1 -1
  21. package/dist/esm/generated/resources/index.js.map +1 -1
  22. package/dist/esm/index.d.ts +1 -0
  23. package/dist/esm/index.js.map +1 -1
  24. package/dist/esm/resources/Upload.d.ts +44 -0
  25. package/dist/esm/resources/Upload.js +4 -0
  26. package/dist/esm/resources/Upload.js.map +1 -0
  27. package/dist/esm/utilities/id.js +1 -1
  28. package/dist/esm/utilities/id.js.map +1 -1
  29. package/dist/types/generated/ApiTypes.d.ts +527 -140
  30. package/dist/types/generated/RawApiTypes.d.ts +334 -102
  31. package/dist/types/generated/resources/Site.d.ts +22 -0
  32. package/dist/types/generated/resources/index.d.ts +1 -1
  33. package/dist/types/index.d.ts +1 -0
  34. package/dist/types/resources/Upload.d.ts +44 -0
  35. package/package.json +4 -5
  36. package/resources.json +17 -0
  37. package/src/generated/ApiTypes.ts +527 -140
  38. package/src/generated/Client.ts +1 -1
  39. package/src/generated/RawApiTypes.ts +334 -102
  40. package/src/generated/resources/Site.ts +37 -0
  41. package/src/generated/resources/index.ts +1 -1
  42. package/src/index.ts +4 -0
  43. package/src/resources/Upload.ts +36 -0
  44. package/src/utilities/id.ts +1 -1
@@ -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.5.0-alpha.1',
154
+ userAgent: '@datocms/cma-client v5.5.0',
155
155
  baseUrl: this.baseUrl,
156
156
  preCallStack: new Error().stack,
157
157
  extraHeaders: {
@@ -8277,14 +8277,6 @@ export type ItemVersionMeta = {
8277
8277
  * Whether the record version is the published version or not
8278
8278
  */
8279
8279
  is_published: boolean;
8280
- /**
8281
- * Date this version became the published version of the record, or `null` if it has never been published. May also be `null` for versions that were published before publication-history tracking was introduced; in that case, fall back to `is_published` to determine the live status.
8282
- */
8283
- published_from: string | null;
8284
- /**
8285
- * Date this version stopped being the published version of the record (either replaced by a newer published version, or explicitly unpublished). `null` when the version is currently published or has never been published.
8286
- */
8287
- published_until: string | null;
8288
8280
  /**
8289
8281
  * Whether the record version is the most recent version or not
8290
8282
  */
@@ -8624,42 +8616,25 @@ export type UploadAttributes = {
8624
8616
  */
8625
8617
  mux_mp4_highest_res: null | 'high' | 'medium' | 'low';
8626
8618
  /**
8627
- * For each of the project's locales, the default metadata to apply if nothing is specified at record's level.
8619
+ * Per-asset default metadata applied when no record-level overrides are present. `alt`, `title`, and `custom_data` are objects keyed by locale; `focal_point` is a single value per asset (only meaningful for image assets). See [non-localized focal points](https://www.datocms.com/product-updates/non-localized-focal-points) for more info.
8628
8620
  */
8629
8621
  default_field_metadata: {
8622
+ alt: LocalizedAlt;
8623
+ title: LocalizedTitle;
8624
+ custom_data: LocalizedCustomData;
8630
8625
  /**
8631
- * This interface was referenced by `undefined`'s JSON-Schema definition
8632
- * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
8626
+ * Focal point (only for image assets)
8633
8627
  */
8634
- [k: string]: {
8628
+ focal_point: {
8635
8629
  /**
8636
- * Alternate text for the asset
8630
+ * Horizontal position expressed as float between 0 and 1
8637
8631
  */
8638
- alt: string | null;
8632
+ x: number;
8639
8633
  /**
8640
- * Title for the asset
8634
+ * Vertical position expressed as float between 0 and 1
8641
8635
  */
8642
- title: string | null;
8643
- /**
8644
- * Object with arbitrary metadata
8645
- */
8646
- custom_data: {
8647
- [k: string]: unknown;
8648
- };
8649
- /**
8650
- * Focal point (only for image assets)
8651
- */
8652
- focal_point: {
8653
- /**
8654
- * Horizontal position expressed as float between 0 and 1
8655
- */
8656
- x: number;
8657
- /**
8658
- * Vertical position expressed as float between 0 and 1
8659
- */
8660
- y: number;
8661
- } | null;
8662
- };
8636
+ y: number;
8637
+ } | null;
8663
8638
  };
8664
8639
  /**
8665
8640
  * Is this upload an image?
@@ -8713,6 +8688,44 @@ export type UploadAttributes = {
8713
8688
  alpha: number;
8714
8689
  }[];
8715
8690
  };
8691
+ /**
8692
+ * Alternate text per locale
8693
+ */
8694
+ export type LocalizedAlt = {
8695
+ /**
8696
+ * Alternate text for the asset in this locale
8697
+ *
8698
+ * This interface was referenced by `LocalizedAlt`'s JSON-Schema definition
8699
+ * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
8700
+ */
8701
+ [k: string]: string | null;
8702
+ };
8703
+ /**
8704
+ * Title per locale
8705
+ */
8706
+ export type LocalizedTitle = {
8707
+ /**
8708
+ * Title for the asset in this locale
8709
+ *
8710
+ * This interface was referenced by `LocalizedTitle`'s JSON-Schema definition
8711
+ * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
8712
+ */
8713
+ [k: string]: string | null;
8714
+ };
8715
+ /**
8716
+ * Object with arbitrary metadata, per locale
8717
+ */
8718
+ export type LocalizedCustomData = {
8719
+ /**
8720
+ * Arbitrary metadata for the asset in this locale
8721
+ *
8722
+ * This interface was referenced by `LocalizedCustomData`'s JSON-Schema definition
8723
+ * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
8724
+ */
8725
+ [k: string]: {
8726
+ [k: string]: unknown;
8727
+ };
8728
+ };
8716
8729
  /**
8717
8730
  * JSON API links
8718
8731
  *
@@ -8799,42 +8812,25 @@ export type UploadCreateSchema = {
8799
8812
  */
8800
8813
  notes?: string | null;
8801
8814
  /**
8802
- * For each of the project's locales, the default metadata to apply if nothing is specified at record's level.
8815
+ * Patch the asset's default metadata. Send any subset of `alt`/`title`/`custom_data`/`focal_point` — missing keys preserve their stored values. See the response shape for the full structure and per-key semantics.
8803
8816
  */
8804
8817
  default_field_metadata?: {
8818
+ alt?: LocalizedAlt;
8819
+ title?: LocalizedTitle;
8820
+ custom_data?: LocalizedCustomData;
8805
8821
  /**
8806
- * This interface was referenced by `undefined`'s JSON-Schema definition
8807
- * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
8822
+ * Focal point (only for image assets)
8808
8823
  */
8809
- [k: string]: {
8824
+ focal_point?: {
8810
8825
  /**
8811
- * Alternate text for the asset
8826
+ * Horizontal position expressed as float between 0 and 1
8812
8827
  */
8813
- alt?: string | null;
8828
+ x: number;
8814
8829
  /**
8815
- * Title for the asset
8830
+ * Vertical position expressed as float between 0 and 1
8816
8831
  */
8817
- title?: string | null;
8818
- /**
8819
- * Object with arbitrary metadata
8820
- */
8821
- custom_data?: {
8822
- [k: string]: unknown;
8823
- };
8824
- /**
8825
- * Focal point (only for image assets)
8826
- */
8827
- focal_point?: {
8828
- /**
8829
- * Horizontal position expressed as float between 0 and 1
8830
- */
8831
- x: number;
8832
- /**
8833
- * Vertical position expressed as float between 0 and 1
8834
- */
8835
- y: number;
8836
- } | null;
8837
- };
8832
+ y: number;
8833
+ } | null;
8838
8834
  };
8839
8835
  /**
8840
8836
  * Tags
@@ -8924,42 +8920,25 @@ export type UploadUpdateSchema = {
8924
8920
  */
8925
8921
  tags?: string[];
8926
8922
  /**
8927
- * For each of the project's locales, the default metadata to apply if nothing is specified at record's level.
8923
+ * Patch the asset's default metadata. Send any subset of `alt`/`title`/`custom_data`/`focal_point` — missing keys preserve their stored values. See the response shape for the full structure and per-key semantics.
8928
8924
  */
8929
8925
  default_field_metadata?: {
8926
+ alt?: LocalizedAlt;
8927
+ title?: LocalizedTitle;
8928
+ custom_data?: LocalizedCustomData;
8930
8929
  /**
8931
- * This interface was referenced by `undefined`'s JSON-Schema definition
8932
- * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
8930
+ * Focal point (only for image assets)
8933
8931
  */
8934
- [k: string]: {
8935
- /**
8936
- * Alternate text for the asset
8937
- */
8938
- alt?: string | null;
8939
- /**
8940
- * Title for the asset
8941
- */
8942
- title?: string | null;
8932
+ focal_point?: {
8943
8933
  /**
8944
- * Object with arbitrary metadata
8934
+ * Horizontal position expressed as float between 0 and 1
8945
8935
  */
8946
- custom_data?: {
8947
- [k: string]: unknown;
8948
- };
8936
+ x: number;
8949
8937
  /**
8950
- * Focal point (only for image assets)
8938
+ * Vertical position expressed as float between 0 and 1
8951
8939
  */
8952
- focal_point?: {
8953
- /**
8954
- * Horizontal position expressed as float between 0 and 1
8955
- */
8956
- x: number;
8957
- /**
8958
- * Vertical position expressed as float between 0 and 1
8959
- */
8960
- y: number;
8961
- } | null;
8962
- };
8940
+ y: number;
8941
+ } | null;
8963
8942
  };
8964
8943
  [k: string]: unknown;
8965
8944
  };
@@ -11565,32 +11544,125 @@ export type PublicInfoAttributes = {
11565
11544
  */
11566
11545
  custom_i18n_messages_template_url: null | string;
11567
11546
  /**
11568
- * Specifies the color-scheme for the project
11547
+ * 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.
11569
11548
  */
11570
11549
  theme: {
11571
- primary_color: {
11550
+ /**
11551
+ * Whether the project is using a custom color palette or a monochromatic one derived from a hue.
11552
+ */
11553
+ type: 'custom' | 'monochromatic';
11554
+ /**
11555
+ * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
11556
+ */
11557
+ hue: number | null;
11558
+ /**
11559
+ * An integer color channel value (0-255)
11560
+ */
11561
+ color_channel?: number;
11562
+ /**
11563
+ * An RGBA color value
11564
+ */
11565
+ color?: {
11566
+ /**
11567
+ * An integer color channel value (0-255)
11568
+ */
11572
11569
  red: number;
11570
+ /**
11571
+ * An integer color channel value (0-255)
11572
+ */
11573
11573
  green: number;
11574
+ /**
11575
+ * An integer color channel value (0-255)
11576
+ */
11574
11577
  blue: number;
11578
+ /**
11579
+ * An integer color channel value (0-255)
11580
+ */
11575
11581
  alpha: number;
11576
11582
  [k: string]: unknown;
11577
11583
  };
11578
- light_color: {
11584
+ /**
11585
+ * An RGBA color value
11586
+ */
11587
+ primary_color?: {
11588
+ /**
11589
+ * An integer color channel value (0-255)
11590
+ */
11579
11591
  red: number;
11592
+ /**
11593
+ * An integer color channel value (0-255)
11594
+ */
11580
11595
  green: number;
11596
+ /**
11597
+ * An integer color channel value (0-255)
11598
+ */
11581
11599
  blue: number;
11600
+ /**
11601
+ * An integer color channel value (0-255)
11602
+ */
11603
+ alpha: number;
11604
+ };
11605
+ /**
11606
+ * An RGBA color value
11607
+ */
11608
+ light_color?: {
11609
+ /**
11610
+ * An integer color channel value (0-255)
11611
+ */
11612
+ red: number;
11613
+ /**
11614
+ * An integer color channel value (0-255)
11615
+ */
11616
+ green: number;
11617
+ /**
11618
+ * An integer color channel value (0-255)
11619
+ */
11620
+ blue: number;
11621
+ /**
11622
+ * An integer color channel value (0-255)
11623
+ */
11582
11624
  alpha: number;
11583
11625
  };
11584
- accent_color: {
11626
+ /**
11627
+ * An RGBA color value
11628
+ */
11629
+ accent_color?: {
11630
+ /**
11631
+ * An integer color channel value (0-255)
11632
+ */
11585
11633
  red: number;
11634
+ /**
11635
+ * An integer color channel value (0-255)
11636
+ */
11586
11637
  green: number;
11638
+ /**
11639
+ * An integer color channel value (0-255)
11640
+ */
11587
11641
  blue: number;
11642
+ /**
11643
+ * An integer color channel value (0-255)
11644
+ */
11588
11645
  alpha: number;
11589
11646
  };
11590
- dark_color: {
11647
+ /**
11648
+ * An RGBA color value
11649
+ */
11650
+ dark_color?: {
11651
+ /**
11652
+ * An integer color channel value (0-255)
11653
+ */
11591
11654
  red: number;
11655
+ /**
11656
+ * An integer color channel value (0-255)
11657
+ */
11592
11658
  green: number;
11659
+ /**
11660
+ * An integer color channel value (0-255)
11661
+ */
11593
11662
  blue: number;
11663
+ /**
11664
+ * An integer color channel value (0-255)
11665
+ */
11594
11666
  alpha: number;
11595
11667
  };
11596
11668
  };
@@ -11955,7 +12027,7 @@ export type SiteAttributes = {
11955
12027
  };
11956
12028
  };
11957
12029
  /**
11958
- * Specifies the theme to use in administrative area
12030
+ * 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.
11959
12031
  */
11960
12032
  theme: {
11961
12033
  /**
@@ -11966,28 +12038,113 @@ export type SiteAttributes = {
11966
12038
  * If the type is monochromatic, the value will fall between 0 and 359. If it's not, the value will be null.
11967
12039
  */
11968
12040
  hue: number | null;
11969
- primary_color: {
12041
+ /**
12042
+ * An integer color channel value (0-255)
12043
+ */
12044
+ color_channel?: number;
12045
+ /**
12046
+ * An RGBA color value
12047
+ */
12048
+ color?: {
12049
+ /**
12050
+ * An integer color channel value (0-255)
12051
+ */
11970
12052
  red: number;
12053
+ /**
12054
+ * An integer color channel value (0-255)
12055
+ */
11971
12056
  green: number;
12057
+ /**
12058
+ * An integer color channel value (0-255)
12059
+ */
11972
12060
  blue: number;
12061
+ /**
12062
+ * An integer color channel value (0-255)
12063
+ */
11973
12064
  alpha: number;
11974
12065
  };
11975
- light_color: {
12066
+ /**
12067
+ * An RGBA color value
12068
+ */
12069
+ primary_color?: {
12070
+ /**
12071
+ * An integer color channel value (0-255)
12072
+ */
11976
12073
  red: number;
12074
+ /**
12075
+ * An integer color channel value (0-255)
12076
+ */
11977
12077
  green: number;
12078
+ /**
12079
+ * An integer color channel value (0-255)
12080
+ */
11978
12081
  blue: number;
12082
+ /**
12083
+ * An integer color channel value (0-255)
12084
+ */
12085
+ alpha: number;
12086
+ };
12087
+ /**
12088
+ * An RGBA color value
12089
+ */
12090
+ light_color?: {
12091
+ /**
12092
+ * An integer color channel value (0-255)
12093
+ */
12094
+ red: number;
12095
+ /**
12096
+ * An integer color channel value (0-255)
12097
+ */
12098
+ green: number;
12099
+ /**
12100
+ * An integer color channel value (0-255)
12101
+ */
12102
+ blue: number;
12103
+ /**
12104
+ * An integer color channel value (0-255)
12105
+ */
11979
12106
  alpha: number;
11980
12107
  };
11981
- accent_color: {
12108
+ /**
12109
+ * An RGBA color value
12110
+ */
12111
+ accent_color?: {
12112
+ /**
12113
+ * An integer color channel value (0-255)
12114
+ */
11982
12115
  red: number;
12116
+ /**
12117
+ * An integer color channel value (0-255)
12118
+ */
11983
12119
  green: number;
12120
+ /**
12121
+ * An integer color channel value (0-255)
12122
+ */
11984
12123
  blue: number;
12124
+ /**
12125
+ * An integer color channel value (0-255)
12126
+ */
11985
12127
  alpha: number;
11986
12128
  };
11987
- dark_color: {
12129
+ /**
12130
+ * An RGBA color value
12131
+ */
12132
+ dark_color?: {
12133
+ /**
12134
+ * An integer color channel value (0-255)
12135
+ */
11988
12136
  red: number;
12137
+ /**
12138
+ * An integer color channel value (0-255)
12139
+ */
11989
12140
  green: number;
12141
+ /**
12142
+ * An integer color channel value (0-255)
12143
+ */
11990
12144
  blue: number;
12145
+ /**
12146
+ * An integer color channel value (0-255)
12147
+ */
11991
12148
  alpha: number;
11992
12149
  };
11993
12150
  /**
@@ -12106,6 +12263,10 @@ export type SiteMeta = {
12106
12263
  * Whether the [Milliseconds in datetime](https://www.datocms.com/product-updates/milliseconds-in-datetime) opt-in product update is active or not
12107
12264
  */
12108
12265
  milliseconds_in_datetime: boolean;
12266
+ /**
12267
+ * Whether the [Non-localized focal points](https://www.datocms.com/product-updates/non-localized-focal-points) opt-in product update is active or not
12268
+ */
12269
+ non_localized_focal_points: boolean;
12109
12270
  };
12110
12271
  /**
12111
12272
  * JSON API data
@@ -12206,28 +12367,88 @@ export type SiteUpdateSchema = {
12206
12367
  * The upload ID that is used as the logo for the project
12207
12368
  */
12208
12369
  logo: string | null;
12370
+ /**
12371
+ * An RGBA color value
12372
+ */
12209
12373
  primary_color: {
12374
+ /**
12375
+ * An integer color channel value (0-255)
12376
+ */
12210
12377
  red: number;
12378
+ /**
12379
+ * An integer color channel value (0-255)
12380
+ */
12211
12381
  green: number;
12382
+ /**
12383
+ * An integer color channel value (0-255)
12384
+ */
12212
12385
  blue: number;
12386
+ /**
12387
+ * An integer color channel value (0-255)
12388
+ */
12213
12389
  alpha: number;
12214
12390
  };
12391
+ /**
12392
+ * An RGBA color value
12393
+ */
12215
12394
  light_color: {
12395
+ /**
12396
+ * An integer color channel value (0-255)
12397
+ */
12216
12398
  red: number;
12399
+ /**
12400
+ * An integer color channel value (0-255)
12401
+ */
12217
12402
  green: number;
12403
+ /**
12404
+ * An integer color channel value (0-255)
12405
+ */
12218
12406
  blue: number;
12407
+ /**
12408
+ * An integer color channel value (0-255)
12409
+ */
12219
12410
  alpha: number;
12220
12411
  };
12412
+ /**
12413
+ * An RGBA color value
12414
+ */
12221
12415
  accent_color: {
12416
+ /**
12417
+ * An integer color channel value (0-255)
12418
+ */
12222
12419
  red: number;
12420
+ /**
12421
+ * An integer color channel value (0-255)
12422
+ */
12223
12423
  green: number;
12424
+ /**
12425
+ * An integer color channel value (0-255)
12426
+ */
12224
12427
  blue: number;
12428
+ /**
12429
+ * An integer color channel value (0-255)
12430
+ */
12225
12431
  alpha: number;
12226
12432
  };
12433
+ /**
12434
+ * An RGBA color value
12435
+ */
12227
12436
  dark_color?: {
12437
+ /**
12438
+ * An integer color channel value (0-255)
12439
+ */
12228
12440
  red: number;
12441
+ /**
12442
+ * An integer color channel value (0-255)
12443
+ */
12229
12444
  green: number;
12445
+ /**
12446
+ * An integer color channel value (0-255)
12447
+ */
12230
12448
  blue: number;
12449
+ /**
12450
+ * An integer color channel value (0-255)
12451
+ */
12231
12452
  alpha: number;
12232
12453
  };
12233
12454
  [k: string]: unknown;
@@ -12298,6 +12519,10 @@ export type SiteUpdateSchema = {
12298
12519
  * Whether the [Milliseconds in datetime](https://www.datocms.com/product-updates/milliseconds-in-datetime) opt-in product update is active or not
12299
12520
  */
12300
12521
  milliseconds_in_datetime?: boolean;
12522
+ /**
12523
+ * Whether the [Non-localized focal points](https://www.datocms.com/product-updates/non-localized-focal-points) opt-in product update is active or not
12524
+ */
12525
+ non_localized_focal_points?: boolean;
12301
12526
  };
12302
12527
  relationships?: {
12303
12528
  sso_default_role?: {
@@ -12397,6 +12622,13 @@ export type SiteActivateImprovedItemsListingTargetSchema = {
12397
12622
  export type SiteActivateMillisecondsInDatetimeTargetSchema = {
12398
12623
  data: Site;
12399
12624
  };
12625
+ /**
12626
+ * This interface was referenced by `Site`'s JSON-Schema
12627
+ * via the `activate_non_localized_focal_points.targetSchema` link.
12628
+ */
12629
+ export type SiteActivateNonLocalizedFocalPointsTargetSchema = {
12630
+ data: Site;
12631
+ };
12400
12632
  /**
12401
12633
  * This interface was referenced by `Site`'s JSON-Schema
12402
12634
  * via the `update_assets_cdn_default_settings.schema` link.
@@ -457,6 +457,43 @@ export default class Site extends BaseResource {
457
457
  );
458
458
  }
459
459
 
460
+ /**
461
+ * Activate non-localized focal points
462
+ *
463
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_non_localized_focal_points
464
+ *
465
+ * @throws {ApiError}
466
+ * @throws {TimeoutError}
467
+ *
468
+ * @deprecated This API call is to be considered private and might change without notice
469
+ */
470
+ activateNonLocalizedFocalPoints() {
471
+ return this.rawActivateNonLocalizedFocalPoints().then((body) =>
472
+ Utils.deserializeResponseBody<ApiTypes.SiteActivateNonLocalizedFocalPointsTargetSchema>(
473
+ body,
474
+ ),
475
+ );
476
+ }
477
+
478
+ /**
479
+ * Activate non-localized focal points
480
+ *
481
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/site/activate_non_localized_focal_points
482
+ *
483
+ * @throws {ApiError}
484
+ * @throws {TimeoutError}
485
+ *
486
+ * @deprecated This API call is to be considered private and might change without notice
487
+ */
488
+ rawActivateNonLocalizedFocalPoints(): Promise<RawApiTypes.SiteActivateNonLocalizedFocalPointsTargetSchema> {
489
+ return this.client.request<RawApiTypes.SiteActivateNonLocalizedFocalPointsTargetSchema>(
490
+ {
491
+ method: 'PUT',
492
+ url: '/site/activate-non-localized-focal-points',
493
+ },
494
+ );
495
+ }
496
+
460
497
  /**
461
498
  * Update CDN settings default assets
462
499
  *
@@ -18,7 +18,7 @@ export { default as BuildEvent } from './BuildEvent.js';
18
18
  export { default as SearchIndexEvent } from './SearchIndexEvent.js';
19
19
  export { default as Item } from './Item.js';
20
20
  export { default as ItemVersion } from './ItemVersion.js';
21
- export { default as Upload } from './Upload.js';
21
+ export { default as Upload } from '../../resources/Upload.js';
22
22
  export { default as UploadRequest } from './UploadRequest.js';
23
23
  export { default as UploadTrack } from './UploadTrack.js';
24
24
  export { default as ScheduledPublication } from './ScheduledPublication.js';
package/src/index.ts CHANGED
@@ -4,6 +4,10 @@ export * from './fieldTypes/index.js';
4
4
  export { Client } from './generated/Client.js';
5
5
  export type { ClientConfigOptions } from './generated/Client.js';
6
6
  export * as Resources from './generated/resources/index.js';
7
+ export type {
8
+ UploadLocaleKeyedDefaultFieldMetadata,
9
+ UploadLocaleKeyedDefaultFieldMetadataInRequest,
10
+ } from './resources/Upload.js';
7
11
  export * from './utilities/buildBlockRecord.js';
8
12
  export * from './utilities/duplicateBlockRecord.js';
9
13
  export * from './utilities/fieldsContainingReferences.js';