New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@hyperbrowser/sdk

Package Overview
Dependencies
Maintainers
0
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hyperbrowser/sdk - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

dist/types/constants.d.ts

5

dist/client.d.ts
import { Response } from "node-fetch";
import { HyperbrowserConfig } from "./types/config";
import { BasicResponse, SessionDetail, SessionListParams, SessionListResponse } from "./types/session";
import { BasicResponse, CreateSessionParams, SessionDetail, SessionListParams, SessionListResponse } from "./types/session";
export declare class HyperbrowserError extends Error {

@@ -17,4 +17,5 @@ statusCode?: number | undefined;

* Create a new browser session
* @param params Configuration parameters for the new session
*/
createSession(): Promise<SessionDetail>;
createSession(params?: CreateSessionParams): Promise<SessionDetail>;
/**

@@ -21,0 +22,0 @@ * Get details of an existing session

8

dist/client.js

@@ -77,6 +77,10 @@ "use strict";

* Create a new browser session
* @param params Configuration parameters for the new session
*/
async createSession() {
async createSession(params) {
try {
return await this.request("/session", { method: "POST" });
return await this.request("/session", {
method: "POST",
body: params ? JSON.stringify(params) : undefined,
});
}

@@ -83,0 +87,0 @@ catch (error) {

@@ -0,1 +1,2 @@

import { Country, ISO639_1, OperatingSystem, Platform } from "./constants";
export type SessionStatus = "active" | "closed" | "error";

@@ -28,1 +29,18 @@ export interface BasicResponse {

}
export interface ScreenConfig {
maxWidth: number;
maxHeight: number;
minWidth: number;
minHeight: number;
}
export interface CreateSessionParams {
proxyServer?: string;
proxyServerPassword?: string;
proxyServerUsername?: string;
proxyCountry?: Country;
operatingSystems?: OperatingSystem[];
device?: ("desktop" | "mobile")[];
platform?: Platform[];
locales?: ISO639_1[];
screen?: ScreenConfig;
}
{
"name": "@hyperbrowser/sdk",
"version": "0.2.0",
"version": "0.3.0",
"description": "Node SDK for Hyperbrowser API",

@@ -5,0 +5,0 @@ "author": "",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc