@productcraft/trawl 0.2.1 → 0.2.2

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/index.d.ts CHANGED
@@ -497,26 +497,60 @@ interface components {
497
497
  */
498
498
  low_balance_threshold_steps: number;
499
499
  };
500
- ErrorResponseDto: {
500
+ ErrorParamDto: {
501
501
  /**
502
- * @description Stable, machine-readable error code; branch on this, not on `message`. Always present. A route-specific code when the route defines one (e.g. `WEBHOOK_ENDPOINT_NOT_FOUND`, `SERVICE_NOT_ENABLED`), otherwise the generic code for the status: `BAD_REQUEST`, `VALIDATION_ERROR` (400 from request validation), `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `CONFLICT`, `PAYLOAD_TOO_LARGE`, `UNPROCESSABLE_ENTITY`, `RATE_LIMITED`, `INTERNAL_SERVER_ERROR`, `SERVICE_UNAVAILABLE`.
503
- * @example SERVICE_NOT_ENABLED
502
+ * @description The failed rule (class-validator constraint name, e.g. `isEmail`, `isUuid`, `whitelistValidation` for a field the operation does not declare), or `invalid`.
503
+ * @example isEmail
504
504
  */
505
505
  code: string;
506
506
  /**
507
- * @description Human-readable error message. May be a class-validator array on 400.
508
- * @example Policy denies trawl.read on pcft:workspace/7a0c2f7e-2b8d-4f7f-9a51-3f1f0e1f3c11
507
+ * @description What is wrong with it; the same text as the field's entry in an array `message`.
508
+ * @example email must be an email
509
+ */
510
+ message: string;
511
+ /**
512
+ * @description Wire path of the invalid field: `email`, `items.0.display_name`.
513
+ * @example email
514
+ */
515
+ param: string;
516
+ };
517
+ ErrorResponseDto: {
518
+ /**
519
+ * @description Stable, machine-readable error code; branch on this, not on `message`. Always present. A route-specific code when the route defines one, otherwise the generic code for the status (`NOT_FOUND`, `VALIDATION_ERROR`, `RATE_LIMITED`, ...). Open set: accept codes you do not know. Each code is documented at https://productcraft.co/docs/errors#<code>.
520
+ * @example NOT_FOUND
521
+ */
522
+ code: components["schemas"]["TrawlErrorCode"];
523
+ /**
524
+ * @description Structured context for errors a client has to act on, keyed in snake_case and specific to the code (e.g. `{ fqdn, reason }` on `from_domain_not_verified`). Absent on most errors.
525
+ * @example {
526
+ * "fqdn": "mail.example.com",
527
+ * "reason": "not_verified"
528
+ * }
529
+ */
530
+ details?: {
531
+ [key: string]: unknown;
532
+ };
533
+ /** @description One entry per invalid request field on a `VALIDATION_ERROR`; empty on every other error. */
534
+ errors: components["schemas"]["ErrorParamDto"][];
535
+ /**
536
+ * @description Human-readable error message. A string, or on a `VALIDATION_ERROR` an array with one message per invalid field (the same texts as `errors[].message`). Branch on `code`, not on this.
537
+ * @example Domain not found
509
538
  */
510
539
  message: string | string[];
540
+ /**
541
+ * @description The request's id, same as the `X-Request-Id` response header. Quote it when contacting support.
542
+ * @example req_6f1c2a9d4b7e4f0a8c3d2e1f0a9b8c7d
543
+ */
544
+ request_id: string;
511
545
  /**
512
546
  * @deprecated
513
547
  * @description Deprecated alias of `status_code`, same value. Kept so existing clients keep working; read `status_code`. Error responses carry `Deprecation: true` while it is sent.
514
- * @example 403
548
+ * @example 404
515
549
  */
516
550
  statusCode?: number;
517
551
  /**
518
- * @description HTTP status code echoed in the body (`status_code`). `statusCode` carries the same value as a deprecated alias.
519
- * @example 403
552
+ * @description HTTP status code, same as the response status.
553
+ * @example 404
520
554
  */
521
555
  status_code: number;
522
556
  };
@@ -586,6 +620,8 @@ interface components {
586
620
  */
587
621
  event_type: "job.succeeded" | "job.failed" | "credits.low";
588
622
  };
623
+ /** @description Error codes this API returns (open set: a client must accept codes it does not know; new codes are not a breaking change). Each is documented at https://productcraft.co/docs/errors#<code>. */
624
+ TrawlErrorCode: ("BAD_REQUEST" | "VALIDATION_ERROR" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "UNSUPPORTED_MEDIA_TYPE" | "UNPROCESSABLE_ENTITY" | "PRECONDITION_REQUIRED" | "RATE_LIMITED" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "SERVICE_NOT_ENABLED" | "INVALID_CREDENTIALS" | "SESSION_REVOKED" | "MCP_NOT_PERMITTED" | "MCP_WORKSPACE_MISMATCH" | "PAK_NOT_PERMITTED" | "ACTIONS_NOT_GRANTABLE" | "IDEMPOTENCY_KEY_REUSE" | "IDEMPOTENCY_KEY_REQUIRED" | "WEBHOOK_ENDPOINT_LIMIT" | "WEBHOOK_ENDPOINT_NOT_FOUND" | "WEBHOOK_ENDPOINT_NOT_SUBSCRIBED" | "WEBHOOK_EVENT_NOT_FOUND" | "WEBHOOK_EVENT_TYPE_UNKNOWN" | "TOO_MANY_ACTIVE_JOBS" | "TRAWL_CREDITS_EXHAUSTED") | string;
589
625
  TrawlStatsInWindowDto: {
590
626
  /**
591
627
  * @description Of those, jobs that failed.
@@ -1052,7 +1088,10 @@ interface components {
1052
1088
  responses: never;
1053
1089
  parameters: never;
1054
1090
  requestBodies: never;
1055
- headers: never;
1091
+ headers: {
1092
+ /** @description The request's id: the inbound `X-Request-Id` when it is 1 to 128 characters of `A-Z a-z 0-9 . _ : -`, otherwise a fresh `req_...` id. Error bodies repeat it as `request_id`. Quote it when contacting support. */
1093
+ RequestId: string;
1094
+ };
1056
1095
  pathItems: never;
1057
1096
  }
