langsmith 0.7.11 → 0.7.13

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 (52) hide show
  1. package/dist/_openapi_client/client.cjs +16 -0
  2. package/dist/_openapi_client/client.d.ts +6 -0
  3. package/dist/_openapi_client/client.js +16 -0
  4. package/dist/_openapi_client/core/pagination.cjs +2 -2
  5. package/dist/_openapi_client/core/pagination.js +2 -2
  6. package/dist/_openapi_client/internal/utils/query.cjs +1 -1
  7. package/dist/_openapi_client/internal/utils/query.js +1 -1
  8. package/dist/_openapi_client/resources/datasets/runs.d.ts +2 -1
  9. package/dist/_openapi_client/resources/index.cjs +5 -1
  10. package/dist/_openapi_client/resources/index.d.ts +2 -0
  11. package/dist/_openapi_client/resources/index.js +2 -0
  12. package/dist/_openapi_client/resources/runs/index.cjs +9 -0
  13. package/dist/_openapi_client/resources/runs/index.d.ts +2 -0
  14. package/dist/_openapi_client/resources/runs/index.js +4 -0
  15. package/dist/_openapi_client/resources/runs/rules.cjs +9 -0
  16. package/dist/_openapi_client/resources/runs/rules.d.ts +3 -0
  17. package/dist/_openapi_client/resources/runs/rules.js +5 -0
  18. package/dist/_openapi_client/resources/runs/runs.cjs +115 -0
  19. package/dist/_openapi_client/resources/runs/runs.d.ts +800 -0
  20. package/dist/_openapi_client/resources/runs/runs.js +78 -0
  21. package/dist/_openapi_client/resources/runs.cjs +19 -0
  22. package/dist/_openapi_client/resources/runs.d.ts +1 -0
  23. package/dist/_openapi_client/resources/runs.js +3 -0
  24. package/dist/_openapi_client/resources/sandboxes/boxes.cjs +86 -0
  25. package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +458 -0
  26. package/dist/_openapi_client/resources/sandboxes/boxes.js +82 -0
  27. package/dist/_openapi_client/resources/sandboxes/registries.cjs +44 -0
  28. package/dist/_openapi_client/resources/sandboxes/registries.d.ts +67 -0
  29. package/dist/_openapi_client/resources/sandboxes/registries.js +40 -0
  30. package/dist/_openapi_client/resources/sandboxes/sandboxes.cjs +72 -0
  31. package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +308 -0
  32. package/dist/_openapi_client/resources/sandboxes/sandboxes.js +35 -0
  33. package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +39 -0
  34. package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +62 -0
  35. package/dist/_openapi_client/resources/sandboxes/snapshots.js +35 -0
  36. package/dist/client.cjs +7 -0
  37. package/dist/client.d.ts +5 -0
  38. package/dist/client.js +7 -0
  39. package/dist/index.cjs +1 -1
  40. package/dist/index.d.ts +1 -1
  41. package/dist/index.js +1 -1
  42. package/dist/sandbox/client.cjs +58 -15
  43. package/dist/sandbox/client.d.ts +27 -1
  44. package/dist/sandbox/client.js +54 -11
  45. package/dist/sandbox/sandbox.cjs +7 -6
  46. package/dist/sandbox/sandbox.d.ts +7 -2
  47. package/dist/sandbox/sandbox.js +8 -7
  48. package/dist/sandbox/types.d.ts +1 -7
  49. package/dist/utils/constants.cjs +1 -1
  50. package/dist/utils/constants.d.ts +1 -1
  51. package/dist/utils/constants.js +1 -1
  52. package/package.json +5 -5
