@onkernel/sdk 0.126.0 → 0.128.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 (82) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/browser-pools.d.mts +19 -5
  10. package/resources/browser-pools.d.mts.map +1 -1
  11. package/resources/browser-pools.d.ts +19 -5
  12. package/resources/browser-pools.d.ts.map +1 -1
  13. package/resources/browsers/browsers.d.mts +130 -5
  14. package/resources/browsers/browsers.d.mts.map +1 -1
  15. package/resources/browsers/browsers.d.ts +130 -5
  16. package/resources/browsers/browsers.d.ts.map +1 -1
  17. package/resources/browsers/browsers.js.map +1 -1
  18. package/resources/browsers/browsers.mjs.map +1 -1
  19. package/resources/browsers/index.d.mts +1 -1
  20. package/resources/browsers/index.d.mts.map +1 -1
  21. package/resources/browsers/index.d.ts +1 -1
  22. package/resources/browsers/index.d.ts.map +1 -1
  23. package/resources/browsers/index.js.map +1 -1
  24. package/resources/browsers/index.mjs.map +1 -1
  25. package/resources/browsers/telemetry.d.mts +14 -6
  26. package/resources/browsers/telemetry.d.mts.map +1 -1
  27. package/resources/browsers/telemetry.d.ts +14 -6
  28. package/resources/browsers/telemetry.d.ts.map +1 -1
  29. package/resources/index.d.mts +1 -1
  30. package/resources/index.d.mts.map +1 -1
  31. package/resources/index.d.ts +1 -1
  32. package/resources/index.d.ts.map +1 -1
  33. package/resources/index.js.map +1 -1
  34. package/resources/index.mjs.map +1 -1
  35. package/resources/invocations.d.mts +4 -0
  36. package/resources/invocations.d.mts.map +1 -1
  37. package/resources/invocations.d.ts +4 -0
  38. package/resources/invocations.d.ts.map +1 -1
  39. package/resources/proxies.d.mts +14 -13
  40. package/resources/proxies.d.mts.map +1 -1
  41. package/resources/proxies.d.ts +14 -13
  42. package/resources/proxies.d.ts.map +1 -1
  43. package/resources/proxies.js +18 -17
  44. package/resources/proxies.js.map +1 -1
  45. package/resources/proxies.mjs +18 -17
  46. package/resources/proxies.mjs.map +1 -1
  47. package/resources/vaults/index.d.mts +1 -1
  48. package/resources/vaults/index.d.mts.map +1 -1
  49. package/resources/vaults/index.d.ts +1 -1
  50. package/resources/vaults/index.d.ts.map +1 -1
  51. package/resources/vaults/index.js.map +1 -1
  52. package/resources/vaults/index.mjs.map +1 -1
  53. package/resources/vaults/items.d.mts +292 -154
  54. package/resources/vaults/items.d.mts.map +1 -1
  55. package/resources/vaults/items.d.ts +292 -154
  56. package/resources/vaults/items.d.ts.map +1 -1
  57. package/resources/vaults/items.js +13 -9
  58. package/resources/vaults/items.js.map +1 -1
  59. package/resources/vaults/items.mjs +13 -9
  60. package/resources/vaults/items.mjs.map +1 -1
  61. package/resources/vaults/vaults.d.mts +2 -2
  62. package/resources/vaults/vaults.d.mts.map +1 -1
  63. package/resources/vaults/vaults.d.ts +2 -2
  64. package/resources/vaults/vaults.d.ts.map +1 -1
  65. package/resources/vaults/vaults.js.map +1 -1
  66. package/resources/vaults/vaults.mjs.map +1 -1
  67. package/src/client.ts +10 -0
  68. package/src/resources/browser-pools.ts +21 -5
  69. package/src/resources/browsers/browsers.ts +155 -4
  70. package/src/resources/browsers/index.ts +5 -0
  71. package/src/resources/browsers/telemetry.ts +16 -3
  72. package/src/resources/index.ts +5 -0
  73. package/src/resources/invocations.ts +5 -0
  74. package/src/resources/proxies.ts +22 -17
  75. package/src/resources/vaults/index.ts +1 -0
  76. package/src/resources/vaults/items.ts +299 -154
  77. package/src/resources/vaults/vaults.ts +2 -0
  78. package/src/version.ts +1 -1
  79. package/version.d.mts +1 -1
  80. package/version.d.ts +1 -1
  81. package/version.js +1 -1
  82. package/version.mjs +1 -1
