surfsky 0.0.8 → 0.0.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/dist/index.d.ts CHANGED
@@ -45,6 +45,21 @@ declare const regionalPool: z.ZodEnum<{
45
45
  western: "western";
46
46
  westeurope: "westeurope";
47
47
  }>;
48
+ declare const captchaType: z.ZodEnum<{
49
+ aws_waf: "aws_waf";
50
+ bls: "bls";
51
+ click: "click";
52
+ datadome: "datadome";
53
+ datadome_audio: "datadome_audio";
54
+ datadome_click: "datadome_click";
55
+ funcaptcha: "funcaptcha";
56
+ geetest: "geetest";
57
+ hcaptcha: "hcaptcha";
58
+ image: "image";
59
+ perimeterx: "perimeterx";
60
+ recaptcha: "recaptcha";
61
+ turnstile: "turnstile";
62
+ }>;
48
63
  type OS = z.infer<typeof os>;
49
64
  type Arch = z.infer<typeof arch>;
50
65
  type DeviceType = z.infer<typeof deviceType>;
@@ -52,6 +67,7 @@ type WaitUntil = z.infer<typeof waitUntil>;
52
67
  type ProxyType = z.infer<typeof proxyType>;
53
68
  type ProfileOrdering = z.infer<typeof profileOrdering>;
54
69
  type RegionalPool = z.infer<typeof regionalPool>;
70
+ type CaptchaType = z.infer<typeof captchaType>;
55
71
  type ExportFormat = "json" | "netscape";
56
72
  type MouseButton = "left" | "right" | "middle";
57
73
  type KeyModifier = "Alt" | "Control" | "Meta" | "Shift";
@@ -178,6 +194,28 @@ declare const browserSettings: z.ZodObject<{
178
194
  cache_key: z.ZodOptional<z.ZodString>;
179
195
  }, z.core.$strict>;
180
196
  type BrowserSettings = z.infer<typeof browserSettings>;
197
+ declare const antiCaptcha: z.ZodObject<{
198
+ enabled: z.ZodOptional<z.ZodBoolean>;
199
+ auto_captcha_types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
200
+ aws_waf: "aws_waf";
201
+ bls: "bls";
202
+ click: "click";
203
+ datadome: "datadome";
204
+ datadome_audio: "datadome_audio";
205
+ datadome_click: "datadome_click";
206
+ funcaptcha: "funcaptcha";
207
+ geetest: "geetest";
208
+ hcaptcha: "hcaptcha";
209
+ image: "image";
210
+ perimeterx: "perimeterx";
211
+ recaptcha: "recaptcha";
212
+ turnstile: "turnstile";
213
+ }>>>;
214
+ gemini_api_key: z.ZodOptional<z.ZodString>;
215
+ disable_external_providers: z.ZodOptional<z.ZodBoolean>;
216
+ external_providers_initially_enabled: z.ZodOptional<z.ZodBoolean>;
217
+ }, z.core.$strict>;
218
+ type AntiCaptcha = z.infer<typeof antiCaptcha>;
181
219
  declare const shared: z.ZodObject<{
182
220
  tier: z.ZodLiteral<"shared">;
183
221
  country: z.ZodOptional<z.ZodString>;
@@ -371,6 +409,27 @@ declare const oneTimeStartRequest: z.ZodObject<{
371
409
  cache_enabled: z.ZodOptional<z.ZodBoolean>;
372
410
  cache_key: z.ZodOptional<z.ZodString>;
373
411
  }, z.core.$strict>>;
412
+ anti_captcha: z.ZodOptional<z.ZodObject<{
413
+ enabled: z.ZodOptional<z.ZodBoolean>;
414
+ auto_captcha_types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
415
+ aws_waf: "aws_waf";
416
+ bls: "bls";
417
+ click: "click";
418
+ datadome: "datadome";
419
+ datadome_audio: "datadome_audio";
420
+ datadome_click: "datadome_click";
421
+ funcaptcha: "funcaptcha";
422
+ geetest: "geetest";
423
+ hcaptcha: "hcaptcha";
424
+ image: "image";
425
+ perimeterx: "perimeterx";
426
+ recaptcha: "recaptcha";
427
+ turnstile: "turnstile";
428
+ }>>>;
429
+ gemini_api_key: z.ZodOptional<z.ZodString>;
430
+ disable_external_providers: z.ZodOptional<z.ZodBoolean>;
431
+ external_providers_initially_enabled: z.ZodOptional<z.ZodBoolean>;
432
+ }, z.core.$strict>>;
374
433
  enable_chromedriver: z.ZodOptional<z.ZodBoolean>;
375
434
  extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
376
435
  proxy_blacklist: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -390,6 +449,27 @@ declare const profileStartRequest: z.ZodObject<{
390
449
  cache_enabled: z.ZodOptional<z.ZodBoolean>;
391
450
  cache_key: z.ZodOptional<z.ZodString>;
392
451
  }, z.core.$strict>>;
