@datocms/cma-client 5.1.3 → 5.1.4

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 (84) hide show
  1. package/dist/cjs/fieldTypes/lat_lon.js +6 -6
  2. package/dist/cjs/fieldTypes/lat_lon.js.map +1 -1
  3. package/dist/cjs/fieldTypes/rich_text.js.map +1 -1
  4. package/dist/cjs/fieldTypes/single_block.js.map +1 -1
  5. package/dist/cjs/fieldTypes/structured_text.js.map +1 -1
  6. package/dist/cjs/generated/Client.js +1 -1
  7. package/dist/cjs/generated/resources/Item.js +41 -23
  8. package/dist/cjs/generated/resources/Item.js.map +1 -1
  9. package/dist/cjs/generated/resources/ScheduledPublication.js +4 -2
  10. package/dist/cjs/generated/resources/ScheduledPublication.js.map +1 -1
  11. package/dist/cjs/generated/resources/ScheduledUnpublishing.js +4 -2
  12. package/dist/cjs/generated/resources/ScheduledUnpublishing.js.map +1 -1
  13. package/dist/cjs/generated/resources/Upload.js +4 -2
  14. package/dist/cjs/generated/resources/Upload.js.map +1 -1
  15. package/dist/cjs/index.js +1 -0
  16. package/dist/cjs/index.js.map +1 -1
  17. package/dist/cjs/utilities/buildBlockRecord.js.map +1 -1
  18. package/dist/cjs/utilities/itemDefinition.js +3 -0
  19. package/dist/cjs/utilities/itemDefinition.js.map +1 -0
  20. package/dist/esm/fieldTypes/lat_lon.d.ts +5 -5
  21. package/dist/esm/fieldTypes/lat_lon.js +3 -3
  22. package/dist/esm/fieldTypes/lat_lon.js.map +1 -1
  23. package/dist/esm/fieldTypes/rich_text.d.ts +8 -7
  24. package/dist/esm/fieldTypes/rich_text.js.map +1 -1
  25. package/dist/esm/fieldTypes/single_block.d.ts +15 -14
  26. package/dist/esm/fieldTypes/single_block.js.map +1 -1
  27. package/dist/esm/fieldTypes/structured_text.d.ts +13 -12
  28. package/dist/esm/fieldTypes/structured_text.js.map +1 -1
  29. package/dist/esm/generated/ApiTypes.d.ts +67 -62
  30. package/dist/esm/generated/Client.js +1 -1
  31. package/dist/esm/generated/RawApiTypes.d.ts +116 -121
  32. package/dist/esm/generated/resources/Field.d.ts +230 -230
  33. package/dist/esm/generated/resources/Item.d.ts +42 -24
  34. package/dist/esm/generated/resources/Item.js +41 -23
  35. package/dist/esm/generated/resources/Item.js.map +1 -1
  36. package/dist/esm/generated/resources/ItemVersion.d.ts +1 -1
  37. package/dist/esm/generated/resources/ScheduledPublication.d.ts +5 -2
  38. package/dist/esm/generated/resources/ScheduledPublication.js +4 -2
  39. package/dist/esm/generated/resources/ScheduledPublication.js.map +1 -1
  40. package/dist/esm/generated/resources/ScheduledUnpublishing.d.ts +5 -2
  41. package/dist/esm/generated/resources/ScheduledUnpublishing.js +4 -2
  42. package/dist/esm/generated/resources/ScheduledUnpublishing.js.map +1 -1
  43. package/dist/esm/generated/resources/Upload.d.ts +10 -2
  44. package/dist/esm/generated/resources/Upload.js +4 -2
  45. package/dist/esm/generated/resources/Upload.js.map +1 -1
  46. package/dist/esm/index.d.ts +1 -0
  47. package/dist/esm/index.js +1 -0
  48. package/dist/esm/index.js.map +1 -1
  49. package/dist/esm/utilities/buildBlockRecord.d.ts +5 -31
  50. package/dist/esm/utilities/buildBlockRecord.js.map +1 -1
  51. package/dist/esm/utilities/itemDefinition.d.ts +74 -0
  52. package/dist/esm/utilities/itemDefinition.js +2 -0
  53. package/dist/esm/utilities/itemDefinition.js.map +1 -0
  54. package/dist/types/fieldTypes/lat_lon.d.ts +5 -5
  55. package/dist/types/fieldTypes/rich_text.d.ts +8 -7
  56. package/dist/types/fieldTypes/single_block.d.ts +15 -14
  57. package/dist/types/fieldTypes/structured_text.d.ts +13 -12
  58. package/dist/types/generated/ApiTypes.d.ts +67 -62
  59. package/dist/types/generated/RawApiTypes.d.ts +116 -121
  60. package/dist/types/generated/resources/Field.d.ts +230 -230
  61. package/dist/types/generated/resources/Item.d.ts +42 -24
  62. package/dist/types/generated/resources/ItemVersion.d.ts +1 -1
  63. package/dist/types/generated/resources/ScheduledPublication.d.ts +5 -2
  64. package/dist/types/generated/resources/ScheduledUnpublishing.d.ts +5 -2
  65. package/dist/types/generated/resources/Upload.d.ts +10 -2
  66. package/dist/types/index.d.ts +1 -0
  67. package/dist/types/utilities/buildBlockRecord.d.ts +5 -31
  68. package/dist/types/utilities/itemDefinition.d.ts +74 -0
  69. package/package.json +5 -5
  70. package/resources.json +564 -0
  71. package/src/fieldTypes/lat_lon.ts +7 -9
  72. package/src/fieldTypes/rich_text.ts +22 -13
  73. package/src/fieldTypes/single_block.ts +42 -32
  74. package/src/fieldTypes/structured_text.ts +60 -23
  75. package/src/generated/ApiTypes.ts +110 -70
  76. package/src/generated/Client.ts +1 -1
  77. package/src/generated/RawApiTypes.ts +160 -138
  78. package/src/generated/resources/Item.ts +360 -108
  79. package/src/generated/resources/ScheduledPublication.ts +31 -11
  80. package/src/generated/resources/ScheduledUnpublishing.ts +31 -11
  81. package/src/generated/resources/Upload.ts +54 -12
  82. package/src/index.ts +1 -0
  83. package/src/utilities/buildBlockRecord.ts +19 -3
  84. package/src/utilities/itemDefinition.ts +229 -0
