@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
@@ -366,6 +366,40 @@ export type SchemaMenuItemInstancesHrefSchema = {
366
366
  ids: string;
367
367
  };
368
368
  };
369
+ /**
370
+ * RFC 4122 UUID of upload collection expressed in URL-safe base64 format
371
+ *
372
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
373
+ * via the `definition` "identity".
374
+ *
375
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
376
+ * via the `definition` "id".
377
+ */
378
+ export type UploadCollectionIdentity = string;
379
+ /**
380
+ * JSON API type field
381
+ *
382
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
383
+ * via the `definition` "type".
384
+ */
385
+ export type UploadCollectionType = 'upload_collection';
386
+ /**
387
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
388
+ * via the `instances.targetSchema` link.
389
+ */
390
+ export type UploadCollectionInstancesTargetSchema = UploadCollection[];
391
+ /**
392
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
393
+ * via the `instances.hrefSchema` link.
394
+ */
395
+ export type UploadCollectionInstancesHrefSchema = {
396
+ filter?: {
397
+ /**
398
+ * IDs to fetch, comma separated
399
+ */
400
+ ids: string;
401
+ };
402
+ };
369
403
  /**
370
404
  * This interface was referenced by `Item`'s JSON-Schema
371
405
  * via the `definition` "type".
@@ -664,7 +698,6 @@ export type ItemInstancesHrefSchema = {
664
698
  * The maximum number of entities to return (defaults to 30, maximum is 500)
665
699
  */
666
700
  limit?: number;
667
- [k: string]: unknown;
668
701
  };
669
702
  /**
670
703
  * 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.
@@ -918,7 +951,6 @@ export type ItemVersionInstancesHrefSchema = {
918
951
  * The maximum number of entities to return (defaults to 15, maximum is 50)
919
952
  */
920
953
  limit?: number;
921
- [k: string]: unknown;
922
954
  };
923
955
  [k: string]: unknown;
924
956
  };
@@ -987,7 +1019,6 @@ export type UploadInstancesHrefSchema = {
987
1019
  * The maximum number of entities to return (defaults to 30, maximum is 500)
988
1020
  */
989
1021
  limit?: number;
990
- [k: string]: unknown;
991
1022
  };
992
1023
  [k: string]: unknown;
993
1024
  };
@@ -1048,6 +1079,11 @@ export type UploadReferencesHrefSchema = {
1048
1079
  * via the `bulk_tag.jobSchema` link.
1049
1080
  */
1050
1081
  export type UploadBulkTagJobSchema = unknown[];
1082
+ /**
1083
+ * This interface was referenced by `Upload`'s JSON-Schema
1084
+ * via the `bulk_set_upload_collection.jobSchema` link.
1085
+ */
1086
+ export type UploadBulkSetUploadCollectionJobSchema = unknown[];
1051
1087
  /**
1052
1088
  * This interface was referenced by `Upload`'s JSON-Schema
1053
1089
  * via the `bulk_destroy.jobSchema` link.
@@ -1125,7 +1161,6 @@ export type SearchResultInstancesHrefSchema = {
1125
1161
  * The maximum number of entities to return (defaults to 20, maximum is 100)
1126
1162
  */
1127
1163
  limit?: number;
1128
- [k: string]: unknown;
1129
1164
  };
1130
1165
  /**
1131
1166
  * Attributes to filter search results
@@ -1273,8 +1308,82 @@ export type WebhookCallInstancesHrefSchema = {
1273
1308
  * The maximum number of entities to return (defaults to 30, maximum is 500)
1274
1309
  */
1275
1310
  limit?: number;
1276
- [k: string]: unknown;
1277
1311
  };
