@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
@@ -321,6 +321,35 @@ export type SchemaMenuItemInstancesHrefSchema = {
321
321
  ids: string;
322
322
  };
323
323
  };
324
+ /**
325
+ * JSON API type field
326
+ *
327
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
328
+ * via the `definition` "type".
329
+ */
330
+ export type UploadCollectionType = 'upload_collection';
331
+ /**
332
+ * RFC 4122 UUID of upload collection expressed in URL-safe base64 format
333
+ *
334
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
335
+ * via the `definition` "identity".
336
+ *
337
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
338
+ * via the `definition` "id".
339
+ */
340
+ export type UploadCollectionIdentity = string;
341
+ /**
342
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
343
+ * via the `instances.hrefSchema` link.
344
+ */
345
+ export type UploadCollectionInstancesHrefSchema = {
346
+ filter?: {
347
+ /**
348
+ * IDs to fetch, comma separated
349
+ */
350
+ ids: string;
351
+ };
352
+ };
324
353
  /**
325
354
  * This interface was referenced by `Item`'s JSON-Schema
326
355
  * via the `definition` "type".
@@ -564,7 +593,6 @@ export type ItemInstancesHrefSchema = {
564
593
  * The maximum number of entities to return (defaults to 30, maximum is 500)
565
594
  */
566
595
  limit?: number;
567
- [k: string]: unknown;
568
596
  };
569
597
  /**
570
598
  * 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.
@@ -687,7 +715,6 @@ export type ItemVersionInstancesHrefSchema = {
687
715
  * The maximum number of entities to return (defaults to 15, maximum is 50)
688
716
  */
689
717
  limit?: number;
690
- [k: string]: unknown;
691
718
  };
692
719
  [k: string]: unknown;
693
720
  };
@@ -840,7 +867,6 @@ export type UploadInstancesHrefSchema = {
840
867
  * The maximum number of entities to return (defaults to 30, maximum is 500)
841
868
  */
842
869
  limit?: number;
843
- [k: string]: unknown;
844
870
  };
845
871
  [k: string]: unknown;
846
872
  };
@@ -943,7 +969,6 @@ export type SearchResultInstancesHrefSchema = {
943
969
  * The maximum number of entities to return (defaults to 20, maximum is 100)
944
970
  */
945
971
  limit?: number;
946
- [k: string]: unknown;
947
972
  };
948
973
  /**
949
974
  * Attributes to filter search results
@@ -1066,8 +1091,82 @@ export type WebhookCallInstancesHrefSchema = {
1066
1091
  * The maximum number of entities to return (defaults to 30, maximum is 500)
1067
1092
  */
1068
1093
  limit?: number;
1069
- [k: string]: unknown;
1070
1094
  };
1095
+ /**
1096
+ * Attributes to filter
1097
+ */
1098
+ filter?: {
1099
+ /**
1100
+ * IDs to fetch, comma separated
1101
+ */
1102
+ ids?: string;
1103
+ fields?: {
1104
+ webhook_id?: {
1105
+ eq?: string;
1106
+ };
1107
+ entity_type?: {
1108
+ /**
1109
+ * The subject of webhook triggering
1110
+ */
1111
+ eq?:
1112
+ | 'item_type'
1113
+ | 'item'
1114
+ | 'upload'
1115
+ | 'build_trigger'
1116
+ | 'environment'
1117
+ | 'maintenance_mode'
1118
+ | 'sso_user'
1119
+ | 'cda_cache_tags';
1120
+ };
1121
+ event_type?: {
1122
+ /**
1123
+ * The event that triggers the webhook call
1124
+ */
1125
+ eq?:
1126
+ | 'create'
1127
+ | 'update'
1128
+ | 'delete'
1129
+ | 'publish'
1130
+ | 'unpublish'
1131
+ | 'promote'
1132
+ | 'deploy_started'
1133
+ | 'deploy_succeeded'
1134
+ | 'deploy_failed'
1135
+ | 'change'
1136
+ | 'invalidate';
1137
+ };
1138
+ status?: {
1139
+ /**
1140
+ * The current status
1141
+ */
1142
+ eq?: 'pending' | 'success' | 'failed' | 'rescheduled';
1143
+ };
1144
+ last_sent_at?: {
1145
+ gt?: string;
1146
+ lt?: string;
1147
+ };
1148
+ next_retry_at?: {
1149
+ gt?: string;
1150
+ lt?: string;
1151
+ };
1152
+ created_at?: {
1153
+ gt?: string;
1154
+ lt?: string;
1155
+ };
1156
+ };
1157
+ };
1158
+ /**
1159
+ * Fields used to order results
1160
+ */
1161
+ order_by?:
1162
+ | 'webhook_id_asc'
1163
+ | 'webhook_id_desc'
1164
+ | 'created_at_asc'
1165
+ | 'created_at_desc'
1166
+ | 'last_sent_at_asc'
1167
+ | 'last_sent_at_desc'
1168
+ | 'next_retry_at_asc'
1169
+ | 'next_retry_at_desc';
1071
1170
  [k: string]: unknown;
