Skip to content

Commit ea54ef5

Browse files
feat(devbox): unify api for devbox mounts
1 parent b9ca9a1 commit ea54ef5

5 files changed

Lines changed: 25 additions & 4 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 97
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-5f33221208c1febba343daf570f73a5086f150a9b128df045ebddc3fe2c86607.yml
3-
openapi_spec_hash: 0aea07130ddbe43a665a13a68231e2ca
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-0dd27c6877ed117c50fe0af95cee4d54c646d2484368e131b8e3315eba3fffcc.yml
3+
openapi_spec_hash: 68f663172747aef8e66f2b23289efc7b
44
config_hash: 2363f563f42501d2b1587a4f64bdccaf

src/resources/devboxes/devboxes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ export interface DevboxCreateParams {
929929
metadata?: { [key: string]: string } | null;
930930

931931
/**
932-
* A list of file system mounts to be included in the Devbox.
932+
* A list of mounts to be included in the Devbox.
933933
*/
934934
mounts?: Array<Shared.Mount> | null;
935935

src/resources/shared.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ export interface CodeMountParameters {
167167
*/
168168
repo_owner: string;
169169

170+
type: 'code_mount';
171+
170172
/**
171173
* The authentication token necessary to pull repo.
172174
*/
@@ -274,7 +276,23 @@ export namespace LaunchParameters {
274276
}
275277
}
276278

277-
export type Mount = ObjectMountParameters | AgentMountParameters;
279+
export type Mount =
280+
| ObjectMountParameters
281+
| AgentMountParameters
282+
| CodeMountParameters
283+
| Mount.FileMountParameters;
284+
285+
export namespace Mount {
286+
export interface FileMountParameters {
287+
/**
288+
* Map of file paths to file contents to be written before setup. Keys are absolute
289+
* paths where files should be created, values are the file contents.
290+
*/
291+
files: { [key: string]: string };
292+
293+
type: 'file_mount';
294+
}
295+
}
278296

279297
export interface ObjectMountParameters {
280298
/**

tests/api-resources/blueprints.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ describe('resource blueprints', () => {
3131
{
3232
repo_name: 'repo_name',
3333
repo_owner: 'repo_owner',
34+
type: 'code_mount',
3435
token: 'token',
3536
install_command: 'install_command',
3637
},
@@ -261,6 +262,7 @@ describe('resource blueprints', () => {
261262
{
262263
repo_name: 'repo_name',
263264
repo_owner: 'repo_owner',
265+
type: 'code_mount',
264266
token: 'token',
265267
install_command: 'install_command',
266268
},

tests/api-resources/devboxes/devboxes.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ describe('resource devboxes', () => {
3939
{
4040
repo_name: 'repo_name',
4141
repo_owner: 'repo_owner',
42+
type: 'code_mount',
4243
token: 'token',
4344
install_command: 'install_command',
4445
},

0 commit comments

Comments
 (0)