langsmith 0.7.12 → 0.7.14
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.
- package/dist/_openapi_client/client.cjs +9 -1
- package/dist/_openapi_client/client.d.ts +5 -2
- package/dist/_openapi_client/client.js +9 -1
- package/dist/_openapi_client/resources/datasets/datasets.cjs +5 -14
- package/dist/_openapi_client/resources/datasets/datasets.d.ts +6 -10
- package/dist/_openapi_client/resources/datasets/datasets.js +5 -14
- package/dist/_openapi_client/resources/datasets/experiment-runs.cjs +18 -0
- package/dist/_openapi_client/resources/datasets/experiment-runs.d.ts +109 -0
- package/dist/_openapi_client/resources/datasets/experiment-runs.js +14 -0
- package/dist/_openapi_client/resources/datasets/runs.cjs +0 -7
- package/dist/_openapi_client/resources/datasets/runs.d.ts +1 -45
- package/dist/_openapi_client/resources/datasets/runs.js +0 -7
- package/dist/_openapi_client/resources/index.cjs +4 -2
- package/dist/_openapi_client/resources/index.d.ts +2 -1
- package/dist/_openapi_client/resources/index.js +2 -1
- package/dist/_openapi_client/resources/runs/runs.d.ts +1 -1
- package/dist/_openapi_client/resources/sandboxes/boxes.cjs +86 -0
- package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +465 -0
- package/dist/_openapi_client/resources/sandboxes/boxes.js +82 -0
- package/dist/_openapi_client/resources/sandboxes/registries.cjs +44 -0
- package/dist/_openapi_client/resources/sandboxes/registries.d.ts +67 -0
- package/dist/_openapi_client/resources/sandboxes/registries.js +40 -0
- package/dist/_openapi_client/resources/sandboxes/sandboxes.cjs +72 -0
- package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +309 -0
- package/dist/_openapi_client/resources/sandboxes/sandboxes.js +35 -0
- package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +39 -0
- package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +62 -0
- package/dist/_openapi_client/resources/sandboxes/snapshots.js +35 -0
- package/dist/_openapi_client/resources/sessions.cjs +53 -0
- package/dist/_openapi_client/resources/{sessions/sessions.d.ts → sessions.d.ts} +13 -51
- package/dist/_openapi_client/resources/sessions.js +49 -0
- package/dist/client.cjs +44 -0
- package/dist/client.d.ts +31 -0
- package/dist/client.js +44 -0
- package/dist/experimental/anthropic/context.cjs +5 -1
- package/dist/experimental/anthropic/context.js +5 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/sandbox/client.cjs +58 -15
- package/dist/sandbox/client.d.ts +27 -1
- package/dist/sandbox/client.js +54 -11
- package/dist/sandbox/sandbox.cjs +7 -6
- package/dist/sandbox/sandbox.d.ts +7 -2
- package/dist/sandbox/sandbox.js +8 -7
- package/dist/sandbox/types.d.ts +1 -7
- package/package.json +1 -1
- package/dist/_openapi_client/resources/datasets/experiments.cjs +0 -16
- package/dist/_openapi_client/resources/datasets/experiments.d.ts +0 -23
- package/dist/_openapi_client/resources/datasets/experiments.js +0 -12
- package/dist/_openapi_client/resources/datasets/group.cjs +0 -17
- package/dist/_openapi_client/resources/datasets/group.d.ts +0 -160
- package/dist/_openapi_client/resources/datasets/group.js +0 -13
- package/dist/_openapi_client/resources/sessions/insights.cjs +0 -54
- package/dist/_openapi_client/resources/sessions/insights.d.ts +0 -246
- package/dist/_openapi_client/resources/sessions/insights.js +0 -50
- package/dist/_openapi_client/resources/sessions/sessions.cjs +0 -109
- package/dist/_openapi_client/resources/sessions/sessions.js +0 -72
|
@@ -0,0 +1,72 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
21
|
+
var ownKeys = function(o) {
|
|
22
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
23
|
+
var ar = [];
|
|
24
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
25
|
+
return ar;
|
|
26
|
+
};
|
|
27
|
+
return ownKeys(o);
|
|
28
|
+
};
|
|
29
|
+
return function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
})();
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.Sandboxes = void 0;
|
|
39
|
+
const resource_js_1 = require("../../core/resource.cjs");
|
|
40
|
+
const BoxesAPI = __importStar(require("./boxes.cjs"));
|
|
41
|
+
const boxes_js_1 = require("./boxes.cjs");
|
|
42
|
+
const RegistriesAPI = __importStar(require("./registries.cjs"));
|
|
43
|
+
const registries_js_1 = require("./registries.cjs");
|
|
44
|
+
const SnapshotsAPI = __importStar(require("./snapshots.cjs"));
|
|
45
|
+
const snapshots_js_1 = require("./snapshots.cjs");
|
|
46
|
+
class Sandboxes extends resource_js_1.APIResource {
|
|
47
|
+
constructor() {
|
|
48
|
+
super(...arguments);
|
|
49
|
+
Object.defineProperty(this, "boxes", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
configurable: true,
|
|
52
|
+
writable: true,
|
|
53
|
+
value: new BoxesAPI.Boxes(this._client)
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(this, "registries", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
configurable: true,
|
|
58
|
+
writable: true,
|
|
59
|
+
value: new RegistriesAPI.Registries(this._client)
|
|
60
|
+
});
|
|
61
|
+
Object.defineProperty(this, "snapshots", {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
configurable: true,
|
|
64
|
+
writable: true,
|
|
65
|
+
value: new SnapshotsAPI.Snapshots(this._client)
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.Sandboxes = Sandboxes;
|
|
70
|
+
Sandboxes.Boxes = boxes_js_1.Boxes;
|
|
71
|
+
Sandboxes.Registries = registries_js_1.Registries;
|
|
72
|
+
Sandboxes.Snapshots = snapshots_js_1.Snapshots;
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { APIResource } from '../../core/resource.js';
|
|
2
|
+
import * as BoxesAPI from './boxes.js';
|
|
3
|
+
import { BoxCreateParams, BoxCreateSnapshotParams, BoxGenerateServiceURLParams, BoxListParams, BoxUpdateParams, Boxes } from './boxes.js';
|
|
4
|
+
import * as RegistriesAPI from './registries.js';
|
|
5
|
+
import { Registries, RegistryCreateParams, RegistryListParams, RegistryListResponse, RegistryResponse, RegistryUpdateParams } from './registries.js';
|
|
6
|
+
import * as SnapshotsAPI from './snapshots.js';
|
|
7
|
+
import { SnapshotCreateParams, SnapshotListParams, Snapshots } from './snapshots.js';
|
|
8
|
+
export declare class Sandboxes extends APIResource {
|
|
9
|
+
boxes: BoxesAPI.Boxes;
|
|
10
|
+
registries: RegistriesAPI.Registries;
|
|
11
|
+
snapshots: SnapshotsAPI.Snapshots;
|
|
12
|
+
}
|
|
13
|
+
export interface SandboxListResponse {
|
|
14
|
+
offset?: number;
|
|
15
|
+
sandboxes?: Array<SandboxResponse>;
|
|
16
|
+
}
|
|
17
|
+
export interface SandboxResponse {
|
|
18
|
+
id?: string;
|
|
19
|
+
cpu_millicores?: number;
|
|
20
|
+
created_at?: string;
|
|
21
|
+
created_by?: string;
|
|
22
|
+
dataplane_url?: string;
|
|
23
|
+
delete_after_stop_seconds?: number;
|
|
24
|
+
fs_capacity_bytes?: number;
|
|
25
|
+
idle_ttl_seconds?: number;
|
|
26
|
+
mem_bytes?: number;
|
|
27
|
+
mount_config?: SandboxResponse.MountConfig;
|
|
28
|
+
name?: string;
|
|
29
|
+
proxy_config?: SandboxResponse.ProxyConfig;
|
|
30
|
+
size_class?: string;
|
|
31
|
+
snapshot_id?: string;
|
|
32
|
+
status?: string;
|
|
33
|
+
status_message?: string;
|
|
34
|
+
stopped_at?: string;
|
|
35
|
+
updated_at?: string;
|
|
36
|
+
updated_by?: string;
|
|
37
|
+
vcpus?: number;
|
|
38
|
+
}
|
|
39
|
+
export declare namespace SandboxResponse {
|
|
40
|
+
interface MountConfig {
|
|
41
|
+
auth?: MountConfig.Auth;
|
|
42
|
+
mounts?: Array<MountConfig.SandboxapiS3BucketMountSpec | MountConfig.SandboxapiGcsBucketMountSpec | MountConfig.SandboxapiGitRepoMountSpec>;
|
|
43
|
+
}
|
|
44
|
+
namespace MountConfig {
|
|
45
|
+
interface Auth {
|
|
46
|
+
aws?: Auth.Aws;
|
|
47
|
+
gcp?: Auth.Gcp;
|
|
48
|
+
}
|
|
49
|
+
namespace Auth {
|
|
50
|
+
interface Aws {
|
|
51
|
+
access_key_id: Aws.AccessKeyID;
|
|
52
|
+
secret_access_key: Aws.SecretAccessKey;
|
|
53
|
+
}
|
|
54
|
+
namespace Aws {
|
|
55
|
+
interface AccessKeyID {
|
|
56
|
+
type: 'plaintext' | 'opaque' | 'workspace_secret';
|
|
57
|
+
is_set?: boolean;
|
|
58
|
+
value?: string;
|
|
59
|
+
}
|
|
60
|
+
interface SecretAccessKey {
|
|
61
|
+
type: 'plaintext' | 'opaque' | 'workspace_secret';
|
|
62
|
+
is_set?: boolean;
|
|
63
|
+
value?: string;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
interface Gcp {
|
|
67
|
+
service_account_json: Gcp.ServiceAccountJson;
|
|
68
|
+
}
|
|
69
|
+
namespace Gcp {
|
|
70
|
+
interface ServiceAccountJson {
|
|
71
|
+
type: 'plaintext' | 'opaque' | 'workspace_secret';
|
|
72
|
+
is_set?: boolean;
|
|
73
|
+
value?: string;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
interface SandboxapiS3BucketMountSpec {
|
|
78
|
+
id: string;
|
|
79
|
+
mount_path: string;
|
|
80
|
+
s3: SandboxapiS3BucketMountSpec.S3;
|
|
81
|
+
type: 's3' | 'gcs' | 'git';
|
|
82
|
+
cache?: SandboxapiS3BucketMountSpec.Cache;
|
|
83
|
+
gcs?: SandboxapiS3BucketMountSpec.Gcs;
|
|
84
|
+
git?: SandboxapiS3BucketMountSpec.Git;
|
|
85
|
+
read_only?: boolean;
|
|
86
|
+
}
|
|
87
|
+
namespace SandboxapiS3BucketMountSpec {
|
|
88
|
+
interface S3 {
|
|
89
|
+
bucket: string;
|
|
90
|
+
region: string;
|
|
91
|
+
endpoint_url?: string;
|
|
92
|
+
path_style?: boolean;
|
|
93
|
+
prefix?: string;
|
|
94
|
+
}
|
|
95
|
+
interface Cache {
|
|
96
|
+
max_size_bytes?: number;
|
|
97
|
+
writeback_seconds?: number;
|
|
98
|
+
}
|
|
99
|
+
interface Gcs {
|
|
100
|
+
bucket: string;
|
|
101
|
+
prefix?: string;
|
|
102
|
+
}
|
|
103
|
+
interface Git {
|
|
104
|
+
remote_url: string;
|
|
105
|
+
ref?: Git.Ref;
|
|
106
|
+
refresh_interval_seconds?: number;
|
|
107
|
+
}
|
|
108
|
+
namespace Git {
|
|
109
|
+
interface Ref {
|
|
110
|
+
name: string;
|
|
111
|
+
type: 'branch' | 'tag';
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
interface SandboxapiGcsBucketMountSpec {
|
|
116
|
+
id: string;
|
|
117
|
+
gcs: SandboxapiGcsBucketMountSpec.Gcs;
|
|
118
|
+
mount_path: string;
|
|
119
|
+
type: 's3' | 'gcs' | 'git';
|
|
120
|
+
cache?: SandboxapiGcsBucketMountSpec.Cache;
|
|
121
|
+
git?: SandboxapiGcsBucketMountSpec.Git;
|
|
122
|
+
read_only?: boolean;
|
|
123
|
+
s3?: SandboxapiGcsBucketMountSpec.S3;
|
|
124
|
+
}
|
|
125
|
+
namespace SandboxapiGcsBucketMountSpec {
|
|
126
|
+
interface Gcs {
|
|
127
|
+
bucket: string;
|
|
128
|
+
prefix?: string;
|
|
129
|
+
}
|
|
130
|
+
interface Cache {
|
|
131
|
+
max_size_bytes?: number;
|
|
132
|
+
writeback_seconds?: number;
|
|
133
|
+
}
|
|
134
|
+
interface Git {
|
|
135
|
+
remote_url: string;
|
|
136
|
+
ref?: Git.Ref;
|
|
137
|
+
refresh_interval_seconds?: number;
|
|
138
|
+
}
|
|
139
|
+
namespace Git {
|
|
140
|
+
interface Ref {
|
|
141
|
+
name: string;
|
|
142
|
+
type: 'branch' | 'tag';
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
interface S3 {
|
|
146
|
+
bucket: string;
|
|
147
|
+
region: string;
|
|
148
|
+
endpoint_url?: string;
|
|
149
|
+
path_style?: boolean;
|
|
150
|
+
prefix?: string;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
interface SandboxapiGitRepoMountSpec {
|
|
154
|
+
id: string;
|
|
155
|
+
git: SandboxapiGitRepoMountSpec.Git;
|
|
156
|
+
mount_path: string;
|
|
157
|
+
type: 's3' | 'gcs' | 'git';
|
|
158
|
+
cache?: SandboxapiGitRepoMountSpec.Cache;
|
|
159
|
+
gcs?: SandboxapiGitRepoMountSpec.Gcs;
|
|
160
|
+
read_only?: boolean;
|
|
161
|
+
s3?: SandboxapiGitRepoMountSpec.S3;
|
|
162
|
+
}
|
|
163
|
+
namespace SandboxapiGitRepoMountSpec {
|
|
164
|
+
interface Git {
|
|
165
|
+
remote_url: string;
|
|
166
|
+
ref?: Git.Ref;
|
|
167
|
+
refresh_interval_seconds?: number;
|
|
168
|
+
}
|
|
169
|
+
namespace Git {
|
|
170
|
+
interface Ref {
|
|
171
|
+
name: string;
|
|
172
|
+
type: 'branch' | 'tag';
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
interface Cache {
|
|
176
|
+
max_size_bytes?: number;
|
|
177
|
+
writeback_seconds?: number;
|
|
178
|
+
}
|
|
179
|
+
interface Gcs {
|
|
180
|
+
bucket: string;
|
|
181
|
+
prefix?: string;
|
|
182
|
+
}
|
|
183
|
+
interface S3 {
|
|
184
|
+
bucket: string;
|
|
185
|
+
region: string;
|
|
186
|
+
endpoint_url?: string;
|
|
187
|
+
path_style?: boolean;
|
|
188
|
+
prefix?: string;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
interface ProxyConfig {
|
|
193
|
+
access_control?: ProxyConfig.AccessControl;
|
|
194
|
+
callbacks?: Array<ProxyConfig.Callback>;
|
|
195
|
+
no_proxy?: Array<string>;
|
|
196
|
+
rules?: Array<ProxyConfig.Rule>;
|
|
197
|
+
}
|
|
198
|
+
namespace ProxyConfig {
|
|
199
|
+
interface AccessControl {
|
|
200
|
+
allow_list?: Array<string>;
|
|
201
|
+
deny_list?: Array<string>;
|
|
202
|
+
}
|
|
203
|
+
interface Callback {
|
|
204
|
+
match_hosts: Array<string>;
|
|
205
|
+
ttl_seconds: number;
|
|
206
|
+
url: string;
|
|
207
|
+
full_request?: boolean;
|
|
208
|
+
request_headers?: Array<Callback.RequestHeader>;
|
|
209
|
+
}
|
|
210
|
+
namespace Callback {
|
|
211
|
+
interface RequestHeader {
|
|
212
|
+
name: string;
|
|
213
|
+
type: 'plaintext' | 'opaque' | 'workspace_secret';
|
|
214
|
+
is_set?: boolean;
|
|
215
|
+
value?: string;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
interface Rule {
|
|
219
|
+
name: string;
|
|
220
|
+
aws?: Rule.Aws;
|
|
221
|
+
enabled?: boolean;
|
|
222
|
+
gcp?: Rule.Gcp;
|
|
223
|
+
headers?: Array<Rule.Header>;
|
|
224
|
+
/**
|
|
225
|
+
* MatchHosts is only accepted for header injection rules. Provider auth rules use
|
|
226
|
+
* built-in host matching.
|
|
227
|
+
*/
|
|
228
|
+
match_hosts?: Array<string>;
|
|
229
|
+
match_paths?: Array<string>;
|
|
230
|
+
type?: string;
|
|
231
|
+
}
|
|
232
|
+
namespace Rule {
|
|
233
|
+
interface Aws {
|
|
234
|
+
access_key_id: Aws.AccessKeyID;
|
|
235
|
+
secret_access_key: Aws.SecretAccessKey;
|
|
236
|
+
}
|
|
237
|
+
namespace Aws {
|
|
238
|
+
interface AccessKeyID {
|
|
239
|
+
type: 'plaintext' | 'opaque' | 'workspace_secret';
|
|
240
|
+
is_set?: boolean;
|
|
241
|
+
value?: string;
|
|
242
|
+
}
|
|
243
|
+
interface SecretAccessKey {
|
|
244
|
+
type: 'plaintext' | 'opaque' | 'workspace_secret';
|
|
245
|
+
is_set?: boolean;
|
|
246
|
+
value?: string;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
interface Gcp {
|
|
250
|
+
scopes: Array<string>;
|
|
251
|
+
service_account_json: Gcp.ServiceAccountJson;
|
|
252
|
+
}
|
|
253
|
+
namespace Gcp {
|
|
254
|
+
interface ServiceAccountJson {
|
|
255
|
+
type: 'plaintext' | 'opaque' | 'workspace_secret';
|
|
256
|
+
is_set?: boolean;
|
|
257
|
+
value?: string;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
interface Header {
|
|
261
|
+
name: string;
|
|
262
|
+
type: 'plaintext' | 'opaque' | 'workspace_secret';
|
|
263
|
+
is_set?: boolean;
|
|
264
|
+
value?: string;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
export interface SandboxStatusResponse {
|
|
270
|
+
status?: string;
|
|
271
|
+
status_message?: string;
|
|
272
|
+
}
|
|
273
|
+
export interface ServiceURLResponse {
|
|
274
|
+
token?: string;
|
|
275
|
+
browser_url?: string;
|
|
276
|
+
expires_at?: string;
|
|
277
|
+
service_url?: string;
|
|
278
|
+
}
|
|
279
|
+
export interface SnapshotListResponse {
|
|
280
|
+
offset?: number;
|
|
281
|
+
snapshots?: Array<SnapshotResponse>;
|
|
282
|
+
}
|
|
283
|
+
export interface SnapshotResponse {
|
|
284
|
+
id?: string;
|
|
285
|
+
created_at?: string;
|
|
286
|
+
created_by?: string;
|
|
287
|
+
docker_image?: string;
|
|
288
|
+
fs_capacity_bytes?: number;
|
|
289
|
+
fs_used_bytes?: number;
|
|
290
|
+
image_digest?: string;
|
|
291
|
+
/**
|
|
292
|
+
* MemorySnapshotSizeBytes is non-nil iff the snapshot was captured with VM memory
|
|
293
|
+
* state. A non-nil value is the canonical signal that this snapshot can
|
|
294
|
+
* warm-restore from memory; nil means rootfs only.
|
|
295
|
+
*/
|
|
296
|
+
memory_snapshot_size_bytes?: number;
|
|
297
|
+
name?: string;
|
|
298
|
+
registry_id?: string;
|
|
299
|
+
source_sandbox_id?: string;
|
|
300
|
+
status?: string;
|
|
301
|
+
status_message?: string;
|
|
302
|
+
updated_at?: string;
|
|
303
|
+
}
|
|
304
|
+
export declare namespace Sandboxes {
|
|
305
|
+
export { type SandboxListResponse as SandboxListResponse, type SandboxResponse as SandboxResponse, type SandboxStatusResponse as SandboxStatusResponse, type ServiceURLResponse as ServiceURLResponse, type SnapshotListResponse as SnapshotListResponse, type SnapshotResponse as SnapshotResponse, };
|
|
306
|
+
export { Boxes as Boxes, type BoxCreateParams as BoxCreateParams, type BoxUpdateParams as BoxUpdateParams, type BoxListParams as BoxListParams, type BoxCreateSnapshotParams as BoxCreateSnapshotParams, type BoxGenerateServiceURLParams as BoxGenerateServiceURLParams, };
|
|
307
|
+
export { Registries as Registries, type RegistryListResponse as RegistryListResponse, type RegistryResponse as RegistryResponse, type RegistryCreateParams as RegistryCreateParams, type RegistryUpdateParams as RegistryUpdateParams, type RegistryListParams as RegistryListParams, };
|
|
308
|
+
export { Snapshots as Snapshots, type SnapshotCreateParams as SnapshotCreateParams, type SnapshotListParams as SnapshotListParams, };
|
|
309
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 BoxesAPI from './boxes.js';
|
|
5
|
+
import { Boxes, } from './boxes.js';
|
|
6
|
+
import * as RegistriesAPI from './registries.js';
|
|
7
|
+
import { Registries, } from './registries.js';
|
|
8
|
+
import * as SnapshotsAPI from './snapshots.js';
|
|
9
|
+
import { Snapshots } from './snapshots.js';
|
|
10
|
+
export class Sandboxes extends APIResource {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
Object.defineProperty(this, "boxes", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
configurable: true,
|
|
16
|
+
writable: true,
|
|
17
|
+
value: new BoxesAPI.Boxes(this._client)
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(this, "registries", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true,
|
|
23
|
+
value: new RegistriesAPI.Registries(this._client)
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(this, "snapshots", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
configurable: true,
|
|
28
|
+
writable: true,
|
|
29
|
+
value: new SnapshotsAPI.Snapshots(this._client)
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
Sandboxes.Boxes = Boxes;
|
|
34
|
+
Sandboxes.Registries = Registries;
|
|
35
|
+
Sandboxes.Snapshots = Snapshots;
|
|
@@ -0,0 +1,39 @@
|
|
|
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.Snapshots = 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 Snapshots extends resource_js_1.APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Create a snapshot from a Docker image (async build).
|
|
12
|
+
*/
|
|
13
|
+
create(body, options) {
|
|
14
|
+
return this._client.post('/v2/sandboxes/snapshots', { body, ...options });
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Get a sandbox snapshot by ID.
|
|
18
|
+
*/
|
|
19
|
+
retrieve(snapshotID, options) {
|
|
20
|
+
return this._client.get((0, path_js_1.path) `/v2/sandboxes/snapshots/${snapshotID}`, options);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* List sandbox snapshots for the authenticated tenant, with optional filtering,
|
|
24
|
+
* sorting, and pagination.
|
|
25
|
+
*/
|
|
26
|
+
list(query = {}, options) {
|
|
27
|
+
return this._client.get('/v2/sandboxes/snapshots', { query, ...options });
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Delete a snapshot by ID. The underlying storage is reclaimed asynchronously.
|
|
31
|
+
*/
|
|
32
|
+
delete(snapshotID, options) {
|
|
33
|
+
return this._client.delete((0, path_js_1.path) `/v2/sandboxes/snapshots/${snapshotID}`, {
|
|
34
|
+
...options,
|
|
35
|
+
headers: (0, headers_js_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.Snapshots = Snapshots;
|
|
@@ -0,0 +1,62 @@
|
|
|
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 Snapshots extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Create a snapshot from a Docker image (async build).
|
|
8
|
+
*/
|
|
9
|
+
create(body: SnapshotCreateParams, options?: RequestOptions): APIPromise<SandboxesAPI.SnapshotResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Get a sandbox snapshot by ID.
|
|
12
|
+
*/
|
|
13
|
+
retrieve(snapshotID: string, options?: RequestOptions): APIPromise<SandboxesAPI.SnapshotResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* List sandbox snapshots for the authenticated tenant, with optional filtering,
|
|
16
|
+
* sorting, and pagination.
|
|
17
|
+
*/
|
|
18
|
+
list(query?: SnapshotListParams | null | undefined, options?: RequestOptions): APIPromise<SandboxesAPI.SnapshotListResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* Delete a snapshot by ID. The underlying storage is reclaimed asynchronously.
|
|
21
|
+
*/
|
|
22
|
+
delete(snapshotID: string, options?: RequestOptions): APIPromise<void>;
|
|
23
|
+
}
|
|
24
|
+
export interface SnapshotCreateParams {
|
|
25
|
+
docker_image: string;
|
|
26
|
+
fs_capacity_bytes: number;
|
|
27
|
+
name: string;
|
|
28
|
+
registry_id?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface SnapshotListParams {
|
|
31
|
+
/**
|
|
32
|
+
* Filter by creator identity. Only 'me' is supported.
|
|
33
|
+
*/
|
|
34
|
+
created_by?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Maximum number of results
|
|
37
|
+
*/
|
|
38
|
+
limit?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Filter by name substring
|
|
41
|
+
*/
|
|
42
|
+
name_contains?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Pagination offset
|
|
45
|
+
*/
|
|
46
|
+
offset?: number;
|
|
47
|
+
/**
|
|
48
|
+
* Sort column (name, status, created_at)
|
|
49
|
+
*/
|
|
50
|
+
sort_by?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Sort direction (asc, desc)
|
|
53
|
+
*/
|
|
54
|
+
sort_direction?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Filter by status (building, ready, failed, deleting)
|
|
57
|
+
*/
|
|
58
|
+
status?: string;
|
|
59
|
+
}
|
|
60
|
+
export declare namespace Snapshots {
|
|
61
|
+
export { type SnapshotCreateParams as SnapshotCreateParams, type SnapshotListParams as SnapshotListParams };
|
|
62
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 { buildHeaders } from '../../internal/headers.js';
|
|
5
|
+
import { path } from '../../internal/utils/path.js';
|
|
6
|
+
export class Snapshots extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Create a snapshot from a Docker image (async build).
|
|
9
|
+
*/
|
|
10
|
+
create(body, options) {
|
|
11
|
+
return this._client.post('/v2/sandboxes/snapshots', { body, ...options });
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Get a sandbox snapshot by ID.
|
|
15
|
+
*/
|
|
16
|
+
retrieve(snapshotID, options) {
|
|
17
|
+
return this._client.get(path `/v2/sandboxes/snapshots/${snapshotID}`, options);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* List sandbox snapshots for the authenticated tenant, with optional filtering,
|
|
21
|
+
* sorting, and pagination.
|
|
22
|
+
*/
|
|
23
|
+
list(query = {}, options) {
|
|
24
|
+
return this._client.get('/v2/sandboxes/snapshots', { query, ...options });
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Delete a snapshot by ID. The underlying storage is reclaimed asynchronously.
|
|
28
|
+
*/
|
|
29
|
+
delete(snapshotID, options) {
|
|
30
|
+
return this._client.delete(path `/v2/sandboxes/snapshots/${snapshotID}`, {
|
|
31
|
+
...options,
|
|
32
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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.Sessions = void 0;
|
|
6
|
+
const resource_js_1 = require("../core/resource.cjs");
|
|
7
|
+
const pagination_js_1 = require("../core/pagination.cjs");
|
|
8
|
+
const headers_js_1 = require("../internal/headers.cjs");
|
|
9
|
+
const path_js_1 = require("../internal/utils/path.cjs");
|
|
10
|
+
class Sessions extends resource_js_1.APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Create a new project.
|
|
13
|
+
*/
|
|
14
|
+
create(params, options) {
|
|
15
|
+
const { upsert, ...body } = params;
|
|
16
|
+
return this._client.post('/api/v1/sessions', { query: { upsert }, body, ...options });
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Get a specific project.
|
|
20
|
+
*/
|
|
21
|
+
retrieve(project_id, params = {}, options) {
|
|
22
|
+
const { accept, ...query } = params ?? {};
|
|
23
|
+
return this._client.get((0, path_js_1.path) `/api/v1/sessions/${project_id}`, {
|
|
24
|
+
query,
|
|
25
|
+
...options,
|
|
26
|
+
headers: (0, headers_js_1.buildHeaders)([{ ...(accept != null ? { accept: accept } : undefined) }, options?.headers]),
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Update a project.
|
|
31
|
+
*/
|
|
32
|
+
update(project_id, body, options) {
|
|
33
|
+
return this._client.patch((0, path_js_1.path) `/api/v1/sessions/${project_id}`, { body, ...options });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* List all projects.
|
|
37
|
+
*/
|
|
38
|
+
list(params = {}, options) {
|
|
39
|
+
const { accept, ...query } = params ?? {};
|
|
40
|
+
return this._client.getAPIList('/api/v1/sessions', (pagination_js_1.OffsetPaginationTopLevelArray), {
|
|
41
|
+
query,
|
|
42
|
+
...options,
|
|
43
|
+
headers: (0, headers_js_1.buildHeaders)([{ ...(accept != null ? { accept: accept } : undefined) }, options?.headers]),
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Delete a specific project.
|
|
48
|
+
*/
|
|
49
|
+
delete(project_id, options) {
|
|
50
|
+
return this._client.delete((0, path_js_1.path) `/api/v1/sessions/${project_id}`, options);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.Sessions = Sessions;
|