From c1720f7c8cec74ddf2630781a75b371c2d30d050 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 21 May 2026 02:27:43 +0000 Subject: [PATCH 01/23] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1523999..a937ca5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 15 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-679b42a61deffd275fd9e01d6e2c0024540cd0059f4cc01bb52cc2876aaff3af.yml -openapi_spec_hash: 8c3eea1499910eb3683d774fe1a21f79 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-ac16f44d89080c75848b7db501921b159820ec69b23cac750448c429df12abdb.yml +openapi_spec_hash: e58f2d7597976dca2450667819526e74 config_hash: 8457a42ab599fb499cdacdb3ff40cfe9 From f6cf9d5c39d45df96bee9673184fb5f955c69dd3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 May 2026 02:20:11 +0000 Subject: [PATCH 02/23] chore(internal): codegen related update --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 00842e3..06fc108 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1215,9 +1215,9 @@ baseline-browser-mapping@^2.9.0: integrity sha512-B0xUquLkiGLgHhpPBqvl7GWegWBUNuujQ6kXd/r1U38ElPT6Ok8KZ8e+FpUGEc2ZoRQUzq/aUnaKFc/svWUGSg== brace-expansion@^2.0.2: - version "2.1.0" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.0.tgz#4f41a41190216ee36067ec381526fe9539c4f0ae" - integrity sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w== + version "2.1.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.1.tgz#c68b1c4111c76aae3a6fba55d496cee10c39dad8" + integrity sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA== dependencies: balanced-match "^1.0.0" From 35f91a27ce035bbf213c19243ce481312855641d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 12 Jun 2026 17:27:53 +0000 Subject: [PATCH 03/23] feat(api): api update --- .stats.yml | 4 ++-- src/client.ts | 3 --- src/resources/vms/images.ts | 39 ++++++++++++++++++++++++++++--------- src/resources/vms/script.ts | 3 --- src/resources/vms/vms.ts | 3 --- 5 files changed, 32 insertions(+), 20 deletions(-) diff --git a/.stats.yml b/.stats.yml index a937ca5..216942e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 15 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-ac16f44d89080c75848b7db501921b159820ec69b23cac750448c429df12abdb.yml -openapi_spec_hash: e58f2d7597976dca2450667819526e74 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-71baf9659e6453321d625c04c51cce57254aac96463f4f4da5e8d62f1dce870f.yml +openapi_spec_hash: 008a2733d50d6b759261d39c2ff82ea4 config_hash: 8457a42ab599fb499cdacdb3ff40cfe9 diff --git a/src/client.ts b/src/client.ts index bf4babd..00b5be6 100644 --- a/src/client.ts +++ b/src/client.ts @@ -751,9 +751,6 @@ export class SFCNodes { static toFile = Uploads.toFile; - /** - * Manage your Virtual Machines. - */ vms: API.VMs = new API.VMs(this); /** * Manage compute nodes. Create, list, extend, and release nodes for your workloads. diff --git a/src/resources/vms/images.ts b/src/resources/vms/images.ts index b2637dc..4bb2ba4 100644 --- a/src/resources/vms/images.ts +++ b/src/resources/vms/images.ts @@ -16,11 +16,7 @@ export class Images extends APIResource { * the workspace to list sfc-provided public images instead. */ list(query: ImageListParams, options?: RequestOptions): APIPromise { - return this._client.get('/preview/v2/images', { - query, - defaultBaseURL: 'https://api.sfcompute.com', - ...options, - }); + return this._client.get('/preview/v2/images', { query, ...options }); } /** @@ -29,10 +25,7 @@ export class Images extends APIResource { * Retrieve an image by ID. Returns both user-owned and public images. */ get(id: string, options?: RequestOptions): APIPromise { - return this._client.get(path`/preview/v2/images/${id}`, { - defaultBaseURL: 'https://api.sfcompute.com', - ...options, - }); + return this._client.get(path`/preview/v2/images/${id}`, options); } } @@ -48,6 +41,10 @@ export interface ImageListResponse { export namespace ImageListResponse { export interface Data { + /** + * Accepts the canonical prefix below; additional legacy prefixes are aliased for + * read compatibility. Writes always emit the canonical form. + */ id: string; /** @@ -55,6 +52,11 @@ export namespace ImageListResponse { */ created_at: number; + /** + * Whether this is an sfc-provided public image. + */ + is_public: boolean; + name: string; object: 'image'; @@ -71,6 +73,11 @@ export namespace ImageListResponse { workspace: string; + /** + * The workspace that owns this image. + */ + workspace_id: string; + provider?: string | null; sha256?: string | null; @@ -78,6 +85,10 @@ export namespace ImageListResponse { } export interface ImageGetResponse { + /** + * Accepts the canonical prefix below; additional legacy prefixes are aliased for + * read compatibility. Writes always emit the canonical form. + */ id: string; /** @@ -85,6 +96,11 @@ export interface ImageGetResponse { */ created_at: number; + /** + * Whether this is an sfc-provided public image. + */ + is_public: boolean; + name: string; object: 'image'; @@ -101,6 +117,11 @@ export interface ImageGetResponse { workspace: string; + /** + * The workspace that owns this image. + */ + workspace_id: string; + provider?: string | null; sha256?: string | null; diff --git a/src/resources/vms/script.ts b/src/resources/vms/script.ts index e70af7b..bd6cc92 100644 --- a/src/resources/vms/script.ts +++ b/src/resources/vms/script.ts @@ -4,9 +4,6 @@ import { APIResource } from '../../core/resource'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; -/** - * Manage your Virtual Machines. - */ export class Script extends APIResource { create(body: ScriptCreateParams, options?: RequestOptions): APIPromise { return this._client.post('/v0/vms/script', { body, ...options }); diff --git a/src/resources/vms/vms.ts b/src/resources/vms/vms.ts index 5e8e580..d3f2ff9 100644 --- a/src/resources/vms/vms.ts +++ b/src/resources/vms/vms.ts @@ -8,9 +8,6 @@ import { Script, ScriptCreateParams, ScriptCreateResponse, ScriptRetrieveRespons import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; -/** - * Manage your Virtual Machines. - */ export class VMs extends APIResource { script: ScriptAPI.Script = new ScriptAPI.Script(this._client); images: ImagesAPI.Images = new ImagesAPI.Images(this._client); From 41d039709d0b6a83adaf223ff3ec8f08619b3bd8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 13 Jun 2026 01:27:45 +0000 Subject: [PATCH 04/23] feat(api): api update --- .stats.yml | 4 ++-- src/resources/nodes.ts | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.stats.yml b/.stats.yml index 216942e..a6d1cfc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 15 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-71baf9659e6453321d625c04c51cce57254aac96463f4f4da5e8d62f1dce870f.yml -openapi_spec_hash: 008a2733d50d6b759261d39c2ff82ea4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-1674ab68979e9479cf0a4b6b87108ac50e6268b5c6776b87a3db72316a98a497.yml +openapi_spec_hash: 2112ce03c976c58ffc349c6bde956a54 config_hash: 8457a42ab599fb499cdacdb3ff40cfe9 diff --git a/src/resources/nodes.ts b/src/resources/nodes.ts index 993bb52..b53b81a 100644 --- a/src/resources/nodes.ts +++ b/src/resources/nodes.ts @@ -127,7 +127,8 @@ export interface CreateNodesRequest { _preview_enable_infiniband?: boolean; /** - * Allow auto reserved nodes to be created in any zone that meets the requirements + * @deprecated Deprecated: no longer supported. Requests with `any_zone: true` are + * rejected; specify a zone instead. */ any_zone?: boolean; @@ -169,8 +170,7 @@ export interface CreateNodesRequest { start_at?: number; /** - * Zone to create the nodes in. Required for auto reserved nodes if any_zone is - * false. + * Zone to create the nodes in. Required for reserved and auto reserved nodes. */ zone?: string; } @@ -481,7 +481,8 @@ export interface NodeCreateParams { _preview_enable_infiniband?: boolean; /** - * Allow auto reserved nodes to be created in any zone that meets the requirements + * @deprecated Deprecated: no longer supported. Requests with `any_zone: true` are + * rejected; specify a zone instead. */ any_zone?: boolean; @@ -523,8 +524,7 @@ export interface NodeCreateParams { start_at?: number; /** - * Zone to create the nodes in. Required for auto reserved nodes if any_zone is - * false. + * Zone to create the nodes in. Required for reserved and auto reserved nodes. */ zone?: string; } From 7246bb916cb644bca7fd48e6bd9ba1f66f64ad53 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 02:17:05 +0000 Subject: [PATCH 05/23] fix(client): send content-type header for requests with an omitted optional body --- src/client.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/client.ts b/src/client.ts index 00b5be6..4ed1d9a 100644 --- a/src/client.ts +++ b/src/client.ts @@ -687,11 +687,19 @@ export class SFCNodes { return () => controller.abort(); } - private buildBody({ options: { body, headers: rawHeaders } }: { options: FinalRequestOptions }): { + private buildBody({ options }: { options: FinalRequestOptions }): { bodyHeaders: HeadersLike; body: BodyInit | undefined; } { + const { body, headers: rawHeaders } = options; if (!body) { + // A resource method always passes a `body` key when its operation defines a + // request body, even if the caller omitted an optional body param. Keep the + // content-type for those, and only elide it for operations with no body at + // all (e.g. GET/DELETE). + if (body == null && 'body' in options) { + return this.#encoder({ body, headers: buildHeaders([rawHeaders]) }); + } return { bodyHeaders: undefined, body: undefined }; } const headers = buildHeaders([rawHeaders]); From 58b97726671c3feebdba5096517cab37947ece3d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 02:27:49 +0000 Subject: [PATCH 06/23] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a6d1cfc..53f5d7e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 15 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-1674ab68979e9479cf0a4b6b87108ac50e6268b5c6776b87a3db72316a98a497.yml -openapi_spec_hash: 2112ce03c976c58ffc349c6bde956a54 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-8cdcf89e1a6da387126c95ef40c672c3274eec84ddbed0b858f5b9ee066acf22.yml +openapi_spec_hash: 486c30d4da073ff409fc6c2ad16f246d config_hash: 8457a42ab599fb499cdacdb3ff40cfe9 From 07319d17e48896c21fc6649827bfc161cecc9182 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 22:27:46 +0000 Subject: [PATCH 07/23] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 53f5d7e..c308587 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 15 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-8cdcf89e1a6da387126c95ef40c672c3274eec84ddbed0b858f5b9ee066acf22.yml -openapi_spec_hash: 486c30d4da073ff409fc6c2ad16f246d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-c16499ae5f35614477871b551b512d690de90ad9119d8b2880ec32954249fed7.yml +openapi_spec_hash: 044674a35500184e93f3bd162624177b config_hash: 8457a42ab599fb499cdacdb3ff40cfe9 From fd81adc3318dad9b4071db56b6665da21cd9571e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 18 Jun 2026 19:27:46 +0000 Subject: [PATCH 08/23] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c308587..0bd70f4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 15 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-c16499ae5f35614477871b551b512d690de90ad9119d8b2880ec32954249fed7.yml -openapi_spec_hash: 044674a35500184e93f3bd162624177b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-54c7a3c888e5b1c1b7638ad7b9637fcf8828b1be250fba0faf2141e877173856.yml +openapi_spec_hash: b5e689302acb2c5d34c0e39a1cef7bca config_hash: 8457a42ab599fb499cdacdb3ff40cfe9 From 934edbbddd37f12c484aead38f51caa1ab4ddbc5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 18 Jun 2026 21:27:52 +0000 Subject: [PATCH 09/23] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0bd70f4..6138256 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 15 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-54c7a3c888e5b1c1b7638ad7b9637fcf8828b1be250fba0faf2141e877173856.yml -openapi_spec_hash: b5e689302acb2c5d34c0e39a1cef7bca +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-92275befc91a6f949d952adc9545bf9cf714c6b1a76efdc17dfc71e748be835c.yml +openapi_spec_hash: dfa2853e7c0f8ae9fd16c6b7b1b10c99 config_hash: 8457a42ab599fb499cdacdb3ff40cfe9 From b4f4d3921c884192e275470fba8729287a7df2fa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 22 Jun 2026 22:27:49 +0000 Subject: [PATCH 10/23] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6138256..deadb14 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 15 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-92275befc91a6f949d952adc9545bf9cf714c6b1a76efdc17dfc71e748be835c.yml -openapi_spec_hash: dfa2853e7c0f8ae9fd16c6b7b1b10c99 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-32de1605ebf72314e0a57eedb96a1ffe94493ce9c23505be69677b6dfdeaee4d.yml +openapi_spec_hash: b7fff815b33eb8c4ce26c8f447b0b74e config_hash: 8457a42ab599fb499cdacdb3ff40cfe9 From 50de1207cee11c0c5f6a725835b0882c135fc2c7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 22 Jun 2026 23:27:47 +0000 Subject: [PATCH 11/23] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index deadb14..d412e9b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 15 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-32de1605ebf72314e0a57eedb96a1ffe94493ce9c23505be69677b6dfdeaee4d.yml -openapi_spec_hash: b7fff815b33eb8c4ce26c8f447b0b74e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-2cb466cd96cd24fd24b8ba864e7003bb398c9b96f4fabb78271c567bbb957a49.yml +openapi_spec_hash: 1bb6f2ab7002777cfbc99da6f2cf9f19 config_hash: 8457a42ab599fb499cdacdb3ff40cfe9 From 25360e5afa5c50d968e351d27f02e1c6a5b30ab1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 23 Jun 2026 20:27:50 +0000 Subject: [PATCH 12/23] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d412e9b..8327b6b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 15 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-2cb466cd96cd24fd24b8ba864e7003bb398c9b96f4fabb78271c567bbb957a49.yml -openapi_spec_hash: 1bb6f2ab7002777cfbc99da6f2cf9f19 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-33c332a36b54c90ca149aaa6fe6a06463549fa877018b54c32f23f9080ab637f.yml +openapi_spec_hash: 58a1116d12b886dca5b0a0a8fc743dc1 config_hash: 8457a42ab599fb499cdacdb3ff40cfe9 From 0d016e5f8f1926a8d9d2e2a85a2908fc9baca211 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 18:27:48 +0000 Subject: [PATCH 13/23] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8327b6b..761d306 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 15 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-33c332a36b54c90ca149aaa6fe6a06463549fa877018b54c32f23f9080ab637f.yml -openapi_spec_hash: 58a1116d12b886dca5b0a0a8fc743dc1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-ea787090694809db45a4d95b9047f9ed67d2776f79dbb54d511c1f292f65a616.yml +openapi_spec_hash: 742daedeea815027f28e3b179c8858f6 config_hash: 8457a42ab599fb499cdacdb3ff40cfe9 From 424836e5e8c2d8fb0602153796b903971f97e746 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 22:27:47 +0000 Subject: [PATCH 14/23] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 761d306..651f782 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 15 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-ea787090694809db45a4d95b9047f9ed67d2776f79dbb54d511c1f292f65a616.yml -openapi_spec_hash: 742daedeea815027f28e3b179c8858f6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-591ad57cabef42730a2aa26ae33cffbd34672074ec5d252fcadac2c3e383cfb4.yml +openapi_spec_hash: 32ab12f2edb97118654a3e82863d48bf config_hash: 8457a42ab599fb499cdacdb3ff40cfe9 From b8336e4130a2bb3122b6931af07dca1d7c34024a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Jun 2026 01:27:47 +0000 Subject: [PATCH 15/23] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 651f782..ac03c56 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 15 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-591ad57cabef42730a2aa26ae33cffbd34672074ec5d252fcadac2c3e383cfb4.yml -openapi_spec_hash: 32ab12f2edb97118654a3e82863d48bf +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-f6c173bdc39744f16123b79c23c9b285d48d8a72d869c69e6d284c139e0f39f7.yml +openapi_spec_hash: 30f1c3f2fa9a89741ec1f33a7a2a759e config_hash: 8457a42ab599fb499cdacdb3ff40cfe9 From dbea29342d81a6028e0f029a13d8a100265aacff Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Jun 2026 06:27:46 +0000 Subject: [PATCH 16/23] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ac03c56..7cc539d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 15 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-f6c173bdc39744f16123b79c23c9b285d48d8a72d869c69e6d284c139e0f39f7.yml -openapi_spec_hash: 30f1c3f2fa9a89741ec1f33a7a2a759e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-83efbf5954208af7225bafc441ce3406cb1f34a1054e5563e1a71a6eb919200e.yml +openapi_spec_hash: 8641c5c668bba7997707115fe1dc2fa8 config_hash: 8457a42ab599fb499cdacdb3ff40cfe9 From b3692fb8c537029e9460404cc3de31ae0a16ffce Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 27 Jun 2026 01:27:45 +0000 Subject: [PATCH 17/23] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7cc539d..e9d06f1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 15 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-83efbf5954208af7225bafc441ce3406cb1f34a1054e5563e1a71a6eb919200e.yml -openapi_spec_hash: 8641c5c668bba7997707115fe1dc2fa8 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-98a8a85ac88ff1c8a14fdc5ff1e7fa4200179933598731f5cb2cc3baee4a9665.yml +openapi_spec_hash: c1f3e324fcfe4f3d4b712c991921c32a config_hash: 8457a42ab599fb499cdacdb3ff40cfe9 From 9af0bc4c3845a3666b132927c36b564f276ef5d4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Jun 2026 03:27:47 +0000 Subject: [PATCH 18/23] feat(api): api update --- .stats.yml | 4 +- api.md | 3 +- src/client.ts | 4 - src/resources/index.ts | 2 - src/resources/nodes.ts | 144 ++---------------------------- tests/api-resources/nodes.test.ts | 22 +---- 6 files changed, 14 insertions(+), 165 deletions(-) diff --git a/.stats.yml b/.stats.yml index e9d06f1..ab7fabc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 15 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-98a8a85ac88ff1c8a14fdc5ff1e7fa4200179933598731f5cb2cc3baee4a9665.yml -openapi_spec_hash: c1f3e324fcfe4f3d4b712c991921c32a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-c3fed1297d5c6e06525accf2f047e6f5f9a1035e60c8ad69ff707d8e6df0894e.yml +openapi_spec_hash: 63940433f23d6a460906fe4838a3cb2f config_hash: 8457a42ab599fb499cdacdb3ff40cfe9 diff --git a/api.md b/api.md index 5fb1a7e..fdd171d 100644 --- a/api.md +++ b/api.md @@ -40,7 +40,6 @@ Methods: Types: - AcceleratorType -- CreateNodesRequest - ErrorContent - ErrorDetail - ErrorType @@ -52,7 +51,7 @@ Types: Methods: -- client.nodes.create({ ...params }) -> ListResponseNode +- client.nodes.create() -> void - client.nodes.list({ ...params }) -> ListResponseNode - client.nodes.delete(id) -> void - client.nodes.extend(id, { ...params }) -> Node diff --git a/src/client.ts b/src/client.ts index 4ed1d9a..8c6e658 100644 --- a/src/client.ts +++ b/src/client.ts @@ -19,14 +19,12 @@ import * as API from './resources/index'; import { APIPromise } from './core/api-promise'; import { AcceleratorType, - CreateNodesRequest, ErrorContent, ErrorDetail, ErrorType, ExtendNodeRequest, ListResponseNode, Node, - NodeCreateParams, NodeExtendParams, NodeListParams, NodeRedeployParams, @@ -790,7 +788,6 @@ export declare namespace SFCNodes { export { Nodes as Nodes, type AcceleratorType as AcceleratorType, - type CreateNodesRequest as CreateNodesRequest, type ErrorContent as ErrorContent, type ErrorDetail as ErrorDetail, type ErrorType as ErrorType, @@ -799,7 +796,6 @@ export declare namespace SFCNodes { type Node as Node, type NodeType as NodeType, type Status as Status, - type NodeCreateParams as NodeCreateParams, type NodeListParams as NodeListParams, type NodeExtendParams as NodeExtendParams, type NodeRedeployParams as NodeRedeployParams, diff --git a/src/resources/index.ts b/src/resources/index.ts index 30616f8..b2e8226 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -3,7 +3,6 @@ export { Nodes, type AcceleratorType, - type CreateNodesRequest, type ErrorContent, type ErrorDetail, type ErrorType, @@ -12,7 +11,6 @@ export { type Node, type NodeType, type Status, - type NodeCreateParams, type NodeListParams, type NodeExtendParams, type NodeRedeployParams, diff --git a/src/resources/nodes.ts b/src/resources/nodes.ts index b53b81a..41a5edd 100644 --- a/src/resources/nodes.ts +++ b/src/resources/nodes.ts @@ -12,18 +12,20 @@ import { path } from '../internal/utils/path'; */ export class Nodes extends APIResource { /** - * Create VM nodes + * Nodes are deprecated. See https://docs.sfcompute.com for the latest version of + * our product. You can migrate existing nodes using `sf nodes migrate` in the new + * CLI. This endpoint always returns `410 Gone`. * * @example * ```ts - * const listResponseNode = await client.nodes.create({ - * desired_count: 1, - * max_price_per_node_hour: 1600, - * }); + * await client.nodes.create(); * ``` */ - create(body: NodeCreateParams, options?: RequestOptions): APIPromise { - return this._client.post('/v1/nodes', { body, ...options }); + create(options?: RequestOptions): APIPromise { + return this._client.post('/v1/nodes', { + ...options, + headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), + }); } /** @@ -112,69 +114,6 @@ export class Nodes extends APIResource { export type AcceleratorType = 'H100' | 'H200'; -export interface CreateNodesRequest { - desired_count: number; - - /** - * Max price per hour for a node in cents - */ - max_price_per_node_hour: number; - - /** - * **Experimental — subject to change or removal without notice.** Enables - * InfiniBand. Requires hardware in the chosen zone that supports InfiniBand. - */ - _preview_enable_infiniband?: boolean; - - /** - * @deprecated Deprecated: no longer supported. Requests with `any_zone: true` are - * rejected; specify a zone instead. - */ - any_zone?: boolean; - - /** - * User script to be executed during the VM's boot process Data should be base64 - * encoded - */ - cloud_init_user_data?: string; - - /** - * End time as Unix timestamp in seconds If provided, end time must be aligned to - * the hour If not provided, the node will be created as an autoreserved node - */ - end_at?: number | null; - - /** - * (Optional) If set, enables forwarding to the VM on port 443. - */ - forward_443?: boolean; - - /** - * Custom image ID to use for the VM instances - */ - image_id?: string; - - /** - * Custom node names Names cannot begin with 'vm*' or 'n*' as this is reserved for - * system-generated IDs Names cannot be numeric strings Names cannot exceed 256 - * characters - */ - names?: Array; - - node_type?: NodeType | null; - - /** - * Start time as Unix timestamp in seconds Optional for reserved nodes. If not - * provided, defaults to now - */ - start_at?: number; - - /** - * Zone to create the nodes in. Required for reserved and auto reserved nodes. - */ - zone?: string; -} - export interface ErrorContent { message: string; @@ -466,69 +405,6 @@ export type Status = | 'failed' | 'unknown'; -export interface NodeCreateParams { - desired_count: number; - - /** - * Max price per hour for a node in cents - */ - max_price_per_node_hour: number; - - /** - * **Experimental — subject to change or removal without notice.** Enables - * InfiniBand. Requires hardware in the chosen zone that supports InfiniBand. - */ - _preview_enable_infiniband?: boolean; - - /** - * @deprecated Deprecated: no longer supported. Requests with `any_zone: true` are - * rejected; specify a zone instead. - */ - any_zone?: boolean; - - /** - * User script to be executed during the VM's boot process Data should be base64 - * encoded - */ - cloud_init_user_data?: string; - - /** - * End time as Unix timestamp in seconds If provided, end time must be aligned to - * the hour If not provided, the node will be created as an autoreserved node - */ - end_at?: number | null; - - /** - * (Optional) If set, enables forwarding to the VM on port 443. - */ - forward_443?: boolean; - - /** - * Custom image ID to use for the VM instances - */ - image_id?: string; - - /** - * Custom node names Names cannot begin with 'vm*' or 'n*' as this is reserved for - * system-generated IDs Names cannot be numeric strings Names cannot exceed 256 - * characters - */ - names?: Array; - - node_type?: NodeType | null; - - /** - * Start time as Unix timestamp in seconds Optional for reserved nodes. If not - * provided, defaults to now - */ - start_at?: number; - - /** - * Zone to create the nodes in. Required for reserved and auto reserved nodes. - */ - zone?: string; -} - export interface NodeListParams { /** * Filter nodes by node_id Use ?id=n_b1dc52505c6db142&id=n_b1dc52505c6db133 to @@ -587,7 +463,6 @@ export interface NodeRedeployParams { export declare namespace Nodes { export { type AcceleratorType as AcceleratorType, - type CreateNodesRequest as CreateNodesRequest, type ErrorContent as ErrorContent, type ErrorDetail as ErrorDetail, type ErrorType as ErrorType, @@ -596,7 +471,6 @@ export declare namespace Nodes { type Node as Node, type NodeType as NodeType, type Status as Status, - type NodeCreateParams as NodeCreateParams, type NodeListParams as NodeListParams, type NodeExtendParams as NodeExtendParams, type NodeRedeployParams as NodeRedeployParams, diff --git a/tests/api-resources/nodes.test.ts b/tests/api-resources/nodes.test.ts index 76a6992..7f9a57d 100644 --- a/tests/api-resources/nodes.test.ts +++ b/tests/api-resources/nodes.test.ts @@ -9,8 +9,8 @@ const client = new SFCNodes({ describe('resource nodes', () => { // Mock server tests are disabled - test.skip('create: only required params', async () => { - const responsePromise = client.nodes.create({ desired_count: 1, max_price_per_node_hour: 1600 }); + test.skip('create', async () => { + const responsePromise = client.nodes.create(); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -20,24 +20,6 @@ describe('resource nodes', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Mock server tests are disabled - test.skip('create: required and optional params', async () => { - const response = await client.nodes.create({ - desired_count: 1, - max_price_per_node_hour: 1600, - _preview_enable_infiniband: false, - any_zone: false, - cloud_init_user_data: 'aGVsbG8gd29ybGQ=', - end_at: 0, - forward_443: false, - image_id: 'image_1234567890abcdef', - names: ['cuda-crunch'], - node_type: 'autoreserved', - start_at: 1640995200, - zone: 'hayesvalley', - }); - }); - // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.nodes.list(); From 5096f02a07a3ebadc960b065c58009812fa7fd85 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Jun 2026 18:27:47 +0000 Subject: [PATCH 19/23] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ab7fabc..1133ee2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 15 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-c3fed1297d5c6e06525accf2f047e6f5f9a1035e60c8ad69ff707d8e6df0894e.yml -openapi_spec_hash: 63940433f23d6a460906fe4838a3cb2f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-955ef2ef75f0f2a32756a7c3fec783607ab9d49fb9682396f93c88c8548978dc.yml +openapi_spec_hash: 41ef07e7bb647e54a7f453ac0fee38e8 config_hash: 8457a42ab599fb499cdacdb3ff40cfe9 From 5e5179e1706895ba15ab49a5cd6ab6e3bf7aff2d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Jun 2026 19:27:48 +0000 Subject: [PATCH 20/23] feat(api): api update --- .stats.yml | 6 +- README.md | 43 ++- api.md | 53 --- src/client.ts | 62 +--- src/resources/index.ts | 20 +- src/resources/nodes.ts | 475 +------------------------ src/resources/vms/index.ts | 10 +- src/resources/vms/script.ts | 51 +-- src/resources/vms/vms.ts | 96 +---- src/resources/zones.ts | 125 +------ tests/api-resources/nodes.test.ts | 120 ------- tests/api-resources/vms/script.test.ts | 39 -- tests/api-resources/vms/vms.test.ts | 52 --- tests/api-resources/zones.test.ts | 34 -- 14 files changed, 46 insertions(+), 1140 deletions(-) delete mode 100644 tests/api-resources/nodes.test.ts delete mode 100644 tests/api-resources/vms/script.test.ts delete mode 100644 tests/api-resources/vms/vms.test.ts delete mode 100644 tests/api-resources/zones.test.ts diff --git a/.stats.yml b/.stats.yml index 1133ee2..79378d7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 15 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-955ef2ef75f0f2a32756a7c3fec783607ab9d49fb9682396f93c88c8548978dc.yml -openapi_spec_hash: 41ef07e7bb647e54a7f453ac0fee38e8 +configured_endpoints: 2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-b19d41b4c5a9fad0c1018d6f0a8339cd51c821c07864d3330f8030e261ff8414.yml +openapi_spec_hash: 298dc82eecdeffe586eeb6d59fa37879 config_hash: 8457a42ab599fb499cdacdb3ff40cfe9 diff --git a/README.md b/README.md index c78c179..608cad5 100644 --- a/README.md +++ b/README.md @@ -26,9 +26,9 @@ const client = new SFCNodes({ bearerToken: process.env['SFC_NODES_BEARER_TOKEN'], // This is the default and can be omitted }); -const listResponseNode = await client.nodes.list(); +const images = await client.vms.images.list({ workspace: 'wksp_k3R-nX9vLm7Qp2Yw5Jd8F' }); -console.log(listResponseNode.data); +console.log(images.data); ``` ### Request & Response types @@ -43,7 +43,8 @@ const client = new SFCNodes({ bearerToken: process.env['SFC_NODES_BEARER_TOKEN'], // This is the default and can be omitted }); -const listResponseNode: SFCNodes.ListResponseNode = await client.nodes.list(); +const params: SFCNodes.VMs.ImageListParams = { workspace: 'wksp_k3R-nX9vLm7Qp2Yw5Jd8F' }; +const images: SFCNodes.VMs.ImageListResponse = await client.vms.images.list(params); ``` Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors. @@ -56,15 +57,17 @@ a subclass of `APIError` will be thrown: ```ts -const listResponseNode = await client.nodes.list().catch(async (err) => { - if (err instanceof SFCNodes.APIError) { - console.log(err.status); // 400 - console.log(err.name); // BadRequestError - console.log(err.headers); // {server: 'nginx', ...} - } else { - throw err; - } -}); +const images = await client.vms.images + .list({ workspace: 'wksp_k3R-nX9vLm7Qp2Yw5Jd8F' }) + .catch(async (err) => { + if (err instanceof SFCNodes.APIError) { + console.log(err.status); // 400 + console.log(err.name); // BadRequestError + console.log(err.headers); // {server: 'nginx', ...} + } else { + throw err; + } + }); ``` Error codes are as follows: @@ -96,7 +99,7 @@ const client = new SFCNodes({ }); // Or, configure per-request: -await client.nodes.list({ +await client.vms.images.list({ workspace: 'wksp_k3R-nX9vLm7Qp2Yw5Jd8F' }, { maxRetries: 5, }); ``` @@ -113,7 +116,7 @@ const client = new SFCNodes({ }); // Override per-request: -await client.nodes.list({ +await client.vms.images.list({ workspace: 'wksp_k3R-nX9vLm7Qp2Yw5Jd8F' }, { timeout: 5 * 1000, }); ``` @@ -136,13 +139,17 @@ Unlike `.asResponse()` this method consumes the body, returning once it is parse ```ts const client = new SFCNodes(); -const response = await client.nodes.list().asResponse(); +const response = await client.vms.images + .list({ workspace: 'wksp_k3R-nX9vLm7Qp2Yw5Jd8F' }) + .asResponse(); console.log(response.headers.get('X-My-Header')); console.log(response.statusText); // access the underlying Response object -const { data: listResponseNode, response: raw } = await client.nodes.list().withResponse(); +const { data: images, response: raw } = await client.vms.images + .list({ workspace: 'wksp_k3R-nX9vLm7Qp2Yw5Jd8F' }) + .withResponse(); console.log(raw.headers.get('X-My-Header')); -console.log(listResponseNode.data); +console.log(images.data); ``` ### Logging @@ -222,7 +229,7 @@ parameter. This library doesn't validate at runtime that the request matches the send will be sent as-is. ```ts -client.nodes.list({ +client.vms.images.list({ // ... // @ts-expect-error baz is not yet public baz: 'undocumented option', diff --git a/api.md b/api.md index fdd171d..6f56b10 100644 --- a/api.md +++ b/api.md @@ -1,28 +1,7 @@ # VMs -Types: - -- VMLogsResponse -- VMSSHResponse - -Methods: - -- client.vms.logs({ ...params }) -> VMLogsResponse -- client.vms.ssh({ ...params }) -> VMSSHResponse - ## Script -Types: - -- UserData -- ScriptCreateResponse -- ScriptRetrieveResponse - -Methods: - -- client.vms.script.create({ ...params }) -> ScriptCreateResponse -- client.vms.script.retrieve() -> ScriptRetrieveResponse - ## Images Types: @@ -37,36 +16,4 @@ Methods: # Nodes -Types: - -- AcceleratorType -- ErrorContent -- ErrorDetail -- ErrorType -- ExtendNodeRequest -- ListResponseNode -- Node -- NodeType -- Status - -Methods: - -- client.nodes.create() -> void -- client.nodes.list({ ...params }) -> ListResponseNode -- client.nodes.delete(id) -> void -- client.nodes.extend(id, { ...params }) -> Node -- client.nodes.get(id) -> Node -- client.nodes.redeploy(id, { ...params }) -> Node -- client.nodes.release(id) -> Node - # Zones - -Types: - -- ZoneListResponse -- ZoneGetResponse - -Methods: - -- client.zones.list() -> ZoneListResponse -- client.zones.get(id) -> ZoneGetResponse diff --git a/src/client.ts b/src/client.ts index 8c6e658..a067d9e 100644 --- a/src/client.ts +++ b/src/client.ts @@ -17,23 +17,9 @@ import * as Errors from './core/error'; import * as Uploads from './core/uploads'; import * as API from './resources/index'; import { APIPromise } from './core/api-promise'; -import { - AcceleratorType, - ErrorContent, - ErrorDetail, - ErrorType, - ExtendNodeRequest, - ListResponseNode, - Node, - NodeExtendParams, - NodeListParams, - NodeRedeployParams, - NodeType, - Nodes, - Status, -} from './resources/nodes'; -import { ZoneGetResponse, ZoneListResponse, Zones } from './resources/zones'; -import { VMLogsParams, VMLogsResponse, VMSSHParams, VMSSHResponse, VMs } from './resources/vms/vms'; +import { Nodes } from './resources/nodes'; +import { Zones } from './resources/zones'; +import { VMs } from './resources/vms/vms'; import { type Fetch } from './internal/builtin-types'; import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers'; import { FinalRequestOptions, RequestOptions } from './internal/request-options'; @@ -758,15 +744,7 @@ export class SFCNodes { static toFile = Uploads.toFile; vms: API.VMs = new API.VMs(this); - /** - * Manage compute nodes. Create, list, extend, and release nodes for your workloads. - */ nodes: API.Nodes = new API.Nodes(this); - /** - * Zones represent physically colocated datacenters. - * Use these endpoints to discover available zones and their capacity, - * hardware specifications, and regional information. - */ zones: API.Zones = new API.Zones(this); } @@ -777,33 +755,9 @@ SFCNodes.Zones = Zones; export declare namespace SFCNodes { export type RequestOptions = Opts.RequestOptions; - export { - VMs as VMs, - type VMLogsResponse as VMLogsResponse, - type VMSSHResponse as VMSSHResponse, - type VMLogsParams as VMLogsParams, - type VMSSHParams as VMSSHParams, - }; - - export { - Nodes as Nodes, - type AcceleratorType as AcceleratorType, - type ErrorContent as ErrorContent, - type ErrorDetail as ErrorDetail, - type ErrorType as ErrorType, - type ExtendNodeRequest as ExtendNodeRequest, - type ListResponseNode as ListResponseNode, - type Node as Node, - type NodeType as NodeType, - type Status as Status, - type NodeListParams as NodeListParams, - type NodeExtendParams as NodeExtendParams, - type NodeRedeployParams as NodeRedeployParams, - }; - - export { - Zones as Zones, - type ZoneListResponse as ZoneListResponse, - type ZoneGetResponse as ZoneGetResponse, - }; + export { VMs as VMs }; + + export { Nodes as Nodes }; + + export { Zones as Zones }; } diff --git a/src/resources/index.ts b/src/resources/index.ts index b2e8226..856526d 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -1,19 +1,5 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Nodes, - type AcceleratorType, - type ErrorContent, - type ErrorDetail, - type ErrorType, - type ExtendNodeRequest, - type ListResponseNode, - type Node, - type NodeType, - type Status, - type NodeListParams, - type NodeExtendParams, - type NodeRedeployParams, -} from './nodes'; -export { VMs, type VMLogsResponse, type VMSSHResponse, type VMLogsParams, type VMSSHParams } from './vms/vms'; -export { Zones, type ZoneListResponse, type ZoneGetResponse } from './zones'; +export { Nodes } from './nodes'; +export { VMs } from './vms/vms'; +export { Zones } from './zones'; diff --git a/src/resources/nodes.ts b/src/resources/nodes.ts index 41a5edd..a86bc8f 100644 --- a/src/resources/nodes.ts +++ b/src/resources/nodes.ts @@ -1,478 +1,5 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../core/resource'; -import * as NodesAPI from './nodes'; -import { APIPromise } from '../core/api-promise'; -import { buildHeaders } from '../internal/headers'; -import { RequestOptions } from '../internal/request-options'; -import { path } from '../internal/utils/path'; -/** - * Manage compute nodes. Create, list, extend, and release nodes for your workloads. - */ -export class Nodes extends APIResource { - /** - * Nodes are deprecated. See https://docs.sfcompute.com for the latest version of - * our product. You can migrate existing nodes using `sf nodes migrate` in the new - * CLI. This endpoint always returns `410 Gone`. - * - * @example - * ```ts - * await client.nodes.create(); - * ``` - */ - create(options?: RequestOptions): APIPromise { - return this._client.post('/v1/nodes', { - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); - } - - /** - * List all nodes for the authenticated account - * - * @example - * ```ts - * const listResponseNode = await client.nodes.list(); - * ``` - */ - list( - query: NodeListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get('/v1/nodes', { query, ...options }); - } - - /** - * Delete a node by id. The node cannot be deleted if it has active or pending VMs. - * - * @example - * ```ts - * await client.nodes.delete('id'); - * ``` - */ - delete(id: string, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v1/nodes/${id}`, { - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); - } - - /** - * Purchase additional time to extend the end time of a reserved VM node - * - * @example - * ```ts - * const node = await client.nodes.extend('id', { - * duration_seconds: 7200, - * max_price_per_node_hour: 1000, - * }); - * ``` - */ - extend(id: string, body: NodeExtendParams, options?: RequestOptions): APIPromise { - return this._client.patch(path`/v1/nodes/${id}/extend`, { body, ...options }); - } - - /** - * Retrieve details of a specific node by its ID or name - * - * @example - * ```ts - * const node = await client.nodes.get('id'); - * ``` - */ - get(id: string, options?: RequestOptions): APIPromise { - return this._client.get(path`/v1/nodes/${id}`, options); - } - - /** - * Redeploy a node by replacing its current VM with a new one. Optionally update - * the VM image and cloud init user data. - * - * @example - * ```ts - * const node = await client.nodes.redeploy('id'); - * ``` - */ - redeploy(id: string, body: NodeRedeployParams, options?: RequestOptions): APIPromise { - return this._client.put(path`/v1/nodes/${id}/redeploy`, { body, ...options }); - } - - /** - * Release an auto reserved VM node from its procurement, reducing the - * procurement's desired quantity by 1 - * - * @example - * ```ts - * const node = await client.nodes.release('id'); - * ``` - */ - release(id: string, options?: RequestOptions): APIPromise { - return this._client.patch(path`/v1/nodes/${id}/release`, options); - } -} - -export type AcceleratorType = 'H100' | 'H200'; - -export interface ErrorContent { - message: string; - - type: ErrorType; - - details?: Array; -} - -export interface ErrorDetail { - /** - * Specific error code for this detail - */ - code: string; - - /** - * Human-readable error message - */ - message: string; - - /** - * The field that caused the error (for validation errors) - */ - field?: string | null; -} - -export type ErrorType = - | 'api_error' - | 'invalid_request_error' - | 'authentication_error' - | 'idempotency_error' - | 'conflict' - | 'not_found' - | 'request_timed_out' - | 'forbidden' - | 'not_implemented' - | 'upgrade_required' - | 'payment_required' - | 'service_unavailable' - | 'unprocessable_entity' - | 'gone'; - -export interface ExtendNodeRequest { - /** - * Duration in seconds to extend the node Must be at least 1 hour (3600 seconds) - * and a multiple of 1 hour. - */ - duration_seconds: number; - - /** - * Max price per hour for the extension in cents - */ - max_price_per_node_hour: number; -} - -export interface ListResponseNode { - data: Array; - - object: string; -} - -export namespace ListResponseNode { - export interface Data { - id: string; - - gpu_type: NodesAPI.AcceleratorType; - - name: string; - - node_type: NodesAPI.NodeType; - - object: string; - - owner: string; - - /** - * Node Status - */ - status: NodesAPI.Status; - - /** - * Creation time as Unix timestamp in seconds - */ - created_at?: number | null; - - current_vm?: Data.CurrentVM | null; - - /** - * Deletion time as Unix timestamp in seconds - */ - deleted_at?: number | null; - - /** - * End time as Unix timestamp in seconds - */ - end_at?: number | null; - - /** - * Max price per hour you're willing to pay for a node in cents - */ - max_price_per_node_hour?: number | null; - - procurement_id?: string | null; - - /** - * Start time as Unix timestamp in seconds - */ - start_at?: number | null; - - /** - * Last updated time as Unix timestamp in seconds - */ - updated_at?: number | null; - - vms?: Data.VMs | null; - - zone?: string | null; - } - - export namespace Data { - export interface CurrentVM { - id: string; - - created_at: number; - - end_at: number | null; - - object: string; - - start_at: number | null; - - status: 'Pending' | 'Running' | 'Destroyed' | 'NodeFailure' | 'Unspecified'; - - updated_at: number; - - zone: string; - - image_id?: string | null; - } - - export interface VMs { - data: Array; - - object: string; - } - - export namespace VMs { - export interface Data { - id: string; - - created_at: number; - - end_at: number | null; - - object: string; - - start_at: number | null; - - status: 'Pending' | 'Running' | 'Destroyed' | 'NodeFailure' | 'Unspecified'; - - updated_at: number; - - zone: string; - - image_id?: string | null; - } - } - } -} - -export interface Node { - id: string; - - gpu_type: AcceleratorType; - - name: string; - - node_type: NodeType; - - object: string; - - owner: string; - - /** - * Node Status - */ - status: Status; - - /** - * Creation time as Unix timestamp in seconds - */ - created_at?: number | null; - - current_vm?: Node.CurrentVM | null; - - /** - * Deletion time as Unix timestamp in seconds - */ - deleted_at?: number | null; - - /** - * End time as Unix timestamp in seconds - */ - end_at?: number | null; - - /** - * Max price per hour you're willing to pay for a node in cents - */ - max_price_per_node_hour?: number | null; - - procurement_id?: string | null; - - /** - * Start time as Unix timestamp in seconds - */ - start_at?: number | null; - - /** - * Last updated time as Unix timestamp in seconds - */ - updated_at?: number | null; - - vms?: Node.VMs | null; - - zone?: string | null; -} - -export namespace Node { - export interface CurrentVM { - id: string; - - created_at: number; - - end_at: number | null; - - object: string; - - start_at: number | null; - - status: 'Pending' | 'Running' | 'Destroyed' | 'NodeFailure' | 'Unspecified'; - - updated_at: number; - - zone: string; - - image_id?: string | null; - } - - export interface VMs { - data: Array; - - object: string; - } - - export namespace VMs { - export interface Data { - id: string; - - created_at: number; - - end_at: number | null; - - object: string; - - start_at: number | null; - - status: 'Pending' | 'Running' | 'Destroyed' | 'NodeFailure' | 'Unspecified'; - - updated_at: number; - - zone: string; - - image_id?: string | null; - } - } -} - -export type NodeType = 'autoreserved' | 'reserved'; - -/** - * Node Status - */ -export type Status = - | 'pending' - | 'awaitingcapacity' - | 'running' - | 'released' - | 'terminated' - | 'deleted' - | 'failed' - | 'unknown'; - -export interface NodeListParams { - /** - * Filter nodes by node_id Use ?id=n_b1dc52505c6db142&id=n_b1dc52505c6db133 to - * specify multiple IDs. Cannot combine with name or node_type - */ - id?: Array; - - /** - * Filter nodes by their names Use ?name=val1&name=val2 to specify multiple names. - * Cannot combine with id or node_type - */ - name?: Array; - - /** - * Filter nodes by their type Cannot combine with id or name - */ - type?: NodeType; -} - -export interface NodeExtendParams { - /** - * Duration in seconds to extend the node Must be at least 1 hour (3600 seconds) - * and a multiple of 1 hour. - */ - duration_seconds: number; - - /** - * Max price per hour for the extension in cents - */ - max_price_per_node_hour: number; -} - -export interface NodeRedeployParams { - /** - * Update the cloud init user data for VMs running on this node Data should be - * base64 encoded - */ - cloud_init_user_data?: string; - - /** - * Redeploy node with this VM image ID - */ - image_id?: string; - - /** - * If false, then the new VM will inherit any configuration (like image_id, - * cloud_init_user_data) that is left empty in this request from the current VM. - * - * If true, then any configuration left empty will be set as empty in the new VM. - * E.g if cloud_init_user_data is left unset and override_empty is true, then the - * new VM will not have any cloud init user data. override_empty defaults to false. - */ - override_empty?: boolean; -} - -export declare namespace Nodes { - export { - type AcceleratorType as AcceleratorType, - type ErrorContent as ErrorContent, - type ErrorDetail as ErrorDetail, - type ErrorType as ErrorType, - type ExtendNodeRequest as ExtendNodeRequest, - type ListResponseNode as ListResponseNode, - type Node as Node, - type NodeType as NodeType, - type Status as Status, - type NodeListParams as NodeListParams, - type NodeExtendParams as NodeExtendParams, - type NodeRedeployParams as NodeRedeployParams, - }; -} +export class Nodes extends APIResource {} diff --git a/src/resources/vms/index.ts b/src/resources/vms/index.ts index 5678612..cfa8d96 100644 --- a/src/resources/vms/index.ts +++ b/src/resources/vms/index.ts @@ -1,11 +1,5 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { Images, type ImageListResponse, type ImageGetResponse, type ImageListParams } from './images'; -export { - Script, - type UserData, - type ScriptCreateResponse, - type ScriptRetrieveResponse, - type ScriptCreateParams, -} from './script'; -export { VMs, type VMLogsResponse, type VMSSHResponse, type VMLogsParams, type VMSSHParams } from './vms'; +export { Script } from './script'; +export { VMs } from './vms'; diff --git a/src/resources/vms/script.ts b/src/resources/vms/script.ts index bd6cc92..acfa60c 100644 --- a/src/resources/vms/script.ts +++ b/src/resources/vms/script.ts @@ -1,54 +1,5 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../core/resource'; -import { APIPromise } from '../../core/api-promise'; -import { RequestOptions } from '../../internal/request-options'; -export class Script extends APIResource { - create(body: ScriptCreateParams, options?: RequestOptions): APIPromise { - return this._client.post('/v0/vms/script', { body, ...options }); - } - - retrieve(options?: RequestOptions): APIPromise { - return this._client.get('/v0/vms/script', options); - } -} - -/** - * if the script is valid utf8 then the response may be in either string, or byte - * form and the client must handle both - */ -export type UserData = string | Array; - -export interface ScriptCreateResponse { - /** - * if the script is valid utf8 then the response may be in either string, or byte - * form and the client must handle both - */ - script: UserData; -} - -export interface ScriptRetrieveResponse { - /** - * if the script is valid utf8 then the response may be in either string, or byte - * form and the client must handle both - */ - script: UserData; -} - -export interface ScriptCreateParams { - /** - * if the script is valid utf8 then the response may be in either string, or byte - * form and the client must handle both - */ - script: UserData; -} - -export declare namespace Script { - export { - type UserData as UserData, - type ScriptCreateResponse as ScriptCreateResponse, - type ScriptRetrieveResponse as ScriptRetrieveResponse, - type ScriptCreateParams as ScriptCreateParams, - }; -} +export class Script extends APIResource {} diff --git a/src/resources/vms/vms.ts b/src/resources/vms/vms.ts index d3f2ff9..c48a9ae 100644 --- a/src/resources/vms/vms.ts +++ b/src/resources/vms/vms.ts @@ -4,110 +4,18 @@ import { APIResource } from '../../core/resource'; import * as ImagesAPI from './images'; import { ImageGetResponse, ImageListParams, ImageListResponse, Images } from './images'; import * as ScriptAPI from './script'; -import { Script, ScriptCreateParams, ScriptCreateResponse, ScriptRetrieveResponse, UserData } from './script'; -import { APIPromise } from '../../core/api-promise'; -import { RequestOptions } from '../../internal/request-options'; +import { Script } from './script'; export class VMs extends APIResource { script: ScriptAPI.Script = new ScriptAPI.Script(this._client); images: ImagesAPI.Images = new ImagesAPI.Images(this._client); - - logs(query: VMLogsParams, options?: RequestOptions): APIPromise { - return this._client.get('/v0/vms/logs2', { query, ...options }); - } - - ssh(query: VMSSHParams, options?: RequestOptions): APIPromise { - return this._client.get('/v0/vms/ssh', { query, ...options }); - } -} - -export interface VMLogsResponse { - data: Array; -} - -export namespace VMLogsResponse { - export interface Data { - data: Array; - - instance_id: string; - - monotonic_timestamp_nano_sec: number; - - monotonic_timestamp_sec: number; - - /** - * In RFC 3339 format - */ - realtime_timestamp: string; - - seqnum: number; - } -} - -export interface VMSSHResponse { - ssh_hostname: string; - - ssh_port: number; - - /** - * Unix timestamp. - */ - last_attempted_key_update?: number | null; - - /** - * Unix timestamp. - */ - last_successful_key_update?: number | null; - - ssh_host_keys?: Array | null; -} - -export namespace VMSSHResponse { - export interface SSHHostKey { - base64_encoded_key: string; - - key_type: string; - } -} - -export interface VMLogsParams { - instance_id: string; - - order_by: 'seqnum_asc' | 'seqnum_desc'; - - before_realtime_timestamp?: string; - - before_seqnum?: number; - - limit?: number; - - since_realtime_timestamp?: string; - - since_seqnum?: number; -} - -export interface VMSSHParams { - vm_id: string; } VMs.Script = Script; VMs.Images = Images; export declare namespace VMs { - export { - type VMLogsResponse as VMLogsResponse, - type VMSSHResponse as VMSSHResponse, - type VMLogsParams as VMLogsParams, - type VMSSHParams as VMSSHParams, - }; - - export { - Script as Script, - type UserData as UserData, - type ScriptCreateResponse as ScriptCreateResponse, - type ScriptRetrieveResponse as ScriptRetrieveResponse, - type ScriptCreateParams as ScriptCreateParams, - }; + export { Script as Script }; export { Images as Images, diff --git a/src/resources/zones.ts b/src/resources/zones.ts index c083de3..4283ec5 100644 --- a/src/resources/zones.ts +++ b/src/resources/zones.ts @@ -1,128 +1,5 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../core/resource'; -import * as NodesAPI from './nodes'; -import { APIPromise } from '../core/api-promise'; -import { RequestOptions } from '../internal/request-options'; -import { path } from '../internal/utils/path'; -/** - * Zones represent physically colocated datacenters. - * Use these endpoints to discover available zones and their capacity, - * hardware specifications, and regional information. - */ -export class Zones extends APIResource { - /** - * List all available zones - */ - list(options?: RequestOptions): APIPromise { - return this._client.get('/v0/zones', options); - } - - /** - * Get detailed information about a specific zone - */ - get(id: string, options?: RequestOptions): APIPromise { - return this._client.get(path`/v0/zones/${id}`, options); - } -} - -export interface ZoneListResponse { - data: Array; - - object: string; -} - -export namespace ZoneListResponse { - export interface Data { - /** - * The available capacity on this cluster, in the shape of consecutive - * "availability rectangles". - */ - available_capacity: Array; - - delivery_type: 'K8s' | 'VM'; - - hardware_type: NodesAPI.AcceleratorType; - - interconnect_type: 'Infiniband' | 'None'; - - name: string; - - object: string; - - region: 'NorthAmerica' | 'AsiaPacific' | 'EuropeMiddleEastAfrica'; - - /** - * User-facing zone name (e.g., "Hayes Valley", "Land's End") - */ - display_name?: string | null; - } - - export namespace Data { - export interface AvailableCapacity { - /** - * Unix timestamp. - */ - end_timestamp: number; - - /** - * The number of nodes available during this time period - */ - quantity: number; - - /** - * Unix timestamp. - */ - start_timestamp: number; - } - } -} - -export interface ZoneGetResponse { - /** - * The available capacity on this cluster, in the shape of consecutive - * "availability rectangles". - */ - available_capacity: Array; - - delivery_type: 'K8s' | 'VM'; - - hardware_type: NodesAPI.AcceleratorType; - - interconnect_type: 'Infiniband' | 'None'; - - name: string; - - object: string; - - region: 'NorthAmerica' | 'AsiaPacific' | 'EuropeMiddleEastAfrica'; - - /** - * User-facing zone name (e.g., "Hayes Valley", "Land's End") - */ - display_name?: string | null; -} - -export namespace ZoneGetResponse { - export interface AvailableCapacity { - /** - * Unix timestamp. - */ - end_timestamp: number; - - /** - * The number of nodes available during this time period - */ - quantity: number; - - /** - * Unix timestamp. - */ - start_timestamp: number; - } -} - -export declare namespace Zones { - export { type ZoneListResponse as ZoneListResponse, type ZoneGetResponse as ZoneGetResponse }; -} +export class Zones extends APIResource {} diff --git a/tests/api-resources/nodes.test.ts b/tests/api-resources/nodes.test.ts deleted file mode 100644 index 7f9a57d..0000000 --- a/tests/api-resources/nodes.test.ts +++ /dev/null @@ -1,120 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import SFCNodes from '@sfcompute/nodes-sdk-alpha'; - -const client = new SFCNodes({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); - -describe('resource nodes', () => { - // Mock server tests are disabled - test.skip('create', async () => { - const responsePromise = client.nodes.create(); - const rawResponse = await responsePromise.asResponse(); - expect(rawResponse).toBeInstanceOf(Response); - const response = await responsePromise; - expect(response).not.toBeInstanceOf(Response); - const dataAndResponse = await responsePromise.withResponse(); - expect(dataAndResponse.data).toBe(response); - expect(dataAndResponse.response).toBe(rawResponse); - }); - - // Mock server tests are disabled - test.skip('list', async () => { - const responsePromise = client.nodes.list(); - const rawResponse = await responsePromise.asResponse(); - expect(rawResponse).toBeInstanceOf(Response); - const response = await responsePromise; - expect(response).not.toBeInstanceOf(Response); - const dataAndResponse = await responsePromise.withResponse(); - expect(dataAndResponse.data).toBe(response); - expect(dataAndResponse.response).toBe(rawResponse); - }); - - // Mock server tests are disabled - test.skip('list: request options and params are passed correctly', async () => { - // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.nodes.list( - { - id: ['string'], - name: ['string'], - type: 'autoreserved', - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(SFCNodes.NotFoundError); - }); - - // Mock server tests are disabled - test.skip('delete', async () => { - const responsePromise = client.nodes.delete('id'); - const rawResponse = await responsePromise.asResponse(); - expect(rawResponse).toBeInstanceOf(Response); - const response = await responsePromise; - expect(response).not.toBeInstanceOf(Response); - const dataAndResponse = await responsePromise.withResponse(); - expect(dataAndResponse.data).toBe(response); - expect(dataAndResponse.response).toBe(rawResponse); - }); - - // Mock server tests are disabled - test.skip('extend: only required params', async () => { - const responsePromise = client.nodes.extend('id', { - duration_seconds: 7200, - max_price_per_node_hour: 1000, - }); - const rawResponse = await responsePromise.asResponse(); - expect(rawResponse).toBeInstanceOf(Response); - const response = await responsePromise; - expect(response).not.toBeInstanceOf(Response); - const dataAndResponse = await responsePromise.withResponse(); - expect(dataAndResponse.data).toBe(response); - expect(dataAndResponse.response).toBe(rawResponse); - }); - - // Mock server tests are disabled - test.skip('extend: required and optional params', async () => { - const response = await client.nodes.extend('id', { - duration_seconds: 7200, - max_price_per_node_hour: 1000, - }); - }); - - // Mock server tests are disabled - test.skip('get', async () => { - const responsePromise = client.nodes.get('id'); - const rawResponse = await responsePromise.asResponse(); - expect(rawResponse).toBeInstanceOf(Response); - const response = await responsePromise; - expect(response).not.toBeInstanceOf(Response); - const dataAndResponse = await responsePromise.withResponse(); - expect(dataAndResponse.data).toBe(response); - expect(dataAndResponse.response).toBe(rawResponse); - }); - - // Mock server tests are disabled - test.skip('redeploy', async () => { - const responsePromise = client.nodes.redeploy('id', {}); - const rawResponse = await responsePromise.asResponse(); - expect(rawResponse).toBeInstanceOf(Response); - const response = await responsePromise; - expect(response).not.toBeInstanceOf(Response); - const dataAndResponse = await responsePromise.withResponse(); - expect(dataAndResponse.data).toBe(response); - expect(dataAndResponse.response).toBe(rawResponse); - }); - - // Mock server tests are disabled - test.skip('release', async () => { - const responsePromise = client.nodes.release('id'); - const rawResponse = await responsePromise.asResponse(); - expect(rawResponse).toBeInstanceOf(Response); - const response = await responsePromise; - expect(response).not.toBeInstanceOf(Response); - const dataAndResponse = await responsePromise.withResponse(); - expect(dataAndResponse.data).toBe(response); - expect(dataAndResponse.response).toBe(rawResponse); - }); -}); diff --git a/tests/api-resources/vms/script.test.ts b/tests/api-resources/vms/script.test.ts deleted file mode 100644 index cbf87a4..0000000 --- a/tests/api-resources/vms/script.test.ts +++ /dev/null @@ -1,39 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import SFCNodes from '@sfcompute/nodes-sdk-alpha'; - -const client = new SFCNodes({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); - -describe('resource script', () => { - // Mock server tests are disabled - test.skip('create: only required params', async () => { - const responsePromise = client.vms.script.create({ script: 'string' }); - const rawResponse = await responsePromise.asResponse(); - expect(rawResponse).toBeInstanceOf(Response); - const response = await responsePromise; - expect(response).not.toBeInstanceOf(Response); - const dataAndResponse = await responsePromise.withResponse(); - expect(dataAndResponse.data).toBe(response); - expect(dataAndResponse.response).toBe(rawResponse); - }); - - // Mock server tests are disabled - test.skip('create: required and optional params', async () => { - const response = await client.vms.script.create({ script: 'string' }); - }); - - // Mock server tests are disabled - test.skip('retrieve', async () => { - const responsePromise = client.vms.script.retrieve(); - const rawResponse = await responsePromise.asResponse(); - expect(rawResponse).toBeInstanceOf(Response); - const response = await responsePromise; - expect(response).not.toBeInstanceOf(Response); - const dataAndResponse = await responsePromise.withResponse(); - expect(dataAndResponse.data).toBe(response); - expect(dataAndResponse.response).toBe(rawResponse); - }); -}); diff --git a/tests/api-resources/vms/vms.test.ts b/tests/api-resources/vms/vms.test.ts deleted file mode 100644 index 9f4b608..0000000 --- a/tests/api-resources/vms/vms.test.ts +++ /dev/null @@ -1,52 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import SFCNodes from '@sfcompute/nodes-sdk-alpha'; - -const client = new SFCNodes({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); - -describe('resource vms', () => { - // Mock server tests are disabled - test.skip('logs: only required params', async () => { - const responsePromise = client.vms.logs({ instance_id: 'instance_id', order_by: 'seqnum_asc' }); - const rawResponse = await responsePromise.asResponse(); - expect(rawResponse).toBeInstanceOf(Response); - const response = await responsePromise; - expect(response).not.toBeInstanceOf(Response); - const dataAndResponse = await responsePromise.withResponse(); - expect(dataAndResponse.data).toBe(response); - expect(dataAndResponse.response).toBe(rawResponse); - }); - - // Mock server tests are disabled - test.skip('logs: required and optional params', async () => { - const response = await client.vms.logs({ - instance_id: 'instance_id', - order_by: 'seqnum_asc', - before_realtime_timestamp: 'before_realtime_timestamp', - before_seqnum: 0, - limit: 1, - since_realtime_timestamp: 'since_realtime_timestamp', - since_seqnum: 0, - }); - }); - - // Mock server tests are disabled - test.skip('ssh: only required params', async () => { - const responsePromise = client.vms.ssh({ vm_id: 'vm_id' }); - const rawResponse = await responsePromise.asResponse(); - expect(rawResponse).toBeInstanceOf(Response); - const response = await responsePromise; - expect(response).not.toBeInstanceOf(Response); - const dataAndResponse = await responsePromise.withResponse(); - expect(dataAndResponse.data).toBe(response); - expect(dataAndResponse.response).toBe(rawResponse); - }); - - // Mock server tests are disabled - test.skip('ssh: required and optional params', async () => { - const response = await client.vms.ssh({ vm_id: 'vm_id' }); - }); -}); diff --git a/tests/api-resources/zones.test.ts b/tests/api-resources/zones.test.ts deleted file mode 100644 index 63b26a7..0000000 --- a/tests/api-resources/zones.test.ts +++ /dev/null @@ -1,34 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import SFCNodes from '@sfcompute/nodes-sdk-alpha'; - -const client = new SFCNodes({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); - -describe('resource zones', () => { - // Mock server tests are disabled - test.skip('list', async () => { - const responsePromise = client.zones.list(); - const rawResponse = await responsePromise.asResponse(); - expect(rawResponse).toBeInstanceOf(Response); - const response = await responsePromise; - expect(response).not.toBeInstanceOf(Response); - const dataAndResponse = await responsePromise.withResponse(); - expect(dataAndResponse.data).toBe(response); - expect(dataAndResponse.response).toBe(rawResponse); - }); - - // Mock server tests are disabled - test.skip('get', async () => { - const responsePromise = client.zones.get('id'); - const rawResponse = await responsePromise.asResponse(); - expect(rawResponse).toBeInstanceOf(Response); - const response = await responsePromise; - expect(response).not.toBeInstanceOf(Response); - const dataAndResponse = await responsePromise.withResponse(); - expect(dataAndResponse.data).toBe(response); - expect(dataAndResponse.response).toBe(rawResponse); - }); -}); From 57bd96eb2521ba6d67fb5b90446bee7146d5a7ba Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Jun 2026 21:27:48 +0000 Subject: [PATCH 21/23] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 79378d7..ad36dc1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 2 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-b19d41b4c5a9fad0c1018d6f0a8339cd51c821c07864d3330f8030e261ff8414.yml -openapi_spec_hash: 298dc82eecdeffe586eeb6d59fa37879 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-7a29cff56f27a4389261dcc8c45dfe8cc319c2747da5a301776c439f2fbb4c3c.yml +openapi_spec_hash: 3b54df0d836fb0884c949a06d666273e config_hash: 8457a42ab599fb499cdacdb3ff40cfe9 From 34b69575b7934b1e78ee81e1daaf06a6b4846875 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Jul 2026 01:27:45 +0000 Subject: [PATCH 22/23] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ad36dc1..6024b95 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 2 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-7a29cff56f27a4389261dcc8c45dfe8cc319c2747da5a301776c439f2fbb4c3c.yml -openapi_spec_hash: 3b54df0d836fb0884c949a06d666273e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company/sfc-nodes-58790875b9aca7481caf8eadc7c5235d56b2134a0733e4a76ac32c5fe97ac9fa.yml +openapi_spec_hash: 345ddd17750fb97c4ab7c9156b89e541 config_hash: 8457a42ab599fb499cdacdb3ff40cfe9 From 8664a36128372c30549f251b937980ba119e47db Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Jul 2026 01:28:13 +0000 Subject: [PATCH 23/23] release: 0.1.0-alpha.32 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 21 +++++++++++++++++++++ package.json | 2 +- src/version.ts | 2 +- 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index acc5a4e..c70be76 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.31" + ".": "0.1.0-alpha.32" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 851331a..67eb47f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## 0.1.0-alpha.32 (2026-07-01) + +Full Changelog: [v0.1.0-alpha.31...v0.1.0-alpha.32](https://github.com/sfcompute/nodes-typescript/compare/v0.1.0-alpha.31...v0.1.0-alpha.32) + +### Features + +* **api:** api update ([5e5179e](https://github.com/sfcompute/nodes-typescript/commit/5e5179e1706895ba15ab49a5cd6ab6e3bf7aff2d)) +* **api:** api update ([9af0bc4](https://github.com/sfcompute/nodes-typescript/commit/9af0bc4c3845a3666b132927c36b564f276ef5d4)) +* **api:** api update ([41d0397](https://github.com/sfcompute/nodes-typescript/commit/41d039709d0b6a83adaf223ff3ec8f08619b3bd8)) +* **api:** api update ([35f91a2](https://github.com/sfcompute/nodes-typescript/commit/35f91a27ce035bbf213c19243ce481312855641d)) + + +### Bug Fixes + +* **client:** send content-type header for requests with an omitted optional body ([7246bb9](https://github.com/sfcompute/nodes-typescript/commit/7246bb916cb644bca7fd48e6bd9ba1f66f64ad53)) + + +### Chores + +* **internal:** codegen related update ([f6cf9d5](https://github.com/sfcompute/nodes-typescript/commit/f6cf9d5c39d45df96bee9673184fb5f955c69dd3)) + ## 0.1.0-alpha.31 (2026-05-19) Full Changelog: [v0.1.0-alpha.30...v0.1.0-alpha.31](https://github.com/sfcompute/nodes-typescript/compare/v0.1.0-alpha.30...v0.1.0-alpha.31) diff --git a/package.json b/package.json index cf2dafa..122ec13 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sfcompute/nodes-sdk-alpha", - "version": "0.1.0-alpha.31", + "version": "0.1.0-alpha.32", "description": "The official TypeScript library for the SFC Nodes API", "author": "SFC Nodes ", "types": "dist/index.d.ts", diff --git a/src/version.ts b/src/version.ts index 3ca7b12..537925f 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.1.0-alpha.31'; // x-release-please-version +export const VERSION = '0.1.0-alpha.32'; // x-release-please-version