1072
1171
  };
1073
1172
  /**
@@ -1302,7 +1401,6 @@ export type UploadTagInstancesHrefSchema = {
1302
1401
  * The maximum number of entities to return (defaults to 50, maximum is 500)
1303
1402
  */
1304
1403
  limit?: number;
1305
- [k: string]: unknown;
1306
1404
  };
1307
1405
  [k: string]: unknown;
1308
1406
  };
@@ -1348,7 +1446,6 @@ export type UploadSmartTagInstancesHrefSchema = {
1348
1446
  * The maximum number of entities to return (defaults to 50, maximum is 500)
1349
1447
  */
1350
1448
  limit?: number;
1351
- [k: string]: unknown;
1352
1449
  };
1353
1450
  [k: string]: unknown;
1354
1451
  };
@@ -1389,6 +1486,7 @@ export type DatoApi = {
1389
1486
  site_plan?: SitePlan;
1390
1487
  menu_item?: MenuItem;
1391
1488
  schema_menu_item?: SchemaMenuItem;
1489
+ upload_collection?: UploadCollection;
1392
1490
  item_type?: ItemType;
1393
1491
  field?: Field;
1394
1492
  fieldset?: Fieldset;
@@ -1493,7 +1591,11 @@ export type RoleAttributes = {
1493
1591
  /**
1494
1592
  * Can create/edit shared filters (both for models and the media area)
1495
1593
  */
1496
- can_manage_shared_filters?: boolean;
1594
+ can_manage_shared_filters: boolean;
1595
+ /**
1596
+ * Can create/edit upload collections
1597
+ */
1598
+ can_manage_upload_collections: boolean;
1497
1599
  /**
1498
1600
  * Can create/edit Build triggers
1499
1601
  */
@@ -1746,7 +1848,11 @@ export type RoleMeta = {
1746
1848
  /**
1747
1849
  * Can create/edit shared filters (both for models and the media area)
1748
1850
  */
1749
- can_manage_shared_filters?: boolean;
1851
+ can_manage_shared_filters: boolean;
1852
+ /**
1853
+ * Can create/edit upload collections
1854
+ */
1855
+ can_manage_upload_collections: boolean;
1750
1856
  /**
1751
1857
  * Can create/edit Build triggers
1752
1858
  */
@@ -1979,6 +2085,10 @@ export type RoleCreateSchema = {
1979
2085
  * Can create/edit shared filters (both for models and the media area)
1980
2086
  */
1981
2087
  can_manage_shared_filters?: boolean;
2088
+ /**
2089
+ * Can create/edit upload collections
2090
+ */
2091
+ can_manage_upload_collections?: boolean;
1982
2092
  /**
1983
2093
  * Can create/edit Build triggers
1984
2094
  */
@@ -2233,6 +2343,10 @@ export type RoleUpdateSchema = {
2233
2343
  * Can create/edit shared filters (both for models and the media area)
2234
2344
  */
2235
2345
  can_manage_shared_filters?: boolean;
2346
+ /**
2347
+ * Can create/edit upload collections
2348
+ */
2349
+ can_manage_upload_collections?: boolean;
2236
2350
  /**
2237
2351
  * Can create/edit Build triggers
2238
2352
  */
@@ -3878,6 +3992,178 @@ export type SchemaMenuItemDestroyTargetSchema = {
3878
3992
  data: SchemaMenuItem;
3879
3993
  };
3880
3994
 
3995
+ /**
3996
+ * In DatoCMS you can organize the uploads present in your administrative area in collection, so that the final editors can easily navigate uploads.
3997
+ *
3998
+ * This interface was referenced by `DatoApi`'s JSON-Schema
3999
+ * via the `definition` "upload_collection".
4000
+ */
4001
+ export type UploadCollection = {
4002
+ type: UploadCollectionType;
4003
+ id: UploadCollectionIdentity;
4004
+ attributes: UploadCollectionAttributes;
4005
+ relationships: UploadCollectionRelationships;
4006
+ };
4007
+
4008
+ /**
4009
+ * JSON API attributes
4010
+ *
4011
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
4012
+ * via the `definition` "attributes".
4013
+ */
4014
+ export type UploadCollectionAttributes = {
4015
+ /**
4016
+ * The label of the upload collection
4017
+ */
4018
+ label: string;
4019
+ /**
4020
+ * Ordering index
4021
+ */
4022
+ position: number;
4023
+ };
4024
+
4025
+ /**
4026
+ * JSON API links
4027
+ *
4028
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
4029
+ * via the `definition` "relationships".
4030
+ */
4031
+ export type UploadCollectionRelationships = {
4032
+ /**
4033
+ * Parent upload collection
4034
+ */
4035
+ parent: {
4036
+ data: null | UploadCollectionData;
4037
+ };
4038
+ /**
4039
+ * Underlying upload collections
4040
+ */
4041
+ children: {
4042
+ data: UploadCollectionData[];
4043
+ };
4044
+ };
4045
+
4046
+ /**
4047
+ * JSON API data
4048
+ *
4049
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
4050
+ * via the `definition` "data".
4051
+ */
4052
+ export type UploadCollectionData = {
4053
+ type: UploadCollectionType;
4054
+ id: UploadCollectionIdentity;
4055
+ };
4056
+
4057
+ /**
4058
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
4059
+ * via the `create.schema` link.
4060
+ */
4061
+ export type UploadCollectionCreateSchema = {
4062
+ data: {
4063
+ id?: UploadCollectionIdentity;
4064
+ type: UploadCollectionType;
4065
+ /**
4066
+ * JSON API attributes
4067
+ */
4068
+ attributes: {
4069
+ /**
4070
+ * The label of the upload collection
4071
+ */
4072
+ label: string;
4073
+ /**
4074
+ * Ordering index
4075
+ */
4076
+ position?: number;
4077
+ };
4078
+ relationships?: {
4079
+ /**
4080
+ * Parent upload collection
4081
+ */
4082
+ parent?: {
4083
+ data: null | UploadCollectionData;
4084
+ };
4085
+ };
4086
+ };
4087
+ };
4088
+
4089
+ /**
4090
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
4091
+ * via the `create.targetSchema` link.
4092
+ */
4093
+ export type UploadCollectionCreateTargetSchema = {
4094
+ data: UploadCollection;
4095
+ };
4096
+
4097
+ /**
4098
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
4099
+ * via the `update.schema` link.
4100
+ */
4101
+ export type UploadCollectionUpdateSchema = {
4102
+ data: {
4103
+ type: UploadCollectionType;
4104
+ id: UploadCollectionIdentity;
4105
+ /**
4106
+ * JSON API attributes
4107
+ */
4108
+ attributes?: {
4109
+ /**
4110
+ * The label of the upload collection
4111
+ */
4112
+ label?: string;
4113
+ /**
4114
+ * Ordering index
4115
+ */
4116
+ position?: number;
4117
+ };
4118
+ relationships?: {
4119
+ /**
4120
+ * Parent upload collection
4121
+ */
4122
+ parent?: {
4123
+ data: null | UploadCollectionData;
4124
+ };
4125
+ /**
4126
+ * Underlying upload collections
4127
+ */
4128
+ children?: {
4129
+ data: UploadCollectionData[];
4130
+ };
4131
+ };
4132
+ };
4133
+ };
4134
+
4135
+ /**
4136
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
4137
+ * via the `update.targetSchema` link.
4138
+ */
4139
+ export type UploadCollectionUpdateTargetSchema = {
4140
+ data: UploadCollection;
4141
+ };
4142
+
4143
+ /**
4144
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
4145
+ * via the `instances.targetSchema` link.
4146
+ */
4147
+ export type UploadCollectionInstancesTargetSchema = {
4148
+ data: UploadCollection[];
4149
+ };
4150
+
4151
+ /**
4152
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
4153
+ * via the `self.targetSchema` link.
4154
+ */
4155
+ export type UploadCollectionSelfTargetSchema = {
4156
+ data: UploadCollection;
4157
+ };
4158
+
4159
+ /**
4160
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
4161
+ * via the `destroy.targetSchema` link.
4162
+ */
4163
+ export type UploadCollectionDestroyTargetSchema = {
4164
+ data: UploadCollection;
4165
+ };
4166
+
3881
4167
  /**
3882
4168
  * 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".
3883
4169
  *
@@ -7903,6 +8189,12 @@ export type UploadAttributes = {
7903
8189
  * via the `definition` "relationships".
7904
8190
  */
7905
8191
  export type UploadRelationships = {
8192
+ /**
8193
+ * Upload collection to which the asset belongs
8194
+ */
8195
+ upload_collection: {
8196
+ data: UploadCollectionData | null;
8197
+ };
7906
8198
  /**
7907
8199
  * The entity (account/collaborator/access token) who created the asset. It must be an object with `type` (e.g. 'account') and `id` properties.
7908
8200
  */
@@ -7996,6 +8288,14 @@ export type UploadCreateSchema = {
7996
8288
  tags?: string[];
7997
8289
  [k: string]: unknown;
7998
8290
  };
8291
+ relationships?: {
8292
+ /**
8293
+ * Upload collection to which the asset belongs
8294
+ */
8295
+ upload_collection?: {
8296
+ data: UploadCollectionData | null;
8297
+ };
8298
+ };
7999
8299
  };
8000
8300
  };
8001
8301
 
@@ -8119,7 +8419,7 @@ export type UploadUpdateSchema = {
8119
8419
  /**
8120
8420
  * The entity (account/collaborator/access token) who created the asset. It must be an object with `type` (e.g. 'account') and `id` properties.
8121
8421
  */
8122
- creator: {
8422
+ creator?: {
8123
8423
  data:
8124
8424
  | AccountData
8125
8425
  | AccessTokenData
@@ -8127,6 +8427,12 @@ export type UploadUpdateSchema = {
8127
8427
  | SsoUserData
8128
8428
  | OrganizationData;
8129
8429
  };
8430
+ /**
8431
+ * Upload collection to which the asset belongs
8432
+ */
8433
+ upload_collection?: {
8434
+ data: UploadCollectionData | null;
8435
+ };
8130
8436
  };
8131
8437
  };
8132
8438
  };
@@ -8258,6 +8564,50 @@ export type UploadBulkTagJobSchema = {
8258
8564
  };
8259
8565
  };
8260
8566
 
8567
+ /**
8568
+ * This interface was referenced by `Upload`'s JSON-Schema
8569
+ * via the `bulk_set_upload_collection.schema` link.
8570
+ */
8571
+ export type UploadBulkSetUploadCollectionSchema = {
8572
+ data: {
8573
+ type: 'upload_bulk_set_upload_collection_operation';
8574
+ relationships: {
8575
+ /**
8576
+ * Asset collection to put uploads into
8577
+ */
8578
+ upload_collection: {
8579
+ data: null | UploadCollectionData;
8580
+ };
8581
+ /**
8582
+ * Assets to assign to the collection
8583
+ */
8584
+ uploads: {
8585
+ data: UploadData[];
8586
+ };
8587
+ };
8588
+ };
8589
+ };
8590
+
8591
+ /**
8592
+ * This interface was referenced by `Upload`'s JSON-Schema
8593
+ * via the `bulk_set_upload_collection.targetSchema` link.
8594
+ */
8595
+ export type UploadBulkSetUploadCollectionTargetSchema = {
8596
+ data: Job;
8597
+ };
8598
+
8599
+ /**
8600
+ * This interface was referenced by `Upload`'s JSON-Schema
8601
+ * via the `bulk_set_upload_collection.jobSchema` link.
8602
+ */
8603
+ export type UploadBulkSetUploadCollectionJobSchema = {
8604
+ data: unknown[];
8605
+ meta: {
8606
+ successful: number;
8607
+ failed: number;
8608
+ };
8609
+ };
8610
+
8261
8611
  /**
8262
8612
  * This interface was referenced by `Upload`'s JSON-Schema
8263
8613
  * via the `bulk_destroy.schema` link.
@@ -8873,12 +9223,46 @@ export type WebhookAttributes = {
8873
9223
  * Additional headers that will be sent
8874
9224
  */
8875
9225
  headers: {
8876
- [k: string]: unknown;
8877
- };
8878
- /**
8879
- * All the events you will be notified for
8880
- */
8881
- events: unknown[];
9226
+ [k: string]: string;
9227
+ };
9228
+ events: {
9229
+ /**
9230
+ * The subject of webhook triggering
9231
+ */
9232
+ entity_type:
9233
+ | 'item_type'
9234
+ | 'item'
9235
+ | 'upload'
9236
+ | 'build_trigger'
9237
+ | 'environment'
9238
+ | 'maintenance_mode'
9239
+ | 'sso_user'
9240
+ | 'cda_cache_tags';
9241
+ event_types: (
9242
+ | 'create'
9243
+ | 'update'
9244
+ | 'delete'
9245
+ | 'publish'
9246
+ | 'unpublish'
9247
+ | 'promote'
9248
+ | 'deploy_started'
9249
+ | 'deploy_succeeded'
9250
+ | 'deploy_failed'
9251
+ | 'change'
9252
+ | 'invalidate'
9253
+ )[];
9254
+ filters?:
9255
+ | {
9256
+ entity_type:
9257
+ | 'item_type'
9258
+ | 'item'
9259
+ | 'build_trigger'
9260
+ | 'environment'
9261
+ | 'environment_type';
9262
+ entity_ids: [string, ...string[]];
9263
+ }[]
9264
+ | null;
9265
+ }[];
8882
9266
  /**
8883
9267
  * Specifies which API version to use when serializing entities in the webhook payload
8884
9268
  */
@@ -8887,6 +9271,10 @@ export type WebhookAttributes = {
8887
9271
  * Whether the you want records present in the payload to show blocks expanded or not
8888
9272
  */
8889
9273
  nested_items_in_payload: boolean;
9274
+ /**
9275
+ * If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
9276
+ */
9277
+ auto_retry: boolean;
8890
9278
  };
8891
9279
 
8892
9280
  /**
@@ -8924,12 +9312,46 @@ export type WebhookCreateSchema = {
8924
9312
  * Additional headers that will be sent
8925
9313
  */
8926
9314
  headers: {
8927
- [k: string]: unknown;
9315
+ [k: string]: string;
8928
9316
  };
8929
- /**
8930
- * All the events you will be notified for
8931
- */
8932
- events: unknown[];
9317
+ events: {
9318
+ /**
9319
+ * The subject of webhook triggering
9320
+ */
9321
+ entity_type:
9322
+ | 'item_type'
9323
+ | 'item'
9324
+ | 'upload'
9325
+ | 'build_trigger'
9326
+ | 'environment'
9327
+ | 'maintenance_mode'
9328
+ | 'sso_user'
9329
+ | 'cda_cache_tags';
9330
+ event_types: (
9331
+ | 'create'
9332
+ | 'update'
9333
+ | 'delete'
9334
+ | 'publish'
9335
+ | 'unpublish'
9336
+ | 'promote'
9337
+ | 'deploy_started'
9338
+ | 'deploy_succeeded'
9339
+ | 'deploy_failed'
9340
+ | 'change'
9341
+ | 'invalidate'
9342
+ )[];
9343
+ filters?:
9344
+ | {
9345
+ entity_type:
9346
+ | 'item_type'
9347
+ | 'item'
9348
+ | 'build_trigger'
9349
+ | 'environment'
9350
+ | 'environment_type';
9351
+ entity_ids: [string, ...string[]];
9352
+ }[]
9353
+ | null;
9354
+ }[];
8933
9355
  /**
8934
9356
  * HTTP Basic Authorization username
8935
9357
  */
@@ -8950,6 +9372,10 @@ export type WebhookCreateSchema = {
8950
9372
  * Whether the you want records present in the payload to show blocks expanded or not
8951
9373
  */
8952
9374
  nested_items_in_payload?: boolean;
9375
+ /**
9376
+ * If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
9377
+ */
9378
+ auto_retry?: boolean;
8953
9379
  };
8954
9380
  };
8955
9381
  };
