freestyle-sandboxes 0.0.46 → 0.0.48
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/inde.d.cts +71 -0
- package/dist/ai/inde.d.mts +71 -0
- package/dist/ai/index.d.cts +1 -1
- package/dist/ai/index.d.mts +1 -1
- package/dist/expo/inde.d.cts +6 -0
- package/dist/expo/inde.d.mts +6 -0
- package/dist/inde.d.cts +192 -0
- package/dist/inde.d.mts +192 -0
- package/dist/{index-CGc0kRd_.cjs → index-BBXyg0JQ.cjs} +5 -9
- package/dist/index-BQHqnjZK.mjs +3231 -0
- package/dist/index-CEEa9WHp.cjs +3238 -0
- package/dist/{index-jh-93svX.mjs → index-DCF70Xbq.mjs} +5 -9
- package/dist/index.cjs +28 -0
- package/dist/index.d.cts +12 -3
- package/dist/index.d.mts +12 -3
- package/dist/index.mjs +28 -0
- package/dist/langgraph/inde.d.cts +2162 -0
- package/dist/langgraph/inde.d.mts +2162 -0
- package/dist/langgraph/index.d.cts +1 -1
- package/dist/langgraph/index.d.mts +1 -1
- package/dist/mastra/inde.d.cts +2623 -0
- package/dist/mastra/inde.d.mts +2623 -0
- package/dist/mastra/index.d.cts +1 -1
- package/dist/mastra/index.d.mts +1 -1
- package/dist/react/dev-server/index..d.cts +28 -0
- package/dist/react/dev-server/index..d.mts +28 -0
- package/dist/react/dev-server/index.cjs +94 -0
- package/dist/react/dev-server/index.d.cts +28 -0
- package/dist/react/dev-server/index.d.mts +28 -0
- package/dist/react/dev-server/index.mjs +91 -0
- package/dist/types.gen-1sd31qLV.d.ts +172 -0
- package/dist/types.gen-BCdfx7yt.d.ts +760 -0
- package/dist/types.gen-BaMKzqxQ.d.ts +233 -0
- package/dist/types.gen-BtK6PMQy.d.ts +195 -0
- package/dist/types.gen-C03gaIPq.d.ts +297 -0
- package/dist/{types.gen-BJArgpto.d.ts → types.gen-CIf3ciN7.d.ts} +5 -2
- package/dist/types.gen-CMuCas4r.d.ts +183 -0
- package/dist/{types.gen-DxZanGNF.d.ts → types.gen-CZUnqmzP.d.ts} +6 -9
- package/dist/types.gen-CnEkmbco.d.ts +314 -0
- package/dist/types.gen-DDYpuDzZ.d.ts +764 -0
- package/dist/types.gen-DHmdEOOa.d.ts +172 -0
- package/dist/{types.gen-CfrGF-JI.d.ts → types.gen-DLYohMJT.d.ts} +1 -1
- package/dist/types.gen-DbTb_SrD.d.ts +156 -0
- package/dist/types.gen-DkQ-Dbs1.d.ts +764 -0
- package/dist/types.gen-DyY7Deri.d.ts +138 -0
- package/dist/types.gen-MBZCvIhE.d.ts +311 -0
- package/dist/types.gen-YhJAHBw8.d.ts +233 -0
- package/dist/types.gen-cCnnhnB6.d.ts +182 -0
- package/dist/types.gen-uDTr6v-7.d.ts +731 -0
- package/dist/utils/inde.d.cts +10 -0
- package/dist/utils/inde.d.mts +10 -0
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/openapi/types.gen.ts +4 -1
- package/openapi.json +4649 -1
- package/package.json +14 -2
- package/src/index.ts +29 -4
- package/src/react/dev-server/index.tsx +127 -0
- package/src/react/dev-server/types.ts +5 -0
- package/tsconfig.json +1 -1
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, b1 as HandleExecuteScriptError, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponseV2 } from '../types.gen-CIf3ciN7.js';
|
|
2
|
+
import { T as Tool, a as ToolExecutionOptions } from '../index.d-9H_wnIbz.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import 'node:http';
|
|
5
|
+
import 'http';
|
|
6
|
+
|
|
7
|
+
declare const executeCodeSchema: z.ZodObject<{
|
|
8
|
+
script: z.ZodString;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
script?: string;
|
|
11
|
+
}, {
|
|
12
|
+
script?: string;
|
|
13
|
+
}>;
|
|
14
|
+
declare const executeCodeDescription: (envVars: string, nodeModules: string) => string;
|
|
15
|
+
/**
|
|
16
|
+
* Execute a JavaScript or TypeScript script
|
|
17
|
+
*
|
|
18
|
+
*
|
|
19
|
+
* @param config - Configuration for the tool
|
|
20
|
+
* @param config.apiKey - The API key to use
|
|
21
|
+
* @param {Function} [config.onResult] - Optional callback function to handle the result.
|
|
22
|
+
* @param {boolean} [config.truncateOutput=false] - Whether to truncate the result to 1000 characters and truncate individual logs to the first 250 characters; useful to prevent long outputs from filling the context window.
|
|
23
|
+
*/
|
|
24
|
+
declare const executeTool: (config: FreestyleExecuteScriptParamsConfiguration & {
|
|
25
|
+
apiKey: string;
|
|
26
|
+
onResult?: (_v: {
|
|
27
|
+
toolCallId: string;
|
|
28
|
+
input: {
|
|
29
|
+
script: string;
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
};
|
|
32
|
+
result: FreestyleExecuteScriptResultSuccess | HandleExecuteScriptError;
|
|
33
|
+
}) => void | Promise<void>;
|
|
34
|
+
truncateOutput?: boolean;
|
|
35
|
+
}) => Tool<z.ZodObject<{
|
|
36
|
+
script: z.ZodString;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
script?: string;
|
|
39
|
+
}, {
|
|
40
|
+
script?: string;
|
|
41
|
+
}>, FreestyleExecuteScriptResultSuccess | {
|
|
42
|
+
message: any;
|
|
43
|
+
error: any;
|
|
44
|
+
}> & {
|
|
45
|
+
execute: (args: {
|
|
46
|
+
script?: string;
|
|
47
|
+
}, options: ToolExecutionOptions) => PromiseLike<FreestyleExecuteScriptResultSuccess | {
|
|
48
|
+
message: any;
|
|
49
|
+
error: any;
|
|
50
|
+
}>;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Deploy a Web project
|
|
54
|
+
* @param config - Configuration for the tool
|
|
55
|
+
* @param config.apiKey - The API key to use
|
|
56
|
+
*/
|
|
57
|
+
declare const deployWebTool: (config: FreestyleDeployWebConfiguration & {
|
|
58
|
+
apiKey: string;
|
|
59
|
+
}) => Tool<z.ZodObject<{
|
|
60
|
+
files: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
61
|
+
}, "strip", z.ZodTypeAny, {
|
|
62
|
+
files?: Record<string, string>;
|
|
63
|
+
}, {
|
|
64
|
+
files?: Record<string, string>;
|
|
65
|
+
}>, string | FreestyleDeployWebSuccessResponseV2> & {
|
|
66
|
+
execute: (args: {
|
|
67
|
+
files?: Record<string, string>;
|
|
68
|
+
}, options: ToolExecutionOptions) => PromiseLike<string | FreestyleDeployWebSuccessResponseV2>;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export { deployWebTool, executeCodeDescription, executeCodeSchema, executeTool };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, b1 as HandleExecuteScriptError, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponseV2 } from '../types.gen-CIf3ciN7.js';
|
|
2
|
+
import { T as Tool, a as ToolExecutionOptions } from '../index.d-9H_wnIbz.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import 'node:http';
|
|
5
|
+
import 'http';
|
|
6
|
+
|
|
7
|
+
declare const executeCodeSchema: z.ZodObject<{
|
|
8
|
+
script: z.ZodString;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
script?: string;
|
|
11
|
+
}, {
|
|
12
|
+
script?: string;
|
|
13
|
+
}>;
|
|
14
|
+
declare const executeCodeDescription: (envVars: string, nodeModules: string) => string;
|
|
15
|
+
/**
|
|
16
|
+
* Execute a JavaScript or TypeScript script
|
|
17
|
+
*
|
|
18
|
+
*
|
|
19
|
+
* @param config - Configuration for the tool
|
|
20
|
+
* @param config.apiKey - The API key to use
|
|
21
|
+
* @param {Function} [config.onResult] - Optional callback function to handle the result.
|
|
22
|
+
* @param {boolean} [config.truncateOutput=false] - Whether to truncate the result to 1000 characters and truncate individual logs to the first 250 characters; useful to prevent long outputs from filling the context window.
|
|
23
|
+
*/
|
|
24
|
+
declare const executeTool: (config: FreestyleExecuteScriptParamsConfiguration & {
|
|
25
|
+
apiKey: string;
|
|
26
|
+
onResult?: (_v: {
|
|
27
|
+
toolCallId: string;
|
|
28
|
+
input: {
|
|
29
|
+
script: string;
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
};
|
|
32
|
+
result: FreestyleExecuteScriptResultSuccess | HandleExecuteScriptError;
|
|
33
|
+
}) => void | Promise<void>;
|
|
34
|
+
truncateOutput?: boolean;
|
|
35
|
+
}) => Tool<z.ZodObject<{
|
|
36
|
+
script: z.ZodString;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
script?: string;
|
|
39
|
+
}, {
|
|
40
|
+
script?: string;
|
|
41
|
+
}>, FreestyleExecuteScriptResultSuccess | {
|
|
42
|
+
message: any;
|
|
43
|
+
error: any;
|
|
44
|
+
}> & {
|
|
45
|
+
execute: (args: {
|
|
46
|
+
script?: string;
|
|
47
|
+
}, options: ToolExecutionOptions) => PromiseLike<FreestyleExecuteScriptResultSuccess | {
|
|
48
|
+
message: any;
|
|
49
|
+
error: any;
|
|
50
|
+
}>;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Deploy a Web project
|
|
54
|
+
* @param config - Configuration for the tool
|
|
55
|
+
* @param config.apiKey - The API key to use
|
|
56
|
+
*/
|
|
57
|
+
declare const deployWebTool: (config: FreestyleDeployWebConfiguration & {
|
|
58
|
+
apiKey: string;
|
|
59
|
+
}) => Tool<z.ZodObject<{
|
|
60
|
+
files: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
61
|
+
}, "strip", z.ZodTypeAny, {
|
|
62
|
+
files?: Record<string, string>;
|
|
63
|
+
}, {
|
|
64
|
+
files?: Record<string, string>;
|
|
65
|
+
}>, string | FreestyleDeployWebSuccessResponseV2> & {
|
|
66
|
+
execute: (args: {
|
|
67
|
+
files?: Record<string, string>;
|
|
68
|
+
}, options: ToolExecutionOptions) => PromiseLike<string | FreestyleDeployWebSuccessResponseV2>;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export { deployWebTool, executeCodeDescription, executeCodeSchema, executeTool };
|
package/dist/ai/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, b1 as HandleExecuteScriptError, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponseV2 } from '../types.gen-
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, b1 as HandleExecuteScriptError, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponseV2 } from '../types.gen-CIf3ciN7.js';
|
|
2
2
|
import { T as Tool, a as ToolExecutionOptions } from '../index.d-9H_wnIbz.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import 'node:http';
|
package/dist/ai/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, b1 as HandleExecuteScriptError, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponseV2 } from '../types.gen-
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, b1 as HandleExecuteScriptError, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponseV2 } from '../types.gen-CIf3ciN7.js';
|
|
2
2
|
import { T as Tool, a as ToolExecutionOptions } from '../index.d-9H_wnIbz.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import 'node:http';
|
package/dist/inde.d.cts
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, D as DeploymentSource, b as FreestyleDeployWebConfiguration, B as BuildOptions, c as FreestyleDeployWebSuccessResponseV2, 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, C as CreateRepositoryResponseSuccess, q as HandleListRepositoriesResponse, r as HandleDeleteRepoResponse, G as GitIdentity, s as HandleDeleteIdentityResponse, A as AccessLevel, t as HandleGrantPermissionResponse, L as ListPermissionResponseSuccess, u as DescribePermissionResponseSuccess, v as CreatedToken, w as ListGitTokensResponseSuccess, x as HandleListGitTriggersResponse, y as GitTrigger, z as GitTriggerAction, E as HandleCreateGitTriggerResponse, I as HandleEphemeralDevServerResponse } from './types.gen-CIf3ciN7.js';
|
|
2
|
+
export { K as AccessTokenInfo, J as AccessibleRepository, M as Behavior, N as CreateDomainMappingRequest, O as CreateRecordParams, P as CreateRepoRequest, R as CreateRepoSource, Q as CreateRepositoryRequest, T as DeploymentLogEntry, V as DeploymentState, W as DevServer, X as DnsRecord, Y as DnsRecordData, Z as DnsRecordKind, _ as DomainVerificationRequest, $ as ExecuteLogEntry, a0 as ExecuteRunInfo, a1 as ExecuteRunState, a2 as FreestyleCloudstateDeployConfiguration, a3 as FreestyleCloudstateDeployErrorResponse, a4 as FreestyleDeleteDomainVerificationRequest, a5 as FreestyleDeployWebErrorResponse, a6 as FreestyleDeployWebPayload, a7 as FreestyleDeployWebPayloadV2, a8 as FreestyleDomainVerificationRequest, a9 as FreestyleExecuteScriptParams, aa as FreestyleFile, ab as FreestyleGetLogsResponse, ac as FreestyleJavaScriptLog, ad as FreestyleLogResponseObject, ae as FreestyleNetworkPermission, ag as FreestyleVerifyDomainRequest, ah as GitRepositoryTrigger, ak as GrantPermissionRequest, av as HandleBackupCloudstateData, aw as HandleBackupCloudstateError, aR as HandleCreateDomainVerificationData, aS as HandleCreateDomainVerificationError, bn as HandleCreateGitTokenData, bp as HandleCreateGitTokenError, bo as HandleCreateGitTokenResponse, bC as HandleCreateGitTriggerData, bD as HandleCreateGitTriggerError, b3 as HandleCreateIdentityError, b2 as HandleCreateIdentityResponse, aA as HandleCreateRecordData, aC as HandleCreateRecordError, aB as HandleCreateRecordResponse, bv as HandleCreateRepoData, bx as HandleCreateRepoError, bw as HandleCreateRepoResponse, aM as HandleDeleteDomainMappingData, aO as HandleDeleteDomainMappingError, aN as HandleDeleteDomainMappingResponse, aT as HandleDeleteDomainVerificationData, aU as HandleDeleteDomainVerificationError, bE as HandleDeleteGitTriggerData, bG as HandleDeleteGitTriggerError, bF as HandleDeleteGitTriggerResponse, b4 as HandleDeleteIdentityData, b5 as HandleDeleteIdentityError, aD as HandleDeleteRecordData, aF as HandleDeleteRecordError, aE as HandleDeleteRecordResponse, by as HandleDeleteRepoData, bz as HandleDeleteRepoError, as as HandleDeployCloudstateData, au as HandleDeployCloudstateError, at as HandleDeployCloudstateResponse, bJ as HandleDeployWebData, bL as HandleDeployWebError, bK as HandleDeployWebResponse, bM as HandleDeployWebV2Data, bO as HandleDeployWebV2Error, bN as HandleDeployWebV2Response, b9 as HandleDescribePermissionData, bb as HandleDescribePermissionError, ba as HandleDescribePermissionResponse, aV as HandleEphemeralDevServerData, aW as HandleEphemeralDevServerError, a$ as HandleExecuteScriptData, b1 as HandleExecuteScriptError, b0 as HandleExecuteScriptResponse, aZ as HandleGetExecuteRunData, a_ as HandleGetExecuteRunError, bH as HandleGetLogsData, bI as HandleGetLogsError, bR as HandleGetWebDeployDetailsData, bc as HandleGrantPermissionData, bd as HandleGrantPermissionError, aJ as HandleInsertDomainMappingData, aL as HandleInsertDomainMappingError, aK as HandleInsertDomainMappingResponse, aP as HandleListDomainVerificationRequestsError, aI as HandleListDomainsError, aX as HandleListExecuteRunsData, aY as HandleListExecuteRunsError, bk as HandleListGitTokensData, bm as HandleListGitTokensError, bl as HandleListGitTokensResponse, bA as HandleListGitTriggersData, bB as HandleListGitTriggersError, b6 as HandleListPermissionsData, b8 as HandleListPermissionsError, b7 as HandleListPermissionsResponse, ax as HandleListRecordsData, az as HandleListRecordsError, ay as HandleListRecordsResponse, bt as HandleListRepositoriesData, bu as HandleListRepositoriesError, bP as HandleListWebDeploysData, bQ as HandleListWebDeploysError, bq as HandleRevokeGitTokenData, bs as HandleRevokeGitTokenError, br as HandleRevokeGitTokenResponse, be as HandleRevokePermissionData, bg as HandleRevokePermissionError, bf as HandleRevokePermissionResponse, bh as HandleUpdatePermissionData, bj as HandleUpdatePermissionError, bi as HandleUpdatePermissionResponse, aQ as HandleVerifyDomainData, aG as HandleVerifyWildcardData, aH as HandleVerifyWildcardError, al as InternalServerError, am as ListRecordsResponse, an as NetworkPermissionData, ao as RepositoryInfo, ap as RevokeGitTokenRequest, aq as UpdatePermissionRequest, ar as Visibility, af as action, aj as action2, ai as event, U as kind, S as type } from './types.gen-CIf3ciN7.js';
|
|
3
|
+
|
|
4
|
+
declare class FreestyleSandboxes {
|
|
5
|
+
private client;
|
|
6
|
+
constructor(options: {
|
|
7
|
+
/**
|
|
8
|
+
* The base URL for the API.
|
|
9
|
+
*/
|
|
10
|
+
baseUrl?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The API key to use for requests.
|
|
13
|
+
*/
|
|
14
|
+
apiKey: string;
|
|
15
|
+
/**
|
|
16
|
+
* Custom Headers to be sent with each request.
|
|
17
|
+
*/
|
|
18
|
+
headers?: Record<string, string>;
|
|
19
|
+
});
|
|
20
|
+
/**
|
|
21
|
+
* Execute a script in a sandbox.
|
|
22
|
+
*/
|
|
23
|
+
executeScript(script: string, config?: FreestyleExecuteScriptParamsConfiguration): Promise<FreestyleExecuteScriptResultSuccess>;
|
|
24
|
+
/**
|
|
25
|
+
* Deploy a Web project to a sandbox.
|
|
26
|
+
*/
|
|
27
|
+
deployWeb(source: DeploymentSource, config?: Omit<FreestyleDeployWebConfiguration, "build"> & {
|
|
28
|
+
build?: BuildOptions | (Omit<BuildOptions, "command"> & {
|
|
29
|
+
command: string | string[];
|
|
30
|
+
});
|
|
31
|
+
}): Promise<FreestyleDeployWebSuccessResponseV2>;
|
|
32
|
+
/**
|
|
33
|
+
* Deploy a Cloudstate project to a sandbox.
|
|
34
|
+
*/
|
|
35
|
+
deployCloudstate(body: FreestyleCloudstateDeployRequest): Promise<FreestyleCloudstateDeploySuccessResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* Get a backup of a Cloudstate project in a sandbox.
|
|
38
|
+
* @param id The ID of the Cloudstate project.
|
|
39
|
+
* @returns The backup of the Cloudstate project.
|
|
40
|
+
* @throws An error if the backup could not be retrieved.
|
|
41
|
+
*/
|
|
42
|
+
backupCloudstate(id: string): Promise<HandleBackupCloudstateResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* Get logs for an execute run, or web deployment.
|
|
45
|
+
* @param id The ID of the sandbox.
|
|
46
|
+
* @returns The logs for the sandbox.
|
|
47
|
+
* @throws An error if the logs could not be retrieved.
|
|
48
|
+
*/
|
|
49
|
+
getLogs(id: string): Promise<HandleGetLogsResponse>;
|
|
50
|
+
/**
|
|
51
|
+
* Create a a domain verification request.
|
|
52
|
+
* @param domain The domain to verify.
|
|
53
|
+
* @returns The domain verification token.
|
|
54
|
+
*/
|
|
55
|
+
createDomainVerificationRequest(domain: string): Promise<HandleCreateDomainVerificationResponse>;
|
|
56
|
+
/**
|
|
57
|
+
* Verify a domain. Note, this requires the domain verification token to be already set up.
|
|
58
|
+
* @param domain The domain to verify.
|
|
59
|
+
* @returns The domain verification request.
|
|
60
|
+
*/
|
|
61
|
+
verifyDomain(domain: string): Promise<HandleVerifyDomainResponse | HandleVerifyDomainError>;
|
|
62
|
+
listDomains(): Promise<HandleListDomainsResponse>;
|
|
63
|
+
listDomainVerificationRequests(): Promise<HandleListDomainVerificationRequestsResponse>;
|
|
64
|
+
deleteDomainVerificationRequest(domain: string, verificationCode: string): Promise<HandleDeleteDomainVerificationResponse>;
|
|
65
|
+
listWebDeployments(limit?: number, offset?: number): Promise<HandleListWebDeploysResponse>;
|
|
66
|
+
listExecuteRuns(limit?: number, offset?: number): Promise<HandleListExecuteRunsResponse>;
|
|
67
|
+
getExecuteRun(id: string): Promise<HandleGetExecuteRunResponse>;
|
|
68
|
+
/** Provision a wildcard certificate for domain. */
|
|
69
|
+
provisionWildcard(domain: string): Promise<HandleVerifyWildcardResponse>;
|
|
70
|
+
/**
|
|
71
|
+
* Create a new git repository.
|
|
72
|
+
*/
|
|
73
|
+
createGitRepository({ name, public: pub, source, }: {
|
|
74
|
+
name: string;
|
|
75
|
+
public?: boolean;
|
|
76
|
+
source?: {
|
|
77
|
+
type: "git";
|
|
78
|
+
url: string;
|
|
79
|
+
branch?: string;
|
|
80
|
+
depth?: number;
|
|
81
|
+
};
|
|
82
|
+
}): Promise<CreateRepositoryResponseSuccess>;
|
|
83
|
+
/**
|
|
84
|
+
* List git repositories.
|
|
85
|
+
*/
|
|
86
|
+
listGitRepositories({ limit, offset, }?: {
|
|
87
|
+
limit?: number;
|
|
88
|
+
offset?: number;
|
|
89
|
+
}): Promise<HandleListRepositoriesResponse>;
|
|
90
|
+
/**
|
|
91
|
+
* Delete a git repository.
|
|
92
|
+
*/
|
|
93
|
+
deleteGitRepository({ repoId, }: {
|
|
94
|
+
repoId: string;
|
|
95
|
+
}): Promise<HandleDeleteRepoResponse>;
|
|
96
|
+
/**
|
|
97
|
+
* Create a new git identity.
|
|
98
|
+
*/
|
|
99
|
+
createGitIdentity(): Promise<GitIdentity>;
|
|
100
|
+
/**
|
|
101
|
+
* Delete a git identity.
|
|
102
|
+
*/
|
|
103
|
+
deleteGitIdentity({ identityId, }: {
|
|
104
|
+
identityId: string;
|
|
105
|
+
}): Promise<HandleDeleteIdentityResponse>;
|
|
106
|
+
/**
|
|
107
|
+
* Grant a git identity access to a repository.
|
|
108
|
+
*/
|
|
109
|
+
grantGitPermission({ repoId, identityId, permission, }: {
|
|
110
|
+
repoId: string;
|
|
111
|
+
identityId: string;
|
|
112
|
+
permission: AccessLevel;
|
|
113
|
+
}): Promise<HandleGrantPermissionResponse>;
|
|
114
|
+
/**
|
|
115
|
+
* Update a git identity's permissions on a repository.
|
|
116
|
+
*/
|
|
117
|
+
updateGitPermission({ repoId, identityId, permission, }: {
|
|
118
|
+
repoId: string;
|
|
119
|
+
identityId: string;
|
|
120
|
+
permission: AccessLevel;
|
|
121
|
+
}): Promise<void>;
|
|
122
|
+
/**
|
|
123
|
+
* Revoke a git identity's access to a repository.
|
|
124
|
+
*/
|
|
125
|
+
revokeGitPermission({ repoId, identityId, }: {
|
|
126
|
+
repoId: string;
|
|
127
|
+
identityId: string;
|
|
128
|
+
}): Promise<void>;
|
|
129
|
+
/**
|
|
130
|
+
* List access permissions for a git identity.
|
|
131
|
+
*/
|
|
132
|
+
listGitPermissions({ identityId, }: {
|
|
133
|
+
identityId: string;
|
|
134
|
+
}): Promise<ListPermissionResponseSuccess>;
|
|
135
|
+
/**
|
|
136
|
+
* Get the permission of a git identity on a repository.
|
|
137
|
+
*/
|
|
138
|
+
getGitPermission({ repoId, identityId, }: {
|
|
139
|
+
repoId: string;
|
|
140
|
+
identityId: string;
|
|
141
|
+
}): Promise<DescribePermissionResponseSuccess>;
|
|
142
|
+
/**
|
|
143
|
+
* Create a new git access token for an identity.
|
|
144
|
+
*/
|
|
145
|
+
createGitAccessToken({ identityId, }: {
|
|
146
|
+
identityId: string;
|
|
147
|
+
}): Promise<CreatedToken>;
|
|
148
|
+
/**
|
|
149
|
+
* Revoke a git access token.
|
|
150
|
+
*/
|
|
151
|
+
revokeGitAccessToken({ identityId, tokenId, }: {
|
|
152
|
+
identityId: string;
|
|
153
|
+
tokenId: string;
|
|
154
|
+
}): Promise<void>;
|
|
155
|
+
/**
|
|
156
|
+
* List git access tokens for an identity.
|
|
157
|
+
*/
|
|
158
|
+
listGitAccessTokens({ identityId, }: {
|
|
159
|
+
identityId: string;
|
|
160
|
+
}): Promise<ListGitTokensResponseSuccess>;
|
|
161
|
+
/**
|
|
162
|
+
* List git triggers for a repository.
|
|
163
|
+
*/
|
|
164
|
+
listGitTriggers({ repoId, }: {
|
|
165
|
+
repoId: string;
|
|
166
|
+
}): Promise<HandleListGitTriggersResponse>;
|
|
167
|
+
/**
|
|
168
|
+
* Create a git trigger for a repository.
|
|
169
|
+
*/
|
|
170
|
+
createGitTrigger({ repoId, trigger, action, }: {
|
|
171
|
+
repoId: string;
|
|
172
|
+
trigger: GitTrigger;
|
|
173
|
+
action: GitTriggerAction;
|
|
174
|
+
}): Promise<HandleCreateGitTriggerResponse>;
|
|
175
|
+
/**
|
|
176
|
+
* Delete a git trigger.
|
|
177
|
+
*/
|
|
178
|
+
deleteGitTrigger({ triggerId }: {
|
|
179
|
+
triggerId: string;
|
|
180
|
+
}): Promise<void>;
|
|
181
|
+
/**
|
|
182
|
+
* Request a dev server for a repository. If a dev server is already running
|
|
183
|
+
* for that repository, it will return a url to that server. Dev servers are
|
|
184
|
+
* ephemeral so you should call this function every time you need a url. Do
|
|
185
|
+
* not store the url in your database!
|
|
186
|
+
*/
|
|
187
|
+
requestDevServer({ repoUrl }: {
|
|
188
|
+
repoUrl: string;
|
|
189
|
+
}): Promise<HandleEphemeralDevServerResponse>;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export { AccessLevel, BuildOptions, CreateRepositoryResponseSuccess, CreatedToken, DeploymentSource, DescribePermissionResponseSuccess, FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponseV2, FreestyleExecuteScriptParamsConfiguration, FreestyleExecuteScriptResultSuccess, FreestyleSandboxes, GitIdentity, GitTrigger, GitTriggerAction, HandleBackupCloudstateResponse, HandleCreateDomainVerificationResponse, HandleCreateGitTriggerResponse, HandleDeleteDomainVerificationResponse, HandleDeleteIdentityResponse, HandleDeleteRepoResponse, HandleEphemeralDevServerResponse, HandleGetExecuteRunResponse, HandleGetLogsResponse, HandleGrantPermissionResponse, HandleListDomainVerificationRequestsResponse, HandleListDomainsResponse, HandleListExecuteRunsResponse, HandleListGitTriggersResponse, HandleListRepositoriesResponse, HandleListWebDeploysResponse, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleVerifyWildcardResponse, ListGitTokensResponseSuccess, ListPermissionResponseSuccess };
|
package/dist/inde.d.mts
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, D as DeploymentSource, b as FreestyleDeployWebConfiguration, B as BuildOptions, c as FreestyleDeployWebSuccessResponseV2, 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, C as CreateRepositoryResponseSuccess, q as HandleListRepositoriesResponse, r as HandleDeleteRepoResponse, G as GitIdentity, s as HandleDeleteIdentityResponse, A as AccessLevel, t as HandleGrantPermissionResponse, L as ListPermissionResponseSuccess, u as DescribePermissionResponseSuccess, v as CreatedToken, w as ListGitTokensResponseSuccess, x as HandleListGitTriggersResponse, y as GitTrigger, z as GitTriggerAction, E as HandleCreateGitTriggerResponse, I as HandleEphemeralDevServerResponse } from './types.gen-CIf3ciN7.js';
|
|
2
|
+
export { K as AccessTokenInfo, J as AccessibleRepository, M as Behavior, N as CreateDomainMappingRequest, O as CreateRecordParams, P as CreateRepoRequest, R as CreateRepoSource, Q as CreateRepositoryRequest, T as DeploymentLogEntry, V as DeploymentState, W as DevServer, X as DnsRecord, Y as DnsRecordData, Z as DnsRecordKind, _ as DomainVerificationRequest, $ as ExecuteLogEntry, a0 as ExecuteRunInfo, a1 as ExecuteRunState, a2 as FreestyleCloudstateDeployConfiguration, a3 as FreestyleCloudstateDeployErrorResponse, a4 as FreestyleDeleteDomainVerificationRequest, a5 as FreestyleDeployWebErrorResponse, a6 as FreestyleDeployWebPayload, a7 as FreestyleDeployWebPayloadV2, a8 as FreestyleDomainVerificationRequest, a9 as FreestyleExecuteScriptParams, aa as FreestyleFile, ab as FreestyleGetLogsResponse, ac as FreestyleJavaScriptLog, ad as FreestyleLogResponseObject, ae as FreestyleNetworkPermission, ag as FreestyleVerifyDomainRequest, ah as GitRepositoryTrigger, ak as GrantPermissionRequest, av as HandleBackupCloudstateData, aw as HandleBackupCloudstateError, aR as HandleCreateDomainVerificationData, aS as HandleCreateDomainVerificationError, bn as HandleCreateGitTokenData, bp as HandleCreateGitTokenError, bo as HandleCreateGitTokenResponse, bC as HandleCreateGitTriggerData, bD as HandleCreateGitTriggerError, b3 as HandleCreateIdentityError, b2 as HandleCreateIdentityResponse, aA as HandleCreateRecordData, aC as HandleCreateRecordError, aB as HandleCreateRecordResponse, bv as HandleCreateRepoData, bx as HandleCreateRepoError, bw as HandleCreateRepoResponse, aM as HandleDeleteDomainMappingData, aO as HandleDeleteDomainMappingError, aN as HandleDeleteDomainMappingResponse, aT as HandleDeleteDomainVerificationData, aU as HandleDeleteDomainVerificationError, bE as HandleDeleteGitTriggerData, bG as HandleDeleteGitTriggerError, bF as HandleDeleteGitTriggerResponse, b4 as HandleDeleteIdentityData, b5 as HandleDeleteIdentityError, aD as HandleDeleteRecordData, aF as HandleDeleteRecordError, aE as HandleDeleteRecordResponse, by as HandleDeleteRepoData, bz as HandleDeleteRepoError, as as HandleDeployCloudstateData, au as HandleDeployCloudstateError, at as HandleDeployCloudstateResponse, bJ as HandleDeployWebData, bL as HandleDeployWebError, bK as HandleDeployWebResponse, bM as HandleDeployWebV2Data, bO as HandleDeployWebV2Error, bN as HandleDeployWebV2Response, b9 as HandleDescribePermissionData, bb as HandleDescribePermissionError, ba as HandleDescribePermissionResponse, aV as HandleEphemeralDevServerData, aW as HandleEphemeralDevServerError, a$ as HandleExecuteScriptData, b1 as HandleExecuteScriptError, b0 as HandleExecuteScriptResponse, aZ as HandleGetExecuteRunData, a_ as HandleGetExecuteRunError, bH as HandleGetLogsData, bI as HandleGetLogsError, bR as HandleGetWebDeployDetailsData, bc as HandleGrantPermissionData, bd as HandleGrantPermissionError, aJ as HandleInsertDomainMappingData, aL as HandleInsertDomainMappingError, aK as HandleInsertDomainMappingResponse, aP as HandleListDomainVerificationRequestsError, aI as HandleListDomainsError, aX as HandleListExecuteRunsData, aY as HandleListExecuteRunsError, bk as HandleListGitTokensData, bm as HandleListGitTokensError, bl as HandleListGitTokensResponse, bA as HandleListGitTriggersData, bB as HandleListGitTriggersError, b6 as HandleListPermissionsData, b8 as HandleListPermissionsError, b7 as HandleListPermissionsResponse, ax as HandleListRecordsData, az as HandleListRecordsError, ay as HandleListRecordsResponse, bt as HandleListRepositoriesData, bu as HandleListRepositoriesError, bP as HandleListWebDeploysData, bQ as HandleListWebDeploysError, bq as HandleRevokeGitTokenData, bs as HandleRevokeGitTokenError, br as HandleRevokeGitTokenResponse, be as HandleRevokePermissionData, bg as HandleRevokePermissionError, bf as HandleRevokePermissionResponse, bh as HandleUpdatePermissionData, bj as HandleUpdatePermissionError, bi as HandleUpdatePermissionResponse, aQ as HandleVerifyDomainData, aG as HandleVerifyWildcardData, aH as HandleVerifyWildcardError, al as InternalServerError, am as ListRecordsResponse, an as NetworkPermissionData, ao as RepositoryInfo, ap as RevokeGitTokenRequest, aq as UpdatePermissionRequest, ar as Visibility, af as action, aj as action2, ai as event, U as kind, S as type } from './types.gen-CIf3ciN7.js';
|
|
3
|
+
|
|
4
|
+
declare class FreestyleSandboxes {
|
|
5
|
+
private client;
|
|
6
|
+
constructor(options: {
|
|
7
|
+
/**
|
|
8
|
+
* The base URL for the API.
|
|
9
|
+
*/
|
|
10
|
+
baseUrl?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The API key to use for requests.
|
|
13
|
+
*/
|
|
14
|
+
apiKey: string;
|
|
15
|
+
/**
|
|
16
|
+
* Custom Headers to be sent with each request.
|
|
17
|
+
*/
|
|
18
|
+
headers?: Record<string, string>;
|
|
19
|
+
});
|
|
20
|
+
/**
|
|
21
|
+
* Execute a script in a sandbox.
|
|
22
|
+
*/
|
|
23
|
+
executeScript(script: string, config?: FreestyleExecuteScriptParamsConfiguration): Promise<FreestyleExecuteScriptResultSuccess>;
|
|
24
|
+
/**
|
|
25
|
+
* Deploy a Web project to a sandbox.
|
|
26
|
+
*/
|
|
27
|
+
deployWeb(source: DeploymentSource, config?: Omit<FreestyleDeployWebConfiguration, "build"> & {
|
|
28
|
+
build?: BuildOptions | (Omit<BuildOptions, "command"> & {
|
|
29
|
+
command: string | string[];
|
|
30
|
+
});
|
|
31
|
+
}): Promise<FreestyleDeployWebSuccessResponseV2>;
|
|
32
|
+
/**
|
|
33
|
+
* Deploy a Cloudstate project to a sandbox.
|
|
34
|
+
*/
|
|
35
|
+
deployCloudstate(body: FreestyleCloudstateDeployRequest): Promise<FreestyleCloudstateDeploySuccessResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* Get a backup of a Cloudstate project in a sandbox.
|
|
38
|
+
* @param id The ID of the Cloudstate project.
|
|
39
|
+
* @returns The backup of the Cloudstate project.
|
|
40
|
+
* @throws An error if the backup could not be retrieved.
|
|
41
|
+
*/
|
|
42
|
+
backupCloudstate(id: string): Promise<HandleBackupCloudstateResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* Get logs for an execute run, or web deployment.
|
|
45
|
+
* @param id The ID of the sandbox.
|
|
46
|
+
* @returns The logs for the sandbox.
|
|
47
|
+
* @throws An error if the logs could not be retrieved.
|
|
48
|
+
*/
|
|
49
|
+
getLogs(id: string): Promise<HandleGetLogsResponse>;
|
|
50
|
+
/**
|
|
51
|
+
* Create a a domain verification request.
|
|
52
|
+
* @param domain The domain to verify.
|
|
53
|
+
* @returns The domain verification token.
|
|
54
|
+
*/
|
|
55
|
+
createDomainVerificationRequest(domain: string): Promise<HandleCreateDomainVerificationResponse>;
|
|
56
|
+
/**
|
|
57
|
+
* Verify a domain. Note, this requires the domain verification token to be already set up.
|
|
58
|
+
* @param domain The domain to verify.
|
|
59
|
+
* @returns The domain verification request.
|
|
60
|
+
*/
|
|
61
|
+
verifyDomain(domain: string): Promise<HandleVerifyDomainResponse | HandleVerifyDomainError>;
|
|
62
|
+
listDomains(): Promise<HandleListDomainsResponse>;
|
|
63
|
+
listDomainVerificationRequests(): Promise<HandleListDomainVerificationRequestsResponse>;
|
|
64
|
+
deleteDomainVerificationRequest(domain: string, verificationCode: string): Promise<HandleDeleteDomainVerificationResponse>;
|
|
65
|
+
listWebDeployments(limit?: number, offset?: number): Promise<HandleListWebDeploysResponse>;
|
|
66
|
+
listExecuteRuns(limit?: number, offset?: number): Promise<HandleListExecuteRunsResponse>;
|
|
67
|
+
getExecuteRun(id: string): Promise<HandleGetExecuteRunResponse>;
|
|
68
|
+
/** Provision a wildcard certificate for domain. */
|
|
69
|
+
provisionWildcard(domain: string): Promise<HandleVerifyWildcardResponse>;
|
|
70
|
+
/**
|
|
71
|
+
* Create a new git repository.
|
|
72
|
+
*/
|
|
73
|
+
createGitRepository({ name, public: pub, source, }: {
|
|
74
|
+
name: string;
|
|
75
|
+
public?: boolean;
|
|
76
|
+
source?: {
|
|
77
|
+
type: "git";
|
|
78
|
+
url: string;
|
|
79
|
+
branch?: string;
|
|
80
|
+
depth?: number;
|
|
81
|
+
};
|
|
82
|
+
}): Promise<CreateRepositoryResponseSuccess>;
|
|
83
|
+
/**
|
|
84
|
+
* List git repositories.
|
|
85
|
+
*/
|
|
86
|
+
listGitRepositories({ limit, offset, }?: {
|
|
87
|
+
limit?: number;
|
|
88
|
+
offset?: number;
|
|
89
|
+
}): Promise<HandleListRepositoriesResponse>;
|
|
90
|
+
/**
|
|
91
|
+
* Delete a git repository.
|
|
92
|
+
*/
|
|
93
|
+
deleteGitRepository({ repoId, }: {
|
|
94
|
+
repoId: string;
|
|
95
|
+
}): Promise<HandleDeleteRepoResponse>;
|
|
96
|
+
/**
|
|
97
|
+
* Create a new git identity.
|
|
98
|
+
*/
|
|
99
|
+
createGitIdentity(): Promise<GitIdentity>;
|
|
100
|
+
/**
|
|
101
|
+
* Delete a git identity.
|
|
102
|
+
*/
|
|
103
|
+
deleteGitIdentity({ identityId, }: {
|
|
104
|
+
identityId: string;
|
|
105
|
+
}): Promise<HandleDeleteIdentityResponse>;
|
|
106
|
+
/**
|
|
107
|
+
* Grant a git identity access to a repository.
|
|
108
|
+
*/
|
|
109
|
+
grantGitPermission({ repoId, identityId, permission, }: {
|
|
110
|
+
repoId: string;
|
|
111
|
+
identityId: string;
|
|
112
|
+
permission: AccessLevel;
|
|
113
|
+
}): Promise<HandleGrantPermissionResponse>;
|
|
114
|
+
/**
|
|
115
|
+
* Update a git identity's permissions on a repository.
|
|
116
|
+
*/
|
|
117
|
+
updateGitPermission({ repoId, identityId, permission, }: {
|
|
118
|
+
repoId: string;
|
|
119
|
+
identityId: string;
|
|
120
|
+
permission: AccessLevel;
|
|
121
|
+
}): Promise<void>;
|
|
122
|
+
/**
|
|
123
|
+
* Revoke a git identity's access to a repository.
|
|
124
|
+
*/
|
|
125
|
+
revokeGitPermission({ repoId, identityId, }: {
|
|
126
|
+
repoId: string;
|
|
127
|
+
identityId: string;
|
|
128
|
+
}): Promise<void>;
|
|
129
|
+
/**
|
|
130
|
+
* List access permissions for a git identity.
|
|
131
|
+
*/
|
|
132
|
+
listGitPermissions({ identityId, }: {
|
|
133
|
+
identityId: string;
|
|
134
|
+
}): Promise<ListPermissionResponseSuccess>;
|
|
135
|
+
/**
|
|
136
|
+
* Get the permission of a git identity on a repository.
|
|
137
|
+
*/
|
|
138
|
+
getGitPermission({ repoId, identityId, }: {
|
|
139
|
+
repoId: string;
|
|
140
|
+
identityId: string;
|
|
141
|
+
}): Promise<DescribePermissionResponseSuccess>;
|
|
142
|
+
/**
|
|
143
|
+
* Create a new git access token for an identity.
|
|
144
|
+
*/
|
|
145
|
+
createGitAccessToken({ identityId, }: {
|
|
146
|
+
identityId: string;
|
|
147
|
+
}): Promise<CreatedToken>;
|
|
148
|
+
/**
|
|
149
|
+
* Revoke a git access token.
|
|
150
|
+
*/
|
|
151
|
+
revokeGitAccessToken({ identityId, tokenId, }: {
|
|
152
|
+
identityId: string;
|
|
153
|
+
tokenId: string;
|
|
154
|
+
}): Promise<void>;
|
|
155
|
+
/**
|
|
156
|
+
* List git access tokens for an identity.
|
|
157
|
+
*/
|
|
158
|
+
listGitAccessTokens({ identityId, }: {
|
|
159
|
+
identityId: string;
|
|
160
|
+
}): Promise<ListGitTokensResponseSuccess>;
|
|
161
|
+
/**
|
|
162
|
+
* List git triggers for a repository.
|
|
163
|
+
*/
|
|
164
|
+
listGitTriggers({ repoId, }: {
|
|
165
|
+
repoId: string;
|
|
166
|
+
}): Promise<HandleListGitTriggersResponse>;
|
|
167
|
+
/**
|
|
168
|
+
* Create a git trigger for a repository.
|
|
169
|
+
*/
|
|
170
|
+
createGitTrigger({ repoId, trigger, action, }: {
|
|
171
|
+
repoId: string;
|
|
172
|
+
trigger: GitTrigger;
|
|
173
|
+
action: GitTriggerAction;
|
|
174
|
+
}): Promise<HandleCreateGitTriggerResponse>;
|
|
175
|
+
/**
|
|
176
|
+
* Delete a git trigger.
|
|
177
|
+
*/
|
|
178
|
+
deleteGitTrigger({ triggerId }: {
|
|
179
|
+
triggerId: string;
|
|
180
|
+
}): Promise<void>;
|
|
181
|
+
/**
|
|
182
|
+
* Request a dev server for a repository. If a dev server is already running
|
|
183
|
+
* for that repository, it will return a url to that server. Dev servers are
|
|
184
|
+
* ephemeral so you should call this function every time you need a url. Do
|
|
185
|
+
* not store the url in your database!
|
|
186
|
+
*/
|
|
187
|
+
requestDevServer({ repoUrl }: {
|
|
188
|
+
repoUrl: string;
|
|
189
|
+
}): Promise<HandleEphemeralDevServerResponse>;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export { AccessLevel, BuildOptions, CreateRepositoryResponseSuccess, CreatedToken, DeploymentSource, DescribePermissionResponseSuccess, FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponseV2, FreestyleExecuteScriptParamsConfiguration, FreestyleExecuteScriptResultSuccess, FreestyleSandboxes, GitIdentity, GitTrigger, GitTriggerAction, HandleBackupCloudstateResponse, HandleCreateDomainVerificationResponse, HandleCreateGitTriggerResponse, HandleDeleteDomainVerificationResponse, HandleDeleteIdentityResponse, HandleDeleteRepoResponse, HandleEphemeralDevServerResponse, HandleGetExecuteRunResponse, HandleGetLogsResponse, HandleGrantPermissionResponse, HandleListDomainVerificationRequestsResponse, HandleListDomainsResponse, HandleListExecuteRunsResponse, HandleListGitTriggersResponse, HandleListRepositoriesResponse, HandleListWebDeploysResponse, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleVerifyWildcardResponse, ListGitTokensResponseSuccess, ListPermissionResponseSuccess };
|
|
@@ -3169,12 +3169,11 @@ const executeTool = (config) => {
|
|
|
3169
3169
|
return tool({
|
|
3170
3170
|
description: executeCodeDescription(envVars, nodeModules),
|
|
3171
3171
|
parameters: executeCodeSchema,
|
|
3172
|
-
execute: async ({ script, ...otherParams }
|
|
3172
|
+
execute: async ({ script, ...otherParams }) => {
|
|
3173
3173
|
try {
|
|
3174
3174
|
const res = await api.executeScript(script, config);
|
|
3175
3175
|
if (config.onResult) {
|
|
3176
3176
|
await config.onResult({
|
|
3177
|
-
toolCallId,
|
|
3178
3177
|
result: res,
|
|
3179
3178
|
input: {
|
|
3180
3179
|
script,
|
|
@@ -3217,13 +3216,10 @@ ${nodeModules.length > 0 ? `You can use the following node modules: ${nodeModule
|
|
|
3217
3216
|
`)
|
|
3218
3217
|
}),
|
|
3219
3218
|
execute: async ({ files }) => {
|
|
3220
|
-
const new_files = Object.keys(files).reduce(
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
},
|
|
3225
|
-
{}
|
|
3226
|
-
);
|
|
3219
|
+
const new_files = Object.keys(files).reduce((acc, key) => {
|
|
3220
|
+
acc[key] = { content: files[key] };
|
|
3221
|
+
return acc;
|
|
3222
|
+
}, {});
|
|
3227
3223
|
try {
|
|
3228
3224
|
const res = await api.deployWeb(
|
|
3229
3225
|
{
|