You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Connect to a Sandbox from the browser and automatically reconnect. `getSession` requires and endpoint that resumes the Sandbox. `onFocusChange` can be used to notify when a reconnect should happen.
Copy file name to clipboardExpand all lines: src/previews/index.ts
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,9 @@ import {
8
8
9
9
export{Preview,InjectFunction};
10
10
11
+
/**
12
+
* Create a preview that you can interact with. By default you can interact with navigation, but you can also inject your own code and do custom message passing. Append the `iframe` to your DOM to display the preview.
handleResponse(response,`Failed to update sandbox tier ${sandboxId}`);
70
83
}
71
84
85
+
/**
86
+
* Updates the hibernation timeout for this sandbox. This is the amount of seconds the sandbox
87
+
* will be kept alive without activity before it is automatically hibernated. Activity can be sessions or interactions with any endpoints exposed by the Sandbox.
88
+
*/
72
89
asyncupdateHibernationTimeout(
73
90
sandboxId: string,
74
91
timeoutSeconds: number
@@ -122,6 +139,9 @@ export class Sandbox {
122
139
returnsession;
123
140
}
124
141
142
+
/**
143
+
* Connects to the Sandbox using a WebSocket connection, allowing you to interact with it. You can pass a custom session to connect to a specific user workspace, controlling permissions, git credentials and environment variables.
* Returns a REST API client connected to this Sandbox, allowing you to interact with it. You can pass a custom session to connect to a specific user workspace, controlling permissions, git credentials and environment variables.
* Returns a browser session connected to this Sandbox, allowing you to interact with it. You can pass a custom session to connect to a specific user workspace, controlling permissions, git credentials and environment variables.
0 commit comments