@datocms/cma-client 3.3.3 → 3.3.5

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.
@@ -130,7 +130,7 @@ var Client = /** @class */ (function () {
130
130
  });
131
131
  Client.prototype.request = function (options) {
132
132
  var _this = this;
133
- return (0, rest_client_utils_1.request)(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v3.3.3', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: __assign(__assign(__assign({}, (this.config.extraHeaders || {})), (this.config.environment
133
+ return (0, rest_client_utils_1.request)(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v3.3.5', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: __assign(__assign(__assign({}, (this.config.extraHeaders || {})), (this.config.environment
134
134
  ? { 'X-Environment': this.config.environment }
135
135
  : {})), { 'X-API-Version': '3' }), fetchJobResult: function (jobId) {
136
136
  return _this.jobResultsFetcher
@@ -28,6 +28,12 @@ function fromUrlSafeBase64toUint8Array(urlSafeBase64) {
28
28
  : new Uint8Array(Buffer.from(base64, 'base64'));
29
29
  }
30
30
  function isValidId(id) {
31
+ // For backward compatibility, first check to see if this is an older-style integer ID formerly used by Dato
32
+ if (/^\d+$/.test(id)) {
33
+ var intId = BigInt(id);
34
+ var maxDatoIntegerId = 281474976710655; // Max 6-byte/48-bit unsigned int
35
+ return intId <= maxDatoIntegerId;
36
+ }
31
37
  var bytes = fromUrlSafeBase64toUint8Array(id);
32
38
  // UUIDs are 16 bytes
33
39
  if (bytes.length !== 16) {
@@ -1 +1 @@
1
- {"version":3,"file":"idUtils.js","sourceRoot":"","sources":["../../src/idUtils.ts"],"names":[],"mappings":";;;AAAA,6BAA0B;AAE1B,IAAM,OAAO,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;AAExC,SAAS,6BAA6B,CAAC,KAAiB;IACtD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IAE/C,IAAM,OAAO,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC,CAAE,IAAI,CAAC,CAAC;IAElC,gDAAgD;IAChD,IAAI,OAAO,KAAK,GAAG,EAAE;QACnB,OAAO,KAAK,CAAC;KACd;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AApCD,8BAoCC;AAED,SAAgB,UAAU;IACxB,IAAM,KAAK,GAAG,IAAA,SAAE,EAAC,IAAI,EAAE,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;IAE3C,oEAAoE;IACpE,EAAE;IACF,iEAAiE;IACjE,mEAAmE;IACnE,mCAAmC;IAEnC,6DAA6D;IAE7D,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAE,GAAG,IAAI,CAAC;IAE5B,IAAM,MAAM,GAAG,6BAA6B,CAAC,KAAK,CAAC,CAAC;IAEpD,OAAO,MAAM,CAAC;AAChB,CAAC;AAhBD,gCAgBC"}
@@ -104,7 +104,7 @@ var Client = /** @class */ (function () {
104
104
  });
105
105
  Client.prototype.request = function (options) {
106
106
  var _this = this;
107
- return request(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v3.3.3', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: __assign(__assign(__assign({}, (this.config.extraHeaders || {})), (this.config.environment
107
+ return request(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v3.3.5', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: __assign(__assign(__assign({}, (this.config.extraHeaders || {})), (this.config.environment
108
108
  ? { 'X-Environment': this.config.environment }
109
109
  : {})), { 'X-API-Version': '3' }), fetchJobResult: function (jobId) {
110
110
  return _this.jobResultsFetcher
@@ -4161,7 +4161,7 @@ export type ItemTypeDestroyJobSchema = {
4161
4161
  * // single_line is a DatoCMS built-in editor that you can use with single-line string fields
4162
4162
  * "editor": "single_line",
4163
4163
  * // each built-in editor has specific settings
4164
- * "parameters": { "heading": true },
4164
+ * "parameters": { "heading": true, "placeholder": "My blog post title" },
4165
4165
  * "addons": []
4166
4166
  * },
4167
4167
  * }
@@ -4201,7 +4201,7 @@ export type ItemTypeDestroyJobSchema = {
4201
4201
  * {
4202
4202
  * "appearance": {
4203
4203
  * "editor": "single_line",
4204
- * "parameters": { "heading": true },
4204
+ * "parameters": { "heading": true, "placeholder": "My blog post title" },
4205
4205
  * "addons": [
4206
4206
  * {
4207
4207
  * // "2138" is a the ID of a plugin exposing a manual addon editor
@@ -4902,9 +4902,10 @@ export type ItemTypeDestroyJobSchema = {
4902
4902
  *
4903
4903
  * Simple textual input for _Single-line string_ fields.
4904
4904
  *
4905
- * | Parameter | Type | Required | Description |
4906
- * | --------- | --------- | -------- | -------------------------------------------------------------------------------- |
4907
- * | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
4905
+ * | Parameter | Type | Required | Description |
4906
+ * | ------------- | --------- | -------- | ------------------------------------------------------------------------------------------ |
4907
+ * | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
4908
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
4908
4909
  *
4909
4910
  * </details>
4910
4911
  *
@@ -4935,6 +4936,10 @@ export type ItemTypeDestroyJobSchema = {
4935
4936
  *
4936
4937
  * Basic textarea editor for _Multiple-paragraph text_ fields.
4937
4938
  *
4939
+ * | Parameter | Type | Required | Description |
4940
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
4941
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
4942
+ *
4938
4943
  * </details>
4939
4944
  *
4940
4945
  * <details>
@@ -4954,9 +4959,10 @@ export type ItemTypeDestroyJobSchema = {
4954
4959
  *
4955
4960
  * Built-in editor for _Slug_ fields.
4956
4961
  *
4957
- * | Parameter | Type | Required | Description |
4958
- * | ------------ | -------- | -------- | -------------------------------------------------------------------------------------- |
4959
- * | `url_prefix` | `String` | | A prefix that will be shown in the editor's form to give some context to your editors. |
4962
+ * | Parameter | Type | Required | Description |
4963
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
4964
+ * | `url_prefix` | `String` | | A prefix that will be shown in the editor's form to give some context to your editors. |
4965
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
4960
4966
  *
4961
4967
  * </details>
4962
4968
  *
@@ -5024,6 +5030,28 @@ export type ItemTypeDestroyJobSchema = {
5024
5030
  *
5025
5031
  * </details>
5026
5032
  *
5033
+ * <details>
5034
+ * <summary><code>integer</code></summary>
5035
+ *
5036
+ * Built-in editor for _Integer_ fields.
5037
+ *
5038
+ * | Parameter | Type | Required | Description |
5039
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
5040
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5041
+ *
5042
+ * </details>
5043
+ *
5044
+ * <details>
5045
+ * <summary><code>float</code></summary>
5046
+ *
5047
+ * Built-in editor for _Float_ fields.
5048
+ *
5049
+ * | Parameter | Type | Required | Description |
5050
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
5051
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5052
+ *
5053
+ * </details>
5054
+ *
5027
5055
  *
5028
5056
  * This interface was referenced by `DatoApi`'s JSON-Schema
5029
5057
  * via the `definition` "field".
@@ -4628,7 +4628,7 @@ export type JobData = {
4628
4628
  * // single_line is a DatoCMS built-in editor that you can use with single-line string fields
4629
4629
  * "editor": "single_line",
4630
4630
  * // each built-in editor has specific settings
4631
- * "parameters": { "heading": true },
4631
+ * "parameters": { "heading": true, "placeholder": "My blog post title" },
4632
4632
  * "addons": []
4633
4633
  * },
4634
4634
  * }
@@ -4668,7 +4668,7 @@ export type JobData = {
4668
4668
  * {
4669
4669
  * "appearance": {
4670
4670
  * "editor": "single_line",
4671
- * "parameters": { "heading": true },
4671
+ * "parameters": { "heading": true, "placeholder": "My blog post title" },
4672
4672
  * "addons": [
4673
4673
  * {
4674
4674
  * // "2138" is a the ID of a plugin exposing a manual addon editor
@@ -5369,9 +5369,10 @@ export type JobData = {
5369
5369
  *
5370
5370
  * Simple textual input for _Single-line string_ fields.
5371
5371
  *
5372
- * | Parameter | Type | Required | Description |
5373
- * | --------- | --------- | -------- | -------------------------------------------------------------------------------- |
5374
- * | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
5372
+ * | Parameter | Type | Required | Description |
5373
+ * | ------------- | --------- | -------- | ------------------------------------------------------------------------------------------ |
5374
+ * | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
5375
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5375
5376
  *
5376
5377
  * </details>
5377
5378
  *
@@ -5402,6 +5403,10 @@ export type JobData = {
5402
5403
  *
5403
5404
  * Basic textarea editor for _Multiple-paragraph text_ fields.
5404
5405
  *
5406
+ * | Parameter | Type | Required | Description |
5407
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
5408
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5409
+ *
5405
5410
  * </details>
5406
5411
  *
5407
5412
  * <details>
@@ -5421,9 +5426,10 @@ export type JobData = {
5421
5426
  *
5422
5427
  * Built-in editor for _Slug_ fields.
5423
5428
  *
5424
- * | Parameter | Type | Required | Description |
5425
- * | ------------ | -------- | -------- | -------------------------------------------------------------------------------------- |
5426
- * | `url_prefix` | `String` | | A prefix that will be shown in the editor's form to give some context to your editors. |
5429
+ * | Parameter | Type | Required | Description |
5430
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
5431
+ * | `url_prefix` | `String` | | A prefix that will be shown in the editor's form to give some context to your editors. |
5432
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5427
5433
  *
5428
5434
  * </details>
5429
5435
  *
@@ -5491,6 +5497,28 @@ export type JobData = {
5491
5497
  *
5492
5498
  * </details>
5493
5499
  *
5500
+ * <details>
5501
+ * <summary><code>integer</code></summary>
5502
+ *
5503
+ * Built-in editor for _Integer_ fields.
5504
+ *
5505
+ * | Parameter | Type | Required | Description |
5506
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
5507
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5508
+ *
5509
+ * </details>
5510
+ *
5511
+ * <details>
5512
+ * <summary><code>float</code></summary>
5513
+ *
5514
+ * Built-in editor for _Float_ fields.
5515
+ *
5516
+ * | Parameter | Type | Required | Description |
5517
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
5518
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5519
+ *
5520
+ * </details>
5521
+ *
5494
5522
  *
5495
5523
  * This interface was referenced by `DatoApi`'s JSON-Schema
5496
5524
  * via the `definition` "field".
@@ -25,6 +25,12 @@ function fromUrlSafeBase64toUint8Array(urlSafeBase64) {
25
25
  : new Uint8Array(Buffer.from(base64, 'base64'));
26
26
  }
27
27
  export function isValidId(id) {
28
+ // For backward compatibility, first check to see if this is an older-style integer ID formerly used by Dato
29
+ if (/^\d+$/.test(id)) {
30
+ var intId = BigInt(id);
31
+ var maxDatoIntegerId = 281474976710655; // Max 6-byte/48-bit unsigned int
32
+ return intId <= maxDatoIntegerId;
33
+ }
28
34
  var bytes = fromUrlSafeBase64toUint8Array(id);
29
35
  // UUIDs are 16 bytes
30
36
  if (bytes.length !== 16) {
@@ -1 +1 @@
1
- {"version":3,"file":"idUtils.js","sourceRoot":"","sources":["../../src/idUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAE1B,IAAM,OAAO,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;AAExC,SAAS,6BAA6B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IAED,uDAAuD;IACvD,+CAA+C;IAE/C,IAAM,OAAO,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC,CAAE,IAAI,CAAC,CAAC;IAElC,gDAAgD;IAChD,IAAI,OAAO,KAAK,GAAG,EAAE;QACnB,OAAO,KAAK,CAAC;KACd;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,UAAU;IACxB,IAAM,KAAK,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;IAE3C,oEAAoE;IACpE,EAAE;IACF,iEAAiE;IACjE,mEAAmE;IACnE,mCAAmC;IAEnC,6DAA6D;IAE7D,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAE,GAAG,IAAI,CAAC;IAE5B,IAAM,MAAM,GAAG,6BAA6B,CAAC,KAAK,CAAC,CAAC;IAEpD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -4161,7 +4161,7 @@ export type ItemTypeDestroyJobSchema = {
4161
4161
  * // single_line is a DatoCMS built-in editor that you can use with single-line string fields
4162
4162
  * "editor": "single_line",
4163
4163
  * // each built-in editor has specific settings
4164
- * "parameters": { "heading": true },
4164
+ * "parameters": { "heading": true, "placeholder": "My blog post title" },
4165
4165
  * "addons": []
4166
4166
  * },
4167
4167
  * }
@@ -4201,7 +4201,7 @@ export type ItemTypeDestroyJobSchema = {
4201
4201
  * {
4202
4202
  * "appearance": {
4203
4203
  * "editor": "single_line",
4204
- * "parameters": { "heading": true },
4204
+ * "parameters": { "heading": true, "placeholder": "My blog post title" },
4205
4205
  * "addons": [
4206
4206
  * {
4207
4207
  * // "2138" is a the ID of a plugin exposing a manual addon editor
@@ -4902,9 +4902,10 @@ export type ItemTypeDestroyJobSchema = {
4902
4902
  *
4903
4903
  * Simple textual input for _Single-line string_ fields.
4904
4904
  *
4905
- * | Parameter | Type | Required | Description |
4906
- * | --------- | --------- | -------- | -------------------------------------------------------------------------------- |
4907
- * | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
4905
+ * | Parameter | Type | Required | Description |
4906
+ * | ------------- | --------- | -------- | ------------------------------------------------------------------------------------------ |
4907
+ * | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
4908
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
4908
4909
  *
4909
4910
  * </details>
4910
4911
  *
@@ -4935,6 +4936,10 @@ export type ItemTypeDestroyJobSchema = {
4935
4936
  *
4936
4937
  * Basic textarea editor for _Multiple-paragraph text_ fields.
4937
4938
  *
4939
+ * | Parameter | Type | Required | Description |
4940
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
4941
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
4942
+ *
4938
4943
  * </details>
4939
4944
  *
4940
4945
  * <details>
@@ -4954,9 +4959,10 @@ export type ItemTypeDestroyJobSchema = {
4954
4959
  *
4955
4960
  * Built-in editor for _Slug_ fields.
4956
4961
  *
4957
- * | Parameter | Type | Required | Description |
4958
- * | ------------ | -------- | -------- | -------------------------------------------------------------------------------------- |
4959
- * | `url_prefix` | `String` | | A prefix that will be shown in the editor's form to give some context to your editors. |
4962
+ * | Parameter | Type | Required | Description |
4963
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
4964
+ * | `url_prefix` | `String` | | A prefix that will be shown in the editor's form to give some context to your editors. |
4965
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
4960
4966
  *
4961
4967
  * </details>
4962
4968
  *
@@ -5024,6 +5030,28 @@ export type ItemTypeDestroyJobSchema = {
5024
5030
  *
5025
5031
  * </details>
5026
5032
  *
5033
+ * <details>
5034
+ * <summary><code>integer</code></summary>
5035
+ *
5036
+ * Built-in editor for _Integer_ fields.
5037
+ *
5038
+ * | Parameter | Type | Required | Description |
5039
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
5040
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5041
+ *
5042
+ * </details>
5043
+ *
5044
+ * <details>
5045
+ * <summary><code>float</code></summary>
5046
+ *
5047
+ * Built-in editor for _Float_ fields.
5048
+ *
5049
+ * | Parameter | Type | Required | Description |
5050
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
5051
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5052
+ *
5053
+ * </details>
5054
+ *
5027
5055
  *
5028
5056
  * This interface was referenced by `DatoApi`'s JSON-Schema
5029
5057
  * via the `definition` "field".
@@ -4628,7 +4628,7 @@ export type JobData = {
4628
4628
  * // single_line is a DatoCMS built-in editor that you can use with single-line string fields
4629
4629
  * "editor": "single_line",
4630
4630
  * // each built-in editor has specific settings
4631
- * "parameters": { "heading": true },
4631
+ * "parameters": { "heading": true, "placeholder": "My blog post title" },
4632
4632
  * "addons": []
4633
4633
  * },
4634
4634
  * }
@@ -4668,7 +4668,7 @@ export type JobData = {
4668
4668
  * {
4669
4669
  * "appearance": {
4670
4670
  * "editor": "single_line",
4671
- * "parameters": { "heading": true },
4671
+ * "parameters": { "heading": true, "placeholder": "My blog post title" },
4672
4672
  * "addons": [
4673
4673
  * {
4674
4674
  * // "2138" is a the ID of a plugin exposing a manual addon editor
@@ -5369,9 +5369,10 @@ export type JobData = {
5369
5369
  *
5370
5370
  * Simple textual input for _Single-line string_ fields.
5371
5371
  *
5372
- * | Parameter | Type | Required | Description |
5373
- * | --------- | --------- | -------- | -------------------------------------------------------------------------------- |
5374
- * | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
5372
+ * | Parameter | Type | Required | Description |
5373
+ * | ------------- | --------- | -------- | ------------------------------------------------------------------------------------------ |
5374
+ * | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
5375
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5375
5376
  *
5376
5377
  * </details>
5377
5378
  *
@@ -5402,6 +5403,10 @@ export type JobData = {
5402
5403
  *
5403
5404
  * Basic textarea editor for _Multiple-paragraph text_ fields.
5404
5405
  *
5406
+ * | Parameter | Type | Required | Description |
5407
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
5408
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5409
+ *
5405
5410
  * </details>
5406
5411
  *
5407
5412
  * <details>
@@ -5421,9 +5426,10 @@ export type JobData = {
5421
5426
  *
5422
5427
  * Built-in editor for _Slug_ fields.
5423
5428
  *
5424
- * | Parameter | Type | Required | Description |
5425
- * | ------------ | -------- | -------- | -------------------------------------------------------------------------------------- |
5426
- * | `url_prefix` | `String` | | A prefix that will be shown in the editor's form to give some context to your editors. |
5429
+ * | Parameter | Type | Required | Description |
5430
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
5431
+ * | `url_prefix` | `String` | | A prefix that will be shown in the editor's form to give some context to your editors. |
5432
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5427
5433
  *
5428
5434
  * </details>
5429
5435
  *
@@ -5491,6 +5497,28 @@ export type JobData = {
5491
5497
  *
5492
5498
  * </details>
5493
5499
  *
5500
+ * <details>
5501
+ * <summary><code>integer</code></summary>
5502
+ *
5503
+ * Built-in editor for _Integer_ fields.
5504
+ *
5505
+ * | Parameter | Type | Required | Description |
5506
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
5507
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5508
+ *
5509
+ * </details>
5510
+ *
5511
+ * <details>
5512
+ * <summary><code>float</code></summary>
5513
+ *
5514
+ * Built-in editor for _Float_ fields.
5515
+ *
5516
+ * | Parameter | Type | Required | Description |
5517
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
5518
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5519
+ *
5520
+ * </details>
5521
+ *
5494
5522
  *
5495
5523
  * This interface was referenced by `DatoApi`'s JSON-Schema
5496
5524
  * via the `definition` "field".
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datocms/cma-client",
3
- "version": "3.3.3",
3
+ "version": "3.3.5",
4
4
  "description": "JS client for DatoCMS REST Content Management API",
5
5
  "keywords": ["datocms", "client"],
6
6
  "author": "Stefano Verna <s.verna@datocms.com>",
@@ -30,12 +30,12 @@
30
30
  "url": "https://github.com/datocms/js-rest-api-clients/issues"
31
31
  },
32
32
  "dependencies": {
33
- "@datocms/rest-client-utils": "^3.3.3",
33
+ "@datocms/rest-client-utils": "^3.3.5",
34
34
  "uuid": "^9.0.1"
35
35
  },
36
36
  "devDependencies": {
37
- "@datocms/dashboard-client": "^3.3.3",
37
+ "@datocms/dashboard-client": "^3.3.5",
38
38
  "@types/uuid": "^9.0.7"
39
39
  },
40
- "gitHead": "013171f1e33f61c464eaa9d7d8fae2d8fdabefb0"
40
+ "gitHead": "9cd93dc5205b69f63eec5c86a7783f5e414a2952"
41
41
  }
@@ -145,7 +145,7 @@ export class Client {
145
145
  ...this.config,
146
146
  ...options,
147
147
  logFn: this.config.logFn || console.log,
148
- userAgent: '@datocms/cma-client v3.3.3',
148
+ userAgent: '@datocms/cma-client v3.3.5',
149
149
  baseUrl: this.baseUrl,
150
150
  preCallStack: new Error().stack,
151
151
  extraHeaders: {
@@ -4439,7 +4439,7 @@ export type ItemTypeDestroyJobSchema = {
4439
4439
  * // single_line is a DatoCMS built-in editor that you can use with single-line string fields
4440
4440
  * "editor": "single_line",
4441
4441
  * // each built-in editor has specific settings
4442
- * "parameters": { "heading": true },
4442
+ * "parameters": { "heading": true, "placeholder": "My blog post title" },
4443
4443
  * "addons": []
4444
4444
  * },
4445
4445
  * }
@@ -4479,7 +4479,7 @@ export type ItemTypeDestroyJobSchema = {
4479
4479
  * {
4480
4480
  * "appearance": {
4481
4481
  * "editor": "single_line",
4482
- * "parameters": { "heading": true },
4482
+ * "parameters": { "heading": true, "placeholder": "My blog post title" },
4483
4483
  * "addons": [
4484
4484
  * {
4485
4485
  * // "2138" is a the ID of a plugin exposing a manual addon editor
@@ -5180,9 +5180,10 @@ export type ItemTypeDestroyJobSchema = {
5180
5180
  *
5181
5181
  * Simple textual input for _Single-line string_ fields.
5182
5182
  *
5183
- * | Parameter | Type | Required | Description |
5184
- * | --------- | --------- | -------- | -------------------------------------------------------------------------------- |
5185
- * | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
5183
+ * | Parameter | Type | Required | Description |
5184
+ * | ------------- | --------- | -------- | ------------------------------------------------------------------------------------------ |
5185
+ * | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
5186
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5186
5187
  *
5187
5188
  * </details>
5188
5189
  *
@@ -5213,6 +5214,10 @@ export type ItemTypeDestroyJobSchema = {
5213
5214
  *
5214
5215
  * Basic textarea editor for _Multiple-paragraph text_ fields.
5215
5216
  *
5217
+ * | Parameter | Type | Required | Description |
5218
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
5219
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5220
+ *
5216
5221
  * </details>
5217
5222
  *
5218
5223
  * <details>
@@ -5232,9 +5237,10 @@ export type ItemTypeDestroyJobSchema = {
5232
5237
  *
5233
5238
  * Built-in editor for _Slug_ fields.
5234
5239
  *
5235
- * | Parameter | Type | Required | Description |
5236
- * | ------------ | -------- | -------- | -------------------------------------------------------------------------------------- |
5237
- * | `url_prefix` | `String` | | A prefix that will be shown in the editor's form to give some context to your editors. |
5240
+ * | Parameter | Type | Required | Description |
5241
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
5242
+ * | `url_prefix` | `String` | | A prefix that will be shown in the editor's form to give some context to your editors. |
5243
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5238
5244
  *
5239
5245
  * </details>
5240
5246
  *
@@ -5302,6 +5308,28 @@ export type ItemTypeDestroyJobSchema = {
5302
5308
  *
5303
5309
  * </details>
5304
5310
  *
5311
+ * <details>
5312
+ * <summary><code>integer</code></summary>
5313
+ *
5314
+ * Built-in editor for _Integer_ fields.
5315
+ *
5316
+ * | Parameter | Type | Required | Description |
5317
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
5318
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5319
+ *
5320
+ * </details>
5321
+ *
5322
+ * <details>
5323
+ * <summary><code>float</code></summary>
5324
+ *
5325
+ * Built-in editor for _Float_ fields.
5326
+ *
5327
+ * | Parameter | Type | Required | Description |
5328
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
5329
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5330
+ *
5331
+ * </details>
5332
+ *
5305
5333
  *
5306
5334
  * This interface was referenced by `DatoApi`'s JSON-Schema
5307
5335
  * via the `definition` "field".
@@ -4904,7 +4904,7 @@ export type JobData = {
4904
4904
  * // single_line is a DatoCMS built-in editor that you can use with single-line string fields
4905
4905
  * "editor": "single_line",
4906
4906
  * // each built-in editor has specific settings
4907
- * "parameters": { "heading": true },
4907
+ * "parameters": { "heading": true, "placeholder": "My blog post title" },
4908
4908
  * "addons": []
4909
4909
  * },
4910
4910
  * }
@@ -4944,7 +4944,7 @@ export type JobData = {
4944
4944
  * {
4945
4945
  * "appearance": {
4946
4946
  * "editor": "single_line",
4947
- * "parameters": { "heading": true },
4947
+ * "parameters": { "heading": true, "placeholder": "My blog post title" },
4948
4948
  * "addons": [
4949
4949
  * {
4950
4950
  * // "2138" is a the ID of a plugin exposing a manual addon editor
@@ -5645,9 +5645,10 @@ export type JobData = {
5645
5645
  *
5646
5646
  * Simple textual input for _Single-line string_ fields.
5647
5647
  *
5648
- * | Parameter | Type | Required | Description |
5649
- * | --------- | --------- | -------- | -------------------------------------------------------------------------------- |
5650
- * | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
5648
+ * | Parameter | Type | Required | Description |
5649
+ * | ------------- | --------- | -------- | ------------------------------------------------------------------------------------------ |
5650
+ * | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
5651
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5651
5652
  *
5652
5653
  * </details>
5653
5654
  *
@@ -5678,6 +5679,10 @@ export type JobData = {
5678
5679
  *
5679
5680
  * Basic textarea editor for _Multiple-paragraph text_ fields.
5680
5681
  *
5682
+ * | Parameter | Type | Required | Description |
5683
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
5684
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5685
+ *
5681
5686
  * </details>
5682
5687
  *
5683
5688
  * <details>
@@ -5697,9 +5702,10 @@ export type JobData = {
5697
5702
  *
5698
5703
  * Built-in editor for _Slug_ fields.
5699
5704
  *
5700
- * | Parameter | Type | Required | Description |
5701
- * | ------------ | -------- | -------- | -------------------------------------------------------------------------------------- |
5702
- * | `url_prefix` | `String` | | A prefix that will be shown in the editor's form to give some context to your editors. |
5705
+ * | Parameter | Type | Required | Description |
5706
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
5707
+ * | `url_prefix` | `String` | | A prefix that will be shown in the editor's form to give some context to your editors. |
5708
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5703
5709
  *
5704
5710
  * </details>
5705
5711
  *
@@ -5767,6 +5773,28 @@ export type JobData = {
5767
5773
  *
5768
5774
  * </details>
5769
5775
  *
5776
+ * <details>
5777
+ * <summary><code>integer</code></summary>
5778
+ *
5779
+ * Built-in editor for _Integer_ fields.
5780
+ *
5781
+ * | Parameter | Type | Required | Description |
5782
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
5783
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5784
+ *
5785
+ * </details>
5786
+ *
5787
+ * <details>
5788
+ * <summary><code>float</code></summary>
5789
+ *
5790
+ * Built-in editor for _Float_ fields.
5791
+ *
5792
+ * | Parameter | Type | Required | Description |
5793
+ * | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
5794
+ * | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
5795
+ *
5796
+ * </details>
5797
+ *
5770
5798
  *
5771
5799
  * This interface was referenced by `DatoApi`'s JSON-Schema
5772
5800
  * via the `definition` "field".
package/src/idUtils.ts CHANGED
@@ -34,6 +34,13 @@ function fromUrlSafeBase64toUint8Array(urlSafeBase64: string): Uint8Array {
34
34
  }
35
35
 
36
36
  export function isValidId(id: string) {
37
+ // For backward compatibility, first check to see if this is an older-style integer ID formerly used by Dato
38
+ if (/^\d+$/.test(id)) {
39
+ const intId = BigInt(id);
40
+ const maxDatoIntegerId = 281474976710655; // Max 6-byte/48-bit unsigned int
41
+ return intId <= maxDatoIntegerId;
42
+ }
43
+
37
44
  const bytes = fromUrlSafeBase64toUint8Array(id);
38
45
 
39
46
  // UUIDs are 16 bytes