@lovable.dev/sdk 1.7.5 → 1.9.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.
@@ -52,17 +52,23 @@ export const ErrorModelSchema = z.object({
52
52
  type: z.string().optional()
53
53
  });
54
54
 
55
- export const GetMeWorkspaceSchema = z.object({
55
+ export const CurrentUserWorkspaceSchema = z.object({
56
56
  id: z.string(),
57
57
  name: z.string(),
58
- role: z.string()
58
+ role: z.enum([
59
+ 'owner',
60
+ 'admin',
61
+ 'member',
62
+ 'viewer',
63
+ 'collaborator'
64
+ ])
59
65
  });
60
66
 
61
- export const GetMeOutputBodySchema = z.object({
67
+ export const CurrentUserSchema = z.object({
62
68
  email: z.string(),
63
69
  id: z.string(),
64
70
  name: z.string(),
65
- workspaces: z.array(GetMeWorkspaceSchema).nullable()
71
+ workspaces: z.array(CurrentUserWorkspaceSchema).nullable()
66
72
  });
67
73
 
68
74
  export const GitFileEntrySchema = z.object({
@@ -91,26 +97,26 @@ export const GetAvailableLibraryProjectsPublicV1OutputBodySchema = z.object({
91
97
  total: z.number()
92
98
  });
93
99
 
94
- export const ListDataPointSchema = z.object({
100
+ export const AnalyticsBreakdownPointSchema = z.object({
95
101
  label: z.string(),
96
102
  value: z.number()
97
103
  });
98
104
 
99
- export const ListDataSchema = z.object({
100
- data: z.array(ListDataPointSchema).nullable(),
105
+ export const AnalyticsBreakdownSchema = z.object({
106
+ data: z.array(AnalyticsBreakdownPointSchema).nullable(),
101
107
  label: z.string()
102
108
  });
103
109
 
104
110
  export const ChannelListsGroupSchema = z.object({
105
- page: ListDataSchema,
106
- source: ListDataSchema
111
+ page: AnalyticsBreakdownSchema,
112
+ source: AnalyticsBreakdownSchema
107
113
  });
108
114
 
109
- export const ListsGroupSchema = z.object({
110
- country: ListDataSchema,
111
- device: ListDataSchema,
112
- page: ListDataSchema,
113
- source: ListDataSchema
115
+ export const AnalyticsBreakdownGroupSchema = z.object({
116
+ country: AnalyticsBreakdownSchema,
117
+ device: AnalyticsBreakdownSchema,
118
+ page: AnalyticsBreakdownSchema,
119
+ source: AnalyticsBreakdownSchema
114
120
  });
115
121
 
116
122
  export const LovableCreatorSchema = z.object({
@@ -139,13 +145,34 @@ export const ProjectPiiFindingDtoSchema = z.object({
139
145
  found_at: z.iso.datetime(),
140
146
  id: z.string(),
141
147
  info_type: z.string().optional(),
142
- likelihood: z.string().optional(),
148
+ likelihood: z.enum([
149
+ 'LIKELIHOOD_UNSPECIFIED',
150
+ 'VERY_UNLIKELY',
151
+ 'UNLIKELY',
152
+ 'POSSIBLE',
153
+ 'LIKELY',
154
+ 'VERY_LIKELY'
155
+ ]).optional(),
143
156
  quote: z.string().optional(),
144
157
  scan_id: z.string().optional(),
145
- sensitivity: z.string().optional(),
146
- source: z.string(),
158
+ sensitivity: z.enum([
159
+ 'low',
160
+ 'mid',
161
+ 'high'
162
+ ]).optional(),
163
+ source: z.enum([
164
+ 'chat',
165
+ 'upload',
166
+ 'cloud_storage',
167
+ 'cloud_sql',
168
+ 'connector'
169
+ ]),
147
170
  sql_location: z.string().optional(),
148
- status: z.string(),
171
+ status: z.enum([
172
+ 'open',
173
+ 'ignored',
174
+ 'fixed'
175
+ ]),
149
176
  storage_path: z.string().optional()
150
177
  });
151
178
 
@@ -187,9 +214,18 @@ export const PublicV1CreateProjectResponseSchema = z.object({
187
214
  message_id: z.string().optional(),
188
215
  name: z.string().optional(),
189
216
  preview_url: z.string().optional(),
190
- status: z.string().optional(),
217
+ status: z.enum([
218
+ 'in_progress',
219
+ 'completed',
220
+ 'failed'
221
+ ]).optional(),
191
222
  url: z.string().optional(),
192
- visibility: z.string().optional(),
223
+ visibility: z.enum([
224
+ 'draft',
225
+ 'private',
226
+ 'workspace_view',
227
+ 'public'
228
+ ]).optional(),
193
229
  workspace_id: z.string().optional()
194
230
  });
195
231
 
@@ -208,7 +244,50 @@ export const PublicV1GitFilesResponseSchema = z.object({
208
244
  ref: z.string()
209
245
  });
210
246
 
211
- export const PublicV1PatchProjectBodySchema = z.object({
247
+ export const PiiLabelSchema = z.object({
248
+ chat_message_id: z.string().optional(),
249
+ chat_upload_id: z.string().optional(),
250
+ connector_id: z.string().optional(),
251
+ found_at: z.iso.datetime(),
252
+ id: z.string(),
253
+ info_type: z.string().optional(),
254
+ likelihood: z.enum([
255
+ 'likelihood_unspecified',
256
+ 'very_unlikely',
257
+ 'unlikely',
258
+ 'possible',
259
+ 'likely',
260
+ 'very_likely'
261
+ ]).optional(),
262
+ quote: z.string().optional(),
263
+ scan_id: z.string().optional(),
264
+ sensitivity: z.enum([
265
+ 'low',
266
+ 'mid',
267
+ 'high'
268
+ ]).optional(),
269
+ source: z.enum([
270
+ 'chat',
271
+ 'upload',
272
+ 'cloud_storage',
273
+ 'cloud_sql',
274
+ 'connector'
275
+ ]),
276
+ sql_location: z.string().optional(),
277
+ status: z.enum([
278
+ 'open',
279
+ 'ignored',
280
+ 'fixed'
281
+ ]),
282
+ storage_path: z.string().optional()
283
+ });
284
+
285
+ export const PiiLabelPageSchema = z.object({
286
+ data: z.array(PiiLabelSchema).nullable(),
287
+ pagination: PaginationSchema
288
+ });
289
+
290
+ export const UpdateProjectRequestSchema = z.object({
212
291
  description: z.string().max(100000).optional(),
213
292
  display_name: z.string().optional(),
214
293
  visibility: z.enum([
@@ -224,7 +303,7 @@ export const PublicV1ProjectFileUploadUrlInputBodySchema = z.object({
224
303
  project_id: z.string()
225
304
  });
226
305
 
227
- export const PublicV1ProjectListItemSchema = z.object({
306
+ export const ProjectSummarySchema = z.object({
228
307
  created_at: z.iso.datetime().optional(),
229
308
  description: z.string().optional(),
230
309
  display_name: z.string().optional(),
@@ -236,19 +315,32 @@ export const PublicV1ProjectListItemSchema = z.object({
236
315
  latest_screenshot_url: z.string().optional(),
237
316
  name: z.string().optional(),
238
317
  og_image_url: z.string().optional(),
239
- project_type: z.string().optional(),
240
- publish_visibility: z.string().optional(),
241
- status: z.string().optional(),
318
+ project_type: z.enum(['project', 'library']).optional(),
319
+ publish_visibility: z.enum([
320
+ 'public',
321
+ 'private',
322
+ 'workspace_only'
323
+ ]).optional(),
324
+ status: z.enum([
325
+ 'in_progress',
326
+ 'completed',
327
+ 'failed'
328
+ ]).optional(),
242
329
  tech_stack: z.string().optional(),
243
330
  updated_at: z.iso.datetime().optional(),
244
331
  url: z.string().optional(),
245
332
  user_id: z.string().optional(),
246
- visibility: z.string().optional(),
333
+ visibility: z.enum([
334
+ 'draft',
335
+ 'private',
336
+ 'workspace_view',
337
+ 'public'
338
+ ]).optional(),
247
339
  workspace_id: z.string()
248
340
  });
249
341
 
250
- export const CursorListResponsePublicV1ProjectListItemSchema = z.object({
251
- data: z.array(PublicV1ProjectListItemSchema).nullable(),
342
+ export const ProjectSummaryPageSchema = z.object({
343
+ data: z.array(ProjectSummarySchema).nullable(),
252
344
  pagination: PaginationSchema
253
345
  });
254
346
 
@@ -267,13 +359,13 @@ export const PublicV1ProjectRemixInputBodySchema = z.object({
267
359
  workspace_id: z.string()
268
360
  });
269
361
 
270
- export const PublicV1PublishAudienceTargetSchema = z.object({
362
+ export const PublishAudienceTargetSchema = z.object({
271
363
  id: z.string().min(1),
272
364
  type: z.enum(['group', 'user'])
273
365
  });
274
366
 
275
- export const PublicV1PublishProjectInputBodySchema = z.object({
276
- audience: z.array(PublicV1PublishAudienceTargetSchema).max(100).nullish(),
367
+ export const PublishProjectRequestSchema = z.object({
368
+ audience: z.array(PublishAudienceTargetSchema).max(100).nullish(),
277
369
  name: z.string().optional(),
278
370
  visibility: z.enum([
279
371
  'public',
@@ -282,16 +374,29 @@ export const PublicV1PublishProjectInputBodySchema = z.object({
282
374
  ]).optional()
283
375
  });
284
376
 
285
- export const PublicV1PublishProjectResponseSchema = z.object({
377
+ export const PublishProjectResponseSchema = z.object({
286
378
  deployment_id: z.string().optional(),
287
- status: z.string(),
379
+ status: z.enum(['pending']),
288
380
  url: z.string().optional(),
289
- visibility: z.string()
381
+ visibility: z.enum([
382
+ 'public',
383
+ 'workspace',
384
+ 'custom'
385
+ ])
290
386
  });
291
387
 
292
- export const PublicV1PublishStatusResponseSchema = z.object({
388
+ export const DeploymentSchema = z.object({
293
389
  deployment_id: z.string(),
294
- error_class: z.string().optional(),
390
+ error_class: z.enum([
391
+ 'transient',
392
+ 'user_code',
393
+ 'user_config',
394
+ 'user_config_code',
395
+ 'user_config_external',
396
+ 'user_data',
397
+ 'blocked_by_policy',
398
+ 'internal'
399
+ ]).optional(),
295
400
  error_code: z.string().optional(),
296
401
  error_message: z.string().optional(),
297
402
  status: z.enum([
@@ -313,8 +418,8 @@ export const PublicV1SetProjectSkillEnabledInputBodySchema = z.object({
313
418
  project_id: z.string()
314
419
  });
315
420
 
316
- export const PublicV1UpdatePublishSettingsInputBodySchema = z.object({
317
- audience: z.array(PublicV1PublishAudienceTargetSchema).max(100).nullish(),
421
+ export const UpdatePublishSettingsRequestSchema = z.object({
422
+ audience: z.array(PublishAudienceTargetSchema).max(100).nullish(),
318
423
  is_published: z.boolean().optional(),
319
424
  visibility: z.enum([
320
425
  'public',
@@ -323,49 +428,80 @@ export const PublicV1UpdatePublishSettingsInputBodySchema = z.object({
323
428
  ]).optional()
324
429
  });
325
430
 
326
- export const PublicV1UpdatePublishSettingsResponseSchema = z.object({
431
+ export const PublishSettingsSchema = z.object({
327
432
  is_published: z.boolean(),
328
433
  url: z.string().optional(),
329
- visibility: z.string()
434
+ visibility: z.enum([
435
+ 'public',
436
+ 'workspace',
437
+ 'custom'
438
+ ])
330
439
  });
331
440
 
332
- export const PublicV1WorkspaceSchema = z.object({
441
+ export const WorkspaceSchema = z.object({
333
442
  created_at: z.iso.datetime().optional(),
334
443
  description: z.string().optional(),
335
444
  id: z.string(),
336
445
  image_url: z.string().optional(),
337
446
  name: z.string(),
338
447
  num_projects: z.number(),
339
- plan: z.string(),
448
+ plan: z.enum([
449
+ 'free',
450
+ 'pro',
451
+ 'business',
452
+ 'enterprise'
453
+ ]),
340
454
  updated_at: z.iso.datetime().optional()
341
455
  });
342
456
 
343
- export const PublicV1WorkspaceMemberSchema = z.object({
457
+ export const WorkspaceMembershipSchema = z.object({
344
458
  joined_at: z.iso.datetime().optional(),
345
- role: z.string(),
459
+ role: z.enum([
460
+ 'owner',
461
+ 'admin',
462
+ 'member',
463
+ 'viewer',
464
+ 'collaborator'
465
+ ]),
346
466
  user_id: z.string()
347
467
  });
348
468
 
349
- export const PublicV1GetWorkspaceBodySchema = z.object({
350
- current_member: PublicV1WorkspaceMemberSchema.optional(),
351
- workspace: PublicV1WorkspaceSchema
469
+ export const GetWorkspaceResponseSchema = z.object({
470
+ current_member: WorkspaceMembershipSchema.optional(),
471
+ workspace: WorkspaceSchema
352
472
  });
353
473
 
354
- export const PublicV1WorkspaceWithMembershipSchema = z.object({
474
+ export const WorkspaceWithMembershipSchema = z.object({
355
475
  created_at: z.iso.datetime().optional(),
356
476
  description: z.string().optional(),
357
477
  id: z.string(),
358
478
  image_url: z.string().optional(),
359
- membership: PublicV1WorkspaceMemberSchema.optional(),
479
+ membership: WorkspaceMembershipSchema.optional(),
360
480
  name: z.string(),
361
481
  num_projects: z.number(),
362
- plan: z.string(),
482
+ plan: z.enum([
483
+ 'free',
484
+ 'pro',
485
+ 'business',
486
+ 'enterprise'
487
+ ]),
363
488
  updated_at: z.iso.datetime().optional()
364
489
  });
365
490
 
366
491
  export const RemixJobFailureSchema = z.object({
367
492
  code: z.string().optional(),
368
- failed_step: z.string(),
493
+ failed_step: z.enum([
494
+ 'starting',
495
+ 'creating_new_project',
496
+ 'restoring_supabase',
497
+ 'copying_history',
498
+ 'preparing_repository',
499
+ 'remixing_integration',
500
+ 'pushing_repository',
501
+ 'finalizing',
502
+ 'completed',
503
+ 'failed'
504
+ ]),
369
505
  message: z.string()
370
506
  });
371
507
 
@@ -373,7 +509,18 @@ export const RemixJobStepInfoSchema = z.object({
373
509
  failure: RemixJobFailureSchema.optional(),
374
510
  integration_name: z.string().optional(),
375
511
  status: z.string().optional(),
376
- step: z.string()
512
+ step: z.enum([
513
+ 'starting',
514
+ 'creating_new_project',
515
+ 'restoring_supabase',
516
+ 'copying_history',
517
+ 'preparing_repository',
518
+ 'remixing_integration',
519
+ 'pushing_repository',
520
+ 'finalizing',
521
+ 'completed',
522
+ 'failed'
523
+ ])
377
524
  });
378
525
 
379
526
  export const RemixWarningSchema = z.object({
@@ -448,6 +595,7 @@ export const SearchProjectItemSchema = z.object({
448
595
  export const SearchWorkspaceProjectsResponseSchema = z.object({
449
596
  has_more: z.boolean(),
450
597
  projects: z.array(SearchProjectItemSchema).nullable(),
598
+ title_search: z.boolean().optional(),
451
599
  total: z.number()
452
600
  });
453
601
 
@@ -511,7 +659,7 @@ export const TimeSeriesGroupSchema = z.object({
511
659
  export const ProjectAnalyticsResponseSchema = z.object({
512
660
  channels: z.record(z.string(), ChannelAnalyticsSchema).optional(),
513
661
  channelsSource: z.enum(['legacy', 'user_app_events']).optional(),
514
- lists: ListsGroupSchema,
662
+ lists: AnalyticsBreakdownGroupSchema,
515
663
  timeSeries: TimeSeriesGroupSchema
516
664
  });
517
665
 
@@ -532,15 +680,15 @@ export const TrendDataPointSchema = z.object({
532
680
  visits: z.number()
533
681
  });
534
682
 
535
- export const ProjectTrendResponseSchema = z.object({
683
+ export const AnalyticsTrendSchema = z.object({
536
684
  currentVisitors: z.number(),
537
685
  data: z.array(TrendDataPointSchema).nullable()
538
686
  });
539
687
 
540
- export const PublicV1ProjectAnalyticsBodySchema = z.object({
541
- lists: ListsGroupSchema.optional(),
688
+ export const ProjectAnalyticsSchema = z.object({
689
+ lists: AnalyticsBreakdownGroupSchema.optional(),
542
690
  timeSeries: TimeSeriesGroupSchema.optional(),
543
- trend: ProjectTrendResponseSchema.optional()
691
+ trend: AnalyticsTrendSchema.optional()
544
692
  });
545
693
 
546
694
  export const UserCreatorSchema = z.object({
@@ -650,6 +798,7 @@ export const SeamlessConnectorApiSchema = z.object({
650
798
  });
651
799
 
652
800
  export const StandardConnectorApiSchema = z.object({
801
+ can_deploy_apps: z.boolean(),
653
802
  can_restrict_to_admins: z.boolean(),
654
803
  categories: z.array(z.enum([
655
804
  'ecommerce',
@@ -718,57 +867,68 @@ export const V1AvailableConnectorEntrySchema = z.object({
718
867
  export const V1AwaitingInputSummarySchema = z.object({
719
868
  event_id: z.string(),
720
869
  input_schema: z.unknown().optional(),
721
- prev_session_id: z.string().optional()
870
+ params: z.unknown().optional(),
871
+ prev_session_id: z.string().optional(),
872
+ tool_id: z.string().optional()
722
873
  });
723
874
 
724
- export const V1BillingCreditLimitRowSchema = z.object({
875
+ export const MemberCreditLimitSchema = z.object({
725
876
  monthly_credit_limit: z.number().optional(),
877
+ temporary_limit_expires_at: z.iso.datetime().optional(),
878
+ temporary_monthly_credit_limit: z.number().optional(),
726
879
  user_id: z.string()
727
880
  });
728
881
 
729
- export const V1BillingCreditLimitsBodySchema = z.object({
730
- data: z.array(V1BillingCreditLimitRowSchema).nullable(),
882
+ export const CreditLimitPageSchema = z.object({
883
+ data: z.array(MemberCreditLimitSchema).nullable(),
731
884
  default_monthly_credit_limit: z.number().optional(),
732
885
  pagination: PaginationSchema
733
886
  });
734
887
 
735
- export const V1BillingPeriodSchema = z.object({
888
+ export const BillingPeriodSchema = z.object({
736
889
  end: z.iso.datetime(),
737
890
  start: z.iso.datetime()
738
891
  });
739
892
 
740
- export const V1BillingUsagePeriodSchema = z.object({
893
+ export const CreditUsagePeriodSchema = z.object({
741
894
  end: z.string(),
742
- group_by: z.string().optional(),
743
- interval: z.string().optional(),
895
+ group_by: z.enum(['member', 'project']).optional(),
896
+ interval: z.enum([
897
+ 'day',
898
+ 'week',
899
+ 'month'
900
+ ]).optional(),
744
901
  start: z.string()
745
902
  });
746
903
 
747
- export const V1BulkMemberCreditLimitItemSchema = z.object({
904
+ export const MemberCreditLimitUpdateSchema = z.object({
905
+ duration: z.enum(['permanent', 'current_period']).optional(),
748
906
  email: z.string().optional(),
749
907
  monthly_credit_limit: z.number().gte(0).nullable(),
750
908
  user_id: z.string().optional()
751
909
  });
752
910
 
753
- export const V1BillingBulkSetMemberCreditLimitInputBodySchema = z.object({
754
- members: z.array(V1BulkMemberCreditLimitItemSchema).min(1).max(1000)
911
+ export const SetMemberCreditLimitsRequestSchema = z.object({
912
+ members: z.array(MemberCreditLimitUpdateSchema).min(1).max(1000)
755
913
  });
756
914
 
757
- export const V1BulkMemberCreditLimitResultSchema = z.object({
915
+ export const MemberCreditLimitResultSchema = z.object({
916
+ approved_until: z.iso.datetime().optional(),
917
+ duration: z.enum(['current_period']).optional(),
758
918
  email: z.string().optional(),
759
919
  error: z.string().optional(),
760
- status: z.string(),
920
+ status: z.enum(['success', 'error']),
761
921
  user_id: z.string().optional()
762
922
  });
763
923
 
764
924
  export const V1BulkSetMemberCreditLimitInputBodySchema = z.object({
765
- members: z.array(V1BulkMemberCreditLimitItemSchema).min(1).max(50),
925
+ members: z.array(MemberCreditLimitUpdateSchema).min(1).max(50),
766
926
  workspace_id: z.string()
767
927
  });
768
928
 
769
- export const V1BulkSetMemberCreditLimitOutputBodySchema = z.object({
929
+ export const SetMemberCreditLimitsResponseSchema = z.object({
770
930
  failed: z.number(),
771
- results: z.array(V1BulkMemberCreditLimitResultSchema).nullable(),
931
+ results: z.array(MemberCreditLimitResultSchema).nullable(),
772
932
  successful: z.number(),
773
933
  total: z.number()
774
934
  });
@@ -792,11 +952,11 @@ export const V1ConnectorResponseSchema = z.object({
792
952
  url: z.string().optional()
793
953
  });
794
954
 
795
- export const V1CreateEmbedUrlInputBodySchema = z.object({
955
+ export const CreateEmbedUrlRequestSchema = z.object({
796
956
  parent_origin: z.string()
797
957
  });
798
958
 
799
- export const V1CreateEmbedUrlOutputBodySchema = z.object({
959
+ export const CreateEmbedUrlResponseSchema = z.object({
800
960
  embed_url: z.string(),
801
961
  expires_at: z.iso.datetime()
802
962
  });
@@ -816,14 +976,27 @@ export const V1CreateProjectResponseSchema = z.object({
816
976
  name: z.string().optional(),
817
977
  og_image_url: z.string().optional(),
818
978
  preview_url: z.string().optional(),
819
- project_type: z.string().optional(),
820
- publish_visibility: z.string().optional(),
821
- status: z.string().optional(),
979
+ project_type: z.enum(['project', 'library']).optional(),
980
+ publish_visibility: z.enum([
981
+ 'public',
982
+ 'private',
983
+ 'workspace_only'
984
+ ]).optional(),
985
+ status: z.enum([
986
+ 'in_progress',
987
+ 'completed',
988
+ 'failed'
989
+ ]).optional(),
822
990
  tech_stack: z.string().optional(),
823
991
  updated_at: z.iso.datetime().optional(),
824
992
  url: z.string().optional(),
825
993
  user_id: z.string().optional(),
826
- visibility: z.string().optional(),
994
+ visibility: z.enum([
995
+ 'draft',
996
+ 'private',
997
+ 'workspace_view',
998
+ 'public'
999
+ ]).optional(),
827
1000
  workspace_id: z.string()
828
1001
  });
829
1002
 
@@ -839,7 +1012,8 @@ export const V1CreateVariantOutputBodySchema = z.object({
839
1012
  variant_id: z.string()
840
1013
  });
841
1014
 
842
- export const V1CreditHistoryEntrySchema = z.object({
1015
+ export const CreditHistoryEntrySchema = z.object({
1016
+ credit_grant_id: z.string(),
843
1017
  credits_change: z.number(),
844
1018
  event_type: z.enum([
845
1019
  'granted',
@@ -978,8 +1152,8 @@ export const V1ListStandardConnectorsResponseSchema = z.object({
978
1152
  total: z.number()
979
1153
  });
980
1154
 
981
- export const V1ListWorkspacesBodySchema = z.object({
982
- data: z.array(PublicV1WorkspaceWithMembershipSchema).nullable(),
1155
+ export const WorkspacePageSchema = z.object({
1156
+ data: z.array(WorkspaceWithMembershipSchema).nullable(),
983
1157
  pagination: PaginationSchema
984
1158
  });
985
1159
 
@@ -991,6 +1165,13 @@ export const V1MessageErrorSchema = z.object({
991
1165
  export const V1AiResponseSummarySchema = z.object({
992
1166
  awaiting_input: V1AwaitingInputSummarySchema.optional(),
993
1167
  commit_sha: z.string().optional(),
1168
+ completion_reason: z.enum([
1169
+ 'finished',
1170
+ 'stopped',
1171
+ 'error',
1172
+ 'policy_violation',
1173
+ 'max_iterations'
1174
+ ]).optional(),
994
1175
  content: z.string(),
995
1176
  cost_credits: z.number().optional(),
996
1177
  edit_id: z.string().optional(),
@@ -1022,6 +1203,13 @@ export const V1ListMessagesOutputBodySchema = z.object({
1022
1203
  export const V1MessageResponseSchema = z.object({
1023
1204
  awaiting_input: V1AwaitingInputSummarySchema.optional(),
1024
1205
  commit_sha: z.string().optional(),
1206
+ completion_reason: z.enum([
1207
+ 'finished',
1208
+ 'stopped',
1209
+ 'error',
1210
+ 'policy_violation',
1211
+ 'max_iterations'
1212
+ ]).optional(),
1025
1213
  content: z.string(),
1026
1214
  cost_credits: z.number().optional(),
1027
1215
  created_at: z.string(),
@@ -1041,7 +1229,7 @@ export const V1MoveProjectsToFolderInputBodySchema = z.object({
1041
1229
  project_ids: z.array(z.string()).min(1).max(30).nullable()
1042
1230
  });
1043
1231
 
1044
- export const V1ProjectCollaboratorSchema = z.object({
1232
+ export const ProjectCollaboratorSchema = z.object({
1045
1233
  accepted_at: z.iso.datetime().optional(),
1046
1234
  access_level: z.enum([
1047
1235
  'owner',
@@ -1056,11 +1244,12 @@ export const V1ProjectCollaboratorSchema = z.object({
1056
1244
  invited_by: z.string().optional(),
1057
1245
  is_internal: z.boolean(),
1058
1246
  is_workspace_member: z.boolean(),
1247
+ last_accessed_at: z.iso.datetime().nullable(),
1059
1248
  user_id: z.string()
1060
1249
  });
1061
1250
 
1062
- export const CursorListResponseV1ProjectCollaboratorSchema = z.object({
1063
- data: z.array(V1ProjectCollaboratorSchema).nullable(),
1251
+ export const ProjectCollaboratorPageSchema = z.object({
1252
+ data: z.array(ProjectCollaboratorSchema).nullable(),
1064
1253
  pagination: PaginationSchema
1065
1254
  });
1066
1255
 
@@ -1075,7 +1264,7 @@ export const V1ProjectGitFilesResponseSchema = z.object({
1075
1264
  total: z.number()
1076
1265
  });
1077
1266
 
1078
- export const V1ProjectResponseSchema = z.object({
1267
+ export const ProjectSchema = z.object({
1079
1268
  created_at: z.iso.datetime().optional(),
1080
1269
  description: z.string().optional(),
1081
1270
  display_name: z.string().optional(),
@@ -1089,14 +1278,27 @@ export const V1ProjectResponseSchema = z.object({
1089
1278
  name: z.string().optional(),
1090
1279
  og_image_url: z.string().optional(),
1091
1280
  preview_url: z.string().optional(),
1092
- project_type: z.string().optional(),
1093
- publish_visibility: z.string().optional(),
1094
- status: z.string().optional(),
1281
+ project_type: z.enum(['project', 'library']).optional(),
1282
+ publish_visibility: z.enum([
1283
+ 'public',
1284
+ 'private',
1285
+ 'workspace_only'
1286
+ ]).optional(),
1287
+ status: z.enum([
1288
+ 'in_progress',
1289
+ 'completed',
1290
+ 'failed'
1291
+ ]).optional(),
1095
1292
  tech_stack: z.string().optional(),
1096
1293
  updated_at: z.iso.datetime().optional(),
1097
1294
  url: z.string().optional(),
1098
1295
  user_id: z.string().optional(),
1099
- visibility: z.string().optional(),
1296
+ visibility: z.enum([
1297
+ 'draft',
1298
+ 'private',
1299
+ 'workspace_view',
1300
+ 'public'
1301
+ ]).optional(),
1100
1302
  workspace_id: z.string()
1101
1303
  });
1102
1304
 
@@ -1136,23 +1338,29 @@ export const V1RemixInitOutputBodySchema = z.object({
1136
1338
  job_id: z.string()
1137
1339
  });
1138
1340
 
1139
- export const V1RemixProgressResultSchema = z.object({
1341
+ export const RemixResultSchema = z.object({
1140
1342
  project_id: z.string(),
1141
1343
  warnings: z.array(RemixWarningSchema).nullish()
1142
1344
  });
1143
1345
 
1144
- export const PublicV1RemixJobOutputBodySchema = z.object({
1346
+ export const RemixJobSchema = z.object({
1145
1347
  error_code: z.string().optional(),
1146
1348
  error_message: z.string().optional(),
1147
- result: V1RemixProgressResultSchema.optional(),
1148
- status: z.string(),
1349
+ result: RemixResultSchema.optional(),
1350
+ status: z.enum([
1351
+ 'preparing',
1352
+ 'running',
1353
+ 'completed',
1354
+ 'error',
1355
+ 'unknown'
1356
+ ]),
1149
1357
  step: RemixJobStepInfoSchema.optional()
1150
1358
  });
1151
1359
 
1152
1360
  export const V1RemixProgressOutputBodySchema = z.object({
1153
1361
  error_code: z.string().optional(),
1154
1362
  error_message: z.string().optional(),
1155
- result: V1RemixProgressResultSchema.optional(),
1363
+ result: RemixResultSchema.optional(),
1156
1364
  status: z.string(),
1157
1365
  step: RemixJobStepInfoSchema.optional()
1158
1366
  });
@@ -1161,61 +1369,88 @@ export const V1RemoveConnectorOutputBodySchema = z.object({
1161
1369
  success: z.boolean()
1162
1370
  });
1163
1371
 
1164
- export const V1SecurityFindingSchema = z.object({
1372
+ export const SecurityFindingSchema = z.object({
1165
1373
  category: z.string().optional(),
1166
1374
  created_at: z.iso.datetime(),
1167
1375
  description: z.string().optional(),
1168
1376
  details: z.string().optional(),
1169
1377
  finding_id: z.string(),
1170
1378
  first_seen_scan_id: z.string().optional(),
1171
- level: z.string(),
1379
+ level: z.enum([
1380
+ 'error',
1381
+ 'warn',
1382
+ 'info'
1383
+ ]),
1172
1384
  link: z.string().optional(),
1173
1385
  metadata: z.record(z.string(), z.unknown()).optional(),
1174
1386
  name: z.string(),
1175
1387
  recurrence: z.number(),
1176
1388
  remediation_difficulty: z.string().optional(),
1177
1389
  scanner_name: z.string(),
1178
- status: z.string(),
1390
+ status: z.enum([
1391
+ 'open',
1392
+ 'fixed',
1393
+ 'ignored'
1394
+ ]),
1179
1395
  updated_at: z.iso.datetime()
1180
1396
  });
1181
1397
 
1182
- export const V1SecurityScanActorSchema = z.object({
1398
+ export const SecurityScanActorSchema = z.object({
1183
1399
  email: z.string().optional(),
1184
1400
  id: z.string().optional(),
1185
1401
  name: z.string().optional(),
1186
- type: z.string()
1402
+ type: z.enum(['user', 'system'])
1187
1403
  });
1188
1404
 
1189
- export const V1SecurityScanSummarySchema = z.object({
1405
+ export const SecurityScanSchema = z.object({
1190
1406
  commit_sha: z.string().optional(),
1191
1407
  finished_at: z.iso.datetime().optional(),
1192
1408
  requested_scanners: z.array(z.string()).nullable(),
1193
1409
  scan_id: z.string(),
1194
1410
  started_at: z.iso.datetime(),
1195
- status: z.string(),
1196
- trigger_source: z.string(),
1197
- triggered_by: V1SecurityScanActorSchema
1411
+ status: z.enum([
1412
+ 'running',
1413
+ 'completed',
1414
+ 'failed'
1415
+ ]),
1416
+ trigger_source: z.enum([
1417
+ 'workflow',
1418
+ 'user',
1419
+ 'ui_auto',
1420
+ 'aikido_import',
1421
+ 'manage_findings',
1422
+ 'app_mcp_deep_auto',
1423
+ 'hvt_scheduled',
1424
+ 'workspace_scheduled',
1425
+ 'enterprise_batch',
1426
+ 'gitsync_pull'
1427
+ ]),
1428
+ triggered_by: SecurityScanActorSchema
1198
1429
  });
1199
1430
 
1200
- export const CursorListResponseV1SecurityScanSummarySchema = z.object({
1201
- data: z.array(V1SecurityScanSummarySchema).nullable(),
1431
+ export const SecurityScanPageSchema = z.object({
1432
+ data: z.array(SecurityScanSchema).nullable(),
1202
1433
  pagination: PaginationSchema
1203
1434
  });
1204
1435
 
1205
- export const V1SecurityScannerRunSchema = z.object({
1436
+ export const SecurityScannerRunSchema = z.object({
1206
1437
  commit_sha: z.string().optional(),
1207
1438
  error_message: z.string().optional(),
1208
1439
  finished_at: z.iso.datetime().optional(),
1209
1440
  scanner_name: z.string(),
1210
1441
  scanner_version: z.string().optional(),
1211
1442
  started_at: z.iso.datetime(),
1212
- status: z.string()
1443
+ status: z.enum([
1444
+ 'succeeded',
1445
+ 'failed',
1446
+ 'skipped'
1447
+ ])
1213
1448
  });
1214
1449
 
1215
- export const V1GetSecurityScanOutputBodySchema = z.object({
1216
- findings: z.array(V1SecurityFindingSchema).nullable(),
1217
- scan: V1SecurityScanSummarySchema,
1218
- scanner_runs: z.array(V1SecurityScannerRunSchema).nullable()
1450
+ export const SecurityScanDetailSchema = z.object({
1451
+ findings: z.array(SecurityFindingSchema).nullable(),
1452
+ scan: SecurityScanSchema,
1453
+ scanner_runs: z.array(SecurityScannerRunSchema).nullable()
1219
1454
  });
1220
1455
 
1221
1456
  export const V1SelectedLibrarySchema = z.object({
@@ -1270,10 +1505,14 @@ export const V1TriggerSecurityScanInputBodySchema = z.object({
1270
1505
  project_id: z.string()
1271
1506
  });
1272
1507
 
1273
- export const V1TriggerSecurityScanResponseBodySchema = z.object({
1508
+ export const TriggerSecurityScanResponseSchema = z.object({
1274
1509
  message: z.string().optional(),
1275
1510
  scan_id: z.string(),
1276
- status: z.string()
1511
+ status: z.enum([
1512
+ 'started',
1513
+ 'running',
1514
+ 'completed'
1515
+ ])
1277
1516
  });
1278
1517
 
1279
1518
  export const V1UnscopedFileSchema = z.object({
@@ -1360,7 +1599,7 @@ export const V1UpdateWorkspaceSettingsInputBodySchema = z.object({
1360
1599
  workspace_id: z.string()
1361
1600
  });
1362
1601
 
1363
- export const V1UpdateWorkspaceSettingsNestedInputBodySchema = z.object({
1602
+ export const UpdateWorkspaceSettingsRequestSchema = z.object({
1364
1603
  default_monthly_member_credit_limit: z.number().gte(0).nullish()
1365
1604
  });
1366
1605
 
@@ -1395,38 +1634,64 @@ export const V1WorkspaceAuditLogsBodySchema = z.object({
1395
1634
  pagination: PaginationSchema
1396
1635
  });
1397
1636
 
1398
- export const V1WorkspaceCreditHistoryBodySchema = z.object({
1399
- data: z.array(V1CreditHistoryEntrySchema).nullable(),
1637
+ export const CreditHistoryPageSchema = z.object({
1638
+ data: z.array(CreditHistoryEntrySchema).nullable(),
1400
1639
  pagination: PaginationSchema,
1401
1640
  total: z.number().optional(),
1402
1641
  total_is_capped: z.boolean().optional()
1403
1642
  });
1404
1643
 
1405
- export const V1WorkspaceCreditsExpiringGrantSchema = z.object({
1406
- applicability: z.string().optional(),
1644
+ export const ExpiringCreditGrantSchema = z.object({
1645
+ applicability: z.enum([
1646
+ 'generic',
1647
+ 'build_time',
1648
+ 'build_mode',
1649
+ 'plan_mode'
1650
+ ]).optional(),
1407
1651
  credits: z.number(),
1408
1652
  expires_at: z.iso.datetime(),
1409
- grant_type: z.string()
1653
+ grant_type: z.enum([
1654
+ 'billing',
1655
+ 'rollover',
1656
+ 'topup',
1657
+ 'commitment',
1658
+ 'cashback',
1659
+ 'granted',
1660
+ 'overage',
1661
+ 'unlimited',
1662
+ 'allowance'
1663
+ ])
1410
1664
  });
1411
1665
 
1412
- export const V1WorkspaceCreditsGrantTypeBalanceSchema = z.object({
1413
- grant_type: z.string(),
1666
+ export const CreditGrantTypeBalanceSchema = z.object({
1667
+ grant_type: z.enum([
1668
+ 'billing',
1669
+ 'daily',
1670
+ 'rollover',
1671
+ 'topup',
1672
+ 'commitment',
1673
+ 'cashback',
1674
+ 'granted',
1675
+ 'overage',
1676
+ 'unlimited',
1677
+ 'allowance'
1678
+ ]),
1414
1679
  granted: z.number(),
1415
1680
  remaining: z.number()
1416
1681
  });
1417
1682
 
1418
- export const V1WorkspaceCreditsBodySchema = z.object({
1419
- billing_period: V1BillingPeriodSchema,
1683
+ export const CreditBalanceSchema = z.object({
1684
+ billing_period: BillingPeriodSchema,
1420
1685
  daily_limit: z.number(),
1421
1686
  daily_remaining: z.number(),
1422
- expiring_grants: z.array(V1WorkspaceCreditsExpiringGrantSchema).nullable(),
1423
- grant_type_balances: z.array(V1WorkspaceCreditsGrantTypeBalanceSchema).nullable(),
1687
+ expiring_grants: z.array(ExpiringCreditGrantSchema).nullable(),
1688
+ grant_type_balances: z.array(CreditGrantTypeBalanceSchema).nullable(),
1424
1689
  total_billing_period_used: z.number(),
1425
1690
  total_granted: z.number(),
1426
1691
  total_remaining: z.number()
1427
1692
  });
1428
1693
 
1429
- export const V1WorkspaceGroupSchema = z.object({
1694
+ export const WorkspaceGroupSchema = z.object({
1430
1695
  created_at: z.iso.datetime(),
1431
1696
  description: z.string().optional(),
1432
1697
  id: z.string(),
@@ -1437,34 +1702,46 @@ export const V1WorkspaceGroupSchema = z.object({
1437
1702
  workspace_id: z.string()
1438
1703
  });
1439
1704
 
1440
- export const CursorListResponseV1WorkspaceGroupSchema = z.object({
1441
- data: z.array(V1WorkspaceGroupSchema).nullable(),
1705
+ export const WorkspaceGroupPageSchema = z.object({
1706
+ data: z.array(WorkspaceGroupSchema).nullable(),
1442
1707
  pagination: PaginationSchema
1443
1708
  });
1444
1709
 
1445
- export const V1WorkspaceInsightsActivityFreshnessSchema = z.object({
1710
+ export const WorkspaceInsightsActivityFreshnessSchema = z.object({
1446
1711
  edits_as_of: z.iso.datetime().optional(),
1447
1712
  visitors_as_of: z.iso.datetime().optional()
1448
1713
  });
1449
1714
 
1450
- export const V1WorkspaceInsightsEdgeFunctionSchema = z.object({
1715
+ export const WorkspaceInsightsEdgeFunctionSchema = z.object({
1451
1716
  name: z.string()
1452
1717
  });
1453
1718
 
1454
- export const V1WorkspaceInsightsFindingSchema = z.object({
1455
- category: z.string(),
1719
+ export const WorkspaceInsightsFindingSchema = z.object({
1720
+ category: z.enum([
1721
+ 'security',
1722
+ 'data',
1723
+ 'exposure',
1724
+ 'credentials',
1725
+ 'access',
1726
+ 'integrations',
1727
+ 'runtime'
1728
+ ]),
1456
1729
  description: z.string(),
1457
1730
  id: z.string(),
1458
1731
  project_count: z.number(),
1459
- severity: z.string(),
1732
+ severity: z.enum([
1733
+ 'needs_review',
1734
+ 'review_recommended',
1735
+ 'no_review_needed'
1736
+ ]),
1460
1737
  title: z.string()
1461
1738
  });
1462
1739
 
1463
- export const V1WorkspaceInsightsOwnerSchema = z.object({
1740
+ export const WorkspaceInsightsOwnerSchema = z.object({
1464
1741
  display_name: z.string().optional()
1465
1742
  });
1466
1743
 
1467
- export const V1WorkspaceInsightsReasonValuesSchema = z.object({
1744
+ export const WorkspaceInsightsReasonValuesSchema = z.object({
1468
1745
  connector_count: z.number().optional(),
1469
1746
  edge_function_count: z.number().optional(),
1470
1747
  error_count: z.number().optional(),
@@ -1475,22 +1752,34 @@ export const V1WorkspaceInsightsReasonValuesSchema = z.object({
1475
1752
  warning_count: z.number().optional()
1476
1753
  });
1477
1754
 
1478
- export const V1WorkspaceInsightsReasonSchema = z.object({
1479
- category: z.string(),
1755
+ export const WorkspaceInsightsReasonSchema = z.object({
1756
+ category: z.enum([
1757
+ 'security',
1758
+ 'data',
1759
+ 'exposure',
1760
+ 'credentials',
1761
+ 'access',
1762
+ 'integrations',
1763
+ 'runtime'
1764
+ ]),
1480
1765
  detail: z.string(),
1481
1766
  id: z.string(),
1482
1767
  label: z.string(),
1483
- severity: z.string(),
1484
- values: V1WorkspaceInsightsReasonValuesSchema.optional()
1768
+ severity: z.enum([
1769
+ 'needs_review',
1770
+ 'review_recommended',
1771
+ 'no_review_needed'
1772
+ ]),
1773
+ values: WorkspaceInsightsReasonValuesSchema.optional()
1485
1774
  });
1486
1775
 
1487
- export const V1WorkspaceInsightsReviewPrioritySchema = z.object({
1776
+ export const WorkspaceInsightsReviewPrioritySchema = z.object({
1488
1777
  needs_review: z.number(),
1489
1778
  no_review_needed: z.number(),
1490
1779
  review_recommended: z.number()
1491
1780
  });
1492
1781
 
1493
- export const V1WorkspaceInsightsSignalsSchema = z.object({
1782
+ export const WorkspaceInsightsSignalsSchema = z.object({
1494
1783
  chat_attachment_count: z.number(),
1495
1784
  connector_count: z.number(),
1496
1785
  edge_function_count: z.number(),
@@ -1522,12 +1811,16 @@ export const V1WorkspaceInsightsSignalsSchema = z.object({
1522
1811
  warning_count: z.number()
1523
1812
  });
1524
1813
 
1525
- export const V1WorkspaceInsightsProjectSchema = z.object({
1526
- activity_group: z.string().optional(),
1814
+ export const WorkspaceInsightsProjectSchema = z.object({
1815
+ activity_group: z.enum([
1816
+ 'last_14_days',
1817
+ 'last_60_days',
1818
+ 'older'
1819
+ ]).optional(),
1527
1820
  connectors: z.array(z.string()).nullish(),
1528
1821
  description: z.string().optional(),
1529
1822
  display_name: z.string().optional(),
1530
- edge_functions: z.array(V1WorkspaceInsightsEdgeFunctionSchema).nullish(),
1823
+ edge_functions: z.array(WorkspaceInsightsEdgeFunctionSchema).nullish(),
1531
1824
  edit_count: z.number(),
1532
1825
  edits_24h: z.number(),
1533
1826
  edits_30d: z.number(),
@@ -1537,84 +1830,118 @@ export const V1WorkspaceInsightsProjectSchema = z.object({
1537
1830
  is_published: z.boolean().optional(),
1538
1831
  last_edited_at: z.iso.datetime().optional(),
1539
1832
  last_security_scan_at: z.iso.datetime().optional(),
1540
- matched_reason: V1WorkspaceInsightsReasonSchema.optional(),
1833
+ matched_reason: WorkspaceInsightsReasonSchema.optional(),
1541
1834
  message_count: z.number(),
1542
1835
  name: z.string().optional(),
1543
1836
  og_image_url: z.string().optional(),
1544
- owner: V1WorkspaceInsightsOwnerSchema.optional(),
1545
- publish_visibility: z.string().optional(),
1546
- review_priority: z.string().optional(),
1547
- review_priority_explanation: z.array(V1WorkspaceInsightsReasonSchema).nullable(),
1548
- signals: V1WorkspaceInsightsSignalsSchema,
1837
+ owner: WorkspaceInsightsOwnerSchema.optional(),
1838
+ publish_visibility: z.enum([
1839
+ 'public',
1840
+ 'private',
1841
+ 'workspace_only'
1842
+ ]).optional(),
1843
+ review_priority: z.enum([
1844
+ 'needs_review',
1845
+ 'review_recommended',
1846
+ 'no_review_needed',
1847
+ 'unscored'
1848
+ ]).optional(),
1849
+ review_priority_explanation: z.array(WorkspaceInsightsReasonSchema).nullable(),
1850
+ signals: WorkspaceInsightsSignalsSchema,
1549
1851
  url: z.string().optional(),
1550
- visibility: z.string().optional(),
1852
+ visibility: z.enum([
1853
+ 'draft',
1854
+ 'private',
1855
+ 'workspace_view',
1856
+ 'public'
1857
+ ]).optional(),
1551
1858
  visitors_24h: z.number(),
1552
1859
  visitors_30d: z.number(),
1553
1860
  visitors_7d: z.number()
1554
1861
  });
1555
1862
 
1556
- export const V1WorkspaceInsightsProjectsBodySchema = z.object({
1557
- activity_as_of: V1WorkspaceInsightsActivityFreshnessSchema.optional(),
1558
- applied_finding: V1WorkspaceInsightsFindingSchema.optional(),
1863
+ export const WorkspaceInsightsProjectPageSchema = z.object({
1864
+ activity_as_of: WorkspaceInsightsActivityFreshnessSchema.optional(),
1865
+ applied_finding: WorkspaceInsightsFindingSchema.optional(),
1559
1866
  as_of: z.iso.datetime().optional(),
1560
- data: z.array(V1WorkspaceInsightsProjectSchema).nullable(),
1867
+ data: z.array(WorkspaceInsightsProjectSchema).nullable(),
1561
1868
  pagination: PaginationSchema,
1562
1869
  total: z.number()
1563
1870
  });
1564
1871
 
1565
- export const V1WorkspaceInsightsStatSchema = z.object({
1872
+ export const WorkspaceInsightsStatSchema = z.object({
1566
1873
  delta_30d: z.number(),
1567
1874
  delta_window: z.string(),
1568
1875
  value: z.number()
1569
1876
  });
1570
1877
 
1571
- export const V1WorkspaceInsightsSummarySchema = z.object({
1572
- externally_published: V1WorkspaceInsightsStatSchema,
1573
- risk: V1WorkspaceInsightsReviewPrioritySchema,
1574
- total_projects: V1WorkspaceInsightsStatSchema,
1575
- workspace_members: V1WorkspaceInsightsStatSchema
1878
+ export const WorkspaceInsightsSummarySchema = z.object({
1879
+ externally_published: WorkspaceInsightsStatSchema,
1880
+ risk: WorkspaceInsightsReviewPrioritySchema,
1881
+ total_projects: WorkspaceInsightsStatSchema,
1882
+ workspace_members: WorkspaceInsightsStatSchema
1576
1883
  });
1577
1884
 
1578
- export const V1WorkspaceInsightsBodySchema = z.object({
1885
+ export const WorkspaceInsightsSchema = z.object({
1579
1886
  as_of: z.iso.datetime().optional(),
1580
- findings: z.array(V1WorkspaceInsightsFindingSchema).nullable(),
1581
- summary: V1WorkspaceInsightsSummarySchema
1887
+ findings: z.array(WorkspaceInsightsFindingSchema),
1888
+ summary: WorkspaceInsightsSummarySchema
1582
1889
  });
1583
1890
 
1584
- export const V1WorkspaceMemberGroupSchema = z.object({
1891
+ export const WorkspaceMemberGroupSchema = z.object({
1585
1892
  id: z.string(),
1586
1893
  name: z.string()
1587
1894
  });
1588
1895
 
1589
- export const V1WorkspaceMemberSchema = z.object({
1896
+ export const WorkspaceMemberSchema = z.object({
1590
1897
  display_name: z.string().optional(),
1591
1898
  email: z.string().optional(),
1592
- groups: z.array(V1WorkspaceMemberGroupSchema).optional(),
1899
+ groups: z.array(WorkspaceMemberGroupSchema).optional(),
1593
1900
  invited_at: z.iso.datetime().optional(),
1594
1901
  joined_at: z.iso.datetime().optional(),
1595
1902
  monthly_credit_limit: z.number().optional(),
1596
- role: z.string(),
1903
+ role: z.enum([
1904
+ 'owner',
1905
+ 'admin',
1906
+ 'member',
1907
+ 'viewer',
1908
+ 'collaborator'
1909
+ ]),
1597
1910
  user_id: z.string(),
1598
1911
  workspace_id: z.string()
1599
1912
  });
1600
1913
 
1601
- export const CursorListResponseV1WorkspaceMemberSchema = z.object({
1602
- data: z.array(V1WorkspaceMemberSchema).nullable(),
1914
+ export const WorkspaceMemberPageSchema = z.object({
1915
+ data: z.array(WorkspaceMemberSchema).nullable(),
1603
1916
  pagination: PaginationSchema
1604
1917
  });
1605
1918
 
1606
- export const V1WorkspaceSettingsBodySchema = z.object({
1919
+ export const WorkspaceSettingsSchema = z.object({
1607
1920
  billing_period_end_date: z.iso.datetime().optional(),
1608
1921
  billing_period_start_date: z.iso.datetime().optional(),
1609
1922
  default_monthly_member_credit_limit: z.number().optional(),
1610
- default_project_visibility: z.string().optional(),
1923
+ default_project_visibility: z.enum([
1924
+ 'draft',
1925
+ 'private',
1926
+ 'workspace_view',
1927
+ 'public'
1928
+ ]).optional(),
1611
1929
  enable_pii: z.boolean(),
1612
1930
  enforce_sso: z.boolean(),
1613
1931
  id: z.string(),
1614
1932
  name: z.string(),
1615
1933
  num_seats: z.number().optional(),
1616
- plan: z.string(),
1617
- publishing_policy: z.string().optional()
1934
+ plan: z.enum([
1935
+ 'free',
1936
+ 'pro',
1937
+ 'business',
1938
+ 'enterprise'
1939
+ ]),
1940
+ publishing_policy: z.enum([
1941
+ 'org_only',
1942
+ 'workspace_only',
1943
+ 'disabled'
1944
+ ]).optional()
1618
1945
  });
1619
1946
 
1620
1947
  export const V1WorkspaceSkillDtoSchema = z.object({
@@ -1646,41 +1973,41 @@ export const V1WorkspaceUsageBreakdownEntrySchema = z.object({
1646
1973
  });
1647
1974
 
1648
1975
  export const V1WorkspaceUsageBreakdownBodySchema = z.object({
1649
- billing_period: V1BillingPeriodSchema,
1976
+ billing_period: BillingPeriodSchema,
1650
1977
  data: z.array(V1WorkspaceUsageBreakdownEntrySchema).nullable(),
1651
1978
  member_count: z.number(),
1652
1979
  pagination: PaginationSchema
1653
1980
  });
1654
1981
 
1655
- export const V1WorkspaceUsageConnectorBreakdownSchema = z.object({
1982
+ export const ConnectorUsageSchema = z.object({
1656
1983
  credits: z.number(),
1657
1984
  key: z.string(),
1658
1985
  label: z.string()
1659
1986
  });
1660
1987
 
1661
- export const V1WorkspaceUsageDatabaseBreakdownSchema = z.object({
1988
+ export const DatabaseUsageSchema = z.object({
1662
1989
  credits: z.number(),
1663
1990
  key: z.enum(['database_server', 'database_storage']),
1664
1991
  label: z.string()
1665
1992
  });
1666
1993
 
1667
- export const V1WorkspaceUsageGatewayModelSchema = z.object({
1994
+ export const GatewayModelUsageSchema = z.object({
1668
1995
  credits: z.number(),
1669
1996
  name: z.string(),
1670
1997
  provider: z.string()
1671
1998
  });
1672
1999
 
1673
- export const V1BillingUsageRowSchema = z.object({
2000
+ export const CreditUsageEntrySchema = z.object({
1674
2001
  build: z.number(),
1675
2002
  connectors: z.number(),
1676
- connectors_breakdown: z.array(V1WorkspaceUsageConnectorBreakdownSchema).nullish(),
2003
+ connectors_breakdown: z.array(ConnectorUsageSchema).nullish(),
1677
2004
  database: z.number(),
1678
- database_breakdown: z.array(V1WorkspaceUsageDatabaseBreakdownSchema).nullish(),
2005
+ database_breakdown: z.array(DatabaseUsageSchema).nullish(),
1679
2006
  display_name: z.string().optional(),
1680
2007
  email: z.string().optional(),
1681
2008
  functions: z.number(),
1682
2009
  gateway: z.number(),
1683
- gateway_models: z.array(V1WorkspaceUsageGatewayModelSchema).nullish(),
2010
+ gateway_models: z.array(GatewayModelUsageSchema).nullish(),
1684
2011
  network: z.number(),
1685
2012
  period_end: z.string().optional(),
1686
2013
  period_start: z.string().optional(),
@@ -1692,11 +2019,11 @@ export const V1BillingUsageRowSchema = z.object({
1692
2019
  user_id: z.string().optional()
1693
2020
  });
1694
2021
 
1695
- export const V1BillingUsageBodySchema = z.object({
1696
- data: z.array(V1BillingUsageRowSchema).nullable(),
2022
+ export const CreditUsagePageSchema = z.object({
2023
+ data: z.array(CreditUsageEntrySchema).nullable(),
1697
2024
  entity_count: z.number().optional(),
1698
2025
  pagination: PaginationSchema,
1699
- period: V1BillingUsagePeriodSchema,
2026
+ period: CreditUsagePeriodSchema,
1700
2027
  workspace_total: z.number()
1701
2028
  });
1702
2029
 
@@ -1730,12 +2057,12 @@ export const V1WorkspaceUsageProjectsBodySchema = z.object({
1730
2057
  export const V1WorkspaceUsageTimeseriesBucketSchema = z.object({
1731
2058
  build: z.number(),
1732
2059
  connectors: z.number(),
1733
- connectors_breakdown: z.array(V1WorkspaceUsageConnectorBreakdownSchema).nullable(),
2060
+ connectors_breakdown: z.array(ConnectorUsageSchema).nullable(),
1734
2061
  database: z.number(),
1735
- database_breakdown: z.array(V1WorkspaceUsageDatabaseBreakdownSchema).nullable(),
2062
+ database_breakdown: z.array(DatabaseUsageSchema).nullable(),
1736
2063
  functions: z.number(),
1737
2064
  gateway: z.number(),
1738
- gateway_models: z.array(V1WorkspaceUsageGatewayModelSchema).nullable(),
2065
+ gateway_models: z.array(GatewayModelUsageSchema).nullable(),
1739
2066
  network: z.number(),
1740
2067
  period_end: z.string(),
1741
2068
  period_start: z.string(),
@@ -1786,6 +2113,6 @@ export const AddProjectsToFolderResultSchema = z.object({
1786
2113
  visibility_updated: z.array(VisibilityChangeInfoSchema).nullable()
1787
2114
  });
1788
2115
 
1789
- export const WorkspaceAnalyticsResponseSchema = z.object({
2116
+ export const WorkspaceAnalyticsSchema = z.object({
1790
2117
  timeSeries: TimeSeriesGroupSchema
1791
2118
  });