@datocms/cma-client 3.3.5 → 3.3.8

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.
Files changed (53) hide show
  1. package/dist/cjs/generated/Client.js +2 -1
  2. package/dist/cjs/generated/Client.js.map +1 -1
  3. package/dist/cjs/generated/resources/Role.js +2 -0
  4. package/dist/cjs/generated/resources/Role.js.map +1 -1
  5. package/dist/cjs/generated/resources/Upload.js +34 -2
  6. package/dist/cjs/generated/resources/Upload.js.map +1 -1
  7. package/dist/cjs/generated/resources/UploadCollection.js +202 -0
  8. package/dist/cjs/generated/resources/UploadCollection.js.map +1 -0
  9. package/dist/cjs/generated/resources/Webhook.js +2 -0
  10. package/dist/cjs/generated/resources/Webhook.js.map +1 -1
  11. package/dist/cjs/generated/resources/WebhookCall.js +27 -0
  12. package/dist/cjs/generated/resources/WebhookCall.js.map +1 -1
  13. package/dist/cjs/generated/resources/index.js +3 -1
  14. package/dist/cjs/generated/resources/index.js.map +1 -1
  15. package/dist/esm/generated/Client.d.ts +1 -0
  16. package/dist/esm/generated/Client.js +2 -1
  17. package/dist/esm/generated/Client.js.map +1 -1
  18. package/dist/esm/generated/SchemaTypes.d.ts +397 -30
  19. package/dist/esm/generated/SimpleSchemaTypes.d.ts +329 -39
  20. package/dist/esm/generated/resources/Role.js +2 -0
  21. package/dist/esm/generated/resources/Role.js.map +1 -1
  22. package/dist/esm/generated/resources/Upload.d.ts +18 -0
  23. package/dist/esm/generated/resources/Upload.js +34 -2
  24. package/dist/esm/generated/resources/Upload.js.map +1 -1
  25. package/dist/esm/generated/resources/UploadCollection.d.ts +96 -0
  26. package/dist/esm/generated/resources/UploadCollection.js +174 -0
  27. package/dist/esm/generated/resources/UploadCollection.js.map +1 -0
  28. package/dist/esm/generated/resources/Webhook.js +2 -0
  29. package/dist/esm/generated/resources/Webhook.js.map +1 -1
  30. package/dist/esm/generated/resources/WebhookCall.d.ts +18 -0
  31. package/dist/esm/generated/resources/WebhookCall.js +27 -0
  32. package/dist/esm/generated/resources/WebhookCall.js.map +1 -1
  33. package/dist/esm/generated/resources/index.d.ts +1 -0
  34. package/dist/esm/generated/resources/index.js +1 -0
  35. package/dist/esm/generated/resources/index.js.map +1 -1
  36. package/dist/types/generated/Client.d.ts +1 -0
  37. package/dist/types/generated/SchemaTypes.d.ts +397 -30
  38. package/dist/types/generated/SimpleSchemaTypes.d.ts +329 -39
  39. package/dist/types/generated/resources/Upload.d.ts +18 -0
  40. package/dist/types/generated/resources/UploadCollection.d.ts +96 -0
  41. package/dist/types/generated/resources/WebhookCall.d.ts +18 -0
  42. package/dist/types/generated/resources/index.d.ts +1 -0
  43. package/package.json +12 -5
  44. package/resources.json +177 -4
  45. package/src/generated/Client.ts +3 -1
  46. package/src/generated/SchemaTypes.ts +541 -32
  47. package/src/generated/SimpleSchemaTypes.ts +510 -42
  48. package/src/generated/resources/Role.ts +2 -0
  49. package/src/generated/resources/Upload.ts +49 -2
  50. package/src/generated/resources/UploadCollection.ts +204 -0
  51. package/src/generated/resources/Webhook.ts +2 -0
  52. package/src/generated/resources/WebhookCall.ts +33 -0
  53. package/src/generated/resources/index.ts +1 -0
