@onkernel/sdk 0.146.0 → 0.148.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 (68) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/package.json +1 -1
  3. package/resources/auth/auth.d.mts +2 -2
  4. package/resources/auth/auth.d.mts.map +1 -1
  5. package/resources/auth/auth.d.ts +2 -2
  6. package/resources/auth/auth.d.ts.map +1 -1
  7. package/resources/auth/auth.js.map +1 -1
  8. package/resources/auth/auth.mjs.map +1 -1
  9. package/resources/auth/connections.d.mts +18 -1
  10. package/resources/auth/connections.d.mts.map +1 -1
  11. package/resources/auth/connections.d.ts +18 -1
  12. package/resources/auth/connections.d.ts.map +1 -1
  13. package/resources/auth/index.d.mts +1 -1
  14. package/resources/auth/index.d.mts.map +1 -1
  15. package/resources/auth/index.d.ts +1 -1
  16. package/resources/auth/index.d.ts.map +1 -1
  17. package/resources/auth/index.js.map +1 -1
  18. package/resources/auth/index.mjs.map +1 -1
  19. package/resources/browser-pools.d.mts +31 -0
  20. package/resources/browser-pools.d.mts.map +1 -1
  21. package/resources/browser-pools.d.ts +31 -0
  22. package/resources/browser-pools.d.ts.map +1 -1
  23. package/resources/browsers/browsers.d.mts +128 -0
  24. package/resources/browsers/browsers.d.mts.map +1 -1
  25. package/resources/browsers/browsers.d.ts +128 -0
  26. package/resources/browsers/browsers.d.ts.map +1 -1
  27. package/resources/browsers/browsers.js +4 -0
  28. package/resources/browsers/browsers.js.map +1 -1
  29. package/resources/browsers/browsers.mjs +4 -0
  30. package/resources/browsers/browsers.mjs.map +1 -1
  31. package/resources/browsers/index.d.mts +1 -0
  32. package/resources/browsers/index.d.mts.map +1 -1
  33. package/resources/browsers/index.d.ts +1 -0
  34. package/resources/browsers/index.d.ts.map +1 -1
  35. package/resources/browsers/index.js +3 -1
  36. package/resources/browsers/index.js.map +1 -1
  37. package/resources/browsers/index.mjs +1 -0
  38. package/resources/browsers/index.mjs.map +1 -1
  39. package/resources/browsers/live-view.d.mts +74 -0
  40. package/resources/browsers/live-view.d.mts.map +1 -0
  41. package/resources/browsers/live-view.d.ts +74 -0
  42. package/resources/browsers/live-view.d.ts.map +1 -0
  43. package/resources/browsers/live-view.js +33 -0
  44. package/resources/browsers/live-view.js.map +1 -0
  45. package/resources/browsers/live-view.mjs +29 -0
  46. package/resources/browsers/live-view.mjs.map +1 -0
  47. package/resources/invocations.d.mts +31 -0
  48. package/resources/invocations.d.mts.map +1 -1
  49. package/resources/invocations.d.ts +31 -0
  50. package/resources/invocations.d.ts.map +1 -1
  51. package/resources/vaults/items.d.mts +21 -7
  52. package/resources/vaults/items.d.mts.map +1 -1
  53. package/resources/vaults/items.d.ts +21 -7
  54. package/resources/vaults/items.d.ts.map +1 -1
  55. package/src/resources/auth/auth.ts +2 -0
  56. package/src/resources/auth/connections.ts +20 -0
  57. package/src/resources/auth/index.ts +1 -0
  58. package/src/resources/browser-pools.ts +36 -0
  59. package/src/resources/browsers/browsers.ts +162 -0
  60. package/src/resources/browsers/index.ts +7 -0
  61. package/src/resources/browsers/live-view.ts +97 -0
  62. package/src/resources/invocations.ts +36 -0
  63. package/src/resources/vaults/items.ts +22 -7
  64. package/src/version.ts +1 -1
  65. package/version.d.mts +1 -1
  66. package/version.d.ts +1 -1
  67. package/version.js +1 -1
  68. package/version.mjs +1 -1
