@hunt-labs/bytekit-sdk 0.11.4 → 0.11.5
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 +8 -0
- package/dist/generated/api.d.ts +86 -19
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,14 @@ today, see [README.md](./README.md), which remains the authoritative usage guide
|
|
|
10
10
|
|
|
11
11
|
## [Unreleased]
|
|
12
12
|
|
|
13
|
+
## [0.11.5] - 2026-09-22
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- **Internal `GET /v1/logs` types list schema rows (#2373).** Both `endpoint` enums add `schema`,
|
|
18
|
+
for `/v1/schema` structured-extraction requests, whose row ids carry the new `sch_` prefix.
|
|
19
|
+
No SDK method calls it.
|
|
20
|
+
|
|
13
21
|
## [0.11.4] - 2026-09-21
|
|
14
22
|
|
|
15
23
|
### Changed
|
package/dist/generated/api.d.ts
CHANGED
|
@@ -720,7 +720,7 @@ export interface paths {
|
|
|
720
720
|
};
|
|
721
721
|
/**
|
|
722
722
|
* Get the unified request log feed
|
|
723
|
-
* @description Returns a unified, newest-first feed of the account's requests across scrape, fetch, screenshots, recordings and
|
|
723
|
+
* @description Returns a unified, newest-first feed of the account's requests across scrape, fetch, screenshots, recordings, search and schema, plus webhook delivery attempts, for the dashboard /logs screen. Monitor runs are listed as the scrape and screenshots rows they produce (`source: monitor`). Cursor-paginated; default range is the last 30 days, max 366 days.
|
|
724
724
|
*/
|
|
725
725
|
get: operations["getLogs"];
|
|
726
726
|
put?: never;
|
|
@@ -1160,6 +1160,29 @@ export interface paths {
|
|
|
1160
1160
|
patch?: never;
|
|
1161
1161
|
trace?: never;
|
|
1162
1162
|
};
|
|
1163
|
+
"/v1/account/complete-onboarding": {
|
|
1164
|
+
parameters: {
|
|
1165
|
+
query?: never;
|
|
1166
|
+
header?: never;
|
|
1167
|
+
path?: never;
|
|
1168
|
+
cookie?: never;
|
|
1169
|
+
};
|
|
1170
|
+
get?: never;
|
|
1171
|
+
put?: never;
|
|
1172
|
+
/**
|
|
1173
|
+
* Mark onboarding as finished
|
|
1174
|
+
* @description Records that the account left the dashboard's onboarding flow through one
|
|
1175
|
+
* of its exits, so `onboarding_completed` on GET /v1/account reads true from
|
|
1176
|
+
* then on. Idempotent: a repeat call keeps the first timestamp and still
|
|
1177
|
+
* answers 200. Requires an active membership (admin or member).
|
|
1178
|
+
*/
|
|
1179
|
+
post: operations["completeOnboarding"];
|
|
1180
|
+
delete?: never;
|
|
1181
|
+
options?: never;
|
|
1182
|
+
head?: never;
|
|
1183
|
+
patch?: never;
|
|
1184
|
+
trace?: never;
|
|
1185
|
+
};
|
|
1163
1186
|
"/v1/me": {
|
|
1164
1187
|
parameters: {
|
|
1165
1188
|
query?: never;
|
|
@@ -2704,8 +2727,10 @@ export interface components {
|
|
|
2704
2727
|
terms_version: string;
|
|
2705
2728
|
/** Format: date-time */
|
|
2706
2729
|
created_at: string;
|
|
2707
|
-
/** @description True once the account has SUCCESSFULLY COMPLETED at least one billable request (a scrape/screenshot/fetch/… that settled and was charged credits), regardless of whether it was authenticated with a Clerk session or an API key. All-time — never windowed. A request that failed does not flip it, even when its bandwidth was billed: the monitor terminal-preflight-failure path records bytes without credits, and only the credited settlement counts here. Powers the dashboard onboarding gate — the app shows the guided onboarding flow until this is true, then the dashboard. Lags by up to one usage rollup: the completion service writes the row after the response is returned, so a just-completed first request may still read false for a moment. Treat that as "not visible yet", never as "this account has never made a request". */
|
|
2730
|
+
/** @description True once the account has SUCCESSFULLY COMPLETED at least one billable request (a scrape/screenshot/fetch/… that settled and was charged credits), regardless of whether it was authenticated with a Clerk session or an API key. All-time — never windowed. A request that failed does not flip it, even when its bandwidth was billed: the monitor terminal-preflight-failure path records bytes without credits, and only the credited settlement counts here. Powers the dashboard onboarding gate — the app shows the guided onboarding flow until this or `onboarding_completed` is true, then the dashboard. Lags by up to one usage rollup: the completion service writes the row after the response is returned, so a just-completed first request may still read false for a moment. Treat that as "not visible yet", never as "this account has never made a request". */
|
|
2708
2731
|
has_activity: boolean;
|
|
2732
|
+
/** @description True once a member of the account left onboarding through one of its exits (POST /v1/account/complete-onboarding). Never reset. With `has_activity` it gates the dashboard: the app shows the guided onboarding flow until either one is true, so a user whose first request failed can still reach the dashboard. */
|
|
2733
|
+
onboarding_completed: boolean;
|
|
2709
2734
|
/** @description True when the account has a Stripe subscription, keyed on the same `stripe_subscription_id` column that GET /v1/billing/change-plan's `no_subscription` guard tests — so a client can use it to decide whether that endpoint will answer at all. Stays TRUE while a subscription is mid-cancellation (cancelled but running to the period end): the subscription still exists and a booked plan change is still revocable. It is a boolean, not the bearer path's `subscription` object: this response has no role-dependent fields, so a non-admin member receives it too, and plan pricing does not belong there. */
|
|
2710
2735
|
has_subscription: boolean;
|
|
2711
2736
|
};
|
|
@@ -4474,7 +4499,7 @@ export interface operations {
|
|
|
4474
4499
|
/** @example bulk_01j9abc123 */
|
|
4475
4500
|
id: string;
|
|
4476
4501
|
/** @enum {string} */
|
|
4477
|
-
status: "processing" | "completed" | "failed";
|
|
4502
|
+
status: "processing" | "completed" | "failed" | "cancelled";
|
|
4478
4503
|
total: number;
|
|
4479
4504
|
completed: number;
|
|
4480
4505
|
failed: number;
|
|
@@ -4547,11 +4572,12 @@ export interface operations {
|
|
|
4547
4572
|
};
|
|
4548
4573
|
};
|
|
4549
4574
|
/**
|
|
4550
|
-
* @description Bulk job still processing.
|
|
4551
|
-
*
|
|
4552
|
-
*
|
|
4553
|
-
*
|
|
4554
|
-
*
|
|
4575
|
+
* @description Bulk job still processing. The poll answers 200 for a job in
|
|
4576
|
+
* `BULK_TERMINAL_STATUSES` (`completed`, `failed`, `cancelled`) and 202
|
|
4577
|
+
* otherwise, over an identical body, so this is the SAME envelope the 200
|
|
4578
|
+
* documents — only the status code and the reachable `status` values
|
|
4579
|
+
* differ. Keep polling until you get a 200; a **cancelled** job is served
|
|
4580
|
+
* 200, not 202 (issues #3533, #4754).
|
|
4555
4581
|
*
|
|
4556
4582
|
* Item `content_url` values are pre-signed exactly as on the 200 — a fresh
|
|
4557
4583
|
* 600-second signature on every poll.
|
|
@@ -4565,7 +4591,7 @@ export interface operations {
|
|
|
4565
4591
|
/** @example bulk_01j9abc123 */
|
|
4566
4592
|
id: string;
|
|
4567
4593
|
/** @enum {string} */
|
|
4568
|
-
status: "processing"
|
|
4594
|
+
status: "processing";
|
|
4569
4595
|
total: number;
|
|
4570
4596
|
completed: number;
|
|
4571
4597
|
failed: number;
|
|
@@ -6106,7 +6132,7 @@ export interface operations {
|
|
|
6106
6132
|
/** @description End date (YYYY-MM-DD), inclusive. Default today. */
|
|
6107
6133
|
to?: string;
|
|
6108
6134
|
/** @description Filter to a single endpoint kind. */
|
|
6109
|
-
endpoint?: "scrape" | "fetch" | "screenshots" | "recordings" | "search" | "webhook";
|
|
6135
|
+
endpoint?: "scrape" | "fetch" | "screenshots" | "recordings" | "search" | "webhook" | "schema";
|
|
6110
6136
|
/** @description Filter by job outcome. */
|
|
6111
6137
|
status?: "pending" | "processing" | "completed" | "failed";
|
|
6112
6138
|
/** @description Case-insensitive substring match on the request URL — the search query on search rows and the target URL on webhook rows. */
|
|
@@ -6132,13 +6158,13 @@ export interface operations {
|
|
|
6132
6158
|
content: {
|
|
6133
6159
|
"application/json": {
|
|
6134
6160
|
data: {
|
|
6135
|
-
/** @description Prefixed request id (sc_/ss_/rec_/sr_/wh_). */
|
|
6161
|
+
/** @description Prefixed request id (sc_/ss_/rec_/sr_/wh_/sch_). */
|
|
6136
6162
|
id: string;
|
|
6137
6163
|
/**
|
|
6138
|
-
* @description The request kind. `webhook` rows are webhook delivery attempts ByteKit sent to your endpoint, not requests you made.
|
|
6164
|
+
* @description The request kind. `webhook` rows are webhook delivery attempts ByteKit sent to your endpoint, not requests you made. `schema` rows are /v1/schema structured-extraction requests.
|
|
6139
6165
|
* @enum {string}
|
|
6140
6166
|
*/
|
|
6141
|
-
endpoint: "scrape" | "fetch" | "screenshots" | "recordings" | "search" | "webhook";
|
|
6167
|
+
endpoint: "scrape" | "fetch" | "screenshots" | "recordings" | "search" | "webhook" | "schema";
|
|
6142
6168
|
/** @description HTTP method. Not persisted; capture and search endpoints are POST, and webhook deliveries are sent as POST (so this is always "POST"). /v1/fetch also accepts GET, but the stored row cannot distinguish it. */
|
|
6143
6169
|
method: string;
|
|
6144
6170
|
/** @description The request URL. On a search row this is the search query (empty once the retention window has redacted it); on a webhook row it is the delivery target URL. */
|
|
@@ -6149,17 +6175,17 @@ export interface operations {
|
|
|
6149
6175
|
* @enum {string}
|
|
6150
6176
|
*/
|
|
6151
6177
|
status: "pending" | "processing" | "completed" | "failed";
|
|
6152
|
-
/** @description Upstream target HTTP status on scrape/fetch rows; the HTTP status your endpoint answered on webhook rows. null on every other row. */
|
|
6178
|
+
/** @description Upstream target HTTP status on scrape/fetch rows, and the target site's HTTP status on completed schema and screenshot rows (null when none was recorded); the HTTP status your endpoint answered on webhook rows. null on every other row. */
|
|
6153
6179
|
status_code?: number | null;
|
|
6154
|
-
/** @description Raw upstream bytes the request carried (the billing base before the multiplier). null while pending/failed. */
|
|
6180
|
+
/** @description Raw upstream bytes the request carried (the billing base before the multiplier). null while pending/failed, and always null on search, webhook and schema rows. */
|
|
6155
6181
|
raw_bytes?: number | null;
|
|
6156
|
-
/** @description The bytes this request was BILLED — the same amount its own response reported in `X-Billable-Bytes`. For a scrape or fetch request this is the settled decomposition replayed as it was recorded at completion, so it already carries every factor that applied: the endpoint factor (`scrape` 1.0, `scrape_md` 1.5, `fetch` 1.0, `fetch_md` 1.5, a monitor run 1.0), the cache-hit ×0.5, and the clean-markdown ×3. Screenshots and recordings are `raw_bytes` × the fixed 1.5 Phase-1 render factor whatever capture options they carried — capture billing composes no discount factor, so that product is exact. This is the settled amount itself, never a product reconstructed from another field: `billing_multiplier` below is DERIVED from it (that field is this value over `raw_bytes`), so the dependency runs this way and not the other. One residual: a scrape or fetch row completed before the decomposition was recorded is reconstructed from its endpoint and cache-hit factors, which leaves a markdown `/v1/fetch` request of that vintage reported at 1.0 rather than 1.5 — nothing on such a row distinguishes it. That population ages out of this feed's retention window and is not backfilled. null while pending/failed (the row has no byte basis yet). */
|
|
6182
|
+
/** @description The bytes this request was BILLED — the same amount its own response reported in `X-Billable-Bytes`. For a scrape or fetch request this is the settled decomposition replayed as it was recorded at completion, so it already carries every factor that applied: the endpoint factor (`scrape` 1.0, `scrape_md` 1.5, `fetch` 1.0, `fetch_md` 1.5, a monitor run 1.0), the cache-hit ×0.5, and the clean-markdown ×3. Screenshots and recordings are `raw_bytes` × the fixed 1.5 Phase-1 render factor whatever capture options they carried — capture billing composes no discount factor, so that product is exact. This is the settled amount itself, never a product reconstructed from another field: `billing_multiplier` below is DERIVED from it (that field is this value over `raw_bytes`), so the dependency runs this way and not the other. One residual: a scrape or fetch row completed before the decomposition was recorded is reconstructed from its endpoint and cache-hit factors, which leaves a markdown `/v1/fetch` request of that vintage reported at 1.0 rather than 1.5 — nothing on such a row distinguishes it. That population ages out of this feed's retention window and is not backfilled. null while pending/failed (the row has no byte basis yet). On a schema row this is the byte amount the request settled at, recorded when it ended: 0 where the charge was refunded, null where it is unknown. */
|
|
6157
6183
|
billable_bytes?: number | null;
|
|
6158
|
-
/** @description The bandwidth factor this request settled at, DERIVED from the two fields above as `billable_bytes` / `raw_bytes`, ROUNDED TO 2 DECIMAL PLACES. It carries every factor that applied to the settled amount, composed: the endpoint factor, the cache-hit ×0.5 and the clean-markdown ×3 on a scrape or fetch row, and the flat 1.5 Phase-1 render factor on every screenshot and recording row whatever capture options it carried. Every factor reachable that way is a multiple of 0.25 (0.5, 0.75, 1, 1.5, 2.25, 3, 4.5), so 2 places reports each of them exactly on any basis of 100 bytes or more. The rounding is there because `billable_bytes` is itself rounded, which on an odd basis would otherwise surface here as 1.500001943158721 rather than 1.5. `raw_bytes` × `billing_multiplier`, rounded to the nearest byte, reproduces `billable_bytes` at every basis. CHANGED: this field used to report the row's persisted `credits_charged` — an account CREDIT count on a per-endpoint scale, not a bandwidth factor. On a screenshot that count is charged per capture option (`full_page`, `mobile`), so two captures billed at the same 1.5 factor reported different multipliers. See https://bytekit.com/docs/billing/credits for the credit counts each endpoint charges, which this field no longer reports. This is a LOGS ROW field and is NOT the scrape response envelope field — the envelope carries no flat `billing_multiplier` at all; its billing surface is the `billing` node (see BillingNode). It reports the same composed value as `billing.multiplier` and the X-Billing-Multiplier response header wherever `billable_bytes` is exact, which is every row but one: the residual described above for `billable_bytes`, a markdown `/v1/fetch` request completed before the decomposition was recorded, is reconstructed at 1.0 where settlement charged 1.5, and this field reports that same 1.0. null where the row has no factor to report: while pending/failed; on a search or
|
|
6184
|
+
/** @description The bandwidth factor this request settled at, DERIVED from the two fields above as `billable_bytes` / `raw_bytes`, ROUNDED TO 2 DECIMAL PLACES. It carries every factor that applied to the settled amount, composed: the endpoint factor, the cache-hit ×0.5 and the clean-markdown ×3 on a scrape or fetch row, and the flat 1.5 Phase-1 render factor on every screenshot and recording row whatever capture options it carried. Every factor reachable that way is a multiple of 0.25 (0.5, 0.75, 1, 1.5, 2.25, 3, 4.5), so 2 places reports each of them exactly on any basis of 100 bytes or more. The rounding is there because `billable_bytes` is itself rounded, which on an odd basis would otherwise surface here as 1.500001943158721 rather than 1.5. `raw_bytes` × `billing_multiplier`, rounded to the nearest byte, reproduces `billable_bytes` at every basis. CHANGED: this field used to report the row's persisted `credits_charged` — an account CREDIT count on a per-endpoint scale, not a bandwidth factor. On a screenshot that count is charged per capture option (`full_page`, `mobile`), so two captures billed at the same 1.5 factor reported different multipliers. See https://bytekit.com/docs/billing/credits for the credit counts each endpoint charges, which this field no longer reports. This is a LOGS ROW field and is NOT the scrape response envelope field — the envelope carries no flat `billing_multiplier` at all; its billing surface is the `billing` node (see BillingNode). It reports the same composed value as `billing.multiplier` and the X-Billing-Multiplier response header wherever `billable_bytes` is exact, which is every row but one: the residual described above for `billable_bytes`, a markdown `/v1/fetch` request completed before the decomposition was recorded, is reconstructed at 1.0 where settlement charged 1.5, and this field reports that same 1.0. null where the row has no factor to report: while pending/failed; on a search, webhook or schema row (none has a raw byte basis); where the basis is zero because Phase 1 was skipped or failed and the request billed nothing; and on a completed screenshot or recording old enough that no Phase-1 basis was ever recorded for it, which reports null rather than claiming a real past charge was nothing. */
|
|
6159
6185
|
billing_multiplier?: number | null;
|
|
6160
6186
|
/** @description Request duration in milliseconds; on a webhook row, how long your endpoint took to answer the latest attempt. */
|
|
6161
6187
|
duration_ms?: number | null;
|
|
6162
|
-
/** @description How the request originated (single/bulk/monitor). null on search and
|
|
6188
|
+
/** @description How the request originated (single/bulk/monitor). null on search, webhook and schema rows. */
|
|
6163
6189
|
source?: string | null;
|
|
6164
6190
|
error_code?: string | null;
|
|
6165
6191
|
error_message?: string | null;
|
|
@@ -6167,7 +6193,7 @@ export interface operations {
|
|
|
6167
6193
|
api_key_id?: string | null;
|
|
6168
6194
|
/** @description Stored content, image or video URL. For a `completed` row with a non-empty storage key this is a **pre-signed** download URL, minted fresh on every read of this endpoint and valid for **600 seconds (10 minutes)** — the same signing lifetime as `content_url` on `GET /v1/fetch/bulk/{id}` and `image_url` on `GET /v1/bulk/{id}/screenshots`. Download inside that window, or re-poll this endpoint for a fresh signature. For every other row the stored value is returned unchanged — `null` while no object has been stored, and otherwise a private, unsigned storage URL that returns 401 on download. That covers rows that are not `completed`, completed rows with no storage key, and completed rows whose object could not be signed; this endpoint raises no `artifact_unavailable` signal for any of them. */
|
|
6169
6195
|
artifact_url?: string | null;
|
|
6170
|
-
/** @description The original request options. */
|
|
6196
|
+
/** @description The original request options. Empty on schema rows: the schema, prompt and extraction result are not stored. */
|
|
6171
6197
|
options?: {
|
|
6172
6198
|
[key: string]: unknown;
|
|
6173
6199
|
} | null;
|
|
@@ -7142,6 +7168,47 @@ export interface operations {
|
|
|
7142
7168
|
};
|
|
7143
7169
|
};
|
|
7144
7170
|
};
|
|
7171
|
+
completeOnboarding: {
|
|
7172
|
+
parameters: {
|
|
7173
|
+
query?: never;
|
|
7174
|
+
header?: never;
|
|
7175
|
+
path?: never;
|
|
7176
|
+
cookie?: never;
|
|
7177
|
+
};
|
|
7178
|
+
requestBody?: never;
|
|
7179
|
+
responses: {
|
|
7180
|
+
/** @description Onboarding marked as finished. */
|
|
7181
|
+
200: {
|
|
7182
|
+
headers: {
|
|
7183
|
+
[name: string]: unknown;
|
|
7184
|
+
};
|
|
7185
|
+
content: {
|
|
7186
|
+
"application/json": {
|
|
7187
|
+
/** @enum {boolean} */
|
|
7188
|
+
onboarding_completed: true;
|
|
7189
|
+
};
|
|
7190
|
+
};
|
|
7191
|
+
};
|
|
7192
|
+
/** @description Missing or invalid Clerk JWT. */
|
|
7193
|
+
401: {
|
|
7194
|
+
headers: {
|
|
7195
|
+
[name: string]: unknown;
|
|
7196
|
+
};
|
|
7197
|
+
content: {
|
|
7198
|
+
"application/json": components["schemas"]["Error"];
|
|
7199
|
+
};
|
|
7200
|
+
};
|
|
7201
|
+
/** @description Session has no active account membership. */
|
|
7202
|
+
403: {
|
|
7203
|
+
headers: {
|
|
7204
|
+
[name: string]: unknown;
|
|
7205
|
+
};
|
|
7206
|
+
content: {
|
|
7207
|
+
"application/json": components["schemas"]["Error"];
|
|
7208
|
+
};
|
|
7209
|
+
};
|
|
7210
|
+
};
|
|
7211
|
+
};
|
|
7145
7212
|
getMe: {
|
|
7146
7213
|
parameters: {
|
|
7147
7214
|
query?: never;
|
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.11.
|
|
8
|
+
export declare const SDK_VERSION = "0.11.5";
|
package/dist/version.js
CHANGED