@datocms/cma-client 1.1.3 → 1.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/generated/resources/ItemType.js +4 -3
- package/dist/cjs/generated/resources/ItemType.js.map +1 -1
- package/dist/cjs/generated/resources/Upload.js +4 -4
- package/dist/cjs/generated/resources/Upload.js.map +1 -1
- package/dist/esm/generated/SchemaTypes.d.ts +22 -10
- package/dist/esm/generated/SimpleSchemaTypes.d.ts +22 -10
- package/dist/esm/generated/resources/ItemType.d.ts +2 -2
- package/dist/esm/generated/resources/ItemType.js +4 -3
- package/dist/esm/generated/resources/ItemType.js.map +1 -1
- package/dist/esm/generated/resources/Upload.d.ts +2 -2
- package/dist/esm/generated/resources/Upload.js +4 -4
- package/dist/esm/generated/resources/Upload.js.map +1 -1
- package/dist/types/generated/SchemaTypes.d.ts +22 -10
- package/dist/types/generated/SimpleSchemaTypes.d.ts +22 -10
- package/dist/types/generated/resources/ItemType.d.ts +2 -2
- package/dist/types/generated/resources/Upload.d.ts +2 -2
- package/package.json +4 -4
- package/resources.json +2278 -161
- package/src/generated/SchemaTypes.ts +22 -10
- package/src/generated/SimpleSchemaTypes.ts +22 -10
- package/src/generated/resources/ItemType.ts +7 -1
- package/src/generated/resources/Upload.ts +3 -3
|
@@ -359,6 +359,17 @@ export type FieldsetIdentity = string;
|
|
|
359
359
|
* via the `definition` "type".
|
|
360
360
|
*/
|
|
361
361
|
export type WorkflowType = 'workflow';
|
|
362
|
+
/**
|
|
363
|
+
* This interface was referenced by `ItemType`'s JSON-Schema
|
|
364
|
+
* via the `create.hrefSchema` link.
|
|
365
|
+
*/
|
|
366
|
+
export type ItemTypeCreateHrefSchema = {
|
|
367
|
+
/**
|
|
368
|
+
* Skip the creation of a menu item linked to the model
|
|
369
|
+
*/
|
|
370
|
+
skip_menu_item_creation?: string;
|
|
371
|
+
[k: string]: unknown;
|
|
372
|
+
};
|
|
362
373
|
/**
|
|
363
374
|
* JSON API type field
|
|
364
375
|
*
|
|
@@ -4360,9 +4371,9 @@ export type ItemTypeDestroyJobSchema = {
|
|
|
4360
4371
|
*
|
|
4361
4372
|
* Only accept assets with specific file extensions.
|
|
4362
4373
|
*
|
|
4363
|
-
* | Parameter | Type
|
|
4364
|
-
* | ----------------- |
|
|
4365
|
-
* | `extensions` | `Array<String>`
|
|
4374
|
+
* | Parameter | Type | Required | Description |
|
|
4375
|
+
* | ----------------- | ------------------------------------------------------------------ | -------- | ------------------------------ |
|
|
4376
|
+
* | `extensions` | `Array<String>` | | Set of allowed file extensions |
|
|
4366
4377
|
* | `predefined_list` | one of `"image"`, `"transformable_image"`, `"video"`, `"document"` | | Allowed file type |
|
|
4367
4378
|
*
|
|
4368
4379
|
* Only one of the parameters must be specified.
|
|
@@ -4805,13 +4816,14 @@ export type ItemTypeDestroyJobSchema = {
|
|
|
4805
4816
|
*
|
|
4806
4817
|
* Built-in editor for _Structured text_ fields.
|
|
4807
4818
|
*
|
|
4808
|
-
* | Parameter | Type
|
|
4809
|
-
* | ------------------------- |
|
|
4810
|
-
* | `nodes` | `Array<String>`
|
|
4811
|
-
* | `marks` | `Array<String>`
|
|
4812
|
-
* | `
|
|
4813
|
-
* | `
|
|
4814
|
-
* | `
|
|
4819
|
+
* | Parameter | Type | Required | Description |
|
|
4820
|
+
* | ------------------------- | ---------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
4821
|
+
* | `nodes` | `Array<String>` | ✅ | Specify which nodes the field should allow. Valid values: `"blockquote"`, `"code"`, `"heading"`, `"link"`, `"list"`, `"thematicBreak"` |
|
|
4822
|
+
* | `marks` | `Array<String>` | ✅ | Specify which marks the field should allow. Valid values: `"strong"`, `"emphasis"`, `"underline"`, `"strikethrough"`, `"code"`, `"highlight"` |
|
|
4823
|
+
* | `heading_levels` | `Array<Integer>` | ✅ | If `nodes` includes `"heading"`, specify which heading levels the field should allow. Valid values: numbers between 1 and 6 |
|
|
4824
|
+
* | `blocks_start_collapsed` | `Boolean` | | Whether you want block nodes collapsed by default or not |
|
|
4825
|
+
* | `show_links_target_blank` | `Boolean` | | Whether you want to show the "Open this link in a new tab?" checkbox, that fills in the `target: "_blank"` meta attribute for links |
|
|
4826
|
+
* | `show_links_meta_editor` | `Boolean` | | Whether you want to show the complete meta editor for links |
|
|
4815
4827
|
*
|
|
4816
4828
|
* </details>
|
|
4817
4829
|
*
|
|
@@ -399,6 +399,17 @@ export type FieldsetIdentity = string;
|
|
|
399
399
|
* via the `definition` "type".
|
|
400
400
|
*/
|
|
401
401
|
export type WorkflowType = 'workflow';
|
|
402
|
+
/**
|
|
403
|
+
* This interface was referenced by `ItemType`'s JSON-Schema
|
|
404
|
+
* via the `create.hrefSchema` link.
|
|
405
|
+
*/
|
|
406
|
+
export type ItemTypeCreateHrefSchema = {
|
|
407
|
+
/**
|
|
408
|
+
* Skip the creation of a menu item linked to the model
|
|
409
|
+
*/
|
|
410
|
+
skip_menu_item_creation?: string;
|
|
411
|
+
[k: string]: unknown;
|
|
412
|
+
};
|
|
402
413
|
/**
|
|
403
414
|
* ID of job
|
|
404
415
|
*
|
|
@@ -4875,9 +4886,9 @@ export type JobData = {
|
|
|
4875
4886
|
*
|
|
4876
4887
|
* Only accept assets with specific file extensions.
|
|
4877
4888
|
*
|
|
4878
|
-
* | Parameter | Type
|
|
4879
|
-
* | ----------------- |
|
|
4880
|
-
* | `extensions` | `Array<String>`
|
|
4889
|
+
* | Parameter | Type | Required | Description |
|
|
4890
|
+
* | ----------------- | ------------------------------------------------------------------ | -------- | ------------------------------ |
|
|
4891
|
+
* | `extensions` | `Array<String>` | | Set of allowed file extensions |
|
|
4881
4892
|
* | `predefined_list` | one of `"image"`, `"transformable_image"`, `"video"`, `"document"` | | Allowed file type |
|
|
4882
4893
|
*
|
|
4883
4894
|
* Only one of the parameters must be specified.
|
|
@@ -5320,13 +5331,14 @@ export type JobData = {
|
|
|
5320
5331
|
*
|
|
5321
5332
|
* Built-in editor for _Structured text_ fields.
|
|
5322
5333
|
*
|
|
5323
|
-
* | Parameter | Type
|
|
5324
|
-
* | ------------------------- |
|
|
5325
|
-
* | `nodes` | `Array<String>`
|
|
5326
|
-
* | `marks` | `Array<String>`
|
|
5327
|
-
* | `
|
|
5328
|
-
* | `
|
|
5329
|
-
* | `
|
|
5334
|
+
* | Parameter | Type | Required | Description |
|
|
5335
|
+
* | ------------------------- | ---------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
5336
|
+
* | `nodes` | `Array<String>` | ✅ | Specify which nodes the field should allow. Valid values: `"blockquote"`, `"code"`, `"heading"`, `"link"`, `"list"`, `"thematicBreak"` |
|
|
5337
|
+
* | `marks` | `Array<String>` | ✅ | Specify which marks the field should allow. Valid values: `"strong"`, `"emphasis"`, `"underline"`, `"strikethrough"`, `"code"`, `"highlight"` |
|
|
5338
|
+
* | `heading_levels` | `Array<Integer>` | ✅ | If `nodes` includes `"heading"`, specify which heading levels the field should allow. Valid values: numbers between 1 and 6 |
|
|
5339
|
+
* | `blocks_start_collapsed` | `Boolean` | | Whether you want block nodes collapsed by default or not |
|
|
5340
|
+
* | `show_links_target_blank` | `Boolean` | | Whether you want to show the "Open this link in a new tab?" checkbox, that fills in the `target: "_blank"` meta attribute for links |
|
|
5341
|
+
* | `show_links_meta_editor` | `Boolean` | | Whether you want to show the complete meta editor for links |
|
|
5330
5342
|
*
|
|
5331
5343
|
* </details>
|
|
5332
5344
|
*
|
|
@@ -14,7 +14,10 @@ export default class ItemType extends BaseResource {
|
|
|
14
14
|
* @throws {ApiError}
|
|
15
15
|
* @throws {TimeoutError}
|
|
16
16
|
*/
|
|
17
|
-
create(
|
|
17
|
+
create(
|
|
18
|
+
body: SimpleSchemaTypes.ItemTypeCreateSchema,
|
|
19
|
+
queryParams?: SimpleSchemaTypes.ItemTypeCreateHrefSchema,
|
|
20
|
+
) {
|
|
18
21
|
return this.rawCreate(
|
|
19
22
|
Utils.serializeRequestBody<SchemaTypes.ItemTypeCreateSchema>(body, {
|
|
20
23
|
type: 'item_type',
|
|
@@ -41,6 +44,7 @@ export default class ItemType extends BaseResource {
|
|
|
41
44
|
'workflow',
|
|
42
45
|
],
|
|
43
46
|
}),
|
|
47
|
+
queryParams,
|
|
44
48
|
).then((body) =>
|
|
45
49
|
Utils.deserializeResponseBody<SimpleSchemaTypes.ItemTypeCreateTargetSchema>(
|
|
46
50
|
body,
|
|
@@ -58,11 +62,13 @@ export default class ItemType extends BaseResource {
|
|
|
58
62
|
*/
|
|
59
63
|
rawCreate(
|
|
60
64
|
body: SchemaTypes.ItemTypeCreateSchema,
|
|
65
|
+
queryParams?: SchemaTypes.ItemTypeCreateHrefSchema,
|
|
61
66
|
): Promise<SchemaTypes.ItemTypeCreateTargetSchema> {
|
|
62
67
|
return this.client.request<SchemaTypes.ItemTypeCreateTargetSchema>({
|
|
63
68
|
method: 'POST',
|
|
64
69
|
url: `/item-types`,
|
|
65
70
|
body,
|
|
71
|
+
queryParams,
|
|
66
72
|
});
|
|
67
73
|
}
|
|
68
74
|
|
|
@@ -261,16 +261,16 @@ export default class Upload extends BaseResource {
|
|
|
261
261
|
* @deprecated This API call is to be considered private and might change without notice
|
|
262
262
|
*/
|
|
263
263
|
batchAddTags(
|
|
264
|
-
queryParams: SimpleSchemaTypes.UploadBatchAddTagsHrefSchema,
|
|
265
264
|
body: SimpleSchemaTypes.UploadBatchAddTagsSchema,
|
|
265
|
+
queryParams?: SimpleSchemaTypes.UploadBatchAddTagsHrefSchema,
|
|
266
266
|
) {
|
|
267
267
|
return this.rawBatchAddTags(
|
|
268
|
-
queryParams,
|
|
269
268
|
Utils.serializeRequestBody<SchemaTypes.UploadBatchAddTagsSchema>(body, {
|
|
270
269
|
type: 'upload',
|
|
271
270
|
attributes: ['tags'],
|
|
272
271
|
relationships: [],
|
|
273
272
|
}),
|
|
273
|
+
queryParams,
|
|
274
274
|
).then((body) =>
|
|
275
275
|
Utils.deserializeResponseBody<SimpleSchemaTypes.UploadBatchAddTagsJobSchema>(
|
|
276
276
|
body,
|
|
@@ -289,8 +289,8 @@ export default class Upload extends BaseResource {
|
|
|
289
289
|
* @deprecated This API call is to be considered private and might change without notice
|
|
290
290
|
*/
|
|
291
291
|
rawBatchAddTags(
|
|
292
|
-
queryParams: SchemaTypes.UploadBatchAddTagsHrefSchema,
|
|
293
292
|
body: SchemaTypes.UploadBatchAddTagsSchema,
|
|
293
|
+
queryParams?: SchemaTypes.UploadBatchAddTagsHrefSchema,
|
|
294
294
|
): Promise<SchemaTypes.UploadBatchAddTagsJobSchema> {
|
|
295
295
|
return this.client.request<SchemaTypes.UploadBatchAddTagsJobSchema>({
|
|
296
296
|
method: 'PUT',
|