@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
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as Utils from '@datocms/rest-client-utils';
|
|
2
2
|
import BaseResource from '../../BaseResource';
|
|
3
|
+
import type { ItemTypeDefinition, ItemTypeDefinitionToItemDefinition, ItemTypeDefinitionToItemDefinitionAsRequest, ItemTypeDefinitionToItemDefinitionWithNestedBlocks } from '../../utilities/itemDefinition';
|
|
3
4
|
import type * as ApiTypes from '../ApiTypes';
|
|
4
5
|
import type * as RawApiTypes from '../RawApiTypes';
|
|
6
|
+
type NoInfer<T> = [T][T extends any ? 0 : never];
|
|
5
7
|
export default class Item extends BaseResource {
|
|
6
8
|
static readonly TYPE: "item";
|
|
7
9
|
/**
|
|
@@ -12,7 +14,12 @@ export default class Item extends BaseResource {
|
|
|
12
14
|
* @throws {ApiError}
|
|
13
15
|
* @throws {TimeoutError}
|
|
14
16
|
*/
|
|
15
|
-
list(queryParams
|
|
17
|
+
list<D extends ItemTypeDefinition = ItemTypeDefinition>(queryParams: ApiTypes.ItemInstancesHrefSchema & {
|
|
18
|
+
nested: true;
|
|
19
|
+
}): Promise<ApiTypes.ItemInstancesTargetSchema<ItemTypeDefinitionToItemDefinitionWithNestedBlocks<NoInfer<D>>>>;
|
|
20
|
+
list<D extends ItemTypeDefinition = ItemTypeDefinition>(queryParams?: ApiTypes.ItemInstancesHrefSchema & {
|
|
21
|
+
nested?: false | undefined;
|
|
22
|
+
}): Promise<ApiTypes.ItemInstancesTargetSchema<ItemTypeDefinitionToItemDefinition<NoInfer<D>>>>;
|
|
16
23
|
/**
|
|
17
24
|
* List all records
|
|
18
25
|
*
|
|
@@ -21,7 +28,7 @@ export default class Item extends BaseResource {
|
|
|
21
28
|
* @throws {ApiError}
|
|
22
29
|
* @throws {TimeoutError}
|
|
23
30
|
*/
|
|
24
|
-
rawList(queryParams?: RawApiTypes.ItemInstancesHrefSchema): Promise<RawApiTypes.ItemInstancesTargetSchema
|
|
31
|
+
rawList<D extends ItemTypeDefinition = ItemTypeDefinition>(queryParams?: RawApiTypes.ItemInstancesHrefSchema): Promise<RawApiTypes.ItemInstancesTargetSchema<ItemTypeDefinitionToItemDefinitionWithNestedBlocks<NoInfer<D>>>>;
|
|
25
32
|
/**
|
|
26
33
|
* Async iterator to auto-paginate over elements returned by list()
|
|
27
34
|
*
|
|
@@ -30,7 +37,7 @@ export default class Item extends BaseResource {
|
|
|
30
37
|
* @throws {ApiError}
|
|
31
38
|
* @throws {TimeoutError}
|
|
32
39
|
*/
|
|
33
|
-
listPagedIterator(queryParams?: Utils.OmitFromKnownKeys<ApiTypes.ItemInstancesHrefSchema, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<ApiTypes.
|
|
40
|
+
listPagedIterator<D extends ItemTypeDefinition = ItemTypeDefinition>(queryParams?: Utils.OmitFromKnownKeys<ApiTypes.ItemInstancesHrefSchema, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<ApiTypes.ApplyItemDefinitionToSchema<ApiTypes.RawItem, ItemTypeDefinitionToItemDefinitionWithNestedBlocks<NoInfer<D>>>, void, unknown>;
|
|
34
41
|
/**
|
|
35
42
|
* Async iterator to auto-paginate over elements returned by rawList()
|
|
36
43
|
*
|
|
@@ -39,7 +46,7 @@ export default class Item extends BaseResource {
|
|
|
39
46
|
* @throws {ApiError}
|
|
40
47
|
* @throws {TimeoutError}
|
|
41
48
|
*/
|
|
42
|
-
rawListPagedIterator(queryParams?: Utils.OmitFromKnownKeys<RawApiTypes.ItemInstancesHrefSchema, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<RawApiTypes.
|
|
49
|
+
rawListPagedIterator<D extends ItemTypeDefinition = ItemTypeDefinition>(queryParams?: Utils.OmitFromKnownKeys<RawApiTypes.ItemInstancesHrefSchema, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<Awaited<RawApiTypes.ApplyItemDefinitionToSchema<RawApiTypes.RawItem, ItemTypeDefinitionToItemDefinitionWithNestedBlocks<NoInfer<D>>>>, void, unknown>;
|
|
43
50
|
/**
|
|
44
51
|
* Validates an existing record field
|
|
45
52
|
*
|
|
@@ -50,7 +57,7 @@ export default class Item extends BaseResource {
|
|
|
50
57
|
*
|
|
51
58
|
* @deprecated This API call is to be considered private and might change without notice
|
|
52
59
|
*/
|
|
53
|
-
validateExisting(itemId: string | ApiTypes.ItemData, body: ApiTypes.ItemValidateExistingSchema): Promise<void>;
|
|
60
|
+
validateExisting<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string | ApiTypes.ItemData, body: ApiTypes.ItemValidateExistingSchema<ItemTypeDefinitionToItemDefinitionAsRequest<NoInfer<D>>>): Promise<void>;
|
|
54
61
|
/**
|
|
55
62
|
* Validates an existing record field
|
|
56
63
|
*
|
|
@@ -61,7 +68,7 @@ export default class Item extends BaseResource {
|
|
|
61
68
|
*
|
|
62
69
|
* @deprecated This API call is to be considered private and might change without notice
|
|
63
70
|
*/
|
|
64
|
-
rawValidateExisting(itemId: string, body: RawApiTypes.ItemValidateExistingSchema): Promise<void>;
|
|
71
|
+
rawValidateExisting<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string, body: RawApiTypes.ItemValidateExistingSchema<ItemTypeDefinitionToItemDefinitionAsRequest<NoInfer<D>>>): Promise<void>;
|
|
65
72
|
/**
|
|
66
73
|
* Validates a record field
|
|
67
74
|
*
|
|
@@ -72,7 +79,7 @@ export default class Item extends BaseResource {
|
|
|
72
79
|
*
|
|
73
80
|
* @deprecated This API call is to be considered private and might change without notice
|
|
74
81
|
*/
|
|
75
|
-
validateNew(body: ApiTypes.ItemValidateNewSchema): Promise<void>;
|
|
82
|
+
validateNew<D extends ItemTypeDefinition = ItemTypeDefinition>(body: ApiTypes.ItemValidateNewSchema<ItemTypeDefinitionToItemDefinitionAsRequest<NoInfer<D>>>): Promise<void>;
|
|
76
83
|
/**
|
|
77
84
|
* Validates a record field
|
|
78
85
|
*
|
|
@@ -83,7 +90,7 @@ export default class Item extends BaseResource {
|
|
|
83
90
|
*
|
|
84
91
|
* @deprecated This API call is to be considered private and might change without notice
|
|
85
92
|
*/
|
|
86
|
-
rawValidateNew(body: RawApiTypes.ItemValidateNewSchema): Promise<void>;
|
|
93
|
+
rawValidateNew<D extends ItemTypeDefinition = ItemTypeDefinition>(body: RawApiTypes.ItemValidateNewSchema<ItemTypeDefinitionToItemDefinitionAsRequest<NoInfer<D>>>): Promise<void>;
|
|
87
94
|
/**
|
|
88
95
|
* Create a new record
|
|
89
96
|
*
|
|
@@ -92,7 +99,7 @@ export default class Item extends BaseResource {
|
|
|
92
99
|
* @throws {ApiError}
|
|
93
100
|
* @throws {TimeoutError}
|
|
94
101
|
*/
|
|
95
|
-
create(body: ApiTypes.ItemCreateSchema): Promise<ApiTypes.
|
|
102
|
+
create<D extends ItemTypeDefinition = ItemTypeDefinition>(body: ApiTypes.ItemCreateSchema<ItemTypeDefinitionToItemDefinitionAsRequest<NoInfer<D>>>): Promise<ApiTypes.ApplyItemDefinitionToSchema<ApiTypes.RawItem, ItemTypeDefinitionToItemDefinition<NoInfer<D>>>>;
|
|
96
103
|
/**
|
|
97
104
|
* Create a new record
|
|
98
105
|
*
|
|
@@ -101,7 +108,7 @@ export default class Item extends BaseResource {
|
|
|
101
108
|
* @throws {ApiError}
|
|
102
109
|
* @throws {TimeoutError}
|
|
103
110
|
*/
|
|
104
|
-
rawCreate(body: RawApiTypes.ItemCreateSchema): Promise<RawApiTypes.ItemCreateTargetSchema
|
|
111
|
+
rawCreate<D extends ItemTypeDefinition = ItemTypeDefinition>(body: RawApiTypes.ItemCreateSchema<ItemTypeDefinitionToItemDefinitionAsRequest<NoInfer<D>>>): Promise<RawApiTypes.ItemCreateTargetSchema<ItemTypeDefinitionToItemDefinitionWithNestedBlocks<NoInfer<D>>>>;
|
|
105
112
|
/**
|
|
106
113
|
* Duplicate a record
|
|
107
114
|
*
|
|
@@ -110,7 +117,7 @@ export default class Item extends BaseResource {
|
|
|
110
117
|
* @throws {ApiError}
|
|
111
118
|
* @throws {TimeoutError}
|
|
112
119
|
*/
|
|
113
|
-
duplicate(itemId: string | ApiTypes.ItemData): Promise<ApiTypes.
|
|
120
|
+
duplicate<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string | ApiTypes.ItemData): Promise<ApiTypes.ApplyItemDefinitionToSchema<ApiTypes.RawItem, ItemTypeDefinitionToItemDefinition<NoInfer<D>>>>;
|
|
114
121
|
/**
|
|
115
122
|
* Duplicate a record
|
|
116
123
|
*
|
|
@@ -119,7 +126,7 @@ export default class Item extends BaseResource {
|
|
|
119
126
|
* @throws {ApiError}
|
|
120
127
|
* @throws {TimeoutError}
|
|
121
128
|
*/
|
|
122
|
-
rawDuplicate(itemId: string): Promise<RawApiTypes.ItemDuplicateJobSchema
|
|
129
|
+
rawDuplicate<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string): Promise<RawApiTypes.ItemDuplicateJobSchema<ItemTypeDefinitionToItemDefinitionWithNestedBlocks<NoInfer<D>>>>;
|
|
123
130
|
/**
|
|
124
131
|
* Update a record
|
|
125
132
|
*
|
|
@@ -128,7 +135,7 @@ export default class Item extends BaseResource {
|
|
|
128
135
|
* @throws {ApiError}
|
|
129
136
|
* @throws {TimeoutError}
|
|
130
137
|
*/
|
|
131
|
-
update(itemId: string | ApiTypes.ItemData, body: ApiTypes.ItemUpdateSchema): Promise<ApiTypes.
|
|
138
|
+
update<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string | ApiTypes.ItemData, body: ApiTypes.ItemUpdateSchema<ItemTypeDefinitionToItemDefinitionAsRequest<NoInfer<D>>>): Promise<ApiTypes.ApplyItemDefinitionToSchema<ApiTypes.RawItem, ItemTypeDefinitionToItemDefinition<NoInfer<D>>>>;
|
|
132
139
|
/**
|
|
133
140
|
* Update a record
|
|
134
141
|
*
|
|
@@ -137,7 +144,7 @@ export default class Item extends BaseResource {
|
|
|
137
144
|
* @throws {ApiError}
|
|
138
145
|
* @throws {TimeoutError}
|
|
139
146
|
*/
|
|
140
|
-
rawUpdate(itemId: string, body: RawApiTypes.ItemUpdateSchema): Promise<RawApiTypes.ItemUpdateTargetSchema
|
|
147
|
+
rawUpdate<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string, body: RawApiTypes.ItemUpdateSchema<ItemTypeDefinitionToItemDefinitionAsRequest<NoInfer<D>>>): Promise<RawApiTypes.ItemUpdateTargetSchema<ItemTypeDefinitionToItemDefinitionWithNestedBlocks<NoInfer<D>>>>;
|
|
141
148
|
/**
|
|
142
149
|
* Referenced records
|
|
143
150
|
*
|
|
@@ -146,7 +153,12 @@ export default class Item extends BaseResource {
|
|
|
146
153
|
* @throws {ApiError}
|
|
147
154
|
* @throws {TimeoutError}
|
|
148
155
|
*/
|
|
149
|
-
references(itemId: string | ApiTypes.ItemData, queryParams
|
|
156
|
+
references<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string | ApiTypes.ItemData, queryParams: ApiTypes.ItemReferencesHrefSchema & {
|
|
157
|
+
nested: true;
|
|
158
|
+
}): Promise<ApiTypes.ItemReferencesTargetSchema<ItemTypeDefinitionToItemDefinitionWithNestedBlocks<NoInfer<D>>>>;
|
|
159
|
+
references<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string | ApiTypes.ItemData, queryParams?: ApiTypes.ItemReferencesHrefSchema & {
|
|
160
|
+
nested?: false | undefined;
|
|
161
|
+
}): Promise<ApiTypes.ItemReferencesTargetSchema<ItemTypeDefinitionToItemDefinition<NoInfer<D>>>>;
|
|
150
162
|
/**
|
|
151
163
|
* Referenced records
|
|
152
164
|
*
|
|
@@ -155,7 +167,7 @@ export default class Item extends BaseResource {
|
|
|
155
167
|
* @throws {ApiError}
|
|
156
168
|
* @throws {TimeoutError}
|
|
157
169
|
*/
|
|
158
|
-
rawReferences(itemId: string, queryParams?: RawApiTypes.ItemReferencesHrefSchema): Promise<RawApiTypes.ItemReferencesTargetSchema
|
|
170
|
+
rawReferences<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string, queryParams?: RawApiTypes.ItemReferencesHrefSchema): Promise<RawApiTypes.ItemReferencesTargetSchema<ItemTypeDefinitionToItemDefinitionWithNestedBlocks<NoInfer<D>>>>;
|
|
159
171
|
/**
|
|
160
172
|
* Retrieve a record
|
|
161
173
|
*
|
|
@@ -164,7 +176,12 @@ export default class Item extends BaseResource {
|
|
|
164
176
|
* @throws {ApiError}
|
|
165
177
|
* @throws {TimeoutError}
|
|
166
178
|
*/
|
|
167
|
-
find(itemId: string | ApiTypes.ItemData, queryParams
|
|
179
|
+
find<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string | ApiTypes.ItemData, queryParams: ApiTypes.ItemSelfHrefSchema & {
|
|
180
|
+
nested: true;
|
|
181
|
+
}): Promise<ApiTypes.ItemSelfTargetSchema<ItemTypeDefinitionToItemDefinitionWithNestedBlocks<NoInfer<D>>>>;
|
|
182
|
+
find<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string | ApiTypes.ItemData, queryParams?: ApiTypes.ItemSelfHrefSchema & {
|
|
183
|
+
nested?: false | undefined;
|
|
184
|
+
}): Promise<ApiTypes.ItemSelfTargetSchema<ItemTypeDefinitionToItemDefinition<NoInfer<D>>>>;
|
|
168
185
|
/**
|
|
169
186
|
* Retrieve a record
|
|
170
187
|
*
|
|
@@ -173,7 +190,7 @@ export default class Item extends BaseResource {
|
|
|
173
190
|
* @throws {ApiError}
|
|
174
191
|
* @throws {TimeoutError}
|
|
175
192
|
*/
|
|
176
|
-
rawFind(itemId: string, queryParams?: RawApiTypes.ItemSelfHrefSchema): Promise<RawApiTypes.ItemSelfTargetSchema
|
|
193
|
+
rawFind<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string, queryParams?: RawApiTypes.ItemSelfHrefSchema): Promise<RawApiTypes.ItemSelfTargetSchema<ItemTypeDefinitionToItemDefinitionWithNestedBlocks<NoInfer<D>>>>;
|
|
177
194
|
/**
|
|
178
195
|
* Retrieve information regarding changes between current and published versions of the record
|
|
179
196
|
*
|
|
@@ -204,7 +221,7 @@ export default class Item extends BaseResource {
|
|
|
204
221
|
* @throws {ApiError}
|
|
205
222
|
* @throws {TimeoutError}
|
|
206
223
|
*/
|
|
207
|
-
destroy(itemId: string | ApiTypes.ItemData): Promise<ApiTypes.
|
|
224
|
+
destroy<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string | ApiTypes.ItemData): Promise<ApiTypes.ApplyItemDefinitionToSchema<ApiTypes.RawItem, ItemTypeDefinitionToItemDefinition<NoInfer<D>>>>;
|
|
208
225
|
/**
|
|
209
226
|
* Delete a record
|
|
210
227
|
*
|
|
@@ -213,7 +230,7 @@ export default class Item extends BaseResource {
|
|
|
213
230
|
* @throws {ApiError}
|
|
214
231
|
* @throws {TimeoutError}
|
|
215
232
|
*/
|
|
216
|
-
rawDestroy(itemId: string): Promise<RawApiTypes.ItemDestroyJobSchema
|
|
233
|
+
rawDestroy<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string): Promise<RawApiTypes.ItemDestroyJobSchema<ItemTypeDefinitionToItemDefinitionWithNestedBlocks<NoInfer<D>>>>;
|
|
217
234
|
/**
|
|
218
235
|
* Publish a record
|
|
219
236
|
*
|
|
@@ -222,7 +239,7 @@ export default class Item extends BaseResource {
|
|
|
222
239
|
* @throws {ApiError}
|
|
223
240
|
* @throws {TimeoutError}
|
|
224
241
|
*/
|
|
225
|
-
publish(itemId: string | ApiTypes.ItemData, body?: ApiTypes.ItemPublishSchema, queryParams?: ApiTypes.ItemPublishHrefSchema): Promise<ApiTypes.
|
|
242
|
+
publish<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string | ApiTypes.ItemData, body?: ApiTypes.ItemPublishSchema, queryParams?: ApiTypes.ItemPublishHrefSchema): Promise<ApiTypes.ApplyItemDefinitionToSchema<ApiTypes.RawItem, ItemTypeDefinitionToItemDefinition<NoInfer<D>>>>;
|
|
226
243
|
/**
|
|
227
244
|
* Publish a record
|
|
228
245
|
*
|
|
@@ -231,7 +248,7 @@ export default class Item extends BaseResource {
|
|
|
231
248
|
* @throws {ApiError}
|
|
232
249
|
* @throws {TimeoutError}
|
|
233
250
|
*/
|
|
234
|
-
rawPublish(itemId: string, body?: RawApiTypes.ItemPublishSchema, queryParams?: RawApiTypes.ItemPublishHrefSchema): Promise<RawApiTypes.ItemPublishTargetSchema
|
|
251
|
+
rawPublish<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string, body?: RawApiTypes.ItemPublishSchema, queryParams?: RawApiTypes.ItemPublishHrefSchema): Promise<RawApiTypes.ItemPublishTargetSchema<ItemTypeDefinitionToItemDefinitionWithNestedBlocks<NoInfer<D>>>>;
|
|
235
252
|
/**
|
|
236
253
|
* Unpublish a record
|
|
237
254
|
*
|
|
@@ -240,7 +257,7 @@ export default class Item extends BaseResource {
|
|
|
240
257
|
* @throws {ApiError}
|
|
241
258
|
* @throws {TimeoutError}
|
|
242
259
|
*/
|
|
243
|
-
unpublish(itemId: string | ApiTypes.ItemData, body?: ApiTypes.ItemUnpublishSchema, queryParams?: ApiTypes.ItemUnpublishHrefSchema): Promise<ApiTypes.
|
|
260
|
+
unpublish<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string | ApiTypes.ItemData, body?: ApiTypes.ItemUnpublishSchema, queryParams?: ApiTypes.ItemUnpublishHrefSchema): Promise<ApiTypes.ApplyItemDefinitionToSchema<ApiTypes.RawItem, ItemTypeDefinitionToItemDefinition<NoInfer<D>>>>;
|
|
244
261
|
/**
|
|
245
262
|
* Unpublish a record
|
|
246
263
|
*
|
|
@@ -249,7 +266,7 @@ export default class Item extends BaseResource {
|
|
|
249
266
|
* @throws {ApiError}
|
|
250
267
|
* @throws {TimeoutError}
|
|
251
268
|
*/
|
|
252
|
-
rawUnpublish(itemId: string, body?: RawApiTypes.ItemUnpublishSchema, queryParams?: RawApiTypes.ItemUnpublishHrefSchema): Promise<RawApiTypes.ItemUnpublishTargetSchema
|
|
269
|
+
rawUnpublish<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string, body?: RawApiTypes.ItemUnpublishSchema, queryParams?: RawApiTypes.ItemUnpublishHrefSchema): Promise<RawApiTypes.ItemUnpublishTargetSchema<ItemTypeDefinitionToItemDefinitionWithNestedBlocks<NoInfer<D>>>>;
|
|
253
270
|
/**
|
|
254
271
|
* Publish items in bulk
|
|
255
272
|
*
|
|
@@ -323,3 +340,4 @@ export default class Item extends BaseResource {
|
|
|
323
340
|
*/
|
|
324
341
|
rawBulkMoveToStage(body: RawApiTypes.ItemBulkMoveToStageSchema): Promise<RawApiTypes.ItemBulkMoveToStageJobSchema>;
|
|
325
342
|
}
|
|
343
|
+
export {};
|
|
@@ -12,7 +12,7 @@ export default class ItemVersion extends BaseResource {
|
|
|
12
12
|
* @throws {ApiError}
|
|
13
13
|
* @throws {TimeoutError}
|
|
14
14
|
*/
|
|
15
|
-
restore(itemVersionId: string | ApiTypes.ItemVersionData): Promise<ApiTypes.ItemVersionRestoreJobSchema
|
|
15
|
+
restore(itemVersionId: string | ApiTypes.ItemVersionData): Promise<ApiTypes.ItemVersionRestoreJobSchema<import("../..").ItemDefinition<string, Record<string, unknown>>>>;
|
|
16
16
|
/**
|
|
17
17
|
* Restore an old record version
|
|
18
18
|
*
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import BaseResource from '../../BaseResource';
|
|
2
|
+
import type { ItemTypeDefinition, ItemTypeDefinitionToItemDefinition, ItemTypeDefinitionToItemDefinitionWithNestedBlocks } from '../../utilities/itemDefinition';
|
|
2
3
|
import type * as ApiTypes from '../ApiTypes';
|
|
3
4
|
import type * as RawApiTypes from '../RawApiTypes';
|
|
5
|
+
type NoInfer<T> = [T][T extends any ? 0 : never];
|
|
4
6
|
export default class ScheduledPublication extends BaseResource {
|
|
5
7
|
static readonly TYPE: "scheduled_publication";
|
|
6
8
|
/**
|
|
@@ -29,7 +31,7 @@ export default class ScheduledPublication extends BaseResource {
|
|
|
29
31
|
* @throws {ApiError}
|
|
30
32
|
* @throws {TimeoutError}
|
|
31
33
|
*/
|
|
32
|
-
destroy(itemId: string | ApiTypes.ItemData): Promise<ApiTypes.
|
|
34
|
+
destroy<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string | ApiTypes.ItemData): Promise<ApiTypes.ApplyItemDefinitionToSchema<ApiTypes.RawItem, ItemTypeDefinitionToItemDefinition<NoInfer<D>>>>;
|
|
33
35
|
/**
|
|
34
36
|
* Delete a scheduled publication
|
|
35
37
|
*
|
|
@@ -38,5 +40,6 @@ export default class ScheduledPublication extends BaseResource {
|
|
|
38
40
|
* @throws {ApiError}
|
|
39
41
|
* @throws {TimeoutError}
|
|
40
42
|
*/
|
|
41
|
-
rawDestroy(itemId: string): Promise<RawApiTypes.ScheduledPublicationDestroyTargetSchema
|
|
43
|
+
rawDestroy<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string): Promise<RawApiTypes.ScheduledPublicationDestroyTargetSchema<ItemTypeDefinitionToItemDefinitionWithNestedBlocks<NoInfer<D>>>>;
|
|
42
44
|
}
|
|
45
|
+
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import BaseResource from '../../BaseResource';
|
|
2
|
+
import type { ItemTypeDefinition, ItemTypeDefinitionToItemDefinition, ItemTypeDefinitionToItemDefinitionWithNestedBlocks } from '../../utilities/itemDefinition';
|
|
2
3
|
import type * as ApiTypes from '../ApiTypes';
|
|
3
4
|
import type * as RawApiTypes from '../RawApiTypes';
|
|
5
|
+
type NoInfer<T> = [T][T extends any ? 0 : never];
|
|
4
6
|
export default class ScheduledUnpublishing extends BaseResource {
|
|
5
7
|
static readonly TYPE: "scheduled_unpublishing";
|
|
6
8
|
/**
|
|
@@ -29,7 +31,7 @@ export default class ScheduledUnpublishing extends BaseResource {
|
|
|
29
31
|
* @throws {ApiError}
|
|
30
32
|
* @throws {TimeoutError}
|
|
31
33
|
*/
|
|
32
|
-
destroy(itemId: string | ApiTypes.ItemData): Promise<ApiTypes.
|
|
34
|
+
destroy<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string | ApiTypes.ItemData): Promise<ApiTypes.ApplyItemDefinitionToSchema<ApiTypes.RawItem, ItemTypeDefinitionToItemDefinition<NoInfer<D>>>>;
|
|
33
35
|
/**
|
|
34
36
|
* Delete a scheduled unpublishing
|
|
35
37
|
*
|
|
@@ -38,5 +40,6 @@ export default class ScheduledUnpublishing extends BaseResource {
|
|
|
38
40
|
* @throws {ApiError}
|
|
39
41
|
* @throws {TimeoutError}
|
|
40
42
|
*/
|
|
41
|
-
rawDestroy(itemId: string): Promise<RawApiTypes.ScheduledUnpublishingDestroyTargetSchema
|
|
43
|
+
rawDestroy<D extends ItemTypeDefinition = ItemTypeDefinition>(itemId: string): Promise<RawApiTypes.ScheduledUnpublishingDestroyTargetSchema<ItemTypeDefinitionToItemDefinitionWithNestedBlocks<NoInfer<D>>>>;
|
|
42
44
|
}
|
|
45
|
+
export {};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as Utils from '@datocms/rest-client-utils';
|
|
2
2
|
import BaseResource from '../../BaseResource';
|
|
3
|
+
import type { ItemTypeDefinition, ItemTypeDefinitionToItemDefinition, ItemTypeDefinitionToItemDefinitionWithNestedBlocks } from '../../utilities/itemDefinition';
|
|
3
4
|
import type * as ApiTypes from '../ApiTypes';
|
|
4
5
|
import type * as RawApiTypes from '../RawApiTypes';
|
|
6
|
+
type NoInfer<T> = [T][T extends any ? 0 : never];
|
|
5
7
|
export default class Upload extends BaseResource {
|
|
6
8
|
static readonly TYPE: "upload";
|
|
7
9
|
/**
|
|
@@ -120,7 +122,12 @@ export default class Upload extends BaseResource {
|
|
|
120
122
|
* @throws {ApiError}
|
|
121
123
|
* @throws {TimeoutError}
|
|
122
124
|
*/
|
|
123
|
-
references(uploadId: string | ApiTypes.UploadData, queryParams
|
|
125
|
+
references<D extends ItemTypeDefinition = ItemTypeDefinition>(uploadId: string | ApiTypes.UploadData, queryParams: ApiTypes.UploadReferencesHrefSchema & {
|
|
126
|
+
nested: true;
|
|
127
|
+
}): Promise<ApiTypes.UploadReferencesTargetSchema<ItemTypeDefinitionToItemDefinitionWithNestedBlocks<NoInfer<D>>>>;
|
|
128
|
+
references<D extends ItemTypeDefinition = ItemTypeDefinition>(uploadId: string | ApiTypes.UploadData, queryParams?: ApiTypes.UploadReferencesHrefSchema & {
|
|
129
|
+
nested?: false | undefined;
|
|
130
|
+
}): Promise<ApiTypes.UploadReferencesTargetSchema<ItemTypeDefinitionToItemDefinition<NoInfer<D>>>>;
|
|
124
131
|
/**
|
|
125
132
|
* Referenced records
|
|
126
133
|
*
|
|
@@ -129,7 +136,7 @@ export default class Upload extends BaseResource {
|
|
|
129
136
|
* @throws {ApiError}
|
|
130
137
|
* @throws {TimeoutError}
|
|
131
138
|
*/
|
|
132
|
-
rawReferences(uploadId: string, queryParams?: RawApiTypes.UploadReferencesHrefSchema): Promise<RawApiTypes.UploadReferencesTargetSchema
|
|
139
|
+
rawReferences<D extends ItemTypeDefinition = ItemTypeDefinition>(uploadId: string, queryParams?: RawApiTypes.UploadReferencesHrefSchema): Promise<RawApiTypes.UploadReferencesTargetSchema<ItemTypeDefinitionToItemDefinitionWithNestedBlocks<NoInfer<D>>>>;
|
|
133
140
|
/**
|
|
134
141
|
* Add tags to assets in bulk
|
|
135
142
|
*
|
|
@@ -185,3 +192,4 @@ export default class Upload extends BaseResource {
|
|
|
185
192
|
*/
|
|
186
193
|
rawBulkDestroy(body: RawApiTypes.UploadBulkDestroySchema): Promise<RawApiTypes.UploadBulkDestroyJobSchema>;
|
|
187
194
|
}
|
|
195
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from './utilities/fieldValue';
|
|
|
10
10
|
export * from './utilities/id';
|
|
11
11
|
export * from './utilities/recursiveBlocks';
|
|
12
12
|
export * from './utilities/schemaRepository';
|
|
13
|
+
export * from './utilities/itemDefinition';
|
|
13
14
|
export * from './fieldTypes';
|
|
14
15
|
export type { ApiTypes, RawApiTypes };
|
|
15
16
|
export type { ApiTypes as SchemaTypes, RawApiTypes as SimpleSchemaTypes };
|
|
@@ -1,32 +1,6 @@
|
|
|
1
|
+
import type { NewBlockInARequest } from '../fieldTypes';
|
|
1
2
|
import type * as ApiTypes from '../generated/ApiTypes';
|
|
2
|
-
import type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
attributes?: {
|
|
7
|
-
[k: string]: unknown;
|
|
8
|
-
} | undefined;
|
|
9
|
-
meta?: {
|
|
10
|
-
created_at?: string | undefined;
|
|
11
|
-
updated_at?: string | undefined;
|
|
12
|
-
published_at?: string | null | undefined;
|
|
13
|
-
first_published_at?: string | null | undefined;
|
|
14
|
-
publication_scheduled_at?: string | null | undefined;
|
|
15
|
-
unpublishing_scheduled_at?: string | null | undefined;
|
|
16
|
-
status?: "published" | "draft" | "updated" | null | undefined;
|
|
17
|
-
is_valid?: boolean | undefined;
|
|
18
|
-
current_version?: string | undefined;
|
|
19
|
-
is_current_version_valid?: boolean | null | undefined;
|
|
20
|
-
is_published_version_valid?: boolean | null | undefined;
|
|
21
|
-
stage?: string | null | undefined;
|
|
22
|
-
has_children?: boolean | null | undefined;
|
|
23
|
-
} | undefined;
|
|
24
|
-
relationships?: {
|
|
25
|
-
item_type?: {
|
|
26
|
-
data: RawApiTypes.ItemTypeData;
|
|
27
|
-
} | undefined;
|
|
28
|
-
creator?: {
|
|
29
|
-
data: RawApiTypes.UserData | RawApiTypes.SsoUserData | RawApiTypes.AccessTokenData | RawApiTypes.AccountData | RawApiTypes.OrganizationData;
|
|
30
|
-
} | undefined;
|
|
31
|
-
} | undefined;
|
|
32
|
-
};
|
|
3
|
+
import type { ItemTypeDefinition, ItemTypeDefinitionToItemDefinitionAsRequest } from './itemDefinition';
|
|
4
|
+
type NoInfer<T> = [T][T extends any ? 0 : never];
|
|
5
|
+
export declare function buildBlockRecord<D extends ItemTypeDefinition = ItemTypeDefinition>(body: ApiTypes.ItemUpdateSchema<ItemTypeDefinitionToItemDefinitionAsRequest<NoInfer<D>>>): NewBlockInARequest<ItemTypeDefinitionToItemDefinitionAsRequest<NoInfer<D>>>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { BooleanFieldValue, ColorFieldValue, DateFieldValue, DateTimeFieldValue, FileFieldValue, FloatFieldValue, GalleryFieldValue, IntegerFieldValue, JsonFieldValue, LatLonFieldValue, LinkFieldValue, LinksFieldValue, RichTextFieldValue, RichTextFieldValueAsRequest, RichTextFieldValueWithNestedBlocks, SeoFieldValue, SingleBlockFieldValue, SingleBlockFieldValueAsRequest, SingleBlockFieldValueWithNestedBlocks, SlugFieldValue, StringFieldValue, StructuredTextFieldValue, StructuredTextFieldValueAsRequest, StructuredTextFieldValueWithNestedBlocks, TextFieldValue, VideoFieldValue } from '../fieldTypes';
|
|
2
|
+
import type { LocalizedFieldValue } from './fieldValue';
|
|
3
|
+
/** Base field definition */
|
|
4
|
+
type BaseFieldDefinition<Type extends string> = {
|
|
5
|
+
type: Type;
|
|
6
|
+
localized?: boolean;
|
|
7
|
+
};
|
|
8
|
+
type RichTextFieldDefinition<AllowedBlocks extends ItemTypeDefinition = ItemTypeDefinition> = BaseFieldDefinition<'rich_text'> & {
|
|
9
|
+
blocks: AllowedBlocks;
|
|
10
|
+
};
|
|
11
|
+
type SingleBlockFieldDefinition<AllowedBlocks extends ItemTypeDefinition = ItemTypeDefinition> = BaseFieldDefinition<'single_block'> & {
|
|
12
|
+
blocks: AllowedBlocks;
|
|
13
|
+
};
|
|
14
|
+
type StructuredTextFieldDefinition<AllowedBlocks extends ItemTypeDefinition = ItemTypeDefinition, AllowedInlineBlocks extends ItemTypeDefinition = ItemTypeDefinition> = BaseFieldDefinition<'structured_text'> & {
|
|
15
|
+
blocks: AllowedBlocks;
|
|
16
|
+
inline_blocks: AllowedInlineBlocks;
|
|
17
|
+
};
|
|
18
|
+
/** Field definition union */
|
|
19
|
+
export type FieldDefinition = BaseFieldDefinition<'boolean' | 'color' | 'date' | 'date_time' | 'file' | 'float' | 'gallery' | 'integer' | 'json' | 'lat_lon' | 'link' | 'links' | 'seo' | 'slug' | 'string' | 'text' | 'video' | 'unknown'> | RichTextFieldDefinition | SingleBlockFieldDefinition | StructuredTextFieldDefinition;
|
|
20
|
+
/** Item type definition */
|
|
21
|
+
export type ItemTypeDefinition<ItemTypeId extends string = string, FieldDefinitions extends Record<string, FieldDefinition> = {}> = {
|
|
22
|
+
itemTypeId: ItemTypeId;
|
|
23
|
+
fields: FieldDefinitions;
|
|
24
|
+
};
|
|
25
|
+
/** Item definition */
|
|
26
|
+
export type ItemDefinition<ItemTypeId extends string = string, FieldValues extends Record<string, unknown> = Record<string, unknown>> = {
|
|
27
|
+
itemTypeId: ItemTypeId;
|
|
28
|
+
fields: FieldValues;
|
|
29
|
+
};
|
|
30
|
+
/** Standard field values */
|
|
31
|
+
type FieldTypeToValue = {
|
|
32
|
+
boolean: BooleanFieldValue;
|
|
33
|
+
color: ColorFieldValue;
|
|
34
|
+
date: DateFieldValue;
|
|
35
|
+
date_time: DateTimeFieldValue;
|
|
36
|
+
file: FileFieldValue;
|
|
37
|
+
float: FloatFieldValue;
|
|
38
|
+
gallery: GalleryFieldValue;
|
|
39
|
+
integer: IntegerFieldValue;
|
|
40
|
+
json: JsonFieldValue;
|
|
41
|
+
lat_lon: LatLonFieldValue;
|
|
42
|
+
link: LinkFieldValue;
|
|
43
|
+
links: LinksFieldValue;
|
|
44
|
+
rich_text: RichTextFieldValue;
|
|
45
|
+
seo: SeoFieldValue;
|
|
46
|
+
single_block: SingleBlockFieldValue;
|
|
47
|
+
slug: SlugFieldValue;
|
|
48
|
+
string: StringFieldValue;
|
|
49
|
+
structured_text: StructuredTextFieldValue;
|
|
50
|
+
text: TextFieldValue;
|
|
51
|
+
video: VideoFieldValue;
|
|
52
|
+
unknown: unknown;
|
|
53
|
+
};
|
|
54
|
+
/** Localized wrapper */
|
|
55
|
+
type LocalizeIfNeeded<T extends FieldDefinition, Value> = T extends {
|
|
56
|
+
localized: true;
|
|
57
|
+
} ? LocalizedFieldValue<Value> : Value;
|
|
58
|
+
/** Standard mapping */
|
|
59
|
+
type FieldDefinitionToFieldValue<T extends FieldDefinition> = LocalizeIfNeeded<T, FieldTypeToValue[T['type']]>;
|
|
60
|
+
/** AsRequest mapping (block fields become generic over allowed blocks) */
|
|
61
|
+
type FieldDefinitionToFieldValueAsRequest<T extends FieldDefinition> = T extends RichTextFieldDefinition<infer B> ? LocalizeIfNeeded<T, RichTextFieldValueAsRequest<ItemTypeDefinitionToItemDefinitionAsRequest<B>>> : T extends SingleBlockFieldDefinition<infer B> ? LocalizeIfNeeded<T, SingleBlockFieldValueAsRequest<ItemTypeDefinitionToItemDefinitionAsRequest<B>>> : T extends StructuredTextFieldDefinition<infer B, infer I> ? LocalizeIfNeeded<T, StructuredTextFieldValueAsRequest<ItemTypeDefinitionToItemDefinitionAsRequest<B>, ItemTypeDefinitionToItemDefinitionAsRequest<I>>> : LocalizeIfNeeded<T, FieldTypeToValue[T['type']]>;
|
|
62
|
+
type FieldDefinitionToFieldValueWithNestedBlocks<T extends FieldDefinition> = T extends RichTextFieldDefinition<infer B> ? LocalizeIfNeeded<T, RichTextFieldValueWithNestedBlocks<ItemTypeDefinitionToItemDefinitionWithNestedBlocks<B>>> : T extends SingleBlockFieldDefinition<infer B> ? LocalizeIfNeeded<T, SingleBlockFieldValueWithNestedBlocks<ItemTypeDefinitionToItemDefinitionWithNestedBlocks<B>>> : T extends StructuredTextFieldDefinition<infer B, infer I> ? LocalizeIfNeeded<T, StructuredTextFieldValueWithNestedBlocks<ItemTypeDefinitionToItemDefinitionWithNestedBlocks<B>, ItemTypeDefinitionToItemDefinitionWithNestedBlocks<I>>> : LocalizeIfNeeded<T, FieldTypeToValue[T['type']]>;
|
|
63
|
+
/** Transformers */
|
|
64
|
+
export type ItemTypeDefinitionToItemDefinition<T extends ItemTypeDefinition> = T extends ItemTypeDefinition ? keyof T['fields'] extends never ? ItemDefinition<T['itemTypeId']> : ItemDefinition<T['itemTypeId'], {
|
|
65
|
+
[K in keyof T['fields']]: T['fields'][K] extends FieldDefinition ? FieldDefinitionToFieldValue<T['fields'][K]> : never;
|
|
66
|
+
}> : never;
|
|
67
|
+
export type ItemTypeDefinitionToItemDefinitionAsRequest<T extends ItemTypeDefinition> = T extends ItemTypeDefinition ? keyof T['fields'] extends never ? ItemDefinition<T['itemTypeId']> : ItemDefinition<T['itemTypeId'], Partial<{
|
|
68
|
+
[K in keyof T['fields']]: T['fields'][K] extends FieldDefinition ? FieldDefinitionToFieldValueAsRequest<T['fields'][K]> : never;
|
|
69
|
+
}>> : never;
|
|
70
|
+
export type ItemTypeDefinitionToItemDefinitionWithNestedBlocks<T extends ItemTypeDefinition> = T extends ItemTypeDefinition ? keyof T['fields'] extends never ? ItemDefinition<T['itemTypeId']> : ItemDefinition<T['itemTypeId'], {
|
|
71
|
+
[K in keyof T['fields']]: T['fields'][K] extends FieldDefinition ? FieldDefinitionToFieldValueWithNestedBlocks<T['fields'][K]> : never;
|
|
72
|
+
}> : never;
|
|
73
|
+
export type UnknownField = Record<string, unknown>;
|
|
74
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datocms/cma-client",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.5",
|
|
4
4
|
"description": "JS client for DatoCMS REST Content Management API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"datocms",
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"url": "https://github.com/datocms/js-rest-api-clients/issues"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@datocms/rest-client-utils": "^5.1.
|
|
41
|
-
"datocms-structured-text-utils": "^5.1.
|
|
40
|
+
"@datocms/rest-client-utils": "^5.1.4",
|
|
41
|
+
"datocms-structured-text-utils": "^5.1.1",
|
|
42
42
|
"uuid": "^9.0.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@datocms/dashboard-client": "^5.1.
|
|
45
|
+
"@datocms/dashboard-client": "^5.1.4",
|
|
46
46
|
"@types/uuid": "^9.0.7"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "e23fca2a772dfbc2441d2b8cdabac5f10b437eb0"
|
|
49
49
|
}
|