@onkernel/sdk 0.96.0 → 0.98.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 (120) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/package.json +1 -1
  3. package/resources/auth/connections.d.mts +5 -3
  4. package/resources/auth/connections.d.mts.map +1 -1
  5. package/resources/auth/connections.d.ts +5 -3
  6. package/resources/auth/connections.d.ts.map +1 -1
  7. package/resources/browsers/browsers.d.mts +23 -15
  8. package/resources/browsers/browsers.d.mts.map +1 -1
  9. package/resources/browsers/browsers.d.ts +23 -15
  10. package/resources/browsers/browsers.d.ts.map +1 -1
  11. package/resources/browsers/browsers.js +23 -15
  12. package/resources/browsers/browsers.js.map +1 -1
  13. package/resources/browsers/browsers.mjs +23 -15
  14. package/resources/browsers/browsers.mjs.map +1 -1
  15. package/resources/browsers/computer.d.mts +62 -45
  16. package/resources/browsers/computer.d.mts.map +1 -1
  17. package/resources/browsers/computer.d.ts +62 -45
  18. package/resources/browsers/computer.d.ts.map +1 -1
  19. package/resources/browsers/computer.js +74 -57
  20. package/resources/browsers/computer.js.map +1 -1
  21. package/resources/browsers/computer.mjs +74 -57
  22. package/resources/browsers/computer.mjs.map +1 -1
  23. package/resources/browsers/fs/fs.d.mts +61 -47
  24. package/resources/browsers/fs/fs.d.mts.map +1 -1
  25. package/resources/browsers/fs/fs.d.ts +61 -47
  26. package/resources/browsers/fs/fs.d.ts.map +1 -1
  27. package/resources/browsers/fs/fs.js +73 -59
  28. package/resources/browsers/fs/fs.js.map +1 -1
  29. package/resources/browsers/fs/fs.mjs +73 -59
  30. package/resources/browsers/fs/fs.mjs.map +1 -1
  31. package/resources/browsers/fs/watch.d.mts +8 -8
  32. package/resources/browsers/fs/watch.d.mts.map +1 -1
  33. package/resources/browsers/fs/watch.d.ts +8 -8
  34. package/resources/browsers/fs/watch.d.ts.map +1 -1
  35. package/resources/browsers/fs/watch.js +9 -9
  36. package/resources/browsers/fs/watch.js.map +1 -1
  37. package/resources/browsers/fs/watch.mjs +9 -9
  38. package/resources/browsers/fs/watch.mjs.map +1 -1
  39. package/resources/browsers/index.d.mts +2 -1
  40. package/resources/browsers/index.d.mts.map +1 -1
  41. package/resources/browsers/index.d.ts +2 -1
  42. package/resources/browsers/index.d.ts.map +1 -1
  43. package/resources/browsers/index.js +3 -1
  44. package/resources/browsers/index.js.map +1 -1
  45. package/resources/browsers/index.mjs +1 -0
  46. package/resources/browsers/index.mjs.map +1 -1
  47. package/resources/browsers/logs.d.mts +5 -4
  48. package/resources/browsers/logs.d.mts.map +1 -1
  49. package/resources/browsers/logs.d.ts +5 -4
  50. package/resources/browsers/logs.d.ts.map +1 -1
  51. package/resources/browsers/logs.js +6 -5
  52. package/resources/browsers/logs.js.map +1 -1
  53. package/resources/browsers/logs.mjs +6 -5
  54. package/resources/browsers/logs.mjs.map +1 -1
  55. package/resources/browsers/playwright.d.mts +7 -4
  56. package/resources/browsers/playwright.d.mts.map +1 -1
  57. package/resources/browsers/playwright.d.ts +7 -4
  58. package/resources/browsers/playwright.d.ts.map +1 -1
  59. package/resources/browsers/playwright.js +8 -5
  60. package/resources/browsers/playwright.js.map +1 -1
  61. package/resources/browsers/playwright.mjs +8 -5
  62. package/resources/browsers/playwright.mjs.map +1 -1
  63. package/resources/browsers/process.d.mts +31 -23
  64. package/resources/browsers/process.d.mts.map +1 -1
  65. package/resources/browsers/process.d.ts +31 -23
  66. package/resources/browsers/process.d.ts.map +1 -1
  67. package/resources/browsers/process.js +33 -25
  68. package/resources/browsers/process.js.map +1 -1
  69. package/resources/browsers/process.mjs +33 -25
  70. package/resources/browsers/process.mjs.map +1 -1
  71. package/resources/browsers/replays.d.mts +14 -10
  72. package/resources/browsers/replays.d.mts.map +1 -1
  73. package/resources/browsers/replays.d.ts +14 -10
  74. package/resources/browsers/replays.d.ts.map +1 -1
  75. package/resources/browsers/replays.js +16 -12
  76. package/resources/browsers/replays.js.map +1 -1
  77. package/resources/browsers/replays.mjs +16 -12
  78. package/resources/browsers/replays.mjs.map +1 -1
  79. package/resources/browsers/telemetry.d.mts +158 -12
  80. package/resources/browsers/telemetry.d.mts.map +1 -1
  81. package/resources/browsers/telemetry.d.ts +158 -12
  82. package/resources/browsers/telemetry.d.ts.map +1 -1
  83. package/resources/browsers/telemetry.js +6 -6
  84. package/resources/browsers/telemetry.js.map +1 -1
  85. package/resources/browsers/telemetry.mjs +6 -6
  86. package/resources/browsers/telemetry.mjs.map +1 -1
  87. package/resources/browsers/webmcp.d.mts +148 -0
  88. package/resources/browsers/webmcp.d.mts.map +1 -0
  89. package/resources/browsers/webmcp.d.ts +148 -0
  90. package/resources/browsers/webmcp.d.ts.map +1 -0
  91. package/resources/browsers/webmcp.js +51 -0
  92. package/resources/browsers/webmcp.js.map +1 -0
  93. package/resources/browsers/webmcp.mjs +47 -0
  94. package/resources/browsers/webmcp.mjs.map +1 -0
  95. package/resources/telemetry/destinations.d.mts +23 -12
  96. package/resources/telemetry/destinations.d.mts.map +1 -1
  97. package/resources/telemetry/destinations.d.ts +23 -12
  98. package/resources/telemetry/destinations.d.ts.map +1 -1
  99. package/resources/telemetry/destinations.js +18 -8
  100. package/resources/telemetry/destinations.js.map +1 -1
  101. package/resources/telemetry/destinations.mjs +18 -8
  102. package/resources/telemetry/destinations.mjs.map +1 -1
  103. package/src/resources/auth/connections.ts +5 -2
  104. package/src/resources/browsers/browsers.ts +55 -15
  105. package/src/resources/browsers/computer.ts +78 -57
  106. package/src/resources/browsers/fs/fs.ts +93 -59
  107. package/src/resources/browsers/fs/watch.ts +13 -13
  108. package/src/resources/browsers/index.ts +14 -0
  109. package/src/resources/browsers/logs.ts +10 -5
  110. package/src/resources/browsers/playwright.ts +8 -5
  111. package/src/resources/browsers/process.ts +47 -35
  112. package/src/resources/browsers/replays.ts +20 -16
  113. package/src/resources/browsers/telemetry.ts +208 -13
  114. package/src/resources/browsers/webmcp.ts +196 -0
  115. package/src/resources/telemetry/destinations.ts +23 -12
  116. package/src/version.ts +1 -1
  117. package/version.d.mts +1 -1
  118. package/version.d.ts +1 -1
  119. package/version.js +1 -1
  120. package/version.mjs +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"destinations.js","sourceRoot":"","sources":["../../src/resources/telemetry/destinations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAAmG;AACnG,uDAAsD;AAEtD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;OAGG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,QAAgB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,2BAA2B,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CACJ,QAAgB,EAChB,IAA6B,EAC7B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,2BAA2B,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,yBAAyB,EAAE,CAAA,6BAAiC,CAAA,EAAE;YAC3F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,QAAgB,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,2BAA2B,QAAQ,EAAE,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;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,2BAA2B,QAAQ,EAAE,EAAE;YACpE,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AAtED,oCAsEC"}
