@onkernel/sdk 0.69.0 → 0.71.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 +27 -0
  2. package/client.d.mts +11 -3
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +11 -3
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/core/pagination.d.mts +14 -0
  11. package/core/pagination.d.mts.map +1 -1
  12. package/core/pagination.d.ts +14 -0
  13. package/core/pagination.d.ts.map +1 -1
  14. package/core/pagination.js +32 -1
  15. package/core/pagination.js.map +1 -1
  16. package/core/pagination.mjs +30 -0
  17. package/core/pagination.mjs.map +1 -1
  18. package/lib/browser-routing.d.mts +1 -0
  19. package/lib/browser-routing.d.mts.map +1 -1
  20. package/lib/browser-routing.d.ts +1 -0
  21. package/lib/browser-routing.d.ts.map +1 -1
  22. package/lib/browser-routing.js +16 -3
  23. package/lib/browser-routing.js.map +1 -1
  24. package/lib/browser-routing.mjs +15 -3
  25. package/lib/browser-routing.mjs.map +1 -1
  26. package/package.json +1 -1
  27. package/resources/audit-logs.d.mts +102 -0
  28. package/resources/audit-logs.d.mts.map +1 -0
  29. package/resources/audit-logs.d.ts +102 -0
  30. package/resources/audit-logs.d.ts.map +1 -0
  31. package/resources/audit-logs.js +20 -0
  32. package/resources/audit-logs.js.map +1 -0
  33. package/resources/audit-logs.mjs +16 -0
  34. package/resources/audit-logs.mjs.map +1 -0
  35. package/resources/auth/auth.d.mts +2 -2
  36. package/resources/auth/auth.d.mts.map +1 -1
  37. package/resources/auth/auth.d.ts +2 -2
  38. package/resources/auth/auth.d.ts.map +1 -1
  39. package/resources/auth/auth.js.map +1 -1
  40. package/resources/auth/auth.mjs.map +1 -1
  41. package/resources/auth/connections.d.mts +80 -1
  42. package/resources/auth/connections.d.mts.map +1 -1
  43. package/resources/auth/connections.d.ts +80 -1
  44. package/resources/auth/connections.d.ts.map +1 -1
  45. package/resources/auth/connections.js +18 -0
  46. package/resources/auth/connections.js.map +1 -1
  47. package/resources/auth/connections.mjs +18 -0
  48. package/resources/auth/connections.mjs.map +1 -1
  49. package/resources/auth/index.d.mts +1 -1
  50. package/resources/auth/index.d.mts.map +1 -1
  51. package/resources/auth/index.d.ts +1 -1
  52. package/resources/auth/index.d.ts.map +1 -1
  53. package/resources/auth/index.js.map +1 -1
  54. package/resources/auth/index.mjs.map +1 -1
  55. package/resources/browser-pools.d.mts +18 -6
  56. package/resources/browser-pools.d.mts.map +1 -1
  57. package/resources/browser-pools.d.ts +18 -6
  58. package/resources/browser-pools.d.ts.map +1 -1
  59. package/resources/browsers/browsers.d.mts +2 -2
  60. package/resources/browsers/browsers.d.mts.map +1 -1
  61. package/resources/browsers/browsers.d.ts +2 -2
  62. package/resources/browsers/browsers.d.ts.map +1 -1
  63. package/resources/browsers/browsers.js.map +1 -1
  64. package/resources/browsers/browsers.mjs.map +1 -1
  65. package/resources/browsers/index.d.mts +1 -1
  66. package/resources/browsers/index.d.mts.map +1 -1
  67. package/resources/browsers/index.d.ts +1 -1
  68. package/resources/browsers/index.d.ts.map +1 -1
  69. package/resources/browsers/index.js.map +1 -1
  70. package/resources/browsers/index.mjs.map +1 -1
  71. package/resources/browsers/telemetry.d.mts +72 -4
  72. package/resources/browsers/telemetry.d.mts.map +1 -1
  73. package/resources/browsers/telemetry.d.ts +72 -4
  74. package/resources/browsers/telemetry.d.ts.map +1 -1
  75. package/resources/browsers/telemetry.js +24 -2
  76. package/resources/browsers/telemetry.js.map +1 -1
  77. package/resources/browsers/telemetry.mjs +24 -2
  78. package/resources/browsers/telemetry.mjs.map +1 -1
  79. package/resources/extensions.d.mts +37 -1
  80. package/resources/extensions.d.mts.map +1 -1
  81. package/resources/extensions.d.ts +37 -1
  82. package/resources/extensions.d.ts.map +1 -1
  83. package/resources/extensions.js +12 -0
  84. package/resources/extensions.js.map +1 -1
  85. package/resources/extensions.mjs +12 -0
  86. package/resources/extensions.mjs.map +1 -1
  87. package/resources/index.d.mts +2 -1
  88. package/resources/index.d.mts.map +1 -1
  89. package/resources/index.d.ts +2 -1
  90. package/resources/index.d.ts.map +1 -1
  91. package/resources/index.js +3 -1
  92. package/resources/index.js.map +1 -1
  93. package/resources/index.mjs +1 -0
  94. package/resources/index.mjs.map +1 -1
  95. package/resources/projects/projects.d.mts +1 -1
  96. package/resources/projects/projects.d.ts +1 -1
  97. package/resources/projects/projects.js +1 -1
  98. package/resources/projects/projects.mjs +1 -1
  99. package/resources/shared.d.mts +4 -4
  100. package/resources/shared.d.ts +4 -4
  101. package/src/client.ts +33 -1
  102. package/src/core/pagination.ts +56 -0
  103. package/src/lib/browser-routing.ts +17 -4
  104. package/src/resources/audit-logs.ts +135 -0
  105. package/src/resources/auth/auth.ts +6 -0
  106. package/src/resources/auth/connections.ts +114 -0
  107. package/src/resources/auth/index.ts +3 -0
  108. package/src/resources/browser-pools.ts +19 -6
  109. package/src/resources/browsers/browsers.ts +6 -0
  110. package/src/resources/browsers/index.ts +3 -0
  111. package/src/resources/browsers/telemetry.ts +105 -4
  112. package/src/resources/extensions.ts +45 -0
  113. package/src/resources/index.ts +7 -0
  114. package/src/resources/projects/projects.ts +1 -1
  115. package/src/resources/shared.ts +4 -4
  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
