@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.
- package/CHANGELOG.md +31 -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 +3 -2
- package/client.js.map +1 -1
- package/client.mjs +3 -2
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/browser-pools.d.mts +8 -8
- package/resources/browser-pools.d.ts +8 -8
- package/resources/browsers/browsers.d.mts +10 -10
- package/resources/browsers/browsers.d.ts +10 -10
- 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/resources/invocations.d.mts +81 -1
- package/resources/invocations.d.mts.map +1 -1
- package/resources/invocations.d.ts +81 -1
- package/resources/invocations.d.ts.map +1 -1
- package/resources/invocations.js +13 -0
- package/resources/invocations.js.map +1 -1
- package/resources/invocations.mjs +13 -0
- package/resources/invocations.mjs.map +1 -1
- package/resources/shared.d.mts +2 -2
- package/resources/shared.d.ts +2 -2
- package/src/client.ts +5 -2
- package/src/internal/parse.ts +6 -0
- package/src/resources/browser-pools.ts +8 -8
- package/src/resources/browsers/browsers.ts +10 -10
- package/src/resources/index.ts +1 -0
- package/src/resources/invocations.ts +98 -0
- package/src/resources/shared.ts +2 -2
- 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
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
*/
|
package/src/resources/index.ts
CHANGED
|
@@ -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,
|
package/src/resources/shared.ts
CHANGED
|
@@ -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
|
|
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.
|
|
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.
|
|
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.
|
|
1
|
+
export declare const VERSION = "0.30.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.30.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|