surfsky 0.0.8 → 0.0.9
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 +77 -1
- package/dist/index.js +23 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -45,6 +45,20 @@ declare const regionalPool: z.ZodEnum<{
|
|
|
45
45
|
western: "western";
|
|
46
46
|
westeurope: "westeurope";
|
|
47
47
|
}>;
|
|
48
|
+
declare const captchaType: z.ZodEnum<{
|
|
49
|
+
bls: "bls";
|
|
50
|
+
click: "click";
|
|
51
|
+
datadome: "datadome";
|
|
52
|
+
datadome_audio: "datadome_audio";
|
|
53
|
+
datadome_click: "datadome_click";
|
|
54
|
+
funcaptcha: "funcaptcha";
|
|
55
|
+
geetest: "geetest";
|
|
56
|
+
hcaptcha: "hcaptcha";
|
|
57
|
+
image: "image";
|
|
58
|
+
perimeterx: "perimeterx";
|
|
59
|
+
recaptcha: "recaptcha";
|
|
60
|
+
turnstile: "turnstile";
|
|
61
|
+
}>;
|
|
48
62
|
type OS = z.infer<typeof os>;
|
|
49
63
|
type Arch = z.infer<typeof arch>;
|
|
50
64
|
type DeviceType = z.infer<typeof deviceType>;
|
|
@@ -52,6 +66,7 @@ type WaitUntil = z.infer<typeof waitUntil>;
|
|
|
52
66
|
type ProxyType = z.infer<typeof proxyType>;
|
|
53
67
|
type ProfileOrdering = z.infer<typeof profileOrdering>;
|
|
54
68
|
type RegionalPool = z.infer<typeof regionalPool>;
|
|
69
|
+
type CaptchaType = z.infer<typeof captchaType>;
|
|
55
70
|
type ExportFormat = "json" | "netscape";
|
|
56
71
|
type MouseButton = "left" | "right" | "middle";
|
|
57
72
|
type KeyModifier = "Alt" | "Control" | "Meta" | "Shift";
|
|
@@ -178,6 +193,27 @@ declare const browserSettings: z.ZodObject<{
|
|
|
178
193
|
cache_key: z.ZodOptional<z.ZodString>;
|
|
179
194
|
}, z.core.$strict>;
|
|
180
195
|
type BrowserSettings = z.infer<typeof browserSettings>;
|
|
196
|
+
declare const antiCaptcha: z.ZodObject<{
|
|
197
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
198
|
+
auto_captcha_types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
199
|
+
bls: "bls";
|
|
200
|
+
click: "click";
|
|
201
|
+
datadome: "datadome";
|
|
202
|
+
datadome_audio: "datadome_audio";
|
|
203
|
+
datadome_click: "datadome_click";
|
|
204
|
+
funcaptcha: "funcaptcha";
|
|
205
|
+
geetest: "geetest";
|
|
206
|
+
hcaptcha: "hcaptcha";
|
|
207
|
+
image: "image";
|
|
208
|
+
perimeterx: "perimeterx";
|
|
209
|
+
recaptcha: "recaptcha";
|
|
210
|
+
turnstile: "turnstile";
|
|
211
|
+
}>>>;
|
|
212
|
+
gemini_api_key: z.ZodOptional<z.ZodString>;
|
|
213
|
+
disable_external_providers: z.ZodOptional<z.ZodBoolean>;
|
|
214
|
+
external_providers_initially_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
215
|
+
}, z.core.$strict>;
|
|
216
|
+
type AntiCaptcha = z.infer<typeof antiCaptcha>;
|
|
181
217
|
declare const shared: z.ZodObject<{
|
|
182
218
|
tier: z.ZodLiteral<"shared">;
|
|
183
219
|
country: z.ZodOptional<z.ZodString>;
|
|
@@ -371,6 +407,26 @@ declare const oneTimeStartRequest: z.ZodObject<{
|
|
|
371
407
|
cache_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
372
408
|
cache_key: z.ZodOptional<z.ZodString>;
|
|
373
409
|
}, z.core.$strict>>;
|
|
410
|
+
anti_captcha: z.ZodOptional<z.ZodObject<{
|
|
411
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
412
|
+
auto_captcha_types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
413
|
+
bls: "bls";
|
|
414
|
+
click: "click";
|
|
415
|
+
datadome: "datadome";
|
|
416
|
+
datadome_audio: "datadome_audio";
|
|
417
|
+
datadome_click: "datadome_click";
|
|
418
|
+
funcaptcha: "funcaptcha";
|
|
419
|
+
geetest: "geetest";
|
|
420
|
+
hcaptcha: "hcaptcha";
|
|
421
|
+
image: "image";
|
|
422
|
+
perimeterx: "perimeterx";
|
|
423
|
+
recaptcha: "recaptcha";
|
|
424
|
+
turnstile: "turnstile";
|
|
425
|
+
}>>>;
|
|
426
|
+
gemini_api_key: z.ZodOptional<z.ZodString>;
|
|
427
|
+
disable_external_providers: z.ZodOptional<z.ZodBoolean>;
|
|
428
|
+
external_providers_initially_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
429
|
+
}, z.core.$strict>>;
|
|
374
430
|
enable_chromedriver: z.ZodOptional<z.ZodBoolean>;
|
|
375
431
|
extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
376
432
|
proxy_blacklist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -390,6 +446,26 @@ declare const profileStartRequest: z.ZodObject<{
|
|
|
390
446
|
cache_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
391
447
|
cache_key: z.ZodOptional<z.ZodString>;
|
|
392
448
|
}, z.core.$strict>>;
|
|
449
|
+
anti_captcha: z.ZodOptional<z.ZodObject<{
|
|
450
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
451
|
+
auto_captcha_types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
452
|
+
bls: "bls";
|
|
453
|
+
click: "click";
|
|
454
|
+
datadome: "datadome";
|
|
455
|
+
datadome_audio: "datadome_audio";
|
|
456
|
+
datadome_click: "datadome_click";
|
|
457
|
+
funcaptcha: "funcaptcha";
|
|
458
|
+
geetest: "geetest";
|
|
459
|
+
hcaptcha: "hcaptcha";
|
|
460
|
+
image: "image";
|
|
461
|
+
perimeterx: "perimeterx";
|
|
462
|
+
recaptcha: "recaptcha";
|
|
463
|
+
turnstile: "turnstile";
|
|
464
|
+
}>>>;
|
|
465
|
+
gemini_api_key: z.ZodOptional<z.ZodString>;
|
|
466
|
+
disable_external_providers: z.ZodOptional<z.ZodBoolean>;
|
|
467
|
+
external_providers_initially_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
468
|
+
}, z.core.$strict>>;
|
|
393
469
|
enable_chromedriver: z.ZodOptional<z.ZodBoolean>;
|
|
394
470
|
extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
395
471
|
proxy_blacklist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -1732,4 +1808,4 @@ declare class BrowserPool implements AsyncDisposable {
|
|
|
1732
1808
|
//#region src/version.d.ts
|
|
1733
1809
|
declare const VERSION: string;
|
|
1734
1810
|
//#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 };
|
|
1811
|
+
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,20 @@ 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
|
+
"bls",
|
|
287
|
+
"datadome",
|
|
288
|
+
"datadome_audio",
|
|
289
|
+
"datadome_click",
|
|
290
|
+
"click",
|
|
291
|
+
"image",
|
|
292
|
+
"funcaptcha"
|
|
293
|
+
]);
|
|
280
294
|
const loose = () => z.string();
|
|
281
295
|
function isRecord(value) {
|
|
282
296
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -329,6 +343,13 @@ const browserSettings = z.strictObject({
|
|
|
329
343
|
cache_enabled: z.boolean().optional(),
|
|
330
344
|
cache_key: z.string().optional()
|
|
331
345
|
});
|
|
346
|
+
const antiCaptcha = z.strictObject({
|
|
347
|
+
enabled: z.boolean().optional(),
|
|
348
|
+
auto_captcha_types: z.array(captchaType).optional(),
|
|
349
|
+
gemini_api_key: z.string().optional(),
|
|
350
|
+
disable_external_providers: z.boolean().optional(),
|
|
351
|
+
external_providers_initially_enabled: z.boolean().optional()
|
|
352
|
+
});
|
|
332
353
|
const shared = z.strictObject({
|
|
333
354
|
tier: z.literal("shared"),
|
|
334
355
|
country: z.string().min(1).optional()
|
|
@@ -383,6 +404,7 @@ const oneTimeStartRequest = z.strictObject({
|
|
|
383
404
|
fingerprint: fingerprint.optional(),
|
|
384
405
|
proxy: proxyLike.nullish(),
|
|
385
406
|
browser_settings: browserSettings.optional(),
|
|
407
|
+
anti_captcha: antiCaptcha.optional(),
|
|
386
408
|
enable_chromedriver: z.boolean().optional(),
|
|
387
409
|
extensions: z.array(z.string()).max(5).optional(),
|
|
388
410
|
proxy_blacklist: z.array(z.string()).optional(),
|
|
@@ -2674,7 +2696,7 @@ var Proxies = class {
|
|
|
2674
2696
|
};
|
|
2675
2697
|
//#endregion
|
|
2676
2698
|
//#region src/version.ts
|
|
2677
|
-
const VERSION = "0.0.
|
|
2699
|
+
const VERSION = "0.0.9";
|
|
2678
2700
|
//#endregion
|
|
2679
2701
|
//#region src/client.ts
|
|
2680
2702
|
function userAgent() {
|