@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.
- package/CHANGELOG.md +14 -0
- package/client.d.mts +7 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -1
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/browser-pools.d.mts +438 -0
- package/resources/browser-pools.d.mts.map +1 -0
- package/resources/browser-pools.d.ts +438 -0
- package/resources/browser-pools.d.ts.map +1 -0
- package/resources/browser-pools.js +125 -0
- package/resources/browser-pools.js.map +1 -0
- package/resources/browser-pools.mjs +121 -0
- package/resources/browser-pools.mjs.map +1 -0
- package/resources/browsers/browsers.d.mts +7 -150
- package/resources/browsers/browsers.d.mts.map +1 -1
- package/resources/browsers/browsers.d.ts +7 -150
- package/resources/browsers/browsers.d.ts.map +1 -1
- package/resources/browsers/browsers.js.map +1 -1
- package/resources/browsers/browsers.mjs.map +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/shared.d.mts +61 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +61 -0
- package/resources/shared.d.ts.map +1 -1
- package/src/client.ts +37 -1
- package/src/resources/browser-pools.ts +560 -0
- package/src/resources/browsers/browsers.ts +7 -167
- package/src/resources/index.ts +15 -0
- package/src/resources/shared.ts +69 -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
package/resources/shared.d.mts
CHANGED
|
@@ -7,6 +7,67 @@ export interface AppAction {
|
|
|
7
7
|
*/
|
|
8
8
|
name: string;
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Extension selection for the browser session. Provide either id or name of an
|
|
12
|
+
* extension uploaded to Kernel.
|
|
13
|
+
*/
|
|
14
|
+
export interface BrowserExtension {
|
|
15
|
+
/**
|
|
16
|
+
* Extension ID to load for this browser session
|
|
17
|
+
*/
|
|
18
|
+
id?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Extension name to load for this browser session (instead of id). Must be 1-255
|
|
21
|
+
* characters, using letters, numbers, dots, underscores, or hyphens.
|
|
22
|
+
*/
|
|
23
|
+
name?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Profile selection for the browser session. Provide either id or name. If
|
|
27
|
+
* specified, the matching profile will be loaded into the browser session.
|
|
28
|
+
* Profiles must be created beforehand.
|
|
29
|
+
*/
|
|
30
|
+
export interface BrowserProfile {
|
|
31
|
+
/**
|
|
32
|
+
* Profile ID to load for this browser session
|
|
33
|
+
*/
|
|
34
|
+
id?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Profile name to load for this browser session (instead of id). Must be 1-255
|
|
37
|
+
* characters, using letters, numbers, dots, underscores, or hyphens.
|
|
38
|
+
*/
|
|
39
|
+
name?: string;
|
|
40
|
+
/**
|
|
41
|
+
* If true, save changes made during the session back to the profile when the
|
|
42
|
+
* session ends.
|
|
43
|
+
*/
|
|
44
|
+
save_changes?: boolean;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Initial browser window size in pixels with optional refresh rate. If omitted,
|
|
48
|
+
* image defaults apply (commonly 1024x768@60). Only specific viewport
|
|
49
|
+
* configurations are supported. The server will reject unsupported combinations.
|
|
50
|
+
* Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
|
|
51
|
+
* 1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
|
|
52
|
+
* be automatically determined from the width and height if they match a supported
|
|
53
|
+
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
|
|
54
|
+
* live view browser
|
|
55
|
+
*/
|
|
56
|
+
export interface BrowserViewport {
|
|
57
|
+
/**
|
|
58
|
+
* Browser window height in pixels.
|
|
59
|
+
*/
|
|
60
|
+
height: number;
|
|
61
|
+
/**
|
|
62
|
+
* Browser window width in pixels.
|
|
63
|
+
*/
|
|
64
|
+
width: number;
|
|
65
|
+
/**
|
|
66
|
+
* Display refresh rate in Hz. If omitted, automatically determined from width and
|
|
67
|
+
* height.
|
|
68
|
+
*/
|
|
69
|
+
refresh_rate?: number;
|
|
70
|
+
}
|
|
10
71
|
export interface ErrorDetail {
|
|
11
72
|
/**
|
|
12
73
|
* Lower-level error code providing more specific detail
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.mts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,UAAU,CAAC;IAElB;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAE7B,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,KAAK,EAAE,eAAe,CAAC;IAEvB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AA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CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAE7B,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,KAAK,EAAE,eAAe,CAAC;IAEvB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
package/resources/shared.d.ts
CHANGED
|
@@ -7,6 +7,67 @@ export interface AppAction {
|
|
|
7
7
|
*/
|
|
8
8
|
name: string;
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Extension selection for the browser session. Provide either id or name of an
|
|
12
|
+
* extension uploaded to Kernel.
|
|
13
|
+
*/
|
|
14
|
+
export interface BrowserExtension {
|
|
15
|
+
/**
|
|
16
|
+
* Extension ID to load for this browser session
|
|
17
|
+
*/
|
|
18
|
+
id?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Extension name to load for this browser session (instead of id). Must be 1-255
|
|
21
|
+
* characters, using letters, numbers, dots, underscores, or hyphens.
|
|
22
|
+
*/
|
|
23
|
+
name?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Profile selection for the browser session. Provide either id or name. If
|
|
27
|
+
* specified, the matching profile will be loaded into the browser session.
|
|
28
|
+
* Profiles must be created beforehand.
|
|
29
|
+
*/
|
|
30
|
+
export interface BrowserProfile {
|
|
31
|
+
/**
|
|
32
|
+
* Profile ID to load for this browser session
|
|
33
|
+
*/
|
|
34
|
+
id?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Profile name to load for this browser session (instead of id). Must be 1-255
|
|
37
|
+
* characters, using letters, numbers, dots, underscores, or hyphens.
|
|
38
|
+
*/
|
|
39
|
+
name?: string;
|
|
40
|
+
/**
|
|
41
|
+
* If true, save changes made during the session back to the profile when the
|
|
42
|
+
* session ends.
|
|
43
|
+
*/
|
|
44
|
+
save_changes?: boolean;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Initial browser window size in pixels with optional refresh rate. If omitted,
|
|
48
|
+
* image defaults apply (commonly 1024x768@60). Only specific viewport
|
|
49
|
+
* configurations are supported. The server will reject unsupported combinations.
|
|
50
|
+
* Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
|
|
51
|
+
* 1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
|
|
52
|
+
* be automatically determined from the width and height if they match a supported
|
|
53
|
+
* configuration exactly. Note: Higher resolutions may affect the responsiveness of
|
|
54
|
+
* live view browser
|
|
55
|
+
*/
|
|
56
|
+
export interface BrowserViewport {
|
|
57
|
+
/**
|
|
58
|
+
* Browser window height in pixels.
|
|
59
|
+
*/
|
|
60
|
+
height: number;
|
|
61
|
+
/**
|
|
62
|
+
* Browser window width in pixels.
|
|
63
|
+
*/
|
|
64
|
+
width: number;
|
|
65
|
+
/**
|
|
66
|
+
* Display refresh rate in Hz. If omitted, automatically determined from width and
|
|
67
|
+
* height.
|
|
68
|
+
*/
|
|
69
|
+
refresh_rate?: number;
|
|
70
|
+
}
|
|
10
71
|
export interface ErrorDetail {
|
|
11
72
|
/**
|
|
12
73
|
* Lower-level error code providing more specific detail
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;G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AAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,UAAU,CAAC;IAElB;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAE7B,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,KAAK,EAAE,eAAe,CAAC;IAEvB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
package/src/client.ts
CHANGED
|
@@ -19,6 +19,21 @@ import * as Uploads from './core/uploads';
|
|
|
19
19
|
import * as API from './resources/index';
|
|
20
20
|
import { APIPromise } from './core/api-promise';
|
|
21
21
|
import { AppListParams, AppListResponse, AppListResponsesOffsetPagination, Apps } from './resources/apps';
|
|
22
|
+
import {
|
|
23
|
+
BrowserPool,
|
|
24
|
+
BrowserPoolAcquireParams,
|
|
25
|
+
BrowserPoolAcquireRequest,
|
|
26
|
+
BrowserPoolAcquireResponse,
|
|
27
|
+
BrowserPoolCreateParams,
|
|
28
|
+
BrowserPoolDeleteParams,
|
|
29
|
+
BrowserPoolListResponse,
|
|
30
|
+
BrowserPoolReleaseParams,
|
|
31
|
+
BrowserPoolReleaseRequest,
|
|
32
|
+
BrowserPoolRequest,
|
|
33
|
+
BrowserPoolUpdateParams,
|
|
34
|
+
BrowserPoolUpdateRequest,
|
|
35
|
+
BrowserPools,
|
|
36
|
+
} from './resources/browser-pools';
|
|
22
37
|
import {
|
|
23
38
|
DeploymentCreateParams,
|
|
24
39
|
DeploymentCreateResponse,
|
|
@@ -186,7 +201,7 @@ export class Kernel {
|
|
|
186
201
|
baseURL: string;
|
|
187
202
|
maxRetries: number;
|
|
188
203
|
timeout: number;
|
|
189
|
-
logger: Logger
|
|
204
|
+
logger: Logger;
|
|
190
205
|
logLevel: LogLevel | undefined;
|
|
191
206
|
fetchOptions: MergedRequestInit | undefined;
|
|
192
207
|
|
|
@@ -843,6 +858,7 @@ export class Kernel {
|
|
|
843
858
|
profiles: API.Profiles = new API.Profiles(this);
|
|
844
859
|
proxies: API.Proxies = new API.Proxies(this);
|
|
845
860
|
extensions: API.Extensions = new API.Extensions(this);
|
|
861
|
+
browserPools: API.BrowserPools = new API.BrowserPools(this);
|
|
846
862
|
}
|
|
847
863
|
|
|
848
864
|
Kernel.Deployments = Deployments;
|
|
@@ -852,6 +868,7 @@ Kernel.Browsers = Browsers;
|
|
|
852
868
|
Kernel.Profiles = Profiles;
|
|
853
869
|
Kernel.Proxies = Proxies;
|
|
854
870
|
Kernel.Extensions = Extensions;
|
|
871
|
+
Kernel.BrowserPools = BrowserPools;
|
|
855
872
|
|
|
856
873
|
export declare namespace Kernel {
|
|
857
874
|
export type RequestOptions = Opts.RequestOptions;
|
|
@@ -933,7 +950,26 @@ export declare namespace Kernel {
|
|
|
933
950
|
type ExtensionUploadParams as ExtensionUploadParams,
|
|
934
951
|
};
|
|
935
952
|
|
|
953
|
+
export {
|
|
954
|
+
BrowserPools as BrowserPools,
|
|
955
|
+
type BrowserPool as BrowserPool,
|
|
956
|
+
type BrowserPoolAcquireRequest as BrowserPoolAcquireRequest,
|
|
957
|
+
type BrowserPoolReleaseRequest as BrowserPoolReleaseRequest,
|
|
958
|
+
type BrowserPoolRequest as BrowserPoolRequest,
|
|
959
|
+
type BrowserPoolUpdateRequest as BrowserPoolUpdateRequest,
|
|
960
|
+
type BrowserPoolListResponse as BrowserPoolListResponse,
|
|
961
|
+
type BrowserPoolAcquireResponse as BrowserPoolAcquireResponse,
|
|
962
|
+
type BrowserPoolCreateParams as BrowserPoolCreateParams,
|
|
963
|
+
type BrowserPoolUpdateParams as BrowserPoolUpdateParams,
|
|
964
|
+
type BrowserPoolDeleteParams as BrowserPoolDeleteParams,
|
|
965
|
+
type BrowserPoolAcquireParams as BrowserPoolAcquireParams,
|
|
966
|
+
type BrowserPoolReleaseParams as BrowserPoolReleaseParams,
|
|
967
|
+
};
|
|
968
|
+
|
|
936
969
|
export type AppAction = API.AppAction;
|
|
970
|
+
export type BrowserExtension = API.BrowserExtension;
|
|
971
|
+
export type BrowserProfile = API.BrowserProfile;
|
|
972
|
+
export type BrowserViewport = API.BrowserViewport;
|
|
937
973
|
export type ErrorDetail = API.ErrorDetail;
|
|
938
974
|
export type ErrorEvent = API.ErrorEvent;
|
|
939
975
|
export type ErrorModel = API.ErrorModel;
|