@datocms/cma-client 2.2.5 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,7 +19,7 @@ export declare type RoleType = 'role';
19
19
  */
20
20
  export declare type RoleIdentity = string;
21
21
  /**
22
- * ID of item type
22
+ * RFC 4122 UUID of item type expressed in URL-safe base64 format
23
23
  *
24
24
  * This interface was referenced by `ItemType`'s JSON-Schema
25
25
  * via the `definition` "identity".
@@ -29,7 +29,7 @@ export declare type RoleIdentity = string;
29
29
  */
30
30
  export declare type ItemTypeIdentity = string;
31
31
  /**
32
- * ID of workflow
32
+ * RFC 4122 UUID of workflow expressed in URL-safe base64 format
33
33
  *
34
34
  * This interface was referenced by `Workflow`'s JSON-Schema
35
35
  * via the `definition` "identity".
@@ -269,7 +269,7 @@ export declare type SitePlanIdentity = string;
269
269
  */
270
270
  export declare type MenuItemType = 'menu_item';
271
271
  /**
272
- * ID of menu item
272
+ * RFC 4122 UUID of menu item expressed in URL-safe base64 format
273
273
  *
274
274
  * This interface was referenced by `MenuItem`'s JSON-Schema
275
275
  * via the `definition` "identity".
@@ -293,7 +293,7 @@ export declare type ItemTypeType = 'item_type';
293
293
  */
294
294
  export declare type ItemTypeFilterType = 'item_type_filter';
295
295
  /**
296
- * ID of filter
296
+ * RFC 4122 UUID of filter expressed in URL-safe base64 format
297
297
  *
298
298
  * This interface was referenced by `ItemTypeFilter`'s JSON-Schema
299
299
  * via the `definition` "identity".
@@ -322,7 +322,7 @@ export declare type MenuItemInstancesHrefSchema = {
322
322
  */
323
323
  export declare type ItemType1 = 'item';
324
324
  /**
325
- * ID of record
325
+ * RFC 4122 UUID of record expressed in URL-safe base64 format
326
326
  *
327
327
  * This interface was referenced by `Item`'s JSON-Schema
328
328
  * via the `definition` "identity".
@@ -339,7 +339,7 @@ export declare type ItemIdentity = string;
339
339
  */
340
340
  export declare type FieldType = 'field';
341
341
  /**
342
- * ID of field
342
+ * RFC 4122 UUID of field expressed in URL-safe base64 format
343
343
  *
344
344
  * This interface was referenced by `Field`'s JSON-Schema
345
345
  * via the `definition` "identity".
@@ -356,7 +356,7 @@ export declare type FieldIdentity = string;
356
356
  */
357
357
  export declare type FieldsetType = 'fieldset';
358
358
  /**
359
- * ID of fieldset
359
+ * RFC 4122 UUID of fieldset expressed in URL-safe base64 format
360
360
  *
361
361
  * This interface was referenced by `Fieldset`'s JSON-Schema
362
362
  * via the `definition` "identity".
@@ -436,7 +436,7 @@ export declare type SessionIdentity = string;
436
436
  */
437
437
  export declare type PluginType = 'plugin';
438
438
  /**
439
- * ID of plugin
439
+ * RFC 4122 UUID of plugin expressed in URL-safe base64 format
440
440
  *
441
441
  * This interface was referenced by `Plugin`'s JSON-Schema
442
442
  * via the `definition` "identity".
@@ -623,7 +623,7 @@ export declare type ItemSelfHrefSchema = {
623
623
  */
624
624
  export declare type ItemCurrentVsPublishedStateType = 'item_current_vs_published_state';
625
625
  /**
626
- * ID of record
626
+ * RFC 4122 UUID of record expressed in URL-safe base64 format
627
627
  *
628
628
  * This interface was referenced by `ItemCurrentVsPublishedState`'s JSON-Schema
629
629
  * via the `definition` "identity".
@@ -674,7 +674,7 @@ export declare type ScheduledUnpublishingIdentity = string;
674
674
  */
675
675
  export declare type ItemVersionType = 'item_version';
676
676
  /**
677
- * ID of record version
677
+ * RFC 4122 UUID of redord version expressed in URL-safe base64 format
678
678
  *
679
679
  * This interface was referenced by `ItemVersion`'s JSON-Schema
680
680
  * via the `definition` "identity".
@@ -808,7 +808,7 @@ export declare type ItemUnpublishHrefSchema = {
808
808
  */
809
809
  export declare type UploadType = 'upload';
