@blaxel/core 0.2.51-preview.124 → 0.2.51-preview.125
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/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/client/sdk.gen.js +20 -115
- package/dist/cjs/common/settings.js +2 -2
- package/dist/cjs/jobs/jobs.js +102 -2
- package/dist/cjs/types/client/sdk.gen.d.ts +9 -29
- package/dist/cjs/types/client/types.gen.d.ts +44 -256
- package/dist/cjs/types/jobs/jobs.d.ts +31 -0
- package/dist/cjs/types/sandbox/client/types.gen.d.ts +4 -4
- package/dist/cjs-browser/.tsbuildinfo +1 -1
- package/dist/cjs-browser/client/sdk.gen.js +20 -115
- package/dist/cjs-browser/common/settings.js +2 -2
- package/dist/cjs-browser/jobs/jobs.js +102 -2
- package/dist/cjs-browser/types/client/sdk.gen.d.ts +9 -29
- package/dist/cjs-browser/types/client/types.gen.d.ts +44 -256
- package/dist/cjs-browser/types/jobs/jobs.d.ts +31 -0
- package/dist/cjs-browser/types/sandbox/client/types.gen.d.ts +4 -4
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/client/sdk.gen.js +16 -105
- package/dist/esm/common/settings.js +2 -2
- package/dist/esm/jobs/jobs.js +103 -3
- package/dist/esm-browser/.tsbuildinfo +1 -1
- package/dist/esm-browser/client/sdk.gen.js +16 -105
- package/dist/esm-browser/common/settings.js +2 -2
- package/dist/esm-browser/jobs/jobs.js +103 -3
- package/package.json +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
exports.listVolumes = exports.deleteVolumeTemplateVersion = exports.updateVolumeTemplate = exports.getVolumeTemplate = exports.deleteVolumeTemplate = exports.createVolumeTemplate = exports.listVolumeTemplates = exports.updateWorkspaceUserRole = exports.removeWorkspaceUser = exports.inviteWorkspaceUser = exports.listWorkspaceUsers = exports.getTemplate = exports.listTemplates = exports.deleteApiKeyForServiceAccount = exports.createApiKeyForServiceAccount = exports.listApiKeysForServiceAccount = exports.updateWorkspaceServiceAccount = exports.deleteWorkspaceServiceAccount = exports.createWorkspaceServiceAccount = exports.getWorkspaceServiceAccounts = exports.stopSandbox = exports.startSandbox = exports.deleteSandboxPreviewToken = exports.createSandboxPreviewToken = exports.listSandboxPreviewTokens = exports.updateSandboxPreview = exports.getSandboxPreview = exports.deleteSandboxPreview = exports.createSandboxPreview = exports.listSandboxPreviews = exports.updateSandbox = exports.getSandbox = exports.deleteSandbox = exports.createSandbox = exports.listSandboxes = exports.listSandboxHubDefinitions = exports.listPublicIps = exports.listAllPendingInvitations = exports.
|
|
6
|
-
exports.checkWorkspaceAvailability = exports.leaveWorkspace = exports.acceptWorkspaceInvitation = exports.declineWorkspaceInvitation = exports.updateWorkspace = exports.getWorkspace =
|
|
4
|
+
exports.updateModel = exports.getModel = exports.deleteModel = exports.createModel = exports.listModels = exports.listMcpHubDefinitions = exports.listLocations = exports.listJobRevisions = exports.getJobExecution = exports.deleteJobExecution = exports.createJobExecution = exports.listJobExecutions = exports.updateJob = exports.getJob = exports.deleteJob = exports.createJob = exports.listJobs = exports.getIntegrationConnectionModel = exports.listIntegrationConnectionModels = exports.getIntegrationConnectionModelEndpointConfigurations = exports.updateIntegrationConnection = exports.getIntegrationConnection = exports.deleteIntegrationConnection = exports.createIntegrationConnection = exports.listIntegrationConnections = exports.getIntegration = exports.deleteImageTag = exports.getImage = exports.deleteImage = exports.listImages = exports.cleanupImages = exports.listFunctionRevisions = exports.updateFunction = exports.getFunction = exports.deleteFunction = exports.createFunction = exports.listFunctions = exports.verifyCustomDomain = exports.updateCustomDomain = exports.getCustomDomain = exports.deleteCustomDomain = exports.createCustomDomain = exports.listCustomDomains = exports.getConfiguration = exports.listAgentRevisions = exports.updateAgent = exports.getAgent = exports.deleteAgent = exports.createAgent = exports.listAgents = void 0;
|
|
5
|
+
exports.deleteWorkspace = exports.createWorkspace = exports.listWorkspaces = exports.getVolume = exports.deleteVolume = exports.createVolume = exports.listVolumes = exports.deleteVolumeTemplateVersion = exports.updateVolumeTemplate = exports.getVolumeTemplate = exports.deleteVolumeTemplate = exports.createVolumeTemplate = exports.listVolumeTemplates = exports.updateWorkspaceUserRole = exports.removeWorkspaceUser = exports.inviteWorkspaceUser = exports.listWorkspaceUsers = exports.getTemplate = exports.listTemplates = exports.deleteApiKeyForServiceAccount = exports.createApiKeyForServiceAccount = exports.listApiKeysForServiceAccount = exports.updateWorkspaceServiceAccount = exports.deleteWorkspaceServiceAccount = exports.createWorkspaceServiceAccount = exports.getWorkspaceServiceAccounts = exports.stopSandbox = exports.startSandbox = exports.deleteSandboxPreviewToken = exports.createSandboxPreviewToken = exports.listSandboxPreviewTokens = exports.updateSandboxPreview = exports.getSandboxPreview = exports.deleteSandboxPreview = exports.createSandboxPreview = exports.listSandboxPreviews = exports.updateSandbox = exports.getSandbox = exports.deleteSandbox = exports.createSandbox = exports.listSandboxes = exports.listSandboxHubDefinitions = exports.listPublicIps = exports.listAllPendingInvitations = exports.updatePolicy = exports.getPolicy = exports.deletePolicy = exports.createPolicy = exports.listPolicies = exports.listModelRevisions = void 0;
|
|
6
|
+
exports.checkWorkspaceAvailability = exports.leaveWorkspace = exports.acceptWorkspaceInvitation = exports.declineWorkspaceInvitation = exports.updateWorkspace = exports.getWorkspace = void 0;
|
|
7
7
|
const client_gen_1 = require("./client.gen");
|
|
8
8
|
/**
|
|
9
9
|
* List all agents
|
|
@@ -334,6 +334,23 @@ const listFunctionRevisions = (options) => {
|
|
|
334
334
|
});
|
|
335
335
|
};
|
|
336
336
|
exports.listFunctionRevisions = listFunctionRevisions;
|
|
337
|
+
/**
|
|
338
|
+
* Cleanup unused images
|
|
339
|
+
* Deletes all unused images in the workspace. Only removes images that are not currently being used by any agents, functions, sandboxes, or jobs.
|
|
340
|
+
*/
|
|
341
|
+
const cleanupImages = (options) => {
|
|
342
|
+
return (options?.client ?? client_gen_1.client).delete({
|
|
343
|
+
security: [
|
|
344
|
+
{
|
|
345
|
+
scheme: 'bearer',
|
|
346
|
+
type: 'http'
|
|
347
|
+
}
|
|
348
|
+
],
|
|
349
|
+
url: '/images',
|
|
350
|
+
...options
|
|
351
|
+
});
|
|
352
|
+
};
|
|
353
|
+
exports.cleanupImages = cleanupImages;
|
|
337
354
|
/**
|
|
338
355
|
* List images
|
|
339
356
|
* Returns a list of all images in the workspace grouped by repository with tags.
|
|
@@ -978,118 +995,6 @@ const updatePolicy = (options) => {
|
|
|
978
995
|
});
|
|
979
996
|
};
|
|
980
997
|
exports.updatePolicy = updatePolicy;
|
|
981
|
-
/**
|
|
982
|
-
* List all private clusters
|
|
983
|
-
*/
|
|
984
|
-
const listPrivateClusters = (options) => {
|
|
985
|
-
return (options?.client ?? client_gen_1.client).get({
|
|
986
|
-
security: [
|
|
987
|
-
{
|
|
988
|
-
scheme: 'bearer',
|
|
989
|
-
type: 'http'
|
|
990
|
-
}
|
|
991
|
-
],
|
|
992
|
-
url: '/privateclusters',
|
|
993
|
-
...options
|
|
994
|
-
});
|
|
995
|
-
};
|
|
996
|
-
exports.listPrivateClusters = listPrivateClusters;
|
|
997
|
-
/**
|
|
998
|
-
* Create private cluster
|
|
999
|
-
*/
|
|
1000
|
-
const createPrivateCluster = (options) => {
|
|
1001
|
-
return (options?.client ?? client_gen_1.client).post({
|
|
1002
|
-
security: [
|
|
1003
|
-
{
|
|
1004
|
-
scheme: 'bearer',
|
|
1005
|
-
type: 'http'
|
|
1006
|
-
}
|
|
1007
|
-
],
|
|
1008
|
-
url: '/privateclusters',
|
|
1009
|
-
...options
|
|
1010
|
-
});
|
|
1011
|
-
};
|
|
1012
|
-
exports.createPrivateCluster = createPrivateCluster;
|
|
1013
|
-
/**
|
|
1014
|
-
* Delete private cluster
|
|
1015
|
-
*/
|
|
1016
|
-
const deletePrivateCluster = (options) => {
|
|
1017
|
-
return (options.client ?? client_gen_1.client).delete({
|
|
1018
|
-
security: [
|
|
1019
|
-
{
|
|
1020
|
-
scheme: 'bearer',
|
|
1021
|
-
type: 'http'
|
|
1022
|
-
}
|
|
1023
|
-
],
|
|
1024
|
-
url: '/privateclusters/{privateClusterName}',
|
|
1025
|
-
...options
|
|
1026
|
-
});
|
|
1027
|
-
};
|
|
1028
|
-
exports.deletePrivateCluster = deletePrivateCluster;
|
|
1029
|
-
/**
|
|
1030
|
-
* Get private cluster by name
|
|
1031
|
-
*/
|
|
1032
|
-
const getPrivateCluster = (options) => {
|
|
1033
|
-
return (options.client ?? client_gen_1.client).get({
|
|
1034
|
-
security: [
|
|
1035
|
-
{
|
|
1036
|
-
scheme: 'bearer',
|
|
1037
|
-
type: 'http'
|
|
1038
|
-
}
|
|
1039
|
-
],
|
|
1040
|
-
url: '/privateclusters/{privateClusterName}',
|
|
1041
|
-
...options
|
|
1042
|
-
});
|
|
1043
|
-
};
|
|
1044
|
-
exports.getPrivateCluster = getPrivateCluster;
|
|
1045
|
-
/**
|
|
1046
|
-
* Update private cluster
|
|
1047
|
-
*/
|
|
1048
|
-
const updatePrivateCluster = (options) => {
|
|
1049
|
-
return (options.client ?? client_gen_1.client).put({
|
|
1050
|
-
security: [
|
|
1051
|
-
{
|
|
1052
|
-
scheme: 'bearer',
|
|
1053
|
-
type: 'http'
|
|
1054
|
-
}
|
|
1055
|
-
],
|
|
1056
|
-
url: '/privateclusters/{privateClusterName}',
|
|
1057
|
-
...options
|
|
1058
|
-
});
|
|
1059
|
-
};
|
|
1060
|
-
exports.updatePrivateCluster = updatePrivateCluster;
|
|
1061
|
-
/**
|
|
1062
|
-
* Get private cluster health
|
|
1063
|
-
*/
|
|
1064
|
-
const getPrivateClusterHealth = (options) => {
|
|
1065
|
-
return (options.client ?? client_gen_1.client).get({
|
|
1066
|
-
security: [
|
|
1067
|
-
{
|
|
1068
|
-
scheme: 'bearer',
|
|
1069
|
-
type: 'http'
|
|
1070
|
-
}
|
|
1071
|
-
],
|
|
1072
|
-
url: '/privateclusters/{privateClusterName}/health',
|
|
1073
|
-
...options
|
|
1074
|
-
});
|
|
1075
|
-
};
|
|
1076
|
-
exports.getPrivateClusterHealth = getPrivateClusterHealth;
|
|
1077
|
-
/**
|
|
1078
|
-
* Update private cluster health
|
|
1079
|
-
*/
|
|
1080
|
-
const updatePrivateClusterHealth = (options) => {
|
|
1081
|
-
return (options.client ?? client_gen_1.client).post({
|
|
1082
|
-
security: [
|
|
1083
|
-
{
|
|
1084
|
-
scheme: 'bearer',
|
|
1085
|
-
type: 'http'
|
|
1086
|
-
}
|
|
1087
|
-
],
|
|
1088
|
-
url: '/privateclusters/{privateClusterName}/health',
|
|
1089
|
-
...options
|
|
1090
|
-
});
|
|
1091
|
-
};
|
|
1092
|
-
exports.updatePrivateClusterHealth = updatePrivateClusterHealth;
|
|
1093
998
|
/**
|
|
1094
999
|
* List pending invitations
|
|
1095
1000
|
* Returns a list of all pending invitations in the workspace.
|
|
@@ -10,7 +10,7 @@ function getPackageVersion() {
|
|
|
10
10
|
if (typeof require !== "undefined") {
|
|
11
11
|
// Try to require package.json (Node.js only, gracefully fails in browser)
|
|
12
12
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
13
|
-
const packageJson = {"version":"0.2.51-preview.
|
|
13
|
+
const packageJson = {"version":"0.2.51-preview.125","commit":"3853140a51897f5f5d076412f419c105d7f968ab"};
|
|
14
14
|
return packageJson.version || "unknown";
|
|
15
15
|
}
|
|
16
16
|
else {
|
|
@@ -62,7 +62,7 @@ function getCommitHash() {
|
|
|
62
62
|
if (typeof require !== "undefined") {
|
|
63
63
|
// Try to require package.json and look for commit field (set during build)
|
|
64
64
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
65
|
-
const packageJson = {"version":"0.2.51-preview.
|
|
65
|
+
const packageJson = {"version":"0.2.51-preview.125","commit":"3853140a51897f5f5d076412f419c105d7f968ab"};
|
|
66
66
|
// Check for commit in various possible locations
|
|
67
67
|
const commit = packageJson.commit || packageJson.buildInfo?.commit;
|
|
68
68
|
if (commit) {
|
package/dist/cjs/jobs/jobs.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.blJob = void 0;
|
|
4
|
+
const index_js_1 = require("../client/index.js");
|
|
4
5
|
const internal_js_1 = require("../common/internal.js");
|
|
5
6
|
const logger_js_1 = require("../common/logger.js");
|
|
6
7
|
const settings_js_1 = require("../common/settings.js");
|
|
@@ -24,7 +25,7 @@ class BlJob {
|
|
|
24
25
|
return new URL(`${settings_js_1.settings.runInternalProtocol}://bl-${settings_js_1.settings.env}-${hash}.${settings_js_1.settings.runInternalHostname}`);
|
|
25
26
|
}
|
|
26
27
|
get forcedUrl() {
|
|
27
|
-
return (0, internal_js_1.getForcedUrl)(
|
|
28
|
+
return (0, internal_js_1.getForcedUrl)("job", this.jobName);
|
|
28
29
|
}
|
|
29
30
|
get url() {
|
|
30
31
|
if (this.forcedUrl)
|
|
@@ -35,7 +36,7 @@ class BlJob {
|
|
|
35
36
|
}
|
|
36
37
|
async call(url, tasks) {
|
|
37
38
|
const body = {
|
|
38
|
-
tasks: tasks
|
|
39
|
+
tasks: tasks,
|
|
39
40
|
};
|
|
40
41
|
const response = await fetch(url.toString() + "/executions", {
|
|
41
42
|
method: "POST",
|
|
@@ -83,6 +84,105 @@ class BlJob {
|
|
|
83
84
|
span.end();
|
|
84
85
|
}
|
|
85
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Create a new execution for this job and return the execution ID
|
|
89
|
+
*/
|
|
90
|
+
async createExecution(request) {
|
|
91
|
+
logger_js_1.logger.debug(`Creating execution for job: ${this.jobName}`);
|
|
92
|
+
const { data } = await (0, index_js_1.createJobExecution)({
|
|
93
|
+
path: {
|
|
94
|
+
jobId: this.jobName,
|
|
95
|
+
},
|
|
96
|
+
body: request,
|
|
97
|
+
headers: settings_js_1.settings.headers,
|
|
98
|
+
throwOnError: true,
|
|
99
|
+
});
|
|
100
|
+
const response = data;
|
|
101
|
+
if (!response?.executionId) {
|
|
102
|
+
throw new Error("No execution ID returned from create job execution");
|
|
103
|
+
}
|
|
104
|
+
logger_js_1.logger.debug(`Created execution: ${response.executionId}`);
|
|
105
|
+
return response.executionId;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Get a specific execution by ID
|
|
109
|
+
*/
|
|
110
|
+
async getExecution(executionId) {
|
|
111
|
+
logger_js_1.logger.debug(`Getting execution ${executionId} for job: ${this.jobName}`);
|
|
112
|
+
const { data } = await (0, index_js_1.getJobExecution)({
|
|
113
|
+
path: {
|
|
114
|
+
jobId: this.jobName,
|
|
115
|
+
executionId: executionId,
|
|
116
|
+
},
|
|
117
|
+
headers: settings_js_1.settings.headers,
|
|
118
|
+
throwOnError: true,
|
|
119
|
+
});
|
|
120
|
+
if (!data) {
|
|
121
|
+
throw new Error(`Execution '${executionId}' not found for job '${this.jobName}'`);
|
|
122
|
+
}
|
|
123
|
+
return data;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* List all executions for this job
|
|
127
|
+
*/
|
|
128
|
+
async listExecutions() {
|
|
129
|
+
logger_js_1.logger.debug(`Listing executions for job: ${this.jobName}`);
|
|
130
|
+
const { data } = await (0, index_js_1.listJobExecutions)({
|
|
131
|
+
path: {
|
|
132
|
+
jobId: this.jobName,
|
|
133
|
+
},
|
|
134
|
+
headers: settings_js_1.settings.headers,
|
|
135
|
+
throwOnError: true,
|
|
136
|
+
});
|
|
137
|
+
return data ?? [];
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Get the status of a specific execution
|
|
141
|
+
*/
|
|
142
|
+
async getExecutionStatus(executionId) {
|
|
143
|
+
const execution = await this.getExecution(executionId);
|
|
144
|
+
return execution.status ?? "UNKNOWN";
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Cancel a specific execution
|
|
148
|
+
*/
|
|
149
|
+
async cancelExecution(executionId) {
|
|
150
|
+
logger_js_1.logger.debug(`Cancelling execution ${executionId} for job: ${this.jobName}`);
|
|
151
|
+
await (0, index_js_1.deleteJobExecution)({
|
|
152
|
+
path: {
|
|
153
|
+
jobId: this.jobName,
|
|
154
|
+
executionId: executionId,
|
|
155
|
+
},
|
|
156
|
+
headers: settings_js_1.settings.headers,
|
|
157
|
+
throwOnError: true,
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Wait for an execution to complete
|
|
162
|
+
* @param executionId The execution ID to wait for
|
|
163
|
+
* @param options.maxWait Maximum time to wait in milliseconds (default: 6 minutes)
|
|
164
|
+
* @param options.interval Polling interval in milliseconds (default: 3 seconds)
|
|
165
|
+
*/
|
|
166
|
+
async waitForExecution(executionId, options = {}) {
|
|
167
|
+
const maxWait = options.maxWait ?? 360000; // 6 minutes default (jobs typically run for 5 minutes)
|
|
168
|
+
const interval = options.interval ?? 3000; // 3 seconds default
|
|
169
|
+
const startTime = Date.now();
|
|
170
|
+
logger_js_1.logger.debug(`Waiting for execution ${executionId} to complete (max ${maxWait}ms)`);
|
|
171
|
+
while (Date.now() - startTime < maxWait) {
|
|
172
|
+
const execution = await this.getExecution(executionId);
|
|
173
|
+
const status = execution.status;
|
|
174
|
+
// Terminal states (Kubernetes-style: succeeded, failed, cancelled)
|
|
175
|
+
if (status === "succeeded" ||
|
|
176
|
+
status === "failed" ||
|
|
177
|
+
status === "cancelled") {
|
|
178
|
+
logger_js_1.logger.debug(`Execution ${executionId} finished with status: ${status}`);
|
|
179
|
+
return execution;
|
|
180
|
+
}
|
|
181
|
+
// Wait before polling again
|
|
182
|
+
await new Promise((resolve) => setTimeout(resolve, interval));
|
|
183
|
+
}
|
|
184
|
+
throw new Error(`Execution ${executionId} did not complete within ${maxWait}ms`);
|
|
185
|
+
}
|
|
86
186
|
}
|
|
87
187
|
const blJob = (jobName) => {
|
|
88
188
|
return new BlJob(jobName);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Options as ClientOptions, TDataShape, Client } from '@hey-api/client-fetch';
|
|
2
|
-
import type { ListAgentsData, CreateAgentData, DeleteAgentData, GetAgentData, UpdateAgentData, ListAgentRevisionsData, GetConfigurationData, ListCustomDomainsData, CreateCustomDomainData, DeleteCustomDomainData, GetCustomDomainData, UpdateCustomDomainData, VerifyCustomDomainData, ListFunctionsData, CreateFunctionData, DeleteFunctionData, GetFunctionData, UpdateFunctionData, ListFunctionRevisionsData, ListImagesData, DeleteImageData, GetImageData, DeleteImageTagData, GetIntegrationData, ListIntegrationConnectionsData, CreateIntegrationConnectionData, DeleteIntegrationConnectionData, GetIntegrationConnectionData, UpdateIntegrationConnectionData, GetIntegrationConnectionModelEndpointConfigurationsData, ListIntegrationConnectionModelsData, GetIntegrationConnectionModelData, ListJobsData, CreateJobData, DeleteJobData, GetJobData, UpdateJobData, ListJobExecutionsData, CreateJobExecutionData, DeleteJobExecutionData, GetJobExecutionData, ListJobRevisionsData, ListLocationsData, ListMcpHubDefinitionsData, ListModelsData, CreateModelData, DeleteModelData, GetModelData, UpdateModelData, ListModelRevisionsData, ListPoliciesData, CreatePolicyData, DeletePolicyData, GetPolicyData, UpdatePolicyData,
|
|
2
|
+
import type { ListAgentsData, CreateAgentData, DeleteAgentData, GetAgentData, UpdateAgentData, ListAgentRevisionsData, GetConfigurationData, ListCustomDomainsData, CreateCustomDomainData, DeleteCustomDomainData, GetCustomDomainData, UpdateCustomDomainData, VerifyCustomDomainData, ListFunctionsData, CreateFunctionData, DeleteFunctionData, GetFunctionData, UpdateFunctionData, ListFunctionRevisionsData, CleanupImagesData, ListImagesData, DeleteImageData, GetImageData, DeleteImageTagData, GetIntegrationData, ListIntegrationConnectionsData, CreateIntegrationConnectionData, DeleteIntegrationConnectionData, GetIntegrationConnectionData, UpdateIntegrationConnectionData, GetIntegrationConnectionModelEndpointConfigurationsData, ListIntegrationConnectionModelsData, GetIntegrationConnectionModelData, ListJobsData, CreateJobData, DeleteJobData, GetJobData, UpdateJobData, ListJobExecutionsData, CreateJobExecutionData, DeleteJobExecutionData, GetJobExecutionData, ListJobRevisionsData, ListLocationsData, ListMcpHubDefinitionsData, ListModelsData, CreateModelData, DeleteModelData, GetModelData, UpdateModelData, ListModelRevisionsData, ListPoliciesData, CreatePolicyData, DeletePolicyData, GetPolicyData, UpdatePolicyData, ListAllPendingInvitationsData, ListPublicIpsData, ListSandboxHubDefinitionsData, ListSandboxesData, CreateSandboxData, DeleteSandboxData, GetSandboxData, UpdateSandboxData, ListSandboxPreviewsData, CreateSandboxPreviewData, DeleteSandboxPreviewData, GetSandboxPreviewData, UpdateSandboxPreviewData, ListSandboxPreviewTokensData, CreateSandboxPreviewTokenData, DeleteSandboxPreviewTokenData, StartSandboxData, StopSandboxData, GetWorkspaceServiceAccountsData, CreateWorkspaceServiceAccountData, DeleteWorkspaceServiceAccountData, UpdateWorkspaceServiceAccountData, ListApiKeysForServiceAccountData, CreateApiKeyForServiceAccountData, DeleteApiKeyForServiceAccountData, ListTemplatesData, GetTemplateData, ListWorkspaceUsersData, InviteWorkspaceUserData, RemoveWorkspaceUserData, UpdateWorkspaceUserRoleData, ListVolumeTemplatesData, CreateVolumeTemplateData, DeleteVolumeTemplateData, GetVolumeTemplateData, UpdateVolumeTemplateData, DeleteVolumeTemplateVersionData, ListVolumesData, CreateVolumeData, DeleteVolumeData, GetVolumeData, ListWorkspacesData, CreateWorkspaceData, DeleteWorkspaceData, GetWorkspaceData, UpdateWorkspaceData, DeclineWorkspaceInvitationData, AcceptWorkspaceInvitationData, LeaveWorkspaceData, CheckWorkspaceAvailabilityData } from './types.gen.js';
|
|
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
|
|
@@ -90,6 +90,14 @@ export declare const updateFunction: <ThrowOnError extends boolean = false>(opti
|
|
|
90
90
|
* Returns revisions for a function by name.
|
|
91
91
|
*/
|
|
92
92
|
export declare const listFunctionRevisions: <ThrowOnError extends boolean = false>(options: Options<ListFunctionRevisionsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").RevisionMetadata[], unknown, ThrowOnError>;
|
|
93
|
+
/**
|
|
94
|
+
* Cleanup unused images
|
|
95
|
+
* Deletes all unused images in the workspace. Only removes images that are not currently being used by any agents, functions, sandboxes, or jobs.
|
|
96
|
+
*/
|
|
97
|
+
export declare const cleanupImages: <ThrowOnError extends boolean = false>(options?: Options<CleanupImagesData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
|
|
98
|
+
deleted?: number;
|
|
99
|
+
message?: string;
|
|
100
|
+
}, unknown, ThrowOnError>;
|
|
93
101
|
/**
|
|
94
102
|
* List images
|
|
95
103
|
* Returns a list of all images in the workspace grouped by repository with tags.
|
|
@@ -266,34 +274,6 @@ export declare const getPolicy: <ThrowOnError extends boolean = false>(options:
|
|
|
266
274
|
* Updates a policy.
|
|
267
275
|
*/
|
|
268
276
|
export declare const updatePolicy: <ThrowOnError extends boolean = false>(options: Options<UpdatePolicyData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").Policy, unknown, ThrowOnError>;
|
|
269
|
-
/**
|
|
270
|
-
* List all private clusters
|
|
271
|
-
*/
|
|
272
|
-
export declare const listPrivateClusters: <ThrowOnError extends boolean = false>(options?: Options<ListPrivateClustersData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").PrivateCluster[], unknown, ThrowOnError>;
|
|
273
|
-
/**
|
|
274
|
-
* Create private cluster
|
|
275
|
-
*/
|
|
276
|
-
export declare const createPrivateCluster: <ThrowOnError extends boolean = false>(options?: Options<CreatePrivateClusterData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").PrivateCluster, unknown, ThrowOnError>;
|
|
277
|
-
/**
|
|
278
|
-
* Delete private cluster
|
|
279
|
-
*/
|
|
280
|
-
export declare const deletePrivateCluster: <ThrowOnError extends boolean = false>(options: Options<DeletePrivateClusterData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").PrivateCluster, unknown, ThrowOnError>;
|
|
281
|
-
/**
|
|
282
|
-
* Get private cluster by name
|
|
283
|
-
*/
|
|
284
|
-
export declare const getPrivateCluster: <ThrowOnError extends boolean = false>(options: Options<GetPrivateClusterData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").PrivateCluster, unknown, ThrowOnError>;
|
|
285
|
-
/**
|
|
286
|
-
* Update private cluster
|
|
287
|
-
*/
|
|
288
|
-
export declare const updatePrivateCluster: <ThrowOnError extends boolean = false>(options: Options<UpdatePrivateClusterData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").PrivateCluster, unknown, ThrowOnError>;
|
|
289
|
-
/**
|
|
290
|
-
* Get private cluster health
|
|
291
|
-
*/
|
|
292
|
-
export declare const getPrivateClusterHealth: <ThrowOnError extends boolean = false>(options: Options<GetPrivateClusterHealthData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<unknown, unknown, ThrowOnError>;
|
|
293
|
-
/**
|
|
294
|
-
* Update private cluster health
|
|
295
|
-
*/
|
|
296
|
-
export declare const updatePrivateClusterHealth: <ThrowOnError extends boolean = false>(options: Options<UpdatePrivateClusterHealthData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<unknown, unknown, ThrowOnError>;
|
|
297
277
|
/**
|
|
298
278
|
* List pending invitations
|
|
299
279
|
* Returns a list of all pending invitations in the workspace.
|