1058
1097
  interface operations {
@@ -1073,6 +1112,7 @@ interface operations {
1073
1112
  /** @description Balance, low-balance state and recent entries. */
1074
1113
  200: {
1075
1114
  headers: {
1115
+ "X-Request-Id": components["headers"]["RequestId"];
1076
1116
  [name: string]: unknown;
1077
1117
  };
1078
1118
  content: {
@@ -1082,6 +1122,7 @@ interface operations {
1082
1122
  /** @description Missing or invalid bearer token. */
1083
1123
  401: {
1084
1124
  headers: {
1125
+ "X-Request-Id": components["headers"]["RequestId"];
1085
1126
  [name: string]: unknown;
1086
1127
  };
1087
1128
  content: {
@@ -1091,6 +1132,7 @@ interface operations {
1091
1132
  /** @description Caller lacks `trawl.read`, or the service is not enabled. */
1092
1133
  403: {
1093
1134
  headers: {
1135
+ "X-Request-Id": components["headers"]["RequestId"];
1094
1136
  [name: string]: unknown;
1095
1137
  };
1096
1138
  content: {
@@ -1119,6 +1161,7 @@ interface operations {
1119
1161
  /** @description Page of jobs with pagination cursor. */
1120
1162
  200: {
1121
1163
  headers: {
1164
+ "X-Request-Id": components["headers"]["RequestId"];
1122
1165
  [name: string]: unknown;
1123
1166
  };
1124
1167
  content: {
@@ -1128,6 +1171,7 @@ interface operations {
1128
1171
  /** @description Caller lacks `trawl.list`, or workspace has not enabled the `trawl` service. */
1129
1172
  403: {
1130
1173
  headers: {
1174
+ "X-Request-Id": components["headers"]["RequestId"];
1131
1175
  [name: string]: unknown;
1132
1176
  };
1133
1177
  content: {
@@ -1157,6 +1201,7 @@ interface operations {
1157
1201
  /** @description Job created and queued. */
1158
1202
  201: {
1159
1203
  headers: {
1204
+ "X-Request-Id": components["headers"]["RequestId"];
1160
1205
  [name: string]: unknown;
1161
1206
  };
1162
1207
  content: {
@@ -1166,6 +1211,7 @@ interface operations {
1166
1211
  /** @description Invalid JSON Schema (must be a non-empty `type: object`). */
1167
1212
  400: {
1168
1213
  headers: {
1214
+ "X-Request-Id": components["headers"]["RequestId"];
1169
1215
  [name: string]: unknown;
1170
1216
  };
1171
1217
  content: {
@@ -1175,6 +1221,7 @@ interface operations {
1175
1221
  /** @description Caller lacks `trawl.create`, or workspace has not enabled the `trawl` service. */
1176
1222
  403: {
1177
1223
  headers: {
1224
+ "X-Request-Id": components["headers"]["RequestId"];
1178
1225
  [name: string]: unknown;
1179
1226
  };
1180
1227
  content: {
@@ -1184,6 +1231,7 @@ interface operations {
1184
1231
  /** @description Rate limited. `RATE_LIMITED` — submission window exceeded (default 10/min per workspace); the `Retry-After` header gives the seconds until the window resets. `TOO_MANY_ACTIVE_JOBS` — too many queued/running jobs (default 25); retry once some finish. */
1185
1232
  429: {
1186
1233
  headers: {
1234
+ "X-Request-Id": components["headers"]["RequestId"];
1187
1235
  [name: string]: unknown;
1188
1236
  };
1189
1237
  content: {
@@ -1207,6 +1255,7 @@ interface operations {
1207
1255
  /** @description Job row. */
1208
1256
  200: {
1209
1257
  headers: {
1258
+ "X-Request-Id": components["headers"]["RequestId"];
1210
1259
  [name: string]: unknown;
1211
1260
  };
1212
1261
  content: {
@@ -1216,6 +1265,7 @@ interface operations {
1216
1265
  /** @description Job not found in this workspace. */
1217
1266
  404: {
1218
1267
  headers: {
1268
+ "X-Request-Id": components["headers"]["RequestId"];
1219
1269
  [name: string]: unknown;
1220
1270
  };
1221
1271
  content: {
@@ -1239,6 +1289,7 @@ interface operations {
1239
1289
  /** @description Job cancelled. */
1240
1290
  200: {
1241
1291
  headers: {
1292
+ "X-Request-Id": components["headers"]["RequestId"];
1242
1293
  [name: string]: unknown;
1243
1294
  };
1244
1295
  content: {
@@ -1248,6 +1299,7 @@ interface operations {
1248
1299
  /** @description Job not found in this workspace. */
1249
1300
  404: {
1250
1301
  headers: {
1302
+ "X-Request-Id": components["headers"]["RequestId"];
1251
1303
  [name: string]: unknown;
1252
1304
  };
1253
1305
  content: {
@@ -1257,6 +1309,7 @@ interface operations {
1257
1309
  /** @description Job is already in a terminal state and cannot be cancelled. */
1258
1310
  422: {
1259
1311
  headers: {
1312
+ "X-Request-Id": components["headers"]["RequestId"];
1260
1313
  [name: string]: unknown;
1261
1314
  };
1262
1315
  content: {
@@ -1283,6 +1336,7 @@ interface operations {
1283
1336
  /** @description Trawl stats. */
1284
1337
  200: {
1285
1338
  headers: {
1339
+ "X-Request-Id": components["headers"]["RequestId"];
1286
1340
  [name: string]: unknown;
1287
1341
  };
1288
1342
  content: {
@@ -1292,6 +1346,7 @@ interface operations {
1292
1346
  /** @description `window` is not one of 1d, 7d, 30d. */
1293
1347
  400: {
1294
1348
  headers: {
1349
+ "X-Request-Id": components["headers"]["RequestId"];
1295
1350
  [name: string]: unknown;
1296
1351
  };
1297
1352
  content: {
@@ -1301,6 +1356,7 @@ interface operations {
1301
1356
  /** @description Caller lacks `trawl.read` on the workspace, or Trawl is not enabled on it (`SERVICE_NOT_ENABLED`). */
1302
1357
  403: {
1303
1358
  headers: {
1359
+ "X-Request-Id": components["headers"]["RequestId"];
1304
1360
  [name: string]: unknown;
1305
1361
  };
1306
1362
  content: {
@@ -1310,6 +1366,7 @@ interface operations {
1310
1366
  /** @description Workspace not found: the id is unknown, is not a UUID, or is not visible to the caller. Same answer as the service's other workspace routes. */
1311
1367
  404: {
1312
1368
  headers: {
1369
+ "X-Request-Id": components["headers"]["RequestId"];
1313
1370
  [name: string]: unknown;
1314
1371
  };
1315
1372
  content: {
@@ -1337,6 +1394,7 @@ interface operations {
1337
1394
  /** @description Page of webhooks with a pagination cursor. */
1338
1395
  200: {
1339
1396
  headers: {
1397
+ "X-Request-Id": components["headers"]["RequestId"];
1340
1398
  [name: string]: unknown;
1341
1399
  };
1342
1400
  content: {
@@ -1346,6 +1404,7 @@ interface operations {
1346
1404
  /** @description Invalid cursor or limit. */
1347
1405
  400: {
1348
1406
  headers: {
1407
+ "X-Request-Id": components["headers"]["RequestId"];
1349
1408
  [name: string]: unknown;
1350
1409
  };
1351
1410
  content: {
@@ -1375,6 +1434,7 @@ interface operations {
1375
1434
  /** @description Webhook created. Includes plaintext `signing_secret` exactly once. */
1376
1435
  201: {
1377
1436
  headers: {
1437
+ "X-Request-Id": components["headers"]["RequestId"];
1378
1438
  [name: string]: unknown;
1379
1439
  };
1380
1440
  content: {
@@ -1384,6 +1444,7 @@ interface operations {
1384
1444
  /** @description Invalid URL (must be public HTTPS). */
1385
1445
  400: {
1386
1446
  headers: {
1447
+ "X-Request-Id": components["headers"]["RequestId"];
1387
1448
  [name: string]: unknown;
1388
1449
  };
1389
1450
  content: {
@@ -1393,6 +1454,7 @@ interface operations {
1393
1454
  /** @description The workspace already has 10 webhooks. */
1394
1455
  409: {
1395
1456
  headers: {
1457
+ "X-Request-Id": components["headers"]["RequestId"];
1396
1458
  [name: string]: unknown;
1397
1459
  };
1398
1460
  content: {
@@ -1414,6 +1476,7 @@ interface operations {
1414
1476
  responses: {
1415
1477
  200: {
1416
1478
  headers: {
1479
+ "X-Request-Id": components["headers"]["RequestId"];
1417
1480
  [name: string]: unknown;
1418
1481
  };
1419
1482
  content: {
@@ -1423,6 +1486,7 @@ interface operations {
1423
1486
  /** @description The scope id in the path is malformed. */
1424
1487
  400: {
1425
1488
  headers: {
1489
+ "X-Request-Id": components["headers"]["RequestId"];
1426
1490
  [name: string]: unknown;
1427
1491
  };
1428
1492
  content: {
@@ -1432,6 +1496,7 @@ interface operations {
1432
1496
  /** @description Missing or invalid bearer token. */
1433
1497
  401: {
1434
1498
  headers: {
1499
+ "X-Request-Id": components["headers"]["RequestId"];
1435
1500
  [name: string]: unknown;
1436
1501
  };
1437
1502
  content: {
@@ -1441,6 +1506,7 @@ interface operations {
1441
1506
  /** @description Caller lacks `trawl.webhook.read` (reads) or `trawl.webhook.manage` (changes, Send test, replay), or Trawl is not enabled for the workspace (`SERVICE_NOT_ENABLED`). */
1442
1507
  403: {
1443
1508
  headers: {
1509
+ "X-Request-Id": components["headers"]["RequestId"];
1444
1510
  [name: string]: unknown;
1445
1511
  };
1446
1512
  content: {
@@ -1469,6 +1535,7 @@ interface operations {
1469
1535
  responses: {
1470
1536
  201: {
1471
1537
  headers: {
1538
+ "X-Request-Id": components["headers"]["RequestId"];
1472
1539
  [name: string]: unknown;
1473
1540
  };
1474
1541
  content: {
@@ -1478,6 +1545,7 @@ interface operations {
1478
1545
  /** @description Validation failure: URL not https with a public host, or an unknown event type (`WEBHOOK_EVENT_TYPE_UNKNOWN`). */
1479
1546
  400: {
1480
1547
  headers: {
1548
+ "X-Request-Id": components["headers"]["RequestId"];
1481
1549
  [name: string]: unknown;
1482
1550
  };
1483
1551
  content: {
@@ -1487,6 +1555,7 @@ interface operations {
1487
1555
  /** @description Missing or invalid bearer token. */
1488
1556
  401: {
1489
1557
  headers: {
1558
+ "X-Request-Id": components["headers"]["RequestId"];
1490
1559
  [name: string]: unknown;
1491
1560
  };
1492
1561
  content: {
@@ -1496,6 +1565,7 @@ interface operations {
1496
1565
  /** @description Caller lacks `trawl.webhook.read` (reads) or `trawl.webhook.manage` (changes, Send test, replay), or Trawl is not enabled for the workspace (`SERVICE_NOT_ENABLED`). */
1497
1566
  403: {
1498
1567
  headers: {
1568
+ "X-Request-Id": components["headers"]["RequestId"];
1499
1569
  [name: string]: unknown;
1500
1570
  };
1501
1571
  content: {
@@ -1505,6 +1575,7 @@ interface operations {
1505
1575
  /** @description Already 10 endpoints (`WEBHOOK_ENDPOINT_LIMIT`), or Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). */
1506
1576
  409: {
1507
1577
  headers: {
1578
+ "X-Request-Id": components["headers"]["RequestId"];
1508
1579
  [name: string]: unknown;
1509
1580
  };
1510
1581
  content: {
@@ -1514,6 +1585,7 @@ interface operations {
1514
1585
  /** @description The URL points at a private, loopback or internal address. */
1515
1586
  422: {
1516
1587
  headers: {
1588
+ "X-Request-Id": components["headers"]["RequestId"];
1517
1589
  [name: string]: unknown;
1518
1590
  };
1519
1591
  content: {
@@ -1536,6 +1608,7 @@ interface operations {
1536
1608
  responses: {
1537
1609
  200: {
1538
1610
  headers: {
1611
+ "X-Request-Id": components["headers"]["RequestId"];
1539
1612
  [name: string]: unknown;
1540
1613
  };
1541
1614
  content: {
@@ -1545,6 +1618,7 @@ interface operations {
1545
1618
  /** @description `endpoint_id` is not a UUID. */
1546
1619
  400: {
1547
1620
  headers: {
1621
+ "X-Request-Id": components["headers"]["RequestId"];
1548
1622
  [name: string]: unknown;
1549
1623
  };
1550
1624
  content: {
@@ -1554,6 +1628,7 @@ interface operations {
1554
1628
  /** @description Missing or invalid bearer token. */
1555
1629
  401: {
1556
1630
  headers: {
1631
+ "X-Request-Id": components["headers"]["RequestId"];
1557
1632
  [name: string]: unknown;
1558
1633
  };
1559
1634
  content: {
@@ -1563,6 +1638,7 @@ interface operations {
1563
1638
  /** @description Caller lacks `trawl.webhook.read` (reads) or `trawl.webhook.manage` (changes, Send test, replay), or Trawl is not enabled for the workspace (`SERVICE_NOT_ENABLED`). */
1564
1639
  403: {
1565
1640
  headers: {
1641
+ "X-Request-Id": components["headers"]["RequestId"];
1566
1642
  [name: string]: unknown;
1567
1643
  };
1568
1644
  content: {
@@ -1572,6 +1648,7 @@ interface operations {
1572
1648
  /** @description No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`). */
1573
1649
  404: {
1574
1650
  headers: {
1651
+ "X-Request-Id": components["headers"]["RequestId"];
1575
1652
  [name: string]: unknown;
1576
1653
  };
1577
1654
  content: {
@@ -1595,6 +1672,7 @@ interface operations {
1595
1672
  /** @description Deleted. */
1596
1673
  204: {
1597
1674
  headers: {
1675
+ "X-Request-Id": components["headers"]["RequestId"];
1598
1676
  [name: string]: unknown;
1599
1677
  };
1600
1678
  content?: never;
@@ -1602,6 +1680,7 @@ interface operations {
1602
1680
  /** @description `endpoint_id` is not a UUID. */
1603
1681
  400: {
1604
1682
  headers: {
1683
+ "X-Request-Id": components["headers"]["RequestId"];
1605
1684
  [name: string]: unknown;
1606
1685
  };
1607
1686
  content: {
@@ -1611,6 +1690,7 @@ interface operations {
1611
1690
  /** @description Missing or invalid bearer token. */
1612
1691
  401: {
1613
1692
  headers: {
1693
+ "X-Request-Id": components["headers"]["RequestId"];
1614
1694
  [name: string]: unknown;
1615
1695
  };
1616
1696
  content: {
@@ -1620,6 +1700,7 @@ interface operations {
1620
1700
  /** @description Caller lacks `trawl.webhook.read` (reads) or `trawl.webhook.manage` (changes, Send test, replay), or Trawl is not enabled for the workspace (`SERVICE_NOT_ENABLED`). */
1621
1701
  403: {
1622
1702
  headers: {
1703
+ "X-Request-Id": components["headers"]["RequestId"];
1623
1704
  [name: string]: unknown;
1624
1705
  };
1625
1706
  content: {
@@ -1629,6 +1710,7 @@ interface operations {
1629
1710
  /** @description No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`). */
1630
1711
  404: {
1631
1712
  headers: {
1713
+ "X-Request-Id": components["headers"]["RequestId"];
1632
1714
  [name: string]: unknown;
1633
1715
  };
1634
1716
  content: {
@@ -1658,6 +1740,7 @@ interface operations {
1658
1740
  responses: {
1659
1741
  200: {
1660
1742
  headers: {
1743
+ "X-Request-Id": components["headers"]["RequestId"];
1661
1744
  [name: string]: unknown;
1662
1745
  };
1663
1746
  content: {
@@ -1667,6 +1750,7 @@ interface operations {
1667
1750
  /** @description Validation failure, or `endpoint_id` is not a UUID. */
1668
1751
  400: {
1669
1752
  headers: {
1753
+ "X-Request-Id": components["headers"]["RequestId"];
1670
1754
  [name: string]: unknown;
1671
1755
  };
1672
1756
  content: {
@@ -1676,6 +1760,7 @@ interface operations {
1676
1760
  /** @description Missing or invalid bearer token. */
1677
1761
  401: {
1678
1762
  headers: {
1763
+ "X-Request-Id": components["headers"]["RequestId"];
1679
1764
  [name: string]: unknown;
1680
1765
  };
1681
1766
  content: {
@@ -1685,6 +1770,7 @@ interface operations {
1685
1770
  /** @description Caller lacks `trawl.webhook.read` (reads) or `trawl.webhook.manage` (changes, Send test, replay), or Trawl is not enabled for the workspace (`SERVICE_NOT_ENABLED`). */
1686
1771
  403: {
1687
1772
  headers: {
1773
+ "X-Request-Id": components["headers"]["RequestId"];
1688
1774
  [name: string]: unknown;
1689
1775
  };
1690
1776
  content: {
@@ -1694,6 +1780,7 @@ interface operations {
1694
1780
  /** @description No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`). */
1695
1781
  404: {
1696
1782
  headers: {
1783
+ "X-Request-Id": components["headers"]["RequestId"];
1697
1784
  [name: string]: unknown;
1698
1785
  };
1699
1786
  content: {
@@ -1703,6 +1790,7 @@ interface operations {
1703
1790
  /** @description Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). */
1704
1791
  409: {
1705
1792
  headers: {
1793
+ "X-Request-Id": components["headers"]["RequestId"];
1706
1794
  [name: string]: unknown;
1707
1795
  };
1708
1796
  content: {
@@ -1712,6 +1800,7 @@ interface operations {
1712
1800
  /** @description The new URL points at a private, loopback or internal address. */
1713
1801
  422: {
1714
1802
  headers: {
1803
+ "X-Request-Id": components["headers"]["RequestId"];
1715
1804
  [name: string]: unknown;
1716
1805
  };
1717
1806
  content: {
@@ -1741,6 +1830,7 @@ interface operations {
1741
1830
  responses: {
1742
1831
  200: {
1743
1832
  headers: {
1833
+ "X-Request-Id": components["headers"]["RequestId"];
1744
1834
  [name: string]: unknown;
1745
1835
  };
1746
1836
  content: {
@@ -1750,6 +1840,7 @@ interface operations {
1750
1840
  /** @description `grace_hours` out of range, or `endpoint_id` is not a UUID. */
1751
1841
  400: {
1752
1842
  headers: {
1843
+ "X-Request-Id": components["headers"]["RequestId"];
1753
1844
  [name: string]: unknown;
1754
1845
  };
1755
1846
  content: {
@@ -1759,6 +1850,7 @@ interface operations {
1759
1850
  /** @description Missing or invalid bearer token. */
1760
1851
  401: {
1761
1852
  headers: {
1853
+ "X-Request-Id": components["headers"]["RequestId"];
1762
1854
  [name: string]: unknown;
1763
1855
  };
1764
1856
  content: {
@@ -1768,6 +1860,7 @@ interface operations {
1768
1860
  /** @description Caller lacks `trawl.webhook.read` (reads) or `trawl.webhook.manage` (changes, Send test, replay), or Trawl is not enabled for the workspace (`SERVICE_NOT_ENABLED`). */
1769
1861
  403: {
1770
1862
  headers: {
1863
+ "X-Request-Id": components["headers"]["RequestId"];
1771
1864
  [name: string]: unknown;
1772
1865
  };
1773
1866
  content: {
@@ -1777,6 +1870,7 @@ interface operations {
1777
1870
  /** @description No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`). */
1778
1871
  404: {
1779
1872
  headers: {
1873
+ "X-Request-Id": components["headers"]["RequestId"];
1780
1874
  [name: string]: unknown;
1781
1875
  };
1782
1876
  content: {
@@ -1786,6 +1880,7 @@ interface operations {
1786
1880
  /** @description Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). */
1787
1881
  409: {
1788
1882
  headers: {
1883
+ "X-Request-Id": components["headers"]["RequestId"];
1789
1884
  [name: string]: unknown;
1790
1885
  };
1791
1886
  content: {
@@ -1816,6 +1911,7 @@ interface operations {
1816
1911
  /** @description The attempt, successful or not. */
1817
1912
  200: {
1818
1913
  headers: {
1914
+ "X-Request-Id": components["headers"]["RequestId"];
1819
1915
  [name: string]: unknown;
1820
1916
  };
1821
1917
  content: {
@@ -1825,6 +1921,7 @@ interface operations {
1825
1921
  /** @description Unknown `event_type`, or `endpoint_id` is not a UUID. */
1826
1922
  400: {
1827
1923
  headers: {
1924
+ "X-Request-Id": components["headers"]["RequestId"];
1828
1925
  [name: string]: unknown;
1829
1926
  };
1830
1927
  content: {
@@ -1834,6 +1931,7 @@ interface operations {
1834
1931
  /** @description Missing or invalid bearer token. */
1835
1932
  401: {
1836
1933
  headers: {
1934
+ "X-Request-Id": components["headers"]["RequestId"];
1837
1935
  [name: string]: unknown;
1838
1936
  };
1839
1937
  content: {
@@ -1843,6 +1941,7 @@ interface operations {
1843
1941
  /** @description Caller lacks `trawl.webhook.read` (reads) or `trawl.webhook.manage` (changes, Send test, replay), or Trawl is not enabled for the workspace (`SERVICE_NOT_ENABLED`). */
1844
1942
  403: {
1845
1943
  headers: {
1944
+ "X-Request-Id": components["headers"]["RequestId"];
1846
1945
  [name: string]: unknown;
1847
1946
  };
1848
1947
  content: {
@@ -1852,6 +1951,7 @@ interface operations {
1852
1951
  /** @description No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`). */
1853
1952
  404: {
1854
1953
  headers: {
1954
+ "X-Request-Id": components["headers"]["RequestId"];
1855
1955
  [name: string]: unknown;
1856
1956
  };
1857
1957
  content: {
@@ -1861,6 +1961,7 @@ interface operations {
1861
1961
  /** @description Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). */
1862
1962
  409: {
1863
1963
  headers: {
1964
+ "X-Request-Id": components["headers"]["RequestId"];
1864
1965
  [name: string]: unknown;
1865
1966
  };
1866
1967
  content: {
@@ -1882,6 +1983,7 @@ interface operations {
1882
1983
  responses: {
1883
1984
  200: {
1884
1985
  headers: {
1986
+ "X-Request-Id": components["headers"]["RequestId"];
1885
1987
  [name: string]: unknown;
1886
1988
  };
1887
1989
  content: {
@@ -1891,6 +1993,7 @@ interface operations {
1891
1993
  /** @description Missing or invalid bearer token. */
1892
1994
  401: {
1893
1995
  headers: {
1996
+ "X-Request-Id": components["headers"]["RequestId"];
1894
1997
  [name: string]: unknown;
1895
1998
  };
1896
1999
  content: {
@@ -1900,6 +2003,7 @@ interface operations {
1900
2003
  /** @description Caller lacks `trawl.webhook.read` (reads) or `trawl.webhook.manage` (changes, Send test, replay), or Trawl is not enabled for the workspace (`SERVICE_NOT_ENABLED`). */
1901
2004
  403: {
1902
2005
  headers: {
2006
+ "X-Request-Id": components["headers"]["RequestId"];
1903
2007
  [name: string]: unknown;
1904
2008
  };
1905
2009
  content: {
@@ -1934,6 +2038,7 @@ interface operations {
1934
2038
  responses: {
1935
2039
  200: {
1936
2040
  headers: {
2041
+ "X-Request-Id": components["headers"]["RequestId"];
1937
2042
  [name: string]: unknown;
1938
2043
  };
1939
2044
  content: {
@@ -1943,6 +2048,7 @@ interface operations {
1943
2048
  /** @description Invalid filter value or cursor. */
1944
2049
  400: {
1945
2050
  headers: {
2051
+ "X-Request-Id": components["headers"]["RequestId"];
1946
2052
  [name: string]: unknown;
1947
2053
  };
1948
2054
  content: {
@@ -1952,6 +2058,7 @@ interface operations {
1952
2058
  /** @description Missing or invalid bearer token. */
1953
2059
  401: {
1954
2060
  headers: {
2061
+ "X-Request-Id": components["headers"]["RequestId"];
1955
2062
  [name: string]: unknown;
1956
2063
  };
1957
2064
  content: {
@@ -1961,6 +2068,7 @@ interface operations {
1961
2068
  /** @description Caller lacks `trawl.webhook.read` (reads) or `trawl.webhook.manage` (changes, Send test, replay), or Trawl is not enabled for the workspace (`SERVICE_NOT_ENABLED`). */
1962
2069
  403: {
1963
2070
  headers: {
2071
+ "X-Request-Id": components["headers"]["RequestId"];
1964
2072
  [name: string]: unknown;
1965
2073
  };
1966
2074
  content: {
@@ -1984,6 +2092,7 @@ interface operations {
1984
2092
  responses: {
1985
2093
  200: {
1986
2094
  headers: {
2095
+ "X-Request-Id": components["headers"]["RequestId"];
1987
2096
  [name: string]: unknown;
1988
2097
  };
1989
2098
  content: {
@@ -1993,6 +2102,7 @@ interface operations {
1993
2102
  /** @description `event_id` is not `evt_<uuid>`. */
1994
2103
  400: {
1995
2104
  headers: {
2105
+ "X-Request-Id": components["headers"]["RequestId"];
1996
2106
  [name: string]: unknown;
1997
2107
  };
1998
2108
  content: {
@@ -2002,6 +2112,7 @@ interface operations {
2002
2112
  /** @description Missing or invalid bearer token. */
2003
2113
  401: {
2004
2114
  headers: {
2115
+ "X-Request-Id": components["headers"]["RequestId"];
2005
2116
  [name: string]: unknown;
2006
2117
  };
2007
2118
  content: {
@@ -2011,6 +2122,7 @@ interface operations {
2011
2122
  /** @description Caller lacks `trawl.webhook.read` (reads) or `trawl.webhook.manage` (changes, Send test, replay), or Trawl is not enabled for the workspace (`SERVICE_NOT_ENABLED`). */
2012
2123
  403: {
2013
2124
  headers: {
2125
+ "X-Request-Id": components["headers"]["RequestId"];
2014
2126
  [name: string]: unknown;
2015
2127
  };
2016
2128
  content: {
@@ -2020,6 +2132,7 @@ interface operations {
2020
2132
  /** @description No such event here (`WEBHOOK_EVENT_NOT_FOUND`); events are kept for 30 days. */
2021
2133
  404: {
2022
2134
  headers: {
2135
+ "X-Request-Id": components["headers"]["RequestId"];
2023
2136
  [name: string]: unknown;
2024
2137
  };
2025
2138
  content: {
@@ -2049,6 +2162,7 @@ interface operations {
2049
2162
  responses: {
2050
2163
  200: {
2051
2164
  headers: {
2165
+ "X-Request-Id": components["headers"]["RequestId"];
2052
2166
  [name: string]: unknown;
2053
2167
  };
2054
2168
  content: {
@@ -2058,6 +2172,7 @@ interface operations {
2058
2172
  /** @description `event_id` is not `evt_<uuid>`, or `endpoint_id` is not a UUID. */
2059
2173
  400: {
2060
2174
  headers: {
2175
+ "X-Request-Id": components["headers"]["RequestId"];
2061
2176
  [name: string]: unknown;
2062
2177
  };
2063
2178
  content: {
@@ -2067,6 +2182,7 @@ interface operations {
2067
2182
  /** @description Missing or invalid bearer token. */
2068
2183
  401: {
2069
2184
  headers: {
2185
+ "X-Request-Id": components["headers"]["RequestId"];
2070
2186
  [name: string]: unknown;
2071
2187
  };
2072
2188
  content: {
@@ -2076,6 +2192,7 @@ interface operations {
2076
2192
  /** @description Caller lacks `trawl.webhook.read` (reads) or `trawl.webhook.manage` (changes, Send test, replay), or Trawl is not enabled for the workspace (`SERVICE_NOT_ENABLED`). */
2077
2193
  403: {
2078
2194
  headers: {
2195
+ "X-Request-Id": components["headers"]["RequestId"];
2079
2196
  [name: string]: unknown;
2080
2197
  };
2081
2198
  content: {
@@ -2085,6 +2202,7 @@ interface operations {
2085
2202
  /** @description No such event here (`WEBHOOK_EVENT_NOT_FOUND`); events are kept for 30 days. Or No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`). */
2086
2203
  404: {
2087
2204
  headers: {
2205
+ "X-Request-Id": components["headers"]["RequestId"];
2088
2206
  [name: string]: unknown;
2089
2207
  };
2090
2208
  content: {
@@ -2094,6 +2212,7 @@ interface operations {
2094
2212
  /** @description `endpoint_id` is switched off or does not receive this event type (`WEBHOOK_ENDPOINT_NOT_SUBSCRIBED`), or Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). */
2095
2213
  409: {
2096
2214
  headers: {
2215
+ "X-Request-Id": components["headers"]["RequestId"];
2097
2216
  [name: string]: unknown;
2098
2217
  };
2099
2218
  content: {
@@ -2117,6 +2236,7 @@ interface operations {
2117
2236
  /** @description Webhook. */
2118
2237
  200: {
2119
2238
  headers: {
2239
+ "X-Request-Id": components["headers"]["RequestId"];
2120
2240
  [name: string]: unknown;
2121
2241
  };
2122
2242
  content: {
@@ -2126,6 +2246,7 @@ interface operations {
2126
2246
  /** @description `id` is not a UUID. */
2127
2247
  400: {
2128
2248
  headers: {
2249
+ "X-Request-Id": components["headers"]["RequestId"];
2129
2250
  [name: string]: unknown;
2130
2251
  };
2131
2252
  content: {
@@ -2135,6 +2256,7 @@ interface operations {
2135
2256
  /** @description Webhook not found. */
2136
2257
  404: {
2137
2258
  headers: {
2259
+ "X-Request-Id": components["headers"]["RequestId"];
2138
2260
  [name: string]: unknown;
2139
2261
  };
2140
2262
  content: {
@@ -2158,6 +2280,7 @@ interface operations {
2158
2280
  /** @description Deleted. */
2159
2281
  204: {
2160
2282
  headers: {
2283
+ "X-Request-Id": components["headers"]["RequestId"];
2161
2284
  [name: string]: unknown;
2162
2285
  };
2163
2286
  content?: never;
@@ -2165,6 +2288,7 @@ interface operations {
2165
2288
  /** @description Webhook not found. */
2166
2289
  404: {
2167
2290
  headers: {
2291
+ "X-Request-Id": components["headers"]["RequestId"];
2168
2292
  [name: string]: unknown;
2169
2293
  };
2170
2294
  content: {
@@ -2192,6 +2316,7 @@ interface operations {
2192
2316
  /** @description Updated webhook (secret masked). */
2193
2317
  200: {
2194
2318
  headers: {
2319
+ "X-Request-Id": components["headers"]["RequestId"];
2195
2320
  [name: string]: unknown;
2196
2321
  };
2197
2322
  content: {
@@ -2201,6 +2326,7 @@ interface operations {
2201
2326
  /** @description Invalid URL. */
2202
2327
  400: {
2203
2328
  headers: {
2329
+ "X-Request-Id": components["headers"]["RequestId"];
2204
2330
  [name: string]: unknown;
2205
2331
  };
2206
2332
  content: {
@@ -2210,6 +2336,7 @@ interface operations {
2210
2336
  /** @description Webhook not found. */
2211
2337
  404: {
2212
2338
  headers: {
2339
+ "X-Request-Id": components["headers"]["RequestId"];
2213
2340
  [name: string]: unknown;
2214
2341
  };
2215
2342
  content: {
@@ -2240,6 +2367,7 @@ interface operations {
2240
2367
  /** @description Page of delivery attempts with a pagination cursor. */
2241
2368
  200: {
2242
2369
  headers: {
2370
+ "X-Request-Id": components["headers"]["RequestId"];
2243
2371
  [name: string]: unknown;
2244
2372
  };
2245
2373
  content: {
@@ -2249,6 +2377,7 @@ interface operations {
2249
2377
  /** @description Invalid cursor, limit or `status` filter. */
2250
2378
  400: {
2251
2379
  headers: {
2380
+ "X-Request-Id": components["headers"]["RequestId"];
2252
2381
  [name: string]: unknown;
2253
2382
  };
2254
2383
  content: {
@@ -2258,6 +2387,7 @@ interface operations {
2258
2387
  /** @description Webhook not found in this workspace. */
2259
2388
  404: {
2260
2389
  headers: {
2390
+ "X-Request-Id": components["headers"]["RequestId"];
2261
2391
  [name: string]: unknown;
2262
2392
  };
2263
2393
  content: {
@@ -2281,6 +2411,7 @@ interface operations {
2281
2411
  /** @description Secret rotated. Includes the new plaintext secret exactly once. */
2282
2412
  201: {
2283
2413
  headers: {
2414
+ "X-Request-Id": components["headers"]["RequestId"];
2284
2415
  [name: string]: unknown;
2285
2416
  };
2286
2417
  content: {
@@ -2290,6 +2421,7 @@ interface operations {
2290
2421
  /** @description Webhook not found. */
2291
2422
  404: {
2292
2423
  headers: {
2424
+ "X-Request-Id": components["headers"]["RequestId"];
2293
2425
  [name: string]: unknown;
2294
2426
  };
2295
2427
  content: {
@@ -2313,6 +2445,7 @@ interface operations {
2313
2445
  /** @description Sent. Read the outcome from `/deliveries`. */
2314
2446
  202: {
2315
2447
  headers: {
2448
+ "X-Request-Id": components["headers"]["RequestId"];
2316
2449
  [name: string]: unknown;
2317
2450
  };
2318
2451
  content: {
@@ -2322,6 +2455,7 @@ interface operations {
2322
2455
  /** @description Webhook not found. */
2323
2456
  404: {
2324
2457
  headers: {
2458
+ "X-Request-Id": components["headers"]["RequestId"];
2325
2459
  [name: string]: unknown;
2326
2460
  };
2327
2461
  content: {
@@ -2331,6 +2465,7 @@ interface operations {
2331
2465
  /** @description The webhook is switched off. */
2332
2466
  422: {
2333
2467
  headers: {
2468
+ "X-Request-Id": components["headers"]["RequestId"];
2334
2469
  [name: string]: unknown;
2335
2470
  };
2336
2471
  content: {