@onkernel/sdk 0.28.0 → 0.30.0

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 (48) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -2
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -2
  9. package/client.mjs.map +1 -1
  10. package/internal/parse.d.mts.map +1 -1
  11. package/internal/parse.d.ts.map +1 -1
  12. package/internal/parse.js +5 -0
  13. package/internal/parse.js.map +1 -1
  14. package/internal/parse.mjs +5 -0
  15. package/internal/parse.mjs.map +1 -1
  16. package/package.json +1 -1
  17. package/resources/browser-pools.d.mts +8 -8
  18. package/resources/browser-pools.d.ts +8 -8
  19. package/resources/browsers/browsers.d.mts +10 -10
  20. package/resources/browsers/browsers.d.ts +10 -10
  21. package/resources/index.d.mts +1 -1
  22. package/resources/index.d.mts.map +1 -1
  23. package/resources/index.d.ts +1 -1
  24. package/resources/index.d.ts.map +1 -1
  25. package/resources/index.js.map +1 -1
  26. package/resources/index.mjs.map +1 -1
  27. package/resources/invocations.d.mts +81 -1
  28. package/resources/invocations.d.mts.map +1 -1
  29. package/resources/invocations.d.ts +81 -1
  30. package/resources/invocations.d.ts.map +1 -1
  31. package/resources/invocations.js +13 -0
  32. package/resources/invocations.js.map +1 -1
  33. package/resources/invocations.mjs +13 -0
  34. package/resources/invocations.mjs.map +1 -1
  35. package/resources/shared.d.mts +2 -2
  36. package/resources/shared.d.ts +2 -2
  37. package/src/client.ts +5 -2
  38. package/src/internal/parse.ts +6 -0
  39. package/src/resources/browser-pools.ts +8 -8
  40. package/src/resources/browsers/browsers.ts +10 -10
  41. package/src/resources/index.ts +1 -0
  42. package/src/resources/invocations.ts +98 -0
  43. package/src/resources/shared.ts +2 -2
  44. package/src/version.ts +1 -1
  45. package/version.d.mts +1 -1
  46. package/version.d.ts +1 -1
  47. package/version.js +1 -1
  48. package/version.mjs +1 -1