810
810
  /**
811
- * ID of upload
811
+ * RFC 4122 UUID of upload expressed in URL-safe base64 format
812
812
  *
813
813
  * This interface was referenced by `Upload`'s JSON-Schema
814
814
  * via the `definition` "identity".
@@ -1097,7 +1097,7 @@ export declare type WebhookCallInstancesHrefSchema = {
1097
1097
  */
1098
1098
  export declare type UploadFilterType = 'upload_filter';
1099
1099
  /**
1100
- * ID of filter
1100
+ * RFC 4122 UUID of upload filter expressed in URL-safe base64 format
1101
1101
  *
1102
1102
  * This interface was referenced by `UploadFilter`'s JSON-Schema
1103
1103
  * via the `definition` "identity".
@@ -3967,7 +3967,7 @@ export declare type ItemTypeDestroyJobSchema = {
3967
3967
  *
3968
3968
  * Below you'll find a summary of all the validators available for each field type with their settings.
3969
3969
  *
3970
- * Some validators are required for a specific type of field. For example, the _Slug_ field needs to have a `slug_title_field` validator to specify the ID of the _Single-line string_ field that will be used to generate the slug itself.
3970
+ * Some validators are required for a specific type of field. For example, the _Modular Content_ field needs to have a `rich_text_blocks` validator, specifying which types of blocks it can contain.
3971
3971
  *
3972
3972
  * ### Specifying the appearance
3973
3973
  *
@@ -4153,23 +4153,22 @@ export declare type ItemTypeDestroyJobSchema = {
4153
4153
  * <details>
4154
4154
  * <summary>SEO and Social (<code>seo</code>)</summary>
4155
4155
  *
4156
- * | Property | Value |
4157
- * | ------------------------------ | -------------------------------------------------------------------------------------------- |
4158
- * | Code | `seo` |
4159
- * | Built-in editors for the field | `seo` |
4160
- * | Available validators | `required_seo_fields`, `file_size`, `image_dimensions`, `title_length`, `description_length` |
4156
+ * | Property | Value |
4157
+ * | ------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
4158
+ * | Code | `seo` |
4159
+ * | Built-in editors for the field | `seo` |
4160
+ * | Available validators | `required_seo_fields`, `file_size`, `image_dimensions`, `image_aspect_ratio`, `title_length`, `description_length` |
4161
4161
  *
4162
4162
  * </details>
4163
4163
  *
4164
4164
  * <details>
4165
4165
  * <summary>Slug (<code>slug</code>)</summary>
4166
4166
  *
4167
- * | Property | Value |
4168
- * | ------------------------------ | ----------------------------------- |
4169
- * | Code | `slug` |
4170
- * | Built-in editors for the field | `slug` |
4171
- * | Required validators | `slug_title_field` |
4172
- * | Other validators available | `required`, `length`, `slug_format` |
4167
+ * | Property | Value |
4168
+ * | ------------------------------ | ------------------------------------------------------- |
4169
+ * | Code | `slug` |
4170
+ * | Built-in editors for the field | `slug` |
4171
+ * | Available validators | `required`, `length`, `slug_format`, `slug_title_field` |
4173
4172
  *
4174
4173
  * </details>
4175
4174
  *
@@ -4187,22 +4186,22 @@ export declare type ItemTypeDestroyJobSchema = {
4187
4186
  * <details>
4188
4187
  * <summary>Single-asset (<code>file</code>)</summary>
4189
4188
  *
4190
- * | Property | Value |
4191
- * | ------------------------------ | ------------------------------------------------------------------------------ |
4192
- * | Code | `file` |
4193
- * | Built-in editors for the field | `file` |
4194
- * | Available validators | `required`, `file_size`, `image_dimensions`, `extension`, `required_alt_title` |
4189
+ * | Property | Value |
4190
+ * | ------------------------------ | ---------------------------------------------------------------------------------------------------- |
4191
+ * | Code | `file` |
4192
+ * | Built-in editors for the field | `file` |
4193
+ * | Available validators | `required`, `file_size`, `image_dimensions`, `image_aspect_ratio`, `extension`, `required_alt_title` |
4195
4194
  *
4196
4195
  * </details>
4197
4196
  *
4198
4197
  * <details>
4199
4198
  * <summary>Asset gallery (<code>gallery</code>)</summary>
4200
4199
  *
4201
- * | Property | Value |
4202
- * | ------------------------------ | -------------------------------------------------------------------------- |
4203
- * | Code | `gallery` |
4204
- * | Built-in editors for the field | `gallery` |
4205
- * | Available validators | `size`, `file_size`, `image_dimensions`, `extension`, `required_alt_title` |
4200
+ * | Property | Value |
4201
+ * | ------------------------------ | ------------------------------------------------------------------------------------------------ |
4202
+ * | Code | `gallery` |
4203
+ * | Built-in editors for the field | `gallery` |
4204
+ * | Available validators | `size`, `file_size`, `image_dimensions`, `image_aspect_ratio`, `extension`, `required_alt_title` |
4206
4205
  *
4207
4206
  * </details>
4208
4207
  *
@@ -4358,7 +4357,7 @@ export declare type ItemTypeDestroyJobSchema = {
4358
4357
  * <details>
4359
4358
  * <summary><code>image_dimensions</code></summary>
4360
4359
  *
4361
- * Accept assets only within a specified height/width range.
4360
+ * Accept assets only within a specified height and width range.
4362
4361
  *
4363
4362
  * | Parameter | Type | Required | Description |
4364
4363
  * | ------------------ | --------- | -------- | -------------------------------- |
@@ -4367,7 +4366,25 @@ export declare type ItemTypeDestroyJobSchema = {
4367
4366
  * | `height_min_value` | `Integer` | | Numeric value for minimum width |
4368
4367
  * | `height_max_value` | `Integer` | | Numeric value for maximum height |
4369
4368
  *
4370
- * At least one parameter must be specified.
4369
+ * At least one pair of height/width parameters must be specified.
4370
+ *
4371
+ * </details>
4372
+ *
4373
+ * <details>
4374
+ * <summary><code>image_aspect_ratio</code></summary>
4375
+ *
4376
+ * Accept assets only within a specified aspect ratio range.
4377
+ *
4378
+ * | Parameter | Type | Required | Description |
4379
+ * | -------------------- | --------- | -------- | ---------------------------------------------- |
4380
+ * | `min_ar_numerator` | `Integer` | | Numerator part of the minimum aspect ratio |
4381
+ * | `min_ar_denominator` | `Integer` | | Denominator part of the minimum aspect ratio |
4382
+ * | `eq_ar_numerator` | `Integer` | | Numerator part for the required aspect ratio |
4383
+ * | `eq_ar_denominator` | `Integer` | | Denominator part for the required aspect ratio |
4384
+ * | `max_ar_numerator` | `Integer` | | Numerator part of the maximum aspect ratio |
4385
+ * | `max_ar_denominator` | `Integer` | | Denominator part of the maximum aspect ratio |
4386
+ *
4387
+ * At least one pair of numerator/denominator must be specified.
4371
4388
  *
4372
4389
  * </details>
4373
4390
  *
@@ -5896,6 +5913,13 @@ export declare type BuildEventSelfTargetSchema = {
5896
5913
  /**
5897
5914
  * DatoCMS stores the individual pieces of content you create from a model as records, which are much like table rows in a database. For backward-compatibility reasons, the API refers to records as "items".
5898
5915
  *
5916
+ * You can learn how the records are structured at the API level, and everything that is necessary to interact with the records through CMA in the following detail sections:
5917
+ *
5918
+ * * [List/filter records](https://www.datocms.com/docs/content-management-api/resources/item/instances)
5919
+ * * [Create new records](https://www.datocms.com/docs/content-management-api/resources/item/create)
5920
+ * * [Update existing records](https://www.datocms.com/docs/content-management-api/resources/item/update)
5921
+ *
5922
+ *
5899
5923
  * This interface was referenced by `DatoApi`'s JSON-Schema
5900
5924
  * via the `definition` "item".
5901
5925
  */
