@hunt-labs/bytekit-sdk 0.7.1 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,32 @@ today, see [README.md](./README.md), which remains the authoritative usage guide
10
10
 
11
11
  ## [Unreleased]
12
12
 
13
+ ## [0.7.3] - 2026-08-18
14
+
15
+ ### Changed
16
+
17
+ - **`XFetchContentLength`'s description no longer calls the header a wire-byte count** (#3133).
18
+ `X-Fetch-Content-Length` is the byte length of the response body actually served: on a
19
+ passthrough `/v1/fetch` (no `format`) that is the relayed upstream payload, so it does equal
20
+ the upstream wire bytes — but with `format=html` or `format=markdown` the gateway overwrites
21
+ it with the transformed document's length, which is typically far smaller than what is billed.
22
+ The old description therefore read as a billing discrepancy on every transform request. Billing
23
+ is unchanged and has always used the upstream compressed wire bytes reported by `X-Raw-Bytes` /
24
+ `X-Billable-Bytes`. Generated-type comments only; no type or runtime behavior changes.
25
+
26
+ ## [0.7.2] - 2026-08-17
27
+
28
+ ### Changed
29
+
30
+ - **`ScrapeResponses.202`'s headers no longer advertise `X-Raw-Bytes`, `X-Billable-Bytes`, or
31
+ `X-Billing-Multiplier`** (#3068). The gateway's async `/v1/scrape` path only ever emitted
32
+ `X-Scrape-ID` and `X-Scrape-Status: queued` on a 202 — a queued scrape has no finalized byte
33
+ charge yet — but `docs/api/openapi.yaml` documented the billing-transparency trio there too,
34
+ so `src/generated/api.d.ts` typed three response headers the runtime never sends. This corrects
35
+ the generated type to match the gateway's actual behavior; it does not change any runtime
36
+ behavior. The synchronous `200` response, and `/v1/screenshots`' `202` (which does finalize a
37
+ charge before responding), are unaffected.
38
+
13
39
  ## [0.7.1] - 2026-08-11
14
40
 
15
41
  ### Changed
@@ -508,6 +534,8 @@ against 0.1.0 — read each one before upgrading.
508
534
  `@rapidcrawl/sdk` name.
509
535
 
510
536
  [Unreleased]: https://github.com/Hunt-Labs-Inc/ByteKit/tree/main/packages/sdk-typescript
537
+ [0.7.3]: https://github.com/Hunt-Labs-Inc/ByteKit/tree/main/packages/sdk-typescript
538
+ [0.7.2]: https://github.com/Hunt-Labs-Inc/ByteKit/tree/main/packages/sdk-typescript
511
539
  [0.7.1]: https://github.com/Hunt-Labs-Inc/ByteKit/tree/main/packages/sdk-typescript
512
540
  [0.7.0]: https://github.com/Hunt-Labs-Inc/ByteKit/tree/main/packages/sdk-typescript
513
541
  [0.6.2]: https://github.com/Hunt-Labs-Inc/ByteKit/tree/main/packages/sdk-typescript
@@ -2626,7 +2626,14 @@ export interface components {
2626
2626
  */
2627
2627
  XFetchStatus: "completed";
2628
2628
  XFetchURL: string;
2629
- /** @description Wire byte count (integer as string). */
2629
+ /**
2630
+ * @description Byte length of the response body served on this request (integer as string) — NOT the
2631
+ * billing basis. On a passthrough request (no `format`) the body is the relayed upstream
2632
+ * payload, so this equals the upstream wire byte count. With `format=html` or
2633
+ * `format=markdown` the body is the transformed document, so this is the transformed byte
2634
+ * count and is typically far smaller than what is billed. Billing always reads the upstream
2635
+ * compressed wire bytes from `X-Raw-Bytes` / `X-Billable-Bytes`, on every path.
2636
+ */
2630
2637
  XFetchContentLength: string;
2631
2638
  XFetchCreditsCharged: string;
2632
2639
  XFetchDurationMs: string;
@@ -3372,12 +3379,6 @@ export interface operations {
3372
3379
  "X-Scrape-ID"?: string;
3373
3380
  /** @description Always `queued` on a 202 response. */
3374
3381
  "X-Scrape-Status"?: "queued";
3375
- /** @description Upstream wire bytes (0 when not yet fetched on async paths). */
3376
- "X-Raw-Bytes"?: number;
3377
- /** @description Chargeable bytes after applying the billing multiplier. */
3378
- "X-Billable-Bytes"?: number;
3379
- /** @description Bandwidth cost multiplier applied to X-Raw-Bytes. A markdown fetch bills as fetch_md (miss 1.5, hit 0.75); a raw fetch bills 1.0 on a miss, 0.5 on a cache hit. */
3380
- "X-Billing-Multiplier"?: number;
3381
3382
  [name: string]: unknown;
3382
3383
  };
3383
3384
  content: {
package/dist/version.d.ts CHANGED
@@ -5,4 +5,4 @@
5
5
  * outbound request carries — see the emit site in `client.ts`. The header name is spelled
6
6
  * only there, so issue #2905's pre-merge gate 1 counts exactly one occurrence in `src/`.
7
7
  */
8
- export declare const SDK_VERSION = "0.7.1";
8
+ export declare const SDK_VERSION = "0.7.3";
package/dist/version.js CHANGED
@@ -9,4 +9,4 @@
9
9
  * outbound request carries — see the emit site in `client.ts`. The header name is spelled
10
10
  * only there, so issue #2905's pre-merge gate 1 counts exactly one occurrence in `src/`.
11
11
  */
12
- export const SDK_VERSION = '0.7.1';
12
+ export const SDK_VERSION = '0.7.3';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hunt-labs/bytekit-sdk",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
4
4
  "description": "Official TypeScript SDK for the ByteKit API",
5
5
  "license": "MIT",
6
6
  "type": "module",