@spider-cloud/spider-client 0.1.36 → 0.1.38

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.
Files changed (2) hide show
  1. package/dist/config.d.ts +40 -1
  2. package/package.json +2 -2
package/dist/config.d.ts CHANGED
@@ -164,6 +164,20 @@ export declare enum RedirectPolicy {
164
164
  Loose = "Loose",
165
165
  Strict = "Strict"
166
166
  }
167
+ /**
168
+ * Proxy pool selection for outbound request routing.
169
+ * Choose a pool based on your use case (e.g., stealth, speed, or stability).
170
+ *
171
+ * - 'residential' → cost-effective entry-level residential pool
172
+ * - 'residential_fast' → faster residential pool for higher throughput
173
+ * - 'residential_static' → static residential IPs, rotated daily
174
+ * - 'mobile' → 4G/5G mobile proxies for maximum evasion
175
+ * - 'isp' → ISP-grade residential (alias: 'datacenter')
176
+ * - 'residential_premium' → low-latency premium IPs
177
+ * - 'residential_core' → balanced plan (quality vs. cost)
178
+ * - 'residential_plus' → largest and highest quality core pool
179
+ */
180
+ export type Proxy = "residential" | "residential_fast" | "residential_static" | "mobile" | "isp" | "residential_premium" | "residential_core" | "residential_plus";
167
181
  /**
168
182
  * Represents the options available for making a spider request.
169
183
  */
@@ -323,7 +337,7 @@ export interface SpiderParams {
323
337
  /**
324
338
  * The timeout for the request, in milliseconds.
325
339
  */
326
- request_timeout?: number;
340
+ request_timeout?: Timeout;
327
341
  /**
328
342
  * Specifies whether to run the request in the background.
329
343
  */
@@ -375,6 +389,31 @@ export interface SpiderParams {
375
389
  * Evaluates given script in every frame upon creation (before loading frame's scripts).
376
390
  */
377
391
  evaluate_on_new_document?: string;
392
+ /**
393
+ * Runs the request using lite_mode:Lite mode reduces data transfer costs by 70%, with trade-offs in speed, accuracy,
394
+ * geo-targeting, and reliability. It’s best suited for non-urgent data collection or when
395
+ * targeting websites with minimal anti-bot protections.
396
+ */
397
+ lite_mode?: boolean;
398
+ /**
399
+ * Proxy pool selection for outbound request routing.
400
+ * Choose a pool based on your use case (e.g., stealth, speed, or stability).
401
+ *
402
+ * - 'residential' → cost-effective entry-level residential pool
403
+ * - 'residential_fast' → faster residential pool for higher throughput
404
+ * - 'residential_static' → static residential IPs, rotated daily
405
+ * - 'mobile' → 4G/5G mobile proxies for maximum evasion
406
+ * - 'isp' → ISP-grade residential (alias: 'datacenter')
407
+ * - 'residential_premium' → low-latency premium IPs
408
+ * - 'residential_core' → balanced plan (quality vs. cost)
409
+ * - 'residential_plus' → largest and highest quality core pool
410
+ */
411
+ proxy?: Proxy;
412
+ /**
413
+ * Use a remote proxy at ~70% reduced cost for file downloads.
414
+ * This requires bringing your own proxy (e.g., static IP tunnel).
415
+ */
416
+ remote_proxy?: string;
378
417
  }
379
418
  export type SpiderCoreResponse = {
380
419
  content?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spider-cloud/spider-client",
3
- "version": "0.1.36",
3
+ "version": "0.1.38",
4
4
  "description": "Isomorphic Javascript SDK for Spider Cloud services",
5
5
  "scripts": {
6
6
  "test": "node --import tsx --test __tests__/*test.ts",
@@ -29,6 +29,6 @@
29
29
  "typescript": "5.7.3"
30
30
  },
31
31
  "dependencies": {
32
- "exponential-backoff": "^3.1.1"
32
+ "exponential-backoff": "^3.1.2"
33
33
  }
34
34
  }