freestyle-sandboxes 0.0.96 → 0.1.0

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 (69) hide show
  1. package/README.md +39 -48
  2. package/index.cjs +4362 -0
  3. package/index.d.cts +9401 -0
  4. package/index.d.mts +9401 -0
  5. package/index.mjs +4348 -0
  6. package/package.json +16 -109
  7. package/dist/ai/inde.d.cts +0 -75
  8. package/dist/ai/inde.d.mts +0 -75
  9. package/dist/ai/index.cjs +0 -13
  10. package/dist/ai/index.d.cts +0 -75
  11. package/dist/ai/index.d.mts +0 -75
  12. package/dist/ai/index.mjs +0 -4
  13. package/dist/expo/inde.d.cts +0 -6
  14. package/dist/expo/inde.d.mts +0 -6
  15. package/dist/expo/index.cjs +0 -319
  16. package/dist/expo/index.d.cts +0 -6
  17. package/dist/expo/index.d.mts +0 -6
  18. package/dist/expo/index.mjs +0 -297
  19. package/dist/inde.d.cts +0 -373
  20. package/dist/inde.d.mts +0 -373
  21. package/dist/index-BKAG8L-o.mjs +0 -3061
  22. package/dist/index-DuOpIaWc.cjs +0 -3068
  23. package/dist/index.cjs +0 -1329
  24. package/dist/index.d-9H_wnIbz.d.ts +0 -4223
  25. package/dist/index.d.cts +0 -373
  26. package/dist/index.d.mts +0 -373
  27. package/dist/index.mjs +0 -1327
  28. package/dist/langgraph/inde.d.cts +0 -4180
  29. package/dist/langgraph/inde.d.mts +0 -4180
  30. package/dist/langgraph/index.cjs +0 -17155
  31. package/dist/langgraph/index.d.cts +0 -4180
  32. package/dist/langgraph/index.d.mts +0 -4180
  33. package/dist/langgraph/index.mjs +0 -17153
  34. package/dist/mastra/inde.d.cts +0 -2623
  35. package/dist/mastra/inde.d.mts +0 -2623
  36. package/dist/mastra/index.cjs +0 -55
  37. package/dist/mastra/index.d.cts +0 -2623
  38. package/dist/mastra/index.d.mts +0 -2623
  39. package/dist/mastra/index.mjs +0 -53
  40. package/dist/react/dev-server/index..d.cts +0 -33
  41. package/dist/react/dev-server/index..d.mts +0 -33
  42. package/dist/react/dev-server/index.cjs +0 -148
  43. package/dist/react/dev-server/index.d.cts +0 -33
  44. package/dist/react/dev-server/index.d.mts +0 -33
  45. package/dist/react/dev-server/index.mjs +0 -145
  46. package/dist/types.gen-CJa21P0C.d.ts +0 -1902
  47. package/dist/types.gen-DKjMRuu5.d.ts +0 -1898
  48. package/dist/utils/inde.d.cts +0 -10
  49. package/dist/utils/inde.d.mts +0 -10
  50. package/dist/utils/index.cjs +0 -100
  51. package/dist/utils/index.d.cts +0 -10
  52. package/dist/utils/index.d.mts +0 -10
  53. package/dist/utils/index.mjs +0 -75
  54. package/openapi/index.ts +0 -3
  55. package/openapi/sdk.gen.ts +0 -929
  56. package/openapi/types.gen.ts +0 -2234
  57. package/openapi-ts.config.ts +0 -7
  58. package/openapi.json +0 -1
  59. package/src/ai/index.ts +0 -164
  60. package/src/dev-server.ts +0 -95
  61. package/src/expo/_expo_internals.ts +0 -389
  62. package/src/expo/index.ts +0 -26
  63. package/src/index.ts +0 -1459
  64. package/src/langgraph/index.ts +0 -33
  65. package/src/mastra/index.ts +0 -38
  66. package/src/react/dev-server/index.tsx +0 -195
  67. package/src/react/dev-server/types.ts +0 -5
  68. package/src/utils/index.ts +0 -97
  69. package/tsconfig.json +0 -8
