Skip to content

Commit c847651

Browse files
chore: hide build context APIs
1 parent 99f81b6 commit c847651

8 files changed

Lines changed: 3 additions & 197 deletions

File tree

.stats.yml

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

api.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ Types:
9797
- <code><a href="./src/resources/devboxes/devboxes.ts">DevboxView</a></code>
9898
- <code><a href="./src/resources/devboxes/devboxes.ts">DevboxCreateSSHKeyResponse</a></code>
9999
- <code><a href="./src/resources/devboxes/devboxes.ts">DevboxDeleteDiskSnapshotResponse</a></code>
100-
- <code><a href="./src/resources/devboxes/devboxes.ts">DevboxKeepAliveResponse</a></code>
101100
- <code><a href="./src/resources/devboxes/devboxes.ts">DevboxReadFileContentsResponse</a></code>
102101
- <code><a href="./src/resources/devboxes/devboxes.ts">DevboxRemoveTunnelResponse</a></code>
103102
- <code><a href="./src/resources/devboxes/devboxes.ts">DevboxUploadFileResponse</a></code>
@@ -115,15 +114,12 @@ Methods:
115114
- <code title="post /v1/devboxes/{id}/execute">client.devboxes.<a href="./src/resources/devboxes/devboxes.ts">execute</a>(id, { ...params }) -> DevboxAsyncExecutionDetailView</code>
116115
- <code title="post /v1/devboxes/{id}/execute_async">client.devboxes.<a href="./src/resources/devboxes/devboxes.ts">executeAsync</a>(id, { ...params }) -> DevboxAsyncExecutionDetailView</code>
117116
- <code title="post /v1/devboxes/{id}/execute_sync">client.devboxes.<a href="./src/resources/devboxes/devboxes.ts">executeSync</a>(id, { ...params }) -> DevboxExecutionDetailView</code>
118-
- <code title="post /v1/devboxes/{id}/keep_alive">client.devboxes.<a href="./src/resources/devboxes/devboxes.ts">keepAlive</a>(id) -> unknown</code>
119117
- <code title="get /v1/devboxes/disk_snapshots">client.devboxes.<a href="./src/resources/devboxes/devboxes.ts">listDiskSnapshots</a>({ ...params }) -> DevboxSnapshotViewsDiskSnapshotsCursorIDPage</code>
120118
- <code title="post /v1/devboxes/{id}/read_file_contents">client.devboxes.<a href="./src/resources/devboxes/devboxes.ts">readFileContents</a>(id, { ...params }) -> string</code>
121119
- <code title="post /v1/devboxes/{id}/remove_tunnel">client.devboxes.<a href="./src/resources/devboxes/devboxes.ts">removeTunnel</a>(id, { ...params }) -> unknown</code>
122-
- <code title="post /v1/devboxes/{id}/resume">client.devboxes.<a href="./src/resources/devboxes/devboxes.ts">resume</a>(id) -> DevboxView</code>
123120
- <code title="post /v1/devboxes/{id}/shutdown">client.devboxes.<a href="./src/resources/devboxes/devboxes.ts">shutdown</a>(id) -> DevboxView</code>
124121
- <code title="post /v1/devboxes/{id}/snapshot_disk">client.devboxes.<a href="./src/resources/devboxes/devboxes.ts">snapshotDisk</a>(id, { ...params }) -> DevboxSnapshotView</code>
125122
- <code title="post /v1/devboxes/{id}/snapshot_disk_async">client.devboxes.<a href="./src/resources/devboxes/devboxes.ts">snapshotDiskAsync</a>(id, { ...params }) -> DevboxSnapshotView</code>
126-
- <code title="post /v1/devboxes/{id}/suspend">client.devboxes.<a href="./src/resources/devboxes/devboxes.ts">suspend</a>(id) -> DevboxView</code>
127123
- <code title="post /v1/devboxes/{id}/upload_file">client.devboxes.<a href="./src/resources/devboxes/devboxes.ts">uploadFile</a>(id, { ...params }) -> unknown</code>
128124
- <code title="post /v1/devboxes/{devbox_id}/executions/{execution_id}/wait_for_status">client.devboxes.<a href="./src/resources/devboxes/devboxes.ts">waitForCommand</a>(devboxId, executionId, { ...params }) -> DevboxAsyncExecutionDetailView</code>
129125
- <code title="post /v1/devboxes/{id}/write_file_contents">client.devboxes.<a href="./src/resources/devboxes/devboxes.ts">writeFileContents</a>(id, { ...params }) -> DevboxExecutionDetailView</code>

