@buddy-works/sandbox-sdk 0.1.4 → 0.1.6-rc.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.
- package/README.md +50 -0
- package/dist/index.d.mts +307 -80
- package/dist/index.mjs +1774 -1550
- package/package.json +66 -65
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { ZodError, prettifyError } from "zod";
|
|
2
3
|
import { inspect } from "node:util";
|
|
3
4
|
import pRetry from "p-retry";
|
|
4
5
|
import { readFile, writeFile } from "node:fs/promises";
|
|
@@ -20,6 +21,31 @@ const getSandboxResponseTransformer = async (data) => {
|
|
|
20
21
|
data = sandboxResponseSchemaResponseTransformer(data);
|
|
21
22
|
return data;
|
|
22
23
|
};
|
|
24
|
+
const startSandboxAppResponseTransformer = async (data) => {
|
|
25
|
+
data = sandboxResponseSchemaResponseTransformer(data);
|
|
26
|
+
return data;
|
|
27
|
+
};
|
|
28
|
+
const stopSandboxAppResponseTransformer = async (data) => {
|
|
29
|
+
data = sandboxResponseSchemaResponseTransformer(data);
|
|
30
|
+
return data;
|
|
31
|
+
};
|
|
32
|
+
const sandboxCommandViewSchemaResponseTransformer = (data) => {
|
|
33
|
+
if (data.start_date) data.start_date = new Date(data.start_date);
|
|
34
|
+
if (data.finish_date) data.finish_date = new Date(data.finish_date);
|
|
35
|
+
return data;
|
|
36
|
+
};
|
|
37
|
+
const executeSandboxCommandResponseTransformer = async (data) => {
|
|
38
|
+
data = sandboxCommandViewSchemaResponseTransformer(data);
|
|
39
|
+
return data;
|
|
40
|
+
};
|
|
41
|
+
const getSandboxCommandResponseTransformer = async (data) => {
|
|
42
|
+
data = sandboxCommandViewSchemaResponseTransformer(data);
|
|
43
|
+
return data;
|
|
44
|
+
};
|
|
45
|
+
const terminateSandboxCommandResponseTransformer = async (data) => {
|
|
46
|
+
data = sandboxCommandViewSchemaResponseTransformer(data);
|
|
47
|
+
return data;
|
|
48
|
+
};
|
|
23
49
|
const sandboxContentItemSchemaResponseTransformer = (data) => {
|
|
24
50
|
if (data.size) data.size = BigInt(data.size.toString());
|
|
25
51
|
return data;
|
|
@@ -56,34 +82,35 @@ const stopSandboxResponseTransformer = async (data) => {
|
|
|
56
82
|
//#endregion
|
|
57
83
|
//#region src/api/openapi/zod.gen.ts
|
|
58
84
|
const zUpdateWorkspaceMemberRequest = z.object({
|
|
59
|
-
admin: z.
|
|
60
|
-
auto_assign_to_new_projects: z.
|
|
61
|
-
auto_assign_permission_set_id: z.
|
|
85
|
+
admin: z.boolean().optional(),
|
|
86
|
+
auto_assign_to_new_projects: z.boolean().optional(),
|
|
87
|
+
auto_assign_permission_set_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional()
|
|
62
88
|
});
|
|
63
89
|
const zUpdateSsoRequest = z.object({
|
|
64
|
-
type: z.
|
|
65
|
-
sso_provider_type: z.
|
|
90
|
+
type: z.enum(["SAML", "OIDC"]).optional(),
|
|
91
|
+
sso_provider_type: z.enum([
|
|
66
92
|
"OKTA",
|
|
67
93
|
"ONE_LOGIN",
|
|
68
94
|
"GOOGLE",
|
|
69
95
|
"AZURE",
|
|
70
96
|
"AWS",
|
|
71
97
|
"CUSTOM"
|
|
72
|
-
])),
|
|
73
|
-
sso_url: z.
|
|
74
|
-
issuer: z.
|
|
75
|
-
certificate: z.
|
|
76
|
-
signature_method: z.
|
|
77
|
-
digest_method: z.
|
|
78
|
-
client_id: z.
|
|
79
|
-
client_secret: z.
|
|
80
|
-
require_sso_for_all_members: z.
|
|
98
|
+
]).optional(),
|
|
99
|
+
sso_url: z.string().optional(),
|
|
100
|
+
issuer: z.string().optional(),
|
|
101
|
+
certificate: z.string().optional(),
|
|
102
|
+
signature_method: z.string().optional(),
|
|
103
|
+
digest_method: z.string().optional(),
|
|
104
|
+
client_id: z.string().optional(),
|
|
105
|
+
client_secret: z.string().optional(),
|
|
106
|
+
require_sso_for_all_members: z.boolean().optional()
|
|
81
107
|
});
|
|
82
108
|
const zGroupPermissionView = z.object({
|
|
83
|
-
id: z.
|
|
84
|
-
access_level: z.
|
|
109
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
110
|
+
access_level: z.enum([
|
|
85
111
|
"DENIED",
|
|
86
112
|
"READ_ONLY",
|
|
113
|
+
"USE_ONLY",
|
|
87
114
|
"BLIND",
|
|
88
115
|
"RUN_ONLY",
|
|
89
116
|
"READ_WRITE",
|
|
@@ -91,15 +118,15 @@ const zGroupPermissionView = z.object({
|
|
|
91
118
|
"DEFAULT",
|
|
92
119
|
"ALLOWED",
|
|
93
120
|
"STAGE",
|
|
94
|
-
"COMMIT"
|
|
95
|
-
|
|
96
|
-
]))
|
|
121
|
+
"COMMIT"
|
|
122
|
+
]).optional()
|
|
97
123
|
});
|
|
98
124
|
const zUserPermissionView = z.object({
|
|
99
|
-
id: z.
|
|
100
|
-
access_level: z.
|
|
125
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
126
|
+
access_level: z.enum([
|
|
101
127
|
"DENIED",
|
|
102
128
|
"READ_ONLY",
|
|
129
|
+
"USE_ONLY",
|
|
103
130
|
"BLIND",
|
|
104
131
|
"RUN_ONLY",
|
|
105
132
|
"READ_WRITE",
|
|
@@ -107,17 +134,17 @@ const zUserPermissionView = z.object({
|
|
|
107
134
|
"DEFAULT",
|
|
108
135
|
"ALLOWED",
|
|
109
136
|
"STAGE",
|
|
110
|
-
"COMMIT"
|
|
111
|
-
|
|
112
|
-
]))
|
|
137
|
+
"COMMIT"
|
|
138
|
+
]).optional()
|
|
113
139
|
});
|
|
114
140
|
/**
|
|
115
141
|
* Permission settings defining who can use this integration
|
|
116
142
|
*/
|
|
117
143
|
const zIntegrationPermissionsView = z.object({
|
|
118
|
-
others: z.
|
|
144
|
+
others: z.enum([
|
|
119
145
|
"DENIED",
|
|
120
146
|
"READ_ONLY",
|
|
147
|
+
"USE_ONLY",
|
|
121
148
|
"BLIND",
|
|
122
149
|
"RUN_ONLY",
|
|
123
150
|
"READ_WRITE",
|
|
@@ -125,14 +152,14 @@ const zIntegrationPermissionsView = z.object({
|
|
|
125
152
|
"DEFAULT",
|
|
126
153
|
"ALLOWED",
|
|
127
154
|
"STAGE",
|
|
128
|
-
"COMMIT"
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
admins: z.optional(z.enum([
|
|
155
|
+
"COMMIT"
|
|
156
|
+
]).optional(),
|
|
157
|
+
users: z.array(zUserPermissionView).optional(),
|
|
158
|
+
groups: z.array(zGroupPermissionView).optional(),
|
|
159
|
+
admins: z.enum([
|
|
134
160
|
"DENIED",
|
|
135
161
|
"READ_ONLY",
|
|
162
|
+
"USE_ONLY",
|
|
136
163
|
"BLIND",
|
|
137
164
|
"RUN_ONLY",
|
|
138
165
|
"READ_WRITE",
|
|
@@ -140,52 +167,51 @@ const zIntegrationPermissionsView = z.object({
|
|
|
140
167
|
"DEFAULT",
|
|
141
168
|
"ALLOWED",
|
|
142
169
|
"STAGE",
|
|
143
|
-
"COMMIT"
|
|
144
|
-
|
|
145
|
-
]))
|
|
170
|
+
"COMMIT"
|
|
171
|
+
]).optional()
|
|
146
172
|
});
|
|
147
173
|
/**
|
|
148
174
|
* Pipeline reference
|
|
149
175
|
*/
|
|
150
176
|
const zPipelineIdView = z.object({ id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }) });
|
|
151
177
|
const zRoleAssumptionView = z.object({
|
|
152
|
-
arn: z.
|
|
153
|
-
external_id: z.
|
|
154
|
-
duration: z.
|
|
178
|
+
arn: z.string().optional(),
|
|
179
|
+
external_id: z.string().optional(),
|
|
180
|
+
duration: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional()
|
|
155
181
|
});
|
|
156
182
|
const zUpdateIntegrationRequest = z.object({
|
|
157
|
-
identifier: z.
|
|
183
|
+
identifier: z.string().optional(),
|
|
158
184
|
name: z.string(),
|
|
159
|
-
token: z.
|
|
160
|
-
email: z.
|
|
161
|
-
api_key: z.
|
|
162
|
-
access_key: z.
|
|
163
|
-
secret_key: z.
|
|
164
|
-
partner_token: z.
|
|
165
|
-
shop: z.
|
|
166
|
-
url: z.
|
|
167
|
-
chat_id: z.
|
|
168
|
-
git_hub_user_id: z.
|
|
169
|
-
git_hub_user_name: z.
|
|
170
|
-
username: z.
|
|
171
|
-
password: z.
|
|
172
|
-
app_id: z.
|
|
173
|
-
tenant_id: z.
|
|
174
|
-
client_id: z.
|
|
175
|
-
client_token: z.
|
|
176
|
-
server_id: z.
|
|
177
|
-
server_token: z.
|
|
178
|
-
key_id: z.
|
|
179
|
-
application_key: z.
|
|
180
|
-
host_url: z.
|
|
181
|
-
webhook_address: z.
|
|
182
|
-
slack_user_id: z.
|
|
183
|
-
region: z.
|
|
184
|
-
role_assumptions: z.
|
|
185
|
-
all_pipelines_allowed: z.
|
|
186
|
-
allowed_pipelines: z.
|
|
187
|
-
permissions:
|
|
188
|
-
auth_type: z.
|
|
185
|
+
token: z.string().optional(),
|
|
186
|
+
email: z.string().optional(),
|
|
187
|
+
api_key: z.string().optional(),
|
|
188
|
+
access_key: z.string().optional(),
|
|
189
|
+
secret_key: z.string().optional(),
|
|
190
|
+
partner_token: z.string().optional(),
|
|
191
|
+
shop: z.string().optional(),
|
|
192
|
+
url: z.string().optional(),
|
|
193
|
+
chat_id: z.string().optional(),
|
|
194
|
+
git_hub_user_id: z.string().optional(),
|
|
195
|
+
git_hub_user_name: z.string().optional(),
|
|
196
|
+
username: z.string().optional(),
|
|
197
|
+
password: z.string().optional(),
|
|
198
|
+
app_id: z.string().optional(),
|
|
199
|
+
tenant_id: z.string().optional(),
|
|
200
|
+
client_id: z.string().optional(),
|
|
201
|
+
client_token: z.string().optional(),
|
|
202
|
+
server_id: z.string().optional(),
|
|
203
|
+
server_token: z.string().optional(),
|
|
204
|
+
key_id: z.string().optional(),
|
|
205
|
+
application_key: z.string().optional(),
|
|
206
|
+
host_url: z.string().optional(),
|
|
207
|
+
webhook_address: z.string().optional(),
|
|
208
|
+
slack_user_id: z.string().optional(),
|
|
209
|
+
region: z.string().optional(),
|
|
210
|
+
role_assumptions: z.array(zRoleAssumptionView).optional(),
|
|
211
|
+
all_pipelines_allowed: z.boolean().optional(),
|
|
212
|
+
allowed_pipelines: z.array(zPipelineIdView).optional(),
|
|
213
|
+
permissions: zIntegrationPermissionsView.optional(),
|
|
214
|
+
auth_type: z.enum([
|
|
189
215
|
"OAUTH",
|
|
190
216
|
"TOKEN",
|
|
191
217
|
"API_KEY",
|
|
@@ -196,53 +222,54 @@ const zUpdateIntegrationRequest = z.object({
|
|
|
196
222
|
"OIDC",
|
|
197
223
|
"TRUSTED",
|
|
198
224
|
"APP_RW"
|
|
199
|
-
])),
|
|
200
|
-
target_url: z.
|
|
201
|
-
refresh_token: z.
|
|
202
|
-
audience: z.
|
|
203
|
-
config: z.
|
|
204
|
-
google_project: z.
|
|
205
|
-
atop_url: z.
|
|
225
|
+
]).optional(),
|
|
226
|
+
target_url: z.string().optional(),
|
|
227
|
+
refresh_token: z.string().optional(),
|
|
228
|
+
audience: z.string().optional(),
|
|
229
|
+
config: z.string().optional(),
|
|
230
|
+
google_project: z.string().optional(),
|
|
231
|
+
atop_url: z.string().optional(),
|
|
232
|
+
disabled: z.boolean().optional()
|
|
206
233
|
});
|
|
207
234
|
const zShortWorkspaceView = z.object({
|
|
208
|
-
url: z.
|
|
209
|
-
html_url: z.
|
|
210
|
-
id: z.
|
|
211
|
-
name: z.
|
|
212
|
-
domain: z.
|
|
235
|
+
url: z.string().readonly().optional(),
|
|
236
|
+
html_url: z.string().readonly().optional(),
|
|
237
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
238
|
+
name: z.string().optional(),
|
|
239
|
+
domain: z.string().optional()
|
|
213
240
|
});
|
|
214
241
|
const zWorkspacesView = z.object({
|
|
215
|
-
url: z.
|
|
216
|
-
html_url: z.
|
|
217
|
-
workspaces: z.
|
|
242
|
+
url: z.string().readonly().optional(),
|
|
243
|
+
html_url: z.string().readonly().optional(),
|
|
244
|
+
workspaces: z.array(zShortWorkspaceView).optional()
|
|
218
245
|
});
|
|
219
246
|
const zWorkspaceMemberView = z.object({
|
|
220
|
-
url: z.
|
|
221
|
-
html_url: z.
|
|
222
|
-
id: z.
|
|
223
|
-
name: z.
|
|
224
|
-
avatar_url: z.
|
|
225
|
-
email: z.
|
|
226
|
-
admin: z.
|
|
227
|
-
workspace_owner: z.
|
|
228
|
-
auto_assign_to_new_projects: z.
|
|
229
|
-
auto_assign_permission_set_id: z.
|
|
247
|
+
url: z.string().readonly().optional(),
|
|
248
|
+
html_url: z.string().readonly().optional(),
|
|
249
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
250
|
+
name: z.string().optional(),
|
|
251
|
+
avatar_url: z.string().optional(),
|
|
252
|
+
email: z.string().optional(),
|
|
253
|
+
admin: z.boolean().optional(),
|
|
254
|
+
workspace_owner: z.boolean().optional(),
|
|
255
|
+
auto_assign_to_new_projects: z.boolean().optional(),
|
|
256
|
+
auto_assign_permission_set_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional()
|
|
230
257
|
});
|
|
231
258
|
const zWorkspaceMembersView = z.object({
|
|
232
|
-
url: z.
|
|
233
|
-
html_url: z.
|
|
234
|
-
members: z.
|
|
259
|
+
url: z.string().readonly().optional(),
|
|
260
|
+
html_url: z.string().readonly().optional(),
|
|
261
|
+
members: z.array(zWorkspaceMemberView).optional()
|
|
235
262
|
});
|
|
236
263
|
const zWorkspaceView = z.object({
|
|
237
|
-
url: z.
|
|
238
|
-
html_url: z.
|
|
239
|
-
id: z.
|
|
240
|
-
name: z.
|
|
241
|
-
domain: z.
|
|
242
|
-
owner_id: z.
|
|
243
|
-
frozen: z.
|
|
244
|
-
create_date: z.
|
|
245
|
-
default_pipeline_resource: z.
|
|
264
|
+
url: z.string().readonly().optional(),
|
|
265
|
+
html_url: z.string().readonly().optional(),
|
|
266
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
267
|
+
name: z.string().optional(),
|
|
268
|
+
domain: z.string().optional(),
|
|
269
|
+
owner_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
270
|
+
frozen: z.boolean().optional(),
|
|
271
|
+
create_date: z.iso.datetime().optional(),
|
|
272
|
+
default_pipeline_resource: z.enum([
|
|
246
273
|
"DEFAULT",
|
|
247
274
|
"NANO",
|
|
248
275
|
"SMALL",
|
|
@@ -251,313 +278,299 @@ const zWorkspaceView = z.object({
|
|
|
251
278
|
"XLARGE",
|
|
252
279
|
"CUSTOM",
|
|
253
280
|
"X2LARGE"
|
|
254
|
-
])),
|
|
255
|
-
sso_enabled: z.
|
|
256
|
-
public_pipelines_disabled: z.
|
|
281
|
+
]).optional(),
|
|
282
|
+
sso_enabled: z.boolean().optional(),
|
|
283
|
+
public_pipelines_disabled: z.boolean().optional()
|
|
257
284
|
});
|
|
258
285
|
const zSsoView = z.object({
|
|
259
|
-
url: z.
|
|
260
|
-
html_url: z.
|
|
261
|
-
type: z.
|
|
262
|
-
sso_provider_type: z.
|
|
286
|
+
url: z.string().readonly().optional(),
|
|
287
|
+
html_url: z.string().readonly().optional(),
|
|
288
|
+
type: z.enum(["SAML", "OIDC"]).optional(),
|
|
289
|
+
sso_provider_type: z.enum([
|
|
263
290
|
"OKTA",
|
|
264
291
|
"ONE_LOGIN",
|
|
265
292
|
"GOOGLE",
|
|
266
293
|
"AZURE",
|
|
267
294
|
"AWS",
|
|
268
295
|
"CUSTOM"
|
|
269
|
-
])),
|
|
270
|
-
sso_url: z.
|
|
271
|
-
issuer: z.
|
|
272
|
-
certificate: z.
|
|
273
|
-
signature_method: z.
|
|
274
|
-
digest_method: z.
|
|
275
|
-
require_sso_for_all_members: z.
|
|
296
|
+
]).optional(),
|
|
297
|
+
sso_url: z.string().optional(),
|
|
298
|
+
issuer: z.string().optional(),
|
|
299
|
+
certificate: z.string().optional(),
|
|
300
|
+
signature_method: z.string().optional(),
|
|
301
|
+
digest_method: z.string().optional(),
|
|
302
|
+
require_sso_for_all_members: z.boolean().optional()
|
|
276
303
|
});
|
|
277
304
|
/**
|
|
278
305
|
* YAML pipeline definition configuration
|
|
279
306
|
*/
|
|
280
307
|
const zYamlDefinitionView = z.object({
|
|
281
|
-
path: z.
|
|
282
|
-
branch: z.
|
|
283
|
-
project: z.
|
|
308
|
+
path: z.string().optional(),
|
|
309
|
+
branch: z.string().optional(),
|
|
310
|
+
project: z.string().optional()
|
|
284
311
|
});
|
|
285
312
|
/**
|
|
286
313
|
* The parameters passed to the remote pipeline definition
|
|
287
314
|
*/
|
|
288
315
|
const zPipelinePropertyView = z.object({
|
|
289
|
-
key: z.
|
|
290
|
-
value: z.
|
|
316
|
+
key: z.string().optional(),
|
|
317
|
+
value: z.string().optional()
|
|
291
318
|
});
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
]))
|
|
319
|
+
/**
|
|
320
|
+
* MSSQL authentication credentials
|
|
321
|
+
*/
|
|
322
|
+
const zMssqlAuthView = z.object({
|
|
323
|
+
method: z.enum(["PASSWORD"]).optional(),
|
|
324
|
+
username: z.string(),
|
|
325
|
+
password: z.string()
|
|
300
326
|
});
|
|
301
327
|
/**
|
|
302
|
-
*
|
|
328
|
+
* MongoDB authentication credentials
|
|
303
329
|
*/
|
|
304
|
-
const
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
"DELETE_REF",
|
|
309
|
-
"PULL_REQUEST",
|
|
310
|
-
"SCHEDULE",
|
|
311
|
-
"PUBLISH_PACKAGE_VERSION",
|
|
312
|
-
"DELETE_PACKAGE_VERSION",
|
|
313
|
-
"WEBHOOK",
|
|
314
|
-
"EMAIL",
|
|
315
|
-
"CREATE_PACKAGE_VERSION"
|
|
316
|
-
])),
|
|
317
|
-
refs: z.optional(z.array(z.string())),
|
|
318
|
-
events: z.optional(z.array(z.string())),
|
|
319
|
-
branches: z.optional(z.array(z.string())),
|
|
320
|
-
packages: z.optional(z.array(zPipelinePkgContextView)),
|
|
321
|
-
start_date: z.optional(z.iso.datetime()),
|
|
322
|
-
delay: z.optional(z.coerce.bigint().min(BigInt("-9223372036854775808"), { error: "Invalid value: Expected int64 to be >= -9223372036854775808" }).max(BigInt("9223372036854775807"), { error: "Invalid value: Expected int64 to be <= 9223372036854775807" })),
|
|
323
|
-
cron: z.optional(z.string()),
|
|
324
|
-
timezone: z.optional(z.string()),
|
|
325
|
-
totp: z.optional(z.boolean()),
|
|
326
|
-
prefix: z.optional(z.string()),
|
|
327
|
-
whitelist: z.optional(z.array(z.string()))
|
|
330
|
+
const zMongoAuthView = z.object({
|
|
331
|
+
method: z.enum(["PASSWORD"]).optional(),
|
|
332
|
+
username: z.string(),
|
|
333
|
+
password: z.string()
|
|
328
334
|
});
|
|
329
335
|
/**
|
|
330
|
-
*
|
|
336
|
+
* PostgreSQL authentication credentials
|
|
331
337
|
*/
|
|
332
|
-
const
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
"
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
338
|
+
const zPostgresqlAuthView = z.object({
|
|
339
|
+
method: z.enum(["PASSWORD"]).optional(),
|
|
340
|
+
username: z.string(),
|
|
341
|
+
password: z.string()
|
|
342
|
+
});
|
|
343
|
+
/**
|
|
344
|
+
* MySQL authentication credentials
|
|
345
|
+
*/
|
|
346
|
+
const zMysqlAuthView = z.object({
|
|
347
|
+
method: z.enum(["PASSWORD"]).optional(),
|
|
348
|
+
username: z.string(),
|
|
349
|
+
password: z.string()
|
|
350
|
+
});
|
|
351
|
+
/**
|
|
352
|
+
* Define proxy servers' authentication method using the following parameters
|
|
353
|
+
*/
|
|
354
|
+
const zSshAuthView = z.object({
|
|
355
|
+
method: z.enum([
|
|
356
|
+
"PASSWORD",
|
|
357
|
+
"SSH_KEY",
|
|
358
|
+
"ASSETS_KEY",
|
|
359
|
+
"PROXY_CREDENTIALS",
|
|
360
|
+
"PROXY_KEY"
|
|
361
|
+
]),
|
|
362
|
+
username: z.string().optional(),
|
|
363
|
+
password: z.string().optional(),
|
|
364
|
+
asset: z.string().optional(),
|
|
365
|
+
passphrase: z.string().optional(),
|
|
366
|
+
key: z.string().optional(),
|
|
367
|
+
key_path: z.string().optional()
|
|
368
|
+
});
|
|
369
|
+
/**
|
|
370
|
+
* Kubernetes cluster authentication method
|
|
371
|
+
*/
|
|
372
|
+
const zK8sAuthView = z.object({
|
|
373
|
+
method: z.enum([
|
|
374
|
+
"PASS",
|
|
375
|
+
"CERT",
|
|
376
|
+
"TOKEN"
|
|
377
|
+
]),
|
|
378
|
+
username: z.string().optional(),
|
|
379
|
+
password: z.string().optional(),
|
|
380
|
+
certificate_authority: z.string().optional(),
|
|
381
|
+
client_certificate: z.string().optional(),
|
|
382
|
+
client_key: z.string().optional(),
|
|
383
|
+
token: z.string().optional()
|
|
384
|
+
});
|
|
385
|
+
/**
|
|
386
|
+
* Authentication details
|
|
387
|
+
*/
|
|
388
|
+
const zGitAuthView = z.object({
|
|
389
|
+
method: z.enum([
|
|
390
|
+
"HTTP",
|
|
391
|
+
"SSH_KEY",
|
|
392
|
+
"ASSETS_KEY",
|
|
393
|
+
"CURRENT"
|
|
394
|
+
]),
|
|
395
|
+
username: z.string().optional(),
|
|
396
|
+
password: z.string().optional(),
|
|
397
|
+
asset: z.string().optional(),
|
|
398
|
+
key: z.string().optional()
|
|
399
|
+
});
|
|
400
|
+
/**
|
|
401
|
+
* Authentication details
|
|
402
|
+
*/
|
|
403
|
+
const zFtpAuthView = z.object({
|
|
404
|
+
username: z.string(),
|
|
405
|
+
password: z.string()
|
|
406
|
+
});
|
|
407
|
+
/**
|
|
408
|
+
* Defines how the target can be used (as deployment target, proxy, or both)
|
|
409
|
+
*/
|
|
410
|
+
const zUseAsView = z.object({
|
|
411
|
+
target: z.boolean().optional(),
|
|
412
|
+
proxy: z.boolean().optional()
|
|
413
|
+
});
|
|
414
|
+
/**
|
|
415
|
+
* List of specific sandboxes allowed to use this target
|
|
416
|
+
*/
|
|
417
|
+
const zAllowedSandboxView = z.object({
|
|
418
|
+
project: z.string(),
|
|
419
|
+
sandbox: z.string(),
|
|
420
|
+
access_level: z.enum([
|
|
421
|
+
"DENIED",
|
|
422
|
+
"READ_ONLY",
|
|
423
|
+
"USE_ONLY",
|
|
424
|
+
"BLIND",
|
|
425
|
+
"RUN_ONLY",
|
|
426
|
+
"READ_WRITE",
|
|
427
|
+
"MANAGE",
|
|
388
428
|
"DEFAULT",
|
|
389
|
-
"
|
|
390
|
-
"
|
|
391
|
-
"
|
|
392
|
-
|
|
393
|
-
"XLARGE",
|
|
394
|
-
"CUSTOM",
|
|
395
|
-
"X2LARGE"
|
|
396
|
-
])),
|
|
397
|
-
remote_path: z.optional(z.string()),
|
|
398
|
-
remote_ref: z.optional(z.string()),
|
|
399
|
-
remote_project_name: z.optional(z.string()),
|
|
400
|
-
remote_parameters: z.optional(z.array(zPipelinePropertyView)),
|
|
401
|
-
git_config: z.optional(zYamlDefinitionView),
|
|
402
|
-
tags: z.optional(z.array(z.string())),
|
|
403
|
-
git_changeset_base: z.optional(z.enum([
|
|
404
|
-
"LATEST_RUN",
|
|
405
|
-
"LATEST_RUN_MATCHING_REF",
|
|
406
|
-
"PULL_REQUEST"
|
|
407
|
-
])),
|
|
408
|
-
filesystem_changeset_base: z.optional(z.enum(["DATE_MODIFIED", "CONTENTS"])),
|
|
409
|
-
cpu: z.optional(z.enum([
|
|
410
|
-
"X64",
|
|
411
|
-
"ARM",
|
|
412
|
-
"X86"
|
|
413
|
-
])),
|
|
414
|
-
description_required: z.optional(z.boolean()),
|
|
415
|
-
folder: z.optional(z.string())
|
|
429
|
+
"ALLOWED",
|
|
430
|
+
"STAGE",
|
|
431
|
+
"COMMIT"
|
|
432
|
+
]).optional()
|
|
416
433
|
});
|
|
417
434
|
/**
|
|
418
|
-
*
|
|
435
|
+
* List of specific pipelines allowed to use this target
|
|
419
436
|
*/
|
|
420
|
-
const
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
"
|
|
428
|
-
"
|
|
429
|
-
"
|
|
430
|
-
"
|
|
431
|
-
"SLACK",
|
|
432
|
-
"MODULUS",
|
|
433
|
-
"HEROKU",
|
|
434
|
-
"AMAZON",
|
|
435
|
-
"GIT_LAB",
|
|
436
|
-
"SHOPIFY",
|
|
437
|
-
"GIT_HUB_ENTERPRISE",
|
|
438
|
-
"GIT_LAB_ENTERPRISE",
|
|
439
|
-
"PUSHOVER",
|
|
440
|
-
"PUSHBULLET",
|
|
441
|
-
"RACKSPACE",
|
|
442
|
-
"CUSTOM",
|
|
443
|
-
"CLOUDFLARE",
|
|
444
|
-
"NEW_RELIC",
|
|
445
|
-
"SENTRY",
|
|
446
|
-
"ROLLBAR",
|
|
447
|
-
"DATADOG",
|
|
448
|
-
"DO_SPACES",
|
|
449
|
-
"HONEYBADGER",
|
|
450
|
-
"VULTR",
|
|
451
|
-
"SENTRY_ENTERPRISE",
|
|
452
|
-
"LOGGLY",
|
|
453
|
-
"HIP_CHAT",
|
|
454
|
-
"FIREBASE",
|
|
455
|
-
"TELEGRAM",
|
|
456
|
-
"AZURE",
|
|
457
|
-
"UPCLOUD",
|
|
458
|
-
"GHOST_INSPECTOR",
|
|
459
|
-
"NETLIFY",
|
|
460
|
-
"AZURE_CLOUD",
|
|
461
|
-
"MICROSOFT_TEAMS",
|
|
462
|
-
"GOOGLE_SERVICE_ACCOUNT",
|
|
463
|
-
"GOOGLE_PLAY_STORE",
|
|
464
|
-
"DOCKER_HUB",
|
|
465
|
-
"APP_STORE",
|
|
466
|
-
"GIT_HUB_APP",
|
|
467
|
-
"GIT_HUB_APP_ENTERPRISE",
|
|
468
|
-
"GIT_HUB_API",
|
|
469
|
-
"ATOP",
|
|
470
|
-
"SNYK",
|
|
471
|
-
"STACK_HAWK",
|
|
472
|
-
"BLACKFIRE",
|
|
473
|
-
"BACKBLAZE",
|
|
474
|
-
"ONE_LOGIN",
|
|
475
|
-
"OKTA",
|
|
476
|
-
"CONTENTFUL"
|
|
477
|
-
])),
|
|
478
|
-
auth_type: z.optional(z.enum([
|
|
479
|
-
"OAUTH",
|
|
480
|
-
"TOKEN",
|
|
481
|
-
"API_KEY",
|
|
482
|
-
"APP",
|
|
483
|
-
"APP_SPRYKER",
|
|
484
|
-
"TOKEN_APP_EXTENSION",
|
|
437
|
+
const zAllowedPipelineView = z.object({
|
|
438
|
+
project: z.string(),
|
|
439
|
+
pipeline: z.string(),
|
|
440
|
+
access_level: z.enum([
|
|
441
|
+
"DENIED",
|
|
442
|
+
"READ_ONLY",
|
|
443
|
+
"USE_ONLY",
|
|
444
|
+
"BLIND",
|
|
445
|
+
"RUN_ONLY",
|
|
446
|
+
"READ_WRITE",
|
|
447
|
+
"MANAGE",
|
|
485
448
|
"DEFAULT",
|
|
486
|
-
"
|
|
487
|
-
"
|
|
488
|
-
"
|
|
489
|
-
]))
|
|
490
|
-
|
|
449
|
+
"ALLOWED",
|
|
450
|
+
"STAGE",
|
|
451
|
+
"COMMIT"
|
|
452
|
+
]).optional()
|
|
453
|
+
});
|
|
454
|
+
/**
|
|
455
|
+
* Access permissions configuration
|
|
456
|
+
*/
|
|
457
|
+
const zPermissionsView = z.object({
|
|
458
|
+
others: z.enum([
|
|
459
|
+
"DENIED",
|
|
460
|
+
"READ_ONLY",
|
|
461
|
+
"USE_ONLY",
|
|
462
|
+
"BLIND",
|
|
463
|
+
"RUN_ONLY",
|
|
464
|
+
"READ_WRITE",
|
|
465
|
+
"MANAGE",
|
|
466
|
+
"DEFAULT",
|
|
467
|
+
"ALLOWED",
|
|
468
|
+
"STAGE",
|
|
469
|
+
"COMMIT"
|
|
470
|
+
]).optional(),
|
|
471
|
+
users: z.array(zUserPermissionView).optional(),
|
|
472
|
+
groups: z.array(zGroupPermissionView).optional()
|
|
473
|
+
});
|
|
474
|
+
/**
|
|
475
|
+
* Short representation of an environment object
|
|
476
|
+
*/
|
|
477
|
+
const zShortEnvironmentView = z.object({
|
|
478
|
+
url: z.string().readonly().optional(),
|
|
479
|
+
html_url: z.string().readonly().optional(),
|
|
480
|
+
name: z.string().optional(),
|
|
481
|
+
identifier: z.string().optional(),
|
|
482
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
483
|
+
scope: z.enum([
|
|
484
|
+
"PROJECT",
|
|
491
485
|
"WORKSPACE",
|
|
486
|
+
"ANY"
|
|
487
|
+
]).optional()
|
|
488
|
+
});
|
|
489
|
+
const zPipelineEnvironmentContextView = z.object({
|
|
490
|
+
identifier: z.string().optional(),
|
|
491
|
+
tags: z.array(z.string()).optional(),
|
|
492
|
+
scope: z.enum([
|
|
492
493
|
"PROJECT",
|
|
493
|
-
"
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
app_id: z.optional(z.string()),
|
|
497
|
-
google_project: z.optional(z.string()),
|
|
498
|
-
host_url: z.optional(z.string()),
|
|
499
|
-
webhook_address: z.optional(z.string()),
|
|
500
|
-
audience: z.optional(z.string()),
|
|
501
|
-
atop_url: z.optional(z.string()),
|
|
502
|
-
permissions: z.optional(zIntegrationPermissionsView),
|
|
503
|
-
all_pipelines_allowed: z.optional(z.boolean()),
|
|
504
|
-
allowed_pipelines: z.optional(z.array(zShortPipelineView))
|
|
494
|
+
"WORKSPACE",
|
|
495
|
+
"ANY"
|
|
496
|
+
]).optional()
|
|
505
497
|
});
|
|
506
|
-
const
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
498
|
+
const zPipelineArtifactContextView = z.object({
|
|
499
|
+
identifier: z.string().optional(),
|
|
500
|
+
scope: z.enum([
|
|
501
|
+
"WORKSPACE",
|
|
502
|
+
"PROJECT",
|
|
503
|
+
"ENVIRONMENT",
|
|
504
|
+
"ANY"
|
|
505
|
+
]).optional()
|
|
506
|
+
});
|
|
507
|
+
/**
|
|
508
|
+
* Short representation of a project
|
|
509
|
+
*/
|
|
510
|
+
const zShortProjectView = z.object({
|
|
511
|
+
url: z.string().readonly().optional(),
|
|
512
|
+
html_url: z.string().readonly().optional(),
|
|
513
|
+
name: z.string().optional(),
|
|
514
|
+
display_name: z.string(),
|
|
515
|
+
status: z.string().optional(),
|
|
516
|
+
access: z.enum(["PRIVATE", "PUBLIC"]).optional(),
|
|
517
|
+
create_date: z.iso.datetime().optional()
|
|
510
518
|
});
|
|
511
519
|
const zIdsView = z.object({
|
|
512
|
-
url: z.
|
|
513
|
-
html_url: z.
|
|
514
|
-
domain: z.
|
|
515
|
-
project_identifier: z.
|
|
516
|
-
pipeline_id: z.
|
|
517
|
-
environment_id: z.
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
sandbox_id: z.
|
|
520
|
+
url: z.string().readonly().optional(),
|
|
521
|
+
html_url: z.string().readonly().optional(),
|
|
522
|
+
domain: z.string().optional(),
|
|
523
|
+
project_identifier: z.string().optional(),
|
|
524
|
+
pipeline_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
525
|
+
environment_id: z.string().optional(),
|
|
526
|
+
artifact_id: z.string().optional(),
|
|
527
|
+
artifact_version_id: z.string().optional(),
|
|
528
|
+
sandbox_id: z.string().optional(),
|
|
529
|
+
unit_test_suite_id: z.string().optional(),
|
|
530
|
+
visual_test_suite_id: z.string().optional(),
|
|
531
|
+
crawl_suite_id: z.string().optional(),
|
|
532
|
+
distribution_id: z.string().optional(),
|
|
533
|
+
route_id: z.string().optional()
|
|
521
534
|
});
|
|
522
535
|
const zAddWorkspaceMemberRequest = z.object({
|
|
523
|
-
admin: z.
|
|
524
|
-
auto_assign_to_new_projects: z.
|
|
525
|
-
auto_assign_permission_set_id: z.
|
|
536
|
+
admin: z.boolean().optional(),
|
|
537
|
+
auto_assign_to_new_projects: z.boolean().optional(),
|
|
538
|
+
auto_assign_permission_set_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
526
539
|
email: z.string()
|
|
527
540
|
});
|
|
528
541
|
const zAddIntegrationRequest = z.object({
|
|
529
|
-
identifier: z.
|
|
542
|
+
identifier: z.string().optional(),
|
|
530
543
|
name: z.string(),
|
|
531
|
-
token: z.
|
|
532
|
-
email: z.
|
|
533
|
-
api_key: z.
|
|
534
|
-
access_key: z.
|
|
535
|
-
secret_key: z.
|
|
536
|
-
partner_token: z.
|
|
537
|
-
shop: z.
|
|
538
|
-
url: z.
|
|
539
|
-
chat_id: z.
|
|
540
|
-
git_hub_user_id: z.
|
|
541
|
-
git_hub_user_name: z.
|
|
542
|
-
username: z.
|
|
543
|
-
password: z.
|
|
544
|
-
app_id: z.
|
|
545
|
-
tenant_id: z.
|
|
546
|
-
client_id: z.
|
|
547
|
-
client_token: z.
|
|
548
|
-
server_id: z.
|
|
549
|
-
server_token: z.
|
|
550
|
-
key_id: z.
|
|
551
|
-
application_key: z.
|
|
552
|
-
host_url: z.
|
|
553
|
-
webhook_address: z.
|
|
554
|
-
slack_user_id: z.
|
|
555
|
-
region: z.
|
|
556
|
-
role_assumptions: z.
|
|
557
|
-
all_pipelines_allowed: z.
|
|
558
|
-
allowed_pipelines: z.
|
|
559
|
-
permissions:
|
|
560
|
-
auth_type: z.
|
|
544
|
+
token: z.string().optional(),
|
|
545
|
+
email: z.string().optional(),
|
|
546
|
+
api_key: z.string().optional(),
|
|
547
|
+
access_key: z.string().optional(),
|
|
548
|
+
secret_key: z.string().optional(),
|
|
549
|
+
partner_token: z.string().optional(),
|
|
550
|
+
shop: z.string().optional(),
|
|
551
|
+
url: z.string().optional(),
|
|
552
|
+
chat_id: z.string().optional(),
|
|
553
|
+
git_hub_user_id: z.string().optional(),
|
|
554
|
+
git_hub_user_name: z.string().optional(),
|
|
555
|
+
username: z.string().optional(),
|
|
556
|
+
password: z.string().optional(),
|
|
557
|
+
app_id: z.string().optional(),
|
|
558
|
+
tenant_id: z.string().optional(),
|
|
559
|
+
client_id: z.string().optional(),
|
|
560
|
+
client_token: z.string().optional(),
|
|
561
|
+
server_id: z.string().optional(),
|
|
562
|
+
server_token: z.string().optional(),
|
|
563
|
+
key_id: z.string().optional(),
|
|
564
|
+
application_key: z.string().optional(),
|
|
565
|
+
host_url: z.string().optional(),
|
|
566
|
+
webhook_address: z.string().optional(),
|
|
567
|
+
slack_user_id: z.string().optional(),
|
|
568
|
+
region: z.string().optional(),
|
|
569
|
+
role_assumptions: z.array(zRoleAssumptionView).optional(),
|
|
570
|
+
all_pipelines_allowed: z.boolean().optional(),
|
|
571
|
+
allowed_pipelines: z.array(zPipelineIdView).optional(),
|
|
572
|
+
permissions: zIntegrationPermissionsView.optional(),
|
|
573
|
+
auth_type: z.enum([
|
|
561
574
|
"OAUTH",
|
|
562
575
|
"TOKEN",
|
|
563
576
|
"API_KEY",
|
|
@@ -568,13 +581,14 @@ const zAddIntegrationRequest = z.object({
|
|
|
568
581
|
"OIDC",
|
|
569
582
|
"TRUSTED",
|
|
570
583
|
"APP_RW"
|
|
571
|
-
])),
|
|
572
|
-
target_url: z.
|
|
573
|
-
refresh_token: z.
|
|
574
|
-
audience: z.
|
|
575
|
-
config: z.
|
|
576
|
-
google_project: z.
|
|
577
|
-
atop_url: z.
|
|
584
|
+
]).optional(),
|
|
585
|
+
target_url: z.string().optional(),
|
|
586
|
+
refresh_token: z.string().optional(),
|
|
587
|
+
audience: z.string().optional(),
|
|
588
|
+
config: z.string().optional(),
|
|
589
|
+
google_project: z.string().optional(),
|
|
590
|
+
atop_url: z.string().optional(),
|
|
591
|
+
disabled: z.boolean().optional(),
|
|
578
592
|
type: z.enum([
|
|
579
593
|
"GIT_HUB",
|
|
580
594
|
"BITBUCKET",
|
|
@@ -625,43 +639,51 @@ const zAddIntegrationRequest = z.object({
|
|
|
625
639
|
"BACKBLAZE",
|
|
626
640
|
"ONE_LOGIN",
|
|
627
641
|
"OKTA",
|
|
628
|
-
"CONTENTFUL"
|
|
642
|
+
"CONTENTFUL",
|
|
643
|
+
"JIRA",
|
|
644
|
+
"NPM_REGISTRY",
|
|
645
|
+
"ANTHROPIC"
|
|
629
646
|
]),
|
|
630
647
|
scope: z.enum([
|
|
631
648
|
"WORKSPACE",
|
|
632
649
|
"PROJECT",
|
|
633
650
|
"ENVIRONMENT"
|
|
634
651
|
]),
|
|
635
|
-
project_name: z.
|
|
652
|
+
project_name: z.string().optional()
|
|
636
653
|
});
|
|
637
654
|
/**
|
|
638
655
|
* Sandbox reference
|
|
639
656
|
*/
|
|
640
657
|
const zSandboxIdView = z.object({
|
|
641
|
-
url: z.
|
|
642
|
-
html_url: z.
|
|
643
|
-
id: z.
|
|
644
|
-
identifier: z.
|
|
645
|
-
name: z.
|
|
646
|
-
status: z.
|
|
658
|
+
url: z.string().readonly().optional(),
|
|
659
|
+
html_url: z.string().readonly().optional(),
|
|
660
|
+
id: z.string().optional(),
|
|
661
|
+
identifier: z.string().optional(),
|
|
662
|
+
name: z.string().optional(),
|
|
663
|
+
status: z.enum([
|
|
647
664
|
"STARTING",
|
|
648
665
|
"STOPPING",
|
|
649
666
|
"FAILED",
|
|
650
667
|
"RUNNING",
|
|
651
668
|
"STOPPED",
|
|
652
669
|
"RESTORING"
|
|
653
|
-
]))
|
|
670
|
+
]).optional(),
|
|
671
|
+
setup_status: z.enum([
|
|
672
|
+
"INPROGRESS",
|
|
673
|
+
"SUCCESS",
|
|
674
|
+
"FAILED"
|
|
675
|
+
]).optional()
|
|
654
676
|
});
|
|
655
677
|
/**
|
|
656
678
|
* Integration reference
|
|
657
679
|
*/
|
|
658
680
|
const zIntegrationIdView = z.object({
|
|
659
|
-
url: z.
|
|
660
|
-
html_url: z.
|
|
661
|
-
identifier: z.
|
|
662
|
-
hash_id: z.
|
|
663
|
-
name: z.
|
|
664
|
-
type: z.
|
|
681
|
+
url: z.string().readonly().optional(),
|
|
682
|
+
html_url: z.string().readonly().optional(),
|
|
683
|
+
identifier: z.string().optional(),
|
|
684
|
+
hash_id: z.string().optional(),
|
|
685
|
+
name: z.string().optional(),
|
|
686
|
+
type: z.enum([
|
|
665
687
|
"GIT_HUB",
|
|
666
688
|
"BITBUCKET",
|
|
667
689
|
"GOOGLE",
|
|
@@ -711,9 +733,12 @@ const zIntegrationIdView = z.object({
|
|
|
711
733
|
"BACKBLAZE",
|
|
712
734
|
"ONE_LOGIN",
|
|
713
735
|
"OKTA",
|
|
714
|
-
"CONTENTFUL"
|
|
715
|
-
|
|
716
|
-
|
|
736
|
+
"CONTENTFUL",
|
|
737
|
+
"JIRA",
|
|
738
|
+
"NPM_REGISTRY",
|
|
739
|
+
"ANTHROPIC"
|
|
740
|
+
]).optional(),
|
|
741
|
+
auth_type: z.enum([
|
|
717
742
|
"OAUTH",
|
|
718
743
|
"TOKEN",
|
|
719
744
|
"API_KEY",
|
|
@@ -724,104 +749,73 @@ const zIntegrationIdView = z.object({
|
|
|
724
749
|
"OIDC",
|
|
725
750
|
"TRUSTED",
|
|
726
751
|
"APP_RW"
|
|
727
|
-
])),
|
|
728
|
-
host_url: z.
|
|
729
|
-
webhook_address: z.
|
|
730
|
-
atop_url: z.
|
|
731
|
-
app_id: z.
|
|
732
|
-
google_project: z.
|
|
733
|
-
audience: z.
|
|
752
|
+
]).optional(),
|
|
753
|
+
host_url: z.string().optional(),
|
|
754
|
+
webhook_address: z.string().optional(),
|
|
755
|
+
atop_url: z.string().optional(),
|
|
756
|
+
app_id: z.string().optional(),
|
|
757
|
+
google_project: z.string().optional(),
|
|
758
|
+
audience: z.string().optional()
|
|
734
759
|
});
|
|
735
760
|
/**
|
|
736
761
|
* User/member reference
|
|
737
762
|
*/
|
|
738
763
|
const zMemberView = z.object({
|
|
739
|
-
url: z.
|
|
740
|
-
html_url: z.
|
|
741
|
-
id: z.
|
|
742
|
-
name: z.
|
|
743
|
-
avatar_url: z.
|
|
744
|
-
email: z.
|
|
745
|
-
admin: z.
|
|
746
|
-
workspace_owner: z.
|
|
764
|
+
url: z.string().readonly().optional(),
|
|
765
|
+
html_url: z.string().readonly().optional(),
|
|
766
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
767
|
+
name: z.string().optional(),
|
|
768
|
+
avatar_url: z.string().optional(),
|
|
769
|
+
email: z.string().optional(),
|
|
770
|
+
admin: z.boolean().optional(),
|
|
771
|
+
workspace_owner: z.boolean().optional()
|
|
747
772
|
});
|
|
748
773
|
const zProjectView = z.object({
|
|
749
|
-
url: z.
|
|
750
|
-
html_url: z.
|
|
751
|
-
name: z.
|
|
752
|
-
display_name: z.string(),
|
|
753
|
-
status: z.optional(z.string()),
|
|
754
|
-
access: z.optional(z.enum(["PRIVATE", "PUBLIC"])),
|
|
755
|
-
create_date: z.optional(z.iso.datetime()),
|
|
756
|
-
external_project_id: z.optional(z.string()),
|
|
757
|
-
git_lab_project_id: z.optional(z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
|
|
758
|
-
custom_repo_url: z.optional(z.string()),
|
|
759
|
-
custom_repo_user: z.optional(z.string()),
|
|
760
|
-
custom_repo_pass: z.optional(z.string()),
|
|
761
|
-
custom_repo_ssh_key_id: z.optional(z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
|
|
762
|
-
created_by: z.optional(zMemberView),
|
|
763
|
-
http_repository: z.optional(z.string()),
|
|
764
|
-
ssh_repository: z.optional(z.string()),
|
|
765
|
-
default_branch: z.optional(z.string()),
|
|
766
|
-
integration: z.optional(zIntegrationIdView),
|
|
767
|
-
fetch_submodules: z.optional(z.boolean()),
|
|
768
|
-
fetch_submodules_env_key: z.optional(z.string()),
|
|
769
|
-
allow_pull_requests: z.optional(z.boolean()),
|
|
770
|
-
update_default_branch_from_external: z.optional(z.boolean()),
|
|
771
|
-
without_repository: z.optional(z.boolean())
|
|
772
|
-
});
|
|
773
|
-
/**
|
|
774
|
-
* Access permissions configuration
|
|
775
|
-
*/
|
|
776
|
-
const zPermissionsView = z.object({
|
|
777
|
-
others: z.optional(z.enum([
|
|
778
|
-
"DENIED",
|
|
779
|
-
"READ_ONLY",
|
|
780
|
-
"BLIND",
|
|
781
|
-
"RUN_ONLY",
|
|
782
|
-
"READ_WRITE",
|
|
783
|
-
"MANAGE",
|
|
784
|
-
"DEFAULT",
|
|
785
|
-
"ALLOWED",
|
|
786
|
-
"STAGE",
|
|
787
|
-
"COMMIT",
|
|
788
|
-
"USE_ONLY"
|
|
789
|
-
])),
|
|
790
|
-
users: z.optional(z.array(zUserPermissionView)),
|
|
791
|
-
groups: z.optional(z.array(zGroupPermissionView))
|
|
792
|
-
});
|
|
793
|
-
/**
|
|
794
|
-
* Short representation of a project
|
|
795
|
-
*/
|
|
796
|
-
const zShortProjectView = z.object({
|
|
797
|
-
url: z.optional(z.string().readonly()),
|
|
798
|
-
html_url: z.optional(z.string().readonly()),
|
|
799
|
-
name: z.optional(z.string()),
|
|
774
|
+
url: z.string().readonly().optional(),
|
|
775
|
+
html_url: z.string().readonly().optional(),
|
|
776
|
+
name: z.string().optional(),
|
|
800
777
|
display_name: z.string(),
|
|
801
|
-
status: z.
|
|
802
|
-
access: z.
|
|
803
|
-
create_date: z.
|
|
778
|
+
status: z.string().optional(),
|
|
779
|
+
access: z.enum(["PRIVATE", "PUBLIC"]).optional(),
|
|
780
|
+
create_date: z.iso.datetime().optional(),
|
|
781
|
+
external_project_id: z.string().optional(),
|
|
782
|
+
git_lab_project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
783
|
+
custom_repo_url: z.string().optional(),
|
|
784
|
+
custom_repo_user: z.string().optional(),
|
|
785
|
+
custom_repo_pass: z.string().optional(),
|
|
786
|
+
custom_repo_ssh_key_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
787
|
+
created_by: zMemberView.optional(),
|
|
788
|
+
http_repository: z.string().optional(),
|
|
789
|
+
ssh_repository: z.string().optional(),
|
|
790
|
+
default_branch: z.string().optional(),
|
|
791
|
+
integration: zIntegrationIdView.optional(),
|
|
792
|
+
fetch_submodules: z.boolean().optional(),
|
|
793
|
+
fetch_submodules_env_key: z.string().optional(),
|
|
794
|
+
allow_pull_requests: z.boolean().optional(),
|
|
795
|
+
update_default_branch_from_external: z.boolean().optional(),
|
|
796
|
+
without_repository: z.boolean().optional()
|
|
804
797
|
});
|
|
805
798
|
/**
|
|
806
799
|
* The environment variables of the sandbox
|
|
807
800
|
*/
|
|
808
801
|
const zAddVariableInObjectRequest = z.object({
|
|
809
|
-
url: z.
|
|
810
|
-
html_url: z.
|
|
802
|
+
url: z.string().readonly().optional(),
|
|
803
|
+
html_url: z.string().readonly().optional(),
|
|
811
804
|
key: z.string(),
|
|
812
|
-
value: z.
|
|
813
|
-
settable: z.
|
|
814
|
-
run_only_settable: z.
|
|
815
|
-
encrypted: z.
|
|
816
|
-
description: z.
|
|
817
|
-
init_path: z.
|
|
818
|
-
defaults: z.
|
|
819
|
-
file_path: z.
|
|
820
|
-
file_chmod: z.
|
|
821
|
-
file_place: z.
|
|
822
|
-
password: z.
|
|
823
|
-
passphrase: z.
|
|
824
|
-
key_identifier: z.
|
|
805
|
+
value: z.string().optional(),
|
|
806
|
+
settable: z.boolean().optional(),
|
|
807
|
+
run_only_settable: z.boolean().optional(),
|
|
808
|
+
encrypted: z.boolean().optional(),
|
|
809
|
+
description: z.string().optional(),
|
|
810
|
+
init_path: z.string().optional(),
|
|
811
|
+
defaults: z.string().optional(),
|
|
812
|
+
file_path: z.string().optional(),
|
|
813
|
+
file_chmod: z.string().optional(),
|
|
814
|
+
file_place: z.enum(["NONE", "CONTAINER"]).optional(),
|
|
815
|
+
password: z.string().optional(),
|
|
816
|
+
passphrase: z.string().optional(),
|
|
817
|
+
key_identifier: z.string().optional(),
|
|
818
|
+
disabled: z.boolean().optional(),
|
|
825
819
|
type: z.enum([
|
|
826
820
|
"VAR",
|
|
827
821
|
"FILE",
|
|
@@ -836,40 +830,40 @@ const zAddVariableInObjectRequest = z.object({
|
|
|
836
830
|
* The TLS/SSL encryption settings of the tunnel
|
|
837
831
|
*/
|
|
838
832
|
const zTlsSettingsView = z.object({
|
|
839
|
-
url: z.
|
|
840
|
-
html_url: z.
|
|
841
|
-
terminate_at: z.
|
|
833
|
+
url: z.string().readonly().optional(),
|
|
834
|
+
html_url: z.string().readonly().optional(),
|
|
835
|
+
terminate_at: z.enum([
|
|
842
836
|
"REGION",
|
|
843
837
|
"AGENT",
|
|
844
838
|
"TARGET"
|
|
845
|
-
]))
|
|
839
|
+
]).optional()
|
|
846
840
|
});
|
|
847
841
|
/**
|
|
848
842
|
* The HTTP-specific settings of the tunnel
|
|
849
843
|
*/
|
|
850
844
|
const zHttpSettingsView = z.object({
|
|
851
|
-
url: z.
|
|
852
|
-
html_url: z.
|
|
853
|
-
verify_certificate: z.
|
|
854
|
-
compression: z.
|
|
855
|
-
http2: z.
|
|
856
|
-
log_requests: z.
|
|
857
|
-
request_headers: z.
|
|
858
|
-
whitelist_user_agents: z.
|
|
859
|
-
rewrite_host_header: z.
|
|
860
|
-
response_headers: z.
|
|
861
|
-
login: z.
|
|
862
|
-
circuit_breaker: z.
|
|
863
|
-
serve_path: z.
|
|
864
|
-
auth_type: z.
|
|
845
|
+
url: z.string().readonly().optional(),
|
|
846
|
+
html_url: z.string().readonly().optional(),
|
|
847
|
+
verify_certificate: z.boolean().optional(),
|
|
848
|
+
compression: z.boolean().optional(),
|
|
849
|
+
http2: z.boolean().optional(),
|
|
850
|
+
log_requests: z.boolean().optional(),
|
|
851
|
+
request_headers: z.record(z.string(), z.string()).optional(),
|
|
852
|
+
whitelist_user_agents: z.array(z.string()).optional(),
|
|
853
|
+
rewrite_host_header: z.string().optional(),
|
|
854
|
+
response_headers: z.record(z.string(), z.string()).optional(),
|
|
855
|
+
login: z.string().optional(),
|
|
856
|
+
circuit_breaker: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
857
|
+
serve_path: z.string().optional(),
|
|
858
|
+
auth_type: z.enum([
|
|
865
859
|
"NONE",
|
|
866
860
|
"BASIC",
|
|
867
861
|
"BUDDY"
|
|
868
|
-
]))
|
|
862
|
+
]).optional()
|
|
869
863
|
});
|
|
870
864
|
const zTunnelView = z.object({
|
|
871
|
-
url: z.
|
|
872
|
-
html_url: z.
|
|
865
|
+
url: z.string().readonly().optional(),
|
|
866
|
+
html_url: z.string().readonly().optional(),
|
|
873
867
|
name: z.string(),
|
|
874
868
|
endpoint: z.string(),
|
|
875
869
|
type: z.enum([
|
|
@@ -883,16 +877,38 @@ const zTunnelView = z.object({
|
|
|
883
877
|
"EU",
|
|
884
878
|
"AS"
|
|
885
879
|
]),
|
|
886
|
-
whitelist: z.
|
|
887
|
-
timeout: z.
|
|
888
|
-
http:
|
|
889
|
-
tls:
|
|
890
|
-
endpoint_url: z.
|
|
880
|
+
whitelist: z.array(z.string()).optional(),
|
|
881
|
+
timeout: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
882
|
+
http: zHttpSettingsView.optional(),
|
|
883
|
+
tls: zTlsSettingsView.optional(),
|
|
884
|
+
endpoint_url: z.string().optional()
|
|
885
|
+
});
|
|
886
|
+
const zSandboxFetchView = z.object({
|
|
887
|
+
type: z.enum([
|
|
888
|
+
"PROJECT_REPO",
|
|
889
|
+
"PUBLIC_REPO",
|
|
890
|
+
"ARTIFACT"
|
|
891
|
+
]).optional(),
|
|
892
|
+
repository: z.string().optional(),
|
|
893
|
+
ref: z.string().optional(),
|
|
894
|
+
path: z.string().optional(),
|
|
895
|
+
build_command: z.string().optional(),
|
|
896
|
+
artifact: z.string().optional()
|
|
897
|
+
});
|
|
898
|
+
const zSandboxAppView = z.object({
|
|
899
|
+
id: z.string().optional(),
|
|
900
|
+
command: z.string().optional(),
|
|
901
|
+
app_status: z.enum([
|
|
902
|
+
"NONE",
|
|
903
|
+
"RUNNING",
|
|
904
|
+
"ENDED",
|
|
905
|
+
"FAILED"
|
|
906
|
+
]).optional()
|
|
891
907
|
});
|
|
892
908
|
const zUpdateSandboxRequest = z.object({
|
|
893
|
-
name: z.
|
|
894
|
-
identifier: z.
|
|
895
|
-
resources: z.
|
|
909
|
+
name: z.string().optional(),
|
|
910
|
+
identifier: z.string().optional(),
|
|
911
|
+
resources: z.enum([
|
|
896
912
|
"1x2",
|
|
897
913
|
"2x4",
|
|
898
914
|
"3x6",
|
|
@@ -906,128 +922,131 @@ const zUpdateSandboxRequest = z.object({
|
|
|
906
922
|
"11x22",
|
|
907
923
|
"12x24",
|
|
908
924
|
"CUSTOM"
|
|
909
|
-
])),
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
925
|
+
]).optional(),
|
|
926
|
+
first_boot_commands: z.string().optional(),
|
|
927
|
+
app_dir: z.string().optional(),
|
|
928
|
+
apps: z.array(zSandboxAppView).optional(),
|
|
929
|
+
fetch: z.array(zSandboxFetchView).optional(),
|
|
930
|
+
timeout: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
931
|
+
tags: z.array(z.string()).optional(),
|
|
932
|
+
endpoints: z.array(zTunnelView).optional(),
|
|
933
|
+
variables: z.array(zAddVariableInObjectRequest).optional(),
|
|
934
|
+
permissions: zPermissionsView.optional()
|
|
918
935
|
});
|
|
919
936
|
const zSandboxesView = z.object({
|
|
920
|
-
url: z.
|
|
921
|
-
html_url: z.
|
|
922
|
-
sandboxes: z.
|
|
937
|
+
url: z.string().readonly().optional(),
|
|
938
|
+
html_url: z.string().readonly().optional(),
|
|
939
|
+
sandboxes: z.array(zSandboxIdView).optional()
|
|
923
940
|
});
|
|
924
941
|
/**
|
|
925
942
|
* Content item in a sandbox
|
|
926
943
|
*/
|
|
927
944
|
const zSandboxContentItem = z.object({
|
|
928
|
-
url: z.
|
|
929
|
-
html_url: z.
|
|
930
|
-
type: z.
|
|
931
|
-
name: z.
|
|
932
|
-
path: z.
|
|
933
|
-
size: z.
|
|
945
|
+
url: z.string().readonly().optional(),
|
|
946
|
+
html_url: z.string().readonly().optional(),
|
|
947
|
+
type: z.enum(["FILE", "DIR"]).optional(),
|
|
948
|
+
name: z.string().optional(),
|
|
949
|
+
path: z.string().optional(),
|
|
950
|
+
size: z.coerce.bigint().min(BigInt("-9223372036854775808"), { error: "Invalid value: Expected int64 to be >= -9223372036854775808" }).max(BigInt("9223372036854775807"), { error: "Invalid value: Expected int64 to be <= 9223372036854775807" }).optional()
|
|
934
951
|
});
|
|
935
952
|
/**
|
|
936
953
|
* Sandbox content listing
|
|
937
954
|
*/
|
|
938
955
|
const zSandboxContentView = z.object({
|
|
939
|
-
url: z.
|
|
940
|
-
html_url: z.
|
|
941
|
-
contents: z.
|
|
956
|
+
url: z.string().readonly().optional(),
|
|
957
|
+
html_url: z.string().readonly().optional(),
|
|
958
|
+
contents: z.array(zSandboxContentItem).optional()
|
|
942
959
|
});
|
|
943
960
|
const zSandboxCommandView = z.object({
|
|
944
|
-
url: z.
|
|
945
|
-
html_url: z.
|
|
946
|
-
id: z.
|
|
947
|
-
command: z.
|
|
948
|
-
runtime: z.
|
|
961
|
+
url: z.string().readonly().optional(),
|
|
962
|
+
html_url: z.string().readonly().optional(),
|
|
963
|
+
id: z.string().optional(),
|
|
964
|
+
command: z.string().optional(),
|
|
965
|
+
runtime: z.enum([
|
|
949
966
|
"BASH",
|
|
950
967
|
"JAVASCRIPT",
|
|
951
968
|
"TYPESCRIPT",
|
|
952
969
|
"PYTHON"
|
|
953
|
-
])),
|
|
954
|
-
status: z.
|
|
970
|
+
]).optional(),
|
|
971
|
+
status: z.enum([
|
|
955
972
|
"INPROGRESS",
|
|
956
973
|
"SUCCESSFUL",
|
|
957
974
|
"FAILED"
|
|
958
|
-
])),
|
|
959
|
-
exit_code: z.
|
|
960
|
-
|
|
975
|
+
]).optional(),
|
|
976
|
+
exit_code: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
977
|
+
start_date: z.iso.datetime().optional(),
|
|
978
|
+
finish_date: z.iso.datetime().optional(),
|
|
979
|
+
logs_url: z.string().optional()
|
|
961
980
|
});
|
|
962
981
|
const zSandboxCommandsView = z.object({
|
|
963
|
-
url: z.
|
|
964
|
-
html_url: z.
|
|
965
|
-
commands: z.
|
|
982
|
+
url: z.string().readonly().optional(),
|
|
983
|
+
html_url: z.string().readonly().optional(),
|
|
984
|
+
commands: z.array(zSandboxCommandView).optional()
|
|
966
985
|
});
|
|
967
986
|
const zSandboxCommandLog = z.object({
|
|
968
|
-
type: z.
|
|
969
|
-
data: z.
|
|
987
|
+
type: z.enum(["STDOUT", "STDERR"]).optional(),
|
|
988
|
+
data: z.string().optional()
|
|
970
989
|
});
|
|
971
990
|
const zSandboxAppLogsView = z.object({
|
|
972
|
-
url: z.
|
|
973
|
-
html_url: z.
|
|
974
|
-
cursor: z.
|
|
975
|
-
logs: z.
|
|
991
|
+
url: z.string().readonly().optional(),
|
|
992
|
+
html_url: z.string().readonly().optional(),
|
|
993
|
+
cursor: z.string().optional(),
|
|
994
|
+
logs: z.array(z.string()).optional()
|
|
976
995
|
});
|
|
977
996
|
const zShortSnapshotView = z.object({
|
|
978
|
-
url: z.
|
|
979
|
-
html_url: z.
|
|
980
|
-
id: z.
|
|
981
|
-
name: z.
|
|
982
|
-
size: z.
|
|
983
|
-
status: z.
|
|
997
|
+
url: z.string().readonly().optional(),
|
|
998
|
+
html_url: z.string().readonly().optional(),
|
|
999
|
+
id: z.string().optional(),
|
|
1000
|
+
name: z.string().optional(),
|
|
1001
|
+
size: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1002
|
+
status: z.enum([
|
|
984
1003
|
"CREATING",
|
|
985
1004
|
"CREATED",
|
|
986
1005
|
"DELETING",
|
|
987
1006
|
"FAILED"
|
|
988
|
-
])),
|
|
989
|
-
create_date: z.
|
|
1007
|
+
]).optional(),
|
|
1008
|
+
create_date: z.iso.datetime().optional()
|
|
990
1009
|
});
|
|
991
1010
|
const zSnapshotsView = z.object({
|
|
992
|
-
url: z.
|
|
993
|
-
html_url: z.
|
|
994
|
-
snapshots: z.
|
|
1011
|
+
url: z.string().readonly().optional(),
|
|
1012
|
+
html_url: z.string().readonly().optional(),
|
|
1013
|
+
snapshots: z.array(zShortSnapshotView).optional()
|
|
995
1014
|
});
|
|
996
1015
|
const zExecuteSandboxCommandRequest = z.object({
|
|
997
1016
|
command: z.string(),
|
|
998
|
-
runtime: z.
|
|
1017
|
+
runtime: z.enum([
|
|
999
1018
|
"BASH",
|
|
1000
1019
|
"JAVASCRIPT",
|
|
1001
1020
|
"TYPESCRIPT",
|
|
1002
1021
|
"PYTHON"
|
|
1003
|
-
]))
|
|
1022
|
+
]).optional()
|
|
1004
1023
|
});
|
|
1005
|
-
const zAddSnapshotRequest = z.object({ name: z.
|
|
1024
|
+
const zAddSnapshotRequest = z.object({ name: z.string().optional() });
|
|
1006
1025
|
const zSnapshotView = z.object({
|
|
1007
|
-
url: z.
|
|
1008
|
-
html_url: z.
|
|
1009
|
-
id: z.
|
|
1010
|
-
name: z.
|
|
1011
|
-
size: z.
|
|
1012
|
-
status: z.
|
|
1026
|
+
url: z.string().readonly().optional(),
|
|
1027
|
+
html_url: z.string().readonly().optional(),
|
|
1028
|
+
id: z.string().optional(),
|
|
1029
|
+
name: z.string().optional(),
|
|
1030
|
+
size: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1031
|
+
status: z.enum([
|
|
1013
1032
|
"CREATING",
|
|
1014
1033
|
"CREATED",
|
|
1015
1034
|
"DELETING",
|
|
1016
1035
|
"FAILED"
|
|
1017
|
-
])),
|
|
1018
|
-
create_date: z.
|
|
1019
|
-
created_by:
|
|
1036
|
+
]).optional(),
|
|
1037
|
+
create_date: z.iso.datetime().optional(),
|
|
1038
|
+
created_by: zMemberView.optional()
|
|
1020
1039
|
});
|
|
1021
1040
|
const zSandboxYamlView = z.object({
|
|
1022
|
-
url: z.
|
|
1023
|
-
html_url: z.
|
|
1024
|
-
yaml: z.
|
|
1041
|
+
url: z.string().readonly().optional(),
|
|
1042
|
+
html_url: z.string().readonly().optional(),
|
|
1043
|
+
yaml: z.string().optional()
|
|
1025
1044
|
});
|
|
1026
1045
|
const zCreateNewSandboxRequest = z.object({
|
|
1027
1046
|
name: z.string(),
|
|
1028
|
-
identifier: z.
|
|
1047
|
+
identifier: z.string().optional(),
|
|
1029
1048
|
os: z.string(),
|
|
1030
|
-
resources: z.
|
|
1049
|
+
resources: z.enum([
|
|
1031
1050
|
"1x2",
|
|
1032
1051
|
"2x4",
|
|
1033
1052
|
"3x6",
|
|
@@ -1041,23 +1060,22 @@ const zCreateNewSandboxRequest = z.object({
|
|
|
1041
1060
|
"11x22",
|
|
1042
1061
|
"12x24",
|
|
1043
1062
|
"CUSTOM"
|
|
1044
|
-
])),
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
tags: z.
|
|
1050
|
-
endpoints: z.
|
|
1051
|
-
variables: z.
|
|
1063
|
+
]).optional(),
|
|
1064
|
+
first_boot_commands: z.string().optional(),
|
|
1065
|
+
app_dir: z.string().optional(),
|
|
1066
|
+
apps: z.array(z.string()).optional(),
|
|
1067
|
+
fetch: z.array(zSandboxFetchView).optional(),
|
|
1068
|
+
tags: z.array(z.string()).optional(),
|
|
1069
|
+
endpoints: z.array(zTunnelView).optional(),
|
|
1070
|
+
variables: z.array(zAddVariableInObjectRequest).optional(),
|
|
1071
|
+
timeout: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1072
|
+
permissions: zPermissionsView.optional()
|
|
1052
1073
|
});
|
|
1053
|
-
/**
|
|
1054
|
-
* The list of variables you can use the action
|
|
1055
|
-
*/
|
|
1056
1074
|
const zEnvironmentVariableView = z.object({
|
|
1057
|
-
id: z.
|
|
1058
|
-
key: z.
|
|
1059
|
-
value: z.
|
|
1060
|
-
type: z.
|
|
1075
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1076
|
+
key: z.string().optional(),
|
|
1077
|
+
value: z.string().optional(),
|
|
1078
|
+
type: z.enum([
|
|
1061
1079
|
"VAR",
|
|
1062
1080
|
"FILE",
|
|
1063
1081
|
"SSH_KEY",
|
|
@@ -1065,30 +1083,31 @@ const zEnvironmentVariableView = z.object({
|
|
|
1065
1083
|
"IOS_PROVISION_PROFILES",
|
|
1066
1084
|
"SSH_PUBLIC_KEY",
|
|
1067
1085
|
"GPG_KEY"
|
|
1068
|
-
])),
|
|
1069
|
-
encrypted: z.
|
|
1070
|
-
settable: z.
|
|
1071
|
-
run_only_settable: z.
|
|
1072
|
-
description: z.
|
|
1073
|
-
init_path: z.
|
|
1074
|
-
defaults: z.
|
|
1075
|
-
file_path: z.
|
|
1076
|
-
file_chmod: z.
|
|
1077
|
-
file_place: z.
|
|
1078
|
-
binary: z.
|
|
1079
|
-
public_value: z.
|
|
1080
|
-
key_fingerprint: z.
|
|
1081
|
-
checksum: z.
|
|
1082
|
-
password: z.
|
|
1083
|
-
passphrase: z.
|
|
1084
|
-
key_identifier: z.
|
|
1086
|
+
]).optional(),
|
|
1087
|
+
encrypted: z.boolean().optional(),
|
|
1088
|
+
settable: z.boolean().optional(),
|
|
1089
|
+
run_only_settable: z.boolean().optional(),
|
|
1090
|
+
description: z.string().optional(),
|
|
1091
|
+
init_path: z.string().optional(),
|
|
1092
|
+
defaults: z.string().optional(),
|
|
1093
|
+
file_path: z.string().optional(),
|
|
1094
|
+
file_chmod: z.string().optional(),
|
|
1095
|
+
file_place: z.enum(["NONE", "CONTAINER"]).optional(),
|
|
1096
|
+
binary: z.boolean().optional(),
|
|
1097
|
+
public_value: z.string().optional(),
|
|
1098
|
+
key_fingerprint: z.string().optional(),
|
|
1099
|
+
checksum: z.string().optional(),
|
|
1100
|
+
password: z.string().optional(),
|
|
1101
|
+
passphrase: z.string().optional(),
|
|
1102
|
+
key_identifier: z.string().optional(),
|
|
1103
|
+
disabled: z.boolean().optional()
|
|
1085
1104
|
});
|
|
1086
1105
|
const zCreateFromSnapshotRequest = z.object({
|
|
1087
1106
|
snapshot_id: z.string(),
|
|
1088
1107
|
name: z.string(),
|
|
1089
|
-
identifier: z.
|
|
1090
|
-
os: z.
|
|
1091
|
-
resources: z.
|
|
1108
|
+
identifier: z.string().optional(),
|
|
1109
|
+
os: z.string().optional(),
|
|
1110
|
+
resources: z.enum([
|
|
1092
1111
|
"1x2",
|
|
1093
1112
|
"2x4",
|
|
1094
1113
|
"3x6",
|
|
@@ -1102,36 +1121,41 @@ const zCreateFromSnapshotRequest = z.object({
|
|
|
1102
1121
|
"11x22",
|
|
1103
1122
|
"12x24",
|
|
1104
1123
|
"CUSTOM"
|
|
1105
|
-
])),
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
variables: z.optional(z.array(zEnvironmentVariableView))
|
|
1124
|
+
]).optional(),
|
|
1125
|
+
first_boot_commands: z.string().optional(),
|
|
1126
|
+
app_dir: z.string().optional(),
|
|
1127
|
+
apps: z.array(z.string()).optional(),
|
|
1128
|
+
tags: z.array(z.string()).optional(),
|
|
1129
|
+
endpoints: z.array(zTunnelView).optional(),
|
|
1130
|
+
variables: z.array(zEnvironmentVariableView).optional()
|
|
1113
1131
|
});
|
|
1114
1132
|
const zCloneSandboxRequest = z.object({
|
|
1115
1133
|
source_sandbox_id: z.string(),
|
|
1116
1134
|
name: z.string(),
|
|
1117
|
-
identifier: z.
|
|
1135
|
+
identifier: z.string().optional()
|
|
1118
1136
|
});
|
|
1119
1137
|
const zSandboxResponse = z.object({
|
|
1120
|
-
url: z.
|
|
1121
|
-
html_url: z.
|
|
1122
|
-
id: z.
|
|
1123
|
-
identifier: z.
|
|
1124
|
-
name: z.
|
|
1125
|
-
status: z.
|
|
1138
|
+
url: z.string().readonly().optional(),
|
|
1139
|
+
html_url: z.string().readonly().optional(),
|
|
1140
|
+
id: z.string().optional(),
|
|
1141
|
+
identifier: z.string().optional(),
|
|
1142
|
+
name: z.string().optional(),
|
|
1143
|
+
status: z.enum([
|
|
1126
1144
|
"STARTING",
|
|
1127
1145
|
"STOPPING",
|
|
1128
1146
|
"FAILED",
|
|
1129
1147
|
"RUNNING",
|
|
1130
1148
|
"STOPPED",
|
|
1131
1149
|
"RESTORING"
|
|
1132
|
-
])),
|
|
1133
|
-
|
|
1134
|
-
|
|
1150
|
+
]).optional(),
|
|
1151
|
+
setup_status: z.enum([
|
|
1152
|
+
"INPROGRESS",
|
|
1153
|
+
"SUCCESS",
|
|
1154
|
+
"FAILED",
|
|
1155
|
+
"STALE"
|
|
1156
|
+
]).optional(),
|
|
1157
|
+
os: z.string().optional(),
|
|
1158
|
+
resources: z.enum([
|
|
1135
1159
|
"1x2",
|
|
1136
1160
|
"2x4",
|
|
1137
1161
|
"3x6",
|
|
@@ -1145,59 +1169,51 @@ const zSandboxResponse = z.object({
|
|
|
1145
1169
|
"11x22",
|
|
1146
1170
|
"12x24",
|
|
1147
1171
|
"CUSTOM"
|
|
1148
|
-
])),
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
"INPROGRESS",
|
|
1163
|
-
"SUCCESS",
|
|
1164
|
-
"FAILED"
|
|
1165
|
-
])),
|
|
1166
|
-
endpoints: z.optional(z.array(zTunnelView)),
|
|
1167
|
-
project: z.optional(zProjectView),
|
|
1168
|
-
permissions: z.optional(zPermissionsView),
|
|
1169
|
-
variables: z.optional(z.array(zEnvironmentVariableView))
|
|
1172
|
+
]).optional(),
|
|
1173
|
+
first_boot_commands: z.string().optional(),
|
|
1174
|
+
app_dir: z.string().optional(),
|
|
1175
|
+
apps: z.array(zSandboxAppView).optional(),
|
|
1176
|
+
fetch: z.array(zSandboxFetchView).optional(),
|
|
1177
|
+
timeout: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1178
|
+
tags: z.array(z.string()).optional(),
|
|
1179
|
+
boot_logs: z.array(z.string()).optional(),
|
|
1180
|
+
endpoints: z.array(zTunnelView).optional(),
|
|
1181
|
+
ssh_host: z.string().optional(),
|
|
1182
|
+
ssh_port: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1183
|
+
project: zProjectView.optional(),
|
|
1184
|
+
permissions: zPermissionsView.optional(),
|
|
1185
|
+
variables: z.array(zEnvironmentVariableView).optional()
|
|
1170
1186
|
});
|
|
1171
1187
|
const zProjectsView = z.object({
|
|
1172
|
-
url: z.
|
|
1173
|
-
html_url: z.
|
|
1174
|
-
projects: z.
|
|
1188
|
+
url: z.string().readonly().optional(),
|
|
1189
|
+
html_url: z.string().readonly().optional(),
|
|
1190
|
+
projects: z.array(zShortProjectView).optional()
|
|
1175
1191
|
});
|
|
1176
1192
|
const zShortWorkspaceViewWritable = z.object({
|
|
1177
|
-
id: z.
|
|
1178
|
-
name: z.
|
|
1179
|
-
domain: z.
|
|
1193
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1194
|
+
name: z.string().optional(),
|
|
1195
|
+
domain: z.string().optional()
|
|
1180
1196
|
});
|
|
1181
|
-
const zWorkspacesViewWritable = z.object({ workspaces: z.
|
|
1197
|
+
const zWorkspacesViewWritable = z.object({ workspaces: z.array(zShortWorkspaceViewWritable).optional() });
|
|
1182
1198
|
const zWorkspaceMemberViewWritable = z.object({
|
|
1183
|
-
id: z.
|
|
1184
|
-
name: z.
|
|
1185
|
-
avatar_url: z.
|
|
1186
|
-
email: z.
|
|
1187
|
-
admin: z.
|
|
1188
|
-
workspace_owner: z.
|
|
1189
|
-
auto_assign_to_new_projects: z.
|
|
1190
|
-
auto_assign_permission_set_id: z.
|
|
1191
|
-
});
|
|
1192
|
-
const zWorkspaceMembersViewWritable = z.object({ members: z.
|
|
1199
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1200
|
+
name: z.string().optional(),
|
|
1201
|
+
avatar_url: z.string().optional(),
|
|
1202
|
+
email: z.string().optional(),
|
|
1203
|
+
admin: z.boolean().optional(),
|
|
1204
|
+
workspace_owner: z.boolean().optional(),
|
|
1205
|
+
auto_assign_to_new_projects: z.boolean().optional(),
|
|
1206
|
+
auto_assign_permission_set_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional()
|
|
1207
|
+
});
|
|
1208
|
+
const zWorkspaceMembersViewWritable = z.object({ members: z.array(zWorkspaceMemberViewWritable).optional() });
|
|
1193
1209
|
const zWorkspaceViewWritable = z.object({
|
|
1194
|
-
id: z.
|
|
1195
|
-
name: z.
|
|
1196
|
-
domain: z.
|
|
1197
|
-
owner_id: z.
|
|
1198
|
-
frozen: z.
|
|
1199
|
-
create_date: z.
|
|
1200
|
-
default_pipeline_resource: z.
|
|
1210
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1211
|
+
name: z.string().optional(),
|
|
1212
|
+
domain: z.string().optional(),
|
|
1213
|
+
owner_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1214
|
+
frozen: z.boolean().optional(),
|
|
1215
|
+
create_date: z.iso.datetime().optional(),
|
|
1216
|
+
default_pipeline_resource: z.enum([
|
|
1201
1217
|
"DEFAULT",
|
|
1202
1218
|
"NANO",
|
|
1203
1219
|
"SMALL",
|
|
@@ -1206,53 +1222,551 @@ const zWorkspaceViewWritable = z.object({
|
|
|
1206
1222
|
"XLARGE",
|
|
1207
1223
|
"CUSTOM",
|
|
1208
1224
|
"X2LARGE"
|
|
1209
|
-
])),
|
|
1210
|
-
sso_enabled: z.
|
|
1211
|
-
public_pipelines_disabled: z.
|
|
1225
|
+
]).optional(),
|
|
1226
|
+
sso_enabled: z.boolean().optional(),
|
|
1227
|
+
public_pipelines_disabled: z.boolean().optional()
|
|
1212
1228
|
});
|
|
1213
1229
|
const zSsoViewWritable = z.object({
|
|
1214
|
-
type: z.
|
|
1215
|
-
sso_provider_type: z.
|
|
1230
|
+
type: z.enum(["SAML", "OIDC"]).optional(),
|
|
1231
|
+
sso_provider_type: z.enum([
|
|
1216
1232
|
"OKTA",
|
|
1217
1233
|
"ONE_LOGIN",
|
|
1218
1234
|
"GOOGLE",
|
|
1219
1235
|
"AZURE",
|
|
1220
1236
|
"AWS",
|
|
1221
1237
|
"CUSTOM"
|
|
1222
|
-
])),
|
|
1223
|
-
sso_url: z.
|
|
1224
|
-
issuer: z.
|
|
1225
|
-
certificate: z.
|
|
1226
|
-
signature_method: z.
|
|
1227
|
-
digest_method: z.
|
|
1228
|
-
require_sso_for_all_members: z.
|
|
1238
|
+
]).optional(),
|
|
1239
|
+
sso_url: z.string().optional(),
|
|
1240
|
+
issuer: z.string().optional(),
|
|
1241
|
+
certificate: z.string().optional(),
|
|
1242
|
+
signature_method: z.string().optional(),
|
|
1243
|
+
digest_method: z.string().optional(),
|
|
1244
|
+
require_sso_for_all_members: z.boolean().optional()
|
|
1229
1245
|
});
|
|
1230
1246
|
/**
|
|
1231
|
-
* Short representation of
|
|
1247
|
+
* Short representation of an environment object
|
|
1232
1248
|
*/
|
|
1233
|
-
const
|
|
1234
|
-
|
|
1235
|
-
identifier: z.
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
"
|
|
1240
|
-
"
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
])),
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1249
|
+
const zShortEnvironmentViewWritable = z.object({
|
|
1250
|
+
name: z.string().optional(),
|
|
1251
|
+
identifier: z.string().optional(),
|
|
1252
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1253
|
+
scope: z.enum([
|
|
1254
|
+
"PROJECT",
|
|
1255
|
+
"WORKSPACE",
|
|
1256
|
+
"ANY"
|
|
1257
|
+
]).optional()
|
|
1258
|
+
});
|
|
1259
|
+
/**
|
|
1260
|
+
* Short representation of a project
|
|
1261
|
+
*/
|
|
1262
|
+
const zShortProjectViewWritable = z.object({
|
|
1263
|
+
name: z.string().optional(),
|
|
1264
|
+
display_name: z.string(),
|
|
1265
|
+
status: z.string().optional(),
|
|
1266
|
+
access: z.enum(["PRIVATE", "PUBLIC"]).optional(),
|
|
1267
|
+
create_date: z.iso.datetime().optional()
|
|
1268
|
+
});
|
|
1269
|
+
const zIdsViewWritable = z.object({
|
|
1270
|
+
domain: z.string().optional(),
|
|
1271
|
+
project_identifier: z.string().optional(),
|
|
1272
|
+
pipeline_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1273
|
+
environment_id: z.string().optional(),
|
|
1274
|
+
artifact_id: z.string().optional(),
|
|
1275
|
+
artifact_version_id: z.string().optional(),
|
|
1276
|
+
sandbox_id: z.string().optional(),
|
|
1277
|
+
unit_test_suite_id: z.string().optional(),
|
|
1278
|
+
visual_test_suite_id: z.string().optional(),
|
|
1279
|
+
crawl_suite_id: z.string().optional(),
|
|
1280
|
+
distribution_id: z.string().optional(),
|
|
1281
|
+
route_id: z.string().optional()
|
|
1282
|
+
});
|
|
1283
|
+
/**
|
|
1284
|
+
* Sandbox reference
|
|
1285
|
+
*/
|
|
1286
|
+
const zSandboxIdViewWritable = z.object({
|
|
1287
|
+
id: z.string().optional(),
|
|
1288
|
+
identifier: z.string().optional(),
|
|
1289
|
+
name: z.string().optional(),
|
|
1290
|
+
status: z.enum([
|
|
1291
|
+
"STARTING",
|
|
1292
|
+
"STOPPING",
|
|
1293
|
+
"FAILED",
|
|
1294
|
+
"RUNNING",
|
|
1295
|
+
"STOPPED",
|
|
1296
|
+
"RESTORING"
|
|
1297
|
+
]).optional(),
|
|
1298
|
+
setup_status: z.enum([
|
|
1299
|
+
"INPROGRESS",
|
|
1300
|
+
"SUCCESS",
|
|
1301
|
+
"FAILED"
|
|
1302
|
+
]).optional()
|
|
1303
|
+
});
|
|
1304
|
+
/**
|
|
1305
|
+
* Integration reference
|
|
1306
|
+
*/
|
|
1307
|
+
const zIntegrationIdViewWritable = z.object({
|
|
1308
|
+
identifier: z.string().optional(),
|
|
1309
|
+
hash_id: z.string().optional(),
|
|
1310
|
+
name: z.string().optional(),
|
|
1311
|
+
type: z.enum([
|
|
1312
|
+
"GIT_HUB",
|
|
1313
|
+
"BITBUCKET",
|
|
1314
|
+
"GOOGLE",
|
|
1315
|
+
"DIGITAL_OCEAN",
|
|
1316
|
+
"SLACK",
|
|
1317
|
+
"MODULUS",
|
|
1318
|
+
"HEROKU",
|
|
1319
|
+
"AMAZON",
|
|
1320
|
+
"GIT_LAB",
|
|
1321
|
+
"SHOPIFY",
|
|
1322
|
+
"GIT_HUB_ENTERPRISE",
|
|
1323
|
+
"GIT_LAB_ENTERPRISE",
|
|
1324
|
+
"PUSHOVER",
|
|
1325
|
+
"PUSHBULLET",
|
|
1326
|
+
"RACKSPACE",
|
|
1327
|
+
"CUSTOM",
|
|
1328
|
+
"CLOUDFLARE",
|
|
1329
|
+
"NEW_RELIC",
|
|
1330
|
+
"SENTRY",
|
|
1331
|
+
"ROLLBAR",
|
|
1332
|
+
"DATADOG",
|
|
1333
|
+
"DO_SPACES",
|
|
1334
|
+
"HONEYBADGER",
|
|
1335
|
+
"VULTR",
|
|
1336
|
+
"SENTRY_ENTERPRISE",
|
|
1337
|
+
"LOGGLY",
|
|
1338
|
+
"HIP_CHAT",
|
|
1339
|
+
"FIREBASE",
|
|
1340
|
+
"TELEGRAM",
|
|
1341
|
+
"AZURE",
|
|
1342
|
+
"UPCLOUD",
|
|
1343
|
+
"GHOST_INSPECTOR",
|
|
1344
|
+
"NETLIFY",
|
|
1345
|
+
"AZURE_CLOUD",
|
|
1346
|
+
"MICROSOFT_TEAMS",
|
|
1347
|
+
"GOOGLE_SERVICE_ACCOUNT",
|
|
1348
|
+
"GOOGLE_PLAY_STORE",
|
|
1349
|
+
"DOCKER_HUB",
|
|
1350
|
+
"APP_STORE",
|
|
1351
|
+
"GIT_HUB_APP",
|
|
1352
|
+
"GIT_HUB_APP_ENTERPRISE",
|
|
1353
|
+
"GIT_HUB_API",
|
|
1354
|
+
"ATOP",
|
|
1355
|
+
"SNYK",
|
|
1356
|
+
"STACK_HAWK",
|
|
1357
|
+
"BLACKFIRE",
|
|
1358
|
+
"BACKBLAZE",
|
|
1359
|
+
"ONE_LOGIN",
|
|
1360
|
+
"OKTA",
|
|
1361
|
+
"CONTENTFUL",
|
|
1362
|
+
"JIRA",
|
|
1363
|
+
"NPM_REGISTRY",
|
|
1364
|
+
"ANTHROPIC"
|
|
1365
|
+
]).optional(),
|
|
1366
|
+
auth_type: z.enum([
|
|
1367
|
+
"OAUTH",
|
|
1368
|
+
"TOKEN",
|
|
1369
|
+
"API_KEY",
|
|
1370
|
+
"APP",
|
|
1371
|
+
"APP_SPRYKER",
|
|
1372
|
+
"TOKEN_APP_EXTENSION",
|
|
1373
|
+
"DEFAULT",
|
|
1374
|
+
"OIDC",
|
|
1375
|
+
"TRUSTED",
|
|
1376
|
+
"APP_RW"
|
|
1377
|
+
]).optional(),
|
|
1378
|
+
host_url: z.string().optional(),
|
|
1379
|
+
webhook_address: z.string().optional(),
|
|
1380
|
+
atop_url: z.string().optional(),
|
|
1381
|
+
app_id: z.string().optional(),
|
|
1382
|
+
google_project: z.string().optional(),
|
|
1383
|
+
audience: z.string().optional()
|
|
1384
|
+
});
|
|
1385
|
+
/**
|
|
1386
|
+
* User/member reference
|
|
1387
|
+
*/
|
|
1388
|
+
const zMemberViewWritable = z.object({
|
|
1389
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1390
|
+
name: z.string().optional(),
|
|
1391
|
+
avatar_url: z.string().optional(),
|
|
1392
|
+
email: z.string().optional(),
|
|
1393
|
+
admin: z.boolean().optional(),
|
|
1394
|
+
workspace_owner: z.boolean().optional()
|
|
1395
|
+
});
|
|
1396
|
+
const zProjectViewWritable = z.object({
|
|
1397
|
+
name: z.string().optional(),
|
|
1398
|
+
display_name: z.string(),
|
|
1399
|
+
status: z.string().optional(),
|
|
1400
|
+
access: z.enum(["PRIVATE", "PUBLIC"]).optional(),
|
|
1401
|
+
create_date: z.iso.datetime().optional(),
|
|
1402
|
+
external_project_id: z.string().optional(),
|
|
1403
|
+
git_lab_project_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1404
|
+
custom_repo_url: z.string().optional(),
|
|
1405
|
+
custom_repo_user: z.string().optional(),
|
|
1406
|
+
custom_repo_pass: z.string().optional(),
|
|
1407
|
+
custom_repo_ssh_key_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1408
|
+
created_by: zMemberViewWritable.optional(),
|
|
1409
|
+
http_repository: z.string().optional(),
|
|
1410
|
+
ssh_repository: z.string().optional(),
|
|
1411
|
+
default_branch: z.string().optional(),
|
|
1412
|
+
integration: zIntegrationIdViewWritable.optional(),
|
|
1413
|
+
fetch_submodules: z.boolean().optional(),
|
|
1414
|
+
fetch_submodules_env_key: z.string().optional(),
|
|
1415
|
+
allow_pull_requests: z.boolean().optional(),
|
|
1416
|
+
update_default_branch_from_external: z.boolean().optional(),
|
|
1417
|
+
without_repository: z.boolean().optional()
|
|
1418
|
+
});
|
|
1419
|
+
/**
|
|
1420
|
+
* The environment variables of the sandbox
|
|
1421
|
+
*/
|
|
1422
|
+
const zAddVariableInObjectRequestWritable = z.object({
|
|
1423
|
+
key: z.string(),
|
|
1424
|
+
value: z.string().optional(),
|
|
1425
|
+
settable: z.boolean().optional(),
|
|
1426
|
+
run_only_settable: z.boolean().optional(),
|
|
1427
|
+
encrypted: z.boolean().optional(),
|
|
1428
|
+
description: z.string().optional(),
|
|
1429
|
+
init_path: z.string().optional(),
|
|
1430
|
+
defaults: z.string().optional(),
|
|
1431
|
+
file_path: z.string().optional(),
|
|
1432
|
+
file_chmod: z.string().optional(),
|
|
1433
|
+
file_place: z.enum(["NONE", "CONTAINER"]).optional(),
|
|
1434
|
+
password: z.string().optional(),
|
|
1435
|
+
passphrase: z.string().optional(),
|
|
1436
|
+
key_identifier: z.string().optional(),
|
|
1437
|
+
disabled: z.boolean().optional(),
|
|
1438
|
+
type: z.enum([
|
|
1439
|
+
"VAR",
|
|
1440
|
+
"FILE",
|
|
1441
|
+
"SSH_KEY",
|
|
1442
|
+
"IOS_KEYCHAIN",
|
|
1443
|
+
"IOS_PROVISION_PROFILES",
|
|
1444
|
+
"SSH_PUBLIC_KEY",
|
|
1445
|
+
"GPG_KEY"
|
|
1446
|
+
])
|
|
1447
|
+
});
|
|
1448
|
+
/**
|
|
1449
|
+
* The TLS/SSL encryption settings of the tunnel
|
|
1450
|
+
*/
|
|
1451
|
+
const zTlsSettingsViewWritable = z.object({
|
|
1452
|
+
private_key: z.string().optional(),
|
|
1453
|
+
certificate: z.string().optional(),
|
|
1454
|
+
ca_certificate: z.string().optional(),
|
|
1455
|
+
terminate_at: z.enum([
|
|
1456
|
+
"REGION",
|
|
1457
|
+
"AGENT",
|
|
1458
|
+
"TARGET"
|
|
1459
|
+
]).optional()
|
|
1460
|
+
});
|
|
1461
|
+
/**
|
|
1462
|
+
* The HTTP-specific settings of the tunnel
|
|
1463
|
+
*/
|
|
1464
|
+
const zHttpSettingsViewWritable = z.object({
|
|
1465
|
+
verify_certificate: z.boolean().optional(),
|
|
1466
|
+
compression: z.boolean().optional(),
|
|
1467
|
+
http2: z.boolean().optional(),
|
|
1468
|
+
log_requests: z.boolean().optional(),
|
|
1469
|
+
request_headers: z.record(z.string(), z.string()).optional(),
|
|
1470
|
+
whitelist_user_agents: z.array(z.string()).optional(),
|
|
1471
|
+
rewrite_host_header: z.string().optional(),
|
|
1472
|
+
response_headers: z.record(z.string(), z.string()).optional(),
|
|
1473
|
+
login: z.string().optional(),
|
|
1474
|
+
password: z.string().optional(),
|
|
1475
|
+
tls_ca: z.string().optional(),
|
|
1476
|
+
circuit_breaker: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1477
|
+
serve_path: z.string().optional(),
|
|
1478
|
+
auth_type: z.enum([
|
|
1479
|
+
"NONE",
|
|
1480
|
+
"BASIC",
|
|
1481
|
+
"BUDDY"
|
|
1482
|
+
]).optional()
|
|
1483
|
+
});
|
|
1484
|
+
const zTunnelViewWritable = z.object({
|
|
1485
|
+
name: z.string(),
|
|
1486
|
+
endpoint: z.string(),
|
|
1487
|
+
type: z.enum([
|
|
1488
|
+
"TCP",
|
|
1489
|
+
"TLS",
|
|
1490
|
+
"HTTP",
|
|
1491
|
+
"SSH"
|
|
1492
|
+
]),
|
|
1493
|
+
region: z.enum([
|
|
1494
|
+
"US",
|
|
1495
|
+
"EU",
|
|
1496
|
+
"AS"
|
|
1497
|
+
]),
|
|
1498
|
+
whitelist: z.array(z.string()).optional(),
|
|
1499
|
+
timeout: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1500
|
+
http: zHttpSettingsViewWritable.optional(),
|
|
1501
|
+
tls: zTlsSettingsViewWritable.optional(),
|
|
1502
|
+
endpoint_url: z.string().optional()
|
|
1503
|
+
});
|
|
1504
|
+
const zUpdateSandboxRequestWritable = z.object({
|
|
1505
|
+
name: z.string().optional(),
|
|
1506
|
+
identifier: z.string().optional(),
|
|
1507
|
+
resources: z.enum([
|
|
1508
|
+
"1x2",
|
|
1509
|
+
"2x4",
|
|
1510
|
+
"3x6",
|
|
1511
|
+
"4x8",
|
|
1512
|
+
"5x10",
|
|
1513
|
+
"6x12",
|
|
1514
|
+
"7x14",
|
|
1515
|
+
"8x16",
|
|
1516
|
+
"9x18",
|
|
1517
|
+
"10x20",
|
|
1518
|
+
"11x22",
|
|
1519
|
+
"12x24",
|
|
1520
|
+
"CUSTOM"
|
|
1521
|
+
]).optional(),
|
|
1522
|
+
first_boot_commands: z.string().optional(),
|
|
1523
|
+
app_dir: z.string().optional(),
|
|
1524
|
+
apps: z.array(zSandboxAppView).optional(),
|
|
1525
|
+
fetch: z.array(zSandboxFetchView).optional(),
|
|
1526
|
+
timeout: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1527
|
+
tags: z.array(z.string()).optional(),
|
|
1528
|
+
endpoints: z.array(zTunnelViewWritable).optional(),
|
|
1529
|
+
variables: z.array(zAddVariableInObjectRequestWritable).optional(),
|
|
1530
|
+
permissions: zPermissionsView.optional()
|
|
1531
|
+
});
|
|
1532
|
+
const zSandboxesViewWritable = z.object({ sandboxes: z.array(zSandboxIdViewWritable).optional() });
|
|
1533
|
+
/**
|
|
1534
|
+
* Content item in a sandbox
|
|
1535
|
+
*/
|
|
1536
|
+
const zSandboxContentItemWritable = z.object({
|
|
1537
|
+
type: z.enum(["FILE", "DIR"]).optional(),
|
|
1538
|
+
name: z.string().optional(),
|
|
1539
|
+
path: z.string().optional(),
|
|
1540
|
+
size: z.coerce.bigint().min(BigInt("-9223372036854775808"), { error: "Invalid value: Expected int64 to be >= -9223372036854775808" }).max(BigInt("9223372036854775807"), { error: "Invalid value: Expected int64 to be <= 9223372036854775807" }).optional()
|
|
1541
|
+
});
|
|
1542
|
+
/**
|
|
1543
|
+
* Sandbox content listing
|
|
1544
|
+
*/
|
|
1545
|
+
const zSandboxContentViewWritable = z.object({ contents: z.array(zSandboxContentItemWritable).optional() });
|
|
1546
|
+
const zSandboxCommandViewWritable = z.object({
|
|
1547
|
+
id: z.string().optional(),
|
|
1548
|
+
command: z.string().optional(),
|
|
1549
|
+
runtime: z.enum([
|
|
1550
|
+
"BASH",
|
|
1551
|
+
"JAVASCRIPT",
|
|
1552
|
+
"TYPESCRIPT",
|
|
1553
|
+
"PYTHON"
|
|
1554
|
+
]).optional(),
|
|
1555
|
+
status: z.enum([
|
|
1556
|
+
"INPROGRESS",
|
|
1557
|
+
"SUCCESSFUL",
|
|
1558
|
+
"FAILED"
|
|
1559
|
+
]).optional(),
|
|
1560
|
+
exit_code: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1561
|
+
start_date: z.iso.datetime().optional(),
|
|
1562
|
+
finish_date: z.iso.datetime().optional(),
|
|
1563
|
+
logs_url: z.string().optional()
|
|
1564
|
+
});
|
|
1565
|
+
const zSandboxCommandsViewWritable = z.object({ commands: z.array(zSandboxCommandViewWritable).optional() });
|
|
1566
|
+
const zSandboxAppLogsViewWritable = z.object({
|
|
1567
|
+
cursor: z.string().optional(),
|
|
1568
|
+
logs: z.array(z.string()).optional()
|
|
1569
|
+
});
|
|
1570
|
+
const zShortSnapshotViewWritable = z.object({
|
|
1571
|
+
id: z.string().optional(),
|
|
1572
|
+
name: z.string().optional(),
|
|
1573
|
+
size: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1574
|
+
status: z.enum([
|
|
1575
|
+
"CREATING",
|
|
1576
|
+
"CREATED",
|
|
1577
|
+
"DELETING",
|
|
1578
|
+
"FAILED"
|
|
1579
|
+
]).optional(),
|
|
1580
|
+
create_date: z.iso.datetime().optional()
|
|
1581
|
+
});
|
|
1582
|
+
const zSnapshotsViewWritable = z.object({ snapshots: z.array(zShortSnapshotViewWritable).optional() });
|
|
1583
|
+
const zSnapshotViewWritable = z.object({
|
|
1584
|
+
id: z.string().optional(),
|
|
1585
|
+
name: z.string().optional(),
|
|
1586
|
+
size: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1587
|
+
status: z.enum([
|
|
1588
|
+
"CREATING",
|
|
1589
|
+
"CREATED",
|
|
1590
|
+
"DELETING",
|
|
1591
|
+
"FAILED"
|
|
1592
|
+
]).optional(),
|
|
1593
|
+
create_date: z.iso.datetime().optional(),
|
|
1594
|
+
created_by: zMemberViewWritable.optional()
|
|
1595
|
+
});
|
|
1596
|
+
const zSandboxYamlViewWritable = z.object({ yaml: z.string().optional() });
|
|
1597
|
+
const zCreateNewSandboxRequestWritable = z.object({
|
|
1598
|
+
name: z.string(),
|
|
1599
|
+
identifier: z.string().optional(),
|
|
1600
|
+
os: z.string(),
|
|
1601
|
+
resources: z.enum([
|
|
1602
|
+
"1x2",
|
|
1603
|
+
"2x4",
|
|
1604
|
+
"3x6",
|
|
1605
|
+
"4x8",
|
|
1606
|
+
"5x10",
|
|
1607
|
+
"6x12",
|
|
1608
|
+
"7x14",
|
|
1609
|
+
"8x16",
|
|
1610
|
+
"9x18",
|
|
1611
|
+
"10x20",
|
|
1612
|
+
"11x22",
|
|
1613
|
+
"12x24",
|
|
1614
|
+
"CUSTOM"
|
|
1615
|
+
]).optional(),
|
|
1616
|
+
first_boot_commands: z.string().optional(),
|
|
1617
|
+
app_dir: z.string().optional(),
|
|
1618
|
+
apps: z.array(z.string()).optional(),
|
|
1619
|
+
fetch: z.array(zSandboxFetchView).optional(),
|
|
1620
|
+
tags: z.array(z.string()).optional(),
|
|
1621
|
+
endpoints: z.array(zTunnelViewWritable).optional(),
|
|
1622
|
+
variables: z.array(zAddVariableInObjectRequestWritable).optional(),
|
|
1623
|
+
timeout: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1624
|
+
permissions: zPermissionsView.optional()
|
|
1625
|
+
});
|
|
1626
|
+
const zCreateFromSnapshotRequestWritable = z.object({
|
|
1627
|
+
snapshot_id: z.string(),
|
|
1628
|
+
name: z.string(),
|
|
1629
|
+
identifier: z.string().optional(),
|
|
1630
|
+
os: z.string().optional(),
|
|
1631
|
+
resources: z.enum([
|
|
1632
|
+
"1x2",
|
|
1633
|
+
"2x4",
|
|
1634
|
+
"3x6",
|
|
1635
|
+
"4x8",
|
|
1636
|
+
"5x10",
|
|
1637
|
+
"6x12",
|
|
1638
|
+
"7x14",
|
|
1639
|
+
"8x16",
|
|
1640
|
+
"9x18",
|
|
1641
|
+
"10x20",
|
|
1642
|
+
"11x22",
|
|
1643
|
+
"12x24",
|
|
1644
|
+
"CUSTOM"
|
|
1645
|
+
]).optional(),
|
|
1646
|
+
first_boot_commands: z.string().optional(),
|
|
1647
|
+
app_dir: z.string().optional(),
|
|
1648
|
+
apps: z.array(z.string()).optional(),
|
|
1649
|
+
tags: z.array(z.string()).optional(),
|
|
1650
|
+
endpoints: z.array(zTunnelViewWritable).optional(),
|
|
1651
|
+
variables: z.array(zEnvironmentVariableView).optional()
|
|
1652
|
+
});
|
|
1653
|
+
const zSandboxResponseWritable = z.object({
|
|
1654
|
+
id: z.string().optional(),
|
|
1655
|
+
identifier: z.string().optional(),
|
|
1656
|
+
name: z.string().optional(),
|
|
1657
|
+
status: z.enum([
|
|
1658
|
+
"STARTING",
|
|
1659
|
+
"STOPPING",
|
|
1660
|
+
"FAILED",
|
|
1661
|
+
"RUNNING",
|
|
1662
|
+
"STOPPED",
|
|
1663
|
+
"RESTORING"
|
|
1664
|
+
]).optional(),
|
|
1665
|
+
setup_status: z.enum([
|
|
1666
|
+
"INPROGRESS",
|
|
1667
|
+
"SUCCESS",
|
|
1668
|
+
"FAILED",
|
|
1669
|
+
"STALE"
|
|
1670
|
+
]).optional(),
|
|
1671
|
+
os: z.string().optional(),
|
|
1672
|
+
resources: z.enum([
|
|
1673
|
+
"1x2",
|
|
1674
|
+
"2x4",
|
|
1675
|
+
"3x6",
|
|
1676
|
+
"4x8",
|
|
1677
|
+
"5x10",
|
|
1678
|
+
"6x12",
|
|
1679
|
+
"7x14",
|
|
1680
|
+
"8x16",
|
|
1681
|
+
"9x18",
|
|
1682
|
+
"10x20",
|
|
1683
|
+
"11x22",
|
|
1684
|
+
"12x24",
|
|
1685
|
+
"CUSTOM"
|
|
1686
|
+
]).optional(),
|
|
1687
|
+
first_boot_commands: z.string().optional(),
|
|
1688
|
+
app_dir: z.string().optional(),
|
|
1689
|
+
apps: z.array(zSandboxAppView).optional(),
|
|
1690
|
+
fetch: z.array(zSandboxFetchView).optional(),
|
|
1691
|
+
timeout: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1692
|
+
tags: z.array(z.string()).optional(),
|
|
1693
|
+
boot_logs: z.array(z.string()).optional(),
|
|
1694
|
+
endpoints: z.array(zTunnelViewWritable).optional(),
|
|
1695
|
+
ssh_host: z.string().optional(),
|
|
1696
|
+
ssh_port: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1697
|
+
project: zProjectViewWritable.optional(),
|
|
1698
|
+
permissions: zPermissionsView.optional(),
|
|
1699
|
+
variables: z.array(zEnvironmentVariableView).optional()
|
|
1700
|
+
});
|
|
1701
|
+
const zProjectsViewWritable = z.object({ projects: z.array(zShortProjectViewWritable).optional() });
|
|
1702
|
+
const zIntegrationsView = z.object({
|
|
1703
|
+
url: z.string().readonly().optional(),
|
|
1704
|
+
html_url: z.string().readonly().optional(),
|
|
1705
|
+
integrations: z.array(z.lazy(() => zIntegrationView)).optional()
|
|
1706
|
+
});
|
|
1707
|
+
/**
|
|
1708
|
+
* The list of events that trigger the pipeline run
|
|
1709
|
+
*/
|
|
1710
|
+
const zPipelineEventView = z.object({
|
|
1711
|
+
type: z.enum([
|
|
1712
|
+
"PUSH",
|
|
1713
|
+
"CREATE_REF",
|
|
1714
|
+
"DELETE_REF",
|
|
1715
|
+
"PULL_REQUEST",
|
|
1716
|
+
"SCHEDULE",
|
|
1717
|
+
"PUBLISH_ARTIFACT_VERSION",
|
|
1718
|
+
"DELETE_ARTIFACT_VERSION",
|
|
1719
|
+
"WEBHOOK",
|
|
1720
|
+
"EMAIL",
|
|
1721
|
+
"CREATE_ARTIFACT_VERSION",
|
|
1722
|
+
"ENVIRONMENT_CREATE",
|
|
1723
|
+
"ENVIRONMENT_DELETE",
|
|
1724
|
+
"SANDBOX_CREATED",
|
|
1725
|
+
"SANDBOX_DELETED",
|
|
1726
|
+
"SANDBOX_TIMED_OUT"
|
|
1727
|
+
]).optional(),
|
|
1728
|
+
refs: z.array(z.string()).optional(),
|
|
1729
|
+
events: z.array(z.string()).optional(),
|
|
1730
|
+
branches: z.array(z.string()).optional(),
|
|
1731
|
+
artifacts: z.array(zPipelineArtifactContextView).optional(),
|
|
1732
|
+
environments: z.array(zPipelineEnvironmentContextView).optional(),
|
|
1733
|
+
start_date: z.iso.datetime().optional(),
|
|
1734
|
+
delay: z.coerce.bigint().min(BigInt("-9223372036854775808"), { error: "Invalid value: Expected int64 to be >= -9223372036854775808" }).max(BigInt("9223372036854775807"), { error: "Invalid value: Expected int64 to be <= 9223372036854775807" }).optional(),
|
|
1735
|
+
cron: z.string().optional(),
|
|
1736
|
+
timezone: z.string().optional(),
|
|
1737
|
+
totp: z.boolean().optional(),
|
|
1738
|
+
prefix: z.string().optional(),
|
|
1739
|
+
whitelist: z.array(z.string()).optional(),
|
|
1740
|
+
targets: z.array(z.unknown()).optional()
|
|
1741
|
+
});
|
|
1742
|
+
/**
|
|
1743
|
+
* Short representation of a pipeline
|
|
1744
|
+
*/
|
|
1745
|
+
const zShortPipelineView = z.object({
|
|
1746
|
+
url: z.string().readonly().optional(),
|
|
1747
|
+
html_url: z.string().readonly().optional(),
|
|
1748
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1749
|
+
identifier: z.string().optional(),
|
|
1750
|
+
name: z.string().optional(),
|
|
1751
|
+
definition_source: z.enum(["LOCAL", "REMOTE"]).optional(),
|
|
1752
|
+
git_config_ref: z.enum([
|
|
1753
|
+
"NONE",
|
|
1754
|
+
"DYNAMIC",
|
|
1755
|
+
"FIXED"
|
|
1756
|
+
]).optional(),
|
|
1757
|
+
refs: z.array(z.string()).optional(),
|
|
1758
|
+
events: z.array(zPipelineEventView).optional(),
|
|
1759
|
+
loop: z.array(z.string()).optional(),
|
|
1760
|
+
priority: z.enum([
|
|
1761
|
+
"LOW",
|
|
1762
|
+
"NORMAL",
|
|
1763
|
+
"HIGH"
|
|
1764
|
+
]).optional(),
|
|
1765
|
+
disabled: z.boolean().optional(),
|
|
1766
|
+
disabled_reason: z.string().optional(),
|
|
1767
|
+
last_execution_status: z.enum([
|
|
1768
|
+
"INPROGRESS",
|
|
1769
|
+
"ENQUEUED",
|
|
1256
1770
|
"TERMINATED",
|
|
1257
1771
|
"SUCCESSFUL",
|
|
1258
1772
|
"FAILED",
|
|
@@ -1264,26 +1778,27 @@ const zShortPipelineViewWritable = z.object({
|
|
|
1264
1778
|
"WAITING_FOR_VARIABLES",
|
|
1265
1779
|
"WAITING_FOR_SETTABLE_VARIABLES",
|
|
1266
1780
|
"WAITING_FOR_VT_SESSION"
|
|
1267
|
-
])),
|
|
1268
|
-
last_execution_revision: z.
|
|
1269
|
-
target_site_url: z.
|
|
1270
|
-
execution_message_template: z.
|
|
1271
|
-
create_date: z.
|
|
1272
|
-
always_from_scratch: z.
|
|
1273
|
-
ignore_fail_on_project_status: z.
|
|
1274
|
-
no_skip_to_most_recent: z.
|
|
1275
|
-
terminate_stale_runs: z.
|
|
1276
|
-
auto_clear_cache: z.
|
|
1277
|
-
paused: z.
|
|
1278
|
-
pause_on_repeated_failures: z.
|
|
1279
|
-
fetch_all_refs: z.
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1781
|
+
]).optional(),
|
|
1782
|
+
last_execution_revision: z.string().optional(),
|
|
1783
|
+
target_site_url: z.string().optional(),
|
|
1784
|
+
execution_message_template: z.string().optional(),
|
|
1785
|
+
create_date: z.iso.datetime().optional(),
|
|
1786
|
+
always_from_scratch: z.boolean().optional(),
|
|
1787
|
+
ignore_fail_on_project_status: z.boolean().optional(),
|
|
1788
|
+
no_skip_to_most_recent: z.boolean().optional(),
|
|
1789
|
+
terminate_stale_runs: z.boolean().optional(),
|
|
1790
|
+
auto_clear_cache: z.boolean().optional(),
|
|
1791
|
+
paused: z.boolean().optional(),
|
|
1792
|
+
pause_on_repeated_failures: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1793
|
+
fetch_all_refs: z.boolean().optional(),
|
|
1794
|
+
fetch_lfs: z.boolean().optional(),
|
|
1795
|
+
fail_on_prepare_env_warning: z.boolean().optional(),
|
|
1796
|
+
concurrent_pipeline_runs: z.boolean().optional(),
|
|
1797
|
+
clone_depth: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1798
|
+
do_not_create_commit_status: z.boolean().optional(),
|
|
1799
|
+
stale: z.boolean().optional(),
|
|
1800
|
+
waiting_for_push: z.boolean().optional(),
|
|
1801
|
+
resources: z.enum([
|
|
1287
1802
|
"DEFAULT",
|
|
1288
1803
|
"NANO",
|
|
1289
1804
|
"SMALL",
|
|
@@ -1292,35 +1807,37 @@ const zShortPipelineViewWritable = z.object({
|
|
|
1292
1807
|
"XLARGE",
|
|
1293
1808
|
"CUSTOM",
|
|
1294
1809
|
"X2LARGE"
|
|
1295
|
-
])),
|
|
1296
|
-
remote_path: z.
|
|
1297
|
-
remote_ref: z.
|
|
1298
|
-
remote_project_name: z.
|
|
1299
|
-
remote_parameters: z.
|
|
1300
|
-
git_config:
|
|
1301
|
-
tags: z.
|
|
1302
|
-
git_changeset_base: z.
|
|
1810
|
+
]).optional(),
|
|
1811
|
+
remote_path: z.string().optional(),
|
|
1812
|
+
remote_ref: z.string().optional(),
|
|
1813
|
+
remote_project_name: z.string().optional(),
|
|
1814
|
+
remote_parameters: z.array(zPipelinePropertyView).optional(),
|
|
1815
|
+
git_config: zYamlDefinitionView.optional(),
|
|
1816
|
+
tags: z.array(z.string()).optional(),
|
|
1817
|
+
git_changeset_base: z.enum([
|
|
1303
1818
|
"LATEST_RUN",
|
|
1304
1819
|
"LATEST_RUN_MATCHING_REF",
|
|
1305
1820
|
"PULL_REQUEST"
|
|
1306
|
-
])),
|
|
1307
|
-
filesystem_changeset_base: z.
|
|
1308
|
-
cpu: z.
|
|
1821
|
+
]).optional(),
|
|
1822
|
+
filesystem_changeset_base: z.enum(["DATE_MODIFIED", "CONTENTS"]).optional(),
|
|
1823
|
+
cpu: z.enum([
|
|
1309
1824
|
"X64",
|
|
1310
1825
|
"ARM",
|
|
1311
1826
|
"X86"
|
|
1312
|
-
])),
|
|
1313
|
-
description_required: z.
|
|
1314
|
-
folder: z.
|
|
1827
|
+
]).optional(),
|
|
1828
|
+
description_required: z.boolean().optional(),
|
|
1829
|
+
folder: z.string().optional()
|
|
1315
1830
|
});
|
|
1316
1831
|
/**
|
|
1317
1832
|
* The integration to use for authentication
|
|
1318
1833
|
*/
|
|
1319
|
-
const
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1834
|
+
const zIntegrationView = z.object({
|
|
1835
|
+
url: z.string().readonly().optional(),
|
|
1836
|
+
html_url: z.string().readonly().optional(),
|
|
1837
|
+
identifier: z.string().optional(),
|
|
1838
|
+
hash_id: z.string().optional(),
|
|
1839
|
+
name: z.string().optional(),
|
|
1840
|
+
type: z.enum([
|
|
1324
1841
|
"GIT_HUB",
|
|
1325
1842
|
"BITBUCKET",
|
|
1326
1843
|
"GOOGLE",
|
|
@@ -1370,9 +1887,12 @@ const zIntegrationViewWritable = z.object({
|
|
|
1370
1887
|
"BACKBLAZE",
|
|
1371
1888
|
"ONE_LOGIN",
|
|
1372
1889
|
"OKTA",
|
|
1373
|
-
"CONTENTFUL"
|
|
1374
|
-
|
|
1375
|
-
|
|
1890
|
+
"CONTENTFUL",
|
|
1891
|
+
"JIRA",
|
|
1892
|
+
"NPM_REGISTRY",
|
|
1893
|
+
"ANTHROPIC"
|
|
1894
|
+
]).optional(),
|
|
1895
|
+
auth_type: z.enum([
|
|
1376
1896
|
"OAUTH",
|
|
1377
1897
|
"TOKEN",
|
|
1378
1898
|
"API_KEY",
|
|
@@ -1383,57 +1903,155 @@ const zIntegrationViewWritable = z.object({
|
|
|
1383
1903
|
"OIDC",
|
|
1384
1904
|
"TRUSTED",
|
|
1385
1905
|
"APP_RW"
|
|
1386
|
-
])),
|
|
1387
|
-
scope: z.
|
|
1906
|
+
]).optional(),
|
|
1907
|
+
scope: z.enum([
|
|
1388
1908
|
"WORKSPACE",
|
|
1389
1909
|
"PROJECT",
|
|
1390
1910
|
"ENVIRONMENT"
|
|
1391
|
-
])),
|
|
1392
|
-
project_name: z.
|
|
1393
|
-
app_id: z.
|
|
1394
|
-
google_project: z.
|
|
1395
|
-
host_url: z.
|
|
1396
|
-
webhook_address: z.
|
|
1397
|
-
audience: z.
|
|
1398
|
-
atop_url: z.
|
|
1399
|
-
permissions:
|
|
1400
|
-
all_pipelines_allowed: z.
|
|
1401
|
-
allowed_pipelines: z.
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
const
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1911
|
+
]).optional(),
|
|
1912
|
+
project_name: z.string().optional(),
|
|
1913
|
+
app_id: z.string().optional(),
|
|
1914
|
+
google_project: z.string().optional(),
|
|
1915
|
+
host_url: z.string().optional(),
|
|
1916
|
+
webhook_address: z.string().optional(),
|
|
1917
|
+
audience: z.string().optional(),
|
|
1918
|
+
atop_url: z.string().optional(),
|
|
1919
|
+
permissions: zIntegrationPermissionsView.optional(),
|
|
1920
|
+
all_pipelines_allowed: z.boolean().optional(),
|
|
1921
|
+
allowed_pipelines: z.array(zShortPipelineView).optional(),
|
|
1922
|
+
disabled: z.boolean().optional()
|
|
1923
|
+
});
|
|
1924
|
+
const zIntegrationsViewWritable = z.object({ integrations: z.array(z.lazy(() => zIntegrationViewWritable)).optional() });
|
|
1925
|
+
/**
|
|
1926
|
+
* The list of events that trigger the pipeline run
|
|
1927
|
+
*/
|
|
1928
|
+
const zPipelineEventViewWritable = z.object({
|
|
1929
|
+
type: z.enum([
|
|
1930
|
+
"PUSH",
|
|
1931
|
+
"CREATE_REF",
|
|
1932
|
+
"DELETE_REF",
|
|
1933
|
+
"PULL_REQUEST",
|
|
1934
|
+
"SCHEDULE",
|
|
1935
|
+
"PUBLISH_ARTIFACT_VERSION",
|
|
1936
|
+
"DELETE_ARTIFACT_VERSION",
|
|
1937
|
+
"WEBHOOK",
|
|
1938
|
+
"EMAIL",
|
|
1939
|
+
"CREATE_ARTIFACT_VERSION",
|
|
1940
|
+
"ENVIRONMENT_CREATE",
|
|
1941
|
+
"ENVIRONMENT_DELETE",
|
|
1942
|
+
"SANDBOX_CREATED",
|
|
1943
|
+
"SANDBOX_DELETED",
|
|
1944
|
+
"SANDBOX_TIMED_OUT"
|
|
1945
|
+
]).optional(),
|
|
1946
|
+
refs: z.array(z.string()).optional(),
|
|
1947
|
+
events: z.array(z.string()).optional(),
|
|
1948
|
+
branches: z.array(z.string()).optional(),
|
|
1949
|
+
artifacts: z.array(zPipelineArtifactContextView).optional(),
|
|
1950
|
+
environments: z.array(zPipelineEnvironmentContextView).optional(),
|
|
1951
|
+
start_date: z.iso.datetime().optional(),
|
|
1952
|
+
delay: z.coerce.bigint().min(BigInt("-9223372036854775808"), { error: "Invalid value: Expected int64 to be >= -9223372036854775808" }).max(BigInt("9223372036854775807"), { error: "Invalid value: Expected int64 to be <= 9223372036854775807" }).optional(),
|
|
1953
|
+
cron: z.string().optional(),
|
|
1954
|
+
timezone: z.string().optional(),
|
|
1955
|
+
totp: z.boolean().optional(),
|
|
1956
|
+
prefix: z.string().optional(),
|
|
1957
|
+
whitelist: z.array(z.string()).optional(),
|
|
1958
|
+
targets: z.array(z.unknown()).optional()
|
|
1412
1959
|
});
|
|
1413
1960
|
/**
|
|
1414
|
-
*
|
|
1961
|
+
* Short representation of a pipeline
|
|
1415
1962
|
*/
|
|
1416
|
-
const
|
|
1417
|
-
id: z.
|
|
1418
|
-
identifier: z.
|
|
1419
|
-
name: z.
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
"
|
|
1963
|
+
const zShortPipelineViewWritable = z.object({
|
|
1964
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
1965
|
+
identifier: z.string().optional(),
|
|
1966
|
+
name: z.string().optional(),
|
|
1967
|
+
definition_source: z.enum(["LOCAL", "REMOTE"]).optional(),
|
|
1968
|
+
git_config_ref: z.enum([
|
|
1969
|
+
"NONE",
|
|
1970
|
+
"DYNAMIC",
|
|
1971
|
+
"FIXED"
|
|
1972
|
+
]).optional(),
|
|
1973
|
+
refs: z.array(z.string()).optional(),
|
|
1974
|
+
events: z.array(zPipelineEventViewWritable).optional(),
|
|
1975
|
+
loop: z.array(z.string()).optional(),
|
|
1976
|
+
priority: z.enum([
|
|
1977
|
+
"LOW",
|
|
1978
|
+
"NORMAL",
|
|
1979
|
+
"HIGH"
|
|
1980
|
+
]).optional(),
|
|
1981
|
+
disabled: z.boolean().optional(),
|
|
1982
|
+
disabled_reason: z.string().optional(),
|
|
1983
|
+
last_execution_status: z.enum([
|
|
1984
|
+
"INPROGRESS",
|
|
1985
|
+
"ENQUEUED",
|
|
1986
|
+
"TERMINATED",
|
|
1987
|
+
"SUCCESSFUL",
|
|
1423
1988
|
"FAILED",
|
|
1424
|
-
"
|
|
1425
|
-
"
|
|
1426
|
-
"
|
|
1427
|
-
|
|
1989
|
+
"INITIAL",
|
|
1990
|
+
"NOT_EXECUTED",
|
|
1991
|
+
"SKIPPED",
|
|
1992
|
+
"TERMINATING",
|
|
1993
|
+
"WAITING_FOR_APPLY",
|
|
1994
|
+
"WAITING_FOR_VARIABLES",
|
|
1995
|
+
"WAITING_FOR_SETTABLE_VARIABLES",
|
|
1996
|
+
"WAITING_FOR_VT_SESSION"
|
|
1997
|
+
]).optional(),
|
|
1998
|
+
last_execution_revision: z.string().optional(),
|
|
1999
|
+
target_site_url: z.string().optional(),
|
|
2000
|
+
execution_message_template: z.string().optional(),
|
|
2001
|
+
create_date: z.iso.datetime().optional(),
|
|
2002
|
+
always_from_scratch: z.boolean().optional(),
|
|
2003
|
+
ignore_fail_on_project_status: z.boolean().optional(),
|
|
2004
|
+
no_skip_to_most_recent: z.boolean().optional(),
|
|
2005
|
+
terminate_stale_runs: z.boolean().optional(),
|
|
2006
|
+
auto_clear_cache: z.boolean().optional(),
|
|
2007
|
+
paused: z.boolean().optional(),
|
|
2008
|
+
pause_on_repeated_failures: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
2009
|
+
fetch_all_refs: z.boolean().optional(),
|
|
2010
|
+
fetch_lfs: z.boolean().optional(),
|
|
2011
|
+
fail_on_prepare_env_warning: z.boolean().optional(),
|
|
2012
|
+
concurrent_pipeline_runs: z.boolean().optional(),
|
|
2013
|
+
clone_depth: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
2014
|
+
do_not_create_commit_status: z.boolean().optional(),
|
|
2015
|
+
stale: z.boolean().optional(),
|
|
2016
|
+
waiting_for_push: z.boolean().optional(),
|
|
2017
|
+
resources: z.enum([
|
|
2018
|
+
"DEFAULT",
|
|
2019
|
+
"NANO",
|
|
2020
|
+
"SMALL",
|
|
2021
|
+
"MEDIUM",
|
|
2022
|
+
"LARGE",
|
|
2023
|
+
"XLARGE",
|
|
2024
|
+
"CUSTOM",
|
|
2025
|
+
"X2LARGE"
|
|
2026
|
+
]).optional(),
|
|
2027
|
+
remote_path: z.string().optional(),
|
|
2028
|
+
remote_ref: z.string().optional(),
|
|
2029
|
+
remote_project_name: z.string().optional(),
|
|
2030
|
+
remote_parameters: z.array(zPipelinePropertyView).optional(),
|
|
2031
|
+
git_config: zYamlDefinitionView.optional(),
|
|
2032
|
+
tags: z.array(z.string()).optional(),
|
|
2033
|
+
git_changeset_base: z.enum([
|
|
2034
|
+
"LATEST_RUN",
|
|
2035
|
+
"LATEST_RUN_MATCHING_REF",
|
|
2036
|
+
"PULL_REQUEST"
|
|
2037
|
+
]).optional(),
|
|
2038
|
+
filesystem_changeset_base: z.enum(["DATE_MODIFIED", "CONTENTS"]).optional(),
|
|
2039
|
+
cpu: z.enum([
|
|
2040
|
+
"X64",
|
|
2041
|
+
"ARM",
|
|
2042
|
+
"X86"
|
|
2043
|
+
]).optional(),
|
|
2044
|
+
description_required: z.boolean().optional(),
|
|
2045
|
+
folder: z.string().optional()
|
|
1428
2046
|
});
|
|
1429
2047
|
/**
|
|
1430
|
-
*
|
|
2048
|
+
* The integration to use for authentication
|
|
1431
2049
|
*/
|
|
1432
|
-
const
|
|
1433
|
-
identifier: z.
|
|
1434
|
-
hash_id: z.
|
|
1435
|
-
name: z.
|
|
1436
|
-
type: z.
|
|
2050
|
+
const zIntegrationViewWritable = z.object({
|
|
2051
|
+
identifier: z.string().optional(),
|
|
2052
|
+
hash_id: z.string().optional(),
|
|
2053
|
+
name: z.string().optional(),
|
|
2054
|
+
type: z.enum([
|
|
1437
2055
|
"GIT_HUB",
|
|
1438
2056
|
"BITBUCKET",
|
|
1439
2057
|
"GOOGLE",
|
|
@@ -1483,9 +2101,12 @@ const zIntegrationIdViewWritable = z.object({
|
|
|
1483
2101
|
"BACKBLAZE",
|
|
1484
2102
|
"ONE_LOGIN",
|
|
1485
2103
|
"OKTA",
|
|
1486
|
-
"CONTENTFUL"
|
|
1487
|
-
|
|
1488
|
-
|
|
2104
|
+
"CONTENTFUL",
|
|
2105
|
+
"JIRA",
|
|
2106
|
+
"NPM_REGISTRY",
|
|
2107
|
+
"ANTHROPIC"
|
|
2108
|
+
]).optional(),
|
|
2109
|
+
auth_type: z.enum([
|
|
1489
2110
|
"OAUTH",
|
|
1490
2111
|
"TOKEN",
|
|
1491
2112
|
"API_KEY",
|
|
@@ -1496,749 +2117,286 @@ const zIntegrationIdViewWritable = z.object({
|
|
|
1496
2117
|
"OIDC",
|
|
1497
2118
|
"TRUSTED",
|
|
1498
2119
|
"APP_RW"
|
|
1499
|
-
])),
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
});
|
|
1518
|
-
const
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
fetch_submodules: z.optional(z.boolean()),
|
|
1536
|
-
fetch_submodules_env_key: z.optional(z.string()),
|
|
1537
|
-
allow_pull_requests: z.optional(z.boolean()),
|
|
1538
|
-
update_default_branch_from_external: z.optional(z.boolean()),
|
|
1539
|
-
without_repository: z.optional(z.boolean())
|
|
1540
|
-
});
|
|
1541
|
-
/**
|
|
1542
|
-
* Short representation of a project
|
|
1543
|
-
*/
|
|
1544
|
-
const zShortProjectViewWritable = z.object({
|
|
1545
|
-
name: z.optional(z.string()),
|
|
1546
|
-
display_name: z.string(),
|
|
1547
|
-
status: z.optional(z.string()),
|
|
1548
|
-
access: z.optional(z.enum(["PRIVATE", "PUBLIC"])),
|
|
1549
|
-
create_date: z.optional(z.iso.datetime())
|
|
1550
|
-
});
|
|
1551
|
-
/**
|
|
1552
|
-
* The environment variables of the sandbox
|
|
1553
|
-
*/
|
|
1554
|
-
const zAddVariableInObjectRequestWritable = z.object({
|
|
1555
|
-
key: z.string(),
|
|
1556
|
-
value: z.optional(z.string()),
|
|
1557
|
-
settable: z.optional(z.boolean()),
|
|
1558
|
-
run_only_settable: z.optional(z.boolean()),
|
|
1559
|
-
encrypted: z.optional(z.boolean()),
|
|
1560
|
-
description: z.optional(z.string()),
|
|
1561
|
-
init_path: z.optional(z.string()),
|
|
1562
|
-
defaults: z.optional(z.string()),
|
|
1563
|
-
file_path: z.optional(z.string()),
|
|
1564
|
-
file_chmod: z.optional(z.string()),
|
|
1565
|
-
file_place: z.optional(z.enum(["NONE", "CONTAINER"])),
|
|
1566
|
-
password: z.optional(z.string()),
|
|
1567
|
-
passphrase: z.optional(z.string()),
|
|
1568
|
-
key_identifier: z.optional(z.string()),
|
|
1569
|
-
type: z.enum([
|
|
1570
|
-
"VAR",
|
|
1571
|
-
"FILE",
|
|
1572
|
-
"SSH_KEY",
|
|
1573
|
-
"IOS_KEYCHAIN",
|
|
1574
|
-
"IOS_PROVISION_PROFILES",
|
|
1575
|
-
"SSH_PUBLIC_KEY",
|
|
1576
|
-
"GPG_KEY"
|
|
1577
|
-
])
|
|
1578
|
-
});
|
|
1579
|
-
/**
|
|
1580
|
-
* The TLS/SSL encryption settings of the tunnel
|
|
1581
|
-
*/
|
|
1582
|
-
const zTlsSettingsViewWritable = z.object({
|
|
1583
|
-
private_key: z.optional(z.string()),
|
|
1584
|
-
certificate: z.optional(z.string()),
|
|
1585
|
-
ca_certificate: z.optional(z.string()),
|
|
1586
|
-
terminate_at: z.optional(z.enum([
|
|
1587
|
-
"REGION",
|
|
1588
|
-
"AGENT",
|
|
1589
|
-
"TARGET"
|
|
1590
|
-
]))
|
|
1591
|
-
});
|
|
1592
|
-
/**
|
|
1593
|
-
* The HTTP-specific settings of the tunnel
|
|
1594
|
-
*/
|
|
1595
|
-
const zHttpSettingsViewWritable = z.object({
|
|
1596
|
-
verify_certificate: z.optional(z.boolean()),
|
|
1597
|
-
compression: z.optional(z.boolean()),
|
|
1598
|
-
http2: z.optional(z.boolean()),
|
|
1599
|
-
log_requests: z.optional(z.boolean()),
|
|
1600
|
-
request_headers: z.optional(z.array(z.record(z.string(), z.string()))),
|
|
1601
|
-
whitelist_user_agents: z.optional(z.array(z.string())),
|
|
1602
|
-
rewrite_host_header: z.optional(z.string()),
|
|
1603
|
-
response_headers: z.optional(z.array(z.record(z.string(), z.string()))),
|
|
1604
|
-
login: z.optional(z.string()),
|
|
1605
|
-
password: z.optional(z.string()),
|
|
1606
|
-
tls_ca: z.optional(z.string()),
|
|
1607
|
-
circuit_breaker: z.optional(z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
|
|
1608
|
-
serve_path: z.optional(z.string()),
|
|
1609
|
-
auth_type: z.optional(z.enum([
|
|
1610
|
-
"NONE",
|
|
1611
|
-
"BASIC",
|
|
1612
|
-
"BUDDY"
|
|
1613
|
-
]))
|
|
1614
|
-
});
|
|
1615
|
-
const zTunnelViewWritable = z.object({
|
|
1616
|
-
name: z.string(),
|
|
1617
|
-
endpoint: z.string(),
|
|
1618
|
-
type: z.enum([
|
|
1619
|
-
"TCP",
|
|
1620
|
-
"TLS",
|
|
1621
|
-
"HTTP",
|
|
1622
|
-
"SSH"
|
|
1623
|
-
]),
|
|
1624
|
-
region: z.enum([
|
|
1625
|
-
"US",
|
|
1626
|
-
"EU",
|
|
1627
|
-
"AS"
|
|
1628
|
-
]),
|
|
1629
|
-
whitelist: z.optional(z.array(z.string())),
|
|
1630
|
-
timeout: z.optional(z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
|
|
1631
|
-
http: z.optional(zHttpSettingsViewWritable),
|
|
1632
|
-
tls: z.optional(zTlsSettingsViewWritable),
|
|
1633
|
-
endpoint_url: z.optional(z.string())
|
|
1634
|
-
});
|
|
1635
|
-
const zUpdateSandboxRequestWritable = z.object({
|
|
1636
|
-
name: z.optional(z.string()),
|
|
1637
|
-
identifier: z.optional(z.string()),
|
|
1638
|
-
resources: z.optional(z.enum([
|
|
1639
|
-
"1x2",
|
|
1640
|
-
"2x4",
|
|
1641
|
-
"3x6",
|
|
1642
|
-
"4x8",
|
|
1643
|
-
"5x10",
|
|
1644
|
-
"6x12",
|
|
1645
|
-
"7x14",
|
|
1646
|
-
"8x16",
|
|
1647
|
-
"9x18",
|
|
1648
|
-
"10x20",
|
|
1649
|
-
"11x22",
|
|
1650
|
-
"12x24",
|
|
1651
|
-
"CUSTOM"
|
|
1652
|
-
])),
|
|
1653
|
-
install_commands: z.optional(z.string()),
|
|
1654
|
-
run_command: z.optional(z.string()),
|
|
1655
|
-
app_dir: z.optional(z.string()),
|
|
1656
|
-
app_type: z.optional(z.enum(["CMD", "SERVICE"])),
|
|
1657
|
-
tags: z.optional(z.array(z.string())),
|
|
1658
|
-
endpoints: z.optional(z.array(zTunnelViewWritable)),
|
|
1659
|
-
variables: z.optional(z.array(zAddVariableInObjectRequestWritable)),
|
|
1660
|
-
permissions: z.optional(zPermissionsView)
|
|
1661
|
-
});
|
|
1662
|
-
const zSandboxesViewWritable = z.object({ sandboxes: z.optional(z.array(zSandboxIdViewWritable)) });
|
|
1663
|
-
/**
|
|
1664
|
-
* Content item in a sandbox
|
|
1665
|
-
*/
|
|
1666
|
-
const zSandboxContentItemWritable = z.object({
|
|
1667
|
-
type: z.optional(z.enum(["FILE", "DIR"])),
|
|
1668
|
-
name: z.optional(z.string()),
|
|
1669
|
-
path: z.optional(z.string()),
|
|
1670
|
-
size: z.optional(z.coerce.bigint().min(BigInt("-9223372036854775808"), { error: "Invalid value: Expected int64 to be >= -9223372036854775808" }).max(BigInt("9223372036854775807"), { error: "Invalid value: Expected int64 to be <= 9223372036854775807" }))
|
|
1671
|
-
});
|
|
1672
|
-
/**
|
|
1673
|
-
* Sandbox content listing
|
|
1674
|
-
*/
|
|
1675
|
-
const zSandboxContentViewWritable = z.object({ contents: z.optional(z.array(zSandboxContentItemWritable)) });
|
|
1676
|
-
const zSandboxCommandViewWritable = z.object({
|
|
1677
|
-
id: z.optional(z.string()),
|
|
1678
|
-
command: z.optional(z.string()),
|
|
1679
|
-
runtime: z.optional(z.enum([
|
|
1680
|
-
"BASH",
|
|
1681
|
-
"JAVASCRIPT",
|
|
1682
|
-
"TYPESCRIPT",
|
|
1683
|
-
"PYTHON"
|
|
1684
|
-
])),
|
|
1685
|
-
status: z.optional(z.enum([
|
|
1686
|
-
"INPROGRESS",
|
|
1687
|
-
"SUCCESSFUL",
|
|
1688
|
-
"FAILED"
|
|
1689
|
-
])),
|
|
1690
|
-
exit_code: z.optional(z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
|
|
1691
|
-
logs_url: z.optional(z.string())
|
|
1692
|
-
});
|
|
1693
|
-
const zSandboxCommandsViewWritable = z.object({ commands: z.optional(z.array(zSandboxCommandViewWritable)) });
|
|
1694
|
-
const zSandboxAppLogsViewWritable = z.object({
|
|
1695
|
-
cursor: z.optional(z.string()),
|
|
1696
|
-
logs: z.optional(z.array(z.string()))
|
|
1697
|
-
});
|
|
1698
|
-
const zShortSnapshotViewWritable = z.object({
|
|
1699
|
-
id: z.optional(z.string()),
|
|
1700
|
-
name: z.optional(z.string()),
|
|
1701
|
-
size: z.optional(z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
|
|
1702
|
-
status: z.optional(z.enum([
|
|
1703
|
-
"CREATING",
|
|
1704
|
-
"CREATED",
|
|
1705
|
-
"DELETING",
|
|
1706
|
-
"FAILED"
|
|
1707
|
-
])),
|
|
1708
|
-
create_date: z.optional(z.iso.datetime())
|
|
1709
|
-
});
|
|
1710
|
-
const zSnapshotsViewWritable = z.object({ snapshots: z.optional(z.array(zShortSnapshotViewWritable)) });
|
|
1711
|
-
const zSnapshotViewWritable = z.object({
|
|
1712
|
-
id: z.optional(z.string()),
|
|
1713
|
-
name: z.optional(z.string()),
|
|
1714
|
-
size: z.optional(z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
|
|
1715
|
-
status: z.optional(z.enum([
|
|
1716
|
-
"CREATING",
|
|
1717
|
-
"CREATED",
|
|
1718
|
-
"DELETING",
|
|
1719
|
-
"FAILED"
|
|
1720
|
-
])),
|
|
1721
|
-
create_date: z.optional(z.iso.datetime()),
|
|
1722
|
-
created_by: z.optional(zMemberViewWritable)
|
|
1723
|
-
});
|
|
1724
|
-
const zSandboxYamlViewWritable = z.object({ yaml: z.optional(z.string()) });
|
|
1725
|
-
const zCreateNewSandboxRequestWritable = z.object({
|
|
1726
|
-
name: z.string(),
|
|
1727
|
-
identifier: z.optional(z.string()),
|
|
1728
|
-
os: z.string(),
|
|
1729
|
-
resources: z.optional(z.enum([
|
|
1730
|
-
"1x2",
|
|
1731
|
-
"2x4",
|
|
1732
|
-
"3x6",
|
|
1733
|
-
"4x8",
|
|
1734
|
-
"5x10",
|
|
1735
|
-
"6x12",
|
|
1736
|
-
"7x14",
|
|
1737
|
-
"8x16",
|
|
1738
|
-
"9x18",
|
|
1739
|
-
"10x20",
|
|
1740
|
-
"11x22",
|
|
1741
|
-
"12x24",
|
|
1742
|
-
"CUSTOM"
|
|
1743
|
-
])),
|
|
1744
|
-
install_commands: z.optional(z.string()),
|
|
1745
|
-
run_command: z.optional(z.string()),
|
|
1746
|
-
app_dir: z.optional(z.string()),
|
|
1747
|
-
app_type: z.optional(z.enum(["CMD", "SERVICE"])),
|
|
1748
|
-
tags: z.optional(z.array(z.string())),
|
|
1749
|
-
endpoints: z.optional(z.array(zTunnelViewWritable)),
|
|
1750
|
-
variables: z.optional(z.array(zAddVariableInObjectRequestWritable))
|
|
1751
|
-
});
|
|
1752
|
-
const zCreateFromSnapshotRequestWritable = z.object({
|
|
1753
|
-
snapshot_id: z.string(),
|
|
1754
|
-
name: z.string(),
|
|
1755
|
-
identifier: z.optional(z.string()),
|
|
1756
|
-
os: z.optional(z.string()),
|
|
1757
|
-
resources: z.optional(z.enum([
|
|
1758
|
-
"1x2",
|
|
1759
|
-
"2x4",
|
|
1760
|
-
"3x6",
|
|
1761
|
-
"4x8",
|
|
1762
|
-
"5x10",
|
|
1763
|
-
"6x12",
|
|
1764
|
-
"7x14",
|
|
1765
|
-
"8x16",
|
|
1766
|
-
"9x18",
|
|
1767
|
-
"10x20",
|
|
1768
|
-
"11x22",
|
|
1769
|
-
"12x24",
|
|
1770
|
-
"CUSTOM"
|
|
1771
|
-
])),
|
|
1772
|
-
install_commands: z.optional(z.string()),
|
|
1773
|
-
run_command: z.optional(z.string()),
|
|
1774
|
-
app_dir: z.optional(z.string()),
|
|
1775
|
-
app_type: z.optional(z.enum(["CMD", "SERVICE"])),
|
|
1776
|
-
tags: z.optional(z.array(z.string())),
|
|
1777
|
-
endpoints: z.optional(z.array(zTunnelViewWritable)),
|
|
1778
|
-
variables: z.optional(z.array(zEnvironmentVariableView))
|
|
1779
|
-
});
|
|
1780
|
-
const zSandboxResponseWritable = z.object({
|
|
1781
|
-
id: z.optional(z.string()),
|
|
1782
|
-
identifier: z.optional(z.string()),
|
|
1783
|
-
name: z.optional(z.string()),
|
|
1784
|
-
status: z.optional(z.enum([
|
|
1785
|
-
"STARTING",
|
|
1786
|
-
"STOPPING",
|
|
1787
|
-
"FAILED",
|
|
1788
|
-
"RUNNING",
|
|
1789
|
-
"STOPPED",
|
|
1790
|
-
"RESTORING"
|
|
1791
|
-
])),
|
|
1792
|
-
os: z.optional(z.string()),
|
|
1793
|
-
resources: z.optional(z.enum([
|
|
1794
|
-
"1x2",
|
|
1795
|
-
"2x4",
|
|
1796
|
-
"3x6",
|
|
1797
|
-
"4x8",
|
|
1798
|
-
"5x10",
|
|
1799
|
-
"6x12",
|
|
1800
|
-
"7x14",
|
|
1801
|
-
"8x16",
|
|
1802
|
-
"9x18",
|
|
1803
|
-
"10x20",
|
|
1804
|
-
"11x22",
|
|
1805
|
-
"12x24",
|
|
1806
|
-
"CUSTOM"
|
|
1807
|
-
])),
|
|
1808
|
-
install_commands: z.optional(z.string()),
|
|
1809
|
-
run_command: z.optional(z.string()),
|
|
1810
|
-
app_dir: z.optional(z.string()),
|
|
1811
|
-
app_type: z.optional(z.enum(["CMD", "SERVICE"])),
|
|
1812
|
-
tags: z.optional(z.array(z.string())),
|
|
1813
|
-
app_status: z.optional(z.enum([
|
|
1814
|
-
"NONE",
|
|
1815
|
-
"RUNNING",
|
|
1816
|
-
"ENDED",
|
|
1817
|
-
"FAILED"
|
|
1818
|
-
])),
|
|
1819
|
-
boot_logs: z.optional(z.array(z.string())),
|
|
1820
|
-
setup_status: z.optional(z.enum([
|
|
1821
|
-
"INPROGRESS",
|
|
1822
|
-
"SUCCESS",
|
|
1823
|
-
"FAILED"
|
|
1824
|
-
])),
|
|
1825
|
-
endpoints: z.optional(z.array(zTunnelViewWritable)),
|
|
1826
|
-
project: z.optional(zProjectViewWritable),
|
|
1827
|
-
permissions: z.optional(zPermissionsView),
|
|
1828
|
-
variables: z.optional(z.array(zEnvironmentVariableView))
|
|
1829
|
-
});
|
|
1830
|
-
const zProjectsViewWritable = z.object({ projects: z.optional(z.array(zShortProjectViewWritable)) });
|
|
1831
|
-
const zGetWorkspacesData = z.object({
|
|
1832
|
-
body: z.optional(z.never()),
|
|
1833
|
-
path: z.optional(z.never()),
|
|
1834
|
-
query: z.optional(z.never())
|
|
1835
|
-
});
|
|
1836
|
-
const zGetWorkspaceData = z.object({
|
|
1837
|
-
body: z.optional(z.never()),
|
|
1838
|
-
path: z.object({ workspace_domain: z.string() }),
|
|
1839
|
-
query: z.optional(z.never())
|
|
1840
|
-
});
|
|
1841
|
-
const zDisableSsoData = z.object({
|
|
1842
|
-
body: z.optional(z.never()),
|
|
1843
|
-
path: z.object({ workspace_domain: z.string() }),
|
|
1844
|
-
query: z.optional(z.never())
|
|
1845
|
-
});
|
|
1846
|
-
const zEnableSsoData = z.object({
|
|
1847
|
-
body: z.optional(z.never()),
|
|
1848
|
-
path: z.object({ workspace_domain: z.string() }),
|
|
1849
|
-
query: z.optional(z.never())
|
|
1850
|
-
});
|
|
1851
|
-
const zGetIdentifiersData = z.object({
|
|
1852
|
-
body: z.optional(z.never()),
|
|
1853
|
-
path: z.object({ workspace_domain: z.string() }),
|
|
1854
|
-
query: z.optional(z.object({
|
|
1855
|
-
project: z.optional(z.string()),
|
|
1856
|
-
pipeline: z.optional(z.string()),
|
|
1857
|
-
environment: z.optional(z.string()),
|
|
1858
|
-
package: z.optional(z.string()),
|
|
1859
|
-
package_version: z.optional(z.string()),
|
|
1860
|
-
sandbox: z.optional(z.string())
|
|
1861
|
-
}))
|
|
2120
|
+
]).optional(),
|
|
2121
|
+
scope: z.enum([
|
|
2122
|
+
"WORKSPACE",
|
|
2123
|
+
"PROJECT",
|
|
2124
|
+
"ENVIRONMENT"
|
|
2125
|
+
]).optional(),
|
|
2126
|
+
project_name: z.string().optional(),
|
|
2127
|
+
app_id: z.string().optional(),
|
|
2128
|
+
google_project: z.string().optional(),
|
|
2129
|
+
host_url: z.string().optional(),
|
|
2130
|
+
webhook_address: z.string().optional(),
|
|
2131
|
+
audience: z.string().optional(),
|
|
2132
|
+
atop_url: z.string().optional(),
|
|
2133
|
+
permissions: zIntegrationPermissionsView.optional(),
|
|
2134
|
+
all_pipelines_allowed: z.boolean().optional(),
|
|
2135
|
+
allowed_pipelines: z.array(zShortPipelineViewWritable).optional(),
|
|
2136
|
+
disabled: z.boolean().optional()
|
|
2137
|
+
});
|
|
2138
|
+
const zGetWorkspacePath = z.object({ workspace_domain: z.string() });
|
|
2139
|
+
const zDisableSsoPath = z.object({ workspace_domain: z.string() });
|
|
2140
|
+
const zEnableSsoPath = z.object({ workspace_domain: z.string() });
|
|
2141
|
+
const zGetIdentifiersPath = z.object({ workspace_domain: z.string() });
|
|
2142
|
+
const zGetIdentifiersQuery = z.object({
|
|
2143
|
+
project: z.string().optional(),
|
|
2144
|
+
pipeline: z.string().optional(),
|
|
2145
|
+
environment: z.string().optional(),
|
|
2146
|
+
artifact: z.string().optional(),
|
|
2147
|
+
artifact_version: z.string().optional(),
|
|
2148
|
+
sandbox: z.string().optional(),
|
|
2149
|
+
unit_test_suite: z.string().optional(),
|
|
2150
|
+
visual_test_suite: z.string().optional(),
|
|
2151
|
+
crawl_suite: z.string().optional(),
|
|
2152
|
+
distribution: z.string().optional(),
|
|
2153
|
+
route_subdomain: z.string().optional(),
|
|
2154
|
+
route_domain: z.string().optional(),
|
|
2155
|
+
route_path: z.string().optional()
|
|
1862
2156
|
});
|
|
1863
2157
|
const zGetIdentifiersResponse = zIdsView;
|
|
1864
|
-
const
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
query: z.optional(z.never())
|
|
1868
|
-
});
|
|
1869
|
-
const zAddIntegrationData = z.object({
|
|
1870
|
-
body: z.optional(zAddIntegrationRequest),
|
|
1871
|
-
path: z.object({ workspace_domain: z.string() }),
|
|
1872
|
-
query: z.optional(z.never())
|
|
1873
|
-
});
|
|
1874
|
-
const zDeleteIntegrationData = z.object({
|
|
1875
|
-
body: z.optional(z.never()),
|
|
1876
|
-
path: z.object({
|
|
1877
|
-
workspace_domain: z.string(),
|
|
1878
|
-
hash_id: z.string()
|
|
1879
|
-
}),
|
|
1880
|
-
query: z.optional(z.never())
|
|
2158
|
+
const zDeleteIntegrationPath = z.object({
|
|
2159
|
+
workspace_domain: z.string(),
|
|
2160
|
+
hash_id: z.string()
|
|
1881
2161
|
});
|
|
1882
2162
|
/**
|
|
1883
2163
|
* Integration deleted successfully
|
|
1884
2164
|
*/
|
|
1885
2165
|
const zDeleteIntegrationResponse = z.void();
|
|
1886
|
-
const
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
});
|
|
1894
|
-
const
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
workspace_domain: z.string(),
|
|
1898
|
-
hash_id: z.string()
|
|
1899
|
-
}),
|
|
1900
|
-
query: z.optional(z.never())
|
|
1901
|
-
});
|
|
1902
|
-
const zGetWorkspaceMembersData = z.object({
|
|
1903
|
-
body: z.optional(z.never()),
|
|
1904
|
-
path: z.object({ workspace_domain: z.string() }),
|
|
1905
|
-
query: z.optional(z.object({
|
|
1906
|
-
page: z.optional(z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
|
|
1907
|
-
per_page: z.optional(z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
|
|
1908
|
-
sort_by: z.optional(z.string()),
|
|
1909
|
-
sort_direction: z.optional(z.string())
|
|
1910
|
-
}))
|
|
1911
|
-
});
|
|
1912
|
-
const zAddWorkspaceMemberData = z.object({
|
|
1913
|
-
body: z.optional(zAddWorkspaceMemberRequest),
|
|
1914
|
-
path: z.object({ workspace_domain: z.string() }),
|
|
1915
|
-
query: z.optional(z.never())
|
|
1916
|
-
});
|
|
1917
|
-
const zDeleteWorkspaceMemberData = z.object({
|
|
1918
|
-
body: z.optional(z.never()),
|
|
1919
|
-
path: z.object({
|
|
1920
|
-
workspace_domain: z.string(),
|
|
1921
|
-
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
1922
|
-
}),
|
|
1923
|
-
query: z.optional(z.never())
|
|
2166
|
+
const zGetWorkspaceMembersPath = z.object({ workspace_domain: z.string() });
|
|
2167
|
+
const zGetWorkspaceMembersQuery = z.object({
|
|
2168
|
+
page: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
2169
|
+
per_page: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
2170
|
+
sort_by: z.string().optional(),
|
|
2171
|
+
sort_direction: z.string().optional()
|
|
2172
|
+
});
|
|
2173
|
+
const zAddWorkspaceMemberPath = z.object({ workspace_domain: z.string() });
|
|
2174
|
+
const zDeleteWorkspaceMemberPath = z.object({
|
|
2175
|
+
workspace_domain: z.string(),
|
|
2176
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
1924
2177
|
});
|
|
1925
2178
|
/**
|
|
1926
2179
|
* Workspace member deleted successfully
|
|
1927
2180
|
*/
|
|
1928
2181
|
const zDeleteWorkspaceMemberResponse = z.void();
|
|
1929
|
-
const
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
});
|
|
1937
|
-
const
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
}),
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
query: z.optional(z.object({
|
|
1952
|
-
page: z.optional(z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
|
|
1953
|
-
per_page: z.optional(z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
|
|
1954
|
-
status: z.optional(z.string()),
|
|
1955
|
-
sort_by: z.optional(z.string()),
|
|
1956
|
-
sort_direction: z.optional(z.string()),
|
|
1957
|
-
all: z.optional(z.string())
|
|
1958
|
-
}))
|
|
1959
|
-
});
|
|
1960
|
-
const zGetSandboxesData = z.object({
|
|
1961
|
-
body: z.optional(z.never()),
|
|
1962
|
-
path: z.object({ workspace_domain: z.string() }),
|
|
1963
|
-
query: z.object({ project_name: z.string() })
|
|
1964
|
-
});
|
|
2182
|
+
const zGetWorkspaceMemberPath = z.object({
|
|
2183
|
+
workspace_domain: z.string(),
|
|
2184
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
2185
|
+
});
|
|
2186
|
+
const zUpdateWorkspaceMemberPath = z.object({
|
|
2187
|
+
workspace_domain: z.string(),
|
|
2188
|
+
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
2189
|
+
});
|
|
2190
|
+
const zGetWorkspaceMemberProjectsPath = z.object({
|
|
2191
|
+
workspace_domain: z.string(),
|
|
2192
|
+
user_id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
2193
|
+
});
|
|
2194
|
+
const zGetWorkspaceMemberProjectsQuery = z.object({
|
|
2195
|
+
page: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
2196
|
+
per_page: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }).optional(),
|
|
2197
|
+
status: z.string().optional(),
|
|
2198
|
+
sort_by: z.string().optional(),
|
|
2199
|
+
sort_direction: z.string().optional(),
|
|
2200
|
+
all: z.string().optional()
|
|
2201
|
+
});
|
|
2202
|
+
const zGetSandboxesPath = z.object({ workspace_domain: z.string() });
|
|
2203
|
+
const zGetSandboxesQuery = z.object({ project_name: z.string() });
|
|
1965
2204
|
const zGetSandboxesResponse = zSandboxesView;
|
|
1966
|
-
const
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
query: z.object({ project_name: z.string() })
|
|
1974
|
-
});
|
|
2205
|
+
const zAddSandboxBody = z.union([
|
|
2206
|
+
zCloneSandboxRequest,
|
|
2207
|
+
zCreateFromSnapshotRequestWritable,
|
|
2208
|
+
zCreateNewSandboxRequestWritable
|
|
2209
|
+
]);
|
|
2210
|
+
const zAddSandboxPath = z.object({ workspace_domain: z.string() });
|
|
2211
|
+
const zAddSandboxQuery = z.object({ project_name: z.string() });
|
|
1975
2212
|
const zAddSandboxResponse = zSandboxResponse;
|
|
1976
|
-
const
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
workspace_domain: z.string(),
|
|
1980
|
-
id: z.string()
|
|
1981
|
-
}),
|
|
1982
|
-
query: z.optional(z.never())
|
|
2213
|
+
const zDeleteSandboxPath = z.object({
|
|
2214
|
+
workspace_domain: z.string(),
|
|
2215
|
+
id: z.string()
|
|
1983
2216
|
});
|
|
1984
2217
|
/**
|
|
1985
2218
|
* Sandbox deleted successfully
|
|
1986
2219
|
*/
|
|
1987
2220
|
const zDeleteSandboxResponse = z.void();
|
|
1988
|
-
const
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
workspace_domain: z.string(),
|
|
1992
|
-
id: z.string()
|
|
1993
|
-
}),
|
|
1994
|
-
query: z.optional(z.never())
|
|
2221
|
+
const zGetSandboxPath = z.object({
|
|
2222
|
+
workspace_domain: z.string(),
|
|
2223
|
+
id: z.string()
|
|
1995
2224
|
});
|
|
1996
2225
|
const zGetSandboxResponse = zSandboxResponse;
|
|
1997
|
-
const
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
});
|
|
2013
|
-
const
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2226
|
+
const zUpdateSandboxPath = z.object({
|
|
2227
|
+
workspace_domain: z.string(),
|
|
2228
|
+
id: z.string()
|
|
2229
|
+
});
|
|
2230
|
+
const zGetSandboxAppLogsByIdPath = z.object({
|
|
2231
|
+
workspace_domain: z.string(),
|
|
2232
|
+
sandbox_id: z.string(),
|
|
2233
|
+
app_id: z.string()
|
|
2234
|
+
});
|
|
2235
|
+
const zGetSandboxAppLogsByIdQuery = z.object({ cursor: z.string().optional() });
|
|
2236
|
+
const zGetSandboxAppLogsByIdResponse = zSandboxAppLogsView;
|
|
2237
|
+
const zStartSandboxAppPath = z.object({
|
|
2238
|
+
workspace_domain: z.string(),
|
|
2239
|
+
sandbox_id: z.string(),
|
|
2240
|
+
app_id: z.string()
|
|
2241
|
+
});
|
|
2242
|
+
const zStartSandboxAppResponse = zSandboxResponse;
|
|
2243
|
+
const zStopSandboxAppPath = z.object({
|
|
2244
|
+
workspace_domain: z.string(),
|
|
2245
|
+
sandbox_id: z.string(),
|
|
2246
|
+
app_id: z.string()
|
|
2247
|
+
});
|
|
2248
|
+
const zStopSandboxAppResponse = zSandboxResponse;
|
|
2249
|
+
const zGetSandboxCommandsPath = z.object({
|
|
2250
|
+
workspace_domain: z.string(),
|
|
2251
|
+
sandbox_id: z.string()
|
|
2252
|
+
});
|
|
2253
|
+
const zExecuteSandboxCommandBody = zExecuteSandboxCommandRequest;
|
|
2254
|
+
const zExecuteSandboxCommandPath = z.object({
|
|
2255
|
+
workspace_domain: z.string(),
|
|
2256
|
+
sandbox_id: z.string()
|
|
2028
2257
|
});
|
|
2029
2258
|
const zExecuteSandboxCommandResponse = zSandboxCommandView;
|
|
2030
|
-
const
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
sandbox_id: z.string(),
|
|
2035
|
-
id: z.string()
|
|
2036
|
-
}),
|
|
2037
|
-
query: z.optional(z.never())
|
|
2259
|
+
const zGetSandboxCommandPath = z.object({
|
|
2260
|
+
workspace_domain: z.string(),
|
|
2261
|
+
sandbox_id: z.string(),
|
|
2262
|
+
id: z.string()
|
|
2038
2263
|
});
|
|
2039
2264
|
const zGetSandboxCommandResponse = zSandboxCommandView;
|
|
2040
|
-
const
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
body: z.optional(z.never()),
|
|
2051
|
-
path: z.object({
|
|
2052
|
-
workspace_domain: z.string(),
|
|
2053
|
-
sandbox_id: z.string(),
|
|
2054
|
-
command_id: z.string()
|
|
2055
|
-
}),
|
|
2056
|
-
query: z.optional(z.never())
|
|
2265
|
+
const zGetSandboxCommandLogsPath = z.object({
|
|
2266
|
+
workspace_domain: z.string(),
|
|
2267
|
+
sandbox_id: z.string(),
|
|
2268
|
+
command_id: z.string()
|
|
2269
|
+
});
|
|
2270
|
+
const zGetSandboxCommandLogsQuery = z.object({ follow: z.boolean().optional() });
|
|
2271
|
+
const zTerminateSandboxCommandPath = z.object({
|
|
2272
|
+
workspace_domain: z.string(),
|
|
2273
|
+
sandbox_id: z.string(),
|
|
2274
|
+
command_id: z.string()
|
|
2057
2275
|
});
|
|
2058
2276
|
const zTerminateSandboxCommandResponse = zSandboxCommandView;
|
|
2059
|
-
const
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
sandbox_id: z.string(),
|
|
2064
|
-
path: z.string().regex(/.*/)
|
|
2065
|
-
}),
|
|
2066
|
-
query: z.optional(z.never())
|
|
2277
|
+
const zDeleteSandboxFilePath = z.object({
|
|
2278
|
+
workspace_domain: z.string(),
|
|
2279
|
+
sandbox_id: z.string(),
|
|
2280
|
+
path: z.string().regex(/.*/)
|
|
2067
2281
|
});
|
|
2068
2282
|
/**
|
|
2069
2283
|
* File or directory deleted successfully
|
|
2070
2284
|
*/
|
|
2071
2285
|
const zDeleteSandboxFileResponse = z.void();
|
|
2072
|
-
const
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
sandbox_id: z.string(),
|
|
2077
|
-
path: z.string().regex(/.*/)
|
|
2078
|
-
}),
|
|
2079
|
-
query: z.optional(z.never())
|
|
2286
|
+
const zGetSandboxContentPath = z.object({
|
|
2287
|
+
workspace_domain: z.string(),
|
|
2288
|
+
sandbox_id: z.string(),
|
|
2289
|
+
path: z.string().regex(/.*/)
|
|
2080
2290
|
});
|
|
2081
2291
|
/**
|
|
2082
2292
|
* Content retrieved successfully
|
|
2083
2293
|
*/
|
|
2084
2294
|
const zGetSandboxContentResponse = zSandboxContentView;
|
|
2085
|
-
const
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
sandbox_id: z.string(),
|
|
2090
|
-
path: z.string().regex(/.*/)
|
|
2091
|
-
}),
|
|
2092
|
-
query: z.optional(z.never())
|
|
2295
|
+
const zCreateSandboxDirectoryPath = z.object({
|
|
2296
|
+
workspace_domain: z.string(),
|
|
2297
|
+
sandbox_id: z.string(),
|
|
2298
|
+
path: z.string().regex(/.*/)
|
|
2093
2299
|
});
|
|
2094
2300
|
/**
|
|
2095
2301
|
* Directory created successfully
|
|
2096
2302
|
*/
|
|
2097
2303
|
const zCreateSandboxDirectoryResponse = zSandboxContentItem;
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2304
|
+
/**
|
|
2305
|
+
* File to upload
|
|
2306
|
+
*/
|
|
2307
|
+
const zUploadSandboxFileBody = z.string();
|
|
2308
|
+
const zUploadSandboxFilePath = z.object({
|
|
2309
|
+
workspace_domain: z.string(),
|
|
2310
|
+
sandbox_id: z.string(),
|
|
2311
|
+
path: z.string().regex(/.*/)
|
|
2106
2312
|
});
|
|
2107
2313
|
/**
|
|
2108
2314
|
* File uploaded successfully
|
|
2109
2315
|
*/
|
|
2110
2316
|
const zUploadSandboxFileResponse = zSandboxContentItem;
|
|
2111
|
-
const
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
sandbox_id: z.string(),
|
|
2116
|
-
path: z.string().regex(/.*/)
|
|
2117
|
-
}),
|
|
2118
|
-
query: z.optional(z.never())
|
|
2317
|
+
const zDownloadSandboxContentPath = z.object({
|
|
2318
|
+
workspace_domain: z.string(),
|
|
2319
|
+
sandbox_id: z.string(),
|
|
2320
|
+
path: z.string().regex(/.*/)
|
|
2119
2321
|
});
|
|
2120
2322
|
/**
|
|
2121
2323
|
* File download
|
|
2122
2324
|
*/
|
|
2123
2325
|
const zDownloadSandboxContentResponse = z.string();
|
|
2124
|
-
const
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
workspace_domain: z.string(),
|
|
2128
|
-
sandbox_id: z.string()
|
|
2129
|
-
}),
|
|
2130
|
-
query: z.optional(z.never())
|
|
2326
|
+
const zRestartSandboxPath = z.object({
|
|
2327
|
+
workspace_domain: z.string(),
|
|
2328
|
+
sandbox_id: z.string()
|
|
2131
2329
|
});
|
|
2132
2330
|
const zRestartSandboxResponse = zSandboxResponse;
|
|
2133
|
-
const
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
});
|
|
2141
|
-
const
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
sandbox_id: z.string()
|
|
2146
|
-
}),
|
|
2147
|
-
query: z.optional(z.never())
|
|
2148
|
-
});
|
|
2149
|
-
const zDeleteSandboxSnapshotData = z.object({
|
|
2150
|
-
body: z.optional(z.never()),
|
|
2151
|
-
path: z.object({
|
|
2152
|
-
workspace_domain: z.string(),
|
|
2153
|
-
sandbox_id: z.string(),
|
|
2154
|
-
id: z.string()
|
|
2155
|
-
}),
|
|
2156
|
-
query: z.optional(z.never())
|
|
2331
|
+
const zGetSandboxSnapshotsPath = z.object({
|
|
2332
|
+
workspace_domain: z.string(),
|
|
2333
|
+
sandbox_id: z.string()
|
|
2334
|
+
});
|
|
2335
|
+
const zAddSandboxSnapshotPath = z.object({
|
|
2336
|
+
workspace_domain: z.string(),
|
|
2337
|
+
sandbox_id: z.string()
|
|
2338
|
+
});
|
|
2339
|
+
const zDeleteSandboxSnapshotPath = z.object({
|
|
2340
|
+
workspace_domain: z.string(),
|
|
2341
|
+
sandbox_id: z.string(),
|
|
2342
|
+
id: z.string()
|
|
2157
2343
|
});
|
|
2158
2344
|
/**
|
|
2159
2345
|
* Sandbox snapshot deleted successfully
|
|
2160
2346
|
*/
|
|
2161
2347
|
const zDeleteSandboxSnapshotResponse = z.void();
|
|
2162
|
-
const
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
});
|
|
2171
|
-
const zStartSandboxData = z.object({
|
|
2172
|
-
body: z.optional(z.never()),
|
|
2173
|
-
path: z.object({
|
|
2174
|
-
workspace_domain: z.string(),
|
|
2175
|
-
sandbox_id: z.string()
|
|
2176
|
-
}),
|
|
2177
|
-
query: z.optional(z.never())
|
|
2348
|
+
const zGetSandboxSnapshotPath = z.object({
|
|
2349
|
+
workspace_domain: z.string(),
|
|
2350
|
+
sandbox_id: z.string(),
|
|
2351
|
+
id: z.string()
|
|
2352
|
+
});
|
|
2353
|
+
const zStartSandboxPath = z.object({
|
|
2354
|
+
workspace_domain: z.string(),
|
|
2355
|
+
sandbox_id: z.string()
|
|
2178
2356
|
});
|
|
2179
2357
|
const zStartSandboxResponse = zSandboxResponse;
|
|
2180
|
-
const
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
workspace_domain: z.string(),
|
|
2184
|
-
sandbox_id: z.string()
|
|
2185
|
-
}),
|
|
2186
|
-
query: z.optional(z.never())
|
|
2358
|
+
const zStopSandboxPath = z.object({
|
|
2359
|
+
workspace_domain: z.string(),
|
|
2360
|
+
sandbox_id: z.string()
|
|
2187
2361
|
});
|
|
2188
2362
|
const zStopSandboxResponse = zSandboxResponse;
|
|
2189
|
-
const
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
});
|
|
2197
|
-
const
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
}),
|
|
2203
|
-
query: z.optional(z.never())
|
|
2204
|
-
});
|
|
2205
|
-
const zGetProjectSnapshotsData = z.object({
|
|
2206
|
-
body: z.optional(z.never()),
|
|
2207
|
-
path: z.object({ workspace_domain: z.string() }),
|
|
2208
|
-
query: z.object({ project_name: z.string() })
|
|
2209
|
-
});
|
|
2210
|
-
const zDeleteSnapshotData = z.object({
|
|
2211
|
-
body: z.optional(z.never()),
|
|
2212
|
-
path: z.object({
|
|
2213
|
-
workspace_domain: z.string(),
|
|
2214
|
-
id: z.string()
|
|
2215
|
-
}),
|
|
2216
|
-
query: z.optional(z.never())
|
|
2363
|
+
const zGetSandboxYamlPath = z.object({
|
|
2364
|
+
workspace_domain: z.string(),
|
|
2365
|
+
sandbox_id: z.string()
|
|
2366
|
+
});
|
|
2367
|
+
const zUpdateSandboxByYamlPath = z.object({
|
|
2368
|
+
workspace_domain: z.string(),
|
|
2369
|
+
sandbox_id: z.string()
|
|
2370
|
+
});
|
|
2371
|
+
const zGetProjectSnapshotsPath = z.object({ workspace_domain: z.string() });
|
|
2372
|
+
const zGetProjectSnapshotsQuery = z.object({ project_name: z.string() });
|
|
2373
|
+
const zDeleteSnapshotPath = z.object({
|
|
2374
|
+
workspace_domain: z.string(),
|
|
2375
|
+
id: z.string()
|
|
2217
2376
|
});
|
|
2218
2377
|
/**
|
|
2219
2378
|
* Sandbox snapshot deleted successfully
|
|
2220
2379
|
*/
|
|
2221
2380
|
const zDeleteSnapshotResponse = z.void();
|
|
2222
|
-
const
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
});
|
|
2227
|
-
const
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
});
|
|
2232
|
-
const
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
query: z.optional(z.never())
|
|
2381
|
+
const zAddSandboxByYamlPath = z.object({ workspace_domain: z.string() });
|
|
2382
|
+
const zAddSandboxByYamlQuery = z.object({ project_name: z.string() });
|
|
2383
|
+
const zGetSsoPath = z.object({ workspace_domain: z.string() });
|
|
2384
|
+
const zUpdateSsoPath = z.object({ workspace_domain: z.string() });
|
|
2385
|
+
const zGetIntegrationsPath = z.object({ workspace_domain: z.string() });
|
|
2386
|
+
const zAddIntegrationPath = z.object({ workspace_domain: z.string() });
|
|
2387
|
+
const zGetIntegrationPath = z.object({
|
|
2388
|
+
workspace_domain: z.string(),
|
|
2389
|
+
hash_id: z.string()
|
|
2390
|
+
});
|
|
2391
|
+
const zUpdateIntegrationPath = z.object({
|
|
2392
|
+
workspace_domain: z.string(),
|
|
2393
|
+
hash_id: z.string()
|
|
2236
2394
|
});
|
|
2237
2395
|
|
|
2238
2396
|
//#endregion
|
|
2239
2397
|
//#region package.json
|
|
2240
2398
|
var name = "@buddy-works/sandbox-sdk";
|
|
2241
|
-
var version = "0.1.
|
|
2399
|
+
var version = "0.1.6-rc.0";
|
|
2242
2400
|
|
|
2243
2401
|
//#endregion
|
|
2244
2402
|
//#region src/utils/environment.ts
|
|
@@ -2577,43 +2735,41 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2577
2735
|
if (!result.success) throw new HttpError(`Response validation failed:\n${prettifyError(result.error)}`, response.status, response);
|
|
2578
2736
|
return result.data;
|
|
2579
2737
|
}
|
|
2580
|
-
/** Check if a schema expects query parameters (not ZodNever) */
|
|
2581
|
-
#schemaExpectsQuery(schema) {
|
|
2582
|
-
const querySchema = schema.shape.query;
|
|
2583
|
-
if (querySchema instanceof z.ZodOptional) {
|
|
2584
|
-
if (querySchema._def.innerType instanceof z.ZodNever) return false;
|
|
2585
|
-
}
|
|
2586
|
-
return true;
|
|
2587
|
-
}
|
|
2588
2738
|
/** Execute an HTTP request with input/output validation */
|
|
2589
|
-
async #requestWithValidation({ method, url, data,
|
|
2590
|
-
const
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2739
|
+
async #requestWithValidation({ method, url, data, bodySchema, pathSchema, querySchema, responseSchema, skipRetry }) {
|
|
2740
|
+
const pathResult = await pathSchema.safeParseAsync({
|
|
2741
|
+
workspace_domain: this.workspace,
|
|
2742
|
+
...data.path ?? {}
|
|
2743
|
+
});
|
|
2744
|
+
if (!pathResult.success) throw pathResult.error;
|
|
2745
|
+
const validatedPath = pathResult.data;
|
|
2746
|
+
let validatedQuery;
|
|
2747
|
+
if (querySchema) {
|
|
2748
|
+
const queryResult = await querySchema.safeParseAsync({
|
|
2598
2749
|
project_name: this.project_name,
|
|
2599
2750
|
...data.query ?? {}
|
|
2600
|
-
}
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2751
|
+
});
|
|
2752
|
+
if (!queryResult.success) throw queryResult.error;
|
|
2753
|
+
validatedQuery = queryResult.data;
|
|
2754
|
+
}
|
|
2755
|
+
let validatedBody = data.body;
|
|
2756
|
+
if (bodySchema && data.body !== void 0) {
|
|
2757
|
+
const bodyResult = await bodySchema.safeParseAsync(data.body);
|
|
2758
|
+
if (!bodyResult.success) throw bodyResult.error;
|
|
2759
|
+
validatedBody = bodyResult.data;
|
|
2760
|
+
}
|
|
2605
2761
|
const parameterizedUrl = this.#buildUrl({
|
|
2606
2762
|
url,
|
|
2607
|
-
path:
|
|
2763
|
+
path: validatedPath
|
|
2608
2764
|
});
|
|
2609
2765
|
const requestConfig = {
|
|
2610
|
-
queryParams:
|
|
2766
|
+
queryParams: validatedQuery,
|
|
2611
2767
|
skipRetry
|
|
2612
2768
|
};
|
|
2613
2769
|
let request;
|
|
2614
2770
|
switch (method) {
|
|
2615
2771
|
case "POST":
|
|
2616
|
-
request = this.post(parameterizedUrl,
|
|
2772
|
+
request = this.post(parameterizedUrl, validatedBody ?? {}, requestConfig);
|
|
2617
2773
|
break;
|
|
2618
2774
|
case "GET":
|
|
2619
2775
|
request = this.get(parameterizedUrl, requestConfig);
|
|
@@ -2631,7 +2787,9 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2631
2787
|
method: "POST",
|
|
2632
2788
|
data,
|
|
2633
2789
|
url: "/workspaces/{workspace_domain}/sandboxes",
|
|
2634
|
-
|
|
2790
|
+
bodySchema: zAddSandboxBody,
|
|
2791
|
+
pathSchema: zAddSandboxPath,
|
|
2792
|
+
querySchema: zAddSandboxQuery,
|
|
2635
2793
|
responseSchema: zAddSandboxResponse.transform(addSandboxResponseTransformer)
|
|
2636
2794
|
});
|
|
2637
2795
|
}
|
|
@@ -2641,7 +2799,7 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2641
2799
|
method: "GET",
|
|
2642
2800
|
data,
|
|
2643
2801
|
url: "/workspaces/{workspace_domain}/sandboxes/{id}",
|
|
2644
|
-
|
|
2802
|
+
pathSchema: zGetSandboxPath,
|
|
2645
2803
|
responseSchema: zGetSandboxResponse.transform(getSandboxResponseTransformer)
|
|
2646
2804
|
});
|
|
2647
2805
|
}
|
|
@@ -2651,7 +2809,8 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2651
2809
|
method: "GET",
|
|
2652
2810
|
data,
|
|
2653
2811
|
url: "/workspaces/{workspace_domain}/identifiers",
|
|
2654
|
-
|
|
2812
|
+
pathSchema: zGetIdentifiersPath,
|
|
2813
|
+
querySchema: zGetIdentifiersQuery,
|
|
2655
2814
|
responseSchema: zGetIdentifiersResponse
|
|
2656
2815
|
});
|
|
2657
2816
|
}
|
|
@@ -2661,8 +2820,9 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2661
2820
|
method: "POST",
|
|
2662
2821
|
data,
|
|
2663
2822
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/commands",
|
|
2664
|
-
|
|
2665
|
-
|
|
2823
|
+
bodySchema: zExecuteSandboxCommandBody,
|
|
2824
|
+
pathSchema: zExecuteSandboxCommandPath,
|
|
2825
|
+
responseSchema: zExecuteSandboxCommandResponse.transform(executeSandboxCommandResponseTransformer)
|
|
2666
2826
|
});
|
|
2667
2827
|
}
|
|
2668
2828
|
/** Get a specific command execution details */
|
|
@@ -2671,8 +2831,8 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2671
2831
|
method: "GET",
|
|
2672
2832
|
data,
|
|
2673
2833
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/commands/{id}",
|
|
2674
|
-
|
|
2675
|
-
responseSchema: zGetSandboxCommandResponse
|
|
2834
|
+
pathSchema: zGetSandboxCommandPath,
|
|
2835
|
+
responseSchema: zGetSandboxCommandResponse.transform(getSandboxCommandResponseTransformer)
|
|
2676
2836
|
});
|
|
2677
2837
|
}
|
|
2678
2838
|
/** Terminate a running command in a sandbox */
|
|
@@ -2681,8 +2841,8 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2681
2841
|
method: "POST",
|
|
2682
2842
|
data,
|
|
2683
2843
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/commands/{command_id}/terminate",
|
|
2684
|
-
|
|
2685
|
-
responseSchema: zTerminateSandboxCommandResponse
|
|
2844
|
+
pathSchema: zTerminateSandboxCommandPath,
|
|
2845
|
+
responseSchema: zTerminateSandboxCommandResponse.transform(terminateSandboxCommandResponseTransformer)
|
|
2686
2846
|
});
|
|
2687
2847
|
}
|
|
2688
2848
|
/** Delete a sandbox by its ID */
|
|
@@ -2692,7 +2852,7 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2692
2852
|
method: "DELETE",
|
|
2693
2853
|
data,
|
|
2694
2854
|
url: "/workspaces/{workspace_domain}/sandboxes/{id}",
|
|
2695
|
-
|
|
2855
|
+
pathSchema: zDeleteSandboxPath,
|
|
2696
2856
|
responseSchema: zDeleteSandboxResponse,
|
|
2697
2857
|
skipRetry: true
|
|
2698
2858
|
});
|
|
@@ -2707,7 +2867,8 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2707
2867
|
method: "GET",
|
|
2708
2868
|
data,
|
|
2709
2869
|
url: "/workspaces/{workspace_domain}/sandboxes",
|
|
2710
|
-
|
|
2870
|
+
pathSchema: zGetSandboxesPath,
|
|
2871
|
+
querySchema: zGetSandboxesQuery,
|
|
2711
2872
|
responseSchema: zGetSandboxesResponse
|
|
2712
2873
|
});
|
|
2713
2874
|
}
|
|
@@ -2717,7 +2878,7 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2717
2878
|
method: "POST",
|
|
2718
2879
|
data,
|
|
2719
2880
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/start",
|
|
2720
|
-
|
|
2881
|
+
pathSchema: zStartSandboxPath,
|
|
2721
2882
|
responseSchema: zStartSandboxResponse.transform(startSandboxResponseTransformer)
|
|
2722
2883
|
});
|
|
2723
2884
|
}
|
|
@@ -2727,7 +2888,7 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2727
2888
|
method: "POST",
|
|
2728
2889
|
data,
|
|
2729
2890
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/stop",
|
|
2730
|
-
|
|
2891
|
+
pathSchema: zStopSandboxPath,
|
|
2731
2892
|
responseSchema: zStopSandboxResponse.transform(stopSandboxResponseTransformer)
|
|
2732
2893
|
});
|
|
2733
2894
|
}
|
|
@@ -2737,17 +2898,48 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2737
2898
|
method: "POST",
|
|
2738
2899
|
data,
|
|
2739
2900
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/restart",
|
|
2740
|
-
|
|
2901
|
+
pathSchema: zRestartSandboxPath,
|
|
2741
2902
|
responseSchema: zRestartSandboxResponse.transform(restartSandboxResponseTransformer)
|
|
2742
2903
|
});
|
|
2743
2904
|
}
|
|
2905
|
+
/** Start a sandbox app */
|
|
2906
|
+
async startSandboxApp(data) {
|
|
2907
|
+
return this.#requestWithValidation({
|
|
2908
|
+
method: "POST",
|
|
2909
|
+
data,
|
|
2910
|
+
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/apps/{app_id}/start",
|
|
2911
|
+
pathSchema: zStartSandboxAppPath,
|
|
2912
|
+
responseSchema: zStartSandboxAppResponse.transform(startSandboxAppResponseTransformer)
|
|
2913
|
+
});
|
|
2914
|
+
}
|
|
2915
|
+
/** Stop a sandbox app */
|
|
2916
|
+
async stopSandboxApp(data) {
|
|
2917
|
+
return this.#requestWithValidation({
|
|
2918
|
+
method: "POST",
|
|
2919
|
+
data,
|
|
2920
|
+
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/apps/{app_id}/stop",
|
|
2921
|
+
pathSchema: zStopSandboxAppPath,
|
|
2922
|
+
responseSchema: zStopSandboxAppResponse.transform(stopSandboxAppResponseTransformer)
|
|
2923
|
+
});
|
|
2924
|
+
}
|
|
2925
|
+
/** Get logs for a specific sandbox app */
|
|
2926
|
+
async getSandboxAppLogs(data) {
|
|
2927
|
+
return this.#requestWithValidation({
|
|
2928
|
+
method: "GET",
|
|
2929
|
+
data,
|
|
2930
|
+
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/apps/{app_id}/logs",
|
|
2931
|
+
pathSchema: zGetSandboxAppLogsByIdPath,
|
|
2932
|
+
querySchema: zGetSandboxAppLogsByIdQuery,
|
|
2933
|
+
responseSchema: zGetSandboxAppLogsByIdResponse
|
|
2934
|
+
});
|
|
2935
|
+
}
|
|
2744
2936
|
/** Get sandbox content (list files/directories at a path) */
|
|
2745
2937
|
async getSandboxContent(data) {
|
|
2746
2938
|
return this.#requestWithValidation({
|
|
2747
2939
|
method: "GET",
|
|
2748
2940
|
data,
|
|
2749
2941
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/content/{path}",
|
|
2750
|
-
|
|
2942
|
+
pathSchema: zGetSandboxContentPath,
|
|
2751
2943
|
responseSchema: zGetSandboxContentResponse.transform(getSandboxContentResponseTransformer)
|
|
2752
2944
|
});
|
|
2753
2945
|
}
|
|
@@ -2757,7 +2949,7 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2757
2949
|
method: "DELETE",
|
|
2758
2950
|
data,
|
|
2759
2951
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/content/{path}",
|
|
2760
|
-
|
|
2952
|
+
pathSchema: zDeleteSandboxFilePath,
|
|
2761
2953
|
responseSchema: zDeleteSandboxFileResponse
|
|
2762
2954
|
});
|
|
2763
2955
|
}
|
|
@@ -2767,29 +2959,20 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2767
2959
|
method: "POST",
|
|
2768
2960
|
data,
|
|
2769
2961
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/content/{path}",
|
|
2770
|
-
|
|
2962
|
+
pathSchema: zCreateSandboxDirectoryPath,
|
|
2771
2963
|
responseSchema: zCreateSandboxDirectoryResponse.transform(createSandboxDirectoryResponseTransformer)
|
|
2772
2964
|
});
|
|
2773
2965
|
}
|
|
2774
2966
|
/** Upload a file to a sandbox */
|
|
2775
2967
|
async uploadSandboxFile(data) {
|
|
2776
|
-
const
|
|
2777
|
-
|
|
2778
|
-
path
|
|
2779
|
-
workspace_domain: this.workspace,
|
|
2780
|
-
...data.path ?? {}
|
|
2781
|
-
},
|
|
2782
|
-
query: void 0
|
|
2783
|
-
};
|
|
2784
|
-
const validationResult = await zUploadSandboxFileData.safeParseAsync({
|
|
2785
|
-
...fullData,
|
|
2786
|
-
body: void 0
|
|
2968
|
+
const pathResult = await zUploadSandboxFilePath.safeParseAsync({
|
|
2969
|
+
workspace_domain: this.workspace,
|
|
2970
|
+
...data.path
|
|
2787
2971
|
});
|
|
2788
|
-
if (!
|
|
2789
|
-
const validatedData = validationResult.data;
|
|
2972
|
+
if (!pathResult.success) throw pathResult.error;
|
|
2790
2973
|
const parameterizedUrl = this.#buildUrl({
|
|
2791
2974
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/content/upload/{path}",
|
|
2792
|
-
path:
|
|
2975
|
+
path: pathResult.data
|
|
2793
2976
|
});
|
|
2794
2977
|
const url = new URL(parameterizedUrl, this.#apiUrl);
|
|
2795
2978
|
url.searchParams.set("project_name", this.project_name);
|
|
@@ -2819,20 +3002,14 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2819
3002
|
}
|
|
2820
3003
|
/** Download content from a sandbox (file or directory as tar.gz) */
|
|
2821
3004
|
async downloadSandboxContent(data) {
|
|
2822
|
-
const
|
|
2823
|
-
|
|
2824
|
-
path
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
},
|
|
2828
|
-
query: void 0
|
|
2829
|
-
};
|
|
2830
|
-
const validationResult = await zDownloadSandboxContentData.safeParseAsync(fullData);
|
|
2831
|
-
if (!validationResult.success) throw validationResult.error;
|
|
2832
|
-
const validatedData = validationResult.data;
|
|
3005
|
+
const pathResult = await zDownloadSandboxContentPath.safeParseAsync({
|
|
3006
|
+
workspace_domain: this.workspace,
|
|
3007
|
+
...data.path
|
|
3008
|
+
});
|
|
3009
|
+
if (!pathResult.success) throw pathResult.error;
|
|
2833
3010
|
const parameterizedUrl = this.#buildUrl({
|
|
2834
3011
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/download/{path}",
|
|
2835
|
-
path:
|
|
3012
|
+
path: pathResult.data
|
|
2836
3013
|
});
|
|
2837
3014
|
const url = new URL(parameterizedUrl, this.#apiUrl);
|
|
2838
3015
|
const headers = {
|
|
@@ -2865,23 +3042,19 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2865
3042
|
}
|
|
2866
3043
|
/** Stream logs from a specific command execution */
|
|
2867
3044
|
async *streamCommandLogs(data) {
|
|
2868
|
-
const
|
|
2869
|
-
|
|
2870
|
-
path
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
};
|
|
2876
|
-
const validationResult = await zGetSandboxCommandLogsData.safeParseAsync(fullData);
|
|
2877
|
-
if (!validationResult.success) throw validationResult.error;
|
|
2878
|
-
const validatedData = validationResult.data;
|
|
3045
|
+
const pathResult = await zGetSandboxCommandLogsPath.safeParseAsync({
|
|
3046
|
+
workspace_domain: this.workspace,
|
|
3047
|
+
...data.path ?? {}
|
|
3048
|
+
});
|
|
3049
|
+
if (!pathResult.success) throw pathResult.error;
|
|
3050
|
+
const queryResult = await zGetSandboxCommandLogsQuery.safeParseAsync(data.query ?? {});
|
|
3051
|
+
if (!queryResult.success) throw queryResult.error;
|
|
2879
3052
|
const parameterizedUrl = this.#buildUrl({
|
|
2880
3053
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/commands/{command_id}/logs",
|
|
2881
|
-
path:
|
|
3054
|
+
path: pathResult.data
|
|
2882
3055
|
});
|
|
2883
3056
|
const url = new URL(parameterizedUrl, this.#apiUrl);
|
|
2884
|
-
if (
|
|
3057
|
+
if (queryResult.data.follow !== void 0) url.searchParams.set("follow", String(queryResult.data.follow));
|
|
2885
3058
|
const headers = {
|
|
2886
3059
|
Accept: "application/jsonl",
|
|
2887
3060
|
"Content-Type": "application/json",
|
|
@@ -3457,6 +3630,7 @@ var Sandbox = class Sandbox {
|
|
|
3457
3630
|
await this.refresh();
|
|
3458
3631
|
if (this.data.setup_status === "SUCCESS") return;
|
|
3459
3632
|
if (this.data.setup_status === "FAILED") throw new Error(`Sandbox ${sandboxId} setup failed. Status: ${this.data.setup_status}`);
|
|
3633
|
+
if (this.data.setup_status === "STALE") throw new Error(`Sandbox ${sandboxId} setup is stale. The first_boot_commands were changed but not applied. Recreate the sandbox to apply them.`);
|
|
3460
3634
|
await new Promise((resolve) => setTimeout(resolve, pollIntervalMs));
|
|
3461
3635
|
}
|
|
3462
3636
|
});
|
|
@@ -3554,6 +3728,56 @@ var Sandbox = class Sandbox {
|
|
|
3554
3728
|
logger_default.debug(`Sandbox ${sandboxId} has been restarted and is ready. Status: ${this.data.status}, Setup status: ${this.data.setup_status}`);
|
|
3555
3729
|
});
|
|
3556
3730
|
}
|
|
3731
|
+
/**
|
|
3732
|
+
* Start a specific app within the sandbox
|
|
3733
|
+
*
|
|
3734
|
+
* Updates the internal sandbox data with the latest state after starting.
|
|
3735
|
+
* @param appId - The auto-generated ID of the app (from sandbox.data.apps)
|
|
3736
|
+
*/
|
|
3737
|
+
async startApp(appId) {
|
|
3738
|
+
const sandboxId = this.initializedId;
|
|
3739
|
+
return withErrorHandler("Failed to start app", async () => {
|
|
3740
|
+
this.#sandboxData = await this.#client.startSandboxApp({ path: {
|
|
3741
|
+
sandbox_id: sandboxId,
|
|
3742
|
+
app_id: appId
|
|
3743
|
+
} });
|
|
3744
|
+
});
|
|
3745
|
+
}
|
|
3746
|
+
/**
|
|
3747
|
+
* Stop a specific app within the sandbox
|
|
3748
|
+
*
|
|
3749
|
+
* Updates the internal sandbox data with the latest state after stopping.
|
|
3750
|
+
* @param appId - The auto-generated ID of the app (from sandbox.data.apps)
|
|
3751
|
+
*/
|
|
3752
|
+
async stopApp(appId) {
|
|
3753
|
+
const sandboxId = this.initializedId;
|
|
3754
|
+
return withErrorHandler("Failed to stop app", async () => {
|
|
3755
|
+
this.#sandboxData = await this.#client.stopSandboxApp({ path: {
|
|
3756
|
+
sandbox_id: sandboxId,
|
|
3757
|
+
app_id: appId
|
|
3758
|
+
} });
|
|
3759
|
+
});
|
|
3760
|
+
}
|
|
3761
|
+
/**
|
|
3762
|
+
* Get logs for a specific app within the sandbox
|
|
3763
|
+
*
|
|
3764
|
+
* Returns paginated log entries. Pass the returned cursor to fetch the next page.
|
|
3765
|
+
* @param appId - The auto-generated ID of the app (from sandbox.data.apps)
|
|
3766
|
+
* @param cursor - Pagination cursor from a previous response
|
|
3767
|
+
* @returns Log entries and a cursor for the next page
|
|
3768
|
+
*/
|
|
3769
|
+
async getAppLogs(appId, cursor) {
|
|
3770
|
+
const sandboxId = this.initializedId;
|
|
3771
|
+
return withErrorHandler("Failed to get app logs", async () => {
|
|
3772
|
+
return this.#client.getSandboxAppLogs({
|
|
3773
|
+
path: {
|
|
3774
|
+
sandbox_id: sandboxId,
|
|
3775
|
+
app_id: appId
|
|
3776
|
+
},
|
|
3777
|
+
query: { cursor }
|
|
3778
|
+
});
|
|
3779
|
+
});
|
|
3780
|
+
}
|
|
3557
3781
|
constructor(sandboxData, client, constructorKey) {
|
|
3558
3782
|
if (constructorKey !== PRIVATE_CONSTRUCTOR_KEY) throw new Error(`Cannot construct Sandbox directly. ${INITIALIZE_INSTRUCTIONS}`);
|
|
3559
3783
|
this.#sandboxData = sandboxData;
|