@datocms/cma-client 1.1.4 → 1.1.6

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
  *
@@ -10093,6 +10104,10 @@ export type WorkflowAttributes = {
10093
10104
  * The name of the workflow
10094
10105
  */
10095
10106
  name: string;
10107
+ /**
10108
+ * Workflow API key
10109
+ */
10110
+ api_key: string;
10096
10111
  /**
10097
10112
  * The stages of the workflow
10098
10113
  */
@@ -10143,7 +10158,6 @@ export type WorkflowAttributes = {
10143
10158
  export type WorkflowCreateSchema = {
10144
10159
  data: {
10145
10160
  type: WorkflowType;
10146
- id: WorkflowIdentity;
10147
10161
  /**
10148
10162
  * JSON API attributes
10149
10163
  */
@@ -10152,6 +10166,10 @@ export type WorkflowCreateSchema = {
10152
10166
  * The name of the workflow
10153
10167
  */
10154
10168
  name: string;
10169
+ /**
10170
+ * Workflow API key
10171
+ */
10172
+ api_key: string;
10155
10173
  /**
10156
10174
  * The stages of the workflow
10157
10175
  */
@@ -10221,6 +10239,10 @@ export type WorkflowUpdateSchema = {
10221
10239
  * The name of the workflow
10222
10240
  */
10223
10241
  name?: string;
10242
+ /**
10243
+ * Workflow API key
10244
+ */
10245
+ api_key?: string;
10224
10246
  /**
10225
10247
  * The stages of the workflow
10226
10248
  */
@@ -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
  *
@@ -9826,6 +9837,10 @@ export type Workflow = {
9826
9837
  * The name of the workflow
9827
9838
  */
9828
9839
  name: string;
9840
+ /**
9841
+ * Workflow API key
9842
+ */
9843
+ api_key: string;
9829
9844
  /**
9830
9845
  * The stages of the workflow
9831
9846
  */
@@ -9882,6 +9897,10 @@ export type WorkflowAttributes = {
9882
9897
  * The name of the workflow
9883
9898
  */
9884
9899
  name: string;
9900
+ /**
9901
+ * Workflow API key
9902
+ */
9903
+ api_key: string;
9885
9904
  /**
9886
9905
  * The stages of the workflow
9887
9906
  */
@@ -9930,12 +9949,15 @@ export type WorkflowAttributes = {
9930
9949
  * via the `create.schema` link.
9931
9950
  */
9932
9951
  export type WorkflowCreateSchema = {
9933
- id?: WorkflowIdentity;
9934
9952
  type?: WorkflowType;
9935
9953
  /**
9936
9954
  * The name of the workflow
9937
9955
  */
9938
9956
  name: string;
9957
+ /**
9958
+ * Workflow API key
9959
+ */
9960
+ api_key: string;
9939
9961
  /**
9940
9962
  * The stages of the workflow
9941
9963
  */
@@ -9990,6 +10012,10 @@ export type WorkflowUpdateSchema = {
9990
10012
  * The name of the workflow
9991
10013
  */
9992
10014
  name?: string;
10015
+ /**
10016
+ * Workflow API key
10017
+ */
10018
+ api_key?: string;
9993
10019
  /**
9994
10020
  * The stages of the workflow
9995
10021
  */
@@ -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',
@@ -18,7 +18,7 @@ export default class Workflow extends BaseResource {
18
18
  return this.rawCreate(
19
19
  Utils.serializeRequestBody<SchemaTypes.WorkflowCreateSchema>(body, {
20
20
  type: 'workflow',
21
- attributes: ['name', 'stages'],
21
+ attributes: ['name', 'api_key', 'stages'],
22
22
  relationships: [],
23
23
  }),
24
24
  ).then((body) =>
@@ -63,7 +63,7 @@ export default class Workflow extends BaseResource {
63
63
  Utils.serializeRequestBody<SchemaTypes.WorkflowUpdateSchema>(body, {
64
64
  id: Utils.toId(workflowId),
65
65
  type: 'workflow',
66
- attributes: ['name', 'stages'],
66
+ attributes: ['name', 'api_key', 'stages'],
67
67
  relationships: [],
68
68
  }),
69
69
  ).then((body) =>