@productcraft/trawl 0.1.1 → 0.1.3
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/README.md +2 -2
- package/dist/index.d.cts +1814 -77
- package/dist/index.d.ts +1814 -77
- package/package.json +6 -3
package/dist/index.d.cts
CHANGED
|
@@ -6,6 +6,23 @@ import { makeClient, PCClientConfig } from '@productcraft/core';
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
interface paths {
|
|
9
|
+
"/v1/workspaces/{workspace_id}/credits": {
|
|
10
|
+
parameters: {
|
|
11
|
+
query?: never;
|
|
12
|
+
header?: never;
|
|
13
|
+
path?: never;
|
|
14
|
+
cookie?: never;
|
|
15
|
+
};
|
|
16
|
+
/** Remaining Trawl steps for this workspace, whether the balance is low, and recent ledger entries */
|
|
17
|
+
get: operations["CreditsController_get"];
|
|
18
|
+
put?: never;
|
|
19
|
+
post?: never;
|
|
20
|
+
delete?: never;
|
|
21
|
+
options?: never;
|
|
22
|
+
head?: never;
|
|
23
|
+
patch?: never;
|
|
24
|
+
trace?: never;
|
|
25
|
+
};
|
|
9
26
|
"/v1/workspaces/{workspace_id}/jobs": {
|
|
10
27
|
parameters: {
|
|
11
28
|
query?: never;
|
|
@@ -58,6 +75,30 @@ interface paths {
|
|
|
58
75
|
patch?: never;
|
|
59
76
|
trace?: never;
|
|
60
77
|
};
|
|
78
|
+
"/v1/workspaces/{workspace_id}/stats": {
|
|
79
|
+
parameters: {
|
|
80
|
+
query?: never;
|
|
81
|
+
header?: never;
|
|
82
|
+
path?: never;
|
|
83
|
+
cookie?: never;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Trawl stats for a workspace
|
|
87
|
+
* @description Total jobs, jobs created / succeeded / failed and steps used in the window, the credit balance, when the latest job was created and a daily jobs series.
|
|
88
|
+
*
|
|
89
|
+
* **Active** means a job was created.
|
|
90
|
+
*
|
|
91
|
+
* Days are UTC. Counts only: no target URLs, descriptions or job results. Cached for up to 60 seconds (`generated_at`).
|
|
92
|
+
*/
|
|
93
|
+
get: operations["WorkspaceStatsController_get"];
|
|
94
|
+
put?: never;
|
|
95
|
+
post?: never;
|
|
96
|
+
delete?: never;
|
|
97
|
+
options?: never;
|
|
98
|
+
head?: never;
|
|
99
|
+
patch?: never;
|
|
100
|
+
trace?: never;
|
|
101
|
+
};
|
|
61
102
|
"/v1/workspaces/{workspace_id}/webhooks": {
|
|
62
103
|
parameters: {
|
|
63
104
|
query?: never;
|
|
@@ -65,10 +106,18 @@ interface paths {
|
|
|
65
106
|
path?: never;
|
|
66
107
|
cookie?: never;
|
|
67
108
|
};
|
|
68
|
-
/**
|
|
109
|
+
/**
|
|
110
|
+
* List webhooks for the workspace (paginated, newest first, secrets masked)
|
|
111
|
+
* @deprecated
|
|
112
|
+
* @description Deprecated: use `/v1/workspaces/{workspace_id}/webhooks/endpoints` (event filter, event descriptions, Send test that reports the result, event log, replay, rotation with a grace period). Responses carry `Deprecation: true` and `Sunset: Fri, 15 Jan 2027 00:00:00 GMT`.
|
|
113
|
+
*/
|
|
69
114
|
get: operations["WebhookController_list"];
|
|
70
115
|
put?: never;
|
|
71
|
-
/**
|
|
116
|
+
/**
|
|
117
|
+
* Create a workspace webhook. The response includes the signing secret in clear EXACTLY ONCE — copy it now.
|
|
118
|
+
* @deprecated
|
|
119
|
+
* @description Deprecated: use `/v1/workspaces/{workspace_id}/webhooks/endpoints` (event filter, event descriptions, Send test that reports the result, event log, replay, rotation with a grace period). Responses carry `Deprecation: true` and `Sunset: Fri, 15 Jan 2027 00:00:00 GMT`.
|
|
120
|
+
*/
|
|
72
121
|
post: operations["WebhookController_create"];
|
|
73
122
|
delete?: never;
|
|
74
123
|
options?: never;
|
|
@@ -76,6 +125,172 @@ interface paths {
|
|
|
76
125
|
patch?: never;
|
|
77
126
|
trace?: never;
|
|
78
127
|
};
|
|
128
|
+
"/v1/workspaces/{workspace_id}/webhooks/endpoints": {
|
|
129
|
+
parameters: {
|
|
130
|
+
query?: never;
|
|
131
|
+
header?: never;
|
|
132
|
+
path?: never;
|
|
133
|
+
cookie?: never;
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* List webhook endpoints, oldest first.
|
|
137
|
+
* @description At most 10, so this is always one page. Signing secrets are never returned here, only their last 4 characters.
|
|
138
|
+
*/
|
|
139
|
+
get: operations["WebhooksController_trawl_workspace_listEndpoints"];
|
|
140
|
+
put?: never;
|
|
141
|
+
/**
|
|
142
|
+
* Add a webhook endpoint. Returns its signing secret once.
|
|
143
|
+
* @description Deliveries are signed with the Standard Webhooks headers `webhook-id`, `webhook-timestamp` and `webhook-signature` (`v1,<base64 HMAC-SHA256 of "<id>.<timestamp>.<body>">`); the returned `whsec_…` secret works unchanged with any Standard Webhooks library. Failed deliveries are retried after 1 min, 5 min, 30 min, 2 h, 6 h and 24 h.
|
|
144
|
+
*/
|
|
145
|
+
post: operations["WebhooksController_trawl_workspace_createEndpoint"];
|
|
146
|
+
delete?: never;
|
|
147
|
+
options?: never;
|
|
148
|
+
head?: never;
|
|
149
|
+
patch?: never;
|
|
150
|
+
trace?: never;
|
|
151
|
+
};
|
|
152
|
+
"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}": {
|
|
153
|
+
parameters: {
|
|
154
|
+
query?: never;
|
|
155
|
+
header?: never;
|
|
156
|
+
path?: never;
|
|
157
|
+
cookie?: never;
|
|
158
|
+
};
|
|
159
|
+
/** Get one webhook endpoint (without its secret). */
|
|
160
|
+
get: operations["WebhooksController_trawl_workspace_getEndpoint"];
|
|
161
|
+
put?: never;
|
|
162
|
+
post?: never;
|
|
163
|
+
/**
|
|
164
|
+
* Delete a webhook endpoint.
|
|
165
|
+
* @description Queued retries are dropped. Its past attempts stay in the event log until the events expire.
|
|
166
|
+
*/
|
|
167
|
+
delete: operations["WebhooksController_trawl_workspace_deleteEndpoint"];
|
|
168
|
+
options?: never;
|
|
169
|
+
head?: never;
|
|
170
|
+
/**
|
|
171
|
+
* Change a webhook endpoint: URL, description, events, on/off.
|
|
172
|
+
* @description Only the fields sent change. `enabled: true` (or a new URL) also clears an automatic disable. Switching off cancels queued retries. The secret is unchanged; rotate it with `POST …/rotate-secret`.
|
|
173
|
+
*/
|
|
174
|
+
patch: operations["WebhooksController_trawl_workspace_updateEndpoint"];
|
|
175
|
+
trace?: never;
|
|
176
|
+
};
|
|
177
|
+
"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/rotate-secret": {
|
|
178
|
+
parameters: {
|
|
179
|
+
query?: never;
|
|
180
|
+
header?: never;
|
|
181
|
+
path?: never;
|
|
182
|
+
cookie?: never;
|
|
183
|
+
};
|
|
184
|
+
get?: never;
|
|
185
|
+
put?: never;
|
|
186
|
+
/**
|
|
187
|
+
* Rotate the signing secret. The new one is returned once.
|
|
188
|
+
* @description For `grace_hours` (default 24) the previous secret keeps signing too: `webhook-signature` then lists one `v1,` signature per secret, so receivers can switch over without dropping a delivery.
|
|
189
|
+
*/
|
|
190
|
+
post: operations["WebhooksController_trawl_workspace_rotateSecret"];
|
|
191
|
+
delete?: never;
|
|
192
|
+
options?: never;
|
|
193
|
+
head?: never;
|
|
194
|
+
patch?: never;
|
|
195
|
+
trace?: never;
|
|
196
|
+
};
|
|
197
|
+
"/v1/workspaces/{workspace_id}/webhooks/endpoints/{endpoint_id}/test": {
|
|
198
|
+
parameters: {
|
|
199
|
+
query?: never;
|
|
200
|
+
header?: never;
|
|
201
|
+
path?: never;
|
|
202
|
+
cookie?: never;
|
|
203
|
+
};
|
|
204
|
+
get?: never;
|
|
205
|
+
put?: never;
|
|
206
|
+
/**
|
|
207
|
+
* Send a test event to this endpoint now and return the result.
|
|
208
|
+
* @description Delivers the catalogue example of `event_type`, signed like any delivery, with `"test": true` in the body. Works while the endpoint is switched off or not subscribed to that type, is logged in the event log, and is never retried or counted toward an automatic disable. Waits up to 15 s for your receiver.
|
|
209
|
+
*/
|
|
210
|
+
post: operations["WebhooksController_trawl_workspace_sendTest"];
|
|
211
|
+
delete?: never;
|
|
212
|
+
options?: never;
|
|
213
|
+
head?: never;
|
|
214
|
+
patch?: never;
|
|
215
|
+
trace?: never;
|
|
216
|
+
};
|
|
217
|
+
"/v1/workspaces/{workspace_id}/webhooks/event-types": {
|
|
218
|
+
parameters: {
|
|
219
|
+
query?: never;
|
|
220
|
+
header?: never;
|
|
221
|
+
path?: never;
|
|
222
|
+
cookie?: never;
|
|
223
|
+
};
|
|
224
|
+
/**
|
|
225
|
+
* List the events an endpoint can subscribe to.
|
|
226
|
+
* @description Each type with a plain description, its group and an example `data` object (what "Send test" delivers).
|
|
227
|
+
*/
|
|
228
|
+
get: operations["WebhooksController_trawl_workspace_listEventTypes"];
|
|
229
|
+
put?: never;
|
|
230
|
+
post?: never;
|
|
231
|
+
delete?: never;
|
|
232
|
+
options?: never;
|
|
233
|
+
head?: never;
|
|
234
|
+
patch?: never;
|
|
235
|
+
trace?: never;
|
|
236
|
+
};
|
|
237
|
+
"/v1/workspaces/{workspace_id}/webhooks/events": {
|
|
238
|
+
parameters: {
|
|
239
|
+
query?: never;
|
|
240
|
+
header?: never;
|
|
241
|
+
path?: never;
|
|
242
|
+
cookie?: never;
|
|
243
|
+
};
|
|
244
|
+
/**
|
|
245
|
+
* List webhook events, newest first (kept for 30 days).
|
|
246
|
+
* @description Every event logged while at least one endpoint existed, with the latest state per endpoint and when the next retry is due.
|
|
247
|
+
*/
|
|
248
|
+
get: operations["WebhooksController_trawl_workspace_listEvents"];
|
|
249
|
+
put?: never;
|
|
250
|
+
post?: never;
|
|
251
|
+
delete?: never;
|
|
252
|
+
options?: never;
|
|
253
|
+
head?: never;
|
|
254
|
+
patch?: never;
|
|
255
|
+
trace?: never;
|
|
256
|
+
};
|
|
257
|
+
"/v1/workspaces/{workspace_id}/webhooks/events/{event_id}": {
|
|
258
|
+
parameters: {
|
|
259
|
+
query?: never;
|
|
260
|
+
header?: never;
|
|
261
|
+
path?: never;
|
|
262
|
+
cookie?: never;
|
|
263
|
+
};
|
|
264
|
+
/** Get one webhook event with every delivery attempt. */
|
|
265
|
+
get: operations["WebhooksController_trawl_workspace_getEvent"];
|
|
266
|
+
put?: never;
|
|
267
|
+
post?: never;
|
|
268
|
+
delete?: never;
|
|
269
|
+
options?: never;
|
|
270
|
+
head?: never;
|
|
271
|
+
patch?: never;
|
|
272
|
+
trace?: never;
|
|
273
|
+
};
|
|
274
|
+
"/v1/workspaces/{workspace_id}/webhooks/events/{event_id}/replay": {
|
|
275
|
+
parameters: {
|
|
276
|
+
query?: never;
|
|
277
|
+
header?: never;
|
|
278
|
+
path?: never;
|
|
279
|
+
cookie?: never;
|
|
280
|
+
};
|
|
281
|
+
get?: never;
|
|
282
|
+
put?: never;
|
|
283
|
+
/**
|
|
284
|
+
* Send a logged event again, to its endpoints or to one endpoint.
|
|
285
|
+
* @description Same body and `webhook-id`, freshly signed, to every switched-on endpoint that receives this event type now, or only to `endpoint_id`. Waits for the receivers (up to 15 s each) and returns the attempts. A success cancels a retry still queued for that endpoint.
|
|
286
|
+
*/
|
|
287
|
+
post: operations["WebhooksController_trawl_workspace_replay"];
|
|
288
|
+
delete?: never;
|
|
289
|
+
options?: never;
|
|
290
|
+
head?: never;
|
|
291
|
+
patch?: never;
|
|
292
|
+
trace?: never;
|
|
293
|
+
};
|
|
79
294
|
"/v1/workspaces/{workspace_id}/webhooks/{id}": {
|
|
80
295
|
parameters: {
|
|
81
296
|
query?: never;
|
|
@@ -83,15 +298,27 @@ interface paths {
|
|
|
83
298
|
path?: never;
|
|
84
299
|
cookie?: never;
|
|
85
300
|
};
|
|
86
|
-
/**
|
|
301
|
+
/**
|
|
302
|
+
* Get a webhook (secret masked)
|
|
303
|
+
* @deprecated
|
|
304
|
+
* @description Deprecated: use `/v1/workspaces/{workspace_id}/webhooks/endpoints` (event filter, event descriptions, Send test that reports the result, event log, replay, rotation with a grace period). Responses carry `Deprecation: true` and `Sunset: Fri, 15 Jan 2027 00:00:00 GMT`.
|
|
305
|
+
*/
|
|
87
306
|
get: operations["WebhookController_get"];
|
|
88
307
|
put?: never;
|
|
89
308
|
post?: never;
|
|
90
|
-
/**
|
|
309
|
+
/**
|
|
310
|
+
* Delete a webhook
|
|
311
|
+
* @deprecated
|
|
312
|
+
* @description Deprecated: use `/v1/workspaces/{workspace_id}/webhooks/endpoints` (event filter, event descriptions, Send test that reports the result, event log, replay, rotation with a grace period). Responses carry `Deprecation: true` and `Sunset: Fri, 15 Jan 2027 00:00:00 GMT`.
|
|
313
|
+
*/
|
|
91
314
|
delete: operations["WebhookController_remove"];
|
|
92
315
|
options?: never;
|
|
93
316
|
head?: never;
|
|
94
|
-
/**
|
|
317
|
+
/**
|
|
318
|
+
* Update url / active flag (active=true clears auto-disable)
|
|
319
|
+
* @deprecated
|
|
320
|
+
* @description Deprecated: use `/v1/workspaces/{workspace_id}/webhooks/endpoints` (event filter, event descriptions, Send test that reports the result, event log, replay, rotation with a grace period). Responses carry `Deprecation: true` and `Sunset: Fri, 15 Jan 2027 00:00:00 GMT`.
|
|
321
|
+
*/
|
|
95
322
|
patch: operations["WebhookController_update"];
|
|
96
323
|
trace?: never;
|
|
97
324
|
};
|
|
@@ -102,7 +329,11 @@ interface paths {
|
|
|
102
329
|
path?: never;
|
|
103
330
|
cookie?: never;
|
|
104
331
|
};
|
|
105
|
-
/**
|
|
332
|
+
/**
|
|
333
|
+
* Delivery attempts for a webhook (paginated, default 50, max 200, newest first)
|
|
334
|
+
* @deprecated
|
|
335
|
+
* @description Deprecated: use `/v1/workspaces/{workspace_id}/webhooks/endpoints` (event filter, event descriptions, Send test that reports the result, event log, replay, rotation with a grace period). Responses carry `Deprecation: true` and `Sunset: Fri, 15 Jan 2027 00:00:00 GMT`.
|
|
336
|
+
*/
|
|
106
337
|
get: operations["WebhookController_recentDeliveries"];
|
|
107
338
|
put?: never;
|
|
108
339
|
post?: never;
|
|
@@ -121,7 +352,11 @@ interface paths {
|
|
|
121
352
|
};
|
|
122
353
|
get?: never;
|
|
123
354
|
put?: never;
|
|
124
|
-
/**
|
|
355
|
+
/**
|
|
356
|
+
* Rotate the signing secret. Returns the new secret in clear EXACTLY ONCE; the old one stops at once.
|
|
357
|
+
* @deprecated
|
|
358
|
+
* @description Deprecated: use `/v1/workspaces/{workspace_id}/webhooks/endpoints` (event filter, event descriptions, Send test that reports the result, event log, replay, rotation with a grace period). Responses carry `Deprecation: true` and `Sunset: Fri, 15 Jan 2027 00:00:00 GMT`.
|
|
359
|
+
*/
|
|
125
360
|
post: operations["WebhookController_rotateSecret"];
|
|
126
361
|
delete?: never;
|
|
127
362
|
options?: never;
|
|
@@ -138,7 +373,11 @@ interface paths {
|
|
|
138
373
|
};
|
|
139
374
|
get?: never;
|
|
140
375
|
put?: never;
|
|
141
|
-
/**
|
|
376
|
+
/**
|
|
377
|
+
* Send the `job.succeeded` example to this webhook; the attempt shows in `/deliveries`
|
|
378
|
+
* @deprecated
|
|
379
|
+
* @description Deprecated: use `/v1/workspaces/{workspace_id}/webhooks/endpoints` (event filter, event descriptions, Send test that reports the result, event log, replay, rotation with a grace period). Responses carry `Deprecation: true` and `Sunset: Fri, 15 Jan 2027 00:00:00 GMT`.
|
|
380
|
+
*/
|
|
142
381
|
post: operations["WebhookController_fireTest"];
|
|
143
382
|
delete?: never;
|
|
144
383
|
options?: never;
|
|
@@ -169,16 +408,24 @@ interface components {
|
|
|
169
408
|
* "type": "object"
|
|
170
409
|
* }
|
|
171
410
|
*/
|
|
172
|
-
json_schema:
|
|
173
|
-
|
|
174
|
-
|
|
411
|
+
json_schema: {
|
|
412
|
+
[key: string]: unknown;
|
|
413
|
+
};
|
|
414
|
+
/**
|
|
415
|
+
* @description Maximum number of agent steps (one LLM call each) before the job stops. Defaults to 20. Multi-source extractions typically need 40+. The server additionally clamps this to an operator ceiling, so a very large value does not guarantee a very long run — `timeout_s` still applies.
|
|
416
|
+
* @default 20
|
|
417
|
+
*/
|
|
418
|
+
max_steps: number;
|
|
175
419
|
/** @description Model tier the worker should use (e.g. `standard`, `pro`). */
|
|
176
420
|
model_tier?: string;
|
|
177
421
|
/** @description Seed URLs the worker should start from. */
|
|
178
422
|
suggested_urls?: string[];
|
|
179
423
|
/** @description Wall-clock timeout for the job, in seconds. */
|
|
180
424
|
timeout_s?: number;
|
|
181
|
-
/**
|
|
425
|
+
/**
|
|
426
|
+
* Format: uuid
|
|
427
|
+
* @description A webhook endpoint of this workspace to notify when the job finishes. Endpoints made before 17 Oct 2026 receive only the jobs that name them here; endpoints made under `/webhooks/endpoints` receive every job event they subscribe to, so leave this out for them.
|
|
428
|
+
*/
|
|
182
429
|
webhook_id?: string;
|
|
183
430
|
};
|
|
184
431
|
CreateWebhookDto: {
|
|
@@ -187,6 +434,86 @@ interface components {
|
|
|
187
434
|
/** @description Destination URL (https required in prod). */
|
|
188
435
|
url: string;
|
|
189
436
|
};
|
|
437
|
+
CreateWebhookEndpointDto: {
|
|
438
|
+
/** @example Production receiver */
|
|
439
|
+
description?: string | null;
|
|
440
|
+
/**
|
|
441
|
+
* @description Create it switched off.
|
|
442
|
+
* @default true
|
|
443
|
+
*/
|
|
444
|
+
enabled: boolean;
|
|
445
|
+
/**
|
|
446
|
+
* @description Event types from `GET …/webhooks/event-types`. Empty or omitted means every event, including types added later.
|
|
447
|
+
* @example [
|
|
448
|
+
* "job.succeeded",
|
|
449
|
+
* "job.failed"
|
|
450
|
+
* ]
|
|
451
|
+
*/
|
|
452
|
+
event_types?: ("job.succeeded" | "job.failed" | "credits.low")[];
|
|
453
|
+
/**
|
|
454
|
+
* Format: uri
|
|
455
|
+
* @description Where to send events: an absolute https:// URL on a public host.
|
|
456
|
+
* @example https://api.acme.com/webhooks
|
|
457
|
+
*/
|
|
458
|
+
url: string;
|
|
459
|
+
};
|
|
460
|
+
CreditLedgerEntryDto: {
|
|
461
|
+
/** Format: date-time */
|
|
462
|
+
created_at: string;
|
|
463
|
+
/**
|
|
464
|
+
* @description Steps added (positive: allowance, top-up, grant) or used (negative: a job).
|
|
465
|
+
* @example -12
|
|
466
|
+
*/
|
|
467
|
+
delta_steps: number;
|
|
468
|
+
/** Format: uuid */
|
|
469
|
+
id: string;
|
|
470
|
+
/**
|
|
471
|
+
* Format: uuid
|
|
472
|
+
* @description The job, for a `job` entry.
|
|
473
|
+
*/
|
|
474
|
+
job_id: string | null;
|
|
475
|
+
/**
|
|
476
|
+
* @description Why: `initial_free_allowance`, `grant`, `job`, …
|
|
477
|
+
* @example job
|
|
478
|
+
*/
|
|
479
|
+
reason: string;
|
|
480
|
+
};
|
|
481
|
+
CreditsResponseDto: {
|
|
482
|
+
/**
|
|
483
|
+
* @description Remaining steps. One agent step uses one credit; new jobs are refused (402) at zero. Can dip slightly below zero, because a running job is always allowed to finish.
|
|
484
|
+
* @example 8420
|
|
485
|
+
*/
|
|
486
|
+
balance_steps: number;
|
|
487
|
+
/** @description Recent ledger entries, newest first. */
|
|
488
|
+
entries: components["schemas"]["CreditLedgerEntryDto"][];
|
|
489
|
+
/**
|
|
490
|
+
* @description True when the balance is under `low_balance_threshold_steps`. The `credits.low` webhook fires once when this turns true, and again only after the next top-up.
|
|
491
|
+
* @example false
|
|
492
|
+
*/
|
|
493
|
+
low_balance: boolean;
|
|
494
|
+
/**
|
|
495
|
+
* @description The low-balance line: 10% of the last top-up, and never under 100 steps.
|
|
496
|
+
* @example 1000
|
|
497
|
+
*/
|
|
498
|
+
low_balance_threshold_steps: number;
|
|
499
|
+
};
|
|
500
|
+
ErrorResponseDto: {
|
|
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
|
|
504
|
+
*/
|
|
505
|
+
code: string;
|
|
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
|
|
509
|
+
*/
|
|
510
|
+
message: string | string[];
|
|
511
|
+
/**
|
|
512
|
+
* @description HTTP status code echoed in the body. Spelled `statusCode` (camelCase) in every ProductCraft API.
|
|
513
|
+
* @example 403
|
|
514
|
+
*/
|
|
515
|
+
statusCode: number;
|
|
516
|
+
};
|
|
190
517
|
JobListPaginationDto: {
|
|
191
518
|
has_more: boolean;
|
|
192
519
|
next_cursor: string | null;
|
|
@@ -203,10 +530,16 @@ interface components {
|
|
|
203
530
|
enqueued_at: string;
|
|
204
531
|
error: string | null;
|
|
205
532
|
id: string;
|
|
206
|
-
|
|
533
|
+
/** @description The JSON Schema the job was created with. */
|
|
534
|
+
json_schema: {
|
|
535
|
+
[key: string]: unknown;
|
|
536
|
+
};
|
|
207
537
|
max_steps: number;
|
|
208
538
|
model_tier: string;
|
|
209
|
-
|
|
539
|
+
/** @description The extracted data, shaped by `json_schema`. Null until the job succeeds. */
|
|
540
|
+
result: {
|
|
541
|
+
[key: string]: unknown;
|
|
542
|
+
} | null;
|
|
210
543
|
started_at: string | null;
|
|
211
544
|
/** @enum {string} */
|
|
212
545
|
status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
@@ -215,40 +548,499 @@ interface components {
|
|
|
215
548
|
webhook_id: string | null;
|
|
216
549
|
workspace_id: string;
|
|
217
550
|
};
|
|
551
|
+
ListWebhookEndpointsResponseDto: {
|
|
552
|
+
data: components["schemas"]["WebhookEndpointDto"][];
|
|
553
|
+
/** @description Always one page (an endpoint limit applies). */
|
|
554
|
+
pagination: components["schemas"]["WebhookPaginationDto"];
|
|
555
|
+
};
|
|
556
|
+
ListWebhookEventTypesResponseDto: {
|
|
557
|
+
data: components["schemas"]["WebhookEventTypeDto"][];
|
|
558
|
+
};
|
|
559
|
+
ListWebhookEventsResponseDto: {
|
|
560
|
+
data: components["schemas"]["WebhookEventDto"][];
|
|
561
|
+
pagination: components["schemas"]["WebhookPaginationDto"];
|
|
562
|
+
};
|
|
563
|
+
ReplayWebhookEventResponseDto: {
|
|
564
|
+
/** @description One attempt per endpoint it was sent to. */
|
|
565
|
+
attempts: components["schemas"]["WebhookDeliveryAttemptDto"][];
|
|
566
|
+
event_id: string;
|
|
567
|
+
};
|
|
568
|
+
RotateWebhookSecretDto: {
|
|
569
|
+
/**
|
|
570
|
+
* @description Hours the previous secret keeps signing too (0 ends it now).
|
|
571
|
+
* @default 24
|
|
572
|
+
*/
|
|
573
|
+
grace_hours: number;
|
|
574
|
+
};
|
|
575
|
+
SendWebhookTestDto: {
|
|
576
|
+
/**
|
|
577
|
+
* @description Which event to send; its catalogue example is the `data`.
|
|
578
|
+
* @example job.succeeded
|
|
579
|
+
* @enum {string}
|
|
580
|
+
*/
|
|
581
|
+
event_type: "job.succeeded" | "job.failed" | "credits.low";
|
|
582
|
+
};
|
|
583
|
+
TrawlStatsInWindowDto: {
|
|
584
|
+
/**
|
|
585
|
+
* @description Of those, jobs that failed.
|
|
586
|
+
* @example 3
|
|
587
|
+
*/
|
|
588
|
+
failed: number;
|
|
589
|
+
/**
|
|
590
|
+
* @description Jobs created in the window, in any status.
|
|
591
|
+
* @example 37
|
|
592
|
+
*/
|
|
593
|
+
jobs: number;
|
|
594
|
+
/**
|
|
595
|
+
* @description Steps consumed by the jobs created in the window. Jobs still running, and jobs from before metering, add nothing.
|
|
596
|
+
* @example 512
|
|
597
|
+
*/
|
|
598
|
+
steps_used: number;
|
|
599
|
+
/**
|
|
600
|
+
* @description Of those, jobs that succeeded.
|
|
601
|
+
* @example 33
|
|
602
|
+
*/
|
|
603
|
+
succeeded: number;
|
|
604
|
+
};
|
|
605
|
+
TrawlStatsSeriesDto: {
|
|
606
|
+
/**
|
|
607
|
+
* @description Bucket width.
|
|
608
|
+
* @example day
|
|
609
|
+
* @enum {string}
|
|
610
|
+
*/
|
|
611
|
+
granularity: "day";
|
|
612
|
+
/**
|
|
613
|
+
* @description Jobs created per UTC day in the workspace, in any status.
|
|
614
|
+
* @example jobs
|
|
615
|
+
* @enum {string}
|
|
616
|
+
*/
|
|
617
|
+
metric: "jobs";
|
|
618
|
+
/** @description Dense and zero-filled: one point per UTC day in the window, oldest first, ending today. */
|
|
619
|
+
points: components["schemas"]["TrawlStatsSeriesPointDto"][];
|
|
620
|
+
};
|
|
621
|
+
TrawlStatsSeriesPointDto: {
|
|
622
|
+
/**
|
|
623
|
+
* Format: date
|
|
624
|
+
* @description UTC calendar day.
|
|
625
|
+
* @example 2026-10-07
|
|
626
|
+
*/
|
|
627
|
+
date: string;
|
|
628
|
+
/**
|
|
629
|
+
* @description Value for that day.
|
|
630
|
+
* @example 4
|
|
631
|
+
*/
|
|
632
|
+
value: number;
|
|
633
|
+
};
|
|
634
|
+
TrawlStatsTotalsDto: {
|
|
635
|
+
/**
|
|
636
|
+
* @description Remaining Trawl steps: the sum of the credit ledger, the same number `GET /v1/workspaces/{workspaceId}/credits` returns. Zero before the first job; can be slightly negative after the last job of a budget.
|
|
637
|
+
* @example 8650
|
|
638
|
+
*/
|
|
639
|
+
balance_steps: number;
|
|
640
|
+
/**
|
|
641
|
+
* @description Jobs in the workspace, all time, in any status.
|
|
642
|
+
* @example 418
|
|
643
|
+
*/
|
|
644
|
+
jobs: number;
|
|
645
|
+
};
|
|
646
|
+
TrawlWorkspaceStatsDto: {
|
|
647
|
+
/**
|
|
648
|
+
* Format: date-time
|
|
649
|
+
* @description When these numbers were computed. Responses are cached for up to 60 seconds.
|
|
650
|
+
* @example 2026-10-07T09:00:00.000Z
|
|
651
|
+
*/
|
|
652
|
+
generated_at: string;
|
|
653
|
+
/** @description Counts for the window. */
|
|
654
|
+
in_window: components["schemas"]["TrawlStatsInWindowDto"];
|
|
655
|
+
/**
|
|
656
|
+
* Format: date-time
|
|
657
|
+
* @description When the workspace's most recent job was created. Null when there has never been one.
|
|
658
|
+
* @example 2026-10-07T08:41:12.000Z
|
|
659
|
+
*/
|
|
660
|
+
last_activity_at: string | null;
|
|
661
|
+
/** @description Daily jobs. */
|
|
662
|
+
series: components["schemas"]["TrawlStatsSeriesDto"];
|
|
663
|
+
/** @description All-time counts and the credit balance. */
|
|
664
|
+
totals: components["schemas"]["TrawlStatsTotalsDto"];
|
|
665
|
+
/**
|
|
666
|
+
* @description Window the counts cover.
|
|
667
|
+
* @example 30d
|
|
668
|
+
* @enum {string}
|
|
669
|
+
*/
|
|
670
|
+
window: "1d" | "7d" | "30d";
|
|
671
|
+
};
|
|
218
672
|
UpdateWebhookDto: {
|
|
219
673
|
/** @description Pause/resume the webhook. Setting active=true clears auto-disable. */
|
|
220
674
|
active?: boolean;
|
|
221
675
|
/** @description New destination URL. */
|
|
222
676
|
url?: string;
|
|
223
677
|
};
|
|
678
|
+
UpdateWebhookEndpointDto: {
|
|
679
|
+
description?: string | null;
|
|
680
|
+
/** @description Switch it on or off. Switching on also clears an automatic disable. */
|
|
681
|
+
enabled?: boolean;
|
|
682
|
+
/** @description Replaces the subscription. Event types from `GET …/webhooks/event-types`. Empty or omitted means every event, including types added later. */
|
|
683
|
+
event_types?: ("job.succeeded" | "job.failed" | "credits.low")[];
|
|
684
|
+
/**
|
|
685
|
+
* Format: uri
|
|
686
|
+
* @example https://api.acme.com/webhooks
|
|
687
|
+
*/
|
|
688
|
+
url?: string;
|
|
689
|
+
};
|
|
224
690
|
WebhookCreateResponseDto: {
|
|
691
|
+
/** @description Whether it receives events (`enabled` on the new routes). */
|
|
225
692
|
active: boolean;
|
|
693
|
+
/**
|
|
694
|
+
* Format: date-time
|
|
695
|
+
* @description Set when it was switched off automatically after sustained failures.
|
|
696
|
+
*/
|
|
226
697
|
auto_disabled_at: string | null;
|
|
698
|
+
/** Format: date-time */
|
|
227
699
|
created_at: string;
|
|
700
|
+
/** @description Failed deliveries in a row (`consecutive_failures` on the new routes). */
|
|
228
701
|
failure_count: number;
|
|
702
|
+
/** Format: date-time */
|
|
229
703
|
first_failure_at: string | null;
|
|
704
|
+
/** Format: uuid */
|
|
230
705
|
id: string;
|
|
706
|
+
/**
|
|
707
|
+
* Format: date-time
|
|
708
|
+
* @description When the latest attempt was made.
|
|
709
|
+
*/
|
|
231
710
|
last_attempt_at: string | null;
|
|
711
|
+
/** @description HTTP status of the latest attempt. */
|
|
232
712
|
last_status_code: number | null;
|
|
233
|
-
/** @description
|
|
713
|
+
/** @description Always true: every webhook has a signing secret. */
|
|
714
|
+
secret_set?: boolean;
|
|
715
|
+
/** @description Plaintext signing secret (`whsec_…`), returned EXACTLY ONCE. Persist immediately; it does not appear on later reads. */
|
|
234
716
|
signing_secret: string;
|
|
235
717
|
url: string;
|
|
718
|
+
/** Format: uuid */
|
|
236
719
|
workspace_id: string;
|
|
237
720
|
};
|
|
238
|
-
|
|
239
|
-
|
|
721
|
+
WebhookDeliveryAttemptDto: {
|
|
722
|
+
/** @description 1 for the first delivery; retries and replays count up. */
|
|
723
|
+
attempt_number: number;
|
|
724
|
+
/** Format: date-time */
|
|
725
|
+
attempted_at: string;
|
|
726
|
+
/** Format: uuid */
|
|
727
|
+
endpoint_id: string;
|
|
728
|
+
/** @example request timed out */
|
|
729
|
+
error_message: string | null;
|
|
730
|
+
/** @example evt_3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f */
|
|
731
|
+
event_id: string;
|
|
732
|
+
/** @example user.created */
|
|
733
|
+
event_type: string;
|
|
734
|
+
/** Format: uuid */
|
|
735
|
+
id: string;
|
|
736
|
+
latency_ms: number | null;
|
|
737
|
+
/** @description The first 1 KiB of the response body. */
|
|
738
|
+
response_body: string | null;
|
|
739
|
+
/** @description HTTP status; null when no response came back. */
|
|
740
|
+
status_code: number | null;
|
|
741
|
+
/** @description True for a 2xx response. */
|
|
742
|
+
succeeded: boolean;
|
|
743
|
+
/**
|
|
744
|
+
* @description `automatic` (first delivery or a retry), `replay` or `test`.
|
|
745
|
+
* @enum {string}
|
|
746
|
+
*/
|
|
747
|
+
trigger: "automatic" | "replay" | "test";
|
|
748
|
+
/**
|
|
749
|
+
* Format: uri
|
|
750
|
+
* @description Where it was sent.
|
|
751
|
+
*/
|
|
752
|
+
url: string;
|
|
240
753
|
};
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
754
|
+
WebhookDeliveryListResponseDto: {
|
|
755
|
+
data: components["schemas"]["WebhookDeliveryResponseDto"][];
|
|
756
|
+
pagination: components["schemas"]["WebhookListPaginationDto"];
|
|
757
|
+
};
|
|
758
|
+
WebhookDeliveryResponseDto: {
|
|
759
|
+
/** @description Which attempt this was for the event: 1 for the first delivery, then 2 to 7 for the automatic retries (1m, 5m, 30m, 2h, 6h and 24h after each failure). Retries keep the same `event_id`. A test or a replay is numbered in the same sequence. */
|
|
760
|
+
attempt_number: number;
|
|
761
|
+
/** Format: date-time */
|
|
762
|
+
attempted_at: string;
|
|
763
|
+
error_message: string | null;
|
|
764
|
+
/** @description Id of the event (`evt_…`), the same across retries. */
|
|
765
|
+
event_id: string;
|
|
766
|
+
/** @example job.succeeded */
|
|
767
|
+
event_type: string;
|
|
768
|
+
/** Format: uuid */
|
|
769
|
+
id: string;
|
|
770
|
+
/** @description The job the event was about; null for an event that is not about a job (`credits.low`). */
|
|
771
|
+
job_id: string | null;
|
|
772
|
+
latency_ms: number | null;
|
|
773
|
+
response_body_truncated: string | null;
|
|
774
|
+
/** @description HTTP status returned by the destination; null when no response was received. */
|
|
775
|
+
status_code: number | null;
|
|
776
|
+
/** Format: uuid */
|
|
777
|
+
webhook_id: string;
|
|
778
|
+
};
|
|
779
|
+
WebhookEndpointDto: {
|
|
780
|
+
/** @description Failed automatic deliveries in a row; a success resets it. */
|
|
781
|
+
consecutive_failures: number;
|
|
782
|
+
/** Format: date-time */
|
|
244
783
|
created_at: string;
|
|
245
|
-
|
|
784
|
+
/** @example Production receiver */
|
|
785
|
+
description: string | null;
|
|
786
|
+
/** Format: date-time */
|
|
787
|
+
disabled_at: string | null;
|
|
788
|
+
/** @enum {string|null} */
|
|
789
|
+
disabled_reason: "manual" | "failing" | null;
|
|
790
|
+
/** @description The on/off switch (`PATCH … { enabled }`). */
|
|
791
|
+
enabled: boolean;
|
|
792
|
+
/**
|
|
793
|
+
* @description Subscribed event types. Empty means every event, including types added later.
|
|
794
|
+
* @example []
|
|
795
|
+
*/
|
|
796
|
+
event_types: string[];
|
|
797
|
+
/**
|
|
798
|
+
* Format: date-time
|
|
799
|
+
* @description Start of the current failure streak.
|
|
800
|
+
*/
|
|
246
801
|
first_failure_at: string | null;
|
|
802
|
+
/** Format: uuid */
|
|
247
803
|
id: string;
|
|
248
|
-
|
|
249
|
-
|
|
804
|
+
/** @description True for endpoints carried over from the product's previous webhook system: they also receive the old signature header until its sunset date. */
|
|
805
|
+
legacy_signature: boolean;
|
|
806
|
+
/** @description True while the previous secret still signs too (after a rotation, for its grace period). */
|
|
807
|
+
prev_signing_secret_active: boolean;
|
|
808
|
+
/**
|
|
809
|
+
* Format: date-time
|
|
810
|
+
* @description Until then the previous secret signs too (after a rotation).
|
|
811
|
+
*/
|
|
812
|
+
prev_signing_secret_expires_at: string | null;
|
|
813
|
+
/** @description Id of the owning workspace, app or community. */
|
|
814
|
+
scope_id: string;
|
|
815
|
+
/**
|
|
816
|
+
* @description What owns the endpoint: `workspace`, `app` or `community`.
|
|
817
|
+
* @example workspace
|
|
818
|
+
*/
|
|
819
|
+
scope_type: string;
|
|
820
|
+
/**
|
|
821
|
+
* @description Last 4 characters of the signing secret.
|
|
822
|
+
* @example x9Q=
|
|
823
|
+
*/
|
|
824
|
+
signing_secret_hint: string;
|
|
825
|
+
/**
|
|
826
|
+
* @description `enabled` receives events. `disabled` was switched off. `auto_disabled` was switched off after 20 failed deliveries in a row or 24 hours of failures; `PATCH { enabled: true }` turns it back on.
|
|
827
|
+
* @enum {string}
|
|
828
|
+
*/
|
|
829
|
+
status: "enabled" | "disabled" | "auto_disabled";
|
|
830
|
+
/** Format: date-time */
|
|
831
|
+
updated_at: string;
|
|
832
|
+
/**
|
|
833
|
+
* Format: uri
|
|
834
|
+
* @example https://api.acme.com/webhooks
|
|
835
|
+
*/
|
|
250
836
|
url: string;
|
|
251
|
-
|
|
837
|
+
};
|
|
838
|
+
WebhookEndpointWithSecretDto: {
|
|
839
|
+
/** @description Failed automatic deliveries in a row; a success resets it. */
|
|
840
|
+
consecutive_failures: number;
|
|
841
|
+
/** Format: date-time */
|
|
842
|
+
created_at: string;
|
|
843
|
+
/** @example Production receiver */
|
|
844
|
+
description: string | null;
|
|
845
|
+
/** Format: date-time */
|
|
846
|
+
disabled_at: string | null;
|
|
847
|
+
/** @enum {string|null} */
|
|
848
|
+
disabled_reason: "manual" | "failing" | null;
|
|
849
|
+
/** @description The on/off switch (`PATCH … { enabled }`). */
|
|
850
|
+
enabled: boolean;
|
|
851
|
+
/**
|
|
852
|
+
* @description Subscribed event types. Empty means every event, including types added later.
|
|
853
|
+
* @example []
|
|
854
|
+
*/
|
|
855
|
+
event_types: string[];
|
|
856
|
+
/**
|
|
857
|
+
* Format: date-time
|
|
858
|
+
* @description Start of the current failure streak.
|
|
859
|
+
*/
|
|
860
|
+
first_failure_at: string | null;
|
|
861
|
+
/** Format: uuid */
|
|
862
|
+
id: string;
|
|
863
|
+
/** @description True for endpoints carried over from the product's previous webhook system: they also receive the old signature header until its sunset date. */
|
|
864
|
+
legacy_signature: boolean;
|
|
865
|
+
/** @description True while the previous secret still signs too (after a rotation, for its grace period). */
|
|
866
|
+
prev_signing_secret_active: boolean;
|
|
867
|
+
/**
|
|
868
|
+
* Format: date-time
|
|
869
|
+
* @description Until then the previous secret signs too (after a rotation).
|
|
870
|
+
*/
|
|
871
|
+
prev_signing_secret_expires_at: string | null;
|
|
872
|
+
/** @description Id of the owning workspace, app or community. */
|
|
873
|
+
scope_id: string;
|
|
874
|
+
/**
|
|
875
|
+
* @description What owns the endpoint: `workspace`, `app` or `community`.
|
|
876
|
+
* @example workspace
|
|
877
|
+
*/
|
|
878
|
+
scope_type: string;
|
|
879
|
+
/**
|
|
880
|
+
* @description The signing secret, shown once: pass it unchanged to any Standard Webhooks verifier. Store it now; it cannot be shown again.
|
|
881
|
+
* @example whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw
|
|
882
|
+
*/
|
|
883
|
+
signing_secret: string;
|
|
884
|
+
/**
|
|
885
|
+
* @description Last 4 characters of the signing secret.
|
|
886
|
+
* @example x9Q=
|
|
887
|
+
*/
|
|
888
|
+
signing_secret_hint: string;
|
|
889
|
+
/**
|
|
890
|
+
* @description `enabled` receives events. `disabled` was switched off. `auto_disabled` was switched off after 20 failed deliveries in a row or 24 hours of failures; `PATCH { enabled: true }` turns it back on.
|
|
891
|
+
* @enum {string}
|
|
892
|
+
*/
|
|
893
|
+
status: "enabled" | "disabled" | "auto_disabled";
|
|
894
|
+
/** Format: date-time */
|
|
895
|
+
updated_at: string;
|
|
896
|
+
/**
|
|
897
|
+
* Format: uri
|
|
898
|
+
* @example https://api.acme.com/webhooks
|
|
899
|
+
*/
|
|
900
|
+
url: string;
|
|
901
|
+
};
|
|
902
|
+
WebhookEventDeliveryDto: {
|
|
903
|
+
/** @description Number of the latest attempt; retries and replays count up. */
|
|
904
|
+
attempt_number: number;
|
|
905
|
+
/** Format: date-time */
|
|
906
|
+
attempted_at: string;
|
|
907
|
+
/** Format: uuid */
|
|
908
|
+
endpoint_id: string;
|
|
909
|
+
/**
|
|
910
|
+
* Format: date-time
|
|
911
|
+
* @description When the next automatic attempt is due; null when none is queued.
|
|
912
|
+
*/
|
|
913
|
+
next_attempt_at: string | null;
|
|
914
|
+
status_code: number | null;
|
|
915
|
+
/** @description True when the latest attempt got a 2xx. */
|
|
916
|
+
succeeded: boolean;
|
|
917
|
+
};
|
|
918
|
+
WebhookEventDetailDto: {
|
|
919
|
+
/** @description Every attempt, newest first. */
|
|
920
|
+
attempts: components["schemas"]["WebhookDeliveryAttemptDto"][];
|
|
921
|
+
/** Format: date-time */
|
|
922
|
+
created_at: string;
|
|
923
|
+
/** @description Latest attempt per endpoint (an endpoint whose first attempt is still queued is not listed yet). */
|
|
924
|
+
deliveries: components["schemas"]["WebhookEventDeliveryDto"][];
|
|
925
|
+
/**
|
|
926
|
+
* @description Sent as `webhook-id`; the same on every retry and replay.
|
|
927
|
+
* @example evt_3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f
|
|
928
|
+
*/
|
|
929
|
+
id: string;
|
|
930
|
+
/** @description The JSON body exactly as sent. */
|
|
931
|
+
payload: {
|
|
932
|
+
[key: string]: unknown;
|
|
933
|
+
};
|
|
934
|
+
/**
|
|
935
|
+
* @description `pending`: a delivery is queued. `failed`: the latest attempt to some endpoint failed and none is queued. `delivered`: every endpoint answered 2xx. `not_sent`: no endpoint subscribed.
|
|
936
|
+
* @enum {string}
|
|
937
|
+
*/
|
|
938
|
+
status: "pending" | "delivered" | "failed" | "not_sent";
|
|
939
|
+
/** @description Made by "Send test". */
|
|
940
|
+
test: boolean;
|
|
941
|
+
/**
|
|
942
|
+
* @example job.succeeded
|
|
943
|
+
* @enum {string}
|
|
944
|
+
*/
|
|
945
|
+
type: "job.succeeded" | "job.failed" | "credits.low";
|
|
946
|
+
};
|
|
947
|
+
WebhookEventDto: {
|
|
948
|
+
/** Format: date-time */
|
|
949
|
+
created_at: string;
|
|
950
|
+
/** @description Latest attempt per endpoint (an endpoint whose first attempt is still queued is not listed yet). */
|
|
951
|
+
deliveries: components["schemas"]["WebhookEventDeliveryDto"][];
|
|
952
|
+
/**
|
|
953
|
+
* @description Sent as `webhook-id`; the same on every retry and replay.
|
|
954
|
+
* @example evt_3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f
|
|
955
|
+
*/
|
|
956
|
+
id: string;
|
|
957
|
+
/** @description The JSON body exactly as sent. */
|
|
958
|
+
payload: {
|
|
959
|
+
[key: string]: unknown;
|
|
960
|
+
};
|
|
961
|
+
/**
|
|
962
|
+
* @description `pending`: a delivery is queued. `failed`: the latest attempt to some endpoint failed and none is queued. `delivered`: every endpoint answered 2xx. `not_sent`: no endpoint subscribed.
|
|
963
|
+
* @enum {string}
|
|
964
|
+
*/
|
|
965
|
+
status: "pending" | "delivered" | "failed" | "not_sent";
|
|
966
|
+
/** @description Made by "Send test". */
|
|
967
|
+
test: boolean;
|
|
968
|
+
/**
|
|
969
|
+
* @example job.succeeded
|
|
970
|
+
* @enum {string}
|
|
971
|
+
*/
|
|
972
|
+
type: "job.succeeded" | "job.failed" | "credits.low";
|
|
973
|
+
};
|
|
974
|
+
WebhookEventTypeDto: {
|
|
975
|
+
/**
|
|
976
|
+
* @description Group shown in the event picker.
|
|
977
|
+
* @example Users
|
|
978
|
+
*/
|
|
979
|
+
category: string;
|
|
980
|
+
/** @example A user signed up or was created by an admin. */
|
|
981
|
+
description: string;
|
|
982
|
+
/** @description An example `data` object; "Send test" delivers exactly this. */
|
|
983
|
+
example: {
|
|
984
|
+
[key: string]: unknown;
|
|
985
|
+
};
|
|
986
|
+
/**
|
|
987
|
+
* @example job.succeeded
|
|
988
|
+
* @enum {string}
|
|
989
|
+
*/
|
|
990
|
+
type: "job.succeeded" | "job.failed" | "credits.low";
|
|
991
|
+
};
|
|
992
|
+
WebhookListPaginationDto: {
|
|
993
|
+
has_more: boolean;
|
|
994
|
+
next_cursor: string | null;
|
|
995
|
+
};
|
|
996
|
+
WebhookListResponseDto: {
|
|
997
|
+
data: components["schemas"]["WebhookResponseDto"][];
|
|
998
|
+
pagination: components["schemas"]["WebhookListPaginationDto"];
|
|
999
|
+
};
|
|
1000
|
+
WebhookPaginationDto: {
|
|
1001
|
+
/** @description Whether another page follows. */
|
|
1002
|
+
has_more: boolean;
|
|
1003
|
+
/** @description Pass as `cursor` to get the next page; null on the last page. */
|
|
1004
|
+
next_cursor: string | null;
|
|
1005
|
+
};
|
|
1006
|
+
WebhookResponseDto: {
|
|
1007
|
+
/** @description Whether it receives events (`enabled` on the new routes). */
|
|
1008
|
+
active: boolean;
|
|
1009
|
+
/**
|
|
1010
|
+
* Format: date-time
|
|
1011
|
+
* @description Set when it was switched off automatically after sustained failures.
|
|
1012
|
+
*/
|
|
1013
|
+
auto_disabled_at: string | null;
|
|
1014
|
+
/** Format: date-time */
|
|
1015
|
+
created_at: string;
|
|
1016
|
+
/** @description Failed deliveries in a row (`consecutive_failures` on the new routes). */
|
|
1017
|
+
failure_count: number;
|
|
1018
|
+
/** Format: date-time */
|
|
1019
|
+
first_failure_at: string | null;
|
|
1020
|
+
/** Format: uuid */
|
|
1021
|
+
id: string;
|
|
1022
|
+
/**
|
|
1023
|
+
* Format: date-time
|
|
1024
|
+
* @description When the latest attempt was made.
|
|
1025
|
+
*/
|
|
1026
|
+
last_attempt_at: string | null;
|
|
1027
|
+
/** @description HTTP status of the latest attempt. */
|
|
1028
|
+
last_status_code: number | null;
|
|
1029
|
+
/** @description Always true: every webhook has a signing secret. */
|
|
1030
|
+
secret_set?: boolean;
|
|
1031
|
+
url: string;
|
|
1032
|
+
/** Format: uuid */
|
|
1033
|
+
workspace_id: string;
|
|
1034
|
+
};
|
|
1035
|
+
WebhookRotateSecretResponseDto: {
|
|
1036
|
+
/** Format: uuid */
|
|
1037
|
+
id: string;
|
|
1038
|
+
/** @description New plaintext signing secret, returned EXACTLY ONCE. Persist immediately; the old secret stops working at once. */
|
|
1039
|
+
secret: string;
|
|
1040
|
+
};
|
|
1041
|
+
WebhookTestAcceptedDto: {
|
|
1042
|
+
/** @example true */
|
|
1043
|
+
accepted: boolean;
|
|
252
1044
|
};
|
|
253
1045
|
};
|
|
254
1046
|
responses: never;
|
|
@@ -258,6 +1050,49 @@ interface components {
|
|
|
258
1050
|
pathItems: never;
|
|
259
1051
|
}
|
|
260
1052
|
interface operations {
|
|
1053
|
+
CreditsController_get: {
|
|
1054
|
+
parameters: {
|
|
1055
|
+
query?: {
|
|
1056
|
+
/** @description How many recent entries to return. Defaults to 50, capped at 200. */
|
|
1057
|
+
limit?: number;
|
|
1058
|
+
};
|
|
1059
|
+
header?: never;
|
|
1060
|
+
path: {
|
|
1061
|
+
workspace_id: string;
|
|
1062
|
+
};
|
|
1063
|
+
cookie?: never;
|
|
1064
|
+
};
|
|
1065
|
+
requestBody?: never;
|
|
1066
|
+
responses: {
|
|
1067
|
+
/** @description Balance, low-balance state and recent entries. */
|
|
1068
|
+
200: {
|
|
1069
|
+
headers: {
|
|
1070
|
+
[name: string]: unknown;
|
|
1071
|
+
};
|
|
1072
|
+
content: {
|
|
1073
|
+
"application/json": components["schemas"]["CreditsResponseDto"];
|
|
1074
|
+
};
|
|
1075
|
+
};
|
|
1076
|
+
/** @description Missing or invalid bearer token. */
|
|
1077
|
+
401: {
|
|
1078
|
+
headers: {
|
|
1079
|
+
[name: string]: unknown;
|
|
1080
|
+
};
|
|
1081
|
+
content: {
|
|
1082
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1083
|
+
};
|
|
1084
|
+
};
|
|
1085
|
+
/** @description Caller lacks `trawl.read`, or the service is not enabled. */
|
|
1086
|
+
403: {
|
|
1087
|
+
headers: {
|
|
1088
|
+
[name: string]: unknown;
|
|
1089
|
+
};
|
|
1090
|
+
content: {
|
|
1091
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1092
|
+
};
|
|
1093
|
+
};
|
|
1094
|
+
};
|
|
1095
|
+
};
|
|
261
1096
|
JobController_list: {
|
|
262
1097
|
parameters: {
|
|
263
1098
|
query?: {
|
|
@@ -281,141 +1116,861 @@ interface operations {
|
|
|
281
1116
|
[name: string]: unknown;
|
|
282
1117
|
};
|
|
283
1118
|
content: {
|
|
284
|
-
"application/json": components["schemas"]["JobListResponseDto"];
|
|
1119
|
+
"application/json": components["schemas"]["JobListResponseDto"];
|
|
1120
|
+
};
|
|
1121
|
+
};
|
|
1122
|
+
/** @description Caller lacks `trawl.list`, or workspace has not enabled the `trawl` service. */
|
|
1123
|
+
403: {
|
|
1124
|
+
headers: {
|
|
1125
|
+
[name: string]: unknown;
|
|
1126
|
+
};
|
|
1127
|
+
content: {
|
|
1128
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1129
|
+
};
|
|
1130
|
+
};
|
|
1131
|
+
};
|
|
1132
|
+
};
|
|
1133
|
+
JobController_create: {
|
|
1134
|
+
parameters: {
|
|
1135
|
+
query?: never;
|
|
1136
|
+
header?: {
|
|
1137
|
+
/** @description Pass a key (1..256 chars, [A-Za-z0-9_\-:]) to make retries safe — replays return the original response for 24h. */
|
|
1138
|
+
"Idempotency-Key"?: string;
|
|
1139
|
+
};
|
|
1140
|
+
path: {
|
|
1141
|
+
workspace_id: string;
|
|
1142
|
+
};
|
|
1143
|
+
cookie?: never;
|
|
1144
|
+
};
|
|
1145
|
+
requestBody: {
|
|
1146
|
+
content: {
|
|
1147
|
+
"application/json": components["schemas"]["CreateJobDto"];
|
|
1148
|
+
};
|
|
1149
|
+
};
|
|
1150
|
+
responses: {
|
|
1151
|
+
/** @description Job created and queued. */
|
|
1152
|
+
201: {
|
|
1153
|
+
headers: {
|
|
1154
|
+
[name: string]: unknown;
|
|
1155
|
+
};
|
|
1156
|
+
content: {
|
|
1157
|
+
"application/json": components["schemas"]["JobResponseDto"];
|
|
1158
|
+
};
|
|
1159
|
+
};
|
|
1160
|
+
/** @description Invalid JSON Schema (must be a non-empty `type: object`). */
|
|
1161
|
+
400: {
|
|
1162
|
+
headers: {
|
|
1163
|
+
[name: string]: unknown;
|
|
1164
|
+
};
|
|
1165
|
+
content: {
|
|
1166
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1167
|
+
};
|
|
1168
|
+
};
|
|
1169
|
+
/** @description Caller lacks `trawl.create`, or workspace has not enabled the `trawl` service. */
|
|
1170
|
+
403: {
|
|
1171
|
+
headers: {
|
|
1172
|
+
[name: string]: unknown;
|
|
1173
|
+
};
|
|
1174
|
+
content: {
|
|
1175
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1176
|
+
};
|
|
1177
|
+
};
|
|
1178
|
+
/** @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. */
|
|
1179
|
+
429: {
|
|
1180
|
+
headers: {
|
|
1181
|
+
[name: string]: unknown;
|
|
1182
|
+
};
|
|
1183
|
+
content: {
|
|
1184
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1185
|
+
};
|
|
1186
|
+
};
|
|
1187
|
+
};
|
|
1188
|
+
};
|
|
1189
|
+
JobController_get: {
|
|
1190
|
+
parameters: {
|
|
1191
|
+
query?: never;
|
|
1192
|
+
header?: never;
|
|
1193
|
+
path: {
|
|
1194
|
+
workspace_id: string;
|
|
1195
|
+
id: string;
|
|
1196
|
+
};
|
|
1197
|
+
cookie?: never;
|
|
1198
|
+
};
|
|
1199
|
+
requestBody?: never;
|
|
1200
|
+
responses: {
|
|
1201
|
+
/** @description Job row. */
|
|
1202
|
+
200: {
|
|
1203
|
+
headers: {
|
|
1204
|
+
[name: string]: unknown;
|
|
1205
|
+
};
|
|
1206
|
+
content: {
|
|
1207
|
+
"application/json": components["schemas"]["JobResponseDto"];
|
|
1208
|
+
};
|
|
1209
|
+
};
|
|
1210
|
+
/** @description Job not found in this workspace. */
|
|
1211
|
+
404: {
|
|
1212
|
+
headers: {
|
|
1213
|
+
[name: string]: unknown;
|
|
1214
|
+
};
|
|
1215
|
+
content: {
|
|
1216
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1217
|
+
};
|
|
1218
|
+
};
|
|
1219
|
+
};
|
|
1220
|
+
};
|
|
1221
|
+
JobController_cancel: {
|
|
1222
|
+
parameters: {
|
|
1223
|
+
query?: never;
|
|
1224
|
+
header?: never;
|
|
1225
|
+
path: {
|
|
1226
|
+
workspace_id: string;
|
|
1227
|
+
id: string;
|
|
1228
|
+
};
|
|
1229
|
+
cookie?: never;
|
|
1230
|
+
};
|
|
1231
|
+
requestBody?: never;
|
|
1232
|
+
responses: {
|
|
1233
|
+
/** @description Job cancelled. */
|
|
1234
|
+
200: {
|
|
1235
|
+
headers: {
|
|
1236
|
+
[name: string]: unknown;
|
|
1237
|
+
};
|
|
1238
|
+
content: {
|
|
1239
|
+
"application/json": components["schemas"]["JobResponseDto"];
|
|
1240
|
+
};
|
|
1241
|
+
};
|
|
1242
|
+
/** @description Job not found in this workspace. */
|
|
1243
|
+
404: {
|
|
1244
|
+
headers: {
|
|
1245
|
+
[name: string]: unknown;
|
|
1246
|
+
};
|
|
1247
|
+
content: {
|
|
1248
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1249
|
+
};
|
|
1250
|
+
};
|
|
1251
|
+
/** @description Job is already in a terminal state and cannot be cancelled. */
|
|
1252
|
+
422: {
|
|
1253
|
+
headers: {
|
|
1254
|
+
[name: string]: unknown;
|
|
1255
|
+
};
|
|
1256
|
+
content: {
|
|
1257
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1258
|
+
};
|
|
1259
|
+
};
|
|
1260
|
+
};
|
|
1261
|
+
};
|
|
1262
|
+
WorkspaceStatsController_get: {
|
|
1263
|
+
parameters: {
|
|
1264
|
+
query?: {
|
|
1265
|
+
/** @description Window for `in_window` and the length of `series`, in UTC days ending today. */
|
|
1266
|
+
window?: "1d" | "7d" | "30d";
|
|
1267
|
+
};
|
|
1268
|
+
header?: never;
|
|
1269
|
+
path: {
|
|
1270
|
+
/** @description Workspace id. */
|
|
1271
|
+
workspace_id: string;
|
|
1272
|
+
};
|
|
1273
|
+
cookie?: never;
|
|
1274
|
+
};
|
|
1275
|
+
requestBody?: never;
|
|
1276
|
+
responses: {
|
|
1277
|
+
/** @description Trawl stats. */
|
|
1278
|
+
200: {
|
|
1279
|
+
headers: {
|
|
1280
|
+
[name: string]: unknown;
|
|
1281
|
+
};
|
|
1282
|
+
content: {
|
|
1283
|
+
"application/json": components["schemas"]["TrawlWorkspaceStatsDto"];
|
|
1284
|
+
};
|
|
1285
|
+
};
|
|
1286
|
+
/** @description `window` is not one of 1d, 7d, 30d. */
|
|
1287
|
+
400: {
|
|
1288
|
+
headers: {
|
|
1289
|
+
[name: string]: unknown;
|
|
1290
|
+
};
|
|
1291
|
+
content: {
|
|
1292
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1293
|
+
};
|
|
1294
|
+
};
|
|
1295
|
+
/** @description Caller lacks `trawl.read` on the workspace, or Trawl is not enabled on it (`SERVICE_NOT_ENABLED`). */
|
|
1296
|
+
403: {
|
|
1297
|
+
headers: {
|
|
1298
|
+
[name: string]: unknown;
|
|
1299
|
+
};
|
|
1300
|
+
content: {
|
|
1301
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1302
|
+
};
|
|
1303
|
+
};
|
|
1304
|
+
/** @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. */
|
|
1305
|
+
404: {
|
|
1306
|
+
headers: {
|
|
1307
|
+
[name: string]: unknown;
|
|
1308
|
+
};
|
|
1309
|
+
content: {
|
|
1310
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1311
|
+
};
|
|
1312
|
+
};
|
|
1313
|
+
};
|
|
1314
|
+
};
|
|
1315
|
+
WebhookController_list: {
|
|
1316
|
+
parameters: {
|
|
1317
|
+
query?: {
|
|
1318
|
+
/** @description Opaque cursor from the previous response's `pagination.next_cursor`. */
|
|
1319
|
+
cursor?: string;
|
|
1320
|
+
/** @description Page size. Defaults to 20, capped at 100. */
|
|
1321
|
+
limit?: number;
|
|
1322
|
+
};
|
|
1323
|
+
header?: never;
|
|
1324
|
+
path: {
|
|
1325
|
+
workspace_id: string;
|
|
1326
|
+
};
|
|
1327
|
+
cookie?: never;
|
|
1328
|
+
};
|
|
1329
|
+
requestBody?: never;
|
|
1330
|
+
responses: {
|
|
1331
|
+
/** @description Page of webhooks with a pagination cursor. */
|
|
1332
|
+
200: {
|
|
1333
|
+
headers: {
|
|
1334
|
+
[name: string]: unknown;
|
|
1335
|
+
};
|
|
1336
|
+
content: {
|
|
1337
|
+
"application/json": components["schemas"]["WebhookListResponseDto"];
|
|
1338
|
+
};
|
|
1339
|
+
};
|
|
1340
|
+
/** @description Invalid cursor or limit. */
|
|
1341
|
+
400: {
|
|
1342
|
+
headers: {
|
|
1343
|
+
[name: string]: unknown;
|
|
1344
|
+
};
|
|
1345
|
+
content: {
|
|
1346
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1347
|
+
};
|
|
1348
|
+
};
|
|
1349
|
+
};
|
|
1350
|
+
};
|
|
1351
|
+
WebhookController_create: {
|
|
1352
|
+
parameters: {
|
|
1353
|
+
query?: never;
|
|
1354
|
+
header?: {
|
|
1355
|
+
/** @description Stripe-style idempotency key. The signing secret is returned exactly once; a retry without this header creates a second webhook + secret. 24h TTL. */
|
|
1356
|
+
"Idempotency-Key"?: string;
|
|
1357
|
+
};
|
|
1358
|
+
path: {
|
|
1359
|
+
workspace_id: string;
|
|
1360
|
+
};
|
|
1361
|
+
cookie?: never;
|
|
1362
|
+
};
|
|
1363
|
+
requestBody: {
|
|
1364
|
+
content: {
|
|
1365
|
+
"application/json": components["schemas"]["CreateWebhookDto"];
|
|
1366
|
+
};
|
|
1367
|
+
};
|
|
1368
|
+
responses: {
|
|
1369
|
+
/** @description Webhook created. Includes plaintext `signing_secret` exactly once. */
|
|
1370
|
+
201: {
|
|
1371
|
+
headers: {
|
|
1372
|
+
[name: string]: unknown;
|
|
1373
|
+
};
|
|
1374
|
+
content: {
|
|
1375
|
+
"application/json": components["schemas"]["WebhookCreateResponseDto"];
|
|
1376
|
+
};
|
|
1377
|
+
};
|
|
1378
|
+
/** @description Invalid URL (must be public HTTPS). */
|
|
1379
|
+
400: {
|
|
1380
|
+
headers: {
|
|
1381
|
+
[name: string]: unknown;
|
|
1382
|
+
};
|
|
1383
|
+
content: {
|
|
1384
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1385
|
+
};
|
|
1386
|
+
};
|
|
1387
|
+
/** @description The workspace already has 10 webhooks. */
|
|
1388
|
+
409: {
|
|
1389
|
+
headers: {
|
|
1390
|
+
[name: string]: unknown;
|
|
1391
|
+
};
|
|
1392
|
+
content: {
|
|
1393
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1394
|
+
};
|
|
1395
|
+
};
|
|
1396
|
+
};
|
|
1397
|
+
};
|
|
1398
|
+
WebhooksController_trawl_workspace_listEndpoints: {
|
|
1399
|
+
parameters: {
|
|
1400
|
+
query?: never;
|
|
1401
|
+
header?: never;
|
|
1402
|
+
path: {
|
|
1403
|
+
workspace_id: string;
|
|
1404
|
+
};
|
|
1405
|
+
cookie?: never;
|
|
1406
|
+
};
|
|
1407
|
+
requestBody?: never;
|
|
1408
|
+
responses: {
|
|
1409
|
+
200: {
|
|
1410
|
+
headers: {
|
|
1411
|
+
[name: string]: unknown;
|
|
1412
|
+
};
|
|
1413
|
+
content: {
|
|
1414
|
+
"application/json": components["schemas"]["ListWebhookEndpointsResponseDto"];
|
|
1415
|
+
};
|
|
1416
|
+
};
|
|
1417
|
+
/** @description The scope id in the path is malformed. */
|
|
1418
|
+
400: {
|
|
1419
|
+
headers: {
|
|
1420
|
+
[name: string]: unknown;
|
|
1421
|
+
};
|
|
1422
|
+
content: {
|
|
1423
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1424
|
+
};
|
|
1425
|
+
};
|
|
1426
|
+
/** @description Missing or invalid bearer token. */
|
|
1427
|
+
401: {
|
|
1428
|
+
headers: {
|
|
1429
|
+
[name: string]: unknown;
|
|
1430
|
+
};
|
|
1431
|
+
content: {
|
|
1432
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1433
|
+
};
|
|
1434
|
+
};
|
|
1435
|
+
/** @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`). */
|
|
1436
|
+
403: {
|
|
1437
|
+
headers: {
|
|
1438
|
+
[name: string]: unknown;
|
|
1439
|
+
};
|
|
1440
|
+
content: {
|
|
1441
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1442
|
+
};
|
|
1443
|
+
};
|
|
1444
|
+
};
|
|
1445
|
+
};
|
|
1446
|
+
WebhooksController_trawl_workspace_createEndpoint: {
|
|
1447
|
+
parameters: {
|
|
1448
|
+
query?: never;
|
|
1449
|
+
header?: {
|
|
1450
|
+
/** @description Opaque client-generated string (1-256 chars, `[A-Za-z0-9_-:]`) that makes a retry of this request safe for 24 hours. The same key with a different body returns 409 `IDEMPOTENCY_KEY_REUSE`. */
|
|
1451
|
+
"Idempotency-Key"?: string;
|
|
1452
|
+
};
|
|
1453
|
+
path: {
|
|
1454
|
+
workspace_id: string;
|
|
1455
|
+
};
|
|
1456
|
+
cookie?: never;
|
|
1457
|
+
};
|
|
1458
|
+
requestBody: {
|
|
1459
|
+
content: {
|
|
1460
|
+
"application/json": components["schemas"]["CreateWebhookEndpointDto"];
|
|
1461
|
+
};
|
|
1462
|
+
};
|
|
1463
|
+
responses: {
|
|
1464
|
+
201: {
|
|
1465
|
+
headers: {
|
|
1466
|
+
[name: string]: unknown;
|
|
1467
|
+
};
|
|
1468
|
+
content: {
|
|
1469
|
+
"application/json": components["schemas"]["WebhookEndpointWithSecretDto"];
|
|
1470
|
+
};
|
|
1471
|
+
};
|
|
1472
|
+
/** @description Validation failure: URL not https with a public host, or an unknown event type (`WEBHOOK_EVENT_TYPE_UNKNOWN`). */
|
|
1473
|
+
400: {
|
|
1474
|
+
headers: {
|
|
1475
|
+
[name: string]: unknown;
|
|
1476
|
+
};
|
|
1477
|
+
content: {
|
|
1478
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1479
|
+
};
|
|
1480
|
+
};
|
|
1481
|
+
/** @description Missing or invalid bearer token. */
|
|
1482
|
+
401: {
|
|
1483
|
+
headers: {
|
|
1484
|
+
[name: string]: unknown;
|
|
1485
|
+
};
|
|
1486
|
+
content: {
|
|
1487
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1488
|
+
};
|
|
1489
|
+
};
|
|
1490
|
+
/** @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`). */
|
|
1491
|
+
403: {
|
|
1492
|
+
headers: {
|
|
1493
|
+
[name: string]: unknown;
|
|
1494
|
+
};
|
|
1495
|
+
content: {
|
|
1496
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1497
|
+
};
|
|
1498
|
+
};
|
|
1499
|
+
/** @description Already 10 endpoints (`WEBHOOK_ENDPOINT_LIMIT`), or Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). */
|
|
1500
|
+
409: {
|
|
1501
|
+
headers: {
|
|
1502
|
+
[name: string]: unknown;
|
|
1503
|
+
};
|
|
1504
|
+
content: {
|
|
1505
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1506
|
+
};
|
|
1507
|
+
};
|
|
1508
|
+
/** @description The URL points at a private, loopback or internal address. */
|
|
1509
|
+
422: {
|
|
1510
|
+
headers: {
|
|
1511
|
+
[name: string]: unknown;
|
|
1512
|
+
};
|
|
1513
|
+
content: {
|
|
1514
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1515
|
+
};
|
|
1516
|
+
};
|
|
1517
|
+
};
|
|
1518
|
+
};
|
|
1519
|
+
WebhooksController_trawl_workspace_getEndpoint: {
|
|
1520
|
+
parameters: {
|
|
1521
|
+
query?: never;
|
|
1522
|
+
header?: never;
|
|
1523
|
+
path: {
|
|
1524
|
+
workspace_id: string;
|
|
1525
|
+
endpoint_id: string;
|
|
1526
|
+
};
|
|
1527
|
+
cookie?: never;
|
|
1528
|
+
};
|
|
1529
|
+
requestBody?: never;
|
|
1530
|
+
responses: {
|
|
1531
|
+
200: {
|
|
1532
|
+
headers: {
|
|
1533
|
+
[name: string]: unknown;
|
|
1534
|
+
};
|
|
1535
|
+
content: {
|
|
1536
|
+
"application/json": components["schemas"]["WebhookEndpointDto"];
|
|
1537
|
+
};
|
|
1538
|
+
};
|
|
1539
|
+
/** @description `endpoint_id` is not a UUID. */
|
|
1540
|
+
400: {
|
|
1541
|
+
headers: {
|
|
1542
|
+
[name: string]: unknown;
|
|
1543
|
+
};
|
|
1544
|
+
content: {
|
|
1545
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1546
|
+
};
|
|
1547
|
+
};
|
|
1548
|
+
/** @description Missing or invalid bearer token. */
|
|
1549
|
+
401: {
|
|
1550
|
+
headers: {
|
|
1551
|
+
[name: string]: unknown;
|
|
1552
|
+
};
|
|
1553
|
+
content: {
|
|
1554
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1555
|
+
};
|
|
1556
|
+
};
|
|
1557
|
+
/** @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`). */
|
|
1558
|
+
403: {
|
|
1559
|
+
headers: {
|
|
1560
|
+
[name: string]: unknown;
|
|
1561
|
+
};
|
|
1562
|
+
content: {
|
|
1563
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1564
|
+
};
|
|
1565
|
+
};
|
|
1566
|
+
/** @description No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`). */
|
|
1567
|
+
404: {
|
|
1568
|
+
headers: {
|
|
1569
|
+
[name: string]: unknown;
|
|
1570
|
+
};
|
|
1571
|
+
content: {
|
|
1572
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1573
|
+
};
|
|
1574
|
+
};
|
|
1575
|
+
};
|
|
1576
|
+
};
|
|
1577
|
+
WebhooksController_trawl_workspace_deleteEndpoint: {
|
|
1578
|
+
parameters: {
|
|
1579
|
+
query?: never;
|
|
1580
|
+
header?: never;
|
|
1581
|
+
path: {
|
|
1582
|
+
workspace_id: string;
|
|
1583
|
+
endpoint_id: string;
|
|
1584
|
+
};
|
|
1585
|
+
cookie?: never;
|
|
1586
|
+
};
|
|
1587
|
+
requestBody?: never;
|
|
1588
|
+
responses: {
|
|
1589
|
+
/** @description Deleted. */
|
|
1590
|
+
204: {
|
|
1591
|
+
headers: {
|
|
1592
|
+
[name: string]: unknown;
|
|
1593
|
+
};
|
|
1594
|
+
content?: never;
|
|
1595
|
+
};
|
|
1596
|
+
/** @description `endpoint_id` is not a UUID. */
|
|
1597
|
+
400: {
|
|
1598
|
+
headers: {
|
|
1599
|
+
[name: string]: unknown;
|
|
1600
|
+
};
|
|
1601
|
+
content: {
|
|
1602
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1603
|
+
};
|
|
1604
|
+
};
|
|
1605
|
+
/** @description Missing or invalid bearer token. */
|
|
1606
|
+
401: {
|
|
1607
|
+
headers: {
|
|
1608
|
+
[name: string]: unknown;
|
|
1609
|
+
};
|
|
1610
|
+
content: {
|
|
1611
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1612
|
+
};
|
|
1613
|
+
};
|
|
1614
|
+
/** @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`). */
|
|
1615
|
+
403: {
|
|
1616
|
+
headers: {
|
|
1617
|
+
[name: string]: unknown;
|
|
1618
|
+
};
|
|
1619
|
+
content: {
|
|
1620
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1621
|
+
};
|
|
1622
|
+
};
|
|
1623
|
+
/** @description No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`). */
|
|
1624
|
+
404: {
|
|
1625
|
+
headers: {
|
|
1626
|
+
[name: string]: unknown;
|
|
1627
|
+
};
|
|
1628
|
+
content: {
|
|
1629
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1630
|
+
};
|
|
1631
|
+
};
|
|
1632
|
+
};
|
|
1633
|
+
};
|
|
1634
|
+
WebhooksController_trawl_workspace_updateEndpoint: {
|
|
1635
|
+
parameters: {
|
|
1636
|
+
query?: never;
|
|
1637
|
+
header?: {
|
|
1638
|
+
/** @description Opaque client-generated string (1-256 chars, `[A-Za-z0-9_-:]`) that makes a retry of this request safe for 24 hours. The same key with a different body returns 409 `IDEMPOTENCY_KEY_REUSE`. */
|
|
1639
|
+
"Idempotency-Key"?: string;
|
|
1640
|
+
};
|
|
1641
|
+
path: {
|
|
1642
|
+
workspace_id: string;
|
|
1643
|
+
endpoint_id: string;
|
|
1644
|
+
};
|
|
1645
|
+
cookie?: never;
|
|
1646
|
+
};
|
|
1647
|
+
requestBody: {
|
|
1648
|
+
content: {
|
|
1649
|
+
"application/json": components["schemas"]["UpdateWebhookEndpointDto"];
|
|
1650
|
+
};
|
|
1651
|
+
};
|
|
1652
|
+
responses: {
|
|
1653
|
+
200: {
|
|
1654
|
+
headers: {
|
|
1655
|
+
[name: string]: unknown;
|
|
1656
|
+
};
|
|
1657
|
+
content: {
|
|
1658
|
+
"application/json": components["schemas"]["WebhookEndpointDto"];
|
|
1659
|
+
};
|
|
1660
|
+
};
|
|
1661
|
+
/** @description Validation failure, or `endpoint_id` is not a UUID. */
|
|
1662
|
+
400: {
|
|
1663
|
+
headers: {
|
|
1664
|
+
[name: string]: unknown;
|
|
1665
|
+
};
|
|
1666
|
+
content: {
|
|
1667
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1668
|
+
};
|
|
1669
|
+
};
|
|
1670
|
+
/** @description Missing or invalid bearer token. */
|
|
1671
|
+
401: {
|
|
1672
|
+
headers: {
|
|
1673
|
+
[name: string]: unknown;
|
|
1674
|
+
};
|
|
1675
|
+
content: {
|
|
1676
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1677
|
+
};
|
|
1678
|
+
};
|
|
1679
|
+
/** @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`). */
|
|
1680
|
+
403: {
|
|
1681
|
+
headers: {
|
|
1682
|
+
[name: string]: unknown;
|
|
1683
|
+
};
|
|
1684
|
+
content: {
|
|
1685
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1686
|
+
};
|
|
1687
|
+
};
|
|
1688
|
+
/** @description No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`). */
|
|
1689
|
+
404: {
|
|
1690
|
+
headers: {
|
|
1691
|
+
[name: string]: unknown;
|
|
1692
|
+
};
|
|
1693
|
+
content: {
|
|
1694
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1695
|
+
};
|
|
1696
|
+
};
|
|
1697
|
+
/** @description Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). */
|
|
1698
|
+
409: {
|
|
1699
|
+
headers: {
|
|
1700
|
+
[name: string]: unknown;
|
|
1701
|
+
};
|
|
1702
|
+
content: {
|
|
1703
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1704
|
+
};
|
|
1705
|
+
};
|
|
1706
|
+
/** @description The new URL points at a private, loopback or internal address. */
|
|
1707
|
+
422: {
|
|
1708
|
+
headers: {
|
|
1709
|
+
[name: string]: unknown;
|
|
1710
|
+
};
|
|
1711
|
+
content: {
|
|
1712
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1713
|
+
};
|
|
1714
|
+
};
|
|
1715
|
+
};
|
|
1716
|
+
};
|
|
1717
|
+
WebhooksController_trawl_workspace_rotateSecret: {
|
|
1718
|
+
parameters: {
|
|
1719
|
+
query?: never;
|
|
1720
|
+
header?: {
|
|
1721
|
+
/** @description Opaque client-generated string (1-256 chars, `[A-Za-z0-9_-:]`) that makes a retry of this request safe for 24 hours. The same key with a different body returns 409 `IDEMPOTENCY_KEY_REUSE`. */
|
|
1722
|
+
"Idempotency-Key"?: string;
|
|
1723
|
+
};
|
|
1724
|
+
path: {
|
|
1725
|
+
workspace_id: string;
|
|
1726
|
+
endpoint_id: string;
|
|
1727
|
+
};
|
|
1728
|
+
cookie?: never;
|
|
1729
|
+
};
|
|
1730
|
+
requestBody: {
|
|
1731
|
+
content: {
|
|
1732
|
+
"application/json": components["schemas"]["RotateWebhookSecretDto"];
|
|
1733
|
+
};
|
|
1734
|
+
};
|
|
1735
|
+
responses: {
|
|
1736
|
+
200: {
|
|
1737
|
+
headers: {
|
|
1738
|
+
[name: string]: unknown;
|
|
1739
|
+
};
|
|
1740
|
+
content: {
|
|
1741
|
+
"application/json": components["schemas"]["WebhookEndpointWithSecretDto"];
|
|
1742
|
+
};
|
|
1743
|
+
};
|
|
1744
|
+
/** @description `grace_hours` out of range, or `endpoint_id` is not a UUID. */
|
|
1745
|
+
400: {
|
|
1746
|
+
headers: {
|
|
1747
|
+
[name: string]: unknown;
|
|
1748
|
+
};
|
|
1749
|
+
content: {
|
|
1750
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1751
|
+
};
|
|
1752
|
+
};
|
|
1753
|
+
/** @description Missing or invalid bearer token. */
|
|
1754
|
+
401: {
|
|
1755
|
+
headers: {
|
|
1756
|
+
[name: string]: unknown;
|
|
1757
|
+
};
|
|
1758
|
+
content: {
|
|
1759
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
285
1760
|
};
|
|
286
1761
|
};
|
|
287
|
-
/** @description Caller lacks `trawl.
|
|
1762
|
+
/** @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`). */
|
|
288
1763
|
403: {
|
|
289
1764
|
headers: {
|
|
290
1765
|
[name: string]: unknown;
|
|
291
1766
|
};
|
|
292
|
-
content
|
|
1767
|
+
content: {
|
|
1768
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1769
|
+
};
|
|
1770
|
+
};
|
|
1771
|
+
/** @description No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`). */
|
|
1772
|
+
404: {
|
|
1773
|
+
headers: {
|
|
1774
|
+
[name: string]: unknown;
|
|
1775
|
+
};
|
|
1776
|
+
content: {
|
|
1777
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1778
|
+
};
|
|
1779
|
+
};
|
|
1780
|
+
/** @description Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). */
|
|
1781
|
+
409: {
|
|
1782
|
+
headers: {
|
|
1783
|
+
[name: string]: unknown;
|
|
1784
|
+
};
|
|
1785
|
+
content: {
|
|
1786
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1787
|
+
};
|
|
293
1788
|
};
|
|
294
1789
|
};
|
|
295
1790
|
};
|
|
296
|
-
|
|
1791
|
+
WebhooksController_trawl_workspace_sendTest: {
|
|
297
1792
|
parameters: {
|
|
298
1793
|
query?: never;
|
|
299
1794
|
header?: {
|
|
300
|
-
/** @description
|
|
1795
|
+
/** @description Opaque client-generated string (1-256 chars, `[A-Za-z0-9_-:]`) that makes a retry of this request safe for 24 hours. The same key with a different body returns 409 `IDEMPOTENCY_KEY_REUSE`. */
|
|
301
1796
|
"Idempotency-Key"?: string;
|
|
302
1797
|
};
|
|
303
1798
|
path: {
|
|
304
1799
|
workspace_id: string;
|
|
1800
|
+
endpoint_id: string;
|
|
305
1801
|
};
|
|
306
1802
|
cookie?: never;
|
|
307
1803
|
};
|
|
308
1804
|
requestBody: {
|
|
309
1805
|
content: {
|
|
310
|
-
"application/json": components["schemas"]["
|
|
1806
|
+
"application/json": components["schemas"]["SendWebhookTestDto"];
|
|
311
1807
|
};
|
|
312
1808
|
};
|
|
313
1809
|
responses: {
|
|
314
|
-
/** @description
|
|
315
|
-
|
|
1810
|
+
/** @description The attempt, successful or not. */
|
|
1811
|
+
200: {
|
|
316
1812
|
headers: {
|
|
317
1813
|
[name: string]: unknown;
|
|
318
1814
|
};
|
|
319
1815
|
content: {
|
|
320
|
-
"application/json": components["schemas"]["
|
|
1816
|
+
"application/json": components["schemas"]["WebhookDeliveryAttemptDto"];
|
|
321
1817
|
};
|
|
322
1818
|
};
|
|
323
|
-
/** @description
|
|
1819
|
+
/** @description Unknown `event_type`, or `endpoint_id` is not a UUID. */
|
|
324
1820
|
400: {
|
|
325
1821
|
headers: {
|
|
326
1822
|
[name: string]: unknown;
|
|
327
1823
|
};
|
|
328
|
-
content
|
|
1824
|
+
content: {
|
|
1825
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1826
|
+
};
|
|
329
1827
|
};
|
|
330
|
-
/** @description
|
|
1828
|
+
/** @description Missing or invalid bearer token. */
|
|
1829
|
+
401: {
|
|
1830
|
+
headers: {
|
|
1831
|
+
[name: string]: unknown;
|
|
1832
|
+
};
|
|
1833
|
+
content: {
|
|
1834
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1835
|
+
};
|
|
1836
|
+
};
|
|
1837
|
+
/** @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`). */
|
|
331
1838
|
403: {
|
|
332
1839
|
headers: {
|
|
333
1840
|
[name: string]: unknown;
|
|
334
1841
|
};
|
|
335
|
-
content
|
|
1842
|
+
content: {
|
|
1843
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1844
|
+
};
|
|
336
1845
|
};
|
|
337
|
-
/** @description
|
|
338
|
-
|
|
1846
|
+
/** @description No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`). */
|
|
1847
|
+
404: {
|
|
339
1848
|
headers: {
|
|
340
1849
|
[name: string]: unknown;
|
|
341
1850
|
};
|
|
342
|
-
content
|
|
1851
|
+
content: {
|
|
1852
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1853
|
+
};
|
|
1854
|
+
};
|
|
1855
|
+
/** @description Idempotency-Key reused with a different body (`IDEMPOTENCY_KEY_REUSE`). */
|
|
1856
|
+
409: {
|
|
1857
|
+
headers: {
|
|
1858
|
+
[name: string]: unknown;
|
|
1859
|
+
};
|
|
1860
|
+
content: {
|
|
1861
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1862
|
+
};
|
|
343
1863
|
};
|
|
344
1864
|
};
|
|
345
1865
|
};
|
|
346
|
-
|
|
1866
|
+
WebhooksController_trawl_workspace_listEventTypes: {
|
|
347
1867
|
parameters: {
|
|
348
1868
|
query?: never;
|
|
349
1869
|
header?: never;
|
|
350
1870
|
path: {
|
|
351
1871
|
workspace_id: string;
|
|
352
|
-
id: string;
|
|
353
1872
|
};
|
|
354
1873
|
cookie?: never;
|
|
355
1874
|
};
|
|
356
1875
|
requestBody?: never;
|
|
357
1876
|
responses: {
|
|
358
|
-
/** @description Job row. */
|
|
359
1877
|
200: {
|
|
360
1878
|
headers: {
|
|
361
1879
|
[name: string]: unknown;
|
|
362
1880
|
};
|
|
363
1881
|
content: {
|
|
364
|
-
"application/json": components["schemas"]["
|
|
1882
|
+
"application/json": components["schemas"]["ListWebhookEventTypesResponseDto"];
|
|
365
1883
|
};
|
|
366
1884
|
};
|
|
367
|
-
/** @description
|
|
368
|
-
|
|
1885
|
+
/** @description Missing or invalid bearer token. */
|
|
1886
|
+
401: {
|
|
369
1887
|
headers: {
|
|
370
1888
|
[name: string]: unknown;
|
|
371
1889
|
};
|
|
372
|
-
content
|
|
1890
|
+
content: {
|
|
1891
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1892
|
+
};
|
|
1893
|
+
};
|
|
1894
|
+
/** @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`). */
|
|
1895
|
+
403: {
|
|
1896
|
+
headers: {
|
|
1897
|
+
[name: string]: unknown;
|
|
1898
|
+
};
|
|
1899
|
+
content: {
|
|
1900
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1901
|
+
};
|
|
373
1902
|
};
|
|
374
1903
|
};
|
|
375
1904
|
};
|
|
376
|
-
|
|
1905
|
+
WebhooksController_trawl_workspace_listEvents: {
|
|
377
1906
|
parameters: {
|
|
378
|
-
query?:
|
|
1907
|
+
query?: {
|
|
1908
|
+
/** @description Only these types. Repeat the parameter or comma-separate. */
|
|
1909
|
+
type?: ("job.succeeded" | "job.failed" | "credits.low")[];
|
|
1910
|
+
/** @description Only events sent (or queued) to this endpoint. */
|
|
1911
|
+
endpoint_id?: string;
|
|
1912
|
+
status?: "pending" | "delivered" | "failed" | "not_sent";
|
|
1913
|
+
/** @description Only events created at or after this instant. */
|
|
1914
|
+
created_after?: string;
|
|
1915
|
+
/** @description Only events created before this instant. */
|
|
1916
|
+
created_before?: string;
|
|
1917
|
+
limit?: number;
|
|
1918
|
+
/** @description The previous page's `pagination.next_cursor`. */
|
|
1919
|
+
cursor?: string;
|
|
1920
|
+
};
|
|
379
1921
|
header?: never;
|
|
380
1922
|
path: {
|
|
381
1923
|
workspace_id: string;
|
|
382
|
-
id: string;
|
|
383
1924
|
};
|
|
384
1925
|
cookie?: never;
|
|
385
1926
|
};
|
|
386
1927
|
requestBody?: never;
|
|
387
1928
|
responses: {
|
|
388
|
-
/** @description Job cancelled. */
|
|
389
1929
|
200: {
|
|
390
1930
|
headers: {
|
|
391
1931
|
[name: string]: unknown;
|
|
392
1932
|
};
|
|
393
1933
|
content: {
|
|
394
|
-
"application/json": components["schemas"]["
|
|
1934
|
+
"application/json": components["schemas"]["ListWebhookEventsResponseDto"];
|
|
395
1935
|
};
|
|
396
1936
|
};
|
|
397
|
-
/** @description
|
|
398
|
-
|
|
1937
|
+
/** @description Invalid filter value or cursor. */
|
|
1938
|
+
400: {
|
|
399
1939
|
headers: {
|
|
400
1940
|
[name: string]: unknown;
|
|
401
1941
|
};
|
|
402
|
-
content
|
|
1942
|
+
content: {
|
|
1943
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1944
|
+
};
|
|
403
1945
|
};
|
|
404
|
-
/** @description
|
|
405
|
-
|
|
1946
|
+
/** @description Missing or invalid bearer token. */
|
|
1947
|
+
401: {
|
|
406
1948
|
headers: {
|
|
407
1949
|
[name: string]: unknown;
|
|
408
1950
|
};
|
|
409
|
-
content
|
|
1951
|
+
content: {
|
|
1952
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1953
|
+
};
|
|
1954
|
+
};
|
|
1955
|
+
/** @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`). */
|
|
1956
|
+
403: {
|
|
1957
|
+
headers: {
|
|
1958
|
+
[name: string]: unknown;
|
|
1959
|
+
};
|
|
1960
|
+
content: {
|
|
1961
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1962
|
+
};
|
|
410
1963
|
};
|
|
411
1964
|
};
|
|
412
1965
|
};
|
|
413
|
-
|
|
1966
|
+
WebhooksController_trawl_workspace_getEvent: {
|
|
414
1967
|
parameters: {
|
|
415
1968
|
query?: never;
|
|
416
1969
|
header?: never;
|
|
417
1970
|
path: {
|
|
418
1971
|
workspace_id: string;
|
|
1972
|
+
/** @description The event id, `evt_<uuid>`. */
|
|
1973
|
+
event_id: string;
|
|
419
1974
|
};
|
|
420
1975
|
cookie?: never;
|
|
421
1976
|
};
|
|
@@ -426,36 +1981,117 @@ interface operations {
|
|
|
426
1981
|
[name: string]: unknown;
|
|
427
1982
|
};
|
|
428
1983
|
content: {
|
|
429
|
-
"application/json": components["schemas"]["
|
|
1984
|
+
"application/json": components["schemas"]["WebhookEventDetailDto"];
|
|
1985
|
+
};
|
|
1986
|
+
};
|
|
1987
|
+
/** @description `event_id` is not `evt_<uuid>`. */
|
|
1988
|
+
400: {
|
|
1989
|
+
headers: {
|
|
1990
|
+
[name: string]: unknown;
|
|
1991
|
+
};
|
|
1992
|
+
content: {
|
|
1993
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
1994
|
+
};
|
|
1995
|
+
};
|
|
1996
|
+
/** @description Missing or invalid bearer token. */
|
|
1997
|
+
401: {
|
|
1998
|
+
headers: {
|
|
1999
|
+
[name: string]: unknown;
|
|
2000
|
+
};
|
|
2001
|
+
content: {
|
|
2002
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
2003
|
+
};
|
|
2004
|
+
};
|
|
2005
|
+
/** @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`). */
|
|
2006
|
+
403: {
|
|
2007
|
+
headers: {
|
|
2008
|
+
[name: string]: unknown;
|
|
2009
|
+
};
|
|
2010
|
+
content: {
|
|
2011
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
2012
|
+
};
|
|
2013
|
+
};
|
|
2014
|
+
/** @description No such event here (`WEBHOOK_EVENT_NOT_FOUND`); events are kept for 30 days. */
|
|
2015
|
+
404: {
|
|
2016
|
+
headers: {
|
|
2017
|
+
[name: string]: unknown;
|
|
2018
|
+
};
|
|
2019
|
+
content: {
|
|
2020
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
430
2021
|
};
|
|
431
2022
|
};
|
|
432
2023
|
};
|
|
433
2024
|
};
|
|
434
|
-
|
|
2025
|
+
WebhooksController_trawl_workspace_replay: {
|
|
435
2026
|
parameters: {
|
|
436
|
-
query?:
|
|
2027
|
+
query?: {
|
|
2028
|
+
/** @description Send to this endpoint only. */
|
|
2029
|
+
endpoint_id?: string;
|
|
2030
|
+
};
|
|
437
2031
|
header?: {
|
|
438
|
-
/** @description
|
|
2032
|
+
/** @description Opaque client-generated string (1-256 chars, `[A-Za-z0-9_-:]`) that makes a retry of this request safe for 24 hours. The same key with a different body returns 409 `IDEMPOTENCY_KEY_REUSE`. */
|
|
439
2033
|
"Idempotency-Key"?: string;
|
|
440
2034
|
};
|
|
441
2035
|
path: {
|
|
442
2036
|
workspace_id: string;
|
|
2037
|
+
/** @description The event id, `evt_<uuid>`. */
|
|
2038
|
+
event_id: string;
|
|
443
2039
|
};
|
|
444
2040
|
cookie?: never;
|
|
445
2041
|
};
|
|
446
|
-
requestBody
|
|
447
|
-
content: {
|
|
448
|
-
"application/json": components["schemas"]["CreateWebhookDto"];
|
|
449
|
-
};
|
|
450
|
-
};
|
|
2042
|
+
requestBody?: never;
|
|
451
2043
|
responses: {
|
|
452
|
-
|
|
453
|
-
201: {
|
|
2044
|
+
200: {
|
|
454
2045
|
headers: {
|
|
455
2046
|
[name: string]: unknown;
|
|
456
2047
|
};
|
|
457
2048
|
content: {
|
|
458
|
-
"application/json": components["schemas"]["
|
|
2049
|
+
"application/json": components["schemas"]["ReplayWebhookEventResponseDto"];
|
|
2050
|
+
};
|
|
2051
|
+
};
|
|
2052
|
+
/** @description `event_id` is not `evt_<uuid>`, or `endpoint_id` is not a UUID. */
|
|
2053
|
+
400: {
|
|
2054
|
+
headers: {
|
|
2055
|
+
[name: string]: unknown;
|
|
2056
|
+
};
|
|
2057
|
+
content: {
|
|
2058
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
2059
|
+
};
|
|
2060
|
+
};
|
|
2061
|
+
/** @description Missing or invalid bearer token. */
|
|
2062
|
+
401: {
|
|
2063
|
+
headers: {
|
|
2064
|
+
[name: string]: unknown;
|
|
2065
|
+
};
|
|
2066
|
+
content: {
|
|
2067
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
2068
|
+
};
|
|
2069
|
+
};
|
|
2070
|
+
/** @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`). */
|
|
2071
|
+
403: {
|
|
2072
|
+
headers: {
|
|
2073
|
+
[name: string]: unknown;
|
|
2074
|
+
};
|
|
2075
|
+
content: {
|
|
2076
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
2077
|
+
};
|
|
2078
|
+
};
|
|
2079
|
+
/** @description No such event here (`WEBHOOK_EVENT_NOT_FOUND`); events are kept for 30 days. Or No such endpoint here (`WEBHOOK_ENDPOINT_NOT_FOUND`). */
|
|
2080
|
+
404: {
|
|
2081
|
+
headers: {
|
|
2082
|
+
[name: string]: unknown;
|
|
2083
|
+
};
|
|
2084
|
+
content: {
|
|
2085
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
2086
|
+
};
|
|
2087
|
+
};
|
|
2088
|
+
/** @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`). */
|
|
2089
|
+
409: {
|
|
2090
|
+
headers: {
|
|
2091
|
+
[name: string]: unknown;
|
|
2092
|
+
};
|
|
2093
|
+
content: {
|
|
2094
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
459
2095
|
};
|
|
460
2096
|
};
|
|
461
2097
|
};
|
|
@@ -472,6 +2108,7 @@ interface operations {
|
|
|
472
2108
|
};
|
|
473
2109
|
requestBody?: never;
|
|
474
2110
|
responses: {
|
|
2111
|
+
/** @description Webhook. */
|
|
475
2112
|
200: {
|
|
476
2113
|
headers: {
|
|
477
2114
|
[name: string]: unknown;
|
|
@@ -480,12 +2117,23 @@ interface operations {
|
|
|
480
2117
|
"application/json": components["schemas"]["WebhookResponseDto"];
|
|
481
2118
|
};
|
|
482
2119
|
};
|
|
2120
|
+
/** @description `id` is not a UUID. */
|
|
2121
|
+
400: {
|
|
2122
|
+
headers: {
|
|
2123
|
+
[name: string]: unknown;
|
|
2124
|
+
};
|
|
2125
|
+
content: {
|
|
2126
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
2127
|
+
};
|
|
2128
|
+
};
|
|
483
2129
|
/** @description Webhook not found. */
|
|
484
2130
|
404: {
|
|
485
2131
|
headers: {
|
|
486
2132
|
[name: string]: unknown;
|
|
487
2133
|
};
|
|
488
|
-
content
|
|
2134
|
+
content: {
|
|
2135
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
2136
|
+
};
|
|
489
2137
|
};
|
|
490
2138
|
};
|
|
491
2139
|
};
|
|
@@ -501,12 +2149,22 @@ interface operations {
|
|
|
501
2149
|
};
|
|
502
2150
|
requestBody?: never;
|
|
503
2151
|
responses: {
|
|
2152
|
+
/** @description Deleted. */
|
|
504
2153
|
204: {
|
|
505
2154
|
headers: {
|
|
506
2155
|
[name: string]: unknown;
|
|
507
2156
|
};
|
|
508
2157
|
content?: never;
|
|
509
2158
|
};
|
|
2159
|
+
/** @description Webhook not found. */
|
|
2160
|
+
404: {
|
|
2161
|
+
headers: {
|
|
2162
|
+
[name: string]: unknown;
|
|
2163
|
+
};
|
|
2164
|
+
content: {
|
|
2165
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
2166
|
+
};
|
|
2167
|
+
};
|
|
510
2168
|
};
|
|
511
2169
|
};
|
|
512
2170
|
WebhookController_update: {
|
|
@@ -525,6 +2183,7 @@ interface operations {
|
|
|
525
2183
|
};
|
|
526
2184
|
};
|
|
527
2185
|
responses: {
|
|
2186
|
+
/** @description Updated webhook (secret masked). */
|
|
528
2187
|
200: {
|
|
529
2188
|
headers: {
|
|
530
2189
|
[name: string]: unknown;
|
|
@@ -533,11 +2192,36 @@ interface operations {
|
|
|
533
2192
|
"application/json": components["schemas"]["WebhookResponseDto"];
|
|
534
2193
|
};
|
|
535
2194
|
};
|
|
2195
|
+
/** @description Invalid URL. */
|
|
2196
|
+
400: {
|
|
2197
|
+
headers: {
|
|
2198
|
+
[name: string]: unknown;
|
|
2199
|
+
};
|
|
2200
|
+
content: {
|
|
2201
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
2202
|
+
};
|
|
2203
|
+
};
|
|
2204
|
+
/** @description Webhook not found. */
|
|
2205
|
+
404: {
|
|
2206
|
+
headers: {
|
|
2207
|
+
[name: string]: unknown;
|
|
2208
|
+
};
|
|
2209
|
+
content: {
|
|
2210
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
2211
|
+
};
|
|
2212
|
+
};
|
|
536
2213
|
};
|
|
537
2214
|
};
|
|
538
2215
|
WebhookController_recentDeliveries: {
|
|
539
2216
|
parameters: {
|
|
540
|
-
query?:
|
|
2217
|
+
query?: {
|
|
2218
|
+
/** @description Filter by outcome. `succeeded` = 2xx response; `failed` = any non-2xx, including attempts where the destination never responded. */
|
|
2219
|
+
status?: "succeeded" | "failed";
|
|
2220
|
+
/** @description Opaque cursor from the previous response's `pagination.next_cursor`. */
|
|
2221
|
+
cursor?: string;
|
|
2222
|
+
/** @description Page size. Defaults to 50, capped at 200. */
|
|
2223
|
+
limit?: number;
|
|
2224
|
+
};
|
|
541
2225
|
header?: never;
|
|
542
2226
|
path: {
|
|
543
2227
|
workspace_id: string;
|
|
@@ -547,12 +2231,32 @@ interface operations {
|
|
|
547
2231
|
};
|
|
548
2232
|
requestBody?: never;
|
|
549
2233
|
responses: {
|
|
550
|
-
/** @description
|
|
2234
|
+
/** @description Page of delivery attempts with a pagination cursor. */
|
|
551
2235
|
200: {
|
|
552
2236
|
headers: {
|
|
553
2237
|
[name: string]: unknown;
|
|
554
2238
|
};
|
|
555
|
-
content
|
|
2239
|
+
content: {
|
|
2240
|
+
"application/json": components["schemas"]["WebhookDeliveryListResponseDto"];
|
|
2241
|
+
};
|
|
2242
|
+
};
|
|
2243
|
+
/** @description Invalid cursor, limit or `status` filter. */
|
|
2244
|
+
400: {
|
|
2245
|
+
headers: {
|
|
2246
|
+
[name: string]: unknown;
|
|
2247
|
+
};
|
|
2248
|
+
content: {
|
|
2249
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
2250
|
+
};
|
|
2251
|
+
};
|
|
2252
|
+
/** @description Webhook not found in this workspace. */
|
|
2253
|
+
404: {
|
|
2254
|
+
headers: {
|
|
2255
|
+
[name: string]: unknown;
|
|
2256
|
+
};
|
|
2257
|
+
content: {
|
|
2258
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
2259
|
+
};
|
|
556
2260
|
};
|
|
557
2261
|
};
|
|
558
2262
|
};
|
|
@@ -568,11 +2272,23 @@ interface operations {
|
|
|
568
2272
|
};
|
|
569
2273
|
requestBody?: never;
|
|
570
2274
|
responses: {
|
|
2275
|
+
/** @description Secret rotated. Includes the new plaintext secret exactly once. */
|
|
571
2276
|
201: {
|
|
572
2277
|
headers: {
|
|
573
2278
|
[name: string]: unknown;
|
|
574
2279
|
};
|
|
575
|
-
content
|
|
2280
|
+
content: {
|
|
2281
|
+
"application/json": components["schemas"]["WebhookRotateSecretResponseDto"];
|
|
2282
|
+
};
|
|
2283
|
+
};
|
|
2284
|
+
/** @description Webhook not found. */
|
|
2285
|
+
404: {
|
|
2286
|
+
headers: {
|
|
2287
|
+
[name: string]: unknown;
|
|
2288
|
+
};
|
|
2289
|
+
content: {
|
|
2290
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
2291
|
+
};
|
|
576
2292
|
};
|
|
577
2293
|
};
|
|
578
2294
|
};
|
|
@@ -588,11 +2304,32 @@ interface operations {
|
|
|
588
2304
|
};
|
|
589
2305
|
requestBody?: never;
|
|
590
2306
|
responses: {
|
|
2307
|
+
/** @description Sent. Read the outcome from `/deliveries`. */
|
|
591
2308
|
202: {
|
|
592
2309
|
headers: {
|
|
593
2310
|
[name: string]: unknown;
|
|
594
2311
|
};
|
|
595
|
-
content
|
|
2312
|
+
content: {
|
|
2313
|
+
"application/json": components["schemas"]["WebhookTestAcceptedDto"];
|
|
2314
|
+
};
|
|
2315
|
+
};
|
|
2316
|
+
/** @description Webhook not found. */
|
|
2317
|
+
404: {
|
|
2318
|
+
headers: {
|
|
2319
|
+
[name: string]: unknown;
|
|
2320
|
+
};
|
|
2321
|
+
content: {
|
|
2322
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
2323
|
+
};
|
|
2324
|
+
};
|
|
2325
|
+
/** @description The webhook is switched off. */
|
|
2326
|
+
422: {
|
|
2327
|
+
headers: {
|
|
2328
|
+
[name: string]: unknown;
|
|
2329
|
+
};
|
|
2330
|
+
content: {
|
|
2331
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
2332
|
+
};
|
|
596
2333
|
};
|
|
597
2334
|
};
|
|
598
2335
|
};
|