freestyle-sandboxes 0.0.26 → 0.0.27
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 +1 -1
- package/dist/ai/index.d.mts +1 -1
- package/dist/index.cjs +309 -58
- package/dist/index.d.cts +73 -8
- package/dist/index.d.mts +73 -8
- package/dist/index.mjs +309 -58
- package/dist/langgraph/index.d.cts +1 -1
- package/dist/langgraph/index.d.mts +1 -1
- package/dist/mastra/index.d.cts +1 -1
- package/dist/mastra/index.d.mts +1 -1
- package/dist/types.gen-BzRtj_TA.d.ts +725 -0
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/openapi/sdk.gen.ts +203 -9
- package/openapi/types.gen.ts +440 -20
- package/openapi.json +1 -1
- package/package.json +1 -1
- package/src/index.ts +397 -91
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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, C as
|
|
2
|
-
export { B as Behavior,
|
|
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, C as CreateRepositoryResponseSuccess, q as HandleListRepositoriesResponse, r as HandleDeleteRepoResponse, G as GitIdentity, s as HandleDeleteIdentityResponse, A as AccessLevel, t as HandleGrantPermissionResponse, L as ListPermissionResponseSuccess, D as DescribePermissionResponseSuccess, u as CreatedToken, v as ListGitTokensResponseSuccess } from './types.gen-BzRtj_TA.js';
|
|
2
|
+
export { x as AccessTokenInfo, w as AccessibleRepository, B as Behavior, y as CreateDomainMappingRequest, z as CreateRepositoryRequest, E as DeploymentLogEntry, I as DeploymentState, J as DnsRecord, K as DnsRecordKind, M as DomainVerificationRequest, N as ExecuteLogEntry, O as ExecuteRunInfo, P as ExecuteRunState, Q as FreestyleCloudstateDeployConfiguration, R as FreestyleCloudstateDeployErrorResponse, S as FreestyleDeleteDomainVerificationRequest, T as FreestyleDeployWebErrorResponse, U as FreestyleDeployWebPayload, V as FreestyleDomainVerificationRequest, W as FreestyleExecuteScriptParams, X as FreestyleFile, Y as FreestyleGetLogsResponse, Z as FreestyleJavaScriptLog, _ as FreestyleLogResponseObject, $ as FreestyleNetworkPermission, a1 as FreestyleVerifyDomainRequest, a2 as GitRepositoryTrigger, a5 as GitTrigger, a6 as GitTriggerAction, a7 as GrantPermissionRequest, ah as HandleBackupCloudstateData, ai as HandleBackupCloudstateError, aD as HandleCreateDomainVerificationData, aE as HandleCreateDomainVerificationError, b7 as HandleCreateGitTokenData, b9 as HandleCreateGitTokenError, b8 as HandleCreateGitTokenResponse, bn as HandleCreateGitTriggerData, bp as HandleCreateGitTriggerError, bo as HandleCreateGitTriggerResponse, aP as HandleCreateIdentityError, aO as HandleCreateIdentityResponse, am as HandleCreateRecordData, ao as HandleCreateRecordError, an as HandleCreateRecordResponse, bf as HandleCreateRepoData, bh as HandleCreateRepoError, bg as HandleCreateRepoResponse, ay as HandleDeleteDomainMappingData, aA as HandleDeleteDomainMappingError, az as HandleDeleteDomainMappingResponse, aF as HandleDeleteDomainVerificationData, aG as HandleDeleteDomainVerificationError, bq as HandleDeleteGitTriggerData, bs as HandleDeleteGitTriggerError, br as HandleDeleteGitTriggerResponse, aQ as HandleDeleteIdentityData, aR as HandleDeleteIdentityError, ap as HandleDeleteRecordData, ar as HandleDeleteRecordError, aq as HandleDeleteRecordResponse, bi as HandleDeleteRepoData, bj as HandleDeleteRepoError, ae as HandleDeployCloudstateData, ag as HandleDeployCloudstateError, af as HandleDeployCloudstateResponse, bv as HandleDeployWebData, bx as HandleDeployWebError, bw as HandleDeployWebResponse, aV as HandleDescribePermissionData, aX as HandleDescribePermissionError, aW as HandleDescribePermissionResponse, aL as HandleExecuteScriptData, aN as HandleExecuteScriptError, aM as HandleExecuteScriptResponse, aJ as HandleGetExecuteRunData, aK as HandleGetExecuteRunError, bt as HandleGetLogsData, bu as HandleGetLogsError, bA as HandleGetWebDeployDetailsData, aY as HandleGrantPermissionData, aZ as HandleGrantPermissionError, av as HandleInsertDomainMappingData, ax as HandleInsertDomainMappingError, aw as HandleInsertDomainMappingResponse, aB as HandleListDomainVerificationRequestsError, au as HandleListDomainsError, aH as HandleListExecuteRunsData, aI as HandleListExecuteRunsError, b4 as HandleListGitTokensData, b6 as HandleListGitTokensError, b5 as HandleListGitTokensResponse, bk as HandleListGitTriggersData, bm as HandleListGitTriggersError, bl as HandleListGitTriggersResponse, aS as HandleListPermissionsData, aU as HandleListPermissionsError, aT as HandleListPermissionsResponse, aj as HandleListRecordsData, al as HandleListRecordsError, ak as HandleListRecordsResponse, bd as HandleListRepositoriesData, be as HandleListRepositoriesError, by as HandleListWebDeploysData, bz as HandleListWebDeploysError, ba as HandleRevokeGitTokenData, bc as HandleRevokeGitTokenError, bb as HandleRevokeGitTokenResponse, a_ as HandleRevokePermissionData, b0 as HandleRevokePermissionError, a$ as HandleRevokePermissionResponse, b1 as HandleUpdatePermissionData, b3 as HandleUpdatePermissionError, b2 as HandleUpdatePermissionResponse, aC as HandleVerifyDomainData, as as HandleVerifyWildcardData, at as HandleVerifyWildcardError, a8 as ListRecordsResponse, a9 as NetworkPermissionData, aa as RepositoryInfo, ab as RevokeGitTokenRequest, ac as UpdatePermissionRequest, ad as Visibility, a0 as action, a4 as action2, a3 as event } from './types.gen-BzRtj_TA.js';
|
|
3
3
|
|
|
4
4
|
declare class FreestyleSandboxes {
|
|
5
5
|
private client;
|
|
@@ -64,27 +64,92 @@ declare class FreestyleSandboxes {
|
|
|
64
64
|
listWebDeployments(limit?: number, offset?: number): Promise<HandleListWebDeploysResponse>;
|
|
65
65
|
listExecuteRuns(limit?: number, offset?: number): Promise<HandleListExecuteRunsResponse>;
|
|
66
66
|
getExecuteRun(id: string): Promise<HandleGetExecuteRunResponse>;
|
|
67
|
+
/** Provision a wildcard certificate for domain. */
|
|
68
|
+
provisionWildcard(domain: string): Promise<HandleVerifyWildcardResponse>;
|
|
67
69
|
/**
|
|
68
70
|
* Create a new git repository.
|
|
69
71
|
*
|
|
70
72
|
* @param name The name of the repository.
|
|
71
73
|
*/
|
|
72
|
-
createGitRepository(name: string): Promise<
|
|
74
|
+
createGitRepository(name: string): Promise<CreateRepositoryResponseSuccess>;
|
|
73
75
|
/**
|
|
74
76
|
* List git repositories.
|
|
75
77
|
*
|
|
76
78
|
* @param limit The maximum number of repositories to return. Defaults to 10.
|
|
77
79
|
* @param offset The offset to start at. Defaults to 0.
|
|
78
80
|
*/
|
|
79
|
-
listGitRepositories(limit?: number, offset?: number): Promise<
|
|
81
|
+
listGitRepositories(limit?: number, offset?: number): Promise<HandleListRepositoriesResponse>;
|
|
80
82
|
/**
|
|
81
83
|
* Delete a git repository.
|
|
82
84
|
*
|
|
83
85
|
* @param repositoryId The ID of the repository to delete.
|
|
84
86
|
*/
|
|
85
|
-
deleteGitRepository(repositoryId: string): Promise<
|
|
86
|
-
/**
|
|
87
|
-
|
|
87
|
+
deleteGitRepository(repositoryId: string): Promise<HandleDeleteRepoResponse>;
|
|
88
|
+
/**
|
|
89
|
+
* Create a new git identity.
|
|
90
|
+
*/
|
|
91
|
+
createGitIdentity(): Promise<GitIdentity>;
|
|
92
|
+
/**
|
|
93
|
+
* Delete a git identity.
|
|
94
|
+
*
|
|
95
|
+
* @param identityId The ID of the identity to delete.
|
|
96
|
+
*/
|
|
97
|
+
deleteGitIdentity(identityId: string): Promise<HandleDeleteIdentityResponse>;
|
|
98
|
+
/**
|
|
99
|
+
* Grant a git identity access to a repository.
|
|
100
|
+
*
|
|
101
|
+
* @param repoId The ID of the repository to grant access to.
|
|
102
|
+
* @param identityId The ID of the identity grant access to `repoId`.
|
|
103
|
+
* @param permission The permission to grant.
|
|
104
|
+
*/
|
|
105
|
+
grantGitPermission(repoId: string, identityId: string, permission: AccessLevel): Promise<HandleGrantPermissionResponse>;
|
|
106
|
+
/**
|
|
107
|
+
* Update a git identity's permissions on a repository.
|
|
108
|
+
*
|
|
109
|
+
* @param repoId The ID of the repository to update permissions for.
|
|
110
|
+
* @param identityId The ID of the identity to whose access to update.
|
|
111
|
+
* @param permission The permission to grant.
|
|
112
|
+
*/
|
|
113
|
+
updateGitPermission(repoId: string, identityId: string, permission: AccessLevel): Promise<void>;
|
|
114
|
+
/**
|
|
115
|
+
* Revoke a git identity's access to a repository.
|
|
116
|
+
*
|
|
117
|
+
* @param repoId The ID of the repository revoke access to.
|
|
118
|
+
* @param identityId The ID of the identity to revoke access from.
|
|
119
|
+
*/
|
|
120
|
+
revokeGitPermission(repoId: string, identityId: string): Promise<void>;
|
|
121
|
+
/**
|
|
122
|
+
* List access permissions for a git identity.
|
|
123
|
+
*
|
|
124
|
+
* @param identityId The ID of the identity to list permissions for.
|
|
125
|
+
*/
|
|
126
|
+
listGitPermissions(identityId: string): Promise<ListPermissionResponseSuccess>;
|
|
127
|
+
/**
|
|
128
|
+
* Get the permission of a git identity on a repository.
|
|
129
|
+
*
|
|
130
|
+
* @param repoId The ID of the repository to check permissions for.
|
|
131
|
+
* @param identityId The ID of the identity to check permissions for.
|
|
132
|
+
*/
|
|
133
|
+
getGitPermission(repoId: string, identityId: string): Promise<DescribePermissionResponseSuccess>;
|
|
134
|
+
/**
|
|
135
|
+
* Create a new git access token for an identity.
|
|
136
|
+
*
|
|
137
|
+
* @param identityId The ID of the identity to create the token for.
|
|
138
|
+
*/
|
|
139
|
+
createGitAccessToken(identityId: string): Promise<CreatedToken>;
|
|
140
|
+
/**
|
|
141
|
+
* Revoke a git access token.
|
|
142
|
+
*
|
|
143
|
+
* @param identityId The ID of the identity the token belongs to.
|
|
144
|
+
* @param tokenId The ID of the token to revoke.
|
|
145
|
+
*/
|
|
146
|
+
revokeGitAccessToken(identityId: string, tokenId: string): Promise<void>;
|
|
147
|
+
/**
|
|
148
|
+
* List git access tokens for an identity.
|
|
149
|
+
*
|
|
150
|
+
* @param identityId The ID of the identity to list tokens for.
|
|
151
|
+
*/
|
|
152
|
+
listGitAccessTokens(identityId: string): Promise<ListGitTokensResponseSuccess>;
|
|
88
153
|
}
|
|
89
154
|
|
|
90
|
-
export {
|
|
155
|
+
export { AccessLevel, CreateRepositoryResponseSuccess, CreatedToken, DescribePermissionResponseSuccess, FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponse, FreestyleExecuteScriptParamsConfiguration, FreestyleExecuteScriptResultSuccess, FreestyleSandboxes, GitIdentity, HandleBackupCloudstateResponse, HandleCreateDomainVerificationResponse, HandleDeleteDomainVerificationResponse, HandleDeleteIdentityResponse, HandleDeleteRepoResponse, HandleGetExecuteRunResponse, HandleGetLogsResponse, HandleGrantPermissionResponse, HandleListDomainVerificationRequestsResponse, HandleListDomainsResponse, HandleListExecuteRunsResponse, HandleListRepositoriesResponse, HandleListWebDeploysResponse, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleVerifyWildcardResponse, ListGitTokensResponseSuccess, ListPermissionResponseSuccess };
|
package/dist/index.mjs
CHANGED
|
@@ -67,19 +67,79 @@ const handleExecuteScript = (options) => {
|
|
|
67
67
|
url: "/execute/v1/script"
|
|
68
68
|
});
|
|
69
69
|
};
|
|
70
|
-
const
|
|
70
|
+
const handleCreateIdentity = (options) => {
|
|
71
|
+
return (options?.client ?? client).post({
|
|
72
|
+
...options,
|
|
73
|
+
url: "/git/v1/identity"
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
const handleDeleteIdentity = (options) => {
|
|
77
|
+
return (options?.client ?? client).delete({
|
|
78
|
+
...options,
|
|
79
|
+
url: "/git/v1/identity/{identity}"
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
const handleListPermissions = (options) => {
|
|
83
|
+
return (options?.client ?? client).get({
|
|
84
|
+
...options,
|
|
85
|
+
url: "/git/v1/identity/{identity}/permissions"
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
const handleDescribePermission = (options) => {
|
|
89
|
+
return (options?.client ?? client).get({
|
|
90
|
+
...options,
|
|
91
|
+
url: "/git/v1/identity/{identity}/permissions/{repo}"
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
const handleGrantPermission = (options) => {
|
|
95
|
+
return (options?.client ?? client).post({
|
|
96
|
+
...options,
|
|
97
|
+
url: "/git/v1/identity/{identity}/permissions/{repo}"
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
const handleRevokePermission = (options) => {
|
|
101
|
+
return (options?.client ?? client).delete({
|
|
102
|
+
...options,
|
|
103
|
+
url: "/git/v1/identity/{identity}/permissions/{repo}"
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
const handleUpdatePermission = (options) => {
|
|
107
|
+
return (options?.client ?? client).patch({
|
|
108
|
+
...options,
|
|
109
|
+
url: "/git/v1/identity/{identity}/permissions/{repo}"
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
const handleListGitTokens = (options) => {
|
|
113
|
+
return (options?.client ?? client).get({
|
|
114
|
+
...options,
|
|
115
|
+
url: "/git/v1/identity/{identity}/tokens"
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
const handleCreateGitToken = (options) => {
|
|
119
|
+
return (options?.client ?? client).post({
|
|
120
|
+
...options,
|
|
121
|
+
url: "/git/v1/identity/{identity}/tokens"
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
const handleRevokeGitToken = (options) => {
|
|
125
|
+
return (options?.client ?? client).delete({
|
|
126
|
+
...options,
|
|
127
|
+
url: "/git/v1/identity/{identity}/tokens"
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
const handleListRepositories = (options) => {
|
|
71
131
|
return (options?.client ?? client).get({
|
|
72
132
|
...options,
|
|
73
133
|
url: "/git/v1/repo"
|
|
74
134
|
});
|
|
75
135
|
};
|
|
76
|
-
const
|
|
136
|
+
const handleCreateRepo = (options) => {
|
|
77
137
|
return (options?.client ?? client).post({
|
|
78
138
|
...options,
|
|
79
139
|
url: "/git/v1/repo"
|
|
80
140
|
});
|
|
81
141
|
};
|
|
82
|
-
const
|
|
142
|
+
const handleDeleteRepo = (options) => {
|
|
83
143
|
return (options?.client ?? client).delete({
|
|
84
144
|
...options,
|
|
85
145
|
url: "/git/v1/repo/{repo}"
|
|
@@ -128,19 +188,18 @@ class FreestyleSandboxes {
|
|
|
128
188
|
});
|
|
129
189
|
if (response.data) {
|
|
130
190
|
return response.data;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
191
|
+
}
|
|
192
|
+
throw new Error(
|
|
193
|
+
`Failed to execute script:
|
|
134
194
|
|
|
135
195
|
${script}
|
|
136
196
|
|
|
137
197
|
Error:
|
|
138
198
|
|
|
139
199
|
${JSON.stringify(
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
200
|
+
response
|
|
201
|
+
)}`
|
|
202
|
+
);
|
|
144
203
|
}
|
|
145
204
|
/**
|
|
146
205
|
* Deploy a Web project to a sandbox.
|
|
@@ -155,15 +214,14 @@ ${JSON.stringify(
|
|
|
155
214
|
});
|
|
156
215
|
if (response.data) {
|
|
157
216
|
return response.data;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
|
|
217
|
+
}
|
|
218
|
+
throw new Error(
|
|
219
|
+
`Failed to deploy web project
|
|
161
220
|
|
|
162
221
|
Status: ${response.response.status}
|
|
163
222
|
|
|
164
223
|
Message: ${response.error?.message}`
|
|
165
|
-
|
|
166
|
-
}
|
|
224
|
+
);
|
|
167
225
|
}
|
|
168
226
|
/**
|
|
169
227
|
* Deploy a Cloudstate project to a sandbox.
|
|
@@ -175,9 +233,8 @@ Message: ${response.error?.message}`
|
|
|
175
233
|
});
|
|
176
234
|
if (response.data) {
|
|
177
235
|
return response.data;
|
|
178
|
-
} else {
|
|
179
|
-
throw new Error("Failed to deploy Cloudstate project");
|
|
180
236
|
}
|
|
237
|
+
throw new Error("Failed to deploy Cloudstate project");
|
|
181
238
|
}
|
|
182
239
|
/**
|
|
183
240
|
* Get a backup of a Cloudstate project in a sandbox.
|
|
@@ -194,9 +251,8 @@ Message: ${response.error?.message}`
|
|
|
194
251
|
});
|
|
195
252
|
if (response.data) {
|
|
196
253
|
return response.data;
|
|
197
|
-
} else {
|
|
198
|
-
throw new Error("Failed to get backup of Cloudstate project");
|
|
199
254
|
}
|
|
255
|
+
throw new Error("Failed to get backup of Cloudstate project");
|
|
200
256
|
}
|
|
201
257
|
/**
|
|
202
258
|
* Get logs for an execute run, or web deployment.
|
|
@@ -216,9 +272,8 @@ Message: ${response.error?.message}`
|
|
|
216
272
|
});
|
|
217
273
|
if (response.data) {
|
|
218
274
|
return response.data;
|
|
219
|
-
} else {
|
|
220
|
-
throw new Error("Failed to get logs for sandbox");
|
|
221
275
|
}
|
|
276
|
+
throw new Error("Failed to get logs for sandbox");
|
|
222
277
|
}
|
|
223
278
|
/**
|
|
224
279
|
* Create a a domain verification request.
|
|
@@ -234,9 +289,8 @@ Message: ${response.error?.message}`
|
|
|
234
289
|
});
|
|
235
290
|
if (response.data) {
|
|
236
291
|
return response.data;
|
|
237
|
-
} else {
|
|
238
|
-
throw new Error(response.error.message);
|
|
239
292
|
}
|
|
293
|
+
throw new Error(response.error.message);
|
|
240
294
|
}
|
|
241
295
|
/**
|
|
242
296
|
* Verify a domain. Note, this requires the domain verification token to be already set up.
|
|
@@ -252,11 +306,10 @@ Message: ${response.error?.message}`
|
|
|
252
306
|
});
|
|
253
307
|
if (response.data) {
|
|
254
308
|
return response.data;
|
|
255
|
-
} else {
|
|
256
|
-
throw new Error(
|
|
257
|
-
`Failed to verify domain ${domain}: ${response.error.message}`
|
|
258
|
-
);
|
|
259
309
|
}
|
|
310
|
+
throw new Error(
|
|
311
|
+
`Failed to verify domain ${domain}: ${response.error.message}`
|
|
312
|
+
);
|
|
260
313
|
}
|
|
261
314
|
async listDomains() {
|
|
262
315
|
const response = await handleListDomains({
|
|
@@ -264,9 +317,9 @@ Message: ${response.error?.message}`
|
|
|
264
317
|
});
|
|
265
318
|
if (response.data) {
|
|
266
319
|
return response.data;
|
|
267
|
-
} else {
|
|
268
|
-
throw new Error("Failed to list domains\n" + response.error.message);
|
|
269
320
|
}
|
|
321
|
+
throw new Error(`Failed to list domains
|
|
322
|
+
${response.error.message}`);
|
|
270
323
|
}
|
|
271
324
|
async listDomainVerificationRequests() {
|
|
272
325
|
const response = await handleListDomainVerificationRequests(
|
|
@@ -276,11 +329,11 @@ Message: ${response.error?.message}`
|
|
|
276
329
|
);
|
|
277
330
|
if (response.data) {
|
|
278
331
|
return response.data;
|
|
279
|
-
} else {
|
|
280
|
-
throw new Error(
|
|
281
|
-
"Failed to list domain verification requests\n" + response.error.message
|
|
282
|
-
);
|
|
283
332
|
}
|
|
333
|
+
throw new Error(
|
|
334
|
+
`Failed to list domain verification requests
|
|
335
|
+
${response.error.message}`
|
|
336
|
+
);
|
|
284
337
|
}
|
|
285
338
|
async deleteDomainVerificationRequest(domain, verificationCode) {
|
|
286
339
|
const response = await handleDeleteDomainVerification({
|
|
@@ -292,11 +345,10 @@ Message: ${response.error?.message}`
|
|
|
292
345
|
});
|
|
293
346
|
if (response.data) {
|
|
294
347
|
return response.data;
|
|
295
|
-
} else {
|
|
296
|
-
throw new Error(
|
|
297
|
-
`Failed to delete domain verification request for domain ${domain}: ${response.error.message}`
|
|
298
|
-
);
|
|
299
348
|
}
|
|
349
|
+
throw new Error(
|
|
350
|
+
`Failed to delete domain verification request for domain ${domain}: ${response.error.message}`
|
|
351
|
+
);
|
|
300
352
|
}
|
|
301
353
|
async listWebDeployments(limit, offset) {
|
|
302
354
|
const response = await handleListWebDeploys({
|
|
@@ -308,11 +360,11 @@ Message: ${response.error?.message}`
|
|
|
308
360
|
});
|
|
309
361
|
if (response.data) {
|
|
310
362
|
return response.data;
|
|
311
|
-
} else {
|
|
312
|
-
throw new Error(
|
|
313
|
-
"Failed to list web deployments\n" + response.error.message
|
|
314
|
-
);
|
|
315
363
|
}
|
|
364
|
+
throw new Error(
|
|
365
|
+
`Failed to list web deployments
|
|
366
|
+
${response.error.message}`
|
|
367
|
+
);
|
|
316
368
|
}
|
|
317
369
|
async listExecuteRuns(limit, offset) {
|
|
318
370
|
const response = await handleListExecuteRuns({
|
|
@@ -324,9 +376,9 @@ Message: ${response.error?.message}`
|
|
|
324
376
|
});
|
|
325
377
|
if (response.data) {
|
|
326
378
|
return response.data;
|
|
327
|
-
} else {
|
|
328
|
-
throw new Error("Failed to list execute runs\n" + response.error.message);
|
|
329
379
|
}
|
|
380
|
+
throw new Error(`Failed to list execute runs
|
|
381
|
+
${response.error.message}`);
|
|
330
382
|
}
|
|
331
383
|
async getExecuteRun(id) {
|
|
332
384
|
const response = await handleGetExecuteRun({
|
|
@@ -342,13 +394,28 @@ Message: ${response.error?.message}`
|
|
|
342
394
|
`Failed to get execute run with ID ${id}: ${response.error.message}`
|
|
343
395
|
);
|
|
344
396
|
}
|
|
397
|
+
/** Provision a wildcard certificate for domain. */
|
|
398
|
+
async provisionWildcard(domain) {
|
|
399
|
+
const response = await handleVerifyWildcard({
|
|
400
|
+
client: this.client,
|
|
401
|
+
path: {
|
|
402
|
+
domain
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
if (response.data) {
|
|
406
|
+
return response.data;
|
|
407
|
+
}
|
|
408
|
+
throw new Error(
|
|
409
|
+
`Failed to provision wildcard for domain ${domain}: ${response.error.message}`
|
|
410
|
+
);
|
|
411
|
+
}
|
|
345
412
|
/**
|
|
346
413
|
* Create a new git repository.
|
|
347
414
|
*
|
|
348
415
|
* @param name The name of the repository.
|
|
349
416
|
*/
|
|
350
417
|
async createGitRepository(name) {
|
|
351
|
-
const response = await
|
|
418
|
+
const response = await handleCreateRepo({
|
|
352
419
|
client: this.client,
|
|
353
420
|
body: {
|
|
354
421
|
name
|
|
@@ -368,7 +435,7 @@ Message: ${response.error?.message}`
|
|
|
368
435
|
* @param offset The offset to start at. Defaults to 0.
|
|
369
436
|
*/
|
|
370
437
|
async listGitRepositories(limit, offset) {
|
|
371
|
-
const response = await
|
|
438
|
+
const response = await handleListRepositories({
|
|
372
439
|
client: this.client,
|
|
373
440
|
query: {
|
|
374
441
|
limit: limit ?? 10,
|
|
@@ -386,7 +453,7 @@ Message: ${response.error?.message}`
|
|
|
386
453
|
* @param repositoryId The ID of the repository to delete.
|
|
387
454
|
*/
|
|
388
455
|
async deleteGitRepository(repositoryId) {
|
|
389
|
-
const response = await
|
|
456
|
+
const response = await handleDeleteRepo({
|
|
390
457
|
client: this.client,
|
|
391
458
|
path: {
|
|
392
459
|
repo: repositoryId
|
|
@@ -394,27 +461,211 @@ Message: ${response.error?.message}`
|
|
|
394
461
|
});
|
|
395
462
|
if (response.data) {
|
|
396
463
|
return response.data;
|
|
397
|
-
} else {
|
|
398
|
-
throw new Error(
|
|
399
|
-
`Failed to delete git repository ${repositoryId}: ${response.error}`
|
|
400
|
-
);
|
|
401
464
|
}
|
|
465
|
+
throw new Error(
|
|
466
|
+
`Failed to delete git repository ${repositoryId}: ${response.error}`
|
|
467
|
+
);
|
|
402
468
|
}
|
|
403
|
-
/**
|
|
404
|
-
|
|
405
|
-
|
|
469
|
+
/**
|
|
470
|
+
* Create a new git identity.
|
|
471
|
+
*/
|
|
472
|
+
async createGitIdentity() {
|
|
473
|
+
const response = await handleCreateIdentity({
|
|
474
|
+
client: this.client
|
|
475
|
+
});
|
|
476
|
+
if (response.data) {
|
|
477
|
+
return response.data;
|
|
478
|
+
}
|
|
479
|
+
throw new Error(`Failed to create git identity: ${response.error}`);
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* Delete a git identity.
|
|
483
|
+
*
|
|
484
|
+
* @param identityId The ID of the identity to delete.
|
|
485
|
+
*/
|
|
486
|
+
async deleteGitIdentity(identityId) {
|
|
487
|
+
const response = await handleDeleteIdentity({
|
|
406
488
|
client: this.client,
|
|
407
489
|
path: {
|
|
408
|
-
|
|
490
|
+
identity: identityId
|
|
491
|
+
}
|
|
492
|
+
});
|
|
493
|
+
if (response.data) {
|
|
494
|
+
return response.data;
|
|
495
|
+
}
|
|
496
|
+
throw new Error(`Failed to delete git identity: ${response.error}`);
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* Grant a git identity access to a repository.
|
|
500
|
+
*
|
|
501
|
+
* @param repoId The ID of the repository to grant access to.
|
|
502
|
+
* @param identityId The ID of the identity grant access to `repoId`.
|
|
503
|
+
* @param permission The permission to grant.
|
|
504
|
+
*/
|
|
505
|
+
async grantGitPermission(repoId, identityId, permission) {
|
|
506
|
+
const response = await handleGrantPermission({
|
|
507
|
+
client: this.client,
|
|
508
|
+
path: {
|
|
509
|
+
repo: repoId,
|
|
510
|
+
identity: identityId
|
|
511
|
+
},
|
|
512
|
+
body: {
|
|
513
|
+
permission
|
|
514
|
+
}
|
|
515
|
+
});
|
|
516
|
+
if (response.data) {
|
|
517
|
+
return response.data;
|
|
518
|
+
}
|
|
519
|
+
throw new Error(
|
|
520
|
+
`Failed to grant access to git identity ${identityId} for repository ${repoId}: ${response.error}`
|
|
521
|
+
);
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* Update a git identity's permissions on a repository.
|
|
525
|
+
*
|
|
526
|
+
* @param repoId The ID of the repository to update permissions for.
|
|
527
|
+
* @param identityId The ID of the identity to whose access to update.
|
|
528
|
+
* @param permission The permission to grant.
|
|
529
|
+
*/
|
|
530
|
+
async updateGitPermission(repoId, identityId, permission) {
|
|
531
|
+
const response = await handleUpdatePermission({
|
|
532
|
+
client: this.client,
|
|
533
|
+
path: {
|
|
534
|
+
repo: repoId,
|
|
535
|
+
identity: identityId
|
|
536
|
+
},
|
|
537
|
+
body: {
|
|
538
|
+
permission
|
|
539
|
+
}
|
|
540
|
+
});
|
|
541
|
+
if (response.data) {
|
|
542
|
+
return;
|
|
543
|
+
}
|
|
544
|
+
throw new Error(
|
|
545
|
+
`Failed to update permission for git identity ${identityId} for repository ${repoId}: ${response.error}`
|
|
546
|
+
);
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Revoke a git identity's access to a repository.
|
|
550
|
+
*
|
|
551
|
+
* @param repoId The ID of the repository revoke access to.
|
|
552
|
+
* @param identityId The ID of the identity to revoke access from.
|
|
553
|
+
*/
|
|
554
|
+
async revokeGitPermission(repoId, identityId) {
|
|
555
|
+
const response = await handleRevokePermission({
|
|
556
|
+
client: this.client,
|
|
557
|
+
path: {
|
|
558
|
+
repo: repoId,
|
|
559
|
+
identity: identityId
|
|
560
|
+
}
|
|
561
|
+
});
|
|
562
|
+
if (response.data) {
|
|
563
|
+
return;
|
|
564
|
+
}
|
|
565
|
+
throw new Error(
|
|
566
|
+
`Failed to revoke access to git identity ${identityId} for repository ${repoId}: ${response.error}`
|
|
567
|
+
);
|
|
568
|
+
}
|
|
569
|
+
/**
|
|
570
|
+
* List access permissions for a git identity.
|
|
571
|
+
*
|
|
572
|
+
* @param identityId The ID of the identity to list permissions for.
|
|
573
|
+
*/
|
|
574
|
+
async listGitPermissions(identityId) {
|
|
575
|
+
const response = await handleListPermissions({
|
|
576
|
+
client: this.client,
|
|
577
|
+
path: {
|
|
578
|
+
identity: identityId
|
|
409
579
|
}
|
|
410
580
|
});
|
|
411
581
|
if (response.data) {
|
|
412
582
|
return response.data;
|
|
413
|
-
} else {
|
|
414
|
-
throw new Error(
|
|
415
|
-
`Failed to provision wildcard for domain ${domain}: ${response.error.message}`
|
|
416
|
-
);
|
|
417
583
|
}
|
|
584
|
+
throw new Error(
|
|
585
|
+
`Failed to list permissions for git identity ${identityId}: ${response.error}`
|
|
586
|
+
);
|
|
587
|
+
}
|
|
588
|
+
/**
|
|
589
|
+
* Get the permission of a git identity on a repository.
|
|
590
|
+
*
|
|
591
|
+
* @param repoId The ID of the repository to check permissions for.
|
|
592
|
+
* @param identityId The ID of the identity to check permissions for.
|
|
593
|
+
*/
|
|
594
|
+
async getGitPermission(repoId, identityId) {
|
|
595
|
+
const response = await handleDescribePermission({
|
|
596
|
+
client: this.client,
|
|
597
|
+
path: {
|
|
598
|
+
repo: repoId,
|
|
599
|
+
identity: identityId
|
|
600
|
+
}
|
|
601
|
+
});
|
|
602
|
+
if (response.data) {
|
|
603
|
+
return response.data;
|
|
604
|
+
}
|
|
605
|
+
throw new Error(
|
|
606
|
+
`Failed to get permission for git identity ${identityId} on repository ${repoId}: ${response.error}`
|
|
607
|
+
);
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* Create a new git access token for an identity.
|
|
611
|
+
*
|
|
612
|
+
* @param identityId The ID of the identity to create the token for.
|
|
613
|
+
*/
|
|
614
|
+
async createGitAccessToken(identityId) {
|
|
615
|
+
const response = await handleCreateGitToken({
|
|
616
|
+
client: this.client,
|
|
617
|
+
path: {
|
|
618
|
+
identity: identityId
|
|
619
|
+
}
|
|
620
|
+
});
|
|
621
|
+
if (response.data) {
|
|
622
|
+
return response.data;
|
|
623
|
+
}
|
|
624
|
+
throw new Error(
|
|
625
|
+
`Failed to create git access token: ${response.error.message}`
|
|
626
|
+
);
|
|
627
|
+
}
|
|
628
|
+
/**
|
|
629
|
+
* Revoke a git access token.
|
|
630
|
+
*
|
|
631
|
+
* @param identityId The ID of the identity the token belongs to.
|
|
632
|
+
* @param tokenId The ID of the token to revoke.
|
|
633
|
+
*/
|
|
634
|
+
async revokeGitAccessToken(identityId, tokenId) {
|
|
635
|
+
const response = await handleRevokeGitToken({
|
|
636
|
+
client: this.client,
|
|
637
|
+
body: {
|
|
638
|
+
tokenId
|
|
639
|
+
},
|
|
640
|
+
path: {
|
|
641
|
+
identity: identityId
|
|
642
|
+
}
|
|
643
|
+
});
|
|
644
|
+
if (response.data) {
|
|
645
|
+
return;
|
|
646
|
+
}
|
|
647
|
+
throw new Error(
|
|
648
|
+
`Failed to revoke git access token ${tokenId}: ${response.error.message}`
|
|
649
|
+
);
|
|
650
|
+
}
|
|
651
|
+
/**
|
|
652
|
+
* List git access tokens for an identity.
|
|
653
|
+
*
|
|
654
|
+
* @param identityId The ID of the identity to list tokens for.
|
|
655
|
+
*/
|
|
656
|
+
async listGitAccessTokens(identityId) {
|
|
657
|
+
const response = await handleListGitTokens({
|
|
658
|
+
client: this.client,
|
|
659
|
+
path: {
|
|
660
|
+
identity: identityId
|
|
661
|
+
}
|
|
662
|
+
});
|
|
663
|
+
if (response.data) {
|
|
664
|
+
return response.data;
|
|
665
|
+
}
|
|
666
|
+
throw new Error(
|
|
667
|
+
`Failed to list git access tokens: ${response.error.message}`
|
|
668
|
+
);
|
|
418
669
|
}
|
|
419
670
|
}
|
|
420
671
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-BzRtj_TA.js';
|
|
2
2
|
import { DynamicStructuredTool } from '@langchain/core/tools';
|
|
3
3
|
|
|
4
4
|
declare const executeTool: (config: FreestyleExecuteScriptParamsConfiguration & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration } from '../types.gen-BzRtj_TA.js';
|
|
2
2
|
import { DynamicStructuredTool } from '@langchain/core/tools';
|
|
3
3
|
|
|
4
4
|
declare const executeTool: (config: FreestyleExecuteScriptParamsConfiguration & {
|
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-BzRtj_TA.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-BzRtj_TA.js';
|
|
4
4
|
|
|
5
5
|
declare const executeTool: (config: FreestyleExecuteScriptParamsConfiguration & {
|
|
6
6
|
apiKey: string;
|