@@ -0,0 +1,97 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { APIPromise } from '../../core/api-promise';
5
+ import { RequestOptions } from '../../internal/request-options';
6
+ import { path } from '../../internal/utils/path';
7
+
8
+ /**
9
+ * Create and manage browser sessions.
10
+ */
11
+ export class LiveView extends APIResource {
12
+ /**
13
+ * Creates a live view URL for a headful browser that grants either read-only or
14
+ * control access. The URL works only for the live view: it cannot connect to CDP,
15
+ * WebDriver, or any other browser endpoint. A read-only URL shows the browser but
16
+ * cannot send input, regardless of query parameters. The URL stays valid until the
17
+ * browser is deleted, or until `ttl_seconds` elapse when set. For a browser
18
+ * acquired from a pool, it stops working when the browser is released. Nothing is
19
+ * stored, so a URL cannot be revoked before then.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * const browserLiveView =
24
+ * await client.browsers.liveView.create(
25
+ * 'htzv5orfit78e1m2biiifpbv',
26
+ * );
27
+ * ```
28
+ */
29
+ create(
30
+ idOrName: string,
31
+ body: LiveViewCreateParams | null | undefined = {},
32
+ options?: RequestOptions,
33
+ ): APIPromise<BrowserLiveView> {
34
+ return this._client.post(path`/browsers/${idOrName}/live_view`, { body, ...options });
35
+ }
36
+ }
37
+
38
+ export interface BrowserLiveView {
39
+ /**
40
+ * `read` shows the browser without accepting input. `control` also lets the viewer
41
+ * drive the browser through the live view.
42
+ */
43
+ scope: BrowserLiveViewScope;
44
+
45
+ /**
46
+ * Live view URL. Treat it as a credential.
47
+ */
48
+ url: string;
49
+
50
+ /**
51
+ * When the URL expires. Absent when it stays valid until the browser is deleted.
52
+ */
53
+ expires_at?: string;
54
+ }
55
+
56
+ export interface BrowserLiveViewRequest {
57
+ /**
58
+ * `read` shows the browser without accepting input. `control` also lets the viewer
59
+ * drive the browser through the live view.
60
+ */
61
+ scope?: BrowserLiveViewScope;
62
+
63
+ /**
64
+ * Seconds until the URL expires. Omit to keep it valid until the browser is
65
+ * deleted.
66
+ */
67
+ ttl_seconds?: number;
68
+ }
69
+
70
+ /**
71
+ * `read` shows the browser without accepting input. `control` also lets the viewer
72
+ * drive the browser through the live view.
73
+ */
74
+ export type BrowserLiveViewScope = 'read' | 'control';
75
+
76
+ export interface LiveViewCreateParams {
77
+ /**
78
+ * `read` shows the browser without accepting input. `control` also lets the viewer
79
+ * drive the browser through the live view.
80
+ */
81
+ scope?: BrowserLiveViewScope;
82
+
83
+ /**
84
+ * Seconds until the URL expires. Omit to keep it valid until the browser is
85
+ * deleted.
86
+ */
87
+ ttl_seconds?: number;
88
+ }
89
+
90
+ export declare namespace LiveView {
91
+ export {
92
+ type BrowserLiveView as BrowserLiveView,
93
+ type BrowserLiveViewRequest as BrowserLiveViewRequest,
94
+ type BrowserLiveViewScope as BrowserLiveViewScope,
95
+ type LiveViewCreateParams as LiveViewCreateParams,
96
+ };
97
+ }
@@ -576,6 +576,13 @@ export namespace InvocationListBrowsersResponse {
576
576
  */
577
577
  proxy_id?: string;
578
578
 
579
+ /**
580
+ * Replay recording started by `start_replay` when this browser was created or
581
+ * acquired. Omitted otherwise; list replays with
582
+ * `GET /browsers/{id_or_name}/replays`.
583
+ */
584
+ replay?: Browser.Replay;
585
+
579
586
  /**
580
587
  * URL the session was most recently asked to navigate to, if any. Recorded for
581
588
  * debugging. Navigation is fire-and-forget — the URL is dispatched to the browser
@@ -633,6 +640,35 @@ export namespace InvocationListBrowsersResponse {
633
640
  */
634
641
  viewport?: Shared.BrowserViewport;
635
642
  }