@@ -1,929 +0,0 @@
1
- // This file is auto-generated by @hey-api/openapi-ts
2
-
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, 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
-
6
- export const client = createClient(createConfig());
7
-
8
- /**
9
- * Deploy Cloudstate Project
10
- * Deploy a cloudstate project
11
- */
12
- export const handleDeployCloudstate = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleDeployCloudstateData, ThrowOnError>) => {
13
- return (options?.client ?? client).post<HandleDeployCloudstateResponse, HandleDeployCloudstateError, ThrowOnError>({
14
- ...options,
15
- url: '/cloudstate/v1/deploy'
16
- });
17
- };
18
-
19
- /**
20
- * Get Backup of Cloudstate Project
21
- * Get a backup of a cloudstate project
22
- */
23
- export const handleBackupCloudstate = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleBackupCloudstateData, ThrowOnError>) => {
24
- return (options?.client ?? client).get<HandleBackupCloudstateResponse, HandleBackupCloudstateError, ThrowOnError>({
25
- ...options,
26
- url: '/cloudstate/v1/projects/{id}/backup'
27
- });
28
- };
29
-
30
- /**
31
- * List DNS Records
32
- */
33
- export const handleListRecords = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleListRecordsData, ThrowOnError>) => {
34
- return (options?.client ?? client).get<HandleListRecordsResponse, HandleListRecordsError, ThrowOnError>({
35
- ...options,
36
- url: '/dns/v1/records'
37
- });
38
- };
39
-
40
- /**
41
- * Create DNS Record
42
- */
43
- export const handleCreateRecord = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleCreateRecordData, ThrowOnError>) => {
44
- return (options?.client ?? client).post<HandleCreateRecordResponse, HandleCreateRecordError, ThrowOnError>({
45
- ...options,
46
- url: '/dns/v1/records'
47
- });
48
- };
49
-
50
- /**
51
- * Delete DNS Record
52
- */
53
- export const handleDeleteRecord = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleDeleteRecordData, ThrowOnError>) => {
54
- return (options?.client ?? client).delete<HandleDeleteRecordResponse, HandleDeleteRecordError, ThrowOnError>({
55
- ...options,
56
- url: '/dns/v1/records'
57
- });
58
- };
59
-
60
- /**
61
- * Provision a wildcard certificate
62
- * Provisions a wildcard certificate for a verified domain
63
- *
64
- *
65
- * This speeds up deploys on all subdomains of the domain. In order to use it, you must add the following record to your DNS config:
66
- *
67
- * `_acme-challenge.yourdomain.com` NS `dns.freestyle.sh`
68
- */
69
- export const handleVerifyWildcard = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleVerifyWildcardData, ThrowOnError>) => {
70
- return (options?.client ?? client).post<HandleVerifyWildcardResponse, HandleVerifyWildcardError, ThrowOnError>({
71
- ...options,
72
- url: '/domains/v1/certs/{domain}/wildcard'
73
- });
74
- };
75
-
76
- /**
77
- * List domains for an account
78
- * This lists the domains that an account has verified ownership of. This includes the *.style.dev domains the account has claimed.
79
- */
80
- export const handleListDomains = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<HandleListDomainsData, ThrowOnError>) => {
81
- return (options?.client ?? client).get<HandleListDomainsResponse, HandleListDomainsError, ThrowOnError>({
82
- ...options,
83
- url: '/domains/v1/domains'
84
- });
85
- };
86
-
87
- /**
88
- * List Domain Mappings
89
- * List domain mappings for any query based on exact domain or domain ownership (the domain ownership that gave the right to use the domain)
90
- */
91
- export const handleListDomainMappings = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<HandleListDomainMappingsData, ThrowOnError>) => {
92
- return (options?.client ?? client).get<HandleListDomainMappingsResponse, HandleListDomainMappingsError, ThrowOnError>({
93
- ...options,
94
- url: '/domains/v1/mappings'
95
- });
96
- };
97
-
98
- /**
99
- * Insert Domain Mapping
100
- * This will unmap any other deployment to this domain
101
- */
102
- export const handleInsertDomainMapping = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleInsertDomainMappingData, ThrowOnError>) => {
103
- return (options?.client ?? client).post<HandleInsertDomainMappingResponse, HandleInsertDomainMappingError, ThrowOnError>({
104
- ...options,
105
- url: '/domains/v1/mappings/{domain}'
106
- });
107
- };
108
-
109
- /**
110
- * Remove Domain Mapping
111
- */
112
- export const handleDeleteDomainMapping = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleDeleteDomainMappingData, ThrowOnError>) => {
113
- return (options?.client ?? client).delete<void, unknown, ThrowOnError>({
114
- ...options,
115
- url: '/domains/v1/mappings/{domain}'
116
- });
117
- };
118
-
119
- /**
120
- * List domain verification requests for an account
121
- * Lists domain verification requests for the current account.
122
- */
123
- export const handleListDomainVerificationRequests = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
124
- return (options?.client ?? client).get<HandleListDomainVerificationRequestsResponse, HandleListDomainVerificationRequestsError, ThrowOnError>({
125
- ...options,
126
- url: '/domains/v1/verifications'
127
- });
128
- };
129
-
130
- /**
131
- * Verify a domain verification request
132
- * This checks a pre-existing verification request for a domain. To create a verification request, call the [create domain verification](/#tag/domains/POST/domains/v1/verifications) endpoint. This endpoint will check if the domain has a TXT record with the verification code. If it does, the domain will be verified.
133
- */
134
- export const handleVerifyDomain = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleVerifyDomainData, ThrowOnError>) => {
135
- return (options?.client ?? client).put<HandleVerifyDomainResponse, HandleVerifyDomainError, ThrowOnError>({
136
- ...options,
137
- url: '/domains/v1/verifications'
138
- });
139
- };
140
-
141
- /**
142
- * Create a domain verification request
143
- * This creates a Freestyle Domain Verification Request. It returns a `verificationCode` for your domain. You need to place this code in a TXT record at `_freestyle_custom_hostname.thedomain.com`, then call the [verify domain](/#tag/domains/PUT/domains/v1/verifications) endpoint with the domain to verify it.
144
- */
145
- export const handleCreateDomainVerification = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleCreateDomainVerificationData, ThrowOnError>) => {
146
- return (options?.client ?? client).post<HandleCreateDomainVerificationResponse, HandleCreateDomainVerificationError, ThrowOnError>({
147
- ...options,
148
- url: '/domains/v1/verifications'
149
- });
150
- };
151
-
152
- /**
153
- * Delete a domain verification request
154
- * This deletes a Freestyle Domain Verification Request. This does not remove the domain from the account if it has already been verified, however the verification code will no longer be valid.
155
- */
156
- export const handleDeleteDomainVerification = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleDeleteDomainVerificationData, ThrowOnError>) => {
157
- return (options?.client ?? client).delete<HandleDeleteDomainVerificationResponse, HandleDeleteDomainVerificationError, ThrowOnError>({
158
- ...options,
159
- url: '/domains/v1/verifications'
160
- });
161
- };
162
-
163
- /**
164
- * Request a Dev Server
165
- */
166
- export const handleEphemeralDevServer = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleEphemeralDevServerData, ThrowOnError>) => {
167
- return (options?.client ?? client).post<HandleEphemeralDevServerResponse, HandleEphemeralDevServerError, ThrowOnError>({
168
- ...options,
169
- url: '/ephemeral/v1/dev-servers'
170
- });
171
- };
172
-
173
- /**
174
- * Execute a command on a Dev Server
175
- */
176
- export const handleExecOnEphemeralDevServer = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleExecOnEphemeralDevServerData, ThrowOnError>) => {
177
- return (options?.client ?? client).post<HandleExecOnEphemeralDevServerResponse, HandleExecOnEphemeralDevServerError, ThrowOnError>({
178
- ...options,
179
- url: '/ephemeral/v1/dev-servers/exec'
180
- });
181
- };
182
-
183
- /**
184
- * Write a file to a Dev Server
185
- */
186
- export const handleWriteFileFromEphemeralDevServer = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleWriteFileFromEphemeralDevServerData, ThrowOnError>) => {
187
- return (options?.client ?? client).put<HandleWriteFileFromEphemeralDevServerResponse, HandleWriteFileFromEphemeralDevServerError, ThrowOnError>({
188
- ...options,
189
- url: '/ephemeral/v1/dev-servers/files/{filepath}'
190
- });
191
- };
192
-
193
- /**
194
- * Read a file from a Dev Server
195
- */
196
- export const handleReadFileFromEphemeralDevServer = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleReadFileFromEphemeralDevServerData, ThrowOnError>) => {
197
- return (options?.client ?? client).post<HandleReadFileFromEphemeralDevServerResponse, HandleReadFileFromEphemeralDevServerError, ThrowOnError>({
198
- ...options,
199
- url: '/ephemeral/v1/dev-servers/files/{filepath}'
200
- });
201
- };
202
-
203
- /**
204
- * Commit and push changes to a Dev Server repository
205
- */
206
- export const handleGitCommitPush = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleGitCommitPushData, ThrowOnError>) => {
207
- return (options?.client ?? client).post<HandleGitCommitPushResponse, HandleGitCommitPushError, ThrowOnError>({
208
- ...options,
209
- url: '/ephemeral/v1/dev-servers/git/commit-push'
210
- });
211
- };
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
-
233
- /**
234
- * Shut down a dev server
235
- */
236
- export const handleShutdownDevServer = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleShutdownDevServerData, ThrowOnError>) => {
237
- return (options?.client ?? client).post<HandleShutdownDevServerResponse, HandleShutdownDevServerError, ThrowOnError>({
238
- ...options,
239
- url: '/ephemeral/v1/dev-servers/shutdown'
240
- });
241
- };
242
-
243
- /**
244
- * Get the status of a Dev Server
245
- */
246
- export const handleDevServerStatus = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleDevServerStatusData, ThrowOnError>) => {
247
- return (options?.client ?? client).get<HandleDevServerStatusResponse, HandleDevServerStatusError, ThrowOnError>({
248
- ...options,
249
- url: '/ephemeral/v1/dev-servers/status'
250
- });
251
- };
252
-
253
- export const handleWatchDevServerFiles = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleWatchDevServerFilesData, ThrowOnError>) => {
254
- return (options?.client ?? client).post<HandleWatchDevServerFilesResponse, HandleWatchDevServerFilesError, ThrowOnError>({
255
- ...options,
256
- url: '/ephemeral/v1/dev-servers/watch-files'
257
- });
258
- };
259
-
260
- /**
261
- * List execute runs
262
- * List execute runs.
263
- */
264
- export const handleListExecuteRuns = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<HandleListExecuteRunsData, ThrowOnError>) => {
265
- return (options?.client ?? client).get<HandleListExecuteRunsResponse, HandleListExecuteRunsError, ThrowOnError>({
266
- ...options,
267
- url: '/execute/v1/deployments'
268
- });
269
- };
270
-
271
- /**
272
- * Get information on execute run
273
- * Get information on execute run
274
- */
275
- export const handleGetExecuteRun = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleGetExecuteRunData, ThrowOnError>) => {
276
- return (options?.client ?? client).get<HandleGetExecuteRunResponse, HandleGetExecuteRunError, ThrowOnError>({
277
- ...options,
278
- url: '/execute/v1/deployments/{deployment}'
279
- });
280
- };
281
-
282
- /**
283
- * Execute Code
284
- * Send a TypeScript or JavaScript module, get the result
285
- */
286
- export const handleExecuteScript = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleExecuteScriptData, ThrowOnError>) => {
287
- return (options?.client ?? client).post<HandleExecuteScriptResponse, HandleExecuteScriptError, ThrowOnError>({
288
- ...options,
289
- url: '/execute/v1/script'
290
- });
291
- };
292
-
293
- /**
294
- * List Git identities
295
- * List Git identities created by your account.
296
- */
297
- export const handleListIdentities = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<HandleListIdentitiesData, ThrowOnError>) => {
298
- return (options?.client ?? client).get<HandleListIdentitiesResponse, HandleListIdentitiesError, ThrowOnError>({
299
- ...options,
300
- url: '/git/v1/identity'
301
- });
302
- };
303
-
304
- /**
305
- * Create a Git identity
306
- * Create a Git identity. This identity will be used to authenticate with the Git server.
307
- */
308
- export const handleCreateIdentity = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
309
- return (options?.client ?? client).post<HandleCreateIdentityResponse, HandleCreateIdentityError, ThrowOnError>({
310
- ...options,
311
- url: '/git/v1/identity'
312
- });
313
- };
314
-
315
- /**
316
- * Delete a Git identity
317
- * Delete a Git identity. This will revoke all permissions granted to this identity.
318
- */
319
- export const handleDeleteIdentity = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleDeleteIdentityData, ThrowOnError>) => {
320
- return (options?.client ?? client).delete<HandleDeleteIdentityResponse, HandleDeleteIdentityError, ThrowOnError>({
321
- ...options,
322
- url: '/git/v1/identity/{identity}'
323
- });
324
- };
325
-
326
- /**
327
- * List repository permissions for an identity
328
- * List repository permissions for an identity. This will return a list of repositories that the identity has access to.
329
- */
330
- export const handleListPermissions = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleListPermissionsData, ThrowOnError>) => {
331
- return (options?.client ?? client).get<HandleListPermissionsResponse, HandleListPermissionsError, ThrowOnError>({
332
- ...options,
333
- url: '/git/v1/identity/{identity}/permissions'
334
- });
335
- };
336
-
337
- /**
338
- * Get the permission of an identity on a repository
339
- * Get the permission of an identity on a repository. This will return the access level of the identity on the repository.
340
- */
341
- export const handleDescribePermission = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleDescribePermissionData, ThrowOnError>) => {
342
- return (options?.client ?? client).get<HandleDescribePermissionResponse, HandleDescribePermissionError, ThrowOnError>({
343
- ...options,
344
- url: '/git/v1/identity/{identity}/permissions/{repo}'
345
- });
346
- };
347
-
348
- /**
349
- * Grant a permission to a Git identity
350
- * Grant a permission to a Git identity on a repository
351
- */
352
- export const handleGrantPermission = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleGrantPermissionData, ThrowOnError>) => {
353
- return (options?.client ?? client).post<HandleGrantPermissionResponse, HandleGrantPermissionError, ThrowOnError>({
354
- ...options,
355
- url: '/git/v1/identity/{identity}/permissions/{repo}'
356
- });
357
- };
358
-
359
- /**
360
- * Revoke permissions from a Git identity
361
- * Revoke a permission to a Git identity on a repository
362
- */
363
- export const handleRevokePermission = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleRevokePermissionData, ThrowOnError>) => {
364
- return (options?.client ?? client).delete<HandleRevokePermissionResponse, HandleRevokePermissionError, ThrowOnError>({
365
- ...options,
366
- url: '/git/v1/identity/{identity}/permissions/{repo}'
367
- });
368
- };
369
-
370
- /**
371
- * Update a permission for a Git identity
372
- * Update a permission for a Git identity on a repository
373
- */
374
- export const handleUpdatePermission = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleUpdatePermissionData, ThrowOnError>) => {
375
- return (options?.client ?? client).patch<HandleUpdatePermissionResponse, HandleUpdatePermissionError, ThrowOnError>({
376
- ...options,
377
- url: '/git/v1/identity/{identity}/permissions/{repo}'
378
- });
379
- };
380
-
381
- /**
382
- * List access tokens for a Git identity
383
- * List access tokens for a Git identity
384
- */
385
- export const handleListGitTokens = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleListGitTokensData, ThrowOnError>) => {
386
- return (options?.client ?? client).get<HandleListGitTokensResponse, HandleListGitTokensError, ThrowOnError>({
387
- ...options,
388
- url: '/git/v1/identity/{identity}/tokens'
389
- });
390
- };
391
-
392
- /**
393
- * Create an access token for a Git identity
394
- * Create an access token for a Git identity
395
- */
396
- export const handleCreateGitToken = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleCreateGitTokenData, ThrowOnError>) => {
397
- return (options?.client ?? client).post<HandleCreateGitTokenResponse, HandleCreateGitTokenError, ThrowOnError>({
398
- ...options,
399
- url: '/git/v1/identity/{identity}/tokens'
400
- });
401
- };
402
-
403
- /**
404
- * Revoke an access token for a Git identity
405
- * Revoke an access token for a Git identity
406
- */
407
- export const handleRevokeGitToken = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleRevokeGitTokenData, ThrowOnError>) => {
408
- return (options?.client ?? client).delete<HandleRevokeGitTokenResponse, HandleRevokeGitTokenError, ThrowOnError>({
409
- ...options,
410
- url: '/git/v1/identity/{identity}/tokens'
411
- });
412
- };
413
-
414
- /**
415
- * List repositories
416
- * List repositories with metadata.
417
- */
418
- export const handleListRepositories = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<HandleListRepositoriesData, ThrowOnError>) => {
419
- return (options?.client ?? client).get<HandleListRepositoriesResponse, HandleListRepositoriesError, ThrowOnError>({
420
- ...options,
421
- url: '/git/v1/repo'
422
- });
423
- };
424
-
425
- /**
426
- * Create a repository
427
- * Create a repository. Once the repository is created, it will also be created on the Git server.
428
- * The repository name must be unique within your account.
429
- *
430
- * Once created, you can then push your code to this repository.
431
- *
432
- * The repo will be available at `git.freestyle.sh/{repo-id}`
433
- *
434
- */
435
- export const handleCreateRepo = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleCreateRepoData, ThrowOnError>) => {
436
- return (options?.client ?? client).post<HandleCreateRepoResponse, HandleCreateRepoError, ThrowOnError>({
437
- ...options,
438
- url: '/git/v1/repo'
439
- });
440
- };
441
-
442
- /**
443
- * Get repository default branch
444
- * Get the default branch name for a repository.
445
- */
446
- export const handleGetDefaultBranch = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleGetDefaultBranchData, ThrowOnError>) => {
447
- return (options?.client ?? client).get<HandleGetDefaultBranchResponse, HandleGetDefaultBranchError, ThrowOnError>({
448
- ...options,
449
- url: '/git/v1/repo/{repo_id}/default-branch'
450
- });
451
- };
452
-
453
- /**
454
- * Set repository default branch
455
- * Set the default branch name for a repository. This will update the HEAD reference to point to the new default branch.
456
- */
457
- export const handleSetDefaultBranch = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleSetDefaultBranchData, ThrowOnError>) => {
458
- return (options?.client ?? client).put<HandleSetDefaultBranchResponse, HandleSetDefaultBranchError, ThrowOnError>({
459
- ...options,
460
- url: '/git/v1/repo/{repo_id}/default-branch'
461
- });
462
- };
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
-
497
- /**
498
- * Get GitHub sync configuration
499
- * Get the GitHub sync configuration for a repository, if configured.
500
- */
501
- export const getGithubSync = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetGithubSyncData, ThrowOnError>) => {
502
- return (options?.client ?? client).get<GetGithubSyncResponse, GetGithubSyncError, ThrowOnError>({
503
- ...options,
504
- url: '/git/v1/repo/{repo_id}/github-sync'
505
- });
506
- };
507
-
508
- /**
509
- * Configure GitHub sync for repository
510
- * Configure GitHub synchronization for an existing Freestyle repository. This links your Freestyle repository to a GitHub repository for automatic syncing. Requires the GitHub repository name in 'owner/repo' format.
511
- */
512
- export const configureGithubSync = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ConfigureGithubSyncData, ThrowOnError>) => {
513
- return (options?.client ?? client).post<ConfigureGithubSyncResponse, ConfigureGithubSyncError, ThrowOnError>({
514
- ...options,
515
- url: '/git/v1/repo/{repo_id}/github-sync'
516
- });
517
- };
518
-
519
- /**
520
- * Remove GitHub sync configuration
521
- * Remove GitHub sync configuration from a repository. This stops automatic syncing but doesn't affect the repository content.
522
- */
523
- export const removeGithubSync = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<RemoveGithubSyncData, ThrowOnError>) => {
524
- return (options?.client ?? client).delete<RemoveGithubSyncResponse, RemoveGithubSyncError, ThrowOnError>({
525
- ...options,
526
- url: '/git/v1/repo/{repo_id}/github-sync'
527
- });
528
- };
529
-
530
- /**
531
- * Get repository information
532
- * Retrieve information about a specific repository, including its ID, name, and default branch.
533
- */
534
- export const handleGetRepoInfo = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleGetRepoInfoData, ThrowOnError>) => {
535
- return (options?.client ?? client).get<HandleGetRepoInfoResponse, HandleGetRepoInfoError, ThrowOnError>({
536
- ...options,
537
- url: '/git/v1/repo/{repo}'
538
- });
539
- };
540
-
541
- /**
542
- * Delete a repository
543
- * Delete a repository. This is irreversible, and will also delete the repository on the Git server.
544
- */
545
- export const handleDeleteRepo = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleDeleteRepoData, ThrowOnError>) => {
546
- return (options?.client ?? client).delete<HandleDeleteRepoResponse, HandleDeleteRepoError, ThrowOnError>({
547
- ...options,
548
- url: '/git/v1/repo/{repo}'
549
- });
550
- };
551
-
552
- /**
553
- * Get the contents of a file or directory
554
- * Get the contents of a file or directory in a repository
555
- */
556
- export const handleGetContents = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleGetContentsData, ThrowOnError>) => {
557
- return (options?.client ?? client).get<HandleGetContentsResponse, HandleGetContentsError, ThrowOnError>({
558
- ...options,
559
- url: '/git/v1/repo/{repo}/contents/{path}'
560
- });
561
- };
562
-
563
- /**
564
- * Get a blob object
565
- * Get a blob from the Git database. The contents will always be base64 encoded.
566
- */
567
- export const handleGetBlob = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleGetBlobData, ThrowOnError>) => {
568
- return (options?.client ?? client).get<HandleGetBlobResponse, HandleGetBlobError, ThrowOnError>({
569
- ...options,
570
- url: '/git/v1/repo/{repo}/git/blobs/{hash}'
571
- });
572
- };
573
-
574
- /**
575
- * List commits for a repository
576
- * List commits from the Git database for a specific repository and branch.
577
- */
578
- export const handleListCommits = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleListCommitsData, ThrowOnError>) => {
579
- return (options?.client ?? client).get<HandleListCommitsResponse, HandleListCommitsError, ThrowOnError>({
580
- ...options,
581
- url: '/git/v1/repo/{repo}/git/commits'
582
- });
583
- };
584
-
585
- /**
586
- * Get a commit object
587
- * Get a commit from the Git database with detailed information.
588
- */
589
- export const handleGetCommit = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleGetCommitData, ThrowOnError>) => {
590
- return (options?.client ?? client).get<HandleGetCommitResponse, HandleGetCommitError, ThrowOnError>({
591
- ...options,
592
- url: '/git/v1/repo/{repo}/git/commits/{hash}'
593
- });
594
- };
595
-
596
- /**
597
- * Get a branch reference
598
- * Get a reference to a branch in the Git repository. Returns the ref name and SHA of the branch.
599
- */
600
- export const handleGetRefBranch = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleGetRefBranchData, ThrowOnError>) => {
601
- return (options?.client ?? client).get<HandleGetRefBranchResponse, HandleGetRefBranchError, ThrowOnError>({
602
- ...options,
603
- url: '/git/v1/repo/{repo}/git/refs/heads/{branch}'
604
- });
605
- };
606
-
607
- /**
608
- * Get a tag reference
609
- * Get a reference to a tag in the Git repository. Returns the ref name and SHA of the tag.
610
- */
611
- export const handleGetRefTag = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleGetRefTagData, ThrowOnError>) => {
612
- return (options?.client ?? client).get<HandleGetRefTagResponse, HandleGetRefTagError, ThrowOnError>({
613
- ...options,
614
- url: '/git/v1/repo/{repo}/git/refs/tags/{tag}'
615
- });
616
- };
617
-
618
- /**
619
- * Get a tag object
620
- * Get a tag from the Git database.
621
- */
622
- export const handleGetTag = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleGetTagData, ThrowOnError>) => {
623
- return (options?.client ?? client).get<HandleGetTagResponse, HandleGetTagError, ThrowOnError>({
624
- ...options,
625
- url: '/git/v1/repo/{repo}/git/tags/{hash}'
626
- });
627
- };
628
-
629
- /**
630
- * Get a tree object
631
- * Get a tree from the Git database with its entries.
632
- */
633
- export const handleGetTree = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleGetTreeData, ThrowOnError>) => {
634
- return (options?.client ?? client).get<HandleGetTreeResponse, HandleGetTreeError, ThrowOnError>({
635
- ...options,
636
- url: '/git/v1/repo/{repo}/git/trees/{hash}'
637
- });
638
- };
639
-
640
- /**
641
- * Download a tarball of a repo.
642
- * Download the contents of a repo as a tarball.
643
- */
644
- export const handleDownloadTarball = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleDownloadTarballData, ThrowOnError>) => {
645
- return (options?.client ?? client).get<HandleDownloadTarballResponse, HandleDownloadTarballError, ThrowOnError>({
646
- ...options,
647
- url: '/git/v1/repo/{repo}/tarball'
648
- });
649
- };
650
-
651
- /**
652
- * List git triggers for a repository
653
- * List git triggers for the given repository.
654
- */
655
- export const handleListGitTriggers = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleListGitTriggersData, ThrowOnError>) => {
656
- return (options?.client ?? client).get<HandleListGitTriggersResponse, HandleListGitTriggersError, ThrowOnError>({
657
- ...options,
658
- url: '/git/v1/repo/{repo}/trigger'
659
- });
660
- };
661
-
662
- /**
663
- * Create a git trigger
664
- * Create a git trigger for the given repository.
665
- */
666
- export const handleCreateGitTrigger = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleCreateGitTriggerData, ThrowOnError>) => {
667
- return (options?.client ?? client).post<HandleCreateGitTriggerResponse, HandleCreateGitTriggerError, ThrowOnError>({
668
- ...options,
669
- url: '/git/v1/repo/{repo}/trigger'
670
- });
671
- };
672
-
673
- /**
674
- * Delete a git trigger
675
- * Delete a git trigger. This is irreversible.
676
- */
677
- export const handleDeleteGitTrigger = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleDeleteGitTriggerData, ThrowOnError>) => {
678
- return (options?.client ?? client).delete<HandleDeleteGitTriggerResponse, HandleDeleteGitTriggerError, ThrowOnError>({
679
- ...options,
680
- url: '/git/v1/repo/{repo}/trigger/{trigger}'
681
- });
682
- };
683
-
684
- /**
685
- * Download a zip of a repo
686
- * Download the contents of a repo as a zip.
687
- */
688
- export const handleDownloadZip = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleDownloadZipData, ThrowOnError>) => {
689
- return (options?.client ?? client).get<HandleDownloadZipResponse, HandleDownloadZipError, ThrowOnError>({
690
- ...options,
691
- url: '/git/v1/repo/{repo}/zip'
692
- });
693
- };
694
-
695
- /**
696
- * Deployment Logs
697
- * Get the logs for a deployment
698
- */
699
- export const handleGetLogs = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<HandleGetLogsData, ThrowOnError>) => {
700
- return (options?.client ?? client).get<HandleGetLogsResponse, HandleGetLogsError, ThrowOnError>({
701
- ...options,
702
- url: '/observability/v1/logs'
703
- });
704
- };
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
-
886
- /**
887
- * @deprecated
888
- * Deploy a Website (v1)
889
- * Deploy a website. Files is a map of file paths to file contents. Configuration is optional and contains additional information about the deployment.
890
- */
891
- export const handleDeployWeb = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleDeployWebData, ThrowOnError>) => {
892
- return (options?.client ?? client).post<HandleDeployWebResponse, HandleDeployWebError, ThrowOnError>({
893
- ...options,
894
- url: '/web/v1/deploy'
895
- });
896
- };
897
-
898
- /**
899
- * Deploy a Website
900
- * Deploy a website. Files is a map of file paths to file contents. Configuration is optional and contains additional information about the deployment.
901
- */
902
- export const handleDeployWebV2 = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleDeployWebV2Data, ThrowOnError>) => {
903
- return (options?.client ?? client).post<HandleDeployWebV2Response, HandleDeployWebV2Error, ThrowOnError>({
904
- ...options,
905
- url: '/web/v1/deployment'
906
- });
907
- };
908
-
909
- /**
910
- * List web deploys
911
- * List web deploys.
912
- */
913
- export const handleListWebDeploys = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleListWebDeploysData, ThrowOnError>) => {
914
- return (options?.client ?? client).get<HandleListWebDeploysResponse, HandleListWebDeploysError, ThrowOnError>({
915
- ...options,
916
- url: '/web/v1/deployments'
917
- });
918
- };
919
-
920
- /**
921
- * Get information on web deploy
922
- * Get information about a web deploy by its ID.
923
- */
924
- export const handleGetWebDeployDetails = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleGetWebDeployDetailsData, ThrowOnError>) => {
925
- return (options?.client ?? client).get<void, unknown, ThrowOnError>({
926
- ...options,
927
- url: '/web/v1/deployments/{deployment_id}'
928
- });
929
- };