@@ -152,10 +152,39 @@ export class Connections extends APIResource {
152
152
  ): APIPromise<SubmitFieldsResponse> {
153
153
  return this._client.post(path`/auth/connections/${id}/submit`, { body, ...options });
154
154
  }
155
+
156
+ /**
157
+ * Returns a chronological timeline of events for an auth connection — login
158
+ * attempts, automatic re-auth attempts, and health checks. Events are returned
159
+ * newest-first.
160
+ *
161
+ * @example
162
+ * ```ts
163
+ * // Automatically fetches more pages as needed.
164
+ * for await (const managedAuthTimelineEvent of client.auth.connections.timeline(
165
+ * 'id',
166
+ * )) {
167
+ * // ...
168
+ * }
169
+ * ```
170
+ */
171
+ timeline(
172
+ id: string,
173
+ query: ConnectionTimelineParams | null | undefined = {},
174
+ options?: RequestOptions,
175
+ ): PagePromise<ManagedAuthTimelineEventsOffsetPagination, ManagedAuthTimelineEvent> {
176
+ return this._client.getAPIList(
177
+ path`/auth/connections/${id}/timeline`,
178
+ OffsetPagination<ManagedAuthTimelineEvent>,
179
+ { query, ...options },
180
+ );
181
+ }
155
182
  }
156
183
 
157
184
  export type ManagedAuthsOffsetPagination = OffsetPagination<ManagedAuth>;
158
185
 
