scrapfly-sdk 0.11.0 → 0.12.0
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/README.md +36 -3
- package/esm/browserconfig.d.ts +37 -5
- package/esm/browserconfig.d.ts.map +1 -1
- package/esm/browserconfig.js +51 -3
- package/esm/client.d.ts +124 -9
- package/esm/client.d.ts.map +1 -1
- package/esm/client.js +346 -50
- package/esm/crawl.d.ts +58 -1
- package/esm/crawl.d.ts.map +1 -1
- package/esm/crawl.js +55 -0
- package/esm/crawlerconfig.d.ts +41 -3
- package/esm/crawlerconfig.d.ts.map +1 -1
- package/esm/crawlerconfig.js +93 -2
- package/esm/crawlerresult.d.ts +335 -2
- package/esm/crawlerresult.d.ts.map +1 -1
- package/esm/crawlerresult.js +367 -1
- package/esm/errors.d.ts +12 -0
- package/esm/errors.d.ts.map +1 -1
- package/esm/errors.js +11 -0
- package/esm/main.d.ts +4 -4
- package/esm/main.d.ts.map +1 -1
- package/esm/main.js +3 -3
- package/esm/scrapeconfig.d.ts +36 -0
- package/esm/scrapeconfig.d.ts.map +1 -1
- package/esm/scrapeconfig.js +44 -2
- package/esm/types.d.ts.map +1 -1
- package/esm/webhookserver.d.ts +33 -15
- package/esm/webhookserver.d.ts.map +1 -1
- package/esm/webhookserver.js +197 -38
- package/package.json +1 -1
- package/script/browserconfig.d.ts +37 -5
- package/script/browserconfig.d.ts.map +1 -1
- package/script/browserconfig.js +51 -3
- package/script/client.d.ts +124 -9
- package/script/client.d.ts.map +1 -1
- package/script/client.js +345 -49
- package/script/crawl.d.ts +58 -1
- package/script/crawl.d.ts.map +1 -1
- package/script/crawl.js +55 -0
- package/script/crawlerconfig.d.ts +41 -3
- package/script/crawlerconfig.d.ts.map +1 -1
- package/script/crawlerconfig.js +94 -3
- package/script/crawlerresult.d.ts +335 -2
- package/script/crawlerresult.d.ts.map +1 -1
- package/script/crawlerresult.js +374 -2
- package/script/errors.d.ts +12 -0
- package/script/errors.d.ts.map +1 -1
- package/script/errors.js +12 -1
- package/script/main.d.ts +4 -4
- package/script/main.d.ts.map +1 -1
- package/script/main.js +9 -2
- package/script/scrapeconfig.d.ts +36 -0
- package/script/scrapeconfig.d.ts.map +1 -1
- package/script/scrapeconfig.js +44 -2
- package/script/types.d.ts.map +1 -1
- package/script/webhookserver.d.ts +33 -15
- package/script/webhookserver.d.ts.map +1 -1
- package/script/webhookserver.js +197 -38
- package/src/browserconfig.ts +52 -4
- package/src/client.ts +413 -51
- package/src/crawl.ts +74 -0
- package/src/crawlerconfig.ts +115 -5
- package/src/crawlerresult.ts +566 -3
- package/src/errors.ts +12 -0
- package/src/main.ts +25 -2
- package/src/scrapeconfig.ts +54 -2
- package/src/types.ts +0 -1
- package/src/webhookserver.ts +235 -39
package/esm/crawlerconfig.d.ts
CHANGED
|
@@ -14,10 +14,15 @@ export type CrawlerContentFormat = 'html' | 'clean_html' | 'markdown' | 'text' |
|
|
|
14
14
|
/**
|
|
15
15
|
* Webhook event names emitted by the crawler.
|
|
16
16
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
17
|
+
* Event names match the wire format documented in the Crawler API webhook reference.
|
|
18
|
+
* Verified against the public docs and the JSON example payloads.
|
|
19
19
|
*/
|
|
20
|
-
export type CrawlerWebhookEventName = 'crawler_started' | 'crawler_url_visited' | 'crawler_url_skipped' | 'crawler_url_discovered' | 'crawler_url_failed' | 'crawler_stopped' | 'crawler_cancelled' | 'crawler_finished';
|
|
20
|
+
export type CrawlerWebhookEventName = 'crawler_started' | 'crawler_url_visited' | 'crawler_url_skipped' | 'crawler_url_discovered' | 'crawler_url_failed' | 'crawler_stopped' | 'crawler_cancelled' | 'crawler_finished' | 'crawler_search_ready' | 'crawler_search_failed' | 'crawler_updated';
|
|
21
|
+
/**
|
|
22
|
+
* Auto-refresh interval bounds, in seconds (1 hour to 90 days).
|
|
23
|
+
*/
|
|
24
|
+
export declare const REFRESH_MIN_INTERVAL = 3600;
|
|
25
|
+
export declare const REFRESH_MAX_INTERVAL: number;
|
|
21
26
|
/**
|
|
22
27
|
* Constructor options for {@link CrawlerConfig}.
|
|
23
28
|
*
|
|
@@ -52,6 +57,20 @@ export type CrawlerConfigOptions = {
|
|
|
52
57
|
cache_clear?: boolean;
|
|
53
58
|
content_formats?: CrawlerContentFormat[];
|
|
54
59
|
extraction_rules?: Rec<any>;
|
|
60
|
+
search?: boolean;
|
|
61
|
+
refresh?: boolean;
|
|
62
|
+
refresh_interval?: number;
|
|
63
|
+
/**
|
|
64
|
+
* Anti-bot bypass. The current name for what used to be called `asp`.
|
|
65
|
+
* Sent in the `POST /crawl` body as `asp`; only the SDK-facing name changed.
|
|
66
|
+
*/
|
|
67
|
+
unblocker?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* @deprecated Use {@link CrawlerConfigOptions.unblocker}. `asp` is a
|
|
70
|
+
* permanently supported alias and keeps working forever. When both are
|
|
71
|
+
* supplied `asp` wins, so existing code cannot have its meaning changed by a
|
|
72
|
+
* later `unblocker`.
|
|
73
|
+
*/
|
|
55
74
|
asp?: boolean;
|
|
56
75
|
proxy_pool?: string;
|
|
57
76
|
country?: string;
|
|
@@ -101,12 +120,31 @@ export declare class CrawlerConfig {
|
|
|
101
120
|
cache_clear?: boolean;
|
|
102
121
|
content_formats?: CrawlerContentFormat[];
|
|
103
122
|
extraction_rules?: Rec<any>;
|
|
123
|
+
search?: boolean;
|
|
124
|
+
refresh?: boolean;
|
|
125
|
+
refresh_interval?: number;
|
|
126
|
+
/**
|
|
127
|
+
* Storage for the anti-bot bypass toggle, under its deprecated name.
|
|
128
|
+
* `unblocker` is an accessor over this same field — see below.
|
|
129
|
+
*
|
|
130
|
+
* @deprecated Use {@link CrawlerConfig.unblocker}. `asp` keeps working forever.
|
|
131
|
+
*/
|
|
104
132
|
asp?: boolean;
|
|
105
133
|
proxy_pool?: string;
|
|
106
134
|
country?: string;
|
|
107
135
|
webhook_name?: string;
|
|
108
136
|
webhook_events?: CrawlerWebhookEventName[];
|
|
109
137
|
constructor(options: CrawlerConfigOptions);
|
|
138
|
+
/**
|
|
139
|
+
* Anti-bot bypass toggle — the current name for what used to be `asp`.
|
|
140
|
+
*
|
|
141
|
+
* An accessor over the single `asp` field rather than a second stored
|
|
142
|
+
* property: one storage slot means the two names can never disagree, and
|
|
143
|
+
* `toApiParams` keeps serializing the one field under the wire key `asp`.
|
|
144
|
+
* `undefined` propagates in both directions, so "unset" stays unset.
|
|
145
|
+
*/
|
|
146
|
+
get unblocker(): boolean | undefined;
|
|
147
|
+
set unblocker(value: boolean | undefined);
|
|
110
148
|
private validateOptions;
|
|
111
149
|
/**
|
|
112
150
|
* Serialize to a flat object suitable for `JSON.stringify()` as a `POST /crawl` body.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crawlerconfig.d.ts","sourceRoot":"","sources":["../src/crawlerconfig.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,oBAAoB,GAC5B,MAAM,GACN,YAAY,GACZ,UAAU,GACV,MAAM,GACN,MAAM,GACN,gBAAgB,GAChB,eAAe,CAAC;AAYpB;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAC/B,iBAAiB,GACjB,qBAAqB,GACrB,qBAAqB,GACrB,wBAAwB,GACxB,oBAAoB,GACpB,iBAAiB,GACjB,mBAAmB,GACnB,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"crawlerconfig.d.ts","sourceRoot":"","sources":["../src/crawlerconfig.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,oBAAoB,GAC5B,MAAM,GACN,YAAY,GACZ,UAAU,GACV,MAAM,GACN,MAAM,GACN,gBAAgB,GAChB,eAAe,CAAC;AAYpB;;;;;GAKG;AACH,MAAM,MAAM,u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C;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACzC,gBAAgB,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IAE5B,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;;OAKG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,uBAAuB,EAAE,CAAC;gBAE/B,OAAO,EAAE,oBAAoB;IAiIzC;;;;;;;OAOG;IACH,IAAI,SAAS,IAAI,OAAO,GAAG,SAAS,CAEnC;IAED,IAAI,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,EAEvC;IAED,OAAO,CAAC,eAAe;IA8CvB;;;;;;;;;OASG;IACH,WAAW,IAAI,GAAG,CAAC,GAAG,CAAC;CAqExB"}
|
package/esm/crawlerconfig.js
CHANGED
|
@@ -8,6 +8,11 @@ const VALID_CONTENT_FORMATS = new Set([
|
|
|
8
8
|
'extracted_data',
|
|
9
9
|
'page_metadata',
|
|
10
10
|
]);
|
|
11
|
+
/**
|
|
12
|
+
* Auto-refresh interval bounds, in seconds (1 hour to 90 days).
|
|
13
|
+
*/
|
|
14
|
+
export const REFRESH_MIN_INTERVAL = 3600;
|
|
15
|
+
export const REFRESH_MAX_INTERVAL = 90 * 24 * 3600;
|
|
11
16
|
const VALID_WEBHOOK_EVENTS = new Set([
|
|
12
17
|
'crawler_started',
|
|
13
18
|
'crawler_url_visited',
|
|
@@ -17,6 +22,9 @@ const VALID_WEBHOOK_EVENTS = new Set([
|
|
|
17
22
|
'crawler_stopped',
|
|
18
23
|
'crawler_cancelled',
|
|
19
24
|
'crawler_finished',
|
|
25
|
+
'crawler_search_ready',
|
|
26
|
+
'crawler_search_failed',
|
|
27
|
+
'crawler_updated',
|
|
20
28
|
]);
|
|
21
29
|
/**
|
|
22
30
|
* Configuration for a Scrapfly Crawler API job.
|
|
@@ -197,6 +205,30 @@ export class CrawlerConfig {
|
|
|
197
205
|
writable: true,
|
|
198
206
|
value: void 0
|
|
199
207
|
});
|
|
208
|
+
Object.defineProperty(this, "search", {
|
|
209
|
+
enumerable: true,
|
|
210
|
+
configurable: true,
|
|
211
|
+
writable: true,
|
|
212
|
+
value: void 0
|
|
213
|
+
});
|
|
214
|
+
Object.defineProperty(this, "refresh", {
|
|
215
|
+
enumerable: true,
|
|
216
|
+
configurable: true,
|
|
217
|
+
writable: true,
|
|
218
|
+
value: void 0
|
|
219
|
+
});
|
|
220
|
+
Object.defineProperty(this, "refresh_interval", {
|
|
221
|
+
enumerable: true,
|
|
222
|
+
configurable: true,
|
|
223
|
+
writable: true,
|
|
224
|
+
value: void 0
|
|
225
|
+
});
|
|
226
|
+
/**
|
|
227
|
+
* Storage for the anti-bot bypass toggle, under its deprecated name.
|
|
228
|
+
* `unblocker` is an accessor over this same field — see below.
|
|
229
|
+
*
|
|
230
|
+
* @deprecated Use {@link CrawlerConfig.unblocker}. `asp` keeps working forever.
|
|
231
|
+
*/
|
|
200
232
|
Object.defineProperty(this, "asp", {
|
|
201
233
|
enumerable: true,
|
|
202
234
|
configurable: true,
|
|
@@ -282,6 +314,16 @@ export class CrawlerConfig {
|
|
|
282
314
|
if (options.allowed_internal_subdomains && options.allowed_internal_subdomains.length > 250) {
|
|
283
315
|
throw new CrawlerConfigError('allowed_internal_subdomains is limited to 250 entries');
|
|
284
316
|
}
|
|
317
|
+
// The floor decides the cost: a crawl refreshing every minute re-scrapes
|
|
318
|
+
// the whole site 1,440 times a day.
|
|
319
|
+
if (options.refresh_interval !== undefined &&
|
|
320
|
+
(options.refresh_interval < REFRESH_MIN_INTERVAL || options.refresh_interval > REFRESH_MAX_INTERVAL)) {
|
|
321
|
+
throw new CrawlerConfigError(`refresh_interval must be between ${REFRESH_MIN_INTERVAL} and ${REFRESH_MAX_INTERVAL} (seconds, 1 hour to 90 days)`);
|
|
322
|
+
}
|
|
323
|
+
// A period with the feature off would silently never run.
|
|
324
|
+
if (options.refresh_interval !== undefined && !options.refresh) {
|
|
325
|
+
throw new CrawlerConfigError('refresh_interval requires refresh: true');
|
|
326
|
+
}
|
|
285
327
|
// Validate content_formats values
|
|
286
328
|
if (options.content_formats) {
|
|
287
329
|
for (const fmt of options.content_formats) {
|
|
@@ -323,12 +365,34 @@ export class CrawlerConfig {
|
|
|
323
365
|
this.cache_clear = options.cache_clear;
|
|
324
366
|
this.content_formats = options.content_formats;
|
|
325
367
|
this.extraction_rules = options.extraction_rules;
|
|
326
|
-
this.
|
|
368
|
+
this.search = options.search;
|
|
369
|
+
this.refresh = options.refresh;
|
|
370
|
+
this.refresh_interval = options.refresh_interval;
|
|
371
|
+
// An explicitly supplied `asp` always wins; the deprecated alias is only
|
|
372
|
+
// superseded by `unblocker` when it was not supplied at all. `??` and not
|
|
373
|
+
// `||`, so an explicit `false` on either name still reaches the server.
|
|
374
|
+
// Both unset stays `undefined`, which toApiParams drops so the server
|
|
375
|
+
// applies its own default.
|
|
376
|
+
this.asp = options.asp ?? options.unblocker;
|
|
327
377
|
this.proxy_pool = options.proxy_pool;
|
|
328
378
|
this.country = options.country;
|
|
329
379
|
this.webhook_name = options.webhook_name;
|
|
330
380
|
this.webhook_events = options.webhook_events;
|
|
331
381
|
}
|
|
382
|
+
/**
|
|
383
|
+
* Anti-bot bypass toggle — the current name for what used to be `asp`.
|
|
384
|
+
*
|
|
385
|
+
* An accessor over the single `asp` field rather than a second stored
|
|
386
|
+
* property: one storage slot means the two names can never disagree, and
|
|
387
|
+
* `toApiParams` keeps serializing the one field under the wire key `asp`.
|
|
388
|
+
* `undefined` propagates in both directions, so "unset" stays unset.
|
|
389
|
+
*/
|
|
390
|
+
get unblocker() {
|
|
391
|
+
return this.asp;
|
|
392
|
+
}
|
|
393
|
+
set unblocker(value) {
|
|
394
|
+
this.asp = value;
|
|
395
|
+
}
|
|
332
396
|
validateOptions(options) {
|
|
333
397
|
const validKeys = new Set([
|
|
334
398
|
'url',
|
|
@@ -358,6 +422,10 @@ export class CrawlerConfig {
|
|
|
358
422
|
'cache_clear',
|
|
359
423
|
'content_formats',
|
|
360
424
|
'extraction_rules',
|
|
425
|
+
'search',
|
|
426
|
+
'refresh',
|
|
427
|
+
'refresh_interval',
|
|
428
|
+
'unblocker',
|
|
361
429
|
'asp',
|
|
362
430
|
'proxy_pool',
|
|
363
431
|
'country',
|
|
@@ -410,7 +478,9 @@ export class CrawlerConfig {
|
|
|
410
478
|
'cache_clear',
|
|
411
479
|
'content_formats',
|
|
412
480
|
'extraction_rules',
|
|
413
|
-
'
|
|
481
|
+
'search',
|
|
482
|
+
'refresh',
|
|
483
|
+
'refresh_interval',
|
|
414
484
|
'proxy_pool',
|
|
415
485
|
'country',
|
|
416
486
|
'webhook_name',
|
|
@@ -422,6 +492,27 @@ export class CrawlerConfig {
|
|
|
422
492
|
params[key] = v;
|
|
423
493
|
}
|
|
424
494
|
}
|
|
495
|
+
// The anti-bot toggle is serialized apart from the loop above because it is
|
|
496
|
+
// the one field where `false` and "not supplied" must collapse.
|
|
497
|
+
//
|
|
498
|
+
// The key is `asp` and never `unblocker`: the wire key is unchanged for
|
|
499
|
+
// both names. A published package version is immutable and upgraded per
|
|
500
|
+
// installation, so emitting `unblocker` against an API deployment that has
|
|
501
|
+
// not learned that name yet would silently drop a paid feature — the crawl
|
|
502
|
+
// runs, is billed, and comes back blocked. Renaming the emitted key is a
|
|
503
|
+
// separate, later release.
|
|
504
|
+
//
|
|
505
|
+
// Only `true` is emitted. CROSS-SDK SHAPE: the Python, Go and Rust SDKs all
|
|
506
|
+
// omit the key when the feature is off (Python's `asp` is a plain `bool`,
|
|
507
|
+
// Go's is a `bool`, Rust's carries `skip_serializing_if = "is_false"`), so
|
|
508
|
+
// carrying an explicit `asp: false` here would make the same customer
|
|
509
|
+
// intent produce two different POST /crawl bodies depending on which SDK
|
|
510
|
+
// they picked. The API cannot tell the two apart either: it resolves a
|
|
511
|
+
// present-false and an absent pair to the same `false`, so an explicit
|
|
512
|
+
// `asp: false` on the wire buys nothing. One shape, all four SDKs.
|
|
513
|
+
if (this.asp === true) {
|
|
514
|
+
params.asp = true;
|
|
515
|
+
}
|
|
425
516
|
return params;
|
|
426
517
|
}
|
|
427
518
|
}
|
package/esm/crawlerresult.d.ts
CHANGED
|
@@ -55,6 +55,13 @@ export declare class CrawlerStatus {
|
|
|
55
55
|
/** `null` while the crawler is still running; bool once terminal. */
|
|
56
56
|
is_success: boolean | null;
|
|
57
57
|
state: CrawlerState;
|
|
58
|
+
/**
|
|
59
|
+
* `null` unless the crawl was started with `search: true`. Polling this is
|
|
60
|
+
* the webhook-free way to learn when the index became queryable.
|
|
61
|
+
*/
|
|
62
|
+
search: CrawlerSearchState | null;
|
|
63
|
+
/** `null` unless the crawl re-scrapes itself on a period. */
|
|
64
|
+
refresh: CrawlerRefreshState | null;
|
|
58
65
|
constructor(data: Record<string, any>);
|
|
59
66
|
/** True while the crawler is still working (PENDING or RUNNING). */
|
|
60
67
|
get isRunning(): boolean;
|
|
@@ -70,6 +77,280 @@ export declare class CrawlerStatus {
|
|
|
70
77
|
*/
|
|
71
78
|
get progressPct(): number;
|
|
72
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Which retrieval legs a search runs. `hybrid` runs both and merges them with
|
|
82
|
+
* reciprocal rank fusion; it is the server default when the field is omitted.
|
|
83
|
+
*/
|
|
84
|
+
export type CrawlerSearchMode = 'vector' | 'fts' | 'hybrid';
|
|
85
|
+
/** Lifecycle of a crawl's auto-refresh loop. */
|
|
86
|
+
export type CrawlerRefreshStatus = 'DISABLED' | 'SCHEDULED' | 'RUNNING' | 'FAILED';
|
|
87
|
+
/**
|
|
88
|
+
* One row of a crawl's refresh timeline.
|
|
89
|
+
*
|
|
90
|
+
* `sample_updated` / `sample_removed` carry at most ten URLs each. The full
|
|
91
|
+
* lists are never inlined: a 5,000-page crawl would otherwise put 5,000
|
|
92
|
+
* strings into every status poll.
|
|
93
|
+
*/
|
|
94
|
+
export interface CrawlerRefreshEntry {
|
|
95
|
+
at?: string;
|
|
96
|
+
/** Refresh generation this run produced, 1 for the first. */
|
|
97
|
+
generation?: number;
|
|
98
|
+
/** URLs this run discovered that the crawl did not hold. */
|
|
99
|
+
added?: number;
|
|
100
|
+
/** Known URLs whose content fingerprint changed. */
|
|
101
|
+
updated?: number;
|
|
102
|
+
/** Known URLs that no longer exist and were dropped. */
|
|
103
|
+
removed?: number;
|
|
104
|
+
/** Re-scraped with an identical fingerprint: no embedding, no index write. */
|
|
105
|
+
unchanged?: number;
|
|
106
|
+
/** URLs the run could not fetch. They keep their previous content. */
|
|
107
|
+
failed?: number;
|
|
108
|
+
duration_ms?: number;
|
|
109
|
+
search_status?: string;
|
|
110
|
+
error?: string;
|
|
111
|
+
/** Up to ten re-indexed URLs. */
|
|
112
|
+
sample_updated?: string[];
|
|
113
|
+
/** Up to ten dropped URLs. */
|
|
114
|
+
sample_removed?: string[];
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* The `refresh` block of a crawl, carried by `GET /crawl/{uuid}/status` and
|
|
118
|
+
* returned by the three refresh calls.
|
|
119
|
+
*
|
|
120
|
+
* Parsed leniently: older API builds omit the block entirely.
|
|
121
|
+
*/
|
|
122
|
+
export interface CrawlerRefreshState {
|
|
123
|
+
enabled: boolean;
|
|
124
|
+
/** Period between runs in seconds; 0 when disabled. */
|
|
125
|
+
interval_seconds: number;
|
|
126
|
+
status: CrawlerRefreshStatus;
|
|
127
|
+
/** Number of refresh runs completed so far. */
|
|
128
|
+
generation?: number;
|
|
129
|
+
last_run_at?: string;
|
|
130
|
+
/** Absent while refresh is disabled. */
|
|
131
|
+
next_run_at?: string;
|
|
132
|
+
error?: string;
|
|
133
|
+
/**
|
|
134
|
+
* When the run currently in flight began. Only `GET /crawl/{uuid}/status`
|
|
135
|
+
* carries it: the three refresh routes render a typed state that does not
|
|
136
|
+
* declare the field, so it is optional on both paths.
|
|
137
|
+
*/
|
|
138
|
+
started_at?: string;
|
|
139
|
+
/**
|
|
140
|
+
* Consecutive failed runs; reset to 0 by the first run that succeeds. Same
|
|
141
|
+
* route asymmetry as `started_at`.
|
|
142
|
+
*/
|
|
143
|
+
consecutive_failures?: number;
|
|
144
|
+
/** Newest last, capped at the 50 most recent runs. */
|
|
145
|
+
history?: CrawlerRefreshEntry[];
|
|
146
|
+
}
|
|
147
|
+
/** Pages a run actually touched. Zero means the site stood still. */
|
|
148
|
+
export declare function refreshChanged(entry: CrawlerRefreshEntry | null | undefined): number;
|
|
149
|
+
/**
|
|
150
|
+
* Normalize a refresh envelope.
|
|
151
|
+
*
|
|
152
|
+
* The three refresh endpoints answer with the state at the top level;
|
|
153
|
+
* `GET /status` nests it under `refresh`. Accepting both means the SDK never
|
|
154
|
+
* has to guess which call produced the payload.
|
|
155
|
+
*
|
|
156
|
+
* This is a field whitelist, not a spread: a key that is not named here never
|
|
157
|
+
* reaches the caller, whatever the interface declares.
|
|
158
|
+
*/
|
|
159
|
+
export declare function parseCrawlerRefreshState(data: Record<string, any>): CrawlerRefreshState;
|
|
160
|
+
export type CrawlerSearchStatus = 'DISABLED' | 'BUILDING' | 'READY' | 'PARTIAL' | 'FAILED';
|
|
161
|
+
/**
|
|
162
|
+
* The `search` block describing a crawl's index, carried by
|
|
163
|
+
* `GET /crawl/{uuid}/status` and by the two search webhooks.
|
|
164
|
+
*
|
|
165
|
+
* Parsed leniently: the block is sparse on failure and older API builds omit
|
|
166
|
+
* it entirely.
|
|
167
|
+
*/
|
|
168
|
+
export interface CrawlerSearchState {
|
|
169
|
+
status: CrawlerSearchStatus;
|
|
170
|
+
/** Storage path of the index manifest; absent until the artifact is published. */
|
|
171
|
+
manifest?: string;
|
|
172
|
+
/** Crawled pages represented in the index. */
|
|
173
|
+
documents?: number;
|
|
174
|
+
/** Embedded chunks those pages were split into. */
|
|
175
|
+
vectors?: number;
|
|
176
|
+
/** Chunks discarded during the build (embedding failures, oversized rows). */
|
|
177
|
+
dropped?: number;
|
|
178
|
+
queue_depth?: number;
|
|
179
|
+
fragments?: number;
|
|
180
|
+
error?: string;
|
|
181
|
+
built_at?: string;
|
|
182
|
+
/** Vector index type (e.g. `IVF_PQ`); absent below the index threshold. */
|
|
183
|
+
index?: string;
|
|
184
|
+
/**
|
|
185
|
+
* Bumped when a paused crawl resumes and rebuilds. Results from different
|
|
186
|
+
* generations are not comparable.
|
|
187
|
+
*/
|
|
188
|
+
generation?: number;
|
|
189
|
+
}
|
|
190
|
+
/** True when the index can answer a query right now. */
|
|
191
|
+
export declare function isSearchable(state: CrawlerSearchState | null | undefined): boolean;
|
|
192
|
+
/**
|
|
193
|
+
* Normalize a search envelope.
|
|
194
|
+
*
|
|
195
|
+
* `GET /status` nests the block under `search` and so do the two search
|
|
196
|
+
* webhooks; taking the block on its own as well means a caller holding either
|
|
197
|
+
* envelope decodes the same way.
|
|
198
|
+
*
|
|
199
|
+
* This is a field whitelist, not a spread: a key that is not named here never
|
|
200
|
+
* reaches the caller, whatever the interface declares. `status` is the one
|
|
201
|
+
* field with no sane absent value, so a block without it reads as DISABLED.
|
|
202
|
+
*/
|
|
203
|
+
export declare function parseCrawlerSearchState(data: Record<string, any>): CrawlerSearchState;
|
|
204
|
+
/** Per-leg scores behind a result. Which keys appear depends on the mode. */
|
|
205
|
+
export interface CrawlerSearchScores {
|
|
206
|
+
vector?: number;
|
|
207
|
+
fts?: number;
|
|
208
|
+
rrf?: number;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* One matched chunk from `POST /crawl/search`.
|
|
212
|
+
*
|
|
213
|
+
* A result is a chunk, not a page: `chunk_id` orders chunks within one crawled
|
|
214
|
+
* document and `text` is only the matched slice. Expand a hit back to the
|
|
215
|
+
* whole document through `contents_url`, or through `warc_offset`/`warc_end`
|
|
216
|
+
* against the crawl's WARC artifact.
|
|
217
|
+
*/
|
|
218
|
+
export interface CrawlerSearchResult {
|
|
219
|
+
rank: number;
|
|
220
|
+
score: number;
|
|
221
|
+
scores: CrawlerSearchScores;
|
|
222
|
+
crawler_uuid: string;
|
|
223
|
+
url: string;
|
|
224
|
+
title: string | null;
|
|
225
|
+
source_format: string | null;
|
|
226
|
+
content_type: string | null;
|
|
227
|
+
chunk_id: number;
|
|
228
|
+
text: string;
|
|
229
|
+
warc_offset: number | null;
|
|
230
|
+
warc_end: number | null;
|
|
231
|
+
contents_url: string | null;
|
|
232
|
+
}
|
|
233
|
+
/** A crawl that was opened and searched. */
|
|
234
|
+
export interface CrawlerSearchCrawl {
|
|
235
|
+
crawler_uuid: string;
|
|
236
|
+
documents?: number;
|
|
237
|
+
vectors?: number;
|
|
238
|
+
index?: string;
|
|
239
|
+
}
|
|
240
|
+
/** Why a requested crawl contributed nothing. A skip is never fatal. */
|
|
241
|
+
export type CrawlerSkipReason = 'search_not_enabled' | 'search_not_ready' | 'search_failed' | 'search_disabled' | 'incompatible_index' | 'deadline';
|
|
242
|
+
export interface CrawlerSearchSkipped {
|
|
243
|
+
crawler_uuid: string;
|
|
244
|
+
reason: CrawlerSkipReason;
|
|
245
|
+
status?: string;
|
|
246
|
+
}
|
|
247
|
+
/** Fan-out timing and IO counters. */
|
|
248
|
+
export interface CrawlerSearchStats {
|
|
249
|
+
duration_ms?: number;
|
|
250
|
+
crawls_searched?: number;
|
|
251
|
+
candidates?: number;
|
|
252
|
+
gcs_gets?: number;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Wraps the JSON response of `POST /crawl/search`.
|
|
256
|
+
*
|
|
257
|
+
* The envelope states its own completeness: `exact` with most crawls unopened
|
|
258
|
+
* is the normal outcome, because the fan-out proves via an admissible bound
|
|
259
|
+
* that the unopened crawls held nothing better. `partial` means the deadline
|
|
260
|
+
* cut the fan-out short.
|
|
261
|
+
*
|
|
262
|
+
* Strict on the fields the contract always carries, lenient on the rest, so
|
|
263
|
+
* drift in the ranking envelope surfaces at parse time rather than as an
|
|
264
|
+
* empty result list.
|
|
265
|
+
*/
|
|
266
|
+
export declare class CrawlerSearchResponse {
|
|
267
|
+
query: string;
|
|
268
|
+
mode: CrawlerSearchMode;
|
|
269
|
+
limit: number;
|
|
270
|
+
completeness: 'exact' | 'partial';
|
|
271
|
+
results: CrawlerSearchResult[];
|
|
272
|
+
crawls: CrawlerSearchCrawl[];
|
|
273
|
+
skipped: CrawlerSearchSkipped[];
|
|
274
|
+
stats: CrawlerSearchStats;
|
|
275
|
+
crawls_requested: number | null;
|
|
276
|
+
crawls_searched: number | null;
|
|
277
|
+
crawls_pruned_exact: number | null;
|
|
278
|
+
/**
|
|
279
|
+
* The crawls the deadline cut, and the crawls whose index could not be read,
|
|
280
|
+
* named rather than counted: a caller told "3 failed" cannot retry them.
|
|
281
|
+
*/
|
|
282
|
+
crawls_skipped_deadline: string[] | null;
|
|
283
|
+
crawls_failed: CrawlerSearchSkipped[] | null;
|
|
284
|
+
/**
|
|
285
|
+
* `null` until a crawl has actually been opened. Zero is a different claim:
|
|
286
|
+
* it says the best unsearched score was 0, not that no bound exists.
|
|
287
|
+
*/
|
|
288
|
+
theta: number | null;
|
|
289
|
+
max_ub_unsearched: number | null;
|
|
290
|
+
/**
|
|
291
|
+
* Opaque token for the next page, `null` on the last one. Paging is
|
|
292
|
+
* cursor-based: an offset over a partial fan-out would re-run the legs and
|
|
293
|
+
* shift ranks.
|
|
294
|
+
*/
|
|
295
|
+
cursor: string | null;
|
|
296
|
+
constructor(data: Record<string, any>);
|
|
297
|
+
/** True when the ranking is provably complete for the requested crawls. */
|
|
298
|
+
get isExact(): boolean;
|
|
299
|
+
}
|
|
300
|
+
/** One retrieved chunk the answer may cite. */
|
|
301
|
+
export interface CrawlerPromptSource {
|
|
302
|
+
id: number;
|
|
303
|
+
crawler_uuid: string;
|
|
304
|
+
url: string;
|
|
305
|
+
title?: string;
|
|
306
|
+
score?: number;
|
|
307
|
+
}
|
|
308
|
+
/** Payload of the terminal `done` frame. */
|
|
309
|
+
export interface CrawlerPromptDone {
|
|
310
|
+
sources_used?: number[];
|
|
311
|
+
/** Retrieved chunks that did not fit the context and never reached the model. */
|
|
312
|
+
sources_dropped?: number;
|
|
313
|
+
/**
|
|
314
|
+
* True when the model hit its output cap. The answer is still delivered;
|
|
315
|
+
* whether to use it is the caller's call.
|
|
316
|
+
*/
|
|
317
|
+
truncated?: boolean;
|
|
318
|
+
/** Actual charge, including zero. Undefined when the server does not report it. */
|
|
319
|
+
api_credit?: number;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* One decoded frame of the `POST /crawl/prompt` stream.
|
|
323
|
+
*
|
|
324
|
+
* Frames arrive as `source`*, then `token`*, then one `done`, or one `error`
|
|
325
|
+
* which is thrown rather than yielded because generation can fail after
|
|
326
|
+
* tokens have already been delivered.
|
|
327
|
+
*/
|
|
328
|
+
export type CrawlerPromptEvent = {
|
|
329
|
+
event: 'source';
|
|
330
|
+
data: CrawlerPromptSource;
|
|
331
|
+
} | {
|
|
332
|
+
event: 'token';
|
|
333
|
+
data: string;
|
|
334
|
+
} | {
|
|
335
|
+
event: 'done';
|
|
336
|
+
data: CrawlerPromptDone;
|
|
337
|
+
};
|
|
338
|
+
/**
|
|
339
|
+
* Decode the `POST /crawl/prompt` SSE body into typed frames.
|
|
340
|
+
*
|
|
341
|
+
* Only `event:` and `data:` lines matter; `:keepalive` comment frames exist
|
|
342
|
+
* to keep intermediaries from closing an idle connection and carry nothing.
|
|
343
|
+
* Token payloads are JSON strings; every other frame is a JSON object.
|
|
344
|
+
*
|
|
345
|
+
* An `event: error` frame throws rather than yields: the caller is already
|
|
346
|
+
* inside a `for await` and a yielded error object is too easy to ignore after
|
|
347
|
+
* tokens have started arriving.
|
|
348
|
+
*
|
|
349
|
+
* Decoding is explicitly UTF-8 with `stream: true`, because a multi-byte
|
|
350
|
+
* character can straddle two chunks of the body.
|
|
351
|
+
* EOF before a complete `done` frame throws, even after tokens were delivered.
|
|
352
|
+
*/
|
|
353
|
+
export declare function parseCrawlerPromptStream(body: ReadableStream<Uint8Array>): AsyncGenerator<CrawlerPromptEvent, void, undefined>;
|
|
73
354
|
/**
|
|
74
355
|
* Single URL entry from `GET /crawl/{uuid}/urls`.
|
|
75
356
|
*
|
|
@@ -178,7 +459,7 @@ export interface CrawlerWebhookCommon {
|
|
|
178
459
|
* Webhook for the four "lifecycle" events that share an identical payload shape:
|
|
179
460
|
* `crawler_started`, `crawler_stopped`, `crawler_cancelled`, `crawler_finished`.
|
|
180
461
|
*
|
|
181
|
-
* Verified against
|
|
462
|
+
* Verified against the Crawler API webhook payload reference.
|
|
182
463
|
*/
|
|
183
464
|
export interface CrawlerLifecycleWebhook {
|
|
184
465
|
event: 'crawler_started' | 'crawler_stopped' | 'crawler_cancelled' | 'crawler_finished';
|
|
@@ -231,12 +512,64 @@ export interface CrawlerUrlFailedWebhook {
|
|
|
231
512
|
};
|
|
232
513
|
};
|
|
233
514
|
}
|
|
515
|
+
/**
|
|
516
|
+
* Payload for `crawler_search_ready` and `crawler_search_failed`.
|
|
517
|
+
*
|
|
518
|
+
* The index is published after the crawl's own success classification and can
|
|
519
|
+
* fail without the crawl failing, so these are separate from the lifecycle
|
|
520
|
+
* events. They are also the only crawler webhooks emitted without an `action`
|
|
521
|
+
* tag, hence the `Partial` on the common fields.
|
|
522
|
+
*/
|
|
523
|
+
export interface CrawlerSearchWebhook {
|
|
524
|
+
event: 'crawler_search_ready' | 'crawler_search_failed';
|
|
525
|
+
payload: Omit<CrawlerWebhookCommon, 'action'> & {
|
|
526
|
+
action?: string;
|
|
527
|
+
seed_url: string;
|
|
528
|
+
links: {
|
|
529
|
+
status: string;
|
|
530
|
+
};
|
|
531
|
+
search: CrawlerSearchState;
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* Payload for `crawler_updated`, emitted once per auto-refresh run that changed
|
|
536
|
+
* at least one page.
|
|
537
|
+
*
|
|
538
|
+
* A run over a site that stood still, and a run that failed outright, change
|
|
539
|
+
* nothing and are not delivered, so receiving this event is by itself proof of
|
|
540
|
+
* a diff.
|
|
541
|
+
*/
|
|
542
|
+
export interface CrawlerUpdatedWebhook {
|
|
543
|
+
event: 'crawler_updated';
|
|
544
|
+
payload: CrawlerWebhookCommon & {
|
|
545
|
+
seed_url: string;
|
|
546
|
+
links: {
|
|
547
|
+
status: string;
|
|
548
|
+
};
|
|
549
|
+
/**
|
|
550
|
+
* The run, as the same row the refresh timeline keeps. Its sample lists are
|
|
551
|
+
* absent here: this event carries the URLs in `documents` instead, at a
|
|
552
|
+
* higher cap.
|
|
553
|
+
*/
|
|
554
|
+
refresh: CrawlerRefreshEntry;
|
|
555
|
+
documents: {
|
|
556
|
+
/**
|
|
557
|
+
* Re-indexed URLs, added and changed alike. Which of the two a URL was
|
|
558
|
+
* only survives in the counts on `refresh`.
|
|
559
|
+
*/
|
|
560
|
+
updated: string[];
|
|
561
|
+
removed: string[];
|
|
562
|
+
/** Either list was cut at Scrapfly's 100-URL cap; the counts stay whole. */
|
|
563
|
+
truncated: boolean;
|
|
564
|
+
};
|
|
565
|
+
};
|
|
566
|
+
}
|
|
234
567
|
/**
|
|
235
568
|
* Discriminated union of every crawler webhook payload type.
|
|
236
569
|
*
|
|
237
570
|
* Use {@link parseCrawlerWebhook} to safely turn an `unknown` body into one of these.
|
|
238
571
|
*/
|
|
239
|
-
export type CrawlerWebhookPayload = CrawlerLifecycleWebhook | CrawlerUrlVisitedWebhook | CrawlerUrlSkippedWebhook | CrawlerUrlDiscoveredWebhook | CrawlerUrlFailedWebhook;
|
|
572
|
+
export type CrawlerWebhookPayload = CrawlerLifecycleWebhook | CrawlerUrlVisitedWebhook | CrawlerUrlSkippedWebhook | CrawlerUrlDiscoveredWebhook | CrawlerUrlFailedWebhook | CrawlerSearchWebhook | CrawlerUpdatedWebhook;
|
|
240
573
|
/**
|
|
241
574
|
* Parse a raw webhook body (JSON-decoded object) into a typed crawler webhook payload.
|
|
242
575
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crawlerresult.d.ts","sourceRoot":"","sources":["../src/crawlerresult.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"crawlerresult.d.ts","sourceRoot":"","sources":["../src/crawlerresult.ts"],"names":[],"mappings":"AAsDA;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,CAAC;AAE9E;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,cAAc,GACd,YAAY,GACZ,cAAc,GACd,gBAAgB,GAChB,iBAAiB,GACjB,gBAAgB,GAChB,eAAe,GACf,oBAAoB,GACpB,eAAe,CAAC;AAEpB;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B,8CAA8C;IAC9C,YAAY,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,cAAc,EAAE,MAAM,CAAC;IACvB,2CAA2C;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,wEAAwE;IACxE,YAAY,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,aAAa,EAAE,MAAM,CAAC;IACtB,mCAAmC;IACnC,eAAe,EAAE,MAAM,CAAC;IACxB,yEAAyE;IACzE,QAAQ,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,WAAW,EAAE,iBAAiB,GAAG,IAAI,C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