diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index ddfa3e3..8ad7375 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.11.1"
+ ".": "0.11.2"
}
diff --git a/.stats.yml b/.stats.yml
index 7fb3d31..385372f 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 46
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-cb38560915edce03abce2ae3ef5bc745489dbe9b6f80c2b4ff42edf8c2ff276d.yml
-openapi_spec_hash: a869194d6c864ba28d79ec0105439c3e
-config_hash: ed56f95781ec9b2e73c97e1a66606071
+configured_endpoints: 50
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-d3a597bbbb25c131e2c06eb9b47d70932d14a97a6f916677a195a128e196f4db.yml
+openapi_spec_hash: c967b384624017eed0abff1b53a74530
+config_hash: 0d150b61cae2dc57d3648ceae7784966
diff --git a/CHANGELOG.md b/CHANGELOG.md
index dca3d03..218fa97 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,18 @@
# Changelog
+## 0.11.2 (2025-09-24)
+
+Full Changelog: [v0.11.1...v0.11.2](https://github.com/onkernel/kernel-node-sdk/compare/v0.11.1...v0.11.2)
+
+### Features
+
+* Add stainless CI ([63436fa](https://github.com/onkernel/kernel-node-sdk/commit/63436fac84ae5bc88b8713dd5b8b58b4d4989c62))
+
+
+### Chores
+
+* do not install brew dependencies in ./scripts/bootstrap by default ([b902d04](https://github.com/onkernel/kernel-node-sdk/commit/b902d04ed09ff6001eb59ca8c2a9e9bccd629ed4))
+
## 0.11.1 (2025-09-08)
Full Changelog: [v0.11.0...v0.11.1](https://github.com/onkernel/kernel-node-sdk/compare/v0.11.0...v0.11.1)
diff --git a/api.md b/api.md
index 86d0347..7c4d2d7 100644
--- a/api.md
+++ b/api.md
@@ -160,3 +160,18 @@ Methods:
- client.profiles.list() -> ProfileListResponse
- client.profiles.delete(idOrName) -> void
- client.profiles.download(idOrName) -> Response
+
+# Proxies
+
+Types:
+
+- ProxyCreateResponse
+- ProxyRetrieveResponse
+- ProxyListResponse
+
+Methods:
+
+- client.proxies.create({ ...params }) -> ProxyCreateResponse
+- client.proxies.retrieve(id) -> ProxyRetrieveResponse
+- client.proxies.list() -> ProxyListResponse
+- client.proxies.delete(id) -> void
diff --git a/package.json b/package.json
index bae1017..f94a531 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@onkernel/sdk",
- "version": "0.11.1",
+ "version": "0.11.2",
"description": "The official TypeScript library for the Kernel API",
"author": "Kernel <>",
"types": "dist/index.d.ts",
diff --git a/scripts/bootstrap b/scripts/bootstrap
index 062a034..a8b69ff 100755
--- a/scripts/bootstrap
+++ b/scripts/bootstrap
@@ -4,10 +4,18 @@ set -e
cd "$(dirname "$0")/.."
-if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ]; then
+if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then
brew bundle check >/dev/null 2>&1 || {
- echo "==> Installing Homebrew dependencies…"
- brew bundle
+ echo -n "==> Install Homebrew dependencies? (y/N): "
+ read -r response
+ case "$response" in
+ [yY][eE][sS]|[yY])
+ brew bundle
+ ;;
+ *)
+ ;;
+ esac
+ echo
}
fi
diff --git a/src/client.ts b/src/client.ts
index 77a53c3..a465779 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -43,6 +43,13 @@ import {
Invocations,
} from './resources/invocations';
import { ProfileCreateParams, ProfileListResponse, Profiles } from './resources/profiles';
+import {
+ Proxies,
+ ProxyCreateParams,
+ ProxyCreateResponse,
+ ProxyListResponse,
+ ProxyRetrieveResponse,
+} from './resources/proxies';
import {
BrowserCreateParams,
BrowserCreateResponse,
@@ -820,6 +827,7 @@ export class Kernel {
invocations: API.Invocations = new API.Invocations(this);
browsers: API.Browsers = new API.Browsers(this);
profiles: API.Profiles = new API.Profiles(this);
+ proxies: API.Proxies = new API.Proxies(this);
}
Kernel.Deployments = Deployments;
@@ -827,6 +835,7 @@ Kernel.Apps = Apps;
Kernel.Invocations = Invocations;
Kernel.Browsers = Browsers;
Kernel.Profiles = Profiles;
+Kernel.Proxies = Proxies;
export declare namespace Kernel {
export type RequestOptions = Opts.RequestOptions;
@@ -880,6 +889,14 @@ export declare namespace Kernel {
type ProfileCreateParams as ProfileCreateParams,
};
+ export {
+ Proxies as Proxies,
+ type ProxyCreateResponse as ProxyCreateResponse,
+ type ProxyRetrieveResponse as ProxyRetrieveResponse,
+ type ProxyListResponse as ProxyListResponse,
+ type ProxyCreateParams as ProxyCreateParams,
+ };
+
export type AppAction = API.AppAction;
export type ErrorDetail = API.ErrorDetail;
export type ErrorEvent = API.ErrorEvent;
diff --git a/src/resources/browsers/browsers.ts b/src/resources/browsers/browsers.ts
index 5cc3415..5f70d04 100644
--- a/src/resources/browsers/browsers.ts
+++ b/src/resources/browsers/browsers.ts
@@ -348,6 +348,12 @@ export interface BrowserCreateParams {
*/
profile?: BrowserCreateParams.Profile;
+ /**
+ * Optional proxy to associate to the browser session. Must reference a proxy
+ * belonging to the caller's org.
+ */
+ proxy_id?: string;
+
/**
* If true, launches the browser in stealth mode to reduce detection by anti-bot
* mechanisms.
@@ -357,7 +363,10 @@ export interface BrowserCreateParams {
/**
* The number of seconds of inactivity before the browser session is terminated.
* Only applicable to non-persistent browsers. Activity includes CDP connections
- * and live view connections. Defaults to 60 seconds.
+ * and live view connections. Defaults to 60 seconds. Minimum allowed is 10
+ * seconds. Maximum allowed is 86400 (24 hours). We check for inactivity every 5
+ * seconds, so the actual timeout behavior you will see is +/- 5 seconds around the
+ * specified value.
*/
timeout_seconds?: number;
}
diff --git a/src/resources/index.ts b/src/resources/index.ts
index 6482d4f..96c9137 100644
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -35,3 +35,10 @@ export {
type InvocationUpdateParams,
} from './invocations';
export { Profiles, type ProfileListResponse, type ProfileCreateParams } from './profiles';
+export {
+ Proxies,
+ type ProxyCreateResponse,
+ type ProxyRetrieveResponse,
+ type ProxyListResponse,
+ type ProxyCreateParams,
+} from './proxies';
diff --git a/src/resources/invocations.ts b/src/resources/invocations.ts
index 89bc359..6ff470a 100644
--- a/src/resources/invocations.ts
+++ b/src/resources/invocations.ts
@@ -40,7 +40,8 @@ export class Invocations extends APIResource {
}
/**
- * Update an invocation's status or output.
+ * Update an invocation's status or output. This can used to cancel an invocation
+ * by setting the status to "failed".
*
* @example
* ```ts
diff --git a/src/resources/proxies.ts b/src/resources/proxies.ts
new file mode 100644
index 0000000..20ceea6
--- /dev/null
+++ b/src/resources/proxies.ts
@@ -0,0 +1,876 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../core/resource';
+import { APIPromise } from '../core/api-promise';
+import { buildHeaders } from '../internal/headers';
+import { RequestOptions } from '../internal/request-options';
+import { path } from '../internal/utils/path';
+
+export class Proxies extends APIResource {
+ /**
+ * Create a new proxy configuration for the caller's organization.
+ */
+ create(body: ProxyCreateParams, options?: RequestOptions): APIPromise {
+ return this._client.post('/proxies', { body, ...options });
+ }
+
+ /**
+ * Retrieve a proxy belonging to the caller's organization by ID.
+ */
+ retrieve(id: string, options?: RequestOptions): APIPromise {
+ return this._client.get(path`/proxies/${id}`, options);
+ }
+
+ /**
+ * List proxies owned by the caller's organization.
+ */
+ list(options?: RequestOptions): APIPromise {
+ return this._client.get('/proxies', options);
+ }
+
+ /**
+ * Soft delete a proxy. Sessions referencing it are not modified.
+ */
+ delete(id: string, options?: RequestOptions): APIPromise {
+ return this._client.delete(path`/proxies/${id}`, {
+ ...options,
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
+ });
+ }
+}
+
+/**
+ * Configuration for routing traffic through a proxy.
+ */
+export interface ProxyCreateResponse {
+ /**
+ * Proxy type to use. In terms of quality for avoiding bot-detection, from best to
+ * worst: `mobile` > `residential` > `isp` > `datacenter`.
+ */
+ type: 'datacenter' | 'isp' | 'residential' | 'mobile' | 'custom';
+
+ id?: string;
+
+ /**
+ * Configuration specific to the selected proxy `type`.
+ */
+ config?:
+ | ProxyCreateResponse.DatacenterProxyConfig
+ | ProxyCreateResponse.IspProxyConfig
+ | ProxyCreateResponse.ResidentialProxyConfig
+ | ProxyCreateResponse.MobileProxyConfig
+ | ProxyCreateResponse.CustomProxyConfig;
+
+ /**
+ * Readable name of the proxy.
+ */
+ name?: string;
+}
+
+export namespace ProxyCreateResponse {
+ /**
+ * Configuration for a datacenter proxy.
+ */
+ export interface DatacenterProxyConfig {
+ /**
+ * ISO 3166 country code or EU for the proxy exit node.
+ */
+ country: string;
+ }
+
+ /**
+ * Configuration for an ISP proxy.
+ */
+ export interface IspProxyConfig {
+ /**
+ * ISO 3166 country code or EU for the proxy exit node.
+ */
+ country: string;
+ }
+
+ /**
+ * Configuration for residential proxies.
+ */
+ export interface ResidentialProxyConfig {
+ /**
+ * Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html
+ */
+ asn?: string;
+
+ /**
+ * City name (no spaces, e.g. `sanfrancisco`). If provided, `country` must also be
+ * provided.
+ */
+ city?: string;
+
+ /**
+ * ISO 3166 country code or EU for the proxy exit node. Required if `city` is
+ * provided.
+ */
+ country?: string;
+
+ /**
+ * Operating system of the residential device.
+ */
+ os?: 'windows' | 'macos' | 'android';
+
+ /**
+ * Two-letter state code.
+ */
+ state?: string;
+
+ /**
+ * US ZIP code.
+ */
+ zip?: string;
+ }
+
+ /**
+ * Configuration for mobile proxies.
+ */
+ export interface MobileProxyConfig {
+ /**
+ * Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html
+ */
+ asn?: string;
+
+ /**
+ * Mobile carrier.
+ */
+ carrier?:
+ | 'a1'
+ | 'aircel'
+ | 'airtel'
+ | 'att'
+ | 'celcom'
+ | 'chinamobile'
+ | 'claro'
+ | 'comcast'
+ | 'cox'
+ | 'digi'
+ | 'dt'
+ | 'docomo'
+ | 'dtac'
+ | 'etisalat'
+ | 'idea'
+ | 'kyivstar'
+ | 'meo'
+ | 'megafon'
+ | 'mtn'
+ | 'mtnza'
+ | 'mts'
+ | 'optus'
+ | 'orange'
+ | 'qwest'
+ | 'reliance_jio'
+ | 'robi'
+ | 'sprint'
+ | 'telefonica'
+ | 'telstra'
+ | 'tmobile'
+ | 'tigo'
+ | 'tim'
+ | 'verizon'
+ | 'vimpelcom'
+ | 'vodacomza'
+ | 'vodafone'
+ | 'vivo'
+ | 'zain'
+ | 'vivabo'
+ | 'telenormyanmar'
+ | 'kcelljsc'
+ | 'swisscom'
+ | 'singtel'
+ | 'asiacell'
+ | 'windit'
+ | 'cellc'
+ | 'ooredoo'
+ | 'drei'
+ | 'umobile'
+ | 'cableone'
+ | 'proximus'
+ | 'tele2'
+ | 'mobitel'
+ | 'o2'
+ | 'bouygues'
+ | 'free'
+ | 'sfr'
+ | 'digicel';
+
+ /**
+ * City name (no spaces, e.g. `sanfrancisco`). If provided, `country` must also be
+ * provided.
+ */
+ city?: string;
+
+ /**
+ * ISO 3166 country code or EU for the proxy exit node. Required if `city` is
+ * provided.
+ */
+ country?: string;
+
+ /**
+ * Two-letter state code.
+ */
+ state?: string;
+
+ /**
+ * US ZIP code.
+ */
+ zip?: string;
+ }
+
+ /**
+ * Configuration for a custom proxy (e.g., private proxy server).
+ */
+ export interface CustomProxyConfig {
+ /**
+ * Proxy host address or IP.
+ */
+ host: string;
+
+ /**
+ * Proxy port.
+ */
+ port: number;
+
+ /**
+ * Whether the proxy has a password.
+ */
+ has_password?: boolean;
+
+ /**
+ * Username for proxy authentication.
+ */
+ username?: string;
+ }
+}
+
+/**
+ * Configuration for routing traffic through a proxy.
+ */
+export interface ProxyRetrieveResponse {
+ /**
+ * Proxy type to use. In terms of quality for avoiding bot-detection, from best to
+ * worst: `mobile` > `residential` > `isp` > `datacenter`.
+ */
+ type: 'datacenter' | 'isp' | 'residential' | 'mobile' | 'custom';
+
+ id?: string;
+
+ /**
+ * Configuration specific to the selected proxy `type`.
+ */
+ config?:
+ | ProxyRetrieveResponse.DatacenterProxyConfig
+ | ProxyRetrieveResponse.IspProxyConfig
+ | ProxyRetrieveResponse.ResidentialProxyConfig
+ | ProxyRetrieveResponse.MobileProxyConfig
+ | ProxyRetrieveResponse.CustomProxyConfig;
+
+ /**
+ * Readable name of the proxy.
+ */
+ name?: string;
+}
+
+export namespace ProxyRetrieveResponse {
+ /**
+ * Configuration for a datacenter proxy.
+ */
+ export interface DatacenterProxyConfig {
+ /**
+ * ISO 3166 country code or EU for the proxy exit node.
+ */
+ country: string;
+ }
+
+ /**
+ * Configuration for an ISP proxy.
+ */
+ export interface IspProxyConfig {
+ /**
+ * ISO 3166 country code or EU for the proxy exit node.
+ */
+ country: string;
+ }
+
+ /**
+ * Configuration for residential proxies.
+ */
+ export interface ResidentialProxyConfig {
+ /**
+ * Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html
+ */
+ asn?: string;
+
+ /**
+ * City name (no spaces, e.g. `sanfrancisco`). If provided, `country` must also be
+ * provided.
+ */
+ city?: string;
+
+ /**
+ * ISO 3166 country code or EU for the proxy exit node. Required if `city` is
+ * provided.
+ */
+ country?: string;
+
+ /**
+ * Operating system of the residential device.
+ */
+ os?: 'windows' | 'macos' | 'android';
+
+ /**
+ * Two-letter state code.
+ */
+ state?: string;
+
+ /**
+ * US ZIP code.
+ */
+ zip?: string;
+ }
+
+ /**
+ * Configuration for mobile proxies.
+ */
+ export interface MobileProxyConfig {
+ /**
+ * Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html
+ */
+ asn?: string;
+
+ /**
+ * Mobile carrier.
+ */
+ carrier?:
+ | 'a1'
+ | 'aircel'
+ | 'airtel'
+ | 'att'
+ | 'celcom'
+ | 'chinamobile'
+ | 'claro'
+ | 'comcast'
+ | 'cox'
+ | 'digi'
+ | 'dt'
+ | 'docomo'
+ | 'dtac'
+ | 'etisalat'
+ | 'idea'
+ | 'kyivstar'
+ | 'meo'
+ | 'megafon'
+ | 'mtn'
+ | 'mtnza'
+ | 'mts'
+ | 'optus'
+ | 'orange'
+ | 'qwest'
+ | 'reliance_jio'
+ | 'robi'
+ | 'sprint'
+ | 'telefonica'
+ | 'telstra'
+ | 'tmobile'
+ | 'tigo'
+ | 'tim'
+ | 'verizon'
+ | 'vimpelcom'
+ | 'vodacomza'
+ | 'vodafone'
+ | 'vivo'
+ | 'zain'
+ | 'vivabo'
+ | 'telenormyanmar'
+ | 'kcelljsc'
+ | 'swisscom'
+ | 'singtel'
+ | 'asiacell'
+ | 'windit'
+ | 'cellc'
+ | 'ooredoo'
+ | 'drei'
+ | 'umobile'
+ | 'cableone'
+ | 'proximus'
+ | 'tele2'
+ | 'mobitel'
+ | 'o2'
+ | 'bouygues'
+ | 'free'
+ | 'sfr'
+ | 'digicel';
+
+ /**
+ * City name (no spaces, e.g. `sanfrancisco`). If provided, `country` must also be
+ * provided.
+ */
+ city?: string;
+
+ /**
+ * ISO 3166 country code or EU for the proxy exit node. Required if `city` is
+ * provided.
+ */
+ country?: string;
+
+ /**
+ * Two-letter state code.
+ */
+ state?: string;
+
+ /**
+ * US ZIP code.
+ */
+ zip?: string;
+ }
+
+ /**
+ * Configuration for a custom proxy (e.g., private proxy server).
+ */
+ export interface CustomProxyConfig {
+ /**
+ * Proxy host address or IP.
+ */
+ host: string;
+
+ /**
+ * Proxy port.
+ */
+ port: number;
+
+ /**
+ * Whether the proxy has a password.
+ */
+ has_password?: boolean;
+
+ /**
+ * Username for proxy authentication.
+ */
+ username?: string;
+ }
+}
+
+export type ProxyListResponse = Array;
+
+export namespace ProxyListResponse {
+ /**
+ * Configuration for routing traffic through a proxy.
+ */
+ export interface ProxyListResponseItem {
+ /**
+ * Proxy type to use. In terms of quality for avoiding bot-detection, from best to
+ * worst: `mobile` > `residential` > `isp` > `datacenter`.
+ */
+ type: 'datacenter' | 'isp' | 'residential' | 'mobile' | 'custom';
+
+ id?: string;
+
+ /**
+ * Configuration specific to the selected proxy `type`.
+ */
+ config?:
+ | ProxyListResponseItem.DatacenterProxyConfig
+ | ProxyListResponseItem.IspProxyConfig
+ | ProxyListResponseItem.ResidentialProxyConfig
+ | ProxyListResponseItem.MobileProxyConfig
+ | ProxyListResponseItem.CustomProxyConfig;
+
+ /**
+ * Readable name of the proxy.
+ */
+ name?: string;
+ }
+
+ export namespace ProxyListResponseItem {
+ /**
+ * Configuration for a datacenter proxy.
+ */
+ export interface DatacenterProxyConfig {
+ /**
+ * ISO 3166 country code or EU for the proxy exit node.
+ */
+ country: string;
+ }
+
+ /**
+ * Configuration for an ISP proxy.
+ */
+ export interface IspProxyConfig {
+ /**
+ * ISO 3166 country code or EU for the proxy exit node.
+ */
+ country: string;
+ }
+
+ /**
+ * Configuration for residential proxies.
+ */
+ export interface ResidentialProxyConfig {
+ /**
+ * Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html
+ */
+ asn?: string;
+
+ /**
+ * City name (no spaces, e.g. `sanfrancisco`). If provided, `country` must also be
+ * provided.
+ */
+ city?: string;
+
+ /**
+ * ISO 3166 country code or EU for the proxy exit node. Required if `city` is
+ * provided.
+ */
+ country?: string;
+
+ /**
+ * Operating system of the residential device.
+ */
+ os?: 'windows' | 'macos' | 'android';
+
+ /**
+ * Two-letter state code.
+ */
+ state?: string;
+
+ /**
+ * US ZIP code.
+ */
+ zip?: string;
+ }
+
+ /**
+ * Configuration for mobile proxies.
+ */
+ export interface MobileProxyConfig {
+ /**
+ * Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html
+ */
+ asn?: string;
+
+ /**
+ * Mobile carrier.
+ */
+ carrier?:
+ | 'a1'
+ | 'aircel'
+ | 'airtel'
+ | 'att'
+ | 'celcom'
+ | 'chinamobile'
+ | 'claro'
+ | 'comcast'
+ | 'cox'
+ | 'digi'
+ | 'dt'
+ | 'docomo'
+ | 'dtac'
+ | 'etisalat'
+ | 'idea'
+ | 'kyivstar'
+ | 'meo'
+ | 'megafon'
+ | 'mtn'
+ | 'mtnza'
+ | 'mts'
+ | 'optus'
+ | 'orange'
+ | 'qwest'
+ | 'reliance_jio'
+ | 'robi'
+ | 'sprint'
+ | 'telefonica'
+ | 'telstra'
+ | 'tmobile'
+ | 'tigo'
+ | 'tim'
+ | 'verizon'
+ | 'vimpelcom'
+ | 'vodacomza'
+ | 'vodafone'
+ | 'vivo'
+ | 'zain'
+ | 'vivabo'
+ | 'telenormyanmar'
+ | 'kcelljsc'
+ | 'swisscom'
+ | 'singtel'
+ | 'asiacell'
+ | 'windit'
+ | 'cellc'
+ | 'ooredoo'
+ | 'drei'
+ | 'umobile'
+ | 'cableone'
+ | 'proximus'
+ | 'tele2'
+ | 'mobitel'
+ | 'o2'
+ | 'bouygues'
+ | 'free'
+ | 'sfr'
+ | 'digicel';
+
+ /**
+ * City name (no spaces, e.g. `sanfrancisco`). If provided, `country` must also be
+ * provided.
+ */
+ city?: string;
+
+ /**
+ * ISO 3166 country code or EU for the proxy exit node. Required if `city` is
+ * provided.
+ */
+ country?: string;
+
+ /**
+ * Two-letter state code.
+ */
+ state?: string;
+
+ /**
+ * US ZIP code.
+ */
+ zip?: string;
+ }
+
+ /**
+ * Configuration for a custom proxy (e.g., private proxy server).
+ */
+ export interface CustomProxyConfig {
+ /**
+ * Proxy host address or IP.
+ */
+ host: string;
+
+ /**
+ * Proxy port.
+ */
+ port: number;
+
+ /**
+ * Whether the proxy has a password.
+ */
+ has_password?: boolean;
+
+ /**
+ * Username for proxy authentication.
+ */
+ username?: string;
+ }
+ }
+}
+
+export interface ProxyCreateParams {
+ /**
+ * Proxy type to use. In terms of quality for avoiding bot-detection, from best to
+ * worst: `mobile` > `residential` > `isp` > `datacenter`.
+ */
+ type: 'datacenter' | 'isp' | 'residential' | 'mobile' | 'custom';
+
+ /**
+ * Configuration specific to the selected proxy `type`.
+ */
+ config?:
+ | ProxyCreateParams.DatacenterProxyConfig
+ | ProxyCreateParams.IspProxyConfig
+ | ProxyCreateParams.ResidentialProxyConfig
+ | ProxyCreateParams.MobileProxyConfig
+ | ProxyCreateParams.CreateCustomProxyConfig;
+
+ /**
+ * Readable name of the proxy.
+ */
+ name?: string;
+}
+
+export namespace ProxyCreateParams {
+ /**
+ * Configuration for a datacenter proxy.
+ */
+ export interface DatacenterProxyConfig {
+ /**
+ * ISO 3166 country code or EU for the proxy exit node.
+ */
+ country: string;
+ }
+
+ /**
+ * Configuration for an ISP proxy.
+ */
+ export interface IspProxyConfig {
+ /**
+ * ISO 3166 country code or EU for the proxy exit node.
+ */
+ country: string;
+ }
+
+ /**
+ * Configuration for residential proxies.
+ */
+ export interface ResidentialProxyConfig {
+ /**
+ * Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html
+ */
+ asn?: string;
+
+ /**
+ * City name (no spaces, e.g. `sanfrancisco`). If provided, `country` must also be
+ * provided.
+ */
+ city?: string;
+
+ /**
+ * ISO 3166 country code or EU for the proxy exit node. Required if `city` is
+ * provided.
+ */
+ country?: string;
+
+ /**
+ * Operating system of the residential device.
+ */
+ os?: 'windows' | 'macos' | 'android';
+
+ /**
+ * Two-letter state code.
+ */
+ state?: string;
+
+ /**
+ * US ZIP code.
+ */
+ zip?: string;
+ }
+
+ /**
+ * Configuration for mobile proxies.
+ */
+ export interface MobileProxyConfig {
+ /**
+ * Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html
+ */
+ asn?: string;
+
+ /**
+ * Mobile carrier.
+ */
+ carrier?:
+ | 'a1'
+ | 'aircel'
+ | 'airtel'
+ | 'att'
+ | 'celcom'
+ | 'chinamobile'
+ | 'claro'
+ | 'comcast'
+ | 'cox'
+ | 'digi'
+ | 'dt'
+ | 'docomo'
+ | 'dtac'
+ | 'etisalat'
+ | 'idea'
+ | 'kyivstar'
+ | 'meo'
+ | 'megafon'
+ | 'mtn'
+ | 'mtnza'
+ | 'mts'
+ | 'optus'
+ | 'orange'
+ | 'qwest'
+ | 'reliance_jio'
+ | 'robi'
+ | 'sprint'
+ | 'telefonica'
+ | 'telstra'
+ | 'tmobile'
+ | 'tigo'
+ | 'tim'
+ | 'verizon'
+ | 'vimpelcom'
+ | 'vodacomza'
+ | 'vodafone'
+ | 'vivo'
+ | 'zain'
+ | 'vivabo'
+ | 'telenormyanmar'
+ | 'kcelljsc'
+ | 'swisscom'
+ | 'singtel'
+ | 'asiacell'
+ | 'windit'
+ | 'cellc'
+ | 'ooredoo'
+ | 'drei'
+ | 'umobile'
+ | 'cableone'
+ | 'proximus'
+ | 'tele2'
+ | 'mobitel'
+ | 'o2'
+ | 'bouygues'
+ | 'free'
+ | 'sfr'
+ | 'digicel';
+
+ /**
+ * City name (no spaces, e.g. `sanfrancisco`). If provided, `country` must also be
+ * provided.
+ */
+ city?: string;
+
+ /**
+ * ISO 3166 country code or EU for the proxy exit node. Required if `city` is
+ * provided.
+ */
+ country?: string;
+
+ /**
+ * Two-letter state code.
+ */
+ state?: string;
+
+ /**
+ * US ZIP code.
+ */
+ zip?: string;
+ }
+
+ /**
+ * Configuration for a custom proxy (e.g., private proxy server).
+ */
+ export interface CreateCustomProxyConfig {
+ /**
+ * Proxy host address or IP.
+ */
+ host: string;
+
+ /**
+ * Proxy port.
+ */
+ port: number;
+
+ /**
+ * Password for proxy authentication.
+ */
+ password?: string;
+
+ /**
+ * Username for proxy authentication.
+ */
+ username?: string;
+ }
+}
+
+export declare namespace Proxies {
+ export {
+ type ProxyCreateResponse as ProxyCreateResponse,
+ type ProxyRetrieveResponse as ProxyRetrieveResponse,
+ type ProxyListResponse as ProxyListResponse,
+ type ProxyCreateParams as ProxyCreateParams,
+ };
+}
diff --git a/src/version.ts b/src/version.ts
index 945825f..b818b4c 100644
--- a/src/version.ts
+++ b/src/version.ts
@@ -1 +1 @@
-export const VERSION = '0.11.1'; // x-release-please-version
+export const VERSION = '0.11.2'; // x-release-please-version
diff --git a/tests/api-resources/browsers/browsers.test.ts b/tests/api-resources/browsers/browsers.test.ts
index 5d360af..3434e72 100644
--- a/tests/api-resources/browsers/browsers.test.ts
+++ b/tests/api-resources/browsers/browsers.test.ts
@@ -30,8 +30,9 @@ describe('resource browsers', () => {
invocation_id: 'rr33xuugxj9h0bkf1rdt2bet',
persistence: { id: 'my-awesome-browser-for-user-1234' },
profile: { id: 'id', name: 'name', save_changes: true },
+ proxy_id: 'proxy_id',
stealth: true,
- timeout_seconds: 0,
+ timeout_seconds: 10,
},
{ path: '/_stainless_unknown_path' },
),
diff --git a/tests/api-resources/proxies.test.ts b/tests/api-resources/proxies.test.ts
new file mode 100644
index 0000000..97087a2
--- /dev/null
+++ b/tests/api-resources/proxies.test.ts
@@ -0,0 +1,67 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import Kernel from '@onkernel/sdk';
+
+const client = new Kernel({
+ apiKey: 'My API Key',
+ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
+});
+
+describe('resource proxies', () => {
+ // Prism tests are disabled
+ test.skip('create: only required params', async () => {
+ const responsePromise = client.proxies.create({ type: 'datacenter' });
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('create: required and optional params', async () => {
+ const response = await client.proxies.create({
+ type: 'datacenter',
+ config: { country: 'US' },
+ name: 'name',
+ });
+ });
+
+ // Prism tests are disabled
+ test.skip('retrieve', async () => {
+ const responsePromise = client.proxies.retrieve('id');
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('list', async () => {
+ const responsePromise = client.proxies.list();
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+
+ // Prism tests are disabled
+ test.skip('delete', async () => {
+ const responsePromise = client.proxies.delete('id');
+ const rawResponse = await responsePromise.asResponse();
+ expect(rawResponse).toBeInstanceOf(Response);
+ const response = await responsePromise;
+ expect(response).not.toBeInstanceOf(Response);
+ const dataAndResponse = await responsePromise.withResponse();
+ expect(dataAndResponse.data).toBe(response);
+ expect(dataAndResponse.response).toBe(rawResponse);
+ });
+});