@onkernel/sdk 0.42.0 → 0.42.1
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 +20 -0
- package/client.d.mts +30 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +30 -0
- package/client.d.ts.map +1 -1
- package/client.js +30 -0
- package/client.js.map +1 -1
- package/client.mjs +30 -0
- package/client.mjs.map +1 -1
- package/internal/uploads.js +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/package.json +1 -2
- package/resources/apps.d.mts +3 -0
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +3 -0
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js +3 -0
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs +3 -0
- package/resources/apps.mjs.map +1 -1
- package/resources/auth/connections.d.mts +3 -0
- package/resources/auth/connections.d.mts.map +1 -1
- package/resources/auth/connections.d.ts +3 -0
- package/resources/auth/connections.d.ts.map +1 -1
- package/resources/auth/connections.js +3 -0
- package/resources/auth/connections.js.map +1 -1
- package/resources/auth/connections.mjs +3 -0
- package/resources/auth/connections.mjs.map +1 -1
- package/resources/browser-pools.d.mts +3 -0
- package/resources/browser-pools.d.mts.map +1 -1
- package/resources/browser-pools.d.ts +3 -0
- package/resources/browser-pools.d.ts.map +1 -1
- package/resources/browser-pools.js +3 -0
- package/resources/browser-pools.js.map +1 -1
- package/resources/browser-pools.mjs +3 -0
- package/resources/browser-pools.mjs.map +1 -1
- package/resources/browsers/browsers.d.mts +20 -3
- package/resources/browsers/browsers.d.mts.map +1 -1
- package/resources/browsers/browsers.d.ts +20 -3
- package/resources/browsers/browsers.d.ts.map +1 -1
- package/resources/browsers/browsers.js +3 -0
- package/resources/browsers/browsers.js.map +1 -1
- package/resources/browsers/browsers.mjs +3 -0
- package/resources/browsers/browsers.mjs.map +1 -1
- package/resources/browsers/computer.d.mts +52 -1
- package/resources/browsers/computer.d.mts.map +1 -1
- package/resources/browsers/computer.d.ts +52 -1
- package/resources/browsers/computer.d.ts.map +1 -1
- package/resources/browsers/computer.js +29 -0
- package/resources/browsers/computer.js.map +1 -1
- package/resources/browsers/computer.mjs +29 -0
- package/resources/browsers/computer.mjs.map +1 -1
- package/resources/browsers/fs/fs.d.mts +3 -0
- package/resources/browsers/fs/fs.d.mts.map +1 -1
- package/resources/browsers/fs/fs.d.ts +3 -0
- package/resources/browsers/fs/fs.d.ts.map +1 -1
- package/resources/browsers/fs/fs.js +3 -0
- package/resources/browsers/fs/fs.js.map +1 -1
- package/resources/browsers/fs/fs.mjs +3 -0
- package/resources/browsers/fs/fs.mjs.map +1 -1
- package/resources/browsers/fs/watch.d.mts +3 -0
- package/resources/browsers/fs/watch.d.mts.map +1 -1
- package/resources/browsers/fs/watch.d.ts +3 -0
- package/resources/browsers/fs/watch.d.ts.map +1 -1
- package/resources/browsers/fs/watch.js +3 -0
- package/resources/browsers/fs/watch.js.map +1 -1
- package/resources/browsers/fs/watch.mjs +3 -0
- package/resources/browsers/fs/watch.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/browsers/logs.d.mts +3 -0
- package/resources/browsers/logs.d.mts.map +1 -1
- package/resources/browsers/logs.d.ts +3 -0
- package/resources/browsers/logs.d.ts.map +1 -1
- package/resources/browsers/logs.js +3 -0
- package/resources/browsers/logs.js.map +1 -1
- package/resources/browsers/logs.mjs +3 -0
- package/resources/browsers/logs.mjs.map +1 -1
- package/resources/browsers/playwright.d.mts +3 -0
- package/resources/browsers/playwright.d.mts.map +1 -1
- package/resources/browsers/playwright.d.ts +3 -0
- package/resources/browsers/playwright.d.ts.map +1 -1
- package/resources/browsers/playwright.js +3 -0
- package/resources/browsers/playwright.js.map +1 -1
- package/resources/browsers/playwright.mjs +3 -0
- package/resources/browsers/playwright.mjs.map +1 -1
- package/resources/browsers/process.d.mts +3 -0
- package/resources/browsers/process.d.mts.map +1 -1
- package/resources/browsers/process.d.ts +3 -0
- package/resources/browsers/process.d.ts.map +1 -1
- package/resources/browsers/process.js +3 -0
- package/resources/browsers/process.js.map +1 -1
- package/resources/browsers/process.mjs +3 -0
- package/resources/browsers/process.mjs.map +1 -1
- package/resources/browsers/replays.d.mts +3 -0
- package/resources/browsers/replays.d.mts.map +1 -1
- package/resources/browsers/replays.d.ts +3 -0
- package/resources/browsers/replays.d.ts.map +1 -1
- package/resources/browsers/replays.js +3 -0
- package/resources/browsers/replays.js.map +1 -1
- package/resources/browsers/replays.mjs +3 -0
- package/resources/browsers/replays.mjs.map +1 -1
- package/resources/credential-providers.d.mts +3 -0
- package/resources/credential-providers.d.mts.map +1 -1
- package/resources/credential-providers.d.ts +3 -0
- package/resources/credential-providers.d.ts.map +1 -1
- package/resources/credential-providers.js +3 -0
- package/resources/credential-providers.js.map +1 -1
- package/resources/credential-providers.mjs +3 -0
- package/resources/credential-providers.mjs.map +1 -1
- package/resources/credentials.d.mts +3 -0
- package/resources/credentials.d.mts.map +1 -1
- package/resources/credentials.d.ts +3 -0
- package/resources/credentials.d.ts.map +1 -1
- package/resources/credentials.js +3 -0
- package/resources/credentials.js.map +1 -1
- package/resources/credentials.mjs +3 -0
- package/resources/credentials.mjs.map +1 -1
- package/resources/deployments.d.mts +3 -0
- package/resources/deployments.d.mts.map +1 -1
- package/resources/deployments.d.ts +3 -0
- package/resources/deployments.d.ts.map +1 -1
- package/resources/deployments.js +3 -0
- package/resources/deployments.js.map +1 -1
- package/resources/deployments.mjs +3 -0
- package/resources/deployments.mjs.map +1 -1
- package/resources/extensions.d.mts +3 -0
- package/resources/extensions.d.mts.map +1 -1
- package/resources/extensions.d.ts +3 -0
- package/resources/extensions.d.ts.map +1 -1
- package/resources/extensions.js +3 -0
- package/resources/extensions.js.map +1 -1
- package/resources/extensions.mjs +3 -0
- package/resources/extensions.mjs.map +1 -1
- package/resources/invocations.d.mts +3 -0
- package/resources/invocations.d.mts.map +1 -1
- package/resources/invocations.d.ts +3 -0
- package/resources/invocations.d.ts.map +1 -1
- package/resources/invocations.js +3 -0
- package/resources/invocations.js.map +1 -1
- package/resources/invocations.mjs +3 -0
- package/resources/invocations.mjs.map +1 -1
- package/resources/profiles.d.mts +3 -0
- package/resources/profiles.d.mts.map +1 -1
- package/resources/profiles.d.ts +3 -0
- package/resources/profiles.d.ts.map +1 -1
- package/resources/profiles.js +3 -0
- package/resources/profiles.js.map +1 -1
- package/resources/profiles.mjs +3 -0
- package/resources/profiles.mjs.map +1 -1
- package/resources/proxies.d.mts +3 -0
- package/resources/proxies.d.mts.map +1 -1
- package/resources/proxies.d.ts +3 -0
- package/resources/proxies.d.ts.map +1 -1
- package/resources/proxies.js +3 -0
- package/resources/proxies.js.map +1 -1
- package/resources/proxies.mjs +3 -0
- package/resources/proxies.mjs.map +1 -1
- package/src/client.ts +30 -0
- package/src/internal/uploads.ts +1 -1
- package/src/resources/apps.ts +3 -0
- package/src/resources/auth/connections.ts +3 -0
- package/src/resources/browser-pools.ts +3 -0
- package/src/resources/browsers/browsers.ts +23 -1
- package/src/resources/browsers/computer.ts +69 -0
- package/src/resources/browsers/fs/fs.ts +3 -0
- package/src/resources/browsers/fs/watch.ts +3 -0
- package/src/resources/browsers/index.ts +2 -0
- package/src/resources/browsers/logs.ts +3 -0
- package/src/resources/browsers/playwright.ts +3 -0
- package/src/resources/browsers/process.ts +3 -0
- package/src/resources/browsers/replays.ts +3 -0
- package/src/resources/credential-providers.ts +3 -0
- package/src/resources/credentials.ts +3 -0
- package/src/resources/deployments.ts +3 -0
- package/src/resources/extensions.ts +3 -0
- package/src/resources/invocations.ts +3 -0
- package/src/resources/profiles.ts +3 -0
- package/src/resources/proxies.ts +3 -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxies.mjs","sourceRoot":"","sources":["../src/resources/proxies.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,YAAY,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,YAAY,EAAE,EAAE,EAAE;YAC/C,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,EAAU,EAAE,OAAwB;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,YAAY,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"proxies.mjs","sourceRoot":"","sources":["../src/resources/proxies.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,YAAY,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,YAAY,EAAE,EAAE,EAAE;YAC/C,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,EAAU,EAAE,OAAwB;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,YAAY,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;CACF"}
|
package/src/client.ts
CHANGED
|
@@ -886,16 +886,46 @@ export class Kernel {
|
|
|
886
886
|
|
|
887
887
|
static toFile = Uploads.toFile;
|
|
888
888
|
|
|
889
|
+
/**
|
|
890
|
+
* Create and manage app deployments and stream deployment events.
|
|
891
|
+
*/
|
|
889
892
|
deployments: API.Deployments = new API.Deployments(this);
|
|
893
|
+
/**
|
|
894
|
+
* List applications and versions.
|
|
895
|
+
*/
|
|
890
896
|
apps: API.Apps = new API.Apps(this);
|
|
897
|
+
/**
|
|
898
|
+
* Invoke actions and stream or query invocation status and events.
|
|
899
|
+
*/
|
|
891
900
|
invocations: API.Invocations = new API.Invocations(this);
|
|
901
|
+
/**
|
|
902
|
+
* Create and manage browser sessions.
|
|
903
|
+
*/
|
|
892
904
|
browsers: API.Browsers = new API.Browsers(this);
|
|
905
|
+
/**
|
|
906
|
+
* Create, list, retrieve, and delete browser profiles.
|
|
907
|
+
*/
|
|
893
908
|
profiles: API.Profiles = new API.Profiles(this);
|
|
894
909
|
auth: API.Auth = new API.Auth(this);
|
|
910
|
+
/**
|
|
911
|
+
* Create and manage proxy configurations for routing browser traffic.
|
|
912
|
+
*/
|
|
895
913
|
proxies: API.Proxies = new API.Proxies(this);
|
|
914
|
+
/**
|
|
915
|
+
* Create, list, retrieve, and delete browser extensions.
|
|
916
|
+
*/
|
|
896
917
|
extensions: API.Extensions = new API.Extensions(this);
|
|
918
|
+
/**
|
|
919
|
+
* Create and manage browser pools for acquiring and releasing browsers.
|
|
920
|
+
*/
|
|
897
921
|
browserPools: API.BrowserPools = new API.BrowserPools(this);
|
|
922
|
+
/**
|
|
923
|
+
* Create and manage credentials for authentication.
|
|
924
|
+
*/
|
|
898
925
|
credentials: API.Credentials = new API.Credentials(this);
|
|
926
|
+
/**
|
|
927
|
+
* Configure external credential providers like 1Password.
|
|
928
|
+
*/
|
|
899
929
|
credentialProviders: API.CredentialProviders = new API.CredentialProviders(this);
|
|
900
930
|
}
|
|
901
931
|
|
package/src/internal/uploads.ts
CHANGED
|
@@ -174,7 +174,7 @@ const addFormValue = async (form: FormData, key: string, value: unknown): Promis
|
|
|
174
174
|
} else if (isNamedBlob(value)) {
|
|
175
175
|
form.append(key, value, getName(value));
|
|
176
176
|
} else if (Array.isArray(value)) {
|
|
177
|
-
await Promise.all(value.map((entry) => addFormValue(form, key
|
|
177
|
+
await Promise.all(value.map((entry, i) => addFormValue(form, `${key}[${i}]`, entry)));
|
|
178
178
|
} else if (typeof value === 'object') {
|
|
179
179
|
// Special case: env_vars should always be flattened for backward compatibility
|
|
180
180
|
// with APIs that expect env_vars[KEY] format
|
package/src/resources/apps.ts
CHANGED
|
@@ -5,6 +5,9 @@ import * as Shared from './shared';
|
|
|
5
5
|
import { OffsetPagination, type OffsetPaginationParams, PagePromise } from '../core/pagination';
|
|
6
6
|
import { RequestOptions } from '../internal/request-options';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* List applications and versions.
|
|
10
|
+
*/
|
|
8
11
|
export class Apps extends APIResource {
|
|
9
12
|
/**
|
|
10
13
|
* List applications. Optionally filter by app name and/or version label.
|
|
@@ -9,6 +9,9 @@ import { buildHeaders } from '../../internal/headers';
|
|
|
9
9
|
import { RequestOptions } from '../../internal/request-options';
|
|
10
10
|
import { path } from '../../internal/utils/path';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Create and manage auth connections for automated credential capture and login.
|
|
14
|
+
*/
|
|
12
15
|
export class Connections extends APIResource {
|
|
13
16
|
/**
|
|
14
17
|
* Creates an auth connection for a profile and domain combination. Returns 409
|
|
@@ -8,6 +8,9 @@ import { buildHeaders } from '../internal/headers';
|
|
|
8
8
|
import { RequestOptions } from '../internal/request-options';
|
|
9
9
|
import { path } from '../internal/utils/path';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Create and manage browser pools for acquiring and releasing browsers.
|
|
13
|
+
*/
|
|
11
14
|
export class BrowserPools extends APIResource {
|
|
12
15
|
/**
|
|
13
16
|
* Create a new browser pool with the specified configuration and size.
|
|
@@ -12,10 +12,12 @@ import {
|
|
|
12
12
|
ComputerGetMousePositionResponse,
|
|
13
13
|
ComputerMoveMouseParams,
|
|
14
14
|
ComputerPressKeyParams,
|
|
15
|
+
ComputerReadClipboardResponse,
|
|
15
16
|
ComputerScrollParams,
|
|
16
17
|
ComputerSetCursorVisibilityParams,
|
|
17
18
|
ComputerSetCursorVisibilityResponse,
|
|
18
19
|
ComputerTypeTextParams,
|
|
20
|
+
ComputerWriteClipboardParams,
|
|
19
21
|
} from './computer';
|
|
20
22
|
import * as LogsAPI from './logs';
|
|
21
23
|
import { LogStreamParams, Logs } from './logs';
|
|
@@ -74,6 +76,9 @@ import { RequestOptions } from '../../internal/request-options';
|
|
|
74
76
|
import { multipartFormRequestOptions } from '../../internal/uploads';
|
|
75
77
|
import { path } from '../../internal/utils/path';
|
|
76
78
|
|
|
79
|
+
/**
|
|
80
|
+
* Create and manage browser sessions.
|
|
81
|
+
*/
|
|
77
82
|
export class Browsers extends APIResource {
|
|
78
83
|
replays: ReplaysAPI.Replays = new ReplaysAPI.Replays(this._client);
|
|
79
84
|
fs: FsAPI.Fs = new FsAPI.Fs(this._client);
|
|
@@ -740,7 +745,22 @@ export interface BrowserUpdateParams {
|
|
|
740
745
|
/**
|
|
741
746
|
* Viewport configuration to apply to the browser session.
|
|
742
747
|
*/
|
|
743
|
-
viewport?:
|
|
748
|
+
viewport?: BrowserUpdateParams.Viewport;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
export namespace BrowserUpdateParams {
|
|
752
|
+
/**
|
|
753
|
+
* Viewport configuration to apply to the browser session.
|
|
754
|
+
*/
|
|
755
|
+
export interface Viewport extends Shared.BrowserViewport {
|
|
756
|
+
/**
|
|
757
|
+
* If true, allow the viewport change even when a live view or recording/replay is
|
|
758
|
+
* active. Active recordings will be gracefully stopped and restarted at the new
|
|
759
|
+
* resolution as separate segments. If false (default), the resize is refused when
|
|
760
|
+
* a live view or recording is active.
|
|
761
|
+
*/
|
|
762
|
+
force?: boolean;
|
|
763
|
+
}
|
|
744
764
|
}
|
|
745
765
|
|
|
746
766
|
export interface BrowserListParams extends OffsetPaginationParams {
|
|
@@ -867,6 +887,7 @@ export declare namespace Browsers {
|
|
|
867
887
|
export {
|
|
868
888
|
Computer as Computer,
|
|
869
889
|
type ComputerGetMousePositionResponse as ComputerGetMousePositionResponse,
|
|
890
|
+
type ComputerReadClipboardResponse as ComputerReadClipboardResponse,
|
|
870
891
|
type ComputerSetCursorVisibilityResponse as ComputerSetCursorVisibilityResponse,
|
|
871
892
|
type ComputerBatchParams as ComputerBatchParams,
|
|
872
893
|
type ComputerCaptureScreenshotParams as ComputerCaptureScreenshotParams,
|
|
@@ -877,6 +898,7 @@ export declare namespace Browsers {
|
|
|
877
898
|
type ComputerScrollParams as ComputerScrollParams,
|
|
878
899
|
type ComputerSetCursorVisibilityParams as ComputerSetCursorVisibilityParams,
|
|
879
900
|
type ComputerTypeTextParams as ComputerTypeTextParams,
|
|
901
|
+
type ComputerWriteClipboardParams as ComputerWriteClipboardParams,
|
|
880
902
|
};
|
|
881
903
|
|
|
882
904
|
export {
|
|
@@ -142,6 +142,19 @@ export class Computer extends APIResource {
|
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
+
/**
|
|
146
|
+
* Read text from the clipboard on the browser instance
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* ```ts
|
|
150
|
+
* const response =
|
|
151
|
+
* await client.browsers.computer.readClipboard('id');
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
readClipboard(id: string, options?: RequestOptions): APIPromise<ComputerReadClipboardResponse> {
|
|
155
|
+
return this._client.post(path`/browsers/${id}/computer/clipboard/read`, options);
|
|
156
|
+
}
|
|
157
|
+
|
|
145
158
|
/**
|
|
146
159
|
* Scroll the mouse wheel at a position on the host computer
|
|
147
160
|
*
|
|
@@ -194,6 +207,24 @@ export class Computer extends APIResource {
|
|
|
194
207
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
195
208
|
});
|
|
196
209
|
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Write text to the clipboard on the browser instance
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* ```ts
|
|
216
|
+
* await client.browsers.computer.writeClipboard('id', {
|
|
217
|
+
* text: 'text',
|
|
218
|
+
* });
|
|
219
|
+
* ```
|
|
220
|
+
*/
|
|
221
|
+
writeClipboard(id: string, body: ComputerWriteClipboardParams, options?: RequestOptions): APIPromise<void> {
|
|
222
|
+
return this._client.post(path`/browsers/${id}/computer/clipboard/write`, {
|
|
223
|
+
body,
|
|
224
|
+
...options,
|
|
225
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
226
|
+
});
|
|
227
|
+
}
|
|
197
228
|
}
|
|
198
229
|
|
|
199
230
|
export interface ComputerGetMousePositionResponse {
|
|
@@ -208,6 +239,13 @@ export interface ComputerGetMousePositionResponse {
|
|
|
208
239
|
y: number;
|
|
209
240
|
}
|
|
210
241
|
|
|
242
|
+
export interface ComputerReadClipboardResponse {
|
|
243
|
+
/**
|
|
244
|
+
* Current clipboard text content
|
|
245
|
+
*/
|
|
246
|
+
text: string;
|
|
247
|
+
}
|
|
248
|
+
|
|
211
249
|
/**
|
|
212
250
|
* Generic OK response.
|
|
213
251
|
*/
|
|
@@ -343,10 +381,21 @@ export namespace ComputerBatchParams {
|
|
|
343
381
|
*/
|
|
344
382
|
y: number;
|
|
345
383
|
|
|
384
|
+
/**
|
|
385
|
+
* Target total duration in milliseconds for the mouse movement when smooth=true.
|
|
386
|
+
* Omit for automatic timing based on distance.
|
|
387
|
+
*/
|
|
388
|
+
duration_ms?: number;
|
|
389
|
+
|
|
346
390
|
/**
|
|
347
391
|
* Modifier keys to hold during the move
|
|
348
392
|
*/
|
|
349
393
|
hold_keys?: Array<string>;
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Use human-like Bezier curve path instead of instant mouse movement.
|
|
397
|
+
*/
|
|
398
|
+
smooth?: boolean;
|
|
350
399
|
}
|
|
351
400
|
|
|
352
401
|
export interface PressKey {
|
|
@@ -533,10 +582,21 @@ export interface ComputerMoveMouseParams {
|
|
|
533
582
|
*/
|
|
534
583
|
y: number;
|
|
535
584
|
|
|
585
|
+
/**
|
|
586
|
+
* Target total duration in milliseconds for the mouse movement when smooth=true.
|
|
587
|
+
* Omit for automatic timing based on distance.
|
|
588
|
+
*/
|
|
589
|
+
duration_ms?: number;
|
|
590
|
+
|
|
536
591
|
/**
|
|
537
592
|
* Modifier keys to hold during the move
|
|
538
593
|
*/
|
|
539
594
|
hold_keys?: Array<string>;
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Use human-like Bezier curve path instead of instant mouse movement.
|
|
598
|
+
*/
|
|
599
|
+
smooth?: boolean;
|
|
540
600
|
}
|
|
541
601
|
|
|
542
602
|
export interface ComputerPressKeyParams {
|
|
@@ -606,9 +666,17 @@ export interface ComputerTypeTextParams {
|
|
|
606
666
|
delay?: number;
|
|
607
667
|
}
|
|
608
668
|
|
|
669
|
+
export interface ComputerWriteClipboardParams {
|
|
670
|
+
/**
|
|
671
|
+
* Text to write to the system clipboard
|
|
672
|
+
*/
|
|
673
|
+
text: string;
|
|
674
|
+
}
|
|
675
|
+
|
|
609
676
|
export declare namespace Computer {
|
|
610
677
|
export {
|
|
611
678
|
type ComputerGetMousePositionResponse as ComputerGetMousePositionResponse,
|
|
679
|
+
type ComputerReadClipboardResponse as ComputerReadClipboardResponse,
|
|
612
680
|
type ComputerSetCursorVisibilityResponse as ComputerSetCursorVisibilityResponse,
|
|
613
681
|
type ComputerBatchParams as ComputerBatchParams,
|
|
614
682
|
type ComputerCaptureScreenshotParams as ComputerCaptureScreenshotParams,
|
|
@@ -619,5 +687,6 @@ export declare namespace Computer {
|
|
|
619
687
|
type ComputerScrollParams as ComputerScrollParams,
|
|
620
688
|
type ComputerSetCursorVisibilityParams as ComputerSetCursorVisibilityParams,
|
|
621
689
|
type ComputerTypeTextParams as ComputerTypeTextParams,
|
|
690
|
+
type ComputerWriteClipboardParams as ComputerWriteClipboardParams,
|
|
622
691
|
};
|
|
623
692
|
}
|
|
@@ -17,6 +17,9 @@ import { RequestOptions } from '../../../internal/request-options';
|
|
|
17
17
|
import { multipartFormRequestOptions } from '../../../internal/uploads';
|
|
18
18
|
import { path } from '../../../internal/utils/path';
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Read, write, and manage files on the browser instance.
|
|
22
|
+
*/
|
|
20
23
|
export class Fs extends APIResource {
|
|
21
24
|
watch: WatchAPI.Watch = new WatchAPI.Watch(this._client);
|
|
22
25
|
|
|
@@ -7,6 +7,9 @@ import { buildHeaders } from '../../../internal/headers';
|
|
|
7
7
|
import { RequestOptions } from '../../../internal/request-options';
|
|
8
8
|
import { path } from '../../../internal/utils/path';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Read, write, and manage files on the browser instance.
|
|
12
|
+
*/
|
|
10
13
|
export class Watch extends APIResource {
|
|
11
14
|
/**
|
|
12
15
|
* Stream filesystem events for a watch
|
|
@@ -22,6 +22,7 @@ export {
|
|
|
22
22
|
export {
|
|
23
23
|
Computer,
|
|
24
24
|
type ComputerGetMousePositionResponse,
|
|
25
|
+
type ComputerReadClipboardResponse,
|
|
25
26
|
type ComputerSetCursorVisibilityResponse,
|
|
26
27
|
type ComputerBatchParams,
|
|
27
28
|
type ComputerCaptureScreenshotParams,
|
|
@@ -32,6 +33,7 @@ export {
|
|
|
32
33
|
type ComputerScrollParams,
|
|
33
34
|
type ComputerSetCursorVisibilityParams,
|
|
34
35
|
type ComputerTypeTextParams,
|
|
36
|
+
type ComputerWriteClipboardParams,
|
|
35
37
|
} from './computer';
|
|
36
38
|
export {
|
|
37
39
|
Fs,
|
|
@@ -8,6 +8,9 @@ import { buildHeaders } from '../../internal/headers';
|
|
|
8
8
|
import { RequestOptions } from '../../internal/request-options';
|
|
9
9
|
import { path } from '../../internal/utils/path';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Stream logs from the browser instance.
|
|
13
|
+
*/
|
|
11
14
|
export class Logs extends APIResource {
|
|
12
15
|
/**
|
|
13
16
|
* Stream log files on the browser instance via SSE
|
|
@@ -5,6 +5,9 @@ import { APIPromise } from '../../core/api-promise';
|
|
|
5
5
|
import { RequestOptions } from '../../internal/request-options';
|
|
6
6
|
import { path } from '../../internal/utils/path';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Execute Playwright code against the browser instance.
|
|
10
|
+
*/
|
|
8
11
|
export class Playwright extends APIResource {
|
|
9
12
|
/**
|
|
10
13
|
* Execute arbitrary Playwright code in a fresh execution context against the
|
|
@@ -7,6 +7,9 @@ import { buildHeaders } from '../../internal/headers';
|
|
|
7
7
|
import { RequestOptions } from '../../internal/request-options';
|
|
8
8
|
import { path } from '../../internal/utils/path';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Execute and manage processes on the browser instance.
|
|
12
|
+
*/
|
|
10
13
|
export class Process extends APIResource {
|
|
11
14
|
/**
|
|
12
15
|
* Execute a command synchronously
|
|
@@ -6,6 +6,9 @@ import { buildHeaders } from '../../internal/headers';
|
|
|
6
6
|
import { RequestOptions } from '../../internal/request-options';
|
|
7
7
|
import { path } from '../../internal/utils/path';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Record and manage browser session video replays.
|
|
11
|
+
*/
|
|
9
12
|
export class Replays extends APIResource {
|
|
10
13
|
/**
|
|
11
14
|
* List all replays for the specified browser session.
|
|
@@ -6,6 +6,9 @@ import { buildHeaders } from '../internal/headers';
|
|
|
6
6
|
import { RequestOptions } from '../internal/request-options';
|
|
7
7
|
import { path } from '../internal/utils/path';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Configure external credential providers like 1Password.
|
|
11
|
+
*/
|
|
9
12
|
export class CredentialProviders extends APIResource {
|
|
10
13
|
/**
|
|
11
14
|
* Configure an external credential provider (e.g., 1Password) for automatic
|
|
@@ -7,6 +7,9 @@ import { buildHeaders } from '../internal/headers';
|
|
|
7
7
|
import { RequestOptions } from '../internal/request-options';
|
|
8
8
|
import { path } from '../internal/utils/path';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Create and manage credentials for authentication.
|
|
12
|
+
*/
|
|
10
13
|
export class Credentials extends APIResource {
|
|
11
14
|
/**
|
|
12
15
|
* Create a new credential for storing login information.
|
|
@@ -11,6 +11,9 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
11
11
|
import { multipartFormRequestOptions } from '../internal/uploads';
|
|
12
12
|
import { path } from '../internal/utils/path';
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Create and manage app deployments and stream deployment events.
|
|
16
|
+
*/
|
|
14
17
|
export class Deployments extends APIResource {
|
|
15
18
|
/**
|
|
16
19
|
* Create a new deployment.
|
|
@@ -8,6 +8,9 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
8
8
|
import { multipartFormRequestOptions } from '../internal/uploads';
|
|
9
9
|
import { path } from '../internal/utils/path';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Create, list, retrieve, and delete browser extensions.
|
|
13
|
+
*/
|
|
11
14
|
export class Extensions extends APIResource {
|
|
12
15
|
/**
|
|
13
16
|
* List extensions owned by the caller's organization.
|
|
@@ -10,6 +10,9 @@ import { buildHeaders } from '../internal/headers';
|
|
|
10
10
|
import { RequestOptions } from '../internal/request-options';
|
|
11
11
|
import { path } from '../internal/utils/path';
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Invoke actions and stream or query invocation status and events.
|
|
15
|
+
*/
|
|
13
16
|
export class Invocations extends APIResource {
|
|
14
17
|
/**
|
|
15
18
|
* Invoke an action.
|
|
@@ -9,6 +9,9 @@ import { buildHeaders } from '../internal/headers';
|
|
|
9
9
|
import { RequestOptions } from '../internal/request-options';
|
|
10
10
|
import { path } from '../internal/utils/path';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Create, list, retrieve, and delete browser profiles.
|
|
14
|
+
*/
|
|
12
15
|
export class Profiles extends APIResource {
|
|
13
16
|
/**
|
|
14
17
|
* Create a browser profile that can be used to load state into future browser
|
package/src/resources/proxies.ts
CHANGED
|
@@ -6,6 +6,9 @@ import { buildHeaders } from '../internal/headers';
|
|
|
6
6
|
import { RequestOptions } from '../internal/request-options';
|
|
7
7
|
import { path } from '../internal/utils/path';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Create and manage proxy configurations for routing browser traffic.
|
|
11
|
+
*/
|
|
9
12
|
export class Proxies extends APIResource {
|
|
10
13
|
/**
|
|
11
14
|
* Create a new proxy configuration for the caller's organization.
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.42.
|
|
1
|
+
export const VERSION = '0.42.1'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.42.
|
|
1
|
+
export declare const VERSION = "0.42.1";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.42.
|
|
1
|
+
export declare const VERSION = "0.42.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.42.
|
|
1
|
+
export const VERSION = '0.42.1'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|