@hyperbrowser/sdk 0.26.0 → 0.28.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.
@@ -5,6 +5,7 @@ export type CrawlJobStatus = "pending" | "running" | "completed" | "failed";
5
5
  export type ScrapePageStatus = "completed" | "failed" | "pending" | "running";
6
6
  export type CrawlPageStatus = "completed" | "failed";
7
7
  export type ScrapeWaitUntil = "load" | "domcontentloaded" | "networkidle";
8
+ export type ScrapeScreenshotFormat = "jpeg" | "png" | "webp";
8
9
  export declare const POLLING_ATTEMPTS = 5;
9
10
  export type Country = "AD" | "AE" | "AF" | "AL" | "AM" | "AO" | "AR" | "AT" | "AU" | "AW" | "AZ" | "BA" | "BD" | "BE" | "BG" | "BH" | "BJ" | "BO" | "BR" | "BS" | "BT" | "BY" | "BZ" | "CA" | "CF" | "CH" | "CI" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "EC" | "EE" | "EG" | "ES" | "ET" | "EU" | "FI" | "FJ" | "FR" | "GB" | "GE" | "GH" | "GM" | "GR" | "HK" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IN" | "IQ" | "IR" | "IS" | "IT" | "JM" | "JO" | "JP" | "KE" | "KH" | "KR" | "KW" | "KZ" | "LB" | "LI" | "LR" | "LT" | "LU" | "LV" | "MA" | "MC" | "MD" | "ME" | "MG" | "MK" | "ML" | "MM" | "MN" | "MR" | "MT" | "MU" | "MV" | "MX" | "MY" | "MZ" | "NG" | "NL" | "NO" | "NZ" | "OM" | "PA" | "PE" | "PH" | "PK" | "PL" | "PR" | "PT" | "PY" | "QA" | "RANDOM_COUNTRY" | "RO" | "RS" | "RU" | "SA" | "SC" | "SD" | "SE" | "SG" | "SI" | "SK" | "SN" | "SS" | "TD" | "TG" | "TH" | "TM" | "TN" | "TR" | "TT" | "TW" | "UA" | "UG" | "US" | "UY" | "UZ" | "VE" | "VG" | "VN" | "YE" | "ZA" | "ZM" | "ZW" | "ad" | "ae" | "af" | "al" | "am" | "ao" | "ar" | "at" | "au" | "aw" | "az" | "ba" | "bd" | "be" | "bg" | "bh" | "bj" | "bo" | "br" | "bs" | "bt" | "by" | "bz" | "ca" | "cf" | "ch" | "ci" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "ec" | "ee" | "eg" | "es" | "et" | "eu" | "fi" | "fj" | "fr" | "gb" | "ge" | "gh" | "gm" | "gr" | "hk" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "in" | "iq" | "ir" | "is" | "it" | "jm" | "jo" | "jp" | "ke" | "kh" | "kr" | "kw" | "kz" | "lb" | "li" | "lr" | "lt" | "lu" | "lv" | "ma" | "mc" | "md" | "me" | "mg" | "mk" | "ml" | "mm" | "mn" | "mr" | "mt" | "mu" | "mv" | "mx" | "my" | "mz" | "ng" | "nl" | "no" | "nz" | "om" | "pa" | "pe" | "ph" | "pk" | "pl" | "pr" | "pt" | "py" | "qa" | "ro" | "rs" | "ru" | "sa" | "sc" | "sd" | "se" | "sg" | "si" | "sk" | "sn" | "ss" | "td" | "tg" | "th" | "tm" | "tn" | "tr" | "tt" | "tw" | "ua" | "ug" | "us" | "uy" | "uz" | "ve" | "vg" | "vn" | "ye" | "za" | "zm" | "zw";
10
11
  export type OperatingSystem = "windows" | "android" | "macos" | "linux" | "ios";
@@ -1,5 +1,9 @@
1
- import { ScrapeFormat, ScrapeJobStatus, ScrapePageStatus, ScrapeWaitUntil } from "./constants";
1
+ import { ScrapeFormat, ScrapeJobStatus, ScrapePageStatus, ScrapeScreenshotFormat, ScrapeWaitUntil } from "./constants";
2
2
  import { CreateSessionParams } from "./session";
3
+ export interface ScreenshotOptions {
4
+ fullPage?: boolean;
5
+ format?: ScrapeScreenshotFormat;
6
+ }
3
7
  export interface ScrapeOptions {
4
8
  formats?: ScrapeFormat[];
5
9
  includeTags?: string[];
@@ -8,6 +12,7 @@ export interface ScrapeOptions {
8
12
  waitFor?: number;
9
13
  timeout?: number;
10
14
  waitUntil?: ScrapeWaitUntil;
15
+ screenshotOptions?: ScreenshotOptions;
11
16
  }
12
17
  export interface StartScrapeJobParams {
13
18
  url: string;
@@ -12,11 +12,11 @@ export interface Session {
12
12
  createdAt: string;
13
13
  updatedAt: string;
14
14
  sessionUrl: string;
15
- liveUrl?: string;
16
- token: string;
17
15
  }
18
16
  export interface SessionDetail extends Session {
19
17
  wsEndpoint?: string;
18
+ liveUrl?: string;
19
+ token: string;
20
20
  }
21
21
  export interface SessionListParams {
22
22
  status?: SessionStatus;
@@ -58,6 +58,8 @@ export interface CreateSessionParams {
58
58
  extensionIds?: Array<string>;
59
59
  staticIpId?: string;
60
60
  acceptCookies?: boolean;
61
+ urlBlocklist?: string[];
62
+ browserArgs?: string[];
61
63
  }
62
64
  export interface SessionRecording {
63
65
  type: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperbrowser/sdk",
3
- "version": "0.26.0",
3
+ "version": "0.28.0",
4
4
  "description": "Node SDK for Hyperbrowser API",
5
5
  "author": "",
6
6
  "main": "dist/index.js",