Skip to content

Commit b8dd909

Browse files
release: 0.1.0-alpha.18 (#29)
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent a42948e commit b8dd909

File tree

11 files changed

+70
-6
lines changed

11 files changed

+70
-6
lines changed

.eslintcache

Lines changed: 0 additions & 1 deletion
This file was deleted.

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0-alpha.17"
2+
".": "0.1.0-alpha.18"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 11
1+
configured_endpoints: 12
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company%2Fsfc-nodes-3ed2b55187b3b17772db0e76c4007d8828b37fdf49a87fb664cdf994db49cb42.yml
33
openapi_spec_hash: 749a02e6ffc075b8d4e70a7a7800286a
4-
config_hash: fae4224e6c6207c8735f6a024e50ddf5
4+
config_hash: 6b29dc1aa86a29d01a2db850fd9b2bf0

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## 0.1.0-alpha.18 (2025-10-02)
4+
5+
Full Changelog: [v0.1.0-alpha.17...v0.1.0-alpha.18](https://github.com/sfcompute/nodes-typescript/compare/v0.1.0-alpha.17...v0.1.0-alpha.18)
6+
7+
### Features
8+
9+
* **api:** add `redeploy` action ([88aa263](https://github.com/sfcompute/nodes-typescript/commit/88aa2634ab58e218a3578e40b4f56d802587a0c2))
10+
11+
12+
### Chores
13+
14+
* **internal:** remove .eslintcache ([4d5362c](https://github.com/sfcompute/nodes-typescript/commit/4d5362c17dc9282efd70218f1a434d5fa594f7dc))
15+
316
## 0.1.0-alpha.17 (2025-09-30)
417

518
Full Changelog: [v0.1.0-alpha.16...v0.1.0-alpha.17](https://github.com/sfcompute/nodes-typescript/compare/v0.1.0-alpha.16...v0.1.0-alpha.17)

api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,5 @@ Methods:
5757
- <code title="get /v1/nodes">client.nodes.<a href="./src/resources/nodes.ts">list</a>({ ...params }) -> ListResponseNode</code>
5858
- <code title="patch /v1/nodes/{id}/extend">client.nodes.<a href="./src/resources/nodes.ts">extend</a>(id, { ...params }) -> Node</code>
5959
- <code title="get /v1/nodes/{id}">client.nodes.<a href="./src/resources/nodes.ts">get</a>(id) -> Node</code>
60+
- <code title="put /v1/nodes/{id}/redeploy">client.nodes.<a href="./src/resources/nodes.ts">redeploy</a>(id, { ...params }) -> Node</code>
6061
- <code title="patch /v1/nodes/{id}/release">client.nodes.<a href="./src/resources/nodes.ts">release</a>(id) -> Node</code>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sfcompute/nodes-sdk-alpha",
3-
"version": "0.1.0-alpha.17",
3+
"version": "0.1.0-alpha.18",
44
"description": "The official TypeScript library for the SFC Nodes API",
55
"author": "SFC Nodes <hello@sfcompute.com>",
66
"types": "dist/index.d.ts",

src/client.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import {
3030
NodeCreateParams,
3131
NodeExtendParams,
3232
NodeListParams,
33+
NodeRedeployParams,
3334
NodeType,
3435
Nodes,
3536
Status,
@@ -756,5 +757,6 @@ export declare namespace SFCNodes {
756757
type NodeCreateParams as NodeCreateParams,
757758
type NodeListParams as NodeListParams,
758759
type NodeExtendParams as NodeExtendParams,
760+
type NodeRedeployParams as NodeRedeployParams,
759761
};
760762
}

src/resources/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ export {
1616
type NodeCreateParams,
1717
type NodeListParams,
1818
type NodeExtendParams,
19+
type NodeRedeployParams,
1920
} from './nodes';
2021
export { VMs, type VMLogsResponse, type VMSSHResponse, type VMLogsParams, type VMSSHParams } from './vms/vms';

src/resources/nodes.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,19 @@ export class Nodes extends APIResource {
6565
return this._client.get(path`/v1/nodes/${id}`, options);
6666
}
6767

68+
/**
69+
* Redeploy a node by replacing its current VM with a new one. Optionally update
70+
* the VM image and cloud init user data.
71+
*
72+
* @example
73+
* ```ts
74+
* const node = await client.nodes.redeploy('id');
75+
* ```
76+
*/
77+
redeploy(id: string, body: NodeRedeployParams, options?: RequestOptions): APIPromise<Node> {
78+
return this._client.put(path`/v1/nodes/${id}/redeploy`, { body, ...options });
79+
}
80+
6881
/**
6982
* Release an auto reserved VM node from its procurement, reducing the
7083
* procurement's desired quantity by 1
@@ -480,6 +493,28 @@ export interface NodeExtendParams {
480493
max_price_per_node_hour: number;
481494
}
482495

496+
export interface NodeRedeployParams {
497+
/**
498+
* Update the cloud init user data for VMs running on this node
499+
*/
500+
cloud_init_user_data?: Array<number>;
501+
502+
/**
503+
* Redeploy node with this VM image ID
504+
*/
505+
image_id?: string;
506+
507+
/**
508+
* If false, then the new VM will inherit any configuration (like image_id,
509+
* cloud_init_user_data) that is left empty in this request from the current VM.
510+
*
511+
* If true, then any configuration left empty will be set as empty in the new VM.
512+
* E.g if cloud_init_user_data is left unset and override_empty is true, then the
513+
* new VM will not have any cloud init user data. override_empty defaults to false.
514+
*/
515+
override_empty?: boolean;
516+
}
517+
483518
export declare namespace Nodes {
484519
export {
485520
type AcceleratorType as AcceleratorType,
@@ -496,5 +531,6 @@ export declare namespace Nodes {
496531
type NodeCreateParams as NodeCreateParams,
497532
type NodeListParams as NodeListParams,
498533
type NodeExtendParams as NodeExtendParams,
534+
type NodeRedeployParams as NodeRedeployParams,
499535
};
500536
}

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VERSION = '0.1.0-alpha.17'; // x-release-please-version
1+
export const VERSION = '0.1.0-alpha.18'; // x-release-please-version

0 commit comments

Comments
 (0)