@@ -8987,12 +9413,46 @@ export type WebhookUpdateSchema = {
8987
9413
  * Additional headers that will be sent
8988
9414
  */
8989
9415
  headers?: {
8990
- [k: string]: unknown;
9416
+ [k: string]: string;
8991
9417
  };
8992
- /**
8993
- * All the events you will be notified for
8994
- */
8995
- events?: unknown[];
9418
+ events?: {
9419
+ /**
9420
+ * The subject of webhook triggering
9421
+ */
9422
+ entity_type:
9423
+ | 'item_type'
9424
+ | 'item'
9425
+ | 'upload'
9426
+ | 'build_trigger'
9427
+ | 'environment'
9428
+ | 'maintenance_mode'
9429
+ | 'sso_user'
9430
+ | 'cda_cache_tags';
9431
+ event_types: (
9432
+ | 'create'
9433
+ | 'update'
9434
+ | 'delete'
9435
+ | 'publish'
9436
+ | 'unpublish'
9437
+ | 'promote'
9438
+ | 'deploy_started'
9439
+ | 'deploy_succeeded'
9440
+ | 'deploy_failed'
9441
+ | 'change'
9442
+ | 'invalidate'
9443
+ )[];
9444
+ filters?:
9445
+ | {
9446
+ entity_type:
9447
+ | 'item_type'
9448
+ | 'item'
9449
+ | 'build_trigger'
9450
+ | 'environment'
9451
+ | 'environment_type';
9452
+ entity_ids: [string, ...string[]];
9453
+ }[]
9454
+ | null;
9455
+ }[];
8996
9456
  /**
8997
9457
  * HTTP Basic Authorization username
8998
9458
  */
@@ -9013,6 +9473,10 @@ export type WebhookUpdateSchema = {
9013
9473
  * Whether the you want records present in the payload to show blocks expanded or not
9014
9474
  */
9015
9475
  nested_items_in_payload?: boolean;
9476
+ /**
9477
+ * If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
9478
+ */
9479
+ auto_retry?: boolean;
9016
9480
  };
9017
9481
  };