1312
+ /**
1313
+ * Attributes to filter
1314
+ */
1315
+ filter?: {
1316
+ /**
1317
+ * IDs to fetch, comma separated
1318
+ */
1319
+ ids?: string;
1320
+ fields?: {
1321
+ webhook_id?: {
1322
+ eq?: string;
1323
+ };
1324
+ entity_type?: {
1325
+ /**
1326
+ * The subject of webhook triggering
1327
+ */
1328
+ eq?:
1329
+ | 'item_type'
1330
+ | 'item'
1331
+ | 'upload'
1332
+ | 'build_trigger'
1333
+ | 'environment'
1334
+ | 'maintenance_mode'
1335
+ | 'sso_user'
1336
+ | 'cda_cache_tags';
1337
+ };
1338
+ event_type?: {
1339
+ /**
1340
+ * The event that triggers the webhook call
1341
+ */
1342
+ eq?:
1343
+ | 'create'
1344
+ | 'update'
1345
+ | 'delete'
1346
+ | 'publish'
1347
+ | 'unpublish'
1348
+ | 'promote'
1349
+ | 'deploy_started'
1350
+ | 'deploy_succeeded'
1351
+ | 'deploy_failed'
1352
+ | 'change'
1353
+ | 'invalidate';
1354
+ };
1355
+ status?: {
1356
+ /**
1357
+ * The current status
1358
+ */
1359
+ eq?: 'pending' | 'success' | 'failed' | 'rescheduled';
1360
+ };
1361
+ last_sent_at?: {
1362
+ gt?: string;
1363
+ lt?: string;
1364
+ };
1365
+ next_retry_at?: {
1366
+ gt?: string;
1367
+ lt?: string;
1368
+ };
1369
+ created_at?: {
1370
+ gt?: string;
1371
+ lt?: string;
1372
+ };
1373
+ };
1374
+ };
1375
+ /**
1376
+ * Fields used to order results
1377
+ */
1378
+ order_by?:
1379
+ | 'webhook_id_asc'
1380
+ | 'webhook_id_desc'
1381
+ | 'created_at_asc'
1382
+ | 'created_at_desc'
1383
+ | 'last_sent_at_asc'
1384
+ | 'last_sent_at_desc'
1385
+ | 'next_retry_at_asc'
1386
+ | 'next_retry_at_desc';
1278
1387
  [k: string]: unknown;
1279
1388
  };
1280
1389
  /**
@@ -1588,7 +1697,6 @@ export type UploadTagInstancesHrefSchema = {
1588
1697
  * The maximum number of entities to return (defaults to 50, maximum is 500)
1589
1698
  */
1590
1699
  limit?: number;
1591
- [k: string]: unknown;
1592
1700
  };
1593
1701
  [k: string]: unknown;
1594
1702
  };
@@ -1639,7 +1747,6 @@ export type UploadSmartTagInstancesHrefSchema = {
1639
1747
  * The maximum number of entities to return (defaults to 50, maximum is 500)
1640
1748
  */
1641
1749
  limit?: number;
1642
- [k: string]: unknown;
1643
1750
  };
1644
1751
  [k: string]: unknown;
1645
1752
  };
