@hyperbrowser/sdk 0.90.1 → 0.90.2
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,5 +1,5 @@
|
|
|
1
1
|
import { BaseService } from "./base";
|
|
2
|
-
import { CreateProfileParams, ProfileResponse, CreateProfileResponse, ProfileListParams, ProfileListResponse } from "../types/profile";
|
|
2
|
+
import { CreateProfileParams, ForkProfileParams, ProfileResponse, CreateProfileResponse, ProfileListParams, ProfileListResponse } from "../types/profile";
|
|
3
3
|
import { BasicResponse } from "../types";
|
|
4
4
|
export declare class ProfilesService extends BaseService {
|
|
5
5
|
/**
|
|
@@ -7,6 +7,12 @@ export declare class ProfilesService extends BaseService {
|
|
|
7
7
|
* @param params Configuration parameters for the new profile
|
|
8
8
|
*/
|
|
9
9
|
create(params?: CreateProfileParams): Promise<CreateProfileResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Fork an existing profile, creating a new independent copy
|
|
12
|
+
* @param id The ID of the source profile to fork
|
|
13
|
+
* @param params Optional parameters (e.g., name for the forked profile)
|
|
14
|
+
*/
|
|
15
|
+
fork(id: string, params?: ForkProfileParams): Promise<CreateProfileResponse>;
|
|
10
16
|
/**
|
|
11
17
|
* Get details of an existing profile
|
|
12
18
|
* @param id The ID of the profile to get
|
|
@@ -22,6 +22,25 @@ class ProfilesService extends base_1.BaseService {
|
|
|
22
22
|
throw new client_1.HyperbrowserError("Failed to create profile", undefined);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Fork an existing profile, creating a new independent copy
|
|
27
|
+
* @param id The ID of the source profile to fork
|
|
28
|
+
* @param params Optional parameters (e.g., name for the forked profile)
|
|
29
|
+
*/
|
|
30
|
+
async fork(id, params) {
|
|
31
|
+
try {
|
|
32
|
+
return await this.request(`/profile/${id}/fork`, {
|
|
33
|
+
method: "POST",
|
|
34
|
+
body: params ? JSON.stringify(params) : undefined,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
if (error instanceof client_1.HyperbrowserError) {
|
|
39
|
+
throw error;
|
|
40
|
+
}
|
|
41
|
+
throw new client_1.HyperbrowserError(`Failed to fork profile ${id}`, undefined);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
25
44
|
/**
|
|
26
45
|
* Get details of an existing profile
|
|
27
46
|
* @param id The ID of the profile to get
|
package/dist/types/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export { StartGeminiComputerUseTaskParams, StartGeminiComputerUseTaskResponse, G
|
|
|
10
10
|
export { BasicResponse, SessionStatus, Session, SessionDetail, SessionGetParams, SessionListParams, SessionListResponse, ScreenConfig, CaptchaEvaluationPageResult, CaptchaEvaluationParams, CaptchaEvaluationResponse, CaptchaEvaluationTarget, CaptchaEvaluationType, CaptchaSolverType, CreateSessionParams, GetSessionDownloadsUrlResponse, GetSessionVideoRecordingUrlResponse, GetSessionRecordingUrlResponse, ImageCaptchaParam, UploadFileResponse, UploadFileOptions, GetActiveSessionsCountResponse, SessionEventLogListParams, SessionEventLogListResponse, SessionEventLog, SessionProfile, SessionLaunchState, SessionCreditBreakdown, UpdateSessionProfileParams, UpdateSessionProxyLocationParams, UpdateSessionProxyParams, UpdateSessionScreenParams, UpdateSessionSolveCaptchasParams, UpdateSessionSolveCaptchasResponse, } from "./session";
|
|
11
11
|
export { SandboxStatus, SandboxRuntimeTarget, Sandbox, SandboxDetail, SandboxVolumeMountType, SandboxVolumeMount, SandboxListParams, SandboxListResponse, SandboxImageSummary, SandboxImageListResponse, SandboxSnapshotStatus, SandboxSnapshotSummary, SandboxSnapshotListParams, SandboxSnapshotListResponse, CreateSandboxParams, SandboxMemorySnapshotParams, SandboxMemorySnapshotResult, SandboxExposeParams, SandboxExposeResult, SandboxUnexposeResult, SandboxProcessStatus, SandboxExecParams, SandboxExecOptions, SandboxProcessSummary, SandboxProcessResult, SandboxProcessListParams, SandboxProcessListResponse, SandboxProcessWaitParams, SandboxProcessSignal, SandboxProcessStdinParams, SandboxProcessStreamEvent, SandboxFileType, SandboxFileInfo, SandboxFileWriteInfo, SandboxFileListOptions, SandboxFileReadFormat, SandboxFileReadOptions, SandboxFileWriteData, SandboxFileWriteEntry, SandboxFileTextWriteOptions, SandboxFileBytesWriteOptions, SandboxFileMakeDirOptions, SandboxFileCopyParams, SandboxFileChmodParams, SandboxFileChownParams, SandboxFileTransferResult, SandboxFileSystemEventType, SandboxFileSystemEvent, SandboxWatchDirOptions, SandboxPresignFileParams, SandboxPresignedUrl, SandboxTerminalCreateParams, SandboxTerminalOutputChunk, SandboxTerminalStatus, SandboxTerminalWaitParams, SandboxTerminalKillParams, SandboxTerminalEvent, } from "./sandbox";
|
|
12
12
|
export { CreateVolumeParams, Volume, VolumeListResponse } from "./volume";
|
|
13
|
-
export { CreateProfileParams, ProfileResponse, CreateProfileResponse, ProfileListParams, ProfileListResponse, } from "./profile";
|
|
13
|
+
export { CreateProfileParams, ForkProfileParams, ProfileResponse, CreateProfileResponse, ProfileListParams, ProfileListResponse, } from "./profile";
|
|
14
14
|
export { CreateExtensionParams, CreateExtensionResponse, ListExtensionsResponse, } from "./extension";
|
|
15
15
|
export { ExtractJobStatus, BrowserUseTaskStatus, BrowserUseLlm, ClaudeComputerUseLlm, CuaLlm, GeminiComputerUseLlm, ScrapeScreenshotFormat, ScrapeJobStatus, CrawlJobStatus, Country, State, ISO639_1, OperatingSystem, Platform, ScrapeFormat, ScrapeWaitUntil, ScrapePageStatus, CrawlPageStatus, RecordingStatus, DownloadsStatus, HyperAgentLlm, HyperAgentTaskStatus, ClaudeComputerUseTaskStatus, CuaTaskStatus, GeminiComputerUseTaskStatus, SessionEventLogType, SessionRegion, BrowserUseVersion, HyperAgentVersion, } from "./constants";
|
|
16
16
|
export { TeamCreditInfo } from "./team";
|
package/dist/types/profile.d.ts
CHANGED