@@ -346,15 +346,96 @@ export type BrowserListResponsesOffsetPagination = OffsetPagination<BrowserListR
346
346
 
347
347
  export type ProfilesOffsetPagination = OffsetPagination<Profile>;
348
348
 
349
+ export interface BrowserAllowlistState {
350
+ /**
351
+ * Opaque revision to pass as network.expected_allowlist_revision on an update.
352
+ */
353
+ revision: string;
354
+
355
+ /**
356
+ * Revision against which that mutation was accepted; reuse it when retrying the
357
+ * mutation.
358
+ */
359
+ base_revision?: string;
360
+
361
+ /**
362
+ * ID of the last conditional allowlist update saved on this browser.
363
+ */
364
+ mutation_id?: string;
365
+ }
366
+
367
+ export interface BrowserLocation {
368
+ /**
369
+ * Effective canonical BCP 47 formatting locale selected for the browser session.
370
+ */
371
+ locale: string;
372
+
373
+ /**
374
+ * Where one effective browser location field came from. `override` is set
375
+ * explicitly on the session; `metro` is the default for the browser's region.
376
+ */
377
+ locale_source: BrowserLocationSource;
378
+
379
+ /**
380
+ * Effective IANA timezone selected for the browser session.
381
+ */
382
+ timezone: string;
383
+
384
+ /**
385
+ * Where one effective browser location field came from. `override` is set
386
+ * explicitly on the session; `metro` is the default for the browser's region.
387
+ */
388
+ timezone_source: BrowserLocationSource;
389
+ }
390
+
391
+ export interface BrowserLocationRequest {
392
+ /**
393
+ * Session-only supported canonical BCP 47 locale override. Omit to use the default
394
+ * for the browser's region.
395
+ */
396
+ locale?: string;
397
+
398
+ /**
399
+ * Session-only IANA timezone override. Omit to use the default for the browser's
400
+ * region.
401
+ */
402
+ timezone?: string;
403
+ }
404
+
405
+ /**
406
+ * Where one effective browser location field came from. `override` is set
407
+ * explicitly on the session; `metro` is the default for the browser's region.
408
+ */
409
+ export type BrowserLocationSource = 'override' | 'metro';
410
+
411
+ /**
412
+ * Omit a field to leave it unchanged, set a string override, or set null to clear
413
+ * the override and use the default for the browser's region.
414
+ */
415
+ export interface BrowserLocationUpdateRequest {
416
+ /**
417
+ * Session-only supported canonical BCP 47 locale override. Null clears the
418
+ * override and uses the browser region's default.
419
+ */
420
+ locale?: string | null;
421
+
422
+ /**
423
+ * Session-only IANA timezone override. Null clears the override and uses the
424
+ * browser region's default.
425
+ */
426
+ timezone?: string | null;
427
+ }
428
+
349
429
  /**
350
430
  * Memory allocated to the browser session.
351
431
  */
352
- export type BrowserMemory = '1GiB' | '2GiB' | '6GiB' | '8GiB' | '12GiB' | '16GiB';
432
+ export type BrowserMemory = '1GiB' | '2GiB' | '4GiB' | '6GiB' | '8GiB' | '12GiB' | '16GiB';
353
433
 