186
+ export type ManagedAuthTimelineEventsOffsetPagination = OffsetPagination<ManagedAuthTimelineEvent>;
187
+
159
188
  /**
160
189
  * Response from starting a login flow
161
190
  */
@@ -764,6 +793,81 @@ export namespace ManagedAuthCreateRequest {
764
793
  }
765
794
  }
766
795
 
796
+ /**
797
+ * A single event in an auth connection's history — a login attempt, an automatic
798
+ * re-auth attempt, or a health check.
799
+ */
800
+ export interface ManagedAuthTimelineEvent {
801
+ /**
802
+ * Identifier of the underlying login/reauth session or health check.
803
+ */
804
+ id: string;
805
+
806
+ /**
807
+ * Outcome of the event. For login/reauth events this is the flow status
808
+ * (IN_PROGRESS, SUCCESS, EXPIRED, CANCELED, FAILED). For health_check events it is
809
+ * the observed session state (AUTHENTICATED, NEEDS_AUTH).
810
+ */
811
+ status: 'IN_PROGRESS' | 'SUCCESS' | 'EXPIRED' | 'CANCELED' | 'FAILED' | 'AUTHENTICATED' | 'NEEDS_AUTH';
812
+
813
+ /**
814
+ * When the event occurred.
815
+ */
816
+ timestamp: string;
817
+
818
+ /**
819
+ * The kind of event. "login" and "reauth" are authentication attempts;
820
+ * "health_check" is a periodic session-validity check.
821
+ */
822
+ type: 'login' | 'reauth' | 'health_check';
823
+
824
+ /**
825
+ * Machine-readable error code. Present when a login/reauth event failed.
826
+ */
827
+ error_code?: string;
828
+
829
+ /**
830
+ * Human-readable error message. Present when a login/reauth event failed.
831
+ */
832
+ error_message?: string;
833
+
834
+ /**
835
+ * The session state observed before this event. Present for health_check events
836
+ * that recorded a prior state.
837
+ */
838
+ previous_status?: 'AUTHENTICATED' | 'NEEDS_AUTH';
839
+
840
+ /**
841
+ * Replay recording ID for the event's browser session, if session recording was
842
+ * enabled.
843
+ */
844
+ replay_id?: string;
845
+
846
+ /**
847
+ * The step the flow reached. Present for login/reauth events.
848
+ */
849
+ step?:
850
+ | 'INITIALIZED'
851
+ | 'DISCOVERING'
852
+ | 'AWAITING_INPUT'
853
+ | 'AWAITING_EXTERNAL_ACTION'
854
+ | 'AWAITING_HUMAN_INTERVENTION'
855
+ | 'SUBMITTING'
856
+ | 'COMPLETED'
857
+ | 'EXPIRED';
858
+
859
+ /**
860
+ * When the event was last updated. Present for login/reauth events.
861
+ */
862
+ updated_at?: string;
863
+
864
+ /**
865
+ * Visible error message from the website (e.g., 'Incorrect password'). Present
866
+ * when the website displayed an error during the attempt.
867
+ */
868
+ website_error?: string;
869
+ }
870
+
767
871
  /**
768
872
  * Request to update an auth connection's configuration
769
873
  */
@@ -1466,20 +1570,30 @@ export interface ConnectionSubmitParams {
1466
1570
  sso_provider?: string;
1467
1571
  }
1468
1572
 
