Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.43.0"
".": "0.44.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 95
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gbox%2Fgbox-sdk-c95b1a18769f380da04aa1e921d616c59e6baf3870b7b461c19a8d13e5f03b55.yml
openapi_spec_hash: be6211ac614aaaba19c579da7628da52
config_hash: c034f0250abf5ce12e31af4c24a03756
configured_endpoints: 97
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gbox%2Fgbox-sdk-d655577fa9153c0e4f78b7d3770a898732654eab850f19f7b56e22c8da7e59fa.yml
openapi_spec_hash: 593e89370362bb01dba916fca8ce529a
config_hash: 6812a7e5258816ba39d8ec1311a62f45
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 0.44.0 (2025-12-05)

Full Changelog: [v0.43.0...v0.44.0](https://github.com/babelcloud/gbox-sdk-ts/compare/v0.43.0...v0.44.0)

### Features

* **api:** api update ([c6c19dc](https://github.com/babelcloud/gbox-sdk-ts/commit/c6c19dcfd988f8e636eeeae54a21f76b8ef027e6))
* **api:** api update ([a6336b7](https://github.com/babelcloud/gbox-sdk-ts/commit/a6336b734b654d4bb032ffab9a4514b7aa5448de))


### Chores

* **client:** fix logger property type ([57fa5fd](https://github.com/babelcloud/gbox-sdk-ts/commit/57fa5fd3835fa5d89d41b76ffc30c95d712c9f64))
* **internal:** upgrade eslint ([80c16b5](https://github.com/babelcloud/gbox-sdk-ts/commit/80c16b5c7b540cb69ca3b5f36cdfe0a8818f5b90))

## 0.43.0 (2025-11-18)

Full Changelog: [v0.42.0...v0.43.0](https://github.com/babelcloud/gbox-sdk-ts/compare/v0.42.0...v0.43.0)
Expand Down
5 changes: 4 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,14 @@ Types:

- <code><a href="./src/resources/v1/boxes/snapshot.ts">SnapshotCreateResponse</a></code>
- <code><a href="./src/resources/v1/boxes/snapshot.ts">SnapshotListResponse</a></code>
- <code><a href="./src/resources/v1/boxes/snapshot.ts">SnapshotGetResponse</a></code>

Methods:

- <code title="post /snapshots/{boxId}">client.v1.boxes.snapshot.<a href="./src/resources/v1/boxes/snapshot.ts">create</a>(boxID, { ...params }) -> SnapshotCreateResponse</code>
- <code title="get /snapshots">client.v1.boxes.snapshot.<a href="./src/resources/v1/boxes/snapshot.ts">list</a>() -> SnapshotListResponse</code>
- <code title="get /snapshots">client.v1.boxes.snapshot.<a href="./src/resources/v1/boxes/snapshot.ts">list</a>({ ...params }) -> SnapshotListResponse</code>
- <code title="get /snapshots/{snapshotName}">client.v1.boxes.snapshot.<a href="./src/resources/v1/boxes/snapshot.ts">get</a>(snapshotName) -> SnapshotGetResponse</code>
- <code title="delete /snapshots/{snapshotName}">client.v1.boxes.snapshot.<a href="./src/resources/v1/boxes/snapshot.ts">remove</a>(snapshotName) -> void</code>

### Proxy

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gbox-sdk",
"version": "0.43.0",
"version": "0.44.0",
"description": "The official TypeScript library for the Gbox Client API",
"author": "Gbox Client <>",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -46,7 +46,7 @@
"@types/ws": "^8.18.1",
"@typescript-eslint/eslint-plugin": "8.31.1",
"@typescript-eslint/parser": "8.31.1",
"eslint": "^9.20.1",
"eslint": "^9.39.1",
"eslint-plugin-prettier": "^5.4.1",
"eslint-plugin-unused-imports": "^4.1.4",
"iconv-lite": "^0.6.3",
Expand Down
2 changes: 1 addition & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export class GboxClient {
baseURL: string;
maxRetries: number;
timeout: number;
logger: Logger | undefined;
logger: Logger;
logLevel: LogLevel | undefined;
fetchOptions: MergedRequestInit | undefined;

Expand Down
2 changes: 1 addition & 1 deletion src/resources/v1/boxes/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ export interface ActionCommonOptions {
/**
* Model to use for natural-language target resolution. Defaults to 'uitars'.
*/
model?: 'gpt-5' | 'gpt-4o' | 'ui-tars' | 'openai-computer-use';
model?: 'gpt-5' | 'gpt-4o' | 'gelato' | 'ui-tars' | 'openai-computer-use';

/**
* Screenshot options. Can be a boolean to enable/disable screenshots, or an object
Expand Down
31 changes: 30 additions & 1 deletion src/resources/v1/boxes/boxes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,14 @@ import {
import * as ProxyAPI from './proxy';
import { Proxy, ProxyGetResponse, ProxySetParams, ProxySetResponse } from './proxy';
import * as SnapshotAPI from './snapshot';
import { Snapshot, SnapshotCreateParams, SnapshotCreateResponse, SnapshotListResponse } from './snapshot';
import {
Snapshot,
SnapshotCreateParams,
SnapshotCreateResponse,
SnapshotGetResponse,
SnapshotListParams,
SnapshotListResponse,
} from './snapshot';
import * as StorageAPI from './storage';
import { Storage, StoragePresignedURLParams, StoragePresignedURLResponse } from './storage';
import { APIPromise } from '../../../core/api-promise';
Expand Down Expand Up @@ -653,6 +660,11 @@ export namespace CreateLinuxBox {
* help you organize and filter your boxes.
*/
labels?: { [key: string]: string };

/**
* Snapshot name - snapshot for creating vm linux box
*/
snapshotName?: string;
}
}

Expand Down Expand Up @@ -757,6 +769,16 @@ export namespace LinuxBox {
* Device type - container or vm Linux device
*/
deviceType?: 'container' | 'vm';

/**
* Snapshot id
*/
snapshotId?: string;

/**
* Snapshot name
*/
snapshotName?: string;
}

export namespace Config {
Expand Down Expand Up @@ -1126,6 +1148,11 @@ export namespace BoxCreateLinuxParams {
* help you organize and filter your boxes.
*/
labels?: { [key: string]: string };

/**
* Snapshot name - snapshot for creating vm linux box
*/
snapshotName?: string;
}
}

Expand Down Expand Up @@ -1339,7 +1366,9 @@ export declare namespace Boxes {
Snapshot as Snapshot,
type SnapshotCreateResponse as SnapshotCreateResponse,
type SnapshotListResponse as SnapshotListResponse,
type SnapshotGetResponse as SnapshotGetResponse,
type SnapshotCreateParams as SnapshotCreateParams,
type SnapshotListParams as SnapshotListParams,
};

export {
Expand Down
2 changes: 2 additions & 0 deletions src/resources/v1/boxes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ export {
Snapshot,
type SnapshotCreateResponse,
type SnapshotListResponse,
type SnapshotGetResponse,
type SnapshotCreateParams,
type SnapshotListParams,
} from './snapshot';
export { Storage, type StoragePresignedURLResponse, type StoragePresignedURLParams } from './storage';
93 changes: 90 additions & 3 deletions src/resources/v1/boxes/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { APIResource } from '../../../core/resource';
import { APIPromise } from '../../../core/api-promise';
import { buildHeaders } from '../../../internal/headers';
import { RequestOptions } from '../../../internal/request-options';
import { path } from '../../../internal/utils/path';

Expand All @@ -27,15 +28,47 @@ export class Snapshot extends APIResource {
}

/**
* List all snapshots for a given box.
* List all snapshots of current orginazation.
*
* @example
* ```ts
* const snapshots = await client.v1.boxes.snapshot.list();
* ```
*/
list(options?: RequestOptions): APIPromise<SnapshotListResponse> {
return this._client.get('/snapshots', options);
list(
query: SnapshotListParams | null | undefined = {},
options?: RequestOptions,
): APIPromise<SnapshotListResponse> {
return this._client.get('/snapshots', { query, ...options });
}

/**
* Get a snapshot with specified name
*
* @example
* ```ts
* const snapshot = await client.v1.boxes.snapshot.get(
* 'snapshotName',
* );
* ```
*/
get(snapshotName: string, options?: RequestOptions): APIPromise<SnapshotGetResponse> {
return this._client.get(path`/snapshots/${snapshotName}`, options);
}

/**
* Remove a snapshot of specified id.
*
* @example
* ```ts
* await client.v1.boxes.snapshot.remove('snapshotName');
* ```
*/
remove(snapshotName: string, options?: RequestOptions): APIPromise<void> {
return this._client.delete(path`/snapshots/${snapshotName}`, {
...options,
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
});
}
}

Expand All @@ -62,6 +95,11 @@ export interface SnapshotCreateResponse {
* The provider type of the snapshot
*/
providerType: 'vm';

/**
* The status of the snapshot
*/
status: 'Pending' | 'Available' | 'Error';
}

/**
Expand Down Expand Up @@ -113,20 +151,69 @@ export namespace SnapshotListResponse {
* The provider type of the snapshot
*/
providerType: 'vm';

/**
* The status of the snapshot
*/
status: 'Pending' | 'Available' | 'Error';
}
}

/**
* Snapshot configuration
*/
export interface SnapshotGetResponse {
/**
* Unique identifier for the snapshot
*/
id: string;

/**
* The type of the box that the snapshot is taken from
*/
boxType: 'linux' | 'android';

/**
* Name of the snapshot. This name must be unique within the organization.
*/
name: string;

/**
* The provider type of the snapshot
*/
providerType: 'vm';

/**
* The status of the snapshot
*/
status: 'Pending' | 'Available' | 'Error';
}

export interface SnapshotCreateParams {
/**
* Name of the snapshot. This name must be unique within the organization.
*/
name: string;
}

export interface SnapshotListParams {
/**
* Page number
*/
page?: number;

/**
* Page size
*/
pageSize?: number;
}

export declare namespace Snapshot {
export {
type SnapshotCreateResponse as SnapshotCreateResponse,
type SnapshotListResponse as SnapshotListResponse,
type SnapshotGetResponse as SnapshotGetResponse,
type SnapshotCreateParams as SnapshotCreateParams,
type SnapshotListParams as SnapshotListParams,
};
}
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.43.0'; // x-release-please-version
export const VERSION = '0.44.0'; // x-release-please-version
Loading
Loading