@datocms/cma-client 5.1.3 → 5.1.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.
Files changed (87) 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/gallery.d.ts +1 -1
  21. package/dist/esm/fieldTypes/lat_lon.d.ts +5 -5
  22. package/dist/esm/fieldTypes/lat_lon.js +3 -3
  23. package/dist/esm/fieldTypes/lat_lon.js.map +1 -1
  24. package/dist/esm/fieldTypes/rich_text.d.ts +8 -7
  25. package/dist/esm/fieldTypes/rich_text.js.map +1 -1
  26. package/dist/esm/fieldTypes/single_block.d.ts +15 -14
  27. package/dist/esm/fieldTypes/single_block.js.map +1 -1
  28. package/dist/esm/fieldTypes/structured_text.d.ts +13 -12
  29. package/dist/esm/fieldTypes/structured_text.js.map +1 -1
  30. package/dist/esm/generated/ApiTypes.d.ts +74 -62
  31. package/dist/esm/generated/Client.js +1 -1
  32. package/dist/esm/generated/RawApiTypes.d.ts +123 -121
  33. package/dist/esm/generated/resources/Field.d.ts +230 -230
  34. package/dist/esm/generated/resources/Item.d.ts +42 -24
  35. package/dist/esm/generated/resources/Item.js +41 -23
  36. package/dist/esm/generated/resources/Item.js.map +1 -1
  37. package/dist/esm/generated/resources/ItemVersion.d.ts +1 -1
  38. package/dist/esm/generated/resources/ScheduledPublication.d.ts +5 -2
  39. package/dist/esm/generated/resources/ScheduledPublication.js +4 -2
  40. package/dist/esm/generated/resources/ScheduledPublication.js.map +1 -1
  41. package/dist/esm/generated/resources/ScheduledUnpublishing.d.ts +5 -2
  42. package/dist/esm/generated/resources/ScheduledUnpublishing.js +4 -2
  43. package/dist/esm/generated/resources/ScheduledUnpublishing.js.map +1 -1
  44. package/dist/esm/generated/resources/Upload.d.ts +10 -2
  45. package/dist/esm/generated/resources/Upload.js +4 -2
  46. package/dist/esm/generated/resources/Upload.js.map +1 -1
  47. package/dist/esm/index.d.ts +1 -0
  48. package/dist/esm/index.js +1 -0
  49. package/dist/esm/index.js.map +1 -1
  50. package/dist/esm/utilities/buildBlockRecord.d.ts +5 -31
  51. package/dist/esm/utilities/buildBlockRecord.js.map +1 -1
  52. package/dist/esm/utilities/itemDefinition.d.ts +74 -0
  53. package/dist/esm/utilities/itemDefinition.js +2 -0
  54. package/dist/esm/utilities/itemDefinition.js.map +1 -0
  55. package/dist/types/fieldTypes/gallery.d.ts +1 -1
  56. package/dist/types/fieldTypes/lat_lon.d.ts +5 -5
  57. package/dist/types/fieldTypes/rich_text.d.ts +8 -7
  58. package/dist/types/fieldTypes/single_block.d.ts +15 -14
  59. package/dist/types/fieldTypes/structured_text.d.ts +13 -12
  60. package/dist/types/generated/ApiTypes.d.ts +74 -62
  61. package/dist/types/generated/RawApiTypes.d.ts +123 -121
  62. package/dist/types/generated/resources/Field.d.ts +230 -230
  63. package/dist/types/generated/resources/Item.d.ts +42 -24
  64. package/dist/types/generated/resources/ItemVersion.d.ts +1 -1
  65. package/dist/types/generated/resources/ScheduledPublication.d.ts +5 -2
  66. package/dist/types/generated/resources/ScheduledUnpublishing.d.ts +5 -2
  67. package/dist/types/generated/resources/Upload.d.ts +10 -2
  68. package/dist/types/index.d.ts +1 -0
  69. package/dist/types/utilities/buildBlockRecord.d.ts +5 -31
  70. package/dist/types/utilities/itemDefinition.d.ts +74 -0
  71. package/package.json +5 -5
  72. package/resources.json +564 -0
  73. package/src/fieldTypes/gallery.ts +1 -1
  74. package/src/fieldTypes/lat_lon.ts +7 -9
  75. package/src/fieldTypes/rich_text.ts +22 -13
  76. package/src/fieldTypes/single_block.ts +42 -32
  77. package/src/fieldTypes/structured_text.ts +60 -23
  78. package/src/generated/ApiTypes.ts +123 -70
  79. package/src/generated/Client.ts +1 -1
  80. package/src/generated/RawApiTypes.ts +174 -138
  81. package/src/generated/resources/Item.ts +360 -108
  82. package/src/generated/resources/ScheduledPublication.ts +31 -11
  83. package/src/generated/resources/ScheduledUnpublishing.ts +31 -11
  84. package/src/generated/resources/Upload.ts +54 -12
  85. package/src/index.ts +1 -0
  86. package/src/utilities/buildBlockRecord.ts +19 -3
  87. 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,47 @@ export type FieldUpdateSchema = Omit<RawFieldUpdateSchema, 'data'> & {
671
673
  };