1573
+ export interface ConnectionTimelineParams extends OffsetPaginationParams {
1574
+ /**
1575
+ * Filter the timeline to a single event type.
1576
+ */
1577
+ type?: 'login' | 'reauth' | 'health_check';
1578
+ }
1579
+
1469
1580
  export declare namespace Connections {
1470
1581
  export {
1471
1582
  type LoginResponse as LoginResponse,
1472
1583
  type ManagedAuth as ManagedAuth,
1473
1584
  type ManagedAuthCreateRequest as ManagedAuthCreateRequest,
1585
+ type ManagedAuthTimelineEvent as ManagedAuthTimelineEvent,
1474
1586
  type ManagedAuthUpdateRequest as ManagedAuthUpdateRequest,
1475
1587
  type SubmitFieldsRequest as SubmitFieldsRequest,
1476
1588
  type SubmitFieldsResponse as SubmitFieldsResponse,
1477
1589
  type ConnectionFollowResponse as ConnectionFollowResponse,
1478
1590
  type ManagedAuthsOffsetPagination as ManagedAuthsOffsetPagination,
1591
+ type ManagedAuthTimelineEventsOffsetPagination as ManagedAuthTimelineEventsOffsetPagination,
1479
1592
  type ConnectionCreateParams as ConnectionCreateParams,
1480
1593
  type ConnectionUpdateParams as ConnectionUpdateParams,
1481
1594
  type ConnectionListParams as ConnectionListParams,
1482
1595
  type ConnectionLoginParams as ConnectionLoginParams,
1483
1596
  type ConnectionSubmitParams as ConnectionSubmitParams,
1597
+ type ConnectionTimelineParams as ConnectionTimelineParams,
1484
1598
  };
1485
1599
  }
