@pipelex/sdk 0.58.0 → 0.59.0

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.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,6FAA6F;AAC7F,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,oFAAoF;AACpF,kFAAkF;AAClF,mFAAmF;AACnF,wBAAwB;AACxB,cAAc,gBAAgB,CAAC;AAE/B,wEAAwE;AACxE,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACtF,sFAAsF;AACtF,yFAAyF;AACzF,2EAA2E;AAC3E,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAezF,oFAAoF;AACpF,6FAA6F;AAC7F,+FAA+F;AAC/F,kDAAkD;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,+FAA+F;AAC/F,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,+FAA+F;AAC/F,6FAA6F;AAC7F,iGAAiG;AACjG,8FAA8F;AAC9F,iEAAiE;AACjE,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEhG,iGAAiG;AACjG,kFAAkF;AAClF,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAQ/E,6FAA6F;AAC7F,6FAA6F;AAC7F,4CAA4C;AAC5C,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAcpE,+FAA+F;AAC/F,0EAA0E;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,uEAAuE;AACvE,wFAAwF;AACxF,0FAA0F;AAC1F,iFAAiF;AACjF,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,0BAA0B,EAC1B,2BAA2B,EAC3B,gCAAgC,EAChC,4BAA4B,GAC7B,MAAM,gBAAgB,CAAC;AAqExB,+EAA+E;AAC/E,4EAA4E;AAC5E,iFAAiF;AACjF,0EAA0E;AAC1E,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,2BAA2B,EAC3B,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAuI5B,wEAAwE;AACxE,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,WAAW,CAAC;AAwBnB,oFAAoF;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAS5C,+FAA+F;AAC/F,2FAA2F;AAC3F,iGAAiG;AACjG,kFAAkF;AAClF,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,yBAAyB,EACzB,2BAA2B,EAC3B,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,4BAA4B,EAC5B,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,EACf,kBAAkB,EAClB,gCAAgC,EAChC,yBAAyB,EACzB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,2BAA2B,EAC3B,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAcrB,mFAAmF;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,6FAA6F;AAC7F,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,o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e,EACf,uBAAuB,EACvB,2BAA2B,EAC3B,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAuI5B,wEAAwE;AACxE,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,WAAW,CAAC;AAwBnB,mGAAmG;AACnG,4FAA4F;AAC5F,wFAAwF;AACxF,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,uBAAuB,EACvB,mCAAmC,EACnC,wBAAwB,EACxB,2BAA2B,GAC5B,MAAM,eAAe,CAAC;AAqBvB,oFAAoF;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAS5C,+FAA+F;AAC/F,2FAA2F;AAC3F,iGAAiG;AACjG,kFAAkF;AAClF,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,yBAAyB,EACzB,2BAA2B,EAC3B,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,4BAA4B,EAC5B,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,EACf,kBAAkB,EAClB,gCAAgC,EAChC,yBAAyB,EACzB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,2BAA2B,EAC3B,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAcrB,mFAAmF;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
package/dist/models.d.ts CHANGED
@@ -71,6 +71,14 @@ export interface PipelexRunResultStart extends RunResultStart {
71
71
  * or `null` for any other run, and on a server that does not resolve version selectors.
72
72
  */
73
73
  method_version?: number | "draft" | null;
74
+ /**
75
+ * The webhook URLs the run registered in `callback_urls`, each redacted to its scheme, its host
76
+ * and a port other than the scheme's default, with `/***` in place of a path or query string,
77
+ * so a caller sees at once that its webhooks were taken. Absent for a run that registered none,
78
+ * since the platform leaves a member with no value out of the acknowledgement (the status read
79
+ * and the run record answer `null` instead), and on a server that does not echo them.
80
+ */
81
+ callback_urls?: string[] | null;
74
82
  }
75
83
  /**
76
84
  * The hosted tooling routes' own selector — the layer-3 extension the platform
@@ -1588,6 +1588,13 @@ export interface RunDetail extends PipelineRun {
1588
1588
  tree_digest?: string | null;
1589
1589
  /** The runner's fingerprint of the crate it loaded the tree into; `null` when it reported none. */
1590
1590
  crate_fingerprint?: string | null;
