@onkernel/sdk 0.86.1 → 0.87.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.
Files changed (110) hide show
  1. package/CHANGELOG.md +19 -1
  2. package/client.d.mts +1 -1
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +1 -1
  5. package/client.d.ts.map +1 -1
  6. package/client.js +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs +1 -1
  9. package/client.mjs.map +1 -1
  10. package/lib/browser-routing.js +3 -3
  11. package/lib/browser-routing.js.map +1 -1
  12. package/lib/browser-routing.mjs +3 -3
  13. package/lib/browser-routing.mjs.map +1 -1
  14. package/package.json +1 -1
  15. package/resources/audit-logs/audit-logs.d.mts +169 -0
  16. package/resources/audit-logs/audit-logs.d.mts.map +1 -0
  17. package/resources/audit-logs/audit-logs.d.ts +169 -0
  18. package/resources/audit-logs/audit-logs.d.ts.map +1 -0
  19. package/resources/audit-logs/audit-logs.js +53 -0
  20. package/resources/audit-logs/audit-logs.js.map +1 -0
  21. package/resources/audit-logs/audit-logs.mjs +48 -0
  22. package/resources/audit-logs/audit-logs.mjs.map +1 -0
  23. package/resources/audit-logs/export-destinations.d.mts +163 -0
  24. package/resources/audit-logs/export-destinations.d.mts.map +1 -0
  25. package/resources/audit-logs/export-destinations.d.ts +163 -0
  26. package/resources/audit-logs/export-destinations.d.ts.map +1 -0
  27. package/resources/audit-logs/export-destinations.js +62 -0
  28. package/resources/audit-logs/export-destinations.js.map +1 -0
  29. package/resources/audit-logs/export-destinations.mjs +58 -0
  30. package/resources/audit-logs/export-destinations.mjs.map +1 -0
  31. package/resources/audit-logs/index.d.mts +3 -0
  32. package/resources/audit-logs/index.d.mts.map +1 -0
  33. package/resources/audit-logs/index.d.ts +3 -0
  34. package/resources/audit-logs/index.d.ts.map +1 -0
  35. package/resources/audit-logs/index.js +9 -0
  36. package/resources/audit-logs/index.js.map +1 -0
  37. package/resources/audit-logs/index.mjs +4 -0
  38. package/resources/audit-logs/index.mjs.map +1 -0
  39. package/resources/audit-logs.d.mts +1 -164
  40. package/resources/audit-logs.d.mts.map +1 -1
  41. package/resources/audit-logs.d.ts +1 -164
  42. package/resources/audit-logs.d.ts.map +1 -1
  43. package/resources/audit-logs.js +2 -41
  44. package/resources/audit-logs.js.map +1 -1
  45. package/resources/audit-logs.mjs +1 -39
  46. package/resources/audit-logs.mjs.map +1 -1
  47. package/resources/auth/auth.d.mts +4 -0
  48. package/resources/auth/auth.d.mts.map +1 -1
  49. package/resources/auth/auth.d.ts +4 -0
  50. package/resources/auth/auth.d.ts.map +1 -1
  51. package/resources/auth/auth.js +4 -0
  52. package/resources/auth/auth.js.map +1 -1
  53. package/resources/auth/auth.mjs +4 -0
  54. package/resources/auth/auth.mjs.map +1 -1
  55. package/resources/auth/context.d.mts +106 -0
  56. package/resources/auth/context.d.mts.map +1 -0
  57. package/resources/auth/context.d.ts +106 -0
  58. package/resources/auth/context.d.ts.map +1 -0
  59. package/resources/auth/context.js +25 -0
  60. package/resources/auth/context.js.map +1 -0
  61. package/resources/auth/context.mjs +21 -0
  62. package/resources/auth/context.mjs.map +1 -0
  63. package/resources/auth/index.d.mts +1 -0
  64. package/resources/auth/index.d.mts.map +1 -1
  65. package/resources/auth/index.d.ts +1 -0
  66. package/resources/auth/index.d.ts.map +1 -1
  67. package/resources/auth/index.js +3 -1
  68. package/resources/auth/index.js.map +1 -1
  69. package/resources/auth/index.mjs +1 -0
  70. package/resources/auth/index.mjs.map +1 -1
  71. package/resources/browser-pools.d.mts +5 -0
  72. package/resources/browser-pools.d.mts.map +1 -1
  73. package/resources/browser-pools.d.ts +5 -0
  74. package/resources/browser-pools.d.ts.map +1 -1
  75. package/resources/browsers/browsers.d.mts +20 -0
  76. package/resources/browsers/browsers.d.mts.map +1 -1
  77. package/resources/browsers/browsers.d.ts +20 -0
  78. package/resources/browsers/browsers.d.ts.map +1 -1
  79. package/resources/browsers/browsers.js.map +1 -1
  80. package/resources/browsers/browsers.mjs.map +1 -1
  81. package/resources/index.d.mts +1 -1
  82. package/resources/index.d.mts.map +1 -1
  83. package/resources/index.d.ts +1 -1
  84. package/resources/index.d.ts.map +1 -1
  85. package/resources/index.js +1 -1
  86. package/resources/index.js.map +1 -1
  87. package/resources/index.mjs +1 -1
  88. package/resources/index.mjs.map +1 -1
  89. package/resources/invocations.d.mts +5 -0
  90. package/resources/invocations.d.mts.map +1 -1
  91. package/resources/invocations.d.ts +5 -0
  92. package/resources/invocations.d.ts.map +1 -1
  93. package/src/client.ts +7 -7
  94. package/src/lib/browser-routing.ts +3 -2
  95. package/src/resources/audit-logs/audit-logs.ts +281 -0
  96. package/src/resources/audit-logs/export-destinations.ts +262 -0
  97. package/src/resources/audit-logs/index.ts +25 -0
  98. package/src/resources/audit-logs.ts +1 -249
  99. package/src/resources/auth/auth.ts +6 -0
  100. package/src/resources/auth/context.ts +125 -0
  101. package/src/resources/auth/index.ts +1 -0
  102. package/src/resources/browser-pools.ts +6 -0
  103. package/src/resources/browsers/browsers.ts +24 -0
  104. package/src/resources/index.ts +1 -1
  105. package/src/resources/invocations.ts +6 -0
  106. package/src/version.ts +1 -1
  107. package/version.d.mts +1 -1
  108. package/version.d.ts +1 -1
  109. package/version.js +1 -1
  110. package/version.mjs +1 -1