@@ -6,6 +6,7 @@ export {
6
6
  type LoginResponse,
7
7
  type ManagedAuth,
8
8
  type ManagedAuthCreateRequest,
9
+ type ManagedAuthTimelineEvent,
9
10
  type ManagedAuthUpdateRequest,
10
11
  type SubmitFieldsRequest,
11
12
  type SubmitFieldsResponse,
@@ -15,5 +16,7 @@ export {
15
16
  type ConnectionListParams,
16
17
  type ConnectionLoginParams,
17
18
  type ConnectionSubmitParams,
19
+ type ConnectionTimelineParams,
18
20
  type ManagedAuthsOffsetPagination,
21
+ type ManagedAuthTimelineEventsOffsetPagination,
19
22
  } from './connections';
@@ -213,7 +213,9 @@ export namespace BrowserPool {
213
213
  extensions?: Array<Shared.BrowserExtension>;
214
214
 
215
215
  /**
216
- * Percentage of the pool to fill per minute. Defaults to 10%.
216
+ * Percentage of the pool to fill per minute. Defaults to 10. The cap is 25 for
217
+ * most organizations but can be raised per-organization, so only the lower bound
218
+ * is enforced here.
217
219
  */
218
220
  fill_rate_per_minute?: number;
219
221
 
@@ -263,7 +265,7 @@ export namespace BrowserPool {
263
265
 
264
266
  /**
265
267
  * Default idle timeout in seconds for browsers acquired from this pool before they
266
- * are destroyed. Defaults to 600 seconds if not specified
268
+ * are destroyed. Defaults to 600 seconds. Minimum 10, maximum 259200 (72 hours).
267
269
  */
268
270
  timeout_seconds?: number;
269
271
 
@@ -439,7 +441,9 @@ export interface BrowserPoolCreateParams {
439
441
  extensions?: Array<Shared.BrowserExtension>;
440
442
 
441
443
  /**
442
- * Percentage of the pool to fill per minute. Defaults to 10%.
444
+ * Percentage of the pool to fill per minute. Defaults to 10. The cap is 25 for
445
+ * most organizations but can be raised per-organization, so only the lower bound
446
+ * is enforced here.
443
447
  */
444
448
  fill_rate_per_minute?: number;
445
449
 
@@ -489,7 +493,7 @@ export interface BrowserPoolCreateParams {
489
493
 
490
494
  /**
491
495
  * Default idle timeout in seconds for browsers acquired from this pool before they
492
- * are destroyed. Defaults to 600 seconds if not specified
496
+ * are destroyed. Defaults to 600 seconds. Minimum 10, maximum 259200 (72 hours).
493
497
  */
494
498
  timeout_seconds?: number;
495
499
 
@@ -531,7 +535,9 @@ export interface BrowserPoolUpdateParams {
531
535
  extensions?: Array<Shared.BrowserExtension>;
532
536
 
533
537
  /**
534
- * Percentage of the pool to fill per minute. Defaults to 10%.
538
+ * Percentage of the pool to fill per minute. Defaults to 10. The cap is 25 for
539
+ * most organizations but can be raised per-organization, so only the lower bound
540
+ * is enforced here.
535
541
  */
536
542
  fill_rate_per_minute?: number;
537
543
 
@@ -588,7 +594,7 @@ export interface BrowserPoolUpdateParams {
588
594
 
589
595
  /**
590
596
  * Default idle timeout in seconds for browsers acquired from this pool before they
591
- * are destroyed. Defaults to 600 seconds if not specified
597
+ * are destroyed. Defaults to 600 seconds. Minimum 10, maximum 259200 (72 hours).
592
598
  */
593
599
  timeout_seconds?: number;
594
600
 
@@ -640,6 +646,13 @@ export interface BrowserPoolAcquireParams {
640
646
  */
641
647
  name?: string;
642
648
 
649
+ /**
650
+ * Optional URL to navigate the acquired browser to. Overrides the pool's start_url
651
+ * for this acquire only. Best-effort: failures to navigate do not fail the
652
+ * acquire.
653
+ */
654
+ start_url?: string;
655
+
643
656
  /**
644
657
  * Optional user-defined key-value tags for the acquired browser session, used to
645
658
  * find and group sessions later. Applies to this lease only and are cleared when
@@ -92,6 +92,9 @@ import {
92
92
  BrowserTelemetryConfig,
93
93
  BrowserTelemetryEvent,
94
94
  Telemetry as TelemetryAPITelemetry,
95
+ TelemetryEventsParams,
96
+ TelemetryEventsResponse,
97
+ TelemetryEventsResponsesOffsetPagination,
95
98
  TelemetryStreamParams,
96
99
  TelemetryStreamResponse,
97
100
  } from './telemetry';
@@ -1271,7 +1274,10 @@ export declare namespace Browsers {
1271
1274
  type BrowserTelemetryCategoryConfig as BrowserTelemetryCategoryConfig,
1272
1275
  type BrowserTelemetryConfig as BrowserTelemetryConfig,
1273
1276
  type BrowserTelemetryEvent as BrowserTelemetryEvent,
1277
+ type TelemetryEventsResponse as TelemetryEventsResponse,
1274
1278
  type TelemetryStreamResponse as TelemetryStreamResponse,
1279
+ type TelemetryEventsResponsesOffsetPagination as TelemetryEventsResponsesOffsetPagination,
1280
+ type TelemetryEventsParams as TelemetryEventsParams,
1275
1281
  type TelemetryStreamParams as TelemetryStreamParams,
1276
1282
  };
1277
1283
 
@@ -120,6 +120,9 @@ export {
120
120
  type BrowserTelemetryCategoryConfig,
121
121
  type BrowserTelemetryConfig,
122
122
  type BrowserTelemetryEvent,
123
+ type TelemetryEventsResponse,
123
124
  type TelemetryStreamResponse,
125
+ type TelemetryEventsParams,
124
126
  type TelemetryStreamParams,
127
+ type TelemetryEventsResponsesOffsetPagination,
125
128
  } from './telemetry';
@@ -3,6 +3,7 @@
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as TelemetryAPI from './telemetry';
5
5
  import { APIPromise } from '../../core/api-promise';
6
+ import { OffsetPagination, type OffsetPaginationParams, PagePromise } from '../../core/pagination';
6
7
  import { Stream } from '../../core/streaming';
7
8
  import { buildHeaders } from '../../internal/headers';
8
9
  import { RequestOptions } from '../../internal/request-options';
@@ -12,6 +13,34 @@ import { path } from '../../internal/utils/path';
12
13
  * Stream live telemetry events from a browser session.
13
14
  */
14
15
  export class Telemetry extends APIResource {
16
+ /**
17
+ * Reads a page of telemetry events for the browser session in ascending sequence
18
+ * order. To page through results, pass the X-Next-Offset value from the previous
19
+ * response as offset and repeat while X-Has-More is true. Returns an empty list
20
+ * when telemetry data is unavailable.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * // Automatically fetches more pages as needed.
25
+ * for await (const telemetryEventsResponse of client.browsers.telemetry.events(
26
+ * 'id',
27
+ * )) {
28
+ * // ...
29
+ * }
30
+ * ```
31
+ */
32
+ events(
33
+ id: string,
34
+ query: TelemetryEventsParams | null | undefined = {},
35
+ options?: RequestOptions,
36
+ ): PagePromise<TelemetryEventsResponsesOffsetPagination, TelemetryEventsResponse> {
37
+ return this._client.getAPIList(
38
+ path`/browsers/${id}/telemetry/events`,
39
+ OffsetPagination<TelemetryEventsResponse>,
40
+ { query, ...options },
41
+ );
42
+ }
43
+
15
44
  /**
16
45
  * Streams browser telemetry events as a server-sent events (SSE) stream. The
17
46
  * stream closes when the browser session terminates. Each event frame includes an
@@ -20,7 +49,8 @@ export class Telemetry extends APIResource {
20
49
  * set; all frames carry JSON in the data: field. A keepalive comment frame is sent
21
50
  * every 15 seconds when no events arrive. Returns 404 if the browser session does
22
51
  * not exist. If telemetry was not enabled on the session, the stream opens but no
23
- * events are delivered.
52
+ * events are delivered. Fresh connections only see new events; pass replay=all to
53
+ * start from the oldest retained event instead.
24
54
  *
25
55
  * @example
26
56
  * ```ts
@@ -34,8 +64,9 @@ export class Telemetry extends APIResource {
34
64
  params: TelemetryStreamParams | undefined = {},
35
65
  options?: RequestOptions,
36
66
  ): APIPromise<Stream<TelemetryStreamResponse>> {
37
- const { 'Last-Event-ID': lastEventID } = params ?? {};
67
+ const { 'Last-Event-ID': lastEventID, ...query } = params ?? {};
38
68
  return this._client.get(path`/browsers/${id}/telemetry/stream`, {
69
+ query,
39
70
  ...options,
40
71
  headers: buildHeaders([
41
72
  {
@@ -49,6 +80,8 @@ export class Telemetry extends APIResource {
49
80
  }
50
81
  }
51
82
 
83
+ export type TelemetryEventsResponsesOffsetPagination = OffsetPagination<TelemetryEventsResponse>;
84
+
52
85
  /**
53
86
  * An agent-driven HTTP call handled by the in-VM API server.
54
87
  */
@@ -1973,6 +2006,32 @@ export type BrowserTelemetryEvent =
1973
2006
  | BrowserSystemOomKillEvent
1974
2007
  | BrowserServiceCrashedEvent;
1975
2008
 
2009
+ /**
2010
+ * Envelope wrapping a browser telemetry event with its monotonic sequence number.
2011
+ * Each SSE data: frame carries one envelope as JSON. The seq value is also emitted
2012
+ * as the SSE id: field so clients can pass it as Last-Event-ID on reconnect.
2013
+ */
2014
+ export interface TelemetryEventsResponse {
2015
+ /**
2016
+ * Union type representing any browser telemetry event. Discriminated on `type`.
2017
+ * Each event's `category` determines when it is captured. The CDP collector-health
2018
+ * events (monitor_disconnected, monitor_reconnected, monitor_reconnect_failed,
2019
+ * monitor_init_failed) use the `monitor` category, which is not user-configurable:
2020
+ * it flows automatically whenever any CDP category (console, network, page,
2021
+ * interaction) is captured, and is silent otherwise. monitor_screenshot uses the
2022
+ * opt-in `screenshot` category. All other event types are controlled by their
2023
+ * per-category enable/disable flags.
2024
+ */
2025
+ event: BrowserTelemetryEvent;
2026
+
2027
+ /**
2028
+ * Process-monotonic sequence number assigned by the browser VM. Pass as
2029
+ * Last-Event-ID on reconnect to resume without gaps. Gaps in received seq values
2030
+ * indicate dropped events.
2031
+ */
2032
+ seq: number;
2033
+ }
2034
+
1976
2035
  /**
1977
2036
  * Envelope wrapping a browser telemetry event with its monotonic sequence number.
1978
2037
  * Each SSE data: frame carries one envelope as JSON. The seq value is also emitted
@@ -1999,10 +2058,49 @@ export interface TelemetryStreamResponse {
1999
2058
  seq: number;
2000
2059
  }
2001
2060
 
2061
+ export interface TelemetryEventsParams extends OffsetPaginationParams {
2062
+ /**
2063
+ * Restrict results to these event categories. Repeat the parameter for multiple
2064
+ * values.
2065
+ */
2066
+ category?: Array<
2067
+ | 'console'
2068
+ | 'network'
2069
+ | 'page'
2070
+ | 'interaction'
2071
+ | 'control'
2072
+ | 'connection'
2073
+ | 'system'
2074
+ | 'screenshot'
2075
+ | 'captcha'
2076
+ | 'monitor'
2077
+ >;
2078
+
2079
+ /**
2080
+ * Start of the window: an RFC-3339 timestamp, or a duration like 5m meaning that
2081
+ * long ago. Defaults to 5m. Ignored when offset is set.
2082
+ */
2083
+ since?: string;
2084
+
2085
+ /**
2086
+ * End of the window (exclusive): an RFC-3339 timestamp, or a duration like 5m
2087
+ * meaning that long ago.
2088
+ */
2089
+ until?: string;
2090
+ }
2091
+
2002
2092
  export interface TelemetryStreamParams {
2003
2093
  /**
2004
- * Last event sequence number for SSE reconnection (sent by SSE clients on
2005
- * reconnect)
2094
+ * Query param: Pass `all` to start from the oldest retained event instead of only
2095
+ * new events; any other value is treated as from-now. The buffer is bounded, so
2096
+ * the first event id may be greater than 1 if older events were evicted.
2097
+ */
2098
+ replay?: string;
2099
+
2100
+ /**
2101
+ * Header param: Last event sequence number for SSE reconnection (sent by SSE
2102
+ * clients on reconnect). Takes precedence over replay when both are present, so
2103
+ * reconnect resumes instead of re-replaying.
2006
2104
  */
2007
2105
  'Last-Event-ID'?: string;
2008
2106
  }
@@ -2047,7 +2145,10 @@ export declare namespace Telemetry {
2047
2145
  type BrowserTelemetryCategoryConfig as BrowserTelemetryCategoryConfig,
2048
2146
  type BrowserTelemetryConfig as BrowserTelemetryConfig,
2049
2147
  type BrowserTelemetryEvent as BrowserTelemetryEvent,
2148
+ type TelemetryEventsResponse as TelemetryEventsResponse,
2050
2149
  type TelemetryStreamResponse as TelemetryStreamResponse,
2150
+ type TelemetryEventsResponsesOffsetPagination as TelemetryEventsResponsesOffsetPagination,
2151
+ type TelemetryEventsParams as TelemetryEventsParams,
2051
2152
  type TelemetryStreamParams as TelemetryStreamParams,
2052
2153
  };
2053
2154
  }
@@ -97,6 +97,19 @@ export class Extensions extends APIResource {
97
97
  });
98
98
  }
99
99
 
100
+ /**
101
+ * Get an extension's metadata (name, size, timestamps) by ID or name, without
102
+ * downloading the archive.
103
+ *
104
+ * @example
105
+ * ```ts
106
+ * const extension = await client.extensions.get('id_or_name');
107
+ * ```
108
+ */
109
+ get(idOrName: string, options?: RequestOptions): APIPromise<ExtensionGetResponse> {
110
+ return this._client.get(path`/extensions/${idOrName}/metadata`, options);
111
+ }
112
+
100
113
  /**
101
114
  * Upload a zip file containing an unpacked browser extension. Optionally provide a
102
115
  * unique name for later reference.
@@ -146,6 +159,37 @@ export interface ExtensionListResponse {
146
159
  name?: string | null;
147
160
  }
148
161
 
162
+ /**
163
+ * A browser extension uploaded to Kernel.
164
+ */
165
+ export interface ExtensionGetResponse {
166
+ /**
167
+ * Unique identifier for the extension
168
+ */
169
+ id: string;
170
+
171
+ /**
172
+ * Timestamp when the extension was created
173
+ */
174
+ created_at: string;
175
+
176
+ /**
177
+ * Size of the extension archive in bytes
178
+ */
179
+ size_bytes: number;
180
+
181
+ /**
182
+ * Timestamp when the extension was last used
183
+ */
184
+ last_used_at?: string | null;
185
+
186
+ /**
187
+ * Optional, easier-to-reference name for the extension. Must be unique within the
188
+ * project.
189
+ */
190
+ name?: string | null;
191
+ }
192
+
149
193
  /**
150
194
  * A browser extension uploaded to Kernel.
151
195
  */
@@ -211,6 +255,7 @@ export interface ExtensionUploadParams {
211
255
  export declare namespace Extensions {
212
256
  export {
213
257
  type ExtensionListResponse as ExtensionListResponse,
258
+ type ExtensionGetResponse as ExtensionGetResponse,
214
259
  type ExtensionUploadResponse as ExtensionUploadResponse,
215
260
  type ExtensionListResponsesOffsetPagination as ExtensionListResponsesOffsetPagination,
216
261
  type ExtensionListParams as ExtensionListParams,
@@ -18,6 +18,12 @@ export {
18
18
  type AppListParams,
19
19
  type AppListResponsesOffsetPagination,
20
20
  } from './apps';
21
+ export {
22
+ AuditLogs,
23
+ type AuditLogEntry,
24
+ type AuditLogListParams,
25
+ type AuditLogEntriesPageTokenPagination,
26
+ } from './audit-logs';
21
27
  export { Auth } from './auth/auth';
22
28
  export {
23
29
  BrowserPools,
@@ -90,6 +96,7 @@ export {
90
96
  export {
91
97
  Extensions,
92
98
  type ExtensionListResponse,
99
+ type ExtensionGetResponse,
93
100
  type ExtensionUploadResponse,
94
101
  type ExtensionListParams,
95
102
  type ExtensionDownloadFromChromeStoreParams,
@@ -30,7 +30,7 @@ export class Projects extends APIResource {
30
30
  }
31
31
 
32
32
  /**
33
- * Get a project by ID.
33
+ * Get a project by its ID or by its name. Names are unique within an organization.
34
34
  *
35
35
  * @example
36
36
  * ```ts
@@ -79,18 +79,18 @@ export interface BrowserProfile {
79
79
  */
80
80
  export interface BrowserViewport {
81
81
  /**
82
- * Browser window height in pixels.
82
+ * Browser window height in pixels. Any positive integer is accepted.
83
83
  */
84
84
  height: number;
85
85
 
86
86
  /**
87
- * Browser window width in pixels.
87
+ * Browser window width in pixels. Any positive integer is accepted.
88
88
  */
89
89
  width: number;
90
90
 
91
91
  /**
92
- * Display refresh rate in Hz. If omitted, automatically determined from width and
93
- * height.
92
+ * Display refresh rate in Hz. Any positive integer is accepted; if omitted,
93
+ * automatically determined from width and height.
94
94
  */
95
95
  refresh_rate?: number;
96
96
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.69.0'; // x-release-please-version
1
+ export const VERSION = '0.71.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.69.0";
1
+ export declare const VERSION = "0.71.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.69.0";
1
+ export declare const VERSION = "0.71.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.69.0'; // x-release-please-version
4
+ exports.VERSION = '0.71.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.69.0'; // x-release-please-version
1
+ export const VERSION = '0.71.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map