Skip to content

Commit 135a4df

Browse files
feat(api): manual updates
1 parent 555537f commit 135a4df

File tree

8 files changed

+18
-116
lines changed

8 files changed

+18
-116
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 17
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-2eeb61205775c5997abf8154cd6f6fe81a1e83870eff10050b17ed415aa7860b.yml
3-
openapi_spec_hash: 63405add4a3f53718f8183cbb8c1a22f
1+
configured_endpoints: 16
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-ff8ccba8b5409eaa1128df9027582cb63f66e8accd75e511f70b7c27ef26c9ae.yml
3+
openapi_spec_hash: 1dbacc339695a7c78718f90f791d3f01
44
config_hash: 00ec9df250b9dc077f8d3b93a442d252

api.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@ Types:
1616
- <code><a href="./src/resources/deployments.ts">DeploymentStateEvent</a></code>
1717
- <code><a href="./src/resources/deployments.ts">DeploymentCreateResponse</a></code>
1818
- <code><a href="./src/resources/deployments.ts">DeploymentRetrieveResponse</a></code>
19-
- <code><a href="./src/resources/deployments.ts">DeploymentListResponse</a></code>
2019
- <code><a href="./src/resources/deployments.ts">DeploymentFollowResponse</a></code>
2120

2221
Methods:
2322

2423
- <code title="post /deployments">client.deployments.<a href="./src/resources/deployments.ts">create</a>({ ...params }) -> DeploymentCreateResponse</code>
2524
- <code title="get /deployments/{id}">client.deployments.<a href="./src/resources/deployments.ts">retrieve</a>(id) -> DeploymentRetrieveResponse</code>
26-
- <code title="get /deployments">client.deployments.<a href="./src/resources/deployments.ts">list</a>({ ...params }) -> DeploymentListResponse</code>
2725
- <code title="get /deployments/{id}/events">client.deployments.<a href="./src/resources/deployments.ts">follow</a>(id, { ...params }) -> DeploymentFollowResponse</code>
2826

2927
# Apps