@@ -364,6 +364,40 @@ export type SchemaMenuItemInstancesHrefSchema = {
364
364
  ids: string;
365
365
  };
366
366
  };
367
+ /**
368
+ * RFC 4122 UUID of upload collection expressed in URL-safe base64 format
369
+ *
370
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
371
+ * via the `definition` "identity".
372
+ *
373
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
374
+ * via the `definition` "id".
375
+ */
376
+ export type UploadCollectionIdentity = string;
377
+ /**
378
+ * JSON API type field
379
+ *
380
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
381
+ * via the `definition` "type".
382
+ */
383
+ export type UploadCollectionType = 'upload_collection';
384
+ /**
385
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
386
+ * via the `instances.targetSchema` link.
387
+ */
388
+ export type UploadCollectionInstancesTargetSchema = UploadCollection[];
389
+ /**
390
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
391
+ * via the `instances.hrefSchema` link.
392
+ */
393
+ export type UploadCollectionInstancesHrefSchema = {
394
+ filter?: {
395
+ /**
396
+ * IDs to fetch, comma separated
397
+ */
398
+ ids: string;
399
+ };
400
+ };
367
401
  /**
368
402
  * This interface was referenced by `Item`'s JSON-Schema
369
403
  * via the `definition` "type".
@@ -662,7 +696,6 @@ export type ItemInstancesHrefSchema = {
662
696
  * The maximum number of entities to return (defaults to 30, maximum is 500)
663
697
  */
664
698
  limit?: number;
665
- [k: string]: unknown;
666
699
  };
667
700
  /**
668
701
  * Fields used to order results. You **must** specify also `filter[type]` with one element only to be able use this option. Format: `<field_name>_(ASC|DESC)`, where `<field_name>` can be either the API key of a model's field, or one of the following meta columns: `id`, `_updated_at`, `_created_at`, `_status`, `_published_at`, `_first_published_at`, `_publication_scheduled_at`, `_unpublishing_scheduled_at`, `_is_valid`, `position` (only for sortable models). You can pass multiple comma separated rules.
@@ -916,7 +949,6 @@ export type ItemVersionInstancesHrefSchema = {
916
949
  * The maximum number of entities to return (defaults to 15, maximum is 50)
917
950
  */
918
951
  limit?: number;
919
- [k: string]: unknown;
920
952
  };
921
953
  [k: string]: unknown;
922
954
  };
@@ -985,7 +1017,6 @@ export type UploadInstancesHrefSchema = {
985
1017
  * The maximum number of entities to return (defaults to 30, maximum is 500)
986
1018
  */
987
1019
  limit?: number;
988
- [k: string]: unknown;
989
1020
  };
990
1021
  [k: string]: unknown;
991
1022
  };
@@ -1046,6 +1077,11 @@ export type UploadReferencesHrefSchema = {
1046
1077
  * via the `bulk_tag.jobSchema` link.
1047
1078
  */
1048
1079
  export type UploadBulkTagJobSchema = unknown[];
1080
+ /**
1081
+ * This interface was referenced by `Upload`'s JSON-Schema
1082
+ * via the `bulk_set_upload_collection.jobSchema` link.
1083
+ */
1084
+ export type UploadBulkSetUploadCollectionJobSchema = unknown[];
1049
1085
  /**
1050
1086
  * This interface was referenced by `Upload`'s JSON-Schema
1051
1087
  * via the `bulk_destroy.jobSchema` link.
@@ -1123,7 +1159,6 @@ export type SearchResultInstancesHrefSchema = {
1123
1159
  * The maximum number of entities to return (defaults to 20, maximum is 100)
1124
1160
  */
1125
1161
  limit?: number;
1126
- [k: string]: unknown;
1127
1162
  };
1128
1163
  /**
1129
1164
  * Attributes to filter search results
@@ -1271,8 +1306,55 @@ export type WebhookCallInstancesHrefSchema = {
1271
1306
  * The maximum number of entities to return (defaults to 30, maximum is 500)
1272
1307
  */
