Skip to content

Commit 63436fa

Browse files
feat: Add stainless CI
1 parent b902d04 commit 63436fa

File tree

9 files changed

+1000
-7
lines changed

9 files changed

+1000
-7
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: 46
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-cb38560915edce03abce2ae3ef5bc745489dbe9b6f80c2b4ff42edf8c2ff276d.yml
3-
openapi_spec_hash: a869194d6c864ba28d79ec0105439c3e
4-
config_hash: ed56f95781ec9b2e73c97e1a66606071
1+
configured_endpoints: 50
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-d3a597bbbb25c131e2c06eb9b47d70932d14a97a6f916677a195a128e196f4db.yml
3+
openapi_spec_hash: c967b384624017eed0abff1b53a74530
4+
config_hash: 0d150b61cae2dc57d3648ceae7784966

api.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,18 @@ Methods:
160160
- <code title="get /profiles">client.profiles.<a href="./src/resources/profiles.ts">list</a>() -> ProfileListResponse</code>
161161
- <code title="delete /profiles/{id_or_name}">client.profiles.<a href="./src/resources/profiles.ts">delete</a>(idOrName) -> void</code>
162162
- <code title="get /profiles/{id_or_name}/download">client.profiles.<a href="./src/resources/profiles.ts">download</a>(idOrName) -> Response</code>
163+
164+
# Proxies
165+
166+
Types:
167+
168+
- <code><a href="./src/resources/proxies.ts">ProxyCreateResponse</a></code>
169+
- <code><a href="./src/resources/proxies.ts">ProxyRetrieveResponse</a></code>
170+
- <code><a href="./src/resources/proxies.ts">ProxyListResponse</a></code>
171+
172+
Methods:
173+
174+
- <code title="post /proxies">client.proxies.<a href="./src/resources/proxies.ts">create</a>({ ...params }) -> ProxyCreateResponse</code>
175+
- <code title="get /proxies/{id}">client.proxies.<a href="./src/resources/proxies.ts">retrieve</a>(id) -> ProxyRetrieveResponse</code>
176+
- <code title="get /proxies">client.proxies.<a href="./src/resources/proxies.ts">list</a>() -> ProxyListResponse</code>
177+
- <code title="delete /proxies/{id}">client.proxies.<a href="./src/resources/proxies.ts">delete</a>(id) -> void</code>

src/client.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ import {
4343
Invocations,
4444
} from './resources/invocations';
4545
import { ProfileCreateParams, ProfileListResponse, Profiles } from './resources/profiles';
46+
import {
47+
Proxies,
48+
ProxyCreateParams,
49+
ProxyCreateResponse,
50+
ProxyListResponse,
51+
ProxyRetrieveResponse,
52+
} from './resources/proxies';
4653
import {
4754
BrowserCreateParams,
4855
BrowserCreateResponse,
@@ -820,13 +827,15 @@ export class Kernel {
820827
invocations: API.Invocations = new API.Invocations(this);
821828
browsers: API.Browsers = new API.Browsers(this);
822829
profiles: API.Profiles = new API.Profiles(this);
830+
proxies: API.Proxies = new API.Proxies(this);
823831
}
824832

825833
Kernel.Deployments = Deployments;
826834
Kernel.Apps = Apps;
827835
Kernel.Invocations = Invocations;
828836
Kernel.Browsers = Browsers;
829837
Kernel.Profiles = Profiles;
838+
Kernel.Proxies = Proxies;
830839

831840
export declare namespace Kernel {
832841
export type RequestOptions = Opts.RequestOptions;
@@ -880,6 +889,14 @@ export declare namespace Kernel {
880889
type ProfileCreateParams as ProfileCreateParams,
881890
};
882891

892+
export {
893+
Proxies as Proxies,
894+
type ProxyCreateResponse as ProxyCreateResponse,
895+
type ProxyRetrieveResponse as ProxyRetrieveResponse,
896+
type ProxyListResponse as ProxyListResponse,
897+
type ProxyCreateParams as ProxyCreateParams,
898+
};
899+
883900
export type AppAction = API.AppAction;
884901
export type ErrorDetail = API.ErrorDetail;
885902
export type ErrorEvent = API.ErrorEvent;

src/resources/browsers/browsers.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,12 @@ export interface BrowserCreateParams {
348348
*/
349349
profile?: BrowserCreateParams.Profile;
350350

351+
/**
352+
* Optional proxy to associate to the browser session. Must reference a proxy
353+
* belonging to the caller's org.
354+
*/
355+
proxy_id?: string;
356+
351357
/**
352358
* If true, launches the browser in stealth mode to reduce detection by anti-bot
353359
* mechanisms.
@@ -357,7 +363,10 @@ export interface BrowserCreateParams {
357363
/**
358364
* The number of seconds of inactivity before the browser session is terminated.
359365
* Only applicable to non-persistent browsers. Activity includes CDP connections
360-
* and live view connections. Defaults to 60 seconds.
366+
* and live view connections. Defaults to 60 seconds. Minimum allowed is 10
367+
* seconds. Maximum allowed is 86400 (24 hours). We check for inactivity every 5
368+
* seconds, so the actual timeout behavior you will see is +/- 5 seconds around the
369+
* specified value.
361370
*/
362371
timeout_seconds?: number;
363372
}

src/resources/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,10 @@ export {
3535
type InvocationUpdateParams,
3636
} from './invocations';
3737
export { Profiles, type ProfileListResponse, type ProfileCreateParams } from './profiles';
38+
export {
39+
Proxies,
40+
type ProxyCreateResponse,
41+
type ProxyRetrieveResponse,
42+
type ProxyListResponse,
43+
type ProxyCreateParams,
44+
} from './proxies';

src/resources/invocations.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ export class Invocations extends APIResource {
4040
}
4141

4242
/**
43-
* Update an invocation's status or output.
43+
* Update an invocation's status or output. This can used to cancel an invocation
44+
* by setting the status to "failed".
4445
*
4546
* @example
4647
* ```ts

0 commit comments

Comments
 (0)