@hunt-labs/bytekit-sdk 0.11.9 → 0.11.10

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/CHANGELOG.md CHANGED
@@ -10,6 +10,74 @@ today, see [README.md](./README.md), which remains the authoritative usage guide
10
10
 
11
11
  ## [Unreleased]
12
12
 
13
+ ## [0.11.10] - 2026-10-02
14
+
15
+ ### Changed
16
+
17
+ - **`GET /v1/scrape/{id}` types now declare the response headers it sends (#4425).** The `200`
18
+ response of `getScrape` carried no `headers` map, so the `X-Scrape-*` and billing headers the
19
+ endpoint already emitted were invisible to typed clients. They are now declared, all optional (a
20
+ queued or processing poll carries none). Regenerated `src/generated/api.d.ts`; no SDK method
21
+ signature moves.
22
+ - **`POST /v1/schema` types no longer describe a feature flag (#4972).** The endpoint is always
23
+ registered, so the "gated by a server-side feature flag" doc comment and the `404` "feature flag
24
+ disabled" response are removed from `src/generated/api.d.ts`. No SDK method signature moves.
25
+ - **Internal billing types follow the in-app card flow (#5101).** The internal
26
+ `POST /v1/billing/register` operation is now a legacy terminal: its types carry no request body
27
+ and a single `410` response (card setup moved to `POST /v1/billing/payment-methods/setup`). The
28
+ internal `DELETE /v1/billing/payment-methods/{id}` description adds that removing the last card
29
+ turns auto-topup off. Regenerated `src/generated/api.d.ts`; no public SDK method signature moves.
30
+ - **Internal top-up types follow the in-app payment (#5102).** The internal
31
+ `POST /v1/billing/topup` operation now takes `{ amount_cents, return_url }` (no
32
+ `success_url`/`cancel_url`) and answers `{ client_secret, session_id }` instead of
33
+ `{ checkout_url, session_id }`. Regenerated `src/generated/api.d.ts`; no public SDK method
34
+ signature moves.
35
+ - **Internal billing types follow the retired portal (#5106).** The internal
36
+ `POST /v1/billing/portal` operation is now a legacy terminal: its types carry no request body
37
+ and a single `410` response (billing actions stay in the dashboard), and the `portal_url`
38
+ response field is gone. The internal `GET /v1/billing/invoices` description now says invoices
39
+ are newest first and are paged with `starting_after`, and `has_more` is documented. Regenerated
40
+ `src/generated/api.d.ts`; no public SDK method signature moves.
41
+ - **Bearer operations now type a `401` response (#5114).** Every non-deprecated bearer
42
+ operation declares `401` (the shared `Unauthorized` response, an `Error` envelope whose
43
+ `error.code` is `invalid_api_key` or `unauthorized`) in `src/generated/api.d.ts`. No SDK method
44
+ signature or runtime behavior moves: a `401` still throws `ByteKitError`.
45
+ - **The `401` description lists expired keys (#5242).** The shared `Unauthorized` response now
46
+ says `invalid_api_key` is returned for an unknown, revoked, expired or malformed key, matching
47
+ the key lookup. Regenerated `src/generated/api.d.ts`; description text only, no type or SDK
48
+ method signature moves.
49
+ - **`ScrapeWarning.code` gains the five extraction codes (#5130).** `extract_validation_failed`,
50
+ `exhausted_retries`, `content_truncated`, `model_refusal` and `empty_extraction` can now appear
51
+ in a scrape's `warnings[]`, matching what the server emits. Regenerated
52
+ `src/generated/api.d.ts`; the code union widens, no SDK
53
+ method signature moves.
54
+ - **`POST /v1/scrape` and `POST /v1/screenshots` accept `async` in the body or the query string
55
+ (#5349).** The request is async when either spelling says `true`; `false` in one never cancels
56
+ `true` in the other. Regenerated `src/generated/api.d.ts` (`ScreenshotRequest` gains `async`;
57
+ `createScrape` gains an `async` query parameter). No SDK method signature moves: the existing
58
+ screenshots `{ async }` option keeps sending `?async=true`.
59
+ - **`WebhookDeliveryResponse.event_type` gains `monitor.suspended` (#5408).** The worker sends
60
+ this event (header `X-ByteKit-Event`) when a monitor is suspended because the account ran out of
61
+ balance, and `GET /v1/webhook-deliveries` can return it; the spec's enum now lists it. Regenerated
62
+ `src/generated/api.d.ts`; the union widens, no SDK method signature moves.
63
+ - **Generated types follow the corrected spec for screenshots, search, fetch, the bulk creates,
64
+ sitemap, schema and the `json` format entry (#5410).** `ScrapeRequest.formats` items are now
65
+ `ScrapeRequestFormatsItem | ScrapeRequestJsonFormat` (the four string formats, or the `json`
66
+ object entry), `ScrapeFormats` gains `json`, and the new `ScrapeRequestJsonFormat` component
67
+ types the entry. `createScreenshot` and `createSitemap` type a `403` (`host_forbidden` /
68
+ `path_forbidden`), the three bulk creates a `403` `url_forbidden` body, `createScrape` a `503`
69
+ `provider_unavailable`, `createSearch` a `503` that is either the vendor-masked body or the
70
+ `Error` envelope, `createSchemaExtraction` a `500`, and `getFetch` a `custom` query parameter
71
+ (not exposed by `fetch.get`, which keeps `custom` a `create()` option). `query` is capped at
72
+ 2048 characters, `country` on `/v1/fetch` takes either case, and the descriptions of the
73
+ `/v1/fetch`, bulk, sitemap and schema operations are corrected. Regenerated
74
+ `src/generated/api.d.ts`; no SDK method signature moves.
75
+ - **`X-Raw-Bytes` on `createScrape` and `getScrape` is described as compressed wire bytes (#5424).**
76
+ The `200` header description read "Uncompressed body byte count"; the gateway sends the
77
+ compressed wire-byte billing basis, so the description now says that and that it is not the
78
+ decompressed size. Regenerated `src/generated/api.d.ts`; description text only, no SDK method
79
+ signature moves.
80
+
13
81
  ## [0.11.9] - 2026-10-02
14
82
 
15
83
  ### Changed