@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.
- package/dist/cjs/fieldTypes/lat_lon.js +6 -6
- package/dist/cjs/fieldTypes/lat_lon.js.map +1 -1
- package/dist/cjs/fieldTypes/rich_text.js.map +1 -1
- package/dist/cjs/fieldTypes/single_block.js.map +1 -1
- package/dist/cjs/fieldTypes/structured_text.js.map +1 -1
- package/dist/cjs/generated/Client.js +1 -1
- package/dist/cjs/generated/resources/Item.js +41 -23
- package/dist/cjs/generated/resources/Item.js.map +1 -1
- package/dist/cjs/generated/resources/ScheduledPublication.js +4 -2
- package/dist/cjs/generated/resources/ScheduledPublication.js.map +1 -1
- package/dist/cjs/generated/resources/ScheduledUnpublishing.js +4 -2
- package/dist/cjs/generated/resources/ScheduledUnpublishing.js.map +1 -1
- package/dist/cjs/generated/resources/Upload.js +4 -2
- package/dist/cjs/generated/resources/Upload.js.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/utilities/buildBlockRecord.js.map +1 -1
- package/dist/cjs/utilities/itemDefinition.js +3 -0
- package/dist/cjs/utilities/itemDefinition.js.map +1 -0
- package/dist/esm/fieldTypes/gallery.d.ts +1 -1
- package/dist/esm/fieldTypes/lat_lon.d.ts +5 -5
- package/dist/esm/fieldTypes/lat_lon.js +3 -3
- package/dist/esm/fieldTypes/lat_lon.js.map +1 -1
- package/dist/esm/fieldTypes/rich_text.d.ts +8 -7
- package/dist/esm/fieldTypes/rich_text.js.map +1 -1
- package/dist/esm/fieldTypes/single_block.d.ts +15 -14
- package/dist/esm/fieldTypes/single_block.js.map +1 -1
- package/dist/esm/fieldTypes/structured_text.d.ts +13 -12
- package/dist/esm/fieldTypes/structured_text.js.map +1 -1
- package/dist/esm/generated/ApiTypes.d.ts +74 -62
- package/dist/esm/generated/Client.js +1 -1
- package/dist/esm/generated/RawApiTypes.d.ts +123 -121
- package/dist/esm/generated/resources/Field.d.ts +230 -230
- package/dist/esm/generated/resources/Item.d.ts +42 -24
- package/dist/esm/generated/resources/Item.js +41 -23
- package/dist/esm/generated/resources/Item.js.map +1 -1
- package/dist/esm/generated/resources/ItemVersion.d.ts +1 -1
- package/dist/esm/generated/resources/ScheduledPublication.d.ts +5 -2
- package/dist/esm/generated/resources/ScheduledPublication.js +4 -2
- package/dist/esm/generated/resources/ScheduledPublication.js.map +1 -1
- package/dist/esm/generated/resources/ScheduledUnpublishing.d.ts +5 -2
- package/dist/esm/generated/resources/ScheduledUnpublishing.js +4 -2
- package/dist/esm/generated/resources/ScheduledUnpublishing.js.map +1 -1
- package/dist/esm/generated/resources/Upload.d.ts +10 -2
- package/dist/esm/generated/resources/Upload.js +4 -2
- package/dist/esm/generated/resources/Upload.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utilities/buildBlockRecord.d.ts +5 -31
- package/dist/esm/utilities/buildBlockRecord.js.map +1 -1
- package/dist/esm/utilities/itemDefinition.d.ts +74 -0
- package/dist/esm/utilities/itemDefinition.js +2 -0
- package/dist/esm/utilities/itemDefinition.js.map +1 -0
- package/dist/types/fieldTypes/gallery.d.ts +1 -1
- package/dist/types/fieldTypes/lat_lon.d.ts +5 -5
- package/dist/types/fieldTypes/rich_text.d.ts +8 -7
- package/dist/types/fieldTypes/single_block.d.ts +15 -14
- package/dist/types/fieldTypes/structured_text.d.ts +13 -12
- package/dist/types/generated/ApiTypes.d.ts +74 -62
- package/dist/types/generated/RawApiTypes.d.ts +123 -121
- package/dist/types/generated/resources/Field.d.ts +230 -230
- package/dist/types/generated/resources/Item.d.ts +42 -24
- package/dist/types/generated/resources/ItemVersion.d.ts +1 -1
- package/dist/types/generated/resources/ScheduledPublication.d.ts +5 -2
- package/dist/types/generated/resources/ScheduledUnpublishing.d.ts +5 -2
- package/dist/types/generated/resources/Upload.d.ts +10 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utilities/buildBlockRecord.d.ts +5 -31
- package/dist/types/utilities/itemDefinition.d.ts +74 -0
- package/package.json +5 -5
- package/resources.json +564 -0
- package/src/fieldTypes/gallery.ts +1 -1
- package/src/fieldTypes/lat_lon.ts +7 -9
- package/src/fieldTypes/rich_text.ts +22 -13
- package/src/fieldTypes/single_block.ts +42 -32
- package/src/fieldTypes/structured_text.ts +60 -23
- package/src/generated/ApiTypes.ts +123 -70
- package/src/generated/Client.ts +1 -1
- package/src/generated/RawApiTypes.ts +174 -138
- package/src/generated/resources/Item.ts +360 -108
- package/src/generated/resources/ScheduledPublication.ts +31 -11
- package/src/generated/resources/ScheduledUnpublishing.ts +31 -11
- package/src/generated/resources/Upload.ts +54 -12
- package/src/index.ts +1 -0
- package/src/utilities/buildBlockRecord.ts +19 -3
- 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
|
-
|
|
195
|
-
|
|
196
|
-
|
|
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
|
-
|
|
407
|
-
|
|
408
|
-
|
|
408
|
+
LatLonFieldValue,
|
|
409
|
+
LatLonFieldValidators,
|
|
410
|
+
LatLonFieldAppearance
|
|
409
411
|
>
|
|
410
412
|
| FieldCreateConfigForFieldType<
|
|
411
413
|
SourceType,
|
|
@@ -578,9 +580,9 @@ type FieldUpdateConfig<SourceType> =
|
|
|
578
580
|
| FieldUpdateConfigForFieldType<
|
|
579
581
|
SourceType,
|
|
580
582
|
'lat_lon',
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
583
|
+
LatLonFieldValue,
|
|
584
|
+
LatLonFieldValidators,
|
|
585
|
+
LatLonFieldAppearance
|
|
584
586
|
>
|
|
585
587
|
| FieldUpdateConfigForFieldType<
|
|
586
588
|
SourceType,
|
|
@@ -663,6 +665,42 @@ type FieldUpdateConfig<SourceType> =
|
|
|
663
665
|
|
|
664
666
|
export type FieldUpdateSchema = FieldUpdateConfig<RawFieldUpdateSchema>;
|
|
665
667
|
|
|
668
|
+
type ForceItemTypeDataId<ItemTypeId> = Omit<ItemTypeData, 'id'> & {
|
|
669
|
+
id: ItemTypeId;
|
|
670
|
+
};
|
|
671
|
+
|
|
672
|
+
type ForceItemTypeData<T, ItemTypeId> = {
|
|
673
|
+
[K in keyof T]: T[K] extends ItemTypeData
|
|
674
|
+
? ForceItemTypeDataId<ItemTypeId>
|
|
675
|
+
: T[K] extends object
|
|
676
|
+
? ForceItemTypeData<T[K], ItemTypeId>
|
|
677
|
+
: T[K];
|
|
678
|
+
};
|
|
679
|
+
|
|
680
|
+
type ForceItemTypeId<T, ItemTypeId> = ForceItemTypeData<T, ItemTypeId> & {
|
|
681
|
+
/** Useful for type narrowing */
|
|
682
|
+
__itemTypeId?: ItemTypeId;
|
|
683
|
+
};
|
|
684
|
+
|
|
685
|
+
export type ApplyItemDefinitionToSchema<
|
|
686
|
+
Schema,
|
|
687
|
+
D extends ItemDefinition = ItemDefinition,
|
|
688
|
+
> = D extends any
|
|
689
|
+
? ForceItemTypeId<Schema, D['itemTypeId']> & D['fields']
|
|
690
|
+
: never;
|
|
691
|
+
|
|
692
|
+
export type Item<D extends ItemDefinition = ItemDefinition> =
|
|
693
|
+
ApplyItemDefinitionToSchema<RawItem, D>;
|
|
694
|
+
export type ItemValidateExistingSchema<
|
|
695
|
+
D extends ItemDefinition = ItemDefinition,
|
|
696
|
+
> = ApplyItemDefinitionToSchema<RawItemValidateExistingSchema, D>;
|
|
697
|
+
export type ItemValidateNewSchema<D extends ItemDefinition = ItemDefinition> =
|
|
698
|
+
ApplyItemDefinitionToSchema<RawItemValidateNewSchema, D>;
|
|
699
|
+
export type ItemCreateSchema<D extends ItemDefinition = ItemDefinition> =
|
|
700
|
+
ApplyItemDefinitionToSchema<RawItemCreateSchema, D>;
|
|
701
|
+
export type ItemUpdateSchema<D extends ItemDefinition = ItemDefinition> =
|
|
702
|
+
ApplyItemDefinitionToSchema<RawItemUpdateSchema, D>;
|
|
703
|
+
|
|
666
704
|
/* tslint:disable */
|
|
667
705
|
/**
|
|
668
706
|
* This file was automatically generated by hyperschema-to-ts: DO NOT MODIFY IT BY HAND.
|
|
@@ -1135,17 +1173,17 @@ export type UploadCollectionReorderSchema = {
|
|
|
1135
1173
|
*/
|
|
1136
1174
|
export type UploadCollectionReorderJobSchema = UploadCollection[];
|
|
1137
1175
|
/**
|
|
1138
|
-
* This interface was referenced by `Item
|
|
1176
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
1139
1177
|
* via the `definition` "type".
|
|
1140
1178
|
*/
|
|
1141
1179
|
export type ItemType1 = 'item';
|
|
1142
1180
|
/**
|
|
1143
1181
|
* RFC 4122 UUID of record expressed in URL-safe base64 format
|
|
1144
1182
|
*
|
|
1145
|
-
* This interface was referenced by `Item
|
|
1183
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
1146
1184
|
* via the `definition` "identity".
|
|
1147
1185
|
*
|
|
1148
|
-
* This interface was referenced by `Item
|
|
1186
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
1149
1187
|
* via the `definition` "id".
|
|
1150
1188
|
*/
|
|
1151
1189
|
export type ItemIdentity = string;
|
|
@@ -1451,12 +1489,14 @@ export type BuildEventInstancesHrefSchema = {
|
|
|
1451
1489
|
[k: string]: unknown;
|
|
1452
1490
|
};
|
|
1453
1491
|
/**
|
|
1454
|
-
* This interface was referenced by `Item
|
|
1492
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
1455
1493
|
* via the `instances.targetSchema` link.
|
|
1456
1494
|
*/
|
|
1457
|
-
export type ItemInstancesTargetSchema
|
|
1495
|
+
export type ItemInstancesTargetSchema<
|
|
1496
|
+
D extends ItemDefinition = ItemDefinition,
|
|
1497
|
+
> = Item<D>[];
|
|
1458
1498
|
/**
|
|
1459
|
-
* This interface was referenced by `Item
|
|
1499
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
1460
1500
|
* via the `instances.hrefSchema` link.
|
|
1461
1501
|
*/
|
|
1462
1502
|
export type ItemInstancesHrefSchema = {
|
|
@@ -1520,12 +1560,14 @@ export type ItemInstancesHrefSchema = {
|
|
|
1520
1560
|
[k: string]: unknown;
|
|
1521
1561
|
};
|
|
1522
1562
|
/**
|
|
1523
|
-
* This interface was referenced by `Item
|
|
1563
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
1524
1564
|
* via the `references.targetSchema` link.
|
|
1525
1565
|
*/
|
|
1526
|
-
export type ItemReferencesTargetSchema
|
|
1566
|
+
export type ItemReferencesTargetSchema<
|
|
1567
|
+
D extends ItemDefinition = ItemDefinition,
|
|
1568
|
+
> = Item<D>[];
|
|
1527
1569
|
/**
|
|
1528
|
-
* This interface was referenced by `Item
|
|
1570
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
1529
1571
|
* via the `references.hrefSchema` link.
|
|
1530
1572
|
*/
|
|
1531
1573
|
export type ItemReferencesHrefSchema = {
|
|
@@ -1540,7 +1582,7 @@ export type ItemReferencesHrefSchema = {
|
|
|
1540
1582
|
[k: string]: unknown;
|
|
1541
1583
|
};
|
|
1542
1584
|
/**
|
|
1543
|
-
* This interface was referenced by `Item
|
|
1585
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
1544
1586
|
* via the `self.hrefSchema` link.
|
|
1545
1587
|
*/
|
|
1546
1588
|
export type ItemSelfHrefSchema = {
|
|
@@ -1615,7 +1657,7 @@ export type ItemVersionType = 'item_version';
|
|
|
1615
1657
|
*/
|
|
1616
1658
|
export type ItemVersionIdentity = string;
|
|
1617
1659
|
/**
|
|
1618
|
-
* This interface was referenced by `Item
|
|
1660
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
1619
1661
|
* via the `publish.schema` link.
|
|
1620
1662
|
*/
|
|
1621
1663
|
export type ItemPublishSchema = {
|
|
@@ -1633,7 +1675,7 @@ export type ItemPublishSchema = {
|
|
|
1633
1675
|
non_localized_content: boolean;
|
|
1634
1676
|
} | null;
|
|
1635
1677
|
/**
|
|
1636
|
-
* This interface was referenced by `Item
|
|
1678
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
1637
1679
|
* via the `publish.hrefSchema` link.
|
|
1638
1680
|
*/
|
|
1639
1681
|
export type ItemPublishHrefSchema = {
|
|
@@ -1644,7 +1686,7 @@ export type ItemPublishHrefSchema = {
|
|
|
1644
1686
|
[k: string]: unknown;
|
|
1645
1687
|
};
|
|
1646
1688
|
/**
|
|
1647
|
-
* This interface was referenced by `Item
|
|
1689
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
1648
1690
|
* via the `unpublish.schema` link.
|
|
1649
1691
|
*/
|
|
1650
1692
|
export type ItemUnpublishSchema = {
|
|
@@ -1655,7 +1697,7 @@ export type ItemUnpublishSchema = {
|
|
|
1655
1697
|
content_in_locales: string[];
|
|
1656
1698
|
} | null;
|
|
1657
1699
|
/**
|
|
1658
|
-
* This interface was referenced by `Item
|
|
1700
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
1659
1701
|
* via the `unpublish.hrefSchema` link.
|
|
1660
1702
|
*/
|
|
1661
1703
|
export type ItemUnpublishHrefSchema = {
|
|
@@ -1666,22 +1708,22 @@ export type ItemUnpublishHrefSchema = {
|
|
|
1666
1708
|
[k: string]: unknown;
|
|
1667
1709
|
};
|
|
1668
1710
|
/**
|
|
1669
|
-
* This interface was referenced by `Item
|
|
1711
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
1670
1712
|
* via the `bulk_publish.jobSchema` link.
|
|
1671
1713
|
*/
|
|
1672
1714
|
export type ItemBulkPublishJobSchema = unknown[];
|
|
1673
1715
|
/**
|
|
1674
|
-
* This interface was referenced by `Item
|
|
1716
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
1675
1717
|
* via the `bulk_unpublish.jobSchema` link.
|
|
1676
1718
|
*/
|
|
1677
1719
|
export type ItemBulkUnpublishJobSchema = unknown[];
|
|
1678
1720
|
/**
|
|
1679
|
-
* This interface was referenced by `Item
|
|
1721
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
1680
1722
|
* via the `bulk_destroy.jobSchema` link.
|
|
1681
1723
|
*/
|
|
1682
1724
|
export type ItemBulkDestroyJobSchema = unknown[];
|
|
1683
1725
|
/**
|
|
1684
|
-
* This interface was referenced by `Item
|
|
1726
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
1685
1727
|
* via the `bulk_move_to_stage.jobSchema` link.
|
|
1686
1728
|
*/
|
|
1687
1729
|
export type ItemBulkMoveToStageJobSchema = unknown[];
|
|
@@ -1689,7 +1731,9 @@ export type ItemBulkMoveToStageJobSchema = unknown[];
|
|
|
1689
1731
|
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
1690
1732
|
* via the `restore.jobSchema` link.
|
|
1691
1733
|
*/
|
|
1692
|
-
export type ItemVersionRestoreJobSchema
|
|
1734
|
+
export type ItemVersionRestoreJobSchema<
|
|
1735
|
+
D extends ItemDefinition = ItemDefinition,
|
|
1736
|
+
> = [Item<D>, ItemVersion];
|
|
1693
1737
|
/**
|
|
1694
1738
|
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
1695
1739
|
* via the `instances.targetSchema` link.
|
|
@@ -1791,7 +1835,9 @@ export type UploadInstancesHrefSchema = {
|
|
|
1791
1835
|
* This interface was referenced by `Upload`'s JSON-Schema
|
|
1792
1836
|
* via the `references.targetSchema` link.
|
|
1793
1837
|
*/
|
|
1794
|
-
export type UploadReferencesTargetSchema
|
|
1838
|
+
export type UploadReferencesTargetSchema<
|
|
1839
|
+
D extends ItemDefinition = ItemDefinition,
|
|
1840
|
+
> = Item<D>[];
|
|
1795
1841
|
/**
|
|
1796
1842
|
* This interface was referenced by `Upload`'s JSON-Schema
|
|
1797
1843
|
* via the `references.hrefSchema` link.
|
|
@@ -5107,22 +5153,22 @@ export type MenuItemUpdateSchema = {
|
|
|
5107
5153
|
* This interface was referenced by `Field`'s JSON-Schema
|
|
5108
5154
|
* via the `duplicate.targetSchema` link.
|
|
5109
5155
|
*
|
|
5110
|
-
* This interface was referenced by `Item
|
|
5156
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
5111
5157
|
* via the `duplicate.targetSchema` link.
|
|
5112
5158
|
*
|
|
5113
|
-
* This interface was referenced by `Item
|
|
5159
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
5114
5160
|
* via the `destroy.targetSchema` link.
|
|
5115
5161
|
*
|
|
5116
|
-
* This interface was referenced by `Item
|
|
5162
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
5117
5163
|
* via the `bulk_publish.targetSchema` link.
|
|
5118
5164
|
*
|
|
5119
|
-
* This interface was referenced by `Item
|
|
5165
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
5120
5166
|
* via the `bulk_unpublish.targetSchema` link.
|
|
5121
5167
|
*
|
|
5122
|
-
* This interface was referenced by `Item
|
|
5168
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
5123
5169
|
* via the `bulk_destroy.targetSchema` link.
|
|
5124
5170
|
*
|
|
5125
|
-
* This interface was referenced by `Item
|
|
5171
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
5126
5172
|
* via the `bulk_move_to_stage.targetSchema` link.
|
|
5127
5173
|
*
|
|
5128
5174
|
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
@@ -5521,7 +5567,7 @@ export type ItemTypeDestroyJobSchema = ItemType;
|
|
|
5521
5567
|
/**
|
|
5522
5568
|
* JSON API data
|
|
5523
5569
|
*
|
|
5524
|
-
* This interface was referenced by `Item
|
|
5570
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
5525
5571
|
* via the `definition` "data".
|
|
5526
5572
|
*/
|
|
5527
5573
|
export type ItemData = {
|
|
@@ -8052,7 +8098,7 @@ export type BuildEventRelationships = {
|
|
|
8052
8098
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
8053
8099
|
* via the `definition` "item".
|
|
8054
8100
|
*/
|
|
8055
|
-
export type
|
|
8101
|
+
export type RawItem = {
|
|
8056
8102
|
id: ItemIdentity;
|
|
8057
8103
|
type: ItemType1;
|
|
8058
8104
|
item_type: ItemTypeData;
|
|
@@ -8063,21 +8109,32 @@ export type Item = {
|
|
|
8063
8109
|
| SsoUserData
|
|
8064
8110
|
| OrganizationData;
|
|
8065
8111
|
meta: ItemMeta;
|
|
8066
|
-
[k: string]: unknown;
|
|
8067
8112
|
};
|
|
8068
|
-
export type ItemCreateTargetSchema =
|
|
8069
|
-
|
|
8070
|
-
export type
|
|
8071
|
-
|
|
8072
|
-
export type
|
|
8073
|
-
|
|
8074
|
-
export type
|
|
8075
|
-
|
|
8076
|
-
export type
|
|
8113
|
+
export type ItemCreateTargetSchema<D extends ItemDefinition = ItemDefinition> =
|
|
8114
|
+
Item<D>;
|
|
8115
|
+
export type ItemDuplicateJobSchema<D extends ItemDefinition = ItemDefinition> =
|
|
8116
|
+
Item<D>;
|
|
8117
|
+
export type ItemUpdateTargetSchema<D extends ItemDefinition = ItemDefinition> =
|
|
8118
|
+
Item<D>;
|
|
8119
|
+
export type ItemSelfTargetSchema<D extends ItemDefinition = ItemDefinition> =
|
|
8120
|
+
Item<D>;
|
|
8121
|
+
export type ItemDestroyJobSchema<D extends ItemDefinition = ItemDefinition> =
|
|
8122
|
+
Item<D>;
|
|
8123
|
+
export type ItemPublishTargetSchema<D extends ItemDefinition = ItemDefinition> =
|
|
8124
|
+
Item<D>;
|
|
8125
|
+
export type ItemUnpublishTargetSchema<
|
|
8126
|
+
D extends ItemDefinition = ItemDefinition,
|
|
8127
|
+
> = Item<D>;
|
|
8128
|
+
export type ScheduledPublicationDestroyTargetSchema<
|
|
8129
|
+
D extends ItemDefinition = ItemDefinition,
|
|
8130
|
+
> = Item<D>;
|
|
8131
|
+
export type ScheduledUnpublishingDestroyTargetSchema<
|
|
8132
|
+
D extends ItemDefinition = ItemDefinition,
|
|
8133
|
+
> = Item<D>;
|
|
8077
8134
|
/**
|
|
8078
8135
|
* Meta information regarding the record
|
|
8079
8136
|
*
|
|
8080
|
-
* This interface was referenced by `Item
|
|
8137
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
8081
8138
|
* via the `definition` "meta".
|
|
8082
8139
|
*/
|
|
8083
8140
|
export type ItemMeta = {
|
|
@@ -8138,7 +8195,7 @@ export type ItemMeta = {
|
|
|
8138
8195
|
/**
|
|
8139
8196
|
* The JSON data associated to the record
|
|
8140
8197
|
*
|
|
8141
|
-
* This interface was referenced by `Item
|
|
8198
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
8142
8199
|
* via the `definition` "attributes".
|
|
8143
8200
|
*/
|
|
8144
8201
|
export type ItemAttributes = {
|
|
@@ -8148,7 +8205,7 @@ export type ItemAttributes = {
|
|
|
8148
8205
|
/**
|
|
8149
8206
|
* JSON API links
|
|
8150
8207
|
*
|
|
8151
|
-
* This interface was referenced by `Item
|
|
8208
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
8152
8209
|
* via the `definition` "relationships".
|
|
8153
8210
|
*/
|
|
8154
8211
|
export type ItemRelationships = {
|
|
@@ -8162,10 +8219,10 @@ export type ItemRelationships = {
|
|
|
8162
8219
|
};
|
|
8163
8220
|
|
|
8164
8221
|
/**
|
|
8165
|
-
* This interface was referenced by `Item
|
|
8222
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
8166
8223
|
* via the `validate_existing.schema` link.
|
|
8167
8224
|
*/
|
|
8168
|
-
export type
|
|
8225
|
+
export type RawItemValidateExistingSchema = {
|
|
8169
8226
|
id?: ItemIdentity;
|
|
8170
8227
|
type?: ItemType1;
|
|
8171
8228
|
item_type: ItemTypeData;
|
|
@@ -8175,14 +8232,13 @@ export type ItemValidateExistingSchema = {
|
|
|
8175
8232
|
| UserData
|
|
8176
8233
|
| SsoUserData
|
|
8177
8234
|
| OrganizationData;
|
|
8178
|
-
[k: string]: unknown;
|
|
8179
8235
|
};
|
|
8180
8236
|
|
|
8181
8237
|
/**
|
|
8182
|
-
* This interface was referenced by `Item
|
|
8238
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
8183
8239
|
* via the `validate_new.schema` link.
|
|
8184
8240
|
*/
|
|
8185
|
-
export type
|
|
8241
|
+
export type RawItemValidateNewSchema = {
|
|
8186
8242
|
type?: ItemType1;
|
|
8187
8243
|
item_type: ItemTypeData;
|
|
8188
8244
|
creator?:
|
|
@@ -8191,14 +8247,13 @@ export type ItemValidateNewSchema = {
|
|
|
8191
8247
|
| UserData
|
|
8192
8248
|
| SsoUserData
|
|
8193
8249
|
| OrganizationData;
|
|
8194
|
-
[k: string]: unknown;
|
|
8195
8250
|
};
|
|
8196
8251
|
|
|
8197
8252
|
/**
|
|
8198
|
-
* This interface was referenced by `Item
|
|
8253
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
8199
8254
|
* via the `create.schema` link.
|
|
8200
8255
|
*/
|
|
8201
|
-
export type
|
|
8256
|
+
export type RawItemCreateSchema = {
|
|
8202
8257
|
id?: ItemIdentity;
|
|
8203
8258
|
type?: ItemType1;
|
|
8204
8259
|
item_type: ItemTypeData;
|
|
@@ -8253,14 +8308,13 @@ export type ItemCreateSchema = {
|
|
|
8253
8308
|
*/
|
|
8254
8309
|
current_version?: string;
|
|
8255
8310
|
};
|
|
8256
|
-
[k: string]: unknown;
|
|
8257
8311
|
};
|
|
8258
8312
|
|
|
8259
8313
|
/**
|
|
8260
|
-
* This interface was referenced by `Item
|
|
8314
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
8261
8315
|
* via the `update.schema` link.
|
|
8262
8316
|
*/
|
|
8263
|
-
export type
|
|
8317
|
+
export type RawItemUpdateSchema = {
|
|
8264
8318
|
id?: ItemIdentity;
|
|
8265
8319
|
type?: ItemType1;
|
|
8266
8320
|
item_type?: ItemTypeData;
|
|
@@ -8327,13 +8381,12 @@ export type ItemUpdateSchema = {
|
|
|
8327
8381
|
*/
|
|
8328
8382
|
has_children?: null | boolean;
|
|
8329
8383
|
};
|
|
8330
|
-
[k: string]: unknown;
|
|
8331
8384
|
};
|
|
8332
8385
|
|
|
8333
8386
|
/**
|
|
8334
8387
|
* Information about the record
|
|
8335
8388
|
*
|
|
8336
|
-
* This interface was referenced by `Item
|
|
8389
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
8337
8390
|
* via the `current_vs_published_state.targetSchema` link.
|
|
8338
8391
|
*
|
|
8339
8392
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
@@ -8430,7 +8483,7 @@ export type ItemCurrentVsPublishedStateRelationships = {
|
|
|
8430
8483
|
};
|
|
8431
8484
|
|
|
8432
8485
|
/**
|
|
8433
|
-
* This interface was referenced by `Item
|
|
8486
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
8434
8487
|
* via the `bulk_publish.schema` link.
|
|
8435
8488
|
*/
|
|
8436
8489
|
export type ItemBulkPublishSchema = {
|
|
@@ -8440,7 +8493,7 @@ export type ItemBulkPublishSchema = {
|
|
|
8440
8493
|
};
|
|
8441
8494
|
|
|
8442
8495
|
/**
|
|
8443
|
-
* This interface was referenced by `Item
|
|
8496
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
8444
8497
|
* via the `bulk_unpublish.schema` link.
|
|
8445
8498
|
*/
|
|
8446
8499
|
export type ItemBulkUnpublishSchema = {
|
|
@@ -8450,7 +8503,7 @@ export type ItemBulkUnpublishSchema = {
|
|
|
8450
8503
|
};
|
|
8451
8504
|
|
|
8452
8505
|
/**
|
|
8453
|
-
* This interface was referenced by `Item
|
|
8506
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
8454
8507
|
* via the `bulk_destroy.schema` link.
|
|
8455
8508
|
*/
|
|
8456
8509
|
export type ItemBulkDestroySchema = {
|
|
@@ -8460,7 +8513,7 @@ export type ItemBulkDestroySchema = {
|
|
|
8460
8513
|
};
|
|
8461
8514
|
|
|
8462
8515
|
/**
|
|
8463
|
-
* This interface was referenced by `Item
|
|
8516
|
+
* This interface was referenced by `Item<D>`'s JSON-Schema
|
|
8464
8517
|
* via the `bulk_move_to_stage.schema` link.
|
|
8465
8518
|
*/
|
|
8466
8519
|
export type ItemBulkMoveToStageSchema = {
|
package/src/generated/Client.ts
CHANGED
|
@@ -147,7 +147,7 @@ export class Client {
|
|
|
147
147
|
...this.config,
|
|
148
148
|
...options,
|
|
149
149
|
logFn: this.config.logFn || console.log,
|
|
150
|
-
userAgent: '@datocms/cma-client v5.1.
|
|
150
|
+
userAgent: '@datocms/cma-client v5.1.5',
|
|
151
151
|
baseUrl: this.baseUrl,
|
|
152
152
|
preCallStack: new Error().stack,
|
|
153
153
|
extraHeaders: {
|