Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.35.0"
".": "0.36.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 100
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-a0f1d08e6f62a74de2aac5c25e592494abdd59f2cfca2842c5810927554faee0.yml
openapi_spec_hash: ebd8bf67b7bb371cf4b4fa68b967cab5
config_hash: 27c0ea01aeb797a1767af139851c5b66
configured_endpoints: 101
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-bbc3dbdd0410eb315cfaeb21aad9f85e4a7f92ac55526ebb702a8bee343c2ab7.yml
openapi_spec_hash: 60a5134c45a8f3a217e128d4e3335cae
config_hash: 147340811dd6fbb9c2d80515a7e31f9a
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 0.36.0 (2026-02-21)

Full Changelog: [v0.35.0...v0.36.0](https://github.com/kernel/kernel-node-sdk/compare/v0.35.0...v0.36.0)

### Features

* Add DELETE /deployments/{id} API endpoint ([6df842e](https://github.com/kernel/kernel-node-sdk/commit/6df842e5d90124f64c312dd951027f0708a4e74f))


### Chores

* **internal:** remove mock server code ([5784a3f](https://github.com/kernel/kernel-node-sdk/commit/5784a3f2b6ebf92c53767128da5712514bd46660))
* **test:** update skip reason message ([e5d7f07](https://github.com/kernel/kernel-node-sdk/commit/e5d7f07905e39753b164553b85f5439418297f67))
* update mock server docs ([1c1ae0f](https://github.com/kernel/kernel-node-sdk/commit/1c1ae0f5eaba7b0512dccf2c5e5979e30538d966))

## 0.35.0 (2026-02-18)

Full Changelog: [v0.34.0...v0.35.0](https://github.com/kernel/kernel-node-sdk/compare/v0.34.0...v0.35.0)
Expand Down
6 changes: 0 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,6 @@ $ pnpm link -—global @onkernel/sdk

## Running tests

Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.

```sh
$ npx prism mock path/to/your/openapi.yml
```

```sh
$ yarn run test
```
Expand Down
1 change: 1 addition & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Methods:
- <code title="post /deployments">client.deployments.<a href="./src/resources/deployments.ts">create</a>({ ...params }) -> DeploymentCreateResponse</code>
- <code title="get /deployments/{id}">client.deployments.<a href="./src/resources/deployments.ts">retrieve</a>(id) -> DeploymentRetrieveResponse</code>
- <code title="get /deployments">client.deployments.<a href="./src/resources/deployments.ts">list</a>({ ...params }) -> DeploymentListResponsesOffsetPagination</code>
- <code title="delete /deployments/{id}">client.deployments.<a href="./src/resources/deployments.ts">delete</a>(id) -> void</code>
- <code title="get /deployments/{id}/events">client.deployments.<a href="./src/resources/deployments.ts">follow</a>(id, { ...params }) -> DeploymentFollowResponse</code>

# Apps
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onkernel/sdk",
"version": "0.35.0",
"version": "0.36.0",
"description": "The official TypeScript library for the Kernel API",
"author": "Kernel <>",
"types": "dist/index.d.ts",
Expand Down
41 changes: 0 additions & 41 deletions scripts/mock

This file was deleted.

46 changes: 0 additions & 46 deletions scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,7 @@ set -e

cd "$(dirname "$0")/.."

RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
NC='\033[0m' # No Color

function prism_is_running() {
curl --silent "http://localhost:4010" >/dev/null 2>&1
}

kill_server_on_port() {
pids=$(lsof -t -i tcp:"$1" || echo "")
if [ "$pids" != "" ]; then
kill "$pids"
echo "Stopped $pids."
fi
}

function is_overriding_api_base_url() {
[ -n "$TEST_API_BASE_URL" ]
}

if ! is_overriding_api_base_url && ! prism_is_running ; then
# When we exit this script, make sure to kill the background mock server process
trap 'kill_server_on_port 4010' EXIT

# Start the dev server
./scripts/mock --daemon
fi

if is_overriding_api_base_url ; then
echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}"
echo
elif ! prism_is_running ; then
echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server"
echo -e "running against your OpenAPI spec."
echo
echo -e "To run the server, pass in the path or url of your OpenAPI"
echo -e "spec to the prism command:"
echo
echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}"
echo

exit 1
else
echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}"
echo
fi

echo "==> Running tests"
./node_modules/.bin/jest "$@"
16 changes: 16 additions & 0 deletions src/resources/deployments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,22 @@ export class Deployments extends APIResource {
});
}

/**
* Stops a running deployment and marks it for deletion. If the deployment is
* already in a terminal state (stopped or failed), returns immediately.
*
* @example
* ```ts
* await client.deployments.delete('id');
* ```
*/
delete(id: string, options?: RequestOptions): APIPromise<void> {
return this._client.delete(path`/deployments/${id}`, {
...options,
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
});
}

/**
* Establishes a Server-Sent Events (SSE) stream that delivers real-time logs and
* status updates for a deployment. The stream terminates automatically once the
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.35.0'; // x-release-please-version
export const VERSION = '0.36.0'; // x-release-please-version
4 changes: 2 additions & 2 deletions tests/api-resources/apps.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const client = new Kernel({
});

describe('resource apps', () => {
// Prism tests are disabled
// Mock server tests are disabled
test.skip('list', async () => {
const responsePromise = client.apps.list();
const rawResponse = await responsePromise.asResponse();
Expand All @@ -20,7 +20,7 @@ describe('resource apps', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// Prism tests are disabled
// Mock server tests are disabled
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
Expand Down
20 changes: 10 additions & 10 deletions tests/api-resources/auth/connections.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const client = new Kernel({
});

describe('resource connections', () => {
// Prism tests are disabled
// Mock server tests are disabled
test.skip('create: only required params', async () => {
const responsePromise = client.auth.connections.create({
domain: 'netflix.com',
Expand All @@ -23,7 +23,7 @@ describe('resource connections', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// Prism tests are disabled
// Mock server tests are disabled
test.skip('create: required and optional params', async () => {
const response = await client.auth.connections.create({
domain: 'netflix.com',
Expand All @@ -42,7 +42,7 @@ describe('resource connections', () => {
});
});

// Prism tests are disabled
// Mock server tests are disabled
test.skip('retrieve', async () => {
const responsePromise = client.auth.connections.retrieve('id');
const rawResponse = await responsePromise.asResponse();
Expand All @@ -54,7 +54,7 @@ describe('resource connections', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// Prism tests are disabled
// Mock server tests are disabled
test.skip('list', async () => {
const responsePromise = client.auth.connections.list();
const rawResponse = await responsePromise.asResponse();
Expand All @@ -66,7 +66,7 @@ describe('resource connections', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// Prism tests are disabled
// Mock server tests are disabled
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
Expand All @@ -82,7 +82,7 @@ describe('resource connections', () => {
).rejects.toThrow(Kernel.NotFoundError);
});

// Prism tests are disabled
// Mock server tests are disabled
test.skip('delete', async () => {
const responsePromise = client.auth.connections.delete('id');
const rawResponse = await responsePromise.asResponse();
Expand All @@ -94,7 +94,7 @@ describe('resource connections', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// Prism doesn't support text/event-stream responses
// Mock server tests are disabled
test.skip('follow', async () => {
const responsePromise = client.auth.connections.follow('id');
const rawResponse = await responsePromise.asResponse();
Expand All @@ -106,7 +106,7 @@ describe('resource connections', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// Prism tests are disabled
// Mock server tests are disabled
test.skip('login', async () => {
const responsePromise = client.auth.connections.login('id');
const rawResponse = await responsePromise.asResponse();
Expand All @@ -118,7 +118,7 @@ describe('resource connections', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// Prism tests are disabled
// Mock server tests are disabled
test.skip('login: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
Expand All @@ -130,7 +130,7 @@ describe('resource connections', () => {
).rejects.toThrow(Kernel.NotFoundError);
});

// Prism tests are disabled
// Mock server tests are disabled
test.skip('submit', async () => {
const responsePromise = client.auth.connections.submit('id', {});
const rawResponse = await responsePromise.asResponse();
Expand Down
Loading