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.17.0"
".": "0.18.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 65
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-e914e2d08b888c77051acb09176d5e88052f130e0d22e85d946a675d2c3d39ab.yml
openapi_spec_hash: 611d0ed1b4519331470b5d14e5f6784a
config_hash: 3ded7a0ed77b1bfd68eabc6763521fe8
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-015c11efc34c81d4d82a937c017f5eb789ea3ca21a05b70e2ed31c069b839293.yml
openapi_spec_hash: 3dcab2044da305f376cecf4eca38caee
config_hash: 0fbdda3a736cc2748ca33371871e61b3
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.18.0 (2025-10-30)

Full Changelog: [v0.17.0...v0.18.0](https://github.com/onkernel/kernel-node-sdk/compare/v0.17.0...v0.18.0)

### Features

* apps: add offset pagination + headers ([7c91210](https://github.com/onkernel/kernel-node-sdk/commit/7c912109b90c18481e45a5c6d5f367afca039d23))

## 0.17.0 (2025-10-27)

Full Changelog: [v0.16.0...v0.17.0](https://github.com/onkernel/kernel-node-sdk/compare/v0.16.0...v0.17.0)
Expand Down
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Types:

Methods:

- <code title="get /apps">client.apps.<a href="./src/resources/apps.ts">list</a>({ ...params }) -> AppListResponse</code>
- <code title="get /apps">client.apps.<a href="./src/resources/apps.ts">list</a>({ ...params }) -> AppListResponsesOffsetPagination</code>

# Invocations

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.17.0",
"version": "0.18.0",
"description": "The official TypeScript library for the Kernel API",
"author": "Kernel <>",
"types": "dist/index.d.ts",
Expand Down
9 changes: 7 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { AbstractPage, type OffsetPaginationParams, OffsetPaginationResponse } f
import * as Uploads from './core/uploads';
import * as API from './resources/index';
import { APIPromise } from './core/api-promise';
import { AppListParams, AppListResponse, Apps } from './resources/apps';
import { AppListParams, AppListResponse, AppListResponsesOffsetPagination, Apps } from './resources/apps';
import {
DeploymentCreateParams,
DeploymentCreateResponse,
Expand Down Expand Up @@ -873,7 +873,12 @@ export declare namespace Kernel {
type DeploymentFollowParams as DeploymentFollowParams,
};

export { Apps as Apps, type AppListResponse as AppListResponse, type AppListParams as AppListParams };
export {
Apps as Apps,
type AppListResponse as AppListResponse,
type AppListResponsesOffsetPagination as AppListResponsesOffsetPagination,
type AppListParams as AppListParams,
};

export {
Invocations as Invocations,
Expand Down
81 changes: 43 additions & 38 deletions src/resources/apps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,63 +2,64 @@

import { APIResource } from '../core/resource';
import * as Shared from './shared';
import { APIPromise } from '../core/api-promise';
import { OffsetPagination, type OffsetPaginationParams, PagePromise } from '../core/pagination';
import { RequestOptions } from '../internal/request-options';

export class Apps extends APIResource {
/**
* List applications. Optionally filter by app name and/or version label.
*/
list(query: AppListParams | null | undefined = {}, options?: RequestOptions): APIPromise<AppListResponse> {
return this._client.get('/apps', { query, ...options });
list(
query: AppListParams | null | undefined = {},
options?: RequestOptions,
): PagePromise<AppListResponsesOffsetPagination, AppListResponse> {
return this._client.getAPIList('/apps', OffsetPagination<AppListResponse>, { query, ...options });
}
}

export type AppListResponse = Array<AppListResponse.AppListResponseItem>;
export type AppListResponsesOffsetPagination = OffsetPagination<AppListResponse>;

export namespace AppListResponse {
/**
* Summary of an application version.
*/
export interface AppListResponse {
/**
* Summary of an application version.
* Unique identifier for the app version
*/
export interface AppListResponseItem {
/**
* Unique identifier for the app version
*/
id: string;
id: string;

/**
* List of actions available on the app
*/
actions: Array<Shared.AppAction>;
/**
* List of actions available on the app
*/
actions: Array<Shared.AppAction>;

/**
* Name of the application
*/
app_name: string;
/**
* Name of the application
*/
app_name: string;

/**
* Deployment ID
*/
deployment: string;
/**
* Deployment ID
*/
deployment: string;

/**
* Environment variables configured for this app version
*/
env_vars: { [key: string]: string };
/**
* Environment variables configured for this app version
*/
env_vars: { [key: string]: string };

/**
* Deployment region code
*/
region: 'aws.us-east-1a';
/**
* Deployment region code
*/
region: 'aws.us-east-1a';

/**
* Version label for the application
*/
version: string;
}
/**
* Version label for the application
*/
version: string;
}

export interface AppListParams {
export interface AppListParams extends OffsetPaginationParams {
/**
* Filter results by application name.
*/
Expand All @@ -71,5 +72,9 @@ export interface AppListParams {
}

export declare namespace Apps {
export { type AppListResponse as AppListResponse, type AppListParams as AppListParams };
export {
type AppListResponse as AppListResponse,
type AppListResponsesOffsetPagination as AppListResponsesOffsetPagination,
type AppListParams as AppListParams,
};
}
7 changes: 6 additions & 1 deletion src/resources/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export * from './shared';
export { Apps, type AppListResponse, type AppListParams } from './apps';
export {
Apps,
type AppListResponse,
type AppListParams,
type AppListResponsesOffsetPagination,
} from './apps';
export {
Browsers,
type BrowserPersistence,
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.17.0'; // x-release-please-version
export const VERSION = '0.18.0'; // x-release-please-version
5 changes: 4 additions & 1 deletion tests/api-resources/apps.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ describe('resource apps', () => {
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(
client.apps.list({ app_name: 'app_name', version: 'version' }, { path: '/_stainless_unknown_path' }),
client.apps.list(
{ app_name: 'app_name', limit: 1, offset: 0, version: 'version' },
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(Kernel.NotFoundError);
});
});