@onkernel/sdk 0.11.1 → 0.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/client.d.mts +5 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +5 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/browsers/browsers.d.mts +9 -1
  12. package/resources/browsers/browsers.d.mts.map +1 -1
  13. package/resources/browsers/browsers.d.ts +9 -1
  14. package/resources/browsers/browsers.d.ts.map +1 -1
  15. package/resources/browsers/browsers.js.map +1 -1
  16. package/resources/browsers/browsers.mjs.map +1 -1
  17. package/resources/index.d.mts +2 -1
  18. package/resources/index.d.mts.map +1 -1
  19. package/resources/index.d.ts +2 -1
  20. package/resources/index.d.ts.map +1 -1
  21. package/resources/index.js +3 -1
  22. package/resources/index.js.map +1 -1
  23. package/resources/index.mjs +1 -0
  24. package/resources/index.mjs.map +1 -1
  25. package/resources/invocations.d.mts +10 -3
  26. package/resources/invocations.d.mts.map +1 -1
  27. package/resources/invocations.d.ts +10 -3
  28. package/resources/invocations.d.ts.map +1 -1
  29. package/resources/invocations.js +4 -2
  30. package/resources/invocations.js.map +1 -1
  31. package/resources/invocations.mjs +4 -2
  32. package/resources/invocations.mjs.map +1 -1
  33. package/resources/proxies.d.mts +512 -0
  34. package/resources/proxies.d.mts.map +1 -0
  35. package/resources/proxies.d.ts +512 -0
  36. package/resources/proxies.d.ts.map +1 -0
  37. package/resources/proxies.js +38 -0
  38. package/resources/proxies.js.map +1 -0
  39. package/resources/proxies.mjs +34 -0
  40. package/resources/proxies.mjs.map +1 -0
  41. package/src/client.ts +19 -0
  42. package/src/resources/browsers/browsers.ts +10 -1
  43. package/src/resources/index.ts +8 -0
  44. package/src/resources/invocations.ts +16 -2
  45. package/src/resources/proxies.ts +876 -0
  46. package/src/version.ts +1 -1
  47. package/version.d.mts +1 -1
  48. package/version.d.ts +1 -1
  49. package/version.js +1 -1
  50. package/version.mjs +1 -1
@@ -348,6 +348,12 @@ export interface BrowserCreateParams {
348
348
  */
349
349
  profile?: BrowserCreateParams.Profile;
350
350
 
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
+
351
357
  /**
352
358
  * If true, launches the browser in stealth mode to reduce detection by anti-bot
353
359
  * mechanisms.
@@ -357,7 +363,10 @@ export interface BrowserCreateParams {
357
363
  /**
358
364
  * The number of seconds of inactivity before the browser session is terminated.
359
365
  * 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.
361
370
  */
362
371
  timeout_seconds?: number;
363
372
  }
@@ -33,5 +33,13 @@ export {
33
33
  type InvocationFollowResponse,
34
34
  type InvocationCreateParams,
35
35
  type InvocationUpdateParams,
36
+ type InvocationFollowParams,
36
37
  } from './invocations';
37
38
  export { Profiles, type ProfileListResponse, type ProfileCreateParams } from './profiles';
39
+ export {
40
+ Proxies,
41
+ type ProxyCreateResponse,
42
+ type ProxyRetrieveResponse,
43
+ type ProxyListResponse,
44
+ type ProxyCreateParams,
45
+ } from './proxies';
@@ -40,7 +40,8 @@ export class Invocations extends APIResource {
40
40
  }
41
41
 
42
42
  /**
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".
44
45
  *
45
46
  * @example
46
47
  * ```ts
@@ -82,8 +83,13 @@ export class Invocations extends APIResource {
82
83
  * const response = await client.invocations.follow('id');
83
84
  * ```
84
85
  */
85
- follow(id: string, options?: RequestOptions): APIPromise<Stream<InvocationFollowResponse>> {
86
+ follow(
87
+ id: string,
88
+ query: InvocationFollowParams | undefined = {},
89
+ options?: RequestOptions,
90
+ ): APIPromise<Stream<InvocationFollowResponse>> {
86
91
  return this._client.get(path`/invocations/${id}/events`, {
92
+ query,
87
93
  ...options,
88
94
  headers: buildHeaders([{ Accept: 'text/event-stream' }, options?.headers]),
89
95
  stream: true,
@@ -334,6 +340,13 @@ export interface InvocationUpdateParams {
334
340
  output?: string;
335
341
  }
336
342
 
343
+ export interface InvocationFollowParams {
344
+ /**
345
+ * Show logs since the given time (RFC timestamps or durations like 5m).
346
+ */
347
+ since?: string;
348
+ }
349
+
337
350
  export declare namespace Invocations {
338
351
  export {
339
352
  type InvocationStateEvent as InvocationStateEvent,
@@ -343,5 +356,6 @@ export declare namespace Invocations {
343
356
  type InvocationFollowResponse as InvocationFollowResponse,
344
357
  type InvocationCreateParams as InvocationCreateParams,
345
358
  type InvocationUpdateParams as InvocationUpdateParams,
359
+ type InvocationFollowParams as InvocationFollowParams,
346
360
  };
347
361
  }