354
434
  /**
355
- * Memory requested for a headful, non-GPU browser session.
435
+ * Memory requested for a non-GPU browser. Headless browsers support 1GiB
436
+ * (default), 2GiB, or 4GiB; headful browsers support 8GiB (default) or 16GiB.
356
437
  */
357
- export type BrowserMemoryRequest = '8GiB' | '16GiB';
438
+ export type BrowserMemoryRequest = '1GiB' | '2GiB' | '4GiB' | '8GiB' | '16GiB';
358
439
 
359
440
  /**
360
441
  * Network configuration for a browser session or browser pool.
@@ -387,6 +468,14 @@ export interface BrowserNetworkConfig {
387
468
  */
388
469
  allowed_hosts?: Array<string>;
389
470
 
471
+ /**
472
+ * Concurrency metadata for a browser's saved allowlist configuration. Browser
473
+ * pools omit it. This remains present after removal so an uncertain removal can be
474
+ * retried. It does not prove proxy or VM application completed. Do not include it
475
+ * in creation or pool updates.
476
+ */
477
+ allowlist_state?: BrowserAllowlistState;
478
+
390
479
  /**
391
480
  * Destinations the browser reaches directly through the session's own network
392
481
  * instead of through Kernel-managed egress — for private hosts reachable over a
@@ -483,6 +572,25 @@ export interface BrowserNetworkUpdate {
483
572
  * to some requests.
484
573
  */
485
574
  allowed_hosts?: Array<string> | null;
575
+
576
+ /**
577
+ * The network.allowlist_state.revision from the browser's last saved snapshot.
578
+ * Supply together with mutation_id to opt into conditional allowlist updates. The
579
+ * revision is checked atomically with the configuration write. A stale request
580
+ * returns 409 stale_network without changing the allowlist. A GET alone does not
581
+ * fence an earlier unfinished PATCH.
582
+ */
583
+ expected_allowlist_revision?: string;
584
+
585
+ /**
586
+ * A unique ID for this allowlist update, supplied together with
587
+ * expected_allowlist_revision. Reuse both values and the identical allowed_hosts
588
+ * payload when retrying an uncertain update. If it is still the current mutation,
589
+ * the retry finishes proxy and VM application without creating another revision. A
590
+ * superseded mutation returns 409 stale_network. These fields guard only
591
+ * network.allowed_hosts, not other browser update fields.
592
+ */
593
+ mutation_id?: string;
486
594
  }
487
595
 
488
596
  /**
@@ -804,6 +912,11 @@ export interface BrowserCreateResponse {
804
912
  */
805
913
  kiosk_mode?: boolean;
806
914
 
915
+ /**
916
+ * Effective browser timezone and locale with per-field provenance.
917
+ */
918
+ location?: BrowserLocation;
919
+
807
920
  /**
808
921
  * Human-readable name of the browser session, if one was set at creation.
809
922
  */
