@datocms/cma-client 1.1.4 → 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.
@@ -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
  *
@@ -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
  *
@@ -14,7 +14,10 @@ export default class ItemType extends BaseResource {
14
14
  * @throws {ApiError}
15
15
  * @throws {TimeoutError}
16
16
  */
17
- create(body: SimpleSchemaTypes.ItemTypeCreateSchema) {
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',