@sampleapp.ai/sdk 1.0.47 → 1.0.49
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.
package/dist/lib/api-client.js
CHANGED
|
@@ -106,7 +106,11 @@ class ApiClient {
|
|
|
106
106
|
* @returns The use case data including tech_stack_config
|
|
107
107
|
*/
|
|
108
108
|
getById: async (id) => {
|
|
109
|
-
return this.request([
|
|
109
|
+
return this.request([
|
|
110
|
+
"sandbox-use-case",
|
|
111
|
+
"id",
|
|
112
|
+
id.toString(),
|
|
113
|
+
]);
|
|
110
114
|
},
|
|
111
115
|
/**
|
|
112
116
|
* Get all sandbox use cases for a specific playground
|
|
@@ -205,6 +209,19 @@ class ApiClient {
|
|
|
205
209
|
document.body.removeChild(link);
|
|
206
210
|
window.URL.revokeObjectURL(downloadUrl);
|
|
207
211
|
},
|
|
212
|
+
/**
|
|
213
|
+
* Get an authenticated clone URL for a private GitHub repository.
|
|
214
|
+
* Returns an HTTPS URL with a short-lived token (expires in 1 hour)
|
|
215
|
+
* that can be used with vscode://vscode.git/clone or git clone directly.
|
|
216
|
+
*
|
|
217
|
+
* @param sandboxId - The sandbox content UID
|
|
218
|
+
* @returns Clone URL response with authenticated URL
|
|
219
|
+
*/
|
|
220
|
+
getCloneUrl: async (sandboxId) => {
|
|
221
|
+
return this.request(["sdk", "clone-url"], {
|
|
222
|
+
method: "GET",
|
|
223
|
+
}, { sandbox_id: sandboxId });
|
|
224
|
+
},
|
|
208
225
|
/**
|
|
209
226
|
* Start VM endpoint that starts a desktop sandbox, launches Chrome,
|
|
210
227
|
* navigates to the target URL, and returns a VNC viewer URL
|