452
+ anti_captcha: z.ZodOptional<z.ZodObject<{
453
+ enabled: z.ZodOptional<z.ZodBoolean>;
454
+ auto_captcha_types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
455
+ aws_waf: "aws_waf";
456
+ bls: "bls";
457
+ click: "click";
458
+ datadome: "datadome";
459
+ datadome_audio: "datadome_audio";
460
+ datadome_click: "datadome_click";
461
+ funcaptcha: "funcaptcha";
462
+ geetest: "geetest";
463
+ hcaptcha: "hcaptcha";
464
+ image: "image";
465
+ perimeterx: "perimeterx";
466
+ recaptcha: "recaptcha";
467
+ turnstile: "turnstile";
468
+ }>>>;
469
+ gemini_api_key: z.ZodOptional<z.ZodString>;
470
+ disable_external_providers: z.ZodOptional<z.ZodBoolean>;
471
+ external_providers_initially_enabled: z.ZodOptional<z.ZodBoolean>;
472
+ }, z.core.$strict>>;
393
473
  enable_chromedriver: z.ZodOptional<z.ZodBoolean>;
394
474
  extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
395
475
  proxy_blacklist: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -1732,4 +1812,4 @@ declare class BrowserPool implements AsyncDisposable {
1732
1812
  //#region src/version.d.ts
1733
1813
  declare const VERSION: string;
1734
1814
  //#endregion
1735
- export { APIConnectionError, APIError, APIErrorOptions, APITimeoutError, Account, Actions, type ActiveProfile, type Arch, AuthenticationError, BadRequestError, type BatchDeleteResult, Browser, type BrowserLimits, type BrowserOptions, BrowserPool, type BrowserSettings, type BrowserStartOptions, BrowserTimeoutError, CDPClient, type CDPClientOptions, CDPError, CapturedResponse, type ClickOptions, ConfigurationError, ConflictError, type Cookie, type CookieInput, type CreateWebSocket, type DblclickOptions, type DeviceModel, type DeviceModelsOptions, type DeviceType, type DialogHandler, type DomainRoute, type DragOptions, type EvaluateOptions, type EventHandler, type ExportFormat, type Extension, type ExtensionFile, Extensions, type Fingerprint, Fingerprints, ForbiddenError, type Geolocation, type GotoOptions, type HoverOptions, type Inspector, type InspectorPage, type KeyModifier, Keyboard, type ListPageOptions, type ListPageRequest, type Logger, type Loose, type ManagedSession, type MediaDevices, MonthlySessionLimitError, Mouse, type MouseButton, type MouseClickOptions, type Noise, NotFoundError, type OS, type OneTimeStartRequest, Page, PageClosedError, PaymentRequiredError, type PoolHandler, type PoolOptions, type PoolOutcome, type PremiumProxy, PremiumTrafficLimitError, type PressOptions, type Profile, type ProfileCreate, type ProfileCreateRequest, type ProfileOrdering, type ProfileRef, type ProfileStartRequest, type ProfileSummary, type ProfileUpdate, type ProfileUpdateRequest, Profiles, Proxies, type ProxyCity, type ProxyCountry, ProxyCycle, type ProxyFactory, type ProxyInput, type ProxyLike, type ProxyQuota, ProxyRandom, type ProxyRegion, type ProxySource, ProxyTemplate, type ProxyType, RESOURCE_TYPES, RateLimitError, type RegionalPool, type Renderer, type RequestOptions, type ScrapeOptions, type ScrapeRequest, type ScrapeResult, type Screen, type ScreenshotOptions, type ScrollBehavior, type ScrollOptions, type ScrollToOptions, ServerError, type Session, type SessionLimits, type SessionOptions, type SessionStartOptions, type SharedProxy, type SharedProxyQuota, SharedTrafficLimitError, type Spec, type StopAllResult, StopRun, type StorageOptions, Surfsky, SurfskyError, type SurfskyOptions, type TrafficStats, type TrafficVolume, VERSION, ValidationError, type WaitOptions, type WaitUntil, type WebSocketLike, type isRecord, type parseListPageRequest, type parseOneTimeStartRequest, type parseProfileCreateRequest, type parseProfileStartRequest, type parseProfileUpdateRequest, type parseProxyLike, type parseScrapeRequest };
1815
+ export { APIConnectionError, APIError, APIErrorOptions, APITimeoutError, Account, Actions, type ActiveProfile, type AntiCaptcha, type Arch, AuthenticationError, BadRequestError, type BatchDeleteResult, Browser, type BrowserLimits, type BrowserOptions, BrowserPool, type BrowserSettings, type BrowserStartOptions, BrowserTimeoutError, CDPClient, type CDPClientOptions, CDPError, type CaptchaType, CapturedResponse, type ClickOptions, ConfigurationError, ConflictError, type Cookie, type CookieInput, type CreateWebSocket, type DblclickOptions, type DeviceModel, type DeviceModelsOptions, type DeviceType, type DialogHandler, type DomainRoute, type DragOptions, type EvaluateOptions, type EventHandler, type ExportFormat, type Extension, type ExtensionFile, Extensions, type Fingerprint, Fingerprints, ForbiddenError, type Geolocation, type GotoOptions, type HoverOptions, type Inspector, type InspectorPage, type KeyModifier, Keyboard, type ListPageOptions, type ListPageRequest, type Logger, type Loose, type ManagedSession, type MediaDevices, MonthlySessionLimitError, Mouse, type MouseButton, type MouseClickOptions, type Noise, NotFoundError, type OS, type OneTimeStartRequest, Page, PageClosedError, PaymentRequiredError, type PoolHandler, type PoolOptions, type PoolOutcome, type PremiumProxy, PremiumTrafficLimitError, type PressOptions, type Profile, type ProfileCreate, type ProfileCreateRequest, type ProfileOrdering, type ProfileRef, type ProfileStartRequest, type ProfileSummary, type ProfileUpdate, type ProfileUpdateRequest, Profiles, Proxies, type ProxyCity, type ProxyCountry, ProxyCycle, type ProxyFactory, type ProxyInput, type ProxyLike, type ProxyQuota, ProxyRandom, type ProxyRegion, type ProxySource, ProxyTemplate, type ProxyType, RESOURCE_TYPES, RateLimitError, type RegionalPool, type Renderer, type RequestOptions, type ScrapeOptions, type ScrapeRequest, type ScrapeResult, type Screen, type ScreenshotOptions, type ScrollBehavior, type ScrollOptions, type ScrollToOptions, ServerError, type Session, type SessionLimits, type SessionOptions, type SessionStartOptions, type SharedProxy, type SharedProxyQuota, SharedTrafficLimitError, type Spec, type StopAllResult, StopRun, type StorageOptions, Surfsky, SurfskyError, type SurfskyOptions, type TrafficStats, type TrafficVolume, VERSION, ValidationError, type WaitOptions, type WaitUntil, type WebSocketLike, type isRecord, type parseListPageRequest, type parseOneTimeStartRequest, type parseProfileCreateRequest, type parseProfileStartRequest, type parseProfileUpdateRequest, type parseProxyLike, type parseScrapeRequest };
package/dist/index.js CHANGED
@@ -277,6 +277,21 @@ const regionalPool = z.enum([
277
277
  "oceania",
278
278
  "mena"
279
279
  ]);
280
+ const captchaType = z.enum([
281
+ "recaptcha",
282
+ "hcaptcha",
283
+ "turnstile",
284
+ "perimeterx",
285
+ "geetest",
286
+ "aws_waf",
287
+ "bls",
288
+ "datadome",
289
+ "datadome_audio",
290
+ "datadome_click",
291
+ "click",
292
+ "image",
293
+ "funcaptcha"
294
+ ]);
280
295
  const loose = () => z.string();
281
296
  function isRecord(value) {
282
297
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -329,6 +344,13 @@ const browserSettings = z.strictObject({
329
344
  cache_enabled: z.boolean().optional(),
330
345
  cache_key: z.string().optional()
331
346
  });
347
+ const antiCaptcha = z.strictObject({
348
+ enabled: z.boolean().optional(),
349
+ auto_captcha_types: z.array(captchaType).optional(),
350
+ gemini_api_key: z.string().optional(),
351
+ disable_external_providers: z.boolean().optional(),
352
+ external_providers_initially_enabled: z.boolean().optional()
353
+ });
332
354
  const shared = z.strictObject({
333
355
  tier: z.literal("shared"),
334
356
  country: z.string().min(1).optional()
@@ -383,6 +405,7 @@ const oneTimeStartRequest = z.strictObject({
383
405
  fingerprint: fingerprint.optional(),
384
406
  proxy: proxyLike.nullish(),
385
407
  browser_settings: browserSettings.optional(),
408
+ anti_captcha: antiCaptcha.optional(),
386
409
  enable_chromedriver: z.boolean().optional(),
387
410
  extensions: z.array(z.string()).max(5).optional(),
388
411
  proxy_blacklist: z.array(z.string()).optional(),
@@ -2674,7 +2697,7 @@ var Proxies = class {
2674
2697
  };
2675
2698
  //#endregion
2676
2699
  //#region src/version.ts
2677
- const VERSION = "0.0.8";
2700
+ const VERSION = "0.0.10";
2678
2701
  //#endregion
2679
2702
  //#region src/client.ts
2680
2703
  function userAgent() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "surfsky",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "TypeScript SDK for the Surfsky antidetect browser cloud.",
5
5
  "keywords": [
6
6
  "surfsky",