@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
@@ -319,6 +319,35 @@ export type SchemaMenuItemInstancesHrefSchema = {
319
319
  ids: string;
320
320
  };
321
321
  };
322
+ /**
323
+ * JSON API type field
324
+ *
325
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
326
+ * via the `definition` "type".
327
+ */
328
+ export type UploadCollectionType = 'upload_collection';
329
+ /**
330
+ * RFC 4122 UUID of upload collection expressed in URL-safe base64 format
331
+ *
332
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
333
+ * via the `definition` "identity".
334
+ *
335
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
336
+ * via the `definition` "id".
337
+ */
338
+ export type UploadCollectionIdentity = string;
339
+ /**
340
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
341
+ * via the `instances.hrefSchema` link.
342
+ */
343
+ export type UploadCollectionInstancesHrefSchema = {
344
+ filter?: {
345
+ /**
346
+ * IDs to fetch, comma separated
347
+ */
348
+ ids: string;
349
+ };
350
+ };
322
351
  /**
323
352
  * This interface was referenced by `Item`'s JSON-Schema
324
353
  * via the `definition` "type".
@@ -562,7 +591,6 @@ export type ItemInstancesHrefSchema = {
562
591
  * The maximum number of entities to return (defaults to 30, maximum is 500)
563
592
  */
564
593
  limit?: number;
565
- [k: string]: unknown;
566
594
  };
567
595
  /**
568
596
  * 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.
@@ -685,7 +713,6 @@ export type ItemVersionInstancesHrefSchema = {
685
713
  * The maximum number of entities to return (defaults to 15, maximum is 50)
686
714
  */
687
715
  limit?: number;
688
- [k: string]: unknown;
689
716
  };
690
717
  [k: string]: unknown;
691
718
  };
@@ -838,7 +865,6 @@ export type UploadInstancesHrefSchema = {
838
865
  * The maximum number of entities to return (defaults to 30, maximum is 500)
839
866
  */
840
867
  limit?: number;
841
- [k: string]: unknown;
842
868
  };
843
869
  [k: string]: unknown;
844
870
  };
@@ -941,7 +967,6 @@ export type SearchResultInstancesHrefSchema = {
941
967
  * The maximum number of entities to return (defaults to 20, maximum is 100)
942
968
  */
943
969
  limit?: number;
944
- [k: string]: unknown;
945
970
  };
946
971
  /**
947
972
  * Attributes to filter search results
@@ -1064,8 +1089,55 @@ export type WebhookCallInstancesHrefSchema = {
1064
1089
  * The maximum number of entities to return (defaults to 30, maximum is 500)
1065
1090
  */
1066
1091
  limit?: number;
1067
- [k: string]: unknown;
1068
1092
  };
1093
+ /**
1094
+ * Attributes to filter
1095
+ */
1096
+ filter?: {
1097
+ /**
1098
+ * IDs to fetch, comma separated
1099
+ */
1100
+ ids?: string;
1101
+ fields?: {
1102
+ webhook_id?: {
1103
+ eq?: string;
1104
+ };
1105
+ entity_type?: {
1106
+ /**
1107
+ * The subject of webhook triggering
1108
+ */
1109
+ eq?: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
1110
+ };
1111
+ event_type?: {
1112
+ /**
1113
+ * The event that triggers the webhook call
1114
+ */
1115
+ eq?: 'create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate';
1116
+ };
1117
+ status?: {
1118
+ /**
1119
+ * The current status
1120
+ */
1121
+ eq?: 'pending' | 'success' | 'failed' | 'rescheduled';
1122
+ };
1123
+ last_sent_at?: {
1124
+ gt?: string;
1125
+ lt?: string;
1126
+ };
1127
+ next_retry_at?: {
1128
+ gt?: string;
1129
+ lt?: string;
1130
+ };
1131
+ created_at?: {
1132
+ gt?: string;
1133
+ lt?: string;
1134
+ };
1135
+ };
1136
+ };
1137
+ /**
1138
+ * Fields used to order results
1139
+ */
1140
+ 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';
1069
1141
  [k: string]: unknown;
1070
1142
  };
1071
1143
  /**
@@ -1281,7 +1353,6 @@ export type UploadTagInstancesHrefSchema = {
1281
1353
  * The maximum number of entities to return (defaults to 50, maximum is 500)
1282
1354
  */
1283
1355
  limit?: number;
1284
- [k: string]: unknown;
1285
1356
  };
1286
1357
  [k: string]: unknown;
1287
1358
  };
