@datocms/cma-client 5.5.0-alpha.0 → 5.5.0-alpha.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.
Files changed (37) hide show
  1. package/dist/cjs/generated/Client.js +1 -1
  2. package/dist/cjs/generated/resources/Session.js +29 -0
  3. package/dist/cjs/generated/resources/Session.js.map +1 -1
  4. package/dist/cjs/generated/resources/index.js +1 -1
  5. package/dist/cjs/generated/resources/index.js.map +1 -1
  6. package/dist/cjs/index.js.map +1 -1
  7. package/dist/esm/generated/ApiTypes.d.ts +120 -96
  8. package/dist/esm/generated/Client.js +1 -1
  9. package/dist/esm/generated/RawApiTypes.d.ts +92 -82
  10. package/dist/esm/generated/resources/Session.d.ts +22 -0
  11. package/dist/esm/generated/resources/Session.js +29 -0
  12. package/dist/esm/generated/resources/Session.js.map +1 -1
  13. package/dist/esm/generated/resources/index.d.ts +1 -1
  14. package/dist/esm/generated/resources/index.js +1 -1
  15. package/dist/esm/generated/resources/index.js.map +1 -1
  16. package/dist/esm/index.d.ts +0 -1
  17. package/dist/esm/index.js.map +1 -1
  18. package/dist/types/generated/ApiTypes.d.ts +120 -96
  19. package/dist/types/generated/RawApiTypes.d.ts +92 -82
  20. package/dist/types/generated/resources/Session.d.ts +22 -0
  21. package/dist/types/generated/resources/index.d.ts +1 -1
  22. package/dist/types/index.d.ts +0 -1
  23. package/package.json +3 -3
  24. package/resources.json +16 -0
  25. package/src/generated/ApiTypes.ts +120 -96
  26. package/src/generated/Client.ts +1 -1
  27. package/src/generated/RawApiTypes.ts +92 -82
  28. package/src/generated/resources/Session.ts +31 -0
  29. package/src/generated/resources/index.ts +1 -1
  30. package/src/index.ts +0 -4
  31. package/dist/cjs/resources/Upload.js +0 -10
  32. package/dist/cjs/resources/Upload.js.map +0 -1
  33. package/dist/esm/resources/Upload.d.ts +0 -44
  34. package/dist/esm/resources/Upload.js +0 -4
  35. package/dist/esm/resources/Upload.js.map +0 -1
  36. package/dist/types/resources/Upload.d.ts +0 -44
  37. package/src/resources/Upload.ts +0 -36
