@hunt-labs/bytekit-sdk 0.11.8 → 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 +79 -0
- package/dist/generated/api.d.ts +795 -172
- package/dist/resources/fetch.d.ts +6 -6
- package/dist/resources/fetch.js +3 -2
- package/dist/resources/screenshots.d.ts +3 -3
- package/dist/resources/screenshots.js +3 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -49,10 +49,9 @@ type FetchGetQueryKey = (typeof FETCH_GET_QUERY_KEYS)[number];
|
|
|
49
49
|
/**
|
|
50
50
|
* Options accepted by `fetch.get` (GET /v1/fetch).
|
|
51
51
|
*
|
|
52
|
-
* A strict subset of {@link FetchOpts}:
|
|
53
|
-
* `GET /v1/fetch`
|
|
54
|
-
* `
|
|
55
|
-
* error. Use `create()` (POST) for custom metadata.
|
|
52
|
+
* A strict subset of {@link FetchOpts}: `url`, `country`, `timeout_ms` and `cache_ttl`. The
|
|
53
|
+
* spec's `GET /v1/fetch` also declares `custom`, but this SDK deliberately does not expose it
|
|
54
|
+
* on `get()`: passing it is a compile error. Use `create()` (POST) for custom metadata.
|
|
56
55
|
*/
|
|
57
56
|
export type FetchGetOpts = Pick<FetchOpts, FetchGetQueryKey>;
|
|
58
57
|
/** Cache-lookup outcome reported in the `X-Fetch-Cache` response header. */
|
|
@@ -120,8 +119,9 @@ export declare class FetchResource {
|
|
|
120
119
|
*
|
|
121
120
|
* Resolves a `FetchResult` — the raw content body plus `X-Fetch-*` metadata.
|
|
122
121
|
*
|
|
123
|
-
* Accepts
|
|
124
|
-
*
|
|
122
|
+
* Accepts `url`, `country`, `timeout_ms` and `cache_ttl`. The spec also declares a `custom`
|
|
123
|
+
* query param for this endpoint, which this method deliberately does not expose; use
|
|
124
|
+
* `create()` for custom metadata.
|
|
125
125
|
*
|
|
126
126
|
* The query string is built by iterating `FETCH_GET_QUERY_KEYS`, the same list
|
|
127
127
|
* `FetchGetOpts` is derived from, so every accepted option is necessarily
|
package/dist/resources/fetch.js
CHANGED
|
@@ -61,8 +61,9 @@ export class FetchResource {
|
|
|
61
61
|
*
|
|
62
62
|
* Resolves a `FetchResult` — the raw content body plus `X-Fetch-*` metadata.
|
|
63
63
|
*
|
|
64
|
-
* Accepts
|
|
65
|
-
*
|
|
64
|
+
* Accepts `url`, `country`, `timeout_ms` and `cache_ttl`. The spec also declares a `custom`
|
|
65
|
+
* query param for this endpoint, which this method deliberately does not expose; use
|
|
66
|
+
* `create()` for custom metadata.
|
|
66
67
|
*
|
|
67
68
|
* The query string is built by iterating `FETCH_GET_QUERY_KEYS`, the same list
|
|
68
69
|
* `FetchGetOpts` is derived from, so every accepted option is necessarily
|
|
@@ -56,9 +56,9 @@ export declare class ScreenshotsResource {
|
|
|
56
56
|
/**
|
|
57
57
|
* POST /v1/screenshots — capture a screenshot.
|
|
58
58
|
*
|
|
59
|
-
* `params.async` maps to the `?async=true` query param (queued 202 capture).
|
|
60
|
-
*
|
|
61
|
-
* optional and `async` omitted-when-absent: `create(opts)` with no second argument posts to the
|
|
59
|
+
* `params.async` maps to the `?async=true` query param (queued 202 capture). The API also
|
|
60
|
+
* accepts `async: true` in the request body, on screenshots and scrape alike; either one turns
|
|
61
|
+
* it on. `params` is optional and `async` omitted-when-absent: `create(opts)` with no second argument posts to the
|
|
62
62
|
* bare `/v1/screenshots` URL unchanged — existing single-arg callers are unaffected.
|
|
63
63
|
*
|
|
64
64
|
* `requestOptions` is the THIRD positional parameter (after `params`) so both existing call
|
|
@@ -7,9 +7,9 @@ export class ScreenshotsResource {
|
|
|
7
7
|
/**
|
|
8
8
|
* POST /v1/screenshots — capture a screenshot.
|
|
9
9
|
*
|
|
10
|
-
* `params.async` maps to the `?async=true` query param (queued 202 capture).
|
|
11
|
-
*
|
|
12
|
-
* optional and `async` omitted-when-absent: `create(opts)` with no second argument posts to the
|
|
10
|
+
* `params.async` maps to the `?async=true` query param (queued 202 capture). The API also
|
|
11
|
+
* accepts `async: true` in the request body, on screenshots and scrape alike; either one turns
|
|
12
|
+
* it on. `params` is optional and `async` omitted-when-absent: `create(opts)` with no second argument posts to the
|
|
13
13
|
* bare `/v1/screenshots` URL unchanged — existing single-arg callers are unaffected.
|
|
14
14
|
*
|
|
15
15
|
* `requestOptions` is the THIRD positional parameter (after `params`) so both existing call
|
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.10";
|
package/dist/version.js
CHANGED