@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
@@ -90,7 +90,7 @@ class Client {
90
90
  return this.config.baseUrl || Client.defaultBaseUrl;
91
91
  }
92
92
  request(options) {
93
- return (0, rest_client_utils_1.request)(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.5.0-alpha.0', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: Object.assign(Object.assign(Object.assign({}, (this.config.extraHeaders || {})), (this.config.environment
93
+ return (0, rest_client_utils_1.request)(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.5.0-alpha.1', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: Object.assign(Object.assign(Object.assign({}, (this.config.extraHeaders || {})), (this.config.environment
94
94
  ? { 'X-Environment': this.config.environment }
95
95
  : {})), { 'X-API-Version': '3' }), fetchJobResult: (jobId) => {
96
96
  return this.jobResultsFetcher
@@ -63,6 +63,35 @@ class Session extends BaseResource_js_1.default {
63
63
  body,
64
64
  });
65
65
  }
66
+ /**
67
+ * Destroy the current session
68
+ *
69
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/session/destroy
70
+ *
71
+ * @throws {ApiError}
72
+ * @throws {TimeoutError}
73
+ *
74
+ * @deprecated This API call is to be considered private and might change without notice
75
+ */
76
+ destroy() {
77
+ return this.rawDestroy();
78
+ }
79
+ /**
80
+ * Destroy the current session
81
+ *
82
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/session/destroy
83
+ *
84
+ * @throws {ApiError}
85
+ * @throws {TimeoutError}
86
+ *
87
+ * @deprecated This API call is to be considered private and might change without notice
88
+ */
89
+ rawDestroy() {
90
+ return this.client.request({
91
+ method: 'DELETE',
92
+ url: '/session',
93
+ });
94
+ }
66
95
  }
67
96
  exports.default = Session;
68
97
  Session.TYPE = 'session';