1273
1308
  limit?: number;
1274
- [k: string]: unknown;
1275
1309
  };
1310
+ /**
1311
+ * Attributes to filter
1312
+ */
1313
+ filter?: {
1314
+ /**
1315
+ * IDs to fetch, comma separated
1316
+ */
1317
+ ids?: string;
1318
+ fields?: {
1319
+ webhook_id?: {
1320
+ eq?: string;
1321
+ };
1322
+ entity_type?: {
1323
+ /**
1324
+ * The subject of webhook triggering
1325
+ */
1326
+ eq?: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
1327
+ };
1328
+ event_type?: {
1329
+ /**
1330
+ * The event that triggers the webhook call
1331
+ */
1332
+ eq?: 'create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate';
1333
+ };
1334
+ status?: {
1335
+ /**
1336
+ * The current status
1337
+ */
1338
+ eq?: 'pending' | 'success' | 'failed' | 'rescheduled';
1339
+ };
1340
+ last_sent_at?: {
1341
+ gt?: string;
1342
+ lt?: string;
1343
+ };
1344
+ next_retry_at?: {
1345
+ gt?: string;
1346
+ lt?: string;
1347
+ };
1348
+ created_at?: {
1349
+ gt?: string;
1350
+ lt?: string;
1351
+ };
1352
+ };
1353
+ };
1354
+ /**
1355
+ * Fields used to order results
1356
+ */
1357
+ order_by?: 'webhook_id_asc' | 'webhook_id_desc' | 'created_at_asc' | 'created_at_desc' | 'last_sent_at_asc' | 'last_sent_at_desc' | 'next_retry_at_asc' | 'next_retry_at_desc';
1276
1358
  [k: string]: unknown;
1277
1359
  };
1278
1360
  /**
@@ -1561,7 +1643,6 @@ export type UploadTagInstancesHrefSchema = {
1561
1643
  * The maximum number of entities to return (defaults to 50, maximum is 500)
1562
1644
  */
1563
1645
  limit?: number;
1564
- [k: string]: unknown;
1565
1646
  };
1566
1647
  [k: string]: unknown;
1567
1648
  };
@@ -1612,7 +1693,6 @@ export type UploadSmartTagInstancesHrefSchema = {
1612
1693
  * The maximum number of entities to return (defaults to 50, maximum is 500)
1613
1694
  */
1614
1695
  limit?: number;
1615
- [k: string]: unknown;
1616
1696
  };
1617
1697
  [k: string]: unknown;
1618
1698
  };
