freestyle-sandboxes 0.0.83 → 0.0.85

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.
Files changed (53) hide show
  1. package/dist/ai/inde.d.cts +1 -1
  2. package/dist/ai/inde.d.mts +1 -1
  3. package/dist/ai/index.d.cts +1 -1
  4. package/dist/ai/index.d.mts +1 -1
  5. package/dist/inde.d.cts +45 -4
  6. package/dist/inde.d.mts +45 -4
  7. package/dist/{index-CGc0kRd_.cjs → index-BBXyg0JQ.cjs} +5 -9
  8. package/dist/index-BQHqnjZK.mjs +3231 -0
  9. package/dist/index-CEEa9WHp.cjs +3238 -0
  10. package/dist/{index-jh-93svX.mjs → index-DCF70Xbq.mjs} +5 -9
  11. package/dist/index.cjs +172 -9
  12. package/dist/index.d.cts +45 -4
  13. package/dist/index.d.mts +45 -4
  14. package/dist/index.mjs +172 -9
  15. package/dist/langgraph/inde.d.cts +1 -1
  16. package/dist/langgraph/inde.d.mts +1 -1
  17. package/dist/langgraph/index.d.cts +1 -1
  18. package/dist/langgraph/index.d.mts +1 -1
  19. package/dist/mastra/inde.d.cts +1 -1
  20. package/dist/mastra/inde.d.mts +1 -1
  21. package/dist/mastra/index.d.cts +1 -1
  22. package/dist/mastra/index.d.mts +1 -1
  23. package/dist/types.gen-1sd31qLV.d.ts +172 -0
  24. package/dist/types.gen-627pxroW.d.ts +830 -0
  25. package/dist/types.gen-BCdfx7yt.d.ts +760 -0
  26. package/dist/{types.gen-0bQ5Wn0o.d.ts → types.gen-BVXmFV7d.d.ts} +17 -18
  27. package/dist/types.gen-BWwhCgTX.d.ts +1462 -0
  28. package/dist/types.gen-BaMKzqxQ.d.ts +233 -0
  29. package/dist/types.gen-BbekD8Sd.d.ts +1119 -0
  30. package/dist/types.gen-BqN1t03N.d.ts +842 -0
  31. package/dist/types.gen-BtK6PMQy.d.ts +195 -0
  32. package/dist/types.gen-C03gaIPq.d.ts +297 -0
  33. package/dist/{types.gen-BJArgpto.d.ts → types.gen-CIf3ciN7.d.ts} +5 -2
  34. package/dist/types.gen-CMuCas4r.d.ts +183 -0
  35. package/dist/{types.gen-DxZanGNF.d.ts → types.gen-CZUnqmzP.d.ts} +6 -9
  36. package/dist/types.gen-CnEkmbco.d.ts +314 -0
  37. package/dist/types.gen-DDYpuDzZ.d.ts +764 -0
  38. package/dist/types.gen-DHmdEOOa.d.ts +172 -0
  39. package/dist/{types.gen-CfrGF-JI.d.ts → types.gen-DLYohMJT.d.ts} +1 -1
  40. package/dist/types.gen-DbTb_SrD.d.ts +156 -0
  41. package/dist/types.gen-DkQ-Dbs1.d.ts +764 -0
  42. package/dist/types.gen-DyY7Deri.d.ts +138 -0
  43. package/dist/types.gen-MBZCvIhE.d.ts +311 -0
  44. package/dist/types.gen-YhJAHBw8.d.ts +233 -0
  45. package/dist/types.gen-cCnnhnB6.d.ts +182 -0
  46. package/dist/types.gen-mg_JNXrq.d.ts +830 -0
  47. package/dist/types.gen-uDTr6v-7.d.ts +731 -0
  48. package/dist/utils/inde.d.cts +1 -1
  49. package/dist/utils/inde.d.mts +1 -1
  50. package/dist/utils/index.d.cts +1 -1
  51. package/dist/utils/index.d.mts +1 -1
  52. package/package.json +1 -1
  53. package/src/index.ts +44 -44