@@ -1327,7 +1398,6 @@ export type UploadSmartTagInstancesHrefSchema = {
1327
1398
  * The maximum number of entities to return (defaults to 50, maximum is 500)
1328
1399
  */
1329
1400
  limit?: number;
1330
- [k: string]: unknown;
1331
1401
  };
1332
1402
  [k: string]: unknown;
1333
1403
  };
@@ -1367,6 +1437,7 @@ export type DatoApi = {
1367
1437
  site_plan?: SitePlan;
1368
1438
  menu_item?: MenuItem;
1369
1439
  schema_menu_item?: SchemaMenuItem;
1440
+ upload_collection?: UploadCollection;
1370
1441
  item_type?: ItemType;
1371
1442
  field?: Field;
1372
1443
  fieldset?: Fieldset;
@@ -1469,7 +1540,11 @@ export type RoleAttributes = {
1469
1540
  /**
1470
1541
  * Can create/edit shared filters (both for models and the media area)
1471
1542
  */
1472
- can_manage_shared_filters?: boolean;
1543
+ can_manage_shared_filters: boolean;
1544
+ /**
1545
+ * Can create/edit upload collections
1546
+ */
1547
+ can_manage_upload_collections: boolean;
1473
1548
  /**
1474
1549
  * Can create/edit Build triggers
1475
1550
  */
@@ -1685,7 +1760,11 @@ export type RoleMeta = {
1685
1760
  /**
1686
1761
  * Can create/edit shared filters (both for models and the media area)
1687
1762
  */
1688
- can_manage_shared_filters?: boolean;
1763
+ can_manage_shared_filters: boolean;
1764
+ /**
1765
+ * Can create/edit upload collections
1766
+ */
1767
+ can_manage_upload_collections: boolean;
1689
1768
  /**
1690
1769
  * Can create/edit Build triggers
1691
1770
  */
@@ -1883,6 +1962,10 @@ export type RoleCreateSchema = {
1883
1962
  * Can create/edit shared filters (both for models and the media area)
1884
1963
  */
1885
1964
  can_manage_shared_filters?: boolean;
1965
+ /**
1966
+ * Can create/edit upload collections
1967
+ */
1968
+ can_manage_upload_collections?: boolean;
1886
1969
  /**
1887
1970
  * Can create/edit Build triggers
1888
1971
  */
@@ -2101,6 +2184,10 @@ export type RoleUpdateSchema = {
2101
2184
  * Can create/edit shared filters (both for models and the media area)
2102
2185
  */
2103
2186
  can_manage_shared_filters?: boolean;
2187
+ /**
2188
+ * Can create/edit upload collections
2189
+ */
2190
+ can_manage_upload_collections?: boolean;
2104
2191
  /**
2105
2192
  * Can create/edit Build triggers
2106
2193
  */
@@ -3635,6 +3722,167 @@ export type SchemaMenuItemSelfTargetSchema = {
3635
3722
  export type SchemaMenuItemDestroyTargetSchema = {
3636
3723
  data: SchemaMenuItem;
3637
3724
  };
3725
+ /**
3726
+ * In DatoCMS you can organize the uploads present in your administrative area in collection, so that the final editors can easily navigate uploads.
3727
+ *
3728
+ * This interface was referenced by `DatoApi`'s JSON-Schema
3729
+ * via the `definition` "upload_collection".
3730
+ */
3731
+ export type UploadCollection = {
3732
+ type: UploadCollectionType;
3733
+ id: UploadCollectionIdentity;
3734
+ attributes: UploadCollectionAttributes;
3735
+ relationships: UploadCollectionRelationships;
3736
+ };
3737
+ /**
3738
+ * JSON API attributes
3739
+ *
3740
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
3741
+ * via the `definition` "attributes".
3742
+ */
3743
+ export type UploadCollectionAttributes = {
3744
+ /**
3745
+ * The label of the upload collection
3746
+ */
3747
+ label: string;
3748
+ /**
3749
+ * Ordering index
3750
+ */
3751
+ position: number;
3752
+ };
3753
+ /**
3754
+ * JSON API links
3755
+ *
3756
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
3757
+ * via the `definition` "relationships".
3758
+ */
3759
+ export type UploadCollectionRelationships = {
3760
+ /**
3761
+ * Parent upload collection
3762
+ */
3763
+ parent: {
3764
+ data: null | UploadCollectionData;
3765
+ };
3766
+ /**
3767
+ * Underlying upload collections
3768
+ */
3769
+ children: {
3770
+ data: UploadCollectionData[];
3771
+ };
3772
+ };
3773
+ /**
3774
+ * JSON API data
3775
+ *
3776
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
3777
+ * via the `definition` "data".
3778
+ */
3779
+ export type UploadCollectionData = {
3780
+ type: UploadCollectionType;
3781
+ id: UploadCollectionIdentity;
3782
+ };
3783
+ /**
3784
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
3785
+ * via the `create.schema` link.
3786
+ */
3787
+ export type UploadCollectionCreateSchema = {
3788
+ data: {
3789
+ id?: UploadCollectionIdentity;
3790
+ type: UploadCollectionType;
3791
+ /**
3792
+ * JSON API attributes
3793
+ */
3794
+ attributes: {
3795
+ /**
3796
+ * The label of the upload collection
3797
+ */
3798
+ label: string;
3799
+ /**
3800
+ * Ordering index
3801
+ */
3802
+ position?: number;
3803
+ };
3804
+ relationships?: {
3805
+ /**
3806
+ * Parent upload collection
3807
+ */
3808
+ parent?: {
3809
+ data: null | UploadCollectionData;
3810
+ };
3811
+ };
3812
+ };
3813
+ };
3814
+ /**
3815
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
3816
+ * via the `create.targetSchema` link.
3817
+ */
3818
+ export type UploadCollectionCreateTargetSchema = {
3819
+ data: UploadCollection;
3820
+ };
3821
+ /**
3822
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
3823
+ * via the `update.schema` link.
3824
+ */
3825
+ export type UploadCollectionUpdateSchema = {
3826
+ data: {
3827
+ type: UploadCollectionType;
3828
+ id: UploadCollectionIdentity;
3829
+ /**
3830
+ * JSON API attributes
3831
+ */
3832
+ attributes?: {
3833
+ /**
3834
+ * The label of the upload collection
3835
+ */
3836
+ label?: string;
3837
+ /**
3838
+ * Ordering index
3839
+ */
3840
+ position?: number;
3841
+ };
3842
+ relationships?: {
3843
+ /**
3844
+ * Parent upload collection
3845
+ */
3846
+ parent?: {
3847
+ data: null | UploadCollectionData;
3848
+ };
3849
+ /**
3850
+ * Underlying upload collections
3851
+ */
3852
+ children?: {
3853
+ data: UploadCollectionData[];
3854
+ };
3855
+ };
3856
+ };
3857
+ };
3858
+ /**
3859
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
3860
+ * via the `update.targetSchema` link.
3861
+ */
3862
+ export type UploadCollectionUpdateTargetSchema = {
3863
+ data: UploadCollection;
3864
+ };
3865
+ /**
3866
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
3867
+ * via the `instances.targetSchema` link.
3868
+ */
3869
+ export type UploadCollectionInstancesTargetSchema = {
3870
+ data: UploadCollection[];
3871
+ };
3872
+ /**
3873
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
3874
+ * via the `self.targetSchema` link.
3875
+ */
3876
+ export type UploadCollectionSelfTargetSchema = {
3877
+ data: UploadCollection;
3878
+ };
3879
+ /**
3880
+ * This interface was referenced by `UploadCollection`'s JSON-Schema
3881
+ * via the `destroy.targetSchema` link.
3882
+ */
3883
+ export type UploadCollectionDestroyTargetSchema = {
3884
+ data: UploadCollection;
3885
+ };
3638
3886
  /**
3639
3887
  * 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".
3640
3888
  *
@@ -7340,6 +7588,12 @@ export type UploadAttributes = {
7340
7588
  * via the `definition` "relationships".
7341
7589
  */
7342
7590
  export type UploadRelationships = {
7591
+ /**
7592
+ * Upload collection to which the asset belongs
7593
+ */
7594
+ upload_collection: {
7595
+ data: UploadCollectionData | null;
7596
+ };
7343
7597
  /**
7344
7598
  * The entity (account/collaborator/access token) who created the asset. It must be an object with `type` (e.g. 'account') and `id` properties.
7345
7599
  */
@@ -7426,6 +7680,14 @@ export type UploadCreateSchema = {
7426
7680
  tags?: string[];
7427
7681
  [k: string]: unknown;
7428
7682
  };
7683
+ relationships?: {
7684
+ /**
7685
+ * Upload collection to which the asset belongs
7686
+ */
7687
+ upload_collection?: {
7688
+ data: UploadCollectionData | null;
7689
+ };
7690
+ };
7429
7691
  };
7430
7692
  };
7431
7693
  /**
@@ -7543,9 +7805,15 @@ export type UploadUpdateSchema = {
7543
7805
  /**
7544
7806
  * The entity (account/collaborator/access token) who created the asset. It must be an object with `type` (e.g. 'account') and `id` properties.
7545
7807
  */
7546
- creator: {
7808
+ creator?: {
7547
7809
  data: AccountData | AccessTokenData | UserData | SsoUserData | OrganizationData;
7548
7810
  };
7811
+ /**
7812
+ * Upload collection to which the asset belongs
7813
+ */
7814
+ upload_collection?: {
7815
+ data: UploadCollectionData | null;
7816
+ };
7549
7817
  };
7550
7818
  };
7551
7819
  };
@@ -7665,6 +7933,47 @@ export type UploadBulkTagJobSchema = {
7665
7933
  failed: number;
7666
7934
  };
7667
7935
  };
7936
+ /**
7937
+ * This interface was referenced by `Upload`'s JSON-Schema
7938
+ * via the `bulk_set_upload_collection.schema` link.
7939
+ */
7940
+ export type UploadBulkSetUploadCollectionSchema = {
7941
+ data: {
7942
+ type: 'upload_bulk_set_upload_collection_operation';
7943
+ relationships: {
7944
+ /**
7945
+ * Asset collection to put uploads into
7946
+ */
7947
+ upload_collection: {
7948
+ data: null | UploadCollectionData;
7949
+ };
7950
+ /**
7951
+ * Assets to assign to the collection
7952
+ */
7953
+ uploads: {
7954
+ data: UploadData[];
7955
+ };
7956
+ };
7957
+ };
7958
+ };
7959
+ /**
7960
+ * This interface was referenced by `Upload`'s JSON-Schema
7961
+ * via the `bulk_set_upload_collection.targetSchema` link.
7962
+ */
7963
+ export type UploadBulkSetUploadCollectionTargetSchema = {
7964
+ data: Job;
7965
+ };
7966
+ /**
7967
+ * This interface was referenced by `Upload`'s JSON-Schema
7968
+ * via the `bulk_set_upload_collection.jobSchema` link.
7969
+ */
7970
+ export type UploadBulkSetUploadCollectionJobSchema = {
7971
+ data: unknown[];
7972
+ meta: {
7973
+ successful: number;
7974
+ failed: number;
7975
+ };
7976
+ };
7668
7977
  /**
7669
7978
  * This interface was referenced by `Upload`'s JSON-Schema
7670
7979
  * via the `bulk_destroy.schema` link.
@@ -8236,12 +8545,19 @@ export type WebhookAttributes = {
8236
8545
  * Additional headers that will be sent
8237
8546
  */
8238
8547
  headers: {
8239
- [k: string]: unknown;
8548
+ [k: string]: string;
8240
8549
  };
8241
- /**
8242
- * All the events you will be notified for
8243
- */
8244
- events: unknown[];
8550
+ events: {
8551
+ /**
8552
+ * The subject of webhook triggering
8553
+ */
8554
+ entity_type: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
8555
+ event_types: ('create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate')[];
8556
+ filters?: {
8557
+ entity_type: 'item_type' | 'item' | 'build_trigger' | 'environment' | 'environment_type';
8558
+ entity_ids: [string, ...string[]];
8559
+ }[] | null;
8560
+ }[];
8245
8561
  /**
8246
8562
  * Specifies which API version to use when serializing entities in the webhook payload
8247
8563
  */
@@ -8250,6 +8566,10 @@ export type WebhookAttributes = {
8250
8566
  * Whether the you want records present in the payload to show blocks expanded or not
8251
8567
  */
8252
8568
  nested_items_in_payload: boolean;
8569
+ /**
8570
+ * If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
8571
+ */
8572
+ auto_retry: boolean;
8253
8573
  };
8254
8574
  /**
8255
8575
  * JSON API data
@@ -8285,12 +8605,19 @@ export type WebhookCreateSchema = {
8285
8605
  * Additional headers that will be sent
8286
8606
  */
8287
8607
  headers: {
8288
- [k: string]: unknown;
8608
+ [k: string]: string;
8289
8609
  };
8290
- /**
8291
- * All the events you will be notified for
8292
- */
8293
- events: unknown[];
8610
+ events: {
8611
+ /**
8612
+ * The subject of webhook triggering
8613
+ */
8614
+ entity_type: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
8615
+ event_types: ('create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate')[];
8616
+ filters?: {
8617
+ entity_type: 'item_type' | 'item' | 'build_trigger' | 'environment' | 'environment_type';
8618
+ entity_ids: [string, ...string[]];
8619
+ }[] | null;
8620
+ }[];
8294
8621
  /**
8295
8622
  * HTTP Basic Authorization username
8296
8623
  */
@@ -8311,6 +8638,10 @@ export type WebhookCreateSchema = {
8311
8638
  * Whether the you want records present in the payload to show blocks expanded or not
8312
8639
  */
8313
8640
  nested_items_in_payload?: boolean;
8641
+ /**
8642
+ * If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
8643
+ */
8644
+ auto_retry?: boolean;
8314
8645
  };
8315
8646
  };
8316
8647
  };
