@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.
package/src/index.ts CHANGED
@@ -44,6 +44,7 @@ export type {
44
44
  ListMessagesResponse,
45
45
  ListMessagesOptions,
46
46
  CreateVariantResponse,
47
+ MessageCompletionReason,
47
48
  MessageCompletionResult,
48
49
  MessageCompletionOptions,
49
50
  KnowledgeResponse,
@@ -0,0 +1,209 @@
1
+ // Compatibility aliases retained until the next major release.
2
+
3
+ import {
4
+ AnalyticsBreakdownGroupSchema,
5
+ AnalyticsBreakdownPointSchema,
6
+ AnalyticsBreakdownSchema,
7
+ AnalyticsTrendSchema,
8
+ BillingPeriodSchema,
9
+ ConnectorUsageSchema,
10
+ CreateEmbedUrlRequestSchema,
11
+ CreateEmbedUrlResponseSchema,
12
+ CreditBalanceSchema,
13
+ CreditGrantTypeBalanceSchema,
14
+ CreditHistoryEntrySchema,
15
+ CreditHistoryPageSchema,
16
+ CreditUsageEntrySchema,
17
+ CreditUsagePageSchema,
18
+ CreditUsagePeriodSchema,
19
+ CurrentUserSchema,
20
+ CurrentUserWorkspaceSchema,
21
+ DatabaseUsageSchema,
22
+ DeploymentSchema,
23
+ ExpiringCreditGrantSchema,
24
+ GatewayModelUsageSchema,
25
+ GetWorkspaceResponseSchema,
26
+ PiiLabelPageSchema,
27
+ PiiLabelSchema,
28
+ ProjectAnalyticsSchema,
29
+ ProjectCollaboratorPageSchema,
30
+ ProjectCollaboratorSchema,
31
+ ProjectSchema,
32
+ ProjectSummaryPageSchema,
33
+ ProjectSummarySchema,
34
+ PublishAudienceTargetSchema,
35
+ PublishProjectRequestSchema,
36
+ PublishProjectResponseSchema,
37
+ PublishSettingsSchema,
38
+ PublicV1RemixJobOutputBodySchema,
39
+ V1RemixProgressResultSchema,
40
+ UpdateProjectRequestSchema,
41
+ UpdatePublishSettingsRequestSchema,
42
+ V1BulkMemberCreditLimitItemSchema,
43
+ V1BulkMemberCreditLimitResultSchema,
44
+ V1BulkSetMemberCreditLimitOutputBodySchema,
45
+ V1SecurityScanActorSchema,
46
+ V1SecurityScannerRunSchema,
47
+ V1TriggerSecurityScanResponseBodySchema,
48
+ WorkspaceAnalyticsSchema,
49
+ WorkspaceGroupPageSchema,
50
+ WorkspaceGroupSchema,
51
+ WorkspaceInsightsActivityFreshnessSchema,
52
+ WorkspaceInsightsEdgeFunctionSchema,
53
+ WorkspaceInsightsFindingSchema,
54
+ WorkspaceInsightsOwnerSchema,
55
+ WorkspaceInsightsProjectPageSchema,
56
+ WorkspaceInsightsProjectSchema,
57
+ WorkspaceInsightsReasonSchema,
58
+ WorkspaceInsightsReasonValuesSchema,
59
+ WorkspaceInsightsReviewPrioritySchema,
60
+ WorkspaceInsightsSchema,
61
+ WorkspaceInsightsSignalsSchema,
62
+ WorkspaceInsightsStatSchema,
63
+ WorkspaceInsightsSummarySchema,
64
+ WorkspaceMemberGroupSchema,
65
+ WorkspaceMemberPageSchema,
66
+ WorkspaceMemberSchema,
67
+ WorkspaceMembershipSchema,
68
+ WorkspacePageSchema,
69
+ WorkspaceSchema,
70
+ WorkspaceSettingsSchema,
71
+ WorkspaceWithMembershipSchema,
72
+ } from "./generated/zod/zod.gen.js";
73
+
74
+ /** @deprecated Renamed to PiiLabelPageSchema. */
75
+ export const CursorListResponsePublicV1PiiLabelSchema = PiiLabelPageSchema;
76
+ /** @deprecated Renamed to ProjectSummaryPageSchema. */
77
+ export const CursorListResponsePublicV1ProjectListItemSchema = ProjectSummaryPageSchema;
78
+ /** @deprecated Renamed to ProjectCollaboratorPageSchema. */
79
+ export const CursorListResponseV1ProjectCollaboratorSchema = ProjectCollaboratorPageSchema;
80
+ /** @deprecated Renamed to WorkspaceGroupPageSchema. */
81
+ export const CursorListResponseV1WorkspaceGroupSchema = WorkspaceGroupPageSchema;
82
+ /** @deprecated Renamed to WorkspaceMemberPageSchema. */
83
+ export const CursorListResponseV1WorkspaceMemberSchema = WorkspaceMemberPageSchema;
84
+ /** @deprecated Renamed to CurrentUserSchema. */
85
+ export const GetMeOutputBodySchema = CurrentUserSchema;
86
+ /** @deprecated Renamed to CurrentUserWorkspaceSchema. */
87
+ export const GetMeWorkspaceSchema = CurrentUserWorkspaceSchema;
88
+ /** @deprecated Renamed to AnalyticsBreakdownPointSchema. */
89
+ export const ListDataPointSchema = AnalyticsBreakdownPointSchema;
90
+ /** @deprecated Renamed to AnalyticsBreakdownSchema. */
91
+ export const ListDataSchema = AnalyticsBreakdownSchema;
92
+ /** @deprecated Renamed to AnalyticsBreakdownGroupSchema. */
93
+ export const ListsGroupSchema = AnalyticsBreakdownGroupSchema;
94
+ /** @deprecated Renamed to AnalyticsTrendSchema. */
95
+ export const ProjectTrendResponseSchema = AnalyticsTrendSchema;
96
+ /** @deprecated Renamed to GetWorkspaceResponseSchema. */
97
+ export const PublicV1GetWorkspaceBodySchema = GetWorkspaceResponseSchema;
98
+ /** @deprecated Renamed to UpdateProjectRequestSchema. */
99
+ export const PublicV1PatchProjectBodySchema = UpdateProjectRequestSchema;
100
+ /** @deprecated Renamed to PiiLabelSchema. */
101
+ export const PublicV1PiiLabelSchema = PiiLabelSchema;
102
+ /** @deprecated Renamed to ProjectAnalyticsSchema. */
103
+ export const PublicV1ProjectAnalyticsBodySchema = ProjectAnalyticsSchema;
104
+ /** @deprecated Renamed to ProjectSummarySchema. */
105
+ export const PublicV1ProjectListItemSchema = ProjectSummarySchema;
106
+ /** @deprecated Renamed to PublishAudienceTargetSchema. */
107
+ export const PublicV1PublishAudienceTargetSchema = PublishAudienceTargetSchema;
108
+ /** @deprecated Renamed to PublishProjectRequestSchema. */
109
+ export const PublicV1PublishProjectInputBodySchema = PublishProjectRequestSchema;
110
+ /** @deprecated Renamed to PublishProjectResponseSchema. */
111
+ export const PublicV1PublishProjectResponseSchema = PublishProjectResponseSchema;
112
+ /** @deprecated Renamed to DeploymentSchema. */
113
+ export const PublicV1PublishStatusResponseSchema = DeploymentSchema;
114
+ /** @deprecated Retained for legacy endpoints. */
115
+ export const RemixJobSchema = PublicV1RemixJobOutputBodySchema;
116
+ /** @deprecated Renamed to UpdatePublishSettingsRequestSchema. */
117
+ export const PublicV1UpdatePublishSettingsInputBodySchema = UpdatePublishSettingsRequestSchema;
118
+ /** @deprecated Renamed to PublishSettingsSchema. */
119
+ export const PublicV1UpdatePublishSettingsResponseSchema = PublishSettingsSchema;
120
+ /** @deprecated Renamed to WorkspaceMembershipSchema. */
121
+ export const PublicV1WorkspaceMemberSchema = WorkspaceMembershipSchema;
122
+ /** @deprecated Renamed to WorkspaceSchema. */
123
+ export const PublicV1WorkspaceSchema = WorkspaceSchema;
124
+ /** @deprecated Renamed to WorkspaceWithMembershipSchema. */
125
+ export const PublicV1WorkspaceWithMembershipSchema = WorkspaceWithMembershipSchema;
126
+ /** @deprecated Renamed to BillingPeriodSchema. */
127
+ export const V1BillingPeriodSchema = BillingPeriodSchema;
128
+ /** @deprecated Renamed to CreditUsagePageSchema. */
129
+ export const V1BillingUsageBodySchema = CreditUsagePageSchema;
130
+ /** @deprecated Renamed to CreditUsagePeriodSchema. */
131
+ export const V1BillingUsagePeriodSchema = CreditUsagePeriodSchema;
132
+ /** @deprecated Renamed to CreditUsageEntrySchema. */
133
+ export const V1BillingUsageRowSchema = CreditUsageEntrySchema;
134
+ /** @deprecated Retained for legacy endpoints. */
135
+ export const MemberCreditLimitUpdateSchema = V1BulkMemberCreditLimitItemSchema;
136
+ /** @deprecated Retained for legacy endpoints. */
137
+ export const MemberCreditLimitResultSchema = V1BulkMemberCreditLimitResultSchema;
138
+ /** @deprecated Retained for legacy endpoints. */
139
+ export const SetMemberCreditLimitsResponseSchema = V1BulkSetMemberCreditLimitOutputBodySchema;
140
+ /** @deprecated Renamed to CreateEmbedUrlRequestSchema. */
141
+ export const V1CreateEmbedUrlInputBodySchema = CreateEmbedUrlRequestSchema;
142
+ /** @deprecated Renamed to CreateEmbedUrlResponseSchema. */
143
+ export const V1CreateEmbedUrlOutputBodySchema = CreateEmbedUrlResponseSchema;
144
+ /** @deprecated Renamed to CreditHistoryEntrySchema. */
145
+ export const V1CreditHistoryEntrySchema = CreditHistoryEntrySchema;
146
+ /** @deprecated Renamed to WorkspacePageSchema. */
147
+ export const V1ListWorkspacesBodySchema = WorkspacePageSchema;
148
+ /** @deprecated Renamed to ProjectCollaboratorSchema. */
149
+ export const V1ProjectCollaboratorSchema = ProjectCollaboratorSchema;
150
+ /** @deprecated Renamed to ProjectSchema. */
151
+ export const V1ProjectResponseSchema = ProjectSchema;
152
+ /** @deprecated Retained for legacy endpoints. */
153
+ export const RemixResultSchema = V1RemixProgressResultSchema;
154
+ /** @deprecated Retained for legacy endpoints. */
155
+ export const SecurityScanActorSchema = V1SecurityScanActorSchema;
156
+ /** @deprecated Retained for legacy endpoints. */
157
+ export const SecurityScannerRunSchema = V1SecurityScannerRunSchema;
158
+ /** @deprecated Retained for legacy endpoints. */
159
+ export const TriggerSecurityScanResponseSchema = V1TriggerSecurityScanResponseBodySchema;
160
+ /** @deprecated Renamed to CreditHistoryPageSchema. */
161
+ export const V1WorkspaceCreditHistoryBodySchema = CreditHistoryPageSchema;
162
+ /** @deprecated Renamed to CreditBalanceSchema. */
163
+ export const V1WorkspaceCreditsBodySchema = CreditBalanceSchema;
164
+ /** @deprecated Renamed to ExpiringCreditGrantSchema. */
165
+ export const V1WorkspaceCreditsExpiringGrantSchema = ExpiringCreditGrantSchema;
166
+ /** @deprecated Renamed to CreditGrantTypeBalanceSchema. */
167
+ export const V1WorkspaceCreditsGrantTypeBalanceSchema = CreditGrantTypeBalanceSchema;
168
+ /** @deprecated Renamed to WorkspaceGroupSchema. */
169
+ export const V1WorkspaceGroupSchema = WorkspaceGroupSchema;
170
+ /** @deprecated Renamed to WorkspaceInsightsActivityFreshnessSchema. */
171
+ export const V1WorkspaceInsightsActivityFreshnessSchema = WorkspaceInsightsActivityFreshnessSchema;
172
+ /** @deprecated Renamed to WorkspaceInsightsSchema. */
173
+ export const V1WorkspaceInsightsBodySchema = WorkspaceInsightsSchema;
174
+ /** @deprecated Renamed to WorkspaceInsightsEdgeFunctionSchema. */
175
+ export const V1WorkspaceInsightsEdgeFunctionSchema = WorkspaceInsightsEdgeFunctionSchema;
176
+ /** @deprecated Renamed to WorkspaceInsightsFindingSchema. */
177
+ export const V1WorkspaceInsightsFindingSchema = WorkspaceInsightsFindingSchema;
178
+ /** @deprecated Renamed to WorkspaceInsightsOwnerSchema. */
179
+ export const V1WorkspaceInsightsOwnerSchema = WorkspaceInsightsOwnerSchema;
180
+ /** @deprecated Renamed to WorkspaceInsightsProjectSchema. */
181
+ export const V1WorkspaceInsightsProjectSchema = WorkspaceInsightsProjectSchema;
182
+ /** @deprecated Renamed to WorkspaceInsightsProjectPageSchema. */
183
+ export const V1WorkspaceInsightsProjectsBodySchema = WorkspaceInsightsProjectPageSchema;
184
+ /** @deprecated Renamed to WorkspaceInsightsReasonSchema. */
185
+ export const V1WorkspaceInsightsReasonSchema = WorkspaceInsightsReasonSchema;
186
+ /** @deprecated Renamed to WorkspaceInsightsReasonValuesSchema. */
187
+ export const V1WorkspaceInsightsReasonValuesSchema = WorkspaceInsightsReasonValuesSchema;
188
+ /** @deprecated Renamed to WorkspaceInsightsReviewPrioritySchema. */
189
+ export const V1WorkspaceInsightsReviewPrioritySchema = WorkspaceInsightsReviewPrioritySchema;
190
+ /** @deprecated Renamed to WorkspaceInsightsSignalsSchema. */
191
+ export const V1WorkspaceInsightsSignalsSchema = WorkspaceInsightsSignalsSchema;
192
+ /** @deprecated Renamed to WorkspaceInsightsStatSchema. */
193
+ export const V1WorkspaceInsightsStatSchema = WorkspaceInsightsStatSchema;
194
+ /** @deprecated Renamed to WorkspaceInsightsSummarySchema. */
195
+ export const V1WorkspaceInsightsSummarySchema = WorkspaceInsightsSummarySchema;
196
+ /** @deprecated Renamed to WorkspaceMemberGroupSchema. */
197
+ export const V1WorkspaceMemberGroupSchema = WorkspaceMemberGroupSchema;
198
+ /** @deprecated Renamed to WorkspaceMemberSchema. */
199
+ export const V1WorkspaceMemberSchema = WorkspaceMemberSchema;
200
+ /** @deprecated Renamed to WorkspaceSettingsSchema. */
201
+ export const V1WorkspaceSettingsBodySchema = WorkspaceSettingsSchema;
202
+ /** @deprecated Renamed to ConnectorUsageSchema. */
203
+ export const V1WorkspaceUsageConnectorBreakdownSchema = ConnectorUsageSchema;
204
+ /** @deprecated Renamed to DatabaseUsageSchema. */
205
+ export const V1WorkspaceUsageDatabaseBreakdownSchema = DatabaseUsageSchema;
206
+ /** @deprecated Renamed to GatewayModelUsageSchema. */
207
+ export const V1WorkspaceUsageGatewayModelSchema = GatewayModelUsageSchema;
208
+ /** @deprecated Renamed to WorkspaceAnalyticsSchema. */
209
+ export const WorkspaceAnalyticsResponseSchema = WorkspaceAnalyticsSchema;
package/src/schemas.ts CHANGED
@@ -11,27 +11,21 @@ export * from "./generated/zod/zod.gen.js";
11
11
  import { z } from "zod";
12
12
 
13
13
  import {
14
- CursorListResponsePublicV1ProjectListItemSchema,
15
- PublicV1GetWorkspaceBodySchema,
16
- PublicV1WorkspaceMemberSchema,
17
- PublicV1WorkspaceSchema,
18
- PublicV1WorkspaceWithMembershipSchema,
14
+ GetWorkspaceResponseSchema,
15
+ ProjectSummaryPageSchema,
16
+ WorkspaceMembershipSchema,
19
17
  } from "./generated/zod/zod.gen.js";
20
18
 
19
+ export * from "./schemas-deprecated.js";
20
+
21
21
  // Deprecated aliases for schemas renamed by the public response-schema
22
22
  // curation; removed in the next major release.
23
- /** @deprecated Renamed to CursorListResponsePublicV1ProjectListItemSchema. */
24
- export const CursorListResponseSearchProjectItemSchema = CursorListResponsePublicV1ProjectListItemSchema;
25
- /** @deprecated Renamed to PublicV1GetWorkspaceBodySchema. */
26
- export const GetUserWorkspaceBodySchema = PublicV1GetWorkspaceBodySchema;
27
- /** @deprecated Renamed to PublicV1WorkspaceSchema. */
28
- export const WorkspaceSchema = PublicV1WorkspaceSchema;
29
- /** @deprecated Renamed to PublicV1WorkspaceMemberSchema. */
30
- export const WorkspaceMembershipResponseSchema = PublicV1WorkspaceMemberSchema;
31
- /** @deprecated Renamed to PublicV1WorkspaceMemberSchema. */
32
- export const WorkspaceMembershipSchema = PublicV1WorkspaceMemberSchema;
33
- /** @deprecated Renamed to PublicV1WorkspaceWithMembershipSchema. */
34
- export const WorkspaceWithMembershipSchema = PublicV1WorkspaceWithMembershipSchema;
23
+ /** @deprecated Renamed to ProjectSummaryPageSchema. */
24
+ export const CursorListResponseSearchProjectItemSchema = ProjectSummaryPageSchema;
25
+ /** @deprecated Renamed to GetWorkspaceResponseSchema. */
26
+ export const GetUserWorkspaceBodySchema = GetWorkspaceResponseSchema;
27
+ /** @deprecated Renamed to WorkspaceMembershipSchema. */
28
+ export const WorkspaceMembershipResponseSchema = WorkspaceMembershipSchema;
35
29
 
36
30
  // POST /v1/database/query is served but sits outside the public OpenAPI
37
31
  // boundary, so its schemas are not generated; hand-maintained for the MCP
package/src/types.ts CHANGED
@@ -24,11 +24,11 @@ type ListConnectorsQuery = NonNullable<paths["/v1/connectors"]["get"]["parameter
24
24
 
25
25
  // --- Users & workspaces ---
26
26
 
27
- export type MeWorkspace = Schemas["GetMeWorkspace"];
28
- export type MeResponse = Schemas["GetMeOutputBody"];
29
- export type WorkspaceMembership = Schemas["PublicV1WorkspaceMember"];
30
- export type WorkspaceWithMembership = Schemas["PublicV1WorkspaceWithMembership"];
31
- export type GetWorkspacesResponse = Schemas["V1ListWorkspacesBody"] & {
27
+ export type MeWorkspace = Schemas["CurrentUserWorkspace"];
28
+ export type MeResponse = Schemas["CurrentUser"];
29
+ export type WorkspaceMembership = Schemas["WorkspaceMembership"];
30
+ export type WorkspaceWithMembership = Schemas["WorkspaceWithMembership"];
31
+ export type GetWorkspacesResponse = Schemas["WorkspacePage"] & {
32
32
  workspaces: WorkspaceWithMembership[];
33
33
  };
34
34
 
@@ -39,15 +39,15 @@ export type MemberRole = WorkspaceMembership["role"];
39
39
  // --- Projects ---
40
40
 
41
41
  // Lean shape returned by GET /v1/projects/{id} and POST /v1/projects.
42
- export type ProjectResponse = Schemas["V1ProjectResponse"];
42
+ export type ProjectResponse = Schemas["Project"];
43
43
  export type CreateProjectResponse = Schemas["PublicV1CreateProjectResponse"] & { id: string };
44
44
  export type CreateProjectBody = Omit<Schemas["PublicV1ProjectCreateInputBody"], "workspace_id">;
45
- export type UpdateProjectOptions = Schemas["PublicV1PatchProjectBody"];
46
- export type EmbedURLResponse = Schemas["V1CreateEmbedURLOutputBody"];
45
+ export type UpdateProjectOptions = Schemas["UpdateProjectRequest"];
46
+ export type EmbedURLResponse = Schemas["CreateEmbedURLResponse"];
47
47
 
48
48
  // Wider listing shape returned by the projects list endpoint.
49
- export type ListProjectItem = Schemas["PublicV1ProjectListItem"];
50
- export type ListProjectsResponse = Schemas["CursorListResponsePublicV1ProjectListItem"] & {
49
+ export type ListProjectItem = Schemas["ProjectSummary"];
50
+ export type ListProjectsResponse = Schemas["ProjectSummaryPage"] & {
51
51
  projects: ListProjectItem[] | null;
52
52
  total?: number;
53
53
  has_more?: boolean;
@@ -64,6 +64,7 @@ export type ProjectPatchVisibility = NonNullable<UpdateProjectOptions["visibilit
64
64
  export type SendMessageResponse = Schemas["V1SendMessageOutputBody"];
65
65
  export type GetMessageResponse = Schemas["V1MessageResponse"];
66
66
  export type MessageSummary = Schemas["V1MessageListItem"];
67
+ export type MessageCompletionReason = NonNullable<Schemas["V1MessageResponse"]["completion_reason"]>;
67
68
  type AwaitingInputSummary = Partial<Schemas["V1AwaitingInputSummary"]>;
68
69
  export type ListMessagesResponse = Schemas["CursorListResponseV1MessageListItem"] & {
69
70
  messages: MessageSummary[] | null;
@@ -180,11 +181,11 @@ export type ListMCPConnectorsResponse = Omit<ListConnectorsResponse, "connectors
180
181
 
181
182
  export type TimeSeriesDataPoint = Schemas["TimeSeriesDataPoint"];
182
183
  export type TimeSeriesData = Schemas["TimeSeriesData"];
183
- export type ListDataPoint = Schemas["ListDataPoint"];
184
- export type ListData = Schemas["ListData"];
184
+ export type ListDataPoint = Schemas["AnalyticsBreakdownPoint"];
185
+ export type ListData = Schemas["AnalyticsBreakdown"];
185
186
  export type ProjectAnalyticsResponse = Schemas["ProjectAnalyticsResponse"];
186
187
  export type TrendDataPoint = Schemas["TrendDataPoint"];
187
- export type ProjectAnalyticsTrendResponse = Schemas["ProjectTrendResponse"];
188
+ export type ProjectAnalyticsTrendResponse = Schemas["AnalyticsTrend"];
188
189
 
189
190
  // --- Remix ---
190
191
 
@@ -385,11 +386,14 @@ export interface RemixResult {
385
386
  export interface RemixWaitOptions {
386
387
  pollInterval?: number;
387
388
  timeout?: number;
389
+ /** The optional step argument is retained for callback compatibility; the API no longer returns it. */
388
390
  onProgress?: (status: RemixJobStatus, step?: RemixJobStepInfo) => void;
389
391
  }
390
392
 
391
393
  export interface MessageCompletionResult {
392
394
  status: "completed" | "stopped" | "awaiting_input" | "timeout" | "error";
395
+ /** How the turn ended; absent while running, on SDK-side timeout, and for turns that predate it. */
396
+ completion_reason?: MessageCompletionReason;
393
397
  message_id: string;
394
398
  content: string;
395
399
  awaiting_input?: AwaitingInputSummary;
@@ -432,10 +436,8 @@ export interface ListProjectsOptions {
432
436
  visibility?: ListProjectsQuery["visibility"];
433
437
  publish_status?: ListProjectsQuery["publish_status"];
434
438
  folder_id?: ListProjectsQuery["folder_id"];
435
- folder_ids?: ListProjectsQuery["folder_ids"];
436
439
  user_id?: ListProjectsQuery["user_id"];
437
440
  type?: ListProjectsQuery["type"];
438
- search_fields?: ListProjectsQuery["search_fields"];
439
441
  viewed_by_me?: ListProjectsQuery["viewed_by_me"];
440
442
  cursor?: ListProjectsQuery["cursor"];
441
443
  limit?: ListProjectsQuery["limit"];