@buddy-works/sandbox-sdk 0.1.5 → 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 +22 -0
- package/dist/index.d.mts +134 -36
- package/dist/index.mjs +1636 -1556
- 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";
|
|
@@ -81,34 +82,35 @@ const stopSandboxResponseTransformer = async (data) => {
|
|
|
81
82
|
//#endregion
|
|
82
83
|
//#region src/api/openapi/zod.gen.ts
|
|
83
84
|
const zUpdateWorkspaceMemberRequest = z.object({
|
|
84
|
-
admin: z.
|
|
85
|
-
auto_assign_to_new_projects: z.
|
|
86
|
-
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()
|
|
87
88
|
});
|
|
88
89
|
const zUpdateSsoRequest = z.object({
|
|
89
|
-
type: z.
|
|
90
|
-
sso_provider_type: z.
|
|
90
|
+
type: z.enum(["SAML", "OIDC"]).optional(),
|
|
91
|
+
sso_provider_type: z.enum([
|
|
91
92
|
"OKTA",
|
|
92
93
|
"ONE_LOGIN",
|
|
93
94
|
"GOOGLE",
|
|
94
95
|
"AZURE",
|
|
95
96
|
"AWS",
|
|
96
97
|
"CUSTOM"
|
|
97
|
-
])),
|
|
98
|
-
sso_url: z.
|
|
99
|
-
issuer: z.
|
|
100
|
-
certificate: z.
|
|
101
|
-
signature_method: z.
|
|
102
|
-
digest_method: z.
|
|
103
|
-
client_id: z.
|
|
104
|
-
client_secret: z.
|
|
105
|
-
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()
|
|
106
107
|
});
|
|
107
108
|
const zGroupPermissionView = z.object({
|
|
108
|
-
id: z.
|
|
109
|
-
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([
|
|
110
111
|
"DENIED",
|
|
111
112
|
"READ_ONLY",
|
|
113
|
+
"USE_ONLY",
|
|
112
114
|
"BLIND",
|
|
113
115
|
"RUN_ONLY",
|
|
114
116
|
"READ_WRITE",
|
|
@@ -116,15 +118,15 @@ const zGroupPermissionView = z.object({
|
|
|
116
118
|
"DEFAULT",
|
|
117
119
|
"ALLOWED",
|
|
118
120
|
"STAGE",
|
|
119
|
-
"COMMIT"
|
|
120
|
-
|
|
121
|
-
]))
|
|
121
|
+
"COMMIT"
|
|
122
|
+
]).optional()
|
|
122
123
|
});
|
|
123
124
|
const zUserPermissionView = z.object({
|
|
124
|
-
id: z.
|
|
125
|
-
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([
|
|
126
127
|
"DENIED",
|
|
127
128
|
"READ_ONLY",
|
|
129
|
+
"USE_ONLY",
|
|
128
130
|
"BLIND",
|
|
129
131
|
"RUN_ONLY",
|
|
130
132
|
"READ_WRITE",
|
|
@@ -132,17 +134,17 @@ const zUserPermissionView = z.object({
|
|
|
132
134
|
"DEFAULT",
|
|
133
135
|
"ALLOWED",
|
|
134
136
|
"STAGE",
|
|
135
|
-
"COMMIT"
|
|
136
|
-
|
|
137
|
-
]))
|
|
137
|
+
"COMMIT"
|
|
138
|
+
]).optional()
|
|
138
139
|
});
|
|
139
140
|
/**
|
|
140
141
|
* Permission settings defining who can use this integration
|
|
141
142
|
*/
|
|
142
143
|
const zIntegrationPermissionsView = z.object({
|
|
143
|
-
others: z.
|
|
144
|
+
others: z.enum([
|
|
144
145
|
"DENIED",
|
|
145
146
|
"READ_ONLY",
|
|
147
|
+
"USE_ONLY",
|
|
146
148
|
"BLIND",
|
|
147
149
|
"RUN_ONLY",
|
|
148
150
|
"READ_WRITE",
|
|
@@ -150,14 +152,14 @@ const zIntegrationPermissionsView = z.object({
|
|
|
150
152
|
"DEFAULT",
|
|
151
153
|
"ALLOWED",
|
|
152
154
|
"STAGE",
|
|
153
|
-
"COMMIT"
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
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([
|
|
159
160
|
"DENIED",
|
|
160
161
|
"READ_ONLY",
|
|
162
|
+
"USE_ONLY",
|
|
161
163
|
"BLIND",
|
|
162
164
|
"RUN_ONLY",
|
|
163
165
|
"READ_WRITE",
|
|
@@ -165,52 +167,51 @@ const zIntegrationPermissionsView = z.object({
|
|
|
165
167
|
"DEFAULT",
|
|
166
168
|
"ALLOWED",
|
|
167
169
|
"STAGE",
|
|
168
|
-
"COMMIT"
|
|
169
|
-
|
|
170
|
-
]))
|
|
170
|
+
"COMMIT"
|
|
171
|
+
]).optional()
|
|
171
172
|
});
|
|
172
173
|
/**
|
|
173
174
|
* Pipeline reference
|
|
174
175
|
*/
|
|
175
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" }) });
|
|
176
177
|
const zRoleAssumptionView = z.object({
|
|
177
|
-
arn: z.
|
|
178
|
-
external_id: z.
|
|
179
|
-
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()
|
|
180
181
|
});
|
|
181
182
|
const zUpdateIntegrationRequest = z.object({
|
|
182
|
-
identifier: z.
|
|
183
|
+
identifier: z.string().optional(),
|
|
183
184
|
name: z.string(),
|
|
184
|
-
token: z.
|
|
185
|
-
email: z.
|
|
186
|
-
api_key: z.
|
|
187
|
-
access_key: z.
|
|
188
|
-
secret_key: z.
|
|
189
|
-
partner_token: z.
|
|
190
|
-
shop: z.
|
|
191
|
-
url: z.
|
|
192
|
-
chat_id: z.
|
|
193
|
-
git_hub_user_id: z.
|
|
194
|
-
git_hub_user_name: z.
|
|
195
|
-
username: z.
|
|
196
|
-
password: z.
|
|
197
|
-
app_id: z.
|
|
198
|
-
tenant_id: z.
|
|
199
|
-
client_id: z.
|
|
200
|
-
client_token: z.
|
|
201
|
-
server_id: z.
|
|
202
|
-
server_token: z.
|
|
203
|
-
key_id: z.
|
|
204
|
-
application_key: z.
|
|
205
|
-
host_url: z.
|
|
206
|
-
webhook_address: z.
|
|
207
|
-
slack_user_id: z.
|
|
208
|
-
region: z.
|
|
209
|
-
role_assumptions: z.
|
|
210
|
-
all_pipelines_allowed: z.
|
|
211
|
-
allowed_pipelines: z.
|
|
212
|
-
permissions:
|
|
213
|
-
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([
|
|
214
215
|
"OAUTH",
|
|
215
216
|
"TOKEN",
|
|
216
217
|
"API_KEY",
|
|
@@ -221,53 +222,54 @@ const zUpdateIntegrationRequest = z.object({
|
|
|
221
222
|
"OIDC",
|
|
222
223
|
"TRUSTED",
|
|
223
224
|
"APP_RW"
|
|
224
|
-
])),
|
|
225
|
-
target_url: z.
|
|
226
|
-
refresh_token: z.
|
|
227
|
-
audience: z.
|
|
228
|
-
config: z.
|
|
229
|
-
google_project: z.
|
|
230
|
-
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()
|
|
231
233
|
});
|
|
232
234
|
const zShortWorkspaceView = z.object({
|
|
233
|
-
url: z.
|
|
234
|
-
html_url: z.
|
|
235
|
-
id: z.
|
|
236
|
-
name: z.
|
|
237
|
-
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()
|
|
238
240
|
});
|
|
239
241
|
const zWorkspacesView = z.object({
|
|
240
|
-
url: z.
|
|
241
|
-
html_url: z.
|
|
242
|
-
workspaces: z.
|
|
242
|
+
url: z.string().readonly().optional(),
|
|
243
|
+
html_url: z.string().readonly().optional(),
|
|
244
|
+
workspaces: z.array(zShortWorkspaceView).optional()
|
|
243
245
|
});
|
|
244
246
|
const zWorkspaceMemberView = z.object({
|
|
245
|
-
url: z.
|
|
246
|
-
html_url: z.
|
|
247
|
-
id: z.
|
|
248
|
-
name: z.
|
|
249
|
-
avatar_url: z.
|
|
250
|
-
email: z.
|
|
251
|
-
admin: z.
|
|
252
|
-
workspace_owner: z.
|
|
253
|
-
auto_assign_to_new_projects: z.
|
|
254
|
-
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()
|
|
255
257
|
});
|
|
256
258
|
const zWorkspaceMembersView = z.object({
|
|
257
|
-
url: z.
|
|
258
|
-
html_url: z.
|
|
259
|
-
members: z.
|
|
259
|
+
url: z.string().readonly().optional(),
|
|
260
|
+
html_url: z.string().readonly().optional(),
|
|
261
|
+
members: z.array(zWorkspaceMemberView).optional()
|
|
260
262
|
});
|
|
261
263
|
const zWorkspaceView = z.object({
|
|
262
|
-
url: z.
|
|
263
|
-
html_url: z.
|
|
264
|
-
id: z.
|
|
265
|
-
name: z.
|
|
266
|
-
domain: z.
|
|
267
|
-
owner_id: z.
|
|
268
|
-
frozen: z.
|
|
269
|
-
create_date: z.
|
|
270
|
-
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([
|
|
271
273
|
"DEFAULT",
|
|
272
274
|
"NANO",
|
|
273
275
|
"SMALL",
|
|
@@ -276,314 +278,299 @@ const zWorkspaceView = z.object({
|
|
|
276
278
|
"XLARGE",
|
|
277
279
|
"CUSTOM",
|
|
278
280
|
"X2LARGE"
|
|
279
|
-
])),
|
|
280
|
-
sso_enabled: z.
|
|
281
|
-
public_pipelines_disabled: z.
|
|
281
|
+
]).optional(),
|
|
282
|
+
sso_enabled: z.boolean().optional(),
|
|
283
|
+
public_pipelines_disabled: z.boolean().optional()
|
|
282
284
|
});
|
|
283
285
|
const zSsoView = z.object({
|
|
284
|
-
url: z.
|
|
285
|
-
html_url: z.
|
|
286
|
-
type: z.
|
|
287
|
-
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([
|
|
288
290
|
"OKTA",
|
|
289
291
|
"ONE_LOGIN",
|
|
290
292
|
"GOOGLE",
|
|
291
293
|
"AZURE",
|
|
292
294
|
"AWS",
|
|
293
295
|
"CUSTOM"
|
|
294
|
-
])),
|
|
295
|
-
sso_url: z.
|
|
296
|
-
issuer: z.
|
|
297
|
-
certificate: z.
|
|
298
|
-
signature_method: z.
|
|
299
|
-
digest_method: z.
|
|
300
|
-
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()
|
|
301
303
|
});
|
|
302
304
|
/**
|
|
303
305
|
* YAML pipeline definition configuration
|
|
304
306
|
*/
|
|
305
307
|
const zYamlDefinitionView = z.object({
|
|
306
|
-
path: z.
|
|
307
|
-
branch: z.
|
|
308
|
-
project: z.
|
|
308
|
+
path: z.string().optional(),
|
|
309
|
+
branch: z.string().optional(),
|
|
310
|
+
project: z.string().optional()
|
|
309
311
|
});
|
|
310
312
|
/**
|
|
311
313
|
* The parameters passed to the remote pipeline definition
|
|
312
314
|
*/
|
|
313
315
|
const zPipelinePropertyView = z.object({
|
|
314
|
-
key: z.
|
|
315
|
-
value: z.
|
|
316
|
+
key: z.string().optional(),
|
|
317
|
+
value: z.string().optional()
|
|
316
318
|
});
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
]))
|
|
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()
|
|
325
326
|
});
|
|
326
327
|
/**
|
|
327
|
-
*
|
|
328
|
+
* MongoDB authentication credentials
|
|
328
329
|
*/
|
|
329
|
-
const
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
"DELETE_REF",
|
|
334
|
-
"PULL_REQUEST",
|
|
335
|
-
"SCHEDULE",
|
|
336
|
-
"PUBLISH_PACKAGE_VERSION",
|
|
337
|
-
"DELETE_PACKAGE_VERSION",
|
|
338
|
-
"WEBHOOK",
|
|
339
|
-
"EMAIL",
|
|
340
|
-
"CREATE_PACKAGE_VERSION"
|
|
341
|
-
])),
|
|
342
|
-
refs: z.optional(z.array(z.string())),
|
|
343
|
-
events: z.optional(z.array(z.string())),
|
|
344
|
-
branches: z.optional(z.array(z.string())),
|
|
345
|
-
packages: z.optional(z.array(zPipelinePkgContextView)),
|
|
346
|
-
start_date: z.optional(z.iso.datetime()),
|
|
347
|
-
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" })),
|
|
348
|
-
cron: z.optional(z.string()),
|
|
349
|
-
timezone: z.optional(z.string()),
|
|
350
|
-
totp: z.optional(z.boolean()),
|
|
351
|
-
prefix: z.optional(z.string()),
|
|
352
|
-
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()
|
|
353
334
|
});
|
|
354
335
|
/**
|
|
355
|
-
*
|
|
336
|
+
* PostgreSQL authentication credentials
|
|
356
337
|
*/
|
|
357
|
-
const
|
|
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
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
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",
|
|
413
428
|
"DEFAULT",
|
|
414
|
-
"
|
|
415
|
-
"
|
|
416
|
-
"
|
|
417
|
-
|
|
418
|
-
"XLARGE",
|
|
419
|
-
"CUSTOM",
|
|
420
|
-
"X2LARGE"
|
|
421
|
-
])),
|
|
422
|
-
remote_path: z.optional(z.string()),
|
|
423
|
-
remote_ref: z.optional(z.string()),
|
|
424
|
-
remote_project_name: z.optional(z.string()),
|
|
425
|
-
remote_parameters: z.optional(z.array(zPipelinePropertyView)),
|
|
426
|
-
git_config: z.optional(zYamlDefinitionView),
|
|
427
|
-
tags: z.optional(z.array(z.string())),
|
|
428
|
-
git_changeset_base: z.optional(z.enum([
|
|
429
|
-
"LATEST_RUN",
|
|
430
|
-
"LATEST_RUN_MATCHING_REF",
|
|
431
|
-
"PULL_REQUEST"
|
|
432
|
-
])),
|
|
433
|
-
filesystem_changeset_base: z.optional(z.enum(["DATE_MODIFIED", "CONTENTS"])),
|
|
434
|
-
cpu: z.optional(z.enum([
|
|
435
|
-
"X64",
|
|
436
|
-
"ARM",
|
|
437
|
-
"X86"
|
|
438
|
-
])),
|
|
439
|
-
description_required: z.optional(z.boolean()),
|
|
440
|
-
folder: z.optional(z.string())
|
|
429
|
+
"ALLOWED",
|
|
430
|
+
"STAGE",
|
|
431
|
+
"COMMIT"
|
|
432
|
+
]).optional()
|
|
441
433
|
});
|
|
442
434
|
/**
|
|
443
|
-
*
|
|
435
|
+
* List of specific pipelines allowed to use this target
|
|
444
436
|
*/
|
|
445
|
-
const
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
"
|
|
453
|
-
"
|
|
454
|
-
"
|
|
455
|
-
"
|
|
456
|
-
"SLACK",
|
|
457
|
-
"MODULUS",
|
|
458
|
-
"HEROKU",
|
|
459
|
-
"AMAZON",
|
|
460
|
-
"GIT_LAB",
|
|
461
|
-
"SHOPIFY",
|
|
462
|
-
"GIT_HUB_ENTERPRISE",
|
|
463
|
-
"GIT_LAB_ENTERPRISE",
|
|
464
|
-
"PUSHOVER",
|
|
465
|
-
"PUSHBULLET",
|
|
466
|
-
"RACKSPACE",
|
|
467
|
-
"CUSTOM",
|
|
468
|
-
"CLOUDFLARE",
|
|
469
|
-
"NEW_RELIC",
|
|
470
|
-
"SENTRY",
|
|
471
|
-
"ROLLBAR",
|
|
472
|
-
"DATADOG",
|
|
473
|
-
"DO_SPACES",
|
|
474
|
-
"HONEYBADGER",
|
|
475
|
-
"VULTR",
|
|
476
|
-
"SENTRY_ENTERPRISE",
|
|
477
|
-
"LOGGLY",
|
|
478
|
-
"HIP_CHAT",
|
|
479
|
-
"FIREBASE",
|
|
480
|
-
"TELEGRAM",
|
|
481
|
-
"AZURE",
|
|
482
|
-
"UPCLOUD",
|
|
483
|
-
"GHOST_INSPECTOR",
|
|
484
|
-
"NETLIFY",
|
|
485
|
-
"AZURE_CLOUD",
|
|
486
|
-
"MICROSOFT_TEAMS",
|
|
487
|
-
"GOOGLE_SERVICE_ACCOUNT",
|
|
488
|
-
"GOOGLE_PLAY_STORE",
|
|
489
|
-
"DOCKER_HUB",
|
|
490
|
-
"APP_STORE",
|
|
491
|
-
"GIT_HUB_APP",
|
|
492
|
-
"GIT_HUB_APP_ENTERPRISE",
|
|
493
|
-
"GIT_HUB_API",
|
|
494
|
-
"ATOP",
|
|
495
|
-
"SNYK",
|
|
496
|
-
"STACK_HAWK",
|
|
497
|
-
"BLACKFIRE",
|
|
498
|
-
"BACKBLAZE",
|
|
499
|
-
"ONE_LOGIN",
|
|
500
|
-
"OKTA",
|
|
501
|
-
"CONTENTFUL",
|
|
502
|
-
"JIRA"
|
|
503
|
-
])),
|
|
504
|
-
auth_type: z.optional(z.enum([
|
|
505
|
-
"OAUTH",
|
|
506
|
-
"TOKEN",
|
|
507
|
-
"API_KEY",
|
|
508
|
-
"APP",
|
|
509
|
-
"APP_SPRYKER",
|
|
510
|
-
"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",
|
|
511
448
|
"DEFAULT",
|
|
512
|
-
"
|
|
513
|
-
"
|
|
514
|
-
"
|
|
515
|
-
]))
|
|
516
|
-
|
|
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",
|
|
517
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([
|
|
518
493
|
"PROJECT",
|
|
519
|
-
"
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
app_id: z.optional(z.string()),
|
|
523
|
-
google_project: z.optional(z.string()),
|
|
524
|
-
host_url: z.optional(z.string()),
|
|
525
|
-
webhook_address: z.optional(z.string()),
|
|
526
|
-
audience: z.optional(z.string()),
|
|
527
|
-
atop_url: z.optional(z.string()),
|
|
528
|
-
permissions: z.optional(zIntegrationPermissionsView),
|
|
529
|
-
all_pipelines_allowed: z.optional(z.boolean()),
|
|
530
|
-
allowed_pipelines: z.optional(z.array(zShortPipelineView))
|
|
494
|
+
"WORKSPACE",
|
|
495
|
+
"ANY"
|
|
496
|
+
]).optional()
|
|
531
497
|
});
|
|
532
|
-
const
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
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()
|
|
536
518
|
});
|
|
537
519
|
const zIdsView = z.object({
|
|
538
|
-
url: z.
|
|
539
|
-
html_url: z.
|
|
540
|
-
domain: z.
|
|
541
|
-
project_identifier: z.
|
|
542
|
-
pipeline_id: z.
|
|
543
|
-
environment_id: z.
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
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()
|
|
547
534
|
});
|
|
548
535
|
const zAddWorkspaceMemberRequest = z.object({
|
|
549
|
-
admin: z.
|
|
550
|
-
auto_assign_to_new_projects: z.
|
|
551
|
-
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(),
|
|
552
539
|
email: z.string()
|
|
553
540
|
});
|
|
554
541
|
const zAddIntegrationRequest = z.object({
|
|
555
|
-
identifier: z.
|
|
542
|
+
identifier: z.string().optional(),
|
|
556
543
|
name: z.string(),
|
|
557
|
-
token: z.
|
|
558
|
-
email: z.
|
|
559
|
-
api_key: z.
|
|
560
|
-
access_key: z.
|
|
561
|
-
secret_key: z.
|
|
562
|
-
partner_token: z.
|
|
563
|
-
shop: z.
|
|
564
|
-
url: z.
|
|
565
|
-
chat_id: z.
|
|
566
|
-
git_hub_user_id: z.
|
|
567
|
-
git_hub_user_name: z.
|
|
568
|
-
username: z.
|
|
569
|
-
password: z.
|
|
570
|
-
app_id: z.
|
|
571
|
-
tenant_id: z.
|
|
572
|
-
client_id: z.
|
|
573
|
-
client_token: z.
|
|
574
|
-
server_id: z.
|
|
575
|
-
server_token: z.
|
|
576
|
-
key_id: z.
|
|
577
|
-
application_key: z.
|
|
578
|
-
host_url: z.
|
|
579
|
-
webhook_address: z.
|
|
580
|
-
slack_user_id: z.
|
|
581
|
-
region: z.
|
|
582
|
-
role_assumptions: z.
|
|
583
|
-
all_pipelines_allowed: z.
|
|
584
|
-
allowed_pipelines: z.
|
|
585
|
-
permissions:
|
|
586
|
-
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([
|
|
587
574
|
"OAUTH",
|
|
588
575
|
"TOKEN",
|
|
589
576
|
"API_KEY",
|
|
@@ -594,13 +581,14 @@ const zAddIntegrationRequest = z.object({
|
|
|
594
581
|
"OIDC",
|
|
595
582
|
"TRUSTED",
|
|
596
583
|
"APP_RW"
|
|
597
|
-
])),
|
|
598
|
-
target_url: z.
|
|
599
|
-
refresh_token: z.
|
|
600
|
-
audience: z.
|
|
601
|
-
config: z.
|
|
602
|
-
google_project: z.
|
|
603
|
-
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(),
|
|
604
592
|
type: z.enum([
|
|
605
593
|
"GIT_HUB",
|
|
606
594
|
"BITBUCKET",
|
|
@@ -652,48 +640,50 @@ const zAddIntegrationRequest = z.object({
|
|
|
652
640
|
"ONE_LOGIN",
|
|
653
641
|
"OKTA",
|
|
654
642
|
"CONTENTFUL",
|
|
655
|
-
"JIRA"
|
|
643
|
+
"JIRA",
|
|
644
|
+
"NPM_REGISTRY",
|
|
645
|
+
"ANTHROPIC"
|
|
656
646
|
]),
|
|
657
647
|
scope: z.enum([
|
|
658
648
|
"WORKSPACE",
|
|
659
649
|
"PROJECT",
|
|
660
650
|
"ENVIRONMENT"
|
|
661
651
|
]),
|
|
662
|
-
project_name: z.
|
|
652
|
+
project_name: z.string().optional()
|
|
663
653
|
});
|
|
664
654
|
/**
|
|
665
655
|
* Sandbox reference
|
|
666
656
|
*/
|
|
667
657
|
const zSandboxIdView = z.object({
|
|
668
|
-
url: z.
|
|
669
|
-
html_url: z.
|
|
670
|
-
id: z.
|
|
671
|
-
identifier: z.
|
|
672
|
-
name: z.
|
|
673
|
-
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([
|
|
674
664
|
"STARTING",
|
|
675
665
|
"STOPPING",
|
|
676
666
|
"FAILED",
|
|
677
667
|
"RUNNING",
|
|
678
668
|
"STOPPED",
|
|
679
669
|
"RESTORING"
|
|
680
|
-
])),
|
|
681
|
-
setup_status: z.
|
|
670
|
+
]).optional(),
|
|
671
|
+
setup_status: z.enum([
|
|
682
672
|
"INPROGRESS",
|
|
683
673
|
"SUCCESS",
|
|
684
674
|
"FAILED"
|
|
685
|
-
]))
|
|
675
|
+
]).optional()
|
|
686
676
|
});
|
|
687
677
|
/**
|
|
688
678
|
* Integration reference
|
|
689
679
|
*/
|
|
690
680
|
const zIntegrationIdView = z.object({
|
|
691
|
-
url: z.
|
|
692
|
-
html_url: z.
|
|
693
|
-
identifier: z.
|
|
694
|
-
hash_id: z.
|
|
695
|
-
name: z.
|
|
696
|
-
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([
|
|
697
687
|
"GIT_HUB",
|
|
698
688
|
"BITBUCKET",
|
|
699
689
|
"GOOGLE",
|
|
@@ -744,9 +734,11 @@ const zIntegrationIdView = z.object({
|
|
|
744
734
|
"ONE_LOGIN",
|
|
745
735
|
"OKTA",
|
|
746
736
|
"CONTENTFUL",
|
|
747
|
-
"JIRA"
|
|
748
|
-
|
|
749
|
-
|
|
737
|
+
"JIRA",
|
|
738
|
+
"NPM_REGISTRY",
|
|
739
|
+
"ANTHROPIC"
|
|
740
|
+
]).optional(),
|
|
741
|
+
auth_type: z.enum([
|
|
750
742
|
"OAUTH",
|
|
751
743
|
"TOKEN",
|
|
752
744
|
"API_KEY",
|
|
@@ -757,104 +749,73 @@ const zIntegrationIdView = z.object({
|
|
|
757
749
|
"OIDC",
|
|
758
750
|
"TRUSTED",
|
|
759
751
|
"APP_RW"
|
|
760
|
-
])),
|
|
761
|
-
host_url: z.
|
|
762
|
-
webhook_address: z.
|
|
763
|
-
atop_url: z.
|
|
764
|
-
app_id: z.
|
|
765
|
-
google_project: z.
|
|
766
|
-
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()
|
|
767
759
|
});
|
|
768
760
|
/**
|
|
769
761
|
* User/member reference
|
|
770
762
|
*/
|
|
771
763
|
const zMemberView = z.object({
|
|
772
|
-
url: z.
|
|
773
|
-
html_url: z.
|
|
774
|
-
id: z.
|
|
775
|
-
name: z.
|
|
776
|
-
avatar_url: z.
|
|
777
|
-
email: z.
|
|
778
|
-
admin: z.
|
|
779
|
-
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()
|
|
780
772
|
});
|
|
781
773
|
const zProjectView = z.object({
|
|
782
|
-
url: z.
|
|
783
|
-
html_url: z.
|
|
784
|
-
name: z.
|
|
774
|
+
url: z.string().readonly().optional(),
|
|
775
|
+
html_url: z.string().readonly().optional(),
|
|
776
|
+
name: z.string().optional(),
|
|
785
777
|
display_name: z.string(),
|
|
786
|
-
status: z.
|
|
787
|
-
access: z.
|
|
788
|
-
create_date: z.
|
|
789
|
-
external_project_id: z.
|
|
790
|
-
git_lab_project_id: z.
|
|
791
|
-
custom_repo_url: z.
|
|
792
|
-
custom_repo_user: z.
|
|
793
|
-
custom_repo_pass: z.
|
|
794
|
-
custom_repo_ssh_key_id: z.
|
|
795
|
-
created_by:
|
|
796
|
-
http_repository: z.
|
|
797
|
-
ssh_repository: z.
|
|
798
|
-
default_branch: z.
|
|
799
|
-
integration:
|
|
800
|
-
fetch_submodules: z.
|
|
801
|
-
fetch_submodules_env_key: z.
|
|
802
|
-
allow_pull_requests: z.
|
|
803
|
-
update_default_branch_from_external: z.
|
|
804
|
-
without_repository: z.
|
|
805
|
-
});
|
|
806
|
-
/**
|
|
807
|
-
* Access permissions configuration
|
|
808
|
-
*/
|
|
809
|
-
const zPermissionsView = z.object({
|
|
810
|
-
others: z.optional(z.enum([
|
|
811
|
-
"DENIED",
|
|
812
|
-
"READ_ONLY",
|
|
813
|
-
"BLIND",
|
|
814
|
-
"RUN_ONLY",
|
|
815
|
-
"READ_WRITE",
|
|
816
|
-
"MANAGE",
|
|
817
|
-
"DEFAULT",
|
|
818
|
-
"ALLOWED",
|
|
819
|
-
"STAGE",
|
|
820
|
-
"COMMIT",
|
|
821
|
-
"USE_ONLY"
|
|
822
|
-
])),
|
|
823
|
-
users: z.optional(z.array(zUserPermissionView)),
|
|
824
|
-
groups: z.optional(z.array(zGroupPermissionView))
|
|
825
|
-
});
|
|
826
|
-
/**
|
|
827
|
-
* Short representation of a project
|
|
828
|
-
*/
|
|
829
|
-
const zShortProjectView = z.object({
|
|
830
|
-
url: z.optional(z.string().readonly()),
|
|
831
|
-
html_url: z.optional(z.string().readonly()),
|
|
832
|
-
name: z.optional(z.string()),
|
|
833
|
-
display_name: z.string(),
|
|
834
|
-
status: z.optional(z.string()),
|
|
835
|
-
access: z.optional(z.enum(["PRIVATE", "PUBLIC"])),
|
|
836
|
-
create_date: z.optional(z.iso.datetime())
|
|
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()
|
|
837
797
|
});
|
|
838
798
|
/**
|
|
839
799
|
* The environment variables of the sandbox
|
|
840
800
|
*/
|
|
841
801
|
const zAddVariableInObjectRequest = z.object({
|
|
842
|
-
url: z.
|
|
843
|
-
html_url: z.
|
|
802
|
+
url: z.string().readonly().optional(),
|
|
803
|
+
html_url: z.string().readonly().optional(),
|
|
844
804
|
key: z.string(),
|
|
845
|
-
value: z.
|
|
846
|
-
settable: z.
|
|
847
|
-
run_only_settable: z.
|
|
848
|
-
encrypted: z.
|
|
849
|
-
description: z.
|
|
850
|
-
init_path: z.
|
|
851
|
-
defaults: z.
|
|
852
|
-
file_path: z.
|
|
853
|
-
file_chmod: z.
|
|
854
|
-
file_place: z.
|
|
855
|
-
password: z.
|
|
856
|
-
passphrase: z.
|
|
857
|
-
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(),
|
|
858
819
|
type: z.enum([
|
|
859
820
|
"VAR",
|
|
860
821
|
"FILE",
|
|
@@ -869,40 +830,40 @@ const zAddVariableInObjectRequest = z.object({
|
|
|
869
830
|
* The TLS/SSL encryption settings of the tunnel
|
|
870
831
|
*/
|
|
871
832
|
const zTlsSettingsView = z.object({
|
|
872
|
-
url: z.
|
|
873
|
-
html_url: z.
|
|
874
|
-
terminate_at: z.
|
|
833
|
+
url: z.string().readonly().optional(),
|
|
834
|
+
html_url: z.string().readonly().optional(),
|
|
835
|
+
terminate_at: z.enum([
|
|
875
836
|
"REGION",
|
|
876
837
|
"AGENT",
|
|
877
838
|
"TARGET"
|
|
878
|
-
]))
|
|
839
|
+
]).optional()
|
|
879
840
|
});
|
|
880
841
|
/**
|
|
881
842
|
* The HTTP-specific settings of the tunnel
|
|
882
843
|
*/
|
|
883
844
|
const zHttpSettingsView = z.object({
|
|
884
|
-
url: z.
|
|
885
|
-
html_url: z.
|
|
886
|
-
verify_certificate: z.
|
|
887
|
-
compression: z.
|
|
888
|
-
http2: z.
|
|
889
|
-
log_requests: z.
|
|
890
|
-
request_headers: z.
|
|
891
|
-
whitelist_user_agents: z.
|
|
892
|
-
rewrite_host_header: z.
|
|
893
|
-
response_headers: z.
|
|
894
|
-
login: z.
|
|
895
|
-
circuit_breaker: z.
|
|
896
|
-
serve_path: z.
|
|
897
|
-
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([
|
|
898
859
|
"NONE",
|
|
899
860
|
"BASIC",
|
|
900
861
|
"BUDDY"
|
|
901
|
-
]))
|
|
862
|
+
]).optional()
|
|
902
863
|
});
|
|
903
864
|
const zTunnelView = z.object({
|
|
904
|
-
url: z.
|
|
905
|
-
html_url: z.
|
|
865
|
+
url: z.string().readonly().optional(),
|
|
866
|
+
html_url: z.string().readonly().optional(),
|
|
906
867
|
name: z.string(),
|
|
907
868
|
endpoint: z.string(),
|
|
908
869
|
type: z.enum([
|
|
@@ -916,26 +877,38 @@ const zTunnelView = z.object({
|
|
|
916
877
|
"EU",
|
|
917
878
|
"AS"
|
|
918
879
|
]),
|
|
919
|
-
whitelist: z.
|
|
920
|
-
timeout: z.
|
|
921
|
-
http:
|
|
922
|
-
tls:
|
|
923
|
-
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()
|
|
924
897
|
});
|
|
925
898
|
const zSandboxAppView = z.object({
|
|
926
|
-
id: z.
|
|
927
|
-
command: z.
|
|
928
|
-
app_status: z.
|
|
899
|
+
id: z.string().optional(),
|
|
900
|
+
command: z.string().optional(),
|
|
901
|
+
app_status: z.enum([
|
|
929
902
|
"NONE",
|
|
930
903
|
"RUNNING",
|
|
931
904
|
"ENDED",
|
|
932
905
|
"FAILED"
|
|
933
|
-
]))
|
|
906
|
+
]).optional()
|
|
934
907
|
});
|
|
935
908
|
const zUpdateSandboxRequest = z.object({
|
|
936
|
-
name: z.
|
|
937
|
-
identifier: z.
|
|
938
|
-
resources: z.
|
|
909
|
+
name: z.string().optional(),
|
|
910
|
+
identifier: z.string().optional(),
|
|
911
|
+
resources: z.enum([
|
|
939
912
|
"1x2",
|
|
940
913
|
"2x4",
|
|
941
914
|
"3x6",
|
|
@@ -949,130 +922,131 @@ const zUpdateSandboxRequest = z.object({
|
|
|
949
922
|
"11x22",
|
|
950
923
|
"12x24",
|
|
951
924
|
"CUSTOM"
|
|
952
|
-
])),
|
|
953
|
-
first_boot_commands: z.
|
|
954
|
-
app_dir: z.
|
|
955
|
-
apps: z.
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
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()
|
|
961
935
|
});
|
|
962
936
|
const zSandboxesView = z.object({
|
|
963
|
-
url: z.
|
|
964
|
-
html_url: z.
|
|
965
|
-
sandboxes: z.
|
|
937
|
+
url: z.string().readonly().optional(),
|
|
938
|
+
html_url: z.string().readonly().optional(),
|
|
939
|
+
sandboxes: z.array(zSandboxIdView).optional()
|
|
966
940
|
});
|
|
967
941
|
/**
|
|
968
942
|
* Content item in a sandbox
|
|
969
943
|
*/
|
|
970
944
|
const zSandboxContentItem = z.object({
|
|
971
|
-
url: z.
|
|
972
|
-
html_url: z.
|
|
973
|
-
type: z.
|
|
974
|
-
name: z.
|
|
975
|
-
path: z.
|
|
976
|
-
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()
|
|
977
951
|
});
|
|
978
952
|
/**
|
|
979
953
|
* Sandbox content listing
|
|
980
954
|
*/
|
|
981
955
|
const zSandboxContentView = z.object({
|
|
982
|
-
url: z.
|
|
983
|
-
html_url: z.
|
|
984
|
-
contents: z.
|
|
956
|
+
url: z.string().readonly().optional(),
|
|
957
|
+
html_url: z.string().readonly().optional(),
|
|
958
|
+
contents: z.array(zSandboxContentItem).optional()
|
|
985
959
|
});
|
|
986
960
|
const zSandboxCommandView = z.object({
|
|
987
|
-
url: z.
|
|
988
|
-
html_url: z.
|
|
989
|
-
id: z.
|
|
990
|
-
command: z.
|
|
991
|
-
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([
|
|
992
966
|
"BASH",
|
|
993
967
|
"JAVASCRIPT",
|
|
994
968
|
"TYPESCRIPT",
|
|
995
969
|
"PYTHON"
|
|
996
|
-
])),
|
|
997
|
-
status: z.
|
|
970
|
+
]).optional(),
|
|
971
|
+
status: z.enum([
|
|
998
972
|
"INPROGRESS",
|
|
999
973
|
"SUCCESSFUL",
|
|
1000
974
|
"FAILED"
|
|
1001
|
-
])),
|
|
1002
|
-
exit_code: z.
|
|
1003
|
-
start_date: z.
|
|
1004
|
-
finish_date: z.
|
|
1005
|
-
logs_url: z.
|
|
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()
|
|
1006
980
|
});
|
|
1007
981
|
const zSandboxCommandsView = z.object({
|
|
1008
|
-
url: z.
|
|
1009
|
-
html_url: z.
|
|
1010
|
-
commands: z.
|
|
982
|
+
url: z.string().readonly().optional(),
|
|
983
|
+
html_url: z.string().readonly().optional(),
|
|
984
|
+
commands: z.array(zSandboxCommandView).optional()
|
|
1011
985
|
});
|
|
1012
986
|
const zSandboxCommandLog = z.object({
|
|
1013
|
-
type: z.
|
|
1014
|
-
data: z.
|
|
987
|
+
type: z.enum(["STDOUT", "STDERR"]).optional(),
|
|
988
|
+
data: z.string().optional()
|
|
1015
989
|
});
|
|
1016
990
|
const zSandboxAppLogsView = z.object({
|
|
1017
|
-
url: z.
|
|
1018
|
-
html_url: z.
|
|
1019
|
-
cursor: z.
|
|
1020
|
-
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()
|
|
1021
995
|
});
|
|
1022
996
|
const zShortSnapshotView = z.object({
|
|
1023
|
-
url: z.
|
|
1024
|
-
html_url: z.
|
|
1025
|
-
id: z.
|
|
1026
|
-
name: z.
|
|
1027
|
-
size: z.
|
|
1028
|
-
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([
|
|
1029
1003
|
"CREATING",
|
|
1030
1004
|
"CREATED",
|
|
1031
1005
|
"DELETING",
|
|
1032
1006
|
"FAILED"
|
|
1033
|
-
])),
|
|
1034
|
-
create_date: z.
|
|
1007
|
+
]).optional(),
|
|
1008
|
+
create_date: z.iso.datetime().optional()
|
|
1035
1009
|
});
|
|
1036
1010
|
const zSnapshotsView = z.object({
|
|
1037
|
-
url: z.
|
|
1038
|
-
html_url: z.
|
|
1039
|
-
snapshots: z.
|
|
1011
|
+
url: z.string().readonly().optional(),
|
|
1012
|
+
html_url: z.string().readonly().optional(),
|
|
1013
|
+
snapshots: z.array(zShortSnapshotView).optional()
|
|
1040
1014
|
});
|
|
1041
1015
|
const zExecuteSandboxCommandRequest = z.object({
|
|
1042
1016
|
command: z.string(),
|
|
1043
|
-
runtime: z.
|
|
1017
|
+
runtime: z.enum([
|
|
1044
1018
|
"BASH",
|
|
1045
1019
|
"JAVASCRIPT",
|
|
1046
1020
|
"TYPESCRIPT",
|
|
1047
1021
|
"PYTHON"
|
|
1048
|
-
]))
|
|
1022
|
+
]).optional()
|
|
1049
1023
|
});
|
|
1050
|
-
const zAddSnapshotRequest = z.object({ name: z.
|
|
1024
|
+
const zAddSnapshotRequest = z.object({ name: z.string().optional() });
|
|
1051
1025
|
const zSnapshotView = z.object({
|
|
1052
|
-
url: z.
|
|
1053
|
-
html_url: z.
|
|
1054
|
-
id: z.
|
|
1055
|
-
name: z.
|
|
1056
|
-
size: z.
|
|
1057
|
-
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([
|
|
1058
1032
|
"CREATING",
|
|
1059
1033
|
"CREATED",
|
|
1060
1034
|
"DELETING",
|
|
1061
1035
|
"FAILED"
|
|
1062
|
-
])),
|
|
1063
|
-
create_date: z.
|
|
1064
|
-
created_by:
|
|
1036
|
+
]).optional(),
|
|
1037
|
+
create_date: z.iso.datetime().optional(),
|
|
1038
|
+
created_by: zMemberView.optional()
|
|
1065
1039
|
});
|
|
1066
1040
|
const zSandboxYamlView = z.object({
|
|
1067
|
-
url: z.
|
|
1068
|
-
html_url: z.
|
|
1069
|
-
yaml: z.
|
|
1041
|
+
url: z.string().readonly().optional(),
|
|
1042
|
+
html_url: z.string().readonly().optional(),
|
|
1043
|
+
yaml: z.string().optional()
|
|
1070
1044
|
});
|
|
1071
1045
|
const zCreateNewSandboxRequest = z.object({
|
|
1072
1046
|
name: z.string(),
|
|
1073
|
-
identifier: z.
|
|
1047
|
+
identifier: z.string().optional(),
|
|
1074
1048
|
os: z.string(),
|
|
1075
|
-
resources: z.
|
|
1049
|
+
resources: z.enum([
|
|
1076
1050
|
"1x2",
|
|
1077
1051
|
"2x4",
|
|
1078
1052
|
"3x6",
|
|
@@ -1086,21 +1060,22 @@ const zCreateNewSandboxRequest = z.object({
|
|
|
1086
1060
|
"11x22",
|
|
1087
1061
|
"12x24",
|
|
1088
1062
|
"CUSTOM"
|
|
1089
|
-
])),
|
|
1090
|
-
first_boot_commands: z.
|
|
1091
|
-
app_dir: z.
|
|
1092
|
-
apps: z.
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
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()
|
|
1098
1073
|
});
|
|
1099
1074
|
const zEnvironmentVariableView = z.object({
|
|
1100
|
-
id: z.
|
|
1101
|
-
key: z.
|
|
1102
|
-
value: z.
|
|
1103
|
-
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([
|
|
1104
1079
|
"VAR",
|
|
1105
1080
|
"FILE",
|
|
1106
1081
|
"SSH_KEY",
|
|
@@ -1108,30 +1083,31 @@ const zEnvironmentVariableView = z.object({
|
|
|
1108
1083
|
"IOS_PROVISION_PROFILES",
|
|
1109
1084
|
"SSH_PUBLIC_KEY",
|
|
1110
1085
|
"GPG_KEY"
|
|
1111
|
-
])),
|
|
1112
|
-
encrypted: z.
|
|
1113
|
-
settable: z.
|
|
1114
|
-
run_only_settable: z.
|
|
1115
|
-
description: z.
|
|
1116
|
-
init_path: z.
|
|
1117
|
-
defaults: z.
|
|
1118
|
-
file_path: z.
|
|
1119
|
-
file_chmod: z.
|
|
1120
|
-
file_place: z.
|
|
1121
|
-
binary: z.
|
|
1122
|
-
public_value: z.
|
|
1123
|
-
key_fingerprint: z.
|
|
1124
|
-
checksum: z.
|
|
1125
|
-
password: z.
|
|
1126
|
-
passphrase: z.
|
|
1127
|
-
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()
|
|
1128
1104
|
});
|
|
1129
1105
|
const zCreateFromSnapshotRequest = z.object({
|
|
1130
1106
|
snapshot_id: z.string(),
|
|
1131
1107
|
name: z.string(),
|
|
1132
|
-
identifier: z.
|
|
1133
|
-
os: z.
|
|
1134
|
-
resources: z.
|
|
1108
|
+
identifier: z.string().optional(),
|
|
1109
|
+
os: z.string().optional(),
|
|
1110
|
+
resources: z.enum([
|
|
1135
1111
|
"1x2",
|
|
1136
1112
|
"2x4",
|
|
1137
1113
|
"3x6",
|
|
@@ -1145,41 +1121,41 @@ const zCreateFromSnapshotRequest = z.object({
|
|
|
1145
1121
|
"11x22",
|
|
1146
1122
|
"12x24",
|
|
1147
1123
|
"CUSTOM"
|
|
1148
|
-
])),
|
|
1149
|
-
first_boot_commands: z.
|
|
1150
|
-
app_dir: z.
|
|
1151
|
-
apps: z.
|
|
1152
|
-
tags: z.
|
|
1153
|
-
endpoints: z.
|
|
1154
|
-
variables: z.
|
|
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()
|
|
1155
1131
|
});
|
|
1156
1132
|
const zCloneSandboxRequest = z.object({
|
|
1157
1133
|
source_sandbox_id: z.string(),
|
|
1158
1134
|
name: z.string(),
|
|
1159
|
-
identifier: z.
|
|
1135
|
+
identifier: z.string().optional()
|
|
1160
1136
|
});
|
|
1161
1137
|
const zSandboxResponse = z.object({
|
|
1162
|
-
url: z.
|
|
1163
|
-
html_url: z.
|
|
1164
|
-
id: z.
|
|
1165
|
-
identifier: z.
|
|
1166
|
-
name: z.
|
|
1167
|
-
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([
|
|
1168
1144
|
"STARTING",
|
|
1169
1145
|
"STOPPING",
|
|
1170
1146
|
"FAILED",
|
|
1171
1147
|
"RUNNING",
|
|
1172
1148
|
"STOPPED",
|
|
1173
1149
|
"RESTORING"
|
|
1174
|
-
])),
|
|
1175
|
-
setup_status: z.
|
|
1150
|
+
]).optional(),
|
|
1151
|
+
setup_status: z.enum([
|
|
1176
1152
|
"INPROGRESS",
|
|
1177
1153
|
"SUCCESS",
|
|
1178
1154
|
"FAILED",
|
|
1179
1155
|
"STALE"
|
|
1180
|
-
])),
|
|
1181
|
-
os: z.
|
|
1182
|
-
resources: z.
|
|
1156
|
+
]).optional(),
|
|
1157
|
+
os: z.string().optional(),
|
|
1158
|
+
resources: z.enum([
|
|
1183
1159
|
"1x2",
|
|
1184
1160
|
"2x4",
|
|
1185
1161
|
"3x6",
|
|
@@ -1193,48 +1169,51 @@ const zSandboxResponse = z.object({
|
|
|
1193
1169
|
"11x22",
|
|
1194
1170
|
"12x24",
|
|
1195
1171
|
"CUSTOM"
|
|
1196
|
-
])),
|
|
1197
|
-
first_boot_commands: z.
|
|
1198
|
-
app_dir: z.
|
|
1199
|
-
apps: z.
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
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()
|
|
1207
1186
|
});
|
|
1208
1187
|
const zProjectsView = z.object({
|
|
1209
|
-
url: z.
|
|
1210
|
-
html_url: z.
|
|
1211
|
-
projects: z.
|
|
1188
|
+
url: z.string().readonly().optional(),
|
|
1189
|
+
html_url: z.string().readonly().optional(),
|
|
1190
|
+
projects: z.array(zShortProjectView).optional()
|
|
1212
1191
|
});
|
|
1213
1192
|
const zShortWorkspaceViewWritable = z.object({
|
|
1214
|
-
id: z.
|
|
1215
|
-
name: z.
|
|
1216
|
-
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()
|
|
1217
1196
|
});
|
|
1218
|
-
const zWorkspacesViewWritable = z.object({ workspaces: z.
|
|
1197
|
+
const zWorkspacesViewWritable = z.object({ workspaces: z.array(zShortWorkspaceViewWritable).optional() });
|
|
1219
1198
|
const zWorkspaceMemberViewWritable = z.object({
|
|
1220
|
-
id: z.
|
|
1221
|
-
name: z.
|
|
1222
|
-
avatar_url: z.
|
|
1223
|
-
email: z.
|
|
1224
|
-
admin: z.
|
|
1225
|
-
workspace_owner: z.
|
|
1226
|
-
auto_assign_to_new_projects: z.
|
|
1227
|
-
auto_assign_permission_set_id: z.
|
|
1228
|
-
});
|
|
1229
|
-
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() });
|
|
1230
1209
|
const zWorkspaceViewWritable = z.object({
|
|
1231
|
-
id: z.
|
|
1232
|
-
name: z.
|
|
1233
|
-
domain: z.
|
|
1234
|
-
owner_id: z.
|
|
1235
|
-
frozen: z.
|
|
1236
|
-
create_date: z.
|
|
1237
|
-
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([
|
|
1238
1217
|
"DEFAULT",
|
|
1239
1218
|
"NANO",
|
|
1240
1219
|
"SMALL",
|
|
@@ -1243,51 +1222,549 @@ const zWorkspaceViewWritable = z.object({
|
|
|
1243
1222
|
"XLARGE",
|
|
1244
1223
|
"CUSTOM",
|
|
1245
1224
|
"X2LARGE"
|
|
1246
|
-
])),
|
|
1247
|
-
sso_enabled: z.
|
|
1248
|
-
public_pipelines_disabled: z.
|
|
1225
|
+
]).optional(),
|
|
1226
|
+
sso_enabled: z.boolean().optional(),
|
|
1227
|
+
public_pipelines_disabled: z.boolean().optional()
|
|
1249
1228
|
});
|
|
1250
1229
|
const zSsoViewWritable = z.object({
|
|
1251
|
-
type: z.
|
|
1252
|
-
sso_provider_type: z.
|
|
1230
|
+
type: z.enum(["SAML", "OIDC"]).optional(),
|
|
1231
|
+
sso_provider_type: z.enum([
|
|
1253
1232
|
"OKTA",
|
|
1254
1233
|
"ONE_LOGIN",
|
|
1255
1234
|
"GOOGLE",
|
|
1256
1235
|
"AZURE",
|
|
1257
1236
|
"AWS",
|
|
1258
1237
|
"CUSTOM"
|
|
1259
|
-
])),
|
|
1260
|
-
sso_url: z.
|
|
1261
|
-
issuer: z.
|
|
1262
|
-
certificate: z.
|
|
1263
|
-
signature_method: z.
|
|
1264
|
-
digest_method: z.
|
|
1265
|
-
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()
|
|
1245
|
+
});
|
|
1246
|
+
/**
|
|
1247
|
+
* Short representation of an environment object
|
|
1248
|
+
*/
|
|
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()
|
|
1266
1741
|
});
|
|
1267
1742
|
/**
|
|
1268
1743
|
* Short representation of a pipeline
|
|
1269
1744
|
*/
|
|
1270
|
-
const
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
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([
|
|
1276
1753
|
"NONE",
|
|
1277
1754
|
"DYNAMIC",
|
|
1278
1755
|
"FIXED"
|
|
1279
|
-
])),
|
|
1280
|
-
refs: z.
|
|
1281
|
-
events: z.
|
|
1282
|
-
loop: z.
|
|
1283
|
-
priority: z.
|
|
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([
|
|
1284
1761
|
"LOW",
|
|
1285
1762
|
"NORMAL",
|
|
1286
1763
|
"HIGH"
|
|
1287
|
-
])),
|
|
1288
|
-
disabled: z.
|
|
1289
|
-
disabled_reason: z.
|
|
1290
|
-
last_execution_status: z.
|
|
1764
|
+
]).optional(),
|
|
1765
|
+
disabled: z.boolean().optional(),
|
|
1766
|
+
disabled_reason: z.string().optional(),
|
|
1767
|
+
last_execution_status: z.enum([
|
|
1291
1768
|
"INPROGRESS",
|
|
1292
1769
|
"ENQUEUED",
|
|
1293
1770
|
"TERMINATED",
|
|
@@ -1301,26 +1778,27 @@ const zShortPipelineViewWritable = z.object({
|
|
|
1301
1778
|
"WAITING_FOR_VARIABLES",
|
|
1302
1779
|
"WAITING_FOR_SETTABLE_VARIABLES",
|
|
1303
1780
|
"WAITING_FOR_VT_SESSION"
|
|
1304
|
-
])),
|
|
1305
|
-
last_execution_revision: z.
|
|
1306
|
-
target_site_url: z.
|
|
1307
|
-
execution_message_template: z.
|
|
1308
|
-
create_date: z.
|
|
1309
|
-
always_from_scratch: z.
|
|
1310
|
-
ignore_fail_on_project_status: z.
|
|
1311
|
-
no_skip_to_most_recent: z.
|
|
1312
|
-
terminate_stale_runs: z.
|
|
1313
|
-
auto_clear_cache: z.
|
|
1314
|
-
paused: z.
|
|
1315
|
-
pause_on_repeated_failures: z.
|
|
1316
|
-
fetch_all_refs: z.
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
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([
|
|
1324
1802
|
"DEFAULT",
|
|
1325
1803
|
"NANO",
|
|
1326
1804
|
"SMALL",
|
|
@@ -1329,35 +1807,37 @@ const zShortPipelineViewWritable = z.object({
|
|
|
1329
1807
|
"XLARGE",
|
|
1330
1808
|
"CUSTOM",
|
|
1331
1809
|
"X2LARGE"
|
|
1332
|
-
])),
|
|
1333
|
-
remote_path: z.
|
|
1334
|
-
remote_ref: z.
|
|
1335
|
-
remote_project_name: z.
|
|
1336
|
-
remote_parameters: z.
|
|
1337
|
-
git_config:
|
|
1338
|
-
tags: z.
|
|
1339
|
-
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([
|
|
1340
1818
|
"LATEST_RUN",
|
|
1341
1819
|
"LATEST_RUN_MATCHING_REF",
|
|
1342
1820
|
"PULL_REQUEST"
|
|
1343
|
-
])),
|
|
1344
|
-
filesystem_changeset_base: z.
|
|
1345
|
-
cpu: z.
|
|
1821
|
+
]).optional(),
|
|
1822
|
+
filesystem_changeset_base: z.enum(["DATE_MODIFIED", "CONTENTS"]).optional(),
|
|
1823
|
+
cpu: z.enum([
|
|
1346
1824
|
"X64",
|
|
1347
1825
|
"ARM",
|
|
1348
1826
|
"X86"
|
|
1349
|
-
])),
|
|
1350
|
-
description_required: z.
|
|
1351
|
-
folder: z.
|
|
1827
|
+
]).optional(),
|
|
1828
|
+
description_required: z.boolean().optional(),
|
|
1829
|
+
folder: z.string().optional()
|
|
1352
1830
|
});
|
|
1353
1831
|
/**
|
|
1354
1832
|
* The integration to use for authentication
|
|
1355
1833
|
*/
|
|
1356
|
-
const
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
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([
|
|
1361
1841
|
"GIT_HUB",
|
|
1362
1842
|
"BITBUCKET",
|
|
1363
1843
|
"GOOGLE",
|
|
@@ -1408,9 +1888,11 @@ const zIntegrationViewWritable = z.object({
|
|
|
1408
1888
|
"ONE_LOGIN",
|
|
1409
1889
|
"OKTA",
|
|
1410
1890
|
"CONTENTFUL",
|
|
1411
|
-
"JIRA"
|
|
1412
|
-
|
|
1413
|
-
|
|
1891
|
+
"JIRA",
|
|
1892
|
+
"NPM_REGISTRY",
|
|
1893
|
+
"ANTHROPIC"
|
|
1894
|
+
]).optional(),
|
|
1895
|
+
auth_type: z.enum([
|
|
1414
1896
|
"OAUTH",
|
|
1415
1897
|
"TOKEN",
|
|
1416
1898
|
"API_KEY",
|
|
@@ -1421,62 +1903,155 @@ const zIntegrationViewWritable = z.object({
|
|
|
1421
1903
|
"OIDC",
|
|
1422
1904
|
"TRUSTED",
|
|
1423
1905
|
"APP_RW"
|
|
1424
|
-
])),
|
|
1425
|
-
scope: z.
|
|
1906
|
+
]).optional(),
|
|
1907
|
+
scope: z.enum([
|
|
1426
1908
|
"WORKSPACE",
|
|
1427
1909
|
"PROJECT",
|
|
1428
1910
|
"ENVIRONMENT"
|
|
1429
|
-
])),
|
|
1430
|
-
project_name: z.
|
|
1431
|
-
app_id: z.
|
|
1432
|
-
google_project: z.
|
|
1433
|
-
host_url: z.
|
|
1434
|
-
webhook_address: z.
|
|
1435
|
-
audience: z.
|
|
1436
|
-
atop_url: z.
|
|
1437
|
-
permissions:
|
|
1438
|
-
all_pipelines_allowed: z.
|
|
1439
|
-
allowed_pipelines: z.
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
const
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
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()
|
|
1450
1959
|
});
|
|
1451
1960
|
/**
|
|
1452
|
-
*
|
|
1961
|
+
* Short representation of a pipeline
|
|
1453
1962
|
*/
|
|
1454
|
-
const
|
|
1455
|
-
id: z.
|
|
1456
|
-
identifier: z.
|
|
1457
|
-
name: z.
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
"
|
|
1461
|
-
"
|
|
1462
|
-
"
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
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([
|
|
1467
1984
|
"INPROGRESS",
|
|
1468
|
-
"
|
|
1469
|
-
"
|
|
1470
|
-
|
|
1985
|
+
"ENQUEUED",
|
|
1986
|
+
"TERMINATED",
|
|
1987
|
+
"SUCCESSFUL",
|
|
1988
|
+
"FAILED",
|
|
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()
|
|
1471
2046
|
});
|
|
1472
2047
|
/**
|
|
1473
|
-
*
|
|
2048
|
+
* The integration to use for authentication
|
|
1474
2049
|
*/
|
|
1475
|
-
const
|
|
1476
|
-
identifier: z.
|
|
1477
|
-
hash_id: z.
|
|
1478
|
-
name: z.
|
|
1479
|
-
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([
|
|
1480
2055
|
"GIT_HUB",
|
|
1481
2056
|
"BITBUCKET",
|
|
1482
2057
|
"GOOGLE",
|
|
@@ -1527,9 +2102,11 @@ const zIntegrationIdViewWritable = z.object({
|
|
|
1527
2102
|
"ONE_LOGIN",
|
|
1528
2103
|
"OKTA",
|
|
1529
2104
|
"CONTENTFUL",
|
|
1530
|
-
"JIRA"
|
|
1531
|
-
|
|
1532
|
-
|
|
2105
|
+
"JIRA",
|
|
2106
|
+
"NPM_REGISTRY",
|
|
2107
|
+
"ANTHROPIC"
|
|
2108
|
+
]).optional(),
|
|
2109
|
+
auth_type: z.enum([
|
|
1533
2110
|
"OAUTH",
|
|
1534
2111
|
"TOKEN",
|
|
1535
2112
|
"API_KEY",
|
|
@@ -1540,768 +2117,286 @@ const zIntegrationIdViewWritable = z.object({
|
|
|
1540
2117
|
"OIDC",
|
|
1541
2118
|
"TRUSTED",
|
|
1542
2119
|
"APP_RW"
|
|
1543
|
-
])),
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
});
|
|
1562
|
-
const
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
fetch_submodules: z.optional(z.boolean()),
|
|
1580
|
-
fetch_submodules_env_key: z.optional(z.string()),
|
|
1581
|
-
allow_pull_requests: z.optional(z.boolean()),
|
|
1582
|
-
update_default_branch_from_external: z.optional(z.boolean()),
|
|
1583
|
-
without_repository: z.optional(z.boolean())
|
|
1584
|
-
});
|
|
1585
|
-
/**
|
|
1586
|
-
* Short representation of a project
|
|
1587
|
-
*/
|
|
1588
|
-
const zShortProjectViewWritable = z.object({
|
|
1589
|
-
name: z.optional(z.string()),
|
|
1590
|
-
display_name: z.string(),
|
|
1591
|
-
status: z.optional(z.string()),
|
|
1592
|
-
access: z.optional(z.enum(["PRIVATE", "PUBLIC"])),
|
|
1593
|
-
create_date: z.optional(z.iso.datetime())
|
|
1594
|
-
});
|
|
1595
|
-
/**
|
|
1596
|
-
* The environment variables of the sandbox
|
|
1597
|
-
*/
|
|
1598
|
-
const zAddVariableInObjectRequestWritable = z.object({
|
|
1599
|
-
key: z.string(),
|
|
1600
|
-
value: z.optional(z.string()),
|
|
1601
|
-
settable: z.optional(z.boolean()),
|
|
1602
|
-
run_only_settable: z.optional(z.boolean()),
|
|
1603
|
-
encrypted: z.optional(z.boolean()),
|
|
1604
|
-
description: z.optional(z.string()),
|
|
1605
|
-
init_path: z.optional(z.string()),
|
|
1606
|
-
defaults: z.optional(z.string()),
|
|
1607
|
-
file_path: z.optional(z.string()),
|
|
1608
|
-
file_chmod: z.optional(z.string()),
|
|
1609
|
-
file_place: z.optional(z.enum(["NONE", "CONTAINER"])),
|
|
1610
|
-
password: z.optional(z.string()),
|
|
1611
|
-
passphrase: z.optional(z.string()),
|
|
1612
|
-
key_identifier: z.optional(z.string()),
|
|
1613
|
-
type: z.enum([
|
|
1614
|
-
"VAR",
|
|
1615
|
-
"FILE",
|
|
1616
|
-
"SSH_KEY",
|
|
1617
|
-
"IOS_KEYCHAIN",
|
|
1618
|
-
"IOS_PROVISION_PROFILES",
|
|
1619
|
-
"SSH_PUBLIC_KEY",
|
|
1620
|
-
"GPG_KEY"
|
|
1621
|
-
])
|
|
1622
|
-
});
|
|
1623
|
-
/**
|
|
1624
|
-
* The TLS/SSL encryption settings of the tunnel
|
|
1625
|
-
*/
|
|
1626
|
-
const zTlsSettingsViewWritable = z.object({
|
|
1627
|
-
private_key: z.optional(z.string()),
|
|
1628
|
-
certificate: z.optional(z.string()),
|
|
1629
|
-
ca_certificate: z.optional(z.string()),
|
|
1630
|
-
terminate_at: z.optional(z.enum([
|
|
1631
|
-
"REGION",
|
|
1632
|
-
"AGENT",
|
|
1633
|
-
"TARGET"
|
|
1634
|
-
]))
|
|
1635
|
-
});
|
|
1636
|
-
/**
|
|
1637
|
-
* The HTTP-specific settings of the tunnel
|
|
1638
|
-
*/
|
|
1639
|
-
const zHttpSettingsViewWritable = z.object({
|
|
1640
|
-
verify_certificate: z.optional(z.boolean()),
|
|
1641
|
-
compression: z.optional(z.boolean()),
|
|
1642
|
-
http2: z.optional(z.boolean()),
|
|
1643
|
-
log_requests: z.optional(z.boolean()),
|
|
1644
|
-
request_headers: z.optional(z.record(z.string(), z.string())),
|
|
1645
|
-
whitelist_user_agents: z.optional(z.array(z.string())),
|
|
1646
|
-
rewrite_host_header: z.optional(z.string()),
|
|
1647
|
-
response_headers: z.optional(z.record(z.string(), z.string())),
|
|
1648
|
-
login: z.optional(z.string()),
|
|
1649
|
-
password: z.optional(z.string()),
|
|
1650
|
-
tls_ca: z.optional(z.string()),
|
|
1651
|
-
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" })),
|
|
1652
|
-
serve_path: z.optional(z.string()),
|
|
1653
|
-
auth_type: z.optional(z.enum([
|
|
1654
|
-
"NONE",
|
|
1655
|
-
"BASIC",
|
|
1656
|
-
"BUDDY"
|
|
1657
|
-
]))
|
|
1658
|
-
});
|
|
1659
|
-
const zTunnelViewWritable = z.object({
|
|
1660
|
-
name: z.string(),
|
|
1661
|
-
endpoint: z.string(),
|
|
1662
|
-
type: z.enum([
|
|
1663
|
-
"TCP",
|
|
1664
|
-
"TLS",
|
|
1665
|
-
"HTTP",
|
|
1666
|
-
"SSH"
|
|
1667
|
-
]),
|
|
1668
|
-
region: z.enum([
|
|
1669
|
-
"US",
|
|
1670
|
-
"EU",
|
|
1671
|
-
"AS"
|
|
1672
|
-
]),
|
|
1673
|
-
whitelist: z.optional(z.array(z.string())),
|
|
1674
|
-
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" })),
|
|
1675
|
-
http: z.optional(zHttpSettingsViewWritable),
|
|
1676
|
-
tls: z.optional(zTlsSettingsViewWritable),
|
|
1677
|
-
endpoint_url: z.optional(z.string())
|
|
1678
|
-
});
|
|
1679
|
-
const zUpdateSandboxRequestWritable = z.object({
|
|
1680
|
-
name: z.optional(z.string()),
|
|
1681
|
-
identifier: z.optional(z.string()),
|
|
1682
|
-
resources: z.optional(z.enum([
|
|
1683
|
-
"1x2",
|
|
1684
|
-
"2x4",
|
|
1685
|
-
"3x6",
|
|
1686
|
-
"4x8",
|
|
1687
|
-
"5x10",
|
|
1688
|
-
"6x12",
|
|
1689
|
-
"7x14",
|
|
1690
|
-
"8x16",
|
|
1691
|
-
"9x18",
|
|
1692
|
-
"10x20",
|
|
1693
|
-
"11x22",
|
|
1694
|
-
"12x24",
|
|
1695
|
-
"CUSTOM"
|
|
1696
|
-
])),
|
|
1697
|
-
first_boot_commands: z.optional(z.string()),
|
|
1698
|
-
app_dir: z.optional(z.string()),
|
|
1699
|
-
apps: z.optional(z.array(zSandboxAppView)),
|
|
1700
|
-
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" })),
|
|
1701
|
-
tags: z.optional(z.array(z.string())),
|
|
1702
|
-
endpoints: z.optional(z.array(zTunnelViewWritable)),
|
|
1703
|
-
variables: z.optional(z.array(zAddVariableInObjectRequestWritable)),
|
|
1704
|
-
permissions: z.optional(zPermissionsView)
|
|
1705
|
-
});
|
|
1706
|
-
const zSandboxesViewWritable = z.object({ sandboxes: z.optional(z.array(zSandboxIdViewWritable)) });
|
|
1707
|
-
/**
|
|
1708
|
-
* Content item in a sandbox
|
|
1709
|
-
*/
|
|
1710
|
-
const zSandboxContentItemWritable = z.object({
|
|
1711
|
-
type: z.optional(z.enum(["FILE", "DIR"])),
|
|
1712
|
-
name: z.optional(z.string()),
|
|
1713
|
-
path: z.optional(z.string()),
|
|
1714
|
-
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" }))
|
|
1715
|
-
});
|
|
1716
|
-
/**
|
|
1717
|
-
* Sandbox content listing
|
|
1718
|
-
*/
|
|
1719
|
-
const zSandboxContentViewWritable = z.object({ contents: z.optional(z.array(zSandboxContentItemWritable)) });
|
|
1720
|
-
const zSandboxCommandViewWritable = z.object({
|
|
1721
|
-
id: z.optional(z.string()),
|
|
1722
|
-
command: z.optional(z.string()),
|
|
1723
|
-
runtime: z.optional(z.enum([
|
|
1724
|
-
"BASH",
|
|
1725
|
-
"JAVASCRIPT",
|
|
1726
|
-
"TYPESCRIPT",
|
|
1727
|
-
"PYTHON"
|
|
1728
|
-
])),
|
|
1729
|
-
status: z.optional(z.enum([
|
|
1730
|
-
"INPROGRESS",
|
|
1731
|
-
"SUCCESSFUL",
|
|
1732
|
-
"FAILED"
|
|
1733
|
-
])),
|
|
1734
|
-
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" })),
|
|
1735
|
-
start_date: z.optional(z.iso.datetime()),
|
|
1736
|
-
finish_date: z.optional(z.iso.datetime()),
|
|
1737
|
-
logs_url: z.optional(z.string())
|
|
1738
|
-
});
|
|
1739
|
-
const zSandboxCommandsViewWritable = z.object({ commands: z.optional(z.array(zSandboxCommandViewWritable)) });
|
|
1740
|
-
const zSandboxAppLogsViewWritable = z.object({
|
|
1741
|
-
cursor: z.optional(z.string()),
|
|
1742
|
-
logs: z.optional(z.array(z.string()))
|
|
1743
|
-
});
|
|
1744
|
-
const zShortSnapshotViewWritable = z.object({
|
|
1745
|
-
id: z.optional(z.string()),
|
|
1746
|
-
name: z.optional(z.string()),
|
|
1747
|
-
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" })),
|
|
1748
|
-
status: z.optional(z.enum([
|
|
1749
|
-
"CREATING",
|
|
1750
|
-
"CREATED",
|
|
1751
|
-
"DELETING",
|
|
1752
|
-
"FAILED"
|
|
1753
|
-
])),
|
|
1754
|
-
create_date: z.optional(z.iso.datetime())
|
|
1755
|
-
});
|
|
1756
|
-
const zSnapshotsViewWritable = z.object({ snapshots: z.optional(z.array(zShortSnapshotViewWritable)) });
|
|
1757
|
-
const zSnapshotViewWritable = z.object({
|
|
1758
|
-
id: z.optional(z.string()),
|
|
1759
|
-
name: z.optional(z.string()),
|
|
1760
|
-
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" })),
|
|
1761
|
-
status: z.optional(z.enum([
|
|
1762
|
-
"CREATING",
|
|
1763
|
-
"CREATED",
|
|
1764
|
-
"DELETING",
|
|
1765
|
-
"FAILED"
|
|
1766
|
-
])),
|
|
1767
|
-
create_date: z.optional(z.iso.datetime()),
|
|
1768
|
-
created_by: z.optional(zMemberViewWritable)
|
|
1769
|
-
});
|
|
1770
|
-
const zSandboxYamlViewWritable = z.object({ yaml: z.optional(z.string()) });
|
|
1771
|
-
const zCreateNewSandboxRequestWritable = z.object({
|
|
1772
|
-
name: z.string(),
|
|
1773
|
-
identifier: z.optional(z.string()),
|
|
1774
|
-
os: z.string(),
|
|
1775
|
-
resources: z.optional(z.enum([
|
|
1776
|
-
"1x2",
|
|
1777
|
-
"2x4",
|
|
1778
|
-
"3x6",
|
|
1779
|
-
"4x8",
|
|
1780
|
-
"5x10",
|
|
1781
|
-
"6x12",
|
|
1782
|
-
"7x14",
|
|
1783
|
-
"8x16",
|
|
1784
|
-
"9x18",
|
|
1785
|
-
"10x20",
|
|
1786
|
-
"11x22",
|
|
1787
|
-
"12x24",
|
|
1788
|
-
"CUSTOM"
|
|
1789
|
-
])),
|
|
1790
|
-
first_boot_commands: z.optional(z.string()),
|
|
1791
|
-
app_dir: z.optional(z.string()),
|
|
1792
|
-
apps: z.optional(z.array(z.string())),
|
|
1793
|
-
tags: z.optional(z.array(z.string())),
|
|
1794
|
-
endpoints: z.optional(z.array(zTunnelViewWritable)),
|
|
1795
|
-
variables: z.optional(z.array(zAddVariableInObjectRequestWritable)),
|
|
1796
|
-
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" })),
|
|
1797
|
-
permissions: z.optional(zPermissionsView)
|
|
1798
|
-
});
|
|
1799
|
-
const zCreateFromSnapshotRequestWritable = z.object({
|
|
1800
|
-
snapshot_id: z.string(),
|
|
1801
|
-
name: z.string(),
|
|
1802
|
-
identifier: z.optional(z.string()),
|
|
1803
|
-
os: z.optional(z.string()),
|
|
1804
|
-
resources: z.optional(z.enum([
|
|
1805
|
-
"1x2",
|
|
1806
|
-
"2x4",
|
|
1807
|
-
"3x6",
|
|
1808
|
-
"4x8",
|
|
1809
|
-
"5x10",
|
|
1810
|
-
"6x12",
|
|
1811
|
-
"7x14",
|
|
1812
|
-
"8x16",
|
|
1813
|
-
"9x18",
|
|
1814
|
-
"10x20",
|
|
1815
|
-
"11x22",
|
|
1816
|
-
"12x24",
|
|
1817
|
-
"CUSTOM"
|
|
1818
|
-
])),
|
|
1819
|
-
first_boot_commands: z.optional(z.string()),
|
|
1820
|
-
app_dir: z.optional(z.string()),
|
|
1821
|
-
apps: z.optional(z.array(z.string())),
|
|
1822
|
-
tags: z.optional(z.array(z.string())),
|
|
1823
|
-
endpoints: z.optional(z.array(zTunnelViewWritable)),
|
|
1824
|
-
variables: z.optional(z.array(zEnvironmentVariableView))
|
|
1825
|
-
});
|
|
1826
|
-
const zSandboxResponseWritable = z.object({
|
|
1827
|
-
id: z.optional(z.string()),
|
|
1828
|
-
identifier: z.optional(z.string()),
|
|
1829
|
-
name: z.optional(z.string()),
|
|
1830
|
-
status: z.optional(z.enum([
|
|
1831
|
-
"STARTING",
|
|
1832
|
-
"STOPPING",
|
|
1833
|
-
"FAILED",
|
|
1834
|
-
"RUNNING",
|
|
1835
|
-
"STOPPED",
|
|
1836
|
-
"RESTORING"
|
|
1837
|
-
])),
|
|
1838
|
-
setup_status: z.optional(z.enum([
|
|
1839
|
-
"INPROGRESS",
|
|
1840
|
-
"SUCCESS",
|
|
1841
|
-
"FAILED",
|
|
1842
|
-
"STALE"
|
|
1843
|
-
])),
|
|
1844
|
-
os: z.optional(z.string()),
|
|
1845
|
-
resources: z.optional(z.enum([
|
|
1846
|
-
"1x2",
|
|
1847
|
-
"2x4",
|
|
1848
|
-
"3x6",
|
|
1849
|
-
"4x8",
|
|
1850
|
-
"5x10",
|
|
1851
|
-
"6x12",
|
|
1852
|
-
"7x14",
|
|
1853
|
-
"8x16",
|
|
1854
|
-
"9x18",
|
|
1855
|
-
"10x20",
|
|
1856
|
-
"11x22",
|
|
1857
|
-
"12x24",
|
|
1858
|
-
"CUSTOM"
|
|
1859
|
-
])),
|
|
1860
|
-
first_boot_commands: z.optional(z.string()),
|
|
1861
|
-
app_dir: z.optional(z.string()),
|
|
1862
|
-
apps: z.optional(z.array(zSandboxAppView)),
|
|
1863
|
-
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" })),
|
|
1864
|
-
tags: z.optional(z.array(z.string())),
|
|
1865
|
-
boot_logs: z.optional(z.array(z.string())),
|
|
1866
|
-
endpoints: z.optional(z.array(zTunnelViewWritable)),
|
|
1867
|
-
project: z.optional(zProjectViewWritable),
|
|
1868
|
-
permissions: z.optional(zPermissionsView),
|
|
1869
|
-
variables: z.optional(z.array(zEnvironmentVariableView))
|
|
1870
|
-
});
|
|
1871
|
-
const zProjectsViewWritable = z.object({ projects: z.optional(z.array(zShortProjectViewWritable)) });
|
|
1872
|
-
const zGetWorkspacesData = z.object({
|
|
1873
|
-
body: z.optional(z.never()),
|
|
1874
|
-
path: z.optional(z.never()),
|
|
1875
|
-
query: z.optional(z.never())
|
|
1876
|
-
});
|
|
1877
|
-
const zGetWorkspaceData = z.object({
|
|
1878
|
-
body: z.optional(z.never()),
|
|
1879
|
-
path: z.object({ workspace_domain: z.string() }),
|
|
1880
|
-
query: z.optional(z.never())
|
|
1881
|
-
});
|
|
1882
|
-
const zDisableSsoData = z.object({
|
|
1883
|
-
body: z.optional(z.never()),
|
|
1884
|
-
path: z.object({ workspace_domain: z.string() }),
|
|
1885
|
-
query: z.optional(z.never())
|
|
1886
|
-
});
|
|
1887
|
-
const zEnableSsoData = z.object({
|
|
1888
|
-
body: z.optional(z.never()),
|
|
1889
|
-
path: z.object({ workspace_domain: z.string() }),
|
|
1890
|
-
query: z.optional(z.never())
|
|
1891
|
-
});
|
|
1892
|
-
const zGetIdentifiersData = z.object({
|
|
1893
|
-
body: z.optional(z.never()),
|
|
1894
|
-
path: z.object({ workspace_domain: z.string() }),
|
|
1895
|
-
query: z.optional(z.object({
|
|
1896
|
-
project: z.optional(z.string()),
|
|
1897
|
-
pipeline: z.optional(z.string()),
|
|
1898
|
-
environment: z.optional(z.string()),
|
|
1899
|
-
package: z.optional(z.string()),
|
|
1900
|
-
package_version: z.optional(z.string()),
|
|
1901
|
-
sandbox: z.optional(z.string())
|
|
1902
|
-
}))
|
|
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()
|
|
1903
2156
|
});
|
|
1904
2157
|
const zGetIdentifiersResponse = zIdsView;
|
|
1905
|
-
const
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
query: z.optional(z.never())
|
|
1909
|
-
});
|
|
1910
|
-
const zAddIntegrationData = z.object({
|
|
1911
|
-
body: z.optional(zAddIntegrationRequest),
|
|
1912
|
-
path: z.object({ workspace_domain: z.string() }),
|
|
1913
|
-
query: z.optional(z.never())
|
|
1914
|
-
});
|
|
1915
|
-
const zDeleteIntegrationData = z.object({
|
|
1916
|
-
body: z.optional(z.never()),
|
|
1917
|
-
path: z.object({
|
|
1918
|
-
workspace_domain: z.string(),
|
|
1919
|
-
hash_id: z.string()
|
|
1920
|
-
}),
|
|
1921
|
-
query: z.optional(z.never())
|
|
2158
|
+
const zDeleteIntegrationPath = z.object({
|
|
2159
|
+
workspace_domain: z.string(),
|
|
2160
|
+
hash_id: z.string()
|
|
1922
2161
|
});
|
|
1923
2162
|
/**
|
|
1924
2163
|
* Integration deleted successfully
|
|
1925
2164
|
*/
|
|
1926
2165
|
const zDeleteIntegrationResponse = z.void();
|
|
1927
|
-
const
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
});
|
|
1935
|
-
const
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
workspace_domain: z.string(),
|
|
1939
|
-
hash_id: z.string()
|
|
1940
|
-
}),
|
|
1941
|
-
query: z.optional(z.never())
|
|
1942
|
-
});
|
|
1943
|
-
const zGetWorkspaceMembersData = z.object({
|
|
1944
|
-
body: z.optional(z.never()),
|
|
1945
|
-
path: z.object({ workspace_domain: z.string() }),
|
|
1946
|
-
query: z.optional(z.object({
|
|
1947
|
-
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" })),
|
|
1948
|
-
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" })),
|
|
1949
|
-
sort_by: z.optional(z.string()),
|
|
1950
|
-
sort_direction: z.optional(z.string())
|
|
1951
|
-
}))
|
|
1952
|
-
});
|
|
1953
|
-
const zAddWorkspaceMemberData = z.object({
|
|
1954
|
-
body: z.optional(zAddWorkspaceMemberRequest),
|
|
1955
|
-
path: z.object({ workspace_domain: z.string() }),
|
|
1956
|
-
query: z.optional(z.never())
|
|
1957
|
-
});
|
|
1958
|
-
const zDeleteWorkspaceMemberData = z.object({
|
|
1959
|
-
body: z.optional(z.never()),
|
|
1960
|
-
path: z.object({
|
|
1961
|
-
workspace_domain: z.string(),
|
|
1962
|
-
id: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
1963
|
-
}),
|
|
1964
|
-
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" })
|
|
1965
2177
|
});
|
|
1966
2178
|
/**
|
|
1967
2179
|
* Workspace member deleted successfully
|
|
1968
2180
|
*/
|
|
1969
2181
|
const zDeleteWorkspaceMemberResponse = z.void();
|
|
1970
|
-
const
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
});
|
|
1978
|
-
const
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
}),
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
query: z.optional(z.object({
|
|
1993
|
-
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" })),
|
|
1994
|
-
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" })),
|
|
1995
|
-
status: z.optional(z.string()),
|
|
1996
|
-
sort_by: z.optional(z.string()),
|
|
1997
|
-
sort_direction: z.optional(z.string()),
|
|
1998
|
-
all: z.optional(z.string())
|
|
1999
|
-
}))
|
|
2000
|
-
});
|
|
2001
|
-
const zGetSandboxesData = z.object({
|
|
2002
|
-
body: z.optional(z.never()),
|
|
2003
|
-
path: z.object({ workspace_domain: z.string() }),
|
|
2004
|
-
query: z.object({ project_name: z.string() })
|
|
2005
|
-
});
|
|
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() });
|
|
2006
2204
|
const zGetSandboxesResponse = zSandboxesView;
|
|
2007
|
-
const
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
query: z.object({ project_name: z.string() })
|
|
2015
|
-
});
|
|
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() });
|
|
2016
2212
|
const zAddSandboxResponse = zSandboxResponse;
|
|
2017
|
-
const
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
workspace_domain: z.string(),
|
|
2021
|
-
id: z.string()
|
|
2022
|
-
}),
|
|
2023
|
-
query: z.optional(z.never())
|
|
2213
|
+
const zDeleteSandboxPath = z.object({
|
|
2214
|
+
workspace_domain: z.string(),
|
|
2215
|
+
id: z.string()
|
|
2024
2216
|
});
|
|
2025
2217
|
/**
|
|
2026
2218
|
* Sandbox deleted successfully
|
|
2027
2219
|
*/
|
|
2028
2220
|
const zDeleteSandboxResponse = z.void();
|
|
2029
|
-
const
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
workspace_domain: z.string(),
|
|
2033
|
-
id: z.string()
|
|
2034
|
-
}),
|
|
2035
|
-
query: z.optional(z.never())
|
|
2221
|
+
const zGetSandboxPath = z.object({
|
|
2222
|
+
workspace_domain: z.string(),
|
|
2223
|
+
id: z.string()
|
|
2036
2224
|
});
|
|
2037
2225
|
const zGetSandboxResponse = zSandboxResponse;
|
|
2038
|
-
const
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
const zGetSandboxAppLogsByIdData = z.object({
|
|
2047
|
-
body: z.optional(z.never()),
|
|
2048
|
-
path: z.object({
|
|
2049
|
-
workspace_domain: z.string(),
|
|
2050
|
-
sandbox_id: z.string(),
|
|
2051
|
-
app_id: z.string()
|
|
2052
|
-
}),
|
|
2053
|
-
query: z.optional(z.object({ cursor: z.optional(z.string()) }))
|
|
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()
|
|
2054
2234
|
});
|
|
2235
|
+
const zGetSandboxAppLogsByIdQuery = z.object({ cursor: z.string().optional() });
|
|
2055
2236
|
const zGetSandboxAppLogsByIdResponse = zSandboxAppLogsView;
|
|
2056
|
-
const
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
sandbox_id: z.string(),
|
|
2061
|
-
app_id: z.string()
|
|
2062
|
-
}),
|
|
2063
|
-
query: z.optional(z.never())
|
|
2237
|
+
const zStartSandboxAppPath = z.object({
|
|
2238
|
+
workspace_domain: z.string(),
|
|
2239
|
+
sandbox_id: z.string(),
|
|
2240
|
+
app_id: z.string()
|
|
2064
2241
|
});
|
|
2065
2242
|
const zStartSandboxAppResponse = zSandboxResponse;
|
|
2066
|
-
const
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
sandbox_id: z.string(),
|
|
2071
|
-
app_id: z.string()
|
|
2072
|
-
}),
|
|
2073
|
-
query: z.optional(z.never())
|
|
2243
|
+
const zStopSandboxAppPath = z.object({
|
|
2244
|
+
workspace_domain: z.string(),
|
|
2245
|
+
sandbox_id: z.string(),
|
|
2246
|
+
app_id: z.string()
|
|
2074
2247
|
});
|
|
2075
2248
|
const zStopSandboxAppResponse = zSandboxResponse;
|
|
2076
|
-
const
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
const zExecuteSandboxCommandData = z.object({
|
|
2085
|
-
body: z.optional(zExecuteSandboxCommandRequest),
|
|
2086
|
-
path: z.object({
|
|
2087
|
-
workspace_domain: z.string(),
|
|
2088
|
-
sandbox_id: z.string()
|
|
2089
|
-
}),
|
|
2090
|
-
query: z.optional(z.never())
|
|
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()
|
|
2091
2257
|
});
|
|
2092
2258
|
const zExecuteSandboxCommandResponse = zSandboxCommandView;
|
|
2093
|
-
const
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
sandbox_id: z.string(),
|
|
2098
|
-
id: z.string()
|
|
2099
|
-
}),
|
|
2100
|
-
query: z.optional(z.never())
|
|
2259
|
+
const zGetSandboxCommandPath = z.object({
|
|
2260
|
+
workspace_domain: z.string(),
|
|
2261
|
+
sandbox_id: z.string(),
|
|
2262
|
+
id: z.string()
|
|
2101
2263
|
});
|
|
2102
2264
|
const zGetSandboxCommandResponse = zSandboxCommandView;
|
|
2103
|
-
const
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
body: z.optional(z.never()),
|
|
2114
|
-
path: z.object({
|
|
2115
|
-
workspace_domain: z.string(),
|
|
2116
|
-
sandbox_id: z.string(),
|
|
2117
|
-
command_id: z.string()
|
|
2118
|
-
}),
|
|
2119
|
-
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()
|
|
2120
2275
|
});
|
|
2121
2276
|
const zTerminateSandboxCommandResponse = zSandboxCommandView;
|
|
2122
|
-
const
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
sandbox_id: z.string(),
|
|
2127
|
-
path: z.string().regex(/.*/)
|
|
2128
|
-
}),
|
|
2129
|
-
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(/.*/)
|
|
2130
2281
|
});
|
|
2131
2282
|
/**
|
|
2132
2283
|
* File or directory deleted successfully
|
|
2133
2284
|
*/
|
|
2134
2285
|
const zDeleteSandboxFileResponse = z.void();
|
|
2135
|
-
const
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
sandbox_id: z.string(),
|
|
2140
|
-
path: z.string().regex(/.*/)
|
|
2141
|
-
}),
|
|
2142
|
-
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(/.*/)
|
|
2143
2290
|
});
|
|
2144
2291
|
/**
|
|
2145
2292
|
* Content retrieved successfully
|
|
2146
2293
|
*/
|
|
2147
2294
|
const zGetSandboxContentResponse = zSandboxContentView;
|
|
2148
|
-
const
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
sandbox_id: z.string(),
|
|
2153
|
-
path: z.string().regex(/.*/)
|
|
2154
|
-
}),
|
|
2155
|
-
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(/.*/)
|
|
2156
2299
|
});
|
|
2157
2300
|
/**
|
|
2158
2301
|
* Directory created successfully
|
|
2159
2302
|
*/
|
|
2160
2303
|
const zCreateSandboxDirectoryResponse = zSandboxContentItem;
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
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(/.*/)
|
|
2169
2312
|
});
|
|
2170
2313
|
/**
|
|
2171
2314
|
* File uploaded successfully
|
|
2172
2315
|
*/
|
|
2173
2316
|
const zUploadSandboxFileResponse = zSandboxContentItem;
|
|
2174
|
-
const
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
sandbox_id: z.string(),
|
|
2179
|
-
path: z.string().regex(/.*/)
|
|
2180
|
-
}),
|
|
2181
|
-
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(/.*/)
|
|
2182
2321
|
});
|
|
2183
2322
|
/**
|
|
2184
2323
|
* File download
|
|
2185
2324
|
*/
|
|
2186
2325
|
const zDownloadSandboxContentResponse = z.string();
|
|
2187
|
-
const
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
workspace_domain: z.string(),
|
|
2191
|
-
sandbox_id: z.string()
|
|
2192
|
-
}),
|
|
2193
|
-
query: z.optional(z.never())
|
|
2326
|
+
const zRestartSandboxPath = z.object({
|
|
2327
|
+
workspace_domain: z.string(),
|
|
2328
|
+
sandbox_id: z.string()
|
|
2194
2329
|
});
|
|
2195
2330
|
const zRestartSandboxResponse = zSandboxResponse;
|
|
2196
|
-
const
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
});
|
|
2204
|
-
const
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
sandbox_id: z.string()
|
|
2209
|
-
}),
|
|
2210
|
-
query: z.optional(z.never())
|
|
2211
|
-
});
|
|
2212
|
-
const zDeleteSandboxSnapshotData = z.object({
|
|
2213
|
-
body: z.optional(z.never()),
|
|
2214
|
-
path: z.object({
|
|
2215
|
-
workspace_domain: z.string(),
|
|
2216
|
-
sandbox_id: z.string(),
|
|
2217
|
-
id: z.string()
|
|
2218
|
-
}),
|
|
2219
|
-
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()
|
|
2220
2343
|
});
|
|
2221
2344
|
/**
|
|
2222
2345
|
* Sandbox snapshot deleted successfully
|
|
2223
2346
|
*/
|
|
2224
2347
|
const zDeleteSandboxSnapshotResponse = z.void();
|
|
2225
|
-
const
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
});
|
|
2234
|
-
const zStartSandboxData = z.object({
|
|
2235
|
-
body: z.optional(z.never()),
|
|
2236
|
-
path: z.object({
|
|
2237
|
-
workspace_domain: z.string(),
|
|
2238
|
-
sandbox_id: z.string()
|
|
2239
|
-
}),
|
|
2240
|
-
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()
|
|
2241
2356
|
});
|
|
2242
2357
|
const zStartSandboxResponse = zSandboxResponse;
|
|
2243
|
-
const
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
workspace_domain: z.string(),
|
|
2247
|
-
sandbox_id: z.string()
|
|
2248
|
-
}),
|
|
2249
|
-
query: z.optional(z.never())
|
|
2358
|
+
const zStopSandboxPath = z.object({
|
|
2359
|
+
workspace_domain: z.string(),
|
|
2360
|
+
sandbox_id: z.string()
|
|
2250
2361
|
});
|
|
2251
2362
|
const zStopSandboxResponse = zSandboxResponse;
|
|
2252
|
-
const
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
});
|
|
2260
|
-
const
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
}),
|
|
2266
|
-
query: z.optional(z.never())
|
|
2267
|
-
});
|
|
2268
|
-
const zGetProjectSnapshotsData = z.object({
|
|
2269
|
-
body: z.optional(z.never()),
|
|
2270
|
-
path: z.object({ workspace_domain: z.string() }),
|
|
2271
|
-
query: z.object({ project_name: z.string() })
|
|
2272
|
-
});
|
|
2273
|
-
const zDeleteSnapshotData = z.object({
|
|
2274
|
-
body: z.optional(z.never()),
|
|
2275
|
-
path: z.object({
|
|
2276
|
-
workspace_domain: z.string(),
|
|
2277
|
-
id: z.string()
|
|
2278
|
-
}),
|
|
2279
|
-
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()
|
|
2280
2376
|
});
|
|
2281
2377
|
/**
|
|
2282
2378
|
* Sandbox snapshot deleted successfully
|
|
2283
2379
|
*/
|
|
2284
2380
|
const zDeleteSnapshotResponse = z.void();
|
|
2285
|
-
const
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
});
|
|
2290
|
-
const
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
});
|
|
2295
|
-
const
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
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()
|
|
2299
2394
|
});
|
|
2300
2395
|
|
|
2301
2396
|
//#endregion
|
|
2302
2397
|
//#region package.json
|
|
2303
2398
|
var name = "@buddy-works/sandbox-sdk";
|
|
2304
|
-
var version = "0.1.
|
|
2399
|
+
var version = "0.1.6-rc.0";
|
|
2305
2400
|
|
|
2306
2401
|
//#endregion
|
|
2307
2402
|
//#region src/utils/environment.ts
|
|
@@ -2640,43 +2735,41 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2640
2735
|
if (!result.success) throw new HttpError(`Response validation failed:\n${prettifyError(result.error)}`, response.status, response);
|
|
2641
2736
|
return result.data;
|
|
2642
2737
|
}
|
|
2643
|
-
/** Check if a schema expects query parameters (not ZodNever) */
|
|
2644
|
-
#schemaExpectsQuery(schema) {
|
|
2645
|
-
const querySchema = schema.shape.query;
|
|
2646
|
-
if (querySchema instanceof z.ZodOptional) {
|
|
2647
|
-
if (querySchema._def.innerType instanceof z.ZodNever) return false;
|
|
2648
|
-
}
|
|
2649
|
-
return true;
|
|
2650
|
-
}
|
|
2651
2738
|
/** Execute an HTTP request with input/output validation */
|
|
2652
|
-
async #requestWithValidation({ method, url, data,
|
|
2653
|
-
const
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
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({
|
|
2661
2749
|
project_name: this.project_name,
|
|
2662
2750
|
...data.query ?? {}
|
|
2663
|
-
}
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
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
|
+
}
|
|
2668
2761
|
const parameterizedUrl = this.#buildUrl({
|
|
2669
2762
|
url,
|
|
2670
|
-
path:
|
|
2763
|
+
path: validatedPath
|
|
2671
2764
|
});
|
|
2672
2765
|
const requestConfig = {
|
|
2673
|
-
queryParams:
|
|
2766
|
+
queryParams: validatedQuery,
|
|
2674
2767
|
skipRetry
|
|
2675
2768
|
};
|
|
2676
2769
|
let request;
|
|
2677
2770
|
switch (method) {
|
|
2678
2771
|
case "POST":
|
|
2679
|
-
request = this.post(parameterizedUrl,
|
|
2772
|
+
request = this.post(parameterizedUrl, validatedBody ?? {}, requestConfig);
|
|
2680
2773
|
break;
|
|
2681
2774
|
case "GET":
|
|
2682
2775
|
request = this.get(parameterizedUrl, requestConfig);
|
|
@@ -2694,7 +2787,9 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2694
2787
|
method: "POST",
|
|
2695
2788
|
data,
|
|
2696
2789
|
url: "/workspaces/{workspace_domain}/sandboxes",
|
|
2697
|
-
|
|
2790
|
+
bodySchema: zAddSandboxBody,
|
|
2791
|
+
pathSchema: zAddSandboxPath,
|
|
2792
|
+
querySchema: zAddSandboxQuery,
|
|
2698
2793
|
responseSchema: zAddSandboxResponse.transform(addSandboxResponseTransformer)
|
|
2699
2794
|
});
|
|
2700
2795
|
}
|
|
@@ -2704,7 +2799,7 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2704
2799
|
method: "GET",
|
|
2705
2800
|
data,
|
|
2706
2801
|
url: "/workspaces/{workspace_domain}/sandboxes/{id}",
|
|
2707
|
-
|
|
2802
|
+
pathSchema: zGetSandboxPath,
|
|
2708
2803
|
responseSchema: zGetSandboxResponse.transform(getSandboxResponseTransformer)
|
|
2709
2804
|
});
|
|
2710
2805
|
}
|
|
@@ -2714,7 +2809,8 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2714
2809
|
method: "GET",
|
|
2715
2810
|
data,
|
|
2716
2811
|
url: "/workspaces/{workspace_domain}/identifiers",
|
|
2717
|
-
|
|
2812
|
+
pathSchema: zGetIdentifiersPath,
|
|
2813
|
+
querySchema: zGetIdentifiersQuery,
|
|
2718
2814
|
responseSchema: zGetIdentifiersResponse
|
|
2719
2815
|
});
|
|
2720
2816
|
}
|
|
@@ -2724,7 +2820,8 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2724
2820
|
method: "POST",
|
|
2725
2821
|
data,
|
|
2726
2822
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/commands",
|
|
2727
|
-
|
|
2823
|
+
bodySchema: zExecuteSandboxCommandBody,
|
|
2824
|
+
pathSchema: zExecuteSandboxCommandPath,
|
|
2728
2825
|
responseSchema: zExecuteSandboxCommandResponse.transform(executeSandboxCommandResponseTransformer)
|
|
2729
2826
|
});
|
|
2730
2827
|
}
|
|
@@ -2734,7 +2831,7 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2734
2831
|
method: "GET",
|
|
2735
2832
|
data,
|
|
2736
2833
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/commands/{id}",
|
|
2737
|
-
|
|
2834
|
+
pathSchema: zGetSandboxCommandPath,
|
|
2738
2835
|
responseSchema: zGetSandboxCommandResponse.transform(getSandboxCommandResponseTransformer)
|
|
2739
2836
|
});
|
|
2740
2837
|
}
|
|
@@ -2744,7 +2841,7 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2744
2841
|
method: "POST",
|
|
2745
2842
|
data,
|
|
2746
2843
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/commands/{command_id}/terminate",
|
|
2747
|
-
|
|
2844
|
+
pathSchema: zTerminateSandboxCommandPath,
|
|
2748
2845
|
responseSchema: zTerminateSandboxCommandResponse.transform(terminateSandboxCommandResponseTransformer)
|
|
2749
2846
|
});
|
|
2750
2847
|
}
|
|
@@ -2755,7 +2852,7 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2755
2852
|
method: "DELETE",
|
|
2756
2853
|
data,
|
|
2757
2854
|
url: "/workspaces/{workspace_domain}/sandboxes/{id}",
|
|
2758
|
-
|
|
2855
|
+
pathSchema: zDeleteSandboxPath,
|
|
2759
2856
|
responseSchema: zDeleteSandboxResponse,
|
|
2760
2857
|
skipRetry: true
|
|
2761
2858
|
});
|
|
@@ -2770,7 +2867,8 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2770
2867
|
method: "GET",
|
|
2771
2868
|
data,
|
|
2772
2869
|
url: "/workspaces/{workspace_domain}/sandboxes",
|
|
2773
|
-
|
|
2870
|
+
pathSchema: zGetSandboxesPath,
|
|
2871
|
+
querySchema: zGetSandboxesQuery,
|
|
2774
2872
|
responseSchema: zGetSandboxesResponse
|
|
2775
2873
|
});
|
|
2776
2874
|
}
|
|
@@ -2780,7 +2878,7 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2780
2878
|
method: "POST",
|
|
2781
2879
|
data,
|
|
2782
2880
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/start",
|
|
2783
|
-
|
|
2881
|
+
pathSchema: zStartSandboxPath,
|
|
2784
2882
|
responseSchema: zStartSandboxResponse.transform(startSandboxResponseTransformer)
|
|
2785
2883
|
});
|
|
2786
2884
|
}
|
|
@@ -2790,7 +2888,7 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2790
2888
|
method: "POST",
|
|
2791
2889
|
data,
|
|
2792
2890
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/stop",
|
|
2793
|
-
|
|
2891
|
+
pathSchema: zStopSandboxPath,
|
|
2794
2892
|
responseSchema: zStopSandboxResponse.transform(stopSandboxResponseTransformer)
|
|
2795
2893
|
});
|
|
2796
2894
|
}
|
|
@@ -2800,7 +2898,7 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2800
2898
|
method: "POST",
|
|
2801
2899
|
data,
|
|
2802
2900
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/restart",
|
|
2803
|
-
|
|
2901
|
+
pathSchema: zRestartSandboxPath,
|
|
2804
2902
|
responseSchema: zRestartSandboxResponse.transform(restartSandboxResponseTransformer)
|
|
2805
2903
|
});
|
|
2806
2904
|
}
|
|
@@ -2810,7 +2908,7 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2810
2908
|
method: "POST",
|
|
2811
2909
|
data,
|
|
2812
2910
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/apps/{app_id}/start",
|
|
2813
|
-
|
|
2911
|
+
pathSchema: zStartSandboxAppPath,
|
|
2814
2912
|
responseSchema: zStartSandboxAppResponse.transform(startSandboxAppResponseTransformer)
|
|
2815
2913
|
});
|
|
2816
2914
|
}
|
|
@@ -2820,7 +2918,7 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2820
2918
|
method: "POST",
|
|
2821
2919
|
data,
|
|
2822
2920
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/apps/{app_id}/stop",
|
|
2823
|
-
|
|
2921
|
+
pathSchema: zStopSandboxAppPath,
|
|
2824
2922
|
responseSchema: zStopSandboxAppResponse.transform(stopSandboxAppResponseTransformer)
|
|
2825
2923
|
});
|
|
2826
2924
|
}
|
|
@@ -2830,7 +2928,8 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2830
2928
|
method: "GET",
|
|
2831
2929
|
data,
|
|
2832
2930
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/apps/{app_id}/logs",
|
|
2833
|
-
|
|
2931
|
+
pathSchema: zGetSandboxAppLogsByIdPath,
|
|
2932
|
+
querySchema: zGetSandboxAppLogsByIdQuery,
|
|
2834
2933
|
responseSchema: zGetSandboxAppLogsByIdResponse
|
|
2835
2934
|
});
|
|
2836
2935
|
}
|
|
@@ -2840,7 +2939,7 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2840
2939
|
method: "GET",
|
|
2841
2940
|
data,
|
|
2842
2941
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/content/{path}",
|
|
2843
|
-
|
|
2942
|
+
pathSchema: zGetSandboxContentPath,
|
|
2844
2943
|
responseSchema: zGetSandboxContentResponse.transform(getSandboxContentResponseTransformer)
|
|
2845
2944
|
});
|
|
2846
2945
|
}
|
|
@@ -2850,7 +2949,7 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2850
2949
|
method: "DELETE",
|
|
2851
2950
|
data,
|
|
2852
2951
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/content/{path}",
|
|
2853
|
-
|
|
2952
|
+
pathSchema: zDeleteSandboxFilePath,
|
|
2854
2953
|
responseSchema: zDeleteSandboxFileResponse
|
|
2855
2954
|
});
|
|
2856
2955
|
}
|
|
@@ -2860,29 +2959,20 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2860
2959
|
method: "POST",
|
|
2861
2960
|
data,
|
|
2862
2961
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/content/{path}",
|
|
2863
|
-
|
|
2962
|
+
pathSchema: zCreateSandboxDirectoryPath,
|
|
2864
2963
|
responseSchema: zCreateSandboxDirectoryResponse.transform(createSandboxDirectoryResponseTransformer)
|
|
2865
2964
|
});
|
|
2866
2965
|
}
|
|
2867
2966
|
/** Upload a file to a sandbox */
|
|
2868
2967
|
async uploadSandboxFile(data) {
|
|
2869
|
-
const
|
|
2870
|
-
|
|
2871
|
-
path
|
|
2872
|
-
workspace_domain: this.workspace,
|
|
2873
|
-
...data.path ?? {}
|
|
2874
|
-
},
|
|
2875
|
-
query: void 0
|
|
2876
|
-
};
|
|
2877
|
-
const validationResult = await zUploadSandboxFileData.safeParseAsync({
|
|
2878
|
-
...fullData,
|
|
2879
|
-
body: void 0
|
|
2968
|
+
const pathResult = await zUploadSandboxFilePath.safeParseAsync({
|
|
2969
|
+
workspace_domain: this.workspace,
|
|
2970
|
+
...data.path
|
|
2880
2971
|
});
|
|
2881
|
-
if (!
|
|
2882
|
-
const validatedData = validationResult.data;
|
|
2972
|
+
if (!pathResult.success) throw pathResult.error;
|
|
2883
2973
|
const parameterizedUrl = this.#buildUrl({
|
|
2884
2974
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/content/upload/{path}",
|
|
2885
|
-
path:
|
|
2975
|
+
path: pathResult.data
|
|
2886
2976
|
});
|
|
2887
2977
|
const url = new URL(parameterizedUrl, this.#apiUrl);
|
|
2888
2978
|
url.searchParams.set("project_name", this.project_name);
|
|
@@ -2912,20 +3002,14 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2912
3002
|
}
|
|
2913
3003
|
/** Download content from a sandbox (file or directory as tar.gz) */
|
|
2914
3004
|
async downloadSandboxContent(data) {
|
|
2915
|
-
const
|
|
2916
|
-
|
|
2917
|
-
path
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
},
|
|
2921
|
-
query: void 0
|
|
2922
|
-
};
|
|
2923
|
-
const validationResult = await zDownloadSandboxContentData.safeParseAsync(fullData);
|
|
2924
|
-
if (!validationResult.success) throw validationResult.error;
|
|
2925
|
-
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;
|
|
2926
3010
|
const parameterizedUrl = this.#buildUrl({
|
|
2927
3011
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/download/{path}",
|
|
2928
|
-
path:
|
|
3012
|
+
path: pathResult.data
|
|
2929
3013
|
});
|
|
2930
3014
|
const url = new URL(parameterizedUrl, this.#apiUrl);
|
|
2931
3015
|
const headers = {
|
|
@@ -2958,23 +3042,19 @@ var BuddyApiClient = class extends HttpClient {
|
|
|
2958
3042
|
}
|
|
2959
3043
|
/** Stream logs from a specific command execution */
|
|
2960
3044
|
async *streamCommandLogs(data) {
|
|
2961
|
-
const
|
|
2962
|
-
|
|
2963
|
-
path
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
};
|
|
2969
|
-
const validationResult = await zGetSandboxCommandLogsData.safeParseAsync(fullData);
|
|
2970
|
-
if (!validationResult.success) throw validationResult.error;
|
|
2971
|
-
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;
|
|
2972
3052
|
const parameterizedUrl = this.#buildUrl({
|
|
2973
3053
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/commands/{command_id}/logs",
|
|
2974
|
-
path:
|
|
3054
|
+
path: pathResult.data
|
|
2975
3055
|
});
|
|
2976
3056
|
const url = new URL(parameterizedUrl, this.#apiUrl);
|
|
2977
|
-
if (
|
|
3057
|
+
if (queryResult.data.follow !== void 0) url.searchParams.set("follow", String(queryResult.data.follow));
|
|
2978
3058
|
const headers = {
|
|
2979
3059
|
Accept: "application/jsonl",
|
|
2980
3060
|
"Content-Type": "application/json",
|