672
674
  };
673
675
 
676
+ type ForceItemTypeDataId<ItemTypeId> = Omit<ItemTypeData, 'id'> & {
677
+ id: ItemTypeId;
678
+ };
679
+
680
+ type ForceItemTypeData<T, ItemTypeId> = {
681
+ [K in keyof T]: T[K] extends ItemTypeData
682
+ ? ForceItemTypeDataId<ItemTypeId>
683
+ : T[K] extends object
684
+ ? ForceItemTypeData<T[K], ItemTypeId>
685
+ : T[K];
686
+ };
687
+
688
+ type ForceItemTypeId<T, ItemTypeId> = ForceItemTypeData<T, ItemTypeId> & {
689
+ /** Useful for type narrowing */
690
+ __itemTypeId?: ItemTypeId;
691
+ };
692
+
693
+ export type ApplyItemDefinitionToSchema<
694
+ Schema,
695
+ D extends ItemDefinition = ItemDefinition,
696
+ > = D extends any
697
+ ? ForceItemTypeId<Schema, D['itemTypeId']> & { attributes: D['fields'] }
698
+ : never;
699
+
700
+ export type Item<D extends ItemDefinition = ItemDefinition> =
701
+ ApplyItemDefinitionToSchema<RawItem, D>;
702
+ export type ItemValidateExistingSchema<
703
+ D extends ItemDefinition = ItemDefinition,
704
+ > = {
705
+ data: ApplyItemDefinitionToSchema<RawItemValidateExistingSchema['data'], D>;
706
+ };
707
+ export type ItemValidateNewSchema<D extends ItemDefinition = ItemDefinition> = {
708
+ data: ApplyItemDefinitionToSchema<RawItemValidateNewSchema['data'], D>;
709
+ };
710
+ export type ItemCreateSchema<D extends ItemDefinition = ItemDefinition> = {
711
+ data: ApplyItemDefinitionToSchema<RawItemCreateSchema['data'], D>;
712
+ };
713
+ export type ItemUpdateSchema<D extends ItemDefinition = ItemDefinition> = {
714
+ data: ApplyItemDefinitionToSchema<RawItemUpdateSchema['data'], D>;
715
+ };
716
+
674
717
  /* tslint:disable */
675
718
  /**
676
719
  * This file was automatically generated by hyperschema-to-ts: DO NOT MODIFY IT BY HAND.
@@ -1039,17 +1082,17 @@ export type UploadCollectionInstancesHrefSchema = {
1039
1082
  };
1040
1083
  };
1041
1084
  /**
1042
- * This interface was referenced by `Item`'s JSON-Schema
1085
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1043
1086
  * via the `definition` "type".
1044
1087
  */
1045
1088
  export type ItemType1 = 'item';
1046
1089
  /**
1047
1090
  * RFC 4122 UUID of record expressed in URL-safe base64 format
1048
1091
  *
1049
- * This interface was referenced by `Item`'s JSON-Schema
1092
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1050
1093
  * via the `definition` "identity".
1051
1094
  *
1052
- * This interface was referenced by `Item`'s JSON-Schema
1095
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1053
1096
  * via the `definition` "id".
1054
1097
  */
1055
1098
  export type ItemIdentity = string;