@@ -3167,12 +3167,11 @@ const executeTool = (config) => {
3167
3167
  return tool({
3168
3168
  description: executeCodeDescription(envVars, nodeModules),
3169
3169
  parameters: executeCodeSchema,
3170
- execute: async ({ script, ...otherParams }, { toolCallId }) => {
3170
+ execute: async ({ script, ...otherParams }) => {
3171
3171
  try {
3172
3172
  const res = await api.executeScript(script, config);
3173
3173
  if (config.onResult) {
3174
3174
  await config.onResult({
3175
- toolCallId,
3176
3175
  result: res,
3177
3176
  input: {
3178
3177
  script,
@@ -3215,13 +3214,10 @@ ${nodeModules.length > 0 ? `You can use the following node modules: ${nodeModule
3215
3214
  `)
3216
3215
  }),
3217
3216
  execute: async ({ files }) => {
3218
- const new_files = Object.keys(files).reduce(
3219
- (acc, key) => {
3220
- acc[key] = { content: files[key] };
3221
- return acc;
3222
- },
3223
- {}
3224
- );
3217
+ const new_files = Object.keys(files).reduce((acc, key) => {
3218
+ acc[key] = { content: files[key] };
3219
+ return acc;
3220
+ }, {});
3225
3221
  try {
3226
3222
  const res = await api.deployWeb(
3227
3223
  {
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
@@ -923,7 +1086,7 @@ ${response.error.message}`);
923
1086
  const response2 = await handleReadFileFromEphemeralDevServer({
924
1087
  client,
925
1088
  path: {
926
- filepath: path
1089
+ "*filepath": path
927
1090
  },
928
1091
  body: {
929
1092
  devServer: devServerInstance,
@@ -1006,7 +1169,7 @@ ${response.error.message}`);
1006
1169
  const response2 = await handleWriteFileFromEphemeralDevServer({
1007
1170
  client,
1008
1171
  path: {
1009
- filepath: path
1172
+ "*filepath": path
1010
1173
  },
1011
1174
  body: {
1012
1175
  devServer: devServerInstance,
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-DkFlXKTr.js';
2
- export { M as AccessTokenInfo, K as AccessibleRepository, N as Behavior, O as BlobEncoding, P as BlobObject, Q as CommitObject, R as CommitParent, S as CommitTree, T as CreateDomainMappingRequest, U as CreateRecordParams, W as CreateRepoRequest, X as CreateRepositoryRequest, Z as CustomBuildOptions, J as DeploymentBuildOptions, _ as DeploymentLogEntry, a0 as DeploymentState, a1 as DevServer, a3 as DevServerRequest, a4 as DevServerStatusRequest, a5 as DevServerWatchFilesRequest, a6 as DnsRecord, a7 as DnsRecordData, a8 as DnsRecordKind, a9 as DomainVerificationRequest, aa as ExecRequest, ab as ExecuteLogEntry, ac as ExecuteRunInfo, ad as ExecuteRunState, ae as FileReadContent, ag as FreestyleCloudstateDeployConfiguration, ah as FreestyleCloudstateDeployErrorResponse, ai as FreestyleDeleteDomainVerificationRequest, aj as FreestyleDeployWebErrorResponse, ak as FreestyleDeployWebPayload, al as FreestyleDeployWebPayloadV2, am as FreestyleDomainVerificationRequest, an as FreestyleExecuteScriptParams, ao as FreestyleFile, ap as FreestyleGetLogsResponse, aq as FreestyleJavaScriptLog, ar as FreestyleLogResponseObject, as as FreestyleNetworkPermission, au as FreestyleVerifyDomainRequest, av as GitCommitPushRequest, aw as GitContents, ay as GitContentsDirEntryItem, az as GitReference, aA as GitRepositoryTrigger, aD as GrantPermissionRequest, aY as HandleBackupCloudstateData, aZ as HandleBackupCloudstateError, bi as HandleCreateDomainVerificationData, bj as HandleCreateDomainVerificationError, cd as HandleCreateGitTokenData, cf as HandleCreateGitTokenError, ce as HandleCreateGitTokenResponse, cQ as HandleCreateGitTriggerData, cR as HandleCreateGitTriggerError, bV as HandleCreateIdentityError, bU as HandleCreateIdentityResponse, b1 as HandleCreateRecordData, b3 as HandleCreateRecordError, b2 as HandleCreateRecordResponse, cl as HandleCreateRepoData, cn as HandleCreateRepoError, cm as HandleCreateRepoResponse, bd as HandleDeleteDomainMappingData, bf as HandleDeleteDomainMappingError, be as HandleDeleteDomainMappingResponse, bk as HandleDeleteDomainVerificationData, bl as HandleDeleteDomainVerificationError, cS as HandleDeleteGitTriggerData, cU as HandleDeleteGitTriggerError, cT as HandleDeleteGitTriggerResponse, bW as HandleDeleteIdentityData, bX as HandleDeleteIdentityError, b4 as HandleDeleteRecordData, b6 as HandleDeleteRecordError, b5 as HandleDeleteRecordResponse, co as HandleDeleteRepoData, cp as HandleDeleteRepoError, aV as HandleDeployCloudstateData, aX as HandleDeployCloudstateError, aW as HandleDeployCloudstateResponse, c_ as HandleDeployWebData, d0 as HandleDeployWebError, c$ as HandleDeployWebResponse, d1 as HandleDeployWebV2Data, d3 as HandleDeployWebV2Error, d2 as HandleDeployWebV2Response, b$ as HandleDescribePermissionData, c1 as HandleDescribePermissionError, c0 as HandleDescribePermissionResponse, bE as HandleDevServerStatusData, bG as HandleDevServerStatusError, bF as HandleDevServerStatusResponse, cL as HandleDownloadTarballData, cN as HandleDownloadTarballError, cM as HandleDownloadTarballResponse, cV as HandleDownloadZipData, cX as HandleDownloadZipError, cW as HandleDownloadZipResponse, bm as HandleEphemeralDevServerData, bo as HandleEphemeralDevServerError, bn as HandleEphemeralDevServerResponse, bp as HandleExecOnEphemeralDevServerData, br as HandleExecOnEphemeralDevServerError, bq as HandleExecOnEphemeralDevServerResponse, bO as HandleExecuteScriptData, bQ as HandleExecuteScriptError, bP as HandleExecuteScriptResponse, ct as HandleGetBlobData, cv as HandleGetBlobError, cu as HandleGetBlobResponse, cw as HandleGetCommitData, cy as HandleGetCommitError, cx as HandleGetCommitResponse, cq as HandleGetContentsData, cs as HandleGetContentsError, cr as HandleGetContentsResponse, bM as HandleGetExecuteRunData, bN as HandleGetExecuteRunError, cY as HandleGetLogsData, cZ as HandleGetLogsError, cz as HandleGetRefBranchData, cB as HandleGetRefBranchError, cA as HandleGetRefBranchResponse, cC as HandleGetRefTagData, cE as HandleGetRefTagError, cD as HandleGetRefTagResponse, cF as HandleGetTagData, cH as HandleGetTagError, cG as HandleGetTagResponse, cI as HandleGetTreeData, cK as HandleGetTreeError, cJ as HandleGetTreeResponse, d6 as HandleGetWebDeployDetailsData, by as HandleGitCommitPushData, bA as HandleGitCommitPushError, bz as HandleGitCommitPushResponse, c2 as HandleGrantPermissionData, c3 as HandleGrantPermissionError, ba as HandleInsertDomainMappingData, bc as HandleInsertDomainMappingError, bb as HandleInsertDomainMappingResponse, bg as HandleListDomainVerificationRequestsError, b9 as HandleListDomainsError, bK as HandleListExecuteRunsData, bL as HandleListExecuteRunsError, ca as HandleListGitTokensData, cc as HandleListGitTokensError, cb as HandleListGitTokensResponse, cO as HandleListGitTriggersData, cP as HandleListGitTriggersError, bR as HandleListIdentitiesData, bT as HandleListIdentitiesError, bS as HandleListIdentitiesResponse, bY as HandleListPermissionsData, b_ as HandleListPermissionsError, bZ as HandleListPermissionsResponse, a_ as HandleListRecordsData, b0 as HandleListRecordsError, a$ as HandleListRecordsResponse, cj as HandleListRepositoriesData, ck as HandleListRepositoriesError, d4 as HandleListWebDeploysData, d5 as HandleListWebDeploysError, bv as HandleReadFileFromEphemeralDevServerData, bx as HandleReadFileFromEphemeralDevServerError, bw as HandleReadFileFromEphemeralDevServerResponse, cg as HandleRevokeGitTokenData, ci as HandleRevokeGitTokenError, ch as HandleRevokeGitTokenResponse, c4 as HandleRevokePermissionData, c6 as HandleRevokePermissionError, c5 as HandleRevokePermissionResponse, bB as HandleShutdownDevServerData, bD as HandleShutdownDevServerError, bC as HandleShutdownDevServerResponse, c7 as HandleUpdatePermissionData, c9 as HandleUpdatePermissionError, c8 as HandleUpdatePermissionResponse, bh as HandleVerifyDomainData, b7 as HandleVerifyWildcardData, b8 as HandleVerifyWildcardError, bH as HandleWatchDevServerFilesData, bJ as HandleWatchDevServerFilesError, bI as HandleWatchDevServerFilesResponse, bs as HandleWriteFileFromEphemeralDevServerData, bu as HandleWriteFileFromEphemeralDevServerError, bt as HandleWriteFileFromEphemeralDevServerResponse, aE as InternalServerError, aF as ListRecordsResponse, aG as NetworkPermissionData, aH as ReadFileEphemeralDevServerResponses, aI as ReadFileRequest, aJ as RepositoryInfo, aK as RevokeGitTokenRequest, aL as ShutdownDevServerRequest, aM as Signature, aN as TagObject, aO as TagTarget, aP as TreeEntry, aR as TreeObject, aS as UpdatePermissionRequest, aT as Visibility, aU as WriteFileRequest, at as action, aC as action2, aB as event, $ as kind, a2 as kind2, af as kind3, V as type, Y as type2, ax as type3, aQ as type4 } from './types.gen-DkFlXKTr.js';
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.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-DkFlXKTr.js';
2
- export { M as AccessTokenInfo, K as AccessibleRepository, N as Behavior, O as BlobEncoding, P as BlobObject, Q as CommitObject, R as CommitParent, S as CommitTree, T as CreateDomainMappingRequest, U as CreateRecordParams, W as CreateRepoRequest, X as CreateRepositoryRequest, Z as CustomBuildOptions, J as DeploymentBuildOptions, _ as DeploymentLogEntry, a0 as DeploymentState, a1 as DevServer, a3 as DevServerRequest, a4 as DevServerStatusRequest, a5 as DevServerWatchFilesRequest, a6 as DnsRecord, a7 as DnsRecordData, a8 as DnsRecordKind, a9 as DomainVerificationRequest, aa as ExecRequest, ab as ExecuteLogEntry, ac as ExecuteRunInfo, ad as ExecuteRunState, ae as FileReadContent, ag as FreestyleCloudstateDeployConfiguration, ah as FreestyleCloudstateDeployErrorResponse, ai as FreestyleDeleteDomainVerificationRequest, aj as FreestyleDeployWebErrorResponse, ak as FreestyleDeployWebPayload, al as FreestyleDeployWebPayloadV2, am as FreestyleDomainVerificationRequest, an as FreestyleExecuteScriptParams, ao as FreestyleFile, ap as FreestyleGetLogsResponse, aq as FreestyleJavaScriptLog, ar as FreestyleLogResponseObject, as as FreestyleNetworkPermission, au as FreestyleVerifyDomainRequest, av as GitCommitPushRequest, aw as GitContents, ay as GitContentsDirEntryItem, az as GitReference, aA as GitRepositoryTrigger, aD as GrantPermissionRequest, aY as HandleBackupCloudstateData, aZ as HandleBackupCloudstateError, bi as HandleCreateDomainVerificationData, bj as HandleCreateDomainVerificationError, cd as HandleCreateGitTokenData, cf as HandleCreateGitTokenError, ce as HandleCreateGitTokenResponse, cQ as HandleCreateGitTriggerData, cR as HandleCreateGitTriggerError, bV as HandleCreateIdentityError, bU as HandleCreateIdentityResponse, b1 as HandleCreateRecordData, b3 as HandleCreateRecordError, b2 as HandleCreateRecordResponse, cl as HandleCreateRepoData, cn as HandleCreateRepoError, cm as HandleCreateRepoResponse, bd as HandleDeleteDomainMappingData, bf as HandleDeleteDomainMappingError, be as HandleDeleteDomainMappingResponse, bk as HandleDeleteDomainVerificationData, bl as HandleDeleteDomainVerificationError, cS as HandleDeleteGitTriggerData, cU as HandleDeleteGitTriggerError, cT as HandleDeleteGitTriggerResponse, bW as HandleDeleteIdentityData, bX as HandleDeleteIdentityError, b4 as HandleDeleteRecordData, b6 as HandleDeleteRecordError, b5 as HandleDeleteRecordResponse, co as HandleDeleteRepoData, cp as HandleDeleteRepoError, aV as HandleDeployCloudstateData, aX as HandleDeployCloudstateError, aW as HandleDeployCloudstateResponse, c_ as HandleDeployWebData, d0 as HandleDeployWebError, c$ as HandleDeployWebResponse, d1 as HandleDeployWebV2Data, d3 as HandleDeployWebV2Error, d2 as HandleDeployWebV2Response, b$ as HandleDescribePermissionData, c1 as HandleDescribePermissionError, c0 as HandleDescribePermissionResponse, bE as HandleDevServerStatusData, bG as HandleDevServerStatusError, bF as HandleDevServerStatusResponse, cL as HandleDownloadTarballData, cN as HandleDownloadTarballError, cM as HandleDownloadTarballResponse, cV as HandleDownloadZipData, cX as HandleDownloadZipError, cW as HandleDownloadZipResponse, bm as HandleEphemeralDevServerData, bo as HandleEphemeralDevServerError, bn as HandleEphemeralDevServerResponse, bp as HandleExecOnEphemeralDevServerData, br as HandleExecOnEphemeralDevServerError, bq as HandleExecOnEphemeralDevServerResponse, bO as HandleExecuteScriptData, bQ as HandleExecuteScriptError, bP as HandleExecuteScriptResponse, ct as HandleGetBlobData, cv as HandleGetBlobError, cu as HandleGetBlobResponse, cw as HandleGetCommitData, cy as HandleGetCommitError, cx as HandleGetCommitResponse, cq as HandleGetContentsData, cs as HandleGetContentsError, cr as HandleGetContentsResponse, bM as HandleGetExecuteRunData, bN as HandleGetExecuteRunError, cY as HandleGetLogsData, cZ as HandleGetLogsError, cz as HandleGetRefBranchData, cB as HandleGetRefBranchError, cA as HandleGetRefBranchResponse, cC as HandleGetRefTagData, cE as HandleGetRefTagError, cD as HandleGetRefTagResponse, cF as HandleGetTagData, cH as HandleGetTagError, cG as HandleGetTagResponse, cI as HandleGetTreeData, cK as HandleGetTreeError, cJ as HandleGetTreeResponse, d6 as HandleGetWebDeployDetailsData, by as HandleGitCommitPushData, bA as HandleGitCommitPushError, bz as HandleGitCommitPushResponse, c2 as HandleGrantPermissionData, c3 as HandleGrantPermissionError, ba as HandleInsertDomainMappingData, bc as HandleInsertDomainMappingError, bb as HandleInsertDomainMappingResponse, bg as HandleListDomainVerificationRequestsError, b9 as HandleListDomainsError, bK as HandleListExecuteRunsData, bL as HandleListExecuteRunsError, ca as HandleListGitTokensData, cc as HandleListGitTokensError, cb as HandleListGitTokensResponse, cO as HandleListGitTriggersData, cP as HandleListGitTriggersError, bR as HandleListIdentitiesData, bT as HandleListIdentitiesError, bS as HandleListIdentitiesResponse, bY as HandleListPermissionsData, b_ as HandleListPermissionsError, bZ as HandleListPermissionsResponse, a_ as HandleListRecordsData, b0 as HandleListRecordsError, a$ as HandleListRecordsResponse, cj as HandleListRepositoriesData, ck as HandleListRepositoriesError, d4 as HandleListWebDeploysData, d5 as HandleListWebDeploysError, bv as HandleReadFileFromEphemeralDevServerData, bx as HandleReadFileFromEphemeralDevServerError, bw as HandleReadFileFromEphemeralDevServerResponse, cg as HandleRevokeGitTokenData, ci as HandleRevokeGitTokenError, ch as HandleRevokeGitTokenResponse, c4 as HandleRevokePermissionData, c6 as HandleRevokePermissionError, c5 as HandleRevokePermissionResponse, bB as HandleShutdownDevServerData, bD as HandleShutdownDevServerError, bC as HandleShutdownDevServerResponse, c7 as HandleUpdatePermissionData, c9 as HandleUpdatePermissionError, c8 as HandleUpdatePermissionResponse, bh as HandleVerifyDomainData, b7 as HandleVerifyWildcardData, b8 as HandleVerifyWildcardError, bH as HandleWatchDevServerFilesData, bJ as HandleWatchDevServerFilesError, bI as HandleWatchDevServerFilesResponse, bs as HandleWriteFileFromEphemeralDevServerData, bu as HandleWriteFileFromEphemeralDevServerError, bt as HandleWriteFileFromEphemeralDevServerResponse, aE as InternalServerError, aF as ListRecordsResponse, aG as NetworkPermissionData, aH as ReadFileEphemeralDevServerResponses, aI as ReadFileRequest, aJ as RepositoryInfo, aK as RevokeGitTokenRequest, aL as ShutdownDevServerRequest, aM as Signature, aN as TagObject, aO as TagTarget, aP as TreeEntry, aR as TreeObject, aS as UpdatePermissionRequest, aT as Visibility, aU as WriteFileRequest, at as action, aC as action2, aB as event, $ as kind, a2 as kind2, af as kind3, V as type, Y as type2, ax as type3, aQ as type4 } from './types.gen-DkFlXKTr.js';
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 };