@@ -8346,12 +8677,19 @@ export type WebhookUpdateSchema = {
8346
8677
  * Additional headers that will be sent
8347
8678
  */
8348
8679
  headers?: {
8349
- [k: string]: unknown;
8680
+ [k: string]: string;
8350
8681
  };
8351
- /**
8352
- * All the events you will be notified for
8353
- */
8354
- events?: unknown[];
8682
+ events?: {
8683
+ /**
8684
+ * The subject of webhook triggering
8685
+ */
8686
+ entity_type: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
8687
+ event_types: ('create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate')[];
8688
+ filters?: {
8689
+ entity_type: 'item_type' | 'item' | 'build_trigger' | 'environment' | 'environment_type';
8690
+ entity_ids: [string, ...string[]];
8691
+ }[] | null;
8692
+ }[];
8355
8693
  /**
8356
8694
  * HTTP Basic Authorization username
8357
8695
  */
@@ -8372,6 +8710,10 @@ export type WebhookUpdateSchema = {
8372
8710
  * Whether the you want records present in the payload to show blocks expanded or not
8373
8711
  */
8374
8712
  nested_items_in_payload?: boolean;
8713
+ /**
8714
+ * If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
8715
+ */
8716
+ auto_retry?: boolean;
8375
8717
  };
8376
8718
  };