@@ -7815,6 +7815,14 @@ export type ItemVersionMeta = {
7815
7815
  * Whether the record version is the published version or not
7816
7816
  */
7817
7817
  is_published: boolean;
7818
+ /**
7819
+ * 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.
7820
+ */
7821
+ published_from: string | null;
7822
+ /**
7823
+ * 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.
7824
+ */
7825
+ published_until: string | null;
7818
7826
  /**
7819
7827
  * Whether the record version is the most recent version or not
7820
7828
  */
@@ -8134,28 +8142,42 @@ export type UploadAttributes = {
8134
8142
  */
8135
8143
  mux_mp4_highest_res: null | 'high' | 'medium' | 'low';
8136
8144
  /**
8137
- * 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 non-localized a single value per asset, applied across every locale (only meaningful for image assets).
8138
- *
8139
- * > [!PROTIP] 📘 Requires the `non_localized_focal_points` environment opt-in
8140
- * > This shape is returned and accepted in environments where the opt-in is active. The opt-in is the path forward and will become the default for all projects. Environments where it is still inactive use a legacy locale-keyed shape under the hood (kept working for compatibility) — opt in to align with this documentation.
8145
+ * For each of the project's locales, the default metadata to apply if nothing is specified at record's level.
8141
8146
  */
8142
8147
  default_field_metadata: {
8143
- alt: LocalizedAlt;
8144
- title: LocalizedTitle;
8145
- custom_data: LocalizedCustomData;
8146
8148
  /**
8147
- * Focal point non-localized; a single value applies across every locale (only meaningful for image assets)
8149
+ * This interface was referenced by `undefined`'s JSON-Schema definition
8150
+ * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
8148
8151
  */
8149
- focal_point: {
8152
+ [k: string]: {
8153
+ /**
8154
+ * Alternate text for the asset
8155
+ */
8156
+ alt: string | null;
8150
8157
  /**
8151
- * Horizontal position expressed as float between 0 and 1
8158
+ * Title for the asset
8152
8159
  */
8153
- x: number;
8160
+ title: string | null;
8154
8161
  /**
8155
- * Vertical position expressed as float between 0 and 1
8162
+ * Object with arbitrary metadata
8156
8163
  */
8157
- y: number;
8158
- } | null;
8164
+ custom_data: {
8165
+ [k: string]: unknown;
8166
+ };
8167
+ /**
8168
+ * Focal point (only for image assets)
8169
+ */
8170
+ focal_point: {
8171
+ /**
8172
+ * Horizontal position expressed as float between 0 and 1
8173
+ */
8174
+ x: number;
8175
+ /**
8176
+ * Vertical position expressed as float between 0 and 1
8177
+ */
8178
+ y: number;
8179
+ } | null;
8180
+ };
8159
8181
  };
8160
8182
  /**
8161
8183
  * Is this upload an image?
@@ -8209,44 +8231,6 @@ export type UploadAttributes = {
8209
8231
  alpha: number;
8210
8232
  }[];
8211
8233
  };
8212
- /**
8213
- * Alternate text per locale
8214
- */
8215
- export type LocalizedAlt = {
8216
- /**
8217
- * Alternate text for the asset in this locale
8218
- *
8219
- * This interface was referenced by `LocalizedAlt`'s JSON-Schema definition
8220
- * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
8221
- */
8222
- [k: string]: string | null;
8223
- };
8224
- /**
8225
- * Title per locale
8226
- */
8227
- export type LocalizedTitle = {
8228
- /**
8229
- * Title for the asset in this locale
8230
- *
8231
- * This interface was referenced by `LocalizedTitle`'s JSON-Schema definition
8232
- * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
8233
- */
8234
- [k: string]: string | null;
8235
- };
8236
- /**
8237
- * Object with arbitrary metadata, per locale
8238
- */
8239
- export type LocalizedCustomData = {
8240
- /**
8241
- * Arbitrary metadata for the asset in this locale
8242
- *
8243
- * This interface was referenced by `LocalizedCustomData`'s JSON-Schema definition
8244
- * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
8245
- */
8246
- [k: string]: {
8247
- [k: string]: unknown;
8248
- };
8249
- };
8250
8234
  /**
8251
8235
  * JSON API links
8252
8236
  *
@@ -8328,25 +8312,42 @@ export type UploadCreateSchema = {
8328
8312
  */
8329
8313
  notes?: string | null;
8330
8314
  /**
8331
- * 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.
8315
+ * For each of the project's locales, the default metadata to apply if nothing is specified at record's level.
8332
8316
  */
8333
8317
  default_field_metadata?: {
8334
- alt?: LocalizedAlt;
8335
- title?: LocalizedTitle;
8336
- custom_data?: LocalizedCustomData;
8337
8318
  /**
8338
- * Focal point non-localized; a single value applies across every locale (only meaningful for image assets)
8319
+ * This interface was referenced by `undefined`'s JSON-Schema definition
8320
+ * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
8339
8321
  */
8340
- focal_point?: {
8322
+ [k: string]: {
8323
+ /**
8324
+ * Alternate text for the asset
8325
+ */
8326
+ alt?: string | null;
8341
8327
  /**
8342
- * Horizontal position expressed as float between 0 and 1
8328
+ * Title for the asset
8343
8329
  */
8344
- x: number;
8330
+ title?: string | null;
8345
8331
  /**
8346
- * Vertical position expressed as float between 0 and 1
8332
+ * Object with arbitrary metadata
8347
8333
  */
8348
- y: number;
8349
- } | null;
8334
+ custom_data?: {
8335
+ [k: string]: unknown;
8336
+ };
8337
+ /**
8338
+ * Focal point (only for image assets)
8339
+ */
8340
+ focal_point?: {
8341
+ /**
8342
+ * Horizontal position expressed as float between 0 and 1
8343
+ */
8344
+ x: number;
8345
+ /**
8346
+ * Vertical position expressed as float between 0 and 1
8347
+ */
8348
+ y: number;
8349
+ } | null;
8350
+ };
8350
8351
  };
8351
8352
  /**
8352
8353
  * Tags
@@ -8436,25 +8437,42 @@ export type UploadUpdateSchema = {
8436
8437
  */
8437
8438
  tags?: string[];
8438
8439
  /**
8439
- * 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.
8440
+ * For each of the project's locales, the default metadata to apply if nothing is specified at record's level.
8440
8441
  */
8441
8442
  default_field_metadata?: {
8442
- alt?: LocalizedAlt;
8443
- title?: LocalizedTitle;
8444
- custom_data?: LocalizedCustomData;
8445
8443
  /**
8446
- * Focal point non-localized; a single value applies across every locale (only meaningful for image assets)
8444
+ * This interface was referenced by `undefined`'s JSON-Schema definition
8445
+ * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
8447
8446
  */
8448
- focal_point?: {
8447
+ [k: string]: {
8448
+ /**
8449
+ * Alternate text for the asset
8450
+ */
8451
+ alt?: string | null;
8449
8452
  /**
8450
- * Horizontal position expressed as float between 0 and 1
8453
+ * Title for the asset
8451
8454
  */
8452
- x: number;
8455
+ title?: string | null;
8453
8456
  /**
8454
- * Vertical position expressed as float between 0 and 1
8457
+ * Object with arbitrary metadata
8455
8458
  */
8456
- y: number;
8457
- } | null;
8459
+ custom_data?: {
8460
+ [k: string]: unknown;
8461
+ };
8462
+ /**
8463
+ * Focal point (only for image assets)
8464
+ */
8465
+ focal_point?: {
8466
+ /**
8467
+ * Horizontal position expressed as float between 0 and 1
8468
+ */
8469
+ x: number;
8470
+ /**
8471
+ * Vertical position expressed as float between 0 and 1
8472
+ */
8473
+ y: number;
8474
+ } | null;
8475
+ };
8458
8476
  };
8459
8477
  [k: string]: unknown;
8460
8478
  };
@@ -11476,10 +11494,6 @@ export type SiteMeta = {
11476
11494
  * Whether the [Milliseconds in datetime](https://www.datocms.com/product-updates/milliseconds-in-datetime) opt-in product update is active or not
11477
11495
  */
11478
11496
  milliseconds_in_datetime: boolean;
11479
- /**
11480
- * Whether the non-localized focal points opt-in is active for the environment. When active, an upload's `focal_point` is stored once per asset rather than once per locale, and the CMA `default_field_metadata` attribute is exposed in its field-keyed shape (with `alt`/`title`/`custom_data` keyed by locale and a single top-level `focal_point`). When inactive, the CMA continues to accept and return the legacy locale-keyed shape — the single stored focal_point is replicated into every locale entry on read. The CDA's behavior is unaffected: it already returns a single `focalPoint` value.
11481
- */
11482
- non_localized_focal_points: boolean;
11483
11497
  };
11484
11498
  /**
11485
11499
  * JSON API data
@@ -11670,10 +11684,6 @@ export type SiteUpdateSchema = {
11670
11684
  * Whether the [Milliseconds in datetime](https://www.datocms.com/product-updates/milliseconds-in-datetime) opt-in product update is active or not
11671
11685
  */
11672
11686
  milliseconds_in_datetime?: boolean;
11673
- /**
11674
- * Whether the non-localized focal points opt-in is active for the environment. When active, an upload's `focal_point` is stored once per asset rather than once per locale, and the CMA `default_field_metadata` attribute is exposed in its field-keyed shape (with `alt`/`title`/`custom_data` keyed by locale and a single top-level `focal_point`). When inactive, the CMA continues to accept and return the legacy locale-keyed shape — the single stored focal_point is replicated into every locale entry on read. The CDA's behavior is unaffected: it already returns a single `focalPoint` value.
11675
- */
11676
- non_localized_focal_points?: boolean;
11677
11687
  };
11678
11688
  relationships?: {
11679
11689
  sso_default_role?: {
@@ -25,4 +25,26 @@ export default class Session extends BaseResource {
25
25
  * @deprecated This API call is to be considered private and might change without notice
26
26
  */
27
27
  rawCreate(body: RawApiTypes.SessionCreateSchema): Promise<RawApiTypes.SessionCreateTargetSchema>;
28
+ /**
29
+ * Destroy the current session
30
+ *
31
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/session/destroy
32
+ *
33
+ * @throws {ApiError}
34
+ * @throws {TimeoutError}
35
+ *
36
+ * @deprecated This API call is to be considered private and might change without notice
37
+ */
38
+ destroy(): Promise<void>;
39
+ /**
40
+ * Destroy the current session
41
+ *
42
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/session/destroy
43
+ *
44
+ * @throws {ApiError}
45
+ * @throws {TimeoutError}
46
+ *
47
+ * @deprecated This API call is to be considered private and might change without notice
48
+ */
49
+ rawDestroy(): Promise<void>;
28
50
  }
@@ -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 '../../resources/Upload.js';
21
+ export { default as Upload } from './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';
@@ -4,7 +4,6 @@ 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 { UploadLocaleKeyedDefaultFieldMetadata, UploadLocaleKeyedDefaultFieldMetadataInRequest, } from './resources/Upload.js';
8
7
  export * from './utilities/buildBlockRecord.js';
9
8
  export * from './utilities/duplicateBlockRecord.js';
10
9
  export * from './utilities/fieldsContainingReferences.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datocms/cma-client",
3
- "version": "5.5.0-alpha.0",
3
+ "version": "5.5.0-alpha.1",
4
4
  "description": "JS client for DatoCMS REST Content Management API",
5
5
  "keywords": [
6
6
  "datocms",
@@ -42,8 +42,8 @@
42
42
  "uuid": "^9.0.1"
43
43
  },
44
44
  "devDependencies": {
45
- "@datocms/dashboard-client": "^5.4.9",
45
+ "@datocms/dashboard-client": "^5.4.21",
46
46
  "@types/uuid": "^9.0.7"
47
47
  },
48
- "gitHead": "9871ebb724c5acdf1c84a407938e78b77d3c99e2"
48
+ "gitHead": "81769801eaa6e65ec1d75a1c78d60f27ad0b63e0"
49
49
  }
package/resources.json CHANGED
@@ -1649,6 +1649,22 @@
1649
1649
  "deprecated": "This API call is to be considered private and might change without notice",
1650
1650
  "name": "create",
1651
1651
  "rawName": "rawCreate"
1652
+ },
1653
+ {
1654
+ "returnsItem": false,
1655
+ "requestBodyRequiresItem": false,
1656
+ "offersNestedItemsOptionInQueryParams": false,
1657
+ "docUrl": "https://www.datocms.com/docs/content-management-api/resources/session/destroy",
1658
+ "rel": "destroy",
1659
+ "urlTemplate": "/session",
1660
+ "method": "DELETE",
1661
+ "comment": "Destroy the current session",
1662
+ "urlPlaceholders": [],
1663
+ "optionalRequestBody": false,
1664
+ "queryParamsRequired": false,
1665
+ "deprecated": "This API call is to be considered private and might change without notice",
1666
+ "name": "destroy",
1667
+ "rawName": "rawDestroy"
1652
1668
  }
1653
1669
  ],
