Skip to content

Commit 1b13624

Browse files
authored
Merge pull request #10 from onkernel/release-please--branches--main--changes--next--components--sdk
release: 0.1.0-alpha.8
2 parents 1b47737 + d49b332 commit 1b13624

File tree

10 files changed

+62
-5
lines changed

10 files changed

+62
-5
lines changed

.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.7"
2+
".": "0.1.0-alpha.8"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 3
1+
configured_endpoints: 4
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-d168b58fcf39dbd0458d132091793d3e2d0930070b7dda2d5f7f1baff20dd31b.yml
33
openapi_spec_hash: b7e0fd7ee1656d7dbad57209d1584d92
4-
config_hash: 9139d1eb064baf60fd2265aac382f097
4+
config_hash: eab40627b734534462ae3b8ccd8b263b

CHANGELOG.md

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

3+
## 0.1.0-alpha.8 (2025-05-11)
4+
5+
Full Changelog: [v0.1.0-alpha.7...v0.1.0-alpha.8](https://github.com/onkernel/kernel-node-sdk/compare/v0.1.0-alpha.7...v0.1.0-alpha.8)
6+
7+
### Features
8+
9+
* **api:** update via SDK Studio ([78d450e](https://github.com/onkernel/kernel-node-sdk/commit/78d450e7f02ea519794247bf6ae1fe341779151f))
10+
311
## 0.1.0-alpha.7 (2025-05-11)
412

513
Full Changelog: [v0.1.0-alpha.6...v0.1.0-alpha.7](https://github.com/onkernel/kernel-node-sdk/compare/v0.1.0-alpha.6...v0.1.0-alpha.7)

api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ Types:
44

55
- <code><a href="./src/resources/apps.ts">AppDeployResponse</a></code>
66
- <code><a href="./src/resources/apps.ts">AppInvokeResponse</a></code>
7+
- <code><a href="./src/resources/apps.ts">AppRetrieveInvocationResponse</a></code>
78

89
Methods:
910

1011
- <code title="post /apps/deploy">client.apps.<a href="./src/resources/apps.ts">deploy</a>({ ...params }) -> AppDeployResponse</code>
1112
- <code title="post /apps/invoke">client.apps.<a href="./src/resources/apps.ts">invoke</a>({ ...params }) -> AppInvokeResponse</code>
13+
- <code title="get /apps/invocations/{id}">client.apps.<a href="./src/resources/apps.ts">retrieveInvocation</a>(id) -> AppRetrieveInvocationResponse</code>
1214

1315
# Browser
1416

package.json

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

src/client.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import {
2525
AppDeployResponse,
2626
AppInvokeParams,
2727
AppInvokeResponse,
28+
AppRetrieveInvocationResponse,
2829
Apps,
2930
} from './resources/apps';
3031
import { Browser, BrowserCreateSessionResponse } from './resources/browser';
@@ -745,6 +746,7 @@ export declare namespace Kernel {
745746
Apps as Apps,
746747
type AppDeployResponse as AppDeployResponse,
747748
type AppInvokeResponse as AppInvokeResponse,
749+
type AppRetrieveInvocationResponse as AppRetrieveInvocationResponse,
748750
type AppDeployParams as AppDeployParams,
749751
type AppInvokeParams as AppInvokeParams,
750752
};

src/resources/apps.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { APIPromise } from '../core/api-promise';
55
import { type Uploadable } from '../core/uploads';
66
import { RequestOptions } from '../internal/request-options';
77
import { multipartFormRequestOptions } from '../internal/uploads';
8+
import { path } from '../internal/utils/path';
89

910
export class Apps extends APIResource {
1011
/**
@@ -39,6 +40,20 @@ export class Apps extends APIResource {
3940
invoke(body: AppInvokeParams, options?: RequestOptions): APIPromise<AppInvokeResponse> {
4041
return this._client.post('/apps/invoke', { body, ...options });
4142
}
43+
44+
/**
45+
* Get an app invocation by id
46+
*
47+
* @example
48+
* ```ts
49+
* const response = await client.apps.retrieveInvocation(
50+
* 'ckqwer3o20000jb9s7abcdef',
51+
* );
52+
* ```
53+
*/
54+
retrieveInvocation(id: string, options?: RequestOptions): APIPromise<AppRetrieveInvocationResponse> {
55+
return this._client.get(path`/apps/invocations/${id}`, options);
56+
}
4257
}
4358

4459
export interface AppDeployResponse {
@@ -75,6 +90,22 @@ export interface AppInvokeResponse {
7590
output?: string;
7691
}
7792

93+
export interface AppRetrieveInvocationResponse {
94+
id: string;
95+
96+
appName: string;
97+
98+
finishedAt: string | null;
99+
100+
input: string;
101+
102+
output: string;
103+
104+
startedAt: string;
105+
106+
status: string;
107+
}
108+
78109
export interface AppDeployParams {
79110
/**
80111
* Name of the application
@@ -123,6 +154,7 @@ export declare namespace Apps {
123154
export {
124155
type AppDeployResponse as AppDeployResponse,
125156
type AppInvokeResponse as AppInvokeResponse,
157+
type AppRetrieveInvocationResponse as AppRetrieveInvocationResponse,
126158
type AppDeployParams as AppDeployParams,
127159
type AppInvokeParams as AppInvokeParams,
128160
};

src/resources/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export {
44
Apps,
55
type AppDeployResponse,
66
type AppInvokeResponse,
7+
type AppRetrieveInvocationResponse,
78
type AppDeployParams,
89
type AppInvokeParams,
910
} from './apps';

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.7'; // x-release-please-version
1+
export const VERSION = '0.1.0-alpha.8'; // x-release-please-version

tests/api-resources/apps.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,16 @@ describe('resource apps', () => {
6060
version: '1.0.0',
6161
});
6262
});
63+
64+
// skipped: tests are disabled for the time being
65+
test.skip('retrieveInvocation', async () => {
66+
const responsePromise = client.apps.retrieveInvocation('ckqwer3o20000jb9s7abcdef');
67+
const rawResponse = await responsePromise.asResponse();
68+
expect(rawResponse).toBeInstanceOf(Response);
69+
const response = await responsePromise;
70+
expect(response).not.toBeInstanceOf(Response);
71+
const dataAndResponse = await responsePromise.withResponse();
72+
expect(dataAndResponse.data).toBe(response);
73+
expect(dataAndResponse.response).toBe(rawResponse);
74+
});
6375
});

0 commit comments

Comments
 (0)