@@ -1 +1 @@
1
- {"version":3,"file":"Session.js","sourceRoot":"","sources":["../../../../src/generated/resources/Session.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kEAAoD;AACpD,4EAAiD;AAIjD,MAAqB,OAAQ,SAAQ,yBAAY;IAG/C;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAkC;QACvC,OAAO,IAAI,CAAC,SAAS,CACnB,KAAK,CAAC,oBAAoB,CAAkC,IAAI,EAAE;YAChE,IAAI,EAAE,mBAAmB;YACzB,UAAU,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC;YAC7C,aAAa,EAAE,EAAE;SAClB,CAAC,CACH,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACd,KAAK,CAAC,uBAAuB,CAAqC,IAAI,CAAC,CACxE,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,SAAS,CACP,IAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAwC;YAChE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,WAAW;YAChB,IAAI;SACL,CAAC,CAAC;IACL,CAAC;;AA3CH,0BA4CC;AA3CiB,YAAI,GAAG,SAAkB,CAAC"}
1
+ {"version":3,"file":"Session.js","sourceRoot":"","sources":["../../../../src/generated/resources/Session.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kEAAoD;AACpD,4EAAiD;AAIjD,MAAqB,OAAQ,SAAQ,yBAAY;IAG/C;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAkC;QACvC,OAAO,IAAI,CAAC,SAAS,CACnB,KAAK,CAAC,oBAAoB,CAAkC,IAAI,EAAE;YAChE,IAAI,EAAE,mBAAmB;YACzB,UAAU,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC;YAC7C,aAAa,EAAE,EAAE;SAClB,CAAC,CACH,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACd,KAAK,CAAC,uBAAuB,CAAqC,IAAI,CAAC,CACxE,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,SAAS,CACP,IAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAwC;YAChE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,WAAW;YAChB,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC;IAC3B,CAAC;IAED;;;;;;;;;OASG;IACH,UAAU;QACR,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAO;YAC/B,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,UAAU;SAChB,CAAC,CAAC;IACL,CAAC;;AA1EH,0BA2EC;AA1EiB,YAAI,GAAG,SAAkB,CAAC"}
@@ -44,7 +44,7 @@ var Item_js_1 = require("./Item.js");
44
44
  Object.defineProperty(exports, "Item", { enumerable: true, get: function () { return __importDefault(Item_js_1).default; } });
45
45
  var ItemVersion_js_1 = require("./ItemVersion.js");
46
46
  Object.defineProperty(exports, "ItemVersion", { enumerable: true, get: function () { return __importDefault(ItemVersion_js_1).default; } });
47
- var Upload_js_1 = require("../../resources/Upload.js");
47
+ var Upload_js_1 = require("./Upload.js");
48
48
  Object.defineProperty(exports, "Upload", { enumerable: true, get: function () { return __importDefault(Upload_js_1).default; } });
49
49
  var UploadRequest_js_1 = require("./UploadRequest.js");
50
50
  Object.defineProperty(exports, "UploadRequest", { enumerable: true, get: function () { return __importDefault(UploadRequest_js_1).default; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generated/resources/index.ts"],"names":[],"mappings":";;;;;;AAAA,mDAA0D;AAAjD,gHAAA,OAAO,OAAQ;AACxB,qCAA4C;AAAnC,gHAAA,OAAO,OAAQ;AACxB,2CAAkD;AAAzC,sHAAA,OAAO,OAAW;AAC3B,uDAA8D;AAArD,kIAAA,OAAO,OAAiB;AAC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AsD;AAA7C,0HAAA,OAAO,OAAa;AAC7B,yDAAgE;AAAvD,oIAAA,OAAO,OAAkB;AAClC,qCAA4C;AAAnC,gHAAA,OAAO,OAAQ;AACxB,6CAAoD;AAA3C,wHAAA,OAAO,OAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAA8E;AAArE,6GAAA,QAAQ,OAAA;AAAE,6GAAA,QAAQ,OAAA;AAAE,iHAAA,YAAY,OAAA;AACzC,mDAAiC;AACjC,wDAAsC;AACtC,mDAA+C;AAAtC,mGAAA,MAAM,OAAA;AAEf,4EAA4D;AAK5D,kEAAgD;AAChD,sEAAoD;AACpD,4EAA0D;AAC1D,oDAAkC;AAClC,6DAA2C;AAC3C,+DAA6C;AAC7C,gEAA8C;AAC9C,uEAAqD;AACrD,iEAA+C;AAC/C,kEAAgD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAA8E;AAArE,6GAAA,QAAQ,OAAA;AAAE,6GAAA,QAAQ,OAAA;AAAE,iHAAA,YAAY,OAAA;AACzC,mDAAiC;AACjC,wDAAsC;AACtC,mDAA+C;AAAtC,mGAAA,MAAM,OAAA;AAEf,4EAA4D;AAC5D,kEAAgD;AAChD,sEAAoD;AACpD,4EAA0D;AAC1D,oDAAkC;AAClC,6DAA2C;AAC3C,+DAA6C;AAC7C,gEAA8C;AAC9C,uEAAqD;AACrD,iEAA+C;AAC/C,kEAAgD"}
@@ -7640,6 +7640,14 @@ export type ItemVersionMeta = {
7640
7640
  * Whether the record version is the published version or not
7641
7641
  */
7642
7642
  is_published: boolean;
7643
+ /**
7644
+ * 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.
7645
+ */
7646
+ published_from: string | null;
7647
+ /**
7648
+ * 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.
7649
+ */
7650
+ published_until: string | null;
7643
7651
  /**
7644
7652
  * Whether the record version is the most recent version or not
7645
7653
  */
@@ -7747,28 +7755,42 @@ export type Upload = {
7747
7755
  */
7748
7756
  mux_mp4_highest_res: null | 'high' | 'medium' | 'low';
7749
7757
  /**
7750
- * 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).
7751
- *
7752
- * > [!PROTIP] 📘 Requires the `non_localized_focal_points` environment opt-in
7753
- * > 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.
7758
+ * For each of the project's locales, the default metadata to apply if nothing is specified at record's level.
7754
7759
  */
7755
7760
  default_field_metadata: {
7756
- alt: LocalizedAlt;
7757
- title: LocalizedTitle;
7758
- custom_data: LocalizedCustomData;
7759
7761
  /**
7760
- * Focal point non-localized; a single value applies across every locale (only meaningful for image assets)
7762
+ * This interface was referenced by `undefined`'s JSON-Schema definition
7763
+ * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
7761
7764
  */
7762
- focal_point: {
7765
+ [k: string]: {
7763
7766
  /**
7764
- * Horizontal position expressed as float between 0 and 1
7767
+ * Alternate text for the asset
7765
7768
  */
7766
- x: number;
7769
+ alt: string | null;
7767
7770
  /**
7768
- * Vertical position expressed as float between 0 and 1
7771
+ * Title for the asset
7769
7772
  */
7770
- y: number;
7771
- } | null;
7773
+ title: string | null;
7774
+ /**
7775
+ * Object with arbitrary metadata
7776
+ */
7777
+ custom_data: {
7778
+ [k: string]: unknown;
7779
+ };
7780
+ /**
7781
+ * Focal point (only for image assets)
7782
+ */
7783
+ focal_point: {
7784
+ /**
7785
+ * Horizontal position expressed as float between 0 and 1
7786
+ */
7787
+ x: number;
7788
+ /**
7789
+ * Vertical position expressed as float between 0 and 1
7790
+ */
7791
+ y: number;
7792
+ } | null;
7793
+ };
7772
7794
  };
7773
7795
  /**
7774
7796
  * Is this upload an image?
@@ -7829,44 +7851,6 @@ export type UploadCreateJobSchema = Upload;
7829
7851
  export type UploadSelfTargetSchema = Upload;
7830
7852
  export type UploadDestroyTargetSchema = Upload;
7831
7853
  export type UploadUpdateJobSchema = Upload;
7832
- /**
7833
- * Alternate text per locale
7834
- */
7835
- export type LocalizedAlt = {
7836
- /**
7837
- * Alternate text for the asset in this locale
7838
- *
7839
- * This interface was referenced by `LocalizedAlt`'s JSON-Schema definition
7840
- * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
7841
- */
7842
- [k: string]: string | null;
7843
- };
7844
- /**
7845
- * Title per locale
7846
- */
7847
- export type LocalizedTitle = {
7848
- /**
7849
- * Title for the asset in this locale
7850
- *
7851
- * This interface was referenced by `LocalizedTitle`'s JSON-Schema definition
7852
- * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
7853
- */
7854
- [k: string]: string | null;
7855
- };
7856
- /**
7857
- * Object with arbitrary metadata, per locale
7858
- */
7859
- export type LocalizedCustomData = {
7860
- /**
7861
- * Arbitrary metadata for the asset in this locale
7862
- *
7863
- * This interface was referenced by `LocalizedCustomData`'s JSON-Schema definition
7864
- * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
7865
- */
7866
- [k: string]: {
7867
- [k: string]: unknown;
7868
- };
7869
- };
7870
7854
  /**
7871
7855
  * Meta attributes
7872
7856
  *
@@ -7982,28 +7966,42 @@ export type UploadAttributes = {
7982
7966
  */
7983
7967
  mux_mp4_highest_res: null | 'high' | 'medium' | 'low';
7984
7968
  /**
7985
- * 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).
7986
- *
7987
- * > [!PROTIP] 📘 Requires the `non_localized_focal_points` environment opt-in
7988
- * > 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.
7969
+ * For each of the project's locales, the default metadata to apply if nothing is specified at record's level.
7989
7970
  */
7990
7971
  default_field_metadata: {
7991
- alt: LocalizedAlt;
7992
- title: LocalizedTitle;
7993
- custom_data: LocalizedCustomData;
7994
7972
  /**
7995
- * Focal point non-localized; a single value applies across every locale (only meaningful for image assets)
7973
+ * This interface was referenced by `undefined`'s JSON-Schema definition
7974
+ * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
7996
7975
  */
7997
- focal_point: {
7976
+ [k: string]: {
7998
7977
  /**
7999
- * Horizontal position expressed as float between 0 and 1
7978
+ * Alternate text for the asset
8000
7979
  */
8001
- x: number;
7980
+ alt: string | null;
8002
7981
  /**
8003
- * Vertical position expressed as float between 0 and 1
7982
+ * Title for the asset
8004
7983
  */
8005
- y: number;
8006
- } | null;
7984
+ title: string | null;
7985
+ /**
7986
+ * Object with arbitrary metadata
7987
+ */
7988
+ custom_data: {
7989
+ [k: string]: unknown;
7990
+ };
7991
+ /**
7992
+ * Focal point (only for image assets)
7993
+ */
7994
+ focal_point: {
7995
+ /**
7996
+ * Horizontal position expressed as float between 0 and 1
7997
+ */
7998
+ x: number;
7999
+ /**
8000
+ * Vertical position expressed as float between 0 and 1
8001
+ */
8002
+ y: number;
8003
+ } | null;
8004
+ };
8007
8005
  };
8008
8006
  /**
8009
8007
  * Is this upload an image?
@@ -8091,25 +8089,42 @@ export type UploadCreateSchema = {
8091
8089
  */
8092
8090
  notes?: string | null;
8093
8091
  /**
8094
- * 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.
8092
+ * For each of the project's locales, the default metadata to apply if nothing is specified at record's level.
8095
8093
  */
8096
8094
  default_field_metadata?: {
8097
- alt?: LocalizedAlt;
8098
- title?: LocalizedTitle;
8099
- custom_data?: LocalizedCustomData;
8100
8095
  /**
8101
- * Focal point non-localized; a single value applies across every locale (only meaningful for image assets)
8096
+ * This interface was referenced by `undefined`'s JSON-Schema definition
8097
+ * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
8102
8098
  */
8103
- focal_point?: {
8099
+ [k: string]: {
8100
+ /**
8101
+ * Alternate text for the asset
8102
+ */
8103
+ alt?: string | null;
8104
8104
  /**
8105
- * Horizontal position expressed as float between 0 and 1
8105
+ * Title for the asset
8106
8106
  */
8107
- x: number;
8107
+ title?: string | null;
8108
8108
  /**
8109
- * Vertical position expressed as float between 0 and 1
8109
+ * Object with arbitrary metadata
8110
8110
  */
8111
- y: number;
8112
- } | null;
8111
+ custom_data?: {
8112
+ [k: string]: unknown;
8113
+ };
8114
+ /**
8115
+ * Focal point (only for image assets)
8116
+ */
8117
+ focal_point?: {
8118
+ /**
8119
+ * Horizontal position expressed as float between 0 and 1
8120
+ */
8121
+ x: number;
8122
+ /**
8123
+ * Vertical position expressed as float between 0 and 1
8124
+ */
8125
+ y: number;
8126
+ } | null;
8127
+ };
8113
8128
  };
8114
8129
  /**
8115
8130
  * Tags
@@ -8149,25 +8164,42 @@ export type UploadUpdateSchema = {
8149
8164
  */
8150
8165
  tags?: string[];
8151
8166
  /**
8152
- * 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.
8167
+ * For each of the project's locales, the default metadata to apply if nothing is specified at record's level.
8153
8168
  */
8154
8169
  default_field_metadata?: {
8155
- alt?: LocalizedAlt;
8156
- title?: LocalizedTitle;
8157
- custom_data?: LocalizedCustomData;
8158
8170
  /**
8159
- * Focal point non-localized; a single value applies across every locale (only meaningful for image assets)
8171
+ * This interface was referenced by `undefined`'s JSON-Schema definition
8172
+ * via the `patternProperty` "^(?<languagecode>[a-z]{0,3}(-[A-Za-z]+)?(-[A-Z]{0,3})?)$".
8160
8173
  */
8161
- focal_point?: {
8174
+ [k: string]: {
8175
+ /**
8176
+ * Alternate text for the asset
8177
+ */
8178
+ alt?: string | null;
8162
8179
  /**
8163
- * Horizontal position expressed as float between 0 and 1
8180
+ * Title for the asset
8164
8181
  */
8165
- x: number;
8182
+ title?: string | null;
8183
+ /**
8184
+ * Object with arbitrary metadata
8185
+ */
8186
+ custom_data?: {
8187
+ [k: string]: unknown;
8188
+ };
8166
8189
  /**
8167
- * Vertical position expressed as float between 0 and 1
8190
+ * Focal point (only for image assets)
8168
8191
  */
8169
- y: number;
8170
- } | null;
8192
+ focal_point?: {
8193
+ /**
8194
+ * Horizontal position expressed as float between 0 and 1
8195
+ */
8196
+ x: number;
8197
+ /**
8198
+ * Vertical position expressed as float between 0 and 1
8199
+ */
8200
+ y: number;
8201
+ } | null;
8202
+ };
8171
8203
  };
8172
8204
  creator?: AccountData | AccessTokenData | UserData | SsoUserData | OrganizationData;
8173
8205
  upload_collection?: UploadCollectionData | null;
@@ -10913,10 +10945,6 @@ export type SiteMeta = {
10913
10945
  * Whether the [Milliseconds in datetime](https://www.datocms.com/product-updates/milliseconds-in-datetime) opt-in product update is active or not
10914
10946
  */
10915
10947
  milliseconds_in_datetime: boolean;
10916
- /**
10917
- * 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.
10918
- */
10919
- non_localized_focal_points: boolean;
10920
10948
  };
10921
10949
  /**
10922
10950
  * JSON API data
@@ -11278,10 +11306,6 @@ export type SiteUpdateSchema = {
11278
11306
  * Whether the [Milliseconds in datetime](https://www.datocms.com/product-updates/milliseconds-in-datetime) opt-in product update is active or not
11279
11307
  */
11280
11308
  milliseconds_in_datetime?: boolean;
11281
- /**
11282
- * 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.
11283
- */
11284
- non_localized_focal_points?: boolean;
11285
11309
  };
11286
11310
  };
11287
11311
  /**
@@ -64,7 +64,7 @@ export class Client {
64
64
  return this.config.baseUrl || Client.defaultBaseUrl;
65
65
  }
66
66
  request(options) {
67
- return request(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.5.0-alpha.0', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: Object.assign(Object.assign(Object.assign({}, (this.config.extraHeaders || {})), (this.config.environment
67
+ return request(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.5.0-alpha.1', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: Object.assign(Object.assign(Object.assign({}, (this.config.extraHeaders || {})), (this.config.environment
68
68
  ? { 'X-Environment': this.config.environment }
69
69
  : {})), { 'X-API-Version': '3' }), fetchJobResult: (jobId) => {
70
70
  return this.jobResultsFetcher
@@ -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?: {