@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
@@ -1,4 +1,5 @@
1
- import type { BooleanFieldAppearance, BooleanFieldValidators, BooleanFieldValue, ColorFieldAppearance, ColorFieldValidators, ColorFieldValue, DateFieldAppearance, DateFieldValidators, DateFieldValue, DateTimeFieldAppearance, DateTimeFieldValidators, DateTimeFieldValue, FileFieldAppearance, FileFieldValidators, FloatFieldAppearance, FloatFieldValidators, FloatFieldValue, GalleryFieldAppearance, GalleryFieldValidators, IntegerFieldAppearance, IntegerFieldValidators, IntegerFieldValue, JsonFieldAppearance, JsonFieldValidators, JsonFieldValue, LinkFieldAppearance, LinkFieldValidators, LinksFieldAppearance, LinksFieldValidators, LocationFieldAppearance, LocationFieldValidators, LocationFieldValue, RichTextFieldAppearance, RichTextFieldValidators, SeoFieldAppearance, SeoFieldValidators, SingleBlockFieldAppearance, SingleBlockFieldValidators, SlugFieldAppearance, SlugFieldValidators, StringFieldAppearance, StringFieldValidators, StringFieldValue, StructuredTextFieldAppearance, StructuredTextFieldValidators, TextFieldAppearance, TextFieldValidators, TextFieldValue, VideoFieldAppearance, VideoFieldValidators } from '../fieldTypes';
1
+ import type { BooleanFieldAppearance, BooleanFieldValidators, BooleanFieldValue, ColorFieldAppearance, ColorFieldValidators, ColorFieldValue, DateFieldAppearance, DateFieldValidators, DateFieldValue, DateTimeFieldAppearance, DateTimeFieldValidators, DateTimeFieldValue, FileFieldAppearance, FileFieldValidators, FloatFieldAppearance, FloatFieldValidators, FloatFieldValue, GalleryFieldAppearance, GalleryFieldValidators, IntegerFieldAppearance, IntegerFieldValidators, IntegerFieldValue, JsonFieldAppearance, JsonFieldValidators, JsonFieldValue, LatLonFieldAppearance, LatLonFieldValidators, LatLonFieldValue, LinkFieldAppearance, LinkFieldValidators, LinksFieldAppearance, LinksFieldValidators, RichTextFieldAppearance, RichTextFieldValidators, SeoFieldAppearance, SeoFieldValidators, SingleBlockFieldAppearance, SingleBlockFieldValidators, SlugFieldAppearance, SlugFieldValidators, StringFieldAppearance, StringFieldValidators, StringFieldValue, StructuredTextFieldAppearance, StructuredTextFieldValidators, TextFieldAppearance, TextFieldValidators, TextFieldValue, VideoFieldAppearance, VideoFieldValidators } from '../fieldTypes';
2
+ import type { ItemDefinition } from '../utilities/itemDefinition';
2
3
  /**
3
4
  * Enhanced appearance configuration with field-specific types and addon support
4
5
  */
@@ -27,7 +28,7 @@ type LocalizedFieldAttributesForFieldType<SourceType, FieldType extends RawField
27
28
  * Union of localized and non-localized field configurations for attributes
28
29
  */
29
30
  type FieldAttributesForFieldType<SourceType, FieldType extends RawFieldAttributes['field_type'], FieldValue, FieldValidators, FieldAppearance> = NonLocalizedFieldAttributesForFieldType<SourceType, FieldType, FieldValue, FieldValidators, FieldAppearance> | LocalizedFieldAttributesForFieldType<SourceType, FieldType, FieldValue, FieldValidators, FieldAppearance>;
