Skip to content

Commit b0652c7

Browse files
feat(api): update via SDK Studio
1 parent 0dc0e13 commit b0652c7

File tree

11 files changed

+335
-192
lines changed

11 files changed

+335
-192
lines changed

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 14
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-f7fa782f119b02d610bac1dbc75bf8355e73169d978997527f643e24036dabdd.yml
3-
openapi_spec_hash: 9543dfe156b1c42a2fe4d3767e6b0778
4-
config_hash: a085d1b39ddf0b26ee798501a9f47e20
1+
configured_endpoints: 15
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-5d4e11bc46eeecee7363d56a9dfe946acee997d5b352c2b0a50c20e742c54d2d.yml
3+
openapi_spec_hash: 333e53ad9c706296b9afdb8ff73bec8f
4+
config_hash: 4e2f9aebc2153d5caf7bb8b2eb107026

api.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
# Shared
2+
3+
Types:
4+
5+
- <code><a href="./src/resources/shared.ts">ErrorDetail</a></code>
6+
- <code><a href="./src/resources/shared.ts">LogEvent</a></code>
7+
18
# Deployments
29

310
Types:
411

12+
- <code><a href="./src/resources/deployments.ts">DeploymentStateEvent</a></code>
513
- <code><a href="./src/resources/deployments.ts">DeploymentCreateResponse</a></code>
614
- <code><a href="./src/resources/deployments.ts">DeploymentRetrieveResponse</a></code>
715
- <code><a href="./src/resources/deployments.ts">DeploymentFollowResponse</a></code>
@@ -34,19 +42,22 @@ Methods:
3442
- <code title="post /deploy">client.apps.deployments.<a href="./src/resources/apps/deployments.ts">create</a>({ ...params }) -> DeploymentCreateResponse</code>
3543
- <code title="get /apps/{id}/events">client.apps.deployments.<a href="./src/resources/apps/deployments.ts">follow</a>(id) -> DeploymentFollowResponse</code>
3644

37-
## Invocations
45+
# Invocations
3846

3947
Types:
4048

41-
- <code><a href="./src/resources/apps/invocations.ts">InvocationCreateResponse</a></code>
42-
- <code><a href="./src/resources/apps/invocations.ts">InvocationRetrieveResponse</a></code>
43-
- <code><a href="./src/resources/apps/invocations.ts">InvocationUpdateResponse</a></code>
49+
- <code><a href="./src/resources/invocations.ts">InvocationStateEvent</a></code>
50+
- <code><a href="./src/resources/invocations.ts">InvocationCreateResponse</a></code>
51+
- <code><a href="./src/resources/invocations.ts">InvocationRetrieveResponse</a></code>
52+
- <code><a href="./src/resources/invocations.ts">InvocationUpdateResponse</a></code>
53+
- <code><a href="./src/resources/invocations.ts">InvocationFollowResponse</a></code>
4454

4555
Methods:
4656

47-
- <code title="post /invocations">client.apps.invocations.<a href="./src/resources/apps/invocations.ts">create</a>({ ...params }) -> InvocationCreateResponse</code>
48-
- <code title="get /invocations/{id}">client.apps.invocations.<a href="./src/resources/apps/invocations.ts">retrieve</a>(id) -> InvocationRetrieveResponse</code>
49-
- <code title="patch /invocations/{id}">client.apps.invocations.<a href="./src/resources/apps/invocations.ts">update</a>(id, { ...params }) -> InvocationUpdateResponse</code>
57+
- <code title="post /invocations">client.invocations.<a href="./src/resources/invocations.ts">create</a>({ ...params }) -> InvocationCreateResponse</code>
58+
- <code title="get /invocations/{id}">client.invocations.<a href="./src/resources/invocations.ts">retrieve</a>(id) -> InvocationRetrieveResponse</code>
59+
- <code title="patch /invocations/{id}">client.invocations.<a href="./src/resources/invocations.ts">update</a>(id, { ...params }) -> InvocationUpdateResponse</code>
60+
- <code title="get /invocations/{id}/events">client.invocations.<a href="./src/resources/invocations.ts">follow</a>(id) -> InvocationFollowResponse</code>
5061

5162
# Browsers
5263