8377
8719
  };
@@ -8404,7 +8746,7 @@ export type WebhookDestroyTargetSchema = {
8404
8746
  data: Webhook;
8405
8747
  };
8406
8748
  /**
8407
- * Represents a log entry in the webhooks activity list.
8749
+ * This represents a log entry in the webhooks activity list, detailing a specific webhook event along with its delivery attempt information.
8408
8750
  *
8409
8751
  * This interface was referenced by `DatoApi`'s JSON-Schema
8410
8752
  * via the `definition` "webhook_call".
@@ -8425,13 +8767,13 @@ export type WebhookCallAttributes = {
8425
8767
  /**
8426
8768
  * The subject of webhook triggering
8427
8769
  */
8428
- entity_type: 'item' | 'item_type' | 'upload';
8770
+ entity_type: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
8429
8771
  /**
8430
8772
  * The event that triggers the webhook call
8431
8773
  */
8432
- event_type: 'create' | 'update' | 'delete' | 'publish' | 'unpublish';
8774
+ event_type: 'create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate';
8433
8775
  /**
8434
- * The moment the call occurred
8776
+ * The moment the event was created
8435
8777
  */
8436
8778
  created_at: string;
8437
8779
  /**
@@ -8457,11 +8799,27 @@ export type WebhookCallAttributes = {
8457
8799
  */
