scrapfly-sdk 0.9.0 → 0.10.2
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/esm/batch.d.ts +40 -0
- package/esm/batch.d.ts.map +1 -0
- package/esm/batch.js +251 -0
- package/esm/browserconfig.d.ts +2 -0
- package/esm/browserconfig.d.ts.map +1 -1
- package/esm/browserconfig.js +9 -0
- package/esm/client.d.ts +47 -1
- package/esm/client.d.ts.map +1 -1
- package/esm/client.js +300 -0
- package/esm/main.d.ts +2 -1
- package/esm/main.d.ts.map +1 -1
- package/esm/monitoringconfig.d.ts +36 -0
- package/esm/monitoringconfig.d.ts.map +1 -0
- package/esm/monitoringconfig.js +10 -0
- package/esm/result.d.ts +12 -0
- package/esm/result.d.ts.map +1 -1
- package/package.json +2 -1
- package/script/batch.d.ts +40 -0
- package/script/batch.d.ts.map +1 -0
- package/script/batch.js +256 -0
- package/script/browserconfig.d.ts +2 -0
- package/script/browserconfig.d.ts.map +1 -1
- package/script/browserconfig.js +9 -0
- package/script/client.d.ts +47 -1
- package/script/client.d.ts.map +1 -1
- package/script/client.js +300 -0
- package/script/main.d.ts +2 -1
- package/script/main.d.ts.map +1 -1
- package/script/monitoringconfig.d.ts +36 -0
- package/script/monitoringconfig.d.ts.map +1 -0
- package/script/monitoringconfig.js +13 -0
- package/script/result.d.ts +12 -0
- package/script/result.d.ts.map +1 -1
package/script/client.js
CHANGED
|
@@ -32,6 +32,7 @@ const browserconfig_js_1 = require("./browserconfig.js");
|
|
|
32
32
|
const result_js_1 = require("./result.js");
|
|
33
33
|
const logger_js_1 = require("./logger.js");
|
|
34
34
|
const crawlerresult_js_1 = require("./crawlerresult.js");
|
|
35
|
+
const monitoringconfig_js_1 = require("./monitoringconfig.js");
|
|
35
36
|
class ScrapflyClient {
|
|
36
37
|
constructor(options) {
|
|
37
38
|
Object.defineProperty(this, "HOST", {
|
|
@@ -255,6 +256,179 @@ class ScrapflyClient {
|
|
|
255
256
|
}
|
|
256
257
|
return data;
|
|
257
258
|
}
|
|
259
|
+
/**
|
|
260
|
+
* Classify an already-fetched HTTP response for anti-bot blocking.
|
|
261
|
+
*
|
|
262
|
+
* Runs the same anti-bot detection pipeline used by live Scrapfly
|
|
263
|
+
* scrapes against a response you already have (from your own proxy,
|
|
264
|
+
* cache, etc). 1 API credit per call. See
|
|
265
|
+
* https://scrapfly.io/docs/scrape-api/classify for the full contract.
|
|
266
|
+
*/
|
|
267
|
+
async classify(options) {
|
|
268
|
+
if (!options || !options.url) {
|
|
269
|
+
throw new errors.ScrapflyError('classify: url is required');
|
|
270
|
+
}
|
|
271
|
+
if (typeof options.statusCode !== 'number' ||
|
|
272
|
+
options.statusCode < 100 ||
|
|
273
|
+
options.statusCode > 599) {
|
|
274
|
+
throw new errors.ScrapflyError('classify: status_code must be a valid HTTP status in [100, 599]');
|
|
275
|
+
}
|
|
276
|
+
const body = {
|
|
277
|
+
url: options.url,
|
|
278
|
+
status_code: options.statusCode,
|
|
279
|
+
method: options.method ?? 'GET',
|
|
280
|
+
};
|
|
281
|
+
if (options.headers && Object.keys(options.headers).length > 0) {
|
|
282
|
+
const hdrs = {};
|
|
283
|
+
for (const [k, v] of Object.entries(options.headers)) {
|
|
284
|
+
hdrs[String(k)] = String(v);
|
|
285
|
+
}
|
|
286
|
+
body.headers = hdrs;
|
|
287
|
+
}
|
|
288
|
+
if (options.body !== undefined && options.body !== null) {
|
|
289
|
+
body.body = options.body;
|
|
290
|
+
}
|
|
291
|
+
const url = new URL(this.HOST + '/classify');
|
|
292
|
+
url.search = new URLSearchParams({ key: this.key }).toString();
|
|
293
|
+
const response = await this.fetch({
|
|
294
|
+
url: url.toString(),
|
|
295
|
+
method: 'POST',
|
|
296
|
+
headers: {
|
|
297
|
+
'user-agent': this.ua,
|
|
298
|
+
'accept-encoding': 'gzip, deflate, br',
|
|
299
|
+
accept: 'application/json',
|
|
300
|
+
'content-type': 'application/json',
|
|
301
|
+
},
|
|
302
|
+
body: JSON.stringify(body),
|
|
303
|
+
});
|
|
304
|
+
const data = (await response.json());
|
|
305
|
+
if (response.status >= 400 || 'error_id' in data) {
|
|
306
|
+
if (response.status == 401) {
|
|
307
|
+
throw new errors.BadApiKeyError(JSON.stringify(data));
|
|
308
|
+
}
|
|
309
|
+
throw new errors.ApiHttpClientError(JSON.stringify(data));
|
|
310
|
+
}
|
|
311
|
+
return {
|
|
312
|
+
blocked: Boolean(data.blocked),
|
|
313
|
+
antibot: (data.antibot ?? null),
|
|
314
|
+
cost: Number(data.cost ?? 0),
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
// ── Monitoring API (Enterprise+ plan only) ──────────────────────
|
|
318
|
+
// The Monitoring API exposes per-product aggregates and per-target
|
|
319
|
+
// timeseries. Web Scraping / Screenshot / Extraction / Crawler share
|
|
320
|
+
// one shape (request-based) but live under different URL prefixes;
|
|
321
|
+
// Cloud Browser is session-based and exposes a distinct shape.
|
|
322
|
+
// See https://scrapfly.io/docs/monitoring#api
|
|
323
|
+
async monitoringRequest(path, params) {
|
|
324
|
+
const url = new URL(this.HOST + path);
|
|
325
|
+
url.search = new URLSearchParams(params).toString();
|
|
326
|
+
const response = await this.fetch({
|
|
327
|
+
url: url.toString(),
|
|
328
|
+
method: 'GET',
|
|
329
|
+
headers: {
|
|
330
|
+
'user-agent': this.ua,
|
|
331
|
+
'accept-encoding': 'gzip, deflate, br',
|
|
332
|
+
accept: 'application/json',
|
|
333
|
+
},
|
|
334
|
+
});
|
|
335
|
+
const data = (await response.json());
|
|
336
|
+
if ('error_id' in data) {
|
|
337
|
+
if (data.http_code == 401 || response.status == 401) {
|
|
338
|
+
throw new errors.BadApiKeyError(JSON.stringify(data));
|
|
339
|
+
}
|
|
340
|
+
throw new errors.ApiHttpClientError(JSON.stringify(data));
|
|
341
|
+
}
|
|
342
|
+
return data;
|
|
343
|
+
}
|
|
344
|
+
buildMetricsParams(options) {
|
|
345
|
+
const params = {
|
|
346
|
+
key: this.key,
|
|
347
|
+
format: options.format ?? 'structured',
|
|
348
|
+
};
|
|
349
|
+
if (options.period !== undefined)
|
|
350
|
+
params.period = options.period;
|
|
351
|
+
if (options.aggregation !== undefined && options.aggregation.length > 0) {
|
|
352
|
+
params.aggregation = options.aggregation.join(',');
|
|
353
|
+
}
|
|
354
|
+
if (options.includeWebhook)
|
|
355
|
+
params.include_webhook = 'true';
|
|
356
|
+
return params;
|
|
357
|
+
}
|
|
358
|
+
buildTargetParams(options) {
|
|
359
|
+
if ((options.start && !options.end) || (!options.start && options.end)) {
|
|
360
|
+
throw new Error('You must provide both start and end date');
|
|
361
|
+
}
|
|
362
|
+
const params = {
|
|
363
|
+
key: this.key,
|
|
364
|
+
domain: options.domain,
|
|
365
|
+
group_subdomain: String(options.groupSubdomain ?? false),
|
|
366
|
+
};
|
|
367
|
+
if (options.start && options.end) {
|
|
368
|
+
params.start = (0, monitoringconfig_js_1.formatMonitoringDate)(options.start);
|
|
369
|
+
params.end = (0, monitoringconfig_js_1.formatMonitoringDate)(options.end);
|
|
370
|
+
}
|
|
371
|
+
else if (options.period !== undefined) {
|
|
372
|
+
params.period = options.period;
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
params.period = 'last24h';
|
|
376
|
+
}
|
|
377
|
+
if (options.includeWebhook)
|
|
378
|
+
params.include_webhook = 'true';
|
|
379
|
+
return params;
|
|
380
|
+
}
|
|
381
|
+
// ── Web Scraping API (existing — kept for backward compat) ──────
|
|
382
|
+
async getMonitoringMetrics(options = {}) {
|
|
383
|
+
return this.monitoringRequest('/scrape/monitoring/metrics', this.buildMetricsParams(options));
|
|
384
|
+
}
|
|
385
|
+
async getMonitoringTargetMetrics(options) {
|
|
386
|
+
return this.monitoringRequest('/scrape/monitoring/metrics/target', this.buildTargetParams(options));
|
|
387
|
+
}
|
|
388
|
+
// ── Screenshot API ───────────────────────────────────────────────
|
|
389
|
+
async getScreenshotMonitoringMetrics(options = {}) {
|
|
390
|
+
return this.monitoringRequest('/screenshot/monitoring/metrics', this.buildMetricsParams(options));
|
|
391
|
+
}
|
|
392
|
+
async getScreenshotMonitoringTargetMetrics(options) {
|
|
393
|
+
return this.monitoringRequest('/screenshot/monitoring/metrics/target', this.buildTargetParams(options));
|
|
394
|
+
}
|
|
395
|
+
// ── Extraction API ───────────────────────────────────────────────
|
|
396
|
+
async getExtractionMonitoringMetrics(options = {}) {
|
|
397
|
+
return this.monitoringRequest('/extraction/monitoring/metrics', this.buildMetricsParams(options));
|
|
398
|
+
}
|
|
399
|
+
async getExtractionMonitoringTargetMetrics(options) {
|
|
400
|
+
return this.monitoringRequest('/extraction/monitoring/metrics/target', this.buildTargetParams(options));
|
|
401
|
+
}
|
|
402
|
+
// ── Crawler API ──────────────────────────────────────────────────
|
|
403
|
+
async getCrawlerMonitoringMetrics(options = {}) {
|
|
404
|
+
return this.monitoringRequest('/crawl/monitoring/metrics', this.buildMetricsParams(options));
|
|
405
|
+
}
|
|
406
|
+
async getCrawlerMonitoringTargetMetrics(options) {
|
|
407
|
+
return this.monitoringRequest('/crawl/monitoring/metrics/target', this.buildTargetParams(options));
|
|
408
|
+
}
|
|
409
|
+
// ── Cloud Browser API (session-based, distinct shape) ────────────
|
|
410
|
+
async getBrowserMonitoringMetrics(options = {}) {
|
|
411
|
+
return this.monitoringRequest('/browser/monitoring/metrics', this.buildBrowserParams(options));
|
|
412
|
+
}
|
|
413
|
+
async getBrowserMonitoringTimeseries(options = {}) {
|
|
414
|
+
return this.monitoringRequest('/browser/monitoring/metrics/timeseries', this.buildBrowserParams(options));
|
|
415
|
+
}
|
|
416
|
+
buildBrowserParams(options) {
|
|
417
|
+
if ((options.start && !options.end) || (!options.start && options.end)) {
|
|
418
|
+
throw new Error('You must provide both start and end date');
|
|
419
|
+
}
|
|
420
|
+
const params = { key: this.key };
|
|
421
|
+
if (options.start && options.end) {
|
|
422
|
+
params.start = (0, monitoringconfig_js_1.formatMonitoringDate)(options.start);
|
|
423
|
+
params.end = (0, monitoringconfig_js_1.formatMonitoringDate)(options.end);
|
|
424
|
+
}
|
|
425
|
+
else if (options.period !== undefined) {
|
|
426
|
+
params.period = options.period;
|
|
427
|
+
}
|
|
428
|
+
if (options.proxyPool !== undefined)
|
|
429
|
+
params.proxy_pool = options.proxyPool;
|
|
430
|
+
return params;
|
|
431
|
+
}
|
|
258
432
|
/**
|
|
259
433
|
* Issue a single scrape command from a given scrape configuration
|
|
260
434
|
*/
|
|
@@ -408,6 +582,130 @@ class ScrapflyClient {
|
|
|
408
582
|
yield resultOrError;
|
|
409
583
|
}
|
|
410
584
|
}
|
|
585
|
+
/**
|
|
586
|
+
* Issue a single batch request against POST /scrape/batch and
|
|
587
|
+
* stream results back as each scrape completes.
|
|
588
|
+
*
|
|
589
|
+
* Yields `[correlation_id, resultOrError]` tuples. Results arrive
|
|
590
|
+
* OUT OF ORDER — whichever scrape finishes first is yielded first.
|
|
591
|
+
* Every ScrapeConfig MUST carry a unique `correlation_id`; missing
|
|
592
|
+
* or duplicate values are caught client-side before the batch is
|
|
593
|
+
* sent (so callers fail fast on misconfiguration).
|
|
594
|
+
*
|
|
595
|
+
* Usage:
|
|
596
|
+
* for await (const [id, result] of client.scrapeBatch(configs)) {
|
|
597
|
+
* if (result instanceof errors.ScrapflyError) { ... }
|
|
598
|
+
* else { ... }
|
|
599
|
+
* }
|
|
600
|
+
*/
|
|
601
|
+
async *scrapeBatch(configs, options = {}) {
|
|
602
|
+
const wireFormat = options.format ?? 'json';
|
|
603
|
+
const acceptHeader = wireFormat === 'msgpack' ? 'application/msgpack' : 'application/json';
|
|
604
|
+
// Lazy-load the parser to avoid pulling Web Streams polyfills
|
|
605
|
+
// into the module graph for users who never call scrapeBatch.
|
|
606
|
+
const { iterBatchParts, decodePartBody, buildProxifiedResponseFromPart } = await Promise.resolve().then(() => __importStar(require('./batch.js')));
|
|
607
|
+
if (!configs || configs.length === 0) {
|
|
608
|
+
throw new errors.ScrapflyError('scrapeBatch: configs list is empty');
|
|
609
|
+
}
|
|
610
|
+
if (configs.length > 100) {
|
|
611
|
+
throw new errors.ScrapflyError(`scrapeBatch: max 100 configs per batch (got ${configs.length})`);
|
|
612
|
+
}
|
|
613
|
+
const seen = new Map();
|
|
614
|
+
const configByCorrelation = new Map();
|
|
615
|
+
const bodyConfigs = [];
|
|
616
|
+
for (let i = 0; i < configs.length; i++) {
|
|
617
|
+
const cfg = configs[i];
|
|
618
|
+
const correlationId = cfg.correlation_id;
|
|
619
|
+
if (!correlationId) {
|
|
620
|
+
throw new errors.ScrapflyError(`scrapeBatch: configs[${i}] is missing correlation_id (required for matching streamed parts)`);
|
|
621
|
+
}
|
|
622
|
+
if (seen.has(correlationId)) {
|
|
623
|
+
throw new errors.ScrapflyError(`scrapeBatch: correlation_id ${JSON.stringify(correlationId)} reused by configs[${seen.get(correlationId)}] and configs[${i}]`);
|
|
624
|
+
}
|
|
625
|
+
seen.set(correlationId, i);
|
|
626
|
+
configByCorrelation.set(correlationId, cfg);
|
|
627
|
+
// Reuse toApiParams to guarantee wire parity with /scrape.
|
|
628
|
+
// Drop `key` (batch key is in the URL).
|
|
629
|
+
const params = cfg.toApiParams({ key: this.key });
|
|
630
|
+
delete params.key;
|
|
631
|
+
bodyConfigs.push(params);
|
|
632
|
+
}
|
|
633
|
+
const url = new URL(this.HOST + '/scrape/batch');
|
|
634
|
+
url.search = new URLSearchParams({ key: this.key }).toString();
|
|
635
|
+
const response = await this.fetch({
|
|
636
|
+
url: url.toString(),
|
|
637
|
+
method: 'POST',
|
|
638
|
+
headers: {
|
|
639
|
+
'user-agent': this.ua,
|
|
640
|
+
'content-type': 'application/json',
|
|
641
|
+
// gzip is universally supported in fetch runtimes; skip zstd
|
|
642
|
+
// for streaming compatibility (Node < 22 / browsers don't
|
|
643
|
+
// auto-decompress zstd yet).
|
|
644
|
+
'accept-encoding': 'gzip',
|
|
645
|
+
accept: acceptHeader,
|
|
646
|
+
},
|
|
647
|
+
body: JSON.stringify({ configs: bodyConfigs }),
|
|
648
|
+
});
|
|
649
|
+
if (response.status !== 200) {
|
|
650
|
+
const body = await response.text();
|
|
651
|
+
let parsed;
|
|
652
|
+
try {
|
|
653
|
+
parsed = JSON.parse(body);
|
|
654
|
+
}
|
|
655
|
+
catch {
|
|
656
|
+
parsed = { message: body, code: 'ERR::API::INTERNAL_ERROR' };
|
|
657
|
+
}
|
|
658
|
+
throw new errors.ApiHttpServerError(`scrapeBatch: ${parsed.code ?? 'error'} (HTTP ${response.status}): ${parsed.message ?? body}`);
|
|
659
|
+
}
|
|
660
|
+
for await (const part of iterBatchParts(response)) {
|
|
661
|
+
const correlationId = part.headers['x-scrapfly-correlation-id'] ?? '';
|
|
662
|
+
// Proxified-response parts: the part body is the raw upstream
|
|
663
|
+
// bytes, not a JSON envelope. Surface a native fetch Response
|
|
664
|
+
// so callers get the same shape as a single proxified scrape
|
|
665
|
+
// (which returns Response from .scrape()).
|
|
666
|
+
if (part.headers['x-scrapfly-proxified'] === 'true') {
|
|
667
|
+
try {
|
|
668
|
+
const proxResponse = buildProxifiedResponseFromPart(part);
|
|
669
|
+
yield [correlationId, proxResponse];
|
|
670
|
+
}
|
|
671
|
+
catch (proxErr) {
|
|
672
|
+
yield [
|
|
673
|
+
correlationId,
|
|
674
|
+
new errors.ScrapflyError(`scrapeBatch: failed to build proxified response for correlation_id=${JSON.stringify(correlationId)}: ${proxErr}`),
|
|
675
|
+
];
|
|
676
|
+
}
|
|
677
|
+
continue;
|
|
678
|
+
}
|
|
679
|
+
let parsed;
|
|
680
|
+
try {
|
|
681
|
+
parsed = decodePartBody(part);
|
|
682
|
+
}
|
|
683
|
+
catch (decodeErr) {
|
|
684
|
+
yield [
|
|
685
|
+
correlationId,
|
|
686
|
+
new errors.ScrapflyError(`scrapeBatch: failed to decode part for correlation_id=${JSON.stringify(correlationId)}: ${decodeErr}`),
|
|
687
|
+
];
|
|
688
|
+
continue;
|
|
689
|
+
}
|
|
690
|
+
try {
|
|
691
|
+
const result = new result_js_1.ScrapeResult({
|
|
692
|
+
config: parsed.config,
|
|
693
|
+
context: parsed.context,
|
|
694
|
+
result: parsed.result,
|
|
695
|
+
uuid: parsed.uuid,
|
|
696
|
+
});
|
|
697
|
+
yield [correlationId, result];
|
|
698
|
+
}
|
|
699
|
+
catch (resultErr) {
|
|
700
|
+
yield [
|
|
701
|
+
correlationId,
|
|
702
|
+
resultErr instanceof errors.ScrapflyError
|
|
703
|
+
? resultErr
|
|
704
|
+
: new errors.ScrapflyError(`scrapeBatch: ${resultErr}`),
|
|
705
|
+
];
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
}
|
|
411
709
|
/**
|
|
412
710
|
* Save screenshot response to a file
|
|
413
711
|
*/
|
|
@@ -944,6 +1242,8 @@ class ScrapflyClient {
|
|
|
944
1242
|
jsonBody.body = options.body;
|
|
945
1243
|
if (options.method)
|
|
946
1244
|
jsonBody.method = options.method;
|
|
1245
|
+
if (options.enable_mcp !== undefined)
|
|
1246
|
+
jsonBody.enable_mcp = options.enable_mcp;
|
|
947
1247
|
const url = new URL(this.cloudBrowserApiHost + '/unblock');
|
|
948
1248
|
url.searchParams.set('key', this.key);
|
|
949
1249
|
const response = await this.fetch({
|
package/script/main.d.ts
CHANGED
|
@@ -6,12 +6,13 @@ export { BrowserConfig, ProxyPool, OperatingSystem } from './browserconfig.js';
|
|
|
6
6
|
export type { BrowserConfigOptions } from './browserconfig.js';
|
|
7
7
|
export * as errors from './errors.js';
|
|
8
8
|
export { ExtractionResult, ScrapeResult, ScreenshotResult } from './result.js';
|
|
9
|
-
export type { AccountData, ConfigData, ContextData, ResultData, ScreenshotMetadata } from './result.js';
|
|
9
|
+
export type { AccountData, ClassifyOptions, ClassifyResult, ConfigData, ContextData, ResultData, ScreenshotMetadata } from './result.js';
|
|
10
10
|
export { CrawlerConfig } from './crawlerconfig.js';
|
|
11
11
|
export type { CrawlerConfigOptions, CrawlerContentFormat, CrawlerWebhookEventName } from './crawlerconfig.js';
|
|
12
12
|
export { Crawl } from './crawl.js';
|
|
13
13
|
export { CrawlerArtifact, CrawlerContents, CrawlerStatus, CrawlerUrls, parseCrawlerWebhook, } from './crawlerresult.js';
|
|
14
14
|
export type { CrawlerArtifactType, CrawlerLifecycleWebhook, CrawlerState, CrawlerStatusValue, CrawlerStopReason, CrawlerUrlDiscoveredWebhook, CrawlerUrlEntry, CrawlerUrlFailedWebhook, CrawlerUrlSkippedWebhook, CrawlerUrlVisitedWebhook, CrawlerWebhookCommon, CrawlerWebhookPayload, } from './crawlerresult.js';
|
|
15
|
+
export type { CloudBrowserMonitoringOptions, MonitoringAggregation, MonitoringDataFormat, MonitoringMetricsOptions, MonitoringPeriod, MonitoringTargetMetricsOptions, } from './monitoringconfig.js';
|
|
15
16
|
export { log } from './logger.js';
|
|
16
17
|
export { createServer, verifySignature } from './webhookserver.js';
|
|
17
18
|
//# sourceMappingURL=main.d.ts.map
|
package/script/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EACL,MAAM,IAAI,YAAY,EACtB,YAAY,IAAI,mBAAmB,EACnC,YAAY,EACZ,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,MAAM,IAAI,gBAAgB,EAC1B,OAAO,IAAI,iBAAiB,EAC5B,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC/E,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE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,iBAAiB,EACjB,2BAA2B,EAC3B,eAAe,EACf,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EACV,6BAA6B,EAC7B,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,gBAAgB,EAChB,8BAA8B,GAC/B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export type MonitoringDataFormat = 'structured' | 'prometheus';
|
|
2
|
+
export type MonitoringPeriod = 'subscription' | 'last7d' | 'last24h' | 'last1h' | 'last5m';
|
|
3
|
+
export type MonitoringAggregation = 'account' | 'project' | 'target';
|
|
4
|
+
export interface MonitoringMetricsOptions {
|
|
5
|
+
format?: MonitoringDataFormat;
|
|
6
|
+
period?: MonitoringPeriod;
|
|
7
|
+
aggregation?: MonitoringAggregation[];
|
|
8
|
+
/** Fold WEBHOOK origin events (callbacks executed by the webhook
|
|
9
|
+
* worker) into this product's totals. Defaults to false to match
|
|
10
|
+
* the dashboard's default view. */
|
|
11
|
+
includeWebhook?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface MonitoringTargetMetricsOptions {
|
|
14
|
+
domain: string;
|
|
15
|
+
groupSubdomain?: boolean;
|
|
16
|
+
period?: MonitoringPeriod;
|
|
17
|
+
start?: Date;
|
|
18
|
+
end?: Date;
|
|
19
|
+
/** Fold WEBHOOK origin events into this product's totals. */
|
|
20
|
+
includeWebhook?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/** Options for the Cloud Browser monitoring endpoints. Cloud Browser
|
|
23
|
+
* is session-based (one allocation = one long-lived browser, billed
|
|
24
|
+
* by runtime + bandwidth) and exposes a distinct shape from the
|
|
25
|
+
* request-based products. There is no `domain`/`target` and no
|
|
26
|
+
* `includeWebhook`. */
|
|
27
|
+
export interface CloudBrowserMonitoringOptions {
|
|
28
|
+
period?: MonitoringPeriod;
|
|
29
|
+
/** Optional filter to a single proxy pool
|
|
30
|
+
* (e.g. `public_datacenter_pool`, `public_residential_pool`, `byop`). */
|
|
31
|
+
proxyPool?: string;
|
|
32
|
+
start?: Date;
|
|
33
|
+
end?: Date;
|
|
34
|
+
}
|
|
35
|
+
export declare function formatMonitoringDate(d: Date): string;
|
|
36
|
+
//# sourceMappingURL=monitoringconfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monitoringconfig.d.ts","sourceRoot":"","sources":["../src/monitoringconfig.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG,YAAY,GAAG,YAAY,CAAC;AAE/D,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE3F,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAErE,MAAM,WAAW,wBAAwB;IACvC,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,WAAW,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACtC;;uCAEmC;IACnC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,8BAA8B;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,6DAA6D;IAC7D,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;uBAIuB;AACvB,MAAM,WAAW,6BAA6B;IAC5C,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B;8EAC0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,GAAG,CAAC,EAAE,IAAI,CAAC;CACZ;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,CASpD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatMonitoringDate = formatMonitoringDate;
|
|
4
|
+
function formatMonitoringDate(d) {
|
|
5
|
+
const pad = (n) => n.toString().padStart(2, '0');
|
|
6
|
+
const y = d.getUTCFullYear();
|
|
7
|
+
const mo = pad(d.getUTCMonth() + 1);
|
|
8
|
+
const da = pad(d.getUTCDate());
|
|
9
|
+
const h = pad(d.getUTCHours());
|
|
10
|
+
const mi = pad(d.getUTCMinutes());
|
|
11
|
+
const s = pad(d.getUTCSeconds());
|
|
12
|
+
return `${y}-${mo}-${da} ${h}:${mi}:${s}`;
|
|
13
|
+
}
|
package/script/result.d.ts
CHANGED
|
@@ -205,6 +205,18 @@ export declare class ScrapeResult {
|
|
|
205
205
|
get selector(): cheerio.CheerioAPI;
|
|
206
206
|
}
|
|
207
207
|
export type ScrapeResultData = Record<string | number | symbol, never>;
|
|
208
|
+
export type ClassifyOptions = {
|
|
209
|
+
url: string;
|
|
210
|
+
statusCode: number;
|
|
211
|
+
headers?: Record<string, string>;
|
|
212
|
+
body?: string | null;
|
|
213
|
+
method?: string;
|
|
214
|
+
};
|
|
215
|
+
export type ClassifyResult = {
|
|
216
|
+
blocked: boolean;
|
|
217
|
+
antibot: string | null;
|
|
218
|
+
cost: number;
|
|
219
|
+
};
|
|
208
220
|
export type AccountData = {
|
|
209
221
|
account: {
|
|
210
222
|
account_id: string;
|
package/script/result.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../src/result.ts"],"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