@@ -1277,7 +1320,7 @@ export type BuildEventInstancesHrefSchema = {
1277
1320
  [k: string]: unknown;
1278
1321
  };
1279
1322
  /**
1280
- * This interface was referenced by `Item`'s JSON-Schema
1323
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1281
1324
  * via the `instances.hrefSchema` link.
1282
1325
  */
1283
1326
  export type ItemInstancesHrefSchema = {
@@ -1341,7 +1384,7 @@ export type ItemInstancesHrefSchema = {
1341
1384
  [k: string]: unknown;
1342
1385
  };
1343
1386
  /**
1344
- * This interface was referenced by `Item`'s JSON-Schema
1387
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1345
1388
  * via the `references.hrefSchema` link.
1346
1389
  */
1347
1390
  export type ItemReferencesHrefSchema = {
@@ -1356,7 +1399,7 @@ export type ItemReferencesHrefSchema = {
1356
1399
  [k: string]: unknown;
1357
1400
  };
1358
1401
  /**
1359
- * This interface was referenced by `Item`'s JSON-Schema
1402
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1360
1403
  * via the `self.hrefSchema` link.
1361
1404
  */
1362
1405
  export type ItemSelfHrefSchema = {
@@ -1455,7 +1498,7 @@ export type ItemVersionInstancesHrefSchema = {
1455
1498
  [k: string]: unknown;
1456
1499
  };
1457
1500
  /**
1458
- * This interface was referenced by `Item`'s JSON-Schema
1501
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1459
1502
  * via the `publish.schema` link.
1460
1503
  */
1461
1504
  export type ItemPublishSchema = {
@@ -1477,7 +1520,7 @@ export type ItemPublishSchema = {
1477
1520
  };
1478
1521
  } | null;
1479
1522
  /**
1480
- * This interface was referenced by `Item`'s JSON-Schema
1523
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1481
1524
  * via the `publish.hrefSchema` link.
1482
1525
  */
1483
1526
  export type ItemPublishHrefSchema = {
@@ -1488,7 +1531,7 @@ export type ItemPublishHrefSchema = {
1488
1531
  [k: string]: unknown;
1489
1532
  };
1490
1533
  /**
1491
- * This interface was referenced by `Item`'s JSON-Schema
1534
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1492
1535
  * via the `unpublish.schema` link.
1493
1536
  */
1494
1537
  export type ItemUnpublishSchema = {
@@ -1503,7 +1546,7 @@ export type ItemUnpublishSchema = {
1503
1546
  };
1504
1547
  } | null;
1505
1548
  /**
1506
- * This interface was referenced by `Item`'s JSON-Schema
1549
+ * This interface was referenced by `Item<D>`'s JSON-Schema
1507
1550
  * via the `unpublish.hrefSchema` link.
1508
1551
  */
1509
1552
  export type ItemUnpublishHrefSchema = {
@@ -4280,13 +4323,13 @@ export type MenuItemAttributes = {
4280
4323
  */
4281
4324
  export type MenuItemRelationships = {
4282
4325
  /**
4283
- * Item type associated with the menu item
4326
+ * Item<D> type associated with the menu item
4284
4327
  */
4285
4328
  item_type: {
4286
4329
  data: ItemTypeData | null;
4287
4330
  };
4288
4331
  /**
4289
- * Item type filter associated with the menu item (to be used together with `item_type` relationship)
4332
+ * Item<D> type filter associated with the menu item (to be used together with `item_type` relationship)
4290
4333
  */
4291
4334
  item_type_filter: {
4292
4335
  data: ItemTypeFilterData | null;
@@ -4369,13 +4412,13 @@ export type MenuItemCreateSchema = {
4369
4412
  };
4370
4413
  relationships?: {
4371
4414
  /**
4372
- * Item type associated with the menu item
4415
+ * Item<D> type associated with the menu item
4373
4416
  */
4374
4417
  item_type?: {
4375
4418
  data: ItemTypeData | null;
4376
4419
  };
4377
4420
  /**
4378
- * Item type filter associated with the menu item (to be used together with `item_type` relationship)
4421
+ * Item<D> type filter associated with the menu item (to be used together with `item_type` relationship)
4379
4422
  */
4380
4423
  item_type_filter?: {
4381
4424
  data: ItemTypeFilterData | null;
@@ -4429,13 +4472,13 @@ export type MenuItemUpdateSchema = {
4429
4472
  };
4430
4473
  relationships?: {
4431
4474
  /**
4432
- * Item type associated with the menu item
4475
+ * Item<D> type associated with the menu item
4433
4476
  */
4434
4477
  item_type?: {
4435
4478
  data: ItemTypeData | null;
4436
4479
  };
4437
4480
  /**
4438
- * Item type filter associated with the menu item (to be used together with `item_type` relationship)
4481
+ * Item<D> type filter associated with the menu item (to be used together with `item_type` relationship)
4439
4482
  */
4440
4483
  item_type_filter?: {
4441
4484
  data: ItemTypeFilterData | null;
@@ -4588,7 +4631,7 @@ export type SchemaMenuItemAttributes = {
4588
4631
  */
4589
4632
  export type SchemaMenuItemRelationships = {
4590
4633
  /**
4591
- * Item type associated with the schema menu item
4634
+ * Item<D> type associated with the schema menu item
4592
4635
  */
4593
4636
  item_type: {
4594
4637
  data: ItemTypeData | null;
@@ -4645,7 +4688,7 @@ export type SchemaMenuItemCreateSchema = {
4645
4688
  };
4646
4689
  relationships?: {
4647
4690
  /**
4648
- * Item type associated with the menu item
4691
+ * Item<D> type associated with the menu item
4649
4692
  */
4650
4693
  item_type?: {
4651
4694
  data: ItemTypeData | null;
@@ -4695,7 +4738,7 @@ export type SchemaMenuItemUpdateSchema = {
4695
4738
  };
4696
4739
  relationships?: {
4697
4740
  /**
4698
- * Item type associated with the menu item
4741
+ * Item<D> type associated with the menu item
4699
4742
  */
4700
4743
  item_type?: {
4701
4744
  data: ItemTypeData | null;
@@ -5172,7 +5215,7 @@ export type ItemTypeRelationships = {
5172
5215
  /**
5173
5216
  * JSON API data
5174
5217
  *
5175
- * This interface was referenced by `Item`'s JSON-Schema
5218
+ * This interface was referenced by `Item<D>`'s JSON-Schema
5176
5219
  * via the `definition` "data".
5177
5220
  */
5178
5221
  export type ItemData = {
@@ -7879,28 +7922,17 @@ export type BuildEventSelfTargetSchema = {
7879
7922
  * This interface was referenced by `DatoApi`'s JSON-Schema
7880
7923
  * via the `definition` "item".
7881
7924
  */
7882
- export type Item = {
7925
+ export type RawItem = {
7883
7926
  type: ItemType1;
7884
7927
  id: ItemIdentity;
7885
- attributes: ItemAttributes;
7886
7928
  relationships: ItemRelationships;
7887
7929
  meta: ItemMeta;
7888
7930
  };
7889
7931
 
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
7932
  /**
7901
7933
  * JSON API links
7902
7934
  *
7903
- * This interface was referenced by `Item`'s JSON-Schema
7935
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7904
7936
  * via the `definition` "relationships".
7905
7937
  */
7906
7938
  export type ItemRelationships = {
@@ -7926,7 +7958,7 @@ export type ItemRelationships = {
7926
7958
  /**
7927
7959
  * Meta information regarding the record
7928
7960
  *
7929
- * This interface was referenced by `Item`'s JSON-Schema
7961
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7930
7962
  * via the `definition` "meta".
7931
7963
  */
7932
7964
  export type ItemMeta = {
@@ -7985,30 +8017,36 @@ export type ItemMeta = {
7985
8017
  };
7986
8018
 
7987
8019
  /**
7988
- * This interface was referenced by `Item`'s JSON-Schema
8020
+ * The JSON data associated to the record
8021
+ *
8022
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8023
+ * via the `definition` "attributes".
8024
+ */
8025
+ export type ItemAttributes = {
8026
+ [k: string]: unknown;
8027
+ };
8028
+
8029
+ /**
8030
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7989
8031
  * via the `instances.targetSchema` link.
7990
8032
  */
7991
- export type ItemInstancesTargetSchema = {
7992
- data: Item[];
8033
+ export type ItemInstancesTargetSchema<
8034
+ D extends ItemDefinition = ItemDefinition,
8035
+ > = {
8036
+ data: Item<D>[];
7993
8037
  meta: {
7994
8038
  total_count: number;
7995
8039
  };
7996
8040
  };
7997
8041
 
7998
8042
  /**
7999
- * This interface was referenced by `Item`'s JSON-Schema
8043
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8000
8044
  * via the `validate_existing.schema` link.
8001
8045
  */
8002
- export type ItemValidateExistingSchema = {
8046
+ export type RawItemValidateExistingSchema = {
8003
8047
  data: {
8004
8048
  id: ItemIdentity;
8005
8049
  type: ItemType1;
8006
- /**
8007
- * The JSON data associated to the record
8008
- */
8009
- attributes: {
8010
- [k: string]: unknown;
8011
- };
8012
8050
  relationships: {
8013
8051
  /**
8014
8052
  * The record's model
@@ -8032,18 +8070,12 @@ export type ItemValidateExistingSchema = {
8032
8070
  };
8033
8071
 
8034
8072
  /**
8035
- * This interface was referenced by `Item`'s JSON-Schema
8073
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8036
8074
  * via the `validate_new.schema` link.
8037
8075
  */
8038
- export type ItemValidateNewSchema = {
8076
+ export type RawItemValidateNewSchema = {
8039
8077
  data: {
8040
8078
  type: ItemType1;
8041
- /**
8042
- * The JSON data associated to the record
8043
- */
8044
- attributes: {
8045
- [k: string]: unknown;
8046
- };
8047
8079
  relationships: {
8048
8080
  /**
8049
8081
  * The record's model
@@ -8067,19 +8099,13 @@ export type ItemValidateNewSchema = {
8067
8099
  };
8068
8100
 
8069
8101
  /**
8070
- * This interface was referenced by `Item`'s JSON-Schema
8102
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8071
8103
  * via the `create.schema` link.
8072
8104
  */
8073
- export type ItemCreateSchema = {
8105
+ export type RawItemCreateSchema = {
8074
8106
  data: {
8075
8107
  id?: ItemIdentity;
8076
8108
  type: ItemType1;
8077
- /**
8078
- * The JSON data associated to the record
8079
- */
8080
- attributes: {
8081
- [k: string]: unknown;
8082
- };
8083
8109
  /**
8084
8110
  * Meta information regarding the record
8085
8111
  */
@@ -8148,16 +8174,17 @@ export type ItemCreateSchema = {
8148
8174
  };
8149
8175
 
8150
8176
  /**
8151
- * This interface was referenced by `Item`'s JSON-Schema
8177
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8152
8178
  * via the `create.targetSchema` link.
8153
8179
  */
8154
- export type ItemCreateTargetSchema = {
8155
- data: Item;
8156
- included: (ItemType | Item)[];
8157
- };
8180
+ export type ItemCreateTargetSchema<D extends ItemDefinition = ItemDefinition> =
8181
+ {
8182
+ data: Item<D>;
8183
+ included: (ItemType | Item)[];
8184
+ };
8158
8185
 
8159
8186
  /**
8160
- * This interface was referenced by `Item`'s JSON-Schema
8187
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8161
8188
  * via the `duplicate.targetSchema` link.
8162
8189
  */
8163
8190
  export type ItemDuplicateTargetSchema = {
@@ -8165,28 +8192,23 @@ export type ItemDuplicateTargetSchema = {
8165
8192
  };
8166
8193
 
8167
8194
  /**
8168
- * This interface was referenced by `Item`'s JSON-Schema
8195
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8169
8196
  * via the `duplicate.jobSchema` link.
8170
8197
  */
8171
- export type ItemDuplicateJobSchema = {
8172
- data: Item;
8173
- included: ItemType[];
8174
- };
8198
+ export type ItemDuplicateJobSchema<D extends ItemDefinition = ItemDefinition> =
8199
+ {
8200
+ data: Item<D>;
8201
+ included: ItemType[];
8202
+ };
8175
8203
 
8176
8204
  /**
8177
- * This interface was referenced by `Item`'s JSON-Schema
8205
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8178
8206
  * via the `update.schema` link.
8179
8207
  */
8180
- export type ItemUpdateSchema = {
8208
+ export type RawItemUpdateSchema = {
8181
8209
  data: {
8182
8210
  type: ItemType1;
8183
8211
  id: ItemIdentity;
8184
- /**
8185
- * The JSON data associated to the record
8186
- */
8187
- attributes?: {
8188
- [k: string]: unknown;
8189
- };
8190
8212
  /**
8191
8213
  * Meta information regarding the record
8192
8214
  */
@@ -8267,32 +8289,35 @@ export type ItemUpdateSchema = {
8267
8289
  };
8268
8290
 
8269
8291
  /**
8270
- * This interface was referenced by `Item`'s JSON-Schema
8292
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8271
8293
  * via the `update.targetSchema` link.
8272
8294
  */
8273
- export type ItemUpdateTargetSchema = {
8274
- data: Item;
8275
- included?: (ItemType | Item)[];
8276
- };
8295
+ export type ItemUpdateTargetSchema<D extends ItemDefinition = ItemDefinition> =
8296
+ {
8297
+ data: Item<D>;
8298
+ included?: (ItemType | Item)[];
8299
+ };
8277
8300
 
8278
8301
  /**
8279
- * This interface was referenced by `Item`'s JSON-Schema
8302
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8280
8303
  * via the `references.targetSchema` link.
8281
8304
  */
8282
- export type ItemReferencesTargetSchema = {
8283
- data: Item[];
8305
+ export type ItemReferencesTargetSchema<
8306
+ D extends ItemDefinition = ItemDefinition,
8307
+ > = {
8308
+ data: Item<D>[];
8284
8309
  };
8285
8310
 
8286
8311
  /**
8287
- * This interface was referenced by `Item`'s JSON-Schema
8312
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8288
8313
  * via the `self.targetSchema` link.
8289
8314
  */
8290
- export type ItemSelfTargetSchema = {
8291
- data: Item;
8315
+ export type ItemSelfTargetSchema<D extends ItemDefinition = ItemDefinition> = {
8316
+ data: Item<D>;
8292
8317
  };
8293
8318
 
8294
8319
  /**
8295
- * This interface was referenced by `Item`'s JSON-Schema
8320
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8296
8321
  * via the `current_vs_published_state.targetSchema` link.
8297
8322
  */
8298
8323
  export type ItemCurrentVsPublishedStateTargetSchema = {
@@ -8448,7 +8473,7 @@ export type ScheduledPublicationAttributes = {
8448
8473
  */
8449
8474
  export type ScheduledPublicationRelationships = {
8450
8475
  /**
8451
- * Item
8476
+ * Item<D>
8452
8477
  */
8453
8478
  item: {
8454
8479
  data: ItemData;
@@ -8500,8 +8525,10 @@ export type ScheduledPublicationCreateTargetSchema = {
8500
8525
  * This interface was referenced by `ScheduledPublication`'s JSON-Schema
8501
8526
  * via the `destroy.targetSchema` link.
8502
8527
  */
8503
- export type ScheduledPublicationDestroyTargetSchema = {
8504
- data: Item;
8528
+ export type ScheduledPublicationDestroyTargetSchema<
8529
+ D extends ItemDefinition = ItemDefinition,
8530
+ > = {
8531
+ data: Item<D>;
8505
8532
  };
8506
8533
 
8507
8534
  /**
@@ -8542,7 +8569,7 @@ export type ScheduledUnpublishingAttributes = {
8542
8569
  */
8543
8570
  export type ScheduledUnpublishingRelationships = {
8544
8571
  /**
8545
- * Item
8572
+ * Item<D>
8546
8573
  */
8547
8574
  item: {
8548
8575
  data: ItemData;
@@ -8585,8 +8612,10 @@ export type ScheduledUnpublishingCreateTargetSchema = {
8585
8612
  * This interface was referenced by `ScheduledUnpublishing`'s JSON-Schema
8586
8613
  * via the `destroy.targetSchema` link.
8587
8614
  */
8588
- export type ScheduledUnpublishingDestroyTargetSchema = {
8589
- data: Item;
8615
+ export type ScheduledUnpublishingDestroyTargetSchema<
8616
+ D extends ItemDefinition = ItemDefinition,
8617
+ > = {
8618
+ data: Item<D>;
8590
8619
  };
8591
8620
 
8592
8621
  /**
@@ -8682,8 +8711,10 @@ export type ItemVersionRestoreTargetSchema = {
8682
8711
  * This interface was referenced by `ItemVersion`'s JSON-Schema
8683
8712
  * via the `restore.jobSchema` link.
8684
8713
  */
8685
- export type ItemVersionRestoreJobSchema = {
8686
- data: [Item, ItemVersion];
8714
+ export type ItemVersionRestoreJobSchema<
8715
+ D extends ItemDefinition = ItemDefinition,
8716
+ > = {
8717
+ data: [Item<D>, ItemVersion];
8687
8718
  };
8688
8719
 
8689
8720
  /**
@@ -8706,7 +8737,7 @@ export type ItemVersionSelfTargetSchema = {
8706
8737
  };
8707
8738
 
8708
8739
  /**
8709
- * This interface was referenced by `Item`'s JSON-Schema
8740
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8710
8741
  * via the `destroy.targetSchema` link.
8711
8742
  */
8712
8743
  export type ItemDestroyTargetSchema = {
@@ -8714,33 +8745,36 @@ export type ItemDestroyTargetSchema = {
8714
8745
  };
8715
8746
 
8716
8747
  /**
8717
- * This interface was referenced by `Item`'s JSON-Schema
8748
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8718
8749
  * via the `destroy.jobSchema` link.
8719
8750
  */
8720
- export type ItemDestroyJobSchema = {
8721
- data: Item;
8751
+ export type ItemDestroyJobSchema<D extends ItemDefinition = ItemDefinition> = {
8752
+ data: Item<D>;
8722
8753
  };
8723
8754
 
8724
8755
  /**
8725
- * This interface was referenced by `Item`'s JSON-Schema
8756
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8726
8757
  * via the `publish.targetSchema` link.
8727
8758
  */
8728
- export type ItemPublishTargetSchema = {
8729
- data: Item;
8730
- included?: ItemType[];
8731
- };
8759
+ export type ItemPublishTargetSchema<D extends ItemDefinition = ItemDefinition> =
8760
+ {
8761
+ data: Item<D>;
8762
+ included?: ItemType[];
8763
+ };
8732
8764
 
8733
8765
  /**
8734
- * This interface was referenced by `Item`'s JSON-Schema
8766
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8735
8767
  * via the `unpublish.targetSchema` link.
8736
8768
  */
8737
- export type ItemUnpublishTargetSchema = {
8738
- data: Item;
8769
+ export type ItemUnpublishTargetSchema<
8770
+ D extends ItemDefinition = ItemDefinition,
8771
+ > = {
8772
+ data: Item<D>;
8739
8773
  included?: ItemType[];
8740
8774
  };
8741
8775
 
8742
8776
  /**
8743
- * This interface was referenced by `Item`'s JSON-Schema
8777
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8744
8778
  * via the `bulk_publish.schema` link.
8745
8779
  */
8746
8780
  export type ItemBulkPublishSchema = {
@@ -8759,7 +8793,7 @@ export type ItemBulkPublishSchema = {
8759
8793
  };
8760
8794
 
8761
8795
  /**
8762
- * This interface was referenced by `Item`'s JSON-Schema
8796
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8763
8797
  * via the `bulk_publish.targetSchema` link.
8764
8798
  */
8765
8799
  export type ItemBulkPublishTargetSchema = {
@@ -8767,7 +8801,7 @@ export type ItemBulkPublishTargetSchema = {
8767
8801
  };
8768
8802
 
8769
8803
  /**
8770
- * This interface was referenced by `Item`'s JSON-Schema
8804
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8771
8805
  * via the `bulk_publish.jobSchema` link.
8772
8806
  */
8773
8807
  export type ItemBulkPublishJobSchema = {
@@ -8779,7 +8813,7 @@ export type ItemBulkPublishJobSchema = {
8779
8813
  };
8780
8814
 
8781
8815
  /**
8782
- * This interface was referenced by `Item`'s JSON-Schema
8816
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8783
8817
  * via the `bulk_unpublish.schema` link.
8784
8818
  */
8785
8819
  export type ItemBulkUnpublishSchema = {
@@ -8798,7 +8832,7 @@ export type ItemBulkUnpublishSchema = {
8798
8832
  };
8799
8833
 
8800
8834
  /**
8801
- * This interface was referenced by `Item`'s JSON-Schema
8835
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8802
8836
  * via the `bulk_unpublish.targetSchema` link.
8803
8837
  */
8804
8838
  export type ItemBulkUnpublishTargetSchema = {
@@ -8806,7 +8840,7 @@ export type ItemBulkUnpublishTargetSchema = {
8806
8840
  };
8807
8841
 
8808
8842
  /**
8809
- * This interface was referenced by `Item`'s JSON-Schema
8843
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8810
8844
  * via the `bulk_unpublish.jobSchema` link.
8811
8845
  */
8812
8846
  export type ItemBulkUnpublishJobSchema = {
@@ -8818,7 +8852,7 @@ export type ItemBulkUnpublishJobSchema = {
8818
8852
  };
8819
8853
 
8820
8854
  /**
8821
- * This interface was referenced by `Item`'s JSON-Schema
8855
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8822
8856
  * via the `bulk_destroy.schema` link.
8823
8857
  */
8824
8858
  export type ItemBulkDestroySchema = {
@@ -8837,7 +8871,7 @@ export type ItemBulkDestroySchema = {
8837
8871
  };
8838
8872
 
8839
8873
  /**
8840
- * This interface was referenced by `Item`'s JSON-Schema
8874
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8841
8875
  * via the `bulk_destroy.targetSchema` link.
8842
8876
  */
8843
8877
  export type ItemBulkDestroyTargetSchema = {
@@ -8845,7 +8879,7 @@ export type ItemBulkDestroyTargetSchema = {
8845
8879
  };
8846
8880
 
8847
8881
  /**
8848
- * This interface was referenced by `Item`'s JSON-Schema
8882
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8849
8883
  * via the `bulk_destroy.jobSchema` link.
8850
8884
  */
8851
8885
  export type ItemBulkDestroyJobSchema = {
@@ -8857,7 +8891,7 @@ export type ItemBulkDestroyJobSchema = {
8857
8891
  };
8858
8892
 
8859
8893
  /**
8860
- * This interface was referenced by `Item`'s JSON-Schema
8894
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8861
8895
  * via the `bulk_move_to_stage.schema` link.
8862
8896
  */
8863
8897
  export type ItemBulkMoveToStageSchema = {
@@ -8882,7 +8916,7 @@ export type ItemBulkMoveToStageSchema = {
8882
8916
  };
8883
8917
 
8884
8918
  /**
8885
- * This interface was referenced by `Item`'s JSON-Schema
8919
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8886
8920
  * via the `bulk_move_to_stage.targetSchema` link.
8887
8921
  */
8888
8922
  export type ItemBulkMoveToStageTargetSchema = {
@@ -8890,7 +8924,7 @@ export type ItemBulkMoveToStageTargetSchema = {
8890
8924
  };
8891
8925
 
8892
8926
  /**
8893
- * This interface was referenced by `Item`'s JSON-Schema
8927
+ * This interface was referenced by `Item<D>`'s JSON-Schema
8894
8928
  * via the `bulk_move_to_stage.jobSchema` link.
8895
8929
  */
8896
8930
  export type ItemBulkMoveToStageJobSchema = {
@@ -9359,8 +9393,10 @@ export type UploadUpdateJobSchema = {
9359
9393
  * This interface was referenced by `Upload`'s JSON-Schema
9360
9394
  * via the `references.targetSchema` link.
9361
9395
  */
9362
- export type UploadReferencesTargetSchema = {
9363
- data: Item[];
9396
+ export type UploadReferencesTargetSchema<
9397
+ D extends ItemDefinition = ItemDefinition,
9398
+ > = {
9399
+ data: Item<D>[];
9364
9400
  };
9365
9401
 
9366
9402
  /**