@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,
@@ -582,9 +584,9 @@ type FieldUpdateConfig<SourceType> =
582
584
  | FieldUpdateConfigForFieldType<
583
585
  SourceType,
584
586
  'lat_lon',
585
- LocationFieldValue,
586
- LocationFieldValidators,
587
- LocationFieldAppearance
587
+ LatLonFieldValue,
588
+ LatLonFieldValidators,
589
+ LatLonFieldAppearance
588
590
  >
589
591
  | FieldUpdateConfigForFieldType<
590
592
  SourceType,
@@ -671,6 +673,33 @@ export type FieldUpdateSchema = Omit<RawFieldUpdateSchema, 'data'> & {
671
673
  };
672
674
  };
673
675
 
676
+ export type ApplyItemDefinitionToSchema<
677
+ Schema,
678
+ D extends ItemDefinition = ItemDefinition,
679
+ > = D extends any
680
+ ? Schema & { attributes: D['fields'] } & {
681
+ /** Useful for type narrowing */
682
+ __itemTypeId?: D['itemTypeId'];
683
+ }
684
+ : never;
685
+
686
+ export type Item<D extends ItemDefinition = ItemDefinition> =
687
+ ApplyItemDefinitionToSchema<RawItem, D>;
688
+ export type ItemValidateExistingSchema<
689
+ D extends ItemDefinition = ItemDefinition,
690
+ > = {
691
+ data: ApplyItemDefinitionToSchema<RawItemValidateExistingSchema['data'], D>;
692
+ };
693
+ export type ItemValidateNewSchema<D extends ItemDefinition = ItemDefinition> = {
694
+ data: ApplyItemDefinitionToSchema<RawItemValidateNewSchema['data'], D>;
695
+ };
696
+ export type ItemCreateSchema<D extends ItemDefinition = ItemDefinition> = {
697
+ data: ApplyItemDefinitionToSchema<RawItemCreateSchema['data'], D>;
698
+ };
699
+ export type ItemUpdateSchema<D extends ItemDefinition = ItemDefinition> = {
700
+ data: ApplyItemDefinitionToSchema<RawItemUpdateSchema['data'], D>;
701
+ };
702
+
674
703
  /* tslint:disable */
675
704
  /**
676
705
  * This file was automatically generated by hyperschema-to-ts: DO NOT MODIFY IT BY HAND.
@@ -1039,17 +1068,17 @@ export type UploadCollectionInstancesHrefSchema = {
1039
1068
  };
1040
1069
  };
1041
1070
  /**
1042
- * This interface was referenced by `Item`'s JSON-Schema
1071
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1043
1072
  * via the `definition` "type".
1044
1073
  */
1045
1074
  export type ItemType1 = 'item';
1046
1075
  /**
1047
1076
  * RFC 4122 UUID of record expressed in URL-safe base64 format
1048
1077
  *
1049
- * This interface was referenced by `Item`'s JSON-Schema
1078
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1050
1079
  * via the `definition` "identity".
1051
1080
  *
1052
- * This interface was referenced by `Item`'s JSON-Schema
1081
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1053
1082
  * via the `definition` "id".
1054
1083
  */
1055
1084
  export type ItemIdentity = string;
@@ -1277,7 +1306,7 @@ export type BuildEventInstancesHrefSchema = {
1277
1306
  [k: string]: unknown;
1278
1307
  };
1279
1308
  /**
1280
- * This interface was referenced by `Item`'s JSON-Schema
1309
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1281
1310
  * via the `instances.hrefSchema` link.
1282
1311
  */