30
- type GenericFieldAttributes<SourceType> = FieldAttributesForFieldType<SourceType, 'boolean', BooleanFieldValue, BooleanFieldValidators, BooleanFieldAppearance> | FieldAttributesForFieldType<SourceType, 'color', ColorFieldValue, ColorFieldValidators, ColorFieldAppearance> | FieldAttributesForFieldType<SourceType, 'date', DateFieldValue, DateFieldValidators, DateFieldAppearance> | FieldAttributesForFieldType<SourceType, 'date_time', DateTimeFieldValue, DateTimeFieldValidators, DateTimeFieldAppearance> | FieldAttributesForFieldType<SourceType, 'file', null, FileFieldValidators, FileFieldAppearance> | FieldAttributesForFieldType<SourceType, 'float', FloatFieldValue, FloatFieldValidators, FloatFieldAppearance> | FieldAttributesForFieldType<SourceType, 'gallery', null, GalleryFieldValidators, GalleryFieldAppearance> | FieldAttributesForFieldType<SourceType, 'integer', IntegerFieldValue, IntegerFieldValidators, IntegerFieldAppearance> | FieldAttributesForFieldType<SourceType, 'json', JsonFieldValue, JsonFieldValidators, JsonFieldAppearance> | FieldAttributesForFieldType<SourceType, 'lat_lon', LocationFieldValue, LocationFieldValidators, LocationFieldAppearance> | FieldAttributesForFieldType<SourceType, 'link', null, LinkFieldValidators, LinkFieldAppearance> | FieldAttributesForFieldType<SourceType, 'links', null, LinksFieldValidators, LinksFieldAppearance> | FieldAttributesForFieldType<SourceType, 'rich_text', null, RichTextFieldValidators, RichTextFieldAppearance> | FieldAttributesForFieldType<SourceType, 'seo', null, SeoFieldValidators, SeoFieldAppearance> | FieldAttributesForFieldType<SourceType, 'single_block', null, SingleBlockFieldValidators, SingleBlockFieldAppearance> | FieldAttributesForFieldType<SourceType, 'slug', null, SlugFieldValidators, SlugFieldAppearance> | FieldAttributesForFieldType<SourceType, 'string', StringFieldValue, StringFieldValidators, StringFieldAppearance> | FieldAttributesForFieldType<SourceType, 'structured_text', null, StructuredTextFieldValidators, StructuredTextFieldAppearance> | FieldAttributesForFieldType<SourceType, 'text', TextFieldValue, TextFieldValidators, TextFieldAppearance> | FieldAttributesForFieldType<SourceType, 'video', null, VideoFieldValidators, VideoFieldAppearance>;
31
+ type GenericFieldAttributes<SourceType> = FieldAttributesForFieldType<SourceType, 'boolean', BooleanFieldValue, BooleanFieldValidators, BooleanFieldAppearance> | FieldAttributesForFieldType<SourceType, 'color', ColorFieldValue, ColorFieldValidators, ColorFieldAppearance> | FieldAttributesForFieldType<SourceType, 'date', DateFieldValue, DateFieldValidators, DateFieldAppearance> | FieldAttributesForFieldType<SourceType, 'date_time', DateTimeFieldValue, DateTimeFieldValidators, DateTimeFieldAppearance> | FieldAttributesForFieldType<SourceType, 'file', null, FileFieldValidators, FileFieldAppearance> | FieldAttributesForFieldType<SourceType, 'float', FloatFieldValue, FloatFieldValidators, FloatFieldAppearance> | FieldAttributesForFieldType<SourceType, 'gallery', null, GalleryFieldValidators, GalleryFieldAppearance> | FieldAttributesForFieldType<SourceType, 'integer', IntegerFieldValue, IntegerFieldValidators, IntegerFieldAppearance> | FieldAttributesForFieldType<SourceType, 'json', JsonFieldValue, JsonFieldValidators, JsonFieldAppearance> | FieldAttributesForFieldType<SourceType, 'lat_lon', LatLonFieldValue, LatLonFieldValidators, LatLonFieldAppearance> | FieldAttributesForFieldType<SourceType, 'link', null, LinkFieldValidators, LinkFieldAppearance> | FieldAttributesForFieldType<SourceType, 'links', null, LinksFieldValidators, LinksFieldAppearance> | FieldAttributesForFieldType<SourceType, 'rich_text', null, RichTextFieldValidators, RichTextFieldAppearance> | FieldAttributesForFieldType<SourceType, 'seo', null, SeoFieldValidators, SeoFieldAppearance> | FieldAttributesForFieldType<SourceType, 'single_block', null, SingleBlockFieldValidators, SingleBlockFieldAppearance> | FieldAttributesForFieldType<SourceType, 'slug', null, SlugFieldValidators, SlugFieldAppearance> | FieldAttributesForFieldType<SourceType, 'string', StringFieldValue, StringFieldValidators, StringFieldAppearance> | FieldAttributesForFieldType<SourceType, 'structured_text', null, StructuredTextFieldValidators, StructuredTextFieldAppearance> | FieldAttributesForFieldType<SourceType, 'text', TextFieldValue, TextFieldValidators, TextFieldAppearance> | FieldAttributesForFieldType<SourceType, 'video', null, VideoFieldValidators, VideoFieldAppearance>;
31
32
  export type FieldAttributes = GenericFieldAttributes<RawFieldAttributes>;
32
33
  export type Field = RawField;
33
34
  type LocalizedFieldCreateConfigForFieldType<SourceType, FieldType extends RawFieldAttributes['field_type'], FieldValue, FieldValidators, FieldAppearance> = Omit<SourceType, 'field_type' | 'default_value' | 'validators' | 'appearance' | 'localized'> & {
@@ -45,7 +46,7 @@ type NonLocalizedFieldCreateConfigForFieldType<SourceType, FieldType extends Raw
45
46
  appearance?: FieldAppearanceConfig<FieldAppearance>;
46
47
  };
47
48
  type FieldCreateConfigForFieldType<SourceType, FieldType extends RawFieldAttributes['field_type'], FieldValue, FieldValidators, FieldAppearance> = LocalizedFieldCreateConfigForFieldType<SourceType, FieldType, FieldValue, FieldValidators, FieldAppearance> | NonLocalizedFieldCreateConfigForFieldType<SourceType, FieldType, FieldValue, FieldValidators, FieldAppearance>;