src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ import {
125125
DevboxExecuteParams,
126126
DevboxExecuteSyncParams,
127127
DevboxExecutionDetailView,
128-
DevboxKeepAliveResponse,
129128
DevboxKillExecutionRequest,
130129
DevboxListDiskSnapshotsParams,
131130
DevboxListParams,
@@ -497,7 +496,6 @@ export declare namespace Runloop {
497496
type DevboxView as DevboxView,
498497
type DevboxCreateSSHKeyResponse as DevboxCreateSSHKeyResponse,
499498
type DevboxDeleteDiskSnapshotResponse as DevboxDeleteDiskSnapshotResponse,
500-
type DevboxKeepAliveResponse as DevboxKeepAliveResponse,
501499
type DevboxReadFileContentsResponse as DevboxReadFileContentsResponse,
502500
type DevboxRemoveTunnelResponse as DevboxRemoveTunnelResponse,
503501
type DevboxUploadFileResponse as DevboxUploadFileResponse,

src/resources/blueprints.ts

Lines changed: 0 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,6 @@ export interface BlueprintBuildParameters {
318318
*/
319319
build_args?: { [key: string]: string } | null;
320320

321-
/**
322-
* A build context backed by an Object.
323-
*/
324-
build_context?: BlueprintBuildParameters.BuildContext | null;
325-
326321
/**
327322
* A list of code mounts to be included in the Blueprint.
328323
*/
@@ -348,14 +343,6 @@ export interface BlueprintBuildParameters {
348343
*/
349344
metadata?: { [key: string]: string } | null;
350345

351-
/**
352-
* (Optional) Map of named build contexts to attach to the Blueprint build, where
353-
* the keys are the name used when referencing the contexts in a Dockerfile. See
354-
* Docker buildx additional contexts for details:
355-
* https://docs.docker.com/reference/cli/docker/buildx/build/#build-context
356-
*/
357-
named_build_contexts?: { [key: string]: BlueprintBuildParameters.NamedBuildContexts } | null;
358-
359346
/**
360347
* (Optional) Map of mount IDs/environment variable names to secret names. Secrets
361348
* will be available to commands during the build. Secrets are NOT stored in the
@@ -378,30 +365,6 @@ export interface BlueprintBuildParameters {
378365
}
379366

380367
export namespace BlueprintBuildParameters {
381-
/**
382-
* A build context backed by an Object.
383-
*/
384-
export interface BuildContext {
385-
/**
386-
* The ID of an object, whose contents are to be used as a build context.
387-
*/
388-
object_id: string;
389-
390-
type: 'object';
391-
}
392-
393-
/**
394-
* A build context backed by an Object.
395-
*/
396-
export interface NamedBuildContexts {
397-
/**
398-
* The ID of an object, whose contents are to be used as a build context.
399-
*/
400-
object_id: string;
401-
402-
type: 'object';
403-
}
404-
405368
export interface Service {
406369
/**
407370
* The image of the container service.
@@ -640,11 +603,6 @@ export interface BlueprintCreateParams {
640603
*/
641604
build_args?: { [key: string]: string } | null;
642605

643-
/**
644-
* A build context backed by an Object.
645-
*/
646-
build_context?: BlueprintCreateParams.BuildContext | null;
647-
648606
/**
649607
* A list of code mounts to be included in the Blueprint.
650608
*/
@@ -670,14 +628,6 @@ export interface BlueprintCreateParams {
670628
*/
671629
metadata?: { [key: string]: string } | null;
672630

673-
/**
674-
* (Optional) Map of named build contexts to attach to the Blueprint build, where
675-
* the keys are the name used when referencing the contexts in a Dockerfile. See
676-
* Docker buildx additional contexts for details:
677-
* https://docs.docker.com/reference/cli/docker/buildx/build/#build-context
678-
*/
679-
named_build_contexts?: { [key: string]: BlueprintCreateParams.NamedBuildContexts } | null;
680-
681631
/**
682632
* (Optional) Map of mount IDs/environment variable names to secret names. Secrets
683633
* will be available to commands during the build. Secrets are NOT stored in the
@@ -700,30 +650,6 @@ export interface BlueprintCreateParams {
700650
}
701651

702652
export namespace BlueprintCreateParams {
703-
/**
704-
* A build context backed by an Object.
705-
*/
706-
export interface BuildContext {
707-
/**
708-
* The ID of an object, whose contents are to be used as a build context.
709-
*/
710-
object_id: string;
711-
712-
type: 'object';
713-
}
714-
715-
/**
716-
* A build context backed by an Object.
717-
*/
718-
export interface NamedBuildContexts {
719-
/**
720-
* The ID of an object, whose contents are to be used as a build context.
721-
*/
722-
object_id: string;
723-
724-
type: 'object';
725-
}
726-
727653
export interface Service {
728654
/**
729655
* The image of the container service.
@@ -855,11 +781,6 @@ export interface BlueprintPreviewParams {
855781
*/
856782
build_args?: { [key: string]: string } | null;
857783

858-
/**
859-
* A build context backed by an Object.
860-
*/
861-
build_context?: BlueprintPreviewParams.BuildContext | null;
862-
863784
/**
864785
* A list of code mounts to be included in the Blueprint.
865786
*/
@@ -885,14 +806,6 @@ export interface BlueprintPreviewParams {
885806
*/
886807
metadata?: { [key: string]: string } | null;
887808

888-
/**
889-
* (Optional) Map of named build contexts to attach to the Blueprint build, where
890-
* the keys are the name used when referencing the contexts in a Dockerfile. See
891-
* Docker buildx additional contexts for details:
892-
* https://docs.docker.com/reference/cli/docker/buildx/build/#build-context
893-
*/
894-
named_build_contexts?: { [key: string]: BlueprintPreviewParams.NamedBuildContexts } | null;
895-
896809
/**
897810
* (Optional) Map of mount IDs/environment variable names to secret names. Secrets
898811
* will be available to commands during the build. Secrets are NOT stored in the
@@ -915,30 +828,6 @@ export interface BlueprintPreviewParams {
915828
}
916829

917830
export namespace BlueprintPreviewParams {
918-
/**
919-
* A build context backed by an Object.
920-
*/
921-
export interface BuildContext {
922-
/**
923-
* The ID of an object, whose contents are to be used as a build context.
924-
*/
925-
object_id: string;
926-
927-
type: 'object';
928-
}
929-
930-
/**
931-
* A build context backed by an Object.
932-
*/
933-
export interface NamedBuildContexts {
934-
/**
935-
* The ID of an object, whose contents are to be used as a build context.
936-
*/
937-
object_id: string;
938-
939-
type: 'object';
940-
}
941-
942831
export interface Service {
943832
/**
944833
* The image of the container service.

src/resources/devboxes/devboxes.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -395,15 +395,6 @@ export class Devboxes extends APIResource {
395395
return this._client.post(`/v1/devboxes/${id}/remove_tunnel`, { body, ...options });
396396
}
397397

398-
/**
399-
* Resume a suspended Devbox with the disk state captured as suspend time. Note
400-
* that any previously running processes or daemons will need to be restarted using
401-
* the Devbox shell tools.
402-
*/
403-
resume(id: string, options?: Core.RequestOptions): Core.APIPromise<DevboxView> {
404-
return this._client.post(`/v1/devboxes/${id}/resume`, options);
405-
}
406-
407398
/**
408399
* Shutdown a running Devbox. This will permanently stop the Devbox. If you want to
409400
* save the state of the Devbox, you should take a snapshot before shutting down or
@@ -460,15 +451,6 @@ export class Devboxes extends APIResource {
460451
return this._client.post(`/v1/devboxes/${id}/snapshot_disk_async`, { body, ...options });
461452
}
462453

463-
/**
464-
* Suspend a running Devbox and create a disk snapshot to enable resuming the
465-
* Devbox later with the same disk. Note this will not snapshot memory state such
466-
* as running processes.
467-
*/
468-
suspend(id: string, options?: Core.RequestOptions): Core.APIPromise<DevboxView> {
469-
return this._client.post(`/v1/devboxes/${id}/suspend`, options);
470-
}
471-
472454
/**
473455
* Upload file contents of any type (binary, text, etc) to a Devbox. Note this API
474456
* is suitable for large files (larger than 100MB) and efficiently uploads files

src/resources/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ export {
6161
type DevboxView,
6262
type DevboxCreateSSHKeyResponse,
6363
type DevboxDeleteDiskSnapshotResponse,
64-
type DevboxKeepAliveResponse,
6564
type DevboxReadFileContentsResponse,
6665
type DevboxRemoveTunnelResponse,
6766
type DevboxUploadFileResponse,

tests/api-resources/blueprints.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ describe('resource blueprints', () => {
2626
base_blueprint_id: 'base_blueprint_id',
2727
base_blueprint_name: 'base_blueprint_name',
2828
build_args: { foo: 'string' },
29-
build_context: { object_id: 'object_id', type: 'object' },
3029
code_mounts: [
3130
{
3231
repo_name: 'repo_name',
@@ -52,7 +51,6 @@ describe('resource blueprints', () => {
5251
user_parameters: { uid: 0, username: 'username' },
5352
},
5453
metadata: { foo: 'string' },
55-
named_build_contexts: { foo: { object_id: 'object_id', type: 'object' } },
5654
secrets: { foo: 'string' },
5755
services: [
5856
{
@@ -257,7 +255,6 @@ describe('resource blueprints', () => {
257255
name: 'name',
258256
base_blueprint_name: 'base_blueprint_name',
259257
build_args: { foo: 'string' },
260-
build_context: { object_id: 'object_id', type: 'object' },
261258
code_mounts: [
262259
{
263260
repo_name: 'repo_name',
@@ -283,7 +280,6 @@ describe('resource blueprints', () => {
283280
user_parameters: { uid: 0, username: 'username' },
284281
},
285282
metadata: { foo: 'string' },
286-
named_build_contexts: { foo: { object_id: 'object_id', type: 'object' } },
287283
secrets: { foo: 'string' },
288284
services: [
289285
{

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

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -262,24 +262,6 @@ describe('resource devboxes', () => {
262262
});
263263
});
264264

265-
test('keepAlive', async () => {
266-
const responsePromise = client.devboxes.keepAlive('id');
267-
const rawResponse = await responsePromise.asResponse();
268-
expect(rawResponse).toBeInstanceOf(Response);
269-
const response = await responsePromise;
270-
expect(response).not.toBeInstanceOf(Response);
271-
const dataAndResponse = await responsePromise.withResponse();
272-
expect(dataAndResponse.data).toBe(response);
273-
expect(dataAndResponse.response).toBe(rawResponse);
274-
});
275-
276-
test('keepAlive: request options instead of params are passed correctly', async () => {
277-
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
278-
await expect(client.devboxes.keepAlive('id', { path: '/_stainless_unknown_path' })).rejects.toThrow(
279-
Runloop.NotFoundError,
280-
);
281-
});
282-
283265
test('listDiskSnapshots', async () => {
284266
const responsePromise = client.devboxes.listDiskSnapshots();
285267
const rawResponse = await responsePromise.asResponse();
@@ -345,24 +327,6 @@ describe('resource devboxes', () => {
345327
const response = await client.devboxes.removeTunnel('id', { port: 0 });
346328
});
347329

348-
test('resume', async () => {
349-
const responsePromise = client.devboxes.resume('id');
350-
const rawResponse = await responsePromise.asResponse();
351-
expect(rawResponse).toBeInstanceOf(Response);
352-
const response = await responsePromise;
353-
expect(response).not.toBeInstanceOf(Response);
354-
const dataAndResponse = await responsePromise.withResponse();
355-
expect(dataAndResponse.data).toBe(response);
356-
expect(dataAndResponse.response).toBe(rawResponse);
357-
});
358-
359-
test('resume: request options instead of params are passed correctly', async () => {
360-
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
361-
await expect(client.devboxes.resume('id', { path: '/_stainless_unknown_path' })).rejects.toThrow(
362-
Runloop.NotFoundError,
363-
);
364-
});
365-
366330
test('shutdown', async () => {
367331
const responsePromise = client.devboxes.shutdown('id');
368332
const rawResponse = await responsePromise.asResponse();
@@ -439,24 +403,6 @@ describe('resource devboxes', () => {
439403
).rejects.toThrow(Runloop.NotFoundError);
440404
});
441405

442-
test('suspend', async () => {
443-
const responsePromise = client.devboxes.suspend('id');
444-
const rawResponse = await responsePromise.asResponse();
445-
expect(rawResponse).toBeInstanceOf(Response);
446-
const response = await responsePromise;
447-
expect(response).not.toBeInstanceOf(Response);
448-
const dataAndResponse = await responsePromise.withResponse();
449-
expect(dataAndResponse.data).toBe(response);
450-
expect(dataAndResponse.response).toBe(rawResponse);
451-
});
452-
453-
test('suspend: request options instead of params are passed correctly', async () => {
454-
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
455-
await expect(client.devboxes.suspend('id', { path: '/_stainless_unknown_path' })).rejects.toThrow(
456-
Runloop.NotFoundError,
457-
);
458-
});
459-
460406
test('uploadFile: only required params', async () => {
461407
const responsePromise = client.devboxes.uploadFile('id', { path: 'path' });
462408
const rawResponse = await responsePromise.asResponse();

0 commit comments

Comments
 (0)