1283
1312
  export type ItemInstancesHrefSchema = {
@@ -1341,7 +1370,7 @@ export type ItemInstancesHrefSchema = {
1341
1370
  [k: string]: unknown;
1342
1371
  };
1343
1372
  /**
1344
- * This interface was referenced by `Item`'s JSON-Schema
1373
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1345
1374
  * via the `references.hrefSchema` link.
1346
1375
  */
1347
1376
  export type ItemReferencesHrefSchema = {
@@ -1356,7 +1385,7 @@ export type ItemReferencesHrefSchema = {
1356
1385
  [k: string]: unknown;
1357
1386
  };
1358
1387
  /**
1359
- * This interface was referenced by `Item`'s JSON-Schema
1388
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1360
1389
  * via the `self.hrefSchema` link.
1361
1390
  */
1362
1391
  export type ItemSelfHrefSchema = {
@@ -1455,7 +1484,7 @@ export type ItemVersionInstancesHrefSchema = {
1455
1484
  [k: string]: unknown;
1456
1485
  };
1457
1486
  /**
1458
- * This interface was referenced by `Item`'s JSON-Schema
1487
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1459
1488
  * via the `publish.schema` link.
1460
1489
  */
1461
1490
  export type ItemPublishSchema = {
@@ -1477,7 +1506,7 @@ export type ItemPublishSchema = {
1477
1506
  };
1478
1507
  } | null;
1479
1508
  /**
1480
- * This interface was referenced by `Item`'s JSON-Schema
1509
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1481
1510
  * via the `publish.hrefSchema` link.
1482
1511
  */
1483
1512
  export type ItemPublishHrefSchema = {
@@ -1488,7 +1517,7 @@ export type ItemPublishHrefSchema = {
1488
1517
  [k: string]: unknown;
1489
1518
  };
1490
1519
  /**
1491
- * This interface was referenced by `Item`'s JSON-Schema
1520
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1492
1521
  * via the `unpublish.schema` link.
1493
1522
  */
1494
1523
  export type ItemUnpublishSchema = {
@@ -1503,7 +1532,7 @@ export type ItemUnpublishSchema = {
1503
1532
  };
1504
1533
  } | null;
1505
1534
  /**
1506
- * This interface was referenced by `Item`'s JSON-Schema
1535
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1507
1536
  * via the `unpublish.hrefSchema` link.
1508
1537
  */
1509
1538
  export type ItemUnpublishHrefSchema = {
@@ -4280,13 +4309,13 @@ export type MenuItemAttributes = {
4280
4309
  */
4281
4310
  export type MenuItemRelationships = {
4282
4311
  /**
4283
- * Item type associated with the menu item
4312
+ * Item<D> type associated with the menu item
4284
4313
  */
4285
4314
  item_type: {
4286
4315
  data: ItemTypeData | null;
4287
4316
  };
4288
4317
  /**
4289
- * Item type filter associated with the menu item (to be used together with `item_type` relationship)
4318
+ * Item<D> type filter associated with the menu item (to be used together with `item_type` relationship)
4290
4319
  */
4291
4320
  item_type_filter: {
4292
4321
  data: ItemTypeFilterData | null;
@@ -4369,13 +4398,13 @@ export type MenuItemCreateSchema = {
4369
4398
  };
4370
4399
  relationships?: {
4371
4400
  /**
4372
- * Item type associated with the menu item
4401
+ * Item<D> type associated with the menu item
4373
4402
  */
4374
4403
  item_type?: {
4375
4404
  data: ItemTypeData | null;
4376
4405
  };
4377
4406
  /**
4378
- * Item type filter associated with the menu item (to be used together with `item_type` relationship)
4407
+ * Item<D> type filter associated with the menu item (to be used together with `item_type` relationship)
4379
4408
  */
4380
4409
  item_type_filter?: {
4381
4410
  data: ItemTypeFilterData | null;
@@ -4429,13 +4458,13 @@ export type MenuItemUpdateSchema = {
4429
4458
  };
4430
4459
  relationships?: {
4431
4460
  /**
4432
- * Item type associated with the menu item
4461
+ * Item<D> type associated with the menu item
4433
4462
  */
4434
4463
  item_type?: {
4435
4464
  data: ItemTypeData | null;
4436
4465
  };
4437
4466
  /**
4438
- * Item type filter associated with the menu item (to be used together with `item_type` relationship)
4467
+ * Item<D> type filter associated with the menu item (to be used together with `item_type` relationship)
4439
4468
  */
4440
4469
  item_type_filter?: {
4441
4470
  data: ItemTypeFilterData | null;
@@ -4588,7 +4617,7 @@ export type SchemaMenuItemAttributes = {
4588
4617
  */
4589
4618
  export type SchemaMenuItemRelationships = {
4590
4619
  /**
4591
- * Item type associated with the schema menu item
4620
+ * Item<D> type associated with the schema menu item
4592
4621
  */
4593
4622
  item_type: {
4594
4623
  data: ItemTypeData | null;
@@ -4645,7 +4674,7 @@ export type SchemaMenuItemCreateSchema = {
4645
4674
  };
4646
4675
  relationships?: {
4647
4676
  /**
4648
- * Item type associated with the menu item
4677
+ * Item<D> type associated with the menu item
4649
4678
  */
4650
4679
  item_type?: {
4651
4680
  data: ItemTypeData | null;
@@ -4695,7 +4724,7 @@ export type SchemaMenuItemUpdateSchema = {
4695
4724
  };
4696
4725
  relationships?: {
4697
4726
  /**
4698
- * Item type associated with the menu item
4727
+ * Item<D> type associated with the menu item
4699
4728
  */
4700
4729
  item_type?: {
4701
4730
  data: ItemTypeData | null;
@@ -5172,7 +5201,7 @@ export type ItemTypeRelationships = {
5172
5201
  /**
5173
5202
  * JSON API data
5174
5203
  *
5175
- * This interface was referenced by `Item`'s JSON-Schema
5204
+ * This interface was referenced by `Item<D>`'s JSON-Schema
5176
5205
  * via the `definition` "data".
5177
5206
  */
5178
5207
  export type ItemData = {
@@ -7879,28 +7908,17 @@ export type BuildEventSelfTargetSchema = {
7879
7908
  * This interface was referenced by `DatoApi`'s JSON-Schema
7880
7909
  * via the `definition` "item".
7881
7910
  */
7882
- export type Item = {
7911
+ export type RawItem = {
7883
7912
  type: ItemType1;
7884
7913
  id: ItemIdentity;
7885
- attributes: ItemAttributes;
7886
7914
  relationships: ItemRelationships;
7887
7915
  meta: ItemMeta;
7888
7916
  };
7889
7917
 
7890
- /**
7891
- * The JSON data associated to the record
7892
- *
7893
- * This interface was referenced by `Item`'s JSON-Schema
7894
- * via the `definition` "attributes".
7895
- */
7896
- export type ItemAttributes = {
7897
- [k: string]: unknown;
7898
- };
7899
-
7900
7918
  /**
7901
7919
  * JSON API links
7902
7920
  *
7903
- * This interface was referenced by `Item`'s JSON-Schema
7921
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7904
7922
  * via the `definition` "relationships".
7905
7923
  */
7906
7924
  export type ItemRelationships = {
@@ -7926,7 +7944,7 @@ export type ItemRelationships = {
7926
7944
  /**
7927
7945
  * Meta information regarding the record
7928
7946
  *
7929
- * This interface was referenced by `Item`'s JSON-Schema
7947
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7930
7948
  * via the `definition` "meta".
7931
7949
  */
7932
7950
  export type ItemMeta = {
@@ -7985,30 +8003,36 @@ export type ItemMeta = {
7985
8003
  };
7986
8004
 
7987
8005
  /**
7988
- * This interface was referenced by `Item`'s JSON-Schema
8006
+ * The JSON data associated to the record
8007
+ *
8008
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8009
+ * via the `definition` "attributes".
8010
+ */
8011
+ export type ItemAttributes = {
8012
+ [k: string]: unknown;
8013
+ };
8014
+
8015
+ /**
8016
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7989
8017
  * via the `instances.targetSchema` link.
7990
8018
  */
7991
- export type ItemInstancesTargetSchema = {
7992
- data: Item[];
8019
+ export type ItemInstancesTargetSchema<
8020
+ D extends ItemDefinition = ItemDefinition,
8021
+ > = {
8022
+ data: Item<D>[];
7993
8023
  meta: {
7994
8024
  total_count: number;
7995
8025
  };
7996
8026
  };
7997
8027
 
7998
8028
  /**
7999
- * This interface was referenced by `Item`'s JSON-Schema
8029
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8000
8030
  * via the `validate_existing.schema` link.
8001
8031
  */
8002
- export type ItemValidateExistingSchema = {
8032
+ export type RawItemValidateExistingSchema = {
8003
8033
  data: {
8004
8034
  id: ItemIdentity;
8005
8035
  type: ItemType1;
8006
- /**
8007
- * The JSON data associated to the record
8008
- */
8009
- attributes: {
8010
- [k: string]: unknown;
8011
- };
8012
8036
  relationships: {
8013
8037
  /**
8014
8038
  * The record's model
@@ -8032,18 +8056,12 @@ export type ItemValidateExistingSchema = {
8032
8056
  };
8033
8057
 
8034
8058
  /**
8035
- * This interface was referenced by `Item`'s JSON-Schema
8059
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8036
8060
  * via the `validate_new.schema` link.
8037
8061
  */
8038
- export type ItemValidateNewSchema = {
8062
+ export type RawItemValidateNewSchema = {
8039
8063
  data: {
8040
8064
  type: ItemType1;
8041
- /**
8042
- * The JSON data associated to the record
8043
- */
8044
- attributes: {
8045
- [k: string]: unknown;
8046
- };
8047
8065
  relationships: {
8048
8066
  /**
8049
8067
  * The record's model
@@ -8067,19 +8085,13 @@ export type ItemValidateNewSchema = {
8067
8085
  };
8068
8086
 
8069
8087
  /**
8070
- * This interface was referenced by `Item`'s JSON-Schema
8088
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8071
8089
  * via the `create.schema` link.
8072
8090
  */
8073
- export type ItemCreateSchema = {
8091
+ export type RawItemCreateSchema = {
8074
8092
  data: {
8075
8093
  id?: ItemIdentity;
8076
8094
  type: ItemType1;
8077
- /**
8078
- * The JSON data associated to the record
8079
- */
8080
- attributes: {
8081
- [k: string]: unknown;
8082
- };
8083
8095
  /**
8084
8096
  * Meta information regarding the record
8085
8097
  */
@@ -8148,16 +8160,17 @@ export type ItemCreateSchema = {
8148
8160
  };
8149
8161
 
8150
8162
  /**
8151
- * This interface was referenced by `Item`'s JSON-Schema
8163
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8152
8164
  * via the `create.targetSchema` link.
8153
8165
  */
8154
- export type ItemCreateTargetSchema = {
8155
- data: Item;
8156
- included: (ItemType | Item)[];
8157
- };
8166
+ export type ItemCreateTargetSchema<D extends ItemDefinition = ItemDefinition> =
8167
+ {
8168
+ data: Item<D>;
8169
+ included: (ItemType | Item)[];
8170
+ };
8158
8171
 
8159
8172
  /**
8160
- * This interface was referenced by `Item`'s JSON-Schema
8173
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8161
8174
  * via the `duplicate.targetSchema` link.
8162
8175
  */
8163
8176
  export type ItemDuplicateTargetSchema = {
@@ -8165,28 +8178,23 @@ export type ItemDuplicateTargetSchema = {
8165
8178
  };
8166
8179
 
8167
8180
  /**
8168
- * This interface was referenced by `Item`'s JSON-Schema
8181
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8169
8182
  * via the `duplicate.jobSchema` link.
8170
8183
  */
8171
- export type ItemDuplicateJobSchema = {
8172
- data: Item;
8173
- included: ItemType[];
8174
- };
8184
+ export type ItemDuplicateJobSchema<D extends ItemDefinition = ItemDefinition> =
8185
+ {
8186
+ data: Item<D>;
8187
+ included: ItemType[];
8188
+ };
8175
8189
 
8176
8190
  /**
8177
- * This interface was referenced by `Item`'s JSON-Schema
8191
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8178
8192
  * via the `update.schema` link.
8179
8193
  */
8180
- export type ItemUpdateSchema = {
8194
+ export type RawItemUpdateSchema = {
8181
8195
  data: {
8182
8196
  type: ItemType1;
8183
8197
  id: ItemIdentity;
8184
- /**
8185
- * The JSON data associated to the record
8186
- */
8187
- attributes?: {
8188
- [k: string]: unknown;
8189
- };
8190
8198
  /**
8191
8199
  * Meta information regarding the record
8192
8200
  */
@@ -8267,32 +8275,35 @@ export type ItemUpdateSchema = {
8267
8275
  };
8268
8276
 
8269
8277
  /**
8270
- * This interface was referenced by `Item`'s JSON-Schema
8278
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8271
8279
  * via the `update.targetSchema` link.
8272
8280
  */
8273
- export type ItemUpdateTargetSchema = {
8274
- data: Item;
8275
- included?: (ItemType | Item)[];
8276
- };
8281
+ export type ItemUpdateTargetSchema<D extends ItemDefinition = ItemDefinition> =
8282
+ {
8283
+ data: Item<D>;
8284
+ included?: (ItemType | Item)[];
8285
+ };
8277
8286
 
8278
8287
  /**
8279
- * This interface was referenced by `Item`'s JSON-Schema
8288
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8280
8289
  * via the `references.targetSchema` link.
8281
8290
  */
8282
- export type ItemReferencesTargetSchema = {
8283
- data: Item[];
8291
+ export type ItemReferencesTargetSchema<
8292
+ D extends ItemDefinition = ItemDefinition,
8293
+ > = {
8294
+ data: Item<D>[];
8284
8295
  };
8285
8296
 
8286
8297
  /**
8287
- * This interface was referenced by `Item`'s JSON-Schema
8298
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8288
8299
  * via the `self.targetSchema` link.
8289
8300
  */
8290
- export type ItemSelfTargetSchema = {
8291
- data: Item;
8301
+ export type ItemSelfTargetSchema<D extends ItemDefinition = ItemDefinition> = {
8302
+ data: Item<D>;
8292
8303
  };
8293
8304
 
8294
8305
  /**
8295
- * This interface was referenced by `Item`'s JSON-Schema
8306
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8296
8307
  * via the `current_vs_published_state.targetSchema` link.
8297
8308
  */
8298
8309
  export type ItemCurrentVsPublishedStateTargetSchema = {
@@ -8448,7 +8459,7 @@ export type ScheduledPublicationAttributes = {
8448
8459
  */
8449
8460
  export type ScheduledPublicationRelationships = {
8450
8461
  /**
8451
- * Item
8462
+ * Item<D>
8452
8463
  */
8453
8464
  item: {
8454
8465
  data: ItemData;
@@ -8500,8 +8511,10 @@ export type ScheduledPublicationCreateTargetSchema = {
8500
8511
  * This interface was referenced by `ScheduledPublication`'s JSON-Schema
8501
8512
  * via the `destroy.targetSchema` link.
8502
8513
  */
8503
- export type ScheduledPublicationDestroyTargetSchema = {
8504
- data: Item;
8514
+ export type ScheduledPublicationDestroyTargetSchema<
8515
+ D extends ItemDefinition = ItemDefinition,
8516
+ > = {
8517
+ data: Item<D>;
8505
8518
  };
8506
8519
 
8507
8520
  /**
@@ -8542,7 +8555,7 @@ export type ScheduledUnpublishingAttributes = {
8542
8555
  */
8543
8556
  export type ScheduledUnpublishingRelationships = {
8544
8557
  /**
8545
- * Item
8558
+ * Item<D>
8546
8559
  */
8547
8560
  item: {
8548
8561
  data: ItemData;
@@ -8585,8 +8598,10 @@ export type ScheduledUnpublishingCreateTargetSchema = {
8585
8598
  * This interface was referenced by `ScheduledUnpublishing`'s JSON-Schema
8586
8599
  * via the `destroy.targetSchema` link.
8587
8600
  */
8588
- export type ScheduledUnpublishingDestroyTargetSchema = {
8589
- data: Item;
8601
+ export type ScheduledUnpublishingDestroyTargetSchema<
8602
+ D extends ItemDefinition = ItemDefinition,
8603
+ > = {
8604
+ data: Item<D>;
8590
8605
  };
8591
8606
 
8592
8607
  /**
@@ -8682,8 +8697,10 @@ export type ItemVersionRestoreTargetSchema = {
8682
8697
  * This interface was referenced by `ItemVersion`'s JSON-Schema
8683
8698
  * via the `restore.jobSchema` link.
8684
8699
  */
8685
- export type ItemVersionRestoreJobSchema = {
8686
- data: [Item, ItemVersion];
8700
+ export type ItemVersionRestoreJobSchema<
8701
+ D extends ItemDefinition = ItemDefinition,
8702
+ > = {
8703
+ data: [Item<D>, ItemVersion];
8687
8704
  };
8688
8705
 
8689
8706
  /**
@@ -8706,7 +8723,7 @@ export type ItemVersionSelfTargetSchema = {
8706
8723
  };
8707
8724
 
8708
8725
  /**
8709
- * This interface was referenced by `Item`'s JSON-Schema
8726
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8710
8727
  * via the `destroy.targetSchema` link.
8711
8728
  */
8712
8729
  export type ItemDestroyTargetSchema = {
@@ -8714,33 +8731,36 @@ export type ItemDestroyTargetSchema = {
8714
8731
  };
8715
8732
 
8716
8733
  /**
8717
- * This interface was referenced by `Item`'s JSON-Schema
8734
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8718
8735
  * via the `destroy.jobSchema` link.
8719
8736
  */
8720
- export type ItemDestroyJobSchema = {
8721
- data: Item;
8737
+ export type ItemDestroyJobSchema<D extends ItemDefinition = ItemDefinition> = {
8738
+ data: Item<D>;
8722
8739
  };
8723
8740
 
8724
8741
  /**
8725
- * This interface was referenced by `Item`'s JSON-Schema
8742
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8726
8743
  * via the `publish.targetSchema` link.
8727
8744
  */
8728
- export type ItemPublishTargetSchema = {
8729
- data: Item;
8730
- included?: ItemType[];
8731
- };
8745
+ export type ItemPublishTargetSchema<D extends ItemDefinition = ItemDefinition> =
8746
+ {
8747
+ data: Item<D>;
8748
+ included?: ItemType[];
8749
+ };
8732
8750
 
8733
8751
  /**
8734
- * This interface was referenced by `Item`'s JSON-Schema
8752
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8735
8753
  * via the `unpublish.targetSchema` link.
8736
8754
  */
8737
- export type ItemUnpublishTargetSchema = {
8738
- data: Item;
8755
+ export type ItemUnpublishTargetSchema<
8756
+ D extends ItemDefinition = ItemDefinition,
8757
+ > = {
8758
+ data: Item<D>;
8739
8759
  included?: ItemType[];
8740
8760
  };
8741
8761
 
8742
8762
  /**
8743
- * This interface was referenced by `Item`'s JSON-Schema
8763
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8744
8764
  * via the `bulk_publish.schema` link.
8745
8765
  */
8746
8766
  export type ItemBulkPublishSchema = {
@@ -8759,7 +8779,7 @@ export type ItemBulkPublishSchema = {
8759
8779
  };
8760
8780
 
8761
8781
  /**
8762
- * This interface was referenced by `Item`'s JSON-Schema
8782
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8763
8783
  * via the `bulk_publish.targetSchema` link.
8764
8784
  */
8765
8785
  export type ItemBulkPublishTargetSchema = {
@@ -8767,7 +8787,7 @@ export type ItemBulkPublishTargetSchema = {
8767
8787
  };
8768
8788
 
8769
8789
  /**
8770
- * This interface was referenced by `Item`'s JSON-Schema
8790
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8771
8791
  * via the `bulk_publish.jobSchema` link.
8772
8792
  */
8773
8793
  export type ItemBulkPublishJobSchema = {
@@ -8779,7 +8799,7 @@ export type ItemBulkPublishJobSchema = {
8779
8799
  };
8780
8800
 
8781
8801
  /**
8782
- * This interface was referenced by `Item`'s JSON-Schema
8802
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8783
8803
  * via the `bulk_unpublish.schema` link.
8784
8804
  */
8785
8805
  export type ItemBulkUnpublishSchema = {
@@ -8798,7 +8818,7 @@ export type ItemBulkUnpublishSchema = {
8798
8818
  };
8799
8819
 
8800
8820
  /**
8801
- * This interface was referenced by `Item`'s JSON-Schema
8821
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8802
8822
  * via the `bulk_unpublish.targetSchema` link.
8803
8823
  */
8804
8824
  export type ItemBulkUnpublishTargetSchema = {
@@ -8806,7 +8826,7 @@ export type ItemBulkUnpublishTargetSchema = {
8806
8826
  };
8807
8827
 
8808
8828
  /**
8809
- * This interface was referenced by `Item`'s JSON-Schema
8829
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8810
8830
  * via the `bulk_unpublish.jobSchema` link.
8811
8831
  */
8812
8832
  export type ItemBulkUnpublishJobSchema = {
@@ -8818,7 +8838,7 @@ export type ItemBulkUnpublishJobSchema = {
8818
8838
  };
8819
8839
 
8820
8840
  /**
8821
- * This interface was referenced by `Item`'s JSON-Schema
8841
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8822
8842
  * via the `bulk_destroy.schema` link.
8823
8843
  */
8824
8844
  export type ItemBulkDestroySchema = {
@@ -8837,7 +8857,7 @@ export type ItemBulkDestroySchema = {
8837
8857
  };
8838
8858
 
8839
8859
  /**
8840
- * This interface was referenced by `Item`'s JSON-Schema
8860
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8841
8861
  * via the `bulk_destroy.targetSchema` link.
8842
8862
  */
8843
8863
  export type ItemBulkDestroyTargetSchema = {
@@ -8845,7 +8865,7 @@ export type ItemBulkDestroyTargetSchema = {
8845
8865
  };
8846
8866
 
8847
8867
  /**
8848
- * This interface was referenced by `Item`'s JSON-Schema
8868
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8849
8869
  * via the `bulk_destroy.jobSchema` link.
8850
8870
  */
8851
8871
  export type ItemBulkDestroyJobSchema = {
@@ -8857,7 +8877,7 @@ export type ItemBulkDestroyJobSchema = {
8857
8877
  };
8858
8878
 
8859
8879
  /**
8860
- * This interface was referenced by `Item`'s JSON-Schema
8880
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8861
8881
  * via the `bulk_move_to_stage.schema` link.
8862
8882
  */
8863
8883
  export type ItemBulkMoveToStageSchema = {
@@ -8882,7 +8902,7 @@ export type ItemBulkMoveToStageSchema = {
8882
8902
  };
8883
8903
 
8884
8904
  /**
8885
- * This interface was referenced by `Item`'s JSON-Schema
8905
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8886
8906
  * via the `bulk_move_to_stage.targetSchema` link.
8887
8907
  */
8888
8908
  export type ItemBulkMoveToStageTargetSchema = {
@@ -8890,7 +8910,7 @@ export type ItemBulkMoveToStageTargetSchema = {
8890
8910
  };
8891
8911
 
8892
8912
  /**
8893
- * This interface was referenced by `Item`'s JSON-Schema
8913
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8894
8914
  * via the `bulk_move_to_stage.jobSchema` link.
8895
8915
  */
8896
8916
  export type ItemBulkMoveToStageJobSchema = {
@@ -9359,8 +9379,10 @@ export type UploadUpdateJobSchema = {
9359
9379
  * This interface was referenced by `Upload`'s JSON-Schema
9360
9380
  * via the `references.targetSchema` link.
9361
9381
  */
9362
- export type UploadReferencesTargetSchema = {
9363
- data: Item[];
9382
+ export type UploadReferencesTargetSchema<
9383
+ D extends ItemDefinition = ItemDefinition,
9384
+ > = {
9385
+ data: Item<D>[];
9364
9386
  };
9365
9387
 
9366
9388
  /**