@onkernel/sdk 0.20.0 → 0.21.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 (46) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/client.d.mts +7 -1
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +7 -1
  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/browser-pools.d.mts +438 -0
  12. package/resources/browser-pools.d.mts.map +1 -0
  13. package/resources/browser-pools.d.ts +438 -0
  14. package/resources/browser-pools.d.ts.map +1 -0
  15. package/resources/browser-pools.js +125 -0
  16. package/resources/browser-pools.js.map +1 -0
  17. package/resources/browser-pools.mjs +121 -0
  18. package/resources/browser-pools.mjs.map +1 -0
  19. package/resources/browsers/browsers.d.mts +7 -150
  20. package/resources/browsers/browsers.d.mts.map +1 -1
  21. package/resources/browsers/browsers.d.ts +7 -150
  22. package/resources/browsers/browsers.d.ts.map +1 -1
  23. package/resources/browsers/browsers.js.map +1 -1
  24. package/resources/browsers/browsers.mjs.map +1 -1
  25. package/resources/index.d.mts +1 -0
  26. package/resources/index.d.mts.map +1 -1
  27. package/resources/index.d.ts +1 -0
  28. package/resources/index.d.ts.map +1 -1
  29. package/resources/index.js +3 -1
  30. package/resources/index.js.map +1 -1
  31. package/resources/index.mjs +1 -0
  32. package/resources/index.mjs.map +1 -1
  33. package/resources/shared.d.mts +61 -0
  34. package/resources/shared.d.mts.map +1 -1
  35. package/resources/shared.d.ts +61 -0
  36. package/resources/shared.d.ts.map +1 -1
  37. package/src/client.ts +37 -1
  38. package/src/resources/browser-pools.ts +560 -0
  39. package/src/resources/browsers/browsers.ts +7 -167
  40. package/src/resources/index.ts +15 -0
  41. package/src/resources/shared.ts +69 -0
  42. package/src/version.ts +1 -1
  43. package/version.d.mts +1 -1
  44. package/version.d.ts +1 -1
  45. package/version.js +1 -1
  46. package/version.mjs +1 -1
@@ -1,6 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
+ import * as Shared from '../shared';
4
5
  import * as ComputerAPI from './computer';
