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/dist/client.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { HttpClient } from './http.js';
|
|
2
|
+
import { Workspace } from './workspace.js';
|
|
3
|
+
import type { OblienOptions } from './types/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* Oblien API client.
|
|
6
|
+
*
|
|
7
|
+
* ```ts
|
|
8
|
+
* import Oblien from 'oblien';
|
|
9
|
+
*
|
|
10
|
+
* const client = new Oblien({
|
|
11
|
+
* clientId: process.env.OBLIEN_CLIENT_ID!,
|
|
12
|
+
* clientSecret: process.env.OBLIEN_CLIENT_SECRET!,
|
|
13
|
+
* });
|
|
14
|
+
*
|
|
15
|
+
* // Via the client
|
|
16
|
+
* const data = await client.workspaces.create({ image: 'node' });
|
|
17
|
+
* await client.workspaces.start(data.id);
|
|
18
|
+
*
|
|
19
|
+
* // Or standalone (same class)
|
|
20
|
+
* import { Workspace } from 'oblien/workspace';
|
|
21
|
+
* const ws = new Workspace(client);
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare class Oblien {
|
|
25
|
+
/** @internal — used by resource classes to make HTTP requests. */
|
|
26
|
+
readonly _http: HttpClient;
|
|
27
|
+
/** Workspace operations (CRUD, power, quota). */
|
|
28
|
+
readonly workspaces: Workspace;
|
|
29
|
+
constructor(options: OblienOptions);
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,MAAM;IACjB,kEAAkE;IAClE,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAE3B,iDAAiD;IACjD,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;gBAEnB,OAAO,EAAE,aAAa;CAInC"}
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { HttpClient } from './http.js';
|
|
2
|
+
import { Workspace } from './workspace.js';
|
|
3
|
+
/**
|
|
4
|
+
* Oblien API client.
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* import Oblien from 'oblien';
|
|
8
|
+
*
|
|
9
|
+
* const client = new Oblien({
|
|
10
|
+
* clientId: process.env.OBLIEN_CLIENT_ID!,
|
|
11
|
+
* clientSecret: process.env.OBLIEN_CLIENT_SECRET!,
|
|
12
|
+
* });
|
|
13
|
+
*
|
|
14
|
+
* // Via the client
|
|
15
|
+
* const data = await client.workspaces.create({ image: 'node' });
|
|
16
|
+
* await client.workspaces.start(data.id);
|
|
17
|
+
*
|
|
18
|
+
* // Or standalone (same class)
|
|
19
|
+
* import { Workspace } from 'oblien/workspace';
|
|
20
|
+
* const ws = new Workspace(client);
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export class Oblien {
|
|
24
|
+
/** @internal — used by resource classes to make HTTP requests. */
|
|
25
|
+
_http;
|
|
26
|
+
/** Workspace operations (CRUD, power, quota). */
|
|
27
|
+
workspaces;
|
|
28
|
+
constructor(options) {
|
|
29
|
+
this._http = new HttpClient(options);
|
|
30
|
+
this.workspaces = new Workspace(this);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG3C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,OAAO,MAAM;IACjB,kEAAkE;IACzD,KAAK,CAAa;IAE3B,iDAAiD;IACxC,UAAU,CAAY;IAE/B,YAAY,OAAsB;QAChC,IAAI,CAAC,KAAK,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;CACF"}
|
package/dist/error.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured error hierarchy for the Oblien SDK.
|
|
3
|
+
* Every API error is wrapped in one of these classes so callers can
|
|
4
|
+
* catch by type (`catch (e) { if (e instanceof NotFoundError) … }`).
|
|
5
|
+
*/
|
|
6
|
+
export declare class OblienError extends Error {
|
|
7
|
+
readonly status?: number;
|
|
8
|
+
readonly code?: string;
|
|
9
|
+
constructor(message: string, status?: number, code?: string);
|
|
10
|
+
}
|
|
11
|
+
export declare class AuthenticationError extends OblienError {
|
|
12
|
+
constructor(message?: string);
|
|
13
|
+
}
|
|
14
|
+
export declare class NotFoundError extends OblienError {
|
|
15
|
+
constructor(message?: string);
|
|
16
|
+
}
|
|
17
|
+
export declare class RateLimitError extends OblienError {
|
|
18
|
+
constructor(message?: string);
|
|
19
|
+
}
|
|
20
|
+
export declare class ValidationError extends OblienError {
|
|
21
|
+
constructor(message?: string);
|
|
22
|
+
}
|
|
23
|
+
export declare class PaymentRequiredError extends OblienError {
|
|
24
|
+
constructor(message?: string);
|
|
25
|
+
}
|
|
26
|
+
export declare class ConflictError extends OblienError {
|
|
27
|
+
constructor(message?: string);
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,qBAAa,WAAY,SAAQ,KAAK;IACpC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;gBAEX,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM;CAM5D;AAED,qBAAa,mBAAoB,SAAQ,WAAW;gBACtC,OAAO,SAAmC;CAIvD;AAED,qBAAa,aAAc,SAAQ,WAAW;gBAChC,OAAO,SAAuB;CAI3C;AAED,qBAAa,cAAe,SAAQ,WAAW;gBACjC,OAAO,SAAwB;CAI5C;AAED,qBAAa,eAAgB,SAAQ,WAAW;gBAClC,OAAO,SAAsB;CAI1C;AAED,qBAAa,oBAAqB,SAAQ,WAAW;gBACvC,OAAO,SAAmB;CAIvC;AAED,qBAAa,aAAc,SAAQ,WAAW;gBAChC,OAAO,SAA4B;CAIhD"}
|
package/dist/error.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured error hierarchy for the Oblien SDK.
|
|
3
|
+
* Every API error is wrapped in one of these classes so callers can
|
|
4
|
+
* catch by type (`catch (e) { if (e instanceof NotFoundError) … }`).
|
|
5
|
+
*/
|
|
6
|
+
export class OblienError extends Error {
|
|
7
|
+
status;
|
|
8
|
+
code;
|
|
9
|
+
constructor(message, status, code) {
|
|
10
|
+
super(message);
|
|
11
|
+
this.name = 'OblienError';
|
|
12
|
+
this.status = status;
|
|
13
|
+
this.code = code;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export class AuthenticationError extends OblienError {
|
|
17
|
+
constructor(message = 'Invalid or missing credentials') {
|
|
18
|
+
super(message, 401, 'authentication_error');
|
|
19
|
+
this.name = 'AuthenticationError';
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export class NotFoundError extends OblienError {
|
|
23
|
+
constructor(message = 'Resource not found') {
|
|
24
|
+
super(message, 404, 'not_found');
|
|
25
|
+
this.name = 'NotFoundError';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export class RateLimitError extends OblienError {
|
|
29
|
+
constructor(message = 'Rate limit exceeded') {
|
|
30
|
+
super(message, 429, 'rate_limited');
|
|
31
|
+
this.name = 'RateLimitError';
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export class ValidationError extends OblienError {
|
|
35
|
+
constructor(message = 'Validation failed') {
|
|
36
|
+
super(message, 422, 'validation_error');
|
|
37
|
+
this.name = 'ValidationError';
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export class PaymentRequiredError extends OblienError {
|
|
41
|
+
constructor(message = 'Quota exceeded') {
|
|
42
|
+
super(message, 402, 'payment_required');
|
|
43
|
+
this.name = 'PaymentRequiredError';
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
export class ConflictError extends OblienError {
|
|
47
|
+
constructor(message = 'Resource in wrong state') {
|
|
48
|
+
super(message, 409, 'conflict');
|
|
49
|
+
this.name = 'ConflictError';
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,OAAO,WAAY,SAAQ,KAAK;IAC3B,MAAM,CAAU;IAChB,IAAI,CAAU;IAEvB,YAAY,OAAe,EAAE,MAAe,EAAE,IAAa;QACzD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;QAC1B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AAED,MAAM,OAAO,mBAAoB,SAAQ,WAAW;IAClD,YAAY,OAAO,GAAG,gCAAgC;QACpD,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,sBAAsB,CAAC,CAAC;QAC5C,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF;AAED,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C,YAAY,OAAO,GAAG,oBAAoB;QACxC,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,WAAW,CAAC,CAAC;QACjC,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AAED,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C,YAAY,OAAO,GAAG,qBAAqB;QACzC,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,cAAc,CAAC,CAAC;QACpC,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF;AAED,MAAM,OAAO,eAAgB,SAAQ,WAAW;IAC9C,YAAY,OAAO,GAAG,mBAAmB;QACvC,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,kBAAkB,CAAC,CAAC;QACxC,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AAED,MAAM,OAAO,oBAAqB,SAAQ,WAAW;IACnD,YAAY,OAAO,GAAG,gBAAgB;QACpC,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,kBAAkB,CAAC,CAAC;QACxC,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C,YAAY,OAAO,GAAG,yBAAyB;QAC7C,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF"}
|
package/dist/http.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { OblienOptions, RequestOptions } from './types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Low-level HTTP transport.
|
|
4
|
+
* Uses native `fetch` (Node 18+). All auth headers are injected automatically.
|
|
5
|
+
*/
|
|
6
|
+
export declare class HttpClient {
|
|
7
|
+
private readonly baseUrl;
|
|
8
|
+
private readonly headers;
|
|
9
|
+
constructor(options: OblienOptions);
|
|
10
|
+
/** Execute an HTTP request and return the parsed JSON body. */
|
|
11
|
+
request<T = unknown>(options: RequestOptions): Promise<T>;
|
|
12
|
+
/**
|
|
13
|
+
* Execute an SSE streaming request and yield parsed JSON events.
|
|
14
|
+
* Used for stats streams, log streams, and other Server-Sent Events endpoints.
|
|
15
|
+
*/
|
|
16
|
+
requestSSE<T = unknown>(options: RequestOptions): AsyncGenerator<T>;
|
|
17
|
+
private buildUrl;
|
|
18
|
+
private errorForStatus;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAWtE;;;GAGG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;gBAErC,OAAO,EAAE,aAAa;IASlC,+DAA+D;IACzD,OAAO,CAAC,CAAC,GAAG,OAAO,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,CAAC,CAAC;IAqB/D;;;OAGG;IACI,UAAU,CAAC,CAAC,GAAG,OAAO,EAAE,OAAO,EAAE,cAAc,GAAG,cAAc,CAAC,CAAC,CAAC;IAiD1E,OAAO,CAAC,QAAQ;IAgBhB,OAAO,CAAC,cAAc;CAevB"}
|
package/dist/http.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { OblienError, AuthenticationError, NotFoundError, RateLimitError, ValidationError, PaymentRequiredError, ConflictError, } from './error.js';
|
|
2
|
+
/**
|
|
3
|
+
* Low-level HTTP transport.
|
|
4
|
+
* Uses native `fetch` (Node 18+). All auth headers are injected automatically.
|
|
5
|
+
*/
|
|
6
|
+
export class HttpClient {
|
|
7
|
+
baseUrl;
|
|
8
|
+
headers;
|
|
9
|
+
constructor(options) {
|
|
10
|
+
this.baseUrl = (options.baseUrl ?? 'https://api.oblien.com').replace(/\/$/, '');
|
|
11
|
+
this.headers = {
|
|
12
|
+
'Content-Type': 'application/json',
|
|
13
|
+
'X-Client-ID': options.clientId,
|
|
14
|
+
'X-Client-Secret': options.clientSecret,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/** Execute an HTTP request and return the parsed JSON body. */
|
|
18
|
+
async request(options) {
|
|
19
|
+
const url = this.buildUrl(options.path, options.query);
|
|
20
|
+
const init = {
|
|
21
|
+
method: options.method,
|
|
22
|
+
headers: { ...this.headers, ...options.headers },
|
|
23
|
+
};
|
|
24
|
+
if (options.body !== undefined) {
|
|
25
|
+
init.body = JSON.stringify(options.body);
|
|
26
|
+
}
|
|
27
|
+
const res = await fetch(url, init);
|
|
28
|
+
const body = await res.json().catch(() => null);
|
|
29
|
+
if (!res.ok) {
|
|
30
|
+
throw this.errorForStatus(res.status, body);
|
|
31
|
+
}
|
|
32
|
+
return body;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Execute an SSE streaming request and yield parsed JSON events.
|
|
36
|
+
* Used for stats streams, log streams, and other Server-Sent Events endpoints.
|
|
37
|
+
*/
|
|
38
|
+
async *requestSSE(options) {
|
|
39
|
+
const url = this.buildUrl(options.path, options.query);
|
|
40
|
+
const init = {
|
|
41
|
+
method: options.method,
|
|
42
|
+
headers: { ...this.headers, ...options.headers, 'Accept': 'text/event-stream' },
|
|
43
|
+
};
|
|
44
|
+
if (options.body !== undefined) {
|
|
45
|
+
init.body = JSON.stringify(options.body);
|
|
46
|
+
}
|
|
47
|
+
const res = await fetch(url, init);
|
|
48
|
+
if (!res.ok || !res.body) {
|
|
49
|
+
const body = await res.json().catch(() => null);
|
|
50
|
+
throw this.errorForStatus(res.status, body);
|
|
51
|
+
}
|
|
52
|
+
const reader = res.body.getReader();
|
|
53
|
+
const decoder = new TextDecoder();
|
|
54
|
+
let buffer = '';
|
|
55
|
+
try {
|
|
56
|
+
while (true) {
|
|
57
|
+
const { done, value } = await reader.read();
|
|
58
|
+
if (done)
|
|
59
|
+
break;
|
|
60
|
+
buffer += decoder.decode(value, { stream: true });
|
|
61
|
+
const lines = buffer.split('\n');
|
|
62
|
+
buffer = lines.pop() ?? '';
|
|
63
|
+
for (const line of lines) {
|
|
64
|
+
if (!line.startsWith('data: '))
|
|
65
|
+
continue;
|
|
66
|
+
const data = line.slice(6).trim();
|
|
67
|
+
if (!data || data === '[DONE]')
|
|
68
|
+
continue;
|
|
69
|
+
try {
|
|
70
|
+
yield JSON.parse(data);
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
// Skip non-JSON SSE data lines
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
finally {
|
|
79
|
+
reader.releaseLock();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
// ── Internals ───────────────────────────────────────────────────────
|
|
83
|
+
buildUrl(path, query) {
|
|
84
|
+
const normalized = path.startsWith('/') ? path : `/${path}`;
|
|
85
|
+
const url = new URL(normalized, this.baseUrl);
|
|
86
|
+
if (query) {
|
|
87
|
+
for (const [k, v] of Object.entries(query)) {
|
|
88
|
+
if (v !== undefined)
|
|
89
|
+
url.searchParams.set(k, String(v));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return url.toString();
|
|
93
|
+
}
|
|
94
|
+
errorForStatus(status, body) {
|
|
95
|
+
const msg = body?.error ??
|
|
96
|
+
`Request failed with status ${status}`;
|
|
97
|
+
switch (status) {
|
|
98
|
+
case 401: return new AuthenticationError(msg);
|
|
99
|
+
case 402: return new PaymentRequiredError(msg);
|
|
100
|
+
case 404: return new NotFoundError(msg);
|
|
101
|
+
case 409: return new ConflictError(msg);
|
|
102
|
+
case 422: return new ValidationError(msg);
|
|
103
|
+
case 429: return new RateLimitError(msg);
|
|
104
|
+
default: return new OblienError(msg, status);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=http.js.map
|
package/dist/http.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW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,CAAC,CAAC,CAAC;YAC1D,CAAC;QACH,CAAC;QAED,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC;IAEO,cAAc,CAAC,MAAc,EAAE,IAAa;QAClD,MAAM,GAAG,GACN,IAAgC,EAAE,KAAe;YAClD,8BAA8B,MAAM,EAAE,CAAC;QAEzC,QAAQ,MAAM,EAAE,CAAC;YACf,KAAK,GAAG,CAAC,CAAC,OAAO,IAAI,mBAAmB,CAAC,GAAG,CAAC,CAAC;YAC9C,KAAK,GAAG,CAAC,CAAC,OAAO,IAAI,oBAAoB,CAAC,GAAG,CAAC,CAAC;YAC/C,KAAK,GAAG,CAAC,CAAC,OAAO,IAAI,aAAa,CAAC,GAAG,CAAC,CAAC;YACxC,KAAK,GAAG,CAAC,CAAC,OAAO,IAAI,aAAa,CAAC,GAAG,CAAC,CAAC;YACxC,KAAK,GAAG,CAAC,CAAC,OAAO,IAAI,eAAe,CAAC,GAAG,CAAC,CAAC;YAC1C,KAAK,GAAG,CAAC,CAAC,OAAO,IAAI,cAAc,CAAC,GAAG,CAAC,CAAC;YACzC,OAAO,CAAC,CAAE,OAAO,IAAI,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;CACF"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { Oblien as default } from './client.js';
|
|
2
|
+
export { Oblien } from './client.js';
|
|
3
|
+
export { Workspace } from './workspace.js';
|
|
4
|
+
export { Runtime } from './runtime.js';
|
|
5
|
+
export { RuntimeWebSocket } from './runtime/ws.js';
|
|
6
|
+
export { OblienError, AuthenticationError, NotFoundError, RateLimitError, ValidationError, PaymentRequiredError, ConflictError, } from './error.js';
|
|
7
|
+
export type { OblienOptions, RequestOptions, ApiResponse, WorkspaceCreateParams, WorkspaceUpdateParams, WorkspaceListParams, WorkspaceListResponse, WorkspaceData, ResourceSpec, LifecycleSpec, NetworkSpec, FirewallRule, PrivateLink, RuntimeOptions, FileListParams, FileEntry, FileListResponse, FileReadParams, FileReadResponse, FileWriteParams, FileWriteResponse, FileMkdirParams, FileStatParams, FileStatResponse, FileDeleteParams, ContentSearchParams, SearchMatch, ContentSearchResponse, FileSearchParams, FileSearchResponse, SearchStatusResponse, SearchInitResponse, ExecRunParams, ExecTask, ExecListResponse, ExecStreamEvent, TerminalCreateParams, TerminalSession, TerminalListResponse, TerminalScrollbackResponse, WatcherCreateParams, WatcherInfo, WatcherListResponse, WSOptions, WSMessage, WSTerminalResize, WSTerminalExit, WSTerminalEvent, WSWatcherChange, WSWatcherReady, WSWatcherOverflow, WSWatcherEvent, LifecycleStatus, MakeTemporaryParams, UpdateTtlParams, SshStatus, SshPasswordParams, SshKeyParams, PublicAccessPort, ExposePortParams, SnapshotParams, ArchiveCreateParams, ArchiveInfo, WorkloadCreateParams, WorkloadUpdateParams, WorkloadInfo, WorkloadListParams, UsageParams, UpdateResourcesParams, UpdateMetadataParams, ApiAccessStatus, RawTokenResponse, NetworkUpdateParams, NetworkConfig, LogsParams, LogFile, LogStreamEvent, StatsEvent, WorkloadStatsEvent, WorkloadLogEntry, ImagesListParams, } from './types/index.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGnD,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,aAAa,GACd,MAAM,YAAY,CAAC;AAGpB,YAAY,EAEV,aAAa,EACb,cAAc,EACd,WAAW,EAEX,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,WAAW,EACX,YAAY,EACZ,WAAW,EAEX,cAAc,EACd,cAAc,EACd,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,EACX,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,oBAAoB,EACpB,0BAA0B,EAC1B,mBAAmB,EACnB,WAAW,EACX,mBAAmB,EAEnB,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,cAAc,EAEd,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,SAAS,EACT,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,OAAO,EACP,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// ── Default export ──────────────────────────────────────────────────
|
|
2
|
+
export { Oblien as default } from './client.js';
|
|
3
|
+
// ── Named exports ──────────────────────────────────────────────────
|
|
4
|
+
export { Oblien } from './client.js';
|
|
5
|
+
export { Workspace } from './workspace.js';
|
|
6
|
+
export { Runtime } from './runtime.js';
|
|
7
|
+
export { RuntimeWebSocket } from './runtime/ws.js';
|
|
8
|
+
// Errors
|
|
9
|
+
export { OblienError, AuthenticationError, NotFoundError, RateLimitError, ValidationError, PaymentRequiredError, ConflictError, } from './error.js';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC;AAEhD,sEAAsE;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,SAAS;AACT,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,aAAa,GACd,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { HttpClient } from '../http.js';
|
|
2
|
+
import type { ApiResponse } from '../types/common.js';
|
|
3
|
+
import type { ApiAccessStatus, RawTokenResponse } from '../types/workspace-resources.js';
|
|
4
|
+
/** Internal API server management — enable, disable, tokens. */
|
|
5
|
+
export declare class ApiAccessResource {
|
|
6
|
+
private readonly _http;
|
|
7
|
+
constructor(_http: HttpClient);
|
|
8
|
+
/** Get server status. */
|
|
9
|
+
status(workspaceId: string): Promise<ApiAccessStatus>;
|
|
10
|
+
/** Enable the internal API server. Returns a Gateway JWT. */
|
|
11
|
+
enable(workspaceId: string): Promise<ApiAccessStatus>;
|
|
12
|
+
/** Disable the internal API server. */
|
|
13
|
+
disable(workspaceId: string): Promise<ApiResponse>;
|
|
14
|
+
/** Rotate the gateway token. */
|
|
15
|
+
rotateToken(workspaceId: string): Promise<ApiAccessStatus>;
|
|
16
|
+
/** Get the current gateway JWT (read-only, no side effects). */
|
|
17
|
+
getToken(workspaceId: string): Promise<ApiAccessStatus>;
|
|
18
|
+
/** Get the raw connection token + private IP (for direct access). */
|
|
19
|
+
rawToken(workspaceId: string): Promise<RawTokenResponse>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=api-access.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-access.d.ts","sourceRoot":"","sources":["../../src/resources/api-access.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEzF,gEAAgE;AAChE,qBAAa,iBAAiB;IAChB,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,UAAU;IAE9C,yBAAyB;IACnB,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAI3D,6DAA6D;IACvD,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAI3D,uCAAuC;IACjC,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAIxD,gCAAgC;IAC1B,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAIhE,gEAAgE;IAC1D,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAI7D,qEAAqE;IAC/D,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAG/D"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** Internal API server management — enable, disable, tokens. */
|
|
2
|
+
export class ApiAccessResource {
|
|
3
|
+
_http;
|
|
4
|
+
constructor(_http) {
|
|
5
|
+
this._http = _http;
|
|
6
|
+
}
|
|
7
|
+
/** Get server status. */
|
|
8
|
+
async status(workspaceId) {
|
|
9
|
+
return this._http.request({ method: 'GET', path: `/workspace/${workspaceId}/internal-api-access` });
|
|
10
|
+
}
|
|
11
|
+
/** Enable the internal API server. Returns a Gateway JWT. */
|
|
12
|
+
async enable(workspaceId) {
|
|
13
|
+
return this._http.request({ method: 'POST', path: `/workspace/${workspaceId}/internal-api-access/enable` });
|
|
14
|
+
}
|
|
15
|
+
/** Disable the internal API server. */
|
|
16
|
+
async disable(workspaceId) {
|
|
17
|
+
return this._http.request({ method: 'POST', path: `/workspace/${workspaceId}/internal-api-access/disable` });
|
|
18
|
+
}
|
|
19
|
+
/** Rotate the gateway token. */
|
|
20
|
+
async rotateToken(workspaceId) {
|
|
21
|
+
return this._http.request({ method: 'POST', path: `/workspace/${workspaceId}/internal-api-access/token` });
|
|
22
|
+
}
|
|
23
|
+
/** Get the current gateway JWT (read-only, no side effects). */
|
|
24
|
+
async getToken(workspaceId) {
|
|
25
|
+
return this._http.request({ method: 'GET', path: `/workspace/${workspaceId}/internal-api-access/token` });
|
|
26
|
+
}
|
|
27
|
+
/** Get the raw connection token + private IP (for direct access). */
|
|
28
|
+
async rawToken(workspaceId) {
|
|
29
|
+
return this._http.request({ method: 'GET', path: `/workspace/${workspaceId}/internal-api-access/token/raw` });
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=api-access.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-access.js","sourceRoot":"","sources":["../../src/resources/api-access.ts"],"names":[],"mappings":"AAIA,gEAAgE;AAChE,MAAM,OAAO,iBAAiB;IACC;IAA7B,YAA6B,KAAiB;QAAjB,U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|
1
|
+
import type { HttpClient } from '../http.js';
|
|
2
|
+
/**
|
|
3
|
+
* Base class for per-workspace sub-resource namespaces
|
|
4
|
+
* (lifecycle, network, ssh, etc.).
|
|
5
|
+
*
|
|
6
|
+
* Each sub-resource is a property on `Workspace` and receives the
|
|
7
|
+
* shared `HttpClient` reference. Methods take `workspaceId` as the
|
|
8
|
+
* first argument so the same instance works for any workspace.
|
|
9
|
+
*/
|
|
10
|
+
export declare abstract class WorkspaceSubResource {
|
|
11
|
+
protected readonly _http: HttpClient;
|
|
12
|
+
protected readonly _segment: string;
|
|
13
|
+
constructor(_http: HttpClient, _segment?: string);
|
|
14
|
+
/** Build full path: /workspace/:id/<segment><path> */
|
|
15
|
+
protected _url(workspaceId: string, path?: string): string;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/resources/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;;GAOG;AACH,8BAAsB,oBAAoB;IAEtC,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,UAAU;IACpC,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM;gBADhB,KAAK,EAAE,UAAU,EACjB,QAAQ,GAAE,MAAW;IAG1C,sDAAsD;IACtD,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,GAAE,MAAW,GAAG,MAAM;CAG/D"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base class for per-workspace sub-resource namespaces
|
|
3
|
+
* (lifecycle, network, ssh, etc.).
|
|
4
|
+
*
|
|
5
|
+
* Each sub-resource is a property on `Workspace` and receives the
|
|
6
|
+
* shared `HttpClient` reference. Methods take `workspaceId` as the
|
|
7
|
+
* first argument so the same instance works for any workspace.
|
|
8
|
+
*/
|
|
9
|
+
export class WorkspaceSubResource {
|
|
10
|
+
_http;
|
|
11
|
+
_segment;
|
|
12
|
+
constructor(_http, _segment = '') {
|
|
13
|
+
this._http = _http;
|
|
14
|
+
this._segment = _segment;
|
|
15
|
+
}
|
|
16
|
+
/** Build full path: /workspace/:id/<segment><path> */
|
|
17
|
+
_url(workspaceId, path = '') {
|
|
18
|
+
return `/workspace/${workspaceId}${this._segment}${path}`;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/resources/base.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,OAAgB,oBAAoB;IAEnB;IACA;IAFrB,YACqB,KAAiB,EACjB,WAAmB,EAAE;QADrB,UAAK,GAAL,KAAK,CAAY;QACjB,aAAQ,GAAR,QAAQ,CAAa;IACvC,CAAC;IAEJ,sDAAsD;IAC5C,IAAI,CAAC,WAAmB,EAAE,OAAe,EAAE;QACnD,OAAO,cAAc,WAAW,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,EAAE,CAAC;IAC5D,CAAC;CACF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HttpClient } from '../http.js';
|
|
2
|
+
import type { ApiResponse } from '../types/common.js';
|
|
3
|
+
import type { ImagesListParams } from '../types/workspace-resources.js';
|
|
4
|
+
/** Image catalog. */
|
|
5
|
+
export declare class ImagesResource {
|
|
6
|
+
private readonly _http;
|
|
7
|
+
constructor(_http: HttpClient);
|
|
8
|
+
/** List available images. */
|
|
9
|
+
list(params?: ImagesListParams): Promise<ApiResponse>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=images.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"images.d.ts","sourceRoot":"","sources":["../../src/resources/images.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,qBAAqB;AACrB,qBAAa,cAAc;IACb,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,UAAU;IAE9C,6BAA6B;IACvB,IAAI,CAAC,MAAM,GAAE,gBAAqB,GAAG,OAAO,CAAC,WAAW,CAAC;CAOhE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Image catalog. */
|
|
2
|
+
export class ImagesResource {
|
|
3
|
+
_http;
|
|
4
|
+
constructor(_http) {
|
|
5
|
+
this._http = _http;
|
|
6
|
+
}
|
|
7
|
+
/** List available images. */
|
|
8
|
+
async list(params = {}) {
|
|
9
|
+
return this._http.request({
|
|
10
|
+
method: 'GET',
|
|
11
|
+
path: '/workspace/images',
|
|
12
|
+
query: params,
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=images.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"images.js","sourceRoot":"","sources":["../../src/resources/images.ts"],"names":[],"mappings":"AAIA,qBAAqB;AACrB,MAAM,OAAO,cAAc;IACI;IAA7B,YAA6B,KAAiB;QAAjB,UAAK,GAAL,KAAK,CAAY;IAAG,CAAC;IAElD,6BAA6B;IAC7B,KAAK,CAAC,IAAI,CAAC,SAA2B,EAAE;QACtC,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;YACxB,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,MAA4C;SACpD,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { HttpClient } from '../http.js';
|
|
2
|
+
import type { ApiResponse } from '../types/common.js';
|
|
3
|
+
import type { LifecycleStatus, MakeTemporaryParams, UpdateTtlParams } from '../types/workspace-resources.js';
|
|
4
|
+
/** Lifecycle management — permanent/temporary mode, TTL, ping, destroy. */
|
|
5
|
+
export declare class LifecycleResource {
|
|
6
|
+
private readonly _http;
|
|
7
|
+
constructor(_http: HttpClient);
|
|
8
|
+
/** Get lifecycle status. */
|
|
9
|
+
get(workspaceId: string): Promise<LifecycleStatus>;
|
|
10
|
+
/** Destroy lifecycle state. */
|
|
11
|
+
destroy(workspaceId: string): Promise<ApiResponse>;
|
|
12
|
+
/** Make workspace permanent. */
|
|
13
|
+
makePermanent(workspaceId: string): Promise<ApiResponse>;
|
|
14
|
+
/** Make workspace temporary with TTL. */
|
|
15
|
+
makeTemporary(workspaceId: string, params?: MakeTemporaryParams): Promise<ApiResponse>;
|
|
16
|
+
/** Update TTL settings. */
|
|
17
|
+
updateTtl(workspaceId: string, params: UpdateTtlParams): Promise<ApiResponse>;
|
|
18
|
+
/** Keep-alive ping — renews TTL. */
|
|
19
|
+
ping(workspaceId: string, params?: {
|
|
20
|
+
ttl_seconds?: number;
|
|
21
|
+
}): Promise<ApiResponse>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=lifecycle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../src/resources/lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,eAAe,EAChB,MAAM,iCAAiC,CAAC;AAEzC,2EAA2E;AAC3E,qBAAa,iBAAiB;IAChB,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,UAAU;IAE9C,4BAA4B;IACtB,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAIxD,+BAA+B;IACzB,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAIxD,gCAAgC;IAC1B,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAI9D,yCAAyC;IACnC,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,GAAE,mBAAwB,GAAG,OAAO,CAAC,WAAW,CAAC;IAIhG,2BAA2B;IACrB,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC;IAInF,oCAAoC;IAC9B,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,WAAW,CAAC;CAGzF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** Lifecycle management — permanent/temporary mode, TTL, ping, destroy. */
|
|
2
|
+
export class LifecycleResource {
|
|
3
|
+
_http;
|
|
4
|
+
constructor(_http) {
|
|
5
|
+
this._http = _http;
|
|
6
|
+
}
|
|
7
|
+
/** Get lifecycle status. */
|
|
8
|
+
async get(workspaceId) {
|
|
9
|
+
return this._http.request({ method: 'GET', path: `/workspace/${workspaceId}/lifecycle` });
|
|
10
|
+
}
|
|
11
|
+
/** Destroy lifecycle state. */
|
|
12
|
+
async destroy(workspaceId) {
|
|
13
|
+
return this._http.request({ method: 'DELETE', path: `/workspace/${workspaceId}/lifecycle` });
|
|
14
|
+
}
|
|
15
|
+
/** Make workspace permanent. */
|
|
16
|
+
async makePermanent(workspaceId) {
|
|
17
|
+
return this._http.request({ method: 'POST', path: `/workspace/${workspaceId}/lifecycle/permanent` });
|
|
18
|
+
}
|
|
19
|
+
/** Make workspace temporary with TTL. */
|
|
20
|
+
async makeTemporary(workspaceId, params = {}) {
|
|
21
|
+
return this._http.request({ method: 'POST', path: `/workspace/${workspaceId}/lifecycle/temporary`, body: params });
|
|
22
|
+
}
|
|
23
|
+
/** Update TTL settings. */
|
|
24
|
+
async updateTtl(workspaceId, params) {
|
|
25
|
+
return this._http.request({ method: 'PUT', path: `/workspace/${workspaceId}/lifecycle/ttl`, body: params });
|
|
26
|
+
}
|
|
27
|
+
/** Keep-alive ping — renews TTL. */
|
|
28
|
+
async ping(workspaceId, params) {
|
|
29
|
+
return this._http.request({ method: 'POST', path: `/workspace/${workspaceId}/ping`, body: params });
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=lifecycle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../src/resources/lifecycle.ts"],"names":[],"mappings":"AAQA,2EAA2E;AAC3E,MAAM,OAAO,iBAAiB;IACC;IAA7B,YAA6B,KAAiB;QAAjB,UAAK,GAAL,KAAK,CAAY;IAAG,CAAC;IAElD,4BAA4B;IAC5B,KAAK,CAAC,GAAG,CAAC,WAAmB;QAC3B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,WAAW,YAAY,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED,+BAA+B;IAC/B,KAAK,CAAC,OAAO,CAAC,WAAmB;QAC/B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,WAAW,YAAY,EAAE,CAAC,CAAC;IAC/F,CAAC;IAED,gCAAgC;IAChC,KAAK,CAAC,aAAa,CAAC,WAAmB;QACrC,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,WAAW,sBAAsB,EAAE,CAAC,CAAC;IACvG,CAAC;IAED,yCAAyC;IACzC,KAAK,CAAC,aAAa,CAAC,WAAmB,EAAE,SAA8B,EAAE;QACvE,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,WAAW,sBAAsB,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IACrH,CAAC;IAED,2BAA2B;IAC3B,KAAK,CAAC,SAAS,CAAC,WAAmB,EAAE,MAAuB;QAC1D,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,WAAW,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IAC9G,CAAC;IAED,oCAAoC;IACpC,KAAK,CAAC,IAAI,CAAC,WAAmB,EAAE,MAAiC;QAC/D,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,WAAW,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IACtG,CAAC;CACF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { HttpClient } from '../http.js';
|
|
2
|
+
import type { ApiResponse } from '../types/common.js';
|
|
3
|
+
import type { LogsParams, LogFile, LogStreamEvent } from '../types/workspace-resources.js';
|
|
4
|
+
/** Workspace logs — boot logs, command logs, log files, streaming. */
|
|
5
|
+
export declare class LogsResource {
|
|
6
|
+
private readonly _http;
|
|
7
|
+
constructor(_http: HttpClient);
|
|
8
|
+
/** Get logs. */
|
|
9
|
+
get(workspaceId: string, params?: LogsParams): Promise<ApiResponse>;
|
|
10
|
+
/** Clear logs. */
|
|
11
|
+
clear(workspaceId: string): Promise<ApiResponse>;
|
|
12
|
+
/** List available log files. */
|
|
13
|
+
listFiles(workspaceId: string): Promise<LogFile[]>;
|
|
14
|
+
/** Get a specific log file by name. */
|
|
15
|
+
getFile(workspaceId: string, name: string): Promise<ApiResponse>;
|
|
16
|
+
/** Stream boot logs (SSE). */
|
|
17
|
+
streamBoot(workspaceId: string, params?: {
|
|
18
|
+
tail_lines?: number;
|
|
19
|
+
}): AsyncGenerator<LogStreamEvent>;
|
|
20
|
+
/** Stream command logs (SSE). */
|
|
21
|
+
streamCmd(workspaceId: string, params?: {
|
|
22
|
+
tail_lines?: number;
|
|
23
|
+
}): AsyncGenerator<LogStreamEvent>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=logs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../src/resources/logs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAE3F,sEAAsE;AACtE,qBAAa,YAAY;IACX,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,UAAU;IAE9C,gBAAgB;IACV,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,GAAE,UAAe,GAAG,OAAO,CAAC,WAAW,CAAC;IAQ7E,kBAAkB;IACZ,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAItD,gCAAgC;IAC1B,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAQxD,uCAAuC;IACjC,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAOtE,8BAA8B;IACvB,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,cAAc,CAAC,cAAc,CAAC;IAQxG,iCAAiC;IAC1B,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,cAAc,CAAC,cAAc,CAAC;CAOxG"}
|