oblien 1.3.0 → 2.0.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.
- package/dist/client.d.ts +31 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +33 -0
- package/dist/client.js.map +1 -0
- package/dist/error.d.ts +29 -0
- package/dist/error.d.ts.map +1 -0
- package/dist/error.js +52 -0
- package/dist/error.js.map +1 -0
- package/dist/http.d.ts +20 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +108 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/resources/api-access.d.ts +21 -0
- package/dist/resources/api-access.d.ts.map +1 -0
- package/dist/resources/api-access.js +32 -0
- package/dist/resources/api-access.js.map +1 -0
- package/dist/resources/base.d.ts +17 -0
- package/dist/resources/base.d.ts.map +1 -0
- package/dist/resources/base.js +21 -0
- package/dist/resources/base.js.map +1 -0
- package/dist/resources/images.d.ts +11 -0
- package/dist/resources/images.d.ts.map +1 -0
- package/dist/resources/images.js +16 -0
- package/dist/resources/images.js.map +1 -0
- package/dist/resources/lifecycle.d.ts +23 -0
- package/dist/resources/lifecycle.d.ts.map +1 -0
- package/dist/resources/lifecycle.js +32 -0
- package/dist/resources/lifecycle.js.map +1 -0
- package/dist/resources/logs.d.ts +25 -0
- package/dist/resources/logs.d.ts.map +1 -0
- package/dist/resources/logs.js +51 -0
- package/dist/resources/logs.js.map +1 -0
- package/dist/resources/metadata.d.ts +15 -0
- package/dist/resources/metadata.d.ts.map +1 -0
- package/dist/resources/metadata.js +20 -0
- package/dist/resources/metadata.js.map +1 -0
- package/dist/resources/metrics.d.ts +17 -0
- package/dist/resources/metrics.d.ts.map +1 -0
- package/dist/resources/metrics.js +27 -0
- package/dist/resources/metrics.js.map +1 -0
- package/dist/resources/network.d.ts +17 -0
- package/dist/resources/network.d.ts.map +1 -0
- package/dist/resources/network.js +20 -0
- package/dist/resources/network.js.map +1 -0
- package/dist/resources/public-access.d.ts +15 -0
- package/dist/resources/public-access.d.ts.map +1 -0
- package/dist/resources/public-access.js +21 -0
- package/dist/resources/public-access.js.map +1 -0
- package/dist/resources/resources.d.ts +15 -0
- package/dist/resources/resources.d.ts.map +1 -0
- package/dist/resources/resources.js +20 -0
- package/dist/resources/resources.js.map +1 -0
- package/dist/resources/snapshots.d.ts +27 -0
- package/dist/resources/snapshots.d.ts.map +1 -0
- package/dist/resources/snapshots.js +45 -0
- package/dist/resources/snapshots.js.map +1 -0
- package/dist/resources/ssh.d.ts +19 -0
- package/dist/resources/ssh.d.ts.map +1 -0
- package/dist/resources/ssh.js +28 -0
- package/dist/resources/ssh.js.map +1 -0
- package/dist/resources/usage.d.ts +25 -0
- package/dist/resources/usage.d.ts.map +1 -0
- package/dist/resources/usage.js +44 -0
- package/dist/resources/usage.js.map +1 -0
- package/dist/resources/workloads.d.ts +39 -0
- package/dist/resources/workloads.d.ts.map +1 -0
- package/dist/resources/workloads.js +83 -0
- package/dist/resources/workloads.js.map +1 -0
- package/dist/runtime/exec.d.ts +71 -0
- package/dist/runtime/exec.d.ts.map +1 -0
- package/dist/runtime/exec.js +163 -0
- package/dist/runtime/exec.js.map +1 -0
- package/dist/runtime/files.d.ts +39 -0
- package/dist/runtime/files.d.ts.map +1 -0
- package/dist/runtime/files.js +143 -0
- package/dist/runtime/files.js.map +1 -0
- package/dist/runtime/search.d.ts +23 -0
- package/dist/runtime/search.d.ts.map +1 -0
- package/dist/runtime/search.js +65 -0
- package/dist/runtime/search.js.map +1 -0
- package/dist/runtime/terminal.d.ts +29 -0
- package/dist/runtime/terminal.d.ts.map +1 -0
- package/dist/runtime/terminal.js +58 -0
- package/dist/runtime/terminal.js.map +1 -0
- package/dist/runtime/watcher.d.ts +27 -0
- package/dist/runtime/watcher.d.ts.map +1 -0
- package/dist/runtime/watcher.js +53 -0
- package/dist/runtime/watcher.js.map +1 -0
- package/dist/runtime/ws.d.ts +92 -0
- package/dist/runtime/ws.d.ts.map +1 -0
- package/dist/runtime/ws.js +228 -0
- package/dist/runtime/ws.js.map +1 -0
- package/dist/runtime-http.d.ts +35 -0
- package/dist/runtime-http.d.ts.map +1 -0
- package/dist/runtime-http.js +99 -0
- package/dist/runtime-http.js.map +1 -0
- package/dist/runtime.d.ts +77 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +97 -0
- package/dist/runtime.js.map +1 -0
- package/dist/types/client.d.ts +7 -0
- package/dist/types/client.d.ts.map +1 -0
- package/dist/types/client.js +3 -0
- package/dist/types/client.js.map +1 -0
- package/dist/types/common.d.ts +13 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/common.js +3 -0
- package/dist/types/common.js.map +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/network.d.ts +15 -0
- package/dist/types/network.d.ts.map +1 -0
- package/dist/types/network.js +3 -0
- package/dist/types/network.js.map +1 -0
- package/dist/types/resources.d.ts +10 -0
- package/dist/types/resources.d.ts.map +1 -0
- package/dist/types/resources.js +3 -0
- package/dist/types/resources.js.map +1 -0
- package/dist/types/runtime.d.ts +302 -0
- package/dist/types/runtime.d.ts.map +1 -0
- package/dist/types/runtime.js +3 -0
- package/dist/types/runtime.js.map +1 -0
- package/dist/types/workspace-resources.d.ts +186 -0
- package/dist/types/workspace-resources.d.ts.map +1 -0
- package/dist/types/workspace-resources.js +3 -0
- package/dist/types/workspace-resources.js.map +1 -0
- package/dist/types/workspace.d.ts +41 -0
- package/dist/types/workspace.d.ts.map +1 -0
- package/dist/types/workspace.js +3 -0
- package/dist/types/workspace.js.map +1 -0
- package/dist/workspace.d.ts +135 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/workspace.js +194 -0
- package/dist/workspace.js.map +1 -0
- package/package.json +30 -69
- package/LICENSE +0 -21
- package/README.md +0 -574
- package/agents.js +0 -14
- package/browser.js +0 -6
- package/cdn.js +0 -6
- package/chat.js +0 -21
- package/credits.js +0 -11
- package/icons.js +0 -11
- package/index.d.ts +0 -986
- package/index.js +0 -63
- package/namespaces.js +0 -12
- package/sandbox.js +0 -12
- package/search.js +0 -11
- package/src/agents/agent.js +0 -229
- package/src/agents/index.js +0 -227
- package/src/agents/settings.js +0 -100
- package/src/agents/tools.js +0 -155
- package/src/browser/index.js +0 -474
- package/src/cdn/index.js +0 -769
- package/src/chat/index.js +0 -724
- package/src/chat/session.js +0 -93
- package/src/client.js +0 -175
- package/src/credits/index.js +0 -492
- package/src/icons/index.js +0 -185
- package/src/namespaces/index.js +0 -236
- package/src/namespaces/namespace.js +0 -274
- package/src/sandbox/core/api/base.js +0 -89
- package/src/sandbox/core/api/database.js +0 -340
- package/src/sandbox/core/api/files.js +0 -141
- package/src/sandbox/core/api/git.js +0 -174
- package/src/sandbox/core/api/search.js +0 -29
- package/src/sandbox/core/api/snapshots.js +0 -132
- package/src/sandbox/core/api/terminal.js +0 -20
- package/src/sandbox/core/auth.js +0 -256
- package/src/sandbox/core/client.js +0 -197
- package/src/sandbox/core/index.js +0 -22
- package/src/sandbox/core/managers/terminal.js +0 -453
- package/src/sandbox/core/managers/watcher.js +0 -197
- package/src/sandbox/core/types.js +0 -92
- package/src/sandbox/core/utils/http.js +0 -89
- package/src/sandbox/core/websocket/connection.js +0 -479
- package/src/sandbox/index.d.ts +0 -542
- package/src/sandbox/index.js +0 -234
- package/src/sandbox/sandbox.js +0 -313
- package/src/search/index.js +0 -206
- package/src/utils/guest-manager.js +0 -454
package/src/sandbox/index.d.ts
DELETED
|
@@ -1,542 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TypeScript type definitions for agent-sandbox
|
|
3
|
-
*
|
|
4
|
-
* Documentation: https://oblien.com/docs/sandbox
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
export interface OblienConfig {
|
|
8
|
-
clientId: string;
|
|
9
|
-
clientSecret: string;
|
|
10
|
-
apiURL?: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface SandboxConfig {
|
|
14
|
-
baseURL?: string;
|
|
15
|
-
token: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface SandboxCreateOptions {
|
|
19
|
-
name?: string;
|
|
20
|
-
region?: string;
|
|
21
|
-
template?: string;
|
|
22
|
-
config?: any;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface SandboxListOptions {
|
|
26
|
-
page?: number;
|
|
27
|
-
limit?: number;
|
|
28
|
-
status?: string;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface SandboxDetails {
|
|
32
|
-
id: string;
|
|
33
|
-
token: string;
|
|
34
|
-
url: string;
|
|
35
|
-
name?: string;
|
|
36
|
-
status: string;
|
|
37
|
-
region?: string;
|
|
38
|
-
createdAt?: string;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface FileListOptions {
|
|
42
|
-
dirPath: string;
|
|
43
|
-
recursive?: boolean;
|
|
44
|
-
ignorePatterns?: string[];
|
|
45
|
-
nested?: boolean;
|
|
46
|
-
light?: boolean;
|
|
47
|
-
flattenResults?: boolean;
|
|
48
|
-
maxDepth?: number;
|
|
49
|
-
useGitignore?: boolean;
|
|
50
|
-
pathFilter?: string;
|
|
51
|
-
includeHash?: boolean;
|
|
52
|
-
includeContent?: boolean;
|
|
53
|
-
maxContentSize?: number;
|
|
54
|
-
enableChunking?: boolean;
|
|
55
|
-
maxChunkSize?: number;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export interface FileGetOptions {
|
|
59
|
-
filePath: string;
|
|
60
|
-
range?: { start: number; end: number };
|
|
61
|
-
withLineNumbers?: boolean;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface FileCreateOptions {
|
|
65
|
-
parentPath?: string;
|
|
66
|
-
fileName?: string;
|
|
67
|
-
fullPath?: string;
|
|
68
|
-
filePath?: string;
|
|
69
|
-
content?: string;
|
|
70
|
-
isFolder?: boolean;
|
|
71
|
-
withWatcher?: boolean;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export interface FileDeleteOptions {
|
|
75
|
-
filePath: string;
|
|
76
|
-
withWatcher?: boolean;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export interface FileRenameOptions {
|
|
80
|
-
sourcePath: string;
|
|
81
|
-
destinationPath: string;
|
|
82
|
-
withWatcher?: boolean;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export interface FileUploadOptions {
|
|
86
|
-
filePath: string;
|
|
87
|
-
content: string;
|
|
88
|
-
withWatcher?: boolean;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export interface FileEditOptions {
|
|
92
|
-
filePath: string;
|
|
93
|
-
content?: string;
|
|
94
|
-
edits?: any;
|
|
95
|
-
withWatcher?: boolean;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export interface FileMergeOptions {
|
|
99
|
-
filePath: string;
|
|
100
|
-
content: string;
|
|
101
|
-
options?: any;
|
|
102
|
-
withWatcher?: boolean;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export interface GitAuthConfig {
|
|
106
|
-
type?: 'ssh' | 'token';
|
|
107
|
-
sshKey?: string;
|
|
108
|
-
username?: string;
|
|
109
|
-
password?: string;
|
|
110
|
-
token?: string;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export interface GitCloneOptions {
|
|
114
|
-
url: string;
|
|
115
|
-
targetDir: string;
|
|
116
|
-
branch?: string;
|
|
117
|
-
auth?: GitAuthConfig;
|
|
118
|
-
root?: boolean;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export interface GitPullOptions {
|
|
122
|
-
repoPath: string;
|
|
123
|
-
branch?: string;
|
|
124
|
-
auth?: GitAuthConfig;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export interface GitPushOptions {
|
|
128
|
-
repoPath: string;
|
|
129
|
-
branch?: string;
|
|
130
|
-
force?: boolean;
|
|
131
|
-
auth?: GitAuthConfig;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
export interface GitCommitOptions {
|
|
135
|
-
repoPath: string;
|
|
136
|
-
message: string;
|
|
137
|
-
author?: { name: string; email: string };
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
export interface GitBranchOptions {
|
|
141
|
-
repoPath: string;
|
|
142
|
-
branchName?: string;
|
|
143
|
-
checkout?: boolean;
|
|
144
|
-
includeRemote?: boolean;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export interface SearchOptions {
|
|
148
|
-
query: string;
|
|
149
|
-
options?: {
|
|
150
|
-
caseSensitive?: boolean;
|
|
151
|
-
regex?: boolean;
|
|
152
|
-
path?: string;
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
export interface TerminalOptions {
|
|
157
|
-
command: string;
|
|
158
|
-
cwd?: string;
|
|
159
|
-
env?: Record<string, string>;
|
|
160
|
-
timeout?: number;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export interface SnapshotCommitOptions {
|
|
164
|
-
message: string;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
export interface SnapshotGotoOptions {
|
|
168
|
-
commitHash: string;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
export interface SnapshotArchiveOptions {
|
|
172
|
-
id: string;
|
|
173
|
-
options?: any;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
export interface SnapshotRestoreOptions {
|
|
177
|
-
id: string;
|
|
178
|
-
override?: boolean;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
// ============ Database Types ============
|
|
182
|
-
|
|
183
|
-
export interface DatabaseCreateOptions {
|
|
184
|
-
name: string;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export interface DatabaseDeleteOptions {
|
|
188
|
-
database: string;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export interface TableCreateOptions {
|
|
192
|
-
database: string;
|
|
193
|
-
tableName: string;
|
|
194
|
-
columns: Array<{
|
|
195
|
-
name: string;
|
|
196
|
-
type: string;
|
|
197
|
-
primaryKey?: boolean;
|
|
198
|
-
notNull?: boolean;
|
|
199
|
-
unique?: boolean;
|
|
200
|
-
defaultValue?: any;
|
|
201
|
-
autoIncrement?: boolean;
|
|
202
|
-
}>;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
export interface TableRenameOptions {
|
|
206
|
-
database: string;
|
|
207
|
-
table: string;
|
|
208
|
-
newName: string;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
export interface TableDataOptions {
|
|
212
|
-
database: string;
|
|
213
|
-
table: string;
|
|
214
|
-
page?: number;
|
|
215
|
-
limit?: number;
|
|
216
|
-
sortBy?: string;
|
|
217
|
-
sortOrder?: 'asc' | 'desc';
|
|
218
|
-
where?: Record<string, any>;
|
|
219
|
-
filters?: Record<string, any>;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
export interface RowInsertOptions {
|
|
223
|
-
database: string;
|
|
224
|
-
table: string;
|
|
225
|
-
data: Record<string, any>;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
export interface RowUpdateOptions {
|
|
229
|
-
database: string;
|
|
230
|
-
table: string;
|
|
231
|
-
data: Record<string, any>;
|
|
232
|
-
where: Record<string, any>;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
export interface RowDeleteOptions {
|
|
236
|
-
database: string;
|
|
237
|
-
table: string;
|
|
238
|
-
where: Record<string, any>;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
export interface QueryExecuteOptions {
|
|
242
|
-
database: string;
|
|
243
|
-
query: string;
|
|
244
|
-
params?: any[];
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
export interface TransactionExecuteOptions {
|
|
248
|
-
database: string;
|
|
249
|
-
queries: Array<{
|
|
250
|
-
query: string;
|
|
251
|
-
params?: any[];
|
|
252
|
-
}>;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
export interface ImportFromJSONOptions {
|
|
256
|
-
database: string;
|
|
257
|
-
table: string;
|
|
258
|
-
data: Array<Record<string, any>>;
|
|
259
|
-
options?: {
|
|
260
|
-
truncate?: boolean;
|
|
261
|
-
skipErrors?: boolean;
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
export interface ColumnAddOptions {
|
|
266
|
-
database: string;
|
|
267
|
-
table: string;
|
|
268
|
-
name: string;
|
|
269
|
-
type: string;
|
|
270
|
-
notNull?: boolean;
|
|
271
|
-
defaultValue?: any;
|
|
272
|
-
unique?: boolean;
|
|
273
|
-
constraints?: Record<string, any>;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
export interface IndexCreateOptions {
|
|
277
|
-
database: string;
|
|
278
|
-
table: string;
|
|
279
|
-
name: string;
|
|
280
|
-
columns: string[];
|
|
281
|
-
unique?: boolean;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
export interface ForeignKeyConstraintsOptions {
|
|
285
|
-
database: string;
|
|
286
|
-
enabled: boolean;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
export class FilesAPI {
|
|
290
|
-
list(options: FileListOptions): Promise<any>;
|
|
291
|
-
get(options: FileGetOptions): Promise<any>;
|
|
292
|
-
create(options: FileCreateOptions): Promise<any>;
|
|
293
|
-
delete(options: FileDeleteOptions): Promise<any>;
|
|
294
|
-
rename(options: FileRenameOptions): Promise<any>;
|
|
295
|
-
upload(options: FileUploadOptions): Promise<any>;
|
|
296
|
-
download(options: { filePath: string }): Promise<any>;
|
|
297
|
-
exists(options: { filePath: string }): Promise<any>;
|
|
298
|
-
edit(options: FileEditOptions): Promise<any>;
|
|
299
|
-
merge(options: FileMergeOptions): Promise<any>;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
export class GitAPI {
|
|
303
|
-
listKeys(): Promise<any>;
|
|
304
|
-
configUser(options: { repoPath: string; name: string; email: string }): Promise<any>;
|
|
305
|
-
check(options: { repoPath: string }): Promise<any>;
|
|
306
|
-
clone(options: GitCloneOptions): Promise<any>;
|
|
307
|
-
pull(options: GitPullOptions): Promise<any>;
|
|
308
|
-
push(options: GitPushOptions): Promise<any>;
|
|
309
|
-
status(options: { repoPath: string }): Promise<any>;
|
|
310
|
-
getCurrentBranch(options: { repoPath: string }): Promise<any>;
|
|
311
|
-
listBranches(options: GitBranchOptions): Promise<any>;
|
|
312
|
-
createBranch(options: GitBranchOptions): Promise<any>;
|
|
313
|
-
checkoutBranch(options: GitBranchOptions): Promise<any>;
|
|
314
|
-
add(options: { repoPath: string; files: string[] }): Promise<any>;
|
|
315
|
-
commit(options: GitCommitOptions): Promise<any>;
|
|
316
|
-
init(options: { repoPath: string }): Promise<any>;
|
|
317
|
-
history(options: { repoPath: string; limit?: number }): Promise<any>;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
export class SearchAPI {
|
|
321
|
-
search(options: SearchOptions): Promise<any>;
|
|
322
|
-
searchFileNames(options: SearchOptions): Promise<any>;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
export class TerminalAPI {
|
|
326
|
-
execute(options: TerminalOptions): Promise<any>;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
export class SnapshotsAPI {
|
|
330
|
-
commit(options: SnapshotCommitOptions): Promise<any>;
|
|
331
|
-
goto(options: SnapshotGotoOptions): Promise<any>;
|
|
332
|
-
listCheckpoints(options?: { limit?: number }): Promise<any>;
|
|
333
|
-
getCheckpoint(commitHash: string): Promise<any>;
|
|
334
|
-
getCurrentCheckpoint(): Promise<any>;
|
|
335
|
-
cleanup(): Promise<any>;
|
|
336
|
-
deleteAfter(options: { commitHash: string }): Promise<any>;
|
|
337
|
-
archive(options: SnapshotArchiveOptions): Promise<any>;
|
|
338
|
-
restore(options: SnapshotRestoreOptions): Promise<any>;
|
|
339
|
-
listArchives(): Promise<any>;
|
|
340
|
-
getArchive(id: string): Promise<any>;
|
|
341
|
-
deleteArchive(id: string): Promise<any>;
|
|
342
|
-
cleanupArchives(options?: any): Promise<any>;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
export interface WebSocketConnectOptions {
|
|
346
|
-
binary?: boolean;
|
|
347
|
-
silent?: boolean;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
export interface TerminalCreateOptions {
|
|
351
|
-
terminalId?: number;
|
|
352
|
-
cols?: number;
|
|
353
|
-
rows?: number;
|
|
354
|
-
cwd?: string;
|
|
355
|
-
command?: string;
|
|
356
|
-
args?: string[];
|
|
357
|
-
task?: boolean;
|
|
358
|
-
force?: boolean;
|
|
359
|
-
onData?: (data: string) => void;
|
|
360
|
-
onExit?: (code: number, signal?: string) => void;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
export interface TerminalStateOptions {
|
|
364
|
-
newOnly?: boolean;
|
|
365
|
-
maxLines?: number;
|
|
366
|
-
direction?: 'top' | 'bottom';
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
export interface FileWatcherOptions {
|
|
370
|
-
ignorePatterns?: string[];
|
|
371
|
-
onChange?: (path: string) => void;
|
|
372
|
-
onAdd?: (path: string) => void;
|
|
373
|
-
onUnlink?: (path: string) => void;
|
|
374
|
-
onError?: (error: any) => void;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
export class Terminal {
|
|
378
|
-
readonly id: number;
|
|
379
|
-
write(data: string): void;
|
|
380
|
-
resize(cols: number, rows: number): Promise<void>;
|
|
381
|
-
getState(options?: TerminalStateOptions): Promise<string>;
|
|
382
|
-
onData(callback: (data: string) => void): void;
|
|
383
|
-
onExit(callback: (code: number, signal?: string) => void): void;
|
|
384
|
-
close(force?: boolean): Promise<void>;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
export class TerminalManager {
|
|
388
|
-
create(options?: TerminalCreateOptions): Promise<Terminal>;
|
|
389
|
-
list(): Promise<Array<{ id: number }>>;
|
|
390
|
-
get(terminalId: number): Terminal | null;
|
|
391
|
-
close(terminalId: number, force?: boolean): Promise<void>;
|
|
392
|
-
disconnect(): void;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
export class WatcherManager {
|
|
396
|
-
readonly isWatching: boolean;
|
|
397
|
-
start(options?: FileWatcherOptions): Promise<void>;
|
|
398
|
-
stop(): void;
|
|
399
|
-
on(event: 'add' | 'change' | 'unlink' | 'error', handler: (path: string) => void): void;
|
|
400
|
-
off(event: 'add' | 'change' | 'unlink' | 'error', handler: (path: string) => void): void;
|
|
401
|
-
disconnect(): void;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
export class WebSocketClient {
|
|
405
|
-
readonly isConnected: boolean;
|
|
406
|
-
connect(options?: WebSocketConnectOptions): Promise<void>;
|
|
407
|
-
disconnect(): void;
|
|
408
|
-
on(event: string, handler: (...args: any[]) => void): void;
|
|
409
|
-
off(event: string, handler: (...args: any[]) => void): void;
|
|
410
|
-
once(event: string, handler: (...args: any[]) => void): void;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
export class WebSocketAPI {
|
|
414
|
-
readonly terminal: TerminalManager;
|
|
415
|
-
readonly watcher: WatcherManager;
|
|
416
|
-
readonly client: WebSocketClient;
|
|
417
|
-
readonly isConnected: boolean;
|
|
418
|
-
|
|
419
|
-
connect(options?: WebSocketConnectOptions): Promise<WebSocketAPI>;
|
|
420
|
-
disconnect(): void;
|
|
421
|
-
on(event: string, handler: (...args: any[]) => void): void;
|
|
422
|
-
off(event: string, handler: (...args: any[]) => void): void;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
export class DatabaseAPI {
|
|
426
|
-
// Database Operations
|
|
427
|
-
listDatabases(): Promise<any>;
|
|
428
|
-
createDatabase(options: DatabaseCreateOptions): Promise<any>;
|
|
429
|
-
deleteDatabase(options: DatabaseDeleteOptions): Promise<any>;
|
|
430
|
-
getDatabaseInfo(database: string): Promise<any>;
|
|
431
|
-
|
|
432
|
-
// Table Operations
|
|
433
|
-
listTables(database: string): Promise<any>;
|
|
434
|
-
getTableSchema(database: string, table: string): Promise<any>;
|
|
435
|
-
createTable(options: TableCreateOptions): Promise<any>;
|
|
436
|
-
dropTable(database: string, table: string): Promise<any>;
|
|
437
|
-
renameTable(options: TableRenameOptions): Promise<any>;
|
|
438
|
-
|
|
439
|
-
// Data Operations
|
|
440
|
-
getTableData(options: TableDataOptions): Promise<any>;
|
|
441
|
-
insertRow(options: RowInsertOptions): Promise<any>;
|
|
442
|
-
updateRow(options: RowUpdateOptions): Promise<any>;
|
|
443
|
-
deleteRow(options: RowDeleteOptions): Promise<any>;
|
|
444
|
-
|
|
445
|
-
// Query Operations
|
|
446
|
-
executeQuery(options: QueryExecuteOptions): Promise<any>;
|
|
447
|
-
executeTransaction(options: TransactionExecuteOptions): Promise<any>;
|
|
448
|
-
|
|
449
|
-
// Import/Export Operations
|
|
450
|
-
exportTableToJSON(database: string, table: string): Promise<any>;
|
|
451
|
-
exportTableToCSV(database: string, table: string): Promise<any>;
|
|
452
|
-
importFromJSON(options: ImportFromJSONOptions): Promise<any>;
|
|
453
|
-
exportDatabaseToSQL(database: string): Promise<any>;
|
|
454
|
-
|
|
455
|
-
// Schema Management Operations
|
|
456
|
-
addColumn(options: ColumnAddOptions): Promise<any>;
|
|
457
|
-
listIndexes(database: string, table: string): Promise<any>;
|
|
458
|
-
createIndex(options: IndexCreateOptions): Promise<any>;
|
|
459
|
-
dropIndex(database: string, indexName: string): Promise<any>;
|
|
460
|
-
listForeignKeys(database: string, table: string): Promise<any>;
|
|
461
|
-
setForeignKeyConstraints(options: ForeignKeyConstraintsOptions): Promise<any>;
|
|
462
|
-
getForeignKeyStatus(database: string): Promise<any>;
|
|
463
|
-
getTableSchemaFull(database: string, table: string): Promise<any>;
|
|
464
|
-
analyzeTable(database: string, table: string): Promise<any>;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
// Remove old SandboxesAPI, use OblienSandboxes instead
|
|
468
|
-
|
|
469
|
-
export class OblienClient {
|
|
470
|
-
constructor(config: OblienConfig);
|
|
471
|
-
|
|
472
|
-
sandboxes: OblienSandboxes;
|
|
473
|
-
|
|
474
|
-
authenticate(): Promise<string>;
|
|
475
|
-
getAuthHeaders(): Promise<Record<string, string>>;
|
|
476
|
-
get(path: string): Promise<any>;
|
|
477
|
-
post(path: string, body?: any): Promise<any>;
|
|
478
|
-
delete(path: string): Promise<any>;
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
export class SandboxClient {
|
|
482
|
-
constructor(config: SandboxConfig);
|
|
483
|
-
|
|
484
|
-
files: FilesAPI;
|
|
485
|
-
git: GitAPI;
|
|
486
|
-
search: SearchAPI;
|
|
487
|
-
snapshots: SnapshotsAPI;
|
|
488
|
-
database: DatabaseAPI;
|
|
489
|
-
terminal: TerminalManager;
|
|
490
|
-
watcher: WatcherManager;
|
|
491
|
-
websocket: WebSocketAPI;
|
|
492
|
-
|
|
493
|
-
testConnection(): Promise<boolean>;
|
|
494
|
-
getToken(): Promise<string>;
|
|
495
|
-
getBaseURL(): string;
|
|
496
|
-
connect(): Promise<void>;
|
|
497
|
-
disconnect(): void;
|
|
498
|
-
readonly connected: boolean;
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
export class Sandbox extends SandboxClient {
|
|
502
|
-
constructor(options: {
|
|
503
|
-
client?: any;
|
|
504
|
-
sandboxId?: string;
|
|
505
|
-
token?: string;
|
|
506
|
-
baseURL?: string;
|
|
507
|
-
});
|
|
508
|
-
|
|
509
|
-
// Static methods
|
|
510
|
-
static fromToken(token: string, sandboxId?: string, baseURL?: string): Sandbox;
|
|
511
|
-
static create(client: any, options?: SandboxCreateOptions): Promise<Sandbox>;
|
|
512
|
-
|
|
513
|
-
// Management methods
|
|
514
|
-
get(): Promise<SandboxDetails>;
|
|
515
|
-
update(updates: Partial<SandboxDetails>): Promise<any>;
|
|
516
|
-
delete(): Promise<any>;
|
|
517
|
-
start(): Promise<any>;
|
|
518
|
-
stop(): Promise<any>;
|
|
519
|
-
restart(): Promise<any>;
|
|
520
|
-
regenerateToken(): Promise<any>;
|
|
521
|
-
getMetrics(): Promise<any>;
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
export class OblienSandboxes {
|
|
525
|
-
constructor(client: any);
|
|
526
|
-
|
|
527
|
-
create(options?: SandboxCreateOptions): Promise<Sandbox>;
|
|
528
|
-
list(options?: SandboxListOptions): Promise<any>;
|
|
529
|
-
get(sandboxId: string): Promise<any>;
|
|
530
|
-
update(sandboxId: string, updates: any): Promise<any>;
|
|
531
|
-
delete(sandboxId: string): Promise<any>;
|
|
532
|
-
start(sandboxId: string): Promise<any>;
|
|
533
|
-
stop(sandboxId: string): Promise<any>;
|
|
534
|
-
restart(sandboxId: string): Promise<any>;
|
|
535
|
-
regenerateToken(sandboxId: string): Promise<any>;
|
|
536
|
-
getMetrics(sandboxId: string): Promise<any>;
|
|
537
|
-
getStats(): Promise<any>;
|
|
538
|
-
getActivity(): Promise<any>;
|
|
539
|
-
sandbox(sandboxId: string): Sandbox;
|
|
540
|
-
fromToken(token: string, sandboxId?: string, baseURL?: string): Sandbox;
|
|
541
|
-
}
|
|
542
|
-
|