Skip to content

Commit 35f91a2

Browse files
feat(api): api update
1 parent f6cf9d5 commit 35f91a2

5 files changed

Lines changed: 32 additions & 20 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: 15
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-ac16f44d89080c75848b7db501921b159820ec69b23cac750448c429df12abdb.yml
3-
openapi_spec_hash: e58f2d7597976dca2450667819526e74
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-71baf9659e6453321d625c04c51cce57254aac96463f4f4da5e8d62f1dce870f.yml
3+
openapi_spec_hash: 008a2733d50d6b759261d39c2ff82ea4
44
config_hash: 8457a42ab599fb499cdacdb3ff40cfe9

src/client.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -751,9 +751,6 @@ export class SFCNodes {
751751

752752
static toFile = Uploads.toFile;
753753

754-
/**
755-
* Manage your Virtual Machines.
756-
*/
757754
vms: API.VMs = new API.VMs(this);
758755
/**
759756
* Manage compute nodes. Create, list, extend, and release nodes for your workloads.

src/resources/vms/images.ts

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ export class Images extends APIResource {
1616
* the workspace to list sfc-provided public images instead.
1717
*/
1818
list(query: ImageListParams, options?: RequestOptions): APIPromise<ImageListResponse> {
19-
return this._client.get('/preview/v2/images', {
20-
query,
21-
defaultBaseURL: 'https://api.sfcompute.com',
22-
...options,
23-
});
19+
return this._client.get('/preview/v2/images', { query, ...options });
2420
}
2521

2622
/**
@@ -29,10 +25,7 @@ export class Images extends APIResource {
2925
* Retrieve an image by ID. Returns both user-owned and public images.
3026
*/
3127
get(id: string, options?: RequestOptions): APIPromise<ImageGetResponse> {
32-
return this._client.get(path`/preview/v2/images/${id}`, {
33-
defaultBaseURL: 'https://api.sfcompute.com',
34-
...options,
35-
});
28+
return this._client.get(path`/preview/v2/images/${id}`, options);
3629
}
3730
}
3831

@@ -48,13 +41,22 @@ export interface ImageListResponse {
4841

4942
export namespace ImageListResponse {
5043
export interface Data {
44+
/**
45+
* Accepts the canonical prefix below; additional legacy prefixes are aliased for
46+
* read compatibility. Writes always emit the canonical form.
47+
*/
5148
id: string;
5249

5350
/**
5451
* Unix timestamp.
5552
*/
5653
created_at: number;
5754

55+
/**
56+
* Whether this is an sfc-provided public image.
57+
*/
58+
is_public: boolean;
59+
5860
name: string;
5961

6062
object: 'image';
@@ -71,20 +73,34 @@ export namespace ImageListResponse {
7173

7274
workspace: string;
7375

76+
/**
77+
* The workspace that owns this image.
78+
*/
79+
workspace_id: string;
80+
7481
provider?: string | null;
7582

7683
sha256?: string | null;
7784
}
7885
}
7986

8087
export interface ImageGetResponse {
88+
/**
89+
* Accepts the canonical prefix below; additional legacy prefixes are aliased for
90+
* read compatibility. Writes always emit the canonical form.
91+
*/
8192
id: string;
8293

8394
/**
8495
* Unix timestamp.
8596
*/
8697
created_at: number;
8798

99+
/**
100+
* Whether this is an sfc-provided public image.
101+
*/
102+
is_public: boolean;
103+
88104
name: string;
89105

90106
object: 'image';
@@ -101,6 +117,11 @@ export interface ImageGetResponse {
101117

102118
workspace: string;
103119

120+
/**
121+
* The workspace that owns this image.
122+
*/
123+
workspace_id: string;
124+
104125
provider?: string | null;
105126

106127
sha256?: string | null;

src/resources/vms/script.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ import { APIResource } from '../../core/resource';
44
import { APIPromise } from '../../core/api-promise';
55
import { RequestOptions } from '../../internal/request-options';
66

7-
/**
8-
* Manage your Virtual Machines.
9-
*/
107
export class Script extends APIResource {
118
create(body: ScriptCreateParams, options?: RequestOptions): APIPromise<ScriptCreateResponse> {
129
return this._client.post('/v0/vms/script', { body, ...options });

src/resources/vms/vms.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ import { Script, ScriptCreateParams, ScriptCreateResponse, ScriptRetrieveRespons
88
import { APIPromise } from '../../core/api-promise';
99
import { RequestOptions } from '../../internal/request-options';
1010

11-
/**
12-
* Manage your Virtual Machines.
13-
*/
1411
export class VMs extends APIResource {
1512
script: ScriptAPI.Script = new ScriptAPI.Script(this._client);
1613
images: ImagesAPI.Images = new ImagesAPI.Images(this._client);

0 commit comments

Comments
 (0)