Skip to content

Commit 3cecf63

Browse files
feat(api): api update
1 parent 9af205c commit 3cecf63

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 13
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company%2Fsfc-nodes-80cab7746a6cdf7657e218c427ff7e13db1ac2454eacaccf0f36120234d49a3d.yml
3-
openapi_spec_hash: c36b216292e88e7bd8d57ef05cf67cf2
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company%2Fsfc-nodes-6ce4453a4b715d398f595bde6c28019207a1b8b50cdc54c339a5c21b5047483d.yml
3+
openapi_spec_hash: 53b2056fefe0e8959dc6142feea669e3
44
config_hash: 5ab998e0c5691df351205dfc14a2cfaf

src/resources/nodes.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class Nodes extends APIResource {
2525
}
2626

2727
/**
28-
* List all VM nodes for the authenticated account
28+
* List all nodes for the authenticated account
2929
*
3030
* @example
3131
* ```ts
@@ -485,15 +485,20 @@ export interface NodeCreateParams {
485485
export interface NodeListParams {
486486
/**
487487
* Filter nodes by node_id Use ?id=n_b1dc52505c6db142&id=n_b1dc52505c6db133 to
488-
* specify multiple IDs. Cannot be used with name
488+
* specify multiple IDs. Cannot combine with name or node_type
489489
*/
490490
id?: Array<string>;
491491

492492
/**
493493
* Filter nodes by their names Use ?name=val1&name=val2 to specify multiple names.
494-
* Cannot be used with id
494+
* Cannot combine with id or node_type
495495
*/
496496
name?: Array<string>;
497+
498+
/**
499+
* Filter nodes by their type Cannot combine with id or name
500+
*/
501+
type?: NodeType;
497502
}
498503

499504
export interface NodeExtendParams {

tests/api-resources/nodes.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ describe('resource nodes', () => {
5555
test.skip('list: request options and params are passed correctly', async () => {
5656
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
5757
await expect(
58-
client.nodes.list({ id: ['string'], name: ['string'] }, { path: '/_stainless_unknown_path' }),
58+
client.nodes.list(
59+
{ id: ['string'], name: ['string'], type: 'autoreserved' },
60+
{ path: '/_stainless_unknown_path' },
61+
),
5962
).rejects.toThrow(SFCNodes.NotFoundError);
6063
});
6164

0 commit comments

Comments
 (0)