src/client.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,20 @@ import {
3030
DeploymentCreateResponse,
3131
DeploymentFollowResponse,
3232
DeploymentRetrieveResponse,
33+
DeploymentStateEvent,
3334
Deployments,
3435
} from './resources/deployments';
3536
import { KernelApp } from './core/app-framework';
37+
import {
38+
InvocationCreateParams,
39+
InvocationCreateResponse,
40+
InvocationFollowResponse,
41+
InvocationRetrieveResponse,
42+
InvocationStateEvent,
43+
InvocationUpdateParams,
44+
InvocationUpdateResponse,
45+
Invocations,
46+
} from './resources/invocations';
3647
import { AppListParams, AppListResponse, Apps } from './resources/apps/apps';
3748
import { type Fetch } from './internal/builtin-types';
3849
import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
@@ -761,16 +772,19 @@ export class Kernel {
761772

762773
deployments: API.Deployments = new API.Deployments(this);
763774
apps: API.Apps = new API.Apps(this);
775+
invocations: API.Invocations = new API.Invocations(this);
764776
browsers: API.Browsers = new API.Browsers(this);
765777
}
766778
Kernel.Deployments = Deployments;
767779
Kernel.Apps = Apps;
780+
Kernel.Invocations = Invocations;
768781
Kernel.Browsers = Browsers;
769782
export declare namespace Kernel {
770783
export type RequestOptions = Opts.RequestOptions;
771784

772785
export {
773786
Deployments as Deployments,
787+
type DeploymentStateEvent as DeploymentStateEvent,
774788
type DeploymentCreateResponse as DeploymentCreateResponse,
775789
type DeploymentRetrieveResponse as DeploymentRetrieveResponse,
776790
type DeploymentFollowResponse as DeploymentFollowResponse,
@@ -779,6 +793,17 @@ export declare namespace Kernel {
779793

780794
export { Apps as Apps, type AppListResponse as AppListResponse, type AppListParams as AppListParams };
781795

796+
export {
797+
Invocations as Invocations,
798+
type InvocationStateEvent as InvocationStateEvent,
799+
type InvocationCreateResponse as InvocationCreateResponse,
800+
type InvocationRetrieveResponse as InvocationRetrieveResponse,
801+
type InvocationUpdateResponse as InvocationUpdateResponse,
802+
type InvocationFollowResponse as InvocationFollowResponse,
803+
type InvocationCreateParams as InvocationCreateParams,
804+
type InvocationUpdateParams as InvocationUpdateParams,
805+
};
806+
782807
export {
783808
Browsers as Browsers,
784809
type BrowserPersistence as BrowserPersistence,
@@ -788,4 +813,7 @@ export declare namespace Kernel {
788813
type BrowserCreateParams as BrowserCreateParams,
789814
type BrowserDeleteParams as BrowserDeleteParams,
790815
};
816+
817+
export type ErrorDetail = API.ErrorDetail;
818+
export type LogEvent = API.LogEvent;
791819
}

src/resources/apps/apps.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,11 @@ import {
88
DeploymentFollowResponse,
99
Deployments,
1010
} from './deployments';
11-
import * as InvocationsAPI from './invocations';
12-
import {
13-
InvocationCreateParams,
14-
InvocationCreateResponse,
15-
InvocationRetrieveResponse,
16-
InvocationUpdateParams,
17-
InvocationUpdateResponse,
18-
Invocations,
19-
} from './invocations';
2011
import { APIPromise } from '../../core/api-promise';
2112
import { RequestOptions } from '../../internal/request-options';
2213

2314
export class Apps extends APIResource {
2415
deployments: DeploymentsAPI.Deployments = new DeploymentsAPI.Deployments(this._client);
25-
invocations: InvocationsAPI.Invocations = new InvocationsAPI.Invocations(this._client);
2616

2717
/**
2818
* List applications. Optionally filter by app name and/or version label.
@@ -84,7 +74,6 @@ export interface AppListParams {
8474
}
8575

8676
Apps.Deployments = Deployments;
87-
Apps.Invocations = Invocations;
8877

8978
export declare namespace Apps {
9079
export { type AppListResponse as AppListResponse, type AppListParams as AppListParams };
@@ -95,13 +84,4 @@ export declare namespace Apps {
9584
type DeploymentFollowResponse as DeploymentFollowResponse,
9685
type DeploymentCreateParams as DeploymentCreateParams,
9786
};
98-
99-
export {
100-
Invocations as Invocations,
101-
type InvocationCreateResponse as InvocationCreateResponse,
102-
type InvocationRetrieveResponse as InvocationRetrieveResponse,
103-
type InvocationUpdateResponse as InvocationUpdateResponse,
104-
type InvocationCreateParams as InvocationCreateParams,
105-
type InvocationUpdateParams as InvocationUpdateParams,
106-
};
10787
}

src/resources/apps/deployments.ts

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
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';
45
import { APIPromise } from '../../core/api-promise';
56
import { Stream } from '../../core/streaming';
67
import { type Uploadable } from '../../core/uploads';
@@ -96,7 +97,7 @@ export namespace DeploymentCreateResponse {
9697
export type DeploymentFollowResponse =
9798
| DeploymentFollowResponse.StateEvent
9899
| DeploymentFollowResponse.StateUpdateEvent
99-
| DeploymentFollowResponse.LogEvent;
100+
| Shared.LogEvent;
100101

101102
export namespace DeploymentFollowResponse {
102103
/**
@@ -138,26 +139,6 @@ export namespace DeploymentFollowResponse {
138139
*/
139140
timestamp?: string;
140141
}
141-
142-
/**
143-
* A log entry from the application.
144-
*/
145-
export interface LogEvent {
146-
/**
147-
* Event type identifier (always "log").
148-
*/
149-
event: 'log';
150-
151-
/**
152-
* Log message text.
153-
*/
154-
message: string;
155-
156-
/**
157-
* Time the log entry was produced.
158-
*/
159-
timestamp: string;
160-
}
161142
}
162143

163144
export interface DeploymentCreateParams {

src/resources/apps/index.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,3 @@ export {
77
type DeploymentFollowResponse,
88
type DeploymentCreateParams,
99
} from './deployments';
10-
export {
11-
Invocations,
12-
type InvocationCreateResponse,
13-
type InvocationRetrieveResponse,
14-
type InvocationUpdateResponse,
15-
type InvocationCreateParams,
16-
type InvocationUpdateParams,
17-
} from './invocations';

0 commit comments

Comments
 (0)