8458
8800
  response_headers: {
8459
8801
  [k: string]: unknown;
8460
- };
8802
+ } | null;
8461
8803
  /**
8462
8804
  * The body of the response
8463
8805
  */
8464
8806
  response_payload: string | null;
8807
+ /**
8808
+ * The number of retries attempted so far
8809
+ */
8810
+ attempted_auto_retries_count: number;
8811
+ /**
8812
+ * The last moment the call occurred
8813
+ */
8814
+ last_sent_at: string;
8815
+ /**
8816
+ * The date when the next retry attempt is scheduled to run. If no retry attempt is scheduled, it is set to null
8817
+ */
8818
+ next_retry_at: string | null;
8819
+ /**
8820
+ * The current status
8821
+ */
8822
+ status: 'pending' | 'success' | 'failed' | 'rescheduled';
8465
8823
  };
8466
8824
  /**
8467
8825
  * JSON API links
@@ -8496,6 +8854,15 @@ export type WebhookCallInstancesTargetSchema = {
8496
8854
  meta: {
8497
8855
  total_count: number;
8498
8856
  };
8857
+ included: Webhook[];
8858
+ };
8859
+ /**
8860
+ * This interface was referenced by `WebhookCall`'s JSON-Schema
8861
+ * via the `self.targetSchema` link.
8862
+ */
8863
+ export type WebhookCallSelfTargetSchema = {
8864
+ data: WebhookCall;
8865
+ included: Webhook[];
8499
8866
  };
8500
8867
  /**
8501
8868
  * Configuration for different build triggers. You can have different staging and production environments in order to test your site before final deploy