1591
+ /**
1592
+ * The webhook URLs the run registered in `callback_urls`, each redacted to its scheme, its host
1593
+ * and a port other than the scheme's default, with `/***` in place of a path or query string.
1594
+ * `null` for a run that registered none; absent on a server that does not serve it. Its
1595
+ * deliveries are read with `listRunWebhookDeliveries`.
1596
+ */
1597
+ callback_urls?: string[] | null;
1591
1598
  }
1592
1599
  /** Query for one page of run history. */
1593
1600
  export interface ListRunsQuery {
package/dist/runs.d.ts CHANGED
@@ -164,6 +164,13 @@ export interface RunRead extends RunPublic {
164
164
  * saved before the platform recorded it; absent on a server that does not serve it.
165
165
  */
166
166
  request_id?: string | null;
167
+ /**
168
+ * The webhook URLs the run registered in `callback_urls`, each redacted to its scheme, its host
169
+ * and a port other than the scheme's default, with `/***` in place of a path or query string.
170
+ * `null` for a run that registered none; absent on a server that does not serve it. A run's
171
+ * `run.finished` event carries this read without it.
172
+ */
173
+ callback_urls?: string[] | null;
167
174
  /** The `Retry-After` header's delay, in seconds; set when the platform sent one. */
168
175
  retry_after_seconds?: number | null;
169
176
  }
package/dist/runs.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"runs.js","sourceRoot":"","sources":["../src/runs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG3C,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,sBAAsB,EACtB,4BAA4B,EAC5B,eAAe,GAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC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AAC;IAC3C,OAAO,IAAI,YAAY,CAAC,2BAA2B,EAAE,YAAY,CAAC,CAAC;AACrE,CAAC;AAED,iFAAiF;AACjF,SAAS,KAAK,CAAC,EAAU,EAAE,MAAoB;IAC7C,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC;QACZ,cAAc,CAAC,MAAM,CAAC,CAAC;QACvB,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IACD,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3C,MAAM,OAAO,GAAG,GAAS,EAAE;YACzB,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;QAC7B,CAAC,CAAC;QACF,oFAAoF;QACpF,iEAAiE;QACjE,MAAM,KAAK,GAAG,UAAU,CACtB,GAAG,EAAE;YACH,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAC9C,OAAO,EAAE,CAAC;QACZ,CAAC,EACD,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,kBAAkB,CAAC,CACjC,CAAC;QACF,IAAI,MAAM,EAAE,CAAC;YACX,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;gBACnB,YAAY,CAAC,KAAK,CAAC,CAAC;gBACpB,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;gBAC3B,OAAO;YACT,CAAC;YACD,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
package/dist/version.d.ts CHANGED
@@ -3,4 +3,4 @@
3
3
  * `User-Agent` without importing the public barrel. Kept in sync with
4
4
  * `package.json` — enforced by `tests/index.test.ts`.
5
5
  */
6
- export declare const SDK_VERSION = "0.58.0";
6
+ export declare const SDK_VERSION = "0.59.0";
package/dist/version.js CHANGED
@@ -3,5 +3,5 @@
3
3
  * `User-Agent` without importing the public barrel. Kept in sync with
4
4
  * `package.json` — enforced by `tests/index.test.ts`.
5
5
  */
6
- export const SDK_VERSION = "0.58.0";
6
+ export const SDK_VERSION = "0.59.0";
7
7
  //# sourceMappingURL=version.js.map
@@ -0,0 +1,286 @@
1
+ /**
2
+ * Caller webhooks: the `run.finished` event a Pipelex runtime sends each URL a run registered in
3
+ * `callback_urls` once the run has ended, the receiver's verification of a call, and the shapes of
4
+ * the hosted delivery log and of an organization's signing secret.
5
+ *
6
+ * The contract is the spec `conformance/specs/pipelex-caller-webhooks.md`, in the `conformance`
7
+ * repository: a call is a Standard Webhooks v1 `POST`, its `webhook-id`, `webhook-timestamp` and
8
+ * `webhook-signature` headers signing `{webhook-id}.{webhook-timestamp}.{body}` with HMAC-SHA256
9
+ * under a `whsec_` secret, and its body a `run.finished` event. `verifyWebhook` follows the spec's
10
+ * verification procedure step by step and is held to its known-answer vectors, a byte-identical copy
11
+ * of which this package's tests run (`tests/fixtures/caller-webhooks/`).
12
+ *
13
+ * Browser-safe, as the whole barrel is: the signature is computed with Web Crypto
14
+ * (`globalThis.crypto.subtle`), which Node, Deno, Bun, edge runtimes and browsers carry, never with
15
+ * `node:crypto`. See `docs/webhooks.md`.
16
+ */
17
+ import { ProblemError } from "mthds/protocol";
18
+ import type { Problem } from "mthds/protocol";
19
+ import type { RunStatus } from "./runs.js";
20
+ /** The `type` of the event a run's end sends: one type for every ending, the outcome in `data.status`. */
21
+ export declare const RUN_FINISHED_EVENT_TYPE = "run.finished";
22
+ /**
23
+ * How far a call's `webhook-timestamp` may be from the receiver's clock, either way, in seconds:
24
+ * five minutes, as the contract sets it. A call further away is refused, which bounds how long a
25
+ * captured call can be replayed.
26
+ */
27
+ export declare const WEBHOOK_TIMESTAMP_TOLERANCE_SECONDS = 300;
28
+ /**
29
+ * The status a `run.finished` event's `data` reports. A self-hosted runner sends the MTHDS
30
+ * protocol's status read, `completed` or `failed`, a cancelled or timed-out run reading `failed`
31
+ * with a code that says why. The hosted plane sends its own status read until it moves onto the
32
+ * protocol's, so its event reads an ended `RunStatus` in uppercase, `COMPLETED`, `FAILED`,
33
+ * `CANCELLED`, `TERMINATED` or `TIMED_OUT`, and its spelling turns lowercase when it does. Read
34
+ * open: a status this SDK does not name arrives as its raw string. To tell a success from a
35
+ * failure under both spellings, compare `status.toLowerCase()` with `"completed"`.
36
+ */
37
+ export type RunFinishedStatus = "completed" | "failed" | Extract<RunStatus, "COMPLETED" | "FAILED" | "CANCELLED" | "TERMINATED" | "TIMED_OUT"> | (string & {});
38
+ /**
39
+ * A `run.finished` event's `data`: the run as its caller's status read served it when the delivery
40
+ * was created, the same on every attempt and replay of the delivery.
41
+ *
42
+ * Two shapes reach a receiver today, and this type accepts both. A self-hosted runner sends the
43
+ * MTHDS protocol's status read (`pipeline_run_id`, a lowercase `status`, and for a failed run its
44
+ * problem as `error`, a member with no value left out). The hosted plane sends the body of its own
45
+ * `GET /v1/runs/{id}/status` (this SDK's `RunRead`) without `callback_urls`: an uppercase `status`,
46
+ * a member with no value written as `null`, and the platform's own members, such as `finished_at`,
47
+ * `method_id` and `request_id`. That shape does not validate against the contract's JSON Schema,
48
+ * which describes the protocol's read; the hosted event follows its status read onto the
49
+ * protocol's shape when that read moves, with no change of its own.
50
+ */
51
+ export interface RunFinishedEventData {
52
+ /** The run that ended. */
53
+ pipeline_run_id: string;
54
+ /** How it ended; see `RunFinishedStatus` for the two spellings. */
55
+ status: RunFinishedStatus;
56
+ /**
57
+ * A failed run's problem, in its caller's view: never its `diagnostics`. Kept when it is a
58
+ * problem document (`isProblem`), and read as `null` otherwise; absent on a completed run of a
59
+ * self-hosted runner, `null` on one of the hosted plane.
60
+ */
61
+ error?: Problem | null;
62
+ /** Every other member the status read served, as it served it. */
63
+ [member: string]: unknown;
64
+ }
65
+ /**
66
+ * The body of the call a run's end makes to each URL it registered: a `run.finished` event. The
67
+ * event never carries the run's results; fetch them with `getRunResult` and the `pipeline_run_id`
68
+ * of `data`. A receiver deduplicates on the `webhook-id` header, never on the body or `attempt`.
69
+ */
70
+ export interface RunFinishedEvent {
71
+ type: typeof RUN_FINISHED_EVENT_TYPE;
72
+ /** When the run ended, its `finished_at`, as an RFC 3339 date-time in UTC. Not the call's send time. */
73
+ timestamp: string;
74
+ /**
75
+ * Which attempt of the delivery this call is, from 1. Informational: it increases with each retry
76
+ * and a replay continues it, but a runtime that runs its delivery step again may skip numbers or
77
+ * start again at 1 under the same `webhook-id`, so never rely on it being unique or gapless.
78
+ */
79
+ attempt: number;
80
+ /** The run as its caller's status read served it; see `RunFinishedEventData`. */
81
+ data: RunFinishedEventData;
82
+ /** A member a later contract adds, which a receiver ignores. */
83
+ [member: string]: unknown;
84
+ }
85
+ /**
86
+ * An event whose `type` this SDK does not read. A receiver acknowledges it with a `2xx` rather
87
+ * than failing it, so the sender does not retry an event the receiver has no use for.
88
+ */
89
+ export interface UnknownWebhookEvent {
90
+ type: string;
91
+ [member: string]: unknown;
92
+ }
93
+ /** What `verifyWebhook` returns: a `run.finished` event, or one of a type this SDK does not read. */
94
+ export type WebhookEvent = RunFinishedEvent | UnknownWebhookEvent;
95
+ /** Whether `event` is a `run.finished` event, narrowing it to `RunFinishedEvent`. */
96
+ export declare function isRunFinishedEvent(event: WebhookEvent): event is RunFinishedEvent;
97
+ /**
98
+ * The headers of a call, as a receiver's framework hands them over: a fetch `Headers` (a Next.js
99
+ * route handler, Hono, a worker) or a plain record (Node's `IncomingHttpHeaders`, Express). Names
100
+ * are matched whatever their case. A header given as several values is read as those values
101
+ * joined by spaces, which for `webhook-signature` lists every signature they carry.
102
+ */
103
+ export type WebhookHeaders = Headers | Readonly<Record<string, string | readonly string[] | undefined>>;
104
+ /** `verifyWebhook`'s options. */
105
+ export interface VerifyWebhookOptions {
106
+ /**
107
+ * The receiver's clock, which the call's `webhook-timestamp` must be within five minutes of;
108
+ * the current time when absent. Given for a test, or to verify a call received earlier.
109
+ */
110
+ now?: Date;
111
+ }
112
+ /**
113
+ * Why `verifyWebhook` refused a call, named as the contract's verification procedure names its
114
+ * steps, in the order it takes them:
115
+ *
116
+ * - `missing_header`: `webhook-id`, `webhook-timestamp` or `webhook-signature` is absent or empty;
117
+ * - `timestamp`: `webhook-timestamp` is not a whole number of Unix seconds, or is more than five
118
+ * minutes from the receiver's clock, either way;
119
+ * - `signature`: no `v1` signature in `webhook-signature` is the call's under any secret given.
120
+ */
121
+ export type WebhookRefusal = "missing_header" | "timestamp" | "signature";
122
+ /**
123
+ * A call `verifyWebhook` refused: it does not come from the runtime holding the secret, or not
124
+ * within the last five minutes, so its body must not be acted on. Answer it with a status outside
125
+ * `2xx`, such as `401`, which the sender counts as a failed attempt and retries.
126
+ *
127
+ * Branch on `refusal` (see `WebhookRefusal`). Its problem treats the signature as the call's
128
+ * credential: `auth.missing_credential` for a missing header, `auth.invalid_credential` for a
129
+ * timestamp or a signature refused. Nothing was requested, so it is no `PipelexRequestError`; it
130
+ * is a `ProblemError`, as every error this SDK raises is.
131
+ */
132
+ export declare class WebhookVerificationError extends ProblemError {
133
+ /** Which step of the verification refused the call. */
134
+ readonly refusal: WebhookRefusal;
135
+ constructor(message: string, refusal: WebhookRefusal);
136
+ }
137
+ /**
138
+ * A verified call whose body is not a webhook event this SDK can read: bytes that are not UTF-8,
139
+ * text that is not JSON, JSON that is not an object with a string `type`, or a `run.finished` event
140
+ * missing a member the contract gives it or carrying one of the wrong type. The call does come from
141
+ * the runtime holding the secret, so this is that runtime's fault, never the receiver's.
142
+ *
143
+ * Its problem is `request.malformed`, whose `reason` is `not_utf8` or `not_json`, for a body that
144
+ * does not parse, and `request.invalid`, whose `field` names the member as a dotted path (`type`,
145
+ * `attempt`, `data.status`), for one that parses but is no event.
146
+ */
147
+ export declare class WebhookEventUnreadableError extends ProblemError {
148
+ constructor(message: string, problem: Problem, options?: {
149
+ cause?: unknown;
150
+ });
151
+ }
152
+ /**
153
+ * Verify a call to a caller webhook and read its event.
154
+ *
155
+ * It follows the contract's procedure: it refuses a call missing one of the three headers, then
156
+ * one whose `webhook-timestamp` is more than five minutes from `options.now`, then one whose
157
+ * `webhook-signature` lists no `v1` signature matching its own, computed from the raw body under
158
+ * each secret given and compared in constant time. Only then does it parse the body.
159
+ *
160
+ * Give `body` exactly as received, the raw bytes or their text, never a value parsed and written
161
+ * again: the same JSON written with other bytes signs differently. In a framework that parses JSON
162
+ * bodies by itself, read the raw body instead (`await request.text()` in a fetch handler,
163
+ * `express.raw({ type: "application/json" })` in Express).
164
+ *
165
+ * `secret` is the `whsec_` secret the runtime signs with: the organization's, which its admins read
166
+ * with `getWebhookSecret`, or the one a self-hosted runner's operator configured. During a rotation
167
+ * give both, the call then verifying under either: the hosted plane signs every call with the new
168
+ * secret and the previous one for 24 hours.
169
+ *
170
+ * Returns the event: a `RunFinishedEvent` (`isRunFinishedEvent`), or an `UnknownWebhookEvent` for a
171
+ * `type` this SDK does not read, to acknowledge and ignore. Deduplicate on the `webhook-id` header,
172
+ * since a delivery can arrive more than once.
173
+ *
174
+ * Throws `WebhookVerificationError` for a call refused, whose `refusal` says why;
175
+ * `WebhookEventUnreadableError` for a verified call that holds no event this SDK reads; and
176
+ * `RequestArgumentError` for a `secret` that is not a `whsec_` secret written in standard base64
177
+ * with its padding, a `body` that is neither text nor bytes, or an `options.now` that is no valid
178
+ * `Date`, before the call is looked at.
179
+ */
180
+ export declare function verifyWebhook(body: string | Uint8Array | ArrayBuffer, headers: WebhookHeaders, secret: string | readonly string[], options?: VerifyWebhookOptions): Promise<WebhookEvent>;
181
+ /**
182
+ * Where a delivery stands: `pending` while on its retry schedule, `delivered` once a receiver
183
+ * answered `2xx`, `failed` past its last attempt, which a replay can still deliver. Read open: a
184
+ * state this SDK does not name arrives as its raw string.
185
+ */
186
+ export type WebhookDeliveryState = "pending" | "delivered" | "failed";
187
+ /**
188
+ * Why an attempt got no HTTP answer: `timeout` (none within fifteen seconds), `connection` (none
189
+ * could be made, or it was cut), `tls` (the handshake failed, the receiver's certificate
190
+ * included), `refused_address` (the host resolved to a private, loopback, link-local or metadata
191
+ * address, or to none). An attempt that got an answer records its `status_code` instead.
192
+ */
193
+ export type WebhookAttemptFailure = "timeout" | "connection" | "tls" | "refused_address";
194
+ /** One attempt of a delivery: when it was sent, what came back, how long it took. No response body is kept. */
195
+ export interface WebhookDeliveryAttempt {
196
+ /** The attempt's number, from 1: the body's `attempt`. */
197
+ attempt: number;
198
+ /** When it was sent, ISO-8601 UTC. */
199
+ attempted_at: string;
200
+ /** The HTTP status the receiver answered; `null` when no answer came. */
201
+ status_code: number | null;
202
+ /** Why no answer came; `null` when one did. */
203
+ failure: WebhookAttemptFailure | (string & {}) | null;
204
+ /** How long it took, in milliseconds. */
205
+ duration_ms: number | null;
206
+ }
207
+ /** One delivery of a run's webhook, as anyone who can read the run sees it. */
208
+ export interface WebhookDeliverySummary {
209
+ /** `whd_` and hexadecimal digits: the receiver's `webhook-id`, the same on every attempt and replay. */
210
+ delivery_id: string;
211
+ /** The run whose event the delivery carries. */
212
+ pipeline_run_id: string;
213
+ /** The URL's position in the run's `callback_urls`, from 0. */
214
+ url_index: number;
215
+ /**
216
+ * The URL redacted, as every view shows a registered URL: its scheme, its host and a port other
217
+ * than the scheme's default, with `/***` in place of a path or query string, which may hold the
218
+ * receiver's credential.
219
+ */
220
+ url: string;
221
+ state: WebhookDeliveryState | (string & {});
222
+ /** The event's `type`, `run.finished`. */
223
+ event_type: string;
224
+ /** When the delivery was recorded, ISO-8601 UTC. */
225
+ created_at: string;
226
+ /** Every attempt so far, oldest first, replays included. */
227
+ attempts: WebhookDeliveryAttempt[];
228
+ }
229
+ /** One delivery with its event as sent — `GET /v1/runs/{id}/webhook-deliveries/{delivery_id}`. */
230
+ export interface WebhookDeliveryDetail extends WebhookDeliverySummary {
231
+ /**
232
+ * The body of the delivery's latest attempt, as sent: `type`, `timestamp`, `attempt` and `data`,
233
+ * every attempt's body differing only in its `attempt`. Before any attempt, the body its first
234
+ * attempt carries.
235
+ */
236
+ event: WebhookEvent;
237
+ }
238
+ /** A run's deliveries — `GET /v1/runs/{id}/webhook-deliveries`. */
239
+ export interface WebhookDeliveryList {
240
+ pipeline_run_id: string;
241
+ /**
242
+ * One delivery per URL the run registered, in their order, once the run has ended; none for a
243
+ * run that registered none or has not ended.
244
+ */
245
+ deliveries: WebhookDeliverySummary[];
246
+ }
247
+ /** A replay queued — the `202` of `POST /v1/runs/{id}/webhook-deliveries/{delivery_id}/replay`. */
248
+ export interface WebhookReplayAccepted {
249
+ pipeline_run_id: string;
250
+ /** The delivery replayed: the `webhook-id` the replay is sent under. */
251
+ delivery_id: string;
252
+ /**
253
+ * The attempt number the replay is sent under. A replay asked again before this one is sent is
254
+ * this same attempt.
255
+ */
256
+ attempt: number;
257
+ }
258
+ /**
259
+ * An organization's webhook signing secret — `GET /v1/organizations/{org_id}/webhook-secret` and
260
+ * its rotation. Only the current secret's value is served: the previous one, still signing until
261
+ * `previous_secret_expires_at`, is the one a receiver already holds.
262
+ */
263
+ export interface WebhookSecret {
264
+ /** `whsec_` and the base64 of 32 random bytes: give the whole value to `verifyWebhook`. */
265
+ secret: string;
266
+ /** When the organization's first secret was generated, ISO-8601 UTC. */
267
+ created_at: string;
268
+ /** When it was last rotated; `null` when never. */
269
+ rotated_at: string | null;
270
+ /**
271
+ * Until when the secret the last rotation replaced still signs beside this one, ISO-8601 UTC;
272
+ * `null` once that has passed, or when nothing was replaced.
273
+ */
274
+ previous_secret_expires_at: string | null;
275
+ }
276
+ /** What a secret rotation sends beside its path: the request's own header. */
277
+ export interface WebhookSecretRotateOptions {
278
+ /**
279
+ * The rotation's idempotency key, sent as the `Idempotency-Key` header, and not sent at all when
280
+ * absent or `null`. The answer carries the new secret, so the platform never replays it: the same
281
+ * key sent again is refused `409` `request.already_executed`, rotating nothing more, and the
282
+ * caller reads the secret with `getWebhookSecret`. A key is 1 to 255 visible ASCII characters,
283
+ * anything else a `RequestArgumentError` before any request.
284
+ */
285
+ idempotencyKey?: string | null;
286
+ }