@@ -8,14 +8,18 @@ import { path } from "../../internal/utils/path.mjs";
8
8
  */
9
9
  export class Destinations extends APIResource {
10
10
  /**
11
- * Create an OTLP export destination in the resolved project. Names must be unique
12
- * within the project.
11
+ * Create an OTLP export destination in the authenticated organization. Names must
12
+ * be unique within the organization. Requires an organization-scoped credential or
13
+ * dashboard authentication; project-scoped credentials receive a 403.
13
14
  */
14
15
  create(body, options) {
15
16
  return this._client.post('/telemetry/destinations', { body, ...options });
16
17
  }
17
18
  /**
18
- * Retrieve a single OTLP destination in the resolved project by its ID or name.
19
+ * Retrieve a customer-visible OTLP destination in the authenticated organization
20
+ * by its ID or name. Project-scoped credentials can retrieve these destinations
21
+ * for selection by workloads in their project. Non-dashboard reads return header
22
+ * values redacted.
19
23
  */
20
24
  retrieve(idOrName, options) {
21
25
  return this._client.get(path `/telemetry/destinations/${idOrName}`, options);
@@ -25,16 +29,20 @@ export class Destinations extends APIResource {
25
29
  * values without restarting, which makes this the way to rotate credentials
26
30
  * without interrupting export.
27
31
  *
28
- * Names must be unique within the project. Renaming is refused with a 409 while a
29
- * managed auth connection selects this destination by name, since that connection
30
- * resolves the name on every login. Every other field, including `headers`, stays
31
- * editable.
32
+ * Names must be unique within the organization. Renaming is refused with a 409
33
+ * while a managed auth connection selects this destination by name, since that
34
+ * connection resolves the name on every login. Every other field, including
35
+ * `headers`, stays editable. Requires an organization-scoped credential or
36
+ * dashboard authentication; project-scoped credentials receive a 403.
32
37
  */
33
38
  update(idOrName, body, options) {
34
39
  return this._client.patch(path `/telemetry/destinations/${idOrName}`, { body, ...options });
35
40
  }
36
41
  /**
37
- * List OTLP export destinations in the resolved project.
42
+ * List customer-visible OTLP export destinations in the authenticated
43
+ * organization. Project-scoped credentials can list these destinations for
44
+ * selection by workloads in their project. Non-dashboard reads return header
45
+ * values redacted.
38
46
  */
39
47
  list(query = {}, options) {
40
48
  return this._client.getAPIList('/telemetry/destinations', (OffsetPagination), {
@@ -48,6 +56,8 @@ export class Destinations extends APIResource {
48
56
  * end or delete them first. It is refused the same way while a managed auth
49
57
  * connection still selects it, because that connection re-resolves the destination
50
58
  * on every login, and while a managed auth login using it is still in progress.
59
+ * Requires an organization-scoped credential or dashboard authentication;
60
+ * project-scoped credentials receive a 403.
51
61
  */
52
62
  delete(idOrName, options) {
53
63
  return this._client.delete(path `/telemetry/destinations/${idOrName}`, {
@@ -1 +1 @@
1
- {"version":3,"file":"destinations.mjs","sourceRoot":"","sources":["../../src/resources/telemetry/destinations.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,EAAE,gBAAgB,EAA4C,kCAA8B;AACnG,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;OAGG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,QAAgB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,2BAA2B,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CACJ,QAAgB,EAChB,IAA6B,EAC7B,OA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G,CAAC,IAAI,CAAA,2BAA2B,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CACJ,QAAgB,EAChB,IAA6B,EAC7B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,2BAA2B,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;;;;OAKG;IACH,IAAI,CACF,QAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,yBAAyB,EAAE,CAAA,gBAAiC,CAAA,EAAE;YAC3F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,QAAgB,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,2BAA2B,QAAQ,EAAE,EAAE;YACpE,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -332,8 +332,10 @@ export interface ManagedAuth {
332
332
  * - `viable_plans_found` — at least one stored login plan can be replayed
333
333
  * - `no_requirements_recorded` — no recorded credential requirements to fail
334
334
  * against
335
- * - `requirements_satisfiable` — recorded requirements can be met by the attached
336
- * credential
335
+ * - `totp_reauth_allowed` — TOTP is the only recorded requirement and is safe to
336
+ * attempt automatically
337
+ * - `requirements_satisfiable` — recorded requirements contain no recognized
338
+ * blocker
337
339
  *
338
340
  * Negative values (a human must complete the login flow):
339
341
  *
@@ -360,6 +362,7 @@ export interface ManagedAuth {
360
362
  | 'has_credential'
361
363
  | 'viable_plans_found'
362
364
  | 'no_requirements_recorded'
365
+ | 'totp_reauth_allowed'
363
366
  | 'requirements_satisfiable'
364
367
  | 'no_prior_successful_login'
365
368
  | 'no_credential'
@@ -55,7 +55,9 @@ import * as TelemetryAPI from './telemetry';
55
55
  import {
56
56
  BrowserAPICallEvent,
57
57
  BrowserCallStack,
58
+ BrowserCaptchaChallengeResultEvent,
58
59
  BrowserCaptchaSolveResultEvent,
60
+ BrowserCaptchaSolveStartedEvent,
59
61
  BrowserCdpCommandEvent,
60
62
  BrowserCdpCommandMethod,
61
63
  BrowserCdpConnectEvent,
@@ -107,6 +109,19 @@ import {
107
109
  TelemetryStreamParams,
108
110
  TelemetryStreamResponse,
109
111
  } from './telemetry';
112
+ import * as WebmcpAPI from './webmcp';
113
+ import {
114
+ InvocationFailure,
115
+ InvocationResult,
116
+ InvokeRequest,
117
+ Tool,
118
+ ToolAnnotations,
119
+ ToolFrame,
120
+ ToolSource,
121
+ ToolsResponse,
122
+ Webmcp,
123
+ WebmcpInvokeToolParams,
124
+ } from './webmcp';
110
125
  import * as FsAPI from './fs/fs';
111
126
  import {
112
127
  FCreateDirectoryParams,
@@ -145,6 +160,7 @@ export class Browsers extends APIResource {
145
160
  logs: LogsAPI.Logs = new LogsAPI.Logs(this._client);
146
161
  computer: ComputerAPI.Computer = new ComputerAPI.Computer(this._client);
147
162
  playwright: PlaywrightAPI.Playwright = new PlaywrightAPI.Playwright(this._client);
163
+ webmcp: WebmcpAPI.Webmcp = new WebmcpAPI.Webmcp(this._client);
148
164
 
149
165
  /**
150
166
  * Create a new browser session from within an action.
@@ -223,13 +239,14 @@ export class Browsers extends APIResource {
223
239
  *
224
240
  * @example
225
241
  * ```ts
226
- * const response = await client.browsers.curl('id', {
227
- * url: 'url',
228
- * });
242
+ * const response = await client.browsers.curl(
243
+ * 'htzv5orfit78e1m2biiifpbv',
244
+ * { url: 'url' },
245
+ * );
229
246
  * ```
230
247
  */
231
- curl(id: string, body: BrowserCurlParams, options?: RequestOptions): APIPromise<BrowserCurlResponse> {
232
- return this._client.post(path`/browsers/${id}/curl`, { body, ...options });
248
+ curl(idOrName: string, body: BrowserCurlParams, options?: RequestOptions): APIPromise<BrowserCurlResponse> {
249
+ return this._client.post(path`/browsers/${idOrName}/curl`, { body, ...options });
233
250
  }
234
251
 
235
252
  /**
@@ -263,19 +280,26 @@ export class Browsers extends APIResource {
263
280
  *
264
281
  * @example
265
282
  * ```ts
266
- * await client.browsers.loadExtensions('id', {
267
- * extensions: [
268
- * {
269
- * name: 'name',
270
- * zip_file: fs.createReadStream('path/to/file'),
271
- * },
272
- * ],
273
- * });
283
+ * await client.browsers.loadExtensions(
284
+ * 'htzv5orfit78e1m2biiifpbv',
285
+ * {
286
+ * extensions: [
287
+ * {
288
+ * name: 'name',
289
+ * zip_file: fs.createReadStream('path/to/file'),
290
+ * },
291
+ * ],
292
+ * },
293
+ * );
274
294
  * ```
275
295
  */
276
- loadExtensions(id: string, body: BrowserLoadExtensionsParams, options?: RequestOptions): APIPromise<void> {
296
+ loadExtensions(
297
+ idOrName: string,
298
+ body: BrowserLoadExtensionsParams,
299
+ options?: RequestOptions,
300
+ ): APIPromise<void> {
277
301
  return this._client.post(
278
- path`/browsers/${id}/extensions`,
302
+ path`/browsers/${idOrName}/extensions`,
279
303
  multipartFormRequestOptions(
280
304
  { body, ...options, headers: buildHeaders([{ Accept: '*/*' }, options?.headers]) },
281
305
  this._client,
@@ -1619,6 +1643,7 @@ Browsers.Process = Process;
1619
1643
  Browsers.Logs = Logs;
1620
1644
  Browsers.Computer = Computer;
1621
1645
  Browsers.Playwright = Playwright;
1646
+ Browsers.Webmcp = Webmcp;
1622
1647
 
1623
1648
  export declare namespace Browsers {
1624
1649
  export {
@@ -1650,7 +1675,9 @@ export declare namespace Browsers {
1650
1675
  TelemetryAPITelemetry as Telemetry,
1651
1676
  type BrowserAPICallEvent as BrowserAPICallEvent,
1652
1677
  type BrowserCallStack as BrowserCallStack,
1678
+ type BrowserCaptchaChallengeResultEvent as BrowserCaptchaChallengeResultEvent,
1653
1679
  type BrowserCaptchaSolveResultEvent as BrowserCaptchaSolveResultEvent,
1680
+ type BrowserCaptchaSolveStartedEvent as BrowserCaptchaSolveStartedEvent,
1654
1681
  type BrowserCdpCommandEvent as BrowserCdpCommandEvent,
1655
1682
  type BrowserCdpCommandMethod as BrowserCdpCommandMethod,
1656
1683
  type BrowserCdpConnectEvent as BrowserCdpConnectEvent,
@@ -1771,4 +1798,17 @@ export declare namespace Browsers {
1771
1798
  type PlaywrightExecuteResponse as PlaywrightExecuteResponse,
1772
1799
  type PlaywrightExecuteParams as PlaywrightExecuteParams,
1773
1800
  };
1801
+
1802
+ export {
1803
+ Webmcp as Webmcp,
1804
+ type InvocationFailure as InvocationFailure,
1805
+ type InvocationResult as InvocationResult,
1806
+ type InvokeRequest as InvokeRequest,
1807
+ type Tool as Tool,
1808
+ type ToolAnnotations as ToolAnnotations,
1809
+ type ToolFrame as ToolFrame,
1810
+ type ToolSource as ToolSource,
1811
+ type ToolsResponse as ToolsResponse,
1812
+ type WebmcpInvokeToolParams as WebmcpInvokeToolParams,
1813
+ };
1774
1814
  }
@@ -17,13 +17,14 @@ export class Computer extends APIResource {
17
17
  *
18
18
  * @example
19
19
  * ```ts
20
- * await client.browsers.computer.batch('id', {
21
- * actions: [{ type: 'click_mouse' }],
22
- * });
20
+ * await client.browsers.computer.batch(
21
+ * 'htzv5orfit78e1m2biiifpbv',
22
+ * { actions: [{ type: 'click_mouse' }] },
23
+ * );
23
24
  * ```
24
25
  */
25
- batch(id: string, body: ComputerBatchParams, options?: RequestOptions): APIPromise<void> {
26
- return this._client.post(path`/browsers/${id}/computer/batch`, {
26
+ batch(idOrName: string, body: ComputerBatchParams, options?: RequestOptions): APIPromise<void> {
27
+ return this._client.post(path`/browsers/${idOrName}/computer/batch`, {
27
28
  body,
28
29
  ...options,
29
30
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
@@ -36,18 +37,20 @@ export class Computer extends APIResource {
36
37
  * @example
37
38
  * ```ts
38
39
  * const response =
39
- * await client.browsers.computer.captureScreenshot('id');
40
+ * await client.browsers.computer.captureScreenshot(
41
+ * 'htzv5orfit78e1m2biiifpbv',
42
+ * );
40
43
  *
41
44
  * const content = await response.blob();
42
45
  * console.log(content);
43
46
  * ```
44
47
  */
45
48
  captureScreenshot(
46
- id: string,
49
+ idOrName: string,
47
50
  body: ComputerCaptureScreenshotParams | null | undefined = {},
48
51
  options?: RequestOptions,
49
52
  ): APIPromise<Response> {
50
- return this._client.post(path`/browsers/${id}/computer/screenshot`, {
53
+ return this._client.post(path`/browsers/${idOrName}/computer/screenshot`, {
51
54
  body,
52
55
  ...options,
53
56
  headers: buildHeaders([{ Accept: 'image/png' }, options?.headers]),
@@ -60,14 +63,14 @@ export class Computer extends APIResource {
60
63
  *
61
64
  * @example
62
65
  * ```ts
63
- * await client.browsers.computer.clickMouse('id', {
64
- * x: 0,
65
- * y: 0,
66
- * });
66
+ * await client.browsers.computer.clickMouse(
67
+ * 'htzv5orfit78e1m2biiifpbv',
68
+ * { x: 0, y: 0 },
69
+ * );
67
70
  * ```
68
71
  */
69
- clickMouse(id: string, body: ComputerClickMouseParams, options?: RequestOptions): APIPromise<void> {
70
- return this._client.post(path`/browsers/${id}/computer/click_mouse`, {
72
+ clickMouse(idOrName: string, body: ComputerClickMouseParams, options?: RequestOptions): APIPromise<void> {
73
+ return this._client.post(path`/browsers/${idOrName}/computer/click_mouse`, {
71
74
  body,
72
75
  ...options,
73
76
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
@@ -79,16 +82,19 @@ export class Computer extends APIResource {
79
82
  *
80
83
  * @example
81
84
  * ```ts
82
- * await client.browsers.computer.dragMouse('id', {
83
- * path: [
84
- * [0, 0],
85
- * [0, 0],
86
- * ],
87
- * });
85
+ * await client.browsers.computer.dragMouse(
86
+ * 'htzv5orfit78e1m2biiifpbv',
87
+ * {
88
+ * path: [
89
+ * [0, 0],
90
+ * [0, 0],
91
+ * ],
92
+ * },
93
+ * );
88
94
  * ```
89
95
  */
90
- dragMouse(id: string, body: ComputerDragMouseParams, options?: RequestOptions): APIPromise<void> {
91
- return this._client.post(path`/browsers/${id}/computer/drag_mouse`, {
96
+ dragMouse(idOrName: string, body: ComputerDragMouseParams, options?: RequestOptions): APIPromise<void> {
97
+ return this._client.post(path`/browsers/${idOrName}/computer/drag_mouse`, {
92
98
  body,
93
99
  ...options,
94
100
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
@@ -101,11 +107,13 @@ export class Computer extends APIResource {
101
107
  * @example
102
108
  * ```ts
103
109
  * const response =
104
- * await client.browsers.computer.getMousePosition('id');
110
+ * await client.browsers.computer.getMousePosition(
111
+ * 'htzv5orfit78e1m2biiifpbv',
112
+ * );
105
113
  * ```
106
114
  */
107
- getMousePosition(id: string, options?: RequestOptions): APIPromise<ComputerGetMousePositionResponse> {
108
- return this._client.post(path`/browsers/${id}/computer/get_mouse_position`, options);
115
+ getMousePosition(idOrName: string, options?: RequestOptions): APIPromise<ComputerGetMousePositionResponse> {
116
+ return this._client.post(path`/browsers/${idOrName}/computer/get_mouse_position`, options);
109
117
  }
110
118
 
111
119
  /**
@@ -113,14 +121,14 @@ export class Computer extends APIResource {
113
121
  *
114
122
  * @example
115
123
  * ```ts
116
- * await client.browsers.computer.moveMouse('id', {
117
- * x: 0,
118
- * y: 0,
119
- * });
124
+ * await client.browsers.computer.moveMouse(
125
+ * 'htzv5orfit78e1m2biiifpbv',
126
+ * { x: 0, y: 0 },
127
+ * );
120
128
  * ```
121
129
  */
122
- moveMouse(id: string, body: ComputerMoveMouseParams, options?: RequestOptions): APIPromise<void> {
123
- return this._client.post(path`/browsers/${id}/computer/move_mouse`, {
130
+ moveMouse(idOrName: string, body: ComputerMoveMouseParams, options?: RequestOptions): APIPromise<void> {
131
+ return this._client.post(path`/browsers/${idOrName}/computer/move_mouse`, {
124
132
  body,
125
133
  ...options,
126
134
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
@@ -132,13 +140,14 @@ export class Computer extends APIResource {
132
140
  *
133
141
  * @example
134
142
  * ```ts
135
- * await client.browsers.computer.pressKey('id', {
136
- * keys: ['string'],
137
- * });
143
+ * await client.browsers.computer.pressKey(
144
+ * 'htzv5orfit78e1m2biiifpbv',
145
+ * { keys: ['string'] },
146
+ * );
138
147
  * ```
139
148
  */
140
- pressKey(id: string, body: ComputerPressKeyParams, options?: RequestOptions): APIPromise<void> {
141
- return this._client.post(path`/browsers/${id}/computer/press_key`, {
149
+ pressKey(idOrName: string, body: ComputerPressKeyParams, options?: RequestOptions): APIPromise<void> {
150
+ return this._client.post(path`/browsers/${idOrName}/computer/press_key`, {
142
151
  body,
143
152
  ...options,
144
153
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
@@ -151,11 +160,13 @@ export class Computer extends APIResource {
151
160
  * @example
152
161
  * ```ts
153
162
  * const response =
154
- * await client.browsers.computer.readClipboard('id');
163
+ * await client.browsers.computer.readClipboard(
164
+ * 'htzv5orfit78e1m2biiifpbv',
165
+ * );
155
166
  * ```
156
167
  */
157
- readClipboard(id: string, options?: RequestOptions): APIPromise<ComputerReadClipboardResponse> {
158
- return this._client.post(path`/browsers/${id}/computer/clipboard/read`, options);
168
+ readClipboard(idOrName: string, options?: RequestOptions): APIPromise<ComputerReadClipboardResponse> {
169
+ return this._client.post(path`/browsers/${idOrName}/computer/clipboard/read`, options);
159
170
  }
160
171
 
161
172
  /**
@@ -163,11 +174,14 @@ export class Computer extends APIResource {
163
174
  *
164
175
  * @example
165
176
  * ```ts
166
- * await client.browsers.computer.scroll('id', { x: 0, y: 0 });
177
+ * await client.browsers.computer.scroll(
178
+ * 'htzv5orfit78e1m2biiifpbv',
179
+ * { x: 0, y: 0 },
180
+ * );
167
181
  * ```
168
182
  */
169
- scroll(id: string, body: ComputerScrollParams, options?: RequestOptions): APIPromise<void> {
170
- return this._client.post(path`/browsers/${id}/computer/scroll`, {
183
+ scroll(idOrName: string, body: ComputerScrollParams, options?: RequestOptions): APIPromise<void> {
184
+ return this._client.post(path`/browsers/${idOrName}/computer/scroll`, {
171
185
  body,
172
186
  ...options,
173
187
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
@@ -180,17 +194,18 @@ export class Computer extends APIResource {
180
194
  * @example
181
195
  * ```ts
182
196
  * const response =
183
- * await client.browsers.computer.setCursorVisibility('id', {
184
- * hidden: true,
185
- * });
197
+ * await client.browsers.computer.setCursorVisibility(
198
+ * 'htzv5orfit78e1m2biiifpbv',
199
+ * { hidden: true },
200
+ * );
186
201
  * ```
187
202
  */
188
203
  setCursorVisibility(
189
- id: string,
204
+ idOrName: string,
190
205
  body: ComputerSetCursorVisibilityParams,
191
206
  options?: RequestOptions,
192
207
  ): APIPromise<ComputerSetCursorVisibilityResponse> {
193
- return this._client.post(path`/browsers/${id}/computer/cursor`, { body, ...options });
208
+ return this._client.post(path`/browsers/${idOrName}/computer/cursor`, { body, ...options });
194
209
  }
195
210
 
196
211
  /**
@@ -198,13 +213,14 @@ export class Computer extends APIResource {
198
213
  *
199
214
  * @example
200
215
  * ```ts
201
- * await client.browsers.computer.typeText('id', {
202
- * text: 'text',
203
- * });
216
+ * await client.browsers.computer.typeText(
217
+ * 'htzv5orfit78e1m2biiifpbv',
218
+ * { text: 'text' },
219
+ * );
204
220
  * ```
205
221
  */
206
- typeText(id: string, body: ComputerTypeTextParams, options?: RequestOptions): APIPromise<void> {
207
- return this._client.post(path`/browsers/${id}/computer/type`, {
222
+ typeText(idOrName: string, body: ComputerTypeTextParams, options?: RequestOptions): APIPromise<void> {
223
+ return this._client.post(path`/browsers/${idOrName}/computer/type`, {
208
224
  body,
209
225
  ...options,
210
226
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
@@ -216,13 +232,18 @@ export class Computer extends APIResource {
216
232
  *
217
233
  * @example
218
234
  * ```ts
219
- * await client.browsers.computer.writeClipboard('id', {
220
- * text: 'text',
221
- * });
235
+ * await client.browsers.computer.writeClipboard(
236
+ * 'htzv5orfit78e1m2biiifpbv',
237
+ * { text: 'text' },
238
+ * );
222
239
  * ```
223
240
  */
224
- writeClipboard(id: string, body: ComputerWriteClipboardParams, options?: RequestOptions): APIPromise<void> {
225
- return this._client.post(path`/browsers/${id}/computer/clipboard/write`, {
241
+ writeClipboard(
242
+ idOrName: string,
243
+ body: ComputerWriteClipboardParams,
244
+ options?: RequestOptions,
245
+ ): APIPromise<void> {
246
+ return this._client.post(path`/browsers/${idOrName}/computer/clipboard/write`, {
226
247
  body,
227
248
  ...options,
228
249
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),