@blaxel/core 0.2.17 → 0.2.18-dev.136

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.
@@ -104,6 +104,19 @@ export type ApiKey = TimeFields & OwnerFields & {
104
104
  * Array of metrics
105
105
  */
106
106
  export type ArrayMetric = Array<Metric>;
107
+ /**
108
+ * Billable time metric
109
+ */
110
+ export type BillableTimeMetric = {
111
+ /**
112
+ * Billable time
113
+ */
114
+ billableTime?: number;
115
+ /**
116
+ * Total memory allocation in GB-seconds
117
+ */
118
+ totalAllocation?: number;
119
+ };
107
120
  /**
108
121
  * Configuration
109
122
  */
@@ -934,6 +947,40 @@ export type LocationResponse = {
934
947
  */
935
948
  status?: string;
936
949
  };
950
+ /**
951
+ * Response for logs
952
+ */
953
+ export type LogsResponse = {
954
+ /**
955
+ * Data
956
+ */
957
+ data?: Array<unknown>;
958
+ };
959
+ /**
960
+ * Response data for logs
961
+ */
962
+ export type LogsResponseData = {
963
+ /**
964
+ * Body of the log
965
+ */
966
+ body?: string;
967
+ /**
968
+ * Log attributes
969
+ */
970
+ logAttributes?: Array<unknown>;
971
+ /**
972
+ * Severity number of the log
973
+ */
974
+ severityNumber?: number;
975
+ /**
976
+ * Timestamp of the log
977
+ */
978
+ timestamp?: string;
979
+ /**
980
+ * Trace ID of the log
981
+ */
982
+ traceId?: string;
983
+ };
937
984
  /**
938
985
  * Definition of an MCP from the MCP Hub
939
986
  */
@@ -999,6 +1046,19 @@ export type McpDefinition = TimeFields & {
999
1046
  */
1000
1047
  url?: string;
1001
1048
  };
1049
+ /**
1050
+ * Memory allocation by service name
1051
+ */
1052
+ export type MemoryAllocationByName = {
1053
+ /**
1054
+ * Memory allocation value
1055
+ */
1056
+ allocation?: number;
1057
+ /**
1058
+ * Name
1059
+ */
1060
+ name?: string;
1061
+ };
1002
1062
  /**
1003
1063
  * Metrics for memory allocation
1004
1064
  */
@@ -1021,6 +1081,10 @@ export type Metadata = TimeFields & OwnerFields & {
1021
1081
  * Model name
1022
1082
  */
1023
1083
  name?: string;
1084
+ /**
1085
+ * Plan
1086
+ */
1087
+ plan?: unknown;
1024
1088
  /**
1025
1089
  * Workspace name
1026
1090
  */
@@ -1650,6 +1714,23 @@ export type RequestTotalResponseData = {
1650
1714
  */
1651
1715
  workspace?: string;
1652
1716
  };
1717
+ /**
1718
+ * Resource
1719
+ */
1720
+ export type Resource = {
1721
+ /**
1722
+ * Name of the resource
1723
+ */
1724
+ name?: string;
1725
+ /**
1726
+ * Type of the resource
1727
+ */
1728
+ type?: string;
1729
+ /**
1730
+ * Workspace of the resource
1731
+ */
1732
+ workspace?: string;
1733
+ };
1653
1734
  /**
1654
1735
  * Log for a resource deployment (eg. model deployment, function deployment)
1655
1736
  */
@@ -1671,10 +1752,69 @@ export type ResourceLog = {
1671
1752
  */
1672
1753
  trace_id?: string;
1673
1754
  };
1755
+ /**
1756
+ * Chart for a resource log
1757
+ */
1758
+ export type ResourceLogChart = {
1759
+ /**
1760
+ * Count of the log
1761
+ */
1762
+ count?: number;
1763
+ /**
1764
+ * Debug count of the log
1765
+ */
1766
+ debug?: number;
1767
+ /**
1768
+ * Error count of the log
1769
+ */
1770
+ error?: number;
1771
+ /**
1772
+ * Fatal count of the log
1773
+ */
1774
+ fatal?: number;
1775
+ /**
1776
+ * Info count of the log
1777
+ */
1778
+ info?: number;
1779
+ /**
1780
+ * Timestamp of the log
1781
+ */
1782
+ timestamp?: string;
1783
+ /**
1784
+ * Trace count of the log
1785
+ */
1786
+ trace?: number;
1787
+ /**
1788
+ * Unknown count of the log
1789
+ */
1790
+ unknown?: number;
1791
+ /**
1792
+ * Warning count of the log
1793
+ */
1794
+ warning?: number;
1795
+ };
1796
+ /**
1797
+ * Response for a resource log
1798
+ */
1799
+ export type ResourceLogResponse = {
1800
+ /**
1801
+ * Chart
1802
+ */
1803
+ chart?: Array<unknown>;
1804
+ /**
1805
+ * Logs
1806
+ */
1807
+ logs?: Array<unknown>;
1808
+ /**
1809
+ * Total count of logs
1810
+ */
1811
+ totalCount?: number;
1812
+ };
1674
1813
  /**
1675
1814
  * Metrics for a single resource deployment (eg. model deployment, function deployment)
1676
1815
  */
1677
1816
  export type ResourceMetrics = {
1817
+ billableTime?: BillableTimeMetric;
1678
1818
  inferenceErrorsGlobal?: ArrayMetric;
1679
1819
  inferenceGlobal?: ArrayMetric;
1680
1820
  lastNRequests?: ArrayMetric;
@@ -1729,6 +1869,31 @@ export type ResourceMetrics = {
1729
1869
  tokenRate?: TokenRateMetrics;
1730
1870
  tokenTotal?: TokenTotalMetric;
1731
1871
  };
1872
+ /**
1873
+ * Log for a resource deployment (eg. model deployment, function deployment)
1874
+ */
1875
+ export type ResourceTrace = {
1876
+ /**
1877
+ * Duration in nanoseconds
1878
+ */
1879
+ duration?: number;
1880
+ /**
1881
+ * Has error
1882
+ */
1883
+ hasError?: boolean;
1884
+ /**
1885
+ * The timestamp of the log
1886
+ */
1887
+ startTime?: string;
1888
+ /**
1889
+ * Status code
1890
+ */
1891
+ statusCode?: number;
1892
+ /**
1893
+ * Trace ID of the log
1894
+ */
1895
+ traceID?: string;
1896
+ };
1732
1897
  /**
1733
1898
  * Revision configuration
1734
1899
  */
@@ -2306,6 +2471,27 @@ export type WebsocketChannel = TimeFields & {
2306
2471
  */
2307
2472
  workspace?: string;
2308
2473
  };
2474
+ /**
2475
+ * WebSocket connection details
2476
+ */
2477
+ export type WebsocketMessage = TimeFields & {
2478
+ /**
2479
+ * Unique message ID
2480
+ */
2481
+ id?: string;
2482
+ /**
2483
+ * Message
2484
+ */
2485
+ message?: string;
2486
+ /**
2487
+ * TTL timestamp for automatic deletion
2488
+ */
2489
+ ttl?: number;
2490
+ /**
2491
+ * Workspace the connection belongs to
2492
+ */
2493
+ workspace?: string;
2494
+ };
2309
2495
  /**
2310
2496
  * Workspace
2311
2497
  */
@@ -9,6 +9,12 @@ const client_gen_1 = require("./client.gen");
9
9
  */
10
10
  const deleteFilesystemByPath = (options) => {
11
11
  return (options.client ?? client_gen_1.client).delete({
12
+ security: [
13
+ {
14
+ scheme: 'bearer',
15
+ type: 'http'
16
+ }
17
+ ],
12
18
  url: '/filesystem/{path}',
13
19
  ...options
14
20
  });
@@ -20,6 +26,12 @@ exports.deleteFilesystemByPath = deleteFilesystemByPath;
20
26
  */
21
27
  const getFilesystemByPath = (options) => {
22
28
  return (options.client ?? client_gen_1.client).get({
29
+ security: [
30
+ {
31
+ scheme: 'bearer',
32
+ type: 'http'
33
+ }
34
+ ],
23
35
  url: '/filesystem/{path}',
24
36
  ...options
25
37
  });
@@ -31,6 +43,12 @@ exports.getFilesystemByPath = getFilesystemByPath;
31
43
  */
32
44
  const putFilesystemByPath = (options) => {
33
45
  return (options.client ?? client_gen_1.client).put({
46
+ security: [
47
+ {
48
+ scheme: 'bearer',
49
+ type: 'http'
50
+ }
51
+ ],
34
52
  url: '/filesystem/{path}',
35
53
  ...options,
36
54
  headers: {
@@ -46,6 +64,12 @@ exports.putFilesystemByPath = putFilesystemByPath;
46
64
  */
47
65
  const deleteNetworkProcessByPidMonitor = (options) => {
48
66
  return (options.client ?? client_gen_1.client).delete({
67
+ security: [
68
+ {
69
+ scheme: 'bearer',
70
+ type: 'http'
71
+ }
72
+ ],
49
73
  url: '/network/process/{pid}/monitor',
50
74
  ...options
51
75
  });
@@ -57,6 +81,12 @@ exports.deleteNetworkProcessByPidMonitor = deleteNetworkProcessByPidMonitor;
57
81
  */
58
82
  const postNetworkProcessByPidMonitor = (options) => {
59
83
  return (options.client ?? client_gen_1.client).post({
84
+ security: [
85
+ {
86
+ scheme: 'bearer',
87
+ type: 'http'
88
+ }
89
+ ],
60
90
  url: '/network/process/{pid}/monitor',
61
91
  ...options,
62
92
  headers: {
@@ -72,6 +102,12 @@ exports.postNetworkProcessByPidMonitor = postNetworkProcessByPidMonitor;
72
102
  */
73
103
  const getNetworkProcessByPidPorts = (options) => {
74
104
  return (options.client ?? client_gen_1.client).get({
105
+ security: [
106
+ {
107
+ scheme: 'bearer',
108
+ type: 'http'
109
+ }
110
+ ],
75
111
  url: '/network/process/{pid}/ports',
76
112
  ...options
77
113
  });
@@ -83,6 +119,12 @@ exports.getNetworkProcessByPidPorts = getNetworkProcessByPidPorts;
83
119
  */
84
120
  const getProcess = (options) => {
85
121
  return (options?.client ?? client_gen_1.client).get({
122
+ security: [
123
+ {
124
+ scheme: 'bearer',
125
+ type: 'http'
126
+ }
127
+ ],
86
128
  url: '/process',
87
129
  ...options
88
130
  });
@@ -94,6 +136,12 @@ exports.getProcess = getProcess;
94
136
  */
95
137
  const postProcess = (options) => {
96
138
  return (options.client ?? client_gen_1.client).post({
139
+ security: [
140
+ {
141
+ scheme: 'bearer',
142
+ type: 'http'
143
+ }
144
+ ],
97
145
  url: '/process',
98
146
  ...options,
99
147
  headers: {
@@ -109,6 +157,12 @@ exports.postProcess = postProcess;
109
157
  */
110
158
  const deleteProcessByIdentifier = (options) => {
111
159
  return (options.client ?? client_gen_1.client).delete({
160
+ security: [
161
+ {
162
+ scheme: 'bearer',
163
+ type: 'http'
164
+ }
165
+ ],
112
166
  url: '/process/{identifier}',
113
167
  ...options
114
168
  });
@@ -120,6 +174,12 @@ exports.deleteProcessByIdentifier = deleteProcessByIdentifier;
120
174
  */
121
175
  const getProcessByIdentifier = (options) => {
122
176
  return (options.client ?? client_gen_1.client).get({
177
+ security: [
178
+ {
179
+ scheme: 'bearer',
180
+ type: 'http'
181
+ }
182
+ ],
123
183
  url: '/process/{identifier}',
124
184
  ...options
125
185
  });
@@ -131,12 +191,14 @@ exports.getProcessByIdentifier = getProcessByIdentifier;
131
191
  */
132
192
  const deleteProcessByIdentifierKill = (options) => {
133
193
  return (options.client ?? client_gen_1.client).delete({
194
+ security: [
195
+ {
196
+ scheme: 'bearer',
197
+ type: 'http'
198
+ }
199
+ ],
134
200
  url: '/process/{identifier}/kill',
135
- ...options,
136
- headers: {
137
- 'Content-Type': 'application/json',
138
- ...options?.headers
139
- }
201
+ ...options
140
202
  });
141
203
  };
142
204
  exports.deleteProcessByIdentifierKill = deleteProcessByIdentifierKill;
@@ -146,6 +208,12 @@ exports.deleteProcessByIdentifierKill = deleteProcessByIdentifierKill;
146
208
  */
147
209
  const getProcessByIdentifierLogs = (options) => {
148
210
  return (options.client ?? client_gen_1.client).get({
211
+ security: [
212
+ {
213
+ scheme: 'bearer',
214
+ type: 'http'
215
+ }
216
+ ],
149
217
  url: '/process/{identifier}/logs',
150
218
  ...options
151
219
  });
@@ -157,6 +225,12 @@ exports.getProcessByIdentifierLogs = getProcessByIdentifierLogs;
157
225
  */
158
226
  const getProcessByIdentifierLogsStream = (options) => {
159
227
  return (options.client ?? client_gen_1.client).get({
228
+ security: [
229
+ {
230
+ scheme: 'bearer',
231
+ type: 'http'
232
+ }
233
+ ],
160
234
  url: '/process/{identifier}/logs/stream',
161
235
  ...options
162
236
  });
@@ -168,6 +242,12 @@ exports.getProcessByIdentifierLogsStream = getProcessByIdentifierLogsStream;
168
242
  */
169
243
  const getWatchFilesystemByPath = (options) => {
170
244
  return (options.client ?? client_gen_1.client).get({
245
+ security: [
246
+ {
247
+ scheme: 'bearer',
248
+ type: 'http'
249
+ }
250
+ ],
171
251
  url: '/watch/filesystem/{path}',
172
252
  ...options
173
253
  });
@@ -179,6 +259,12 @@ exports.getWatchFilesystemByPath = getWatchFilesystemByPath;
179
259
  */
180
260
  const getWsProcessByIdentifierLogsStream = (options) => {
181
261
  return (options.client ?? client_gen_1.client).get({
262
+ security: [
263
+ {
264
+ scheme: 'bearer',
265
+ type: 'http'
266
+ }
267
+ ],
182
268
  url: '/ws/process/{identifier}/logs/stream',
183
269
  ...options
184
270
  });
@@ -190,6 +276,12 @@ exports.getWsProcessByIdentifierLogsStream = getWsProcessByIdentifierLogsStream;
190
276
  */
191
277
  const getWsWatchFilesystemByPath = (options) => {
192
278
  return (options.client ?? client_gen_1.client).get({
279
+ security: [
280
+ {
281
+ scheme: 'bearer',
282
+ type: 'http'
283
+ }
284
+ ],
193
285
  url: '/ws/watch/filesystem/{path}',
194
286
  ...options
195
287
  });
@@ -40,9 +40,6 @@ export type PortMonitorRequest = {
40
40
  */
41
41
  callback?: string;
42
42
  };
43
- export type ProcessKillRequest = {
44
- signal?: string;
45
- };
46
43
  export type ProcessLogs = {
47
44
  logs?: string;
48
45
  stderr?: string;
@@ -50,6 +47,9 @@ export type ProcessLogs = {
50
47
  };
51
48
  export type ProcessRequest = {
52
49
  command: string;
50
+ env?: {
51
+ [key: string]: string;
52
+ };
53
53
  name?: string;
54
54
  timeout?: number;
55
55
  waitForCompletion?: boolean;
@@ -392,10 +392,7 @@ export type GetProcessByIdentifierResponses = {
392
392
  };
393
393
  export type GetProcessByIdentifierResponse = GetProcessByIdentifierResponses[keyof GetProcessByIdentifierResponses];
394
394
  export type DeleteProcessByIdentifierKillData = {
395
- /**
396
- * Kill options
397
- */
398
- body?: ProcessKillRequest;
395
+ body?: never;
399
396
  path: {
400
397
  /**
401
398
  * Process identifier (PID or name)
@@ -576,5 +573,5 @@ export type GetWsWatchFilesystemByPathErrors = {
576
573
  };
577
574
  export type GetWsWatchFilesystemByPathError = GetWsWatchFilesystemByPathErrors[keyof GetWsWatchFilesystemByPathErrors];
578
575
  export type ClientOptions = {
579
- baseUrl: `${string}://localhost:8080` | (string & {});
576
+ baseUrl: 'https://run.blaxel.ai/{workspace_id}/sandboxes/{sandbox_id}' | (string & {});
580
577
  };
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
+ /* eslint-disable */
2
3
  // This file is auto-generated by @hey-api/openapi-ts
3
4
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,3 @@
1
- export { deleteFilesystemByPath, deleteNetworkProcessByPidMonitor, deleteProcessByIdentifier, deleteProcessByIdentifierKill, Directory, ErrorResponse, File, FileRequest, FileWithContent, getFilesystemByPath, getNetworkProcessByPidPorts, getProcess, getProcessByIdentifier, getProcessByIdentifierLogs, getProcessByIdentifierLogsStream, PortMonitorRequest, postNetworkProcessByPidMonitor, postProcess, ProcessKillRequest, ProcessRequest, ProcessResponse, putFilesystemByPath, SuccessResponse } from "./client/index.js";
1
+ export { deleteFilesystemByPath, deleteNetworkProcessByPidMonitor, deleteProcessByIdentifier, deleteProcessByIdentifierKill, Directory, ErrorResponse, File, FileRequest, FileWithContent, getFilesystemByPath, getNetworkProcessByPidPorts, getProcess, getProcessByIdentifier, getProcessByIdentifierLogs, getProcessByIdentifierLogsStream, PortMonitorRequest, postNetworkProcessByPidMonitor, postProcess, ProcessRequest, ProcessResponse, putFilesystemByPath, SuccessResponse } from "./client/index.js";
2
2
  export * from "./filesystem/index.js";
3
3
  export * from "./sandbox.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blaxel/core",
3
- "version": "0.2.17",
3
+ "version": "0.2.18-dev.136",
4
4
  "description": "Blaxel Core SDK for TypeScript",
5
5
  "license": "MIT",
6
6
  "author": "Blaxel, INC (https://blaxel.ai)",