@@ -316,8 +316,8 @@ export interface BrowserCreateResponse {
316
316
  * image defaults apply (1920x1080@25). Only specific viewport configurations are
317
317
  * supported. The server will reject unsupported combinations. Supported
318
318
  * resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
319
- * 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will be
320
- * automatically determined from the width and height if they match a supported
319
+ * 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
320
+ * be automatically determined from the width and height if they match a supported
321
321
  * configuration exactly. Note: Higher resolutions may affect the responsiveness of
322
322
  * live view browser
323
323
  */
@@ -392,8 +392,8 @@ export interface BrowserRetrieveResponse {
392
392
  * image defaults apply (1920x1080@25). Only specific viewport configurations are
393
393
  * supported. The server will reject unsupported combinations. Supported
394
394
  * resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
395
- * 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will be
396
- * automatically determined from the width and height if they match a supported
395
+ * 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
396
+ * be automatically determined from the width and height if they match a supported
397
397
  * configuration exactly. Note: Higher resolutions may affect the responsiveness of
398
398
  * live view browser
399
399
  */
@@ -468,8 +468,8 @@ export interface BrowserUpdateResponse {
468
468
  * image defaults apply (1920x1080@25). Only specific viewport configurations are
469
469
  * supported. The server will reject unsupported combinations. Supported
470
470
  * resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
471
- * 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will be
472
- * automatically determined from the width and height if they match a supported
471
+ * 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
472
+ * be automatically determined from the width and height if they match a supported
473
473
  * configuration exactly. Note: Higher resolutions may affect the responsiveness of
474
474
  * live view browser
475
475
  */
@@ -544,8 +544,8 @@ export interface BrowserListResponse {
544
544
  * image defaults apply (1920x1080@25). Only specific viewport configurations are
545
545
  * supported. The server will reject unsupported combinations. Supported
546
546
  * resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
547
- * 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will be
548
- * automatically determined from the width and height if they match a supported
547
+ * 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
548
+ * be automatically determined from the width and height if they match a supported
549
549
  * configuration exactly. Note: Higher resolutions may affect the responsiveness of
550
550
  * live view browser
551
551
  */
@@ -614,8 +614,8 @@ export interface BrowserCreateParams {
614
614
  * image defaults apply (1920x1080@25). Only specific viewport configurations are
615
615
  * supported. The server will reject unsupported combinations. Supported
616
616
  * resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
617
- * 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will be
618
- * automatically determined from the width and height if they match a supported
617
+ * 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
618
+ * be automatically determined from the width and height if they match a supported
619
619
  * configuration exactly. Note: Higher resolutions may affect the responsiveness of
620
620
  * live view browser
621
621
  */
@@ -83,6 +83,7 @@ export {
83
83
  type InvocationUpdateResponse,
84
84
  type InvocationListResponse,
85
85
  type InvocationFollowResponse,
86
+ type InvocationListBrowsersResponse,
86
87
  type InvocationCreateParams,
87
88
  type InvocationUpdateParams,
88
89
  type InvocationListParams,
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
4
  import * as Shared from './shared';
5
+ import * as BrowsersAPI from './browsers/browsers';
5
6
  import { APIPromise } from '../core/api-promise';
6
7
  import { OffsetPagination, type OffsetPaginationParams, PagePromise } from '../core/pagination';
7
8
  import { Stream } from '../core/streaming';
@@ -118,6 +119,20 @@ export class Invocations extends APIResource {
118
119
  stream: true,
119
120
  }) as APIPromise<Stream<InvocationFollowResponse>>;
120
121
  }
122
+
123
+ /**
124
+ * Returns all active browser sessions created within the specified invocation.
125
+ *
126
+ * @example
127
+ * ```ts
128
+ * const response = await client.invocations.listBrowsers(
129
+ * 'id',
130
+ * );
131
+ * ```
132
+ */
133
+ listBrowsers(id: string, options?: RequestOptions): APIPromise<InvocationListBrowsersResponse> {
134
+ return this._client.get(path`/invocations/${id}/browsers`, options);
135
+ }
121
136
  }
122
137
 
123
138
  export type InvocationListResponsesOffsetPagination = OffsetPagination<InvocationListResponse>;
@@ -394,6 +409,88 @@ export type InvocationFollowResponse =
394
409
  | Shared.ErrorEvent
395
410
  | Shared.HeartbeatEvent;
396
411
 
412
+ export interface InvocationListBrowsersResponse {
413
+ browsers: Array<InvocationListBrowsersResponse.Browser>;
414
+ }
415
+
416
+ export namespace InvocationListBrowsersResponse {
417
+ export interface Browser {
418
+ /**
419
+ * Websocket URL for Chrome DevTools Protocol connections to the browser session
420
+ */
421
+ cdp_ws_url: string;
422
+
423
+ /**
424
+ * When the browser session was created.
425
+ */
426
+ created_at: string;
427
+
428
+ /**
429
+ * Whether the browser session is running in headless mode.
430
+ */
431
+ headless: boolean;
432
+
433
+ /**
434
+ * Unique identifier for the browser session
435
+ */
436
+ session_id: string;
437
+
438
+ /**
439
+ * Whether the browser session is running in stealth mode.
440
+ */
441
+ stealth: boolean;
442
+
443
+ /**
444
+ * The number of seconds of inactivity before the browser session is terminated.
445
+ */
446
+ timeout_seconds: number;
447
+
448
+ /**
449
+ * Remote URL for live viewing the browser session. Only available for non-headless
450
+ * browsers.
451
+ */
452
+ browser_live_view_url?: string;
453
+
454
+ /**
455
+ * When the browser session was soft-deleted. Only present for deleted sessions.
456
+ */
457
+ deleted_at?: string;
458
+
459
+ /**
460
+ * Whether the browser session is running in kiosk mode.
461
+ */
462
+ kiosk_mode?: boolean;
463
+
464
+ /**
465
+ * @deprecated DEPRECATED: Use timeout_seconds (up to 72 hours) and Profiles
466
+ * instead.
467
+ */
468
+ persistence?: BrowsersAPI.BrowserPersistence;
469
+
470
+ /**
471
+ * Browser profile metadata.
472
+ */
473
+ profile?: BrowsersAPI.Profile;
474
+
475
+ /**
476
+ * ID of the proxy associated with this browser session, if any.
477
+ */
478
+ proxy_id?: string;
479
+
480
+ /**
481
+ * Initial browser window size in pixels with optional refresh rate. If omitted,
482
+ * image defaults apply (1920x1080@25). Only specific viewport configurations are
483
+ * supported. The server will reject unsupported combinations. Supported
484
+ * resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
485
+ * 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
486
+ * be automatically determined from the width and height if they match a supported
487
+ * configuration exactly. Note: Higher resolutions may affect the responsiveness of
488
+ * live view browser
489
+ */
490
+ viewport?: Shared.BrowserViewport;
491
+ }
492
+ }
493
+
397
494
  export interface InvocationCreateParams {
398
495
  /**
399
496
  * Name of the action to invoke
@@ -488,6 +585,7 @@ export declare namespace Invocations {
488
585
  type InvocationUpdateResponse as InvocationUpdateResponse,
489
586
  type InvocationListResponse as InvocationListResponse,
490
587
  type InvocationFollowResponse as InvocationFollowResponse,
588
+ type InvocationListBrowsersResponse as InvocationListBrowsersResponse,
491
589
  type InvocationListResponsesOffsetPagination as InvocationListResponsesOffsetPagination,
492
590
  type InvocationCreateParams as InvocationCreateParams,
493
591
  type InvocationUpdateParams as InvocationUpdateParams,
@@ -56,8 +56,8 @@ export interface BrowserProfile {
56
56
  * image defaults apply (1920x1080@25). Only specific viewport configurations are
57
57
  * supported. The server will reject unsupported combinations. Supported
58
58
  * resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
59
- * 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will be
60
- * automatically determined from the width and height if they match a supported
59
+ * 1280x800@60, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
60
+ * be automatically determined from the width and height if they match a supported
61
61
  * configuration exactly. Note: Higher resolutions may affect the responsiveness of
62
62
  * live view browser
63
63
  */
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.28.0'; // x-release-please-version
1
+ export const VERSION = '0.30.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.28.0";
1
+ export declare const VERSION = "0.30.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.28.0";
1
+ export declare const VERSION = "0.30.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.28.0'; // x-release-please-version
4
+ exports.VERSION = '0.30.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.28.0'; // x-release-please-version
1
+ export const VERSION = '0.30.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map