@@ -19,7 +19,7 @@ export declare type RoleIdentity = string;
19
19
  */
20
20
  export declare type RoleType = 'role';
21
21
  /**
22
- * ID of item type
22
+ * RFC 4122 UUID of item type expressed in URL-safe base64 format
23
23
  *
24
24
  * This interface was referenced by `ItemType`'s JSON-Schema
25
25
  * via the `definition` "identity".
@@ -29,7 +29,7 @@ export declare type RoleType = 'role';
29
29
  */
30
30
  export declare type ItemTypeIdentity = string;
31
31
  /**
32
- * ID of workflow
32
+ * RFC 4122 UUID of workflow expressed in URL-safe base64 format
33
33
  *
34
34
  * This interface was referenced by `Workflow`'s JSON-Schema
35
35
  * via the `definition` "identity".
@@ -297,7 +297,7 @@ export declare type SitePlanIdentity = string;
297
297
  */
298
298
  export declare type SitePlanType = 'site_plan';
299
299
  /**
300
- * ID of menu item
300
+ * RFC 4122 UUID of menu item expressed in URL-safe base64 format
301
301
  *
302
302
  * This interface was referenced by `MenuItem`'s JSON-Schema
303
303
  * via the `definition` "identity".
@@ -328,7 +328,7 @@ export declare type ItemTypeType = 'item_type';
328
328
  */
