freestyle-sandboxes 0.0.82 → 0.0.84
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 +1 -1
- package/dist/ai/inde.d.mts +1 -1
- package/dist/ai/index.d.cts +1 -1
- package/dist/ai/index.d.mts +1 -1
- package/dist/inde.d.cts +45 -4
- package/dist/inde.d.mts +45 -4
- package/dist/index.cjs +170 -7
- package/dist/index.d.cts +45 -4
- package/dist/index.d.mts +45 -4
- package/dist/index.mjs +170 -7
- package/dist/langgraph/inde.d.cts +1 -1
- package/dist/langgraph/inde.d.mts +1 -1
- package/dist/langgraph/index.d.cts +1 -1
- package/dist/langgraph/index.d.mts +1 -1
- package/dist/mastra/inde.d.cts +1 -1
- package/dist/mastra/inde.d.mts +1 -1
- package/dist/mastra/index.d.cts +1 -1
- package/dist/mastra/index.d.mts +1 -1
- package/dist/types.gen-BWwhCgTX.d.ts +1462 -0
- package/dist/utils/inde.d.cts +1 -1
- package/dist/utils/inde.d.mts +1 -1
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/package.json +1 -1
- package/src/index.ts +2 -0
package/dist/ai/inde.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess,
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, b$ as HandleExecuteScriptError, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponseV2 } from '../types.gen-BWwhCgTX.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/inde.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess,
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, b$ as HandleExecuteScriptError, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponseV2 } from '../types.gen-BWwhCgTX.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.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess,
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, b$ as HandleExecuteScriptError, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponseV2 } from '../types.gen-BWwhCgTX.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,
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, b$ as HandleExecuteScriptError, b as FreestyleDeployWebConfiguration, c as FreestyleDeployWebSuccessResponseV2 } from '../types.gen-BWwhCgTX.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
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, D as DeploymentSource, b as FreestyleDeployWebConfiguration, 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 CreateRepoSource, q as CreateRepoImport, r as CreateRepositoryResponseSuccess, s as HandleListRepositoriesResponse, t as HandleDeleteRepoResponse, G as GitIdentity, u as HandleDeleteIdentityResponse, A as AccessLevel, v as HandleGrantPermissionResponse, L as ListPermissionResponseSuccess, w as DescribePermissionResponseSuccess, x as CreatedToken, y as ListGitTokensResponseSuccess, z as HandleListGitTriggersResponse, B as GitTrigger, E as GitTriggerAction, I as HandleCreateGitTriggerResponse } from './types.gen-
|
|
2
|
-
export {
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, D as DeploymentSource, b as FreestyleDeployWebConfiguration, 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 CreateRepoSource, q as CreateRepoImport, r as CreateRepositoryResponseSuccess, s as HandleListRepositoriesResponse, t as HandleDeleteRepoResponse, G as GitIdentity, u as HandleDeleteIdentityResponse, A as AccessLevel, v as HandleGrantPermissionResponse, L as ListPermissionResponseSuccess, w as DescribePermissionResponseSuccess, x as CreatedToken, y as ListGitTokensResponseSuccess, z as HandleListGitTriggersResponse, B as GitTrigger, E as GitTriggerAction, I as HandleCreateGitTriggerResponse, S as SetDefaultBranchRequest, J as HandleGetContentsResponse, K as GetGithubSyncResponse } from './types.gen-BWwhCgTX.js';
|
|
2
|
+
export { O as AccessTokenInfo, N as AccessibleRepository, P as Behavior, Q as BlobEncoding, R as BlobObject, T as BranchDetails, U as CommitObject, V as CommitParent, W as CommitTree, cH as ConfigureGithubSyncData, cJ as ConfigureGithubSyncError, X as ConfigureGithubSyncRequest, cI as ConfigureGithubSyncResponse, Y as CreateDomainMappingRequest, Z as CreateRecordParams, $ as CreateRepoRequest, a0 as CreateRepositoryRequest, a2 as CustomBuildOptions, M as DeploymentBuildOptions, a3 as DeploymentLogEntry, a5 as DeploymentState, a6 as DevServer, a8 as DevServerRequest, a9 as DevServerStatusRequest, aa as DevServerWatchFilesRequest, ab as DnsRecord, ac as DnsRecordData, ad as DnsRecordKind, ae as DomainVerificationRequest, af as ExecRequest, ag as ExecuteLogEntry, ah as ExecuteRunInfo, ai as ExecuteRunState, aj as FileReadContent, al as FreestyleCloudstateDeployConfiguration, am as FreestyleCloudstateDeployErrorResponse, an as FreestyleDeleteDomainVerificationRequest, ao as FreestyleDeployWebErrorResponse, ap as FreestyleDeployWebPayload, aq as FreestyleDeployWebPayloadV2, ar as FreestyleDomainVerificationRequest, as as FreestyleExecuteScriptParams, at as FreestyleFile, au as FreestyleGetLogsResponse, av as FreestyleJavaScriptLog, aw as FreestyleLogResponseObject, ax as FreestyleNetworkPermission, az as FreestyleVerifyDomainRequest, aA as GetDefaultBranchResponse, cF as GetGithubSyncData, cG as GetGithubSyncError, aB as GitCommitPushRequest, aC as GitContents, aE as GitContentsDirEntryItem, aH as GitReference, aI as GitRepositoryTrigger, aF as GithubRepoSyncConfig, aG as GithubSyncConfigResponse, aL as GrantPermissionRequest, b7 as HandleBackupCloudstateData, b8 as HandleBackupCloudstateError, bt as HandleCreateDomainVerificationData, bu as HandleCreateDomainVerificationError, co as HandleCreateGitTokenData, cq as HandleCreateGitTokenError, cp as HandleCreateGitTokenResponse, dc as HandleCreateGitTriggerData, dd as HandleCreateGitTriggerError, c4 as HandleCreateIdentityError, c3 as HandleCreateIdentityResponse, bc as HandleCreateRecordData, be as HandleCreateRecordError, bd as HandleCreateRecordResponse, cw as HandleCreateRepoData, cy as HandleCreateRepoError, cx as HandleCreateRepoResponse, bo as HandleDeleteDomainMappingData, bq as HandleDeleteDomainMappingError, bp as HandleDeleteDomainMappingResponse, bv as HandleDeleteDomainVerificationData, bw as HandleDeleteDomainVerificationError, de as HandleDeleteGitTriggerData, dg as HandleDeleteGitTriggerError, df as HandleDeleteGitTriggerResponse, c5 as HandleDeleteIdentityData, c6 as HandleDeleteIdentityError, bf as HandleDeleteRecordData, bh as HandleDeleteRecordError, bg as HandleDeleteRecordResponse, cN as HandleDeleteRepoData, cO as HandleDeleteRepoError, b4 as HandleDeployCloudstateData, b6 as HandleDeployCloudstateError, b5 as HandleDeployCloudstateResponse, dm as HandleDeployWebData, dp as HandleDeployWebError, dn as HandleDeployWebResponse, dq as HandleDeployWebV2Data, ds as HandleDeployWebV2Error, dr as HandleDeployWebV2Response, ca as HandleDescribePermissionData, cc as HandleDescribePermissionError, cb as HandleDescribePermissionResponse, bP as HandleDevServerStatusData, bR as HandleDevServerStatusError, bQ as HandleDevServerStatusResponse, d7 as HandleDownloadTarballData, d9 as HandleDownloadTarballError, d8 as HandleDownloadTarballResponse, dh as HandleDownloadZipData, dj as HandleDownloadZipError, di as HandleDownloadZipResponse, bx as HandleEphemeralDevServerData, bz as HandleEphemeralDevServerError, by as HandleEphemeralDevServerResponse, bA as HandleExecOnEphemeralDevServerData, bC as HandleExecOnEphemeralDevServerError, bB as HandleExecOnEphemeralDevServerResponse, bZ as HandleExecuteScriptData, b$ as HandleExecuteScriptError, b_ as HandleExecuteScriptResponse, cR as HandleGetBlobData, cT as HandleGetBlobError, cS as HandleGetBlobResponse, cU as HandleGetCommitData, cW as HandleGetCommitError, cV as HandleGetCommitResponse, cP as HandleGetContentsData, cQ as HandleGetContentsError, cz as HandleGetDefaultBranchData, cB as HandleGetDefaultBranchError, cA as HandleGetDefaultBranchResponse, bX as HandleGetExecuteRunData, bY as HandleGetExecuteRunError, dk as HandleGetLogsData, dl as HandleGetLogsError, cX as HandleGetRefBranchData, cZ as HandleGetRefBranchError, cY as HandleGetRefBranchResponse, c_ as HandleGetRefTagData, d0 as HandleGetRefTagError, c$ as HandleGetRefTagResponse, d1 as HandleGetTagData, d3 as HandleGetTagError, d2 as HandleGetTagResponse, d4 as HandleGetTreeData, d6 as HandleGetTreeError, d5 as HandleGetTreeResponse, dv as HandleGetWebDeployDetailsData, bJ as HandleGitCommitPushData, bL as HandleGitCommitPushError, bK as HandleGitCommitPushResponse, cd as HandleGrantPermissionData, ce as HandleGrantPermissionError, bl as HandleInsertDomainMappingData, bn as HandleInsertDomainMappingError, bm as HandleInsertDomainMappingResponse, br as HandleListDomainVerificationRequestsError, bk as HandleListDomainsError, bV as HandleListExecuteRunsData, bW as HandleListExecuteRunsError, cl as HandleListGitTokensData, cn as HandleListGitTokensError, cm as HandleListGitTokensResponse, da as HandleListGitTriggersData, db as HandleListGitTriggersError, c0 as HandleListIdentitiesData, c2 as HandleListIdentitiesError, c1 as HandleListIdentitiesResponse, c7 as HandleListPermissionsData, c9 as HandleListPermissionsError, c8 as HandleListPermissionsResponse, b9 as HandleListRecordsData, bb as HandleListRecordsError, ba as HandleListRecordsResponse, cu as HandleListRepositoriesData, cv as HandleListRepositoriesError, dt as HandleListWebDeploysData, du as HandleListWebDeploysError, bG as HandleReadFileFromEphemeralDevServerData, bI as HandleReadFileFromEphemeralDevServerError, bH as HandleReadFileFromEphemeralDevServerResponse, cr as HandleRevokeGitTokenData, ct as HandleRevokeGitTokenError, cs as HandleRevokeGitTokenResponse, cf as HandleRevokePermissionData, ch as HandleRevokePermissionError, cg as HandleRevokePermissionResponse, cC as HandleSetDefaultBranchData, cE as HandleSetDefaultBranchError, cD as HandleSetDefaultBranchResponse, bM as HandleShutdownDevServerData, bO as HandleShutdownDevServerError, bN as HandleShutdownDevServerResponse, ci as HandleUpdatePermissionData, ck as HandleUpdatePermissionError, cj as HandleUpdatePermissionResponse, bs as HandleVerifyDomainData, bi as HandleVerifyWildcardData, bj as HandleVerifyWildcardError, bS as HandleWatchDevServerFilesData, bU as HandleWatchDevServerFilesError, bT as HandleWatchDevServerFilesResponse, bD as HandleWriteFileFromEphemeralDevServerData, bF as HandleWriteFileFromEphemeralDevServerError, bE as HandleWriteFileFromEphemeralDevServerResponse, aM as InternalServerError, aN as ListRecordsResponse, aO as NetworkPermissionData, aP as ReadFileEphemeralDevServerResponses, aQ as ReadFileRequest, cK as RemoveGithubSyncData, cM as RemoveGithubSyncError, cL as RemoveGithubSyncResponse, aR as RepositoryInfo, aS as RepositoryMetadata, aT as RevokeGitTokenRequest, aU as SetDefaultBranchResponse, aV as ShutdownDevServerRequest, aW as Signature, aX as TagDetails, aY as TagObject, aZ as TagTarget, a_ as TreeEntry, b0 as TreeObject, b1 as UpdatePermissionRequest, b2 as Visibility, b3 as WriteFileRequest, ay as action, aK as action2, aJ as event, a4 as kind, a7 as kind2, ak as kind3, _ as type, a1 as type2, aD as type3, a$ as type4 } from './types.gen-BWwhCgTX.js';
|
|
3
3
|
|
|
4
4
|
interface FreestyleDevServer {
|
|
5
5
|
/**
|
|
@@ -155,6 +155,7 @@ declare class FreestyleSandboxes {
|
|
|
155
155
|
* @returns The domain verification token.
|
|
156
156
|
*/
|
|
157
157
|
createDomainVerificationRequest(domain: string): Promise<HandleCreateDomainVerificationResponse>;
|
|
158
|
+
verifyDomainVerificationRequest(id: string): Promise<HandleVerifyDomainResponse>;
|
|
158
159
|
/**
|
|
159
160
|
* Verify a domain. Note, this requires the domain verification token to be already set up.
|
|
160
161
|
* @param domain The domain to verify.
|
|
@@ -172,9 +173,10 @@ declare class FreestyleSandboxes {
|
|
|
172
173
|
/**
|
|
173
174
|
* Create a new git repository.
|
|
174
175
|
*/
|
|
175
|
-
createGitRepository({ name, public: pub, source, import: _import, }: {
|
|
176
|
+
createGitRepository({ name, public: pub, source, import: _import, defaultBranch, }: {
|
|
176
177
|
name?: string;
|
|
177
178
|
public?: boolean;
|
|
179
|
+
defaultBranch?: string;
|
|
178
180
|
} & (CreateGitRepositorySource | CreateGitRepositoryImport)): Promise<CreateRepositoryResponseSuccess>;
|
|
179
181
|
/**
|
|
180
182
|
* List git repositories.
|
|
@@ -274,6 +276,45 @@ declare class FreestyleSandboxes {
|
|
|
274
276
|
deleteGitTrigger({ triggerId }: {
|
|
275
277
|
triggerId: string;
|
|
276
278
|
}): Promise<void>;
|
|
279
|
+
/**
|
|
280
|
+
* Set the default branch for a git repository.
|
|
281
|
+
*/
|
|
282
|
+
setGitRepoDefaultBranch({ repoId, defaultBranch, }: SetDefaultBranchRequest & {
|
|
283
|
+
repoId: string;
|
|
284
|
+
}): Promise<void>;
|
|
285
|
+
/**
|
|
286
|
+
* Get the default branch for a git repository.
|
|
287
|
+
*/
|
|
288
|
+
getGitRepoDefaultBranch({ repoId, }: {
|
|
289
|
+
repoId: string;
|
|
290
|
+
}): Promise<string>;
|
|
291
|
+
/**
|
|
292
|
+
* Get the contents of a git repository at the given path.
|
|
293
|
+
*/
|
|
294
|
+
getGitRepoContents({ repoId, path, ref, }: {
|
|
295
|
+
repoId: string;
|
|
296
|
+
path?: string;
|
|
297
|
+
ref?: string;
|
|
298
|
+
}): Promise<HandleGetContentsResponse>;
|
|
299
|
+
/**
|
|
300
|
+
* Configure a git repository to sync with GitHub.
|
|
301
|
+
*/
|
|
302
|
+
configureGitRepoGitHubSync({ repoId, githubRepoName, }: {
|
|
303
|
+
repoId: string;
|
|
304
|
+
githubRepoName: string;
|
|
305
|
+
}): Promise<void>;
|
|
306
|
+
/**
|
|
307
|
+
* Remove the GitHub sync configuration for a git repository.
|
|
308
|
+
*/
|
|
309
|
+
removeGitRepoGitHubSync({ repoId }: {
|
|
310
|
+
repoId: string;
|
|
311
|
+
}): Promise<void>;
|
|
312
|
+
/**
|
|
313
|
+
* Get the GitHub sync configuration for a git repository.
|
|
314
|
+
*/
|
|
315
|
+
getGitRepoGitHubSyncConfig({ repoId, }: {
|
|
316
|
+
repoId: any;
|
|
317
|
+
}): Promise<GetGithubSyncResponse | null>;
|
|
277
318
|
/**
|
|
278
319
|
* Request a dev server for a repository. If a dev server is already running
|
|
279
320
|
* for that repository, it will return a url to that server. Dev servers are
|
|
@@ -300,4 +341,4 @@ declare class FreestyleSandboxes {
|
|
|
300
341
|
fetch(path: string, init?: RequestInit): Promise<Response>;
|
|
301
342
|
}
|
|
302
343
|
|
|
303
|
-
export { AccessLevel, CreateRepoImport, CreateRepoSource, CreateRepositoryResponseSuccess, CreatedToken, DeploymentSource, DescribePermissionResponseSuccess, FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponseV2, type FreestyleDevServer, type FreestyleDevServerFilesystem, FreestyleExecuteScriptParamsConfiguration, FreestyleExecuteScriptResultSuccess, FreestyleSandboxes, GitIdentity, GitTrigger, GitTriggerAction, HandleBackupCloudstateResponse, HandleCreateDomainVerificationResponse, HandleCreateGitTriggerResponse, HandleDeleteDomainVerificationResponse, HandleDeleteIdentityResponse, HandleDeleteRepoResponse, HandleGetExecuteRunResponse, HandleGetLogsResponse, HandleGrantPermissionResponse, HandleListDomainVerificationRequestsResponse, HandleListDomainsResponse, HandleListExecuteRunsResponse, HandleListGitTriggersResponse, HandleListRepositoriesResponse, HandleListWebDeploysResponse, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleVerifyWildcardResponse, ListGitTokensResponseSuccess, ListPermissionResponseSuccess };
|
|
344
|
+
export { AccessLevel, CreateRepoImport, CreateRepoSource, CreateRepositoryResponseSuccess, CreatedToken, DeploymentSource, DescribePermissionResponseSuccess, FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponseV2, type FreestyleDevServer, type FreestyleDevServerFilesystem, FreestyleExecuteScriptParamsConfiguration, FreestyleExecuteScriptResultSuccess, FreestyleSandboxes, GetGithubSyncResponse, GitIdentity, GitTrigger, GitTriggerAction, HandleBackupCloudstateResponse, HandleCreateDomainVerificationResponse, HandleCreateGitTriggerResponse, HandleDeleteDomainVerificationResponse, HandleDeleteIdentityResponse, HandleDeleteRepoResponse, HandleGetContentsResponse, HandleGetExecuteRunResponse, HandleGetLogsResponse, HandleGrantPermissionResponse, HandleListDomainVerificationRequestsResponse, HandleListDomainsResponse, HandleListExecuteRunsResponse, HandleListGitTriggersResponse, HandleListRepositoriesResponse, HandleListWebDeploysResponse, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleVerifyWildcardResponse, ListGitTokensResponseSuccess, ListPermissionResponseSuccess, SetDefaultBranchRequest };
|
package/dist/inde.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, D as DeploymentSource, b as FreestyleDeployWebConfiguration, 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 CreateRepoSource, q as CreateRepoImport, r as CreateRepositoryResponseSuccess, s as HandleListRepositoriesResponse, t as HandleDeleteRepoResponse, G as GitIdentity, u as HandleDeleteIdentityResponse, A as AccessLevel, v as HandleGrantPermissionResponse, L as ListPermissionResponseSuccess, w as DescribePermissionResponseSuccess, x as CreatedToken, y as ListGitTokensResponseSuccess, z as HandleListGitTriggersResponse, B as GitTrigger, E as GitTriggerAction, I as HandleCreateGitTriggerResponse } from './types.gen-
|
|
2
|
-
export {
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, D as DeploymentSource, b as FreestyleDeployWebConfiguration, 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 CreateRepoSource, q as CreateRepoImport, r as CreateRepositoryResponseSuccess, s as HandleListRepositoriesResponse, t as HandleDeleteRepoResponse, G as GitIdentity, u as HandleDeleteIdentityResponse, A as AccessLevel, v as HandleGrantPermissionResponse, L as ListPermissionResponseSuccess, w as DescribePermissionResponseSuccess, x as CreatedToken, y as ListGitTokensResponseSuccess, z as HandleListGitTriggersResponse, B as GitTrigger, E as GitTriggerAction, I as HandleCreateGitTriggerResponse, S as SetDefaultBranchRequest, J as HandleGetContentsResponse, K as GetGithubSyncResponse } from './types.gen-BWwhCgTX.js';
|
|
2
|
+
export { O as AccessTokenInfo, N as AccessibleRepository, P as Behavior, Q as BlobEncoding, R as BlobObject, T as BranchDetails, U as CommitObject, V as CommitParent, W as CommitTree, cH as ConfigureGithubSyncData, cJ as ConfigureGithubSyncError, X as ConfigureGithubSyncRequest, cI as ConfigureGithubSyncResponse, Y as CreateDomainMappingRequest, Z as CreateRecordParams, $ as CreateRepoRequest, a0 as CreateRepositoryRequest, a2 as CustomBuildOptions, M as DeploymentBuildOptions, a3 as DeploymentLogEntry, a5 as DeploymentState, a6 as DevServer, a8 as DevServerRequest, a9 as DevServerStatusRequest, aa as DevServerWatchFilesRequest, ab as DnsRecord, ac as DnsRecordData, ad as DnsRecordKind, ae as DomainVerificationRequest, af as ExecRequest, ag as ExecuteLogEntry, ah as ExecuteRunInfo, ai as ExecuteRunState, aj as FileReadContent, al as FreestyleCloudstateDeployConfiguration, am as FreestyleCloudstateDeployErrorResponse, an as FreestyleDeleteDomainVerificationRequest, ao as FreestyleDeployWebErrorResponse, ap as FreestyleDeployWebPayload, aq as FreestyleDeployWebPayloadV2, ar as FreestyleDomainVerificationRequest, as as FreestyleExecuteScriptParams, at as FreestyleFile, au as FreestyleGetLogsResponse, av as FreestyleJavaScriptLog, aw as FreestyleLogResponseObject, ax as FreestyleNetworkPermission, az as FreestyleVerifyDomainRequest, aA as GetDefaultBranchResponse, cF as GetGithubSyncData, cG as GetGithubSyncError, aB as GitCommitPushRequest, aC as GitContents, aE as GitContentsDirEntryItem, aH as GitReference, aI as GitRepositoryTrigger, aF as GithubRepoSyncConfig, aG as GithubSyncConfigResponse, aL as GrantPermissionRequest, b7 as HandleBackupCloudstateData, b8 as HandleBackupCloudstateError, bt as HandleCreateDomainVerificationData, bu as HandleCreateDomainVerificationError, co as HandleCreateGitTokenData, cq as HandleCreateGitTokenError, cp as HandleCreateGitTokenResponse, dc as HandleCreateGitTriggerData, dd as HandleCreateGitTriggerError, c4 as HandleCreateIdentityError, c3 as HandleCreateIdentityResponse, bc as HandleCreateRecordData, be as HandleCreateRecordError, bd as HandleCreateRecordResponse, cw as HandleCreateRepoData, cy as HandleCreateRepoError, cx as HandleCreateRepoResponse, bo as HandleDeleteDomainMappingData, bq as HandleDeleteDomainMappingError, bp as HandleDeleteDomainMappingResponse, bv as HandleDeleteDomainVerificationData, bw as HandleDeleteDomainVerificationError, de as HandleDeleteGitTriggerData, dg as HandleDeleteGitTriggerError, df as HandleDeleteGitTriggerResponse, c5 as HandleDeleteIdentityData, c6 as HandleDeleteIdentityError, bf as HandleDeleteRecordData, bh as HandleDeleteRecordError, bg as HandleDeleteRecordResponse, cN as HandleDeleteRepoData, cO as HandleDeleteRepoError, b4 as HandleDeployCloudstateData, b6 as HandleDeployCloudstateError, b5 as HandleDeployCloudstateResponse, dm as HandleDeployWebData, dp as HandleDeployWebError, dn as HandleDeployWebResponse, dq as HandleDeployWebV2Data, ds as HandleDeployWebV2Error, dr as HandleDeployWebV2Response, ca as HandleDescribePermissionData, cc as HandleDescribePermissionError, cb as HandleDescribePermissionResponse, bP as HandleDevServerStatusData, bR as HandleDevServerStatusError, bQ as HandleDevServerStatusResponse, d7 as HandleDownloadTarballData, d9 as HandleDownloadTarballError, d8 as HandleDownloadTarballResponse, dh as HandleDownloadZipData, dj as HandleDownloadZipError, di as HandleDownloadZipResponse, bx as HandleEphemeralDevServerData, bz as HandleEphemeralDevServerError, by as HandleEphemeralDevServerResponse, bA as HandleExecOnEphemeralDevServerData, bC as HandleExecOnEphemeralDevServerError, bB as HandleExecOnEphemeralDevServerResponse, bZ as HandleExecuteScriptData, b$ as HandleExecuteScriptError, b_ as HandleExecuteScriptResponse, cR as HandleGetBlobData, cT as HandleGetBlobError, cS as HandleGetBlobResponse, cU as HandleGetCommitData, cW as HandleGetCommitError, cV as HandleGetCommitResponse, cP as HandleGetContentsData, cQ as HandleGetContentsError, cz as HandleGetDefaultBranchData, cB as HandleGetDefaultBranchError, cA as HandleGetDefaultBranchResponse, bX as HandleGetExecuteRunData, bY as HandleGetExecuteRunError, dk as HandleGetLogsData, dl as HandleGetLogsError, cX as HandleGetRefBranchData, cZ as HandleGetRefBranchError, cY as HandleGetRefBranchResponse, c_ as HandleGetRefTagData, d0 as HandleGetRefTagError, c$ as HandleGetRefTagResponse, d1 as HandleGetTagData, d3 as HandleGetTagError, d2 as HandleGetTagResponse, d4 as HandleGetTreeData, d6 as HandleGetTreeError, d5 as HandleGetTreeResponse, dv as HandleGetWebDeployDetailsData, bJ as HandleGitCommitPushData, bL as HandleGitCommitPushError, bK as HandleGitCommitPushResponse, cd as HandleGrantPermissionData, ce as HandleGrantPermissionError, bl as HandleInsertDomainMappingData, bn as HandleInsertDomainMappingError, bm as HandleInsertDomainMappingResponse, br as HandleListDomainVerificationRequestsError, bk as HandleListDomainsError, bV as HandleListExecuteRunsData, bW as HandleListExecuteRunsError, cl as HandleListGitTokensData, cn as HandleListGitTokensError, cm as HandleListGitTokensResponse, da as HandleListGitTriggersData, db as HandleListGitTriggersError, c0 as HandleListIdentitiesData, c2 as HandleListIdentitiesError, c1 as HandleListIdentitiesResponse, c7 as HandleListPermissionsData, c9 as HandleListPermissionsError, c8 as HandleListPermissionsResponse, b9 as HandleListRecordsData, bb as HandleListRecordsError, ba as HandleListRecordsResponse, cu as HandleListRepositoriesData, cv as HandleListRepositoriesError, dt as HandleListWebDeploysData, du as HandleListWebDeploysError, bG as HandleReadFileFromEphemeralDevServerData, bI as HandleReadFileFromEphemeralDevServerError, bH as HandleReadFileFromEphemeralDevServerResponse, cr as HandleRevokeGitTokenData, ct as HandleRevokeGitTokenError, cs as HandleRevokeGitTokenResponse, cf as HandleRevokePermissionData, ch as HandleRevokePermissionError, cg as HandleRevokePermissionResponse, cC as HandleSetDefaultBranchData, cE as HandleSetDefaultBranchError, cD as HandleSetDefaultBranchResponse, bM as HandleShutdownDevServerData, bO as HandleShutdownDevServerError, bN as HandleShutdownDevServerResponse, ci as HandleUpdatePermissionData, ck as HandleUpdatePermissionError, cj as HandleUpdatePermissionResponse, bs as HandleVerifyDomainData, bi as HandleVerifyWildcardData, bj as HandleVerifyWildcardError, bS as HandleWatchDevServerFilesData, bU as HandleWatchDevServerFilesError, bT as HandleWatchDevServerFilesResponse, bD as HandleWriteFileFromEphemeralDevServerData, bF as HandleWriteFileFromEphemeralDevServerError, bE as HandleWriteFileFromEphemeralDevServerResponse, aM as InternalServerError, aN as ListRecordsResponse, aO as NetworkPermissionData, aP as ReadFileEphemeralDevServerResponses, aQ as ReadFileRequest, cK as RemoveGithubSyncData, cM as RemoveGithubSyncError, cL as RemoveGithubSyncResponse, aR as RepositoryInfo, aS as RepositoryMetadata, aT as RevokeGitTokenRequest, aU as SetDefaultBranchResponse, aV as ShutdownDevServerRequest, aW as Signature, aX as TagDetails, aY as TagObject, aZ as TagTarget, a_ as TreeEntry, b0 as TreeObject, b1 as UpdatePermissionRequest, b2 as Visibility, b3 as WriteFileRequest, ay as action, aK as action2, aJ as event, a4 as kind, a7 as kind2, ak as kind3, _ as type, a1 as type2, aD as type3, a$ as type4 } from './types.gen-BWwhCgTX.js';
|
|
3
3
|
|
|
4
4
|
interface FreestyleDevServer {
|
|
5
5
|
/**
|
|
@@ -155,6 +155,7 @@ declare class FreestyleSandboxes {
|
|
|
155
155
|
* @returns The domain verification token.
|
|
156
156
|
*/
|
|
157
157
|
createDomainVerificationRequest(domain: string): Promise<HandleCreateDomainVerificationResponse>;
|
|
158
|
+
verifyDomainVerificationRequest(id: string): Promise<HandleVerifyDomainResponse>;
|
|
158
159
|
/**
|
|
159
160
|
* Verify a domain. Note, this requires the domain verification token to be already set up.
|
|
160
161
|
* @param domain The domain to verify.
|
|
@@ -172,9 +173,10 @@ declare class FreestyleSandboxes {
|
|
|
172
173
|
/**
|
|
173
174
|
* Create a new git repository.
|
|
174
175
|
*/
|
|
175
|
-
createGitRepository({ name, public: pub, source, import: _import, }: {
|
|
176
|
+
createGitRepository({ name, public: pub, source, import: _import, defaultBranch, }: {
|
|
176
177
|
name?: string;
|
|
177
178
|
public?: boolean;
|
|
179
|
+
defaultBranch?: string;
|
|
178
180
|
} & (CreateGitRepositorySource | CreateGitRepositoryImport)): Promise<CreateRepositoryResponseSuccess>;
|
|
179
181
|
/**
|
|
180
182
|
* List git repositories.
|
|
@@ -274,6 +276,45 @@ declare class FreestyleSandboxes {
|
|
|
274
276
|
deleteGitTrigger({ triggerId }: {
|
|
275
277
|
triggerId: string;
|
|
276
278
|
}): Promise<void>;
|
|
279
|
+
/**
|
|
280
|
+
* Set the default branch for a git repository.
|
|
281
|
+
*/
|
|
282
|
+
setGitRepoDefaultBranch({ repoId, defaultBranch, }: SetDefaultBranchRequest & {
|
|
283
|
+
repoId: string;
|
|
284
|
+
}): Promise<void>;
|
|
285
|
+
/**
|
|
286
|
+
* Get the default branch for a git repository.
|
|
287
|
+
*/
|
|
288
|
+
getGitRepoDefaultBranch({ repoId, }: {
|
|
289
|
+
repoId: string;
|
|
290
|
+
}): Promise<string>;
|
|
291
|
+
/**
|
|
292
|
+
* Get the contents of a git repository at the given path.
|
|
293
|
+
*/
|
|
294
|
+
getGitRepoContents({ repoId, path, ref, }: {
|
|
295
|
+
repoId: string;
|
|
296
|
+
path?: string;
|
|
297
|
+
ref?: string;
|
|
298
|
+
}): Promise<HandleGetContentsResponse>;
|
|
299
|
+
/**
|
|
300
|
+
* Configure a git repository to sync with GitHub.
|
|
301
|
+
*/
|
|
302
|
+
configureGitRepoGitHubSync({ repoId, githubRepoName, }: {
|
|
303
|
+
repoId: string;
|
|
304
|
+
githubRepoName: string;
|
|
305
|
+
}): Promise<void>;
|
|
306
|
+
/**
|
|
307
|
+
* Remove the GitHub sync configuration for a git repository.
|
|
308
|
+
*/
|
|
309
|
+
removeGitRepoGitHubSync({ repoId }: {
|
|
310
|
+
repoId: string;
|
|
311
|
+
}): Promise<void>;
|
|
312
|
+
/**
|
|
313
|
+
* Get the GitHub sync configuration for a git repository.
|
|
314
|
+
*/
|
|
315
|
+
getGitRepoGitHubSyncConfig({ repoId, }: {
|
|
316
|
+
repoId: any;
|
|
317
|
+
}): Promise<GetGithubSyncResponse | null>;
|
|
277
318
|
/**
|
|
278
319
|
* Request a dev server for a repository. If a dev server is already running
|
|
279
320
|
* for that repository, it will return a url to that server. Dev servers are
|
|
@@ -300,4 +341,4 @@ declare class FreestyleSandboxes {
|
|
|
300
341
|
fetch(path: string, init?: RequestInit): Promise<Response>;
|
|
301
342
|
}
|
|
302
343
|
|
|
303
|
-
export { AccessLevel, CreateRepoImport, CreateRepoSource, CreateRepositoryResponseSuccess, CreatedToken, DeploymentSource, DescribePermissionResponseSuccess, FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponseV2, type FreestyleDevServer, type FreestyleDevServerFilesystem, FreestyleExecuteScriptParamsConfiguration, FreestyleExecuteScriptResultSuccess, FreestyleSandboxes, GitIdentity, GitTrigger, GitTriggerAction, HandleBackupCloudstateResponse, HandleCreateDomainVerificationResponse, HandleCreateGitTriggerResponse, HandleDeleteDomainVerificationResponse, HandleDeleteIdentityResponse, HandleDeleteRepoResponse, HandleGetExecuteRunResponse, HandleGetLogsResponse, HandleGrantPermissionResponse, HandleListDomainVerificationRequestsResponse, HandleListDomainsResponse, HandleListExecuteRunsResponse, HandleListGitTriggersResponse, HandleListRepositoriesResponse, HandleListWebDeploysResponse, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleVerifyWildcardResponse, ListGitTokensResponseSuccess, ListPermissionResponseSuccess };
|
|
344
|
+
export { AccessLevel, CreateRepoImport, CreateRepoSource, CreateRepositoryResponseSuccess, CreatedToken, DeploymentSource, DescribePermissionResponseSuccess, FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponseV2, type FreestyleDevServer, type FreestyleDevServerFilesystem, FreestyleExecuteScriptParamsConfiguration, FreestyleExecuteScriptResultSuccess, FreestyleSandboxes, GetGithubSyncResponse, GitIdentity, GitTrigger, GitTriggerAction, HandleBackupCloudstateResponse, HandleCreateDomainVerificationResponse, HandleCreateGitTriggerResponse, HandleDeleteDomainVerificationResponse, HandleDeleteIdentityResponse, HandleDeleteRepoResponse, HandleGetContentsResponse, HandleGetExecuteRunResponse, HandleGetLogsResponse, HandleGrantPermissionResponse, HandleListDomainVerificationRequestsResponse, HandleListDomainsResponse, HandleListExecuteRunsResponse, HandleListGitTriggersResponse, HandleListRepositoriesResponse, HandleListWebDeploysResponse, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleVerifyWildcardResponse, ListGitTokensResponseSuccess, ListPermissionResponseSuccess, SetDefaultBranchRequest };
|
package/dist/index.cjs
CHANGED
|
@@ -183,12 +183,48 @@ const handleCreateRepo = (options) => {
|
|
|
183
183
|
url: "/git/v1/repo"
|
|
184
184
|
});
|
|
185
185
|
};
|
|
186
|
+
const handleGetDefaultBranch = (options) => {
|
|
187
|
+
return (options?.client ?? client).get({
|
|
188
|
+
...options,
|
|
189
|
+
url: "/git/v1/repo/{repo_id}/default-branch"
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
const handleSetDefaultBranch = (options) => {
|
|
193
|
+
return (options?.client ?? client).put({
|
|
194
|
+
...options,
|
|
195
|
+
url: "/git/v1/repo/{repo_id}/default-branch"
|
|
196
|
+
});
|
|
197
|
+
};
|
|
198
|
+
const getGithubSync = (options) => {
|
|
199
|
+
return (options?.client ?? client).get({
|
|
200
|
+
...options,
|
|
201
|
+
url: "/git/v1/repo/{repo_id}/github-sync"
|
|
202
|
+
});
|
|
203
|
+
};
|
|
204
|
+
const configureGithubSync = (options) => {
|
|
205
|
+
return (options?.client ?? client).post({
|
|
206
|
+
...options,
|
|
207
|
+
url: "/git/v1/repo/{repo_id}/github-sync"
|
|
208
|
+
});
|
|
209
|
+
};
|
|
210
|
+
const removeGithubSync = (options) => {
|
|
211
|
+
return (options?.client ?? client).delete({
|
|
212
|
+
...options,
|
|
213
|
+
url: "/git/v1/repo/{repo_id}/github-sync"
|
|
214
|
+
});
|
|
215
|
+
};
|
|
186
216
|
const handleDeleteRepo = (options) => {
|
|
187
217
|
return (options?.client ?? client).delete({
|
|
188
218
|
...options,
|
|
189
219
|
url: "/git/v1/repo/{repo}"
|
|
190
220
|
});
|
|
191
221
|
};
|
|
222
|
+
const handleGetContents = (options) => {
|
|
223
|
+
return (options?.client ?? client).get({
|
|
224
|
+
...options,
|
|
225
|
+
url: "/git/v1/repo/{repo}/contents/{*path}"
|
|
226
|
+
});
|
|
227
|
+
};
|
|
192
228
|
const handleListGitTriggers = (options) => {
|
|
193
229
|
return (options?.client ?? client).get({
|
|
194
230
|
...options,
|
|
@@ -234,11 +270,6 @@ class FreestyleSandboxes {
|
|
|
234
270
|
if (!options?.apiKey) {
|
|
235
271
|
this.options.apiKey = process.env.FREESTYLE_API_KEY;
|
|
236
272
|
}
|
|
237
|
-
if (!this.options.apiKey) {
|
|
238
|
-
throw new Error(
|
|
239
|
-
"No API key provided. Please set the FREESTYLE_API_KEY environment variable or configure apiKey when constructing FreestyleSandboxes."
|
|
240
|
-
);
|
|
241
|
-
}
|
|
242
273
|
if (typeof Deno !== "undefined") {
|
|
243
274
|
class FreestyleRequest extends Request {
|
|
244
275
|
constructor(input, init) {
|
|
@@ -377,6 +408,20 @@ Message: ${response.error?.message}`
|
|
|
377
408
|
}
|
|
378
409
|
throw new Error(response.error.message);
|
|
379
410
|
}
|
|
411
|
+
async verifyDomainVerificationRequest(id) {
|
|
412
|
+
const response = await handleVerifyDomain({
|
|
413
|
+
client: this.client,
|
|
414
|
+
body: {
|
|
415
|
+
id
|
|
416
|
+
}
|
|
417
|
+
});
|
|
418
|
+
if (response.data) {
|
|
419
|
+
return response.data;
|
|
420
|
+
}
|
|
421
|
+
throw new Error(
|
|
422
|
+
`Failed to verify domain verification request with ID ${id}: ${response.error.message}`
|
|
423
|
+
);
|
|
424
|
+
}
|
|
380
425
|
/**
|
|
381
426
|
* Verify a domain. Note, this requires the domain verification token to be already set up.
|
|
382
427
|
* @param domain The domain to verify.
|
|
@@ -501,7 +546,8 @@ ${response.error.message}`);
|
|
|
501
546
|
name,
|
|
502
547
|
public: pub = false,
|
|
503
548
|
source,
|
|
504
|
-
import: _import
|
|
549
|
+
import: _import,
|
|
550
|
+
defaultBranch
|
|
505
551
|
}) {
|
|
506
552
|
const response = await handleCreateRepo({
|
|
507
553
|
client: this.client,
|
|
@@ -509,7 +555,8 @@ ${response.error.message}`);
|
|
|
509
555
|
name,
|
|
510
556
|
public: pub,
|
|
511
557
|
source,
|
|
512
|
-
import: _import
|
|
558
|
+
import: _import,
|
|
559
|
+
defaultBranch
|
|
513
560
|
}
|
|
514
561
|
});
|
|
515
562
|
if (response.data) {
|
|
@@ -819,6 +866,122 @@ ${response.error.message}`);
|
|
|
819
866
|
`Failed to delete git trigger ${triggerId}: ${response.error.message}`
|
|
820
867
|
);
|
|
821
868
|
}
|
|
869
|
+
/**
|
|
870
|
+
* Set the default branch for a git repository.
|
|
871
|
+
*/
|
|
872
|
+
async setGitRepoDefaultBranch({
|
|
873
|
+
repoId,
|
|
874
|
+
defaultBranch
|
|
875
|
+
}) {
|
|
876
|
+
const response = await handleSetDefaultBranch({
|
|
877
|
+
client: this.client,
|
|
878
|
+
path: {
|
|
879
|
+
repo_id: repoId
|
|
880
|
+
},
|
|
881
|
+
body: {
|
|
882
|
+
defaultBranch
|
|
883
|
+
}
|
|
884
|
+
});
|
|
885
|
+
if (response.error) {
|
|
886
|
+
throw new Error(`Failed to set default branch: ${response.error}`);
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
/**
|
|
890
|
+
* Get the default branch for a git repository.
|
|
891
|
+
*/
|
|
892
|
+
async getGitRepoDefaultBranch({
|
|
893
|
+
repoId
|
|
894
|
+
}) {
|
|
895
|
+
const response = await handleGetDefaultBranch({
|
|
896
|
+
client: this.client,
|
|
897
|
+
path: { repo_id: repoId }
|
|
898
|
+
});
|
|
899
|
+
if (response.data) {
|
|
900
|
+
return response.data.defaultBranch;
|
|
901
|
+
}
|
|
902
|
+
throw new Error(
|
|
903
|
+
`Failed to get default branch for repository ${repoId}: ${response.error}`
|
|
904
|
+
);
|
|
905
|
+
}
|
|
906
|
+
/**
|
|
907
|
+
* Get the contents of a git repository at the given path.
|
|
908
|
+
*/
|
|
909
|
+
async getGitRepoContents({
|
|
910
|
+
repoId,
|
|
911
|
+
path,
|
|
912
|
+
ref
|
|
913
|
+
}) {
|
|
914
|
+
const response = await handleGetContents({
|
|
915
|
+
client: this.client,
|
|
916
|
+
path: {
|
|
917
|
+
repo: repoId,
|
|
918
|
+
"*path": path ?? null
|
|
919
|
+
},
|
|
920
|
+
query: {
|
|
921
|
+
ref
|
|
922
|
+
}
|
|
923
|
+
});
|
|
924
|
+
if (response.data) {
|
|
925
|
+
return response.data;
|
|
926
|
+
}
|
|
927
|
+
throw new Error(
|
|
928
|
+
`Failed to get git repository contents: ${response.error.message}`
|
|
929
|
+
);
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* Configure a git repository to sync with GitHub.
|
|
933
|
+
*/
|
|
934
|
+
async configureGitRepoGitHubSync({
|
|
935
|
+
repoId,
|
|
936
|
+
githubRepoName
|
|
937
|
+
}) {
|
|
938
|
+
const response = await configureGithubSync({
|
|
939
|
+
client: this.client,
|
|
940
|
+
path: {
|
|
941
|
+
repo_id: repoId
|
|
942
|
+
},
|
|
943
|
+
body: {
|
|
944
|
+
githubRepoName
|
|
945
|
+
}
|
|
946
|
+
});
|
|
947
|
+
if (response.error) {
|
|
948
|
+
throw new Error(`Failed to configure GitHub sync: ${response.error}`);
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
/**
|
|
952
|
+
* Remove the GitHub sync configuration for a git repository.
|
|
953
|
+
*/
|
|
954
|
+
async removeGitRepoGitHubSync({ repoId }) {
|
|
955
|
+
const response = await removeGithubSync({
|
|
956
|
+
client: this.client,
|
|
957
|
+
path: {
|
|
958
|
+
repo_id: repoId
|
|
959
|
+
}
|
|
960
|
+
});
|
|
961
|
+
if (response.error) {
|
|
962
|
+
throw new Error(`Failed to remove GitHub sync: ${response.error}`);
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
/**
|
|
966
|
+
* Get the GitHub sync configuration for a git repository.
|
|
967
|
+
*/
|
|
968
|
+
async getGitRepoGitHubSyncConfig({
|
|
969
|
+
repoId
|
|
970
|
+
}) {
|
|
971
|
+
const response = await getGithubSync({
|
|
972
|
+
client: this.client,
|
|
973
|
+
path: {
|
|
974
|
+
repo_id: repoId
|
|
975
|
+
}
|
|
976
|
+
});
|
|
977
|
+
if (response.response.status === 404) {
|
|
978
|
+
return null;
|
|
979
|
+
}
|
|
980
|
+
if (response.error) {
|
|
981
|
+
throw new Error(`Failed to get GitHub sync config: ${response.error}`);
|
|
982
|
+
}
|
|
983
|
+
return response.data ?? null;
|
|
984
|
+
}
|
|
822
985
|
/**
|
|
823
986
|
* Request a dev server for a repository. If a dev server is already running
|
|
824
987
|
* for that repository, it will return a url to that server. Dev servers are
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, D as DeploymentSource, b as FreestyleDeployWebConfiguration, 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 CreateRepoSource, q as CreateRepoImport, r as CreateRepositoryResponseSuccess, s as HandleListRepositoriesResponse, t as HandleDeleteRepoResponse, G as GitIdentity, u as HandleDeleteIdentityResponse, A as AccessLevel, v as HandleGrantPermissionResponse, L as ListPermissionResponseSuccess, w as DescribePermissionResponseSuccess, x as CreatedToken, y as ListGitTokensResponseSuccess, z as HandleListGitTriggersResponse, B as GitTrigger, E as GitTriggerAction, I as HandleCreateGitTriggerResponse } from './types.gen-
|
|
2
|
-
export {
|
|
1
|
+
import { F as FreestyleExecuteScriptParamsConfiguration, a as FreestyleExecuteScriptResultSuccess, D as DeploymentSource, b as FreestyleDeployWebConfiguration, 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 CreateRepoSource, q as CreateRepoImport, r as CreateRepositoryResponseSuccess, s as HandleListRepositoriesResponse, t as HandleDeleteRepoResponse, G as GitIdentity, u as HandleDeleteIdentityResponse, A as AccessLevel, v as HandleGrantPermissionResponse, L as ListPermissionResponseSuccess, w as DescribePermissionResponseSuccess, x as CreatedToken, y as ListGitTokensResponseSuccess, z as HandleListGitTriggersResponse, B as GitTrigger, E as GitTriggerAction, I as HandleCreateGitTriggerResponse, S as SetDefaultBranchRequest, J as HandleGetContentsResponse, K as GetGithubSyncResponse } from './types.gen-BWwhCgTX.js';
|
|
2
|
+
export { O as AccessTokenInfo, N as AccessibleRepository, P as Behavior, Q as BlobEncoding, R as BlobObject, T as BranchDetails, U as CommitObject, V as CommitParent, W as CommitTree, cH as ConfigureGithubSyncData, cJ as ConfigureGithubSyncError, X as ConfigureGithubSyncRequest, cI as ConfigureGithubSyncResponse, Y as CreateDomainMappingRequest, Z as CreateRecordParams, $ as CreateRepoRequest, a0 as CreateRepositoryRequest, a2 as CustomBuildOptions, M as DeploymentBuildOptions, a3 as DeploymentLogEntry, a5 as DeploymentState, a6 as DevServer, a8 as DevServerRequest, a9 as DevServerStatusRequest, aa as DevServerWatchFilesRequest, ab as DnsRecord, ac as DnsRecordData, ad as DnsRecordKind, ae as DomainVerificationRequest, af as ExecRequest, ag as ExecuteLogEntry, ah as ExecuteRunInfo, ai as ExecuteRunState, aj as FileReadContent, al as FreestyleCloudstateDeployConfiguration, am as FreestyleCloudstateDeployErrorResponse, an as FreestyleDeleteDomainVerificationRequest, ao as FreestyleDeployWebErrorResponse, ap as FreestyleDeployWebPayload, aq as FreestyleDeployWebPayloadV2, ar as FreestyleDomainVerificationRequest, as as FreestyleExecuteScriptParams, at as FreestyleFile, au as FreestyleGetLogsResponse, av as FreestyleJavaScriptLog, aw as FreestyleLogResponseObject, ax as FreestyleNetworkPermission, az as FreestyleVerifyDomainRequest, aA as GetDefaultBranchResponse, cF as GetGithubSyncData, cG as GetGithubSyncError, aB as GitCommitPushRequest, aC as GitContents, aE as GitContentsDirEntryItem, aH as GitReference, aI as GitRepositoryTrigger, aF as GithubRepoSyncConfig, aG as GithubSyncConfigResponse, aL as GrantPermissionRequest, b7 as HandleBackupCloudstateData, b8 as HandleBackupCloudstateError, bt as HandleCreateDomainVerificationData, bu as HandleCreateDomainVerificationError, co as HandleCreateGitTokenData, cq as HandleCreateGitTokenError, cp as HandleCreateGitTokenResponse, dc as HandleCreateGitTriggerData, dd as HandleCreateGitTriggerError, c4 as HandleCreateIdentityError, c3 as HandleCreateIdentityResponse, bc as HandleCreateRecordData, be as HandleCreateRecordError, bd as HandleCreateRecordResponse, cw as HandleCreateRepoData, cy as HandleCreateRepoError, cx as HandleCreateRepoResponse, bo as HandleDeleteDomainMappingData, bq as HandleDeleteDomainMappingError, bp as HandleDeleteDomainMappingResponse, bv as HandleDeleteDomainVerificationData, bw as HandleDeleteDomainVerificationError, de as HandleDeleteGitTriggerData, dg as HandleDeleteGitTriggerError, df as HandleDeleteGitTriggerResponse, c5 as HandleDeleteIdentityData, c6 as HandleDeleteIdentityError, bf as HandleDeleteRecordData, bh as HandleDeleteRecordError, bg as HandleDeleteRecordResponse, cN as HandleDeleteRepoData, cO as HandleDeleteRepoError, b4 as HandleDeployCloudstateData, b6 as HandleDeployCloudstateError, b5 as HandleDeployCloudstateResponse, dm as HandleDeployWebData, dp as HandleDeployWebError, dn as HandleDeployWebResponse, dq as HandleDeployWebV2Data, ds as HandleDeployWebV2Error, dr as HandleDeployWebV2Response, ca as HandleDescribePermissionData, cc as HandleDescribePermissionError, cb as HandleDescribePermissionResponse, bP as HandleDevServerStatusData, bR as HandleDevServerStatusError, bQ as HandleDevServerStatusResponse, d7 as HandleDownloadTarballData, d9 as HandleDownloadTarballError, d8 as HandleDownloadTarballResponse, dh as HandleDownloadZipData, dj as HandleDownloadZipError, di as HandleDownloadZipResponse, bx as HandleEphemeralDevServerData, bz as HandleEphemeralDevServerError, by as HandleEphemeralDevServerResponse, bA as HandleExecOnEphemeralDevServerData, bC as HandleExecOnEphemeralDevServerError, bB as HandleExecOnEphemeralDevServerResponse, bZ as HandleExecuteScriptData, b$ as HandleExecuteScriptError, b_ as HandleExecuteScriptResponse, cR as HandleGetBlobData, cT as HandleGetBlobError, cS as HandleGetBlobResponse, cU as HandleGetCommitData, cW as HandleGetCommitError, cV as HandleGetCommitResponse, cP as HandleGetContentsData, cQ as HandleGetContentsError, cz as HandleGetDefaultBranchData, cB as HandleGetDefaultBranchError, cA as HandleGetDefaultBranchResponse, bX as HandleGetExecuteRunData, bY as HandleGetExecuteRunError, dk as HandleGetLogsData, dl as HandleGetLogsError, cX as HandleGetRefBranchData, cZ as HandleGetRefBranchError, cY as HandleGetRefBranchResponse, c_ as HandleGetRefTagData, d0 as HandleGetRefTagError, c$ as HandleGetRefTagResponse, d1 as HandleGetTagData, d3 as HandleGetTagError, d2 as HandleGetTagResponse, d4 as HandleGetTreeData, d6 as HandleGetTreeError, d5 as HandleGetTreeResponse, dv as HandleGetWebDeployDetailsData, bJ as HandleGitCommitPushData, bL as HandleGitCommitPushError, bK as HandleGitCommitPushResponse, cd as HandleGrantPermissionData, ce as HandleGrantPermissionError, bl as HandleInsertDomainMappingData, bn as HandleInsertDomainMappingError, bm as HandleInsertDomainMappingResponse, br as HandleListDomainVerificationRequestsError, bk as HandleListDomainsError, bV as HandleListExecuteRunsData, bW as HandleListExecuteRunsError, cl as HandleListGitTokensData, cn as HandleListGitTokensError, cm as HandleListGitTokensResponse, da as HandleListGitTriggersData, db as HandleListGitTriggersError, c0 as HandleListIdentitiesData, c2 as HandleListIdentitiesError, c1 as HandleListIdentitiesResponse, c7 as HandleListPermissionsData, c9 as HandleListPermissionsError, c8 as HandleListPermissionsResponse, b9 as HandleListRecordsData, bb as HandleListRecordsError, ba as HandleListRecordsResponse, cu as HandleListRepositoriesData, cv as HandleListRepositoriesError, dt as HandleListWebDeploysData, du as HandleListWebDeploysError, bG as HandleReadFileFromEphemeralDevServerData, bI as HandleReadFileFromEphemeralDevServerError, bH as HandleReadFileFromEphemeralDevServerResponse, cr as HandleRevokeGitTokenData, ct as HandleRevokeGitTokenError, cs as HandleRevokeGitTokenResponse, cf as HandleRevokePermissionData, ch as HandleRevokePermissionError, cg as HandleRevokePermissionResponse, cC as HandleSetDefaultBranchData, cE as HandleSetDefaultBranchError, cD as HandleSetDefaultBranchResponse, bM as HandleShutdownDevServerData, bO as HandleShutdownDevServerError, bN as HandleShutdownDevServerResponse, ci as HandleUpdatePermissionData, ck as HandleUpdatePermissionError, cj as HandleUpdatePermissionResponse, bs as HandleVerifyDomainData, bi as HandleVerifyWildcardData, bj as HandleVerifyWildcardError, bS as HandleWatchDevServerFilesData, bU as HandleWatchDevServerFilesError, bT as HandleWatchDevServerFilesResponse, bD as HandleWriteFileFromEphemeralDevServerData, bF as HandleWriteFileFromEphemeralDevServerError, bE as HandleWriteFileFromEphemeralDevServerResponse, aM as InternalServerError, aN as ListRecordsResponse, aO as NetworkPermissionData, aP as ReadFileEphemeralDevServerResponses, aQ as ReadFileRequest, cK as RemoveGithubSyncData, cM as RemoveGithubSyncError, cL as RemoveGithubSyncResponse, aR as RepositoryInfo, aS as RepositoryMetadata, aT as RevokeGitTokenRequest, aU as SetDefaultBranchResponse, aV as ShutdownDevServerRequest, aW as Signature, aX as TagDetails, aY as TagObject, aZ as TagTarget, a_ as TreeEntry, b0 as TreeObject, b1 as UpdatePermissionRequest, b2 as Visibility, b3 as WriteFileRequest, ay as action, aK as action2, aJ as event, a4 as kind, a7 as kind2, ak as kind3, _ as type, a1 as type2, aD as type3, a$ as type4 } from './types.gen-BWwhCgTX.js';
|
|
3
3
|
|
|
4
4
|
interface FreestyleDevServer {
|
|
5
5
|
/**
|
|
@@ -155,6 +155,7 @@ declare class FreestyleSandboxes {
|
|
|
155
155
|
* @returns The domain verification token.
|
|
156
156
|
*/
|
|
157
157
|
createDomainVerificationRequest(domain: string): Promise<HandleCreateDomainVerificationResponse>;
|
|
158
|
+
verifyDomainVerificationRequest(id: string): Promise<HandleVerifyDomainResponse>;
|
|
158
159
|
/**
|
|
159
160
|
* Verify a domain. Note, this requires the domain verification token to be already set up.
|
|
160
161
|
* @param domain The domain to verify.
|
|
@@ -172,9 +173,10 @@ declare class FreestyleSandboxes {
|
|
|
172
173
|
/**
|
|
173
174
|
* Create a new git repository.
|
|
174
175
|
*/
|
|
175
|
-
createGitRepository({ name, public: pub, source, import: _import, }: {
|
|
176
|
+
createGitRepository({ name, public: pub, source, import: _import, defaultBranch, }: {
|
|
176
177
|
name?: string;
|
|
177
178
|
public?: boolean;
|
|
179
|
+
defaultBranch?: string;
|
|
178
180
|
} & (CreateGitRepositorySource | CreateGitRepositoryImport)): Promise<CreateRepositoryResponseSuccess>;
|
|
179
181
|
/**
|
|
180
182
|
* List git repositories.
|
|
@@ -274,6 +276,45 @@ declare class FreestyleSandboxes {
|
|
|
274
276
|
deleteGitTrigger({ triggerId }: {
|
|
275
277
|
triggerId: string;
|
|
276
278
|
}): Promise<void>;
|
|
279
|
+
/**
|
|
280
|
+
* Set the default branch for a git repository.
|
|
281
|
+
*/
|
|
282
|
+
setGitRepoDefaultBranch({ repoId, defaultBranch, }: SetDefaultBranchRequest & {
|
|
283
|
+
repoId: string;
|
|
284
|
+
}): Promise<void>;
|
|
285
|
+
/**
|
|
286
|
+
* Get the default branch for a git repository.
|
|
287
|
+
*/
|
|
288
|
+
getGitRepoDefaultBranch({ repoId, }: {
|
|
289
|
+
repoId: string;
|
|
290
|
+
}): Promise<string>;
|
|
291
|
+
/**
|
|
292
|
+
* Get the contents of a git repository at the given path.
|
|
293
|
+
*/
|
|
294
|
+
getGitRepoContents({ repoId, path, ref, }: {
|
|
295
|
+
repoId: string;
|
|
296
|
+
path?: string;
|
|
297
|
+
ref?: string;
|
|
298
|
+
}): Promise<HandleGetContentsResponse>;
|
|
299
|
+
/**
|
|
300
|
+
* Configure a git repository to sync with GitHub.
|
|
301
|
+
*/
|
|
302
|
+
configureGitRepoGitHubSync({ repoId, githubRepoName, }: {
|
|
303
|
+
repoId: string;
|
|
304
|
+
githubRepoName: string;
|
|
305
|
+
}): Promise<void>;
|
|
306
|
+
/**
|
|
307
|
+
* Remove the GitHub sync configuration for a git repository.
|
|
308
|
+
*/
|
|
309
|
+
removeGitRepoGitHubSync({ repoId }: {
|
|
310
|
+
repoId: string;
|
|
311
|
+
}): Promise<void>;
|
|
312
|
+
/**
|
|
313
|
+
* Get the GitHub sync configuration for a git repository.
|
|
314
|
+
*/
|
|
315
|
+
getGitRepoGitHubSyncConfig({ repoId, }: {
|
|
316
|
+
repoId: any;
|
|
317
|
+
}): Promise<GetGithubSyncResponse | null>;
|
|
277
318
|
/**
|
|
278
319
|
* Request a dev server for a repository. If a dev server is already running
|
|
279
320
|
* for that repository, it will return a url to that server. Dev servers are
|
|
@@ -300,4 +341,4 @@ declare class FreestyleSandboxes {
|
|
|
300
341
|
fetch(path: string, init?: RequestInit): Promise<Response>;
|
|
301
342
|
}
|
|
302
343
|
|
|
303
|
-
export { AccessLevel, CreateRepoImport, CreateRepoSource, CreateRepositoryResponseSuccess, CreatedToken, DeploymentSource, DescribePermissionResponseSuccess, FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponseV2, type FreestyleDevServer, type FreestyleDevServerFilesystem, FreestyleExecuteScriptParamsConfiguration, FreestyleExecuteScriptResultSuccess, FreestyleSandboxes, GitIdentity, GitTrigger, GitTriggerAction, HandleBackupCloudstateResponse, HandleCreateDomainVerificationResponse, HandleCreateGitTriggerResponse, HandleDeleteDomainVerificationResponse, HandleDeleteIdentityResponse, HandleDeleteRepoResponse, HandleGetExecuteRunResponse, HandleGetLogsResponse, HandleGrantPermissionResponse, HandleListDomainVerificationRequestsResponse, HandleListDomainsResponse, HandleListExecuteRunsResponse, HandleListGitTriggersResponse, HandleListRepositoriesResponse, HandleListWebDeploysResponse, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleVerifyWildcardResponse, ListGitTokensResponseSuccess, ListPermissionResponseSuccess };
|
|
344
|
+
export { AccessLevel, CreateRepoImport, CreateRepoSource, CreateRepositoryResponseSuccess, CreatedToken, DeploymentSource, DescribePermissionResponseSuccess, FreestyleCloudstateDeployRequest, FreestyleCloudstateDeploySuccessResponse, FreestyleDeployWebConfiguration, FreestyleDeployWebSuccessResponseV2, type FreestyleDevServer, type FreestyleDevServerFilesystem, FreestyleExecuteScriptParamsConfiguration, FreestyleExecuteScriptResultSuccess, FreestyleSandboxes, GetGithubSyncResponse, GitIdentity, GitTrigger, GitTriggerAction, HandleBackupCloudstateResponse, HandleCreateDomainVerificationResponse, HandleCreateGitTriggerResponse, HandleDeleteDomainVerificationResponse, HandleDeleteIdentityResponse, HandleDeleteRepoResponse, HandleGetContentsResponse, HandleGetExecuteRunResponse, HandleGetLogsResponse, HandleGrantPermissionResponse, HandleListDomainVerificationRequestsResponse, HandleListDomainsResponse, HandleListExecuteRunsResponse, HandleListGitTriggersResponse, HandleListRepositoriesResponse, HandleListWebDeploysResponse, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleVerifyWildcardResponse, ListGitTokensResponseSuccess, ListPermissionResponseSuccess, SetDefaultBranchRequest };
|