@@ -1685,6 +1792,7 @@ export type DatoApi = {
1685
1792
  site_plan?: SitePlan;
1686
1793
  menu_item?: MenuItem;
1687
1794
  schema_menu_item?: SchemaMenuItem;
1795
+ upload_collection?: UploadCollection;
1688
1796
  item_type?: ItemType;
1689
1797
  field?: Field;
1690
1798
  fieldset?: Fieldset;
@@ -1777,7 +1885,11 @@ export type Role = {
1777
1885
  /**
1778
1886
  * Can create/edit shared filters (both for models and the media area)
1779
1887
  */
1780
- can_manage_shared_filters?: boolean;
1888
+ can_manage_shared_filters: boolean;
1889
+ /**
1890
+ * Can create/edit upload collections
1891
+ */
1892
+ can_manage_upload_collections: boolean;
1781
1893
  /**
1782
1894
  * Can create/edit Build triggers
1783
1895
  */
@@ -2020,7 +2132,11 @@ export type RoleMeta = {
2020
2132
  /**
2021
2133
  * Can create/edit shared filters (both for models and the media area)
2022
2134
  */
2023
- can_manage_shared_filters?: boolean;
2135
+ can_manage_shared_filters: boolean;
2136
+ /**
2137
+ * Can create/edit upload collections
2138
+ */
2139
+ can_manage_upload_collections: boolean;
2024
2140
  /**
2025
2141
  * Can create/edit Build triggers
2026
2142
  */
@@ -2248,7 +2364,11 @@ export type RoleAttributes = {
2248
2364
  /**
2249
2365
  * Can create/edit shared filters (both for models and the media area)
2250
2366
  */
2251
- can_manage_shared_filters?: boolean;
2367
+ can_manage_shared_filters: boolean;
2368
+ /**
2369
+ * Can create/edit upload collections
2370
+ */
2371
+ can_manage_upload_collections: boolean;
2252
2372
  /**
2253
2373
  * Can create/edit Build triggers
2254
2374
  */
@@ -2485,6 +2605,10 @@ export type RoleCreateSchema = {
2485
2605
  * Can create/edit shared filters (both for models and the media area)
2486
2606
  */
2487
2607
  can_manage_shared_filters?: boolean;
2608
+ /**
2609
+ * Can create/edit upload collections
2610
+ */
2611
+ can_manage_upload_collections?: boolean;
2488
2612
  /**
2489
2613
  * Can create/edit Build triggers
2490
2614
  */
@@ -2714,6 +2838,10 @@ export type RoleUpdateSchema = {
2714
2838
  * Can create/edit shared filters (both for models and the media area)
2715
2839
  */
2716
2840
  can_manage_shared_filters?: boolean;
2841
+ /**
2842
+ * Can create/edit upload collections
2843
+ */
2844
+ can_manage_upload_collections?: boolean;
2717
2845
  /**
2718
2846
  * Can create/edit Build triggers
2719
2847
  */
@@ -4334,6 +4462,106 @@ export type SchemaMenuItemUpdateSchema = {
4334
4462
  children?: SchemaMenuItemData[];
4335
4463
  };
4336
4464
 
4465
+ /**
4466
+ * In DatoCMS you can organize the uploads present in your administrative area in collection, so that the final editors can easily navigate uploads.
4467
+ *
4468
+ * This interface was referenced by `DatoApi`'s JSON-Schema
4469
+ * via the `definition` "upload_collection".
4470
+ */
4471
+ export type UploadCollection = {
4472
+ id: UploadCollectionIdentity;
4473
+ type: UploadCollectionType;
4474
+ /**
4475
+ * The label of the upload collection
4476
+ */
4477
+ label: string;
4478
+ /**
4479
+ * Ordering index
4480
+ */
4481
+ position: number;
4482
+ parent: null | UploadCollectionData;
4483
+ children: UploadCollectionData[];
4484
+ };
4485
+ export type UploadCollectionCreateTargetSchema = UploadCollection;
4486
+ export type UploadCollectionUpdateTargetSchema = UploadCollection;
4487
+ export type UploadCollectionSelfTargetSchema = UploadCollection;
4488
+ export type UploadCollectionDestroyTargetSchema = UploadCollection;
4489
+ /**
4490
+ * JSON API data
4491
+ *
4492
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
4493
+ * via the `definition` "data".
4494
+ */
4495
+ export type UploadCollectionData = {
4496
+ type: UploadCollectionType;
4497
+ id: UploadCollectionIdentity;
4498
+ };
4499
+
4500
+ /**
4501
+ * JSON API attributes
4502
+ *
4503
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
4504
+ * via the `definition` "attributes".
4505
+ */
4506
+ export type UploadCollectionAttributes = {
4507
+ /**
4508
+ * The label of the upload collection
4509
+ */
4510
+ label: string;
4511
+ /**
4512
+ * Ordering index
4513
+ */
4514
+ position: number;
4515
+ };
4516
+
4517
+ /**
4518
+ * JSON API links
4519
+ *
4520
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
4521
+ * via the `definition` "relationships".
4522
+ */
4523
+ export type UploadCollectionRelationships = {
4524
+ parent: null | UploadCollectionData;
4525
+ children: UploadCollectionData[];
4526
+ };
4527
+
4528
+ /**
4529
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
4530
+ * via the `create.schema` link.
4531
+ */
4532
+ export type UploadCollectionCreateSchema = {
4533
+ id?: UploadCollectionIdentity;
4534
+ type?: UploadCollectionType;
4535
+ /**
4536
+ * The label of the upload collection
4537
+ */
4538
+ label: string;
4539
+ /**
4540
+ * Ordering index
4541
+ */
4542
+ position?: number;
4543
+ parent?: null | UploadCollectionData;
4544
+ };
4545
+
4546
+ /**
4547
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
4548
+ * via the `update.schema` link.
4549
+ */
4550
+ export type UploadCollectionUpdateSchema = {
4551
+ id?: UploadCollectionIdentity;
4552
+ type?: UploadCollectionType;
4553
+ /**
4554
+ * The label of the upload collection
4555
+ */
4556
+ label?: string;
4557
+ /**
4558
+ * Ordering index
4559
+ */
4560
+ position?: number;
4561
+ parent?: null | UploadCollectionData;
4562
+ children?: UploadCollectionData[];
4563
+ };
4564
+
4337
4565
  /**
4338
4566
  * 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".
4339
4567
  *
@@ -4796,6 +5024,9 @@ export type ItemTypeUpdateSchema = {
4796
5024
  * via the `bulk_tag.targetSchema` link.
4797
5025
  *
4798
5026
  * This interface was referenced by `Upload`'s JSON-Schema
5027
+ * via the `bulk_set_upload_collection.targetSchema` link.
5028
+ *
5029
+ * This interface was referenced by `Upload`'s JSON-Schema
4799
5030
  * via the `bulk_destroy.targetSchema` link.
4800
5031
  *
4801
5032
  * This interface was referenced by `UploadTrack`'s JSON-Schema
@@ -4841,6 +5072,7 @@ export type UploadUpdateTargetSchema = Job;
4841
5072
  export type UploadBatchAddTagsTargetSchema = Job;
4842
5073
  export type UploadBatchDestroyTargetSchema = Job;
4843
5074
  export type UploadBulkTagTargetSchema = Job;
5075
+ export type UploadBulkSetUploadCollectionTargetSchema = Job;
4844
5076
  export type UploadBulkDestroyTargetSchema = Job;
4845
5077
  export type UploadTrackCreateTargetSchema = Job;
4846
5078
  export type UploadTrackDestroyTargetSchema = Job;
@@ -7695,6 +7927,7 @@ export type Upload = {
7695
7927
  */
7696
7928
  alpha: number;
7697
7929
  }[];
7930
+ upload_collection: UploadCollectionData | null;
7698
7931
  creator:
7699
7932
  | AccountData
7700
7933
  | AccessTokenData
@@ -7894,6 +8127,7 @@ export type UploadAttributes = {
7894
8127
  * via the `definition` "relationships".
7895
8128
  */
7896
8129
  export type UploadRelationships = {
8130
+ upload_collection: UploadCollectionData | null;
7897
8131
  creator:
7898
8132
  | AccountData
7899
8133
  | AccessTokenData
@@ -7967,6 +8201,7 @@ export type UploadCreateSchema = {
7967
8201
  * Tags
7968
8202
  */
7969
8203
  tags?: string[];
8204
+ upload_collection?: UploadCollectionData | null;
7970
8205
  };
7971
8206
 
7972
8207
  /**
@@ -8044,6 +8279,7 @@ export type UploadUpdateSchema = {
8044
8279
  | UserData
8045
8280
  | SsoUserData
8046
8281
  | OrganizationData;
8282
+ upload_collection?: UploadCollectionData | null;
8047
8283
  };
8048
8284
 
8049
8285
  /**
@@ -8071,6 +8307,16 @@ export type UploadBulkTagSchema = {
8071
8307
  uploads: UploadData[];
8072
8308
  };
8073
8309
 
8310
+ /**
8311
+ * This interface was referenced by `Upload`'s JSON-Schema
8312
+ * via the `bulk_set_upload_collection.schema` link.
8313
+ */
8314
+ export type UploadBulkSetUploadCollectionSchema = {
8315
+ type?: 'upload_bulk_set_upload_collection_operation';
8316
+ upload_collection: null | UploadCollectionData;
8317
+ uploads: UploadData[];
8318
+ };
8319
+
8074
8320
  /**
8075
8321
  * This interface was referenced by `Upload`'s JSON-Schema
8076
8322
  * via the `bulk_destroy.schema` link.
@@ -8675,12 +8921,46 @@ export type Webhook = {
8675
8921
  * Additional headers that will be sent
8676
8922
  */
8677
8923
  headers: {
8678
- [k: string]: unknown;
8924
+ [k: string]: string;
8679
8925
  };
8680
- /**
8681
- * All the events you will be notified for
8682
- */
8683
- events: unknown[];
8926
+ events: {
8927
+ /**
8928
+ * The subject of webhook triggering
8929
+ */
8930
+ entity_type:
8931
+ | 'item_type'
8932
+ | 'item'
8933
+ | 'upload'
8934
+ | 'build_trigger'
8935
+ | 'environment'
8936
+ | 'maintenance_mode'
8937
+ | 'sso_user'
8938
+ | 'cda_cache_tags';
8939
+ event_types: (
8940
+ | 'create'
8941
+ | 'update'
8942
+ | 'delete'
8943
+ | 'publish'
8944
+ | 'unpublish'
8945
+ | 'promote'
8946
+ | 'deploy_started'
8947
+ | 'deploy_succeeded'
8948
+ | 'deploy_failed'
8949
+ | 'change'
8950
+ | 'invalidate'
8951
+ )[];
8952
+ filters?:
8953
+ | {
8954
+ entity_type:
8955
+ | 'item_type'
8956
+ | 'item'
8957
+ | 'build_trigger'
8958
+ | 'environment'
8959
+ | 'environment_type';
8960
+ entity_ids: [string, ...string[]];
8961
+ }[]
8962
+ | null;
8963
+ }[];
8684
8964
  /**
8685
8965
  * Specifies which API version to use when serializing entities in the webhook payload
8686
8966
  */
@@ -8689,6 +8969,10 @@ export type Webhook = {
8689
8969
  * Whether the you want records present in the payload to show blocks expanded or not
8690
8970
  */
8691
8971
  nested_items_in_payload: boolean;
8972
+ /**
8973
+ * If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
8974
+ */
8975
+ auto_retry: boolean;
8692
8976
  };
8693
8977
  export type WebhookCreateTargetSchema = Webhook;
8694
8978
  export type WebhookUpdateTargetSchema = Webhook;
@@ -8740,12 +9024,46 @@ export type WebhookAttributes = {
8740
9024
  * Additional headers that will be sent
8741
9025
  */
8742
9026
  headers: {
8743
- [k: string]: unknown;
9027
+ [k: string]: string;
8744
9028
  };
8745
- /**
8746
- * All the events you will be notified for
8747
- */
8748
- events: unknown[];
9029
+ events: {
9030
+ /**
9031
+ * The subject of webhook triggering
9032
+ */
9033
+ entity_type:
9034
+ | 'item_type'
9035
+ | 'item'
9036
+ | 'upload'
9037
+ | 'build_trigger'
9038
+ | 'environment'
9039
+ | 'maintenance_mode'
9040
+ | 'sso_user'
9041
+ | 'cda_cache_tags';
9042
+ event_types: (
9043
+ | 'create'
9044
+ | 'update'
9045
+ | 'delete'
9046
+ | 'publish'
9047
+ | 'unpublish'
9048
+ | 'promote'
9049
+ | 'deploy_started'
9050
+ | 'deploy_succeeded'
9051
+ | 'deploy_failed'
9052
+ | 'change'
9053
+ | 'invalidate'
9054
+ )[];
9055
+ filters?:
9056
+ | {
9057
+ entity_type:
9058
+ | 'item_type'
9059
+ | 'item'
9060
+ | 'build_trigger'
9061
+ | 'environment'
9062
+ | 'environment_type';
9063
+ entity_ids: [string, ...string[]];
9064
+ }[]
9065
+ | null;
9066
+ }[];
8749
9067
  /**
8750
9068
  * Specifies which API version to use when serializing entities in the webhook payload
8751
9069
  */
@@ -8754,6 +9072,10 @@ export type WebhookAttributes = {
8754
9072
  * Whether the you want records present in the payload to show blocks expanded or not
8755
9073
  */
8756
9074
  nested_items_in_payload: boolean;
9075
+ /**
9076
+ * If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
9077
+ */
9078
+ auto_retry: boolean;
8757
9079
  };
8758
9080
 
8759
9081
  /**
@@ -8778,12 +9100,46 @@ export type WebhookCreateSchema = {
8778
9100
  * Additional headers that will be sent
8779
9101
  */
8780
9102
  headers: {
8781
- [k: string]: unknown;
9103
+ [k: string]: string;
8782
9104
  };
8783
- /**
8784
- * All the events you will be notified for
8785
- */
8786
- events: unknown[];
9105
+ events: {
9106
+ /**
9107
+ * The subject of webhook triggering
9108
+ */
9109
+ entity_type:
9110
+ | 'item_type'
9111
+ | 'item'
9112
+ | 'upload'
9113
+ | 'build_trigger'
9114
+ | 'environment'
9115
+ | 'maintenance_mode'
9116
+ | 'sso_user'
9117
+ | 'cda_cache_tags';
9118
+ event_types: (
9119
+ | 'create'
9120
+ | 'update'
9121
+ | 'delete'
9122
+ | 'publish'
9123
+ | 'unpublish'
9124
+ | 'promote'
9125
+ | 'deploy_started'
9126
+ | 'deploy_succeeded'
9127
+ | 'deploy_failed'
9128
+ | 'change'
9129
+ | 'invalidate'
9130
+ )[];
9131
+ filters?:
9132
+ | {
9133
+ entity_type:
9134
+ | 'item_type'
9135
+ | 'item'
9136
+ | 'build_trigger'
9137
+ | 'environment'
9138
+ | 'environment_type';
9139
+ entity_ids: [string, ...string[]];
9140
+ }[]
9141
+ | null;
9142
+ }[];
8787
9143
  /**
8788
9144
  * HTTP Basic Authorization username
8789
9145
  */
@@ -8804,6 +9160,10 @@ export type WebhookCreateSchema = {
8804
9160
  * Whether the you want records present in the payload to show blocks expanded or not
8805
9161
  */
8806
9162
  nested_items_in_payload?: boolean;
9163
+ /**
9164
+ * If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
9165
+ */
9166
+ auto_retry?: boolean;
8807
9167
  };
8808
9168
 
8809
9169
  /**
@@ -8829,12 +9189,46 @@ export type WebhookUpdateSchema = {
8829
9189
  * Additional headers that will be sent
8830
9190
  */
8831
9191
  headers?: {
8832
- [k: string]: unknown;
9192
+ [k: string]: string;
8833
9193
  };
8834
- /**
8835
- * All the events you will be notified for
8836
- */
8837
- events?: unknown[];
9194
+ events?: {
9195
+ /**
9196
+ * The subject of webhook triggering
9197
+ */
9198
+ entity_type:
9199
+ | 'item_type'
9200
+ | 'item'
9201
+ | 'upload'
9202
+ | 'build_trigger'
9203
+ | 'environment'
9204
+ | 'maintenance_mode'
9205
+ | 'sso_user'
9206
+ | 'cda_cache_tags';
9207
+ event_types: (
9208
+ | 'create'
9209
+ | 'update'
9210
+ | 'delete'
9211
+ | 'publish'
9212
+ | 'unpublish'
9213
+ | 'promote'
9214
+ | 'deploy_started'
9215
+ | 'deploy_succeeded'
9216
+ | 'deploy_failed'
9217
+ | 'change'
9218
+ | 'invalidate'
9219
+ )[];
9220
+ filters?:
9221
+ | {
9222
+ entity_type:
9223
+ | 'item_type'
9224
+ | 'item'
9225
+ | 'build_trigger'
9226
+ | 'environment'
9227
+ | 'environment_type';
9228
+ entity_ids: [string, ...string[]];
9229
+ }[]
9230
+ | null;
9231
+ }[];
8838
9232
  /**
8839
9233
  * HTTP Basic Authorization username
8840
9234
  */
@@ -8855,10 +9249,14 @@ export type WebhookUpdateSchema = {
8855
9249
  * Whether the you want records present in the payload to show blocks expanded or not
8856
9250
  */
8857
9251
  nested_items_in_payload?: boolean;
9252
+ /**
9253
+ * If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
9254
+ */
9255
+ auto_retry?: boolean;
8858
9256
  };
8859
9257
 
8860
9258
  /**
8861
- * Represents a log entry in the webhooks activity list.
9259
+ * This represents a log entry in the webhooks activity list, detailing a specific webhook event along with its delivery attempt information.
8862
9260
  *
8863
9261
  * This interface was referenced by `DatoApi`'s JSON-Schema
8864
9262
  * via the `definition` "webhook_call".
@@ -8869,13 +9267,32 @@ export type WebhookCall = {
8869
9267
  /**
8870
9268
  * The subject of webhook triggering
8871
9269
  */
8872
- entity_type: 'item' | 'item_type' | 'upload';
9270
+ entity_type:
9271
+ | 'item_type'
9272
+ | 'item'
9273
+ | 'upload'
9274
+ | 'build_trigger'
9275
+ | 'environment'
9276
+ | 'maintenance_mode'
9277
+ | 'sso_user'
9278
+ | 'cda_cache_tags';
8873
9279
  /**
8874
9280
  * The event that triggers the webhook call
8875
9281
  */
8876
- event_type: 'create' | 'update' | 'delete' | 'publish' | 'unpublish';
8877
- /**
8878
- * The moment the call occurred
9282
+ event_type:
9283
+ | 'create'
9284
+ | 'update'
9285
+ | 'delete'
9286
+ | 'publish'
9287
+ | 'unpublish'
9288
+ | 'promote'
9289
+ | 'deploy_started'
9290
+ | 'deploy_succeeded'
9291
+ | 'deploy_failed'
9292
+ | 'change'
9293
+ | 'invalidate';
9294
+ /**
9295
+ * The moment the event was created
8879
9296
  */
8880
9297
  created_at: string;
8881
9298
  /**
@@ -8901,14 +9318,30 @@ export type WebhookCall = {
8901
9318
  */
8902
9319
  response_headers: {
8903
9320
  [k: string]: unknown;
8904
- };
9321
+ } | null;
8905
9322
  /**
8906
9323
  * The body of the response
8907
9324
  */
8908
9325
  response_payload: string | null;
9326
+ /**
9327
+ * The number of retries attempted so far
9328
+ */
9329
+ attempted_auto_retries_count: number;
9330
+ /**
9331
+ * The last moment the call occurred
9332
+ */
9333
+ last_sent_at: string;
9334
+ /**
9335
+ * The date when the next retry attempt is scheduled to run. If no retry attempt is scheduled, it is set to null
9336
+ */
9337
+ next_retry_at: string | null;
9338
+ /**
9339
+ * The current status
9340
+ */
9341
+ status: 'pending' | 'success' | 'failed' | 'rescheduled';
8909
9342
  webhook: WebhookData;
8910
9343
  };
8911
-
9344
+ export type WebhookCallSelfTargetSchema = WebhookCall;
8912
9345
  /**
8913
9346
  * JSON API data
8914
9347
  *
@@ -8930,13 +9363,32 @@ export type WebhookCallAttributes = {
8930
9363
  /**
8931
9364
  * The subject of webhook triggering
8932
9365
  */
8933
- entity_type: 'item' | 'item_type' | 'upload';
9366
+ entity_type:
9367
+ | 'item_type'
9368
+ | 'item'
9369
+ | 'upload'
9370
+ | 'build_trigger'
9371
+ | 'environment'
9372
+ | 'maintenance_mode'
9373
+ | 'sso_user'
9374
+ | 'cda_cache_tags';
8934
9375
  /**
8935
9376
  * The event that triggers the webhook call
8936
9377
  */
8937
- event_type: 'create' | 'update' | 'delete' | 'publish' | 'unpublish';
8938
- /**
8939
- * The moment the call occurred
9378
+ event_type:
9379
+ | 'create'
9380
+ | 'update'
9381
+ | 'delete'
9382
+ | 'publish'
9383
+ | 'unpublish'
9384
+ | 'promote'
9385
+ | 'deploy_started'
9386
+ | 'deploy_succeeded'
9387
+ | 'deploy_failed'
9388
+ | 'change'
9389
+ | 'invalidate';
9390
+ /**
9391
+ * The moment the event was created
8940
9392
  */
8941
9393
  created_at: string;
8942
9394
  /**
@@ -8962,11 +9414,27 @@ export type WebhookCallAttributes = {
8962
9414
  */
8963
9415
  response_headers: {
8964
9416
  [k: string]: unknown;
8965
- };
9417
+ } | null;
8966
9418
  /**
8967
9419
  * The body of the response
8968
9420
  */
8969
9421
  response_payload: string | null;
9422
+ /**
9423
+ * The number of retries attempted so far
9424
+ */
9425
+ attempted_auto_retries_count: number;
9426
+ /**
9427
+ * The last moment the call occurred
9428
+ */
9429
+ last_sent_at: string;
9430
+ /**
9431
+ * The date when the next retry attempt is scheduled to run. If no retry attempt is scheduled, it is set to null
9432
+ */
9433
+ next_retry_at: string | null;
9434
+ /**
9435
+ * The current status
9436
+ */
9437
+ status: 'pending' | 'success' | 'failed' | 'rescheduled';
8970
9438
  };
8971
9439
 
8972
9440
  /**