9018
9482
  };
@@ -9050,7 +9514,7 @@ export type WebhookDestroyTargetSchema = {
9050
9514
  };
9051
9515
 
9052
9516
  /**
9053
- * Represents a log entry in the webhooks activity list.
9517
+ * This represents a log entry in the webhooks activity list, detailing a specific webhook event along with its delivery attempt information.
9054
9518
  *
9055
9519
  * This interface was referenced by `DatoApi`'s JSON-Schema
9056
9520
  * via the `definition` "webhook_call".
@@ -9072,13 +9536,32 @@ export type WebhookCallAttributes = {
9072
9536
  /**
9073
9537
  * The subject of webhook triggering
9074
9538
  */
9075
- entity_type: 'item' | 'item_type' | 'upload';
9539
+ entity_type:
9540
+ | 'item_type'
9541
+ | 'item'
9542
+ | 'upload'
9543
+ | 'build_trigger'
9544
+ | 'environment'
9545
+ | 'maintenance_mode'
9546
+ | 'sso_user'
9547
+ | 'cda_cache_tags';
9076
9548
  /**
9077
9549
  * The event that triggers the webhook call
9078
9550
  */
9079
- event_type: 'create' | 'update' | 'delete' | 'publish' | 'unpublish';
9080
- /**
9081
- * The moment the call occurred
9551
+ event_type:
9552
+ | 'create'
9553
+ | 'update'
9554
+ | 'delete'
9555
+ | 'publish'
9556
+ | 'unpublish'
9557
+ | 'promote'
9558
+ | 'deploy_started'
9559
+ | 'deploy_succeeded'
9560
+ | 'deploy_failed'
9561
+ | 'change'
9562
+ | 'invalidate';
9563
+ /**
9564
+ * The moment the event was created
9082
9565
  */