@@ -24,13 +24,13 @@ import type {
24
24
  JsonFieldAppearance,
25
25
  JsonFieldValidators,
26
26
  JsonFieldValue,
27
+ LatLonFieldAppearance,
28
+ LatLonFieldValidators,
29
+ LatLonFieldValue,
27
30
  LinkFieldAppearance,
28
31
  LinkFieldValidators,
29
32
  LinksFieldAppearance,
30
33
  LinksFieldValidators,
31
- LocationFieldAppearance,
32
- LocationFieldValidators,
33
- LocationFieldValue,
34
34
  RichTextFieldAppearance,
35
35
  RichTextFieldValidators,
36
36
  SeoFieldAppearance,
@@ -51,6 +51,8 @@ import type {
51
51
  VideoFieldValidators,
52
52
  } from '../fieldTypes';
53
53
 
54
+ import type { ItemDefinition } from '../utilities/itemDefinition';
55
+
54
56
  /**
55
57
  * Enhanced appearance configuration with field-specific types and addon support
56
58
  */
@@ -191,9 +193,9 @@ type GenericFieldAttributes<SourceType> =
191
193
  | FieldAttributesForFieldType<
192
194
  SourceType,
193
195
  'lat_lon',
194
- LocationFieldValue,
195
- LocationFieldValidators,
196
- LocationFieldAppearance
196
+ LatLonFieldValue,
197
+ LatLonFieldValidators,
198
+ LatLonFieldAppearance
197
199
  >
198
200
  | FieldAttributesForFieldType<
199
201
  SourceType,
@@ -403,9 +405,9 @@ type FieldCreateConfig<SourceType> =
403
405
  | FieldCreateConfigForFieldType<
404
406
  SourceType,
405
407
  'lat_lon',
406
- LocationFieldValue,
407
- LocationFieldValidators,
408
- LocationFieldAppearance
408
+ LatLonFieldValue,
409
+ LatLonFieldValidators,
410
+ LatLonFieldAppearance
409
411
  >
410
412
  | FieldCreateConfigForFieldType<
411
413
  SourceType,
@@ -578,9 +580,9 @@ type FieldUpdateConfig<SourceType> =
578
580
  | FieldUpdateConfigForFieldType<
579
581
  SourceType,
580
582
  'lat_lon',
581
- LocationFieldValue,
582
- LocationFieldValidators,
583
- LocationFieldAppearance
583
+ LatLonFieldValue,
584
+ LatLonFieldValidators,
585
+ LatLonFieldAppearance
584
586
  >
585
587
  | FieldUpdateConfigForFieldType<
586
588
  SourceType,
@@ -663,6 +665,29 @@ type FieldUpdateConfig<SourceType> =
663
665
 
664
666
  export type FieldUpdateSchema = FieldUpdateConfig<RawFieldUpdateSchema>;
665
667
 
668
+ export type ApplyItemDefinitionToSchema<
669
+ Schema,
670
+ D extends ItemDefinition = ItemDefinition,
671
+ > = D extends any
672
+ ? Schema &
673
+ D['fields'] & {
674
+ /** Useful for type narrowing */
675
+ __itemTypeId?: D['itemTypeId'];
676
+ }
677
+ : never;
678
+
679
+ export type Item<D extends ItemDefinition = ItemDefinition> =
680
+ ApplyItemDefinitionToSchema<RawItem, D>;
681
+ export type ItemValidateExistingSchema<
682
+ D extends ItemDefinition = ItemDefinition,
683
+ > = ApplyItemDefinitionToSchema<RawItemValidateExistingSchema, D>;
684
+ export type ItemValidateNewSchema<D extends ItemDefinition = ItemDefinition> =
685
+ ApplyItemDefinitionToSchema<RawItemValidateNewSchema, D>;
686
+ export type ItemCreateSchema<D extends ItemDefinition = ItemDefinition> =
687
+ ApplyItemDefinitionToSchema<RawItemCreateSchema, D>;
688
+ export type ItemUpdateSchema<D extends ItemDefinition = ItemDefinition> =
689
+ ApplyItemDefinitionToSchema<RawItemUpdateSchema, D>;
690
+
666
691
  /* tslint:disable */
667
692
  /**
668
693
  * This file was automatically generated by hyperschema-to-ts: DO NOT MODIFY IT BY HAND.
@@ -1135,17 +1160,17 @@ export type UploadCollectionReorderSchema = {
1135
1160
  */
1136
1161
  export type UploadCollectionReorderJobSchema = UploadCollection[];
1137
1162
  /**
1138
- * This interface was referenced by `Item`'s JSON-Schema
1163
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1139
1164
  * via the `definition` "type".
1140
1165
  */
1141
1166
  export type ItemType1 = 'item';
1142
1167
  /**
1143
1168
  * RFC 4122 UUID of record expressed in URL-safe base64 format
1144
1169
  *
1145
- * This interface was referenced by `Item`'s JSON-Schema
1170
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1146
1171
  * via the `definition` "identity".
1147
1172
  *
1148
- * This interface was referenced by `Item`'s JSON-Schema
1173
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1149
1174
  * via the `definition` "id".
1150
1175
  */
1151
1176
  export type ItemIdentity = string;
@@ -1451,12 +1476,14 @@ export type BuildEventInstancesHrefSchema = {
1451
1476
  [k: string]: unknown;
1452
1477
  };
1453
1478
  /**
1454
- * This interface was referenced by `Item`'s JSON-Schema
1479
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1455
1480
  * via the `instances.targetSchema` link.
1456
1481
  */
1457
- export type ItemInstancesTargetSchema = Item[];
1482
+ export type ItemInstancesTargetSchema<
1483
+ D extends ItemDefinition = ItemDefinition,
1484
+ > = Item<D>[];
1458
1485
  /**
1459
- * This interface was referenced by `Item`'s JSON-Schema
1486
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1460
1487
  * via the `instances.hrefSchema` link.
1461
1488
  */
1462
1489
  export type ItemInstancesHrefSchema = {
@@ -1520,12 +1547,14 @@ export type ItemInstancesHrefSchema = {
1520
1547
  [k: string]: unknown;
1521
1548
  };
1522
1549
  /**
1523
- * This interface was referenced by `Item`'s JSON-Schema
1550
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1524
1551
  * via the `references.targetSchema` link.
1525
1552
  */
1526
- export type ItemReferencesTargetSchema = Item[];
1553
+ export type ItemReferencesTargetSchema<
1554
+ D extends ItemDefinition = ItemDefinition,
1555
+ > = Item<D>[];
1527
1556
  /**
1528
- * This interface was referenced by `Item`'s JSON-Schema
1557
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1529
1558
  * via the `references.hrefSchema` link.
1530
1559
  */
1531
1560
  export type ItemReferencesHrefSchema = {
@@ -1540,7 +1569,7 @@ export type ItemReferencesHrefSchema = {
1540
1569
  [k: string]: unknown;
1541
1570
  };
1542
1571
  /**
1543
- * This interface was referenced by `Item`'s JSON-Schema
1572
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1544
1573
  * via the `self.hrefSchema` link.
1545
1574
  */
1546
1575
  export type ItemSelfHrefSchema = {
@@ -1615,7 +1644,7 @@ export type ItemVersionType = 'item_version';
1615
1644
  */
1616
1645
  export type ItemVersionIdentity = string;
1617
1646
  /**
1618
- * This interface was referenced by `Item`'s JSON-Schema
1647
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1619
1648
  * via the `publish.schema` link.
1620
1649
  */
1621
1650
  export type ItemPublishSchema = {
@@ -1633,7 +1662,7 @@ export type ItemPublishSchema = {
1633
1662
  non_localized_content: boolean;
1634
1663
  } | null;
1635
1664
  /**
1636
- * This interface was referenced by `Item`'s JSON-Schema
1665
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1637
1666
  * via the `publish.hrefSchema` link.
1638
1667
  */
1639
1668
  export type ItemPublishHrefSchema = {
@@ -1644,7 +1673,7 @@ export type ItemPublishHrefSchema = {
1644
1673
  [k: string]: unknown;
1645
1674
  };
1646
1675
  /**
1647
- * This interface was referenced by `Item`'s JSON-Schema
1676
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1648
1677
  * via the `unpublish.schema` link.
1649
1678
  */
1650
1679
  export type ItemUnpublishSchema = {
@@ -1655,7 +1684,7 @@ export type ItemUnpublishSchema = {
1655
1684
  content_in_locales: string[];
1656
1685
  } | null;
1657
1686
  /**
1658
- * This interface was referenced by `Item`'s JSON-Schema
1687
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1659
1688
  * via the `unpublish.hrefSchema` link.
1660
1689
  */
1661
1690
  export type ItemUnpublishHrefSchema = {
@@ -1666,22 +1695,22 @@ export type ItemUnpublishHrefSchema = {
1666
1695
  [k: string]: unknown;
1667
1696
  };
1668
1697
  /**
1669
- * This interface was referenced by `Item`'s JSON-Schema
1698
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1670
1699
  * via the `bulk_publish.jobSchema` link.
1671
1700
  */
1672
1701
  export type ItemBulkPublishJobSchema = unknown[];
1673
1702
  /**
1674
- * This interface was referenced by `Item`'s JSON-Schema
1703
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1675
1704
  * via the `bulk_unpublish.jobSchema` link.
1676
1705
  */
1677
1706
  export type ItemBulkUnpublishJobSchema = unknown[];
1678
1707
  /**
1679
- * This interface was referenced by `Item`'s JSON-Schema
1708
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1680
1709
  * via the `bulk_destroy.jobSchema` link.
1681
1710
  */
1682
1711
  export type ItemBulkDestroyJobSchema = unknown[];
1683
1712
  /**
1684
- * This interface was referenced by `Item`'s JSON-Schema
1713
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1685
1714
  * via the `bulk_move_to_stage.jobSchema` link.
1686
1715
  */
1687
1716
  export type ItemBulkMoveToStageJobSchema = unknown[];
@@ -1689,7 +1718,9 @@ export type ItemBulkMoveToStageJobSchema = unknown[];
1689
1718
  * This interface was referenced by `ItemVersion`'s JSON-Schema
1690
1719
  * via the `restore.jobSchema` link.
1691
1720
  */
1692
- export type ItemVersionRestoreJobSchema = [Item, ItemVersion];
1721
+ export type ItemVersionRestoreJobSchema<
1722
+ D extends ItemDefinition = ItemDefinition,
1723
+ > = [Item<D>, ItemVersion];
1693
1724
  /**
1694
1725
  * This interface was referenced by `ItemVersion`'s JSON-Schema
1695
1726
  * via the `instances.targetSchema` link.
@@ -1791,7 +1822,9 @@ export type UploadInstancesHrefSchema = {
1791
1822
  * This interface was referenced by `Upload`'s JSON-Schema
1792
1823
  * via the `references.targetSchema` link.
1793
1824
  */
1794
- export type UploadReferencesTargetSchema = Item[];
1825
+ export type UploadReferencesTargetSchema<
1826
+ D extends ItemDefinition = ItemDefinition,
1827
+ > = Item<D>[];
1795
1828
  /**
1796
1829
  * This interface was referenced by `Upload`'s JSON-Schema
1797
1830
  * via the `references.hrefSchema` link.
@@ -5107,22 +5140,22 @@ export type MenuItemUpdateSchema = {
5107
5140
  * This interface was referenced by `Field`'s JSON-Schema
5108
5141
  * via the `duplicate.targetSchema` link.
5109
5142
  *
5110
- * This interface was referenced by `Item`'s JSON-Schema
5143
+ * This interface was referenced by `Item<D>`'s JSON-Schema
5111
5144
  * via the `duplicate.targetSchema` link.
5112
5145
  *
5113
- * This interface was referenced by `Item`'s JSON-Schema
5146
+ * This interface was referenced by `Item<D>`'s JSON-Schema
5114
5147
  * via the `destroy.targetSchema` link.
5115
5148
  *
5116
- * This interface was referenced by `Item`'s JSON-Schema
5149
+ * This interface was referenced by `Item<D>`'s JSON-Schema
5117
5150
  * via the `bulk_publish.targetSchema` link.
5118
5151
  *
5119
- * This interface was referenced by `Item`'s JSON-Schema
5152
+ * This interface was referenced by `Item<D>`'s JSON-Schema
5120
5153
  * via the `bulk_unpublish.targetSchema` link.
5121
5154
  *
5122
- * This interface was referenced by `Item`'s JSON-Schema
5155
+ * This interface was referenced by `Item<D>`'s JSON-Schema
5123
5156
  * via the `bulk_destroy.targetSchema` link.
5124
5157
  *
5125
- * This interface was referenced by `Item`'s JSON-Schema
5158
+ * This interface was referenced by `Item<D>`'s JSON-Schema
5126
5159
  * via the `bulk_move_to_stage.targetSchema` link.
5127
5160
  *
5128
5161
  * This interface was referenced by `ItemVersion`'s JSON-Schema
@@ -5521,7 +5554,7 @@ export type ItemTypeDestroyJobSchema = ItemType;
5521
5554
  /**
5522
5555
  * JSON API data
5523
5556
  *
5524
- * This interface was referenced by `Item`'s JSON-Schema
5557
+ * This interface was referenced by `Item<D>`'s JSON-Schema
5525
5558
  * via the `definition` "data".
5526
5559
  */
5527
5560
  export type ItemData = {
@@ -8052,7 +8085,7 @@ export type BuildEventRelationships = {
8052
8085
  * This interface was referenced by `DatoApi`'s JSON-Schema
8053
8086
  * via the `definition` "item".
8054
8087
  */
8055
- export type Item = {
8088
+ export type RawItem = {
8056
8089
  id: ItemIdentity;
8057
8090
  type: ItemType1;
8058
8091
  item_type: ItemTypeData;
@@ -8063,21 +8096,32 @@ export type Item = {
8063
8096
  | SsoUserData
8064
8097
  | OrganizationData;
8065
8098
  meta: ItemMeta;
8066
- [k: string]: unknown;
8067
8099
  };
8068
- export type ItemCreateTargetSchema = Item;
8069
- export type ItemDuplicateJobSchema = Item;
8070
- export type ItemUpdateTargetSchema = Item;
8071
- export type ItemSelfTargetSchema = Item;
8072
- export type ItemDestroyJobSchema = Item;
8073
- export type ItemPublishTargetSchema = Item;
8074
- export type ItemUnpublishTargetSchema = Item;
8075
- export type ScheduledPublicationDestroyTargetSchema = Item;
8076
- export type ScheduledUnpublishingDestroyTargetSchema = Item;
8100
+ export type ItemCreateTargetSchema<D extends ItemDefinition = ItemDefinition> =
8101
+ Item<D>;
8102
+ export type ItemDuplicateJobSchema<D extends ItemDefinition = ItemDefinition> =
8103
+ Item<D>;
8104
+ export type ItemUpdateTargetSchema<D extends ItemDefinition = ItemDefinition> =
8105
+ Item<D>;
8106
+ export type ItemSelfTargetSchema<D extends ItemDefinition = ItemDefinition> =
8107
+ Item<D>;
8108
+ export type ItemDestroyJobSchema<D extends ItemDefinition = ItemDefinition> =
8109
+ Item<D>;
8110
+ export type ItemPublishTargetSchema<D extends ItemDefinition = ItemDefinition> =
8111
+ Item<D>;
8112
+ export type ItemUnpublishTargetSchema<
8113
+ D extends ItemDefinition = ItemDefinition,
8114
+ > = Item<D>;
8115
+ export type ScheduledPublicationDestroyTargetSchema<
8116
+ D extends ItemDefinition = ItemDefinition,
8117
+ > = Item<D>;
8118
+ export type ScheduledUnpublishingDestroyTargetSchema<
8119
+ D extends ItemDefinition = ItemDefinition,
8120
+ > = Item<D>;
8077
8121
  /**
8078
8122
  * Meta information regarding the record
8079
8123
  *
8080
- * This interface was referenced by `Item`'s JSON-Schema
8124
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8081
8125
  * via the `definition` "meta".
8082
8126
  */
8083
8127
  export type ItemMeta = {
@@ -8138,7 +8182,7 @@ export type ItemMeta = {
8138
8182
  /**
8139
8183
  * The JSON data associated to the record
8140
8184
  *
8141
- * This interface was referenced by `Item`'s JSON-Schema
8185
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8142
8186
  * via the `definition` "attributes".
8143
8187
  */
8144
8188
  export type ItemAttributes = {
@@ -8148,7 +8192,7 @@ export type ItemAttributes = {
8148
8192
  /**
8149
8193
  * JSON API links
8150
8194
  *
8151
- * This interface was referenced by `Item`'s JSON-Schema
8195
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8152
8196
  * via the `definition` "relationships".
8153
8197
  */
8154
8198
  export type ItemRelationships = {
@@ -8162,10 +8206,10 @@ export type ItemRelationships = {
8162
8206
  };
8163
8207
 
8164
8208
  /**
8165
- * This interface was referenced by `Item`'s JSON-Schema
8209
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8166
8210
  * via the `validate_existing.schema` link.
8167
8211
  */
8168
- export type ItemValidateExistingSchema = {
8212
+ export type RawItemValidateExistingSchema = {
8169
8213
  id?: ItemIdentity;
8170
8214
  type?: ItemType1;
8171
8215
  item_type: ItemTypeData;
@@ -8175,14 +8219,13 @@ export type ItemValidateExistingSchema = {
8175
8219
  | UserData
8176
8220
  | SsoUserData
8177
8221
  | OrganizationData;
8178
- [k: string]: unknown;
8179
8222
  };
8180
8223
 
8181
8224
  /**
8182
- * This interface was referenced by `Item`'s JSON-Schema
8225
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8183
8226
  * via the `validate_new.schema` link.
8184
8227
  */
8185
- export type ItemValidateNewSchema = {
8228
+ export type RawItemValidateNewSchema = {
8186
8229
  type?: ItemType1;
8187
8230
  item_type: ItemTypeData;
8188
8231
  creator?:
@@ -8191,14 +8234,13 @@ export type ItemValidateNewSchema = {
8191
8234
  | UserData
8192
8235
  | SsoUserData
8193
8236
  | OrganizationData;
8194
- [k: string]: unknown;
8195
8237
  };
8196
8238
 
8197
8239
  /**
8198
- * This interface was referenced by `Item`'s JSON-Schema
8240
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8199
8241
  * via the `create.schema` link.
8200
8242
  */
8201
- export type ItemCreateSchema = {
8243
+ export type RawItemCreateSchema = {
8202
8244
  id?: ItemIdentity;
8203
8245
  type?: ItemType1;
8204
8246
  item_type: ItemTypeData;
@@ -8253,14 +8295,13 @@ export type ItemCreateSchema = {
8253
8295
  */
8254
8296
  current_version?: string;
8255
8297
  };
8256
- [k: string]: unknown;
8257
8298
  };
8258
8299
 
8259
8300
  /**
8260
- * This interface was referenced by `Item`'s JSON-Schema
8301
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8261
8302
  * via the `update.schema` link.
8262
8303
  */
8263
- export type ItemUpdateSchema = {
8304
+ export type RawItemUpdateSchema = {
8264
8305
  id?: ItemIdentity;
8265
8306
  type?: ItemType1;
8266
8307
  item_type?: ItemTypeData;
@@ -8327,13 +8368,12 @@ export type ItemUpdateSchema = {
8327
8368
  */
8328
8369
  has_children?: null | boolean;
8329
8370
  };
8330
- [k: string]: unknown;
8331
8371
  };
8332
8372
 
8333
8373
  /**
8334
8374
  * Information about the record
8335
8375
  *
8336
- * This interface was referenced by `Item`'s JSON-Schema
8376
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8337
8377
  * via the `current_vs_published_state.targetSchema` link.
8338
8378
  *
8339
8379
  * This interface was referenced by `DatoApi`'s JSON-Schema
@@ -8430,7 +8470,7 @@ export type ItemCurrentVsPublishedStateRelationships = {
8430
8470
  };
8431
8471
 
8432
8472
  /**
8433
- * This interface was referenced by `Item`'s JSON-Schema
8473
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8434
8474
  * via the `bulk_publish.schema` link.
8435
8475
  */
8436
8476
  export type ItemBulkPublishSchema = {
@@ -8440,7 +8480,7 @@ export type ItemBulkPublishSchema = {
8440
8480
  };
8441
8481
 
8442
8482
  /**
8443
- * This interface was referenced by `Item`'s JSON-Schema
8483
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8444
8484
  * via the `bulk_unpublish.schema` link.
8445
8485
  */
8446
8486
  export type ItemBulkUnpublishSchema = {
@@ -8450,7 +8490,7 @@ export type ItemBulkUnpublishSchema = {
8450
8490
  };
8451
8491
 
8452
8492
  /**
8453
- * This interface was referenced by `Item`'s JSON-Schema
8493
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8454
8494
  * via the `bulk_destroy.schema` link.
8455
8495
  */
8456
8496
  export type ItemBulkDestroySchema = {
@@ -8460,7 +8500,7 @@ export type ItemBulkDestroySchema = {
8460
8500
  };
8461
8501
 
8462
8502
  /**
8463
- * This interface was referenced by `Item`'s JSON-Schema
8503
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8464
8504
  * via the `bulk_move_to_stage.schema` link.
8465
8505
  */
8466
8506
  export type ItemBulkMoveToStageSchema = {
@@ -147,7 +147,7 @@ export class Client {
147
147
  ...this.config,
148
148
  ...options,
149
149
  logFn: this.config.logFn || console.log,
150
- userAgent: '@datocms/cma-client v5.1.3',
150
+ userAgent: '@datocms/cma-client v5.1.4',
151
151
  baseUrl: this.baseUrl,
152
152
  preCallStack: new Error().stack,
153
153
  extraHeaders: {