@onkernel/sdk 0.19.1 → 0.20.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.
- package/CHANGELOG.md +16 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/browsers/browsers.d.mts +106 -85
- package/resources/browsers/browsers.d.mts.map +1 -1
- package/resources/browsers/browsers.d.ts +106 -85
- package/resources/browsers/browsers.d.ts.map +1 -1
- package/resources/browsers/browsers.js +9 -4
- package/resources/browsers/browsers.js.map +1 -1
- package/resources/browsers/browsers.mjs +9 -4
- package/resources/browsers/browsers.mjs.map +1 -1
- package/resources/browsers/index.d.mts +1 -1
- package/resources/browsers/index.d.mts.map +1 -1
- package/resources/browsers/index.d.ts +1 -1
- package/resources/browsers/index.d.ts.map +1 -1
- package/resources/browsers/index.js.map +1 -1
- package/resources/browsers/index.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/src/client.ts +4 -0
- package/src/resources/browsers/browsers.ts +118 -88
- package/src/resources/browsers/index.ts +2 -0
- package/src/resources/index.ts +2 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
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 BrowsersAPI from './browsers';
|
|
5
4
|
import * as ComputerAPI from './computer';
|
|
6
5
|
import {
|
|
7
6
|
Computer,
|
|
@@ -63,6 +62,7 @@ import {
|
|
|
63
62
|
Fs,
|
|
64
63
|
} from './fs/fs';
|
|
65
64
|
import { APIPromise } from '../../core/api-promise';
|
|
65
|
+
import { OffsetPagination, type OffsetPaginationParams, PagePromise } from '../../core/pagination';
|
|
66
66
|
import { type Uploadable } from '../../core/uploads';
|
|
67
67
|
import { buildHeaders } from '../../internal/headers';
|
|
68
68
|
import { RequestOptions } from '../../internal/request-options';
|
|
@@ -107,15 +107,22 @@ export class Browsers extends APIResource {
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
|
-
* List
|
|
110
|
+
* List all browser sessions with pagination support. Use include_deleted=true to
|
|
111
|
+
* include soft-deleted sessions in the results.
|
|
111
112
|
*
|
|
112
113
|
* @example
|
|
113
114
|
* ```ts
|
|
114
|
-
*
|
|
115
|
+
* // Automatically fetches more pages as needed.
|
|
116
|
+
* for await (const browserListResponse of client.browsers.list()) {
|
|
117
|
+
* // ...
|
|
118
|
+
* }
|
|
115
119
|
* ```
|
|
116
120
|
*/
|
|
117
|
-
list(
|
|
118
|
-
|
|
121
|
+
list(
|
|
122
|
+
query: BrowserListParams | null | undefined = {},
|
|
123
|
+
options?: RequestOptions,
|
|
124
|
+
): PagePromise<BrowserListResponsesOffsetPagination, BrowserListResponse> {
|
|
125
|
+
return this._client.getAPIList('/browsers', OffsetPagination<BrowserListResponse>, { query, ...options });
|
|
119
126
|
}
|
|
120
127
|
|
|
121
128
|
/**
|
|
@@ -181,6 +188,8 @@ export class Browsers extends APIResource {
|
|
|
181
188
|
}
|
|
182
189
|
}
|
|
183
190
|
|
|
191
|
+
export type BrowserListResponsesOffsetPagination = OffsetPagination<BrowserListResponse>;
|
|
192
|
+
|
|
184
193
|
/**
|
|
185
194
|
* Optional persistence configuration for the browser session.
|
|
186
195
|
*/
|
|
@@ -258,6 +267,11 @@ export interface BrowserCreateResponse {
|
|
|
258
267
|
*/
|
|
259
268
|
browser_live_view_url?: string;
|
|
260
269
|
|
|
270
|
+
/**
|
|
271
|
+
* When the browser session was soft-deleted. Only present for deleted sessions.
|
|
272
|
+
*/
|
|
273
|
+
deleted_at?: string;
|
|
274
|
+
|
|
261
275
|
/**
|
|
262
276
|
* Whether the browser session is running in kiosk mode.
|
|
263
277
|
*/
|
|
@@ -358,6 +372,11 @@ export interface BrowserRetrieveResponse {
|
|
|
358
372
|
*/
|
|
359
373
|
browser_live_view_url?: string;
|
|
360
374
|
|
|
375
|
+
/**
|
|
376
|
+
* When the browser session was soft-deleted. Only present for deleted sessions.
|
|
377
|
+
*/
|
|
378
|
+
deleted_at?: string;
|
|
379
|
+
|
|
361
380
|
/**
|
|
362
381
|
* Whether the browser session is running in kiosk mode.
|
|
363
382
|
*/
|
|
@@ -421,107 +440,108 @@ export namespace BrowserRetrieveResponse {
|
|
|
421
440
|
}
|
|
422
441
|
}
|
|
423
442
|
|
|
424
|
-
export
|
|
443
|
+
export interface BrowserListResponse {
|
|
444
|
+
/**
|
|
445
|
+
* Websocket URL for Chrome DevTools Protocol connections to the browser session
|
|
446
|
+
*/
|
|
447
|
+
cdp_ws_url: string;
|
|
425
448
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
*/
|
|
431
|
-
cdp_ws_url: string;
|
|
449
|
+
/**
|
|
450
|
+
* When the browser session was created.
|
|
451
|
+
*/
|
|
452
|
+
created_at: string;
|
|
432
453
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
454
|
+
/**
|
|
455
|
+
* Whether the browser session is running in headless mode.
|
|
456
|
+
*/
|
|
457
|
+
headless: boolean;
|
|
437
458
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
459
|
+
/**
|
|
460
|
+
* Unique identifier for the browser session
|
|
461
|
+
*/
|
|
462
|
+
session_id: string;
|
|
442
463
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
464
|
+
/**
|
|
465
|
+
* Whether the browser session is running in stealth mode.
|
|
466
|
+
*/
|
|
467
|
+
stealth: boolean;
|
|
447
468
|
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
469
|
+
/**
|
|
470
|
+
* The number of seconds of inactivity before the browser session is terminated.
|
|
471
|
+
*/
|
|
472
|
+
timeout_seconds: number;
|
|
452
473
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
474
|
+
/**
|
|
475
|
+
* Remote URL for live viewing the browser session. Only available for non-headless
|
|
476
|
+
* browsers.
|
|
477
|
+
*/
|
|
478
|
+
browser_live_view_url?: string;
|
|
457
479
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
browser_live_view_url?: string;
|
|
480
|
+
/**
|
|
481
|
+
* When the browser session was soft-deleted. Only present for deleted sessions.
|
|
482
|
+
*/
|
|
483
|
+
deleted_at?: string;
|
|
463
484
|
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
485
|
+
/**
|
|
486
|
+
* Whether the browser session is running in kiosk mode.
|
|
487
|
+
*/
|
|
488
|
+
kiosk_mode?: boolean;
|
|
468
489
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
490
|
+
/**
|
|
491
|
+
* Optional persistence configuration for the browser session.
|
|
492
|
+
*/
|
|
493
|
+
persistence?: BrowserPersistence;
|
|
473
494
|
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
495
|
+
/**
|
|
496
|
+
* Browser profile metadata.
|
|
497
|
+
*/
|
|
498
|
+
profile?: Profile;
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* ID of the proxy associated with this browser session, if any.
|
|
502
|
+
*/
|
|
503
|
+
proxy_id?: string;
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Initial browser window size in pixels with optional refresh rate. If omitted,
|
|
507
|
+
* image defaults apply (commonly 1024x768@60). Only specific viewport
|
|
508
|
+
* configurations are supported. The server will reject unsupported combinations.
|
|
509
|
+
* Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
|
|
510
|
+
* 1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
|
|
511
|
+
* be automatically determined from the width and height if they match a supported
|
|
512
|
+
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
|
|
513
|
+
* live view browser
|
|
514
|
+
*/
|
|
515
|
+
viewport?: BrowserListResponse.Viewport;
|
|
516
|
+
}
|
|
478
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 {
|
|
479
530
|
/**
|
|
480
|
-
*
|
|
531
|
+
* Browser window height in pixels.
|
|
481
532
|
*/
|
|
482
|
-
|
|
533
|
+
height: number;
|
|
483
534
|
|
|
484
535
|
/**
|
|
485
|
-
*
|
|
486
|
-
* image defaults apply (commonly 1024x768@60). Only specific viewport
|
|
487
|
-
* configurations are supported. The server will reject unsupported combinations.
|
|
488
|
-
* Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
|
|
489
|
-
* 1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
|
|
490
|
-
* be automatically determined from the width and height if they match a supported
|
|
491
|
-
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
|
|
492
|
-
* live view browser
|
|
536
|
+
* Browser window width in pixels.
|
|
493
537
|
*/
|
|
494
|
-
|
|
495
|
-
}
|
|
538
|
+
width: number;
|
|
496
539
|
|
|
497
|
-
export namespace BrowserListResponseItem {
|
|
498
540
|
/**
|
|
499
|
-
*
|
|
500
|
-
*
|
|
501
|
-
* configurations are supported. The server will reject unsupported combinations.
|
|
502
|
-
* Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
|
|
503
|
-
* 1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
|
|
504
|
-
* be automatically determined from the width and height if they match a supported
|
|
505
|
-
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
|
|
506
|
-
* live view browser
|
|
541
|
+
* Display refresh rate in Hz. If omitted, automatically determined from width and
|
|
542
|
+
* height.
|
|
507
543
|
*/
|
|
508
|
-
|
|
509
|
-
/**
|
|
510
|
-
* Browser window height in pixels.
|
|
511
|
-
*/
|
|
512
|
-
height: number;
|
|
513
|
-
|
|
514
|
-
/**
|
|
515
|
-
* Browser window width in pixels.
|
|
516
|
-
*/
|
|
517
|
-
width: number;
|
|
518
|
-
|
|
519
|
-
/**
|
|
520
|
-
* Display refresh rate in Hz. If omitted, automatically determined from width and
|
|
521
|
-
* height.
|
|
522
|
-
*/
|
|
523
|
-
refresh_rate?: number;
|
|
524
|
-
}
|
|
544
|
+
refresh_rate?: number;
|
|
525
545
|
}
|
|
526
546
|
}
|
|
527
547
|
|
|
@@ -576,7 +596,7 @@ export interface BrowserCreateParams {
|
|
|
576
596
|
* The number of seconds of inactivity before the browser session is terminated.
|
|
577
597
|
* Only applicable to non-persistent browsers. Activity includes CDP connections
|
|
578
598
|
* and live view connections. Defaults to 60 seconds. Minimum allowed is 10
|
|
579
|
-
* seconds. Maximum allowed is
|
|
599
|
+
* seconds. Maximum allowed is 259200 (72 hours). We check for inactivity every 5
|
|
580
600
|
* seconds, so the actual timeout behavior you will see is +/- 5 seconds around the
|
|
581
601
|
* specified value.
|
|
582
602
|
*/
|
|
@@ -666,6 +686,14 @@ export namespace BrowserCreateParams {
|
|
|
666
686
|
}
|
|
667
687
|
}
|
|
668
688
|
|
|
689
|
+
export interface BrowserListParams extends OffsetPaginationParams {
|
|
690
|
+
/**
|
|
691
|
+
* When true, includes soft-deleted browser sessions in the results alongside
|
|
692
|
+
* active sessions.
|
|
693
|
+
*/
|
|
694
|
+
include_deleted?: boolean;
|
|
695
|
+
}
|
|
696
|
+
|
|
669
697
|
export interface BrowserDeleteParams {
|
|
670
698
|
/**
|
|
671
699
|
* Persistent browser identifier
|
|
@@ -709,7 +737,9 @@ export declare namespace Browsers {
|
|
|
709
737
|
type BrowserCreateResponse as BrowserCreateResponse,
|
|
710
738
|
type BrowserRetrieveResponse as BrowserRetrieveResponse,
|
|
711
739
|
type BrowserListResponse as BrowserListResponse,
|
|
740
|
+
type BrowserListResponsesOffsetPagination as BrowserListResponsesOffsetPagination,
|
|
712
741
|
type BrowserCreateParams as BrowserCreateParams,
|
|
742
|
+
type BrowserListParams as BrowserListParams,
|
|
713
743
|
type BrowserDeleteParams as BrowserDeleteParams,
|
|
714
744
|
type BrowserLoadExtensionsParams as BrowserLoadExtensionsParams,
|
|
715
745
|
};
|
|
@@ -8,8 +8,10 @@ export {
|
|
|
8
8
|
type BrowserRetrieveResponse,
|
|
9
9
|
type BrowserListResponse,
|
|
10
10
|
type BrowserCreateParams,
|
|
11
|
+
type BrowserListParams,
|
|
11
12
|
type BrowserDeleteParams,
|
|
12
13
|
type BrowserLoadExtensionsParams,
|
|
14
|
+
type BrowserListResponsesOffsetPagination,
|
|
13
15
|
} from './browsers';
|
|
14
16
|
export {
|
|
15
17
|
Computer,
|
package/src/resources/index.ts
CHANGED
|
@@ -15,8 +15,10 @@ export {
|
|
|
15
15
|
type BrowserRetrieveResponse,
|
|
16
16
|
type BrowserListResponse,
|
|
17
17
|
type BrowserCreateParams,
|
|
18
|
+
type BrowserListParams,
|
|
18
19
|
type BrowserDeleteParams,
|
|
19
20
|
type BrowserLoadExtensionsParams,
|
|
21
|
+
type BrowserListResponsesOffsetPagination,
|
|
20
22
|
} from './browsers/browsers';
|
|
21
23
|
export {
|
|
22
24
|
Deployments,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.20.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.20.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.20.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.20.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|