@lovable.dev/sdk 1.7.5 → 1.9.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.
@@ -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,48 @@ 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_upload_id: z.string().optional(),
249
+ connector_id: z.string().optional(),
250
+ found_at: z.iso.datetime(),
251
+ id: z.string(),
252
+ info_type: z.string().optional(),
253
+ likelihood: z.enum([
254
+ 'likelihood_unspecified',
255
+ 'very_unlikely',
256
+ 'unlikely',
257
+ 'possible',
258
+ 'likely',
259
+ 'very_likely'
260
+ ]).optional(),
261
+ quote: z.string().optional(),
262
+ sensitivity: z.enum([
263
+ 'low',
264
+ 'mid',
265
+ 'high'
266
+ ]).optional(),
267
+ source: z.enum([
268
+ 'chat',
269
+ 'upload',
270
+ 'cloud_storage',
271
+ 'cloud_sql',
272
+ 'connector'
273
+ ]),
274
+ sql_location: z.string().optional(),
275
+ status: z.enum([
276
+ 'open',
277
+ 'ignored',
278
+ 'fixed'
279
+ ]),
280
+ storage_path: z.string().optional()
281
+ });
282
+
283
+ export const PiiLabelPageSchema = z.object({
284
+ data: z.array(PiiLabelSchema).nullable(),
285
+ pagination: PaginationSchema
286
+ });
287
+
288
+ export const UpdateProjectRequestSchema = z.object({
212
289
  description: z.string().max(100000).optional(),
213
290
  display_name: z.string().optional(),
214
291
  visibility: z.enum([
@@ -224,7 +301,7 @@ export const PublicV1ProjectFileUploadUrlInputBodySchema = z.object({
224
301
  project_id: z.string()
225
302
  });
226
303
 
227
- export const PublicV1ProjectListItemSchema = z.object({
304
+ export const ProjectSummarySchema = z.object({
228
305
  created_at: z.iso.datetime().optional(),
229
306
  description: z.string().optional(),
230
307
  display_name: z.string().optional(),
@@ -236,19 +313,30 @@ export const PublicV1ProjectListItemSchema = z.object({
236
313
  latest_screenshot_url: z.string().optional(),
237
314
  name: z.string().optional(),
238
315
  og_image_url: z.string().optional(),
239
- project_type: z.string().optional(),
240
- publish_visibility: z.string().optional(),
241
- status: z.string().optional(),
242
- tech_stack: z.string().optional(),
243
- updated_at: z.iso.datetime().optional(),
316
+ project_type: z.enum(['project', 'library']).optional(),
317
+ publish_visibility: z.enum([
318
+ 'public',
319
+ 'private',
320
+ 'workspace_only'
321
+ ]).optional(),
322
+ status: z.enum([
323
+ 'in_progress',
324
+ 'completed',
325
+ 'failed'
326
+ ]).optional(),
244
327
  url: z.string().optional(),
245
328
  user_id: z.string().optional(),
246
- visibility: z.string().optional(),
329
+ visibility: z.enum([
330
+ 'draft',
331
+ 'private',
332
+ 'workspace_view',
333
+ 'public'
334
+ ]).optional(),
247
335
  workspace_id: z.string()
248
336
  });
249
337
 
250
- export const CursorListResponsePublicV1ProjectListItemSchema = z.object({
251
- data: z.array(PublicV1ProjectListItemSchema).nullable(),
338
+ export const ProjectSummaryPageSchema = z.object({
339
+ data: z.array(ProjectSummarySchema).nullable(),
252
340
  pagination: PaginationSchema
253
341
  });
254
342
 
@@ -267,13 +355,13 @@ export const PublicV1ProjectRemixInputBodySchema = z.object({
267
355
  workspace_id: z.string()
268
356
  });
269
357
 
270
- export const PublicV1PublishAudienceTargetSchema = z.object({
358
+ export const PublishAudienceTargetSchema = z.object({
271
359
  id: z.string().min(1),
272
360
  type: z.enum(['group', 'user'])
273
361
  });
274
362
 
275
- export const PublicV1PublishProjectInputBodySchema = z.object({
276
- audience: z.array(PublicV1PublishAudienceTargetSchema).max(100).nullish(),
363
+ export const PublishProjectRequestSchema = z.object({
364
+ audience: z.array(PublishAudienceTargetSchema).max(100).nullish(),
277
365
  name: z.string().optional(),
278
366
  visibility: z.enum([
279
367
  'public',
@@ -282,16 +370,29 @@ export const PublicV1PublishProjectInputBodySchema = z.object({
282
370
  ]).optional()
283
371
  });
284
372
 
285
- export const PublicV1PublishProjectResponseSchema = z.object({
373
+ export const PublishProjectResponseSchema = z.object({
286
374
  deployment_id: z.string().optional(),
287
- status: z.string(),
375
+ status: z.enum(['pending']),
288
376
  url: z.string().optional(),
289
- visibility: z.string()
377
+ visibility: z.enum([
378
+ 'public',
379
+ 'workspace',
380
+ 'custom'
381
+ ])
290
382
  });
291
383
 
292
- export const PublicV1PublishStatusResponseSchema = z.object({
384
+ export const DeploymentSchema = z.object({
293
385
  deployment_id: z.string(),
294
- error_class: z.string().optional(),
386
+ error_class: z.enum([
387
+ 'transient',
388
+ 'user_code',
389
+ 'user_config',
390
+ 'user_config_code',
391
+ 'user_config_external',
392
+ 'user_data',
393
+ 'blocked_by_policy',
394
+ 'internal'
395
+ ]).optional(),
295
396
  error_code: z.string().optional(),
296
397
  error_message: z.string().optional(),
297
398
  status: z.enum([
@@ -303,6 +404,49 @@ export const PublicV1PublishStatusResponseSchema = z.object({
303
404
  url: z.string().optional()
304
405
  });
305
406
 
407
+ export const SecurityFindingSchema = z.object({
408
+ category: z.string().optional(),
409
+ created_at: z.iso.datetime(),
410
+ description: z.string().optional(),
411
+ finding_id: z.string(),
412
+ level: z.enum([
413
+ 'error',
414
+ 'warn',
415
+ 'info'
416
+ ]),
417
+ name: z.string(),
418
+ scanner_name: z.string(),
419
+ status: z.enum([
420
+ 'open',
421
+ 'fixed',
422
+ 'ignored'
423
+ ]),
424
+ updated_at: z.iso.datetime()
425
+ });
426
+
427
+ export const SecurityScanSchema = z.object({
428
+ commit_sha: z.string().optional(),
429
+ finished_at: z.iso.datetime().optional(),
430
+ requested_scanners: z.array(z.string()).nullable(),
431
+ scan_id: z.string(),
432
+ started_at: z.iso.datetime(),
433
+ status: z.enum([
434
+ 'running',
435
+ 'completed',
436
+ 'failed'
437
+ ])
438
+ });
439
+
440
+ export const SecurityScanPageSchema = z.object({
441
+ data: z.array(SecurityScanSchema).nullable(),
442
+ pagination: PaginationSchema
443
+ });
444
+
445
+ export const SecurityScanDetailSchema = z.object({
446
+ findings: z.array(SecurityFindingSchema).nullable(),
447
+ scan: SecurityScanSchema
448
+ });
449
+
306
450
  export const PublicV1SetProjectKnowledgeInputBodySchema = z.object({
307
451
  content: z.string(),
308
452
  project_id: z.string()
@@ -313,8 +457,8 @@ export const PublicV1SetProjectSkillEnabledInputBodySchema = z.object({
313
457
  project_id: z.string()
314
458
  });
315
459
 
316
- export const PublicV1UpdatePublishSettingsInputBodySchema = z.object({
317
- audience: z.array(PublicV1PublishAudienceTargetSchema).max(100).nullish(),
460
+ export const UpdatePublishSettingsRequestSchema = z.object({
461
+ audience: z.array(PublishAudienceTargetSchema).max(100).nullish(),
318
462
  is_published: z.boolean().optional(),
319
463
  visibility: z.enum([
320
464
  'public',
@@ -323,49 +467,80 @@ export const PublicV1UpdatePublishSettingsInputBodySchema = z.object({
323
467
  ]).optional()
324
468
  });
325
469
 
326
- export const PublicV1UpdatePublishSettingsResponseSchema = z.object({
470
+ export const PublishSettingsSchema = z.object({
327
471
  is_published: z.boolean(),
328
472
  url: z.string().optional(),
329
- visibility: z.string()
473
+ visibility: z.enum([
474
+ 'public',
475
+ 'workspace',
476
+ 'custom'
477
+ ])
330
478
  });
331
479
 
332
- export const PublicV1WorkspaceSchema = z.object({
480
+ export const WorkspaceSchema = z.object({
333
481
  created_at: z.iso.datetime().optional(),
334
482
  description: z.string().optional(),
335
483
  id: z.string(),
336
484
  image_url: z.string().optional(),
337
485
  name: z.string(),
338
486
  num_projects: z.number(),
339
- plan: z.string(),
487
+ plan: z.enum([
488
+ 'free',
489
+ 'pro',
490
+ 'business',
491
+ 'enterprise'
492
+ ]),
340
493
  updated_at: z.iso.datetime().optional()
341
494
  });
342
495
 
343
- export const PublicV1WorkspaceMemberSchema = z.object({
496
+ export const WorkspaceMembershipSchema = z.object({
344
497
  joined_at: z.iso.datetime().optional(),
345
- role: z.string(),
498
+ role: z.enum([
499
+ 'owner',
500
+ 'admin',
501
+ 'member',
502
+ 'viewer',
503
+ 'collaborator'
504
+ ]),
346
505
  user_id: z.string()
347
506
  });
348
507
 
349
- export const PublicV1GetWorkspaceBodySchema = z.object({
350
- current_member: PublicV1WorkspaceMemberSchema.optional(),
351
- workspace: PublicV1WorkspaceSchema
508
+ export const GetWorkspaceResponseSchema = z.object({
509
+ current_member: WorkspaceMembershipSchema.optional(),
510
+ workspace: WorkspaceSchema
352
511
  });
353
512
 
354
- export const PublicV1WorkspaceWithMembershipSchema = z.object({
513
+ export const WorkspaceWithMembershipSchema = z.object({
355
514
  created_at: z.iso.datetime().optional(),
356
515
  description: z.string().optional(),
357
516
  id: z.string(),
358
517
  image_url: z.string().optional(),
359
- membership: PublicV1WorkspaceMemberSchema.optional(),
518
+ membership: WorkspaceMembershipSchema.optional(),
360
519
  name: z.string(),
361
520
  num_projects: z.number(),
362
- plan: z.string(),
521
+ plan: z.enum([
522
+ 'free',
523
+ 'pro',
524
+ 'business',
525
+ 'enterprise'
526
+ ]),
363
527
  updated_at: z.iso.datetime().optional()
364
528
  });
365
529
 
366
530
  export const RemixJobFailureSchema = z.object({
367
531
  code: z.string().optional(),
368
- failed_step: z.string(),
532
+ failed_step: z.enum([
533
+ 'starting',
534
+ 'creating_new_project',
535
+ 'restoring_supabase',
536
+ 'copying_history',
537
+ 'preparing_repository',
538
+ 'remixing_integration',
539
+ 'pushing_repository',
540
+ 'finalizing',
541
+ 'completed',
542
+ 'failed'
543
+ ]),
369
544
  message: z.string()
370
545
  });
371
546
 
@@ -373,7 +548,18 @@ export const RemixJobStepInfoSchema = z.object({
373
548
  failure: RemixJobFailureSchema.optional(),
374
549
  integration_name: z.string().optional(),
375
550
  status: z.string().optional(),
376
- step: z.string()
551
+ step: z.enum([
552
+ 'starting',
553
+ 'creating_new_project',
554
+ 'restoring_supabase',
555
+ 'copying_history',
556
+ 'preparing_repository',
557
+ 'remixing_integration',
558
+ 'pushing_repository',
559
+ 'finalizing',
560
+ 'completed',
561
+ 'failed'
562
+ ])
377
563
  });
378
564
 
379
565
  export const RemixWarningSchema = z.object({
@@ -448,6 +634,7 @@ export const SearchProjectItemSchema = z.object({
448
634
  export const SearchWorkspaceProjectsResponseSchema = z.object({
449
635
  has_more: z.boolean(),
450
636
  projects: z.array(SearchProjectItemSchema).nullable(),
637
+ title_search: z.boolean().optional(),
451
638
  total: z.number()
452
639
  });
453
640
 
@@ -511,7 +698,7 @@ export const TimeSeriesGroupSchema = z.object({
511
698
  export const ProjectAnalyticsResponseSchema = z.object({
512
699
  channels: z.record(z.string(), ChannelAnalyticsSchema).optional(),
513
700
  channelsSource: z.enum(['legacy', 'user_app_events']).optional(),
514
- lists: ListsGroupSchema,
701
+ lists: AnalyticsBreakdownGroupSchema,
515
702
  timeSeries: TimeSeriesGroupSchema
516
703
  });
517
704
 
@@ -532,15 +719,15 @@ export const TrendDataPointSchema = z.object({
532
719
  visits: z.number()
533
720
  });
534
721
 
535
- export const ProjectTrendResponseSchema = z.object({
722
+ export const AnalyticsTrendSchema = z.object({
536
723
  currentVisitors: z.number(),
537
724
  data: z.array(TrendDataPointSchema).nullable()
538
725
  });
539
726
 
540
- export const PublicV1ProjectAnalyticsBodySchema = z.object({
541
- lists: ListsGroupSchema.optional(),
727
+ export const ProjectAnalyticsSchema = z.object({
728
+ lists: AnalyticsBreakdownGroupSchema.optional(),
542
729
  timeSeries: TimeSeriesGroupSchema.optional(),
543
- trend: ProjectTrendResponseSchema.optional()
730
+ trend: AnalyticsTrendSchema.optional()
544
731
  });
545
732
 
546
733
  export const UserCreatorSchema = z.object({
@@ -650,6 +837,7 @@ export const SeamlessConnectorApiSchema = z.object({
650
837
  });
651
838
 
652
839
  export const StandardConnectorApiSchema = z.object({
840
+ can_deploy_apps: z.boolean(),
653
841
  can_restrict_to_admins: z.boolean(),
654
842
  categories: z.array(z.enum([
655
843
  'ecommerce',
@@ -718,46 +906,40 @@ export const V1AvailableConnectorEntrySchema = z.object({
718
906
  export const V1AwaitingInputSummarySchema = z.object({
719
907
  event_id: z.string(),
720
908
  input_schema: z.unknown().optional(),
721
- prev_session_id: z.string().optional()
909
+ params: z.unknown().optional(),
910
+ prev_session_id: z.string().optional(),
911
+ tool_id: z.string().optional()
722
912
  });
723
913
 
724
- export const V1BillingCreditLimitRowSchema = z.object({
725
- monthly_credit_limit: z.number().optional(),
726
- user_id: z.string()
727
- });
728
-
729
- export const V1BillingCreditLimitsBodySchema = z.object({
730
- data: z.array(V1BillingCreditLimitRowSchema).nullable(),
731
- default_monthly_credit_limit: z.number().optional(),
732
- pagination: PaginationSchema
733
- });
734
-
735
- export const V1BillingPeriodSchema = z.object({
914
+ export const BillingPeriodSchema = z.object({
736
915
  end: z.iso.datetime(),
737
916
  start: z.iso.datetime()
738
917
  });
739
918
 
740
- export const V1BillingUsagePeriodSchema = z.object({
919
+ export const CreditUsagePeriodSchema = z.object({
741
920
  end: z.string(),
742
- group_by: z.string().optional(),
743
- interval: z.string().optional(),
921
+ group_by: z.enum(['member', 'project']).optional(),
922
+ interval: z.enum([
923
+ 'day',
924
+ 'week',
925
+ 'month'
926
+ ]).optional(),
744
927
  start: z.string()
745
928
  });
746
929
 
747
930
  export const V1BulkMemberCreditLimitItemSchema = z.object({
931
+ duration: z.enum(['permanent', 'current_period']).optional(),
748
932
  email: z.string().optional(),
749
933
  monthly_credit_limit: z.number().gte(0).nullable(),
750
934
  user_id: z.string().optional()
751
935
  });
752
936
 
753
- export const V1BillingBulkSetMemberCreditLimitInputBodySchema = z.object({
754
- members: z.array(V1BulkMemberCreditLimitItemSchema).min(1).max(1000)
755
- });
756
-
757
937
  export const V1BulkMemberCreditLimitResultSchema = z.object({
938
+ approved_until: z.iso.datetime().optional(),
939
+ duration: z.enum(['current_period']).optional(),
758
940
  email: z.string().optional(),
759
941
  error: z.string().optional(),
760
- status: z.string(),
942
+ status: z.enum(['success', 'error']),
761
943
  user_id: z.string().optional()
762
944
  });
763
945
 
@@ -792,11 +974,11 @@ export const V1ConnectorResponseSchema = z.object({
792
974
  url: z.string().optional()
793
975
  });
794
976
 
795
- export const V1CreateEmbedUrlInputBodySchema = z.object({
977
+ export const CreateEmbedUrlRequestSchema = z.object({
796
978
  parent_origin: z.string()
797
979
  });
798
980
 
799
- export const V1CreateEmbedUrlOutputBodySchema = z.object({
981
+ export const CreateEmbedUrlResponseSchema = z.object({
800
982
  embed_url: z.string(),
801
983
  expires_at: z.iso.datetime()
802
984
  });
@@ -816,14 +998,25 @@ export const V1CreateProjectResponseSchema = z.object({
816
998
  name: z.string().optional(),
817
999
  og_image_url: z.string().optional(),
818
1000
  preview_url: z.string().optional(),
819
- project_type: z.string().optional(),
820
- publish_visibility: z.string().optional(),
821
- status: z.string().optional(),
822
- tech_stack: z.string().optional(),
823
- updated_at: z.iso.datetime().optional(),
1001
+ project_type: z.enum(['project', 'library']).optional(),
1002
+ publish_visibility: z.enum([
1003
+ 'public',
1004
+ 'private',
1005
+ 'workspace_only'
1006
+ ]).optional(),
1007
+ status: z.enum([
1008
+ 'in_progress',
1009
+ 'completed',
1010
+ 'failed'
1011
+ ]).optional(),
824
1012
  url: z.string().optional(),
825
1013
  user_id: z.string().optional(),
826
- visibility: z.string().optional(),
1014
+ visibility: z.enum([
1015
+ 'draft',
1016
+ 'private',
1017
+ 'workspace_view',
1018
+ 'public'
1019
+ ]).optional(),
827
1020
  workspace_id: z.string()
828
1021
  });
829
1022
 
@@ -839,7 +1032,8 @@ export const V1CreateVariantOutputBodySchema = z.object({
839
1032
  variant_id: z.string()
840
1033
  });
841
1034
 
842
- export const V1CreditHistoryEntrySchema = z.object({
1035
+ export const CreditHistoryEntrySchema = z.object({
1036
+ credit_grant_id: z.string(),
843
1037
  credits_change: z.number(),
844
1038
  event_type: z.enum([
845
1039
  'granted',
@@ -978,8 +1172,8 @@ export const V1ListStandardConnectorsResponseSchema = z.object({
978
1172
  total: z.number()
979
1173
  });
980
1174
 
981
- export const V1ListWorkspacesBodySchema = z.object({
982
- data: z.array(PublicV1WorkspaceWithMembershipSchema).nullable(),
1175
+ export const WorkspacePageSchema = z.object({
1176
+ data: z.array(WorkspaceWithMembershipSchema).nullable(),
983
1177
  pagination: PaginationSchema
984
1178
  });
985
1179
 
@@ -991,6 +1185,13 @@ export const V1MessageErrorSchema = z.object({
991
1185
  export const V1AiResponseSummarySchema = z.object({
992
1186
  awaiting_input: V1AwaitingInputSummarySchema.optional(),
993
1187
  commit_sha: z.string().optional(),
1188
+ completion_reason: z.enum([
1189
+ 'finished',
1190
+ 'stopped',
1191
+ 'error',
1192
+ 'policy_violation',
1193
+ 'max_iterations'
1194
+ ]).optional(),
994
1195
  content: z.string(),
995
1196
  cost_credits: z.number().optional(),
996
1197
  edit_id: z.string().optional(),
@@ -1022,6 +1223,13 @@ export const V1ListMessagesOutputBodySchema = z.object({
1022
1223
  export const V1MessageResponseSchema = z.object({
1023
1224
  awaiting_input: V1AwaitingInputSummarySchema.optional(),
1024
1225
  commit_sha: z.string().optional(),
1226
+ completion_reason: z.enum([
1227
+ 'finished',
1228
+ 'stopped',
1229
+ 'error',
1230
+ 'policy_violation',
1231
+ 'max_iterations'
1232
+ ]).optional(),
1025
1233
  content: z.string(),
1026
1234
  cost_credits: z.number().optional(),
1027
1235
  created_at: z.string(),
@@ -1041,7 +1249,7 @@ export const V1MoveProjectsToFolderInputBodySchema = z.object({
1041
1249
  project_ids: z.array(z.string()).min(1).max(30).nullable()
1042
1250
  });
1043
1251
 
1044
- export const V1ProjectCollaboratorSchema = z.object({
1252
+ export const ProjectCollaboratorSchema = z.object({
1045
1253
  accepted_at: z.iso.datetime().optional(),
1046
1254
  access_level: z.enum([
1047
1255
  'owner',
@@ -1056,11 +1264,12 @@ export const V1ProjectCollaboratorSchema = z.object({
1056
1264
  invited_by: z.string().optional(),
1057
1265
  is_internal: z.boolean(),
1058
1266
  is_workspace_member: z.boolean(),
1267
+ last_accessed_at: z.iso.datetime().nullable(),
1059
1268
  user_id: z.string()
1060
1269
  });
1061
1270
 
1062
- export const CursorListResponseV1ProjectCollaboratorSchema = z.object({
1063
- data: z.array(V1ProjectCollaboratorSchema).nullable(),
1271
+ export const ProjectCollaboratorPageSchema = z.object({
1272
+ data: z.array(ProjectCollaboratorSchema).nullable(),
1064
1273
  pagination: PaginationSchema
1065
1274
  });
1066
1275
 
@@ -1075,7 +1284,7 @@ export const V1ProjectGitFilesResponseSchema = z.object({
1075
1284
  total: z.number()
1076
1285
  });
1077
1286
 
1078
- export const V1ProjectResponseSchema = z.object({
1287
+ export const ProjectSchema = z.object({
1079
1288
  created_at: z.iso.datetime().optional(),
1080
1289
  description: z.string().optional(),
1081
1290
  display_name: z.string().optional(),
@@ -1089,14 +1298,25 @@ export const V1ProjectResponseSchema = z.object({
1089
1298
  name: z.string().optional(),
1090
1299
  og_image_url: z.string().optional(),
1091
1300
  preview_url: z.string().optional(),
1092
- project_type: z.string().optional(),
1093
- publish_visibility: z.string().optional(),
1094
- status: z.string().optional(),
1095
- tech_stack: z.string().optional(),
1096
- updated_at: z.iso.datetime().optional(),
1301
+ project_type: z.enum(['project', 'library']).optional(),
1302
+ publish_visibility: z.enum([
1303
+ 'public',
1304
+ 'private',
1305
+ 'workspace_only'
1306
+ ]).optional(),
1307
+ status: z.enum([
1308
+ 'in_progress',
1309
+ 'completed',
1310
+ 'failed'
1311
+ ]).optional(),
1097
1312
  url: z.string().optional(),
1098
1313
  user_id: z.string().optional(),
1099
- visibility: z.string().optional(),
1314
+ visibility: z.enum([
1315
+ 'draft',
1316
+ 'private',
1317
+ 'workspace_view',
1318
+ 'public'
1319
+ ]).optional(),
1100
1320
  workspace_id: z.string()
1101
1321
  });
1102
1322
 
@@ -1145,8 +1365,13 @@ export const PublicV1RemixJobOutputBodySchema = z.object({
1145
1365
  error_code: z.string().optional(),
1146
1366
  error_message: z.string().optional(),
1147
1367
  result: V1RemixProgressResultSchema.optional(),
1148
- status: z.string(),
1149
- step: RemixJobStepInfoSchema.optional()
1368
+ status: z.enum([
1369
+ 'preparing',
1370
+ 'running',
1371
+ 'completed',
1372
+ 'error',
1373
+ 'unknown'
1374
+ ])
1150
1375
  });
1151
1376
 
1152
1377
  export const V1RemixProgressOutputBodySchema = z.object({
@@ -1168,14 +1393,22 @@ export const V1SecurityFindingSchema = z.object({
1168
1393
  details: z.string().optional(),
1169
1394
  finding_id: z.string(),
1170
1395
  first_seen_scan_id: z.string().optional(),
1171
- level: z.string(),
1396
+ level: z.enum([
1397
+ 'error',
1398
+ 'warn',
1399
+ 'info'
1400
+ ]),
1172
1401
  link: z.string().optional(),
1173
1402
  metadata: z.record(z.string(), z.unknown()).optional(),
1174
1403
  name: z.string(),
1175
1404
  recurrence: z.number(),
1176
1405
  remediation_difficulty: z.string().optional(),
1177
1406
  scanner_name: z.string(),
1178
- status: z.string(),
1407
+ status: z.enum([
1408
+ 'open',
1409
+ 'fixed',
1410
+ 'ignored'
1411
+ ]),
1179
1412
  updated_at: z.iso.datetime()
1180
1413
  });
1181
1414
 
@@ -1183,7 +1416,7 @@ export const V1SecurityScanActorSchema = z.object({
1183
1416
  email: z.string().optional(),
1184
1417
  id: z.string().optional(),
1185
1418
  name: z.string().optional(),
1186
- type: z.string()
1419
+ type: z.enum(['user', 'system'])
1187
1420
  });
1188
1421
 
1189
1422
  export const V1SecurityScanSummarySchema = z.object({
@@ -1192,8 +1425,23 @@ export const V1SecurityScanSummarySchema = z.object({
1192
1425
  requested_scanners: z.array(z.string()).nullable(),
1193
1426
  scan_id: z.string(),
1194
1427
  started_at: z.iso.datetime(),
1195
- status: z.string(),
1196
- trigger_source: z.string(),
1428
+ status: z.enum([
1429
+ 'running',
1430
+ 'completed',
1431
+ 'failed'
1432
+ ]),
1433
+ trigger_source: z.enum([
1434
+ 'workflow',
1435
+ 'user',
1436
+ 'ui_auto',
1437
+ 'aikido_import',
1438
+ 'manage_findings',
1439
+ 'app_mcp_deep_auto',
1440
+ 'hvt_scheduled',
1441
+ 'workspace_scheduled',
1442
+ 'enterprise_batch',
1443
+ 'gitsync_pull'
1444
+ ]),
1197
1445
  triggered_by: V1SecurityScanActorSchema
1198
1446
  });
1199
1447
 
@@ -1209,7 +1457,11 @@ export const V1SecurityScannerRunSchema = z.object({
1209
1457
  scanner_name: z.string(),
1210
1458
  scanner_version: z.string().optional(),
1211
1459
  started_at: z.iso.datetime(),
1212
- status: z.string()
1460
+ status: z.enum([
1461
+ 'succeeded',
1462
+ 'failed',
1463
+ 'skipped'
1464
+ ])
1213
1465
  });
1214
1466
 
1215
1467
  export const V1GetSecurityScanOutputBodySchema = z.object({
@@ -1273,7 +1525,11 @@ export const V1TriggerSecurityScanInputBodySchema = z.object({
1273
1525
  export const V1TriggerSecurityScanResponseBodySchema = z.object({
1274
1526
  message: z.string().optional(),
1275
1527
  scan_id: z.string(),
1276
- status: z.string()
1528
+ status: z.enum([
1529
+ 'started',
1530
+ 'running',
1531
+ 'completed'
1532
+ ])
1277
1533
  });
1278
1534
 
1279
1535
  export const V1UnscopedFileSchema = z.object({
@@ -1360,10 +1616,6 @@ export const V1UpdateWorkspaceSettingsInputBodySchema = z.object({
1360
1616
  workspace_id: z.string()
1361
1617
  });
1362
1618
 
1363
- export const V1UpdateWorkspaceSettingsNestedInputBodySchema = z.object({
1364
- default_monthly_member_credit_limit: z.number().gte(0).nullish()
1365
- });
1366
-
1367
1619
  export const V1UsagePeriodSchema = z.object({
1368
1620
  end: z.string(),
1369
1621
  granularity: z.string().optional(),
@@ -1395,38 +1647,64 @@ export const V1WorkspaceAuditLogsBodySchema = z.object({
1395
1647
  pagination: PaginationSchema
1396
1648
  });
1397
1649
 
1398
- export const V1WorkspaceCreditHistoryBodySchema = z.object({
1399
- data: z.array(V1CreditHistoryEntrySchema).nullable(),
1650
+ export const CreditHistoryPageSchema = z.object({
1651
+ data: z.array(CreditHistoryEntrySchema).nullable(),
1400
1652
  pagination: PaginationSchema,
1401
1653
  total: z.number().optional(),
1402
1654
  total_is_capped: z.boolean().optional()
1403
1655
  });
1404
1656
 
1405
- export const V1WorkspaceCreditsExpiringGrantSchema = z.object({
1406
- applicability: z.string().optional(),
1657
+ export const ExpiringCreditGrantSchema = z.object({
1658
+ applicability: z.enum([
1659
+ 'generic',
1660
+ 'build_time',
1661
+ 'build_mode',
1662
+ 'plan_mode'
1663
+ ]).optional(),
1407
1664
  credits: z.number(),
1408
1665
  expires_at: z.iso.datetime(),
1409
- grant_type: z.string()
1666
+ grant_type: z.enum([
1667
+ 'billing',
1668
+ 'rollover',
1669
+ 'topup',
1670
+ 'commitment',
1671
+ 'cashback',
1672
+ 'granted',
1673
+ 'overage',
1674
+ 'unlimited',
1675
+ 'allowance'
1676
+ ])
1410
1677
  });
1411
1678
 
1412
- export const V1WorkspaceCreditsGrantTypeBalanceSchema = z.object({
1413
- grant_type: z.string(),
1679
+ export const CreditGrantTypeBalanceSchema = z.object({
1680
+ grant_type: z.enum([
1681
+ 'billing',
1682
+ 'daily',
1683
+ 'rollover',
1684
+ 'topup',
1685
+ 'commitment',
1686
+ 'cashback',
1687
+ 'granted',
1688
+ 'overage',
1689
+ 'unlimited',
1690
+ 'allowance'
1691
+ ]),
1414
1692
  granted: z.number(),
1415
1693
  remaining: z.number()
1416
1694
  });
1417
1695
 
1418
- export const V1WorkspaceCreditsBodySchema = z.object({
1419
- billing_period: V1BillingPeriodSchema,
1696
+ export const CreditBalanceSchema = z.object({
1697
+ billing_period: BillingPeriodSchema,
1420
1698
  daily_limit: z.number(),
1421
1699
  daily_remaining: z.number(),
1422
- expiring_grants: z.array(V1WorkspaceCreditsExpiringGrantSchema).nullable(),
1423
- grant_type_balances: z.array(V1WorkspaceCreditsGrantTypeBalanceSchema).nullable(),
1700
+ expiring_grants: z.array(ExpiringCreditGrantSchema).nullable(),
1701
+ grant_type_balances: z.array(CreditGrantTypeBalanceSchema).nullable(),
1424
1702
  total_billing_period_used: z.number(),
1425
1703
  total_granted: z.number(),
1426
1704
  total_remaining: z.number()
1427
1705
  });
1428
1706
 
1429
- export const V1WorkspaceGroupSchema = z.object({
1707
+ export const WorkspaceGroupSchema = z.object({
1430
1708
  created_at: z.iso.datetime(),
1431
1709
  description: z.string().optional(),
1432
1710
  id: z.string(),
@@ -1437,34 +1715,46 @@ export const V1WorkspaceGroupSchema = z.object({
1437
1715
  workspace_id: z.string()
1438
1716
  });
1439
1717
 
1440
- export const CursorListResponseV1WorkspaceGroupSchema = z.object({
1441
- data: z.array(V1WorkspaceGroupSchema).nullable(),
1718
+ export const WorkspaceGroupPageSchema = z.object({
1719
+ data: z.array(WorkspaceGroupSchema).nullable(),
1442
1720
  pagination: PaginationSchema
1443
1721
  });
1444
1722
 
1445
- export const V1WorkspaceInsightsActivityFreshnessSchema = z.object({
1723
+ export const WorkspaceInsightsActivityFreshnessSchema = z.object({
1446
1724
  edits_as_of: z.iso.datetime().optional(),
1447
1725
  visitors_as_of: z.iso.datetime().optional()
1448
1726
  });
1449
1727
 
1450
- export const V1WorkspaceInsightsEdgeFunctionSchema = z.object({
1728
+ export const WorkspaceInsightsEdgeFunctionSchema = z.object({
1451
1729
  name: z.string()
1452
1730
  });
1453
1731
 
1454
- export const V1WorkspaceInsightsFindingSchema = z.object({
1455
- category: z.string(),
1732
+ export const WorkspaceInsightsFindingSchema = z.object({
1733
+ category: z.enum([
1734
+ 'security',
1735
+ 'data',
1736
+ 'exposure',
1737
+ 'credentials',
1738
+ 'access',
1739
+ 'integrations',
1740
+ 'runtime'
1741
+ ]),
1456
1742
  description: z.string(),
1457
1743
  id: z.string(),
1458
1744
  project_count: z.number(),
1459
- severity: z.string(),
1745
+ severity: z.enum([
1746
+ 'needs_review',
1747
+ 'review_recommended',
1748
+ 'no_review_needed'
1749
+ ]),
1460
1750
  title: z.string()
1461
1751
  });
1462
1752
 
1463
- export const V1WorkspaceInsightsOwnerSchema = z.object({
1753
+ export const WorkspaceInsightsOwnerSchema = z.object({
1464
1754
  display_name: z.string().optional()
1465
1755
  });
1466
1756
 
1467
- export const V1WorkspaceInsightsReasonValuesSchema = z.object({
1757
+ export const WorkspaceInsightsReasonValuesSchema = z.object({
1468
1758
  connector_count: z.number().optional(),
1469
1759
  edge_function_count: z.number().optional(),
1470
1760
  error_count: z.number().optional(),
@@ -1475,22 +1765,34 @@ export const V1WorkspaceInsightsReasonValuesSchema = z.object({
1475
1765
  warning_count: z.number().optional()
1476
1766
  });
1477
1767
 
1478
- export const V1WorkspaceInsightsReasonSchema = z.object({
1479
- category: z.string(),
1768
+ export const WorkspaceInsightsReasonSchema = z.object({
1769
+ category: z.enum([
1770
+ 'security',
1771
+ 'data',
1772
+ 'exposure',
1773
+ 'credentials',
1774
+ 'access',
1775
+ 'integrations',
1776
+ 'runtime'
1777
+ ]),
1480
1778
  detail: z.string(),
1481
1779
  id: z.string(),
1482
1780
  label: z.string(),
1483
- severity: z.string(),
1484
- values: V1WorkspaceInsightsReasonValuesSchema.optional()
1781
+ severity: z.enum([
1782
+ 'needs_review',
1783
+ 'review_recommended',
1784
+ 'no_review_needed'
1785
+ ]),
1786
+ values: WorkspaceInsightsReasonValuesSchema.optional()
1485
1787
  });
1486
1788
 
1487
- export const V1WorkspaceInsightsReviewPrioritySchema = z.object({
1789
+ export const WorkspaceInsightsReviewPrioritySchema = z.object({
1488
1790
  needs_review: z.number(),
1489
1791
  no_review_needed: z.number(),
1490
1792
  review_recommended: z.number()
1491
1793
  });
1492
1794
 
1493
- export const V1WorkspaceInsightsSignalsSchema = z.object({
1795
+ export const WorkspaceInsightsSignalsSchema = z.object({
1494
1796
  chat_attachment_count: z.number(),
1495
1797
  connector_count: z.number(),
1496
1798
  edge_function_count: z.number(),
@@ -1522,12 +1824,16 @@ export const V1WorkspaceInsightsSignalsSchema = z.object({
1522
1824
  warning_count: z.number()
1523
1825
  });
1524
1826
 
1525
- export const V1WorkspaceInsightsProjectSchema = z.object({
1526
- activity_group: z.string().optional(),
1827
+ export const WorkspaceInsightsProjectSchema = z.object({
1828
+ activity_group: z.enum([
1829
+ 'last_14_days',
1830
+ 'last_60_days',
1831
+ 'older'
1832
+ ]).optional(),
1527
1833
  connectors: z.array(z.string()).nullish(),
1528
1834
  description: z.string().optional(),
1529
1835
  display_name: z.string().optional(),
1530
- edge_functions: z.array(V1WorkspaceInsightsEdgeFunctionSchema).nullish(),
1836
+ edge_functions: z.array(WorkspaceInsightsEdgeFunctionSchema).nullish(),
1531
1837
  edit_count: z.number(),
1532
1838
  edits_24h: z.number(),
1533
1839
  edits_30d: z.number(),
@@ -1537,84 +1843,118 @@ export const V1WorkspaceInsightsProjectSchema = z.object({
1537
1843
  is_published: z.boolean().optional(),
1538
1844
  last_edited_at: z.iso.datetime().optional(),
1539
1845
  last_security_scan_at: z.iso.datetime().optional(),
1540
- matched_reason: V1WorkspaceInsightsReasonSchema.optional(),
1846
+ matched_reason: WorkspaceInsightsReasonSchema.optional(),
1541
1847
  message_count: z.number(),
1542
1848
  name: z.string().optional(),
1543
1849
  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,
1850
+ owner: WorkspaceInsightsOwnerSchema.optional(),
1851
+ publish_visibility: z.enum([
1852
+ 'public',
1853
+ 'private',
1854
+ 'workspace_only'
1855
+ ]).optional(),
1856
+ review_priority: z.enum([
1857
+ 'needs_review',
1858
+ 'review_recommended',
1859
+ 'no_review_needed',
1860
+ 'unscored'
1861
+ ]).optional(),
1862
+ review_priority_explanation: z.array(WorkspaceInsightsReasonSchema).nullable(),
1863
+ signals: WorkspaceInsightsSignalsSchema,
1549
1864
  url: z.string().optional(),
1550
- visibility: z.string().optional(),
1865
+ visibility: z.enum([
1866
+ 'draft',
1867
+ 'private',
1868
+ 'workspace_view',
1869
+ 'public'
1870
+ ]).optional(),
1551
1871
  visitors_24h: z.number(),
1552
1872
  visitors_30d: z.number(),
1553
1873
  visitors_7d: z.number()
1554
1874
  });
1555
1875
 
1556
- export const V1WorkspaceInsightsProjectsBodySchema = z.object({
1557
- activity_as_of: V1WorkspaceInsightsActivityFreshnessSchema.optional(),
1558
- applied_finding: V1WorkspaceInsightsFindingSchema.optional(),
1876
+ export const WorkspaceInsightsProjectPageSchema = z.object({
1877
+ activity_as_of: WorkspaceInsightsActivityFreshnessSchema.optional(),
1878
+ applied_finding: WorkspaceInsightsFindingSchema.optional(),
1559
1879
  as_of: z.iso.datetime().optional(),
1560
- data: z.array(V1WorkspaceInsightsProjectSchema).nullable(),
1880
+ data: z.array(WorkspaceInsightsProjectSchema).nullable(),
1561
1881
  pagination: PaginationSchema,
1562
1882
  total: z.number()
1563
1883
  });
1564
1884
 
1565
- export const V1WorkspaceInsightsStatSchema = z.object({
1885
+ export const WorkspaceInsightsStatSchema = z.object({
1566
1886
  delta_30d: z.number(),
1567
1887
  delta_window: z.string(),
1568
1888
  value: z.number()
1569
1889
  });
1570
1890
 
1571
- export const V1WorkspaceInsightsSummarySchema = z.object({
1572
- externally_published: V1WorkspaceInsightsStatSchema,
1573
- risk: V1WorkspaceInsightsReviewPrioritySchema,
1574
- total_projects: V1WorkspaceInsightsStatSchema,
1575
- workspace_members: V1WorkspaceInsightsStatSchema
1891
+ export const WorkspaceInsightsSummarySchema = z.object({
1892
+ externally_published: WorkspaceInsightsStatSchema,
1893
+ risk: WorkspaceInsightsReviewPrioritySchema,
1894
+ total_projects: WorkspaceInsightsStatSchema,
1895
+ workspace_members: WorkspaceInsightsStatSchema
1576
1896
  });
1577
1897
 
1578
- export const V1WorkspaceInsightsBodySchema = z.object({
1898
+ export const WorkspaceInsightsSchema = z.object({
1579
1899
  as_of: z.iso.datetime().optional(),
1580
- findings: z.array(V1WorkspaceInsightsFindingSchema).nullable(),
1581
- summary: V1WorkspaceInsightsSummarySchema
1900
+ findings: z.array(WorkspaceInsightsFindingSchema),
1901
+ summary: WorkspaceInsightsSummarySchema
1582
1902
  });
1583
1903
 
1584
- export const V1WorkspaceMemberGroupSchema = z.object({
1904
+ export const WorkspaceMemberGroupSchema = z.object({
1585
1905
  id: z.string(),
1586
1906
  name: z.string()
1587
1907
  });
1588
1908
 
1589
- export const V1WorkspaceMemberSchema = z.object({
1909
+ export const WorkspaceMemberSchema = z.object({
1590
1910
  display_name: z.string().optional(),
1591
1911
  email: z.string().optional(),
1592
- groups: z.array(V1WorkspaceMemberGroupSchema).optional(),
1912
+ groups: z.array(WorkspaceMemberGroupSchema).optional(),
1593
1913
  invited_at: z.iso.datetime().optional(),
1594
1914
  joined_at: z.iso.datetime().optional(),
1595
1915
  monthly_credit_limit: z.number().optional(),
1596
- role: z.string(),
1916
+ role: z.enum([
1917
+ 'owner',
1918
+ 'admin',
1919
+ 'member',
1920
+ 'viewer',
1921
+ 'collaborator'
1922
+ ]),
1597
1923
  user_id: z.string(),
1598
1924
  workspace_id: z.string()
1599
1925
  });
1600
1926
 
1601
- export const CursorListResponseV1WorkspaceMemberSchema = z.object({
1602
- data: z.array(V1WorkspaceMemberSchema).nullable(),
1927
+ export const WorkspaceMemberPageSchema = z.object({
1928
+ data: z.array(WorkspaceMemberSchema).nullable(),
1603
1929
  pagination: PaginationSchema
1604
1930
  });
1605
1931
 
1606
- export const V1WorkspaceSettingsBodySchema = z.object({
1932
+ export const WorkspaceSettingsSchema = z.object({
1607
1933
  billing_period_end_date: z.iso.datetime().optional(),
1608
1934
  billing_period_start_date: z.iso.datetime().optional(),
1609
1935
  default_monthly_member_credit_limit: z.number().optional(),
1610
- default_project_visibility: z.string().optional(),
1936
+ default_project_visibility: z.enum([
1937
+ 'draft',
1938
+ 'private',
1939
+ 'workspace_view',
1940
+ 'public'
1941
+ ]).optional(),
1611
1942
  enable_pii: z.boolean(),
1612
1943
  enforce_sso: z.boolean(),
1613
1944
  id: z.string(),
1614
1945
  name: z.string(),
1615
1946
  num_seats: z.number().optional(),
1616
- plan: z.string(),
1617
- publishing_policy: z.string().optional()
1947
+ plan: z.enum([
1948
+ 'free',
1949
+ 'pro',
1950
+ 'business',
1951
+ 'enterprise'
1952
+ ]),
1953
+ publishing_policy: z.enum([
1954
+ 'org_only',
1955
+ 'workspace_only',
1956
+ 'disabled'
1957
+ ]).optional()
1618
1958
  });
1619
1959
 
1620
1960
  export const V1WorkspaceSkillDtoSchema = z.object({
@@ -1646,41 +1986,41 @@ export const V1WorkspaceUsageBreakdownEntrySchema = z.object({
1646
1986
  });
1647
1987
 
1648
1988
  export const V1WorkspaceUsageBreakdownBodySchema = z.object({
1649
- billing_period: V1BillingPeriodSchema,
1989
+ billing_period: BillingPeriodSchema,
1650
1990
  data: z.array(V1WorkspaceUsageBreakdownEntrySchema).nullable(),
1651
1991
  member_count: z.number(),
1652
1992
  pagination: PaginationSchema
1653
1993
  });
1654
1994
 
1655
- export const V1WorkspaceUsageConnectorBreakdownSchema = z.object({
1995
+ export const ConnectorUsageSchema = z.object({
1656
1996
  credits: z.number(),
1657
1997
  key: z.string(),
1658
1998
  label: z.string()
1659
1999
  });
1660
2000
 
1661
- export const V1WorkspaceUsageDatabaseBreakdownSchema = z.object({
2001
+ export const DatabaseUsageSchema = z.object({
1662
2002
  credits: z.number(),
1663
2003
  key: z.enum(['database_server', 'database_storage']),
1664
2004
  label: z.string()
1665
2005
  });
1666
2006
 
1667
- export const V1WorkspaceUsageGatewayModelSchema = z.object({
2007
+ export const GatewayModelUsageSchema = z.object({
1668
2008
  credits: z.number(),
1669
2009
  name: z.string(),
1670
2010
  provider: z.string()
1671
2011
  });
1672
2012
 
1673
- export const V1BillingUsageRowSchema = z.object({
2013
+ export const CreditUsageEntrySchema = z.object({
1674
2014
  build: z.number(),
1675
2015
  connectors: z.number(),
1676
- connectors_breakdown: z.array(V1WorkspaceUsageConnectorBreakdownSchema).nullish(),
2016
+ connectors_breakdown: z.array(ConnectorUsageSchema).nullish(),
1677
2017
  database: z.number(),
1678
- database_breakdown: z.array(V1WorkspaceUsageDatabaseBreakdownSchema).nullish(),
2018
+ database_breakdown: z.array(DatabaseUsageSchema).nullish(),
1679
2019
  display_name: z.string().optional(),
1680
2020
  email: z.string().optional(),
1681
2021
  functions: z.number(),
1682
2022
  gateway: z.number(),
1683
- gateway_models: z.array(V1WorkspaceUsageGatewayModelSchema).nullish(),
2023
+ gateway_models: z.array(GatewayModelUsageSchema).nullish(),
1684
2024
  network: z.number(),
1685
2025
  period_end: z.string().optional(),
1686
2026
  period_start: z.string().optional(),
@@ -1692,11 +2032,11 @@ export const V1BillingUsageRowSchema = z.object({
1692
2032
  user_id: z.string().optional()
1693
2033
  });
1694
2034
 
1695
- export const V1BillingUsageBodySchema = z.object({
1696
- data: z.array(V1BillingUsageRowSchema).nullable(),
2035
+ export const CreditUsagePageSchema = z.object({
2036
+ data: z.array(CreditUsageEntrySchema).nullable(),
1697
2037
  entity_count: z.number().optional(),
1698
2038
  pagination: PaginationSchema,
1699
- period: V1BillingUsagePeriodSchema,
2039
+ period: CreditUsagePeriodSchema,
1700
2040
  workspace_total: z.number()
1701
2041
  });
1702
2042
 
@@ -1730,12 +2070,12 @@ export const V1WorkspaceUsageProjectsBodySchema = z.object({
1730
2070
  export const V1WorkspaceUsageTimeseriesBucketSchema = z.object({
1731
2071
  build: z.number(),
1732
2072
  connectors: z.number(),
1733
- connectors_breakdown: z.array(V1WorkspaceUsageConnectorBreakdownSchema).nullable(),
2073
+ connectors_breakdown: z.array(ConnectorUsageSchema).nullable(),
1734
2074
  database: z.number(),
1735
- database_breakdown: z.array(V1WorkspaceUsageDatabaseBreakdownSchema).nullable(),
2075
+ database_breakdown: z.array(DatabaseUsageSchema).nullable(),
1736
2076
  functions: z.number(),
1737
2077
  gateway: z.number(),
1738
- gateway_models: z.array(V1WorkspaceUsageGatewayModelSchema).nullable(),
2078
+ gateway_models: z.array(GatewayModelUsageSchema).nullable(),
1739
2079
  network: z.number(),
1740
2080
  period_end: z.string(),
1741
2081
  period_start: z.string(),
@@ -1786,6 +2126,6 @@ export const AddProjectsToFolderResultSchema = z.object({
1786
2126
  visibility_updated: z.array(VisibilityChangeInfoSchema).nullable()
1787
2127
  });
1788
2128
 
1789
- export const WorkspaceAnalyticsResponseSchema = z.object({
2129
+ export const WorkspaceAnalyticsSchema = z.object({
1790
2130
  timeSeries: TimeSeriesGroupSchema
1791
2131
  });