@hunt-labs/bytekit-sdk 0.11.9 → 0.11.11

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