src/client.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ import {
3030
DeploymentCreateResponse,
3131
DeploymentFollowParams,
3232
DeploymentFollowResponse,
33-
DeploymentListParams,
34-
DeploymentListResponse,
3533
DeploymentRetrieveResponse,
3634
DeploymentStateEvent,
3735
Deployments,
@@ -791,10 +789,8 @@ export declare namespace Kernel {
791789
type DeploymentStateEvent as DeploymentStateEvent,
792790
type DeploymentCreateResponse as DeploymentCreateResponse,
793791
type DeploymentRetrieveResponse as DeploymentRetrieveResponse,
794-
type DeploymentListResponse as DeploymentListResponse,
795792
type DeploymentFollowResponse as DeploymentFollowResponse,
796793
type DeploymentCreateParams as DeploymentCreateParams,
797-
type DeploymentListParams as DeploymentListParams,
798794
type DeploymentFollowParams as DeploymentFollowParams,
799795
};
800796

src/resources/apps/apps.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
import { APIResource } from '../../core/resource';
4-
import * as Shared from '../shared';
54
import * as DeploymentsAPI from './deployments';
65
import {
76
DeploymentCreateParams,
@@ -40,11 +39,6 @@ export namespace AppListResponse {
4039
*/
4140
id: string;
4241

43-
/**
44-
* List of actions available on the app
45-
*/
46-
actions: Array<Shared.AppAction>;
47-
4842
/**
4943
* Name of the application
5044
*/
@@ -55,11 +49,6 @@ export namespace AppListResponse {
5549
*/
5650
deployment: string;
5751

58-
/**
59-
* Environment variables configured for this app version
60-
*/
61-
env_vars: { [key: string]: string };
62-
6352
/**
6453
* Deployment region code
6554
*/
@@ -69,6 +58,11 @@ export namespace AppListResponse {
6958
* Version label for the application
7059
*/
7160
version: string;
61+
62+
/**
63+
* Environment variables configured for this app version
64+
*/
65+
env_vars?: { [key: string]: string };
7266
}
7367
}
7468

src/resources/apps/deployments.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,22 @@ export namespace DeploymentCreateResponse {
7272
/**
7373
* List of actions available on the app
7474
*/
75-
actions: Array<Shared.AppAction>;
75+
actions: Array<App.Action>;
7676

7777
/**
7878
* Name of the app
7979
*/
8080
name: string;
8181
}
82+
83+
export namespace App {
84+
export interface Action {
85+
/**
86+
* Name of the action
87+
*/
88+
name: string;
89+
}
90+
}
8291
}
8392

8493
/**

src/resources/deployments.ts

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,6 @@ export class Deployments extends APIResource {
3838
return this._client.get(path`/deployments/${id}`, options);
3939
}
4040

41-
/**
42-
* List deployments. Optionally filter by application name.
43-
*
44-
* @example
45-
* ```ts
46-
* const deployments = await client.deployments.list();
47-
* ```
48-
*/
49-
list(
50-
query: DeploymentListParams | null | undefined = {},
51-
options?: RequestOptions,
52-
): APIPromise<DeploymentListResponse> {
53-
return this._client.get('/deployments', { query, ...options });
54-
}
55-
5641
/**
5742
* Establishes a Server-Sent Events (SSE) stream that delivers real-time logs and
5843
* status updates for a deployment. The stream terminates automatically once the
@@ -234,55 +219,6 @@ export interface DeploymentRetrieveResponse {
234219
updated_at?: string | null;
235220
}
236221

237-
export type DeploymentListResponse = Array<DeploymentListResponse.DeploymentListResponseItem>;
238-
239-
export namespace DeploymentListResponse {
240-
/**
241-
* Deployment record information.
242-
*/
243-
export interface DeploymentListResponseItem {
244-
/**
245-
* Unique identifier for the deployment
246-
*/
247-
id: string;
248-
249-
/**
250-
* Timestamp when the deployment was created
251-
*/
252-
created_at: string;
253-
254-
/**
255-
* Deployment region code
256-
*/
257-
region: 'aws.us-east-1a';
258-
259-
/**
260-
* Current status of the deployment
261-
*/
262-
status: 'queued' | 'in_progress' | 'running' | 'failed' | 'stopped';
263-
264-
/**
265-
* Relative path to the application entrypoint
266-
*/
267-
entrypoint_rel_path?: string;
268-
269-
/**
270-
* Environment variables configured for this deployment
271-
*/
272-
env_vars?: { [key: string]: string };
273-
274-
/**
275-
* Status reason
276-
*/
277-
status_reason?: string;
278-
279-
/**
280-
* Timestamp when the deployment was last updated
281-
*/
282-
updated_at?: string | null;
283-
}
284-
}
285-
286222
/**
287223
* Union type representing any deployment event.
288224
*/
@@ -373,13 +309,6 @@ export interface DeploymentCreateParams {
373309
version?: string;
374310
}
375311

376-
export interface DeploymentListParams {
377-
/**
378-
* Filter results by application name.
379-
*/
380-
app_name?: string;
381-
}
382-
383312
export interface DeploymentFollowParams {
384313
/**
385314
* Show logs since the given time (RFC timestamps or durations like 5m).
@@ -392,10 +321,8 @@ export declare namespace Deployments {
392321
type DeploymentStateEvent as DeploymentStateEvent,
393322
type DeploymentCreateResponse as DeploymentCreateResponse,
394323
type DeploymentRetrieveResponse as DeploymentRetrieveResponse,
395-
type DeploymentListResponse as DeploymentListResponse,
396324
type DeploymentFollowResponse as DeploymentFollowResponse,
397325
type DeploymentCreateParams as DeploymentCreateParams,
398-
type DeploymentListParams as DeploymentListParams,
399326
type DeploymentFollowParams as DeploymentFollowParams,
400327
};
401328
}

src/resources/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ export {
1616
type DeploymentStateEvent,
1717
type DeploymentCreateResponse,
1818
type DeploymentRetrieveResponse,
19-
type DeploymentListResponse,
2019
type DeploymentFollowResponse,
2120
type DeploymentCreateParams,
22-
type DeploymentListParams,
2321
type DeploymentFollowParams,
2422
} from './deployments';
2523
export {

tests/api-resources/deployments.test.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -47,26 +47,6 @@ describe('resource deployments', () => {
4747
expect(dataAndResponse.response).toBe(rawResponse);
4848
});
4949

50-
// skipped: tests are disabled for the time being
51-
test.skip('list', async () => {
52-
const responsePromise = client.deployments.list();
53-
const rawResponse = await responsePromise.asResponse();
54-
expect(rawResponse).toBeInstanceOf(Response);
55-
const response = await responsePromise;
56-
expect(response).not.toBeInstanceOf(Response);
57-
const dataAndResponse = await responsePromise.withResponse();
58-
expect(dataAndResponse.data).toBe(response);
59-
expect(dataAndResponse.response).toBe(rawResponse);
60-
});
61-
62-
// skipped: tests are disabled for the time being
63-
test.skip('list: request options and params are passed correctly', async () => {
64-
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
65-
await expect(
66-
client.deployments.list({ app_name: 'app_name' }, { path: '/_stainless_unknown_path' }),
67-
).rejects.toThrow(Kernel.NotFoundError);
68-
});
69-
7050
// skipped: currently no good way to test endpoints with content type text/event-stream, Prism mock server will fail
7151
test.skip('follow', async () => {
7252
const responsePromise = client.deployments.follow('id');

0 commit comments

Comments
 (0)