@hyperbrowser/sdk 0.78.0 → 0.79.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.
|
@@ -70,5 +70,11 @@ export declare class SessionsService extends BaseService {
|
|
|
70
70
|
* Get the number of active sessions
|
|
71
71
|
*/
|
|
72
72
|
getActiveSessionsCount(): Promise<GetActiveSessionsCountResponse>;
|
|
73
|
+
/**
|
|
74
|
+
* Extend the duration of a session
|
|
75
|
+
* @param id The ID of the session to extend
|
|
76
|
+
* @param durationMinutes The duration in minutes to extend the session by
|
|
77
|
+
*/
|
|
78
|
+
extendSession(id: string, durationMinutes: number): Promise<BasicResponse>;
|
|
73
79
|
}
|
|
74
80
|
export {};
|
|
@@ -298,5 +298,24 @@ class SessionsService extends base_1.BaseService {
|
|
|
298
298
|
throw new client_1.HyperbrowserError("Failed to get active sessions count", undefined);
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
|
+
/**
|
|
302
|
+
* Extend the duration of a session
|
|
303
|
+
* @param id The ID of the session to extend
|
|
304
|
+
* @param durationMinutes The duration in minutes to extend the session by
|
|
305
|
+
*/
|
|
306
|
+
async extendSession(id, durationMinutes) {
|
|
307
|
+
try {
|
|
308
|
+
return await this.request(`/session/${id}/extend-session`, {
|
|
309
|
+
method: "PUT",
|
|
310
|
+
body: JSON.stringify({ durationMinutes }),
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
catch (error) {
|
|
314
|
+
if (error instanceof client_1.HyperbrowserError) {
|
|
315
|
+
throw error;
|
|
316
|
+
}
|
|
317
|
+
throw new client_1.HyperbrowserError(`Failed to extend session ${id}`, undefined);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
301
320
|
}
|
|
302
321
|
exports.SessionsService = SessionsService;
|
|
@@ -17,8 +17,8 @@ export type DownloadsStatus = "not_enabled" | "pending" | "in_progress" | "compl
|
|
|
17
17
|
export declare const POLLING_ATTEMPTS = 5;
|
|
18
18
|
export type BrowserUseVersion = "0.1.40" | "0.7.10" | "latest";
|
|
19
19
|
export type BrowserUseLlm = "gpt-4o" | "gpt-4o-mini" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-5" | "gpt-5-mini" | "claude-sonnet-4-5" | "claude-sonnet-4-20250514" | "claude-3-7-sonnet-20250219" | "claude-3-5-sonnet-20241022" | "claude-3-5-haiku-20241022" | "gemini-2.0-flash" | "gemini-2.5-flash";
|
|
20
|
-
export type ClaudeComputerUseLlm = "claude-haiku-4-5-20251001" | "claude-sonnet-4-5" | "claude-sonnet-4-20250514" | "claude-3-7-sonnet-20250219";
|
|
21
|
-
export type HyperAgentLlm = "gpt-4o" | "gpt-4o-mini" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano";
|
|
20
|
+
export type ClaudeComputerUseLlm = "claude-opus-4-5" | "claude-haiku-4-5-20251001" | "claude-sonnet-4-5" | "claude-sonnet-4-20250514" | "claude-3-7-sonnet-20250219";
|
|
21
|
+
export type HyperAgentLlm = "gpt-5.1" | "gpt-5" | "gpt-5-mini" | "gpt-4o" | "gpt-4o-mini" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano";
|
|
22
22
|
export type GeminiComputerUseLlm = "gemini-2.5-computer-use-preview-10-2025";
|
|
23
23
|
export type SessionRegion = "us-central" | "asia-south" | "us-dev" | "europe-west" | "us-west" | "us-east";
|
|
24
24
|
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";
|