freestyle-sandboxes 0.0.15 → 0.0.17
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/ai/index.d.cts +3 -3
- package/dist/ai/index.d.mts +3 -3
- package/dist/index.cjs +85 -6
- package/dist/index.d.cts +11 -7
- package/dist/index.d.mts +11 -7
- package/dist/index.mjs +85 -6
- package/dist/mastra/index.d.cts +1 -1
- package/dist/mastra/index.d.mts +1 -1
- package/dist/types.gen-C03gaIPq.d.ts +297 -0
- package/dist/types.gen-YhJAHBw8.d.ts +233 -0
- package/openapi/sdk.gen.ts +56 -6
- package/openapi/types.gen.ts +110 -33
- package/openapi.json +1 -1
- package/package.json +1 -1
- package/src/index.ts +73 -6
package/dist/ai/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as ai from 'ai';
|
|
2
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as
|
|
2
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, c as FreestyleDeployWebSuccessResponse } from '../types.gen-C03gaIPq.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
declare const executeCodeSchema: z.ZodObject<{
|
|
@@ -26,10 +26,10 @@ declare const executeTool: (config: FreestyleExecuteScriptParamsConfiguration &
|
|
|
26
26
|
script?: string;
|
|
27
27
|
}, {
|
|
28
28
|
script?: string;
|
|
29
|
-
}>, string |
|
|
29
|
+
}>, string | FreestyleExecuteScriptResultSuccess> & {
|
|
30
30
|
execute: (args: {
|
|
31
31
|
script?: string;
|
|
32
|
-
}, options: ai.ToolExecutionOptions) => PromiseLike<string |
|
|
32
|
+
}, options: ai.ToolExecutionOptions) => PromiseLike<string | FreestyleExecuteScriptResultSuccess>;
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
35
|
* Deploy a Web project
|
package/dist/ai/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as ai from 'ai';
|
|
2
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as
|
|
2
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, c as FreestyleDeployWebSuccessResponse } from '../types.gen-C03gaIPq.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
declare const executeCodeSchema: z.ZodObject<{
|
|
@@ -26,10 +26,10 @@ declare const executeTool: (config: FreestyleExecuteScriptParamsConfiguration &
|
|
|
26
26
|
script?: string;
|
|
27
27
|
}, {
|
|
28
28
|
script?: string;
|
|
29
|
-
}>, string |
|
|
29
|
+
}>, string | FreestyleExecuteScriptResultSuccess> & {
|
|
30
30
|
execute: (args: {
|
|
31
31
|
script?: string;
|
|
32
|
-
}, options: ai.ToolExecutionOptions) => PromiseLike<string |
|
|
32
|
+
}, options: ai.ToolExecutionOptions) => PromiseLike<string | FreestyleExecuteScriptResultSuccess>;
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
35
|
* Deploy a Web project
|
package/dist/index.cjs
CHANGED
|
@@ -15,6 +15,12 @@ const handleBackupCloudstate = (options) => {
|
|
|
15
15
|
url: "/cloudstate/v1/projects/{id}/backup"
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
|
+
const handleVerifyWildcard = (options) => {
|
|
19
|
+
return (options?.client ?? client).post({
|
|
20
|
+
...options,
|
|
21
|
+
url: "/domains/v1/certs/{domain}/wildcard"
|
|
22
|
+
});
|
|
23
|
+
};
|
|
18
24
|
const handleListDomains = (options) => {
|
|
19
25
|
return (options?.client ?? client).get({
|
|
20
26
|
...options,
|
|
@@ -45,22 +51,40 @@ const handleDeleteDomainVerification = (options) => {
|
|
|
45
51
|
url: "/domains/v1/verifications"
|
|
46
52
|
});
|
|
47
53
|
};
|
|
54
|
+
const handleListExecuteRuns = (options) => {
|
|
55
|
+
return (options?.client ?? client).get({
|
|
56
|
+
...options,
|
|
57
|
+
url: "/execute/v1/deployments"
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
const handleGetExecuteRun = (options) => {
|
|
61
|
+
return (options?.client ?? client).get({
|
|
62
|
+
...options,
|
|
63
|
+
url: "/execute/v1/deployments/{deployment}"
|
|
64
|
+
});
|
|
65
|
+
};
|
|
48
66
|
const handleExecuteScript = (options) => {
|
|
49
67
|
return (options?.client ?? client).post({
|
|
50
68
|
...options,
|
|
51
69
|
url: "/execute/v1/script"
|
|
52
70
|
});
|
|
53
71
|
};
|
|
72
|
+
const handleGetLogs = (options) => {
|
|
73
|
+
return (options?.client ?? client).get({
|
|
74
|
+
...options,
|
|
75
|
+
url: "/observability/v1/logs"
|
|
76
|
+
});
|
|
77
|
+
};
|
|
54
78
|
const handleDeployWeb = (options) => {
|
|
55
79
|
return (options?.client ?? client).post({
|
|
56
80
|
...options,
|
|
57
81
|
url: "/web/v1/deploy"
|
|
58
82
|
});
|
|
59
83
|
};
|
|
60
|
-
const
|
|
84
|
+
const handleListWebDeploys = (options) => {
|
|
61
85
|
return (options?.client ?? client).get({
|
|
62
86
|
...options,
|
|
63
|
-
url: "/web/v1/
|
|
87
|
+
url: "/web/v1/deployments"
|
|
64
88
|
});
|
|
65
89
|
};
|
|
66
90
|
|
|
@@ -159,17 +183,20 @@ Message: ${response.error?.message}`
|
|
|
159
183
|
}
|
|
160
184
|
}
|
|
161
185
|
/**
|
|
162
|
-
* Get logs for
|
|
186
|
+
* Get logs for an execute run, or web deployment.
|
|
163
187
|
* @param id The ID of the sandbox.
|
|
164
188
|
* @returns The logs for the sandbox.
|
|
165
189
|
* @throws An error if the logs could not be retrieved.
|
|
166
190
|
*/
|
|
167
|
-
async
|
|
191
|
+
async getLogs(id) {
|
|
168
192
|
const response = await handleGetLogs({
|
|
169
193
|
client: this.client,
|
|
170
|
-
|
|
171
|
-
id
|
|
194
|
+
query: {
|
|
195
|
+
deploymentId: id
|
|
172
196
|
}
|
|
197
|
+
// path: {
|
|
198
|
+
// id: id,
|
|
199
|
+
// },
|
|
173
200
|
});
|
|
174
201
|
if (response.data) {
|
|
175
202
|
return response.data;
|
|
@@ -257,6 +284,58 @@ Message: ${response.error?.message}`
|
|
|
257
284
|
);
|
|
258
285
|
}
|
|
259
286
|
}
|
|
287
|
+
async listWebDeployments() {
|
|
288
|
+
const response = await handleListWebDeploys({
|
|
289
|
+
client: this.client
|
|
290
|
+
});
|
|
291
|
+
if (response.data) {
|
|
292
|
+
return response.data;
|
|
293
|
+
} else {
|
|
294
|
+
throw new Error(
|
|
295
|
+
"Failed to list web deployments\n" + response.error.message
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
async listExecuteRuns() {
|
|
300
|
+
const response = await handleListExecuteRuns({
|
|
301
|
+
client: this.client
|
|
302
|
+
});
|
|
303
|
+
if (response.data) {
|
|
304
|
+
return response.data;
|
|
305
|
+
} else {
|
|
306
|
+
throw new Error("Failed to list execute runs\n" + response.error.message);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
async getExecuteRun(id) {
|
|
310
|
+
const response = await handleGetExecuteRun({
|
|
311
|
+
client: this.client,
|
|
312
|
+
path: {
|
|
313
|
+
deployment: id
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
if (response.data) {
|
|
317
|
+
return response.data;
|
|
318
|
+
} else {
|
|
319
|
+
throw new Error(
|
|
320
|
+
`Failed to get execute run with ID ${id}: ${response.error.message}`
|
|
321
|
+
);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
async provisionWildcard(domain) {
|
|
325
|
+
const response = await handleVerifyWildcard({
|
|
326
|
+
client: this.client,
|
|
327
|
+
path: {
|
|
328
|
+
domain
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
if (response.data) {
|
|
332
|
+
return response.data;
|
|
333
|
+
} else {
|
|
334
|
+
throw new Error(
|
|
335
|
+
`Failed to provision wildcard for domain ${domain}: ${response.error.message}`
|
|
336
|
+
);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
260
339
|
}
|
|
261
340
|
|
|
262
341
|
exports.FreestyleSandboxes = FreestyleSandboxes;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as
|
|
2
|
-
export {
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponse, d as FreestyleCloudstateDeployRequest, e as FreestyleCloudstateDeploySuccessResponse, H as HandleBackupCloudstateResponse, f as HandleGetLogsResponse, g as HandleCreateDomainVerificationResponse, h as HandleVerifyDomainResponse, i as HandleVerifyDomainError, j as HandleListDomainsResponse, k as HandleListDomainVerificationRequestsResponse, l as HandleDeleteDomainVerificationResponse, m as HandleListWebDeploysResponse, n as HandleListExecuteRunsResponse, o as HandleGetExecuteRunResponse, p as HandleVerifyWildcardResponse } from './types.gen-C03gaIPq.js';
|
|
2
|
+
export { D as DeploymentLogEntry, q as DeploymentState, E as ExecuteLogEntry, r as ExecuteRunState, s as FreestyleCloudstateDeployConfiguration, t as FreestyleCloudstateDeployErrorResponse, u as FreestyleDeleteDomainVerificationRequest, v as FreestyleDeployWebErrorResponse, w as FreestyleDeployWebPayload, x as FreestyleDomainVerificationRequest, y as FreestyleExecuteScriptParams, z as FreestyleFile, A as FreestyleJavaScriptLog, B as FreestyleLogResponseObject, C as FreestyleVerifyDomainRequest, K as HandleBackupCloudstateData, L as HandleBackupCloudstateError, Q as HandleCreateDomainVerificationData, R as HandleCreateDomainVerificationError, S as HandleDeleteDomainVerificationData, T as HandleDeleteDomainVerificationError, G as HandleDeployCloudstateData, J as HandleDeployCloudstateError, I as HandleDeployCloudstateResponse, a1 as HandleDeployWebData, a3 as HandleDeployWebError, a2 as HandleDeployWebResponse, Y as HandleExecuteScriptData, _ as HandleExecuteScriptError, Z as HandleExecuteScriptResponse, W as HandleGetExecuteRunData, X as HandleGetExecuteRunError, $ as HandleGetLogsData, a0 as HandleGetLogsError, O as HandleListDomainVerificationRequestsError, N as HandleListDomainsError, U as HandleListExecuteRunsData, V as HandleListExecuteRunsError, a4 as HandleListWebDeploysError, P as HandleVerifyDomainData, M as HandleVerifyWildcardError } from './types.gen-C03gaIPq.js';
|
|
3
3
|
|
|
4
4
|
declare class FreestyleSandboxes {
|
|
5
5
|
private client;
|
|
@@ -20,7 +20,7 @@ declare class FreestyleSandboxes {
|
|
|
20
20
|
/**
|
|
21
21
|
* Execute a script in a sandbox.
|
|
22
22
|
*/
|
|
23
|
-
executeScript(script: string, config?: FreestyleExecuteScriptParamsConfiguration): Promise<
|
|
23
|
+
executeScript(script: string, config?: FreestyleExecuteScriptParamsConfiguration): Promise<FreestyleExecuteScriptResultSuccess>;
|
|
24
24
|
/**
|
|
25
25
|
* Deploy a Web project to a sandbox.
|
|
26
26
|
*/
|
|
@@ -40,12 +40,12 @@ declare class FreestyleSandboxes {
|
|
|
40
40
|
*/
|
|
41
41
|
backupCloudstate(id: string): Promise<HandleBackupCloudstateResponse>;
|
|
42
42
|
/**
|
|
43
|
-
* Get logs for
|
|
43
|
+
* Get logs for an execute run, or web deployment.
|
|
44
44
|
* @param id The ID of the sandbox.
|
|
45
45
|
* @returns The logs for the sandbox.
|
|
46
46
|
* @throws An error if the logs could not be retrieved.
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
getLogs(id: string): Promise<HandleGetLogsResponse>;
|
|
49
49
|
/**
|
|
50
50
|
* Create a a domain verification request.
|
|
51
51
|
* @param domain The domain to verify.
|
|
@@ -57,10 +57,14 @@ declare class FreestyleSandboxes {
|
|
|
57
57
|
* @param domain The domain to verify.
|
|
58
58
|
* @returns The domain verification request.
|
|
59
59
|
*/
|
|
60
|
-
verifyDomain(domain: string): Promise<HandleVerifyDomainResponse>;
|
|
60
|
+
verifyDomain(domain: string): Promise<HandleVerifyDomainResponse | HandleVerifyDomainError>;
|
|
61
61
|
listDomains(): Promise<HandleListDomainsResponse>;
|
|
62
62
|
listDomainVerificationRequests(): Promise<HandleListDomainVerificationRequestsResponse>;
|
|
63
63
|
deleteDomainVerificationRequest(domain: string, verificationCode: string): Promise<HandleDeleteDomainVerificationResponse>;
|
|
64
|
+
listWebDeployments(): Promise<HandleListWebDeploysResponse>;
|
|
65
|
+
listExecuteRuns(): Promise<HandleListExecuteRunsResponse>;
|
|
66
|
+
getExecuteRun(id: string): Promise<HandleGetExecuteRunResponse>;
|
|
67
|
+
provisionWildcard(domain: string): Promise<HandleVerifyWildcardResponse>;
|
|
64
68
|
}
|
|
65
69
|
|
|
66
|
-
export { FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponse,
|
|
70
|
+
export { FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponse, FreestyleExecuteScriptParamsConfiguration, FreestyleExecuteScriptResultSuccess, FreestyleSandboxes, HandleBackupCloudstateResponse, HandleCreateDomainVerificationResponse, HandleDeleteDomainVerificationResponse, HandleGetExecuteRunResponse, HandleGetLogsResponse, HandleListDomainVerificationRequestsResponse, HandleListDomainsResponse, HandleListExecuteRunsResponse, HandleListWebDeploysResponse, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleVerifyWildcardResponse };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as
|
|
2
|
-
export {
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponse, d as FreestyleCloudstateDeployRequest, e as FreestyleCloudstateDeploySuccessResponse, H as HandleBackupCloudstateResponse, f as HandleGetLogsResponse, g as HandleCreateDomainVerificationResponse, h as HandleVerifyDomainResponse, i as HandleVerifyDomainError, j as HandleListDomainsResponse, k as HandleListDomainVerificationRequestsResponse, l as HandleDeleteDomainVerificationResponse, m as HandleListWebDeploysResponse, n as HandleListExecuteRunsResponse, o as HandleGetExecuteRunResponse, p as HandleVerifyWildcardResponse } from './types.gen-C03gaIPq.js';
|
|
2
|
+
export { D as DeploymentLogEntry, q as DeploymentState, E as ExecuteLogEntry, r as ExecuteRunState, s as FreestyleCloudstateDeployConfiguration, t as FreestyleCloudstateDeployErrorResponse, u as FreestyleDeleteDomainVerificationRequest, v as FreestyleDeployWebErrorResponse, w as FreestyleDeployWebPayload, x as FreestyleDomainVerificationRequest, y as FreestyleExecuteScriptParams, z as FreestyleFile, A as FreestyleJavaScriptLog, B as FreestyleLogResponseObject, C as FreestyleVerifyDomainRequest, K as HandleBackupCloudstateData, L as HandleBackupCloudstateError, Q as HandleCreateDomainVerificationData, R as HandleCreateDomainVerificationError, S as HandleDeleteDomainVerificationData, T as HandleDeleteDomainVerificationError, G as HandleDeployCloudstateData, J as HandleDeployCloudstateError, I as HandleDeployCloudstateResponse, a1 as HandleDeployWebData, a3 as HandleDeployWebError, a2 as HandleDeployWebResponse, Y as HandleExecuteScriptData, _ as HandleExecuteScriptError, Z as HandleExecuteScriptResponse, W as HandleGetExecuteRunData, X as HandleGetExecuteRunError, $ as HandleGetLogsData, a0 as HandleGetLogsError, O as HandleListDomainVerificationRequestsError, N as HandleListDomainsError, U as HandleListExecuteRunsData, V as HandleListExecuteRunsError, a4 as HandleListWebDeploysError, P as HandleVerifyDomainData, M as HandleVerifyWildcardError } from './types.gen-C03gaIPq.js';
|
|
3
3
|
|
|
4
4
|
declare class FreestyleSandboxes {
|
|
5
5
|
private client;
|
|
@@ -20,7 +20,7 @@ declare class FreestyleSandboxes {
|
|
|
20
20
|
/**
|
|
21
21
|
* Execute a script in a sandbox.
|
|
22
22
|
*/
|
|
23
|
-
executeScript(script: string, config?: FreestyleExecuteScriptParamsConfiguration): Promise<
|
|
23
|
+
executeScript(script: string, config?: FreestyleExecuteScriptParamsConfiguration): Promise<FreestyleExecuteScriptResultSuccess>;
|
|
24
24
|
/**
|
|
25
25
|
* Deploy a Web project to a sandbox.
|
|
26
26
|
*/
|
|
@@ -40,12 +40,12 @@ declare class FreestyleSandboxes {
|
|
|
40
40
|
*/
|
|
41
41
|
backupCloudstate(id: string): Promise<HandleBackupCloudstateResponse>;
|
|
42
42
|
/**
|
|
43
|
-
* Get logs for
|
|
43
|
+
* Get logs for an execute run, or web deployment.
|
|
44
44
|
* @param id The ID of the sandbox.
|
|
45
45
|
* @returns The logs for the sandbox.
|
|
46
46
|
* @throws An error if the logs could not be retrieved.
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
getLogs(id: string): Promise<HandleGetLogsResponse>;
|
|
49
49
|
/**
|
|
50
50
|
* Create a a domain verification request.
|
|
51
51
|
* @param domain The domain to verify.
|
|
@@ -57,10 +57,14 @@ declare class FreestyleSandboxes {
|
|
|
57
57
|
* @param domain The domain to verify.
|
|
58
58
|
* @returns The domain verification request.
|
|
59
59
|
*/
|
|
60
|
-
verifyDomain(domain: string): Promise<HandleVerifyDomainResponse>;
|
|
60
|
+
verifyDomain(domain: string): Promise<HandleVerifyDomainResponse | HandleVerifyDomainError>;
|
|
61
61
|
listDomains(): Promise<HandleListDomainsResponse>;
|
|
62
62
|
listDomainVerificationRequests(): Promise<HandleListDomainVerificationRequestsResponse>;
|
|
63
63
|
deleteDomainVerificationRequest(domain: string, verificationCode: string): Promise<HandleDeleteDomainVerificationResponse>;
|
|
64
|
+
listWebDeployments(): Promise<HandleListWebDeploysResponse>;
|
|
65
|
+
listExecuteRuns(): Promise<HandleListExecuteRunsResponse>;
|
|
66
|
+
getExecuteRun(id: string): Promise<HandleGetExecuteRunResponse>;
|
|
67
|
+
provisionWildcard(domain: string): Promise<HandleVerifyWildcardResponse>;
|
|
64
68
|
}
|
|
65
69
|
|
|
66
|
-
export { FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponse,
|
|
70
|
+
export { FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponse, FreestyleExecuteScriptParamsConfiguration, FreestyleExecuteScriptResultSuccess, FreestyleSandboxes, HandleBackupCloudstateResponse, HandleCreateDomainVerificationResponse, HandleDeleteDomainVerificationResponse, HandleGetExecuteRunResponse, HandleGetLogsResponse, HandleListDomainVerificationRequestsResponse, HandleListDomainsResponse, HandleListExecuteRunsResponse, HandleListWebDeploysResponse, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleVerifyWildcardResponse };
|
package/dist/index.mjs
CHANGED
|
@@ -13,6 +13,12 @@ const handleBackupCloudstate = (options) => {
|
|
|
13
13
|
url: "/cloudstate/v1/projects/{id}/backup"
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
|
+
const handleVerifyWildcard = (options) => {
|
|
17
|
+
return (options?.client ?? client).post({
|
|
18
|
+
...options,
|
|
19
|
+
url: "/domains/v1/certs/{domain}/wildcard"
|
|
20
|
+
});
|
|
21
|
+
};
|
|
16
22
|
const handleListDomains = (options) => {
|
|
17
23
|
return (options?.client ?? client).get({
|
|
18
24
|
...options,
|
|
@@ -43,22 +49,40 @@ const handleDeleteDomainVerification = (options) => {
|
|
|
43
49
|
url: "/domains/v1/verifications"
|
|
44
50
|
});
|
|
45
51
|
};
|
|
52
|
+
const handleListExecuteRuns = (options) => {
|
|
53
|
+
return (options?.client ?? client).get({
|
|
54
|
+
...options,
|
|
55
|
+
url: "/execute/v1/deployments"
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
const handleGetExecuteRun = (options) => {
|
|
59
|
+
return (options?.client ?? client).get({
|
|
60
|
+
...options,
|
|
61
|
+
url: "/execute/v1/deployments/{deployment}"
|
|
62
|
+
});
|
|
63
|
+
};
|
|
46
64
|
const handleExecuteScript = (options) => {
|
|
47
65
|
return (options?.client ?? client).post({
|
|
48
66
|
...options,
|
|
49
67
|
url: "/execute/v1/script"
|
|
50
68
|
});
|
|
51
69
|
};
|
|
70
|
+
const handleGetLogs = (options) => {
|
|
71
|
+
return (options?.client ?? client).get({
|
|
72
|
+
...options,
|
|
73
|
+
url: "/observability/v1/logs"
|
|
74
|
+
});
|
|
75
|
+
};
|
|
52
76
|
const handleDeployWeb = (options) => {
|
|
53
77
|
return (options?.client ?? client).post({
|
|
54
78
|
...options,
|
|
55
79
|
url: "/web/v1/deploy"
|
|
56
80
|
});
|
|
57
81
|
};
|
|
58
|
-
const
|
|
82
|
+
const handleListWebDeploys = (options) => {
|
|
59
83
|
return (options?.client ?? client).get({
|
|
60
84
|
...options,
|
|
61
|
-
url: "/web/v1/
|
|
85
|
+
url: "/web/v1/deployments"
|
|
62
86
|
});
|
|
63
87
|
};
|
|
64
88
|
|
|
@@ -157,17 +181,20 @@ Message: ${response.error?.message}`
|
|
|
157
181
|
}
|
|
158
182
|
}
|
|
159
183
|
/**
|
|
160
|
-
* Get logs for
|
|
184
|
+
* Get logs for an execute run, or web deployment.
|
|
161
185
|
* @param id The ID of the sandbox.
|
|
162
186
|
* @returns The logs for the sandbox.
|
|
163
187
|
* @throws An error if the logs could not be retrieved.
|
|
164
188
|
*/
|
|
165
|
-
async
|
|
189
|
+
async getLogs(id) {
|
|
166
190
|
const response = await handleGetLogs({
|
|
167
191
|
client: this.client,
|
|
168
|
-
|
|
169
|
-
id
|
|
192
|
+
query: {
|
|
193
|
+
deploymentId: id
|
|
170
194
|
}
|
|
195
|
+
// path: {
|
|
196
|
+
// id: id,
|
|
197
|
+
// },
|
|
171
198
|
});
|
|
172
199
|
if (response.data) {
|
|
173
200
|
return response.data;
|
|
@@ -255,6 +282,58 @@ Message: ${response.error?.message}`
|
|
|
255
282
|
);
|
|
256
283
|
}
|
|
257
284
|
}
|
|
285
|
+
async listWebDeployments() {
|
|
286
|
+
const response = await handleListWebDeploys({
|
|
287
|
+
client: this.client
|
|
288
|
+
});
|
|
289
|
+
if (response.data) {
|
|
290
|
+
return response.data;
|
|
291
|
+
} else {
|
|
292
|
+
throw new Error(
|
|
293
|
+
"Failed to list web deployments\n" + response.error.message
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
async listExecuteRuns() {
|
|
298
|
+
const response = await handleListExecuteRuns({
|
|
299
|
+
client: this.client
|
|
300
|
+
});
|
|
301
|
+
if (response.data) {
|
|
302
|
+
return response.data;
|
|
303
|
+
} else {
|
|
304
|
+
throw new Error("Failed to list execute runs\n" + response.error.message);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
async getExecuteRun(id) {
|
|
308
|
+
const response = await handleGetExecuteRun({
|
|
309
|
+
client: this.client,
|
|
310
|
+
path: {
|
|
311
|
+
deployment: id
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
if (response.data) {
|
|
315
|
+
return response.data;
|
|
316
|
+
} else {
|
|
317
|
+
throw new Error(
|
|
318
|
+
`Failed to get execute run with ID ${id}: ${response.error.message}`
|
|
319
|
+
);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
async provisionWildcard(domain) {
|
|
323
|
+
const response = await handleVerifyWildcard({
|
|
324
|
+
client: this.client,
|
|
325
|
+
path: {
|
|
326
|
+
domain
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
if (response.data) {
|
|
330
|
+
return response.data;
|
|
331
|
+
} else {
|
|
332
|
+
throw new Error(
|
|
333
|
+
`Failed to provision wildcard for domain ${domain}: ${response.error.message}`
|
|
334
|
+
);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
258
337
|
}
|
|
259
338
|
|
|
260
339
|
export { FreestyleSandboxes };
|
package/dist/mastra/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _mastra_core from '@mastra/core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-
|
|
3
|
+
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-C03gaIPq.js';
|
|
4
4
|
|
|
5
5
|
declare const executeTool: (config: FreestyleExecuteScriptParamsConfiguration & {
|
|
6
6
|
apiKey: string;
|
package/dist/mastra/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _mastra_core from '@mastra/core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-
|
|
3
|
+
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-C03gaIPq.js';
|
|
4
4
|
|
|
5
5
|
declare const executeTool: (config: FreestyleExecuteScriptParamsConfiguration & {
|
|
6
6
|
apiKey: string;
|