329
329
  export declare type ItemTypeFilterType = 'item_type_filter';
330
330
  /**
331
- * ID of filter
331
+ * RFC 4122 UUID of filter expressed in URL-safe base64 format
332
332
  *
333
333
  * This interface was referenced by `ItemTypeFilter`'s JSON-Schema
334
334
  * via the `definition` "identity".
@@ -362,7 +362,7 @@ export declare type MenuItemInstancesHrefSchema = {
362
362
  */
363
363
  export declare type ItemType1 = 'item';
364
364
  /**
365
- * ID of record
365
+ * RFC 4122 UUID of record expressed in URL-safe base64 format
366
366
  *
367
367
  * This interface was referenced by `Item`'s JSON-Schema
368
368
  * via the `definition` "identity".
@@ -379,7 +379,7 @@ export declare type ItemIdentity = string;
379
379
  */
380
380
  export declare type FieldType = 'field';
381
381
  /**
382
- * ID of field
382
+ * RFC 4122 UUID of field expressed in URL-safe base64 format
383
383
  *
384
384
  * This interface was referenced by `Field`'s JSON-Schema
385
385
  * via the `definition` "identity".
@@ -396,7 +396,7 @@ export declare type FieldIdentity = string;
396
396
  */
397
397
  export declare type FieldsetType = 'fieldset';
398
398
  /**
399
- * ID of fieldset
399
+ * RFC 4122 UUID of fieldset expressed in URL-safe base64 format
400
400
  *
401
401
  * This interface was referenced by `Fieldset`'s JSON-Schema
402
402
  * via the `definition` "identity".
@@ -494,7 +494,7 @@ export declare type SessionIdentity = string;
494
494
  */
495
495
  export declare type SessionType = 'session';
496
496
  /**
497
- * ID of plugin
497
+ * RFC 4122 UUID of plugin expressed in URL-safe base64 format
498
498
  *
499
499
  * This interface was referenced by `Plugin`'s JSON-Schema
500
500
  * via the `definition` "identity".
@@ -716,7 +716,7 @@ export declare type ItemSelfHrefSchema = {
716
716
  [k: string]: unknown;
717
717
  };
718
718
  /**
719
- * ID of record
719
+ * RFC 4122 UUID of record expressed in URL-safe base64 format
720
720
  *
721
721
  * This interface was referenced by `ItemCurrentVsPublishedState`'s JSON-Schema
722
722
  * via the `definition` "identity".
@@ -774,7 +774,7 @@ export declare type ScheduledUnpublishingIdentity = string;
774
774
  */
775
775
  export declare type ItemVersionType = 'item_version';
776
776
  /**
777
- * ID of record version
777
+ * RFC 4122 UUID of redord version expressed in URL-safe base64 format
778
778
  *
779
779
  * This interface was referenced by `ItemVersion`'s JSON-Schema
780
780
  * via the `definition` "identity".
@@ -938,7 +938,7 @@ export declare type ItemVersionInstancesHrefSchema = {
938
938
  [k: string]: unknown;
939
939
  };
940
940
  /**
941
- * ID of upload
941
+ * RFC 4122 UUID of upload expressed in URL-safe base64 format
942
942
  *
943
943
  * This interface was referenced by `Upload`'s JSON-Schema
944
944
  * via the `definition` "identity".
@@ -1297,7 +1297,7 @@ export declare type BuildTriggerInstancesTargetSchema = BuildTrigger[];
1297
1297
  */
1298
1298
  export declare type ItemTypeFilterInstancesTargetSchema = ItemTypeFilter[];
