@lovable.dev/sdk 0.1.10 → 1.1.1
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 +71 -40
- package/dist/index.d.ts +5281 -9468
- package/dist/index.js +737 -419
- package/dist/index.js.map +1 -1
- package/dist/schemas.d.ts +4174 -0
- package/dist/schemas.js +2031 -0
- package/dist/schemas.js.map +1 -0
- package/package.json +27 -2
- package/src/client.ts +1597 -0
- package/src/generated/paths.ts +7743 -0
- package/src/generated/zod/zod.gen.ts +2018 -0
- package/src/index.ts +93 -0
- package/src/retryFetch.ts +44 -0
- package/src/schemas.ts +22 -0
- package/src/types.ts +493 -0
|
@@ -0,0 +1,2018 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
|
|
3
|
+
import * as z from 'zod';
|
|
4
|
+
|
|
5
|
+
export const AppUserConnectorSettingSchema = z.object({
|
|
6
|
+
enabled: z.boolean(),
|
|
7
|
+
name: z.string(),
|
|
8
|
+
who_can_create: z.string().optional()
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export const CommonSeamlessConnectorCreatorSchema = z.object({
|
|
12
|
+
name: z.string(),
|
|
13
|
+
url: z.string()
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export const CommonSeamlessConnectorFeatureSchema = z.object({
|
|
17
|
+
body: z.string().optional(),
|
|
18
|
+
items: z.array(z.string()).nullable(),
|
|
19
|
+
title: z.string()
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export const CommonSeamlessConnectorPermissionSchema = z.object({
|
|
23
|
+
control_type: z.string().optional(),
|
|
24
|
+
default_preference: z.string(),
|
|
25
|
+
description: z.string(),
|
|
26
|
+
display_name: z.string(),
|
|
27
|
+
is_primary: z.boolean().optional(),
|
|
28
|
+
name: z.string()
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export const CreatorSchema = z.object({
|
|
32
|
+
name: z.string(),
|
|
33
|
+
url: z.string()
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export const AppUserConnectorApiSchema = z.object({
|
|
37
|
+
can_restrict_to_admins: z.boolean(),
|
|
38
|
+
categories: z.array(z.enum([
|
|
39
|
+
'ecommerce',
|
|
40
|
+
'marketing',
|
|
41
|
+
'productivity',
|
|
42
|
+
'sales',
|
|
43
|
+
'support',
|
|
44
|
+
'other',
|
|
45
|
+
'messaging',
|
|
46
|
+
'coming_soon',
|
|
47
|
+
'development',
|
|
48
|
+
'payments',
|
|
49
|
+
'custom'
|
|
50
|
+
])),
|
|
51
|
+
creator: CreatorSchema,
|
|
52
|
+
display_name: z.string(),
|
|
53
|
+
documentation_url: z.string(),
|
|
54
|
+
features: z.string(),
|
|
55
|
+
has_clients: z.boolean(),
|
|
56
|
+
id: z.string(),
|
|
57
|
+
is_enabled_for_workspace: z.boolean(),
|
|
58
|
+
long_description: z.string(),
|
|
59
|
+
search_tags: z.array(z.string()),
|
|
60
|
+
short_description: z.string(),
|
|
61
|
+
terms_url: z.string().optional(),
|
|
62
|
+
who_can_create: z.enum(['editors_and_admins', 'admins_only'])
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
export const DiffLineSchema = z.object({
|
|
66
|
+
content: z.string(),
|
|
67
|
+
type: z.string()
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
export const DiffHunkSchema = z.object({
|
|
71
|
+
lines: z.array(DiffLineSchema).nullable(),
|
|
72
|
+
newCount: z.number(),
|
|
73
|
+
newStart: z.number(),
|
|
74
|
+
oldCount: z.number(),
|
|
75
|
+
oldStart: z.number()
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
export const DisputeVoidedGrantSchema = z.object({
|
|
79
|
+
amount: z.number(),
|
|
80
|
+
applicability: z.string(),
|
|
81
|
+
category: z.string(),
|
|
82
|
+
currency: z.string(),
|
|
83
|
+
grant_id: z.string(),
|
|
84
|
+
grant_type: z.string(),
|
|
85
|
+
price_per_credit_hundredths: z.number()
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
export const ErrorDetailSchema = z.object({
|
|
89
|
+
location: z.string().optional(),
|
|
90
|
+
message: z.string().optional(),
|
|
91
|
+
value: z.unknown().optional()
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
export const ErrorModelSchema = z.object({
|
|
95
|
+
detail: z.string().optional(),
|
|
96
|
+
errors: z.array(ErrorDetailSchema).nullish(),
|
|
97
|
+
request_id: z.string().optional(),
|
|
98
|
+
status: z.number().optional(),
|
|
99
|
+
title: z.string().optional(),
|
|
100
|
+
type: z.string().optional()
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
export const FeatureDescriptionSchema = z.object({
|
|
104
|
+
body: z.string().optional(),
|
|
105
|
+
items: z.array(z.string()).nullable(),
|
|
106
|
+
title: z.string()
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
export const GetMeCapabilitiesSchema = z.object({
|
|
110
|
+
project_variants: z.boolean()
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
export const GetMeWorkspaceSchema = z.object({
|
|
114
|
+
id: z.string(),
|
|
115
|
+
name: z.string(),
|
|
116
|
+
role: z.string()
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
export const GetMeOutputBodySchema = z.object({
|
|
120
|
+
capabilities: GetMeCapabilitiesSchema.optional(),
|
|
121
|
+
email: z.string(),
|
|
122
|
+
id: z.string(),
|
|
123
|
+
name: z.string(),
|
|
124
|
+
workspaces: z.array(GetMeWorkspaceSchema).nullable()
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
export const GitFileEntrySchema = z.object({
|
|
128
|
+
binary: z.boolean(),
|
|
129
|
+
path: z.string(),
|
|
130
|
+
size: z.number()
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
export const GitFileEntryLiteSchema = z.object({
|
|
134
|
+
binary: z.boolean(),
|
|
135
|
+
path: z.string()
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
export const LibraryProjectResponseSchema = z.object({
|
|
139
|
+
description: z.string(),
|
|
140
|
+
id: z.string(),
|
|
141
|
+
name: z.string().nullable(),
|
|
142
|
+
published_commit_sha: z.string().nullable(),
|
|
143
|
+
published_version: z.string().nullable(),
|
|
144
|
+
updated_at: z.string()
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
export const GetAvailableLibraryProjectsPublicV1OutputBodySchema = z.object({
|
|
148
|
+
has_more: z.boolean(),
|
|
149
|
+
libraries: z.array(LibraryProjectResponseSchema).nullable(),
|
|
150
|
+
total: z.number()
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
export const ListDataPointSchema = z.object({
|
|
154
|
+
label: z.string(),
|
|
155
|
+
value: z.number()
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
export const ListDataSchema = z.object({
|
|
159
|
+
data: z.array(ListDataPointSchema).nullable(),
|
|
160
|
+
label: z.string()
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
export const ListsGroupSchema = z.object({
|
|
164
|
+
country: ListDataSchema,
|
|
165
|
+
device: ListDataSchema,
|
|
166
|
+
page: ListDataSchema,
|
|
167
|
+
source: ListDataSchema
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
export const McpConnectorCreatorStructSchema = z.object({
|
|
171
|
+
name: z.string(),
|
|
172
|
+
url: z.string()
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
export const McpConnectorSettingSchema = z.object({
|
|
176
|
+
enabled: z.boolean(),
|
|
177
|
+
name: z.string()
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
export const PaginationSchema = z.object({
|
|
181
|
+
has_more: z.boolean(),
|
|
182
|
+
next_cursor: z.string().nullable()
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
export const PendingDisputeAdjustmentSchema = z.object({
|
|
186
|
+
currency: z.string(),
|
|
187
|
+
customer_balance_debit_amount: z.number(),
|
|
188
|
+
customer_id: z.string(),
|
|
189
|
+
invoice_id: z.string(),
|
|
190
|
+
voided_grants: z.array(DisputeVoidedGrantSchema).nullable()
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
export const PendingRefundAdjustmentSchema = z.record(z.string(), z.never());
|
|
194
|
+
|
|
195
|
+
export const ProjectAccessEntrySchema = z.object({
|
|
196
|
+
accepted_at: z.iso.datetime().optional(),
|
|
197
|
+
invited_at: z.iso.datetime(),
|
|
198
|
+
invited_by: z.string(),
|
|
199
|
+
level: z.enum([
|
|
200
|
+
'owner',
|
|
201
|
+
'admin',
|
|
202
|
+
'write',
|
|
203
|
+
'read',
|
|
204
|
+
'none'
|
|
205
|
+
])
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
export const ProjectFileInfoSchema = z.object({
|
|
209
|
+
binary: z.boolean(),
|
|
210
|
+
contents: z.string().optional(),
|
|
211
|
+
name: z.string(),
|
|
212
|
+
sizeBytes: z.number(),
|
|
213
|
+
sizeExceeded: z.boolean()
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
export const ProjectPiiFindingDtoSchema = z.object({
|
|
217
|
+
chat_message_id: z.string().optional(),
|
|
218
|
+
chat_upload_id: z.string().optional(),
|
|
219
|
+
connector_id: z.string().optional(),
|
|
220
|
+
found_at: z.iso.datetime(),
|
|
221
|
+
id: z.string(),
|
|
222
|
+
info_type: z.string().optional(),
|
|
223
|
+
likelihood: z.string().optional(),
|
|
224
|
+
quote: z.string().optional(),
|
|
225
|
+
scan_id: z.string().optional(),
|
|
226
|
+
sensitivity: z.string().optional(),
|
|
227
|
+
source: z.string(),
|
|
228
|
+
sql_location: z.string().optional(),
|
|
229
|
+
status: z.string(),
|
|
230
|
+
storage_path: z.string().optional()
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
export const CursorListResponseProjectPiiFindingDtoSchema = z.object({
|
|
234
|
+
data: z.array(ProjectPiiFindingDtoSchema).nullable(),
|
|
235
|
+
pagination: PaginationSchema
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
export const PublicV1AddConnectorBodySchema = z.object({
|
|
239
|
+
auth_type: z.enum(['none', 'bearer_token']),
|
|
240
|
+
connector_id: z.string().optional(),
|
|
241
|
+
name: z.string().min(1),
|
|
242
|
+
network_transport_endpoint_id: z.string().optional(),
|
|
243
|
+
network_transport_profile_id: z.string().optional(),
|
|
244
|
+
network_transport_type: z.string().optional(),
|
|
245
|
+
relay_client_id: z.string().optional(),
|
|
246
|
+
relay_service_name: z.string().optional(),
|
|
247
|
+
token: z.string().optional(),
|
|
248
|
+
url: z.string().optional(),
|
|
249
|
+
workspace_id: z.string()
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
export const PublicV1ConnectorItemSchema = z.object({
|
|
253
|
+
auth_type: z.string().optional(),
|
|
254
|
+
categories: z.array(z.string()).nullish(),
|
|
255
|
+
category: z.string().optional(),
|
|
256
|
+
connector_id: z.string().optional(),
|
|
257
|
+
display_name: z.string().optional(),
|
|
258
|
+
documentation_url: z.string().optional(),
|
|
259
|
+
id: z.string(),
|
|
260
|
+
is_connected: z.boolean().optional(),
|
|
261
|
+
is_enabled_for_workspace: z.boolean().optional(),
|
|
262
|
+
requires_custom_url: z.boolean().optional(),
|
|
263
|
+
short_description: z.string().optional(),
|
|
264
|
+
status: z.string().optional(),
|
|
265
|
+
summary: z.string().optional(),
|
|
266
|
+
type: z.string()
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
export const CursorListResponsePublicV1ConnectorItemSchema = z.object({
|
|
270
|
+
data: z.array(PublicV1ConnectorItemSchema).nullable(),
|
|
271
|
+
pagination: PaginationSchema
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
export const PublicV1CreateProjectResponseSchema = z.object({
|
|
275
|
+
description: z.string().optional(),
|
|
276
|
+
display_name: z.string().optional(),
|
|
277
|
+
embed_url: z.string().optional(),
|
|
278
|
+
id: z.string().optional(),
|
|
279
|
+
is_published: z.boolean().optional(),
|
|
280
|
+
job_id: z.string().optional(),
|
|
281
|
+
latest_commit_sha: z.string().optional(),
|
|
282
|
+
latest_screenshot_url: z.string().optional(),
|
|
283
|
+
message_id: z.string().optional(),
|
|
284
|
+
name: z.string().optional(),
|
|
285
|
+
status: z.string().optional(),
|
|
286
|
+
url: z.string().optional(),
|
|
287
|
+
visibility: z.string().optional(),
|
|
288
|
+
workspace_id: z.string().optional()
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
export const PublicV1DeployProjectInputBodySchema = z.object({
|
|
292
|
+
name: z.string().optional(),
|
|
293
|
+
project_id: z.string()
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
export const PublicV1EnableDatabaseInputBodySchema = z.object({
|
|
297
|
+
project_id: z.string()
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
export const PublicV1GitFilesResponseSchema = z.object({
|
|
301
|
+
data: z.array(GitFileEntryLiteSchema).nullable(),
|
|
302
|
+
pagination: PaginationSchema,
|
|
303
|
+
ref: z.string()
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
export const PublicV1PatchProjectBodySchema = z.object({
|
|
307
|
+
display_name: z.string().optional(),
|
|
308
|
+
visibility: z.enum([
|
|
309
|
+
'draft',
|
|
310
|
+
'private',
|
|
311
|
+
'public',
|
|
312
|
+
'workspace_view'
|
|
313
|
+
]).optional()
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
export const PublicV1ProjectFileUploadUrlInputBodySchema = z.object({
|
|
317
|
+
content_type: z.string().optional(),
|
|
318
|
+
project_id: z.string()
|
|
319
|
+
});
|
|
320
|
+
|
|
321
|
+
export const PublicV1ProjectRemixInputBodySchema = z.object({
|
|
322
|
+
description: z.string().min(1).optional(),
|
|
323
|
+
display_name: z.string().optional(),
|
|
324
|
+
include_custom_knowledge: z.boolean().optional(),
|
|
325
|
+
include_history: z.boolean().optional(),
|
|
326
|
+
initial_message: z.string().optional(),
|
|
327
|
+
message_id: z.string().optional(),
|
|
328
|
+
remix_mode: z.enum(['before', 'including']).optional(),
|
|
329
|
+
skip_initial_remix_message: z.boolean().optional(),
|
|
330
|
+
skip_integrations: z.boolean().optional(),
|
|
331
|
+
source_project_id: z.string().min(1).regex(/.*\S.*/),
|
|
332
|
+
workspace_id: z.string()
|
|
333
|
+
});
|
|
334
|
+
|
|
335
|
+
export const PublicV1SetProjectKnowledgeInputBodySchema = z.object({
|
|
336
|
+
content: z.string(),
|
|
337
|
+
project_id: z.string()
|
|
338
|
+
});
|
|
339
|
+
|
|
340
|
+
export const PublicV1SetProjectSkillEnabledInputBodySchema = z.object({
|
|
341
|
+
enabled: z.boolean(),
|
|
342
|
+
project_id: z.string()
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
export const RemixJobStepInfoSchema = z.object({
|
|
346
|
+
integration_name: z.string().optional(),
|
|
347
|
+
status: z.string().optional(),
|
|
348
|
+
step: z.string()
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
export const SeamlessConnectorApiSchema = z.object({
|
|
352
|
+
alias: z.string().optional(),
|
|
353
|
+
categories: z.array(z.string()).nullable(),
|
|
354
|
+
creator: CommonSeamlessConnectorCreatorSchema,
|
|
355
|
+
description: z.string(),
|
|
356
|
+
display_name: z.string(),
|
|
357
|
+
documentation_url: z.string(),
|
|
358
|
+
features: z.array(CommonSeamlessConnectorFeatureSchema).nullish(),
|
|
359
|
+
id: z.string(),
|
|
360
|
+
is_enabled_for_workspace: z.boolean(),
|
|
361
|
+
level: z.string(),
|
|
362
|
+
logo_id: z.string().optional(),
|
|
363
|
+
manual_connect_hint: z.string().optional(),
|
|
364
|
+
permissions: z.array(CommonSeamlessConnectorPermissionSchema).nullable(),
|
|
365
|
+
searchTags: z.array(z.string()).nullish(),
|
|
366
|
+
short_description: z.string(),
|
|
367
|
+
toolIntegrationName: z.string().optional()
|
|
368
|
+
});
|
|
369
|
+
|
|
370
|
+
export const SeamlessConnectorSettingSchema = z.object({
|
|
371
|
+
enabled: z.boolean(),
|
|
372
|
+
name: z.string()
|
|
373
|
+
});
|
|
374
|
+
|
|
375
|
+
export const SearchProjectItemSchema = z.object({
|
|
376
|
+
abandoned_at: z.iso.datetime().optional(),
|
|
377
|
+
abandoned_dismissed_at: z.iso.datetime().optional(),
|
|
378
|
+
abandoned_threshold_days: z.number().optional(),
|
|
379
|
+
access_level: z.string().optional(),
|
|
380
|
+
activity_group: z.string().optional(),
|
|
381
|
+
app_visitors_24h: z.number().optional(),
|
|
382
|
+
app_visitors_30d: z.number().optional(),
|
|
383
|
+
app_visitors_7d: z.number().optional(),
|
|
384
|
+
category: z.string().optional(),
|
|
385
|
+
created_at: z.iso.datetime().optional(),
|
|
386
|
+
created_by: z.string().optional(),
|
|
387
|
+
deleted_at: z.iso.datetime().optional(),
|
|
388
|
+
description: z.string().optional(),
|
|
389
|
+
design_system_published_version: z.string().optional(),
|
|
390
|
+
display_name: z.string().optional(),
|
|
391
|
+
edit_count: z.number().optional(),
|
|
392
|
+
edits_24h: z.number().optional(),
|
|
393
|
+
edits_30d: z.number().optional(),
|
|
394
|
+
edits_7d: z.number().optional(),
|
|
395
|
+
exclude_from_being_read: z.boolean().optional(),
|
|
396
|
+
feature_rank: z.number().optional(),
|
|
397
|
+
folder_id: z.string().optional(),
|
|
398
|
+
id: z.string(),
|
|
399
|
+
is_deleted: z.boolean(),
|
|
400
|
+
is_profile_published: z.boolean().optional(),
|
|
401
|
+
is_published: z.boolean().optional(),
|
|
402
|
+
is_starred: z.boolean(),
|
|
403
|
+
is_template: z.boolean().optional(),
|
|
404
|
+
last_edited_at: z.iso.datetime().optional(),
|
|
405
|
+
last_viewed_at: z.iso.datetime().optional(),
|
|
406
|
+
latest_screenshot_url: z.string().optional(),
|
|
407
|
+
name: z.string().optional(),
|
|
408
|
+
og_image_url: z.string().optional(),
|
|
409
|
+
project_type: z.string().optional(),
|
|
410
|
+
publish_visibility: z.enum(['public', 'private']).optional(),
|
|
411
|
+
reasons: z.unknown().optional(),
|
|
412
|
+
remix_count: z.number().optional(),
|
|
413
|
+
risk_level: z.string().optional(),
|
|
414
|
+
risk_level_rank: z.number().optional(),
|
|
415
|
+
risk_score: z.number().optional(),
|
|
416
|
+
shared_context_admin_isolated: z.boolean().optional(),
|
|
417
|
+
signals: z.unknown().optional(),
|
|
418
|
+
signals_updated_at: z.iso.datetime().optional(),
|
|
419
|
+
status: z.string().optional(),
|
|
420
|
+
tech_stack: z.string().optional(),
|
|
421
|
+
trending_score: z.number().optional(),
|
|
422
|
+
updated_at: z.iso.datetime().optional(),
|
|
423
|
+
url: z.string().optional(),
|
|
424
|
+
user_display_name: z.string().optional(),
|
|
425
|
+
user_id: z.string(),
|
|
426
|
+
user_photo_url: z.string().optional(),
|
|
427
|
+
visibility: z.enum([
|
|
428
|
+
'public',
|
|
429
|
+
'private',
|
|
430
|
+
'draft',
|
|
431
|
+
'workspace_view'
|
|
432
|
+
]).optional(),
|
|
433
|
+
workspace_id: z.string()
|
|
434
|
+
});
|
|
435
|
+
|
|
436
|
+
export const CursorListResponseSearchProjectItemSchema = z.object({
|
|
437
|
+
data: z.array(SearchProjectItemSchema).nullable(),
|
|
438
|
+
pagination: PaginationSchema
|
|
439
|
+
});
|
|
440
|
+
|
|
441
|
+
export const SearchWorkspaceProjectsResponseSchema = z.object({
|
|
442
|
+
has_more: z.boolean(),
|
|
443
|
+
projects: z.array(SearchProjectItemSchema).nullable(),
|
|
444
|
+
total: z.number()
|
|
445
|
+
});
|
|
446
|
+
|
|
447
|
+
export const SkippedProjectInfoSchema = z.object({
|
|
448
|
+
project_id: z.string(),
|
|
449
|
+
reason: z.string()
|
|
450
|
+
});
|
|
451
|
+
|
|
452
|
+
export const StandardConnectorPromotionSchema = z.object({
|
|
453
|
+
help_link: z.string(),
|
|
454
|
+
link: z.string(),
|
|
455
|
+
message: z.string(),
|
|
456
|
+
until: z.iso.datetime()
|
|
457
|
+
});
|
|
458
|
+
|
|
459
|
+
export const StandardConnectorApiSchema = z.object({
|
|
460
|
+
auth_type: z.enum([
|
|
461
|
+
'APIKEY',
|
|
462
|
+
'OAUTH2',
|
|
463
|
+
'OAUTH2_CLIENT_CREDENTIALS',
|
|
464
|
+
'WIF',
|
|
465
|
+
'STEPS'
|
|
466
|
+
]),
|
|
467
|
+
can_be_managed: z.boolean(),
|
|
468
|
+
can_restrict_to_admins: z.boolean(),
|
|
469
|
+
categories: z.array(z.enum([
|
|
470
|
+
'ecommerce',
|
|
471
|
+
'marketing',
|
|
472
|
+
'productivity',
|
|
473
|
+
'sales',
|
|
474
|
+
'support',
|
|
475
|
+
'other',
|
|
476
|
+
'messaging',
|
|
477
|
+
'coming_soon',
|
|
478
|
+
'development',
|
|
479
|
+
'payments',
|
|
480
|
+
'custom'
|
|
481
|
+
])),
|
|
482
|
+
coming_soon: z.boolean().optional(),
|
|
483
|
+
connection_scope: z.enum(['project', 'workspace']),
|
|
484
|
+
creator: CreatorSchema,
|
|
485
|
+
data_scope: z.enum(['organization', 'individual']),
|
|
486
|
+
description: z.string(),
|
|
487
|
+
display_name: z.string(),
|
|
488
|
+
documentation_url: z.string(),
|
|
489
|
+
features: z.array(FeatureDescriptionSchema).nullish(),
|
|
490
|
+
has_connections: z.boolean(),
|
|
491
|
+
id: z.string(),
|
|
492
|
+
is_enabled_for_workspace: z.boolean(),
|
|
493
|
+
is_new: z.boolean().optional(),
|
|
494
|
+
logo_id: z.string(),
|
|
495
|
+
promotion: StandardConnectorPromotionSchema.optional(),
|
|
496
|
+
searchTags: z.array(z.string()),
|
|
497
|
+
short_description: z.string(),
|
|
498
|
+
single_connection: z.boolean().optional(),
|
|
499
|
+
source: z.enum(['native', 'user_defined']).optional(),
|
|
500
|
+
terms_url: z.string().optional(),
|
|
501
|
+
vendor: z.enum(['google', 'microsoft']).optional(),
|
|
502
|
+
who_can_create: z.enum(['editors_and_admins', 'admins_only'])
|
|
503
|
+
});
|
|
504
|
+
|
|
505
|
+
export const StandardConnectorSettingSchema = z.object({
|
|
506
|
+
enabled: z.boolean(),
|
|
507
|
+
name: z.string(),
|
|
508
|
+
who_can_create: z.string().optional()
|
|
509
|
+
});
|
|
510
|
+
|
|
511
|
+
export const TemplateProjectResponseSchema = z.object({
|
|
512
|
+
description: z.string(),
|
|
513
|
+
id: z.string(),
|
|
514
|
+
name: z.string().nullable(),
|
|
515
|
+
updated_at: z.string()
|
|
516
|
+
});
|
|
517
|
+
|
|
518
|
+
export const GetAvailableTemplateProjectsPublicV1OutputBodySchema = z.object({
|
|
519
|
+
has_more: z.boolean(),
|
|
520
|
+
templates: z.array(TemplateProjectResponseSchema).nullable(),
|
|
521
|
+
total: z.number()
|
|
522
|
+
});
|
|
523
|
+
|
|
524
|
+
export const TimeSeriesDataPointSchema = z.object({
|
|
525
|
+
date: z.string(),
|
|
526
|
+
value: z.number()
|
|
527
|
+
});
|
|
528
|
+
|
|
529
|
+
export const TimeSeriesDataSchema = z.object({
|
|
530
|
+
data: z.array(TimeSeriesDataPointSchema).nullable(),
|
|
531
|
+
label: z.string(),
|
|
532
|
+
total: z.number()
|
|
533
|
+
});
|
|
534
|
+
|
|
535
|
+
export const TimeSeriesGroupSchema = z.object({
|
|
536
|
+
bounceRate: TimeSeriesDataSchema,
|
|
537
|
+
pageviews: TimeSeriesDataSchema,
|
|
538
|
+
pageviewsPerVisit: TimeSeriesDataSchema,
|
|
539
|
+
sessionDuration: TimeSeriesDataSchema,
|
|
540
|
+
visitors: TimeSeriesDataSchema
|
|
541
|
+
});
|
|
542
|
+
|
|
543
|
+
export const ProjectAnalyticsResponseSchema = z.object({
|
|
544
|
+
lists: ListsGroupSchema,
|
|
545
|
+
timeSeries: TimeSeriesGroupSchema
|
|
546
|
+
});
|
|
547
|
+
|
|
548
|
+
export const ToolDisplayDataSchema = z.object({
|
|
549
|
+
description: z.string(),
|
|
550
|
+
input_schema: z.unknown().optional(),
|
|
551
|
+
name: z.string()
|
|
552
|
+
});
|
|
553
|
+
|
|
554
|
+
export const McpConnectorSchema = z.object({
|
|
555
|
+
app_mcp_auth_method: z.string().optional(),
|
|
556
|
+
app_mcp_project_id: z.string().optional(),
|
|
557
|
+
app_mcp_server_id: z.string().optional(),
|
|
558
|
+
category: z.enum([
|
|
559
|
+
'ecommerce',
|
|
560
|
+
'marketing',
|
|
561
|
+
'productivity',
|
|
562
|
+
'sales',
|
|
563
|
+
'support',
|
|
564
|
+
'other',
|
|
565
|
+
'messaging',
|
|
566
|
+
'coming_soon',
|
|
567
|
+
'development',
|
|
568
|
+
'payments',
|
|
569
|
+
'custom'
|
|
570
|
+
]),
|
|
571
|
+
connect_interaction: z.enum(['desktop_app_download']).optional(),
|
|
572
|
+
connection_id: z.string().optional(),
|
|
573
|
+
connector_id: z.string().optional(),
|
|
574
|
+
creator: McpConnectorCreatorStructSchema,
|
|
575
|
+
custom_url_hint: z.string().optional(),
|
|
576
|
+
display_name: z.string(),
|
|
577
|
+
documentation_url: z.string().optional(),
|
|
578
|
+
icon_url: z.string().optional(),
|
|
579
|
+
id: z.string(),
|
|
580
|
+
info: z.string().optional(),
|
|
581
|
+
integration_id: z.string().optional(),
|
|
582
|
+
is_connected: z.boolean().optional(),
|
|
583
|
+
is_enabled_for_workspace: z.boolean(),
|
|
584
|
+
launched: z.boolean(),
|
|
585
|
+
parent_registry_id: z.string().optional(),
|
|
586
|
+
platform_availability: z.array(z.enum(['webapp', 'desktop'])).optional(),
|
|
587
|
+
refresh_failures: z.number().optional(),
|
|
588
|
+
requires_custom_url: z.boolean().optional(),
|
|
589
|
+
searchTags: z.array(z.string()).optional(),
|
|
590
|
+
server_url: z.string().optional(),
|
|
591
|
+
status: z.enum([
|
|
592
|
+
'connected',
|
|
593
|
+
'available',
|
|
594
|
+
'disabled'
|
|
595
|
+
]),
|
|
596
|
+
summary: z.string(),
|
|
597
|
+
tools: z.array(ToolDisplayDataSchema).optional(),
|
|
598
|
+
url: z.string().optional(),
|
|
599
|
+
url_placeholder: z.string().optional()
|
|
600
|
+
});
|
|
601
|
+
|
|
602
|
+
export const TrendDataPointSchema = z.object({
|
|
603
|
+
time: z.string(),
|
|
604
|
+
visits: z.number()
|
|
605
|
+
});
|
|
606
|
+
|
|
607
|
+
export const ProjectTrendResponseSchema = z.object({
|
|
608
|
+
currentVisitors: z.number(),
|
|
609
|
+
data: z.array(TrendDataPointSchema).nullable()
|
|
610
|
+
});
|
|
611
|
+
|
|
612
|
+
export const V1AddConnectorInputBodySchema = z.object({
|
|
613
|
+
auth_type: z.enum(['none', 'bearer_token']),
|
|
614
|
+
connector_id: z.string().optional(),
|
|
615
|
+
name: z.string().min(1),
|
|
616
|
+
network_transport_endpoint_id: z.string().optional(),
|
|
617
|
+
network_transport_profile_id: z.string().optional(),
|
|
618
|
+
network_transport_type: z.string().optional(),
|
|
619
|
+
relay_client_id: z.string().optional(),
|
|
620
|
+
relay_service_name: z.string().optional(),
|
|
621
|
+
token: z.string().optional(),
|
|
622
|
+
url: z.string().optional()
|
|
623
|
+
});
|
|
624
|
+
|
|
625
|
+
export const V1AvailableConnectorEntrySchema = z.object({
|
|
626
|
+
category: z.string(),
|
|
627
|
+
display_name: z.string(),
|
|
628
|
+
documentation_url: z.string().optional(),
|
|
629
|
+
id: z.string(),
|
|
630
|
+
requires_custom_url: z.boolean().optional(),
|
|
631
|
+
summary: z.string()
|
|
632
|
+
});
|
|
633
|
+
|
|
634
|
+
export const CursorListResponseV1AvailableConnectorEntrySchema = z.object({
|
|
635
|
+
data: z.array(V1AvailableConnectorEntrySchema).nullable(),
|
|
636
|
+
pagination: PaginationSchema
|
|
637
|
+
});
|
|
638
|
+
|
|
639
|
+
export const V1AwaitingInputSummarySchema = z.object({
|
|
640
|
+
event_id: z.string(),
|
|
641
|
+
input_schema: z.unknown().optional(),
|
|
642
|
+
prev_session_id: z.string().optional()
|
|
643
|
+
});
|
|
644
|
+
|
|
645
|
+
export const V1AiResponseSummarySchema = z.object({
|
|
646
|
+
awaiting_input: V1AwaitingInputSummarySchema.optional(),
|
|
647
|
+
commit_sha: z.string().optional(),
|
|
648
|
+
content: z.string(),
|
|
649
|
+
cost_credits: z.number().optional(),
|
|
650
|
+
edit_id: z.string().optional(),
|
|
651
|
+
message_id: z.string(),
|
|
652
|
+
status: z.string(),
|
|
653
|
+
summary: z.string().optional()
|
|
654
|
+
});
|
|
655
|
+
|
|
656
|
+
export const V1BillingPeriodSchema = z.object({
|
|
657
|
+
end: z.iso.datetime(),
|
|
658
|
+
start: z.iso.datetime()
|
|
659
|
+
});
|
|
660
|
+
|
|
661
|
+
export const V1ConnectionItemSchema = z.object({
|
|
662
|
+
connector_id: z.string(),
|
|
663
|
+
created_at: z.string(),
|
|
664
|
+
display_name: z.string(),
|
|
665
|
+
id: z.string(),
|
|
666
|
+
is_managed: z.boolean(),
|
|
667
|
+
status: z.string(),
|
|
668
|
+
updated_at: z.string()
|
|
669
|
+
});
|
|
670
|
+
|
|
671
|
+
export const CursorListResponseV1ConnectionItemSchema = z.object({
|
|
672
|
+
data: z.array(V1ConnectionItemSchema).nullable(),
|
|
673
|
+
pagination: PaginationSchema
|
|
674
|
+
});
|
|
675
|
+
|
|
676
|
+
export const V1ConnectorResponseSchema = z.object({
|
|
677
|
+
auth_type: z.string(),
|
|
678
|
+
connector_id: z.string().optional(),
|
|
679
|
+
id: z.string(),
|
|
680
|
+
is_connected: z.boolean(),
|
|
681
|
+
name: z.string(),
|
|
682
|
+
url: z.string().optional()
|
|
683
|
+
});
|
|
684
|
+
|
|
685
|
+
export const V1CreateEmbedUrlInputBodySchema = z.object({
|
|
686
|
+
parent_origin: z.string()
|
|
687
|
+
});
|
|
688
|
+
|
|
689
|
+
export const V1CreateEmbedUrlOutputBodySchema = z.object({
|
|
690
|
+
embed_url: z.string(),
|
|
691
|
+
expires_at: z.iso.datetime()
|
|
692
|
+
});
|
|
693
|
+
|
|
694
|
+
export const V1CreateProjectResponseSchema = z.object({
|
|
695
|
+
description: z.string().optional(),
|
|
696
|
+
display_name: z.string().optional(),
|
|
697
|
+
embed_url: z.string().optional(),
|
|
698
|
+
id: z.string(),
|
|
699
|
+
is_published: z.boolean().optional(),
|
|
700
|
+
latest_commit_sha: z.string().optional(),
|
|
701
|
+
latest_screenshot_url: z.string().optional(),
|
|
702
|
+
message_id: z.string().optional(),
|
|
703
|
+
name: z.string().optional(),
|
|
704
|
+
status: z.string().optional(),
|
|
705
|
+
url: z.string().optional(),
|
|
706
|
+
visibility: z.string().optional(),
|
|
707
|
+
workspace_id: z.string()
|
|
708
|
+
});
|
|
709
|
+
|
|
710
|
+
export const V1CreateVariantInputBodySchema = z.object({
|
|
711
|
+
base_sha: z.string().optional(),
|
|
712
|
+
label: z.string().optional()
|
|
713
|
+
});
|
|
714
|
+
|
|
715
|
+
export const V1CreateVariantOutputBodySchema = z.object({
|
|
716
|
+
branch: z.string(),
|
|
717
|
+
label: z.string(),
|
|
718
|
+
thread_id: z.string(),
|
|
719
|
+
variant_id: z.string()
|
|
720
|
+
});
|
|
721
|
+
|
|
722
|
+
export const V1CreditHistoryEntrySchema = z.object({
|
|
723
|
+
credits_change: z.number(),
|
|
724
|
+
event_type: z.enum([
|
|
725
|
+
'granted',
|
|
726
|
+
'expired',
|
|
727
|
+
'adjustment',
|
|
728
|
+
'converted'
|
|
729
|
+
]),
|
|
730
|
+
grant_type: z.enum([
|
|
731
|
+
'billing',
|
|
732
|
+
'rollover',
|
|
733
|
+
'granted',
|
|
734
|
+
'topup',
|
|
735
|
+
'commitment',
|
|
736
|
+
'cashback',
|
|
737
|
+
'daily'
|
|
738
|
+
]),
|
|
739
|
+
id: z.string(),
|
|
740
|
+
label: z.string(),
|
|
741
|
+
occurred_at: z.iso.datetime()
|
|
742
|
+
});
|
|
743
|
+
|
|
744
|
+
export const V1DeleteWorkspaceSkillOutputBodySchema = z.object({
|
|
745
|
+
commit_sha: z.string()
|
|
746
|
+
});
|
|
747
|
+
|
|
748
|
+
export const V1DeployProjectInputBodySchema = z.object({
|
|
749
|
+
name: z.string().optional()
|
|
750
|
+
});
|
|
751
|
+
|
|
752
|
+
export const V1DeployProjectOutputBodySchema = z.object({
|
|
753
|
+
deployment_id: z.string().optional(),
|
|
754
|
+
status: z.string(),
|
|
755
|
+
url: z.string().optional()
|
|
756
|
+
});
|
|
757
|
+
|
|
758
|
+
export const V1DiffEntrySchema = z.object({
|
|
759
|
+
action: z.string(),
|
|
760
|
+
file_path: z.string(),
|
|
761
|
+
file_type: z.string().optional(),
|
|
762
|
+
hunks: z.array(DiffHunkSchema).nullish(),
|
|
763
|
+
is_image: z.boolean(),
|
|
764
|
+
is_incomplete: z.boolean().optional(),
|
|
765
|
+
original_file_path: z.string().optional()
|
|
766
|
+
});
|
|
767
|
+
|
|
768
|
+
export const V1DiffResponseSchema = z.object({
|
|
769
|
+
diffs: z.array(V1DiffEntrySchema).nullable(),
|
|
770
|
+
error: z.string().optional()
|
|
771
|
+
});
|
|
772
|
+
|
|
773
|
+
export const V1EditSummarySchema = z.object({
|
|
774
|
+
commit_message: z.string().optional(),
|
|
775
|
+
commit_sha: z.string().optional(),
|
|
776
|
+
created_at: z.string(),
|
|
777
|
+
id: z.string(),
|
|
778
|
+
status: z.string(),
|
|
779
|
+
type: z.string()
|
|
780
|
+
});
|
|
781
|
+
|
|
782
|
+
export const V1EnableDatabaseOutputBodySchema = z.object({
|
|
783
|
+
enabled: z.boolean(),
|
|
784
|
+
stack: z.string()
|
|
785
|
+
});
|
|
786
|
+
|
|
787
|
+
export const V1EphemeralFileUploadUrlInputBodySchema = z.object({
|
|
788
|
+
content_type: z.string().optional()
|
|
789
|
+
});
|
|
790
|
+
|
|
791
|
+
export const V1FileUploadUrlOutputBodySchema = z.object({
|
|
792
|
+
file_id: z.string(),
|
|
793
|
+
headers: z.record(z.string(), z.string()).optional(),
|
|
794
|
+
url: z.string()
|
|
795
|
+
});
|
|
796
|
+
|
|
797
|
+
export const V1GetDatabaseStatusOutputBodySchema = z.object({
|
|
798
|
+
enabled: z.boolean(),
|
|
799
|
+
stack: z.string().optional()
|
|
800
|
+
});
|
|
801
|
+
|
|
802
|
+
export const V1GetEditsOutputBodySchema = z.object({
|
|
803
|
+
edits: z.array(V1EditSummarySchema).nullable(),
|
|
804
|
+
has_more: z.boolean()
|
|
805
|
+
});
|
|
806
|
+
|
|
807
|
+
export const V1KnowledgeResponseSchema = z.object({
|
|
808
|
+
content: z.string()
|
|
809
|
+
});
|
|
810
|
+
|
|
811
|
+
export const V1ListAppUserConnectorsResponseSchema = z.object({
|
|
812
|
+
connectors: z.array(AppUserConnectorApiSchema).nullable(),
|
|
813
|
+
has_more: z.boolean(),
|
|
814
|
+
total: z.number()
|
|
815
|
+
});
|
|
816
|
+
|
|
817
|
+
export const V1ListAvailableConnectorsOutputBodySchema = z.object({
|
|
818
|
+
catalog: z.array(V1AvailableConnectorEntrySchema).nullable(),
|
|
819
|
+
has_more: z.boolean(),
|
|
820
|
+
total: z.number()
|
|
821
|
+
});
|
|
822
|
+
|
|
823
|
+
export const V1ListConnectionsResponseSchema = z.object({
|
|
824
|
+
connections: z.array(V1ConnectionItemSchema).nullable(),
|
|
825
|
+
has_more: z.boolean(),
|
|
826
|
+
total: z.number()
|
|
827
|
+
});
|
|
828
|
+
|
|
829
|
+
export const V1ListConnectorsOutputBodySchema = z.object({
|
|
830
|
+
connectors: z.array(V1ConnectorResponseSchema).nullable(),
|
|
831
|
+
has_more: z.boolean(),
|
|
832
|
+
total: z.number()
|
|
833
|
+
});
|
|
834
|
+
|
|
835
|
+
export const V1ListMcpConnectorsResponseSchema = z.object({
|
|
836
|
+
connectors: z.array(McpConnectorSchema).nullable(),
|
|
837
|
+
custom_disabled_by_admin: z.boolean(),
|
|
838
|
+
custom_enabled: z.boolean(),
|
|
839
|
+
has_more: z.boolean(),
|
|
840
|
+
local_enabled: z.boolean(),
|
|
841
|
+
total: z.number()
|
|
842
|
+
});
|
|
843
|
+
|
|
844
|
+
export const V1ListSeamlessConnectorsResponseSchema = z.object({
|
|
845
|
+
connectors: z.array(SeamlessConnectorApiSchema).nullable(),
|
|
846
|
+
has_more: z.boolean(),
|
|
847
|
+
total: z.number()
|
|
848
|
+
});
|
|
849
|
+
|
|
850
|
+
export const V1ListStandardConnectorsResponseSchema = z.object({
|
|
851
|
+
connectors: z.array(StandardConnectorApiSchema).nullable(),
|
|
852
|
+
has_more: z.boolean(),
|
|
853
|
+
total: z.number()
|
|
854
|
+
});
|
|
855
|
+
|
|
856
|
+
export const V1MessageListItemSchema = z.object({
|
|
857
|
+
content: z.string(),
|
|
858
|
+
created_at: z.string(),
|
|
859
|
+
edit_id: z.string().optional(),
|
|
860
|
+
message_id: z.string(),
|
|
861
|
+
role: z.string(),
|
|
862
|
+
status: z.string()
|
|
863
|
+
});
|
|
864
|
+
|
|
865
|
+
export const CursorListResponseV1MessageListItemSchema = z.object({
|
|
866
|
+
data: z.array(V1MessageListItemSchema).nullable(),
|
|
867
|
+
pagination: PaginationSchema
|
|
868
|
+
});
|
|
869
|
+
|
|
870
|
+
export const V1ListMessagesOutputBodySchema = z.object({
|
|
871
|
+
has_more: z.boolean(),
|
|
872
|
+
messages: z.array(V1MessageListItemSchema).nullable()
|
|
873
|
+
});
|
|
874
|
+
|
|
875
|
+
export const V1MessageResponseSchema = z.object({
|
|
876
|
+
awaiting_input: V1AwaitingInputSummarySchema.optional(),
|
|
877
|
+
commit_sha: z.string().optional(),
|
|
878
|
+
content: z.string(),
|
|
879
|
+
cost_credits: z.number().optional(),
|
|
880
|
+
created_at: z.string(),
|
|
881
|
+
edit_id: z.string().optional(),
|
|
882
|
+
message_id: z.string(),
|
|
883
|
+
queue_pause_reason: z.string().optional(),
|
|
884
|
+
queue_paused: z.boolean().optional(),
|
|
885
|
+
queue_position: z.number().optional(),
|
|
886
|
+
response: V1AiResponseSummarySchema.optional(),
|
|
887
|
+
role: z.string(),
|
|
888
|
+
status: z.string(),
|
|
889
|
+
summary: z.string().optional()
|
|
890
|
+
});
|
|
891
|
+
|
|
892
|
+
export const V1MoveProjectsToFolderInputBodySchema = z.object({
|
|
893
|
+
project_ids: z.array(z.string()).min(1).max(30).nullable()
|
|
894
|
+
});
|
|
895
|
+
|
|
896
|
+
export const V1ProjectCollaboratorSchema = z.object({
|
|
897
|
+
accepted_at: z.iso.datetime().optional(),
|
|
898
|
+
access_level: z.enum([
|
|
899
|
+
'owner',
|
|
900
|
+
'admin',
|
|
901
|
+
'write',
|
|
902
|
+
'read',
|
|
903
|
+
'none'
|
|
904
|
+
]),
|
|
905
|
+
display_name: z.string().optional(),
|
|
906
|
+
email: z.string().optional(),
|
|
907
|
+
invited_at: z.iso.datetime().optional(),
|
|
908
|
+
invited_by: z.string().optional(),
|
|
909
|
+
is_internal: z.boolean(),
|
|
910
|
+
is_workspace_member: z.boolean(),
|
|
911
|
+
user_id: z.string()
|
|
912
|
+
});
|
|
913
|
+
|
|
914
|
+
export const CursorListResponseV1ProjectCollaboratorSchema = z.object({
|
|
915
|
+
data: z.array(V1ProjectCollaboratorSchema).nullable(),
|
|
916
|
+
pagination: PaginationSchema
|
|
917
|
+
});
|
|
918
|
+
|
|
919
|
+
export const V1ProjectFileUploadUrlInputBodySchema = z.object({
|
|
920
|
+
content_type: z.string().optional()
|
|
921
|
+
});
|
|
922
|
+
|
|
923
|
+
export const V1ProjectGitFilesResponseSchema = z.object({
|
|
924
|
+
files: z.array(GitFileEntrySchema).nullable(),
|
|
925
|
+
has_more: z.boolean(),
|
|
926
|
+
ref: z.string(),
|
|
927
|
+
total: z.number()
|
|
928
|
+
});
|
|
929
|
+
|
|
930
|
+
export const V1ProjectResponseSchema = z.object({
|
|
931
|
+
description: z.string().optional(),
|
|
932
|
+
display_name: z.string().optional(),
|
|
933
|
+
embed_url: z.string().optional(),
|
|
934
|
+
id: z.string(),
|
|
935
|
+
is_published: z.boolean().optional(),
|
|
936
|
+
latest_commit_sha: z.string().optional(),
|
|
937
|
+
latest_screenshot_url: z.string().optional(),
|
|
938
|
+
name: z.string().optional(),
|
|
939
|
+
status: z.string().optional(),
|
|
940
|
+
url: z.string().optional(),
|
|
941
|
+
visibility: z.string().optional(),
|
|
942
|
+
workspace_id: z.string()
|
|
943
|
+
});
|
|
944
|
+
|
|
945
|
+
export const V1ProjectSkillDtoSchema = z.object({
|
|
946
|
+
description: z.string(),
|
|
947
|
+
enabled: z.boolean(),
|
|
948
|
+
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
949
|
+
name: z.string()
|
|
950
|
+
});
|
|
951
|
+
|
|
952
|
+
export const CursorListResponseV1ProjectSkillDtoSchema = z.object({
|
|
953
|
+
data: z.array(V1ProjectSkillDtoSchema).nullable(),
|
|
954
|
+
pagination: PaginationSchema
|
|
955
|
+
});
|
|
956
|
+
|
|
957
|
+
export const V1ListProjectSkillsOutputBodySchema = z.object({
|
|
958
|
+
has_more: z.boolean(),
|
|
959
|
+
skills: z.array(V1ProjectSkillDtoSchema).nullable(),
|
|
960
|
+
total: z.number()
|
|
961
|
+
});
|
|
962
|
+
|
|
963
|
+
export const V1RemixInitInputBodySchema = z.object({
|
|
964
|
+
description: z.string().optional(),
|
|
965
|
+
include_custom_knowledge: z.boolean().optional(),
|
|
966
|
+
include_history: z.boolean().optional(),
|
|
967
|
+
initial_message: z.string().optional(),
|
|
968
|
+
message_id: z.string().optional(),
|
|
969
|
+
project_name: z.string().optional(),
|
|
970
|
+
remix_mode: z.enum(['before', 'including']).optional(),
|
|
971
|
+
skip_initial_remix_message: z.boolean().optional(),
|
|
972
|
+
skip_integrations: z.boolean().optional(),
|
|
973
|
+
workspace_id: z.string()
|
|
974
|
+
});
|
|
975
|
+
|
|
976
|
+
export const V1RemixInitOutputBodySchema = z.object({
|
|
977
|
+
job_id: z.string()
|
|
978
|
+
});
|
|
979
|
+
|
|
980
|
+
export const V1RemixProgressResultSchema = z.object({
|
|
981
|
+
project_id: z.string()
|
|
982
|
+
});
|
|
983
|
+
|
|
984
|
+
export const V1RemixProgressOutputBodySchema = z.object({
|
|
985
|
+
error_code: z.string().optional(),
|
|
986
|
+
error_message: z.string().optional(),
|
|
987
|
+
result: V1RemixProgressResultSchema.optional(),
|
|
988
|
+
status: z.string(),
|
|
989
|
+
step: RemixJobStepInfoSchema.optional()
|
|
990
|
+
});
|
|
991
|
+
|
|
992
|
+
export const V1RemoveConnectorOutputBodySchema = z.object({
|
|
993
|
+
success: z.boolean()
|
|
994
|
+
});
|
|
995
|
+
|
|
996
|
+
export const V1SecurityFindingSchema = z.object({
|
|
997
|
+
category: z.string().optional(),
|
|
998
|
+
connector_id: z.string().optional(),
|
|
999
|
+
created_at: z.iso.datetime(),
|
|
1000
|
+
description: z.string().optional(),
|
|
1001
|
+
details: z.string().optional(),
|
|
1002
|
+
finding_id: z.string(),
|
|
1003
|
+
first_seen_scan_id: z.string().optional(),
|
|
1004
|
+
level: z.string(),
|
|
1005
|
+
link: z.string().optional(),
|
|
1006
|
+
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
1007
|
+
name: z.string(),
|
|
1008
|
+
recurrence: z.number(),
|
|
1009
|
+
remediation_difficulty: z.string().optional(),
|
|
1010
|
+
scanner_name: z.string(),
|
|
1011
|
+
status: z.string(),
|
|
1012
|
+
updated_at: z.iso.datetime()
|
|
1013
|
+
});
|
|
1014
|
+
|
|
1015
|
+
export const V1SecurityScanSummarySchema = z.object({
|
|
1016
|
+
commit_sha: z.string().optional(),
|
|
1017
|
+
finished_at: z.iso.datetime().optional(),
|
|
1018
|
+
requested_scanners: z.array(z.string()).nullable(),
|
|
1019
|
+
scan_id: z.string(),
|
|
1020
|
+
started_at: z.iso.datetime(),
|
|
1021
|
+
status: z.string(),
|
|
1022
|
+
trigger_source: z.string(),
|
|
1023
|
+
triggered_by: z.string().optional()
|
|
1024
|
+
});
|
|
1025
|
+
|
|
1026
|
+
export const CursorListResponseV1SecurityScanSummarySchema = z.object({
|
|
1027
|
+
data: z.array(V1SecurityScanSummarySchema).nullable(),
|
|
1028
|
+
pagination: PaginationSchema
|
|
1029
|
+
});
|
|
1030
|
+
|
|
1031
|
+
export const V1SecurityScannerRunSchema = z.object({
|
|
1032
|
+
commit_sha: z.string().optional(),
|
|
1033
|
+
error_message: z.string().optional(),
|
|
1034
|
+
finished_at: z.iso.datetime().optional(),
|
|
1035
|
+
scanner_name: z.string(),
|
|
1036
|
+
scanner_version: z.string().optional(),
|
|
1037
|
+
started_at: z.iso.datetime(),
|
|
1038
|
+
status: z.string()
|
|
1039
|
+
});
|
|
1040
|
+
|
|
1041
|
+
export const V1GetSecurityScanOutputBodySchema = z.object({
|
|
1042
|
+
findings: z.array(V1SecurityFindingSchema).nullable(),
|
|
1043
|
+
scan: V1SecurityScanSummarySchema,
|
|
1044
|
+
scanner_runs: z.array(V1SecurityScannerRunSchema).nullable()
|
|
1045
|
+
});
|
|
1046
|
+
|
|
1047
|
+
export const V1SelectedLibrarySchema = z.object({
|
|
1048
|
+
project_id: z.string()
|
|
1049
|
+
});
|
|
1050
|
+
|
|
1051
|
+
export const V1SendMessageOutputBodySchema = z.object({
|
|
1052
|
+
message_id: z.string(),
|
|
1053
|
+
status: z.string(),
|
|
1054
|
+
thread_id: z.string()
|
|
1055
|
+
});
|
|
1056
|
+
|
|
1057
|
+
export const V1SetFolderVisibilityInputBodySchema = z.object({
|
|
1058
|
+
visibility: z.enum(['personal', 'workspace'])
|
|
1059
|
+
});
|
|
1060
|
+
|
|
1061
|
+
export const V1SetFolderVisibilityOutputBodySchema = z.object({
|
|
1062
|
+
visibility: z.string()
|
|
1063
|
+
});
|
|
1064
|
+
|
|
1065
|
+
export const V1SetProjectKnowledgeInputBodySchema = z.object({
|
|
1066
|
+
content: z.string()
|
|
1067
|
+
});
|
|
1068
|
+
|
|
1069
|
+
export const V1SetProjectSkillEnabledInputBodySchema = z.object({
|
|
1070
|
+
enabled: z.boolean()
|
|
1071
|
+
});
|
|
1072
|
+
|
|
1073
|
+
export const V1SetProjectSkillEnabledOutputBodySchema = z.object({
|
|
1074
|
+
skill: V1ProjectSkillDtoSchema
|
|
1075
|
+
});
|
|
1076
|
+
|
|
1077
|
+
export const V1SetProjectVisibilityInputBodySchema = z.object({
|
|
1078
|
+
visibility: z.enum([
|
|
1079
|
+
'draft',
|
|
1080
|
+
'private',
|
|
1081
|
+
'public',
|
|
1082
|
+
'workspace_view'
|
|
1083
|
+
])
|
|
1084
|
+
});
|
|
1085
|
+
|
|
1086
|
+
export const V1SetProjectVisibilityOutputBodySchema = z.object({
|
|
1087
|
+
visibility: z.string()
|
|
1088
|
+
});
|
|
1089
|
+
|
|
1090
|
+
export const V1SetWorkspaceKnowledgeInputBodySchema = z.object({
|
|
1091
|
+
content: z.string()
|
|
1092
|
+
});
|
|
1093
|
+
|
|
1094
|
+
export const V1TriggerSecurityScanInputBodySchema = z.object({
|
|
1095
|
+
project_id: z.string()
|
|
1096
|
+
});
|
|
1097
|
+
|
|
1098
|
+
export const V1TriggerSecurityScanResponseBodySchema = z.object({
|
|
1099
|
+
message: z.string().optional(),
|
|
1100
|
+
scan_id: z.string(),
|
|
1101
|
+
status: z.string()
|
|
1102
|
+
});
|
|
1103
|
+
|
|
1104
|
+
export const V1UnscopedFileSchema = z.object({
|
|
1105
|
+
file_id: z.string(),
|
|
1106
|
+
file_name: z.string().optional(),
|
|
1107
|
+
mime_type: z.string().optional(),
|
|
1108
|
+
type: z.string().optional()
|
|
1109
|
+
});
|
|
1110
|
+
|
|
1111
|
+
export const PublicV1ProjectCreateInputBodySchema = z.object({
|
|
1112
|
+
description: z.string().min(1),
|
|
1113
|
+
display_name: z.string().optional(),
|
|
1114
|
+
ephemeral_files: z.array(V1UnscopedFileSchema).nullish(),
|
|
1115
|
+
file_urls: z.array(z.string()).nullish(),
|
|
1116
|
+
files: z.array(V1UnscopedFileSchema).nullish(),
|
|
1117
|
+
initial_message: z.string().optional(),
|
|
1118
|
+
sandbox_template: z.string().optional(),
|
|
1119
|
+
selected_libraries: z.array(V1SelectedLibrarySchema).nullish(),
|
|
1120
|
+
source_project_id: z.string().regex(/^\s*$/).nullish(),
|
|
1121
|
+
tech_stack: z.string().optional(),
|
|
1122
|
+
template_project_id: z.string().optional(),
|
|
1123
|
+
visibility: z.string().optional(),
|
|
1124
|
+
workspace_id: z.string()
|
|
1125
|
+
});
|
|
1126
|
+
|
|
1127
|
+
export const PublicV1SendMessageInputBodySchema = z.object({
|
|
1128
|
+
continuation: z.enum([
|
|
1129
|
+
'force',
|
|
1130
|
+
'fresh_build',
|
|
1131
|
+
'allow_expired_cache'
|
|
1132
|
+
]).optional(),
|
|
1133
|
+
ephemeral_files: z.array(V1UnscopedFileSchema).nullish(),
|
|
1134
|
+
files: z.array(V1UnscopedFileSchema).nullish(),
|
|
1135
|
+
message: z.string().min(1).max(100000),
|
|
1136
|
+
plan_mode: z.boolean().optional(),
|
|
1137
|
+
project_id: z.string(),
|
|
1138
|
+
variant_id: z.string().optional()
|
|
1139
|
+
});
|
|
1140
|
+
|
|
1141
|
+
export const V1CreateProjectInputBodySchema = z.object({
|
|
1142
|
+
description: z.string().min(1),
|
|
1143
|
+
display_name: z.string().optional(),
|
|
1144
|
+
ephemeral_files: z.array(V1UnscopedFileSchema).nullish(),
|
|
1145
|
+
file_urls: z.array(z.string()).nullish(),
|
|
1146
|
+
files: z.array(V1UnscopedFileSchema).nullish(),
|
|
1147
|
+
initial_message: z.string().optional(),
|
|
1148
|
+
sandbox_template: z.string().optional(),
|
|
1149
|
+
selected_libraries: z.array(V1SelectedLibrarySchema).nullish(),
|
|
1150
|
+
tech_stack: z.string().optional(),
|
|
1151
|
+
template_project_id: z.string().optional(),
|
|
1152
|
+
visibility: z.string().optional()
|
|
1153
|
+
});
|
|
1154
|
+
|
|
1155
|
+
export const V1SendMessageInputBodySchema = z.object({
|
|
1156
|
+
continuation: z.enum([
|
|
1157
|
+
'force',
|
|
1158
|
+
'fresh_build',
|
|
1159
|
+
'allow_expired_cache'
|
|
1160
|
+
]).optional(),
|
|
1161
|
+
ephemeral_files: z.array(V1UnscopedFileSchema).nullish(),
|
|
1162
|
+
files: z.array(V1UnscopedFileSchema).nullish(),
|
|
1163
|
+
message: z.string().min(1).max(100000),
|
|
1164
|
+
plan_mode: z.boolean().optional(),
|
|
1165
|
+
variant_id: z.string().optional()
|
|
1166
|
+
});
|
|
1167
|
+
|
|
1168
|
+
export const V1UsagePeriodSchema = z.object({
|
|
1169
|
+
end: z.string(),
|
|
1170
|
+
granularity: z.string().optional(),
|
|
1171
|
+
start: z.string()
|
|
1172
|
+
});
|
|
1173
|
+
|
|
1174
|
+
export const V1WorkspaceAuditLogEntrySchema = z.object({
|
|
1175
|
+
action: z.string(),
|
|
1176
|
+
actor_display_name: z.string().optional(),
|
|
1177
|
+
actor_id: z.string(),
|
|
1178
|
+
actor_type: z.string().optional(),
|
|
1179
|
+
details: z.record(z.string(), z.unknown()).optional(),
|
|
1180
|
+
id: z.string(),
|
|
1181
|
+
ip_address: z.string().optional(),
|
|
1182
|
+
status: z.string(),
|
|
1183
|
+
status_message: z.string().optional(),
|
|
1184
|
+
target_display_name: z.string().optional(),
|
|
1185
|
+
target_id: z.string().optional(),
|
|
1186
|
+
target_type: z.string().optional(),
|
|
1187
|
+
timestamp: z.iso.datetime(),
|
|
1188
|
+
trace_group_id: z.string().optional(),
|
|
1189
|
+
user_agent: z.string().optional()
|
|
1190
|
+
});
|
|
1191
|
+
|
|
1192
|
+
export const V1WorkspaceAuditLogsBodySchema = z.object({
|
|
1193
|
+
data: z.array(V1WorkspaceAuditLogEntrySchema).nullable(),
|
|
1194
|
+
pagination: PaginationSchema
|
|
1195
|
+
});
|
|
1196
|
+
|
|
1197
|
+
export const V1WorkspaceCreditHistoryBodySchema = z.object({
|
|
1198
|
+
data: z.array(V1CreditHistoryEntrySchema).nullable(),
|
|
1199
|
+
pagination: PaginationSchema,
|
|
1200
|
+
total: z.number().optional(),
|
|
1201
|
+
total_is_capped: z.boolean().optional()
|
|
1202
|
+
});
|
|
1203
|
+
|
|
1204
|
+
export const V1WorkspaceCreditsExpiringGrantSchema = z.object({
|
|
1205
|
+
applicability: z.string().optional(),
|
|
1206
|
+
credits: z.number(),
|
|
1207
|
+
expires_at: z.iso.datetime(),
|
|
1208
|
+
grant_type: z.string()
|
|
1209
|
+
});
|
|
1210
|
+
|
|
1211
|
+
export const V1WorkspaceCreditsGrantTypeBalanceSchema = z.object({
|
|
1212
|
+
grant_type: z.string(),
|
|
1213
|
+
granted: z.number(),
|
|
1214
|
+
remaining: z.number()
|
|
1215
|
+
});
|
|
1216
|
+
|
|
1217
|
+
export const V1WorkspaceCreditsBodySchema = z.object({
|
|
1218
|
+
billing_period: V1BillingPeriodSchema,
|
|
1219
|
+
daily_limit: z.number(),
|
|
1220
|
+
daily_remaining: z.number(),
|
|
1221
|
+
expiring_grants: z.array(V1WorkspaceCreditsExpiringGrantSchema).nullable(),
|
|
1222
|
+
grant_type_balances: z.array(V1WorkspaceCreditsGrantTypeBalanceSchema).nullable(),
|
|
1223
|
+
total_billing_period_used: z.number(),
|
|
1224
|
+
total_granted: z.number(),
|
|
1225
|
+
total_remaining: z.number()
|
|
1226
|
+
});
|
|
1227
|
+
|
|
1228
|
+
export const V1WorkspaceMemberSchema = z.object({
|
|
1229
|
+
display_name: z.string().optional(),
|
|
1230
|
+
email: z.string().optional(),
|
|
1231
|
+
invited_at: z.iso.datetime().optional(),
|
|
1232
|
+
joined_at: z.iso.datetime().optional(),
|
|
1233
|
+
role: z.string(),
|
|
1234
|
+
user_id: z.string(),
|
|
1235
|
+
workspace_id: z.string()
|
|
1236
|
+
});
|
|
1237
|
+
|
|
1238
|
+
export const CursorListResponseV1WorkspaceMemberSchema = z.object({
|
|
1239
|
+
data: z.array(V1WorkspaceMemberSchema).nullable(),
|
|
1240
|
+
pagination: PaginationSchema
|
|
1241
|
+
});
|
|
1242
|
+
|
|
1243
|
+
export const V1WorkspaceSecurityActivityFreshnessSchema = z.object({
|
|
1244
|
+
edits_as_of: z.iso.datetime().optional(),
|
|
1245
|
+
visitors_as_of: z.iso.datetime().optional()
|
|
1246
|
+
});
|
|
1247
|
+
|
|
1248
|
+
export const V1WorkspaceSecurityEdgeFunctionSchema = z.object({
|
|
1249
|
+
name: z.string()
|
|
1250
|
+
});
|
|
1251
|
+
|
|
1252
|
+
export const V1WorkspaceSecurityFindingSchema = z.object({
|
|
1253
|
+
category: z.string(),
|
|
1254
|
+
description: z.string(),
|
|
1255
|
+
id: z.string(),
|
|
1256
|
+
project_count: z.number(),
|
|
1257
|
+
severity: z.string(),
|
|
1258
|
+
title: z.string()
|
|
1259
|
+
});
|
|
1260
|
+
|
|
1261
|
+
export const V1WorkspaceSecurityOwnerSchema = z.object({
|
|
1262
|
+
display_name: z.string().optional()
|
|
1263
|
+
});
|
|
1264
|
+
|
|
1265
|
+
export const V1WorkspaceSecurityReasonValuesSchema = z.object({
|
|
1266
|
+
connector_count: z.number().optional(),
|
|
1267
|
+
edge_function_count: z.number().optional(),
|
|
1268
|
+
error_count: z.number().optional(),
|
|
1269
|
+
info_count: z.number().optional(),
|
|
1270
|
+
open_pii_finding_count: z.number().optional(),
|
|
1271
|
+
secret_count: z.number().optional(),
|
|
1272
|
+
shared_user_count: z.number().optional(),
|
|
1273
|
+
warning_count: z.number().optional()
|
|
1274
|
+
});
|
|
1275
|
+
|
|
1276
|
+
export const V1WorkspaceSecurityReasonSchema = z.object({
|
|
1277
|
+
category: z.string(),
|
|
1278
|
+
detail: z.string(),
|
|
1279
|
+
id: z.string(),
|
|
1280
|
+
label: z.string(),
|
|
1281
|
+
severity: z.string(),
|
|
1282
|
+
values: V1WorkspaceSecurityReasonValuesSchema.optional()
|
|
1283
|
+
});
|
|
1284
|
+
|
|
1285
|
+
export const V1WorkspaceSecurityReviewPrioritySchema = z.object({
|
|
1286
|
+
needs_review: z.number(),
|
|
1287
|
+
no_review_needed: z.number(),
|
|
1288
|
+
review_recommended: z.number()
|
|
1289
|
+
});
|
|
1290
|
+
|
|
1291
|
+
export const V1WorkspaceSecuritySignalsSchema = z.object({
|
|
1292
|
+
chat_attachment_count: z.number(),
|
|
1293
|
+
connector_count: z.number(),
|
|
1294
|
+
edge_function_count: z.number(),
|
|
1295
|
+
error_count: z.number(),
|
|
1296
|
+
external_collaborators_known: z.boolean(),
|
|
1297
|
+
has_chat_attachment: z.boolean(),
|
|
1298
|
+
has_external_collaborators: z.boolean(),
|
|
1299
|
+
has_pii: z.boolean(),
|
|
1300
|
+
has_project_asset: z.boolean(),
|
|
1301
|
+
has_project_secret: z.boolean(),
|
|
1302
|
+
info_count: z.number(),
|
|
1303
|
+
is_orphaned: z.boolean(),
|
|
1304
|
+
is_public_published: z.boolean(),
|
|
1305
|
+
is_published: z.boolean(),
|
|
1306
|
+
lovable_cloud_enabled: z.boolean(),
|
|
1307
|
+
open_pii_finding_count: z.number(),
|
|
1308
|
+
overshared: z.boolean(),
|
|
1309
|
+
project_asset_count: z.number(),
|
|
1310
|
+
project_secret_count: z.number(),
|
|
1311
|
+
shared_user_count: z.number(),
|
|
1312
|
+
supabase_auth_providers: z.array(z.string()).nullish(),
|
|
1313
|
+
supabase_rls_enabled_table_count: z.number().optional(),
|
|
1314
|
+
supabase_signals_fetched_at: z.iso.datetime().optional(),
|
|
1315
|
+
supabase_storage_bucket_count: z.number().optional(),
|
|
1316
|
+
supabase_table_count: z.number().optional(),
|
|
1317
|
+
supply_chain_error_count: z.number(),
|
|
1318
|
+
supply_chain_info_count: z.number(),
|
|
1319
|
+
supply_chain_warning_count: z.number(),
|
|
1320
|
+
warning_count: z.number()
|
|
1321
|
+
});
|
|
1322
|
+
|
|
1323
|
+
export const V1WorkspaceSecurityProjectSchema = z.object({
|
|
1324
|
+
activity_group: z.string().optional(),
|
|
1325
|
+
connectors: z.array(z.string()).nullish(),
|
|
1326
|
+
description: z.string().optional(),
|
|
1327
|
+
display_name: z.string().optional(),
|
|
1328
|
+
edge_functions: z.array(V1WorkspaceSecurityEdgeFunctionSchema).nullish(),
|
|
1329
|
+
edit_count: z.number(),
|
|
1330
|
+
edits_24h: z.number(),
|
|
1331
|
+
edits_30d: z.number(),
|
|
1332
|
+
edits_7d: z.number(),
|
|
1333
|
+
generated_description: z.string().optional(),
|
|
1334
|
+
id: z.string(),
|
|
1335
|
+
is_published: z.boolean().optional(),
|
|
1336
|
+
last_edited_at: z.iso.datetime().optional(),
|
|
1337
|
+
last_security_scan_at: z.iso.datetime().optional(),
|
|
1338
|
+
matched_reason: V1WorkspaceSecurityReasonSchema.optional(),
|
|
1339
|
+
message_count: z.number(),
|
|
1340
|
+
name: z.string().optional(),
|
|
1341
|
+
og_image_url: z.string().optional(),
|
|
1342
|
+
owner: V1WorkspaceSecurityOwnerSchema.optional(),
|
|
1343
|
+
publish_visibility: z.string().optional(),
|
|
1344
|
+
review_priority: z.string().optional(),
|
|
1345
|
+
review_priority_explanation: z.array(V1WorkspaceSecurityReasonSchema).nullable(),
|
|
1346
|
+
signals: V1WorkspaceSecuritySignalsSchema,
|
|
1347
|
+
url: z.string().optional(),
|
|
1348
|
+
visibility: z.string().optional(),
|
|
1349
|
+
visitors_24h: z.number(),
|
|
1350
|
+
visitors_30d: z.number(),
|
|
1351
|
+
visitors_7d: z.number()
|
|
1352
|
+
});
|
|
1353
|
+
|
|
1354
|
+
export const V1WorkspaceSecurityProjectsBodySchema = z.object({
|
|
1355
|
+
activity_as_of: V1WorkspaceSecurityActivityFreshnessSchema.optional(),
|
|
1356
|
+
applied_finding: V1WorkspaceSecurityFindingSchema.optional(),
|
|
1357
|
+
as_of: z.iso.datetime().optional(),
|
|
1358
|
+
data: z.array(V1WorkspaceSecurityProjectSchema).nullable(),
|
|
1359
|
+
pagination: PaginationSchema,
|
|
1360
|
+
total: z.number()
|
|
1361
|
+
});
|
|
1362
|
+
|
|
1363
|
+
export const V1WorkspaceSecurityStatSchema = z.object({
|
|
1364
|
+
delta_30d: z.number(),
|
|
1365
|
+
delta_window: z.string(),
|
|
1366
|
+
value: z.number()
|
|
1367
|
+
});
|
|
1368
|
+
|
|
1369
|
+
export const V1WorkspaceSecuritySummarySchema = z.object({
|
|
1370
|
+
externally_published: V1WorkspaceSecurityStatSchema,
|
|
1371
|
+
risk: V1WorkspaceSecurityReviewPrioritySchema,
|
|
1372
|
+
total_projects: V1WorkspaceSecurityStatSchema,
|
|
1373
|
+
workspace_members: V1WorkspaceSecurityStatSchema
|
|
1374
|
+
});
|
|
1375
|
+
|
|
1376
|
+
export const V1WorkspaceSecurityDashboardBodySchema = z.object({
|
|
1377
|
+
as_of: z.iso.datetime().optional(),
|
|
1378
|
+
findings: z.array(V1WorkspaceSecurityFindingSchema).nullable(),
|
|
1379
|
+
summary: V1WorkspaceSecuritySummarySchema
|
|
1380
|
+
});
|
|
1381
|
+
|
|
1382
|
+
export const V1WorkspaceSettingsBodySchema = z.object({
|
|
1383
|
+
billing_period_end_date: z.iso.datetime().optional(),
|
|
1384
|
+
billing_period_start_date: z.iso.datetime().optional(),
|
|
1385
|
+
default_project_visibility: z.string().optional(),
|
|
1386
|
+
enable_pii: z.boolean(),
|
|
1387
|
+
enforce_sso: z.boolean(),
|
|
1388
|
+
id: z.string(),
|
|
1389
|
+
name: z.string(),
|
|
1390
|
+
num_seats: z.number().optional(),
|
|
1391
|
+
plan: z.string(),
|
|
1392
|
+
publishing_policy: z.string().optional()
|
|
1393
|
+
});
|
|
1394
|
+
|
|
1395
|
+
export const V1WorkspaceSkillDtoSchema = z.object({
|
|
1396
|
+
description: z.string(),
|
|
1397
|
+
files: z.array(ProjectFileInfoSchema).nullable(),
|
|
1398
|
+
markdown: z.string().optional(),
|
|
1399
|
+
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
1400
|
+
name: z.string()
|
|
1401
|
+
});
|
|
1402
|
+
|
|
1403
|
+
export const V1GetWorkspaceSkillOutputBodySchema = z.object({
|
|
1404
|
+
skill: V1WorkspaceSkillDtoSchema
|
|
1405
|
+
});
|
|
1406
|
+
|
|
1407
|
+
export const V1ListWorkspaceSkillsOutputBodySchema = z.object({
|
|
1408
|
+
has_more: z.boolean(),
|
|
1409
|
+
skills: z.array(V1WorkspaceSkillDtoSchema).nullable(),
|
|
1410
|
+
total: z.number()
|
|
1411
|
+
});
|
|
1412
|
+
|
|
1413
|
+
export const V1WorkspaceUsageBreakdownEntrySchema = z.object({
|
|
1414
|
+
display_name: z.string().optional(),
|
|
1415
|
+
email: z.string().optional(),
|
|
1416
|
+
monthly_credit_limit: z.number().optional(),
|
|
1417
|
+
role: z.string(),
|
|
1418
|
+
total_credits_used: z.number().optional(),
|
|
1419
|
+
total_credits_used_in_billing_period: z.number().optional(),
|
|
1420
|
+
user_id: z.string()
|
|
1421
|
+
});
|
|
1422
|
+
|
|
1423
|
+
export const V1WorkspaceUsageBreakdownBodySchema = z.object({
|
|
1424
|
+
billing_period: V1BillingPeriodSchema,
|
|
1425
|
+
data: z.array(V1WorkspaceUsageBreakdownEntrySchema).nullable(),
|
|
1426
|
+
member_count: z.number(),
|
|
1427
|
+
pagination: PaginationSchema
|
|
1428
|
+
});
|
|
1429
|
+
|
|
1430
|
+
export const V1WorkspaceUsageDatabaseBreakdownSchema = z.object({
|
|
1431
|
+
credits: z.number(),
|
|
1432
|
+
key: z.enum(['database_server', 'database_storage']),
|
|
1433
|
+
label: z.string()
|
|
1434
|
+
});
|
|
1435
|
+
|
|
1436
|
+
export const V1WorkspaceUsageGatewayModelSchema = z.object({
|
|
1437
|
+
credits: z.number(),
|
|
1438
|
+
name: z.string(),
|
|
1439
|
+
provider: z.string()
|
|
1440
|
+
});
|
|
1441
|
+
|
|
1442
|
+
export const V1WorkspaceUsageMeBodySchema = z.object({
|
|
1443
|
+
credits_used: z.number(),
|
|
1444
|
+
monthly_credit_limit: z.number().optional()
|
|
1445
|
+
});
|
|
1446
|
+
|
|
1447
|
+
export const V1WorkspaceUsageProjectRowSchema = z.object({
|
|
1448
|
+
build: z.number(),
|
|
1449
|
+
database: z.number(),
|
|
1450
|
+
functions: z.number(),
|
|
1451
|
+
gateway: z.number(),
|
|
1452
|
+
network: z.number(),
|
|
1453
|
+
project_id: z.string(),
|
|
1454
|
+
realtime: z.number(),
|
|
1455
|
+
run: z.number(),
|
|
1456
|
+
storage: z.number(),
|
|
1457
|
+
total: z.number()
|
|
1458
|
+
});
|
|
1459
|
+
|
|
1460
|
+
export const V1WorkspaceUsageProjectsBodySchema = z.object({
|
|
1461
|
+
data: z.array(V1WorkspaceUsageProjectRowSchema).nullable(),
|
|
1462
|
+
entity_count: z.number(),
|
|
1463
|
+
pagination: PaginationSchema,
|
|
1464
|
+
period: V1UsagePeriodSchema,
|
|
1465
|
+
workspace_total: z.number()
|
|
1466
|
+
});
|
|
1467
|
+
|
|
1468
|
+
export const V1WorkspaceUsageTimeseriesBucketSchema = z.object({
|
|
1469
|
+
build: z.number(),
|
|
1470
|
+
database: z.number(),
|
|
1471
|
+
database_breakdown: z.array(V1WorkspaceUsageDatabaseBreakdownSchema).nullable(),
|
|
1472
|
+
functions: z.number(),
|
|
1473
|
+
gateway: z.number(),
|
|
1474
|
+
gateway_models: z.array(V1WorkspaceUsageGatewayModelSchema).nullable(),
|
|
1475
|
+
network: z.number(),
|
|
1476
|
+
period_end: z.string(),
|
|
1477
|
+
period_start: z.string(),
|
|
1478
|
+
realtime: z.number(),
|
|
1479
|
+
run: z.number(),
|
|
1480
|
+
storage: z.number(),
|
|
1481
|
+
total: z.number()
|
|
1482
|
+
});
|
|
1483
|
+
|
|
1484
|
+
export const V1WorkspaceUsageTimeseriesBodySchema = z.object({
|
|
1485
|
+
data: z.array(V1WorkspaceUsageTimeseriesBucketSchema).nullable(),
|
|
1486
|
+
pagination: PaginationSchema,
|
|
1487
|
+
period: V1UsagePeriodSchema,
|
|
1488
|
+
workspace_total: z.number()
|
|
1489
|
+
});
|
|
1490
|
+
|
|
1491
|
+
export const V1WriteWorkspaceSkillInputBodySchema = z.object({
|
|
1492
|
+
markdown: z.string().max(100000)
|
|
1493
|
+
});
|
|
1494
|
+
|
|
1495
|
+
export const V1WriteWorkspaceSkillOutputBodySchema = z.object({
|
|
1496
|
+
commit_sha: z.string(),
|
|
1497
|
+
skill: V1WorkspaceSkillDtoSchema
|
|
1498
|
+
});
|
|
1499
|
+
|
|
1500
|
+
export const VisibilityChangeInfoSchema = z.object({
|
|
1501
|
+
new_visibility: z.enum([
|
|
1502
|
+
'public',
|
|
1503
|
+
'private',
|
|
1504
|
+
'draft',
|
|
1505
|
+
'workspace_view'
|
|
1506
|
+
]),
|
|
1507
|
+
previous_visibility: z.enum([
|
|
1508
|
+
'public',
|
|
1509
|
+
'private',
|
|
1510
|
+
'draft',
|
|
1511
|
+
'workspace_view'
|
|
1512
|
+
]).optional(),
|
|
1513
|
+
project_id: z.string()
|
|
1514
|
+
});
|
|
1515
|
+
|
|
1516
|
+
export const AddProjectsToFolderResultSchema = z.object({
|
|
1517
|
+
added_project_ids: z.array(z.string()).nullable(),
|
|
1518
|
+
skipped_projects: z.array(SkippedProjectInfoSchema).nullable(),
|
|
1519
|
+
total_added: z.number(),
|
|
1520
|
+
total_requested: z.number(),
|
|
1521
|
+
visibility_updated: z.array(VisibilityChangeInfoSchema).nullable()
|
|
1522
|
+
});
|
|
1523
|
+
|
|
1524
|
+
export const WorkspaceAnnouncementBannerSchema = z.object({
|
|
1525
|
+
allow_dismissal: z.boolean(),
|
|
1526
|
+
color: z.string().optional(),
|
|
1527
|
+
enabled: z.boolean(),
|
|
1528
|
+
text: z.string().optional(),
|
|
1529
|
+
text_color: z.string().optional(),
|
|
1530
|
+
updated_at: z.iso.datetime().optional()
|
|
1531
|
+
});
|
|
1532
|
+
|
|
1533
|
+
export const WorkspaceExperimentalFeaturesSchema = z.object({
|
|
1534
|
+
custom_enterprise_git_sync: z.boolean().optional(),
|
|
1535
|
+
gitsync_github: z.boolean().optional(),
|
|
1536
|
+
lovable_ai: z.boolean().optional(),
|
|
1537
|
+
lovable_cloud: z.boolean().optional(),
|
|
1538
|
+
partner_perm_1: z.boolean().optional(),
|
|
1539
|
+
partner_perm_2: z.boolean().optional(),
|
|
1540
|
+
partner_perm_3: z.boolean().optional(),
|
|
1541
|
+
partner_perm_4: z.boolean().optional(),
|
|
1542
|
+
scim: z.boolean().optional(),
|
|
1543
|
+
shopify: z.boolean().optional(),
|
|
1544
|
+
unified_billing: z.boolean().optional()
|
|
1545
|
+
});
|
|
1546
|
+
|
|
1547
|
+
export const WorkspaceSchema = z.object({
|
|
1548
|
+
abandoned_projects_threshold_days: z.number().optional(),
|
|
1549
|
+
aikido_pentest_enabled: z.boolean().optional(),
|
|
1550
|
+
allow_public_member_profiles: z.boolean().optional(),
|
|
1551
|
+
always_redact_pii: z.boolean().optional(),
|
|
1552
|
+
announcement_banner: WorkspaceAnnouncementBannerSchema.optional(),
|
|
1553
|
+
app_user_connector_settings: z.array(AppUserConnectorSettingSchema).nullish(),
|
|
1554
|
+
auto_delete_abandoned_projects_enabled: z.boolean().optional(),
|
|
1555
|
+
auto_delete_enabled_at: z.iso.datetime().optional(),
|
|
1556
|
+
auto_delete_grace_days: z.number().optional(),
|
|
1557
|
+
backend_total_used_in_billing_period: z.number(),
|
|
1558
|
+
banner_url: z.string().optional(),
|
|
1559
|
+
billing_period_credits_limit: z.number(),
|
|
1560
|
+
billing_period_credits_used: z.number(),
|
|
1561
|
+
billing_period_end_date: z.iso.datetime().optional(),
|
|
1562
|
+
billing_period_start_date: z.iso.datetime().optional(),
|
|
1563
|
+
block_publish_on_critical_findings: z.boolean().optional(),
|
|
1564
|
+
block_publish_on_pii: z.boolean().optional(),
|
|
1565
|
+
branded_app_url_cert_pack_id: z.string().optional(),
|
|
1566
|
+
branded_app_url_failure_reason: z.string().optional(),
|
|
1567
|
+
branded_app_url_slug: z.string().optional(),
|
|
1568
|
+
branded_app_url_status: z.string().optional(),
|
|
1569
|
+
cloud_block_public_buckets: z.boolean().optional(),
|
|
1570
|
+
created_at: z.iso.datetime(),
|
|
1571
|
+
custom_branded_domain: z.string().optional(),
|
|
1572
|
+
custom_branded_domain_dcv_txt_name: z.string().optional(),
|
|
1573
|
+
custom_branded_domain_dcv_txt_value: z.string().optional(),
|
|
1574
|
+
custom_branded_domain_failure_reason: z.string().optional(),
|
|
1575
|
+
custom_branded_domain_status: z.string().optional(),
|
|
1576
|
+
custom_branded_hostname_id: z.string().optional(),
|
|
1577
|
+
data_opt_out: z.boolean().optional(),
|
|
1578
|
+
default_cloud_region: z.string().optional(),
|
|
1579
|
+
default_library_id: z.string().optional(),
|
|
1580
|
+
default_monthly_member_credit_limit: z.number().nullable(),
|
|
1581
|
+
default_project_publish_visibility: z.enum(['public', 'private']).optional(),
|
|
1582
|
+
default_project_visibility: z.enum([
|
|
1583
|
+
'public',
|
|
1584
|
+
'private',
|
|
1585
|
+
'draft',
|
|
1586
|
+
'workspace_view'
|
|
1587
|
+
]).optional(),
|
|
1588
|
+
default_template_id: z.string().optional(),
|
|
1589
|
+
delegated_domain: z.string().optional(),
|
|
1590
|
+
delegated_domain_status: z.string().optional(),
|
|
1591
|
+
deleted_at: z.iso.datetime().optional(),
|
|
1592
|
+
deleted_by: z.string().optional(),
|
|
1593
|
+
deletion_event_id: z.string().optional(),
|
|
1594
|
+
description: z.string().optional(),
|
|
1595
|
+
disable_code_download: z.boolean().optional(),
|
|
1596
|
+
disable_external_publish_invites: z.boolean().optional(),
|
|
1597
|
+
disable_figma_import: z.boolean().optional(),
|
|
1598
|
+
disable_named_previews: z.boolean().optional(),
|
|
1599
|
+
disable_share_preview: z.boolean().optional(),
|
|
1600
|
+
editor_can_invite: z.boolean().optional(),
|
|
1601
|
+
editor_can_transfer_project: z.boolean().optional(),
|
|
1602
|
+
egress_allowlist: z.array(z.string()).nullish(),
|
|
1603
|
+
egress_mode: z.string().optional(),
|
|
1604
|
+
enable_pii: z.boolean().optional(),
|
|
1605
|
+
enforce_sso: z.boolean().optional(),
|
|
1606
|
+
enterprise_relay_client_ids: z.array(z.string()).nullish(),
|
|
1607
|
+
enterprise_relay_enabled: z.boolean().optional(),
|
|
1608
|
+
exclude_from_cross_project_sharing: z.boolean().optional(),
|
|
1609
|
+
exclude_from_discovery: z.boolean().optional(),
|
|
1610
|
+
experimental_features: WorkspaceExperimentalFeaturesSchema,
|
|
1611
|
+
external_collaborator_level: z.enum([
|
|
1612
|
+
'all',
|
|
1613
|
+
'none',
|
|
1614
|
+
'viewer',
|
|
1615
|
+
'editor'
|
|
1616
|
+
]).optional(),
|
|
1617
|
+
external_publish_permission_level: z.string().optional(),
|
|
1618
|
+
followers_count: z.number(),
|
|
1619
|
+
hard_delete_in_progress_at: z.iso.datetime().optional(),
|
|
1620
|
+
hard_deleted_at: z.iso.datetime().optional(),
|
|
1621
|
+
id: z.string(),
|
|
1622
|
+
image_url: z.string().optional(),
|
|
1623
|
+
invite_links_disabled: z.boolean().optional(),
|
|
1624
|
+
invited_at: z.iso.datetime().optional(),
|
|
1625
|
+
is_personal: z.boolean().optional(),
|
|
1626
|
+
is_temporary_edu: z.boolean().optional(),
|
|
1627
|
+
joined_at: z.iso.datetime().optional(),
|
|
1628
|
+
last_rollover_period: z.iso.datetime().nullable(),
|
|
1629
|
+
last_subscription_event_at: z.iso.datetime().optional(),
|
|
1630
|
+
local_mcp_enabled: z.boolean().optional(),
|
|
1631
|
+
lovable_mcp_server_enabled: z.boolean().optional(),
|
|
1632
|
+
mcp_connector_settings: z.array(McpConnectorSettingSchema).nullish(),
|
|
1633
|
+
mcp_enabled: z.boolean().optional(),
|
|
1634
|
+
migrated_to_unified_billing_at: z.iso.datetime().optional(),
|
|
1635
|
+
name: z.string(),
|
|
1636
|
+
next_monthly_credit_grant_date: z.iso.datetime().optional(),
|
|
1637
|
+
num_projects: z.number(),
|
|
1638
|
+
num_seats: z.number().optional(),
|
|
1639
|
+
owner_id: z.string().optional(),
|
|
1640
|
+
payment_provider: z.enum([
|
|
1641
|
+
'stripe',
|
|
1642
|
+
'apple',
|
|
1643
|
+
'gcp_marketplace',
|
|
1644
|
+
'microsoft_marketplace'
|
|
1645
|
+
]).optional(),
|
|
1646
|
+
pending_dispute_adjustments: z.record(z.string(), PendingDisputeAdjustmentSchema).optional(),
|
|
1647
|
+
pending_refund_adjustments: z.record(z.string(), PendingRefundAdjustmentSchema).optional(),
|
|
1648
|
+
pii_live_chat_mode: z.enum([
|
|
1649
|
+
'off',
|
|
1650
|
+
'detect_only',
|
|
1651
|
+
'prompt',
|
|
1652
|
+
'block'
|
|
1653
|
+
]).optional(),
|
|
1654
|
+
plan: z.enum([
|
|
1655
|
+
'free',
|
|
1656
|
+
'inactive',
|
|
1657
|
+
'pro_0',
|
|
1658
|
+
'pro_1',
|
|
1659
|
+
'pro_2',
|
|
1660
|
+
'pro_3',
|
|
1661
|
+
'pro_4',
|
|
1662
|
+
'pro_5',
|
|
1663
|
+
'pro_6',
|
|
1664
|
+
'pro_7',
|
|
1665
|
+
'pro_8',
|
|
1666
|
+
'pro_9',
|
|
1667
|
+
'pro_10',
|
|
1668
|
+
'pro_11',
|
|
1669
|
+
'biz_1',
|
|
1670
|
+
'biz_2',
|
|
1671
|
+
'biz_3',
|
|
1672
|
+
'biz_4',
|
|
1673
|
+
'biz_5',
|
|
1674
|
+
'biz_6',
|
|
1675
|
+
'biz_7',
|
|
1676
|
+
'biz_8',
|
|
1677
|
+
'biz_9',
|
|
1678
|
+
'biz_10',
|
|
1679
|
+
'biz_11',
|
|
1680
|
+
'enterprise',
|
|
1681
|
+
'ambassador',
|
|
1682
|
+
'ktlo',
|
|
1683
|
+
'ktlo_1',
|
|
1684
|
+
'ktlo_2',
|
|
1685
|
+
'model_partner',
|
|
1686
|
+
'teams_1',
|
|
1687
|
+
'teams_2',
|
|
1688
|
+
'teams_3',
|
|
1689
|
+
'teams_4',
|
|
1690
|
+
'teams_5',
|
|
1691
|
+
'teams_6',
|
|
1692
|
+
'teams_7',
|
|
1693
|
+
'teams_8',
|
|
1694
|
+
'teams_9',
|
|
1695
|
+
'teams_10',
|
|
1696
|
+
'teams_11'
|
|
1697
|
+
]).optional(),
|
|
1698
|
+
plan_scheduled: z.string().optional(),
|
|
1699
|
+
plan_scheduled_event_at: z.iso.datetime().optional(),
|
|
1700
|
+
plan_scheduled_updated_at: z.iso.datetime().optional(),
|
|
1701
|
+
plan_type: z.string().optional(),
|
|
1702
|
+
plan_type_scheduled: z.string().optional(),
|
|
1703
|
+
publishing_policy: z.enum(['workspace_only', 'disabled']).optional(),
|
|
1704
|
+
reauth: z.boolean().optional(),
|
|
1705
|
+
received_tax_id_bonus: z.boolean().optional(),
|
|
1706
|
+
referral_code: z.string().optional(),
|
|
1707
|
+
referral_count: z.number(),
|
|
1708
|
+
referral_disabled: z.boolean().optional(),
|
|
1709
|
+
require_customer_pam_approval: z.boolean().optional(),
|
|
1710
|
+
require_security_scan_before_publish: z.boolean().optional(),
|
|
1711
|
+
require_workspace_editor_for_project_editing: z.boolean().optional(),
|
|
1712
|
+
sandbox_provider_url: z.string().optional(),
|
|
1713
|
+
seamless_connector_settings: z.array(SeamlessConnectorSettingSchema).nullish(),
|
|
1714
|
+
security_auto_fix_mode: z.enum([
|
|
1715
|
+
'off',
|
|
1716
|
+
'workspace_published_projects',
|
|
1717
|
+
'externally_published_projects',
|
|
1718
|
+
'published_projects',
|
|
1719
|
+
'all_projects'
|
|
1720
|
+
]).optional(),
|
|
1721
|
+
share_sample_data_with_llms: z.boolean().optional(),
|
|
1722
|
+
short_referral_code: z.string().optional(),
|
|
1723
|
+
sso_provider_id: z.string().optional(),
|
|
1724
|
+
sso_session_duration: z.number().optional(),
|
|
1725
|
+
standard_connector_settings: z.array(StandardConnectorSettingSchema).nullish(),
|
|
1726
|
+
subscription_currency: z.string().optional(),
|
|
1727
|
+
subscription_status: z.enum([
|
|
1728
|
+
'active',
|
|
1729
|
+
'past_due',
|
|
1730
|
+
'canceled',
|
|
1731
|
+
'trialing',
|
|
1732
|
+
'incomplete',
|
|
1733
|
+
'incomplete_expired',
|
|
1734
|
+
'unpaid',
|
|
1735
|
+
'paused'
|
|
1736
|
+
]).optional(),
|
|
1737
|
+
subscription_status_changed_at: z.iso.datetime().optional(),
|
|
1738
|
+
topup_credits_purchased_at: z.iso.datetime().optional(),
|
|
1739
|
+
updated_at: z.iso.datetime(),
|
|
1740
|
+
use_edu_openai_routing: z.boolean().optional(),
|
|
1741
|
+
username: z.string().optional(),
|
|
1742
|
+
verified_email_jit: z.boolean().optional(),
|
|
1743
|
+
verified_email_jit_role: z.enum([
|
|
1744
|
+
'none',
|
|
1745
|
+
'owner',
|
|
1746
|
+
'admin',
|
|
1747
|
+
'member',
|
|
1748
|
+
'viewer',
|
|
1749
|
+
'collaborator',
|
|
1750
|
+
'invited'
|
|
1751
|
+
]).optional()
|
|
1752
|
+
});
|
|
1753
|
+
|
|
1754
|
+
export const WorkspaceMembershipSchema = z.object({
|
|
1755
|
+
email: z.string(),
|
|
1756
|
+
invited_at: z.iso.datetime(),
|
|
1757
|
+
joined_at: z.iso.datetime().optional(),
|
|
1758
|
+
monthly_credit_limit: z.number().nullable(),
|
|
1759
|
+
project_access: z.record(z.string(), ProjectAccessEntrySchema).optional(),
|
|
1760
|
+
role: z.enum([
|
|
1761
|
+
'none',
|
|
1762
|
+
'owner',
|
|
1763
|
+
'admin',
|
|
1764
|
+
'member',
|
|
1765
|
+
'viewer',
|
|
1766
|
+
'collaborator',
|
|
1767
|
+
'invited'
|
|
1768
|
+
]),
|
|
1769
|
+
role_changed_at: z.iso.datetime().optional(),
|
|
1770
|
+
scim_external_id: z.string().optional(),
|
|
1771
|
+
user_id: z.string(),
|
|
1772
|
+
workspace_id: z.string()
|
|
1773
|
+
});
|
|
1774
|
+
|
|
1775
|
+
export const WorkspaceMembershipResponseSchema = z.object({
|
|
1776
|
+
display_name: z.string().optional(),
|
|
1777
|
+
email: z.string().optional(),
|
|
1778
|
+
has_project_access: z.boolean(),
|
|
1779
|
+
invited_at: z.iso.datetime().optional(),
|
|
1780
|
+
joined_at: z.iso.datetime().optional(),
|
|
1781
|
+
monthly_credit_limit: z.number().optional(),
|
|
1782
|
+
project_access: z.record(z.string(), ProjectAccessEntrySchema).optional(),
|
|
1783
|
+
role: z.enum([
|
|
1784
|
+
'none',
|
|
1785
|
+
'owner',
|
|
1786
|
+
'admin',
|
|
1787
|
+
'member',
|
|
1788
|
+
'viewer',
|
|
1789
|
+
'collaborator',
|
|
1790
|
+
'invited'
|
|
1791
|
+
]),
|
|
1792
|
+
role_changed_at: z.iso.datetime().optional(),
|
|
1793
|
+
row_id: z.string().optional(),
|
|
1794
|
+
scim_external_id: z.string().optional(),
|
|
1795
|
+
total_credits_used: z.number().optional(),
|
|
1796
|
+
total_credits_used_in_billing_period: z.number().optional(),
|
|
1797
|
+
user_id: z.string(),
|
|
1798
|
+
username: z.string()
|
|
1799
|
+
});
|
|
1800
|
+
|
|
1801
|
+
export const GetUserWorkspaceBodySchema = z.object({
|
|
1802
|
+
current_member: WorkspaceMembershipResponseSchema.optional(),
|
|
1803
|
+
workspace: WorkspaceSchema
|
|
1804
|
+
});
|
|
1805
|
+
|
|
1806
|
+
export const WorkspaceWithMembershipSchema = z.object({
|
|
1807
|
+
abandoned_projects_threshold_days: z.number().optional(),
|
|
1808
|
+
aikido_pentest_enabled: z.boolean().optional(),
|
|
1809
|
+
allow_public_member_profiles: z.boolean().optional(),
|
|
1810
|
+
always_redact_pii: z.boolean().optional(),
|
|
1811
|
+
announcement_banner: WorkspaceAnnouncementBannerSchema.optional(),
|
|
1812
|
+
app_user_connector_settings: z.array(AppUserConnectorSettingSchema).nullish(),
|
|
1813
|
+
auto_delete_abandoned_projects_enabled: z.boolean().optional(),
|
|
1814
|
+
auto_delete_enabled_at: z.iso.datetime().optional(),
|
|
1815
|
+
auto_delete_grace_days: z.number().optional(),
|
|
1816
|
+
backend_total_used_in_billing_period: z.number(),
|
|
1817
|
+
banner_url: z.string().optional(),
|
|
1818
|
+
billing_period_credits_limit: z.number(),
|
|
1819
|
+
billing_period_credits_used: z.number(),
|
|
1820
|
+
billing_period_end_date: z.iso.datetime().optional(),
|
|
1821
|
+
billing_period_start_date: z.iso.datetime().optional(),
|
|
1822
|
+
block_publish_on_critical_findings: z.boolean().optional(),
|
|
1823
|
+
block_publish_on_pii: z.boolean().optional(),
|
|
1824
|
+
branded_app_url_cert_pack_id: z.string().optional(),
|
|
1825
|
+
branded_app_url_failure_reason: z.string().optional(),
|
|
1826
|
+
branded_app_url_slug: z.string().optional(),
|
|
1827
|
+
branded_app_url_status: z.string().optional(),
|
|
1828
|
+
cloud_block_public_buckets: z.boolean().optional(),
|
|
1829
|
+
created_at: z.iso.datetime(),
|
|
1830
|
+
custom_branded_domain: z.string().optional(),
|
|
1831
|
+
custom_branded_domain_dcv_txt_name: z.string().optional(),
|
|
1832
|
+
custom_branded_domain_dcv_txt_value: z.string().optional(),
|
|
1833
|
+
custom_branded_domain_failure_reason: z.string().optional(),
|
|
1834
|
+
custom_branded_domain_status: z.string().optional(),
|
|
1835
|
+
custom_branded_hostname_id: z.string().optional(),
|
|
1836
|
+
data_opt_out: z.boolean().optional(),
|
|
1837
|
+
default_cloud_region: z.string().optional(),
|
|
1838
|
+
default_library_id: z.string().optional(),
|
|
1839
|
+
default_monthly_member_credit_limit: z.number().nullable(),
|
|
1840
|
+
default_project_publish_visibility: z.enum(['public', 'private']).optional(),
|
|
1841
|
+
default_project_visibility: z.enum([
|
|
1842
|
+
'public',
|
|
1843
|
+
'private',
|
|
1844
|
+
'draft',
|
|
1845
|
+
'workspace_view'
|
|
1846
|
+
]).optional(),
|
|
1847
|
+
default_template_id: z.string().optional(),
|
|
1848
|
+
delegated_domain: z.string().optional(),
|
|
1849
|
+
delegated_domain_status: z.string().optional(),
|
|
1850
|
+
deleted_at: z.iso.datetime().optional(),
|
|
1851
|
+
deleted_by: z.string().optional(),
|
|
1852
|
+
deletion_event_id: z.string().optional(),
|
|
1853
|
+
description: z.string().optional(),
|
|
1854
|
+
disable_code_download: z.boolean().optional(),
|
|
1855
|
+
disable_external_publish_invites: z.boolean().optional(),
|
|
1856
|
+
disable_figma_import: z.boolean().optional(),
|
|
1857
|
+
disable_named_previews: z.boolean().optional(),
|
|
1858
|
+
disable_share_preview: z.boolean().optional(),
|
|
1859
|
+
editor_can_invite: z.boolean().optional(),
|
|
1860
|
+
editor_can_transfer_project: z.boolean().optional(),
|
|
1861
|
+
egress_allowlist: z.array(z.string()).nullish(),
|
|
1862
|
+
egress_mode: z.string().optional(),
|
|
1863
|
+
enable_pii: z.boolean().optional(),
|
|
1864
|
+
enforce_sso: z.boolean().optional(),
|
|
1865
|
+
enterprise_relay_client_ids: z.array(z.string()).nullish(),
|
|
1866
|
+
enterprise_relay_enabled: z.boolean().optional(),
|
|
1867
|
+
exclude_from_cross_project_sharing: z.boolean().optional(),
|
|
1868
|
+
exclude_from_discovery: z.boolean().optional(),
|
|
1869
|
+
experimental_features: WorkspaceExperimentalFeaturesSchema,
|
|
1870
|
+
external_collaborator_level: z.enum([
|
|
1871
|
+
'all',
|
|
1872
|
+
'none',
|
|
1873
|
+
'viewer',
|
|
1874
|
+
'editor'
|
|
1875
|
+
]).optional(),
|
|
1876
|
+
external_publish_permission_level: z.string().optional(),
|
|
1877
|
+
followers_count: z.number(),
|
|
1878
|
+
hard_delete_in_progress_at: z.iso.datetime().optional(),
|
|
1879
|
+
hard_deleted_at: z.iso.datetime().optional(),
|
|
1880
|
+
id: z.string(),
|
|
1881
|
+
image_url: z.string().optional(),
|
|
1882
|
+
invite_links_disabled: z.boolean().optional(),
|
|
1883
|
+
invited_at: z.iso.datetime().optional(),
|
|
1884
|
+
is_personal: z.boolean().optional(),
|
|
1885
|
+
is_temporary_edu: z.boolean().optional(),
|
|
1886
|
+
joined_at: z.iso.datetime().optional(),
|
|
1887
|
+
last_rollover_period: z.iso.datetime().nullable(),
|
|
1888
|
+
last_subscription_event_at: z.iso.datetime().optional(),
|
|
1889
|
+
local_mcp_enabled: z.boolean().optional(),
|
|
1890
|
+
lovable_mcp_server_enabled: z.boolean().optional(),
|
|
1891
|
+
mcp_connector_settings: z.array(McpConnectorSettingSchema).nullish(),
|
|
1892
|
+
mcp_enabled: z.boolean().optional(),
|
|
1893
|
+
membership: WorkspaceMembershipSchema,
|
|
1894
|
+
migrated_to_unified_billing_at: z.iso.datetime().optional(),
|
|
1895
|
+
name: z.string(),
|
|
1896
|
+
next_monthly_credit_grant_date: z.iso.datetime().optional(),
|
|
1897
|
+
num_projects: z.number(),
|
|
1898
|
+
num_seats: z.number().optional(),
|
|
1899
|
+
owner_id: z.string().optional(),
|
|
1900
|
+
payment_provider: z.enum([
|
|
1901
|
+
'stripe',
|
|
1902
|
+
'apple',
|
|
1903
|
+
'gcp_marketplace',
|
|
1904
|
+
'microsoft_marketplace'
|
|
1905
|
+
]).optional(),
|
|
1906
|
+
pending_dispute_adjustments: z.record(z.string(), PendingDisputeAdjustmentSchema).optional(),
|
|
1907
|
+
pending_refund_adjustments: z.record(z.string(), PendingRefundAdjustmentSchema).optional(),
|
|
1908
|
+
pii_live_chat_mode: z.enum([
|
|
1909
|
+
'off',
|
|
1910
|
+
'detect_only',
|
|
1911
|
+
'prompt',
|
|
1912
|
+
'block'
|
|
1913
|
+
]).optional(),
|
|
1914
|
+
plan: z.enum([
|
|
1915
|
+
'free',
|
|
1916
|
+
'inactive',
|
|
1917
|
+
'pro_0',
|
|
1918
|
+
'pro_1',
|
|
1919
|
+
'pro_2',
|
|
1920
|
+
'pro_3',
|
|
1921
|
+
'pro_4',
|
|
1922
|
+
'pro_5',
|
|
1923
|
+
'pro_6',
|
|
1924
|
+
'pro_7',
|
|
1925
|
+
'pro_8',
|
|
1926
|
+
'pro_9',
|
|
1927
|
+
'pro_10',
|
|
1928
|
+
'pro_11',
|
|
1929
|
+
'biz_1',
|
|
1930
|
+
'biz_2',
|
|
1931
|
+
'biz_3',
|
|
1932
|
+
'biz_4',
|
|
1933
|
+
'biz_5',
|
|
1934
|
+
'biz_6',
|
|
1935
|
+
'biz_7',
|
|
1936
|
+
'biz_8',
|
|
1937
|
+
'biz_9',
|
|
1938
|
+
'biz_10',
|
|
1939
|
+
'biz_11',
|
|
1940
|
+
'enterprise',
|
|
1941
|
+
'ambassador',
|
|
1942
|
+
'ktlo',
|
|
1943
|
+
'ktlo_1',
|
|
1944
|
+
'ktlo_2',
|
|
1945
|
+
'model_partner',
|
|
1946
|
+
'teams_1',
|
|
1947
|
+
'teams_2',
|
|
1948
|
+
'teams_3',
|
|
1949
|
+
'teams_4',
|
|
1950
|
+
'teams_5',
|
|
1951
|
+
'teams_6',
|
|
1952
|
+
'teams_7',
|
|
1953
|
+
'teams_8',
|
|
1954
|
+
'teams_9',
|
|
1955
|
+
'teams_10',
|
|
1956
|
+
'teams_11'
|
|
1957
|
+
]).optional(),
|
|
1958
|
+
plan_scheduled: z.string().optional(),
|
|
1959
|
+
plan_scheduled_event_at: z.iso.datetime().optional(),
|
|
1960
|
+
plan_scheduled_updated_at: z.iso.datetime().optional(),
|
|
1961
|
+
plan_type: z.string().optional(),
|
|
1962
|
+
plan_type_scheduled: z.string().optional(),
|
|
1963
|
+
publishing_policy: z.enum(['workspace_only', 'disabled']).optional(),
|
|
1964
|
+
reauth: z.boolean().optional(),
|
|
1965
|
+
received_tax_id_bonus: z.boolean().optional(),
|
|
1966
|
+
referral_code: z.string().optional(),
|
|
1967
|
+
referral_count: z.number(),
|
|
1968
|
+
referral_disabled: z.boolean().optional(),
|
|
1969
|
+
require_customer_pam_approval: z.boolean().optional(),
|
|
1970
|
+
require_security_scan_before_publish: z.boolean().optional(),
|
|
1971
|
+
require_workspace_editor_for_project_editing: z.boolean().optional(),
|
|
1972
|
+
sandbox_provider_url: z.string().optional(),
|
|
1973
|
+
seamless_connector_settings: z.array(SeamlessConnectorSettingSchema).nullish(),
|
|
1974
|
+
security_auto_fix_mode: z.enum([
|
|
1975
|
+
'off',
|
|
1976
|
+
'workspace_published_projects',
|
|
1977
|
+
'externally_published_projects',
|
|
1978
|
+
'published_projects',
|
|
1979
|
+
'all_projects'
|
|
1980
|
+
]).optional(),
|
|
1981
|
+
share_sample_data_with_llms: z.boolean().optional(),
|
|
1982
|
+
short_referral_code: z.string().optional(),
|
|
1983
|
+
sso_provider_id: z.string().optional(),
|
|
1984
|
+
sso_session_duration: z.number().optional(),
|
|
1985
|
+
standard_connector_settings: z.array(StandardConnectorSettingSchema).nullish(),
|
|
1986
|
+
subscription_currency: z.string().optional(),
|
|
1987
|
+
subscription_status: z.enum([
|
|
1988
|
+
'active',
|
|
1989
|
+
'past_due',
|
|
1990
|
+
'canceled',
|
|
1991
|
+
'trialing',
|
|
1992
|
+
'incomplete',
|
|
1993
|
+
'incomplete_expired',
|
|
1994
|
+
'unpaid',
|
|
1995
|
+
'paused'
|
|
1996
|
+
]).optional(),
|
|
1997
|
+
subscription_status_changed_at: z.iso.datetime().optional(),
|
|
1998
|
+
topup_credits_purchased_at: z.iso.datetime().optional(),
|
|
1999
|
+
updated_at: z.iso.datetime(),
|
|
2000
|
+
use_edu_openai_routing: z.boolean().optional(),
|
|
2001
|
+
username: z.string().optional(),
|
|
2002
|
+
verified_email_jit: z.boolean().optional(),
|
|
2003
|
+
verified_email_jit_role: z.enum([
|
|
2004
|
+
'none',
|
|
2005
|
+
'owner',
|
|
2006
|
+
'admin',
|
|
2007
|
+
'member',
|
|
2008
|
+
'viewer',
|
|
2009
|
+
'collaborator',
|
|
2010
|
+
'invited'
|
|
2011
|
+
]).optional()
|
|
2012
|
+
});
|
|
2013
|
+
|
|
2014
|
+
export const V1ListWorkspacesBodySchema = z.object({
|
|
2015
|
+
data: z.array(WorkspaceWithMembershipSchema).nullable(),
|
|
2016
|
+
pagination: PaginationSchema,
|
|
2017
|
+
workspaces: z.array(WorkspaceWithMembershipSchema).nullable()
|
|
2018
|
+
});
|