1654
1670
  "namespace": "session",
@@ -8229,6 +8229,14 @@ export type ItemVersionMeta = {
8229
8229
  * Whether the record version is the published version or not
8230
8230
  */
8231
8231
  is_published: boolean;
8232
+ /**
8233
+ * 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.
8234
+ */
8235
+ published_from: string | null;
8236
+ /**
8237
+ * 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.
8238
+ */
8239
+ published_until: string | null;
8232
8240
  /**
8233
8241
  * Whether the record version is the most recent version or not
8234
8242
  */
@@ -8341,28 +8349,42 @@ export type Upload = {
8341
8349
  */
8342
8350
  mux_mp4_highest_res: null | 'high' | 'medium' | 'low';
8343
8351
  /**
8344
- * 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 non-localized a single value per asset, applied across every locale (only meaningful for image assets).
8345
- *
8346
- * > [!PROTIP] 📘 Requires the `non_localized_focal_points` environment opt-in
8347
- * > This shape is returned and accepted in environments where the opt-in is active. The opt-in is the path forward and will become the default for all projects. Environments where it is still inactive use a legacy locale-keyed shape under the hood (kept working for compatibility) — opt in to align with this documentation.
8352
+ * For each of the project's locales, the default metadata to apply if nothing is specified at record's level.
8348
8353
  */
8349
8354
  default_field_metadata: {
8350
- alt: LocalizedAlt;
8351
- title: LocalizedTitle;
8352
- custom_data: LocalizedCustomData;
8353
8355
  /**
8354
- * Focal point non-localized; a single value applies across every locale (only meaningful for image assets)
8356
+ * This interface was referenced by `undefined`'s JSON-Schema definition
8357
+ * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
8355
8358
  */
8356
- focal_point: {
8359
+ [k: string]: {
8357
8360
  /**
8358
- * Horizontal position expressed as float between 0 and 1
8361
+ * Alternate text for the asset
8359
8362
  */
8360
- x: number;
8363
+ alt: string | null;
8361
8364
  /**
8362
- * Vertical position expressed as float between 0 and 1
8365
+ * Title for the asset
8363
8366
  */
8364
- y: number;
8365
- } | null;
8367
+ title: string | null;
8368
+ /**
8369
+ * Object with arbitrary metadata
8370
+ */
8371
+ custom_data: {
8372
+ [k: string]: unknown;
8373
+ };
8374
+ /**
8375
+ * Focal point (only for image assets)
8376
+ */
8377
+ focal_point: {
8378
+ /**
8379
+ * Horizontal position expressed as float between 0 and 1
8380
+ */
8381
+ x: number;
8382
+ /**
8383
+ * Vertical position expressed as float between 0 and 1
8384
+ */
8385
+ y: number;
8386
+ } | null;
8387
+ };
8366
8388
  };
8367
8389
  /**
8368
8390
  * Is this upload an image?
@@ -8428,44 +8450,6 @@ export type UploadCreateJobSchema = Upload;
8428
8450
  export type UploadSelfTargetSchema = Upload;
8429
8451
  export type UploadDestroyTargetSchema = Upload;
8430
8452
  export type UploadUpdateJobSchema = Upload;
8431
- /**
8432
- * Alternate text per locale
8433
- */
8434
- export type LocalizedAlt = {
8435
- /**
8436
- * Alternate text for the asset in this locale
8437
- *
8438
- * This interface was referenced by `LocalizedAlt`'s JSON-Schema definition
8439
- * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
8440
- */
8441
- [k: string]: string | null;
8442
- };
8443
- /**
8444
- * Title per locale
8445
- */
8446
- export type LocalizedTitle = {
8447
- /**
8448
- * Title for the asset in this locale
8449
- *
8450
- * This interface was referenced by `LocalizedTitle`'s JSON-Schema definition
8451
- * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
8452
- */
8453
- [k: string]: string | null;
8454
- };
8455
- /**
8456
- * Object with arbitrary metadata, per locale
8457
- */
8458
- export type LocalizedCustomData = {
8459
- /**
8460
- * Arbitrary metadata for the asset in this locale
8461
- *
8462
- * This interface was referenced by `LocalizedCustomData`'s JSON-Schema definition
8463
- * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
8464
- */
8465
- [k: string]: {
8466
- [k: string]: unknown;
8467
- };
8468
- };
8469
8453
  /**
8470
8454
  * Meta attributes
8471
8455
  *
@@ -8581,28 +8565,42 @@ export type UploadAttributes = {
8581
8565
  */
8582
8566
  mux_mp4_highest_res: null | 'high' | 'medium' | 'low';
8583
8567
  /**
8584
- * 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 non-localized a single value per asset, applied across every locale (only meaningful for image assets).
8585
- *
8586
- * > [!PROTIP] 📘 Requires the `non_localized_focal_points` environment opt-in
8587
- * > This shape is returned and accepted in environments where the opt-in is active. The opt-in is the path forward and will become the default for all projects. Environments where it is still inactive use a legacy locale-keyed shape under the hood (kept working for compatibility) — opt in to align with this documentation.
8568
+ * For each of the project's locales, the default metadata to apply if nothing is specified at record's level.
8588
8569
  */
8589
8570
  default_field_metadata: {
8590
- alt: LocalizedAlt;
8591
- title: LocalizedTitle;
8592
- custom_data: LocalizedCustomData;
8593
8571
  /**
8594
- * Focal point non-localized; a single value applies across every locale (only meaningful for image assets)
8572
+ * This interface was referenced by `undefined`'s JSON-Schema definition
8573
+ * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
8595
8574
  */
8596
- focal_point: {
8575
+ [k: string]: {
8597
8576
  /**
8598
- * Horizontal position expressed as float between 0 and 1
8577
+ * Alternate text for the asset
8599
8578
  */
8600
- x: number;
8579
+ alt: string | null;
8601
8580
  /**
8602
- * Vertical position expressed as float between 0 and 1
8581
+ * Title for the asset
8603
8582
  */
8604
- y: number;
8605
- } | null;
8583
+ title: string | null;
8584
+ /**
8585
+ * Object with arbitrary metadata
8586
+ */
8587
+ custom_data: {
8588
+ [k: string]: unknown;
8589
+ };
8590
+ /**
8591
+ * Focal point (only for image assets)
8592
+ */
8593
+ focal_point: {
8594
+ /**
8595
+ * Horizontal position expressed as float between 0 and 1
8596
+ */
8597
+ x: number;
8598
+ /**
8599
+ * Vertical position expressed as float between 0 and 1
8600
+ */
8601
+ y: number;
8602
+ } | null;
8603
+ };
8606
8604
  };
8607
8605
  /**
8608
8606
  * Is this upload an image?
@@ -8695,25 +8693,42 @@ export type UploadCreateSchema = {
8695
8693
  */
8696
8694
  notes?: string | null;
8697
8695
  /**
8698
- * 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.
8696
+ * For each of the project's locales, the default metadata to apply if nothing is specified at record's level.
8699
8697
  */
8700
8698
  default_field_metadata?: {
8701
- alt?: LocalizedAlt;
8702
- title?: LocalizedTitle;
8703
- custom_data?: LocalizedCustomData;
8704
8699
  /**
8705
- * Focal point non-localized; a single value applies across every locale (only meaningful for image assets)
8700
+ * This interface was referenced by `undefined`'s JSON-Schema definition
8701
+ * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
8706
8702
  */
8707
- focal_point?: {
8703
+ [k: string]: {
8704
+ /**
8705
+ * Alternate text for the asset
8706
+ */
8707
+ alt?: string | null;
8708
8708
  /**
8709
- * Horizontal position expressed as float between 0 and 1
8709
+ * Title for the asset
8710
8710
  */
8711
- x: number;
8711
+ title?: string | null;
8712
8712
  /**
8713
- * Vertical position expressed as float between 0 and 1
8713
+ * Object with arbitrary metadata
8714
8714
  */
8715
- y: number;
8716
- } | null;
8715
+ custom_data?: {
8716
+ [k: string]: unknown;
8717
+ };
8718
+ /**
8719
+ * Focal point (only for image assets)
8720
+ */
8721
+ focal_point?: {
8722
+ /**
8723
+ * Horizontal position expressed as float between 0 and 1
8724
+ */
8725
+ x: number;
8726
+ /**
8727
+ * Vertical position expressed as float between 0 and 1
8728
+ */
8729
+ y: number;
8730
+ } | null;
8731
+ };
8717
8732
  };
8718
8733
  /**
8719
8734
  * Tags
@@ -8753,25 +8768,42 @@ export type UploadUpdateSchema = {
8753
8768
  */
8754
8769
  tags?: string[];
8755
8770
  /**
8756
- * 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.
8771
+ * For each of the project's locales, the default metadata to apply if nothing is specified at record's level.
8757
8772
  */
8758
8773
  default_field_metadata?: {
8759
- alt?: LocalizedAlt;
8760
- title?: LocalizedTitle;
8761
- custom_data?: LocalizedCustomData;
8762
8774
  /**
8763
- * Focal point non-localized; a single value applies across every locale (only meaningful for image assets)
8775
+ * This interface was referenced by `undefined`'s JSON-Schema definition
8776
+ * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
8764
8777
  */
8765
- focal_point?: {
8778
+ [k: string]: {
8779
+ /**
8780
+ * Alternate text for the asset
8781
+ */
8782
+ alt?: string | null;
8766
8783
  /**
8767
- * Horizontal position expressed as float between 0 and 1
8784
+ * Title for the asset
8768
8785
  */
8769
- x: number;
8786
+ title?: string | null;
8787
+ /**
8788
+ * Object with arbitrary metadata
8789
+ */
8790
+ custom_data?: {
8791
+ [k: string]: unknown;
8792
+ };
8770
8793
  /**
8771
- * Vertical position expressed as float between 0 and 1
8794
+ * Focal point (only for image assets)
8772
8795
  */
8773
- y: number;
8774
- } | null;
8796
+ focal_point?: {
8797
+ /**
8798
+ * Horizontal position expressed as float between 0 and 1
8799
+ */
8800
+ x: number;
8801
+ /**
8802
+ * Vertical position expressed as float between 0 and 1
8803
+ */
8804
+ y: number;
8805
+ } | null;
8806
+ };
8775
8807
  };
8776
8808
  creator?:
8777
8809
  | AccountData
@@ -11686,10 +11718,6 @@ export type SiteMeta = {
11686
11718
  * Whether the [Milliseconds in datetime](https://www.datocms.com/product-updates/milliseconds-in-datetime) opt-in product update is active or not
11687
11719
  */
11688
11720
  milliseconds_in_datetime: boolean;
11689
- /**
11690
- * Whether the non-localized focal points opt-in is active for the environment. When active, an upload's `focal_point` is stored once per asset rather than once per locale, and the CMA `default_field_metadata` attribute is exposed in its field-keyed shape (with `alt`/`title`/`custom_data` keyed by locale and a single top-level `focal_point`). When inactive, the CMA continues to accept and return the legacy locale-keyed shape — the single stored focal_point is replicated into every locale entry on read. The CDA's behavior is unaffected: it already returns a single `focalPoint` value.
11691
- */
11692
- non_localized_focal_points: boolean;
11693
11721
  };
11694
11722
  /**
11695
11723
  * JSON API data
@@ -12053,10 +12081,6 @@ export type SiteUpdateSchema = {
12053
12081
  * Whether the [Milliseconds in datetime](https://www.datocms.com/product-updates/milliseconds-in-datetime) opt-in product update is active or not
12054
12082
  */
12055
12083
  milliseconds_in_datetime?: boolean;
12056
- /**
12057
- * Whether the non-localized focal points opt-in is active for the environment. When active, an upload's `focal_point` is stored once per asset rather than once per locale, and the CMA `default_field_metadata` attribute is exposed in its field-keyed shape (with `alt`/`title`/`custom_data` keyed by locale and a single top-level `focal_point`). When inactive, the CMA continues to accept and return the legacy locale-keyed shape — the single stored focal_point is replicated into every locale entry on read. The CDA's behavior is unaffected: it already returns a single `focalPoint` value.
12058
- */
12059
- non_localized_focal_points?: boolean;
12060
12084
  };
12061
12085
  };
12062
12086
  /**
@@ -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.0',
154
+ userAgent: '@datocms/cma-client v5.5.0-alpha.1',
155
155
  baseUrl: this.baseUrl,
156
156
  preCallStack: new Error().stack,
157
157
  extraHeaders: {