643
+
644
+ export namespace Browser {
645
+ /**
646
+ * Replay recording started by `start_replay` when this browser was created or
647
+ * acquired. Omitted otherwise; list replays with
648
+ * `GET /browsers/{id_or_name}/replays`.
649
+ */
650
+ export interface Replay {
651
+ /**
652
+ * Unique identifier for the replay recording.
653
+ */
654
+ replay_id: string;
655
+
656
+ /**
657
+ * Timestamp when replay finished
658
+ */
659
+ finished_at?: string | null;
660
+
661
+ /**
662
+ * URL for viewing the replay recording.
663
+ */
664
+ replay_view_url?: string;
665
+
666
+ /**
667
+ * Timestamp when replay started
668
+ */
669
+ started_at?: string | null;
670
+ }
671
+ }
636
672
  }
637
673
 
638
674
  export interface InvocationCreateParams {
@@ -1170,9 +1170,10 @@ export interface CredentialVaultItem {
1170
1170
  /**
1171
1171
  * Kernel credentials advertise collect and fill when eligible. 1Password
1172
1172
  * credentials advertise 1pw_create_access_request until a request is made,
1173
- * 1pw_access_request_status while its approval is pending, and 1pw_fill after
1174
- * access is granted. Managed auth credentials advertise fill while ready and
1175
- * nothing otherwise.
1173
+ * 1pw_access_request_status while its approval is pending (and
1174
+ * 1pw_create_access_request again once the 3-minute status-check window has
1175
+ * passed), and 1pw_fill after access is granted. Managed auth credentials
1176
+ * advertise fill while ready and nothing otherwise.
1176
1177
  */
1177
1178
  available_operations: Array<CredentialVaultItem.AvailableOperation>;
1178
1179
 
@@ -1273,6 +1274,15 @@ export namespace CredentialVaultItem {
1273
1274
  }
1274
1275
 
1275
1276
  export interface OnePasswordAccessApprovalAction {
1277
+ /**
1278
+ * The access_request_reference value from url, for approving inside your own iOS
1279
+ * or Android app with 1Password's action extension or authorization activity. Pass
1280
+ * it unchanged; the grant comes back to your app, and 1pw_access_request_status
1281
+ * records it in Kernel. Treat it like url, which carries the same request text,
1282
+ * and keep it out of logs.
1283
+ */
1284
+ access_request_reference: string;
1285
+
1276
1286
  /**
1277
1287
  * Steps for the agent to hand approval to the human and poll the resulting
1278
1288
  * decision.
@@ -1282,8 +1292,10 @@ export namespace CredentialVaultItem {
1282
1292
  name: '1password_access_approval';
1283
1293
 
1284
1294
  /**
1285
- * Native 1Password approval link. Present it to the account owner without
1286
- * modifying it; it does not grant access until they approve in their app.
1295
+ * Native 1Password approval link. Present it to the account owner unchanged,
1296
+ * except that you may append `&return_url=<URL-encoded URL>` so 1Password sends
1297
+ * them back to your app after they decide (1Password 8.12.46 or later on iOS,
1298
+ * Android and desktop). It does not grant access until they approve in their app.
1287
1299
  */
1288
1300
  url: string;
1289
1301
  }
@@ -2395,7 +2407,9 @@ export namespace OnePasswordCredentialVaultItemState {
2395
2407
  has_autofill_token: boolean;
2396
2408
 
2397
2409
  /**
2398
- * One of pending, resolved, denied, or failed.
2410
+ * One of pending, resolved, denied, failed, expired, or unknown. expired returns
2411
+ * the item to pending_authorization so access can be requested again; unknown is a
2412
+ * state 1Password added later and is treated as failed.
2399
2413
  */
2400
2414
  state: string;
2401
2415
 
@@ -4822,7 +4836,8 @@ export declare namespace ItemPerformOperationParams {
4822
4836
  type: '1pw_access_request_status';
4823
4837
 
4824
4838
  /**
4825
- * Body param
4839
+ * Body param: How long to keep checking on the schedule. The call still waits for
4840
+ * its first scheduled check, at most 20 seconds, when that comes later.
4826
4841
  */
4827
4842
  timeout_seconds?: number;
4828
4843
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.146.0'; // x-release-please-version
1
+ export const VERSION = '0.148.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.146.0";
1
+ export declare const VERSION = "0.148.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.146.0";
1
+ export declare const VERSION = "0.148.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.146.0'; // x-release-please-version
4
+ exports.VERSION = '0.148.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.146.0'; // x-release-please-version
1
+ export const VERSION = '0.148.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map