@blaxel/core 0.2.0-dev2 → 0.2.0-dev20
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/authentication/index.js +1 -0
- package/dist/cache/index.js +1 -0
- package/dist/client/client.gen.d.ts +1 -1
- package/dist/client/sdk.gen.d.ts +44 -2
- package/dist/client/sdk.gen.js +231 -83
- package/dist/client/types.gen.d.ts +283 -0
- package/dist/common/env.js +4 -7
- package/dist/common/logger.d.ts +25 -1
- package/dist/common/logger.js +58 -1
- package/dist/common/node.d.ts +2 -2
- package/dist/common/node.js +3 -2
- package/dist/common/settings.d.ts +1 -0
- package/dist/common/settings.js +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/mcp/client.js +1 -1
- package/dist/sandbox/client/client.gen.d.ts +1 -1
- package/dist/sandbox/client/index.d.ts +1 -1
- package/dist/sandbox/client/index.js +1 -1
- package/dist/sandbox/client/sdk.gen.d.ts +21 -14
- package/dist/sandbox/client/sdk.gen.js +25 -14
- package/dist/sandbox/client/types.gen.d.ts +55 -2
- package/dist/sandbox/index.d.ts +1 -0
- package/dist/sandbox/index.js +17 -0
- package/dist/sandbox/preview.d.ts +35 -0
- package/dist/sandbox/preview.js +133 -0
- package/dist/sandbox/sandbox.d.ts +2 -0
- package/dist/sandbox/sandbox.js +3 -0
- package/dist/telemetry/telemetry.d.ts +7 -7
- package/package.json +3 -1
|
@@ -801,6 +801,10 @@ export type Metrics = {
|
|
|
801
801
|
rpsPerCode?: {
|
|
802
802
|
[key: string]: unknown;
|
|
803
803
|
};
|
|
804
|
+
/**
|
|
805
|
+
* Metrics for sandboxes
|
|
806
|
+
*/
|
|
807
|
+
sandboxes?: unknown;
|
|
804
808
|
};
|
|
805
809
|
/**
|
|
806
810
|
* Logical object representing a model
|
|
@@ -1065,6 +1069,108 @@ export type Port = {
|
|
|
1065
1069
|
* Set of ports for a resource
|
|
1066
1070
|
*/
|
|
1067
1071
|
export type Ports = Array<Port>;
|
|
1072
|
+
/**
|
|
1073
|
+
* Preview of a Resource
|
|
1074
|
+
*/
|
|
1075
|
+
export type Preview = {
|
|
1076
|
+
metadata?: PreviewMetadata;
|
|
1077
|
+
spec?: PreviewSpec;
|
|
1078
|
+
};
|
|
1079
|
+
/**
|
|
1080
|
+
* PreviewMetadata
|
|
1081
|
+
*/
|
|
1082
|
+
export type PreviewMetadata = TimeFields & OwnerFields & {
|
|
1083
|
+
/**
|
|
1084
|
+
* Model display name
|
|
1085
|
+
*/
|
|
1086
|
+
displayName?: string;
|
|
1087
|
+
/**
|
|
1088
|
+
* Preview name
|
|
1089
|
+
*/
|
|
1090
|
+
name?: string;
|
|
1091
|
+
/**
|
|
1092
|
+
* Resource name
|
|
1093
|
+
*/
|
|
1094
|
+
resourceName?: string;
|
|
1095
|
+
/**
|
|
1096
|
+
* Resource type
|
|
1097
|
+
*/
|
|
1098
|
+
resourceType?: string;
|
|
1099
|
+
/**
|
|
1100
|
+
* Workspace name
|
|
1101
|
+
*/
|
|
1102
|
+
workspace?: string;
|
|
1103
|
+
};
|
|
1104
|
+
/**
|
|
1105
|
+
* Preview of a Resource
|
|
1106
|
+
*/
|
|
1107
|
+
export type PreviewSpec = {
|
|
1108
|
+
/**
|
|
1109
|
+
* Port of the preview
|
|
1110
|
+
*/
|
|
1111
|
+
port?: number;
|
|
1112
|
+
/**
|
|
1113
|
+
* Whether the preview is public
|
|
1114
|
+
*/
|
|
1115
|
+
public?: boolean;
|
|
1116
|
+
/**
|
|
1117
|
+
* URL of the preview
|
|
1118
|
+
*/
|
|
1119
|
+
url?: string;
|
|
1120
|
+
};
|
|
1121
|
+
/**
|
|
1122
|
+
* Token for a Preview
|
|
1123
|
+
*/
|
|
1124
|
+
export type PreviewToken = {
|
|
1125
|
+
metadata?: PreviewTokenMetadata;
|
|
1126
|
+
spec?: PreviewTokenSpec;
|
|
1127
|
+
};
|
|
1128
|
+
/**
|
|
1129
|
+
* PreviewTokenMetadata
|
|
1130
|
+
*/
|
|
1131
|
+
export type PreviewTokenMetadata = {
|
|
1132
|
+
/**
|
|
1133
|
+
* Token name
|
|
1134
|
+
*/
|
|
1135
|
+
name?: string;
|
|
1136
|
+
/**
|
|
1137
|
+
* Preview name
|
|
1138
|
+
*/
|
|
1139
|
+
previewName?: string;
|
|
1140
|
+
/**
|
|
1141
|
+
* Resource name
|
|
1142
|
+
*/
|
|
1143
|
+
resourceName?: string;
|
|
1144
|
+
/**
|
|
1145
|
+
* Resource type
|
|
1146
|
+
*/
|
|
1147
|
+
resourceType?: string;
|
|
1148
|
+
/**
|
|
1149
|
+
* Workspace name
|
|
1150
|
+
*/
|
|
1151
|
+
workspace?: string;
|
|
1152
|
+
};
|
|
1153
|
+
/**
|
|
1154
|
+
* Spec for a Preview Token
|
|
1155
|
+
*/
|
|
1156
|
+
export type PreviewTokenSpec = {
|
|
1157
|
+
/**
|
|
1158
|
+
* Whether the token is expired
|
|
1159
|
+
*/
|
|
1160
|
+
expired?: boolean;
|
|
1161
|
+
/**
|
|
1162
|
+
* Expiration time of the token
|
|
1163
|
+
*/
|
|
1164
|
+
expiresAt?: string;
|
|
1165
|
+
/**
|
|
1166
|
+
* Whether the token is public
|
|
1167
|
+
*/
|
|
1168
|
+
public?: boolean;
|
|
1169
|
+
/**
|
|
1170
|
+
* Token
|
|
1171
|
+
*/
|
|
1172
|
+
token?: string;
|
|
1173
|
+
};
|
|
1068
1174
|
/**
|
|
1069
1175
|
* A private cluster where models can be located on.
|
|
1070
1176
|
*/
|
|
@@ -2927,6 +3033,183 @@ export type UpdateSandboxResponses = {
|
|
|
2927
3033
|
200: Sandbox;
|
|
2928
3034
|
};
|
|
2929
3035
|
export type UpdateSandboxResponse = UpdateSandboxResponses[keyof UpdateSandboxResponses];
|
|
3036
|
+
export type ListSandboxPreviewsData = {
|
|
3037
|
+
body?: never;
|
|
3038
|
+
path: {
|
|
3039
|
+
/**
|
|
3040
|
+
* Name of the Sandbox
|
|
3041
|
+
*/
|
|
3042
|
+
sandboxName: string;
|
|
3043
|
+
};
|
|
3044
|
+
query?: never;
|
|
3045
|
+
url: '/sandboxes/{sandboxName}/previews';
|
|
3046
|
+
};
|
|
3047
|
+
export type ListSandboxPreviewsResponses = {
|
|
3048
|
+
/**
|
|
3049
|
+
* successful operation
|
|
3050
|
+
*/
|
|
3051
|
+
200: Array<Preview>;
|
|
3052
|
+
};
|
|
3053
|
+
export type ListSandboxPreviewsResponse = ListSandboxPreviewsResponses[keyof ListSandboxPreviewsResponses];
|
|
3054
|
+
export type CreateSandboxPreviewData = {
|
|
3055
|
+
body: Preview;
|
|
3056
|
+
path: {
|
|
3057
|
+
/**
|
|
3058
|
+
* Name of the Sandbox
|
|
3059
|
+
*/
|
|
3060
|
+
sandboxName: string;
|
|
3061
|
+
};
|
|
3062
|
+
query?: never;
|
|
3063
|
+
url: '/sandboxes/{sandboxName}/previews';
|
|
3064
|
+
};
|
|
3065
|
+
export type CreateSandboxPreviewResponses = {
|
|
3066
|
+
/**
|
|
3067
|
+
* successful operation
|
|
3068
|
+
*/
|
|
3069
|
+
200: Preview;
|
|
3070
|
+
};
|
|
3071
|
+
export type CreateSandboxPreviewResponse = CreateSandboxPreviewResponses[keyof CreateSandboxPreviewResponses];
|
|
3072
|
+
export type DeleteSandboxPreviewData = {
|
|
3073
|
+
body?: never;
|
|
3074
|
+
path: {
|
|
3075
|
+
/**
|
|
3076
|
+
* Name of the Sandbox
|
|
3077
|
+
*/
|
|
3078
|
+
sandboxName: string;
|
|
3079
|
+
/**
|
|
3080
|
+
* Name of the Preview
|
|
3081
|
+
*/
|
|
3082
|
+
previewName: string;
|
|
3083
|
+
};
|
|
3084
|
+
query?: never;
|
|
3085
|
+
url: '/sandboxes/{sandboxName}/previews/{previewName}';
|
|
3086
|
+
};
|
|
3087
|
+
export type DeleteSandboxPreviewResponses = {
|
|
3088
|
+
/**
|
|
3089
|
+
* successful operation
|
|
3090
|
+
*/
|
|
3091
|
+
200: Preview;
|
|
3092
|
+
};
|
|
3093
|
+
export type DeleteSandboxPreviewResponse = DeleteSandboxPreviewResponses[keyof DeleteSandboxPreviewResponses];
|
|
3094
|
+
export type GetSandboxPreviewData = {
|
|
3095
|
+
body?: never;
|
|
3096
|
+
path: {
|
|
3097
|
+
/**
|
|
3098
|
+
* Name of the Sandbox
|
|
3099
|
+
*/
|
|
3100
|
+
sandboxName: string;
|
|
3101
|
+
/**
|
|
3102
|
+
* Name of the Preview
|
|
3103
|
+
*/
|
|
3104
|
+
previewName: string;
|
|
3105
|
+
};
|
|
3106
|
+
query?: never;
|
|
3107
|
+
url: '/sandboxes/{sandboxName}/previews/{previewName}';
|
|
3108
|
+
};
|
|
3109
|
+
export type GetSandboxPreviewResponses = {
|
|
3110
|
+
/**
|
|
3111
|
+
* successful operation
|
|
3112
|
+
*/
|
|
3113
|
+
200: Preview;
|
|
3114
|
+
};
|
|
3115
|
+
export type GetSandboxPreviewResponse = GetSandboxPreviewResponses[keyof GetSandboxPreviewResponses];
|
|
3116
|
+
export type UpdateSandboxPreviewData = {
|
|
3117
|
+
body: Preview;
|
|
3118
|
+
path: {
|
|
3119
|
+
/**
|
|
3120
|
+
* Name of the Sandbox
|
|
3121
|
+
*/
|
|
3122
|
+
sandboxName: string;
|
|
3123
|
+
/**
|
|
3124
|
+
* Name of the Preview
|
|
3125
|
+
*/
|
|
3126
|
+
previewName: string;
|
|
3127
|
+
};
|
|
3128
|
+
query?: never;
|
|
3129
|
+
url: '/sandboxes/{sandboxName}/previews/{previewName}';
|
|
3130
|
+
};
|
|
3131
|
+
export type UpdateSandboxPreviewResponses = {
|
|
3132
|
+
/**
|
|
3133
|
+
* successful operation
|
|
3134
|
+
*/
|
|
3135
|
+
200: Preview;
|
|
3136
|
+
};
|
|
3137
|
+
export type UpdateSandboxPreviewResponse = UpdateSandboxPreviewResponses[keyof UpdateSandboxPreviewResponses];
|
|
3138
|
+
export type ListSandboxPreviewTokensData = {
|
|
3139
|
+
body?: never;
|
|
3140
|
+
path: {
|
|
3141
|
+
/**
|
|
3142
|
+
* Name of the Sandbox
|
|
3143
|
+
*/
|
|
3144
|
+
sandboxName: string;
|
|
3145
|
+
/**
|
|
3146
|
+
* Name of the Preview
|
|
3147
|
+
*/
|
|
3148
|
+
previewName: string;
|
|
3149
|
+
};
|
|
3150
|
+
query?: never;
|
|
3151
|
+
url: '/sandboxes/{sandboxName}/previews/{previewName}/tokens';
|
|
3152
|
+
};
|
|
3153
|
+
export type ListSandboxPreviewTokensResponses = {
|
|
3154
|
+
/**
|
|
3155
|
+
* successful operation
|
|
3156
|
+
*/
|
|
3157
|
+
200: Array<PreviewToken>;
|
|
3158
|
+
};
|
|
3159
|
+
export type ListSandboxPreviewTokensResponse = ListSandboxPreviewTokensResponses[keyof ListSandboxPreviewTokensResponses];
|
|
3160
|
+
export type CreateSandboxPreviewTokenData = {
|
|
3161
|
+
body: PreviewToken;
|
|
3162
|
+
path: {
|
|
3163
|
+
/**
|
|
3164
|
+
* Name of the Sandbox
|
|
3165
|
+
*/
|
|
3166
|
+
sandboxName: string;
|
|
3167
|
+
/**
|
|
3168
|
+
* Name of the Preview
|
|
3169
|
+
*/
|
|
3170
|
+
previewName: string;
|
|
3171
|
+
};
|
|
3172
|
+
query?: never;
|
|
3173
|
+
url: '/sandboxes/{sandboxName}/previews/{previewName}/tokens';
|
|
3174
|
+
};
|
|
3175
|
+
export type CreateSandboxPreviewTokenResponses = {
|
|
3176
|
+
/**
|
|
3177
|
+
* successful operation
|
|
3178
|
+
*/
|
|
3179
|
+
200: PreviewToken;
|
|
3180
|
+
};
|
|
3181
|
+
export type CreateSandboxPreviewTokenResponse = CreateSandboxPreviewTokenResponses[keyof CreateSandboxPreviewTokenResponses];
|
|
3182
|
+
export type DeleteSandboxPreviewTokenData = {
|
|
3183
|
+
body?: never;
|
|
3184
|
+
path: {
|
|
3185
|
+
/**
|
|
3186
|
+
* Name of the Sandbox
|
|
3187
|
+
*/
|
|
3188
|
+
sandboxName: string;
|
|
3189
|
+
/**
|
|
3190
|
+
* Name of the Preview
|
|
3191
|
+
*/
|
|
3192
|
+
previewName: string;
|
|
3193
|
+
/**
|
|
3194
|
+
* Name of the Token
|
|
3195
|
+
*/
|
|
3196
|
+
tokenName: string;
|
|
3197
|
+
};
|
|
3198
|
+
query?: never;
|
|
3199
|
+
url: '/sandboxes/{sandboxName}/previews/{previewName}/tokens/{tokenName}';
|
|
3200
|
+
};
|
|
3201
|
+
export type DeleteSandboxPreviewTokenResponses = {
|
|
3202
|
+
/**
|
|
3203
|
+
* successful operation
|
|
3204
|
+
*/
|
|
3205
|
+
200: {
|
|
3206
|
+
/**
|
|
3207
|
+
* Success message
|
|
3208
|
+
*/
|
|
3209
|
+
message?: string;
|
|
3210
|
+
};
|
|
3211
|
+
};
|
|
3212
|
+
export type DeleteSandboxPreviewTokenResponse = DeleteSandboxPreviewTokenResponses[keyof DeleteSandboxPreviewTokenResponses];
|
|
2930
3213
|
export type StartSandboxData = {
|
|
2931
3214
|
body?: never;
|
|
2932
3215
|
path: {
|
package/dist/common/env.js
CHANGED
|
@@ -4,6 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.env = void 0;
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
const dotenv_1 = __importDefault(require("dotenv"));
|
|
7
9
|
const toml_1 = __importDefault(require("toml"));
|
|
8
10
|
const node_js_1 = require("./node.js");
|
|
9
11
|
const secretEnv = {};
|
|
@@ -19,13 +21,8 @@ if (node_js_1.fs !== null) {
|
|
|
19
21
|
catch (error) { }
|
|
20
22
|
try {
|
|
21
23
|
const secretFile = node_js_1.fs.readFileSync(".env", "utf8");
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
const [key, value] = line.split("=");
|
|
27
|
-
secretEnv[key] = value;
|
|
28
|
-
});
|
|
24
|
+
const parsed = dotenv_1.default.parse(secretFile);
|
|
25
|
+
Object.assign(secretEnv, parsed);
|
|
29
26
|
}
|
|
30
27
|
catch (error) { }
|
|
31
28
|
}
|
package/dist/common/logger.d.ts
CHANGED
|
@@ -1 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
interface LoggerInterface {
|
|
2
|
+
info: (message: string) => void;
|
|
3
|
+
debug: (message: string) => void;
|
|
4
|
+
warn: (message: string) => void;
|
|
5
|
+
error: (message: string) => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Stringify an object with a limited depth
|
|
9
|
+
* @param obj The object to stringify
|
|
10
|
+
* @param maxDepth Maximum depth (default: 1)
|
|
11
|
+
* @param depth Current depth (internal use)
|
|
12
|
+
*/
|
|
13
|
+
export declare function stringify<T>(obj: T, maxDepth?: number, depth?: number): string;
|
|
14
|
+
declare class Logger {
|
|
15
|
+
private logger;
|
|
16
|
+
constructor();
|
|
17
|
+
setLogger(logger: LoggerInterface): void;
|
|
18
|
+
parseArgs(args: unknown[]): string;
|
|
19
|
+
info(...message: unknown[]): void;
|
|
20
|
+
debug(...message: unknown[]): void;
|
|
21
|
+
warn(...message: unknown[]): void;
|
|
22
|
+
error(...message: unknown[]): void;
|
|
23
|
+
}
|
|
24
|
+
declare const logger: Logger;
|
|
25
|
+
export { logger };
|
package/dist/common/logger.js
CHANGED
|
@@ -1,4 +1,61 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.logger = void 0;
|
|
4
|
-
exports.
|
|
4
|
+
exports.stringify = stringify;
|
|
5
|
+
/**
|
|
6
|
+
* Stringify an object with a limited depth
|
|
7
|
+
* @param obj The object to stringify
|
|
8
|
+
* @param maxDepth Maximum depth (default: 1)
|
|
9
|
+
* @param depth Current depth (internal use)
|
|
10
|
+
*/
|
|
11
|
+
function stringify(obj, maxDepth = 1, depth = 0) {
|
|
12
|
+
if (obj instanceof Error)
|
|
13
|
+
return obj.stack || obj.message;
|
|
14
|
+
if (obj === null)
|
|
15
|
+
return 'null';
|
|
16
|
+
if (obj === undefined)
|
|
17
|
+
return 'undefined';
|
|
18
|
+
// If we've reached max depth or it's not an object
|
|
19
|
+
if (depth >= maxDepth || typeof obj !== 'object') {
|
|
20
|
+
return typeof obj === 'object' ? `[${Array.isArray(obj) ? 'Array' : 'object'}]` :
|
|
21
|
+
typeof obj === 'string' ? `"${obj}"` : String(obj);
|
|
22
|
+
}
|
|
23
|
+
// Handle arrays
|
|
24
|
+
if (Array.isArray(obj)) {
|
|
25
|
+
return `[${obj.map(item => stringify(item, maxDepth, depth + 1)).join(', ')}]`;
|
|
26
|
+
}
|
|
27
|
+
// Handle objects
|
|
28
|
+
const pairs = Object.entries(obj).map(([key, val]) => `"${key}": ${stringify(val, maxDepth, depth + 1)}`);
|
|
29
|
+
return `{${pairs.join(', ')}}`;
|
|
30
|
+
}
|
|
31
|
+
class Logger {
|
|
32
|
+
logger;
|
|
33
|
+
constructor() {
|
|
34
|
+
this.logger = console;
|
|
35
|
+
}
|
|
36
|
+
setLogger(logger) {
|
|
37
|
+
this.logger = logger;
|
|
38
|
+
}
|
|
39
|
+
parseArgs(args) {
|
|
40
|
+
return args.map((arg) => {
|
|
41
|
+
if (arg instanceof Error) {
|
|
42
|
+
return arg.stack ?? arg.message;
|
|
43
|
+
}
|
|
44
|
+
return arg;
|
|
45
|
+
}).join(" ");
|
|
46
|
+
}
|
|
47
|
+
info(...message) {
|
|
48
|
+
this.logger.info(this.parseArgs(message));
|
|
49
|
+
}
|
|
50
|
+
debug(...message) {
|
|
51
|
+
this.logger.debug(this.parseArgs(message));
|
|
52
|
+
}
|
|
53
|
+
warn(...message) {
|
|
54
|
+
this.logger.warn(this.parseArgs(message));
|
|
55
|
+
}
|
|
56
|
+
error(...message) {
|
|
57
|
+
this.logger.error(this.parseArgs(message));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const logger = new Logger();
|
|
61
|
+
exports.logger = logger;
|
package/dist/common/node.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare let fs:
|
|
2
|
-
declare let os:
|
|
1
|
+
declare let fs: typeof import("fs") | null;
|
|
2
|
+
declare let os: typeof import("os") | null;
|
|
3
3
|
export { fs, os };
|
package/dist/common/node.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.os = exports.fs = void 0;
|
|
4
|
+
/* eslint-disable */
|
|
4
5
|
const isNode = typeof process !== "undefined" &&
|
|
5
6
|
process.versions != null &&
|
|
6
7
|
process.versions.node != null;
|
|
@@ -9,6 +10,6 @@ exports.fs = fs;
|
|
|
9
10
|
let os = null;
|
|
10
11
|
exports.os = os;
|
|
11
12
|
if (isNode) {
|
|
12
|
-
exports.fs = fs = require("fs");
|
|
13
|
-
exports.os = os = require("os");
|
|
13
|
+
exports.fs = fs = eval("require")("fs");
|
|
14
|
+
exports.os = os = eval("require")("os");
|
|
14
15
|
}
|
package/dist/common/settings.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -10,5 +10,6 @@ export * from "./common/settings.js";
|
|
|
10
10
|
export * from "./mcp/index.js";
|
|
11
11
|
export * from "./models/index.js";
|
|
12
12
|
export * from "./sandbox/index.js";
|
|
13
|
+
export * from "./telemetry/telemetry.js";
|
|
13
14
|
export * from "./tools/index.js";
|
|
14
15
|
export * from "./tools/types.js";
|
package/dist/index.js
CHANGED
|
@@ -26,5 +26,6 @@ __exportStar(require("./common/settings.js"), exports);
|
|
|
26
26
|
__exportStar(require("./mcp/index.js"), exports);
|
|
27
27
|
__exportStar(require("./models/index.js"), exports);
|
|
28
28
|
__exportStar(require("./sandbox/index.js"), exports);
|
|
29
|
+
__exportStar(require("./telemetry/telemetry.js"), exports);
|
|
29
30
|
__exportStar(require("./tools/index.js"), exports);
|
|
30
31
|
__exportStar(require("./tools/types.js"), exports);
|
package/dist/mcp/client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { ClientOptions } from './types.gen';
|
|
1
2
|
import { type Config, type ClientOptions as DefaultClientOptions } from '@hey-api/client-fetch';
|
|
2
|
-
import type { ClientOptions } from './types.gen.js';
|
|
3
3
|
/**
|
|
4
4
|
* The `createClientConfig()` function will be called on client initialization
|
|
5
5
|
* and the returned object will become the client's initial configuration.
|
|
@@ -15,5 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
18
|
-
__exportStar(require("./sdk.gen.js"), exports);
|
|
19
18
|
__exportStar(require("./types.gen.js"), exports);
|
|
19
|
+
__exportStar(require("./sdk.gen.js"), exports);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { DeleteFilesystemByPathData,
|
|
1
|
+
import type { Options as ClientOptions, TDataShape, Client } from '@hey-api/client-fetch';
|
|
2
|
+
import type { DeleteFilesystemByPathData, GetFilesystemByPathData, PutFilesystemByPathData, DeleteNetworkProcessByPidMonitorData, PostNetworkProcessByPidMonitorData, GetNetworkProcessByPidPortsData, GetProcessData, PostProcessData, DeleteProcessByIdentifierData, GetProcessByIdentifierData, DeleteProcessByIdentifierKillData, GetProcessByIdentifierLogsData, GetProcessByIdentifierLogsStreamData } from './types.gen';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -17,67 +17,74 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
|
|
|
17
17
|
* Delete file or directory
|
|
18
18
|
* Delete a file or directory
|
|
19
19
|
*/
|
|
20
|
-
export declare const deleteFilesystemByPath: <ThrowOnError extends boolean = false>(options: Options<DeleteFilesystemByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen
|
|
20
|
+
export declare const deleteFilesystemByPath: <ThrowOnError extends boolean = false>(options: Options<DeleteFilesystemByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").SuccessResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
21
21
|
/**
|
|
22
22
|
* Get file or directory information
|
|
23
23
|
* Get content of a file or listing of a directory
|
|
24
24
|
*/
|
|
25
|
-
export declare const getFilesystemByPath: <ThrowOnError extends boolean = false>(options: Options<GetFilesystemByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.
|
|
25
|
+
export declare const getFilesystemByPath: <ThrowOnError extends boolean = false>(options: Options<GetFilesystemByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").FileWithContent | import("./types.gen").Directory, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
26
26
|
/**
|
|
27
27
|
* Create or update file or directory
|
|
28
28
|
* Create or update a file or directory
|
|
29
29
|
*/
|
|
30
|
-
export declare const putFilesystemByPath: <ThrowOnError extends boolean = false>(options: Options<PutFilesystemByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen
|
|
30
|
+
export declare const putFilesystemByPath: <ThrowOnError extends boolean = false>(options: Options<PutFilesystemByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").SuccessResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
31
31
|
/**
|
|
32
32
|
* Stop monitoring ports for a process
|
|
33
33
|
* Stop monitoring for new ports opened by a process
|
|
34
34
|
*/
|
|
35
35
|
export declare const deleteNetworkProcessByPidMonitor: <ThrowOnError extends boolean = false>(options: Options<DeleteNetworkProcessByPidMonitorData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
|
|
36
36
|
[key: string]: unknown;
|
|
37
|
-
}, import("./types.gen
|
|
37
|
+
}, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
38
38
|
/**
|
|
39
39
|
* Start monitoring ports for a process
|
|
40
40
|
* Start monitoring for new ports opened by a process
|
|
41
41
|
*/
|
|
42
42
|
export declare const postNetworkProcessByPidMonitor: <ThrowOnError extends boolean = false>(options: Options<PostNetworkProcessByPidMonitorData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
|
|
43
43
|
[key: string]: unknown;
|
|
44
|
-
}, import("./types.gen
|
|
44
|
+
}, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
45
45
|
/**
|
|
46
46
|
* Get open ports for a process
|
|
47
47
|
* Get a list of all open ports for a process
|
|
48
48
|
*/
|
|
49
49
|
export declare const getNetworkProcessByPidPorts: <ThrowOnError extends boolean = false>(options: Options<GetNetworkProcessByPidPortsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
|
|
50
50
|
[key: string]: unknown;
|
|
51
|
-
}, import("./types.gen
|
|
51
|
+
}, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
52
52
|
/**
|
|
53
53
|
* List all processes
|
|
54
54
|
* Get a list of all running and completed processes
|
|
55
55
|
*/
|
|
56
|
-
export declare const getProcess: <ThrowOnError extends boolean = false>(options?: Options<GetProcessData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen
|
|
56
|
+
export declare const getProcess: <ThrowOnError extends boolean = false>(options?: Options<GetProcessData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").ProcessResponse[], unknown, ThrowOnError>;
|
|
57
57
|
/**
|
|
58
58
|
* Execute a command
|
|
59
59
|
* Execute a command and return process information
|
|
60
60
|
*/
|
|
61
|
-
export declare const postProcess: <ThrowOnError extends boolean = false>(options: Options<PostProcessData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen
|
|
61
|
+
export declare const postProcess: <ThrowOnError extends boolean = false>(options: Options<PostProcessData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").ProcessResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
62
62
|
/**
|
|
63
63
|
* Stop a process
|
|
64
64
|
* Gracefully stop a running process
|
|
65
65
|
*/
|
|
66
|
-
export declare const deleteProcessByIdentifier: <ThrowOnError extends boolean = false>(options: Options<DeleteProcessByIdentifierData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen
|
|
66
|
+
export declare const deleteProcessByIdentifier: <ThrowOnError extends boolean = false>(options: Options<DeleteProcessByIdentifierData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").SuccessResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
67
67
|
/**
|
|
68
68
|
* Get process by identifier
|
|
69
69
|
* Get information about a process by its PID or name
|
|
70
70
|
*/
|
|
71
|
-
export declare const getProcessByIdentifier: <ThrowOnError extends boolean = false>(options: Options<GetProcessByIdentifierData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen
|
|
71
|
+
export declare const getProcessByIdentifier: <ThrowOnError extends boolean = false>(options: Options<GetProcessByIdentifierData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").ProcessResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
72
72
|
/**
|
|
73
73
|
* Kill a process
|
|
74
74
|
* Forcefully kill a running process
|
|
75
75
|
*/
|
|
76
|
-
export declare const deleteProcessByIdentifierKill: <ThrowOnError extends boolean = false>(options: Options<DeleteProcessByIdentifierKillData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen
|
|
76
|
+
export declare const deleteProcessByIdentifierKill: <ThrowOnError extends boolean = false>(options: Options<DeleteProcessByIdentifierKillData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").SuccessResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
77
77
|
/**
|
|
78
78
|
* Get process logs
|
|
79
79
|
* Get the stdout and stderr output of a process
|
|
80
80
|
*/
|
|
81
81
|
export declare const getProcessByIdentifierLogs: <ThrowOnError extends boolean = false>(options: Options<GetProcessByIdentifierLogsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
|
|
82
82
|
[key: string]: string;
|
|
83
|
-
}, import("./types.gen
|
|
83
|
+
}, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
84
|
+
/**
|
|
85
|
+
* Get process logs in realtime
|
|
86
|
+
* Get the stdout and stderr output of a process in realtime
|
|
87
|
+
*/
|
|
88
|
+
export declare const getProcessByIdentifierLogsStream: <ThrowOnError extends boolean = false>(options: Options<GetProcessByIdentifierLogsStreamData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
|
|
89
|
+
[key: string]: string;
|
|
90
|
+
}, import("./types.gen").ErrorResponse, ThrowOnError>;
|