9083
9566
  created_at: string;
9084
9567
  /**
@@ -9104,11 +9587,27 @@ export type WebhookCallAttributes = {
9104
9587
  */
9105
9588
  response_headers: {
9106
9589
  [k: string]: unknown;
9107
- };
9590
+ } | null;
9108
9591
  /**
9109
9592
  * The body of the response
9110
9593
  */
9111
9594
  response_payload: string | null;
9595
+ /**
9596
+ * The number of retries attempted so far
9597
+ */
9598
+ attempted_auto_retries_count: number;
9599
+ /**
9600
+ * The last moment the call occurred
9601
+ */
9602
+ last_sent_at: string;
9603
+ /**
9604
+ * The date when the next retry attempt is scheduled to run. If no retry attempt is scheduled, it is set to null
9605
+ */
9606
+ next_retry_at: string | null;
9607
+ /**
9608
+ * The current status
9609
+ */
9610
+ status: 'pending' | 'success' | 'failed' | 'rescheduled';
9112
9611
  };
9113
9612
 
9114
9613
  /**
@@ -9146,6 +9645,16 @@ export type WebhookCallInstancesTargetSchema = {
9146
9645
  meta: {
9147
9646
  total_count: number;
9148
9647
  };
9648
+ included: Webhook[];
9649
+ };
9650
+
9651
+ /**
9652
+ * This interface was referenced by `WebhookCall`'s JSON-Schema
9653
+ * via the `self.targetSchema` link.
9654
+ */
9655
+ export type WebhookCallSelfTargetSchema = {
9656
+ data: WebhookCall;
9657
+ included: Webhook[];
9149
9658
  };
9150
9659
 
9151
9660
  /**