@@ -0,0 +1,78 @@
1
+ // @ts-nocheck
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ import { APIResource } from '../../core/resource.js';
4
+ import * as RulesAPI from './rules.js';
5
+ import { Rules } from './rules.js';
6
+ import { ItemsCursorPostPagination, } from '../../core/pagination.js';
7
+ import { buildHeaders } from '../../internal/headers.js';
8
+ import { path } from '../../internal/utils/path.js';
9
+ export class Runs extends APIResource {
10
+ constructor() {
11
+ super(...arguments);
12
+ Object.defineProperty(this, "rules", {
13
+ enumerable: true,
14
+ configurable: true,
15
+ writable: true,
16
+ value: new RulesAPI.Rules(this._client)
17
+ });
18
+ Object.defineProperty(this, "retrieve", {
19
+ enumerable: true,
20
+ configurable: true,
21
+ writable: true,
22
+ value: this.retrieveV2
23
+ });
24
+ Object.defineProperty(this, "query", {
25
+ enumerable: true,
26
+ configurable: true,
27
+ writable: true,
28
+ value: this.queryV2
29
+ });
30
+ }
31
+ /**
32
+ * **Alpha:** The request and response contract may change; Returns a paginated
33
+ * list of runs for the given projects within min/max start_time. Supports filters,
34
+ * cursor pagination, and `selects` to select fields to return.
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * // Automatically fetches more pages as needed.
39
+ * for await (const queryRunResponse of client.runs.queryV2()) {
40
+ * // ...
41
+ * }
42
+ * ```
43
+ */
44
+ queryV2(params, options) {
45
+ const { Accept, ...body } = params;
46
+ return this._client.getAPIList('/v2/runs/query', (ItemsCursorPostPagination), {
47
+ body,
48
+ method: 'post',
49
+ ...options,
50
+ headers: buildHeaders([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
51
+ });
52
+ }
53
+ /**
54
+ * **Alpha:** The request and response contract may change; Returns one run by ID
55
+ * for the given session and start_time. Use the `selects` query parameter
56
+ * (repeatable) to select fields to return.
57
+ *
58
+ * @example
59
+ * ```ts
60
+ * const queryRunResponse = await client.runs.retrieveV2(
61
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
62
+ * {
63
+ * project_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
64
+ * start_time: '2019-12-27T18:11:19.117Z',
65
+ * },
66
+ * );
67
+ * ```
68
+ */
69
+ retrieveV2(runID, params, options) {
70
+ const { Accept, ...query } = params;
71
+ return this._client.get(path `/v2/runs/${runID}`, {
72
+ query,
73
+ ...options,
74
+ headers: buildHeaders([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
75
+ });
76
+ }
77
+ }
78
+ Runs.Rules = Rules;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ // @ts-nocheck
3
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ __exportStar(require("./runs/index.cjs"), exports);
@@ -0,0 +1 @@
1
+ export * from './runs/index.js';
@@ -0,0 +1,3 @@
1
+ // @ts-nocheck
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ export * from './runs/index.js';
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ // @ts-nocheck
3
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.Boxes = void 0;
6
+ const resource_js_1 = require("../../core/resource.cjs");
7
+ const headers_js_1 = require("../../internal/headers.cjs");
8
+ const path_js_1 = require("../../internal/utils/path.cjs");
9
+ class Boxes extends resource_js_1.APIResource {
10
+ /**
11
+ * Create a new sandbox from a snapshot. Provide at most one of `snapshot_id` or
12
+ * `snapshot_name`; if neither is provided, the server uses the default static
13
+ * blueprint.
14
+ */
15
+ create(body, options) {
16
+ return this._client.post('/v2/sandboxes/boxes', { body, ...options });
17
+ }
18
+ /**
19
+ * Retrieve a sandbox by name. Stale provisioning sandboxes are auto-failed.
20
+ */
21
+ retrieve(name, options) {
22
+ return this._client.get((0, path_js_1.path) `/v2/sandboxes/boxes/${name}`, options);
23
+ }
24
+ /**
25
+ * Update a sandbox's display name. The name must be unique within the tenant.
26
+ */
27
+ update(name, body, options) {
28
+ return this._client.patch((0, path_js_1.path) `/v2/sandboxes/boxes/${name}`, { body, ...options });
29
+ }
30
+ /**
31
+ * List sandboxes for the authenticated tenant, with optional filtering, sorting,
32
+ * and pagination.
33
+ */
34
+ list(query = {}, options) {
35
+ return this._client.get('/v2/sandboxes/boxes', { query, ...options });
36
+ }
37
+ /**
38
+ * Delete a sandbox by name or UUID. Tears down the sandbox runtime and removes the
39
+ * DB record.
40
+ */
41
+ delete(name, options) {
42
+ return this._client.delete((0, path_js_1.path) `/v2/sandboxes/boxes/${name}`, {
43
+ ...options,
44
+ headers: (0, headers_js_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
45
+ });
46
+ }
47
+ /**
48
+ * Create a snapshot by capturing the current state of a sandbox or promoting an
49
+ * existing checkpoint.
50
+ */
51
+ createSnapshot(name, body, options) {
52
+ return this._client.post((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/snapshot`, { body, ...options });
53
+ }
54
+ /**
55
+ * Create a short-lived JWT for accessing an HTTP service running on a specific
56
+ * port inside a sandbox. Returns a browser_url (sets auth cookie via redirect), a
57
+ * service_url (for use with the X-Langsmith-Sandbox-Service-Token header), the raw
58
+ * token, and its expiry.
59
+ */
60
+ generateServiceURL(name, body, options) {
61
+ return this._client.post((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/service-url`, { body, ...options });
62
+ }
63
+ /**
64
+ * Retrieve the lightweight status of a sandbox for polling.
65
+ */
66
+ getStatus(name, options) {
67
+ return this._client.get((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/status`, options);
68
+ }
69
+ /**
70
+ * Start a stopped or failed sandbox. This endpoint is not idempotent.
71
+ */
72
+ start(name, options) {
73
+ return this._client.post((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/start`, options);
74
+ }
75
+ /**
76
+ * Stop a ready sandbox. This endpoint is not idempotent; the filesystem is
77
+ * preserved for later restart.
78
+ */
79
+ stop(name, options) {
80
+ return this._client.post((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/stop`, {
81
+ ...options,
82
+ headers: (0, headers_js_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
83
+ });
84
+ }
85
+ }
86
+ exports.Boxes = Boxes;
@@ -0,0 +1,458 @@
1
+ import { APIResource } from '../../core/resource.js';
2
+ import * as SandboxesAPI from './sandboxes.js';
3
+ import { APIPromise } from '../../core/api-promise.js';
4
+ import { RequestOptions } from '../../internal/request-options.js';
5
+ export declare class Boxes extends APIResource {
6
+ /**
7
+ * Create a new sandbox from a snapshot. Provide at most one of `snapshot_id` or
8
+ * `snapshot_name`; if neither is provided, the server uses the default static
9
+ * blueprint.
10
+ */
11
+ create(body: BoxCreateParams, options?: RequestOptions): APIPromise<SandboxesAPI.SandboxResponse>;
12
+ /**
13
+ * Retrieve a sandbox by name. Stale provisioning sandboxes are auto-failed.
14
+ */
15
+ retrieve(name: string, options?: RequestOptions): APIPromise<SandboxesAPI.SandboxResponse>;
16
+ /**
17
+ * Update a sandbox's display name. The name must be unique within the tenant.
18
+ */
19
+ update(name: string, body: BoxUpdateParams, options?: RequestOptions): APIPromise<SandboxesAPI.SandboxResponse>;
20
+ /**
21
+ * List sandboxes for the authenticated tenant, with optional filtering, sorting,
22
+ * and pagination.
23
+ */
24
+ list(query?: BoxListParams | null | undefined, options?: RequestOptions): APIPromise<SandboxesAPI.SandboxListResponse>;
25
+ /**
26
+ * Delete a sandbox by name or UUID. Tears down the sandbox runtime and removes the
27
+ * DB record.
28
+ */
29
+ delete(name: string, options?: RequestOptions): APIPromise<void>;
30
+ /**
31
+ * Create a snapshot by capturing the current state of a sandbox or promoting an
32
+ * existing checkpoint.
33
+ */
34
+ createSnapshot(name: string, body: BoxCreateSnapshotParams, options?: RequestOptions): APIPromise<SandboxesAPI.SnapshotResponse>;
35
+ /**
36
+ * Create a short-lived JWT for accessing an HTTP service running on a specific
37
+ * port inside a sandbox. Returns a browser_url (sets auth cookie via redirect), a
38
+ * service_url (for use with the X-Langsmith-Sandbox-Service-Token header), the raw
39
+ * token, and its expiry.
40
+ */
41
+ generateServiceURL(name: string, body: BoxGenerateServiceURLParams, options?: RequestOptions): APIPromise<SandboxesAPI.ServiceURLResponse>;
42
+ /**
43
+ * Retrieve the lightweight status of a sandbox for polling.
44
+ */
45
+ getStatus(name: string, options?: RequestOptions): APIPromise<SandboxesAPI.SandboxStatusResponse>;
46
+ /**
47
+ * Start a stopped or failed sandbox. This endpoint is not idempotent.
48
+ */
49
+ start(name: string, options?: RequestOptions): APIPromise<SandboxesAPI.SandboxResponse>;
50
+ /**
51
+ * Stop a ready sandbox. This endpoint is not idempotent; the filesystem is
52
+ * preserved for later restart.
53
+ */
54
+ stop(name: string, options?: RequestOptions): APIPromise<void>;
55
+ }
56
+ export interface BoxCreateParams {
57
+ delete_after_stop_seconds?: number;
58
+ env_vars?: {
59
+ [key: string]: string;
60
+ };
61
+ fs_capacity_bytes?: number;
62
+ idle_ttl_seconds?: number;
63
+ mem_bytes?: number;
64
+ mount_config?: BoxCreateParams.MountConfig;
65
+ name?: string;
66
+ proxy_config?: BoxCreateParams.ProxyConfig;
67
+ /**
68
+ * RestoreMemory selects how the sandbox handles a snapshot's captured memory:
69
+ *
70
+ * nil → if-present: resume from memory when the snapshot has it, else cold-boot
71
+ * (default). true → always: resume from memory; rejected if the snapshot has none.
72
+ * false → never: always cold-boot.
73
+ *
74
+ * Applies to this request only.
75
+ */
76
+ restore_memory?: boolean;
77
+ snapshot_id?: string;
78
+ snapshot_name?: string;
79
+ tag_value_ids?: Array<string>;
80
+ vcpus?: number;
81
+ }
82
+ export declare namespace BoxCreateParams {
83
+ interface MountConfig {
84
+ auth?: MountConfig.Auth;
85
+ mounts?: Array<MountConfig.SandboxapiS3BucketMountSpec | MountConfig.SandboxapiGcsBucketMountSpec | MountConfig.SandboxapiGitRepoMountSpec>;
86
+ }
87
+ namespace MountConfig {
88
+ interface Auth {
89
+ aws?: Auth.Aws;
90
+ gcp?: Auth.Gcp;
91
+ }
92
+ namespace Auth {
93
+ interface Aws {
94
+ access_key_id: Aws.AccessKeyID;
95
+ secret_access_key: Aws.SecretAccessKey;
96
+ }
97
+ namespace Aws {
98
+ interface AccessKeyID {
99
+ type: 'plaintext' | 'opaque' | 'workspace_secret';
100
+ is_set?: boolean;
101
+ value?: string;
102
+ }
103
+ interface SecretAccessKey {
104
+ type: 'plaintext' | 'opaque' | 'workspace_secret';
105
+ is_set?: boolean;
106
+ value?: string;
107
+ }
108
+ }
109
+ interface Gcp {
110
+ service_account_json: Gcp.ServiceAccountJson;
111
+ }
112
+ namespace Gcp {
113
+ interface ServiceAccountJson {
114
+ type: 'plaintext' | 'opaque' | 'workspace_secret';
115
+ is_set?: boolean;
116
+ value?: string;
117
+ }
118
+ }
119
+ }
120
+ interface SandboxapiS3BucketMountSpec {
121
+ id: string;
122
+ mount_path: string;
123
+ s3: SandboxapiS3BucketMountSpec.S3;
124
+ type: 's3' | 'gcs' | 'git';
125
+ cache?: SandboxapiS3BucketMountSpec.Cache;
126
+ gcs?: SandboxapiS3BucketMountSpec.Gcs;
127
+ git?: SandboxapiS3BucketMountSpec.Git;
128
+ read_only?: boolean;
129
+ }
130
+ namespace SandboxapiS3BucketMountSpec {
131
+ interface S3 {
132
+ bucket: string;
133
+ region: string;
134
+ endpoint_url?: string;
135
+ path_style?: boolean;
136
+ prefix?: string;
137
+ }
138
+ interface Cache {
139
+ max_size_bytes?: number;
140
+ writeback_seconds?: number;
141
+ }
142
+ interface Gcs {
143
+ bucket: string;
144
+ prefix?: string;
145
+ }
146
+ interface Git {
147
+ remote_url: string;
148
+ ref?: Git.Ref;
149
+ refresh_interval_seconds?: number;
150
+ }
151
+ namespace Git {
152
+ interface Ref {
153
+ name: string;
154
+ type: 'branch' | 'tag';
155
+ }
156
+ }
157
+ }
158
+ interface SandboxapiGcsBucketMountSpec {
159
+ id: string;
160
+ gcs: SandboxapiGcsBucketMountSpec.Gcs;
161
+ mount_path: string;
162
+ type: 's3' | 'gcs' | 'git';
163
+ cache?: SandboxapiGcsBucketMountSpec.Cache;
164
+ git?: SandboxapiGcsBucketMountSpec.Git;
165
+ read_only?: boolean;
166
+ s3?: SandboxapiGcsBucketMountSpec.S3;
167
+ }
168
+ namespace SandboxapiGcsBucketMountSpec {
169
+ interface Gcs {
170
+ bucket: string;
171
+ prefix?: string;
172
+ }
173
+ interface Cache {
174
+ max_size_bytes?: number;
175
+ writeback_seconds?: number;
176
+ }
177
+ interface Git {
178
+ remote_url: string;
179
+ ref?: Git.Ref;
180
+ refresh_interval_seconds?: number;
181
+ }
182
+ namespace Git {
183
+ interface Ref {
184
+ name: string;
185
+ type: 'branch' | 'tag';
186
+ }
187
+ }
188
+ interface S3 {
189
+ bucket: string;
190
+ region: string;
191
+ endpoint_url?: string;
192
+ path_style?: boolean;
193
+ prefix?: string;
194
+ }
195
+ }
196
+ interface SandboxapiGitRepoMountSpec {
197
+ id: string;
198
+ git: SandboxapiGitRepoMountSpec.Git;
199
+ mount_path: string;
200
+ type: 's3' | 'gcs' | 'git';
201
+ cache?: SandboxapiGitRepoMountSpec.Cache;
202
+ gcs?: SandboxapiGitRepoMountSpec.Gcs;
203
+ read_only?: boolean;
204
+ s3?: SandboxapiGitRepoMountSpec.S3;
205
+ }
206
+ namespace SandboxapiGitRepoMountSpec {
207
+ interface Git {
208
+ remote_url: string;
209
+ ref?: Git.Ref;
210
+ refresh_interval_seconds?: number;
211
+ }
212
+ namespace Git {
213
+ interface Ref {
214
+ name: string;
215
+ type: 'branch' | 'tag';
216
+ }
217
+ }
218
+ interface Cache {
219
+ max_size_bytes?: number;
220
+ writeback_seconds?: number;
221
+ }
222
+ interface Gcs {
223
+ bucket: string;
224
+ prefix?: string;
225
+ }
226
+ interface S3 {
227
+ bucket: string;
228
+ region: string;
229
+ endpoint_url?: string;
230
+ path_style?: boolean;
231
+ prefix?: string;
232
+ }
233
+ }
234
+ }
235
+ interface ProxyConfig {
236
+ access_control?: ProxyConfig.AccessControl;
237
+ callbacks?: Array<ProxyConfig.Callback>;
238
+ no_proxy?: Array<string>;
239
+ rules?: Array<ProxyConfig.Rule>;
240
+ }
241
+ namespace ProxyConfig {
242
+ interface AccessControl {
243
+ allow_list?: Array<string>;
244
+ deny_list?: Array<string>;
245
+ }
246
+ interface Callback {
247
+ match_hosts: Array<string>;
248
+ ttl_seconds: number;
249
+ url: string;
250
+ full_request?: boolean;
251
+ request_headers?: Array<Callback.RequestHeader>;
252
+ }
253
+ namespace Callback {
254
+ interface RequestHeader {
255
+ name: string;
256
+ type: 'plaintext' | 'opaque' | 'workspace_secret';
257
+ is_set?: boolean;
258
+ value?: string;
259
+ }
260
+ }
261
+ interface Rule {
262
+ name: string;
263
+ aws?: Rule.Aws;
264
+ enabled?: boolean;
265
+ gcp?: Rule.Gcp;
266
+ headers?: Array<Rule.Header>;
267
+ /**
268
+ * MatchHosts is only accepted for header injection rules. Provider auth rules use
269
+ * built-in host matching.
270
+ */
271
+ match_hosts?: Array<string>;
272
+ match_paths?: Array<string>;
273
+ type?: string;
274
+ }
275
+ namespace Rule {
276
+ interface Aws {
277
+ access_key_id: Aws.AccessKeyID;
278
+ secret_access_key: Aws.SecretAccessKey;
279
+ }
280
+ namespace Aws {
281
+ interface AccessKeyID {
282
+ type: 'plaintext' | 'opaque' | 'workspace_secret';
283
+ is_set?: boolean;
284
+ value?: string;
285
+ }
286
+ interface SecretAccessKey {
287
+ type: 'plaintext' | 'opaque' | 'workspace_secret';
288
+ is_set?: boolean;
289
+ value?: string;
290
+ }
291
+ }
292
+ interface Gcp {
293
+ scopes: Array<string>;
294
+ service_account_json: Gcp.ServiceAccountJson;
295
+ }
296
+ namespace Gcp {
297
+ interface ServiceAccountJson {
298
+ type: 'plaintext' | 'opaque' | 'workspace_secret';
299
+ is_set?: boolean;
300
+ value?: string;
301
+ }
302
+ }
303
+ interface Header {
304
+ name: string;
305
+ type: 'plaintext' | 'opaque' | 'workspace_secret';
306
+ is_set?: boolean;
307
+ value?: string;
308
+ }
309
+ }
310
+ }
311
+ }
312
+ export interface BoxUpdateParams {
313
+ delete_after_stop_seconds?: number;
314
+ fs_capacity_bytes?: number;
315
+ idle_ttl_seconds?: number;
316
+ mem_bytes?: number;
317
+ name?: string;
318
+ proxy_config?: BoxUpdateParams.ProxyConfig;
319
+ tag_value_ids?: Array<string>;
320
+ vcpus?: number;
321
+ }
322
+ export declare namespace BoxUpdateParams {
323
+ interface ProxyConfig {
324
+ access_control?: ProxyConfig.AccessControl;
325
+ callbacks?: Array<ProxyConfig.Callback>;
326
+ no_proxy?: Array<string>;
327
+ rules?: Array<ProxyConfig.Rule>;
328
+ }
329
+ namespace ProxyConfig {
330
+ interface AccessControl {
331
+ allow_list?: Array<string>;
332
+ deny_list?: Array<string>;
333
+ }
334
+ interface Callback {
335
+ match_hosts: Array<string>;
336
+ ttl_seconds: number;
337
+ url: string;
338
+ full_request?: boolean;
339
+ request_headers?: Array<Callback.RequestHeader>;
340
+ }
341
+ namespace Callback {
342
+ interface RequestHeader {
343
+ name: string;
344
+ type: 'plaintext' | 'opaque' | 'workspace_secret';
345
+ is_set?: boolean;
346
+ value?: string;
347
+ }
348
+ }
349
+ interface Rule {
350
+ name: string;
351
+ aws?: Rule.Aws;
352
+ enabled?: boolean;
353
+ gcp?: Rule.Gcp;
354
+ headers?: Array<Rule.Header>;
355
+ /**
356
+ * MatchHosts is only accepted for header injection rules. Provider auth rules use
357
+ * built-in host matching.
358
+ */
359
+ match_hosts?: Array<string>;
360
+ match_paths?: Array<string>;
361
+ type?: string;
362
+ }
363
+ namespace Rule {
364
+ interface Aws {
365
+ access_key_id: Aws.AccessKeyID;
366
+ secret_access_key: Aws.SecretAccessKey;
367
+ }
368
+ namespace Aws {
369
+ interface AccessKeyID {
370
+ type: 'plaintext' | 'opaque' | 'workspace_secret';
371
+ is_set?: boolean;
372
+ value?: string;
373
+ }
374
+ interface SecretAccessKey {
375
+ type: 'plaintext' | 'opaque' | 'workspace_secret';
376
+ is_set?: boolean;
377
+ value?: string;
378
+ }
379
+ }
380
+ interface Gcp {
381
+ scopes: Array<string>;
382
+ service_account_json: Gcp.ServiceAccountJson;
383
+ }
384
+ namespace Gcp {
385
+ interface ServiceAccountJson {
386
+ type: 'plaintext' | 'opaque' | 'workspace_secret';
387
+ is_set?: boolean;
388
+ value?: string;
389
+ }
390
+ }
391
+ interface Header {
392
+ name: string;
393
+ type: 'plaintext' | 'opaque' | 'workspace_secret';
394
+ is_set?: boolean;
395
+ value?: string;
396
+ }
397
+ }
398
+ }
399
+ }
400
+ export interface BoxListParams {
401
+ /**
402
+ * Filter by creator identity. Only 'me' is supported.
403
+ */
404
+ created_by?: string;
405
+ /**
406
+ * Maximum number of results
407
+ */
408
+ limit?: number;
409
+ /**
410
+ * Filter by name substring
411
+ */
412
+ name_contains?: string;
413
+ /**
414
+ * Pagination offset
415
+ */
416
+ offset?: number;
417
+ /**
418
+ * Sort column (name, status, created_at)
419
+ */
420
+ sort_by?: string;
421
+ /**
422
+ * Sort direction (asc, desc)
423
+ */
424
+ sort_direction?: string;
425
+ /**
426
+ * Filter by status (provisioning, ready, failed, stopped, deleting)
427
+ */
428
+ status?: string;
429
+ }
430
+ export interface BoxCreateSnapshotParams {
431
+ name: string;
432
+ /**
433
+ * if omitted, creates a fresh checkpoint from the running VM
434
+ */
435
+ checkpoint?: string;
436
+ /**
437
+ * sandbox-local Docker image to export
438
+ */
439
+ docker_image?: string;
440
+ /**
441
+ * required for Docker image export unless the sandbox has a capacity
442
+ */
443
+ fs_capacity_bytes?: number;
444
+ /**
445
+ * IncludeMemory, when true, captures a full VM memory snapshot alongside the
446
+ * filesystem clone. Only honored when the sandbox is running AND Checkpoint is
447
+ * omitted (i.e. a fresh in-VM checkpoint is requested). Defaults to false to keep
448
+ * snapshots small unless memory restore is explicitly desired.
449
+ */
450
+ include_memory?: boolean;
451
+ }
452
+ export interface BoxGenerateServiceURLParams {
453
+ expires_in_seconds?: number;
454
+ port?: number;
455
+ }
456
+ export declare namespace Boxes {
457
+ export { type BoxCreateParams as BoxCreateParams, type BoxUpdateParams as BoxUpdateParams, type BoxListParams as BoxListParams, type BoxCreateSnapshotParams as BoxCreateSnapshotParams, type BoxGenerateServiceURLParams as BoxGenerateServiceURLParams, };
458
+ }