@@ -1657,6 +1737,7 @@ export type DatoApi = {
1657
1737
  site_plan?: SitePlan;
1658
1738
  menu_item?: MenuItem;
1659
1739
  schema_menu_item?: SchemaMenuItem;
1740
+ upload_collection?: UploadCollection;
1660
1741
  item_type?: ItemType;
1661
1742
  field?: Field;
1662
1743
  fieldset?: Fieldset;
@@ -1748,7 +1829,11 @@ export type Role = {
1748
1829
  /**
1749
1830
  * Can create/edit shared filters (both for models and the media area)
1750
1831
  */
1751
- can_manage_shared_filters?: boolean;
1832
+ can_manage_shared_filters: boolean;
1833
+ /**
1834
+ * Can create/edit upload collections
1835
+ */
1836
+ can_manage_upload_collections: boolean;
1752
1837
  /**
1753
1838
  * Can create/edit Build triggers
1754
1839
  */
@@ -1956,7 +2041,11 @@ export type RoleMeta = {
1956
2041
  /**
1957
2042
  * Can create/edit shared filters (both for models and the media area)
1958
2043
  */
1959
- can_manage_shared_filters?: boolean;
2044
+ can_manage_shared_filters: boolean;
2045
+ /**
2046
+ * Can create/edit upload collections
2047
+ */
2048
+ can_manage_upload_collections: boolean;
1960
2049
  /**
1961
2050
  * Can create/edit Build triggers
1962
2051
  */
@@ -2149,7 +2238,11 @@ export type RoleAttributes = {
2149
2238
  /**
2150
2239
  * Can create/edit shared filters (both for models and the media area)
2151
2240
  */
2152
- can_manage_shared_filters?: boolean;
2241
+ can_manage_shared_filters: boolean;
2242
+ /**
2243
+ * Can create/edit upload collections
2244
+ */
2245
+ can_manage_upload_collections: boolean;
2153
2246
  /**
2154
2247
  * Can create/edit Build triggers
2155
2248
  */
@@ -2350,6 +2443,10 @@ export type RoleCreateSchema = {
2350
2443
  * Can create/edit shared filters (both for models and the media area)
2351
2444
  */
2352
2445
  can_manage_shared_filters?: boolean;
2446
+ /**
2447
+ * Can create/edit upload collections
2448
+ */
2449
+ can_manage_upload_collections?: boolean;
2353
2450
  /**
2354
2451
  * Can create/edit Build triggers
2355
2452
  */
@@ -2544,6 +2641,10 @@ export type RoleUpdateSchema = {
2544
2641
  * Can create/edit shared filters (both for models and the media area)
2545
2642
  */
2546
2643
  can_manage_shared_filters?: boolean;
2644
+ /**
2645
+ * Can create/edit upload collections
2646
+ */
2647
+ can_manage_upload_collections?: boolean;
2547
2648
  /**
2548
2649
  * Can create/edit Build triggers
2549
2650
  */
@@ -4088,6 +4189,101 @@ export type SchemaMenuItemUpdateSchema = {
4088
4189
  parent?: null | SchemaMenuItemData;
4089
4190
  children?: SchemaMenuItemData[];
4090
4191
  };
4192
+ /**
4193
+ * In DatoCMS you can organize the uploads present in your administrative area in collection, so that the final editors can easily navigate uploads.
4194
+ *
4195
+ * This interface was referenced by `DatoApi`'s JSON-Schema
4196
+ * via the `definition` "upload_collection".
4197
+ */
4198
+ export type UploadCollection = {
4199
+ id: UploadCollectionIdentity;
4200
+ type: UploadCollectionType;
4201
+ /**
4202
+ * The label of the upload collection
4203
+ */
4204
+ label: string;
4205
+ /**
4206
+ * Ordering index
4207
+ */
4208
+ position: number;
4209
+ parent: null | UploadCollectionData;
4210
+ children: UploadCollectionData[];
4211
+ };
4212
+ export type UploadCollectionCreateTargetSchema = UploadCollection;
4213
+ export type UploadCollectionUpdateTargetSchema = UploadCollection;
4214
+ export type UploadCollectionSelfTargetSchema = UploadCollection;
4215
+ export type UploadCollectionDestroyTargetSchema = UploadCollection;
4216
+ /**
4217
+ * JSON API data
4218
+ *
4219
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
4220
+ * via the `definition` "data".
4221
+ */
4222
+ export type UploadCollectionData = {
4223
+ type: UploadCollectionType;
4224
+ id: UploadCollectionIdentity;
4225
+ };
4226
+ /**
4227
+ * JSON API attributes
4228
+ *
4229
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
4230
+ * via the `definition` "attributes".
4231
+ */
4232
+ export type UploadCollectionAttributes = {
4233
+ /**
4234
+ * The label of the upload collection
4235
+ */
4236
+ label: string;
4237
+ /**
4238
+ * Ordering index
4239
+ */
4240
+ position: number;
4241
+ };
4242
+ /**
4243
+ * JSON API links
4244
+ *
4245
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
4246
+ * via the `definition` "relationships".
4247
+ */
4248
+ export type UploadCollectionRelationships = {
4249
+ parent: null | UploadCollectionData;
4250
+ children: UploadCollectionData[];
4251
+ };
4252
+ /**
4253
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
4254
+ * via the `create.schema` link.
4255
+ */
4256
+ export type UploadCollectionCreateSchema = {
4257
+ id?: UploadCollectionIdentity;
4258
+ type?: UploadCollectionType;
4259
+ /**
4260
+ * The label of the upload collection
4261
+ */
4262
+ label: string;
4263
+ /**
4264
+ * Ordering index
4265
+ */
4266
+ position?: number;
4267
+ parent?: null | UploadCollectionData;
4268
+ };
4269
+ /**
4270
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
4271
+ * via the `update.schema` link.
4272
+ */
4273
+ export type UploadCollectionUpdateSchema = {
4274
+ id?: UploadCollectionIdentity;
4275
+ type?: UploadCollectionType;
4276
+ /**
4277
+ * The label of the upload collection
4278
+ */
4279
+ label?: string;
4280
+ /**
4281
+ * Ordering index
4282
+ */
4283
+ position?: number;
4284
+ parent?: null | UploadCollectionData;
4285
+ children?: UploadCollectionData[];
4286
+ };
4091
4287
  /**
4092
4288
  * The way you define the kind of content you can edit inside your administrative area passes through the concept of Models, which are much like database tables. For backward-compatibility reasons, the API refers to models as "item types".
4093
4289
  *
@@ -4521,6 +4717,9 @@ export type ItemTypeUpdateSchema = {
4521
4717
  * via the `bulk_tag.targetSchema` link.
4522
4718
  *
4523
4719
  * This interface was referenced by `Upload`'s JSON-Schema
4720
+ * via the `bulk_set_upload_collection.targetSchema` link.
4721
+ *
4722
+ * This interface was referenced by `Upload`'s JSON-Schema
4524
4723
  * via the `bulk_destroy.targetSchema` link.
4525
4724
  *
4526
4725
  * This interface was referenced by `UploadTrack`'s JSON-Schema
@@ -4566,6 +4765,7 @@ export type UploadUpdateTargetSchema = Job;
4566
4765
  export type UploadBatchAddTagsTargetSchema = Job;
4567
4766
  export type UploadBatchDestroyTargetSchema = Job;
4568
4767
  export type UploadBulkTagTargetSchema = Job;
4768
+ export type UploadBulkSetUploadCollectionTargetSchema = Job;
4569
4769
  export type UploadBulkDestroyTargetSchema = Job;
4570
4770
  export type UploadTrackCreateTargetSchema = Job;
4571
4771
  export type UploadTrackDestroyTargetSchema = Job;
@@ -7152,6 +7352,7 @@ export type Upload = {
7152
7352
  */
7153
7353
  alpha: number;
7154
7354
  }[];
7355
+ upload_collection: UploadCollectionData | null;
7155
7356
  creator: AccountData | AccessTokenData | UserData | SsoUserData | OrganizationData;
7156
7357
  };
7157
7358
  export type UploadCreateJobSchema = Upload;
@@ -7344,6 +7545,7 @@ export type UploadAttributes = {
7344
7545
  * via the `definition` "relationships".
7345
7546
  */
7346
7547
  export type UploadRelationships = {
7548
+ upload_collection: UploadCollectionData | null;
7347
7549
  creator: AccountData | AccessTokenData | UserData | SsoUserData | OrganizationData;
7348
7550
  };
7349
7551
  /**
@@ -7411,6 +7613,7 @@ export type UploadCreateSchema = {
7411
7613
  * Tags
7412
7614
  */
7413
7615
  tags?: string[];
7616
+ upload_collection?: UploadCollectionData | null;
7414
7617
  };
7415
7618
  /**
7416
7619
  * This interface was referenced by `Upload`'s JSON-Schema
@@ -7482,6 +7685,7 @@ export type UploadUpdateSchema = {
7482
7685
  };
7483
7686
  };
7484
7687
  creator?: AccountData | AccessTokenData | UserData | SsoUserData | OrganizationData;
7688
+ upload_collection?: UploadCollectionData | null;
7485
7689
  };
7486
7690
  /**
7487
7691
  * This interface was referenced by `Upload`'s JSON-Schema
@@ -7506,6 +7710,15 @@ export type UploadBulkTagSchema = {
7506
7710
  tags: string[];
7507
7711
  uploads: UploadData[];
7508
7712
  };
7713
+ /**
7714
+ * This interface was referenced by `Upload`'s JSON-Schema
7715
+ * via the `bulk_set_upload_collection.schema` link.
7716
+ */
7717
+ export type UploadBulkSetUploadCollectionSchema = {
7718
+ type?: 'upload_bulk_set_upload_collection_operation';
7719
+ upload_collection: null | UploadCollectionData;
7720
+ uploads: UploadData[];
7721
+ };
7509
7722
  /**
7510
7723
  * This interface was referenced by `Upload`'s JSON-Schema
7511
7724
  * via the `bulk_destroy.schema` link.
@@ -8087,12 +8300,19 @@ export type Webhook = {
8087
8300
  * Additional headers that will be sent
8088
8301
  */
8089
8302
  headers: {
8090
- [k: string]: unknown;
8303
+ [k: string]: string;
8091
8304
  };
8092
- /**
8093
- * All the events you will be notified for
8094
- */
8095
- events: unknown[];
8305
+ events: {
8306
+ /**
8307
+ * The subject of webhook triggering
8308
+ */
8309
+ entity_type: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
8310
+ event_types: ('create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate')[];
8311
+ filters?: {
8312
+ entity_type: 'item_type' | 'item' | 'build_trigger' | 'environment' | 'environment_type';
8313
+ entity_ids: [string, ...string[]];
8314
+ }[] | null;
8315
+ }[];
8096
8316
  /**
8097
8317
  * Specifies which API version to use when serializing entities in the webhook payload
8098
8318
  */
@@ -8101,6 +8321,10 @@ export type Webhook = {
8101
8321
  * Whether the you want records present in the payload to show blocks expanded or not
8102
8322
  */
8103
8323
  nested_items_in_payload: boolean;
8324
+ /**
8325
+ * If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
8326
+ */
8327
+ auto_retry: boolean;
8104
8328
  };
8105
8329
  export type WebhookCreateTargetSchema = Webhook;
8106
8330
  export type WebhookUpdateTargetSchema = Webhook;
@@ -8151,12 +8375,19 @@ export type WebhookAttributes = {
8151
8375
  * Additional headers that will be sent
8152
8376
  */
8153
8377
  headers: {
8154
- [k: string]: unknown;
8378
+ [k: string]: string;
8155
8379
  };
8156
- /**
8157
- * All the events you will be notified for
8158
- */
8159
- events: unknown[];
8380
+ events: {
8381
+ /**
8382
+ * The subject of webhook triggering
8383
+ */
8384
+ entity_type: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
8385
+ event_types: ('create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate')[];
8386
+ filters?: {
8387
+ entity_type: 'item_type' | 'item' | 'build_trigger' | 'environment' | 'environment_type';
8388
+ entity_ids: [string, ...string[]];
8389
+ }[] | null;
8390
+ }[];
8160
8391
  /**
8161
8392
  * Specifies which API version to use when serializing entities in the webhook payload
8162
8393
  */
@@ -8165,6 +8396,10 @@ export type WebhookAttributes = {
8165
8396
  * Whether the you want records present in the payload to show blocks expanded or not
8166
8397
  */
8167
8398
  nested_items_in_payload: boolean;
8399
+ /**
8400
+ * If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
8401
+ */
8402
+ auto_retry: boolean;
8168
8403
  };
8169
8404
  /**
8170
8405
  * This interface was referenced by `Webhook`'s JSON-Schema
@@ -8188,12 +8423,19 @@ export type WebhookCreateSchema = {
8188
8423
  * Additional headers that will be sent
8189
8424
  */
8190
8425
  headers: {
8191
- [k: string]: unknown;
8426
+ [k: string]: string;
8192
8427
  };
8193
- /**
8194
- * All the events you will be notified for
8195
- */
8196
- events: unknown[];
8428
+ events: {
8429
+ /**
8430
+ * The subject of webhook triggering
8431
+ */
8432
+ entity_type: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
8433
+ event_types: ('create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate')[];
8434
+ filters?: {
8435
+ entity_type: 'item_type' | 'item' | 'build_trigger' | 'environment' | 'environment_type';
8436
+ entity_ids: [string, ...string[]];
8437
+ }[] | null;
8438
+ }[];
8197
8439
  /**
8198
8440
  * HTTP Basic Authorization username
8199
8441
  */
@@ -8214,6 +8456,10 @@ export type WebhookCreateSchema = {
8214
8456
  * Whether the you want records present in the payload to show blocks expanded or not
8215
8457
  */
8216
8458
  nested_items_in_payload?: boolean;
8459
+ /**
8460
+ * If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
8461
+ */
8462
+ auto_retry?: boolean;
8217
8463
  };
8218
8464
  /**
8219
8465
  * This interface was referenced by `Webhook`'s JSON-Schema
@@ -8238,12 +8484,19 @@ export type WebhookUpdateSchema = {
8238
8484
  * Additional headers that will be sent
8239
8485
  */
8240
8486
  headers?: {
8241
- [k: string]: unknown;
8487
+ [k: string]: string;
8242
8488
  };
8243
- /**
8244
- * All the events you will be notified for
8245
- */
8246
- events?: unknown[];
8489
+ events?: {
8490
+ /**
8491
+ * The subject of webhook triggering
8492
+ */
8493
+ entity_type: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
8494
+ event_types: ('create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate')[];
8495
+ filters?: {
8496
+ entity_type: 'item_type' | 'item' | 'build_trigger' | 'environment' | 'environment_type';
8497
+ entity_ids: [string, ...string[]];
8498
+ }[] | null;
8499
+ }[];
8247
8500
  /**
8248
8501
  * HTTP Basic Authorization username
8249
8502
  */
@@ -8264,9 +8517,13 @@ export type WebhookUpdateSchema = {
8264
8517
  * Whether the you want records present in the payload to show blocks expanded or not
8265
8518
  */
8266
8519
  nested_items_in_payload?: boolean;
8520
+ /**
8521
+ * If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
8522
+ */
8523
+ auto_retry?: boolean;
8267
8524
  };
8268
8525
  /**
8269
- * Represents a log entry in the webhooks activity list.
8526
+ * This represents a log entry in the webhooks activity list, detailing a specific webhook event along with its delivery attempt information.
8270
8527
  *
8271
8528
  * This interface was referenced by `DatoApi`'s JSON-Schema
8272
8529
  * via the `definition` "webhook_call".
@@ -8277,13 +8534,13 @@ export type WebhookCall = {
8277
8534
  /**
8278
8535
  * The subject of webhook triggering
8279
8536
  */
8280
- entity_type: 'item' | 'item_type' | 'upload';
8537
+ entity_type: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
8281
8538
  /**
8282
8539
  * The event that triggers the webhook call
8283
8540
  */
8284
- event_type: 'create' | 'update' | 'delete' | 'publish' | 'unpublish';
8541
+ event_type: 'create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate';
8285
8542
  /**
8286
- * The moment the call occurred
8543
+ * The moment the event was created
8287
8544
  */
8288
8545
  created_at: string;
8289
8546
  /**
@@ -8309,13 +8566,30 @@ export type WebhookCall = {
8309
8566
  */
8310
8567
  response_headers: {
8311
8568
  [k: string]: unknown;
8312
- };
8569
+ } | null;
8313
8570
  /**
8314
8571
  * The body of the response
8315
8572
  */
8316
8573
  response_payload: string | null;
8574
+ /**
8575
+ * The number of retries attempted so far
8576
+ */
8577
+ attempted_auto_retries_count: number;
8578
+ /**
8579
+ * The last moment the call occurred
8580
+ */
8581
+ last_sent_at: string;
8582
+ /**
8583
+ * The date when the next retry attempt is scheduled to run. If no retry attempt is scheduled, it is set to null
8584
+ */
8585
+ next_retry_at: string | null;
8586
+ /**
8587
+ * The current status
8588
+ */
8589
+ status: 'pending' | 'success' | 'failed' | 'rescheduled';
8317
8590
  webhook: WebhookData;
8318
8591
  };
8592
+ export type WebhookCallSelfTargetSchema = WebhookCall;
8319
8593
  /**
8320
8594
  * JSON API data
8321
8595
  *
@@ -8336,13 +8610,13 @@ export type WebhookCallAttributes = {
8336
8610
  /**
8337
8611
  * The subject of webhook triggering
8338
8612
  */
8339
- entity_type: 'item' | 'item_type' | 'upload';
8613
+ entity_type: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
8340
8614
  /**
8341
8615
  * The event that triggers the webhook call
8342
8616
  */
8343
- event_type: 'create' | 'update' | 'delete' | 'publish' | 'unpublish';
8617
+ event_type: 'create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate';
8344
8618
  /**
8345
- * The moment the call occurred
8619
+ * The moment the event was created
8346
8620
  */
8347
8621
  created_at: string;
8348
8622
  /**
@@ -8368,11 +8642,27 @@ export type WebhookCallAttributes = {
8368
8642
  */
8369
8643
  response_headers: {
8370
8644
  [k: string]: unknown;
8371
- };
8645
+ } | null;
8372
8646
  /**
8373
8647
  * The body of the response
8374
8648
  */
8375
8649
  response_payload: string | null;
8650
+ /**
8651
+ * The number of retries attempted so far
8652
+ */
8653
+ attempted_auto_retries_count: number;
8654
+ /**
8655
+ * The last moment the call occurred
8656
+ */
8657
+ last_sent_at: string;
8658
+ /**
8659
+ * The date when the next retry attempt is scheduled to run. If no retry attempt is scheduled, it is set to null
8660
+ */
8661
+ next_retry_at: string | null;
8662
+ /**
8663
+ * The current status
8664
+ */
8665
+ status: 'pending' | 'success' | 'failed' | 'rescheduled';
8376
8666
  };
8377
8667
  /**
8378
8668
  * JSON API links
@@ -192,6 +192,24 @@ export default class Upload extends BaseResource {
192
192
  * @throws {TimeoutError}
193
193
  */
194
194
  rawBulkTag(body: SchemaTypes.UploadBulkTagSchema): Promise<SchemaTypes.UploadBulkTagJobSchema>;
195
+ /**
196
+ * Put assets into a collection in bulk
197
+ *
198
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/upload/bulk_set_upload_collection
199
+ *
200
+ * @throws {ApiError}
201
+ * @throws {TimeoutError}
202
+ */
203
+ bulkSetUploadCollection(body: SimpleSchemaTypes.UploadBulkSetUploadCollectionSchema): Promise<SimpleSchemaTypes.UploadBulkSetUploadCollectionJobSchema>;
204
+ /**
205
+ * Put assets into a collection in bulk
206
+ *
207
+ * Read more: https://www.datocms.com/docs/content-management-api/resources/upload/bulk_set_upload_collection
208
+ *
209
+ * @throws {ApiError}
210
+ * @throws {TimeoutError}
211
+ */
212
+ rawBulkSetUploadCollection(body: SchemaTypes.UploadBulkSetUploadCollectionSchema): Promise<SchemaTypes.UploadBulkSetUploadCollectionJobSchema>;
195
213
  /**
196
214
  * Destroy uploads
197
215
  *