48
- type FieldCreateConfig<SourceType> = FieldCreateConfigForFieldType<SourceType, 'boolean', BooleanFieldValue, BooleanFieldValidators, BooleanFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'color', ColorFieldValue, ColorFieldValidators, ColorFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'date', DateFieldValue, DateFieldValidators, DateFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'date_time', DateTimeFieldValue, DateTimeFieldValidators, DateTimeFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'file', null, FileFieldValidators, FileFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'float', FloatFieldValue, FloatFieldValidators, FloatFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'gallery', null, GalleryFieldValidators, GalleryFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'integer', IntegerFieldValue, IntegerFieldValidators, IntegerFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'json', JsonFieldValue, JsonFieldValidators, JsonFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'lat_lon', LocationFieldValue, LocationFieldValidators, LocationFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'link', null, LinkFieldValidators, LinkFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'links', null, LinksFieldValidators, LinksFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'rich_text', null, RichTextFieldValidators, RichTextFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'seo', null, SeoFieldValidators, SeoFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'single_block', null, SingleBlockFieldValidators, SingleBlockFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'slug', null, SlugFieldValidators, SlugFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'string', StringFieldValue, StringFieldValidators, StringFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'structured_text', null, StructuredTextFieldValidators, StructuredTextFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'text', TextFieldValue, TextFieldValidators, TextFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'video', null, VideoFieldValidators, VideoFieldAppearance>;
49
+ type FieldCreateConfig<SourceType> = FieldCreateConfigForFieldType<SourceType, 'boolean', BooleanFieldValue, BooleanFieldValidators, BooleanFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'color', ColorFieldValue, ColorFieldValidators, ColorFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'date', DateFieldValue, DateFieldValidators, DateFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'date_time', DateTimeFieldValue, DateTimeFieldValidators, DateTimeFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'file', null, FileFieldValidators, FileFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'float', FloatFieldValue, FloatFieldValidators, FloatFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'gallery', null, GalleryFieldValidators, GalleryFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'integer', IntegerFieldValue, IntegerFieldValidators, IntegerFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'json', JsonFieldValue, JsonFieldValidators, JsonFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'lat_lon', LatLonFieldValue, LatLonFieldValidators, LatLonFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'link', null, LinkFieldValidators, LinkFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'links', null, LinksFieldValidators, LinksFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'rich_text', null, RichTextFieldValidators, RichTextFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'seo', null, SeoFieldValidators, SeoFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'single_block', null, SingleBlockFieldValidators, SingleBlockFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'slug', null, SlugFieldValidators, SlugFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'string', StringFieldValue, StringFieldValidators, StringFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'structured_text', null, StructuredTextFieldValidators, StructuredTextFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'text', TextFieldValue, TextFieldValidators, TextFieldAppearance> | FieldCreateConfigForFieldType<SourceType, 'video', null, VideoFieldValidators, VideoFieldAppearance>;
49
50
  export type FieldCreateSchema = Omit<RawFieldCreateSchema, 'data'> & {
50
51
  data: Omit<RawFieldCreateSchema['data'], 'attributes'> & {
51
52
  attributes: FieldCreateConfig<RawFieldCreateSchema['data']['attributes']>;
@@ -61,12 +62,38 @@ type FieldUpdateConfigForFieldType<SourceType, FieldType extends RawFieldAttribu
61
62
  validators?: FieldValidators;
62
63
  appearance?: FieldAppearanceConfig<FieldAppearance>;
63
64
  };
64
- type FieldUpdateConfig<SourceType> = FieldUpdateConfigForFieldType<SourceType, 'boolean', BooleanFieldValue, BooleanFieldValidators, BooleanFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'color', ColorFieldValue, ColorFieldValidators, ColorFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'date', DateFieldValue, DateFieldValidators, DateFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'date_time', DateTimeFieldValue, DateTimeFieldValidators, DateTimeFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'file', null, FileFieldValidators, FileFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'float', FloatFieldValue, FloatFieldValidators, FloatFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'gallery', null, GalleryFieldValidators, GalleryFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'integer', IntegerFieldValue, IntegerFieldValidators, IntegerFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'json', JsonFieldValue, JsonFieldValidators, JsonFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'lat_lon', LocationFieldValue, LocationFieldValidators, LocationFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'link', null, LinkFieldValidators, LinkFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'links', null, LinksFieldValidators, LinksFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'rich_text', null, RichTextFieldValidators, RichTextFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'seo', null, SeoFieldValidators, SeoFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'single_block', null, SingleBlockFieldValidators, SingleBlockFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'slug', null, SlugFieldValidators, SlugFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'string', StringFieldValue, StringFieldValidators, StringFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'structured_text', null, StructuredTextFieldValidators, StructuredTextFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'text', TextFieldValue, TextFieldValidators, TextFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'video', null, VideoFieldValidators, VideoFieldAppearance>;
65
+ type FieldUpdateConfig<SourceType> = FieldUpdateConfigForFieldType<SourceType, 'boolean', BooleanFieldValue, BooleanFieldValidators, BooleanFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'color', ColorFieldValue, ColorFieldValidators, ColorFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'date', DateFieldValue, DateFieldValidators, DateFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'date_time', DateTimeFieldValue, DateTimeFieldValidators, DateTimeFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'file', null, FileFieldValidators, FileFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'float', FloatFieldValue, FloatFieldValidators, FloatFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'gallery', null, GalleryFieldValidators, GalleryFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'integer', IntegerFieldValue, IntegerFieldValidators, IntegerFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'json', JsonFieldValue, JsonFieldValidators, JsonFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'lat_lon', LatLonFieldValue, LatLonFieldValidators, LatLonFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'link', null, LinkFieldValidators, LinkFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'links', null, LinksFieldValidators, LinksFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'rich_text', null, RichTextFieldValidators, RichTextFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'seo', null, SeoFieldValidators, SeoFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'single_block', null, SingleBlockFieldValidators, SingleBlockFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'slug', null, SlugFieldValidators, SlugFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'string', StringFieldValue, StringFieldValidators, StringFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'structured_text', null, StructuredTextFieldValidators, StructuredTextFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'text', TextFieldValue, TextFieldValidators, TextFieldAppearance> | FieldUpdateConfigForFieldType<SourceType, 'video', null, VideoFieldValidators, VideoFieldAppearance>;
65
66
  export type FieldUpdateSchema = Omit<RawFieldUpdateSchema, 'data'> & {
66
67
  data: Omit<RawFieldUpdateSchema['data'], 'attributes'> & {
67
68
  attributes: FieldUpdateConfig<RawFieldUpdateSchema['data']['attributes']>;
68
69
  };
69
70
  };
71
+ type ForceItemTypeDataId<ItemTypeId> = Omit<ItemTypeData, 'id'> & {
72
+ id: ItemTypeId;
73
+ };
74
+ type ForceItemTypeData<T, ItemTypeId> = {
75
+ [K in keyof T]: T[K] extends ItemTypeData ? ForceItemTypeDataId<ItemTypeId> : T[K] extends object ? ForceItemTypeData<T[K], ItemTypeId> : T[K];
76
+ };
77
+ type ForceItemTypeId<T, ItemTypeId> = ForceItemTypeData<T, ItemTypeId> & {
78
+ /** Useful for type narrowing */
79
+ __itemTypeId?: ItemTypeId;
80
+ };
81
+ export type ApplyItemDefinitionToSchema<Schema, D extends ItemDefinition = ItemDefinition> = D extends any ? ForceItemTypeId<Schema, D['itemTypeId']> & {
82
+ attributes: D['fields'];
83
+ } : never;
84
+ export type Item<D extends ItemDefinition = ItemDefinition> = ApplyItemDefinitionToSchema<RawItem, D>;
85
+ export type ItemValidateExistingSchema<D extends ItemDefinition = ItemDefinition> = {
86
+ data: ApplyItemDefinitionToSchema<RawItemValidateExistingSchema['data'], D>;
87
+ };
88
+ export type ItemValidateNewSchema<D extends ItemDefinition = ItemDefinition> = {
89
+ data: ApplyItemDefinitionToSchema<RawItemValidateNewSchema['data'], D>;
90
+ };
91
+ export type ItemCreateSchema<D extends ItemDefinition = ItemDefinition> = {
92
+ data: ApplyItemDefinitionToSchema<RawItemCreateSchema['data'], D>;
93
+ };
94
+ export type ItemUpdateSchema<D extends ItemDefinition = ItemDefinition> = {
95
+ data: ApplyItemDefinitionToSchema<RawItemUpdateSchema['data'], D>;
96
+ };
70
97
  /**
71
98
  * This file was automatically generated by hyperschema-to-ts: DO NOT MODIFY IT BY HAND.
72
99
  */
@@ -433,17 +460,17 @@ export type UploadCollectionInstancesHrefSchema = {
433
460
  };
434
461
  };
