@hyperbrowser/sdk 0.44.0 → 0.44.3

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.
@@ -1,11 +1,12 @@
1
1
  import { BaseService } from "./base";
2
- import { ProfileResponse, CreateProfileResponse, ProfileListParams, ProfileListResponse } from "../types/profile";
2
+ import { CreateProfileParams, ProfileResponse, CreateProfileResponse, ProfileListParams, ProfileListResponse } from "../types/profile";
3
3
  import { BasicResponse } from "../types";
4
4
  export declare class ProfilesService extends BaseService {
5
5
  /**
6
6
  * Create a new profile
7
+ * @param params Configuration parameters for the new profile
7
8
  */
8
- create(): Promise<CreateProfileResponse>;
9
+ create(params?: CreateProfileParams): Promise<CreateProfileResponse>;
9
10
  /**
10
11
  * Get details of an existing profile
11
12
  * @param id The ID of the profile to get
@@ -6,11 +6,13 @@ const client_1 = require("../client");
6
6
  class ProfilesService extends base_1.BaseService {
7
7
  /**
8
8
  * Create a new profile
9
+ * @param params Configuration parameters for the new profile
9
10
  */
10
- async create() {
11
+ async create(params) {
11
12
  try {
12
13
  return await this.request("/profile", {
13
14
  method: "POST",
15
+ body: params ? JSON.stringify(params) : undefined,
14
16
  });
15
17
  }
16
18
  catch (error) {
@@ -61,6 +63,7 @@ class ProfilesService extends base_1.BaseService {
61
63
  return await this.request("/profiles", undefined, {
62
64
  page: params.page,
63
65
  limit: params.limit,
66
+ name: params.name,
64
67
  });
65
68
  }
66
69
  catch (error) {
@@ -6,6 +6,6 @@ export { StartBrowserUseTaskParams, StartBrowserUseTaskResponse, BrowserUseTaskS
6
6
  export { StartClaudeComputerUseTaskParams, StartClaudeComputerUseTaskResponse, ClaudeComputerUseTaskStatusResponse, ClaudeComputerUseTaskResponse, ClaudeComputerUseTaskData, ClaudeComputerUseStepResponse, } from "./agents/claude-computer-use";
7
7
  export { StartCuaTaskParams, StartCuaTaskResponse, CuaTaskStatusResponse, CuaTaskResponse, CuaTaskData, CuaStepResponse, } from "./agents/cua";
8
8
  export { BasicResponse, SessionStatus, Session, SessionDetail, SessionListParams, SessionListResponse, ScreenConfig, CreateSessionParams, GetSessionDownloadsUrlResponse, GetSessionRecordingUrlResponse, ImageCaptchaParam, } from "./session";
9
- export { ProfileResponse, CreateProfileResponse, ProfileListParams, ProfileListResponse, } from "./profile";
9
+ export { CreateProfileParams, ProfileResponse, CreateProfileResponse, ProfileListParams, ProfileListResponse, } from "./profile";
10
10
  export { CreateExtensionParams, CreateExtensionResponse, ListExtensionsResponse, } from "./extension";
11
11
  export { ExtractJobStatus, BrowserUseTaskStatus, BrowserUseLlm, ScrapeScreenshotFormat, ScrapeJobStatus, CrawlJobStatus, Country, State, ISO639_1, OperatingSystem, Platform, ScrapeFormat, ScrapeWaitUntil, ScrapePageStatus, CrawlPageStatus, RecordingStatus, DownloadsStatus, } from "./constants";
@@ -1,13 +1,19 @@
1
+ export interface CreateProfileParams {
2
+ name?: string;
3
+ }
1
4
  export interface CreateProfileResponse {
2
5
  id: string;
6
+ name: string | null;
3
7
  }
4
8
  export interface ProfileResponse {
5
9
  id: string;
10
+ name: string | null;
6
11
  teamId: string;
7
12
  createdAt: string;
8
13
  updatedAt: string;
9
14
  }
10
15
  export interface ProfileListParams {
16
+ name?: string;
11
17
  page?: number;
12
18
  limit?: number;
13
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperbrowser/sdk",
3
- "version": "0.44.0",
3
+ "version": "0.44.3",
4
4
  "description": "Node SDK for Hyperbrowser API",
5
5
  "author": "",
6
6
  "main": "dist/index.js",