freestyle-sandboxes 0.0.20 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/index.cjs +2 -0
- package/dist/ai/index.d.cts +1 -1
- package/dist/ai/index.d.mts +1 -1
- package/dist/ai/index.mjs +2 -0
- package/dist/index.cjs +88 -5
- package/dist/index.d.cts +24 -5
- package/dist/index.d.mts +24 -5
- package/dist/index.mjs +88 -5
- package/dist/langgraph/index.d.cts +1 -1
- package/dist/langgraph/index.d.mts +1 -1
- package/dist/mastra/index.cjs +1 -1
- package/dist/mastra/index.d.cts +1 -1
- package/dist/mastra/index.d.mts +1 -1
- package/dist/mastra/index.mjs +1 -1
- package/dist/types.gen-DLYohMJT.d.ts +382 -0
- package/openapi/sdk.gen.ts +42 -4
- package/openapi/types.gen.ts +86 -2
- package/openapi.json +1 -1
- package/package.json +1 -1
- package/src/ai/index.ts +2 -0
- package/src/index.ts +105 -21
- package/src/mastra/index.ts +5 -5
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
type Behavior = 'regex' | 'exact';
|
|
2
|
+
type CreateRepositoryRequest = {
|
|
3
|
+
name: string;
|
|
4
|
+
};
|
|
5
|
+
type DeploymentLogEntry = {
|
|
6
|
+
deploymentId: string;
|
|
7
|
+
accountId: string;
|
|
8
|
+
provisionedAt: string;
|
|
9
|
+
timeout: string;
|
|
10
|
+
state: DeploymentState;
|
|
11
|
+
deployedAt?: (string) | null;
|
|
12
|
+
domains: Array<(string)>;
|
|
13
|
+
envVars: {
|
|
14
|
+
[key: string]: (string);
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
type DeploymentState = 'provisioning' | 'deployed' | 'failed';
|
|
18
|
+
type ExecuteLogEntry = {
|
|
19
|
+
deployment: string;
|
|
20
|
+
accountId: string;
|
|
21
|
+
provisionedAt: string;
|
|
22
|
+
startedAt?: (string) | null;
|
|
23
|
+
duration?: (string) | null;
|
|
24
|
+
state: ExecuteRunState;
|
|
25
|
+
envVars: {
|
|
26
|
+
[key: string]: (string);
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
type ExecuteRunInfo = {
|
|
30
|
+
code: string;
|
|
31
|
+
nodeModules: {
|
|
32
|
+
[key: string]: (string);
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
type ExecuteRunState = 'starting' | 'running' | 'complete';
|
|
36
|
+
type FreestyleCloudstateDeployConfiguration = {
|
|
37
|
+
/**
|
|
38
|
+
* ID of the project to deploy, if not provided will create a new project
|
|
39
|
+
*/
|
|
40
|
+
domains?: Array<(string)> | null;
|
|
41
|
+
/**
|
|
42
|
+
* The environment variables that the cloudstate deploy can access
|
|
43
|
+
*/
|
|
44
|
+
envVars?: {
|
|
45
|
+
[key: string]: (string);
|
|
46
|
+
};
|
|
47
|
+
cloudstateDatabaseId?: (string) | null;
|
|
48
|
+
};
|
|
49
|
+
type FreestyleCloudstateDeployErrorResponse = {
|
|
50
|
+
message: string;
|
|
51
|
+
};
|
|
52
|
+
type FreestyleCloudstateDeployRequest = {
|
|
53
|
+
classes: string;
|
|
54
|
+
config?: FreestyleCloudstateDeployConfiguration;
|
|
55
|
+
};
|
|
56
|
+
type FreestyleCloudstateDeploySuccessResponse = {
|
|
57
|
+
deploymentId: string;
|
|
58
|
+
cloudstateDatabaseId: string;
|
|
59
|
+
};
|
|
60
|
+
type FreestyleDeleteDomainVerificationRequest = {
|
|
61
|
+
/**
|
|
62
|
+
* The domain to create a verification code for
|
|
63
|
+
*/
|
|
64
|
+
domain: string;
|
|
65
|
+
/**
|
|
66
|
+
* The verification code
|
|
67
|
+
*/
|
|
68
|
+
verificationCode: string;
|
|
69
|
+
};
|
|
70
|
+
type FreestyleDeployWebConfiguration = {
|
|
71
|
+
/**
|
|
72
|
+
* The entrypoint file for the website
|
|
73
|
+
*/
|
|
74
|
+
entrypoint?: (string) | null;
|
|
75
|
+
/**
|
|
76
|
+
* The custom domains for the website, eg. [\"subdomain.yourwebsite.com\"]. You may include a single *.style.dev domain here.
|
|
77
|
+
*/
|
|
78
|
+
domains?: Array<(string)> | null;
|
|
79
|
+
/**
|
|
80
|
+
* Project ID was our original way of tracking deployments together, it is now deprecated and will be removed in the future. Please use the domains field to specify the domains for your project.
|
|
81
|
+
* @deprecated
|
|
82
|
+
*/
|
|
83
|
+
projectId?: (string) | null;
|
|
84
|
+
/**
|
|
85
|
+
* Node Modules to install for the website, a map of package names to versions, e.g. { \"express\": \"4.17.1\" }. If this and a package-lock.json are provided, the package-lock.json, bun.lockb, pnpm-lock.yaml, or yarn.lock is also provided, the versions here will override the versions in those lock files.
|
|
86
|
+
*/
|
|
87
|
+
nodeModules?: {
|
|
88
|
+
[key: string]: (string);
|
|
89
|
+
} | null;
|
|
90
|
+
/**
|
|
91
|
+
* The environment variables that the website can access
|
|
92
|
+
* e.g. { \"RESEND_API_KEY\": \"re_123456789\" }
|
|
93
|
+
*/
|
|
94
|
+
envVars?: {
|
|
95
|
+
[key: string]: (string);
|
|
96
|
+
} | null;
|
|
97
|
+
serverStartCheck?: boolean;
|
|
98
|
+
networkPermissions?: Array<FreestyleNetworkPermission> | null;
|
|
99
|
+
};
|
|
100
|
+
type FreestyleDeployWebErrorResponse = {
|
|
101
|
+
message: string;
|
|
102
|
+
};
|
|
103
|
+
type FreestyleDeployWebPayload = {
|
|
104
|
+
/**
|
|
105
|
+
* The files to deploy, a map of file paths to file contents, e.g. { \"index.js\": {\"content\": \"your main\", \"encoding\": \"utf-8\"}, \"file2.js\": {\"content\": \"your helper\" } }
|
|
106
|
+
*
|
|
107
|
+
* **Do not include node modules in this bundle, they will not work**. Instead, includes a package-lock.json, bun.lockb, pnpm-lock.yaml, or yarn.lock, the node modules for the project will be installed from that lock file, or use the node_modules field in the configuration to specify the node modules to install.
|
|
108
|
+
*/
|
|
109
|
+
files: {
|
|
110
|
+
[key: string]: FreestyleFile;
|
|
111
|
+
};
|
|
112
|
+
config?: FreestyleDeployWebConfiguration;
|
|
113
|
+
};
|
|
114
|
+
type FreestyleDeployWebSuccessResponse = {
|
|
115
|
+
deploymentId: string;
|
|
116
|
+
domains?: Array<(string)> | null;
|
|
117
|
+
/**
|
|
118
|
+
* @deprecated
|
|
119
|
+
*/
|
|
120
|
+
projectId?: (string) | null;
|
|
121
|
+
};
|
|
122
|
+
type FreestyleDomainVerificationRequest = {
|
|
123
|
+
/**
|
|
124
|
+
* The domain to create a verification code for
|
|
125
|
+
*/
|
|
126
|
+
domain: string;
|
|
127
|
+
};
|
|
128
|
+
type FreestyleExecuteScriptParams = {
|
|
129
|
+
/**
|
|
130
|
+
* The JavaScript or TypeScript script to execute
|
|
131
|
+
*/
|
|
132
|
+
script: string;
|
|
133
|
+
config?: FreestyleExecuteScriptParamsConfiguration;
|
|
134
|
+
};
|
|
135
|
+
type FreestyleExecuteScriptParamsConfiguration = {
|
|
136
|
+
/**
|
|
137
|
+
* The environment variables to set for the script
|
|
138
|
+
*/
|
|
139
|
+
envVars?: {
|
|
140
|
+
[key: string]: (string);
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* The node modules to install for the script
|
|
144
|
+
*/
|
|
145
|
+
nodeModules?: {
|
|
146
|
+
[key: string]: (string);
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* Tags for you to organize your scripts, useful for tracking what you're running
|
|
150
|
+
*/
|
|
151
|
+
tags?: Array<(string)>;
|
|
152
|
+
/**
|
|
153
|
+
* The script timeout
|
|
154
|
+
*/
|
|
155
|
+
timeout?: (string) | null;
|
|
156
|
+
/**
|
|
157
|
+
* If false, we'll not resolve peer dependencies for the packages given, this can speed up execute performance, but will break packages with peers unless the peers are manually specified.
|
|
158
|
+
*/
|
|
159
|
+
peerDependencyResolution?: boolean;
|
|
160
|
+
networkPermissions?: Array<FreestyleNetworkPermission> | null;
|
|
161
|
+
};
|
|
162
|
+
type FreestyleExecuteScriptResultSuccess = {
|
|
163
|
+
result: unknown;
|
|
164
|
+
logs: Array<FreestyleJavaScriptLog>;
|
|
165
|
+
};
|
|
166
|
+
type FreestyleFile = {
|
|
167
|
+
/**
|
|
168
|
+
* The content of the file
|
|
169
|
+
*/
|
|
170
|
+
content: string;
|
|
171
|
+
/**
|
|
172
|
+
* The encoding of the file. Either **utf-8** or **base64**
|
|
173
|
+
*/
|
|
174
|
+
encoding?: string;
|
|
175
|
+
};
|
|
176
|
+
type FreestyleGetLogsResponse = {
|
|
177
|
+
logs: Array<FreestyleLogResponseObject>;
|
|
178
|
+
};
|
|
179
|
+
type FreestyleJavaScriptLog = {
|
|
180
|
+
/**
|
|
181
|
+
* The log message
|
|
182
|
+
*/
|
|
183
|
+
message: string;
|
|
184
|
+
/**
|
|
185
|
+
* The log level
|
|
186
|
+
*/
|
|
187
|
+
type: string;
|
|
188
|
+
};
|
|
189
|
+
type FreestyleLogResponseObject = {
|
|
190
|
+
message: string;
|
|
191
|
+
timestamp: string;
|
|
192
|
+
};
|
|
193
|
+
type FreestyleNetworkPermission = (NetworkPermissionData & {
|
|
194
|
+
action: 'allow';
|
|
195
|
+
}) | (NetworkPermissionData & {
|
|
196
|
+
action: 'deny';
|
|
197
|
+
});
|
|
198
|
+
type action = 'allow';
|
|
199
|
+
type FreestyleVerifyDomainRequest = {
|
|
200
|
+
domain: string;
|
|
201
|
+
};
|
|
202
|
+
type NetworkPermissionData = {
|
|
203
|
+
query: string;
|
|
204
|
+
behavior?: Behavior;
|
|
205
|
+
};
|
|
206
|
+
type RepositoryInfo = {
|
|
207
|
+
id: string;
|
|
208
|
+
name: string;
|
|
209
|
+
ownerId: string;
|
|
210
|
+
};
|
|
211
|
+
type HandleDeployCloudstateData = {
|
|
212
|
+
body: FreestyleCloudstateDeployRequest;
|
|
213
|
+
};
|
|
214
|
+
type HandleDeployCloudstateResponse = (FreestyleCloudstateDeploySuccessResponse);
|
|
215
|
+
type HandleDeployCloudstateError = (FreestyleCloudstateDeployErrorResponse);
|
|
216
|
+
type HandleBackupCloudstateData = {
|
|
217
|
+
path: {
|
|
218
|
+
id: string;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
type HandleBackupCloudstateResponse = (Array<(number)>);
|
|
222
|
+
type HandleBackupCloudstateError = (unknown);
|
|
223
|
+
type HandleVerifyWildcardResponse = ({
|
|
224
|
+
domain: string;
|
|
225
|
+
});
|
|
226
|
+
type HandleVerifyWildcardError = ({
|
|
227
|
+
message: string;
|
|
228
|
+
});
|
|
229
|
+
type HandleListDomainsResponse = (Array<{
|
|
230
|
+
domain: string;
|
|
231
|
+
createdAt: number;
|
|
232
|
+
}>);
|
|
233
|
+
type HandleListDomainsError = ({
|
|
234
|
+
message: string;
|
|
235
|
+
});
|
|
236
|
+
type HandleListDomainVerificationRequestsResponse = (Array<{
|
|
237
|
+
verificationCode: string;
|
|
238
|
+
domain: string;
|
|
239
|
+
createdAt: number;
|
|
240
|
+
}>);
|
|
241
|
+
type HandleListDomainVerificationRequestsError = ({
|
|
242
|
+
message: string;
|
|
243
|
+
});
|
|
244
|
+
type HandleVerifyDomainData = {
|
|
245
|
+
body: FreestyleVerifyDomainRequest;
|
|
246
|
+
};
|
|
247
|
+
type HandleVerifyDomainResponse = ({
|
|
248
|
+
domain: string;
|
|
249
|
+
});
|
|
250
|
+
type HandleVerifyDomainError = ({
|
|
251
|
+
message: string;
|
|
252
|
+
});
|
|
253
|
+
type HandleCreateDomainVerificationData = {
|
|
254
|
+
body: FreestyleDomainVerificationRequest;
|
|
255
|
+
};
|
|
256
|
+
type HandleCreateDomainVerificationResponse = ({
|
|
257
|
+
verificationCode: string;
|
|
258
|
+
domain: string;
|
|
259
|
+
});
|
|
260
|
+
type HandleCreateDomainVerificationError = ({
|
|
261
|
+
message: string;
|
|
262
|
+
});
|
|
263
|
+
type HandleDeleteDomainVerificationData = {
|
|
264
|
+
body: FreestyleDeleteDomainVerificationRequest;
|
|
265
|
+
};
|
|
266
|
+
type HandleDeleteDomainVerificationResponse = ({
|
|
267
|
+
verificationCode: string;
|
|
268
|
+
domain: string;
|
|
269
|
+
});
|
|
270
|
+
type HandleDeleteDomainVerificationError = ({
|
|
271
|
+
message: string;
|
|
272
|
+
});
|
|
273
|
+
type HandleListExecuteRunsData = {
|
|
274
|
+
query?: {
|
|
275
|
+
limit?: (number) | null;
|
|
276
|
+
offset?: (number) | null;
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
type HandleListExecuteRunsResponse = ({
|
|
280
|
+
entries: Array<ExecuteLogEntry>;
|
|
281
|
+
total: number;
|
|
282
|
+
offset: number;
|
|
283
|
+
});
|
|
284
|
+
type HandleListExecuteRunsError = ({
|
|
285
|
+
message: string;
|
|
286
|
+
});
|
|
287
|
+
type HandleGetExecuteRunData = {
|
|
288
|
+
path: {
|
|
289
|
+
deployment: string;
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
type HandleGetExecuteRunResponse = ({
|
|
293
|
+
metadata: ExecuteLogEntry;
|
|
294
|
+
code: ExecuteRunInfo;
|
|
295
|
+
});
|
|
296
|
+
type HandleGetExecuteRunError = ({
|
|
297
|
+
message: string;
|
|
298
|
+
});
|
|
299
|
+
type HandleExecuteScriptData = {
|
|
300
|
+
body: FreestyleExecuteScriptParams;
|
|
301
|
+
};
|
|
302
|
+
type HandleExecuteScriptResponse = ({
|
|
303
|
+
result: unknown;
|
|
304
|
+
logs: Array<FreestyleJavaScriptLog>;
|
|
305
|
+
});
|
|
306
|
+
type HandleExecuteScriptError = ({
|
|
307
|
+
error: string;
|
|
308
|
+
});
|
|
309
|
+
type ListRepositoriesHandlerData = {
|
|
310
|
+
query: {
|
|
311
|
+
/**
|
|
312
|
+
* Maximum number of repositories to return
|
|
313
|
+
*/
|
|
314
|
+
limit: number;
|
|
315
|
+
/**
|
|
316
|
+
* Offset for the list of repositories
|
|
317
|
+
*/
|
|
318
|
+
offset: number;
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
type ListRepositoriesHandlerResponse = ({
|
|
322
|
+
repositories: Array<RepositoryInfo>;
|
|
323
|
+
offset: number;
|
|
324
|
+
});
|
|
325
|
+
type ListRepositoriesHandlerError = (string);
|
|
326
|
+
type CreateRepoHandlerData = {
|
|
327
|
+
body: CreateRepositoryRequest;
|
|
328
|
+
};
|
|
329
|
+
type CreateRepoHandlerResponse = ({
|
|
330
|
+
repo_id: string;
|
|
331
|
+
});
|
|
332
|
+
type CreateRepoHandlerError = (string | unknown);
|
|
333
|
+
type DeleteRepoHandlerData = {
|
|
334
|
+
path: {
|
|
335
|
+
/**
|
|
336
|
+
* The repository id
|
|
337
|
+
*/
|
|
338
|
+
repo: string;
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
type DeleteRepoHandlerResponse = (unknown);
|
|
342
|
+
type DeleteRepoHandlerError = (string | unknown);
|
|
343
|
+
type HandleGetLogsData = {
|
|
344
|
+
query?: {
|
|
345
|
+
deploymentId?: (string) | null;
|
|
346
|
+
domain?: (string) | null;
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
type HandleGetLogsResponse = (FreestyleGetLogsResponse);
|
|
350
|
+
type HandleGetLogsError = unknown;
|
|
351
|
+
type HandleDeployWebData = {
|
|
352
|
+
body: FreestyleDeployWebPayload;
|
|
353
|
+
};
|
|
354
|
+
type HandleDeployWebResponse = (FreestyleDeployWebSuccessResponse);
|
|
355
|
+
type HandleDeployWebError = (FreestyleDeployWebErrorResponse);
|
|
356
|
+
type HandleListWebDeploysData = {
|
|
357
|
+
query: {
|
|
358
|
+
/**
|
|
359
|
+
* Maximum number of repositories to return
|
|
360
|
+
*/
|
|
361
|
+
limit: number;
|
|
362
|
+
/**
|
|
363
|
+
* Offset for the list of repositories
|
|
364
|
+
*/
|
|
365
|
+
offset: number;
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
type HandleListWebDeploysResponse = ({
|
|
369
|
+
entries: Array<DeploymentLogEntry>;
|
|
370
|
+
total: number;
|
|
371
|
+
offset: number;
|
|
372
|
+
});
|
|
373
|
+
type HandleListWebDeploysError = ({
|
|
374
|
+
message: string;
|
|
375
|
+
});
|
|
376
|
+
type HandleGetWebDeployDetailsData = {
|
|
377
|
+
path: {
|
|
378
|
+
deployment_id: string;
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
export type { HandleCreateDomainVerificationData as $, FreestyleDomainVerificationRequest as A, Behavior as B, CreateRepoHandlerResponse as C, DeleteRepoHandlerResponse as D, ExecuteLogEntry as E, FreestyleExecuteScriptParamsConfiguration as F, FreestyleExecuteScriptParams as G, HandleBackupCloudstateResponse as H, FreestyleFile as I, FreestyleGetLogsResponse as J, FreestyleJavaScriptLog as K, ListRepositoriesHandlerResponse as L, FreestyleLogResponseObject as M, FreestyleNetworkPermission as N, action as O, FreestyleVerifyDomainRequest as P, NetworkPermissionData as Q, RepositoryInfo as R, HandleDeployCloudstateData as S, HandleDeployCloudstateResponse as T, HandleDeployCloudstateError as U, HandleBackupCloudstateData as V, HandleBackupCloudstateError as W, HandleVerifyWildcardError as X, HandleListDomainsError as Y, HandleListDomainVerificationRequestsError as Z, HandleVerifyDomainData as _, FreestyleExecuteScriptResultSuccess as a, HandleCreateDomainVerificationError as a0, HandleDeleteDomainVerificationData as a1, HandleDeleteDomainVerificationError as a2, HandleListExecuteRunsData as a3, HandleListExecuteRunsError as a4, HandleGetExecuteRunData as a5, HandleGetExecuteRunError as a6, HandleExecuteScriptData as a7, HandleExecuteScriptResponse as a8, HandleExecuteScriptError as a9, ListRepositoriesHandlerData as aa, ListRepositoriesHandlerError as ab, CreateRepoHandlerData as ac, CreateRepoHandlerError as ad, DeleteRepoHandlerData as ae, DeleteRepoHandlerError as af, HandleGetLogsData as ag, HandleGetLogsError as ah, HandleDeployWebData as ai, HandleDeployWebResponse as aj, HandleDeployWebError as ak, HandleListWebDeploysData as al, HandleListWebDeploysError as am, HandleGetWebDeployDetailsData as an, FreestyleDeployWebConfiguration as b, FreestyleDeployWebSuccessResponse as c, FreestyleCloudstateDeployRequest as d, FreestyleCloudstateDeploySuccessResponse as e, HandleGetLogsResponse as f, HandleCreateDomainVerificationResponse as g, HandleVerifyDomainResponse as h, HandleVerifyDomainError as i, HandleListDomainsResponse as j, HandleListDomainVerificationRequestsResponse as k, HandleDeleteDomainVerificationResponse as l, HandleListWebDeploysResponse as m, HandleListExecuteRunsResponse as n, HandleGetExecuteRunResponse as o, HandleVerifyWildcardResponse as p, CreateRepositoryRequest as q, DeploymentLogEntry as r, DeploymentState as s, ExecuteRunInfo as t, ExecuteRunState as u, FreestyleCloudstateDeployConfiguration as v, FreestyleCloudstateDeployErrorResponse as w, FreestyleDeleteDomainVerificationRequest as x, FreestyleDeployWebErrorResponse as y, FreestyleDeployWebPayload as z };
|
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, HandleVerifyWildcardError, HandleVerifyWildcardResponse, HandleListDomainsError, HandleListDomainsResponse, HandleListDomainVerificationRequestsError, HandleListDomainVerificationRequestsResponse, HandleVerifyDomainData, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleCreateDomainVerificationData, HandleCreateDomainVerificationError, HandleCreateDomainVerificationResponse, HandleDeleteDomainVerificationData, HandleDeleteDomainVerificationError, HandleDeleteDomainVerificationResponse, HandleListExecuteRunsData, HandleListExecuteRunsError, HandleListExecuteRunsResponse, HandleGetExecuteRunData, HandleGetExecuteRunError, HandleGetExecuteRunResponse, HandleExecuteScriptData, HandleExecuteScriptError, HandleExecuteScriptResponse, HandleGetLogsData, HandleGetLogsError, HandleGetLogsResponse, HandleDeployWebData, HandleDeployWebError, HandleDeployWebResponse, HandleListWebDeploysError, HandleListWebDeploysResponse, HandleGetWebDeployDetailsData } from './types.gen';
|
|
4
|
+
import type { HandleDeployCloudstateData, HandleDeployCloudstateError, HandleDeployCloudstateResponse, HandleBackupCloudstateData, HandleBackupCloudstateError, HandleBackupCloudstateResponse, HandleVerifyWildcardError, HandleVerifyWildcardResponse, HandleListDomainsError, HandleListDomainsResponse, HandleListDomainVerificationRequestsError, HandleListDomainVerificationRequestsResponse, HandleVerifyDomainData, HandleVerifyDomainError, HandleVerifyDomainResponse, HandleCreateDomainVerificationData, HandleCreateDomainVerificationError, HandleCreateDomainVerificationResponse, HandleDeleteDomainVerificationData, HandleDeleteDomainVerificationError, HandleDeleteDomainVerificationResponse, HandleListExecuteRunsData, HandleListExecuteRunsError, HandleListExecuteRunsResponse, HandleGetExecuteRunData, HandleGetExecuteRunError, HandleGetExecuteRunResponse, HandleExecuteScriptData, HandleExecuteScriptError, HandleExecuteScriptResponse, ListRepositoriesHandlerData, ListRepositoriesHandlerError, ListRepositoriesHandlerResponse, CreateRepoHandlerData, CreateRepoHandlerError, CreateRepoHandlerResponse, DeleteRepoHandlerData, DeleteRepoHandlerError, DeleteRepoHandlerResponse, HandleGetLogsData, HandleGetLogsError, HandleGetLogsResponse, HandleDeployWebData, HandleDeployWebError, HandleDeployWebResponse, HandleListWebDeploysData, HandleListWebDeploysError, HandleListWebDeploysResponse, HandleGetWebDeployDetailsData } from './types.gen';
|
|
5
5
|
|
|
6
6
|
export const client = createClient(createConfig());
|
|
7
7
|
|
|
@@ -35,7 +35,6 @@ export const handleBackupCloudstate = <ThrowOnError extends boolean = false>(opt
|
|
|
35
35
|
* 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:
|
|
36
36
|
*
|
|
37
37
|
* `_acme-challenge.yourdomain.com` NS `dns.freestyle.sh`
|
|
38
|
-
*
|
|
39
38
|
*/
|
|
40
39
|
export const handleVerifyWildcard = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
|
|
41
40
|
return (options?.client ?? client).post<HandleVerifyWildcardResponse, HandleVerifyWildcardError, ThrowOnError>({
|
|
@@ -132,11 +131,50 @@ export const handleExecuteScript = <ThrowOnError extends boolean = false>(option
|
|
|
132
131
|
});
|
|
133
132
|
};
|
|
134
133
|
|
|
134
|
+
/**
|
|
135
|
+
* List repositories
|
|
136
|
+
* List repositories.
|
|
137
|
+
*/
|
|
138
|
+
export const listRepositoriesHandler = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListRepositoriesHandlerData, ThrowOnError>) => {
|
|
139
|
+
return (options?.client ?? client).get<ListRepositoriesHandlerResponse, ListRepositoriesHandlerError, ThrowOnError>({
|
|
140
|
+
...options,
|
|
141
|
+
url: '/git/v1/repo'
|
|
142
|
+
});
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Create a repository
|
|
147
|
+
* Create a repository. Once the repository is created, it will also be created on the Git server.
|
|
148
|
+
* The repository name must be unique within your account.
|
|
149
|
+
*
|
|
150
|
+
* Once created, you can then push your code to this repository.
|
|
151
|
+
*
|
|
152
|
+
* The repo will be available at `git.freestyle.sh/{repo-id}`
|
|
153
|
+
*
|
|
154
|
+
*/
|
|
155
|
+
export const createRepoHandler = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateRepoHandlerData, ThrowOnError>) => {
|
|
156
|
+
return (options?.client ?? client).post<CreateRepoHandlerResponse, CreateRepoHandlerError, ThrowOnError>({
|
|
157
|
+
...options,
|
|
158
|
+
url: '/git/v1/repo'
|
|
159
|
+
});
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Delete a repository
|
|
164
|
+
* Delete a repository. This is irreversible, and will also delete the repository on the Git server.
|
|
165
|
+
*/
|
|
166
|
+
export const deleteRepoHandler = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteRepoHandlerData, ThrowOnError>) => {
|
|
167
|
+
return (options?.client ?? client).delete<DeleteRepoHandlerResponse, DeleteRepoHandlerError, ThrowOnError>({
|
|
168
|
+
...options,
|
|
169
|
+
url: '/git/v1/repo/{repo}'
|
|
170
|
+
});
|
|
171
|
+
};
|
|
172
|
+
|
|
135
173
|
/**
|
|
136
174
|
* Deployment Logs
|
|
137
175
|
* Get the logs for a deployment
|
|
138
176
|
*/
|
|
139
|
-
export const handleGetLogs = <ThrowOnError extends boolean = false>(options
|
|
177
|
+
export const handleGetLogs = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<HandleGetLogsData, ThrowOnError>) => {
|
|
140
178
|
return (options?.client ?? client).get<HandleGetLogsResponse, HandleGetLogsError, ThrowOnError>({
|
|
141
179
|
...options,
|
|
142
180
|
url: '/observability/v1/logs'
|
|
@@ -158,7 +196,7 @@ export const handleDeployWeb = <ThrowOnError extends boolean = false>(options: O
|
|
|
158
196
|
* List web deploys
|
|
159
197
|
* List web deploys.
|
|
160
198
|
*/
|
|
161
|
-
export const handleListWebDeploys = <ThrowOnError extends boolean = false>(options
|
|
199
|
+
export const handleListWebDeploys = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleListWebDeploysData, ThrowOnError>) => {
|
|
162
200
|
return (options?.client ?? client).get<HandleListWebDeploysResponse, HandleListWebDeploysError, ThrowOnError>({
|
|
163
201
|
...options,
|
|
164
202
|
url: '/web/v1/deployments'
|
package/openapi/types.gen.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
|
|
3
|
+
export type Behavior = 'regex' | 'exact';
|
|
4
|
+
|
|
5
|
+
export type CreateRepositoryRequest = {
|
|
6
|
+
name: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
3
9
|
export type DeploymentLogEntry = {
|
|
4
10
|
deploymentId: string;
|
|
5
11
|
accountId: string;
|
|
@@ -103,6 +109,7 @@ export type FreestyleDeployWebConfiguration = {
|
|
|
103
109
|
[key: string]: (string);
|
|
104
110
|
} | null;
|
|
105
111
|
serverStartCheck?: boolean;
|
|
112
|
+
networkPermissions?: Array<FreestyleNetworkPermission> | null;
|
|
106
113
|
};
|
|
107
114
|
|
|
108
115
|
export type FreestyleDeployWebErrorResponse = {
|
|
@@ -170,6 +177,7 @@ export type FreestyleExecuteScriptParamsConfiguration = {
|
|
|
170
177
|
* If false, we'll not resolve peer dependencies for the packages given, this can speed up execute performance, but will break packages with peers unless the peers are manually specified.
|
|
171
178
|
*/
|
|
172
179
|
peerDependencyResolution?: boolean;
|
|
180
|
+
networkPermissions?: Array<FreestyleNetworkPermission> | null;
|
|
173
181
|
};
|
|
174
182
|
|
|
175
183
|
export type FreestyleExecuteScriptResultSuccess = {
|
|
@@ -208,10 +216,29 @@ export type FreestyleLogResponseObject = {
|
|
|
208
216
|
timestamp: string;
|
|
209
217
|
};
|
|
210
218
|
|
|
219
|
+
export type FreestyleNetworkPermission = (NetworkPermissionData & {
|
|
220
|
+
action: 'allow';
|
|
221
|
+
}) | (NetworkPermissionData & {
|
|
222
|
+
action: 'deny';
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
export type action = 'allow';
|
|
226
|
+
|
|
211
227
|
export type FreestyleVerifyDomainRequest = {
|
|
212
228
|
domain: string;
|
|
213
229
|
};
|
|
214
230
|
|
|
231
|
+
export type NetworkPermissionData = {
|
|
232
|
+
query: string;
|
|
233
|
+
behavior?: Behavior;
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
export type RepositoryInfo = {
|
|
237
|
+
id: string;
|
|
238
|
+
name: string;
|
|
239
|
+
ownerId: string;
|
|
240
|
+
};
|
|
241
|
+
|
|
215
242
|
export type HandleDeployCloudstateData = {
|
|
216
243
|
body: FreestyleCloudstateDeployRequest;
|
|
217
244
|
};
|
|
@@ -340,9 +367,53 @@ export type HandleExecuteScriptError = ({
|
|
|
340
367
|
error: string;
|
|
341
368
|
});
|
|
342
369
|
|
|
343
|
-
export type
|
|
370
|
+
export type ListRepositoriesHandlerData = {
|
|
344
371
|
query: {
|
|
345
|
-
|
|
372
|
+
/**
|
|
373
|
+
* Maximum number of repositories to return
|
|
374
|
+
*/
|
|
375
|
+
limit: number;
|
|
376
|
+
/**
|
|
377
|
+
* Offset for the list of repositories
|
|
378
|
+
*/
|
|
379
|
+
offset: number;
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
export type ListRepositoriesHandlerResponse = ({
|
|
384
|
+
repositories: Array<RepositoryInfo>;
|
|
385
|
+
offset: number;
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
export type ListRepositoriesHandlerError = (string);
|
|
389
|
+
|
|
390
|
+
export type CreateRepoHandlerData = {
|
|
391
|
+
body: CreateRepositoryRequest;
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
export type CreateRepoHandlerResponse = ({
|
|
395
|
+
repo_id: string;
|
|
396
|
+
});
|
|
397
|
+
|
|
398
|
+
export type CreateRepoHandlerError = (string | unknown);
|
|
399
|
+
|
|
400
|
+
export type DeleteRepoHandlerData = {
|
|
401
|
+
path: {
|
|
402
|
+
/**
|
|
403
|
+
* The repository id
|
|
404
|
+
*/
|
|
405
|
+
repo: string;
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
export type DeleteRepoHandlerResponse = (unknown);
|
|
410
|
+
|
|
411
|
+
export type DeleteRepoHandlerError = (string | unknown);
|
|
412
|
+
|
|
413
|
+
export type HandleGetLogsData = {
|
|
414
|
+
query?: {
|
|
415
|
+
deploymentId?: (string) | null;
|
|
416
|
+
domain?: (string) | null;
|
|
346
417
|
};
|
|
347
418
|
};
|
|
348
419
|
|
|
@@ -358,6 +429,19 @@ export type HandleDeployWebResponse = (FreestyleDeployWebSuccessResponse);
|
|
|
358
429
|
|
|
359
430
|
export type HandleDeployWebError = (FreestyleDeployWebErrorResponse);
|
|
360
431
|
|
|
432
|
+
export type HandleListWebDeploysData = {
|
|
433
|
+
query: {
|
|
434
|
+
/**
|
|
435
|
+
* Maximum number of repositories to return
|
|
436
|
+
*/
|
|
437
|
+
limit: number;
|
|
438
|
+
/**
|
|
439
|
+
* Offset for the list of repositories
|
|
440
|
+
*/
|
|
441
|
+
offset: number;
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
|
|
361
445
|
export type HandleListWebDeploysResponse = ({
|
|
362
446
|
entries: Array<DeploymentLogEntry>;
|
|
363
447
|
total: number;
|