@@ -386,6 +386,11 @@ export declare namespace InvocationListBrowsersResponse {
386
386
  * Browser profile metadata.
387
387
  */
388
388
  profile?: BrowsersAPI.Profile;
389
+ /**
390
+ * Whether changes made during this browser session are saved back to its profile
391
+ * when the session ends. Omitted when no profile is attached.
392
+ */
393
+ profile_save_changes?: boolean;
389
394
  /**
390
395
  * ID of the proxy associated with this browser session, if any.
391
396
  */
@@ -1 +1 @@
1
- {"version":3,"file":"invocations.d.ts","sourceRoot":"","sources":["../src/resources/invocations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,MAAM,oBAAiB;AACnC,OAAO,KAAK,WAAW,+BAA4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AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,uCAAuC,IAAI,uCAAuC,EACvF,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
package/src/client.ts CHANGED
@@ -42,13 +42,6 @@ import {
42
42
  browserRoutingSubresourcesFromEnv,
43
43
  createRoutingFetch,
44
44
  } from './lib/browser-routing';
45
- import {
46
- AuditLogEntriesPageTokenPagination,
47
- AuditLogEntry,
48
- AuditLogExportChunkParams,
49
- AuditLogListParams,
50
- AuditLogs,
51
- } from './resources/audit-logs';
52
45
  import {
53
46
  BrowserPool,
54
47
  BrowserPoolAcquireParams,
@@ -143,6 +136,13 @@ import {
143
136
  ProxyUpdateParams,
144
137
  ProxyUpdateResponse,
145
138
  } from './resources/proxies';
139
+ import {
140
+ AuditLogEntriesPageTokenPagination,
141
+ AuditLogEntry,
142
+ AuditLogExportChunkParams,
143
+ AuditLogListParams,
144
+ AuditLogs,
145
+ } from './resources/audit-logs/audit-logs';
146
146
  import { Auth } from './resources/auth/auth';
147
147
  import {
148
148
  BrowserCreateParams,
@@ -262,10 +262,11 @@ async function routeRequest(
262
262
 
263
263
  const headers = new Headers(request.headers);
264
264
  headers.delete('authorization');
265
- return innerFetch(target.toString(), buildRoutedInit(request, init, headers));
265
+ return innerFetch(target.toString(), buildRoutedInit(input, request, init, headers));
266
266
  }
267
267
 
268
268
  function buildRoutedInit(
269
+ input: RequestInfo,
269
270
  request: Request,
270
271
  originalInit: RequestInit | undefined,
271
272
  headers: Headers,
@@ -276,7 +277,7 @@ function buildRoutedInit(
276
277
  method,
277
278
  headers,
278
279
  redirect: request.redirect,
279
- signal: request.signal,
280
+ signal: originalInit?.signal ?? (input instanceof Request ? input.signal : undefined),
280
281
  } as RequestInit & Record<string, unknown>;
281
282
 
282
283
  delete routedInit['body'];
@@ -0,0 +1,281 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as ExportDestinationsAPI from './export-destinations';
5
+ import {
6
+ AuditLogExportDestination,
7
+ AuditLogExportDestinationTestResult,
8
+ AuditLogExportDestinationsOffsetPagination,
9
+ CreateAuditLogExportDestinationRequest,
10
+ ExportDestinationCreateParams,
11
+ ExportDestinationListParams,
12
+ ExportDestinationUpdateParams,
13
+ ExportDestinations,
14
+ UpdateAuditLogExportDestinationRequest,
15
+ } from './export-destinations';
16
+ import { APIPromise } from '../../core/api-promise';
17
+ import { PagePromise, PageTokenPagination, type PageTokenPaginationParams } from '../../core/pagination';
18
+ import { buildHeaders } from '../../internal/headers';
19
+ import { RequestOptions } from '../../internal/request-options';
20
+ import {
21
+ downloadAuditLogs,
22
+ type AuditLogDownloadDestination,
23
+ type AuditLogDownloadOptions,
24
+ type AuditLogDownloadParams,
25
+ type AuditLogDownloadProgress,
26
+ type AuditLogDownloadResult,
27
+ } from '../../lib/audit-log-download';
28
+
29
+ export type {
30
+ AuditLogDownloadDestination,
31
+ AuditLogDownloadOptions,
32
+ AuditLogDownloadParams,
33
+ AuditLogDownloadProgress,
34
+ AuditLogDownloadResult,
35
+ } from '../../lib/audit-log-download';
36
+
37
+ /**
38
+ * Read audit log records for the authenticated organization.
39
+ */
40
+ export class AuditLogs extends APIResource {
41
+ exportDestinations: ExportDestinationsAPI.ExportDestinations = new ExportDestinationsAPI.ExportDestinations(
42
+ this._client,
43
+ );
44
+
45
+ /**
46
+ * API for searching audit logs. Limited to at most 30 day search, returns up to
47
+ * 100 records per page. Not recommended for bulk export.
48
+ */
49
+ list(
50
+ query: AuditLogListParams,
51
+ options?: RequestOptions,
52
+ ): PagePromise<AuditLogEntriesPageTokenPagination, AuditLogEntry> {
53
+ return this._client.getAPIList('/audit-logs', PageTokenPagination<AuditLogEntry>, { query, ...options });
54
+ }
55
+
56
+ /**
57
+ * Download an organization's audit log records for a time range as a file, for
58
+ * archival, compliance, or offline analysis. For interactive browsing, use GET
59
+ * /audit-logs.
60
+ */
61
+ exportChunk(query: AuditLogExportChunkParams, options?: RequestOptions): APIPromise<Response> {
62
+ return this._client.get('/audit-logs/export/chunk', {
63
+ query,
64
+ ...options,
65
+ headers: buildHeaders([{ Accept: 'application/octet-stream' }, options?.headers]),
66
+ __binaryResponse: true,
67
+ });
68
+ }
69
+
70
+ /**
71
+ * Download a complete gzip-compressed JSON Lines audit log export to a writable
72
+ * destination. The SDK verifies every chunk and retries transient transfer
73
+ * failures. It does not close the destination. If the download fails, the
74
+ * destination may contain a partial export; use a temporary file and atomic
75
+ * rename when the completed export must be published atomically.
76
+ */
77
+ download(
78
+ query: AuditLogDownloadParams,
79
+ destination: AuditLogDownloadDestination,
80
+ options?: AuditLogDownloadOptions,
81
+ ): Promise<AuditLogDownloadResult> {
82
+ return downloadAuditLogs(
83
+ (chunkQuery, chunkOptions) => this.exportChunk(chunkQuery, chunkOptions),
84
+ query,
85
+ destination,
86
+ this._client.timeout,
87
+ options,
88
+ );
89
+ }
90
+ }
91
+
92
+ export type AuditLogEntriesPageTokenPagination = PageTokenPagination<AuditLogEntry>;
93
+
94
+ export interface AuditLogEntry {
95
+ /**
96
+ * Authentication strategy used for the request.
97
+ */
98
+ auth_strategy: string;
99
+
100
+ /**
101
+ * Client IP address.
102
+ */
103
+ client_ip: string;
104
+
105
+ /**
106
+ * Request host.
107
+ */
108
+ domain: string;
109
+
110
+ /**
111
+ * Request duration in milliseconds.
112
+ */
113
+ duration_ms: number;
114
+
115
+ /**
116
+ * Email of the authenticated user at request time, if any.
117
+ */
118
+ email: string;
119
+
120
+ /**
121
+ * HTTP method.
122
+ */
123
+ method: string;
124
+
125
+ /**
126
+ * Request path.
127
+ */
128
+ path: string;
129
+
130
+ /**
131
+ * Matched API route pattern, if available.
132
+ */
133
+ route: string;
134
+
135
+ /**
136
+ * HTTP response status code.
137
+ */
138
+ status: number;
139
+
140
+ /**
141
+ * UTC time when the request was received.
142
+ */
143
+ timestamp: string;
144
+
145
+ /**
146
+ * User agent header.
147
+ */
148
+ user_agent: string;
149
+
150
+ /**
151
+ * ID of the authenticated user, if any.
152
+ */
153
+ user_id: string;
154
+ }
155
+
156
+ export interface AuditLogListParams extends PageTokenPaginationParams {
157
+ /**
158
+ * Upper bound (exclusive) for the audit record timestamp.
159
+ */
160
+ end: string;
161
+
162
+ /**
163
+ * Lower bound (inclusive) for the audit record timestamp.
164
+ */
165
+ start: string;
166
+
167
+ /**
168
+ * Filter by authentication strategy.
169
+ */
170
+ auth_strategy?: string;
171
+
172
+ /**
173
+ * Filter out results by HTTP method.
174
+ */
175
+ exclude_method?: Array<string>;
176
+
177
+ /**
178
+ * Filter by HTTP method.
179
+ */
180
+ method?: string;
181
+
182
+ /**
183
+ * Free-text search over path, user ID, email, client IP, and status.
184
+ */
185
+ search?: string;
186
+
187
+ /**
188
+ * Additional user IDs to OR into free-text search.
189
+ */
190
+ search_user_id?: Array<string>;
191
+
192
+ /**
193
+ * Filter by service name.
194
+ */
195
+ service?: string;
196
+ }
197
+
198
+ export interface AuditLogExportChunkParams {
199
+ /**
200
+ * Upper bound (exclusive) for the audit record timestamp.
201
+ */
202
+ end: string;
203
+
204
+ /**
205
+ * Lower bound (inclusive) for the audit record timestamp.
206
+ */
207
+ start: string;
208
+
209
+ /**
210
+ * Filter by authentication strategy.
211
+ */
212
+ auth_strategy?: string;
213
+
214
+ /**
215
+ * Opaque cursor from X-Next-Cursor for the next chunk of older records.
216
+ */
217
+ cursor?: string;
218
+
219
+ /**
220
+ * Filter out results by HTTP method.
221
+ */
222
+ exclude_method?: Array<string>;
223
+
224
+ /**
225
+ * Encoding for the returned chunk.
226
+ */
227
+ format?: 'jsonl' | 'jsonl.gz';
228
+
229
+ /**
230
+ * Maximum number of records to return in this chunk.
231
+ */
232
+ limit?: number;
233
+
234
+ /**
235
+ * Filter by HTTP method.
236
+ */
237
+ method?: string;
238
+
239
+ /**
240
+ * Free-text search over path, user ID, email, client IP, and status.
241
+ */
242
+ search?: string;
243
+
244
+ /**
245
+ * Additional user IDs to OR into free-text search.
246
+ */
247
+ search_user_id?: Array<string>;
248
+
249
+ /**
250
+ * Filter by service name.
251
+ */
252
+ service?: string;
253
+ }
254
+
255
+ AuditLogs.ExportDestinations = ExportDestinations;
256
+
257
+ export declare namespace AuditLogs {
258
+ export {
259
+ type AuditLogEntry as AuditLogEntry,
260
+ type AuditLogEntriesPageTokenPagination as AuditLogEntriesPageTokenPagination,
261
+ type AuditLogListParams as AuditLogListParams,
262
+ type AuditLogExportChunkParams as AuditLogExportChunkParams,
263
+ type AuditLogDownloadDestination as AuditLogDownloadDestination,
264
+ type AuditLogDownloadOptions as AuditLogDownloadOptions,
265
+ type AuditLogDownloadParams as AuditLogDownloadParams,
266
+ type AuditLogDownloadProgress as AuditLogDownloadProgress,
267
+ type AuditLogDownloadResult as AuditLogDownloadResult,
268
+ };
269
+
270
+ export {
271
+ ExportDestinations as ExportDestinations,
272
+ type AuditLogExportDestination as AuditLogExportDestination,
273
+ type AuditLogExportDestinationTestResult as AuditLogExportDestinationTestResult,
274
+ type CreateAuditLogExportDestinationRequest as CreateAuditLogExportDestinationRequest,
275
+ type UpdateAuditLogExportDestinationRequest as UpdateAuditLogExportDestinationRequest,
276
+ type AuditLogExportDestinationsOffsetPagination as AuditLogExportDestinationsOffsetPagination,
277
+ type ExportDestinationCreateParams as ExportDestinationCreateParams,
278
+ type ExportDestinationUpdateParams as ExportDestinationUpdateParams,
279
+ type ExportDestinationListParams as ExportDestinationListParams,
280
+ };
281
+ }
@@ -0,0 +1,262 @@
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 { OffsetPagination, type OffsetPaginationParams, PagePromise } from '../../core/pagination';
6
+ import { buildHeaders } from '../../internal/headers';
7
+ import { RequestOptions } from '../../internal/request-options';
8
+ import { path } from '../../internal/utils/path';
9
+
10
+ /**
11
+ * Read audit log records for the authenticated organization.
12
+ */
13
+ export class ExportDestinations extends APIResource {
14
+ /**
15
+ * Create a paused destination. Activate it with a status update once the
16
+ * destination test passes. Requires an active Enterprise plan.
17
+ */
18
+ create(
19
+ body: ExportDestinationCreateParams,
20
+ options?: RequestOptions,
21
+ ): APIPromise<AuditLogExportDestination> {
22
+ return this._client.post('/audit-logs/export/destinations', { body, ...options });
23
+ }
24
+
25
+ /**
26
+ * Retrieve details for a single audit log export destination by its ID.
27
+ */
28
+ retrieve(id: string, options?: RequestOptions): APIPromise<AuditLogExportDestination> {
29
+ return this._client.get(path`/audit-logs/export/destinations/${id}`, options);
30
+ }
31
+
32
+ /**
33
+ * Apply a partial update to a destination. Requires an active Enterprise plan.
34
+ * Returns 409 when the destination was changed concurrently, because the merged
35
+ * configuration this request validated is no longer the one that would be stored;
36
+ * retry against fresh state. Pausing prevents new delivery attempts, but an S3
37
+ * upload already in progress may complete after the response.
38
+ */
39
+ update(
40
+ id: string,
41
+ body: ExportDestinationUpdateParams,
42
+ options?: RequestOptions,
43
+ ): APIPromise<AuditLogExportDestination> {
44
+ return this._client.patch(path`/audit-logs/export/destinations/${id}`, { body, ...options });
45
+ }
46
+
47
+ /**
48
+ * List audit log export destinations for the organization with pagination support.
49
+ */
50
+ list(
51
+ query: ExportDestinationListParams | null | undefined = {},
52
+ options?: RequestOptions,
53
+ ): PagePromise<AuditLogExportDestinationsOffsetPagination, AuditLogExportDestination> {
54
+ return this._client.getAPIList(
55
+ '/audit-logs/export/destinations',
56
+ OffsetPagination<AuditLogExportDestination>,
57
+ { query, ...options },
58
+ );
59
+ }
60
+
61
+ /**
62
+ * Soft delete the destination and prevent new delivery attempts. An S3 upload
63
+ * already in progress may complete after the response.
64
+ */
65
+ delete(id: string, options?: RequestOptions): APIPromise<void> {
66
+ return this._client.delete(path`/audit-logs/export/destinations/${id}`, {
67
+ ...options,
68
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
69
+ });
70
+ }
71
+
72
+ /**
73
+ * Verify the destination is writable by assuming the configured role and uploading
74
+ * a temporary probe object with the same request metadata as a real delivery.
75
+ * Requires an active Enterprise plan.
76
+ */
77
+ test(id: string, options?: RequestOptions): APIPromise<AuditLogExportDestinationTestResult> {
78
+ return this._client.post(path`/audit-logs/export/destinations/${id}/test`, options);
79
+ }
80
+ }
81
+
82
+ export type AuditLogExportDestinationsOffsetPagination = OffsetPagination<AuditLogExportDestination>;
83
+
84
+ /**
85
+ * An organization-scoped audit log export destination.
86
+ *
87
+ * Delivery is at-least-once for rows visible when their window is committed: a
88
+ * delivery that is retried rewrites the same object, and the same `event_id` can
89
+ * appear in more than one object, so consumers must deduplicate on `event_id`.
90
+ * Each event-time window is held for ten minutes before it commits; a row that
91
+ * becomes visible after its window is committed may not be delivered.
92
+ *
93
+ * Objects are written as
94
+ * `<prefix>/destination_id=<destination>/org_id=<org>/date=<YYYY-MM-DD>/hour=<HH>/<window>-<chunk>.jsonl.gz`,
95
+ * where `date` and `hour` are the UTC calendar hour that fully contains every row
96
+ * in the object, so the layout is safe to register as a Hive-partitioned table.
97
+ * The object name is derived from the rows it holds, so a retried delivery
98
+ * rewrites its own object.
99
+ */
100
+ export interface AuditLogExportDestination {
101
+ id: string;
102
+
103
+ bucket: string;
104
+
105
+ consecutive_failures: number;
106
+
107
+ created_at: string;
108
+
109
+ external_id: string;
110
+
111
+ format: 'jsonl.gz';
112
+
113
+ /**
114
+ * The Kernel role that assumes `role_arn` in your account to deliver logs. Allow
115
+ * this role as the principal in your role's trust policy, and require
116
+ * `external_id` as the `sts:ExternalId` condition.
117
+ *
118
+ * Recreating a destination issues a new `external_id`, which the trust policy has
119
+ * to be updated to match.
120
+ */
121
+ kernel_role_arn: string;
122
+
123
+ prefix: string;
124
+
125
+ region: string;
126
+
127
+ role_arn: string;
128
+
129
+ /**
130
+ * Pausing prevents new delivery attempts. An S3 upload already in progress may
131
+ * complete after the pause response; its rows can appear again after the
132
+ * destination is resumed.
133
+ */
134
+ status: 'active' | 'paused';
135
+
136
+ type: 's3';
137
+
138
+ updated_at: string;
139
+
140
+ kms_key_id?: string;
141
+
142
+ /**
143
+ * Sanitized description of the most recent delivery failure.
144
+ */
145
+ last_error?: string;
146
+
147
+ last_error_at?: string;
148
+
149
+ /**
150
+ * Opaque, versioned checkpoint for forward-only continuous export. This value is
151
+ * not compatible with audit-log list page tokens.
152
+ *
153
+ * Delivery starts at the moment the destination is activated, so events recorded
154
+ * before that are not delivered. Pausing stops delivery and resuming starts again
155
+ * from the time of the resume: events recorded while a destination was paused are
156
+ * never exported, and pausing is not a way to defer delivery.
157
+ */
158
+ last_exported_cursor?: string;
159
+
160
+ last_success_at?: string;
161
+
162
+ next_attempt_at?: string;
163
+ }
164
+
165
+ export interface AuditLogExportDestinationTestResult {
166
+ stage: 'assume_role' | 'put_object' | 'complete';
167
+
168
+ success: boolean;
169
+
170
+ error?: AuditLogExportDestinationTestResult.Error;
171
+ }
172
+
173
+ export namespace AuditLogExportDestinationTestResult {
174
+ export interface Error {
175
+ code: 'assume_role_failed' | 'put_object_failed';
176
+
177
+ message: string;
178
+ }
179
+ }
180
+
181
+ export interface CreateAuditLogExportDestinationRequest {
182
+ bucket: string;
183
+
184
+ format: 'jsonl.gz';
185
+
186
+ prefix: string;
187
+
188
+ region: string;
189
+
190
+ role_arn: string;
191
+
192
+ type: 's3';
193
+
194
+ kms_key_id?: string;
195
+ }
196
+
197
+ export interface UpdateAuditLogExportDestinationRequest {
198
+ bucket?: string;
199
+
200
+ /**
201
+ * KMS key ID, alias, or ARN. Set to an empty string to remove the configured KMS
202
+ * key; omit or send null to leave unchanged.
203
+ */
204
+ kms_key_id?: string;
205
+
206
+ prefix?: string;
207
+
208
+ region?: string;
209
+
210
+ role_arn?: string;
211
+
212
+ status?: 'active' | 'paused';
213
+ }
214
+
215
+ export interface ExportDestinationCreateParams {
216
+ bucket: string;
217
+
218
+ format: 'jsonl.gz';
219
+
220
+ prefix: string;
221
+
222
+ region: string;
223
+
224
+ role_arn: string;
225
+
226
+ type: 's3';
227
+
228
+ kms_key_id?: string;
229
+ }
230
+
231
+ export interface ExportDestinationUpdateParams {
232
+ bucket?: string;
233
+
234
+ /**
235
+ * KMS key ID, alias, or ARN. Set to an empty string to remove the configured KMS
236
+ * key; omit or send null to leave unchanged.
237
+ */
238
+ kms_key_id?: string;
239
+
240
+ prefix?: string;
241
+
242
+ region?: string;
243
+
244
+ role_arn?: string;
245
+
246
+ status?: 'active' | 'paused';
247
+ }
248
+
249
+ export interface ExportDestinationListParams extends OffsetPaginationParams {}
250
+
251
+ export declare namespace ExportDestinations {
252
+ export {
253
+ type AuditLogExportDestination as AuditLogExportDestination,
254
+ type AuditLogExportDestinationTestResult as AuditLogExportDestinationTestResult,
255
+ type CreateAuditLogExportDestinationRequest as CreateAuditLogExportDestinationRequest,
256
+ type UpdateAuditLogExportDestinationRequest as UpdateAuditLogExportDestinationRequest,
257
+ type AuditLogExportDestinationsOffsetPagination as AuditLogExportDestinationsOffsetPagination,
258
+ type ExportDestinationCreateParams as ExportDestinationCreateParams,
259
+ type ExportDestinationUpdateParams as ExportDestinationUpdateParams,
260
+ type ExportDestinationListParams as ExportDestinationListParams,
261
+ };
262
+ }
@@ -0,0 +1,25 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export {
4
+ AuditLogs,
5
+ type AuditLogEntry,
6
+ type AuditLogListParams,
7
+ type AuditLogExportChunkParams,
8
+ type AuditLogEntriesPageTokenPagination,
9
+ type AuditLogDownloadDestination,
10
+ type AuditLogDownloadOptions,
11
+ type AuditLogDownloadParams,
12
+ type AuditLogDownloadProgress,
13
+ type AuditLogDownloadResult,
14
+ } from './audit-logs';
15
+ export {
16
+ ExportDestinations,
17
+ type AuditLogExportDestination,
18
+ type AuditLogExportDestinationTestResult,
19
+ type CreateAuditLogExportDestinationRequest,
20
+ type UpdateAuditLogExportDestinationRequest,
21
+ type ExportDestinationCreateParams,
22
+ type ExportDestinationUpdateParams,
23
+ type ExportDestinationListParams,
24
+ type AuditLogExportDestinationsOffsetPagination,
25
+ } from './export-destinations';