1299
1299
  /**
1300
- * ID of filter
1300
+ * RFC 4122 UUID of upload filter expressed in URL-safe base64 format
1301
1301
  *
1302
1302
  * This interface was referenced by `UploadFilter`'s JSON-Schema
1303
1303
  * via the `definition` "identity".
@@ -4488,7 +4488,7 @@ export declare type JobData = {
4488
4488
  *
4489
4489
  * Below you'll find a summary of all the validators available for each field type with their settings.
4490
4490
  *
4491
- * Some validators are required for a specific type of field. For example, the _Slug_ field needs to have a `slug_title_field` validator to specify the ID of the _Single-line string_ field that will be used to generate the slug itself.
4491
+ * Some validators are required for a specific type of field. For example, the _Modular Content_ field needs to have a `rich_text_blocks` validator, specifying which types of blocks it can contain.
4492
4492
  *
4493
4493
  * ### Specifying the appearance
4494
4494
  *
@@ -4674,23 +4674,22 @@ export declare type JobData = {
4674
4674
  * <details>
4675
4675
  * <summary>SEO and Social (<code>seo</code>)</summary>
4676
4676
  *
4677
- * | Property | Value |
4678
- * | ------------------------------ | -------------------------------------------------------------------------------------------- |
4679
- * | Code | `seo` |
4680
- * | Built-in editors for the field | `seo` |
4681
- * | Available validators | `required_seo_fields`, `file_size`, `image_dimensions`, `title_length`, `description_length` |
4677
+ * | Property | Value |
4678
+ * | ------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
4679
+ * | Code | `seo` |
4680
+ * | Built-in editors for the field | `seo` |
4681
+ * | Available validators | `required_seo_fields`, `file_size`, `image_dimensions`, `image_aspect_ratio`, `title_length`, `description_length` |
4682
4682
  *
4683
4683
  * </details>
4684
4684
  *
4685
4685
  * <details>
4686
4686
  * <summary>Slug (<code>slug</code>)</summary>
4687
4687
  *
4688
- * | Property | Value |
4689
- * | ------------------------------ | ----------------------------------- |
4690
- * | Code | `slug` |
4691
- * | Built-in editors for the field | `slug` |
4692
- * | Required validators | `slug_title_field` |
4693
- * | Other validators available | `required`, `length`, `slug_format` |
4688
+ * | Property | Value |
4689
+ * | ------------------------------ | ------------------------------------------------------- |
4690
+ * | Code | `slug` |
4691
+ * | Built-in editors for the field | `slug` |
4692
+ * | Available validators | `required`, `length`, `slug_format`, `slug_title_field` |
4694
4693
  *
4695
4694
  * </details>
4696
4695
  *
@@ -4708,22 +4707,22 @@ export declare type JobData = {
4708
4707
  * <details>
4709
4708
  * <summary>Single-asset (<code>file</code>)</summary>
4710
4709
  *
4711
- * | Property | Value |
4712
- * | ------------------------------ | ------------------------------------------------------------------------------ |
4713
- * | Code | `file` |
4714
- * | Built-in editors for the field | `file` |
4715
- * | Available validators | `required`, `file_size`, `image_dimensions`, `extension`, `required_alt_title` |
4710
+ * | Property | Value |
4711
+ * | ------------------------------ | ---------------------------------------------------------------------------------------------------- |
4712
+ * | Code | `file` |
4713
+ * | Built-in editors for the field | `file` |
4714
+ * | Available validators | `required`, `file_size`, `image_dimensions`, `image_aspect_ratio`, `extension`, `required_alt_title` |
4716
4715
  *
4717
4716
  * </details>
4718
4717
  *
4719
4718
  * <details>
4720
4719
  * <summary>Asset gallery (<code>gallery</code>)</summary>
4721
4720
  *
4722
- * | Property | Value |
4723
- * | ------------------------------ | -------------------------------------------------------------------------- |
4724
- * | Code | `gallery` |
4725
- * | Built-in editors for the field | `gallery` |
4726
- * | Available validators | `size`, `file_size`, `image_dimensions`, `extension`, `required_alt_title` |
4721
+ * | Property | Value |
4722
+ * | ------------------------------ | ------------------------------------------------------------------------------------------------ |
4723
+ * | Code | `gallery` |
4724
+ * | Built-in editors for the field | `gallery` |
4725
+ * | Available validators | `size`, `file_size`, `image_dimensions`, `image_aspect_ratio`, `extension`, `required_alt_title` |
4727
4726
  *
4728
4727
  * </details>
4729
4728
  *
@@ -4879,7 +4878,7 @@ export declare type JobData = {
4879
4878
  * <details>
4880
4879
  * <summary><code>image_dimensions</code></summary>
4881
4880
  *
4882
- * Accept assets only within a specified height/width range.
4881
+ * Accept assets only within a specified height and width range.
4883
4882
  *
4884
4883
  * | Parameter | Type | Required | Description |
4885
4884
  * | ------------------ | --------- | -------- | -------------------------------- |
@@ -4888,7 +4887,25 @@ export declare type JobData = {
4888
4887
  * | `height_min_value` | `Integer` | | Numeric value for minimum width |
4889
4888
  * | `height_max_value` | `Integer` | | Numeric value for maximum height |
4890
4889
  *
4891
- * At least one parameter must be specified.
4890
+ * At least one pair of height/width parameters must be specified.
4891
+ *
4892
+ * </details>
4893
+ *
4894
+ * <details>
4895
+ * <summary><code>image_aspect_ratio</code></summary>
4896
+ *
4897
+ * Accept assets only within a specified aspect ratio range.
4898
+ *
4899
+ * | Parameter | Type | Required | Description |
4900
+ * | -------------------- | --------- | -------- | ---------------------------------------------- |
4901
+ * | `min_ar_numerator` | `Integer` | | Numerator part of the minimum aspect ratio |
4902
+ * | `min_ar_denominator` | `Integer` | | Denominator part of the minimum aspect ratio |
4903
+ * | `eq_ar_numerator` | `Integer` | | Numerator part for the required aspect ratio |
4904
+ * | `eq_ar_denominator` | `Integer` | | Denominator part for the required aspect ratio |
4905
+ * | `max_ar_numerator` | `Integer` | | Numerator part of the maximum aspect ratio |
4906
+ * | `max_ar_denominator` | `Integer` | | Denominator part of the maximum aspect ratio |
4907
+ *
4908
+ * At least one pair of numerator/denominator must be specified.
4892
4909
  *
4893
4910
  * </details>
4894
4911
  *
@@ -6330,6 +6347,13 @@ export declare type BuildEventRelationships = {
6330
6347
  /**
6331
6348
  * DatoCMS stores the individual pieces of content you create from a model as records, which are much like table rows in a database. For backward-compatibility reasons, the API refers to records as "items".
6332
6349
  *
6350
+ * You can learn how the records are structured at the API level, and everything that is necessary to interact with the records through CMA in the following detail sections:
6351
+ *
6352
+ * * [List/filter records](https://www.datocms.com/docs/content-management-api/resources/item/instances)
6353
+ * * [Create new records](https://www.datocms.com/docs/content-management-api/resources/item/create)
6354
+ * * [Update existing records](https://www.datocms.com/docs/content-management-api/resources/item/update)
6355
+ *
6356
+ *
6333
6357
  * This interface was referenced by `ScheduledPublication`'s JSON-Schema
6334
6358
  * via the `destroy.targetSchema` link.
6335
6359
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datocms/cma-client",
3
- "version": "2.2.5",
3
+ "version": "3.0.0",
4
4
  "description": "JS client for DatoCMS REST Content Management API",
5
5
  "keywords": [
6
6
  "datocms",
@@ -37,10 +37,10 @@
37
37
  "url": "https://github.com/datocms/js-rest-api-clients/issues"
38
38
  },
39
39
  "dependencies": {
40
- "@datocms/rest-client-utils": "^1.3.3"
40
+ "@datocms/rest-client-utils": "^3.0.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@datocms/dashboard-client": "^2.2.5"
43
+ "@datocms/dashboard-client": "^3.0.0"
44
44
  },
45
- "gitHead": "6299a33e17cd1f5add24094fb1860d5296776929"
45
+ "gitHead": "5a6f58cc816ea526350913a5ad49bf9c5cb968ea"
46
46
  }
@@ -27,6 +27,8 @@ export type ClientConfigOptions = {
27
27
  logFn?: (message: string) => void;
28
28
  /** Whether to automatically retry failed requests (ie. timeout, rate-limiting, etc.), with a linear incremental backoff. Defaults to `true` */
29
29
  autoRetry?: boolean;
30
+ /** If fetch() is not available in your environment, you can provide it */
31
+ fetchFn?: Parameters<typeof request>[0]['fetchFn'];
30
32
  };
31
33
 
32
34
  export class Client {
@@ -133,7 +135,7 @@ export class Client {
133
135
  ...this.config,
134
136
  ...options,
135
137
  logFn: this.config.logFn || console.log,
136
- userAgent: '@datocms/cma-client v2.2.5',
138
+ userAgent: '@datocms/cma-client v3.0.0',
137
139
  baseUrl: this.baseUrl,
138
140
  preCallStack: new Error().stack,
139
141
  extraHeaders: {