435
462
  /**
436
- * This interface was referenced by `Item`'s JSON-Schema
463
+ * This interface was referenced by `Item<D>`'s JSON-Schema
437
464
  * via the `definition` "type".
438
465
  */
439
466
  export type ItemType1 = 'item';
440
467
  /**
441
468
  * RFC 4122 UUID of record expressed in URL-safe base64 format
442
469
  *
443
- * This interface was referenced by `Item`'s JSON-Schema
470
+ * This interface was referenced by `Item<D>`'s JSON-Schema
444
471
  * via the `definition` "identity".
445
472
  *
446
- * This interface was referenced by `Item`'s JSON-Schema
473
+ * This interface was referenced by `Item<D>`'s JSON-Schema
447
474
  * via the `definition` "id".
448
475
  */
449
476
  export type ItemIdentity = string;
@@ -656,7 +683,7 @@ export type BuildEventInstancesHrefSchema = {
656
683
  [k: string]: unknown;
657
684
  };
658
685
  /**
659
- * This interface was referenced by `Item`'s JSON-Schema
686
+ * This interface was referenced by `Item<D>`'s JSON-Schema
660
687
  * via the `instances.hrefSchema` link.
661
688
  */
662
689
  export type ItemInstancesHrefSchema = {
@@ -720,7 +747,7 @@ export type ItemInstancesHrefSchema = {
720
747
  [k: string]: unknown;
721
748
  };
722
749
  /**
723
- * This interface was referenced by `Item`'s JSON-Schema
750
+ * This interface was referenced by `Item<D>`'s JSON-Schema
724
751
  * via the `references.hrefSchema` link.
725
752
  */
726
753
  export type ItemReferencesHrefSchema = {
@@ -735,7 +762,7 @@ export type ItemReferencesHrefSchema = {
735
762
  [k: string]: unknown;
736
763
  };
737
764
  /**
738
- * This interface was referenced by `Item`'s JSON-Schema
765
+ * This interface was referenced by `Item<D>`'s JSON-Schema
739
766
  * via the `self.hrefSchema` link.
740
767
  */
741
768
  export type ItemSelfHrefSchema = {
@@ -834,7 +861,7 @@ export type ItemVersionInstancesHrefSchema = {
834
861
  [k: string]: unknown;
835
862
  };
836
863
  /**
837
- * This interface was referenced by `Item`'s JSON-Schema
864
+ * This interface was referenced by `Item<D>`'s JSON-Schema
838
865
  * via the `publish.schema` link.
839
866
  */
840
867
  export type ItemPublishSchema = {
@@ -856,7 +883,7 @@ export type ItemPublishSchema = {
856
883
  };
857
884
  } | null;
858
885
  /**
859
- * This interface was referenced by `Item`'s JSON-Schema
886
+ * This interface was referenced by `Item<D>`'s JSON-Schema
860
887
  * via the `publish.hrefSchema` link.
861
888
  */
862
889
  export type ItemPublishHrefSchema = {
@@ -867,7 +894,7 @@ export type ItemPublishHrefSchema = {
867
894
  [k: string]: unknown;
868
895
  };
869
896
  /**
870
- * This interface was referenced by `Item`'s JSON-Schema
897
+ * This interface was referenced by `Item<D>`'s JSON-Schema
871
898
  * via the `unpublish.schema` link.
872
899
  */
873
900
  export type ItemUnpublishSchema = {
@@ -882,7 +909,7 @@ export type ItemUnpublishSchema = {
882
909
  };
883
910
  } | null;
884
911
  /**
885
- * This interface was referenced by `Item`'s JSON-Schema
912
+ * This interface was referenced by `Item<D>`'s JSON-Schema
886
913
  * via the `unpublish.hrefSchema` link.
887
914
  */
888
915
  export type ItemUnpublishHrefSchema = {
@@ -3412,13 +3439,13 @@ export type MenuItemAttributes = {
3412
3439
  */
3413
3440
  export type MenuItemRelationships = {
3414
3441
  /**
3415
- * Item type associated with the menu item
3442
+ * Item<D> type associated with the menu item
3416
3443
  */
3417
3444
  item_type: {
3418
3445
  data: ItemTypeData | null;
3419
3446
  };
3420
3447
  /**
3421
- * Item type filter associated with the menu item (to be used together with `item_type` relationship)
3448
+ * Item<D> type filter associated with the menu item (to be used together with `item_type` relationship)
3422
3449
  */
3423
3450
  item_type_filter: {
3424
3451
  data: ItemTypeFilterData | null;
@@ -3497,13 +3524,13 @@ export type MenuItemCreateSchema = {
3497
3524
  };
3498
3525
  relationships?: {
3499
3526
  /**
3500
- * Item type associated with the menu item
3527
+ * Item<D> type associated with the menu item
3501
3528
  */
3502
3529
  item_type?: {
3503
3530
  data: ItemTypeData | null;
3504
3531
  };
3505
3532
  /**
3506
- * Item type filter associated with the menu item (to be used together with `item_type` relationship)
3533
+ * Item<D> type filter associated with the menu item (to be used together with `item_type` relationship)
3507
3534
  */
3508
3535
  item_type_filter?: {
3509
3536
  data: ItemTypeFilterData | null;
@@ -3555,13 +3582,13 @@ export type MenuItemUpdateSchema = {
3555
3582
  };
3556
3583
  relationships?: {
3557
3584
  /**
3558
- * Item type associated with the menu item
3585
+ * Item<D> type associated with the menu item
3559
3586
  */
3560
3587
  item_type?: {
3561
3588
  data: ItemTypeData | null;
3562
3589
  };
3563
3590
  /**
3564
- * Item type filter associated with the menu item (to be used together with `item_type` relationship)
3591
+ * Item<D> type filter associated with the menu item (to be used together with `item_type` relationship)
3565
3592
  */
3566
3593
  item_type_filter?: {
3567
3594
  data: ItemTypeFilterData | null;
@@ -3702,7 +3729,7 @@ export type SchemaMenuItemAttributes = {
3702
3729
  */
3703
3730
  export type SchemaMenuItemRelationships = {
3704
3731
  /**
3705
- * Item type associated with the schema menu item
3732
+ * Item<D> type associated with the schema menu item
3706
3733
  */
3707
3734
  item_type: {
3708
3735
  data: ItemTypeData | null;
@@ -3757,7 +3784,7 @@ export type SchemaMenuItemCreateSchema = {
3757
3784
  };
3758
3785
  relationships?: {
3759
3786
  /**
3760
- * Item type associated with the menu item
3787
+ * Item<D> type associated with the menu item
3761
3788
  */
3762
3789
  item_type?: {
3763
3790
  data: ItemTypeData | null;
@@ -3805,7 +3832,7 @@ export type SchemaMenuItemUpdateSchema = {
3805
3832
  };
3806
3833
  relationships?: {
3807
3834
  /**
3808
- * Item type associated with the menu item
3835
+ * Item<D> type associated with the menu item
3809
3836
  */
3810
3837
  item_type?: {
3811
3838
  data: ItemTypeData | null;
@@ -4252,7 +4279,7 @@ export type ItemTypeRelationships = {
4252
4279
  /**
4253
4280
  * JSON API data
4254
4281
  *
4255
- * This interface was referenced by `Item`'s JSON-Schema
4282
+ * This interface was referenced by `Item<D>`'s JSON-Schema
4256
4283
  * via the `definition` "data".
4257
4284
  */
4258
4285
  export type ItemData = {
@@ -6735,26 +6762,16 @@ export type BuildEventSelfTargetSchema = {
6735
6762
  * This interface was referenced by `DatoApi`'s JSON-Schema
6736
6763
  * via the `definition` "item".
6737
6764
  */
6738
- export type Item = {
6765
+ export type RawItem = {
6739
6766
  type: ItemType1;
6740
6767
  id: ItemIdentity;
6741
- attributes: ItemAttributes;
6742
6768
  relationships: ItemRelationships;
6743
6769
  meta: ItemMeta;
6744
6770
  };
6745
- /**
6746
- * The JSON data associated to the record
6747
- *
6748
- * This interface was referenced by `Item`'s JSON-Schema
6749
- * via the `definition` "attributes".
6750
- */
6751
- export type ItemAttributes = {
6752
- [k: string]: unknown;
6753
- };
6754
6771
  /**
6755
6772
  * JSON API links
6756
6773
  *
6757
- * This interface was referenced by `Item`'s JSON-Schema
6774
+ * This interface was referenced by `Item<D>`'s JSON-Schema
6758
6775
  * via the `definition` "relationships".
6759
6776
  */
6760
6777
  export type ItemRelationships = {
@@ -6774,7 +6791,7 @@ export type ItemRelationships = {
6774
6791
  /**
6775
6792
  * Meta information regarding the record
6776
6793
  *
6777
- * This interface was referenced by `Item`'s JSON-Schema
6794
+ * This interface was referenced by `Item<D>`'s JSON-Schema
6778
6795
  * via the `definition` "meta".
6779
6796
  */
6780
6797
  export type ItemMeta = {
@@ -6832,29 +6849,32 @@ export type ItemMeta = {
6832
6849
  has_children: null | boolean;
6833
6850
  };
6834
6851
  /**
6835
- * This interface was referenced by `Item`'s JSON-Schema
6852
+ * The JSON data associated to the record
6853
+ *
6854
+ * This interface was referenced by `Item<D>`'s JSON-Schema
6855
+ * via the `definition` "attributes".
6856
+ */
6857
+ export type ItemAttributes = {
6858
+ [k: string]: unknown;
6859
+ };
6860
+ /**
6861
+ * This interface was referenced by `Item<D>`'s JSON-Schema
6836
6862
  * via the `instances.targetSchema` link.
6837
6863
  */
6838
- export type ItemInstancesTargetSchema = {
6839
- data: Item[];
6864
+ export type ItemInstancesTargetSchema<D extends ItemDefinition = ItemDefinition> = {
6865
+ data: Item<D>[];
6840
6866
  meta: {
6841
6867
  total_count: number;
6842
6868
  };
6843
6869
  };
6844
6870
  /**
6845
- * This interface was referenced by `Item`'s JSON-Schema
6871
+ * This interface was referenced by `Item<D>`'s JSON-Schema
6846
6872
  * via the `validate_existing.schema` link.
6847
6873
  */
6848
- export type ItemValidateExistingSchema = {
6874
+ export type RawItemValidateExistingSchema = {
6849
6875
  data: {
6850
6876
  id: ItemIdentity;
6851
6877
  type: ItemType1;
6852
- /**
6853
- * The JSON data associated to the record
6854
- */
6855
- attributes: {
6856
- [k: string]: unknown;
6857
- };
6858
6878
  relationships: {
6859
6879
  /**
6860
6880
  * The record's model
@@ -6872,18 +6892,12 @@ export type ItemValidateExistingSchema = {
6872
6892
  };
6873
6893
  };
6874
6894
  /**
6875
- * This interface was referenced by `Item`'s JSON-Schema
6895
+ * This interface was referenced by `Item<D>`'s JSON-Schema
6876
6896
  * via the `validate_new.schema` link.
6877
6897
  */
6878
- export type ItemValidateNewSchema = {
6898
+ export type RawItemValidateNewSchema = {
6879
6899
  data: {
6880
6900
  type: ItemType1;
6881
- /**
6882
- * The JSON data associated to the record
6883
- */
6884
- attributes: {
6885
- [k: string]: unknown;
6886
- };
6887
6901
  relationships: {
6888
6902
  /**
6889
6903
  * The record's model
@@ -6901,19 +6915,13 @@ export type ItemValidateNewSchema = {
6901
6915
  };
6902
6916
  };
6903
6917
  /**
6904
- * This interface was referenced by `Item`'s JSON-Schema
6918
+ * This interface was referenced by `Item<D>`'s JSON-Schema
6905
6919
  * via the `create.schema` link.
6906
6920
  */
6907
- export type ItemCreateSchema = {
6921
+ export type RawItemCreateSchema = {
6908
6922
  data: {
6909
6923
  id?: ItemIdentity;
6910
6924
  type: ItemType1;
6911
- /**
6912
- * The JSON data associated to the record
6913
- */
6914
- attributes: {
6915
- [k: string]: unknown;
6916
- };
6917
6925
  /**
6918
6926
  * Meta information regarding the record
6919
6927
  */
@@ -6976,42 +6984,36 @@ export type ItemCreateSchema = {
6976
6984
  };
6977
6985
  };
6978
6986
  /**
6979
- * This interface was referenced by `Item`'s JSON-Schema
6987
+ * This interface was referenced by `Item<D>`'s JSON-Schema
6980
6988
  * via the `create.targetSchema` link.
6981
6989
  */
6982
- export type ItemCreateTargetSchema = {
6983
- data: Item;
6990
+ export type ItemCreateTargetSchema<D extends ItemDefinition = ItemDefinition> = {
6991
+ data: Item<D>;
6984
6992
  included: (ItemType | Item)[];
6985
6993
  };
6986
6994
  /**
6987
- * This interface was referenced by `Item`'s JSON-Schema
6995
+ * This interface was referenced by `Item<D>`'s JSON-Schema
6988
6996
  * via the `duplicate.targetSchema` link.
6989
6997
  */
6990
6998
  export type ItemDuplicateTargetSchema = {
6991
6999
  data: Job;
6992
7000
  };
6993
7001
  /**
6994
- * This interface was referenced by `Item`'s JSON-Schema
7002
+ * This interface was referenced by `Item<D>`'s JSON-Schema
6995
7003
  * via the `duplicate.jobSchema` link.
6996
7004
  */
6997
- export type ItemDuplicateJobSchema = {
6998
- data: Item;
7005
+ export type ItemDuplicateJobSchema<D extends ItemDefinition = ItemDefinition> = {
7006
+ data: Item<D>;
6999
7007
  included: ItemType[];
7000
7008
  };
7001
7009
  /**
7002
- * This interface was referenced by `Item`'s JSON-Schema
7010
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7003
7011
  * via the `update.schema` link.
7004
7012
  */
7005
- export type ItemUpdateSchema = {
7013
+ export type RawItemUpdateSchema = {
7006
7014
  data: {
7007
7015
  type: ItemType1;
7008
7016
  id: ItemIdentity;
7009
- /**
7010
- * The JSON data associated to the record
7011
- */
7012
- attributes?: {
7013
- [k: string]: unknown;
7014
- };
7015
7017
  /**
7016
7018
  * Meta information regarding the record
7017
7019
  */
@@ -7086,29 +7088,29 @@ export type ItemUpdateSchema = {
7086
7088
  };
7087
7089
  };
7088
7090
  /**
7089
- * This interface was referenced by `Item`'s JSON-Schema
7091
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7090
7092
  * via the `update.targetSchema` link.
7091
7093
  */
7092
- export type ItemUpdateTargetSchema = {
7093
- data: Item;
7094
+ export type ItemUpdateTargetSchema<D extends ItemDefinition = ItemDefinition> = {
7095
+ data: Item<D>;
7094
7096
  included?: (ItemType | Item)[];
7095
7097
  };
7096
7098
  /**
7097
- * This interface was referenced by `Item`'s JSON-Schema
7099
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7098
7100
  * via the `references.targetSchema` link.
7099
7101
  */
7100
- export type ItemReferencesTargetSchema = {
7101
- data: Item[];
7102
+ export type ItemReferencesTargetSchema<D extends ItemDefinition = ItemDefinition> = {
7103
+ data: Item<D>[];
7102
7104
  };
7103
7105
  /**
7104
- * This interface was referenced by `Item`'s JSON-Schema
7106
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7105
7107
  * via the `self.targetSchema` link.
7106
7108
  */
7107
- export type ItemSelfTargetSchema = {
7108
- data: Item;
7109
+ export type ItemSelfTargetSchema<D extends ItemDefinition = ItemDefinition> = {
7110
+ data: Item<D>;
7109
7111
  };
7110
7112
  /**
7111
- * This interface was referenced by `Item`'s JSON-Schema
7113
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7112
7114
  * via the `current_vs_published_state.targetSchema` link.
7113
7115
  */
7114
7116
  export type ItemCurrentVsPublishedStateTargetSchema = {
@@ -7254,7 +7256,7 @@ export type ScheduledPublicationAttributes = {
7254
7256
  */
7255
7257
  export type ScheduledPublicationRelationships = {
7256
7258
  /**
7257
- * Item
7259
+ * Item<D>
7258
7260
  */
7259
7261
  item: {
7260
7262
  data: ItemData;
@@ -7303,8 +7305,8 @@ export type ScheduledPublicationCreateTargetSchema = {
7303
7305
  * This interface was referenced by `ScheduledPublication`'s JSON-Schema
7304
7306
  * via the `destroy.targetSchema` link.
7305
7307
  */
7306
- export type ScheduledPublicationDestroyTargetSchema = {
7307
- data: Item;
7308
+ export type ScheduledPublicationDestroyTargetSchema<D extends ItemDefinition = ItemDefinition> = {
7309
+ data: Item<D>;
7308
7310
  };
7309
7311
  /**
7310
7312
  * You can create a scheduled unpublishing to unpublish records in the future
@@ -7342,7 +7344,7 @@ export type ScheduledUnpublishingAttributes = {
7342
7344
  */
7343
7345
  export type ScheduledUnpublishingRelationships = {
7344
7346
  /**
7345
- * Item
7347
+ * Item<D>
7346
7348
  */
7347
7349
  item: {
7348
7350
  data: ItemData;
@@ -7382,8 +7384,8 @@ export type ScheduledUnpublishingCreateTargetSchema = {
7382
7384
  * This interface was referenced by `ScheduledUnpublishing`'s JSON-Schema
7383
7385
  * via the `destroy.targetSchema` link.
7384
7386
  */
7385
- export type ScheduledUnpublishingDestroyTargetSchema = {
7386
- data: Item;
7387
+ export type ScheduledUnpublishingDestroyTargetSchema<D extends ItemDefinition = ItemDefinition> = {
7388
+ data: Item<D>;
7387
7389
  };
7388
7390
  /**
7389
7391
  * Every change to a record is stored as a separate record version in DatoCMS.
@@ -7468,8 +7470,8 @@ export type ItemVersionRestoreTargetSchema = {
7468
7470
  * This interface was referenced by `ItemVersion`'s JSON-Schema
7469
7471
  * via the `restore.jobSchema` link.
7470
7472
  */
7471
- export type ItemVersionRestoreJobSchema = {
7472
- data: [Item, ItemVersion];
7473
+ export type ItemVersionRestoreJobSchema<D extends ItemDefinition = ItemDefinition> = {
7474
+ data: [Item<D>, ItemVersion];
7473
7475
  };
7474
7476
  /**
7475
7477
  * This interface was referenced by `ItemVersion`'s JSON-Schema
@@ -7489,37 +7491,37 @@ export type ItemVersionSelfTargetSchema = {
7489
7491
  data: ItemVersion;
7490
7492
  };
7491
7493
  /**
7492
- * This interface was referenced by `Item`'s JSON-Schema
7494
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7493
7495
  * via the `destroy.targetSchema` link.
7494
7496
  */
7495
7497
  export type ItemDestroyTargetSchema = {
7496
7498
  data: Job;
7497
7499
  };
7498
7500
  /**
7499
- * This interface was referenced by `Item`'s JSON-Schema
7501
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7500
7502
  * via the `destroy.jobSchema` link.
7501
7503
  */
7502
- export type ItemDestroyJobSchema = {
7503
- data: Item;
7504
+ export type ItemDestroyJobSchema<D extends ItemDefinition = ItemDefinition> = {
7505
+ data: Item<D>;
7504
7506
  };
7505
7507
  /**
7506
- * This interface was referenced by `Item`'s JSON-Schema
7508
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7507
7509
  * via the `publish.targetSchema` link.
7508
7510
  */
7509
- export type ItemPublishTargetSchema = {
7510
- data: Item;
7511
+ export type ItemPublishTargetSchema<D extends ItemDefinition = ItemDefinition> = {
7512
+ data: Item<D>;
7511
7513
  included?: ItemType[];
7512
7514
  };
7513
7515
  /**
7514
- * This interface was referenced by `Item`'s JSON-Schema
7516
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7515
7517
  * via the `unpublish.targetSchema` link.
7516
7518
  */
7517
- export type ItemUnpublishTargetSchema = {
7518
- data: Item;
7519
+ export type ItemUnpublishTargetSchema<D extends ItemDefinition = ItemDefinition> = {
7520
+ data: Item<D>;
7519
7521
  included?: ItemType[];
7520
7522
  };
7521
7523
  /**
7522
- * This interface was referenced by `Item`'s JSON-Schema
7524
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7523
7525
  * via the `bulk_publish.schema` link.
7524
7526
  */
7525
7527
  export type ItemBulkPublishSchema = {
@@ -7537,14 +7539,14 @@ export type ItemBulkPublishSchema = {
7537
7539
  };
7538
7540
  };
7539
7541
  /**
7540
- * This interface was referenced by `Item`'s JSON-Schema
7542
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7541
7543
  * via the `bulk_publish.targetSchema` link.
7542
7544
  */
7543
7545
  export type ItemBulkPublishTargetSchema = {
7544
7546
  data: Job;
7545
7547
  };
7546
7548
  /**
7547
- * This interface was referenced by `Item`'s JSON-Schema
7549
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7548
7550
  * via the `bulk_publish.jobSchema` link.
7549
7551
  */
7550
7552
  export type ItemBulkPublishJobSchema = {
@@ -7555,7 +7557,7 @@ export type ItemBulkPublishJobSchema = {
7555
7557
  };
7556
7558
  };
7557
7559
  /**
7558
- * This interface was referenced by `Item`'s JSON-Schema
7560
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7559
7561
  * via the `bulk_unpublish.schema` link.
7560
7562
  */
7561
7563
  export type ItemBulkUnpublishSchema = {
@@ -7573,14 +7575,14 @@ export type ItemBulkUnpublishSchema = {
7573
7575
  };
7574
7576
  };
7575
7577
  /**
7576
- * This interface was referenced by `Item`'s JSON-Schema
7578
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7577
7579
  * via the `bulk_unpublish.targetSchema` link.
7578
7580
  */
7579
7581
  export type ItemBulkUnpublishTargetSchema = {
7580
7582
  data: Job;
7581
7583
  };
7582
7584
  /**
7583
- * This interface was referenced by `Item`'s JSON-Schema
7585
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7584
7586
  * via the `bulk_unpublish.jobSchema` link.
7585
7587
  */
7586
7588
  export type ItemBulkUnpublishJobSchema = {
@@ -7591,7 +7593,7 @@ export type ItemBulkUnpublishJobSchema = {
7591
7593
  };
7592
7594
  };
7593
7595
  /**
7594
- * This interface was referenced by `Item`'s JSON-Schema
7596
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7595
7597
  * via the `bulk_destroy.schema` link.
7596
7598
  */
7597
7599
  export type ItemBulkDestroySchema = {
@@ -7609,14 +7611,14 @@ export type ItemBulkDestroySchema = {
7609
7611
  };
7610
7612
  };
7611
7613
  /**
7612
- * This interface was referenced by `Item`'s JSON-Schema
7614
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7613
7615
  * via the `bulk_destroy.targetSchema` link.
7614
7616
  */
7615
7617
  export type ItemBulkDestroyTargetSchema = {
7616
7618
  data: Job;
7617
7619
  };
7618
7620
  /**
7619
- * This interface was referenced by `Item`'s JSON-Schema
7621
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7620
7622
  * via the `bulk_destroy.jobSchema` link.
7621
7623
  */
7622
7624
  export type ItemBulkDestroyJobSchema = {
@@ -7627,7 +7629,7 @@ export type ItemBulkDestroyJobSchema = {
7627
7629
  };
7628
7630
  };
7629
7631
  /**
7630
- * This interface was referenced by `Item`'s JSON-Schema
7632
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7631
7633
  * via the `bulk_move_to_stage.schema` link.
7632
7634
  */
7633
7635
  export type ItemBulkMoveToStageSchema = {
@@ -7651,14 +7653,14 @@ export type ItemBulkMoveToStageSchema = {
7651
7653
  };
7652
7654
  };
7653
7655
  /**
7654
- * This interface was referenced by `Item`'s JSON-Schema
7656
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7655
7657
  * via the `bulk_move_to_stage.targetSchema` link.
7656
7658
  */
7657
7659
  export type ItemBulkMoveToStageTargetSchema = {
7658
7660
  data: Job;
7659
7661
  };
7660
7662
  /**
7661
- * This interface was referenced by `Item`'s JSON-Schema
7663
+ * This interface was referenced by `Item<D>`'s JSON-Schema
7662
7664
  * via the `bulk_move_to_stage.jobSchema` link.
7663
7665
  */
7664
7666
  export type ItemBulkMoveToStageJobSchema = {
@@ -8103,8 +8105,8 @@ export type UploadUpdateJobSchema = {
8103
8105
  * This interface was referenced by `Upload`'s JSON-Schema
8104
8106
  * via the `references.targetSchema` link.
8105
8107
  */
8106
- export type UploadReferencesTargetSchema = {
8107
- data: Item[];
8108
+ export type UploadReferencesTargetSchema<D extends ItemDefinition = ItemDefinition> = {
8109
+ data: Item<D>[];
8108
8110
  };
8109
8111
  /**
8110
8112
  * This interface was referenced by `Upload`'s JSON-Schema