5
6
  import {
6
7
  Computer,
@@ -302,37 +303,7 @@ export interface BrowserCreateResponse {
302
303
  * configuration exactly. Note: Higher resolutions may affect the responsiveness of
303
304
  * live view browser
304
305
  */
305
- viewport?: BrowserCreateResponse.Viewport;
306
- }
307
-
308
- export namespace BrowserCreateResponse {
309
- /**
310
- * Initial browser window size in pixels with optional refresh rate. If omitted,
311
- * image defaults apply (commonly 1024x768@60). Only specific viewport
312
- * configurations are supported. The server will reject unsupported combinations.
313
- * Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
314
- * 1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
315
- * be automatically determined from the width and height if they match a supported
316
- * configuration exactly. Note: Higher resolutions may affect the responsiveness of
317
- * live view browser
318
- */
319
- export interface Viewport {
320
- /**
321
- * Browser window height in pixels.
322
- */
323
- height: number;
324
-
325
- /**
326
- * Browser window width in pixels.
327
- */
328
- width: number;
329
-
330
- /**
331
- * Display refresh rate in Hz. If omitted, automatically determined from width and
332
- * height.
333
- */
334
- refresh_rate?: number;
335
- }
306
+ viewport?: Shared.BrowserViewport;
336
307
  }
337
308
 
338
309
  export interface BrowserRetrieveResponse {
@@ -407,37 +378,7 @@ export interface BrowserRetrieveResponse {
407
378
  * configuration exactly. Note: Higher resolutions may affect the responsiveness of
408
379
  * live view browser
409
380
  */
410
- viewport?: BrowserRetrieveResponse.Viewport;
411
- }
412
-
413
- export namespace BrowserRetrieveResponse {
414
- /**
415
- * Initial browser window size in pixels with optional refresh rate. If omitted,
416
- * image defaults apply (commonly 1024x768@60). Only specific viewport
417
- * configurations are supported. The server will reject unsupported combinations.
418
- * Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
419
- * 1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
420
- * be automatically determined from the width and height if they match a supported
421
- * configuration exactly. Note: Higher resolutions may affect the responsiveness of
422
- * live view browser
423
- */
424
- export interface Viewport {
425
- /**
426
- * Browser window height in pixels.
427
- */
428
- height: number;
429
-
430
- /**
431
- * Browser window width in pixels.
432
- */
433
- width: number;
434
-
435
- /**
436
- * Display refresh rate in Hz. If omitted, automatically determined from width and
437
- * height.
438
- */
439
- refresh_rate?: number;
440
- }
381
+ viewport?: Shared.BrowserViewport;
441
382
  }
442
383
 
443
384
  export interface BrowserListResponse {
@@ -512,44 +453,14 @@ export interface BrowserListResponse {
512
453
  * configuration exactly. Note: Higher resolutions may affect the responsiveness of
513
454
  * live view browser
514
455
  */
515
- viewport?: BrowserListResponse.Viewport;
516
- }
517
-
518
- export namespace BrowserListResponse {
519
- /**
520
- * Initial browser window size in pixels with optional refresh rate. If omitted,
521
- * image defaults apply (commonly 1024x768@60). Only specific viewport
522
- * configurations are supported. The server will reject unsupported combinations.
523
- * Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
524
- * 1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
525
- * be automatically determined from the width and height if they match a supported
526
- * configuration exactly. Note: Higher resolutions may affect the responsiveness of
527
- * live view browser
528
- */
529
- export interface Viewport {
530
- /**
531
- * Browser window height in pixels.
532
- */
533
- height: number;
534
-
535
- /**
536
- * Browser window width in pixels.
537
- */
538
- width: number;
539
-
540
- /**
541
- * Display refresh rate in Hz. If omitted, automatically determined from width and
542
- * height.
543
- */
544
- refresh_rate?: number;
545
- }
456
+ viewport?: Shared.BrowserViewport;
546
457
  }
547
458
 
548
459
  export interface BrowserCreateParams {
549
460
  /**
550
461
  * List of browser extensions to load into the session. Provide each by id or name.
551
462
  */
552
- extensions?: Array<BrowserCreateParams.Extension>;
463
+ extensions?: Array<Shared.BrowserExtension>;
553
464
 
554
465
  /**
555
466
  * If true, launches the browser using a headless image (no VNC/GUI). Defaults to
@@ -578,7 +489,7 @@ export interface BrowserCreateParams {
578
489
  * specified, the matching profile will be loaded into the browser session.
579
490
  * Profiles must be created beforehand.
580
491
  */
581
- profile?: BrowserCreateParams.Profile;
492
+ profile?: Shared.BrowserProfile;
582
493
 
583
494
  /**
584
495
  * Optional proxy to associate to the browser session. Must reference a proxy
@@ -612,78 +523,7 @@ export interface BrowserCreateParams {
612
523
  * configuration exactly. Note: Higher resolutions may affect the responsiveness of
613
524
  * live view browser
614
525
  */
615
- viewport?: BrowserCreateParams.Viewport;
616
- }
617
-
618
- export namespace BrowserCreateParams {
619
- /**
620
- * Extension selection for the browser session. Provide either id or name of an
621
- * extension uploaded to Kernel.
622
- */
623
- export interface Extension {
624
- /**
625
- * Extension ID to load for this browser session
626
- */
627
- id?: string;
628
-
629
- /**
630
- * Extension name to load for this browser session (instead of id). Must be 1-255
631
- * characters, using letters, numbers, dots, underscores, or hyphens.
632
- */
633
- name?: string;
634
- }
635
-
636
- /**
637
- * Profile selection for the browser session. Provide either id or name. If
638
- * specified, the matching profile will be loaded into the browser session.
639
- * Profiles must be created beforehand.
640
- */
641
- export interface Profile {
642
- /**
643
- * Profile ID to load for this browser session
644
- */
645
- id?: string;
646
-
647
- /**
648
- * Profile name to load for this browser session (instead of id). Must be 1-255
649
- * characters, using letters, numbers, dots, underscores, or hyphens.
650
- */
651
- name?: string;
652
-
653
- /**
654
- * If true, save changes made during the session back to the profile when the
655
- * session ends.
656
- */
657
- save_changes?: boolean;
658
- }
659
-
660
- /**
661
- * Initial browser window size in pixels with optional refresh rate. If omitted,
662
- * image defaults apply (commonly 1024x768@60). Only specific viewport
663
- * configurations are supported. The server will reject unsupported combinations.
664
- * Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
665
- * 1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
666
- * be automatically determined from the width and height if they match a supported
667
- * configuration exactly. Note: Higher resolutions may affect the responsiveness of
668
- * live view browser
669
- */
670
- export interface Viewport {
671
- /**
672
- * Browser window height in pixels.
673
- */
674
- height: number;
675
-
676
- /**
677
- * Browser window width in pixels.
678
- */
679
- width: number;
680
-
681
- /**
682
- * Display refresh rate in Hz. If omitted, automatically determined from width and
683
- * height.
684
- */
685
- refresh_rate?: number;
686
- }
526
+ viewport?: Shared.BrowserViewport;
687
527
  }
688
528
 
689
529
  export interface BrowserListParams extends OffsetPaginationParams {
@@ -7,6 +7,21 @@ export {
7
7
  type AppListParams,
8
8
  type AppListResponsesOffsetPagination,
9
9
  } from './apps';
10
+ export {
11
+ BrowserPools,
12
+ type BrowserPool,
13
+ type BrowserPoolAcquireRequest,
14
+ type BrowserPoolReleaseRequest,
15
+ type BrowserPoolRequest,
16
+ type BrowserPoolUpdateRequest,
17
+ type BrowserPoolListResponse,
18
+ type BrowserPoolAcquireResponse,
19
+ type BrowserPoolCreateParams,
20
+ type BrowserPoolUpdateParams,
21
+ type BrowserPoolDeleteParams,
22
+ type BrowserPoolAcquireParams,
23
+ type BrowserPoolReleaseParams,
24
+ } from './browser-pools';
10
25
  export {
11
26
  Browsers,
12
27
  type BrowserPersistence,
@@ -10,6 +10,75 @@ export interface AppAction {
10
10
  name: string;
11
11
  }
12
12
 
13
+ /**
14
+ * Extension selection for the browser session. Provide either id or name of an
15
+ * extension uploaded to Kernel.
16
+ */
17
+ export interface BrowserExtension {
18
+ /**
19
+ * Extension ID to load for this browser session
20
+ */
21
+ id?: string;
22
+
23
+ /**
24
+ * Extension name to load for this browser session (instead of id). Must be 1-255
25
+ * characters, using letters, numbers, dots, underscores, or hyphens.
26
+ */
27
+ name?: string;
28
+ }
29
+
30
+ /**
31
+ * Profile selection for the browser session. Provide either id or name. If
32
+ * specified, the matching profile will be loaded into the browser session.
33
+ * Profiles must be created beforehand.
34
+ */
35
+ export interface BrowserProfile {
36
+ /**
37
+ * Profile ID to load for this browser session
38
+ */
39
+ id?: string;
40
+
41
+ /**
42
+ * Profile name to load for this browser session (instead of id). Must be 1-255
43
+ * characters, using letters, numbers, dots, underscores, or hyphens.
44
+ */
45
+ name?: string;
46
+
47
+ /**
48
+ * If true, save changes made during the session back to the profile when the
49
+ * session ends.
50
+ */
51
+ save_changes?: boolean;
52
+ }
53
+
54
+ /**
55
+ * Initial browser window size in pixels with optional refresh rate. If omitted,
56
+ * image defaults apply (commonly 1024x768@60). Only specific viewport
57
+ * configurations are supported. The server will reject unsupported combinations.
58
+ * Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
59
+ * 1440x900@25, 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
+ * configuration exactly. Note: Higher resolutions may affect the responsiveness of
62
+ * live view browser
63
+ */
64
+ export interface BrowserViewport {
65
+ /**
66
+ * Browser window height in pixels.
67
+ */
68
+ height: number;
69
+
70
+ /**
71
+ * Browser window width in pixels.
72
+ */
73
+ width: number;
74
+
75
+ /**
76
+ * Display refresh rate in Hz. If omitted, automatically determined from width and
77
+ * height.
78
+ */
79
+ refresh_rate?: number;
80
+ }
81
+
13
82
  export interface ErrorDetail {
14
83
  /**
15
84
  * Lower-level error code providing more specific detail
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.20.0'; // x-release-please-version
1
+ export const VERSION = '0.21.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.20.0";
1
+ export declare const VERSION = "0.21.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.20.0";
1
+ export declare const VERSION = "0.21.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.20.0'; // x-release-please-version
4
+ exports.VERSION = '0.21.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.20.0'; // x-release-please-version
1
+ export const VERSION = '0.21.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map