freestyle-sandboxes 0.0.94 → 0.0.96
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 +7 -3
- package/dist/ai/inde.d.mts +7 -3
- package/dist/ai/index.d.cts +7 -3
- package/dist/ai/index.d.mts +7 -3
- package/dist/inde.d.cts +8 -7
- package/dist/inde.d.mts +8 -7
- package/dist/index.cjs +8 -6
- package/dist/index.d.cts +8 -7
- package/dist/index.d.mts +8 -7
- package/dist/index.mjs +8 -6
- 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--Oxc46AH.d.ts → types.gen-CJa21P0C.d.ts} +344 -28
- package/dist/{types.gen-CG8tIO9M.d.ts → types.gen-DKjMRuu5.d.ts} +448 -43
- 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/openapi/sdk.gen.ts +236 -3
- package/openapi/types.gen.ts +391 -29
- package/openapi.json +1 -1
- package/package.json +1 -1
- package/src/index.ts +10 -8
- package/dist/index-BBXyg0JQ.cjs +0 -3253
- package/dist/index-BQHqnjZK.mjs +0 -3231
- package/dist/index-CEEa9WHp.cjs +0 -3238
- package/dist/index-D1ulQeJR.mjs +0 -3247
- package/dist/index-DCF70Xbq.mjs +0 -3246
- package/dist/index-H7UNEAjs.cjs +0 -3254
- package/dist/index.d-CXx1AdyW.d.ts +0 -4210
- package/dist/types.gen-1sd31qLV.d.ts +0 -172
- package/dist/types.gen-627pxroW.d.ts +0 -830
- package/dist/types.gen-BCdfx7yt.d.ts +0 -760
- package/dist/types.gen-BVXmFV7d.d.ts +0 -1299
- package/dist/types.gen-BWwhCgTX.d.ts +0 -1462
- package/dist/types.gen-BaMKzqxQ.d.ts +0 -233
- package/dist/types.gen-BbekD8Sd.d.ts +0 -1119
- package/dist/types.gen-BpWMzgc3.d.ts +0 -1493
- package/dist/types.gen-BqN1t03N.d.ts +0 -842
- package/dist/types.gen-BtK6PMQy.d.ts +0 -195
- package/dist/types.gen-BuhQ5LpB.d.ts +0 -764
- package/dist/types.gen-BzRtj_TA.d.ts +0 -725
- package/dist/types.gen-C03gaIPq.d.ts +0 -297
- package/dist/types.gen-CIf3ciN7.d.ts +0 -807
- package/dist/types.gen-CMuCas4r.d.ts +0 -183
- package/dist/types.gen-CWa4Mw0J.d.ts +0 -1493
- package/dist/types.gen-CZUnqmzP.d.ts +0 -789
- package/dist/types.gen-CnEkmbco.d.ts +0 -314
- package/dist/types.gen-DDYpuDzZ.d.ts +0 -764
- package/dist/types.gen-DHmdEOOa.d.ts +0 -172
- package/dist/types.gen-DLYohMJT.d.ts +0 -382
- package/dist/types.gen-DbTb_SrD.d.ts +0 -156
- package/dist/types.gen-DkFlXKTr.d.ts +0 -1354
- package/dist/types.gen-DkQ-Dbs1.d.ts +0 -764
- package/dist/types.gen-DyY7Deri.d.ts +0 -138
- package/dist/types.gen-MBZCvIhE.d.ts +0 -311
- package/dist/types.gen-YhJAHBw8.d.ts +0 -233
- package/dist/types.gen-cCnnhnB6.d.ts +0 -182
- package/dist/types.gen-mg_JNXrq.d.ts +0 -830
- package/dist/types.gen-uDTr6v-7.d.ts +0 -731
package/dist/utils/inde.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DeploymentSource } from '../types.gen
|
|
1
|
+
import { D as DeploymentSource } from '../types.gen-CJa21P0C.js';
|
|
2
2
|
|
|
3
3
|
declare const prepareDirForDeployment: (directory: string) => Promise<DeploymentSource>;
|
|
4
4
|
declare const prepareDirForDeploymentSync: (directory: string) => DeploymentSource;
|
package/dist/utils/inde.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DeploymentSource } from '../types.gen
|
|
1
|
+
import { D as DeploymentSource } from '../types.gen-CJa21P0C.js';
|
|
2
2
|
|
|
3
3
|
declare const prepareDirForDeployment: (directory: string) => Promise<DeploymentSource>;
|
|
4
4
|
declare const prepareDirForDeploymentSync: (directory: string) => DeploymentSource;
|
package/dist/utils/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DeploymentSource } from '../types.gen
|
|
1
|
+
import { D as DeploymentSource } from '../types.gen-CJa21P0C.js';
|
|
2
2
|
|
|
3
3
|
declare const prepareDirForDeployment: (directory: string) => Promise<DeploymentSource>;
|
|
4
4
|
declare const prepareDirForDeploymentSync: (directory: string) => DeploymentSource;
|
package/dist/utils/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DeploymentSource } from '../types.gen
|
|
1
|
+
import { D as DeploymentSource } from '../types.gen-CJa21P0C.js';
|
|
2
2
|
|
|
3
3
|
declare const prepareDirForDeployment: (directory: string) => Promise<DeploymentSource>;
|
|
4
4
|
declare const prepareDirForDeploymentSync: (directory: string) => DeploymentSource;
|
package/openapi/sdk.gen.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
|
|
3
3
|
import { createClient, createConfig, type OptionsLegacyParser } from '@hey-api/client-fetch';
|
|
4
|
-
import type { HandleDeployCloudstateData, HandleDeployCloudstateError, HandleDeployCloudstateResponse, HandleBackupCloudstateData, HandleBackupCloudstateError, HandleBackupCloudstateResponse, HandleListRecordsData, HandleListRecordsError, HandleListRecordsResponse, HandleCreateRecordData, HandleCreateRecordError, HandleCreateRecordResponse, HandleDeleteRecordData, HandleDeleteRecordError, HandleDeleteRecordResponse, HandleVerifyWildcardData, HandleVerifyWildcardError, HandleVerifyWildcardResponse, HandleListDomainsData, HandleListDomainsError, HandleListDomainsResponse, HandleListDomainMappingsData, HandleListDomainMappingsError, HandleListDomainMappingsResponse, HandleInsertDomainMappingData, HandleInsertDomainMappingError, HandleInsertDomainMappingResponse, HandleDeleteDomainMappingData,
|
|
4
|
+
import type { HandleDeployCloudstateData, HandleDeployCloudstateError, HandleDeployCloudstateResponse, HandleBackupCloudstateData, HandleBackupCloudstateError, HandleBackupCloudstateResponse, HandleListRecordsData, HandleListRecordsError, HandleListRecordsResponse, HandleCreateRecordData, HandleCreateRecordError, HandleCreateRecordResponse, HandleDeleteRecordData, HandleDeleteRecordError, HandleDeleteRecordResponse, HandleVerifyWildcardData, HandleVerifyWildcardError, HandleVerifyWildcardResponse, HandleListDomainsData, HandleListDomainsError, HandleListDomainsResponse, HandleListDomainMappingsData, HandleListDomainMappingsError, HandleListDomainMappingsResponse, HandleInsertDomainMappingData, HandleInsertDomainMappingError, HandleInsertDomainMappingResponse, HandleDeleteDomainMappingData, HandleListDomainVerificationRequestsError, HandleListDomainVerificationRequestsResponse, HandleVerifyDomainData, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleCreateDomainVerificationData, HandleCreateDomainVerificationError, HandleCreateDomainVerificationResponse, HandleDeleteDomainVerificationData, HandleDeleteDomainVerificationError, HandleDeleteDomainVerificationResponse, HandleEphemeralDevServerData, HandleEphemeralDevServerError, HandleEphemeralDevServerResponse, HandleExecOnEphemeralDevServerData, HandleExecOnEphemeralDevServerError, HandleExecOnEphemeralDevServerResponse, HandleWriteFileFromEphemeralDevServerData, HandleWriteFileFromEphemeralDevServerError, HandleWriteFileFromEphemeralDevServerResponse, HandleReadFileFromEphemeralDevServerData, HandleReadFileFromEphemeralDevServerError, HandleReadFileFromEphemeralDevServerResponse, HandleGitCommitPushData, HandleGitCommitPushError, HandleGitCommitPushResponse, HandleDevServerLogsData, HandleDevServerLogsError, HandleDevServerLogsResponse, HandleDevServerRestartData, HandleDevServerRestartError, HandleDevServerRestartResponse, HandleShutdownDevServerData, HandleShutdownDevServerError, HandleShutdownDevServerResponse, HandleDevServerStatusData, HandleDevServerStatusError, HandleDevServerStatusResponse, HandleWatchDevServerFilesData, HandleWatchDevServerFilesError, HandleWatchDevServerFilesResponse, HandleListExecuteRunsData, HandleListExecuteRunsError, HandleListExecuteRunsResponse, HandleGetExecuteRunData, HandleGetExecuteRunError, HandleGetExecuteRunResponse, HandleExecuteScriptData, HandleExecuteScriptError, HandleExecuteScriptResponse, HandleListIdentitiesData, HandleListIdentitiesError, HandleListIdentitiesResponse, HandleCreateIdentityError, HandleCreateIdentityResponse, HandleDeleteIdentityData, HandleDeleteIdentityError, HandleDeleteIdentityResponse, HandleListPermissionsData, HandleListPermissionsError, HandleListPermissionsResponse, HandleDescribePermissionData, HandleDescribePermissionError, HandleDescribePermissionResponse, HandleGrantPermissionData, HandleGrantPermissionError, HandleGrantPermissionResponse, HandleRevokePermissionData, HandleRevokePermissionError, HandleRevokePermissionResponse, HandleUpdatePermissionData, HandleUpdatePermissionError, HandleUpdatePermissionResponse, HandleListGitTokensData, HandleListGitTokensError, HandleListGitTokensResponse, HandleCreateGitTokenData, HandleCreateGitTokenError, HandleCreateGitTokenResponse, HandleRevokeGitTokenData, HandleRevokeGitTokenError, HandleRevokeGitTokenResponse, HandleListRepositoriesData, HandleListRepositoriesError, HandleListRepositoriesResponse, HandleCreateRepoData, HandleCreateRepoError, HandleCreateRepoResponse, HandleGetDefaultBranchData, HandleGetDefaultBranchError, HandleGetDefaultBranchResponse, HandleSetDefaultBranchData, HandleSetDefaultBranchError, HandleSetDefaultBranchResponse, GetDevServerConfigurationData, GetDevServerConfigurationError, GetDevServerConfigurationResponse, UpdateDevServerConfigurationData, UpdateDevServerConfigurationError, UpdateDevServerConfigurationResponse, DeleteDevServerConfigurationData, DeleteDevServerConfigurationError, DeleteDevServerConfigurationResponse, GetGithubSyncData, GetGithubSyncError, GetGithubSyncResponse, ConfigureGithubSyncData, ConfigureGithubSyncError, ConfigureGithubSyncResponse, RemoveGithubSyncData, RemoveGithubSyncError, RemoveGithubSyncResponse, HandleGetRepoInfoData, HandleGetRepoInfoError, HandleGetRepoInfoResponse, HandleDeleteRepoData, HandleDeleteRepoError, HandleDeleteRepoResponse, HandleGetContentsData, HandleGetContentsError, HandleGetContentsResponse, HandleGetBlobData, HandleGetBlobError, HandleGetBlobResponse, HandleListCommitsData, HandleListCommitsError, HandleListCommitsResponse, HandleGetCommitData, HandleGetCommitError, HandleGetCommitResponse, HandleGetRefBranchData, HandleGetRefBranchError, HandleGetRefBranchResponse, HandleGetRefTagData, HandleGetRefTagError, HandleGetRefTagResponse, HandleGetTagData, HandleGetTagError, HandleGetTagResponse, HandleGetTreeData, HandleGetTreeError, HandleGetTreeResponse, HandleDownloadTarballData, HandleDownloadTarballError, HandleDownloadTarballResponse, HandleListGitTriggersData, HandleListGitTriggersError, HandleListGitTriggersResponse, HandleCreateGitTriggerData, HandleCreateGitTriggerError, HandleCreateGitTriggerResponse, HandleDeleteGitTriggerData, HandleDeleteGitTriggerError, HandleDeleteGitTriggerResponse, HandleDownloadZipData, HandleDownloadZipError, HandleDownloadZipResponse, HandleGetLogsData, HandleGetLogsError, HandleGetLogsResponse, CreateVmData, ResizeVmData, GetVmData, DeleteVmData, WaitVmData, ExecAwaitData, GetFileData, PutFileData, ForkVmData, OptimizeVmData, StartVmData, StopVmData, SuspendVmData, ListTerminalsData, GetTerminalLogsData, GetTerminalXtermData, WatchFilesData, HandleDeployWebData, HandleDeployWebError, HandleDeployWebResponse, HandleDeployWebV2Data, HandleDeployWebV2Error, HandleDeployWebV2Response, HandleListWebDeploysData, HandleListWebDeploysError, HandleListWebDeploysResponse, HandleGetWebDeployDetailsData } from './types.gen';
|
|
5
5
|
|
|
6
6
|
export const client = createClient(createConfig());
|
|
7
7
|
|
|
@@ -110,7 +110,7 @@ export const handleInsertDomainMapping = <ThrowOnError extends boolean = false>(
|
|
|
110
110
|
* Remove Domain Mapping
|
|
111
111
|
*/
|
|
112
112
|
export const handleDeleteDomainMapping = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleDeleteDomainMappingData, ThrowOnError>) => {
|
|
113
|
-
return (options?.client ?? client).delete<
|
|
113
|
+
return (options?.client ?? client).delete<void, unknown, ThrowOnError>({
|
|
114
114
|
...options,
|
|
115
115
|
url: '/domains/v1/mappings/{domain}'
|
|
116
116
|
});
|
|
@@ -210,6 +210,26 @@ export const handleGitCommitPush = <ThrowOnError extends boolean = false>(option
|
|
|
210
210
|
});
|
|
211
211
|
};
|
|
212
212
|
|
|
213
|
+
/**
|
|
214
|
+
* Get logs from the dev server (journalctl -u freestyle-run-dev)
|
|
215
|
+
*/
|
|
216
|
+
export const handleDevServerLogs = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleDevServerLogsData, ThrowOnError>) => {
|
|
217
|
+
return (options?.client ?? client).get<HandleDevServerLogsResponse, HandleDevServerLogsError, ThrowOnError>({
|
|
218
|
+
...options,
|
|
219
|
+
url: '/ephemeral/v1/dev-servers/logs'
|
|
220
|
+
});
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Restart the dev server (systemctl restart freestyle-run-dev)
|
|
225
|
+
*/
|
|
226
|
+
export const handleDevServerRestart = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleDevServerRestartData, ThrowOnError>) => {
|
|
227
|
+
return (options?.client ?? client).post<HandleDevServerRestartResponse, HandleDevServerRestartError, ThrowOnError>({
|
|
228
|
+
...options,
|
|
229
|
+
url: '/ephemeral/v1/dev-servers/restart'
|
|
230
|
+
});
|
|
231
|
+
};
|
|
232
|
+
|
|
213
233
|
/**
|
|
214
234
|
* Shut down a dev server
|
|
215
235
|
*/
|
|
@@ -441,6 +461,39 @@ export const handleSetDefaultBranch = <ThrowOnError extends boolean = false>(opt
|
|
|
441
461
|
});
|
|
442
462
|
};
|
|
443
463
|
|
|
464
|
+
/**
|
|
465
|
+
* Get dev server configuration
|
|
466
|
+
* Get the dev server configuration for a repository and branch.
|
|
467
|
+
*/
|
|
468
|
+
export const getDevServerConfiguration = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetDevServerConfigurationData, ThrowOnError>) => {
|
|
469
|
+
return (options?.client ?? client).get<GetDevServerConfigurationResponse, GetDevServerConfigurationError, ThrowOnError>({
|
|
470
|
+
...options,
|
|
471
|
+
url: '/git/v1/repo/{repo_id}/dev-server-configuration'
|
|
472
|
+
});
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Update dev server configuration
|
|
477
|
+
* Update the dev server configuration for a repository and branch.
|
|
478
|
+
*/
|
|
479
|
+
export const updateDevServerConfiguration = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateDevServerConfigurationData, ThrowOnError>) => {
|
|
480
|
+
return (options?.client ?? client).put<UpdateDevServerConfigurationResponse, UpdateDevServerConfigurationError, ThrowOnError>({
|
|
481
|
+
...options,
|
|
482
|
+
url: '/git/v1/repo/{repo_id}/dev-server-configuration'
|
|
483
|
+
});
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Delete dev server configuration
|
|
488
|
+
* Delete the dev server configuration for a repository and branch. If no branch is specified, deletes configuration for the default branch.
|
|
489
|
+
*/
|
|
490
|
+
export const deleteDevServerConfiguration = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteDevServerConfigurationData, ThrowOnError>) => {
|
|
491
|
+
return (options?.client ?? client).delete<DeleteDevServerConfigurationResponse, DeleteDevServerConfigurationError, ThrowOnError>({
|
|
492
|
+
...options,
|
|
493
|
+
url: '/git/v1/repo/{repo_id}/dev-server-configuration'
|
|
494
|
+
});
|
|
495
|
+
};
|
|
496
|
+
|
|
444
497
|
/**
|
|
445
498
|
* Get GitHub sync configuration
|
|
446
499
|
* Get the GitHub sync configuration for a repository, if configured.
|
|
@@ -650,6 +703,186 @@ export const handleGetLogs = <ThrowOnError extends boolean = false>(options?: Op
|
|
|
650
703
|
});
|
|
651
704
|
};
|
|
652
705
|
|
|
706
|
+
/**
|
|
707
|
+
* List VMs
|
|
708
|
+
*/
|
|
709
|
+
export const listVms = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
|
|
710
|
+
return (options?.client ?? client).get<void, unknown, ThrowOnError>({
|
|
711
|
+
...options,
|
|
712
|
+
url: '/v1/vms'
|
|
713
|
+
});
|
|
714
|
+
};
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* Create VM
|
|
718
|
+
*/
|
|
719
|
+
export const createVm = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateVmData, ThrowOnError>) => {
|
|
720
|
+
return (options?.client ?? client).post<void, unknown, ThrowOnError>({
|
|
721
|
+
...options,
|
|
722
|
+
url: '/v1/vms'
|
|
723
|
+
});
|
|
724
|
+
};
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* Resize VM
|
|
728
|
+
*/
|
|
729
|
+
export const resizeVm = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ResizeVmData, ThrowOnError>) => {
|
|
730
|
+
return (options?.client ?? client).post<void, unknown, ThrowOnError>({
|
|
731
|
+
...options,
|
|
732
|
+
url: '/v1/vms/{id}/resize'
|
|
733
|
+
});
|
|
734
|
+
};
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* Get VM
|
|
738
|
+
*/
|
|
739
|
+
export const getVm = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetVmData, ThrowOnError>) => {
|
|
740
|
+
return (options?.client ?? client).get<void, unknown, ThrowOnError>({
|
|
741
|
+
...options,
|
|
742
|
+
url: '/v1/vms/{vm_id}'
|
|
743
|
+
});
|
|
744
|
+
};
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* Delete VM
|
|
748
|
+
*/
|
|
749
|
+
export const deleteVm = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteVmData, ThrowOnError>) => {
|
|
750
|
+
return (options?.client ?? client).delete<void, unknown, ThrowOnError>({
|
|
751
|
+
...options,
|
|
752
|
+
url: '/v1/vms/{vm_id}'
|
|
753
|
+
});
|
|
754
|
+
};
|
|
755
|
+
|
|
756
|
+
/**
|
|
757
|
+
* Wait for VM to stop
|
|
758
|
+
*/
|
|
759
|
+
export const waitVm = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<WaitVmData, ThrowOnError>) => {
|
|
760
|
+
return (options?.client ?? client).post<void, unknown, ThrowOnError>({
|
|
761
|
+
...options,
|
|
762
|
+
url: '/v1/vms/{vm_id}/await'
|
|
763
|
+
});
|
|
764
|
+
};
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* Execute command in VM and await result
|
|
768
|
+
*/
|
|
769
|
+
export const execAwait = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ExecAwaitData, ThrowOnError>) => {
|
|
770
|
+
return (options?.client ?? client).post<void, unknown, ThrowOnError>({
|
|
771
|
+
...options,
|
|
772
|
+
url: '/v1/vms/{vm_id}/exec-await'
|
|
773
|
+
});
|
|
774
|
+
};
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* Get file from VM
|
|
778
|
+
*/
|
|
779
|
+
export const getFile = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetFileData, ThrowOnError>) => {
|
|
780
|
+
return (options?.client ?? client).get<void, unknown, ThrowOnError>({
|
|
781
|
+
...options,
|
|
782
|
+
url: '/v1/vms/{vm_id}/files/{filepath}'
|
|
783
|
+
});
|
|
784
|
+
};
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* Put file to VM
|
|
788
|
+
*/
|
|
789
|
+
export const putFile = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<PutFileData, ThrowOnError>) => {
|
|
790
|
+
return (options?.client ?? client).put<void, unknown, ThrowOnError>({
|
|
791
|
+
...options,
|
|
792
|
+
url: '/v1/vms/{vm_id}/files/{filepath}'
|
|
793
|
+
});
|
|
794
|
+
};
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* Fork VM
|
|
798
|
+
*/
|
|
799
|
+
export const forkVm = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ForkVmData, ThrowOnError>) => {
|
|
800
|
+
return (options?.client ?? client).post<void, unknown, ThrowOnError>({
|
|
801
|
+
...options,
|
|
802
|
+
url: '/v1/vms/{vm_id}/fork'
|
|
803
|
+
});
|
|
804
|
+
};
|
|
805
|
+
|
|
806
|
+
/**
|
|
807
|
+
* Suspends a VM and reallocates storage for more efficent copy.
|
|
808
|
+
*/
|
|
809
|
+
export const optimizeVm = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<OptimizeVmData, ThrowOnError>) => {
|
|
810
|
+
return (options?.client ?? client).post<void, unknown, ThrowOnError>({
|
|
811
|
+
...options,
|
|
812
|
+
url: '/v1/vms/{vm_id}/optimize'
|
|
813
|
+
});
|
|
814
|
+
};
|
|
815
|
+
|
|
816
|
+
/**
|
|
817
|
+
* Start VM
|
|
818
|
+
*/
|
|
819
|
+
export const startVm = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<StartVmData, ThrowOnError>) => {
|
|
820
|
+
return (options?.client ?? client).post<void, unknown, ThrowOnError>({
|
|
821
|
+
...options,
|
|
822
|
+
url: '/v1/vms/{vm_id}/start'
|
|
823
|
+
});
|
|
824
|
+
};
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* Stop VM
|
|
828
|
+
*/
|
|
829
|
+
export const stopVm = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<StopVmData, ThrowOnError>) => {
|
|
830
|
+
return (options?.client ?? client).post<void, unknown, ThrowOnError>({
|
|
831
|
+
...options,
|
|
832
|
+
url: '/v1/vms/{vm_id}/stop'
|
|
833
|
+
});
|
|
834
|
+
};
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* Suspend VM
|
|
838
|
+
*/
|
|
839
|
+
export const suspendVm = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SuspendVmData, ThrowOnError>) => {
|
|
840
|
+
return (options?.client ?? client).post<void, unknown, ThrowOnError>({
|
|
841
|
+
...options,
|
|
842
|
+
url: '/v1/vms/{vm_id}/suspend'
|
|
843
|
+
});
|
|
844
|
+
};
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* List all terminal sessions for a VM
|
|
848
|
+
*/
|
|
849
|
+
export const listTerminals = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListTerminalsData, ThrowOnError>) => {
|
|
850
|
+
return (options?.client ?? client).get<void, unknown, ThrowOnError>({
|
|
851
|
+
...options,
|
|
852
|
+
url: '/v1/vms/{vm_id}/terminals'
|
|
853
|
+
});
|
|
854
|
+
};
|
|
855
|
+
|
|
856
|
+
/**
|
|
857
|
+
* Get terminal logs as plain text array
|
|
858
|
+
*/
|
|
859
|
+
export const getTerminalLogs = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetTerminalLogsData, ThrowOnError>) => {
|
|
860
|
+
return (options?.client ?? client).get<void, unknown, ThrowOnError>({
|
|
861
|
+
...options,
|
|
862
|
+
url: '/v1/vms/{vm_id}/terminals/{terminal_id}/logs'
|
|
863
|
+
});
|
|
864
|
+
};
|
|
865
|
+
|
|
866
|
+
/**
|
|
867
|
+
* Get terminal output with xterm formatting
|
|
868
|
+
*/
|
|
869
|
+
export const getTerminalXterm = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetTerminalXtermData, ThrowOnError>) => {
|
|
870
|
+
return (options?.client ?? client).get<void, unknown, ThrowOnError>({
|
|
871
|
+
...options,
|
|
872
|
+
url: '/v1/vms/{vm_id}/terminals/{terminal_id}/xterm-256color'
|
|
873
|
+
});
|
|
874
|
+
};
|
|
875
|
+
|
|
876
|
+
/**
|
|
877
|
+
* Watch VM Files
|
|
878
|
+
*/
|
|
879
|
+
export const watchFiles = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<WatchFilesData, ThrowOnError>) => {
|
|
880
|
+
return (options?.client ?? client).post<void, unknown, ThrowOnError>({
|
|
881
|
+
...options,
|
|
882
|
+
url: '/v1/vms/{vm_id}/watch-files'
|
|
883
|
+
});
|
|
884
|
+
};
|
|
885
|
+
|
|
653
886
|
/**
|
|
654
887
|
* @deprecated
|
|
655
888
|
* Deploy a Website (v1)
|
|
@@ -691,6 +924,6 @@ export const handleListWebDeploys = <ThrowOnError extends boolean = false>(optio
|
|
|
691
924
|
export const handleGetWebDeployDetails = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleGetWebDeployDetailsData, ThrowOnError>) => {
|
|
692
925
|
return (options?.client ?? client).get<void, unknown, ThrowOnError>({
|
|
693
926
|
...options,
|
|
694
|
-
url: '/web/v1/deployments/
|
|
927
|
+
url: '/web/v1/deployments/{deployment_id}'
|
|
695
928
|
});
|
|
696
929
|
};
|