diff --git a/.changeset/phase6c-pagination.md b/.changeset/phase6c-pagination.md
new file mode 100644
index 0000000..984a996
--- /dev/null
+++ b/.changeset/phase6c-pagination.md
@@ -0,0 +1,6 @@
+---
+'@dexpace/core': minor
+---
+
+Add pagination support: `Paginator` (items and pages views), `Page` with `AsyncDisposable` support, built-in strategies (`cursorStrategy`, `pageNumberStrategy`, `linkHeaderStrategy`), and `paginateWithFetchers`. Note: TypeScript consumers utilizing Explicit Resource Management (`await using`) against `Page` should ensure `"ESNext.Disposable"` (or `esnext`) is included in their compiler `lib`.
+
diff --git a/docs/knowledge/pagination.md b/docs/knowledge/pagination.md
index d954388..4311f3c 100644
--- a/docs/knowledge/pagination.md
+++ b/docs/knowledge/pagination.md
@@ -81,7 +81,7 @@
design · `docs/sdk-design-nodejs/07-pagination-sse-and-serialization.md:7-10` · high · sha:d546f9973c4e
- Close-on-abandon for pagination relies on JavaScript's iterator protocol automatically calling `.return()` on an async iterator when a `for await...of` loop exits early via break, return, or exception, resuming execution at the enclosing `finally` block, unlike Kotlin's `Iterator`/`Sequence` protocol which has no built-in early-termination cleanup hook and requires a bespoke `CloseablePages` wrapper.
design · `docs/sdk-design-nodejs/07-pagination-sse-and-serialization.md:12-19` · high · sha:d546f9973c4e
-- The page-level view's two-outstanding-pages buffering requirement is implemented as a one-slot look-ahead buffer held in the generator's own closure, released via the same `finally` mechanism.
+- The page-level view holds the currently delivered page in the generator's `held` binding, releasing it upon advancing before dispatching the next request and releasing the last held page at exhaustion or early termination via the enclosing `finally` block.
design · `docs/sdk-design-nodejs/07-pagination-sse-and-serialization.md:32-34` · high · sha:d546f9973c4e
- The port rejects `URLSearchParams` for verbatim query-parameter splicing because it re-serializes the entire query string through its own canonical encoding on every mutation, reordering and re-encoding untouched parameters and encoding space as `+` rather than the RFC 3986 `%20` the port's query model otherwise standardizes on.
design · `docs/sdk-design-nodejs/07-pagination-sse-and-serialization.md:36-41` · high · sha:d546f9973c4e
diff --git a/docs/open-items.md b/docs/open-items.md
index 2ca2430..d553a22 100644
--- a/docs/open-items.md
+++ b/docs/open-items.md
@@ -1049,6 +1049,63 @@ value equality (`hashCode`); value equality is provided via `sseEventsEqual()` (
---
+## Section J — Phase 6c (Pagination)
+
+Recorded at implementation and review time. Everything here is either an intentional design clarification, a requirement clause satisfied with documented deviation/erratum, or an accepted runtime consideration.
+
+### J1 — `PAGE-11` close-before-yield precedence over §7.1 illustrative snippet — **RESOLVED WITH ERRATUM**
+
+`sdk-design-nodejs/07-pagination-sse-and-serialization.md` §7.1 shows an illustrative generator snippet with `try { yield* page.items } finally { await page.close() }`.
+`PAGE-11` (MUST) mandates closing *before* yielding any items on the page (`const items = page.items; await page.close(); yield* items;`). Materialized items survive close (`PAGE-2`), so closing before yielding releases the underlying response immediately and ensures an abandoned item iteration cannot strand an open response connection.
+An erratum callout was added to `07-pagination-sse-and-serialization.md` §7.1 and documented in the Deferred Items Log.
+
+**Trigger:** none.
+
+### J2 — `PAGE-5` / `PAGE-29` asynchronous `PaginationStrategy.parse` signature — **RESOLVED WITH SPEC CLARIFICATION**
+
+`PAGE-5` describes `parse` as reading what it needs "synchronously inside parse". In Node.js / Web Standards HTTP domain models, response bodies arrive as asynchronous streams (`ReadableStream`), making synchronous stream consumption impossible without prior full buffering.
+`PaginationStrategy.parse` returns `Promise>`, fulfilling all intended semantics of `PAGE-5` and `PAGE-29` (isolated, non-mutating parse) while maintaining compatibility with async body decoders.
+
+**Trigger:** none.
+
+### J3 — `Page` implements `AsyncDisposable` with `Symbol.asyncDispose` — **RESOLVED**
+
+`Page` implements `AsyncDisposable` unconditionally (`[Symbol.asyncDispose](): Promise`), delegating to `close()`. Consumers utilizing Explicit Resource Management (`await using`) against `Page` must include `"ESNext.Disposable"` in their compiler `lib`.
+
+**Trigger:** none.
+
+### J4 — WHATWG encode-set boundary & verbatim query splice (PAGE-21, PAGE-22) — **RESOLVED BY DESIGN**
+
+`URLSearchParams` re-serializes full query strings, reorders parameters, and encodes space as `+` rather than RFC 3986 `%20`. `query-splice.ts` implements hand-rolled tokenization operating directly on the raw query substring, preserving untargeted parameters byte-for-byte.
+
+**Trigger:** none.
+
+### J5 — Transport-direct pagination without internal resilience loop — **RESOLVED BY DESIGN**
+
+`Paginator` operates directly over `Transport` and `Request`. Resilience (retry, redirect, auth) is composed externally at the pipeline / `Runtime` layer (`PIPE-9`), keeping the pagination engine modular and transport-agnostic (§12).
+
+**Trigger:** none.
+
+### J6 — `items()` vs `pages()` single-use asymmetry (PAGE-8, PAGE-14) — **RESOLVED BY DESIGN**
+
+`Paginator.items()` allows multiple independent iterations because each iteration starts a fresh walk and closes each page before yielding. `Paginator.pages()` is single-use because yielded `Page` objects hold live connection ownership, where re-iteration would cause double-consumption of unclosed resources.
+
+**Trigger:** none.
+
+### J7 — Iterative generator drive without trampoline (PAGE-31) — **RESOLVED BY DESIGN**
+
+`PAGE-31` sanctions native loop models without recursion. `Paginator.#walk` and `driveFetchers` are implemented as `async function*` generator loops, guaranteeing constant stack space across thousands of pages without explicit trampoline structures.
+
+**Trigger:** none.
+
+### J8 — Error unwrapping and root cause propagation (PAGE-28) — **RESOLVED BY DESIGN**
+
+`PaginationError` is reserved strictly for engine misuse and precondition violations (`maxPages <= 0`, single-use iterator re-use). Transport, parse, and network failures propagate unwrapped with original causes preserved.
+
+**Trigger:** none.
+
+---
+
## Maintaining this file
Add an entry the moment a gap is found, not when it is fixed — the failure mode this file prevents is a
diff --git a/docs/sdk-design-nodejs/07-pagination-sse-and-serialization.md b/docs/sdk-design-nodejs/07-pagination-sse-and-serialization.md
index df0fb6a..7fd7b41 100644
--- a/docs/sdk-design-nodejs/07-pagination-sse-and-serialization.md
+++ b/docs/sdk-design-nodejs/07-pagination-sse-and-serialization.md
@@ -27,6 +27,10 @@ async function* items(): AsyncGenerator- {
}
```
+> [!NOTE]
+> **Erratum on close ordering (PAGE-11 vs illustrative snippet):** The snippet above illustrates JavaScript's automatic `.return()`-on-abandon via `finally`, but closes *after* yielding items. **PAGE-11** (MUST) mandates closing *before* yielding any items on the page (`const items = page.items; await page.close(); yield* items;`). Materialized items survive close (**PAGE-2**), so closing before yielding releases the underlying response immediately and ensures an abandoned item iteration cannot strand an open response.
+
+
and an early `break` out of the consumer's `for await` loop drives the `finally` — and therefore `page.close()` —
automatically, with no wrapper type and no documented "must remember to close" convention required from callers.
The page-level view's two-outstanding-pages buffering (**PAGE-12**: a `hasNext()` probe eagerly runs the next
diff --git a/docs/superpowers/plans/2026-07-28-phase6c-pagination-checklist.md b/docs/superpowers/plans/2026-07-28-phase6c-pagination-checklist.md
new file mode 100644
index 0000000..498efa8
--- /dev/null
+++ b/docs/superpowers/plans/2026-07-28-phase6c-pagination-checklist.md
@@ -0,0 +1,85 @@
+# Phase 6c — Pagination Implementation Plan — Checklist
+
+Verification of pagination requirements (`PAGE-1`–`PAGE-36`) from `docs/product-spec/16-pagination.md` and `docs/sdk-design-nodejs/07-pagination-sse-and-serialization.md`, as dispositioned by `docs/superpowers/specs/2026-07-23-nodejs-sdk-v1-roadmap-design.md`.
+
+**Status: EXECUTED (2026-08-27).** All tasks implemented, tested, and reviewed. Deviations and design ledger rows are recorded in `docs/open-items.md` §I.
+
+**Legend:** ✅ Implemented and tested — ✅(t) Satisfied by construction or type test — 🚫 Not built — ⏳ Deferred — N/A Not applicable.
+
+---
+
+## §16.1 — Core Data Model & Strategy Contract (`PAGE-1`–`PAGE-5`)
+
+| ID | Level | Requirement gist | Status | Where |
+|---|---|---|---|---|
+| PAGE-1 | MUST | Items and pages views over one walk, server order preserved across page boundaries | ✅ | `Page`, `Paginator` in `packages/core/src/pagination/page.ts`, `paginator.ts`, tested in `paginator.test.ts` |
+| PAGE-2 | MUST | Materialized items frozen, survive close; items never null | ✅ | `packages/core/src/pagination/page.ts`, tested in `page.test.ts` |
+| PAGE-3 | MUST | Exactly one owned response per page; idempotent close delegates to `Response.close()` | ✅ | `packages/core/src/pagination/page.ts`, `Page.close()`, `Page[Symbol.asyncDispose]()`, tested in `page.test.ts` |
+| PAGE-4 | MUST | `PageInfo` carries items + nextRequest; `undefined` signals end of stream | ✅ | `packages/core/src/pagination/page.ts` (`pageInfo`), tested in `page.test.ts` |
+| PAGE-5 | MUST | `PaginationStrategy.parse` contract returning `Promise>` | ✅ | `packages/core/src/pagination/strategy.ts`, tested in `strategy.test.ts` (ledger row I2) |
+
+---
+
+## §16.2 — Paginator Lifecycle & Consumption Views (`PAGE-6`–`PAGE-15`, `PAGE-27`, `PAGE-31`–`PAGE-33`, `PAGE-36`)
+
+| ID | Level | Requirement gist | Status | Where |
+|---|---|---|---|---|
+| PAGE-6 | MUST | Page-lazy: zero wire exchanges before first probe | ✅ | `Paginator.#walk`, tested in `paginator.test.ts` |
+| PAGE-7 | MUST | Forward-only walk, idempotent end probes | ✅ | `Paginator.#walk`, tested in `paginator.test.ts` |
+| PAGE-8 | MUST | Independent iterations over item-level view (`items()`) | ✅ | `Paginator.items()`, tested in `paginator.test.ts` |
+| PAGE-9 | MUST | `maxPages` cap: positive integer at construction, stops walk | ✅ | `Paginator`, `paginateWithFetchers`, tested in `paginator.test.ts`, `fetchers.test.ts` |
+| PAGE-10 | MUST | Capped walk delivers exactly capped count even when strategy supplies nextRequest | ✅ | `Paginator.#walk`, tested in `paginator.test.ts` |
+| PAGE-11 | MUST | Close response BEFORE yielding items on `items()` view | ✅ | `Paginator.items()`, tested in `lifecycle.test.ts` (ledger row I1) |
+| PAGE-12 | MUST | Auto-close on abandon / break / exhaustion, scoped construct (`await using`) support | ✅ | `Page[Symbol.asyncDispose]`, `Paginator.#walk`, tested in `page.test.ts`, `lifecycle.test.ts` |
+| PAGE-13 | MUST | Parse failure closes inline, close error suppressed | ✅ | `parseOrClose` in `paginator.ts`, tested in `lifecycle.test.ts` |
+| PAGE-14 | MUST | Page-level view (`pages()`) is single-use; subsequent iterator throws | ✅ | `Paginator.pages()`, `paginateWithFetchers`, tested in `lifecycle.test.ts`, `fetchers.test.ts` |
+| PAGE-15 | MUST | Close errors surface when walk or release fails | ✅ | `releaseHeldOnFailure`, `suppress()`, tested in `lifecycle.test.ts`, `fetchers.test.ts` |
+| PAGE-27 | MUST | Every response closed exactly once (no double-close, no leak) | ✅ | `lifecycle.test.ts` (`test.each`), `test/node-conformance/pagination.test.mjs` |
+| PAGE-28 | MUST | Underlying causes propagated unwrapped | ✅ | `lifecycle.test.ts`, `errors.test.ts` |
+| PAGE-29 | MUST | Async parse boundary (`Promise>`) | ✅(t) | `strategy.ts`, `strategy.test.ts` |
+| PAGE-30 | MUST | Synchronous item array within page | ✅(t) | `page.ts`, `strategy.test.ts` |
+| PAGE-31 | MUST | Stack safety across thousands of pages (iterative generator drive) | ✅ | `cancellation.test.ts` (5000 pages test) |
+| PAGE-32 | MUST | Consumer throw discards return-phase close error, keeping consumer error primary | ✅ | `Paginator.#walk` finally, tested in `lifecycle.test.ts` |
+| PAGE-33 | MUST | Race between abort and arrival drops and closes response | ✅ | `Paginator.#walk`, tested in `cancellation.test.ts` |
+| PAGE-36 | MUST | Per-operation RequestOptions passed to every page exchange | ✅ | `Paginator.#walk`, tested in `paginator.test.ts` |
+
+---
+
+## §16.3 — Built-in Strategies & Parsing (`PAGE-16`–`PAGE-20`)
+
+| ID | Level | Requirement gist | Status | Where |
+|---|---|---|---|---|
+| PAGE-16 | MUST | Built-in cursor strategy (single body read, null/empty/undefined ends) | ✅ | `packages/core/src/pagination/strategies.ts` (`cursorStrategy`), tested in `strategies.test.ts` |
+| PAGE-17 | MUST | Built-in page number strategy (empty items ends, start page fallback) | ✅ | `packages/core/src/pagination/strategies.ts` (`pageNumberStrategy`), tested in `strategies.test.ts` |
+| PAGE-18 | MUST | Built-in link header strategy (RFC 8288, case-insensitive `rel="next"`) | ✅ | `packages/core/src/pagination/strategies.ts`, `link-header.ts`, tested in `strategies.test.ts`, `link-header.test.ts` |
+| PAGE-19 | MUST | Unresolvable Link header URL throws | ✅ | `packages/core/src/pagination/strategies.ts`, tested in `strategies.test.ts` |
+| PAGE-20 | MUST | Multiple Link headers parsed and combined | ✅ | `packages/core/src/pagination/link-header.ts`, tested in `link-header.test.ts`, `strategies.test.ts` |
+
+---
+
+## §16.4 — Verbatim Query Splicing (`PAGE-21`–`PAGE-24`)
+
+| ID | Level | Requirement gist | Status | Where |
+|---|---|---|---|---|
+| PAGE-21 | MUST | Verbatim query splice without URLSearchParams; untargeted params preserved byte-for-byte | ✅ | `packages/core/src/pagination/query-splice.ts`, tested in `query-splice.test.ts`, `query-splice.property.test.ts` |
+| PAGE-22 | MUST | RFC 3986 percent-encoding in query components (`+` is data, not space) | ✅ | `packages/core/src/http/query-params.ts`, `query-splice.ts`, tested in `query-splice.test.ts` |
+| PAGE-23 | MUST | Replace-first, append, remove query parameter maintaining order | ✅ | `packages/core/src/pagination/query-splice.ts`, tested in `query-splice.test.ts`, `query-splice.property.test.ts` |
+| PAGE-24 | MUST | Non-query URL components preserved verbatim | ✅ | `packages/core/src/pagination/query-splice.ts`, tested in `query-splice.test.ts` |
+
+---
+
+## §16.5 — Cancellation Integration (`PAGE-25`–`PAGE-26`)
+
+| ID | Level | Requirement gist | Status | Where |
+|---|---|---|---|---|
+| PAGE-25 | MUST | AbortSignal threaded into every exchange | ✅ | `Paginator.#walk`, tested in `cancellation.test.ts`, `test/node-conformance/pagination.test.mjs` |
+| PAGE-26 | MUST | Page-granular cancellation (abort stops walk, in-flight response closed and dropped) | ✅ | `Paginator.#walk`, tested in `cancellation.test.ts`, `test/node-conformance/pagination.test.mjs` |
+
+---
+
+## §16.6 — Fetcher-Based Front-End (`PAGE-34`–`PAGE-35`)
+
+| ID | Level | Requirement gist | Status | Where |
+|---|---|---|---|---|
+| PAGE-34 | MUST | Fetcher pagination (`first` once, `next` keys off link/token, returns `Page`) | ✅ | `packages/core/src/pagination/fetchers.ts` (`paginateWithFetchers`), tested in `fetchers.test.ts` |
+| PAGE-35 | MUST | Mutable shared options bag threaded across fetcher calls | ✅ | `packages/core/src/pagination/fetchers.ts` (`PagingOptions`), tested in `fetchers.test.ts` |
diff --git a/docs/superpowers/specs/2026-07-23-nodejs-sdk-v1-roadmap-design.md b/docs/superpowers/specs/2026-07-23-nodejs-sdk-v1-roadmap-design.md
index 815ed76..60e2f4f 100644
--- a/docs/superpowers/specs/2026-07-23-nodejs-sdk-v1-roadmap-design.md
+++ b/docs/superpowers/specs/2026-07-23-nodejs-sdk-v1-roadmap-design.md
@@ -152,8 +152,8 @@ permanent simplification, not a postponement.
| Phase 6 split into 6a (Serde, `§14`) / 6b (SSE, `§13`) / 6c (Pagination, `§12`) | Phase 6 brainstorm (2026-07-28) | — | 107 combined normative IDs (`PAGE` 36, `SSE` 41, `SERDE` 30), between the ~76–79 that forced the Phase 3 and Phase 4 splits and Phase 5's 111. Cut along the spec's own section boundaries because **the spec forbids the couplings that would cross them**: `SSE-37` (MUST) bars any serde dependency from core SSE, and `§12`'s preamble declares pagination serde-agnostic — so the cross-segment contract surface is empty by mandate, which is exactly the property whose absence caused the 5b/5c drift below. **No segment depends on another; the 6a→6b→6c order is convenience, not dependency**, and any sub-phase may execute out of order. 6a leads only because it scaffolds the workspace's second package and is the one segment that reshapes an already-published seam (`SEAM-21`); 6c trails because it is the most coupled to *earlier* phases (4c's `Runtime`, 5a's `StepContext.options`, 3b's `Response` body). Full rationale, per-segment ownership, and the collapsed-ID clusters in the [Phase 6 segmentation design](./2026-07-28-phase6-segmentation-design.md) |
| Collapsed-requirement disposition tables for Phase 6 — `PAGE-25`–`PAGE-33` (§12.9's async engine: this port has one async model, so the async generator *is* the engine), `SSE-18`/`SSE-31` (threading re-expressed against the event loop), `SERDE-8`/`SERDE-21`/`SERDE-22`/`SERDE-25`/`SERDE-26` (codec-engine configuration with no configurable engine to configure) | Phase 6 brainstorm | Each owning sub-phase's design (6c, **Resolved for 6b in Phase 6b design**, 6a) | Same service 5a's `RECOV-17`–`RECOV-34` table performs: without a row-by-row disposition, a naive appendix-B sweep reads ~18 collapsed requirements as uncovered. The segmentation design identifies the clusters and what does **not** collapse inside each — notably `PAGE-26`/`PAGE-27`/`PAGE-32`'s close-exactly-once obligations (re-expressed as `finally`-block obligations on the single generator), `SSE-18` re-expressed against the event loop, and `SSE-31`'s close-during-in-flight-read branch (re-expressed and tested, **not** collapsed), both documented in the [Phase 6b design](./2026-07-28-phase6b-sse-design.md). **Note (Phase 9 design, 2026-07-28):** Phase 9's actual design scopes to `§19`/`§20` (`XCUT`/`NFR`) only — it does not re-verify `PAGE`/`SSE`/`SERDE` disposition, which stays each owning sub-phase's own responsibility as this row already states (6c, 6b, 6a respectively) |
| 3a's `readUtf8Line()` is unusable for SSE (`IO-14` keeps a lone `\r` as content, `SSE-2` requires it to terminate) | Phase 6b | **Resolved in Phase 6b** — closed 2026-08-27 | 6b owns `src/sse/line-reader.ts` instead of reshaping a frozen Phase 3a surface. Recorded so Phase 10's deviation review does not read the duplication as accidental |
-| `sdk-design-nodejs/07` §7.1's item-view snippet closes the page *after* yielding its items; `PAGE-11` (MUST) requires closing *before* | Phase 6 brainstorm | **Phase 6c** (erratum against `sdk-design-nodejs/07` **and** `docs/knowledge/pagination.md`) | The 2026-07-28 plans review found the erratum was being written into `sdk-design-nodejs/07` only, while `docs/knowledge/pagination.md` carries the *same* wrong ordering in its Reference section directly beside the correct MUST in its Rules section. The knowledge corpus is the standing tie-breaker every later phase consults, so an erratum that skips it leaves the contradiction live; 6c's plan now amends both. Recorded because **the conformance test is weaker than the requirement**: the snippet's `finally` still passes `PAGE-11`'s stated check (an early `break` drives `.return()`, hence the close), so following the design doc ships a violation the appendix-B checklist would not catch. Resolution per the standing tie-breaker (normative spec + knowledge corpus win over an illustrative snippet): `PAGE-11` governs — copy items, close, *then* yield. Costs nothing, since materialized items survive close per `PAGE-2`. The snippet remains correct about the thing §7.1 is actually arguing (JavaScript's automatic `.return()`-on-abandon), just not about close ordering |
-| `PAGE-5`'s "strategy MUST read everything it needs from the response **synchronously** inside parse" | Phase 6 brainstorm | **Phase 6c** (design must state the re-expression) | Node has no synchronous body read, so the literal reading is unimplementable and `parse` returns a promise. Every part of the requirement's actual intent survives: single-use-body discipline, no retention of the response or its body past the call, no close, no mutation. Flagged so an async signature does not later read as an oversight or get "fixed" back toward a literal reading |
+| `sdk-design-nodejs/07` §7.1's item-view snippet closes the page *after* yielding its items; `PAGE-11` (MUST) requires closing *before* | Phase 6 brainstorm | **Resolved in Phase 6c** — closed 2026-08-27 | The 2026-07-28 plans review found the erratum was being written into `sdk-design-nodejs/07` only, while `docs/knowledge/pagination.md` carries the *same* wrong ordering in its Reference section directly beside the correct MUST in its Rules section. The knowledge corpus is the standing tie-breaker every later phase consults, so an erratum that skips it leaves the contradiction live; 6c amends both. Resolution per the standing tie-breaker (normative spec + knowledge corpus win over an illustrative snippet): `PAGE-11` governs — copy items, close, *then* yield. Costs nothing, since materialized items survive close per `PAGE-2`. The snippet remains correct about the thing §7.1 is actually arguing (JavaScript's automatic `.return()`-on-abandon), just not about close ordering. **Closed in Phase 6c.** |
+| `PAGE-5`'s "strategy MUST read everything it needs from the response **synchronously** inside parse" | Phase 6 brainstorm | **Resolved in Phase 6c** — closed 2026-08-27 | Node has no synchronous body read, so the literal reading is unimplementable and `parse` returns a promise. Every part of the requirement's actual intent survives: single-use-body discipline, no retention of the response or its body past the call, no close, no mutation. Flagged so an async signature does not later read as an oversight or get "fixed" back toward a literal reading. **Closed in Phase 6c.** |
| `SSE-41` — reactive SSE adapter (backpressure-honoring `Observable` view, fatal/non-fatal split, source-ownership documentation) | Phase 6 brainstorm | **Phase 8b** (`@dexpace/rx`) | `MAY`. 6b ships the pull-based `AsyncGenerator` surface `SSE-39` mandates; the reactive view is a bridge package, and the roadmap scopes `§18`'s async-runtime adapters to 8b specifically (not 8a's transports) as of the 2026-07-28 [Phase 8 segmentation design](./2026-07-28-phase8-segmentation-design.md). `sdk-design-nodejs/02` identifies RxJS's push-based `Observable` as the one async shape in the Node ecosystem worth bridging at all. Is `ASYNC-21` restated — the segmentation design's §5.2 names it 8b's marquee deliverable |
| Appendix C `RECOV-17`–`RECOV-34` reconciliation (18 rows filed under "Recovery-chain pipeline primitives" that `§8.2`'s prose never defines — it stops at `RECOV-16`) | Phase 4 sizing review | **Resolved in Phase 5a** | They are retry-engine requirements stated a second time for the reference's second retry stack. Since this port collapses both stacks into one engine (`RETRY-28`, `sdk-design/06`), 16 of the 18 collapse onto the same implementation as their `§9` twin (e.g. `RECOV-21` restates `RETRY-9`/`10`/`11`'s backoff formula verbatim); `RECOV-34`'s settings-object validation is partially new; `RECOV-32` and `RECOV-33` have **no** `§9` twin and are genuinely new work. The full row-by-row mapping table lives in the [Phase 5a design](./2026-07-26-phase5a-retry-design.md) — a naive appendix-B sweep should read it rather than re-deriving it, or it will read 18 requirements as uncovered. **Note (Phase 9 design, 2026-07-28):** `RECOV-*` is outside Phase 9's actual `XCUT`/`NFR`-scoped design; its disposition stays 5a's own responsibility per the table this row already points to |
| Real W3C Trace Context generation (trace-id/span-id byte generation, hex encoding, `traceparent`/`tracestate` parsing) — `InstrumentationBundle`'s actual tracing backend | Phase 4a | **Resolved in Phase 7b (design)** | 4a ships only `CTX-14`'s bundle shape and `CTX-15`'s no-op default. 7b's design generates real W3C/Datadog/no-op trace and span ids via `globalThis.crypto.getRandomValues` and lets a caller-supplied `tracerFactory` flow into `InstrumentationBundle` at pipeline-build time, without changing its already-frozen shape. Lands when 7b's plan executes |
diff --git a/packages/core/etc/core.api.md b/packages/core/etc/core.api.md
index 73cc9cc..123a988 100644
--- a/packages/core/etc/core.api.md
+++ b/packages/core/etc/core.api.md
@@ -1,976 +1,1069 @@
-## API Report File for "@dexpace/core"
-
-> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
-
-```ts
-
-// @public
-export function absent(): Tristate;
-
-// @public
-export class ApiKeyCredential {
- [INSPECT](): string;
- constructor(key: string);
- toString(): string;
-}
-
-// @public
-export interface ApiKeyCredentialConfig {
- readonly credential: ApiKeyCredential | NameKeyCredential;
- readonly headerName?: string | undefined;
- readonly prefix?: string | undefined;
-}
-
-// @public
-export interface AuthCredentialSet {
- readonly apiKey?: ApiKeyCredentialConfig | undefined;
- readonly basic?: BasicCredential | undefined;
- readonly bearer?: BearerCredential | undefined;
- readonly digest?: DigestCredential | undefined;
-}
-
-// @public
-export interface AuthDescriptor {
- readonly allowsAnonymous: boolean;
- readonly requirements: readonly AuthRequirement[];
-}
-
-// @public
-export interface AuthRequirement {
- readonly params: ReadonlyMap;
- readonly scheme: AuthScheme;
- readonly scopes: readonly string[];
-}
-
-// @public
-export function authRequirementsEqual(a: AuthRequirement, b: AuthRequirement): boolean;
-
-// @public
-export class AuthResolutionError extends DexpaceError {
- constructor(message: string, requiredSchemes?: readonly string[], availableSchemes?: readonly string[]);
- readonly availableSchemes: readonly string[] | undefined;
- readonly requiredSchemes: readonly string[] | undefined;
- static unsatisfiable(requiredSchemes: readonly string[], availableSchemes: readonly string[]): AuthResolutionError;
-}
-
-// @public
-export type AuthScheme = 'OAUTH2' | 'API_KEY' | 'BASIC' | 'DIGEST' | 'NO_AUTH';
-
-// @public
-export function authStep(settings: AuthStepSettings): StepDescriptor;
-
-// @public
-export interface AuthStepSettings {
- readonly bearerMarginMs?: number | undefined;
- readonly challengeHook?: ChallengeHook | undefined;
- readonly clock?: Pick | undefined;
- readonly credentials: AuthCredentialSet;
- readonly tiers: AuthTiers;
-}
-
-// @public
-export interface AuthTiers {
- readonly client?: AuthDescriptor | undefined;
- readonly operation?: AuthDescriptor | undefined;
- readonly perCall?: AuthDescriptor | undefined;
-}
-
-// @public
-export interface BackoffSettings {
- readonly fixedDelayMs?: number | undefined;
- readonly initialDelayMs: number;
- readonly jitter: number;
- readonly maxDelayMs: number;
- readonly multiplier: number;
-}
-
-// @public
-export interface BasicCredential {
- readonly password: string;
- readonly username: string;
-}
-
-// @public
-export interface BearerCredential {
- readonly marginMs?: number | undefined;
- readonly provider: TokenProvider;
-}
-
-// @public
-export class BearerToken {
- [INSPECT](): string;
- readonly expiresAt: number | undefined;
- get token(): string;
- toString(): string;
-}
-
-// @public
-export function bearerTokensEqual(a: BearerToken, b: BearerToken): boolean;
-
-// @public
-interface Body_2 {
- readonly contentLength: number;
- readonly kind: 'byte-array' | 'string' | 'stream' | 'form-urlencoded' | 'multipart';
- readonly mediaType: string | undefined;
- readonly replayable: boolean;
- writeTo(sink: WritableStream): Promise;
-}
-export { Body_2 as Body }
-
-// @public
-export interface Builder {
- build(): T;
-}
-
-// @public
-export function buildRequest(baseUrl: string | URL, operation: OperationDescriptor): Request_2;
-
-// @public
-export class ByteArrayBody implements Body_2 {
- constructor(bytes: Uint8Array, mediaType?: string);
- readonly contentLength: number;
- readonly kind: "byte-array";
- readonly mediaType: string | undefined;
- readonly replayable = true;
- writeTo(sink: WritableStream): Promise;
-}
-
-// @public
-export function byteArrayBody(bytes: Uint8Array, mediaType?: string): ByteArrayBody;
-
-// @public
-export class CancellationError extends DexpaceError {
- constructor(message: string, options?: ErrorOptions);
-}
-
-// @public
-export type ChallengeHook = (response: Response_2, request: Request_2, options?: {
- readonly signal?: AbortSignal | undefined;
-}) => Promise;
-
-// @public
-export interface Clock {
- monotonic(): number;
- now(): number;
- sleep(ms: number, signal?: AbortSignal): Promise;
-}
-
-// @public
-export function composeSignal(userSignal?: AbortSignal, timeoutMs?: number): AbortSignal | undefined;
-
-// @public
-export class ConsumedBodyError extends DexpaceError {
- constructor(bodyKind: string, options?: ErrorOptions);
- readonly bodyKind: string;
-}
-
-// @public
-export function createAuthDescriptor(requirements: readonly AuthRequirement[]): AuthDescriptor;
-
-// @public
-export function createAuthRequirement(scheme: AuthScheme, scopes?: readonly string[], params?: ReadonlyMap): AuthRequirement;
-
-// @public
-export function createBearerToken(token: string, expiresAt?: number): BearerToken;
-
-// @public
-export function decodeResponse(response: Response_2, deserializer: Deserializer, target: DecodeTarget): Promise;
-
-// @public
-export function decodeSuccessResponse(response: Response_2, deserializer: Deserializer, target: DecodeTarget): Promise;
-
-// @public
-export interface DecodeTarget {
- readonly schema: Schema;
- readonly typeName?: string | undefined;
-}
-
-// @public
-export class DeserializationError extends DexpaceError {
- constructor(message: string, options?: DeserializationErrorOptions);
- readonly etag: string | null;
- readonly location: string | null;
- readonly status: number | undefined;
-}
-
-// @public
-export interface DeserializationErrorOptions extends SerdeErrorOptions {
- readonly etag?: string | null | undefined;
- readonly location?: string | null | undefined;
- readonly status?: number | undefined;
-}
-
-// @public
-export interface Deserializer {
- deserialize(data: Uint8Array, schema: Schema, typeName?: string): T;
- deserializeFrom(source: ReadableStream, schema: Schema, typeName?: string): Promise;
-}
-
-// @public
-export class DexpaceError extends Error {
- constructor(message: string, options?: ErrorOptions);
-}
-
-// @public
-export type DigestAlgorithm = 'MD5' | 'MD5-sess' | 'SHA-256' | 'SHA-256-sess';
-
-// @public
-export interface DigestCredential {
- readonly algorithmPreference?: readonly DigestAlgorithm[] | undefined;
- readonly password: string;
- readonly username: string;
-}
-
-// @public
-export interface DispatchContext {
- readonly instrumentation: InstrumentationBundle;
- readonly key: symbol;
- readonly kind: 'dispatch';
-}
-
-// @public
-export class DomainModelError extends DexpaceError {
-}
-
-// @public
-export class ETag {
- static readonly ANY: ETag;
- get isAny(): boolean;
- get isWeak(): boolean;
- get opaque(): string | undefined;
- static parse(raw: string): ETag | undefined;
- get raw(): string;
-}
-
-// @public
-export class EtagParseError extends DomainModelError {
-}
-
-// @public
-export interface ExchangeContext {
- readonly instrumentation: InstrumentationBundle;
- readonly key: symbol;
- readonly kind: 'exchange';
- readonly operationName: string | undefined;
- readonly request: Request_2;
- readonly response: Response_2;
-}
-
-// @public
-export type ExecutionContext = DispatchContext | RequestContext | ExchangeContext;
-
-// @public
-export function foldTristate(tristate: Tristate, branches: TristateBranches): R;
-
-// @public
-export class FormBodyValidationError extends DexpaceError {
- constructor(field: string, value: unknown, options?: ErrorOptions);
- readonly field: string;
-}
-
-// @public
-export class FormUrlEncodedBody implements Body_2 {
- constructor(input: FormUrlEncodedInput);
- readonly contentLength: number;
- readonly kind: "form-urlencoded";
- readonly mediaType = "application/x-www-form-urlencoded";
- readonly params: QueryParams;
- readonly replayable = true;
- writeTo(sink: WritableStream): Promise;
-}
-
-// @public
-export function formUrlEncodedBody(input: FormUrlEncodedInput): FormUrlEncodedBody;
-
-// @public
-export type FormUrlEncodedInput = QueryParams | ReadonlyMap | Record | readonly (readonly [string, FormUrlEncodedValue])[];
-
-// @public
-export type FormUrlEncodedValue = string | number | boolean | bigint | null;
-
-// @public
-export class HeaderName {
- equals(other: HeaderName): boolean;
- get lowerCased(): string;
- static of(raw: string): HeaderName;
- get raw(): string;
-}
-
-// @public
-class Headers_2 {
- entries(): readonly (readonly [string, string])[];
- equals(other: Headers_2): boolean;
- get(name: string | HeaderName): string | undefined;
- getAll(name: string | HeaderName): readonly string[];
- has(name: string | HeaderName): boolean;
- names(): readonly string[];
- static newBuilder(): HeadersBuilder;
- newBuilder(): HeadersBuilder;
-}
-export { Headers_2 as Headers }
-
-// @public
-export class HeadersBuilder implements Builder {
- add(name: string | HeaderName, value: string): this;
- addInbound(name: string | HeaderName, value: string): this;
- build(): Headers_2;
- set(name: string | HeaderName, value: string | null): this;
- setInbound(name: string | HeaderName, value: string | null): this;
-}
-
-// @public
-export class HeaderValidationError extends DomainModelError {
- constructor(kind: 'name' | 'value', offendingName: string, _offendingValue: string | undefined);
- readonly escapedName: string;
- readonly kind: 'name' | 'value';
-}
-
-// @public
-export class HttpRange {
- static bounded(start: number, length: number): HttpRange;
- get kind(): RangeKind;
- get length(): number | undefined;
- static open(start: number): HttpRange;
- static parse(raw: string): HttpRange;
- get raw(): string;
- get start(): number | undefined;
- static suffix(suffixLength: number): HttpRange;
- get suffixLength(): number | undefined;
-}
-
-// @public
-export class HttpRangeValidationError extends DomainModelError {
-}
-
-// @public
-export class HttpStatusError extends DexpaceError {
- constructor(status: number, bodyBytes: Uint8Array | undefined, mediaType: string | undefined, options?: ErrorOptions);
- body(): Body_2 | undefined;
- preview(charset?: string): string | null;
- readonly status: number;
-}
-
-// @public
-export interface InstrumentationBundle {
- readonly activeSpan: unknown;
- readonly isRemote: boolean;
- readonly isValid: boolean;
- readonly spanId: string;
- readonly traceFlags: number;
- readonly traceId: string;
- readonly traceIdEncoding: string;
- readonly tracerFactory: (operationName: string) => unknown;
- readonly traceState: string;
-}
-
-// @public
-export function isAbsent(tristate: Tristate): tristate is {
- readonly [TRISTATE_BRAND]: true;
- readonly kind: 'absent';
-};
-
-// @public
-export function isBodyError(error: unknown): error is ConsumedBodyError | MultipartBoundaryError | FormBodyValidationError;
-
-// @public
-export function isNull(tristate: Tristate): tristate is {
- readonly [TRISTATE_BRAND]: true;
- readonly kind: 'null';
-};
-
-// @public
-export function isPresent(tristate: Tristate): tristate is {
- readonly [TRISTATE_BRAND]: true;
- readonly kind: 'present';
- readonly value: T;
-};
-
-// @public
-export function isSerdeError(e: unknown): e is SerializationError | DeserializationError;
-
-// @public
-export function isSseEventEmpty(event: SseEvent): boolean;
-
-// @public
-export function isTimeoutSignal(signal: AbortSignal): boolean;
-
-// @public
-export function isTristate(value: unknown): value is Tristate;
-
-// @public
-export function makeSseEvent(fields: SseEventFields): SseEvent;
-
-// @public
-export const MAPPER_DONE: MapperOutcome;
-
-// @public
-export const MAPPER_SKIP: MapperOutcome;
-
-// @public
-export type MapperOutcome = {
- readonly kind: 'value';
- readonly value: T;
-} | {
- readonly kind: 'skip';
-} | {
- readonly kind: 'done';
-};
-
-// @public
-export function mapperValue(value: T): MapperOutcome;
-
-// @public
-export function materialize(body: Body_2): Promise;
-
-// @public
-export class MediaType {
- get charset(): string | undefined;
- equals(other: MediaType): boolean;
- matches(pattern: MediaType): boolean;
- static of(type: string, subtype: string, parameters?: ReadonlyMap): MediaType;
- parameter(key: string): string | undefined;
- static parse(raw: string): MediaType;
- render(): string;
- get subtype(): string;
- get type(): string;
-}
-
-// @public
-export class MediaTypeParseError extends DomainModelError {
-}
-
-// @public
-export type Method = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
-
-// @public
-export class MultipartBody implements Body_2 {
- constructor(parts: readonly MultipartPart[], boundary?: string);
- readonly contentLength: number;
- readonly kind: "multipart";
- readonly mediaType: string;
- static newBuilder(): MultipartBodyBuilder;
- newBuilder(): MultipartBodyBuilder;
- readonly replayable: boolean;
- writeTo(sink: WritableStream): Promise;
-}
-
-// @public
-export function multipartBody(parts: readonly MultipartPart[], boundary?: string): MultipartBody;
-
-// @public
-export class MultipartBodyBuilder implements Builder {
- addPart(part: MultipartPart): this;
- boundary(boundary: string | undefined): this;
- build(): MultipartBody;
- parts(parts: readonly MultipartPart[]): this;
-}
-
-// @public
-export class MultipartBoundaryError extends DexpaceError {
- constructor(boundary: string, options?: ErrorOptions);
- readonly boundary: string;
-}
-
-// @public
-export interface MultipartPart {
- readonly body: Body_2;
- readonly filename?: string | undefined;
- readonly name: string;
-}
-
-// @public
-export class NameKeyCredential {
- [INSPECT](): string;
- constructor(name: string, key: string);
- readonly name: string;
- toString(): string;
-}
-
-// @public
-export type Next = (request?: Request_2) => Promise;
-
-// @public
-export function nullValue(): Tristate;
-
-// @public
-export function ofNullable(value: T | null | undefined): Tristate;
-
-// @public
-export class OperationAssemblyError extends DexpaceError {
- constructor(message: string, parameterName: string);
- readonly parameterName: string;
-}
-
-// @public
-export interface OperationDescriptor {
- readonly body?: Body_2 | undefined;
- readonly headers?: Headers_2 | undefined;
- readonly method: Method;
- readonly pathParams?: Readonly> | undefined;
- readonly pathTemplate: string;
- readonly query?: QueryParams | undefined;
-}
-
-// @public
-export const PILLAR_STAGES: ReadonlySet;
-
-// @public
-export class PipelineBuilder {
- constructor(transport: Transport);
- append(descriptor: StepDescriptor): this;
- appendAll(descriptors: readonly StepDescriptor[]): this;
- build(): Runtime;
- insertAfter(anchorType: symbol, descriptor: StepDescriptor): this;
- insertBefore(anchorType: symbol, descriptor: StepDescriptor): this;
- prepend(descriptor: StepDescriptor): this;
- prependAll(descriptors: readonly StepDescriptor[]): this;
- reload(descriptors: readonly StepDescriptor[]): this;
- remove(type: symbol): this;
- replace(anchorType: symbol, descriptor: StepDescriptor): this;
- static seedFrom(runtime: Runtime, mode: 'flatten' | 'nest'): PipelineBuilder;
-}
-
-// @public
-export class PlaintextCredentialError extends DexpaceError {
- constructor(stepName: string, scheme: string);
- readonly scheme: string;
- readonly stepName: string;
-}
-
-// @public
-export function present(value: NonNullable): Tristate;
-
-// @public
-export class Protocol {
- equals(other: Protocol): boolean;
- static readonly HTTP_1_1: Protocol;
- static readonly HTTP_2: Protocol;
- static parse(raw: string): Protocol;
- get token(): string;
-}
-
-// @public
-export class ProtocolParseError extends DomainModelError {
-}
-
-// @public
-export class QueryParams {
- encode(): string;
- equals(other: QueryParams): boolean;
- get(name: string): string | undefined;
- getAll(name: string): readonly string[];
- has(name: string): boolean;
- static newBuilder(): QueryParamsBuilder;
- newBuilder(): QueryParamsBuilder;
- static parse(raw: string | null | undefined): QueryParams;
-}
-
-// @public
-export class QueryParamsBuilder implements Builder {
- add(name: string, value: string | null): this;
- build(): QueryParams;
-}
-
-// @public
-export type RangeKind = 'bounded' | 'suffix' | 'open';
-
-// @public
-export interface RedirectCondition {
- readonly redirectsFollowed: number;
- readonly response: Response_2;
- readonly visited: ReadonlySet;
-}
-
-// @public
-export type RedirectPredicate = (condition: Readonly) => boolean;
-
-// @public
-export interface RedirectSettings {
- readonly allow303: boolean;
- readonly allowedMethods: ReadonlySet;
- readonly allowSchemeDowngrade: boolean;
- readonly locationHeader: string;
- readonly maxHops: number;
- readonly predicate?: RedirectPredicate | undefined;
-}
-
-// @public
-export function redirectStep(overrides?: Partial): StepDescriptor;
-
-// @public
-class Request_2 {
- get body(): Body_2 | undefined;
- equals(other: Request_2): boolean;
- get headers(): Headers_2;
- get method(): Method;
- static newBuilder(): RequestBuilder;
- newBuilder(): RequestBuilder;
- get url(): URL;
-}
-export { Request_2 as Request }
-
-// @public
-export class RequestBodyNotAllowedError extends DomainModelError {
- constructor(method: string);
-}
-
-// @public
-export class RequestBuilder implements Builder {
- body(body: Body_2 | undefined): this;
- build(): Request_2;
- headers(headers: Headers_2): this;
- method(method: Method): this;
- url(url: string | URL): this;
-}
-
-// @public
-export class RequestConditions {
- applyTo(headers: Headers_2): Headers_2;
- static newBuilder(): RequestConditionsBuilder;
- newBuilder(): RequestConditionsBuilder;
-}
-
-// @public
-export class RequestConditionsBuilder implements Builder {
- build(): RequestConditions;
- ifMatch(etag: ETag): this;
- ifModifiedSince(date: Date): this;
- ifNoneMatch(etag: ETag): this;
- ifUnmodifiedSince(date: Date): this;
-}
-
-// @public
-export class RequestConditionsValidationError extends DomainModelError {
-}
-
-// @public
-export interface RequestContext {
- readonly instrumentation: InstrumentationBundle;
- readonly key: symbol;
- readonly kind: 'request';
- readonly operationName: string | undefined;
- readonly request: Request_2;
-}
-
-// @public
-export class RequestOptions {
- get auth(): AuthDescriptor | undefined;
- static readonly EMPTY: RequestOptions;
- get maxRetries(): number | undefined;
- static newBuilder(): RequestOptionsBuilder;
- newBuilder(): RequestOptionsBuilder;
- tag(key: string): string | undefined;
- get timeoutMs(): number | undefined;
-}
-
-// @public
-export class RequestOptionsBuilder implements Builder {
- auth(descriptor: AuthDescriptor | undefined): this;
- build(): RequestOptions;
- maxRetries(value: number | undefined): this;
- tags(entries: ReadonlyMap): this;
- timeoutMs(value: number | undefined): this;
-}
-
-// @public
-export class RequestOptionsValidationError extends DomainModelError {
-}
-
-// @public
-export class RequiredFieldError extends DomainModelError {
- constructor(fieldName: string);
- readonly fieldName: string;
-}
-
-// @public
-class Response_2 {
- get body(): ReadableStream | null;
- bytes(): Promise;
- close(): Promise;
- get headers(): Headers_2;
- static newBuilder(): ResponseBuilder;
- newBuilder(): ResponseBuilder;
- get protocol(): Protocol;
- get reasonPhrase(): string | undefined;
- get request(): Request_2;
- get status(): Status;
- text(): Promise;
-}
-export { Response_2 as Response }
-
-// @public
-export class ResponseBuilder implements Builder {
- body(body: ReadableStream | null): this;
- build(): Response_2;
- headers(headers: Headers_2): this;
- protocol(protocol: Protocol): this;
- reasonPhrase(reasonPhrase: string | undefined): this;
- request(request: Request_2): this;
- status(status: Status): this;
-}
-
-// @public
-export interface RetrySettings extends BackoffSettings {
- readonly attemptHeaderName?: string | undefined;
- readonly maxAttempts: number;
- readonly retryableStatuses: ReadonlySet;
- readonly totalTimeoutMs?: number | undefined;
-}
-
-// @public
-export function retryStep(options?: RetryStepOptions): StepDescriptor;
-
-// @public
-export interface RetryStepOptions {
- readonly clock?: Clock | undefined;
- readonly delayOverride?: ((attempt: number) => number | undefined) | undefined;
- readonly random?: (() => number) | undefined;
- readonly settings?: Partial | undefined;
-}
-
-// @public
-export class Runtime implements Transport {
- close(): Promise;
- send(request: Request_2, options?: RequestOptions, signal?: AbortSignal): Promise;
- get steps(): readonly StepDescriptor[];
- get transport(): Transport;
-}
-
-// @public
-export interface Schema {
- parse(input: unknown): T;
-}
-
-// @public
-export interface Serde {
- readonly deserializer: Deserializer;
- readonly mediaType: string;
- readonly serializer: Serializer;
-}
-
-// @public
-export function serdeBody(value: unknown, serde: Serde, mediaType?: string): Body_2;
-
-// @public
-export interface SerdeErrorOptions {
- readonly cause?: unknown;
-}
-
-// @public
-export class SerializationError extends DexpaceError {
- constructor(message: string, options?: SerdeErrorOptions);
-}
-
-// @public
-export interface Serializer {
- serialize(value: unknown): Uint8Array;
- serializeInto(value: unknown, target: Uint8Array, offset?: number): number;
- serializeTo(value: unknown, sink: WritableStream): Promise;
- serializeToString(value: unknown): string;
-}
-
-// @public
-export interface SseEvent {
- // (undocumented)
- readonly comment: string | undefined;
- readonly data: readonly string[];
- // (undocumented)
- readonly event: string | undefined;
- // (undocumented)
- readonly id: string | undefined;
- // (undocumented)
- readonly retryMs: number | undefined;
-}
-
-// @public
-export interface SseEventFields {
- // (undocumented)
- readonly comment?: string | undefined;
- // (undocumented)
- readonly data?: readonly string[] | undefined;
- // (undocumented)
- readonly event?: string | undefined;
- // (undocumented)
- readonly id?: string | undefined;
- // (undocumented)
- readonly retryMs?: number | undefined;
-}
-
-// @public
-export function sseEventsEqual(a: SseEvent, b: SseEvent): boolean;
-
-// @public
-export function sseEventToString(event: SseEvent): string;
-
-// @public
-export class SseLineTooLongError extends DexpaceError {
- constructor(limitBytes: number, options?: ErrorOptions);
- readonly limitBytes: number;
-}
-
-// @public
-export type SseMapper = (eventName: string | undefined, joinedData: string) => MapperOutcome;
-
-// @public
-export class SseStream implements AsyncIterable {
- [Symbol.asyncIterator](): AsyncIterator;
- close(): Promise;
-}
-
-// @public
-export class SseStreamError extends DexpaceError {
- constructor(message: string, options?: ErrorOptions);
-}
-
-// @public
-export function sseStreamFrom(response: Response_2, options?: SseStreamFromOptions): SseStream;
-
-// @public
-export interface SseStreamFromOptions extends SseStreamOptions {
- readonly maxLineBytes?: number | undefined;
- readonly signal?: AbortSignal | undefined;
-}
-
-// @public
-export interface SseStreamOptions {
- readonly onReleaseFailure?: ((error: unknown) => void) | undefined;
-}
-
-// @public
-export type Stage = 'PRE_REDIRECT' | 'REDIRECT' | 'POST_REDIRECT' | 'PRE_RETRY' | 'RETRY' | 'POST_RETRY' | 'PRE_AUTH' | 'AUTH' | 'POST_AUTH' | 'PRE_LOGGING' | 'LOGGING' | 'POST_LOGGING' | 'PRE_SERDE' | 'SERDE' | 'POST_SERDE' | 'SEND';
-
-// @public
-export const STAGE_ORDER: readonly Stage[];
-
-// @public
-export function standardResilience(transport: Transport, options?: StandardResilienceOptions): Runtime;
-
-// @public
-export interface StandardResilienceOptions {
- readonly auth?: AuthStepSettings | undefined;
- readonly redirect?: Partial | undefined;
- readonly retry?: RetryStepOptions | undefined;
-}
-
-// @public
-export class Status {
- get code(): number;
- equals(other: Status): boolean;
- get isClientError(): boolean;
- get isError(): boolean;
- get isInformational(): boolean;
- get isRecognized(): boolean;
- get isRedirect(): boolean;
- get isServerError(): boolean;
- get isSuccess(): boolean;
- get name(): string | undefined;
- static of(code: number): Status;
- static recognized(code: number): Status | undefined;
-}
-
-// @public
-export type Step = (request: Request_2, ctx: StepContext) => Promise;
-
-// @public
-export interface StepContext {
- readonly context: ExecutionContext;
- readonly fork?: (() => Next) | undefined;
- readonly next: Next;
- readonly options?: RequestOptions | undefined;
- readonly signal?: AbortSignal | undefined;
-}
-
-// @public
-export interface StepDescriptor {
- readonly fn: Step;
- readonly stage: Stage;
- readonly type: symbol;
-}
-
-// @public
-export class StreamBody implements Body_2 {
- constructor(stream: ReadableStream, mediaType?: string, contentLength?: number);
- readonly contentLength: number;
- readonly kind: "stream";
- readonly mediaType: string | undefined;
- readonly replayable = false;
- writeTo(sink: WritableStream): Promise;
-}
-
-// @public
-export function streamBody(stream: ReadableStream, mediaType?: string, contentLength?: number): StreamBody;
-
-// @public
-export class StringBody implements Body_2 {
- constructor(text: string, mediaType?: string);
- readonly contentLength: number;
- readonly kind: "string";
- readonly mediaType: string;
- readonly replayable = true;
- readonly text: string;
- writeTo(sink: WritableStream): Promise;
-}
-
-// @public
-export function stringBody(text: string, mediaType?: string): StringBody;
-
-// @public
-export function toHttpError(response: Response_2): Promise;
-
-// @public
-export type TokenProvider = () => Promise;
-
-// @public
-export interface Transport {
- close(): Promise;
- send(request: Request_2, options?: RequestOptions, signal?: AbortSignal): Promise;
-}
-
-// @public
-export type Tristate = {
- readonly [TRISTATE_BRAND]: true;
- readonly kind: 'absent';
-} | {
- readonly [TRISTATE_BRAND]: true;
- readonly kind: 'null';
-} | {
- readonly [TRISTATE_BRAND]: true;
- readonly kind: 'present';
- readonly value: T;
-};
-
-// @public
-export const TRISTATE_BRAND: unique symbol;
-
-// @public
-export interface TristateBranches {
- readonly onAbsent: () => R;
- readonly onNull: () => R;
- readonly onPresent: (value: T) => R;
-}
-
-// @public
-export function tristateToString(tristate: Tristate): string;
-
-// @public
-export class TypedResponse {
- constructor(response: Response_2, parse: (response: Response_2) => Promise);
- get headers(): Response_2['headers'];
- get protocol(): string;
- get reason(): string | undefined;
- get request(): Request_2;
- get status(): Response_2['status'];
- value(): Promise;
-}
-
-// @public
-export function typedSseStream(stream: SseStream, mapper: SseMapper): AsyncIterable;
-
-// @public
-export class UrlConstructionError extends DomainModelError {
-}
-
-// @public
-export function valueOrNull(tristate: Tristate): T | null;
-
-```
+## API Report File for "@dexpace/core"
+
+> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
+
+```ts
+
+// @public
+export function absent(): Tristate;
+
+// @public
+export class ApiKeyCredential {
+ [INSPECT](): string;
+ constructor(key: string);
+ toString(): string;
+}
+
+// @public
+export interface ApiKeyCredentialConfig {
+ readonly credential: ApiKeyCredential | NameKeyCredential;
+ readonly headerName?: string | undefined;
+ readonly prefix?: string | undefined;
+}
+
+// @public
+export interface AuthCredentialSet {
+ readonly apiKey?: ApiKeyCredentialConfig | undefined;
+ readonly basic?: BasicCredential | undefined;
+ readonly bearer?: BearerCredential | undefined;
+ readonly digest?: DigestCredential | undefined;
+}
+
+// @public
+export interface AuthDescriptor {
+ readonly allowsAnonymous: boolean;
+ readonly requirements: readonly AuthRequirement[];
+}
+
+// @public
+export interface AuthRequirement {
+ readonly params: ReadonlyMap;
+ readonly scheme: AuthScheme;
+ readonly scopes: readonly string[];
+}
+
+// @public
+export function authRequirementsEqual(a: AuthRequirement, b: AuthRequirement): boolean;
+
+// @public
+export class AuthResolutionError extends DexpaceError {
+ constructor(message: string, requiredSchemes?: readonly string[], availableSchemes?: readonly string[]);
+ readonly availableSchemes: readonly string[] | undefined;
+ readonly requiredSchemes: readonly string[] | undefined;
+ static unsatisfiable(requiredSchemes: readonly string[], availableSchemes: readonly string[]): AuthResolutionError;
+}
+
+// @public
+export type AuthScheme = 'OAUTH2' | 'API_KEY' | 'BASIC' | 'DIGEST' | 'NO_AUTH';
+
+// @public
+export function authStep(settings: AuthStepSettings): StepDescriptor;
+
+// @public
+export interface AuthStepSettings {
+ readonly bearerMarginMs?: number | undefined;
+ readonly challengeHook?: ChallengeHook | undefined;
+ readonly clock?: Pick | undefined;
+ readonly credentials: AuthCredentialSet;
+ readonly tiers: AuthTiers;
+}
+
+// @public
+export interface AuthTiers {
+ readonly client?: AuthDescriptor | undefined;
+ readonly operation?: AuthDescriptor | undefined;
+ readonly perCall?: AuthDescriptor | undefined;
+}
+
+// @public
+export interface BackoffSettings {
+ readonly fixedDelayMs?: number | undefined;
+ readonly initialDelayMs: number;
+ readonly jitter: number;
+ readonly maxDelayMs: number;
+ readonly multiplier: number;
+}
+
+// @public
+export interface BasicCredential {
+ readonly password: string;
+ readonly username: string;
+}
+
+// @public
+export interface BearerCredential {
+ readonly marginMs?: number | undefined;
+ readonly provider: TokenProvider;
+}
+
+// @public
+export class BearerToken {
+ [INSPECT](): string;
+ readonly expiresAt: number | undefined;
+ get token(): string;
+ toString(): string;
+}
+
+// @public
+export function bearerTokensEqual(a: BearerToken, b: BearerToken): boolean;
+
+// @public
+interface Body_2 {
+ readonly contentLength: number;
+ readonly kind: 'byte-array' | 'string' | 'stream' | 'form-urlencoded' | 'multipart';
+ readonly mediaType: string | undefined;
+ readonly replayable: boolean;
+ writeTo(sink: WritableStream): Promise;
+}
+export { Body_2 as Body }
+
+// @public
+export interface Builder {
+ build(): T;
+}
+
+// @public
+export function buildRequest(baseUrl: string | URL, operation: OperationDescriptor): Request_2;
+
+// @public
+export class ByteArrayBody implements Body_2 {
+ constructor(bytes: Uint8Array, mediaType?: string);
+ readonly contentLength: number;
+ readonly kind: "byte-array";
+ readonly mediaType: string | undefined;
+ readonly replayable = true;
+ writeTo(sink: WritableStream): Promise;
+}
+
+// @public
+export function byteArrayBody(bytes: Uint8Array, mediaType?: string): ByteArrayBody;
+
+// @public
+export class CancellationError extends DexpaceError {
+ constructor(message: string, options?: ErrorOptions);
+}
+
+// @public
+export type ChallengeHook = (response: Response_2, request: Request_2, options?: {
+ readonly signal?: AbortSignal | undefined;
+}) => Promise;
+
+// @public
+export interface Clock {
+ monotonic(): number;
+ now(): number;
+ sleep(ms: number, signal?: AbortSignal): Promise;
+}
+
+// @public
+export function composeSignal(userSignal?: AbortSignal, timeoutMs?: number): AbortSignal | undefined;
+
+// @public
+export class ConsumedBodyError extends DexpaceError {
+ constructor(bodyKind: string, options?: ErrorOptions);
+ readonly bodyKind: string;
+}
+
+// @public
+export function createAuthDescriptor(requirements: readonly AuthRequirement[]): AuthDescriptor;
+
+// @public
+export function createAuthRequirement(scheme: AuthScheme, scopes?: readonly string[], params?: ReadonlyMap): AuthRequirement;
+
+// @public
+export function createBearerToken(token: string, expiresAt?: number): BearerToken;
+
+// @public
+export function cursorStrategy(init: {
+ extract: (response: Response_2) => Promise<{
+ items: readonly T[];
+ cursor?: string | null | undefined;
+ }>;
+ parameterName?: string | undefined;
+}): PaginationStrategy;
+
+// @public
+export function decodeResponse(response: Response_2, deserializer: Deserializer, target: DecodeTarget): Promise;
+
+// @public
+export function decodeSuccessResponse(response: Response_2, deserializer: Deserializer, target: DecodeTarget): Promise;
+
+// @public
+export interface DecodeTarget {
+ readonly schema: Schema;
+ readonly typeName?: string | undefined;
+}
+
+// @public
+export class DeserializationError extends DexpaceError {
+ constructor(message: string, options?: DeserializationErrorOptions);
+ readonly etag: string | null;
+ readonly location: string | null;
+ readonly status: number | undefined;
+}
+
+// @public
+export interface DeserializationErrorOptions extends SerdeErrorOptions {
+ readonly etag?: string | null | undefined;
+ readonly location?: string | null | undefined;
+ readonly status?: number | undefined;
+}
+
+// @public
+export interface Deserializer {
+ deserialize(data: Uint8Array, schema: Schema, typeName?: string): T;
+ deserializeFrom(source: ReadableStream, schema: Schema, typeName?: string): Promise;
+}
+
+// @public
+export class DexpaceError extends Error {
+ constructor(message: string, options?: ErrorOptions);
+}
+
+// @public
+export type DigestAlgorithm = 'MD5' | 'MD5-sess' | 'SHA-256' | 'SHA-256-sess';
+
+// @public
+export interface DigestCredential {
+ readonly algorithmPreference?: readonly DigestAlgorithm[] | undefined;
+ readonly password: string;
+ readonly username: string;
+}
+
+// @public
+export interface DispatchContext {
+ readonly instrumentation: InstrumentationBundle;
+ readonly key: symbol;
+ readonly kind: 'dispatch';
+}
+
+// @public
+export class DomainModelError extends DexpaceError {
+}
+
+// @public
+export class ETag {
+ static readonly ANY: ETag;
+ get isAny(): boolean;
+ get isWeak(): boolean;
+ get opaque(): string | undefined;
+ static parse(raw: string): ETag | undefined;
+ get raw(): string;
+}
+
+// @public
+export class EtagParseError extends DomainModelError {
+}
+
+// @public
+export interface ExchangeContext {
+ readonly instrumentation: InstrumentationBundle;
+ readonly key: symbol;
+ readonly kind: 'exchange';
+ readonly operationName: string | undefined;
+ readonly request: Request_2;
+ readonly response: Response_2;
+}
+
+// @public
+export type ExecutionContext = DispatchContext | RequestContext | ExchangeContext;
+
+// @public
+export interface FetcherPage {
+ readonly continuationToken?: string | undefined;
+ readonly nextLink?: string | undefined;
+ readonly page: Page;
+}
+
+// @public
+export interface FetcherPaginationInit {
+ first: (options: PagingOptions) => Promise | undefined>;
+ maxPages?: number | undefined;
+ next: (key: string, options: PagingOptions) => Promise | undefined>;
+}
+
+// @public
+export function foldTristate(tristate: Tristate, branches: TristateBranches): R;
+
+// @public
+export class FormBodyValidationError extends DexpaceError {
+ constructor(field: string, value: unknown, options?: ErrorOptions);
+ readonly field: string;
+}
+
+// @public
+export class FormUrlEncodedBody implements Body_2 {
+ constructor(input: FormUrlEncodedInput);
+ readonly contentLength: number;
+ readonly kind: "form-urlencoded";
+ readonly mediaType = "application/x-www-form-urlencoded";
+ readonly params: QueryParams;
+ readonly replayable = true;
+ writeTo(sink: WritableStream): Promise;
+}
+
+// @public
+export function formUrlEncodedBody(input: FormUrlEncodedInput): FormUrlEncodedBody;
+
+// @public
+export type FormUrlEncodedInput = QueryParams | ReadonlyMap | Record | readonly (readonly [string, FormUrlEncodedValue])[];
+
+// @public
+export type FormUrlEncodedValue = string | number | boolean | bigint | null;
+
+// @public
+export class HeaderName {
+ equals(other: HeaderName): boolean;
+ get lowerCased(): string;
+ static of(raw: string): HeaderName;
+ get raw(): string;
+}
+
+// @public
+class Headers_2 {
+ entries(): readonly (readonly [string, string])[];
+ equals(other: Headers_2): boolean;
+ get(name: string | HeaderName): string | undefined;
+ getAll(name: string | HeaderName): readonly string[];
+ has(name: string | HeaderName): boolean;
+ names(): readonly string[];
+ static newBuilder(): HeadersBuilder;
+ newBuilder(): HeadersBuilder;
+}
+export { Headers_2 as Headers }
+
+// @public
+export class HeadersBuilder implements Builder {
+ add(name: string | HeaderName, value: string): this;
+ addInbound(name: string | HeaderName, value: string): this;
+ build(): Headers_2;
+ set(name: string | HeaderName, value: string | null): this;
+ setInbound(name: string | HeaderName, value: string | null): this;
+}
+
+// @public
+export class HeaderValidationError extends DomainModelError {
+ constructor(kind: 'name' | 'value', offendingName: string, _offendingValue: string | undefined);
+ readonly escapedName: string;
+ readonly kind: 'name' | 'value';
+}
+
+// @public
+export class HttpRange {
+ static bounded(start: number, length: number): HttpRange;
+ get kind(): RangeKind;
+ get length(): number | undefined;
+ static open(start: number): HttpRange;
+ static parse(raw: string): HttpRange;
+ get raw(): string;
+ get start(): number | undefined;
+ static suffix(suffixLength: number): HttpRange;
+ get suffixLength(): number | undefined;
+}
+
+// @public
+export class HttpRangeValidationError extends DomainModelError {
+}
+
+// @public
+export class HttpStatusError extends DexpaceError {
+ constructor(status: number, bodyBytes: Uint8Array | undefined, mediaType: string | undefined, options?: ErrorOptions);
+ body(): Body_2 | undefined;
+ preview(charset?: string): string | null;
+ readonly status: number;
+}
+
+// @public
+export interface InstrumentationBundle {
+ readonly activeSpan: unknown;
+ readonly isRemote: boolean;
+ readonly isValid: boolean;
+ readonly spanId: string;
+ readonly traceFlags: number;
+ readonly traceId: string;
+ readonly traceIdEncoding: string;
+ readonly tracerFactory: (operationName: string) => unknown;
+ readonly traceState: string;
+}
+
+// @public
+export function isAbsent(tristate: Tristate): tristate is {
+ readonly [TRISTATE_BRAND]: true;
+ readonly kind: 'absent';
+};
+
+// @public
+export function isBodyError(error: unknown): error is ConsumedBodyError | MultipartBoundaryError | FormBodyValidationError;
+
+// @public
+export function isNull(tristate: Tristate): tristate is {
+ readonly [TRISTATE_BRAND]: true;
+ readonly kind: 'null';
+};
+
+// @public
+export function isPresent(tristate: Tristate): tristate is {
+ readonly [TRISTATE_BRAND]: true;
+ readonly kind: 'present';
+ readonly value: T;
+};
+
+// @public
+export function isSerdeError(e: unknown): e is SerializationError | DeserializationError;
+
+// @public
+export function isSseEventEmpty(event: SseEvent): boolean;
+
+// @public
+export function isTimeoutSignal(signal: AbortSignal): boolean;
+
+// @public
+export function isTristate(value: unknown): value is Tristate;
+
+// @public
+export function linkHeaderStrategy(init: {
+ extract: (response: Response_2) => Promise;
+ headerName?: string | undefined;
+}): PaginationStrategy;
+
+// @public
+export function makeSseEvent(fields: SseEventFields): SseEvent;
+
+// @public
+export const MAPPER_DONE: MapperOutcome;
+
+// @public
+export const MAPPER_SKIP: MapperOutcome;
+
+// @public
+export type MapperOutcome = {
+ readonly kind: 'value';
+ readonly value: T;
+} | {
+ readonly kind: 'skip';
+} | {
+ readonly kind: 'done';
+};
+
+// @public
+export function mapperValue(value: T): MapperOutcome;
+
+// @public
+export function materialize(body: Body_2): Promise;
+
+// @public
+export class MediaType {
+ get charset(): string | undefined;
+ equals(other: MediaType): boolean;
+ matches(pattern: MediaType): boolean;
+ static of(type: string, subtype: string, parameters?: ReadonlyMap): MediaType;
+ parameter(key: string): string | undefined;
+ static parse(raw: string): MediaType;
+ render(): string;
+ get subtype(): string;
+ get type(): string;
+}
+
+// @public
+export class MediaTypeParseError extends DomainModelError {
+}
+
+// @public
+export type Method = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
+
+// @public
+export class MultipartBody implements Body_2 {
+ constructor(parts: readonly MultipartPart[], boundary?: string);
+ readonly contentLength: number;
+ readonly kind: "multipart";
+ readonly mediaType: string;
+ static newBuilder(): MultipartBodyBuilder;
+ newBuilder(): MultipartBodyBuilder;
+ readonly replayable: boolean;
+ writeTo(sink: WritableStream): Promise;
+}
+
+// @public
+export function multipartBody(parts: readonly MultipartPart[], boundary?: string): MultipartBody;
+
+// @public
+export class MultipartBodyBuilder implements Builder {
+ addPart(part: MultipartPart): this;
+ boundary(boundary: string | undefined): this;
+ build(): MultipartBody;
+ parts(parts: readonly MultipartPart[]): this;
+}
+
+// @public
+export class MultipartBoundaryError extends DexpaceError {
+ constructor(boundary: string, options?: ErrorOptions);
+ readonly boundary: string;
+}
+
+// @public
+export interface MultipartPart {
+ readonly body: Body_2;
+ readonly filename?: string | undefined;
+ readonly name: string;
+}
+
+// @public
+export class NameKeyCredential {
+ [INSPECT](): string;
+ constructor(name: string, key: string);
+ readonly name: string;
+ toString(): string;
+}
+
+// @public
+export type Next = (request?: Request_2) => Promise;
+
+// @public
+export function nullValue(): Tristate;
+
+// @public
+export function ofNullable(value: T | null | undefined): Tristate;
+
+// @public
+export class OperationAssemblyError extends DexpaceError {
+ constructor(message: string, parameterName: string);
+ readonly parameterName: string;
+}
+
+// @public
+export interface OperationDescriptor {
+ readonly body?: Body_2 | undefined;
+ readonly headers?: Headers_2 | undefined;
+ readonly method: Method;
+ readonly pathParams?: Readonly> | undefined;
+ readonly pathTemplate: string;
+ readonly query?: QueryParams | undefined;
+}
+
+// @public
+export class Page implements AsyncDisposable {
+ [Symbol.asyncDispose](): Promise;
+ constructor(response: Response_2, items: readonly T[]);
+ close(): Promise;
+ readonly headers: Headers_2;
+ readonly items: readonly T[];
+ readonly request: Request_2;
+ readonly status: Status;
+}
+
+// @public
+export interface PageInfo {
+ readonly items: readonly T[];
+ readonly nextRequest: Request_2 | undefined;
+}
+
+// @public
+export function pageInfo(items: readonly T[], nextRequest?: Request_2): PageInfo;
+
+// @public
+export function pageNumberStrategy(init: {
+ extract: (response: Response_2) => Promise;
+ parameterName?: string | undefined;
+ startPage?: number | undefined;
+}): PaginationStrategy;
+
+// @public
+export function paginateWithFetchers(init: FetcherPaginationInit): AsyncIterable>;
+
+// @public
+export class PaginationError extends DexpaceError {
+ constructor(message: string, options?: ErrorOptions);
+}
+
+// @public
+export interface PaginationStrategy {
+ parse(response: Response_2, template: Request_2): Promise>;
+}
+
+// @public
+export class Paginator {
+ constructor(init: PaginatorInit);
+ items(): AsyncIterable;
+ pages(): AsyncIterable>;
+}
+
+// @public
+export interface PaginatorInit {
+ readonly initialRequest: Request_2;
+ readonly maxPages?: number | undefined;
+ readonly options?: RequestOptions | undefined;
+ readonly signal?: AbortSignal | undefined;
+ readonly strategy: PaginationStrategy;
+ readonly transport: Transport;
+}
+
+// @public
+export interface PagingOptions {
+ [key: string]: unknown;
+ continuationToken?: string | undefined;
+ nextLink?: string | undefined;
+}
+
+// @public
+export const PILLAR_STAGES: ReadonlySet;
+
+// @public
+export class PipelineBuilder {
+ constructor(transport: Transport);
+ append(descriptor: StepDescriptor): this;
+ appendAll(descriptors: readonly StepDescriptor[]): this;
+ build(): Runtime;
+ insertAfter(anchorType: symbol, descriptor: StepDescriptor): this;
+ insertBefore(anchorType: symbol, descriptor: StepDescriptor): this;
+ prepend(descriptor: StepDescriptor): this;
+ prependAll(descriptors: readonly StepDescriptor[]): this;
+ reload(descriptors: readonly StepDescriptor[]): this;
+ remove(type: symbol): this;
+ replace(anchorType: symbol, descriptor: StepDescriptor): this;
+ static seedFrom(runtime: Runtime, mode: 'flatten' | 'nest'): PipelineBuilder;
+}
+
+// @public
+export class PlaintextCredentialError extends DexpaceError {
+ constructor(stepName: string, scheme: string);
+ readonly scheme: string;
+ readonly stepName: string;
+}
+
+// @public
+export function present(value: NonNullable): Tristate;
+
+// @public
+export class Protocol {
+ equals(other: Protocol): boolean;
+ static readonly HTTP_1_1: Protocol;
+ static readonly HTTP_2: Protocol;
+ static parse(raw: string): Protocol;
+ get token(): string;
+}
+
+// @public
+export class ProtocolParseError extends DomainModelError {
+}
+
+// @public
+export class QueryParams {
+ encode(): string;
+ equals(other: QueryParams): boolean;
+ get(name: string): string | undefined;
+ getAll(name: string): readonly string[];
+ has(name: string): boolean;
+ static newBuilder(): QueryParamsBuilder;
+ newBuilder(): QueryParamsBuilder;
+ static parse(raw: string | null | undefined): QueryParams;
+}
+
+// @public
+export class QueryParamsBuilder implements Builder {
+ add(name: string, value: string | null): this;
+ build(): QueryParams;
+}
+
+// @public
+export type RangeKind = 'bounded' | 'suffix' | 'open';
+
+// @public
+export interface RedirectCondition {
+ readonly redirectsFollowed: number;
+ readonly response: Response_2;
+ readonly visited: ReadonlySet;
+}
+
+// @public
+export type RedirectPredicate = (condition: Readonly) => boolean;
+
+// @public
+export interface RedirectSettings {
+ readonly allow303: boolean;
+ readonly allowedMethods: ReadonlySet;
+ readonly allowSchemeDowngrade: boolean;
+ readonly locationHeader: string;
+ readonly maxHops: number;
+ readonly predicate?: RedirectPredicate | undefined;
+}
+
+// @public
+export function redirectStep(overrides?: Partial): StepDescriptor;
+
+// @public
+class Request_2 {
+ get body(): Body_2 | undefined;
+ equals(other: Request_2): boolean;
+ get headers(): Headers_2;
+ get method(): Method;
+ static newBuilder(): RequestBuilder;
+ newBuilder(): RequestBuilder;
+ get url(): URL;
+}
+export { Request_2 as Request }
+
+// @public
+export class RequestBodyNotAllowedError extends DomainModelError {
+ constructor(method: string);
+}
+
+// @public
+export class RequestBuilder implements Builder {
+ body(body: Body_2 | undefined): this;
+ build(): Request_2;
+ headers(headers: Headers_2): this;
+ method(method: Method): this;
+ url(url: string | URL): this;
+}
+
+// @public
+export class RequestConditions {
+ applyTo(headers: Headers_2): Headers_2;
+ static newBuilder(): RequestConditionsBuilder;
+ newBuilder(): RequestConditionsBuilder;
+}
+
+// @public
+export class RequestConditionsBuilder implements Builder {
+ build(): RequestConditions;
+ ifMatch(etag: ETag): this;
+ ifModifiedSince(date: Date): this;
+ ifNoneMatch(etag: ETag): this;
+ ifUnmodifiedSince(date: Date): this;
+}
+
+// @public
+export class RequestConditionsValidationError extends DomainModelError {
+}
+
+// @public
+export interface RequestContext {
+ readonly instrumentation: InstrumentationBundle;
+ readonly key: symbol;
+ readonly kind: 'request';
+ readonly operationName: string | undefined;
+ readonly request: Request_2;
+}
+
+// @public
+export class RequestOptions {
+ get auth(): AuthDescriptor | undefined;
+ static readonly EMPTY: RequestOptions;
+ get maxRetries(): number | undefined;
+ static newBuilder(): RequestOptionsBuilder;
+ newBuilder(): RequestOptionsBuilder;
+ tag(key: string): string | undefined;
+ get timeoutMs(): number | undefined;
+}
+
+// @public
+export class RequestOptionsBuilder implements Builder {
+ auth(descriptor: AuthDescriptor | undefined): this;
+ build(): RequestOptions;
+ maxRetries(value: number | undefined): this;
+ tags(entries: ReadonlyMap): this;
+ timeoutMs(value: number | undefined): this;
+}
+
+// @public
+export class RequestOptionsValidationError extends DomainModelError {
+}
+
+// @public
+export class RequiredFieldError extends DomainModelError {
+ constructor(fieldName: string);
+ readonly fieldName: string;
+}
+
+// @public
+class Response_2 {
+ get body(): ReadableStream | null;
+ bytes(): Promise;
+ close(): Promise;
+ get headers(): Headers_2;
+ static newBuilder(): ResponseBuilder;
+ newBuilder(): ResponseBuilder;
+ get protocol(): Protocol;
+ get reasonPhrase(): string | undefined;
+ get request(): Request_2;
+ get status(): Status;
+ text(): Promise;
+}
+export { Response_2 as Response }
+
+// @public
+export class ResponseBuilder implements Builder {
+ body(body: ReadableStream | null): this;
+ build(): Response_2;
+ headers(headers: Headers_2): this;
+ protocol(protocol: Protocol): this;
+ reasonPhrase(reasonPhrase: string | undefined): this;
+ request(request: Request_2): this;
+ status(status: Status): this;
+}
+
+// @public
+export interface RetrySettings extends BackoffSettings {
+ readonly attemptHeaderName?: string | undefined;
+ readonly maxAttempts: number;
+ readonly retryableStatuses: ReadonlySet;
+ readonly totalTimeoutMs?: number | undefined;
+}
+
+// @public
+export function retryStep(options?: RetryStepOptions): StepDescriptor;
+
+// @public
+export interface RetryStepOptions {
+ readonly clock?: Clock | undefined;
+ readonly delayOverride?: ((attempt: number) => number | undefined) | undefined;
+ readonly random?: (() => number) | undefined;
+ readonly settings?: Partial | undefined;
+}
+
+// @public
+export class Runtime implements Transport {
+ close(): Promise;
+ send(request: Request_2, options?: RequestOptions, signal?: AbortSignal): Promise;
+ get steps(): readonly StepDescriptor[];
+ get transport(): Transport;
+}
+
+// @public
+export interface Schema {
+ parse(input: unknown): T;
+}
+
+// @public
+export interface Serde {
+ readonly deserializer: Deserializer;
+ readonly mediaType: string;
+ readonly serializer: Serializer;
+}
+
+// @public
+export function serdeBody(value: unknown, serde: Serde, mediaType?: string): Body_2;
+
+// @public
+export interface SerdeErrorOptions {
+ readonly cause?: unknown;
+}
+
+// @public
+export class SerializationError extends DexpaceError {
+ constructor(message: string, options?: SerdeErrorOptions);
+}
+
+// @public
+export interface Serializer {
+ serialize(value: unknown): Uint8Array;
+ serializeInto(value: unknown, target: Uint8Array, offset?: number): number;
+ serializeTo(value: unknown, sink: WritableStream): Promise;
+ serializeToString(value: unknown): string;
+}
+
+// @public
+export interface SseEvent {
+ // (undocumented)
+ readonly comment: string | undefined;
+ readonly data: readonly string[];
+ // (undocumented)
+ readonly event: string | undefined;
+ // (undocumented)
+ readonly id: string | undefined;
+ // (undocumented)
+ readonly retryMs: number | undefined;
+}
+
+// @public
+export interface SseEventFields {
+ // (undocumented)
+ readonly comment?: string | undefined;
+ // (undocumented)
+ readonly data?: readonly string[] | undefined;
+ // (undocumented)
+ readonly event?: string | undefined;
+ // (undocumented)
+ readonly id?: string | undefined;
+ // (undocumented)
+ readonly retryMs?: number | undefined;
+}
+
+// @public
+export function sseEventsEqual(a: SseEvent, b: SseEvent): boolean;
+
+// @public
+export function sseEventToString(event: SseEvent): string;
+
+// @public
+export class SseLineTooLongError extends DexpaceError {
+ constructor(limitBytes: number, options?: ErrorOptions);
+ readonly limitBytes: number;
+}
+
+// @public
+export type SseMapper = (eventName: string | undefined, joinedData: string) => MapperOutcome;
+
+// @public
+export class SseStream implements AsyncIterable {
+ [Symbol.asyncIterator](): AsyncIterator;
+ close(): Promise;
+}
+
+// @public
+export class SseStreamError extends DexpaceError {
+ constructor(message: string, options?: ErrorOptions);
+}
+
+// @public
+export function sseStreamFrom(response: Response_2, options?: SseStreamFromOptions): SseStream;
+
+// @public
+export interface SseStreamFromOptions extends SseStreamOptions {
+ readonly maxLineBytes?: number | undefined;
+ readonly signal?: AbortSignal | undefined;
+}
+
+// @public
+export interface SseStreamOptions {
+ readonly onReleaseFailure?: ((error: unknown) => void) | undefined;
+}
+
+// @public
+export type Stage = 'PRE_REDIRECT' | 'REDIRECT' | 'POST_REDIRECT' | 'PRE_RETRY' | 'RETRY' | 'POST_RETRY' | 'PRE_AUTH' | 'AUTH' | 'POST_AUTH' | 'PRE_LOGGING' | 'LOGGING' | 'POST_LOGGING' | 'PRE_SERDE' | 'SERDE' | 'POST_SERDE' | 'SEND';
+
+// @public
+export const STAGE_ORDER: readonly Stage[];
+
+// @public
+export function standardResilience(transport: Transport, options?: StandardResilienceOptions): Runtime;
+
+// @public
+export interface StandardResilienceOptions {
+ readonly auth?: AuthStepSettings | undefined;
+ readonly redirect?: Partial | undefined;
+ readonly retry?: RetryStepOptions | undefined;
+}
+
+// @public
+export class Status {
+ get code(): number;
+ equals(other: Status): boolean;
+ get isClientError(): boolean;
+ get isError(): boolean;
+ get isInformational(): boolean;
+ get isRecognized(): boolean;
+ get isRedirect(): boolean;
+ get isServerError(): boolean;
+ get isSuccess(): boolean;
+ get name(): string | undefined;
+ static of(code: number): Status;
+ static recognized(code: number): Status | undefined;
+}
+
+// @public
+export type Step = (request: Request_2, ctx: StepContext) => Promise;
+
+// @public
+export interface StepContext {
+ readonly context: ExecutionContext;
+ readonly fork?: (() => Next) | undefined;
+ readonly next: Next;
+ readonly options?: RequestOptions | undefined;
+ readonly signal?: AbortSignal | undefined;
+}
+
+// @public
+export interface StepDescriptor {
+ readonly fn: Step;
+ readonly stage: Stage;
+ readonly type: symbol;
+}
+
+// @public
+export class StreamBody implements Body_2 {
+ constructor(stream: ReadableStream, mediaType?: string, contentLength?: number);
+ readonly contentLength: number;
+ readonly kind: "stream";
+ readonly mediaType: string | undefined;
+ readonly replayable = false;
+ writeTo(sink: WritableStream): Promise;
+}
+
+// @public
+export function streamBody(stream: ReadableStream, mediaType?: string, contentLength?: number): StreamBody;
+
+// @public
+export class StringBody implements Body_2 {
+ constructor(text: string, mediaType?: string);
+ readonly contentLength: number;
+ readonly kind: "string";
+ readonly mediaType: string;
+ readonly replayable = true;
+ readonly text: string;
+ writeTo(sink: WritableStream): Promise;
+}
+
+// @public
+export function stringBody(text: string, mediaType?: string): StringBody;
+
+// @public
+export function toHttpError(response: Response_2): Promise;
+
+// @public
+export type TokenProvider = () => Promise;
+
+// @public
+export interface Transport {
+ close(): Promise;
+ send(request: Request_2, options?: RequestOptions, signal?: AbortSignal): Promise;
+}
+
+// @public
+export type Tristate = {
+ readonly [TRISTATE_BRAND]: true;
+ readonly kind: 'absent';
+} | {
+ readonly [TRISTATE_BRAND]: true;
+ readonly kind: 'null';
+} | {
+ readonly [TRISTATE_BRAND]: true;
+ readonly kind: 'present';
+ readonly value: T;
+};
+
+// @public
+export const TRISTATE_BRAND: unique symbol;
+
+// @public
+export interface TristateBranches {
+ readonly onAbsent: () => R;
+ readonly onNull: () => R;
+ readonly onPresent: (value: T) => R;
+}
+
+// @public
+export function tristateToString(tristate: Tristate): string;
+
+// @public
+export class TypedResponse {
+ constructor(response: Response_2, parse: (response: Response_2) => Promise);
+ get headers(): Response_2['headers'];
+ get protocol(): string;
+ get reason(): string | undefined;
+ get request(): Request_2;
+ get status(): Response_2['status'];
+ value(): Promise;
+}
+
+// @public
+export function typedSseStream(stream: SseStream, mapper: SseMapper