@datocms/cma-client 3.3.4 → 3.3.7
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.
- package/dist/cjs/generated/Client.js +1 -1
- package/dist/cjs/generated/resources/Webhook.js +2 -0
- package/dist/cjs/generated/resources/Webhook.js.map +1 -1
- package/dist/cjs/generated/resources/WebhookCall.js +27 -0
- package/dist/cjs/generated/resources/WebhookCall.js.map +1 -1
- package/dist/esm/generated/Client.js +1 -1
- package/dist/esm/generated/SchemaTypes.d.ts +161 -34
- package/dist/esm/generated/SimpleSchemaTypes.d.ts +189 -43
- package/dist/esm/generated/resources/Webhook.js +2 -0
- package/dist/esm/generated/resources/Webhook.js.map +1 -1
- package/dist/esm/generated/resources/WebhookCall.d.ts +18 -0
- package/dist/esm/generated/resources/WebhookCall.js +27 -0
- package/dist/esm/generated/resources/WebhookCall.js.map +1 -1
- package/dist/types/generated/SchemaTypes.d.ts +161 -34
- package/dist/types/generated/SimpleSchemaTypes.d.ts +189 -43
- package/dist/types/generated/resources/WebhookCall.d.ts +18 -0
- package/package.json +13 -6
- package/resources.json +29 -2
- package/src/generated/Client.ts +1 -1
- package/src/generated/SchemaTypes.ts +291 -36
- package/src/generated/SimpleSchemaTypes.ts +364 -46
- package/src/generated/resources/Webhook.ts +2 -0
- package/src/generated/resources/WebhookCall.ts +33 -0
|
@@ -662,7 +662,6 @@ export type ItemInstancesHrefSchema = {
|
|
|
662
662
|
* The maximum number of entities to return (defaults to 30, maximum is 500)
|
|
663
663
|
*/
|
|
664
664
|
limit?: number;
|
|
665
|
-
[k: string]: unknown;
|
|
666
665
|
};
|
|
667
666
|
/**
|
|
668
667
|
* 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 +915,6 @@ export type ItemVersionInstancesHrefSchema = {
|
|
|
916
915
|
* The maximum number of entities to return (defaults to 15, maximum is 50)
|
|
917
916
|
*/
|
|
918
917
|
limit?: number;
|
|
919
|
-
[k: string]: unknown;
|
|
920
918
|
};
|
|
921
919
|
[k: string]: unknown;
|
|
922
920
|
};
|
|
@@ -985,7 +983,6 @@ export type UploadInstancesHrefSchema = {
|
|
|
985
983
|
* The maximum number of entities to return (defaults to 30, maximum is 500)
|
|
986
984
|
*/
|
|
987
985
|
limit?: number;
|
|
988
|
-
[k: string]: unknown;
|
|
989
986
|
};
|
|
990
987
|
[k: string]: unknown;
|
|
991
988
|
};
|
|
@@ -1123,7 +1120,6 @@ export type SearchResultInstancesHrefSchema = {
|
|
|
1123
1120
|
* The maximum number of entities to return (defaults to 20, maximum is 100)
|
|
1124
1121
|
*/
|
|
1125
1122
|
limit?: number;
|
|
1126
|
-
[k: string]: unknown;
|
|
1127
1123
|
};
|
|
1128
1124
|
/**
|
|
1129
1125
|
* Attributes to filter search results
|
|
@@ -1271,8 +1267,55 @@ export type WebhookCallInstancesHrefSchema = {
|
|
|
1271
1267
|
* The maximum number of entities to return (defaults to 30, maximum is 500)
|
|
1272
1268
|
*/
|
|
1273
1269
|
limit?: number;
|
|
1274
|
-
[k: string]: unknown;
|
|
1275
1270
|
};
|
|
1271
|
+
/**
|
|
1272
|
+
* Attributes to filter
|
|
1273
|
+
*/
|
|
1274
|
+
filter?: {
|
|
1275
|
+
/**
|
|
1276
|
+
* IDs to fetch, comma separated
|
|
1277
|
+
*/
|
|
1278
|
+
ids?: string;
|
|
1279
|
+
fields?: {
|
|
1280
|
+
webhook_id?: {
|
|
1281
|
+
eq?: string;
|
|
1282
|
+
};
|
|
1283
|
+
entity_type?: {
|
|
1284
|
+
/**
|
|
1285
|
+
* The subject of webhook triggering
|
|
1286
|
+
*/
|
|
1287
|
+
eq?: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
|
|
1288
|
+
};
|
|
1289
|
+
event_type?: {
|
|
1290
|
+
/**
|
|
1291
|
+
* The event that triggers the webhook call
|
|
1292
|
+
*/
|
|
1293
|
+
eq?: 'create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate';
|
|
1294
|
+
};
|
|
1295
|
+
status?: {
|
|
1296
|
+
/**
|
|
1297
|
+
* The current status
|
|
1298
|
+
*/
|
|
1299
|
+
eq?: 'pending' | 'success' | 'failed' | 'rescheduled';
|
|
1300
|
+
};
|
|
1301
|
+
last_sent_at?: {
|
|
1302
|
+
gt?: string;
|
|
1303
|
+
lt?: string;
|
|
1304
|
+
};
|
|
1305
|
+
next_retry_at?: {
|
|
1306
|
+
gt?: string;
|
|
1307
|
+
lt?: string;
|
|
1308
|
+
};
|
|
1309
|
+
created_at?: {
|
|
1310
|
+
gt?: string;
|
|
1311
|
+
lt?: string;
|
|
1312
|
+
};
|
|
1313
|
+
};
|
|
1314
|
+
};
|
|
1315
|
+
/**
|
|
1316
|
+
* Fields used to order results
|
|
1317
|
+
*/
|
|
1318
|
+
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
1319
|
[k: string]: unknown;
|
|
1277
1320
|
};
|
|
1278
1321
|
/**
|
|
@@ -1561,7 +1604,6 @@ export type UploadTagInstancesHrefSchema = {
|
|
|
1561
1604
|
* The maximum number of entities to return (defaults to 50, maximum is 500)
|
|
1562
1605
|
*/
|
|
1563
1606
|
limit?: number;
|
|
1564
|
-
[k: string]: unknown;
|
|
1565
1607
|
};
|
|
1566
1608
|
[k: string]: unknown;
|
|
1567
1609
|
};
|
|
@@ -1612,7 +1654,6 @@ export type UploadSmartTagInstancesHrefSchema = {
|
|
|
1612
1654
|
* The maximum number of entities to return (defaults to 50, maximum is 500)
|
|
1613
1655
|
*/
|
|
1614
1656
|
limit?: number;
|
|
1615
|
-
[k: string]: unknown;
|
|
1616
1657
|
};
|
|
1617
1658
|
[k: string]: unknown;
|
|
1618
1659
|
};
|
|
@@ -4628,7 +4669,7 @@ export type JobData = {
|
|
|
4628
4669
|
* // single_line is a DatoCMS built-in editor that you can use with single-line string fields
|
|
4629
4670
|
* "editor": "single_line",
|
|
4630
4671
|
* // each built-in editor has specific settings
|
|
4631
|
-
* "parameters": { "heading": true },
|
|
4672
|
+
* "parameters": { "heading": true, "placeholder": "My blog post title" },
|
|
4632
4673
|
* "addons": []
|
|
4633
4674
|
* },
|
|
4634
4675
|
* }
|
|
@@ -4668,7 +4709,7 @@ export type JobData = {
|
|
|
4668
4709
|
* {
|
|
4669
4710
|
* "appearance": {
|
|
4670
4711
|
* "editor": "single_line",
|
|
4671
|
-
* "parameters": { "heading": true },
|
|
4712
|
+
* "parameters": { "heading": true, "placeholder": "My blog post title" },
|
|
4672
4713
|
* "addons": [
|
|
4673
4714
|
* {
|
|
4674
4715
|
* // "2138" is a the ID of a plugin exposing a manual addon editor
|
|
@@ -5369,9 +5410,10 @@ export type JobData = {
|
|
|
5369
5410
|
*
|
|
5370
5411
|
* Simple textual input for _Single-line string_ fields.
|
|
5371
5412
|
*
|
|
5372
|
-
* | Parameter | Type | Required | Description
|
|
5373
|
-
* |
|
|
5374
|
-
* | `heading`
|
|
5413
|
+
* | Parameter | Type | Required | Description |
|
|
5414
|
+
* | ------------- | --------- | -------- | ------------------------------------------------------------------------------------------ |
|
|
5415
|
+
* | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
|
|
5416
|
+
* | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
|
|
5375
5417
|
*
|
|
5376
5418
|
* </details>
|
|
5377
5419
|
*
|
|
@@ -5402,6 +5444,10 @@ export type JobData = {
|
|
|
5402
5444
|
*
|
|
5403
5445
|
* Basic textarea editor for _Multiple-paragraph text_ fields.
|
|
5404
5446
|
*
|
|
5447
|
+
* | Parameter | Type | Required | Description |
|
|
5448
|
+
* | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
|
|
5449
|
+
* | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
|
|
5450
|
+
*
|
|
5405
5451
|
* </details>
|
|
5406
5452
|
*
|
|
5407
5453
|
* <details>
|
|
@@ -5421,9 +5467,10 @@ export type JobData = {
|
|
|
5421
5467
|
*
|
|
5422
5468
|
* Built-in editor for _Slug_ fields.
|
|
5423
5469
|
*
|
|
5424
|
-
* | Parameter
|
|
5425
|
-
* |
|
|
5426
|
-
* | `url_prefix`
|
|
5470
|
+
* | Parameter | Type | Required | Description |
|
|
5471
|
+
* | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
|
|
5472
|
+
* | `url_prefix` | `String` | | A prefix that will be shown in the editor's form to give some context to your editors. |
|
|
5473
|
+
* | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
|
|
5427
5474
|
*
|
|
5428
5475
|
* </details>
|
|
5429
5476
|
*
|
|
@@ -5491,6 +5538,28 @@ export type JobData = {
|
|
|
5491
5538
|
*
|
|
5492
5539
|
* </details>
|
|
5493
5540
|
*
|
|
5541
|
+
* <details>
|
|
5542
|
+
* <summary><code>integer</code></summary>
|
|
5543
|
+
*
|
|
5544
|
+
* Built-in editor for _Integer_ fields.
|
|
5545
|
+
*
|
|
5546
|
+
* | Parameter | Type | Required | Description |
|
|
5547
|
+
* | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
|
|
5548
|
+
* | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
|
|
5549
|
+
*
|
|
5550
|
+
* </details>
|
|
5551
|
+
*
|
|
5552
|
+
* <details>
|
|
5553
|
+
* <summary><code>float</code></summary>
|
|
5554
|
+
*
|
|
5555
|
+
* Built-in editor for _Float_ fields.
|
|
5556
|
+
*
|
|
5557
|
+
* | Parameter | Type | Required | Description |
|
|
5558
|
+
* | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
|
|
5559
|
+
* | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
|
|
5560
|
+
*
|
|
5561
|
+
* </details>
|
|
5562
|
+
*
|
|
5494
5563
|
*
|
|
5495
5564
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
5496
5565
|
* via the `definition` "field".
|
|
@@ -8059,12 +8128,19 @@ export type Webhook = {
|
|
|
8059
8128
|
* Additional headers that will be sent
|
|
8060
8129
|
*/
|
|
8061
8130
|
headers: {
|
|
8062
|
-
[k: string]:
|
|
8131
|
+
[k: string]: string;
|
|
8063
8132
|
};
|
|
8064
|
-
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
8133
|
+
events: {
|
|
8134
|
+
/**
|
|
8135
|
+
* The subject of webhook triggering
|
|
8136
|
+
*/
|
|
8137
|
+
entity_type: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
|
|
8138
|
+
event_types: ('create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate')[];
|
|
8139
|
+
filters?: {
|
|
8140
|
+
entity_type: 'item_type' | 'item' | 'build_trigger' | 'environment' | 'environment_type';
|
|
8141
|
+
entity_ids: [string, ...string[]];
|
|
8142
|
+
}[] | null;
|
|
8143
|
+
}[];
|
|
8068
8144
|
/**
|
|
8069
8145
|
* Specifies which API version to use when serializing entities in the webhook payload
|
|
8070
8146
|
*/
|
|
@@ -8073,6 +8149,10 @@ export type Webhook = {
|
|
|
8073
8149
|
* Whether the you want records present in the payload to show blocks expanded or not
|
|
8074
8150
|
*/
|
|
8075
8151
|
nested_items_in_payload: boolean;
|
|
8152
|
+
/**
|
|
8153
|
+
* If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
|
|
8154
|
+
*/
|
|
8155
|
+
auto_retry: boolean;
|
|
8076
8156
|
};
|
|
8077
8157
|
export type WebhookCreateTargetSchema = Webhook;
|
|
8078
8158
|
export type WebhookUpdateTargetSchema = Webhook;
|
|
@@ -8123,12 +8203,19 @@ export type WebhookAttributes = {
|
|
|
8123
8203
|
* Additional headers that will be sent
|
|
8124
8204
|
*/
|
|
8125
8205
|
headers: {
|
|
8126
|
-
[k: string]:
|
|
8206
|
+
[k: string]: string;
|
|
8127
8207
|
};
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
|
|
8208
|
+
events: {
|
|
8209
|
+
/**
|
|
8210
|
+
* The subject of webhook triggering
|
|
8211
|
+
*/
|
|
8212
|
+
entity_type: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
|
|
8213
|
+
event_types: ('create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate')[];
|
|
8214
|
+
filters?: {
|
|
8215
|
+
entity_type: 'item_type' | 'item' | 'build_trigger' | 'environment' | 'environment_type';
|
|
8216
|
+
entity_ids: [string, ...string[]];
|
|
8217
|
+
}[] | null;
|
|
8218
|
+
}[];
|
|
8132
8219
|
/**
|
|
8133
8220
|
* Specifies which API version to use when serializing entities in the webhook payload
|
|
8134
8221
|
*/
|
|
@@ -8137,6 +8224,10 @@ export type WebhookAttributes = {
|
|
|
8137
8224
|
* Whether the you want records present in the payload to show blocks expanded or not
|
|
8138
8225
|
*/
|
|
8139
8226
|
nested_items_in_payload: boolean;
|
|
8227
|
+
/**
|
|
8228
|
+
* If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
|
|
8229
|
+
*/
|
|
8230
|
+
auto_retry: boolean;
|
|
8140
8231
|
};
|
|
8141
8232
|
/**
|
|
8142
8233
|
* This interface was referenced by `Webhook`'s JSON-Schema
|
|
@@ -8160,12 +8251,19 @@ export type WebhookCreateSchema = {
|
|
|
8160
8251
|
* Additional headers that will be sent
|
|
8161
8252
|
*/
|
|
8162
8253
|
headers: {
|
|
8163
|
-
[k: string]:
|
|
8254
|
+
[k: string]: string;
|
|
8164
8255
|
};
|
|
8165
|
-
|
|
8166
|
-
|
|
8167
|
-
|
|
8168
|
-
|
|
8256
|
+
events: {
|
|
8257
|
+
/**
|
|
8258
|
+
* The subject of webhook triggering
|
|
8259
|
+
*/
|
|
8260
|
+
entity_type: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
|
|
8261
|
+
event_types: ('create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate')[];
|
|
8262
|
+
filters?: {
|
|
8263
|
+
entity_type: 'item_type' | 'item' | 'build_trigger' | 'environment' | 'environment_type';
|
|
8264
|
+
entity_ids: [string, ...string[]];
|
|
8265
|
+
}[] | null;
|
|
8266
|
+
}[];
|
|
8169
8267
|
/**
|
|
8170
8268
|
* HTTP Basic Authorization username
|
|
8171
8269
|
*/
|
|
@@ -8186,6 +8284,10 @@ export type WebhookCreateSchema = {
|
|
|
8186
8284
|
* Whether the you want records present in the payload to show blocks expanded or not
|
|
8187
8285
|
*/
|
|
8188
8286
|
nested_items_in_payload?: boolean;
|
|
8287
|
+
/**
|
|
8288
|
+
* If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
|
|
8289
|
+
*/
|
|
8290
|
+
auto_retry?: boolean;
|
|
8189
8291
|
};
|
|
8190
8292
|
/**
|
|
8191
8293
|
* This interface was referenced by `Webhook`'s JSON-Schema
|
|
@@ -8210,12 +8312,19 @@ export type WebhookUpdateSchema = {
|
|
|
8210
8312
|
* Additional headers that will be sent
|
|
8211
8313
|
*/
|
|
8212
8314
|
headers?: {
|
|
8213
|
-
[k: string]:
|
|
8315
|
+
[k: string]: string;
|
|
8214
8316
|
};
|
|
8215
|
-
|
|
8216
|
-
|
|
8217
|
-
|
|
8218
|
-
|
|
8317
|
+
events?: {
|
|
8318
|
+
/**
|
|
8319
|
+
* The subject of webhook triggering
|
|
8320
|
+
*/
|
|
8321
|
+
entity_type: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
|
|
8322
|
+
event_types: ('create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate')[];
|
|
8323
|
+
filters?: {
|
|
8324
|
+
entity_type: 'item_type' | 'item' | 'build_trigger' | 'environment' | 'environment_type';
|
|
8325
|
+
entity_ids: [string, ...string[]];
|
|
8326
|
+
}[] | null;
|
|
8327
|
+
}[];
|
|
8219
8328
|
/**
|
|
8220
8329
|
* HTTP Basic Authorization username
|
|
8221
8330
|
*/
|
|
@@ -8236,6 +8345,10 @@ export type WebhookUpdateSchema = {
|
|
|
8236
8345
|
* Whether the you want records present in the payload to show blocks expanded or not
|
|
8237
8346
|
*/
|
|
8238
8347
|
nested_items_in_payload?: boolean;
|
|
8348
|
+
/**
|
|
8349
|
+
* If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
|
|
8350
|
+
*/
|
|
8351
|
+
auto_retry?: boolean;
|
|
8239
8352
|
};
|
|
8240
8353
|
/**
|
|
8241
8354
|
* Represents a log entry in the webhooks activity list.
|
|
@@ -8249,13 +8362,13 @@ export type WebhookCall = {
|
|
|
8249
8362
|
/**
|
|
8250
8363
|
* The subject of webhook triggering
|
|
8251
8364
|
*/
|
|
8252
|
-
entity_type: '
|
|
8365
|
+
entity_type: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
|
|
8253
8366
|
/**
|
|
8254
8367
|
* The event that triggers the webhook call
|
|
8255
8368
|
*/
|
|
8256
|
-
event_type: 'create' | 'update' | 'delete' | 'publish' | 'unpublish';
|
|
8369
|
+
event_type: 'create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate';
|
|
8257
8370
|
/**
|
|
8258
|
-
* The moment the
|
|
8371
|
+
* The moment the event was created
|
|
8259
8372
|
*/
|
|
8260
8373
|
created_at: string;
|
|
8261
8374
|
/**
|
|
@@ -8281,13 +8394,30 @@ export type WebhookCall = {
|
|
|
8281
8394
|
*/
|
|
8282
8395
|
response_headers: {
|
|
8283
8396
|
[k: string]: unknown;
|
|
8284
|
-
};
|
|
8397
|
+
} | null;
|
|
8285
8398
|
/**
|
|
8286
8399
|
* The body of the response
|
|
8287
8400
|
*/
|
|
8288
8401
|
response_payload: string | null;
|
|
8402
|
+
/**
|
|
8403
|
+
* The number of retries attempted so far
|
|
8404
|
+
*/
|
|
8405
|
+
attempted_auto_retries_count: number;
|
|
8406
|
+
/**
|
|
8407
|
+
* The last moment the call occurred
|
|
8408
|
+
*/
|
|
8409
|
+
last_sent_at: string;
|
|
8410
|
+
/**
|
|
8411
|
+
* The date when the next retry attempt is scheduled to run. If no retry attempt is scheduled, it is set to null
|
|
8412
|
+
*/
|
|
8413
|
+
next_retry_at: string | null;
|
|
8414
|
+
/**
|
|
8415
|
+
* The current status
|
|
8416
|
+
*/
|
|
8417
|
+
status: 'pending' | 'success' | 'failed' | 'rescheduled';
|
|
8289
8418
|
webhook: WebhookData;
|
|
8290
8419
|
};
|
|
8420
|
+
export type WebhookCallSelfTargetSchema = WebhookCall;
|
|
8291
8421
|
/**
|
|
8292
8422
|
* JSON API data
|
|
8293
8423
|
*
|
|
@@ -8308,13 +8438,13 @@ export type WebhookCallAttributes = {
|
|
|
8308
8438
|
/**
|
|
8309
8439
|
* The subject of webhook triggering
|
|
8310
8440
|
*/
|
|
8311
|
-
entity_type: '
|
|
8441
|
+
entity_type: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
|
|
8312
8442
|
/**
|
|
8313
8443
|
* The event that triggers the webhook call
|
|
8314
8444
|
*/
|
|
8315
|
-
event_type: 'create' | 'update' | 'delete' | 'publish' | 'unpublish';
|
|
8445
|
+
event_type: 'create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate';
|
|
8316
8446
|
/**
|
|
8317
|
-
* The moment the
|
|
8447
|
+
* The moment the event was created
|
|
8318
8448
|
*/
|
|
8319
8449
|
created_at: string;
|
|
8320
8450
|
/**
|
|
@@ -8340,11 +8470,27 @@ export type WebhookCallAttributes = {
|
|
|
8340
8470
|
*/
|
|
8341
8471
|
response_headers: {
|
|
8342
8472
|
[k: string]: unknown;
|
|
8343
|
-
};
|
|
8473
|
+
} | null;
|
|
8344
8474
|
/**
|
|
8345
8475
|
* The body of the response
|
|
8346
8476
|
*/
|
|
8347
8477
|
response_payload: string | null;
|
|
8478
|
+
/**
|
|
8479
|
+
* The number of retries attempted so far
|
|
8480
|
+
*/
|
|
8481
|
+
attempted_auto_retries_count: number;
|
|
8482
|
+
/**
|
|
8483
|
+
* The last moment the call occurred
|
|
8484
|
+
*/
|
|
8485
|
+
last_sent_at: string;
|
|
8486
|
+
/**
|
|
8487
|
+
* The date when the next retry attempt is scheduled to run. If no retry attempt is scheduled, it is set to null
|
|
8488
|
+
*/
|
|
8489
|
+
next_retry_at: string | null;
|
|
8490
|
+
/**
|
|
8491
|
+
* The current status
|
|
8492
|
+
*/
|
|
8493
|
+
status: 'pending' | 'success' | 'failed' | 'rescheduled';
|
|
8348
8494
|
};
|
|
8349
8495
|
/**
|
|
8350
8496
|
* JSON API links
|
|
@@ -40,6 +40,24 @@ export default class WebhookCall extends BaseResource {
|
|
|
40
40
|
* @throws {TimeoutError}
|
|
41
41
|
*/
|
|
42
42
|
rawListPagedIterator(queryParams?: Utils.OmitFromKnownKeys<SchemaTypes.WebhookCallInstancesHrefSchema, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<SchemaTypes.WebhookCall, void, unknown>;
|
|
43
|
+
/**
|
|
44
|
+
* Retrieve a webhook call
|
|
45
|
+
*
|
|
46
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/webhook-call/self
|
|
47
|
+
*
|
|
48
|
+
* @throws {ApiError}
|
|
49
|
+
* @throws {TimeoutError}
|
|
50
|
+
*/
|
|
51
|
+
find(webhookCallId: string | SimpleSchemaTypes.WebhookCallData): Promise<SimpleSchemaTypes.WebhookCall>;
|
|
52
|
+
/**
|
|
53
|
+
* Retrieve a webhook call
|
|
54
|
+
*
|
|
55
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/webhook-call/self
|
|
56
|
+
*
|
|
57
|
+
* @throws {ApiError}
|
|
58
|
+
* @throws {TimeoutError}
|
|
59
|
+
*/
|
|
60
|
+
rawFind(webhookCallId: string): Promise<SchemaTypes.WebhookCallSelfTargetSchema>;
|
|
43
61
|
/**
|
|
44
62
|
* Re-send the webhook call
|
|
45
63
|
*
|
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datocms/cma-client",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.7",
|
|
4
4
|
"description": "JS client for DatoCMS REST Content Management API",
|
|
5
|
-
"keywords": [
|
|
5
|
+
"keywords": [
|
|
6
|
+
"datocms",
|
|
7
|
+
"client"
|
|
8
|
+
],
|
|
6
9
|
"author": "Stefano Verna <s.verna@datocms.com>",
|
|
7
10
|
"homepage": "https://github.com/datocms/js-rest-api-clients/tree/main/packages/cma-client#readme",
|
|
8
11
|
"license": "MIT",
|
|
@@ -14,7 +17,11 @@
|
|
|
14
17
|
"lib": "dist",
|
|
15
18
|
"test": "__tests__"
|
|
16
19
|
},
|
|
17
|
-
"files": [
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"src",
|
|
23
|
+
"resources.json"
|
|
24
|
+
],
|
|
18
25
|
"publishConfig": {
|
|
19
26
|
"access": "public"
|
|
20
27
|
},
|
|
@@ -30,12 +37,12 @@
|
|
|
30
37
|
"url": "https://github.com/datocms/js-rest-api-clients/issues"
|
|
31
38
|
},
|
|
32
39
|
"dependencies": {
|
|
33
|
-
"@datocms/rest-client-utils": "^3.3.
|
|
40
|
+
"@datocms/rest-client-utils": "^3.3.5",
|
|
34
41
|
"uuid": "^9.0.1"
|
|
35
42
|
},
|
|
36
43
|
"devDependencies": {
|
|
37
|
-
"@datocms/dashboard-client": "^3.3.
|
|
44
|
+
"@datocms/dashboard-client": "^3.3.7",
|
|
38
45
|
"@types/uuid": "^9.0.7"
|
|
39
46
|
},
|
|
40
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "97f5a4a4c7c505305e90115907d2db971bacc2ce"
|
|
41
48
|
}
|
package/resources.json
CHANGED
|
@@ -3008,7 +3008,8 @@
|
|
|
3008
3008
|
"http_basic_password",
|
|
3009
3009
|
"enabled",
|
|
3010
3010
|
"payload_api_version",
|
|
3011
|
-
"nested_items_in_payload"
|
|
3011
|
+
"nested_items_in_payload",
|
|
3012
|
+
"auto_retry"
|
|
3012
3013
|
],
|
|
3013
3014
|
"relationships": []
|
|
3014
3015
|
},
|
|
@@ -3051,7 +3052,8 @@
|
|
|
3051
3052
|
"http_basic_password",
|
|
3052
3053
|
"enabled",
|
|
3053
3054
|
"payload_api_version",
|
|
3054
|
-
"nested_items_in_payload"
|
|
3055
|
+
"nested_items_in_payload",
|
|
3056
|
+
"auto_retry"
|
|
3055
3057
|
],
|
|
3056
3058
|
"relationships": []
|
|
3057
3059
|
},
|
|
@@ -3150,6 +3152,31 @@
|
|
|
3150
3152
|
"name": "list",
|
|
3151
3153
|
"rawName": "rawList"
|
|
3152
3154
|
},
|
|
3155
|
+
{
|
|
3156
|
+
"returnsCollection": false,
|
|
3157
|
+
"docUrl": "https://www.datocms.com/docs/content-management-api/resources/webhook-call/self",
|
|
3158
|
+
"rel": "self",
|
|
3159
|
+
"urlTemplate": "/webhook_calls/${webhookCallId}",
|
|
3160
|
+
"method": "GET",
|
|
3161
|
+
"comment": "Retrieve a webhook call",
|
|
3162
|
+
"urlPlaceholders": [
|
|
3163
|
+
{
|
|
3164
|
+
"variableName": "webhookCallId",
|
|
3165
|
+
"isEntityId": true,
|
|
3166
|
+
"relType": "WebhookCallData"
|
|
3167
|
+
}
|
|
3168
|
+
],
|
|
3169
|
+
"entityIdPlaceholder": {
|
|
3170
|
+
"variableName": "webhookCallId",
|
|
3171
|
+
"isEntityId": true,
|
|
3172
|
+
"relType": "WebhookCallData"
|
|
3173
|
+
},
|
|
3174
|
+
"optionalRequestBody": false,
|
|
3175
|
+
"queryParamsRequired": false,
|
|
3176
|
+
"responseType": "WebhookCallSelfTargetSchema",
|
|
3177
|
+
"name": "find",
|
|
3178
|
+
"rawName": "rawFind"
|
|
3179
|
+
},
|
|
3153
3180
|
{
|
|
3154
3181
|
"returnsCollection": false,
|
|
3155
3182
|
"docUrl": "https://www.datocms.com/docs/content-management-api/resources/webhook-call/resend_webhook",
|
package/src/generated/Client.ts
CHANGED
|
@@ -145,7 +145,7 @@ export class Client {
|
|
|
145
145
|
...this.config,
|
|
146
146
|
...options,
|
|
147
147
|
logFn: this.config.logFn || console.log,
|
|
148
|
-
userAgent: '@datocms/cma-client v3.3.
|
|
148
|
+
userAgent: '@datocms/cma-client v3.3.7',
|
|
149
149
|
baseUrl: this.baseUrl,
|
|
150
150
|
preCallStack: new Error().stack,
|
|
151
151
|
extraHeaders: {
|