@celestoai/sdk 0.1.0 → 0.1.2
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/README.md +84 -22
- package/dist/chunk-4KVRJSVJ.js +177 -0
- package/dist/chunk-4KVRJSVJ.js.map +1 -0
- package/dist/chunk-7OJDEZ7J.js +212 -0
- package/dist/chunk-7OJDEZ7J.js.map +1 -0
- package/dist/chunk-N3HU6ONW.js +148 -0
- package/dist/chunk-N3HU6ONW.js.map +1 -0
- package/dist/computers/index.cjs +373 -0
- package/dist/computers/index.cjs.map +1 -0
- package/dist/computers/index.d.cts +131 -0
- package/dist/computers/index.d.ts +131 -0
- package/dist/computers/index.js +8 -0
- package/dist/computers/index.js.map +1 -0
- package/dist/config-BTTpuv_b.d.cts +25 -0
- package/dist/config-BTTpuv_b.d.ts +25 -0
- package/dist/gatekeeper/index.cjs +338 -0
- package/dist/gatekeeper/index.cjs.map +1 -0
- package/dist/gatekeeper/index.d.cts +104 -0
- package/dist/gatekeeper/index.d.ts +104 -0
- package/dist/gatekeeper/index.js +8 -0
- package/dist/gatekeeper/index.js.map +1 -0
- package/dist/index.cjs +559 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +31 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/package.json +16 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ComputersClient } from './computers/index.js';
|
|
2
|
+
export { ComputerConnectionInfo, ComputerExecResponse, ComputerInfo, ComputerListResponse, ComputerStatus, CreateComputerParams, ExecParams, SandboxTemplateInfo, TerminalConnectionInfo } from './computers/index.js';
|
|
3
|
+
import { GatekeeperClient } from './gatekeeper/index.js';
|
|
4
|
+
export { GatekeeperAccessRules, GatekeeperAccessRulesParams, GatekeeperAccessRulesUpdate, GatekeeperConnectRequest, GatekeeperConnectResponse, GatekeeperConnection, GatekeeperDriveFile, GatekeeperDriveListParams, GatekeeperDriveListResponse, GatekeeperListConnectionsParams, GatekeeperListConnectionsResponse, GatekeeperRevokeParams, GatekeeperRevokeResponse } from './gatekeeper/index.js';
|
|
5
|
+
import { C as ClientConfig } from './config-BTTpuv_b.js';
|
|
6
|
+
export { R as RequestOverrides } from './config-BTTpuv_b.js';
|
|
7
|
+
|
|
8
|
+
/** Base error for all Celesto SDK errors. */
|
|
9
|
+
declare class CelestoError extends Error {
|
|
10
|
+
constructor(message: string);
|
|
11
|
+
}
|
|
12
|
+
/** Thrown when an API request returns a non-2xx HTTP status. */
|
|
13
|
+
declare class CelestoApiError extends CelestoError {
|
|
14
|
+
readonly status: number;
|
|
15
|
+
readonly data: unknown;
|
|
16
|
+
readonly requestId?: string;
|
|
17
|
+
constructor(message: string, status: number, data: unknown, requestId?: string);
|
|
18
|
+
}
|
|
19
|
+
/** Thrown when fetch() itself fails — DNS, network, timeout, abort. */
|
|
20
|
+
declare class CelestoNetworkError extends CelestoError {
|
|
21
|
+
readonly cause?: Error;
|
|
22
|
+
constructor(message: string, cause?: Error);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare class Celesto {
|
|
26
|
+
readonly gatekeeper: GatekeeperClient;
|
|
27
|
+
readonly computers: ComputersClient;
|
|
28
|
+
constructor(config: ClientConfig);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { Celesto, CelestoApiError, CelestoError, CelestoNetworkError, ClientConfig, ComputersClient, GatekeeperClient };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GatekeeperClient
|
|
3
|
+
} from "./chunk-4KVRJSVJ.js";
|
|
4
|
+
import {
|
|
5
|
+
ComputersClient
|
|
6
|
+
} from "./chunk-7OJDEZ7J.js";
|
|
7
|
+
import {
|
|
8
|
+
CelestoApiError,
|
|
9
|
+
CelestoError,
|
|
10
|
+
CelestoNetworkError
|
|
11
|
+
} from "./chunk-N3HU6ONW.js";
|
|
12
|
+
|
|
13
|
+
// src/index.ts
|
|
14
|
+
var Celesto = class {
|
|
15
|
+
constructor(config) {
|
|
16
|
+
this.gatekeeper = new GatekeeperClient(config);
|
|
17
|
+
this.computers = new ComputersClient(config);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
Celesto,
|
|
22
|
+
CelestoApiError,
|
|
23
|
+
CelestoError,
|
|
24
|
+
CelestoNetworkError,
|
|
25
|
+
ComputersClient,
|
|
26
|
+
GatekeeperClient
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { ComputersClient } from \"./computers\";\nimport { GatekeeperClient } from \"./gatekeeper\";\nimport type { ClientConfig } from \"./core/config\";\n\nexport { GatekeeperClient } from \"./gatekeeper\";\nexport type {\n GatekeeperAccessRules,\n GatekeeperAccessRulesParams,\n GatekeeperAccessRulesUpdate,\n GatekeeperConnectRequest,\n GatekeeperConnectResponse,\n GatekeeperConnection,\n GatekeeperDriveFile,\n GatekeeperDriveListParams,\n GatekeeperDriveListResponse,\n GatekeeperListConnectionsParams,\n GatekeeperListConnectionsResponse,\n GatekeeperRevokeParams,\n GatekeeperRevokeResponse,\n} from \"./gatekeeper\";\nexport { ComputersClient } from \"./computers\";\nexport type {\n ComputerConnectionInfo,\n ComputerExecResponse,\n ComputerInfo,\n ComputerListResponse,\n ComputerStatus,\n CreateComputerParams,\n ExecParams,\n SandboxTemplateInfo,\n TerminalConnectionInfo,\n} from \"./computers\";\nexport type { ClientConfig, RequestOverrides } from \"./core/config\";\nexport { CelestoError, CelestoApiError, CelestoNetworkError } from \"./core/errors\";\n\nexport class Celesto {\n readonly gatekeeper: GatekeeperClient;\n readonly computers: ComputersClient;\n\n constructor(config: ClientConfig) {\n this.gatekeeper = new GatekeeperClient(config);\n this.computers = new ComputersClient(config);\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAmCO,IAAM,UAAN,MAAc;AAAA,EAInB,YAAY,QAAsB;AAChC,SAAK,aAAa,IAAI,iBAAiB,MAAM;AAC7C,SAAK,YAAY,IAAI,gBAAgB,MAAM;AAAA,EAC7C;AACF;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celestoai/sdk",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Celesto SDK
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Celesto SDK — Gatekeeper and Computers clients for Node.js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/CelestoAI/sdk.git",
|
|
9
|
+
"directory": "js"
|
|
10
|
+
},
|
|
6
11
|
"type": "module",
|
|
7
12
|
"main": "./dist/index.cjs",
|
|
8
13
|
"module": "./dist/index.js",
|
|
@@ -17,6 +22,11 @@
|
|
|
17
22
|
"types": "./dist/gatekeeper/index.d.ts",
|
|
18
23
|
"import": "./dist/gatekeeper/index.js",
|
|
19
24
|
"require": "./dist/gatekeeper/index.cjs"
|
|
25
|
+
},
|
|
26
|
+
"./computers": {
|
|
27
|
+
"types": "./dist/computers/index.d.ts",
|
|
28
|
+
"import": "./dist/computers/index.js",
|
|
29
|
+
"require": "./dist/computers/index.cjs"
|
|
20
30
|
}
|
|
21
31
|
},
|
|
22
32
|
"files": [
|
|
@@ -32,10 +42,13 @@
|
|
|
32
42
|
"scripts": {
|
|
33
43
|
"build": "tsup",
|
|
34
44
|
"dev": "tsup --watch",
|
|
35
|
-
"lint": "tsc -p tsconfig.json --noEmit"
|
|
45
|
+
"lint": "tsc -p tsconfig.json --noEmit",
|
|
46
|
+
"test": "tsx --test tests/computers.test.ts"
|
|
36
47
|
},
|
|
37
48
|
"devDependencies": {
|
|
49
|
+
"@types/node": "^20.14.0",
|
|
38
50
|
"tsup": "^8.0.2",
|
|
51
|
+
"tsx": "^4.19.0",
|
|
39
52
|
"typescript": "^5.5.4"
|
|
40
53
|
}
|
|
41
54
|
}
|