@@ -980,6 +1093,11 @@ export interface BrowserRetrieveResponse {
980
1093
  */
981
1094
  kiosk_mode?: boolean;
982
1095
 
1096
+ /**
1097
+ * Effective browser timezone and locale with per-field provenance.
1098
+ */
1099
+ location?: BrowserLocation;
1100
+
983
1101
  /**
984
1102
  * Human-readable name of the browser session, if one was set at creation.
985
1103
  */
@@ -1156,6 +1274,11 @@ export interface BrowserUpdateResponse {
1156
1274
  */
1157
1275
  kiosk_mode?: boolean;
1158
1276
 
1277
+ /**
1278
+ * Effective browser timezone and locale with per-field provenance.
1279
+ */
1280
+ location?: BrowserLocation;
1281
+
1159
1282
  /**
1160
1283
  * Human-readable name of the browser session, if one was set at creation.
1161
1284
  */
@@ -1332,6 +1455,11 @@ export interface BrowserListResponse {
1332
1455
  */
1333
1456
  kiosk_mode?: boolean;
1334
1457
 
1458
+ /**
1459
+ * Effective browser timezone and locale with per-field provenance.
1460
+ */
1461
+ location?: BrowserLocation;
1462
+
1335
1463
  /**
1336
1464
  * Human-readable name of the browser session, if one was set at creation.
1337
1465
  */
@@ -1491,7 +1619,14 @@ export interface BrowserCreateParams {
1491
1619
  kiosk_mode?: boolean;
1492
1620
 
1493
1621
  /**
1494
- * Memory for a headful, non-GPU browser session. Defaults to 8GiB.
1622
+ * Optional session-only timezone and locale overrides. Each omitted field uses the
1623
+ * default for the browser's region. start_url opens once the location applies.
1624
+ */
1625
+ location?: BrowserLocationRequest;
1626
+
1627
+ /**
1628
+ * Memory for a non-GPU browser. Headless: 1GiB (default), 2GiB, or 4GiB. Headful:
1629
+ * 8GiB (default) or 16GiB.
1495
1630
  */
1496
1631
  memory?: BrowserMemoryRequest;
1497
1632
 
@@ -1734,6 +1869,17 @@ export interface BrowserUpdateParams {
1734
1869
  */
1735
1870
  disable_default_proxy?: boolean;
1736
1871
 
1872
+ /**
1873
+ * Session-only timezone and locale overrides. Omit the object or a field to leave
1874
+ * it unchanged; set a string to override; set null to clear that field and use the
1875
+ * browser region's default. A browser that cannot change location refuses the
1876
+ * request before anything changes. The location applies after the request's other
1877
+ * changes, and start_url opens once it has applied. If applying it fails, the
1878
+ * other changes and the saved override remain and start_url does not open; retry
1879
+ * the request to apply both.
1880
+ */
1881
+ location?: BrowserLocationUpdateRequest;
1882
+
1737
1883
  /**
1738
1884
  * Human-readable name for the browser session. Omit to leave unchanged, set to an
1739
1885
  * empty string to clear the name. When set, must be unique among active sessions
@@ -2039,6 +2185,11 @@ Browsers.Webmcp = Webmcp;
2039
2185
 
2040
2186
  export declare namespace Browsers {
2041
2187
  export {
2188
+ type BrowserAllowlistState as BrowserAllowlistState,
2189
+ type BrowserLocation as BrowserLocation,
2190
+ type BrowserLocationRequest as BrowserLocationRequest,
2191
+ type BrowserLocationSource as BrowserLocationSource,
2192
+ type BrowserLocationUpdateRequest as BrowserLocationUpdateRequest,
2042
2193
  type BrowserMemory as BrowserMemory,
2043
2194
  type BrowserMemoryRequest as BrowserMemoryRequest,
2044
2195
  type BrowserNetworkConfig as BrowserNetworkConfig,
@@ -2,6 +2,11 @@
2
2
 
3
3
  export {
4
4
  Browsers,
5
+ type BrowserAllowlistState,
6
+ type BrowserLocation,
7
+ type BrowserLocationRequest,
8
+ type BrowserLocationSource,
9
+ type BrowserLocationUpdateRequest,
5
10
  type BrowserMemory,
6
11
  type BrowserMemoryRequest,
7
12
  type BrowserNetworkConfig,
@@ -282,7 +282,7 @@ export namespace BrowserCaptchaChallengeResultEvent {
282
282
  * Enterprise reCAPTCHA variants are grouped into their version bucket
283
283
  * (recaptcha_v2 or recaptcha_v3), FunCaptcha uses arkose, press-and-hold
284
284
  * challenges served by HUMAN (formerly PerimeterX) use human, and unlisted
285
- * products use other.
285
+ * products, including text captchas a site draws itself, use other.
286
286
  */
287
287
  captcha_provider?:
288
288
  | 'hcaptcha'
@@ -292,6 +292,7 @@ export namespace BrowserCaptchaChallengeResultEvent {
292
292
  | 'geetest'
293
293
  | 'arkose'
294
294
  | 'human'
295
+ | 'binance'
295
296
  | 'other';
296
297
 
297
298
  /**
@@ -388,7 +389,7 @@ export namespace BrowserCaptchaSolveResultEvent {
388
389
  * Enterprise reCAPTCHA variants are grouped into their version bucket
389
390
  * (recaptcha_v2 or recaptcha_v3), FunCaptcha uses arkose, press-and-hold
390
391
  * challenges served by HUMAN (formerly PerimeterX) use human, and unlisted
391
- * products use other.
392
+ * products, including text captchas a site draws itself, use other.
392
393
  */
393
394
  captcha_provider?:
394
395
  | 'hcaptcha'
@@ -398,6 +399,7 @@ export namespace BrowserCaptchaSolveResultEvent {
398
399
  | 'geetest'
399
400
  | 'arkose'
400
401
  | 'human'
402
+ | 'binance'
401
403
  | 'other';
402
404
 
403
405
  /**
@@ -414,6 +416,11 @@ export namespace BrowserCaptchaSolveResultEvent {
414
416
  */
415
417
  error_code?: string;
416
418
 
419
+ /**
420
+ * Captured hCaptcha recognition media, when known.
421
+ */
422
+ media?: 'image' | 'video';
423
+
417
424
  /**
418
425
  * Opaque identifier shared with the matching captcha_solve_started.
419
426
  */
@@ -493,7 +500,7 @@ export namespace BrowserCaptchaSolveStartedEvent {
493
500
  * Enterprise reCAPTCHA variants are grouped into their version bucket
494
501
  * (recaptcha_v2 or recaptcha_v3), FunCaptcha uses arkose, press-and-hold
495
502
  * challenges served by HUMAN (formerly PerimeterX) use human, and unlisted
496
- * products use other.
503
+ * products, including text captchas a site draws itself, use other.
497
504
  */
498
505
  captcha_provider?:
499
506
  | 'hcaptcha'
@@ -503,6 +510,7 @@ export namespace BrowserCaptchaSolveStartedEvent {
503
510
  | 'geetest'
504
511
  | 'arkose'
505
512
  | 'human'
513
+ | 'binance'
506
514
  | 'other';
507
515
 
508
516
  /**
@@ -513,6 +521,11 @@ export namespace BrowserCaptchaSolveStartedEvent {
513
521
  */
514
522
  challenge_id?: string;
515
523
 
524
+ /**
525
+ * Captured hCaptcha recognition media, when known.
526
+ */
527
+ media?: 'image' | 'video';
528
+
516
529
  /**
517
530
  * Opaque identifier shared with the matching captcha_solve_result.
518
531
  */
@@ -40,6 +40,11 @@ export {
40
40
  } from './browser-pools';
41
41
  export {
42
42
  Browsers,
43
+ type BrowserAllowlistState,
44
+ type BrowserLocation,
45
+ type BrowserLocationRequest,
46
+ type BrowserLocationSource,
47
+ type BrowserLocationUpdateRequest,
43
48
  type BrowserMemory,
44
49
  type BrowserMemoryRequest,
45
50
  type BrowserNetworkConfig,
@@ -527,6 +527,11 @@ export namespace InvocationListBrowsersResponse {
527
527
  */
528
528
  kiosk_mode?: boolean;
529
529
 
530
+ /**
531
+ * Effective browser timezone and locale with per-field provenance.
532
+ */
533
+ location?: BrowsersAPI.BrowserLocation;
534
+
530
535
  /**
531
536
  * Human-readable name of the browser session, if one was set at creation.
532
537
  */
@@ -24,32 +24,37 @@ export class Proxies extends APIResource {
24
24
  }
25
25
 
26
26
  /**
27
- * Retrieve a proxy in the resolved project by ID.
27
+ * Retrieve a proxy in the resolved project by ID or exact name using the database
28
+ * collation. IDs take precedence when a value matches both an ID and a name. Proxy
29
+ * names are not unique; an ambiguous name returns a 400 response with code
30
+ * ambiguous_proxy_name.
28
31
  *
29
32
  * @example
30
33
  * ```ts
31
- * const proxy = await client.proxies.retrieve('id');
34
+ * const proxy = await client.proxies.retrieve('id_or_name');
32
35
  * ```
33
36
  */
34
- retrieve(id: string, options?: RequestOptions): APIPromise<ProxyRetrieveResponse> {
35
- return this._client.get(path`/proxies/${id}`, options);
37
+ retrieve(idOrName: string, options?: RequestOptions): APIPromise<ProxyRetrieveResponse> {
38
+ return this._client.get(path`/proxies/${idOrName}`, options);
36
39
  }
37
40
 
38
41
  /**
39
- * Update a proxy's name. Proxy names are not unique and are not ID-or-name
40
- * addressable on this endpoint; duplicate names are allowed. Name-based
41
- * session-create lookups can remain ambiguous until callers resolve proxies by ID
42
- * or the API adds a stronger uniqueness contract.
42
+ * Update a proxy's name. Proxy names are not unique and duplicate names are
43
+ * allowed.
43
44
  *
44
45
  * @example
45
46
  * ```ts
46
- * const proxy = await client.proxies.update('id', {
47
+ * const proxy = await client.proxies.update('id_or_name', {
47
48
  * name: 'my-renamed-proxy',
48
49
  * });
49
50
  * ```
50
51
  */
51
- update(id: string, body: ProxyUpdateParams, options?: RequestOptions): APIPromise<ProxyUpdateResponse> {
52
- return this._client.patch(path`/proxies/${id}`, { body, ...options });
52
+ update(
53
+ idOrName: string,
54
+ body: ProxyUpdateParams,
55
+ options?: RequestOptions,
56
+ ): APIPromise<ProxyUpdateResponse> {
57
+ return this._client.patch(path`/proxies/${idOrName}`, { body, ...options });
53
58
  }
54
59
 
55
60
  /**
@@ -78,11 +83,11 @@ export class Proxies extends APIResource {
78
83
  *
79
84
  * @example
80
85
  * ```ts
81
- * await client.proxies.delete('id');
86
+ * await client.proxies.delete('id_or_name');
82
87
  * ```
83
88
  */
84
- delete(id: string, options?: RequestOptions): APIPromise<void> {
85
- return this._client.delete(path`/proxies/${id}`, {
89
+ delete(idOrName: string, options?: RequestOptions): APIPromise<void> {
90
+ return this._client.delete(path`/proxies/${idOrName}`, {
86
91
  ...options,
87
92
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
88
93
  });
@@ -98,15 +103,15 @@ export class Proxies extends APIResource {
98
103
  *
99
104
  * @example
100
105
  * ```ts
101
- * const response = await client.proxies.check('id');
106
+ * const response = await client.proxies.check('id_or_name');
102
107
  * ```
103
108
  */
104
109
  check(
105
- id: string,
110
+ idOrName: string,
106
111
  body: ProxyCheckParams | null | undefined = {},
107
112
  options?: RequestOptions,
108
113
  ): APIPromise<ProxyCheckResponse> {
109
- return this._client.post(path`/proxies/${id}/check`, { body, ...options });
114
+ return this._client.post(path`/proxies/${idOrName}/check`, { body, ...options });
110
115
  }
111
116
  }
112
117
 
@@ -14,6 +14,7 @@ export {
14
14
  type CredentialAccountVaultItemRequest,
15
15
  type CredentialCollectionAction,
16
16
  type CredentialVaultFieldDefinition,
17
+ type CredentialVaultFieldDefinitionInput,
17
18
  type CredentialVaultFieldInput,
18
19
  type CredentialVaultFieldState,
19
20
  type CredentialVaultFieldType,