@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
|
@@ -562,7 +562,6 @@ export type ItemInstancesHrefSchema = {
|
|
|
562
562
|
* The maximum number of entities to return (defaults to 30, maximum is 500)
|
|
563
563
|
*/
|
|
564
564
|
limit?: number;
|
|
565
|
-
[k: string]: unknown;
|
|
566
565
|
};
|
|
567
566
|
/**
|
|
568
567
|
* 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 +684,6 @@ export type ItemVersionInstancesHrefSchema = {
|
|
|
685
684
|
* The maximum number of entities to return (defaults to 15, maximum is 50)
|
|
686
685
|
*/
|
|
687
686
|
limit?: number;
|
|
688
|
-
[k: string]: unknown;
|
|
689
687
|
};
|
|
690
688
|
[k: string]: unknown;
|
|
691
689
|
};
|
|
@@ -838,7 +836,6 @@ export type UploadInstancesHrefSchema = {
|
|
|
838
836
|
* The maximum number of entities to return (defaults to 30, maximum is 500)
|
|
839
837
|
*/
|
|
840
838
|
limit?: number;
|
|
841
|
-
[k: string]: unknown;
|
|
842
839
|
};
|
|
843
840
|
[k: string]: unknown;
|
|
844
841
|
};
|
|
@@ -941,7 +938,6 @@ export type SearchResultInstancesHrefSchema = {
|
|
|
941
938
|
* The maximum number of entities to return (defaults to 20, maximum is 100)
|
|
942
939
|
*/
|
|
943
940
|
limit?: number;
|
|
944
|
-
[k: string]: unknown;
|
|
945
941
|
};
|
|
946
942
|
/**
|
|
947
943
|
* Attributes to filter search results
|
|
@@ -1064,8 +1060,55 @@ export type WebhookCallInstancesHrefSchema = {
|
|
|
1064
1060
|
* The maximum number of entities to return (defaults to 30, maximum is 500)
|
|
1065
1061
|
*/
|
|
1066
1062
|
limit?: number;
|
|
1067
|
-
[k: string]: unknown;
|
|
1068
1063
|
};
|
|
1064
|
+
/**
|
|
1065
|
+
* Attributes to filter
|
|
1066
|
+
*/
|
|
1067
|
+
filter?: {
|
|
1068
|
+
/**
|
|
1069
|
+
* IDs to fetch, comma separated
|
|
1070
|
+
*/
|
|
1071
|
+
ids?: string;
|
|
1072
|
+
fields?: {
|
|
1073
|
+
webhook_id?: {
|
|
1074
|
+
eq?: string;
|
|
1075
|
+
};
|
|
1076
|
+
entity_type?: {
|
|
1077
|
+
/**
|
|
1078
|
+
* The subject of webhook triggering
|
|
1079
|
+
*/
|
|
1080
|
+
eq?: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
|
|
1081
|
+
};
|
|
1082
|
+
event_type?: {
|
|
1083
|
+
/**
|
|
1084
|
+
* The event that triggers the webhook call
|
|
1085
|
+
*/
|
|
1086
|
+
eq?: 'create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate';
|
|
1087
|
+
};
|
|
1088
|
+
status?: {
|
|
1089
|
+
/**
|
|
1090
|
+
* The current status
|
|
1091
|
+
*/
|
|
1092
|
+
eq?: 'pending' | 'success' | 'failed' | 'rescheduled';
|
|
1093
|
+
};
|
|
1094
|
+
last_sent_at?: {
|
|
1095
|
+
gt?: string;
|
|
1096
|
+
lt?: string;
|
|
1097
|
+
};
|
|
1098
|
+
next_retry_at?: {
|
|
1099
|
+
gt?: string;
|
|
1100
|
+
lt?: string;
|
|
1101
|
+
};
|
|
1102
|
+
created_at?: {
|
|
1103
|
+
gt?: string;
|
|
1104
|
+
lt?: string;
|
|
1105
|
+
};
|
|
1106
|
+
};
|
|
1107
|
+
};
|
|
1108
|
+
/**
|
|
1109
|
+
* Fields used to order results
|
|
1110
|
+
*/
|
|
1111
|
+
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
1112
|
[k: string]: unknown;
|
|
1070
1113
|
};
|
|
1071
1114
|
/**
|
|
@@ -1281,7 +1324,6 @@ export type UploadTagInstancesHrefSchema = {
|
|
|
1281
1324
|
* The maximum number of entities to return (defaults to 50, maximum is 500)
|
|
1282
1325
|
*/
|
|
1283
1326
|
limit?: number;
|
|
1284
|
-
[k: string]: unknown;
|
|
1285
1327
|
};
|
|
1286
1328
|
[k: string]: unknown;
|
|
1287
1329
|
};
|
|
@@ -1327,7 +1369,6 @@ export type UploadSmartTagInstancesHrefSchema = {
|
|
|
1327
1369
|
* The maximum number of entities to return (defaults to 50, maximum is 500)
|
|
1328
1370
|
*/
|
|
1329
1371
|
limit?: number;
|
|
1330
|
-
[k: string]: unknown;
|
|
1331
1372
|
};
|
|
1332
1373
|
[k: string]: unknown;
|
|
1333
1374
|
};
|
|
@@ -4161,7 +4202,7 @@ export type ItemTypeDestroyJobSchema = {
|
|
|
4161
4202
|
* // single_line is a DatoCMS built-in editor that you can use with single-line string fields
|
|
4162
4203
|
* "editor": "single_line",
|
|
4163
4204
|
* // each built-in editor has specific settings
|
|
4164
|
-
* "parameters": { "heading": true },
|
|
4205
|
+
* "parameters": { "heading": true, "placeholder": "My blog post title" },
|
|
4165
4206
|
* "addons": []
|
|
4166
4207
|
* },
|
|
4167
4208
|
* }
|
|
@@ -4201,7 +4242,7 @@ export type ItemTypeDestroyJobSchema = {
|
|
|
4201
4242
|
* {
|
|
4202
4243
|
* "appearance": {
|
|
4203
4244
|
* "editor": "single_line",
|
|
4204
|
-
* "parameters": { "heading": true },
|
|
4245
|
+
* "parameters": { "heading": true, "placeholder": "My blog post title" },
|
|
4205
4246
|
* "addons": [
|
|
4206
4247
|
* {
|
|
4207
4248
|
* // "2138" is a the ID of a plugin exposing a manual addon editor
|
|
@@ -4902,9 +4943,10 @@ export type ItemTypeDestroyJobSchema = {
|
|
|
4902
4943
|
*
|
|
4903
4944
|
* Simple textual input for _Single-line string_ fields.
|
|
4904
4945
|
*
|
|
4905
|
-
* | Parameter | Type | Required | Description
|
|
4906
|
-
* |
|
|
4907
|
-
* | `heading`
|
|
4946
|
+
* | Parameter | Type | Required | Description |
|
|
4947
|
+
* | ------------- | --------- | -------- | ------------------------------------------------------------------------------------------ |
|
|
4948
|
+
* | `heading` | `Boolean` | ✅ | Indicates if the field should be shown bigger, as a field representing a heading |
|
|
4949
|
+
* | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
|
|
4908
4950
|
*
|
|
4909
4951
|
* </details>
|
|
4910
4952
|
*
|
|
@@ -4935,6 +4977,10 @@ export type ItemTypeDestroyJobSchema = {
|
|
|
4935
4977
|
*
|
|
4936
4978
|
* Basic textarea editor for _Multiple-paragraph text_ fields.
|
|
4937
4979
|
*
|
|
4980
|
+
* | Parameter | Type | Required | Description |
|
|
4981
|
+
* | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
|
|
4982
|
+
* | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
|
|
4983
|
+
*
|
|
4938
4984
|
* </details>
|
|
4939
4985
|
*
|
|
4940
4986
|
* <details>
|
|
@@ -4954,9 +5000,10 @@ export type ItemTypeDestroyJobSchema = {
|
|
|
4954
5000
|
*
|
|
4955
5001
|
* Built-in editor for _Slug_ fields.
|
|
4956
5002
|
*
|
|
4957
|
-
* | Parameter
|
|
4958
|
-
* |
|
|
4959
|
-
* | `url_prefix`
|
|
5003
|
+
* | Parameter | Type | Required | Description |
|
|
5004
|
+
* | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
|
|
5005
|
+
* | `url_prefix` | `String` | | A prefix that will be shown in the editor's form to give some context to your editors. |
|
|
5006
|
+
* | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
|
|
4960
5007
|
*
|
|
4961
5008
|
* </details>
|
|
4962
5009
|
*
|
|
@@ -5024,6 +5071,28 @@ export type ItemTypeDestroyJobSchema = {
|
|
|
5024
5071
|
*
|
|
5025
5072
|
* </details>
|
|
5026
5073
|
*
|
|
5074
|
+
* <details>
|
|
5075
|
+
* <summary><code>integer</code></summary>
|
|
5076
|
+
*
|
|
5077
|
+
* Built-in editor for _Integer_ fields.
|
|
5078
|
+
*
|
|
5079
|
+
* | Parameter | Type | Required | Description |
|
|
5080
|
+
* | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
|
|
5081
|
+
* | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
|
|
5082
|
+
*
|
|
5083
|
+
* </details>
|
|
5084
|
+
*
|
|
5085
|
+
* <details>
|
|
5086
|
+
* <summary><code>float</code></summary>
|
|
5087
|
+
*
|
|
5088
|
+
* Built-in editor for _Float_ fields.
|
|
5089
|
+
*
|
|
5090
|
+
* | Parameter | Type | Required | Description |
|
|
5091
|
+
* | ------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
|
|
5092
|
+
* | `placeholder` | `String` | | A placeholder that will be shown in the editor's input to provide editors with an example. |
|
|
5093
|
+
*
|
|
5094
|
+
* </details>
|
|
5095
|
+
*
|
|
5027
5096
|
*
|
|
5028
5097
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
5029
5098
|
* via the `definition` "field".
|
|
@@ -8208,12 +8277,19 @@ export type WebhookAttributes = {
|
|
|
8208
8277
|
* Additional headers that will be sent
|
|
8209
8278
|
*/
|
|
8210
8279
|
headers: {
|
|
8211
|
-
[k: string]:
|
|
8280
|
+
[k: string]: string;
|
|
8212
8281
|
};
|
|
8213
|
-
|
|
8214
|
-
|
|
8215
|
-
|
|
8216
|
-
|
|
8282
|
+
events: {
|
|
8283
|
+
/**
|
|
8284
|
+
* The subject of webhook triggering
|
|
8285
|
+
*/
|
|
8286
|
+
entity_type: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
|
|
8287
|
+
event_types: ('create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate')[];
|
|
8288
|
+
filters?: {
|
|
8289
|
+
entity_type: 'item_type' | 'item' | 'build_trigger' | 'environment' | 'environment_type';
|
|
8290
|
+
entity_ids: [string, ...string[]];
|
|
8291
|
+
}[] | null;
|
|
8292
|
+
}[];
|
|
8217
8293
|
/**
|
|
8218
8294
|
* Specifies which API version to use when serializing entities in the webhook payload
|
|
8219
8295
|
*/
|
|
@@ -8222,6 +8298,10 @@ export type WebhookAttributes = {
|
|
|
8222
8298
|
* Whether the you want records present in the payload to show blocks expanded or not
|
|
8223
8299
|
*/
|
|
8224
8300
|
nested_items_in_payload: boolean;
|
|
8301
|
+
/**
|
|
8302
|
+
* If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
|
|
8303
|
+
*/
|
|
8304
|
+
auto_retry: boolean;
|
|
8225
8305
|
};
|
|
8226
8306
|
/**
|
|
8227
8307
|
* JSON API data
|
|
@@ -8257,12 +8337,19 @@ export type WebhookCreateSchema = {
|
|
|
8257
8337
|
* Additional headers that will be sent
|
|
8258
8338
|
*/
|
|
8259
8339
|
headers: {
|
|
8260
|
-
[k: string]:
|
|
8340
|
+
[k: string]: string;
|
|
8261
8341
|
};
|
|
8262
|
-
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
|
|
8342
|
+
events: {
|
|
8343
|
+
/**
|
|
8344
|
+
* The subject of webhook triggering
|
|
8345
|
+
*/
|
|
8346
|
+
entity_type: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
|
|
8347
|
+
event_types: ('create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate')[];
|
|
8348
|
+
filters?: {
|
|
8349
|
+
entity_type: 'item_type' | 'item' | 'build_trigger' | 'environment' | 'environment_type';
|
|
8350
|
+
entity_ids: [string, ...string[]];
|
|
8351
|
+
}[] | null;
|
|
8352
|
+
}[];
|
|
8266
8353
|
/**
|
|
8267
8354
|
* HTTP Basic Authorization username
|
|
8268
8355
|
*/
|
|
@@ -8283,6 +8370,10 @@ export type WebhookCreateSchema = {
|
|
|
8283
8370
|
* Whether the you want records present in the payload to show blocks expanded or not
|
|
8284
8371
|
*/
|
|
8285
8372
|
nested_items_in_payload?: boolean;
|
|
8373
|
+
/**
|
|
8374
|
+
* If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
|
|
8375
|
+
*/
|
|
8376
|
+
auto_retry?: boolean;
|
|
8286
8377
|
};
|
|
8287
8378
|
};
|
|
8288
8379
|
};
|
|
@@ -8318,12 +8409,19 @@ export type WebhookUpdateSchema = {
|
|
|
8318
8409
|
* Additional headers that will be sent
|
|
8319
8410
|
*/
|
|
8320
8411
|
headers?: {
|
|
8321
|
-
[k: string]:
|
|
8412
|
+
[k: string]: string;
|
|
8322
8413
|
};
|
|
8323
|
-
|
|
8324
|
-
|
|
8325
|
-
|
|
8326
|
-
|
|
8414
|
+
events?: {
|
|
8415
|
+
/**
|
|
8416
|
+
* The subject of webhook triggering
|
|
8417
|
+
*/
|
|
8418
|
+
entity_type: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
|
|
8419
|
+
event_types: ('create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate')[];
|
|
8420
|
+
filters?: {
|
|
8421
|
+
entity_type: 'item_type' | 'item' | 'build_trigger' | 'environment' | 'environment_type';
|
|
8422
|
+
entity_ids: [string, ...string[]];
|
|
8423
|
+
}[] | null;
|
|
8424
|
+
}[];
|
|
8327
8425
|
/**
|
|
8328
8426
|
* HTTP Basic Authorization username
|
|
8329
8427
|
*/
|
|
@@ -8344,6 +8442,10 @@ export type WebhookUpdateSchema = {
|
|
|
8344
8442
|
* Whether the you want records present in the payload to show blocks expanded or not
|
|
8345
8443
|
*/
|
|
8346
8444
|
nested_items_in_payload?: boolean;
|
|
8445
|
+
/**
|
|
8446
|
+
* If enabled, the system will attempt to retry the call several times when the webhook operation fails due to timeouts or errors.
|
|
8447
|
+
*/
|
|
8448
|
+
auto_retry?: boolean;
|
|
8347
8449
|
};
|
|
8348
8450
|
};
|
|
8349
8451
|
};
|
|
@@ -8397,13 +8499,13 @@ export type WebhookCallAttributes = {
|
|
|
8397
8499
|
/**
|
|
8398
8500
|
* The subject of webhook triggering
|
|
8399
8501
|
*/
|
|
8400
|
-
entity_type: '
|
|
8502
|
+
entity_type: 'item_type' | 'item' | 'upload' | 'build_trigger' | 'environment' | 'maintenance_mode' | 'sso_user' | 'cda_cache_tags';
|
|
8401
8503
|
/**
|
|
8402
8504
|
* The event that triggers the webhook call
|
|
8403
8505
|
*/
|
|
8404
|
-
event_type: 'create' | 'update' | 'delete' | 'publish' | 'unpublish';
|
|
8506
|
+
event_type: 'create' | 'update' | 'delete' | 'publish' | 'unpublish' | 'promote' | 'deploy_started' | 'deploy_succeeded' | 'deploy_failed' | 'change' | 'invalidate';
|
|
8405
8507
|
/**
|
|
8406
|
-
* The moment the
|
|
8508
|
+
* The moment the event was created
|
|
8407
8509
|
*/
|
|
8408
8510
|
created_at: string;
|
|
8409
8511
|
/**
|
|
@@ -8429,11 +8531,27 @@ export type WebhookCallAttributes = {
|
|
|
8429
8531
|
*/
|
|
8430
8532
|
response_headers: {
|
|
8431
8533
|
[k: string]: unknown;
|
|
8432
|
-
};
|
|
8534
|
+
} | null;
|
|
8433
8535
|
/**
|
|
8434
8536
|
* The body of the response
|
|
8435
8537
|
*/
|
|
8436
8538
|
response_payload: string | null;
|
|
8539
|
+
/**
|
|
8540
|
+
* The number of retries attempted so far
|
|
8541
|
+
*/
|
|
8542
|
+
attempted_auto_retries_count: number;
|
|
8543
|
+
/**
|
|
8544
|
+
* The last moment the call occurred
|
|
8545
|
+
*/
|
|
8546
|
+
last_sent_at: string;
|
|
8547
|
+
/**
|
|
8548
|
+
* The date when the next retry attempt is scheduled to run. If no retry attempt is scheduled, it is set to null
|
|
8549
|
+
*/
|
|
8550
|
+
next_retry_at: string | null;
|
|
8551
|
+
/**
|
|
8552
|
+
* The current status
|
|
8553
|
+
*/
|
|
8554
|
+
status: 'pending' | 'success' | 'failed' | 'rescheduled';
|
|
8437
8555
|
};
|
|
8438
8556
|
/**
|
|
8439
8557
|
* JSON API links
|
|
@@ -8468,6 +8586,15 @@ export type WebhookCallInstancesTargetSchema = {
|
|
|
8468
8586
|
meta: {
|
|
8469
8587
|
total_count: number;
|
|
8470
8588
|
};
|
|
8589
|
+
included: Webhook[];
|
|
8590
|
+
};
|
|
8591
|
+
/**
|
|
8592
|
+
* This interface was referenced by `WebhookCall`'s JSON-Schema
|
|
8593
|
+
* via the `self.targetSchema` link.
|
|
8594
|
+
*/
|
|
8595
|
+
export type WebhookCallSelfTargetSchema = {
|
|
8596
|
+
data: WebhookCall;
|
|
8597
|
+
included: Webhook[];
|
|
8471
8598
|
};
|
|
8472
8599
|
/**
|
|
8473
8600
|
* Configuration for different build triggers. You can have different staging and production environments in order to test your site before final deploy
|