@lovable.dev/sdk 1.2.2 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +278 -928
- package/dist/index.js +0 -48
- package/dist/index.js.map +1 -1
- package/dist/schemas.d.ts +277 -1701
- package/dist/schemas.js +104 -575
- package/dist/schemas.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +0 -53
- package/src/generated/paths.ts +229 -736
- package/src/generated/zod/zod.gen.ts +98 -594
- package/src/index.ts +0 -6
- package/src/schemas.ts +23 -0
- package/src/types.ts +10 -24
package/src/index.ts
CHANGED
|
@@ -69,20 +69,14 @@ export type {
|
|
|
69
69
|
TemplateProjectResponse,
|
|
70
70
|
ListLibraryProjectsResponse,
|
|
71
71
|
ListTemplateProjectsResponse,
|
|
72
|
-
ConnectorResponse,
|
|
73
|
-
AvailableConnectorEntry,
|
|
74
|
-
AddConnectorBody,
|
|
75
72
|
ConnectorItem,
|
|
76
73
|
StandardConnectorItem,
|
|
77
74
|
SeamlessConnectorItem,
|
|
78
75
|
MCPConnectorItem,
|
|
79
|
-
ConnectionItem,
|
|
80
76
|
ListConnectorsResponse,
|
|
81
|
-
ListAvailableConnectorsResponse,
|
|
82
77
|
ListStandardConnectorsResponse,
|
|
83
78
|
ListSeamlessConnectorsResponse,
|
|
84
79
|
ListMCPConnectorsResponse,
|
|
85
|
-
ListConnectionsResponse,
|
|
86
80
|
TimeSeriesDataPoint,
|
|
87
81
|
TimeSeriesData,
|
|
88
82
|
ListDataPoint,
|
package/src/schemas.ts
CHANGED
|
@@ -10,6 +10,29 @@ export * from "./generated/zod/zod.gen.js";
|
|
|
10
10
|
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
|
|
13
|
+
import {
|
|
14
|
+
CursorListResponsePublicV1ProjectListItemSchema,
|
|
15
|
+
PublicV1GetWorkspaceBodySchema,
|
|
16
|
+
PublicV1WorkspaceMemberSchema,
|
|
17
|
+
PublicV1WorkspaceSchema,
|
|
18
|
+
PublicV1WorkspaceWithMembershipSchema,
|
|
19
|
+
} from "./generated/zod/zod.gen.js";
|
|
20
|
+
|
|
21
|
+
// Deprecated aliases for schemas renamed by the public response-schema
|
|
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;
|
|
35
|
+
|
|
13
36
|
// POST /v1/database/query is served but sits outside the public OpenAPI
|
|
14
37
|
// boundary, so its schemas are not generated; hand-maintained for the MCP
|
|
15
38
|
// query_database tool's output validation.
|
package/src/types.ts
CHANGED
|
@@ -26,9 +26,11 @@ type ListConnectorsQuery = NonNullable<paths["/v1/connectors"]["get"]["parameter
|
|
|
26
26
|
|
|
27
27
|
export type MeWorkspace = Schemas["GetMeWorkspace"];
|
|
28
28
|
export type MeResponse = Schemas["GetMeOutputBody"];
|
|
29
|
-
export type WorkspaceMembership = Schemas["
|
|
30
|
-
export type WorkspaceWithMembership = Schemas["
|
|
31
|
-
export type GetWorkspacesResponse = Schemas["V1ListWorkspacesBody"]
|
|
29
|
+
export type WorkspaceMembership = Schemas["PublicV1WorkspaceMember"];
|
|
30
|
+
export type WorkspaceWithMembership = Schemas["PublicV1WorkspaceWithMembership"];
|
|
31
|
+
export type GetWorkspacesResponse = Schemas["V1ListWorkspacesBody"] & {
|
|
32
|
+
workspaces: WorkspaceWithMembership[];
|
|
33
|
+
};
|
|
32
34
|
|
|
33
35
|
// Role enum lives on WorkspaceMembership in the spec; reuse it so SDK callers
|
|
34
36
|
// always pick from the same set the server returns.
|
|
@@ -43,9 +45,9 @@ export type CreateProjectBody = Omit<Schemas["PublicV1ProjectCreateInputBody"],
|
|
|
43
45
|
export type UpdateProjectOptions = Schemas["PublicV1PatchProjectBody"];
|
|
44
46
|
export type EmbedURLResponse = Schemas["V1CreateEmbedURLOutputBody"];
|
|
45
47
|
|
|
46
|
-
// Wider listing shape returned by the
|
|
47
|
-
export type ListProjectItem = Schemas["
|
|
48
|
-
export type ListProjectsResponse = Schemas["
|
|
48
|
+
// Wider listing shape returned by the projects list endpoint.
|
|
49
|
+
export type ListProjectItem = Schemas["PublicV1ProjectListItem"];
|
|
50
|
+
export type ListProjectsResponse = Schemas["CursorListResponsePublicV1ProjectListItem"] & {
|
|
49
51
|
projects: ListProjectItem[] | null;
|
|
50
52
|
total?: number;
|
|
51
53
|
has_more?: boolean;
|
|
@@ -53,9 +55,8 @@ export type ListProjectsResponse = Schemas["CursorListResponseSearchProjectItem"
|
|
|
53
55
|
export type GetWorkspaceProjectsResponse = ListProjectsResponse;
|
|
54
56
|
export type MoveProjectsToFolderResponse = Schemas["AddProjectsToFolderResult"];
|
|
55
57
|
|
|
56
|
-
//
|
|
57
|
-
|
|
58
|
-
export type ProjectVisibility = NonNullable<ListProjectItem["visibility"]>;
|
|
58
|
+
// Compatibility export; curated response fields accept future string values.
|
|
59
|
+
export type ProjectVisibility = "public" | "private" | "draft" | "workspace_view";
|
|
59
60
|
export type ProjectPatchVisibility = NonNullable<UpdateProjectOptions["visibility"]>;
|
|
60
61
|
|
|
61
62
|
// --- Messages ---
|
|
@@ -154,24 +155,15 @@ export type ListTemplateProjectsResponse = {
|
|
|
154
155
|
|
|
155
156
|
// --- Connectors ---
|
|
156
157
|
|
|
157
|
-
export type ConnectorResponse = Schemas["V1ConnectorResponse"];
|
|
158
|
-
export type AvailableConnectorEntry = Schemas["V1AvailableConnectorEntry"];
|
|
159
|
-
export type AddConnectorBody = Omit<Schemas["PublicV1AddConnectorBody"], "workspace_id">;
|
|
160
158
|
export type ConnectorItem = Schemas["PublicV1ConnectorItem"];
|
|
161
159
|
export type StandardConnectorItem = ConnectorItem;
|
|
162
160
|
export type SeamlessConnectorItem = ConnectorItem;
|
|
163
161
|
export type MCPConnectorItem = ConnectorItem;
|
|
164
|
-
export type ConnectionItem = Schemas["V1ConnectionItem"];
|
|
165
162
|
export type ListConnectorsResponse = Omit<Schemas["CursorListResponsePublicV1ConnectorItem"], "data"> & {
|
|
166
163
|
data: ConnectorItem[];
|
|
167
164
|
connectors: ConnectorItem[];
|
|
168
165
|
has_more: boolean;
|
|
169
166
|
};
|
|
170
|
-
export type ListAvailableConnectorsResponse = Omit<Schemas["CursorListResponseV1AvailableConnectorEntry"], "data"> & {
|
|
171
|
-
data: AvailableConnectorEntry[];
|
|
172
|
-
catalog: AvailableConnectorEntry[];
|
|
173
|
-
has_more: boolean;
|
|
174
|
-
};
|
|
175
167
|
export type ListStandardConnectorsResponse = Omit<ListConnectorsResponse, "connectors"> & {
|
|
176
168
|
connectors: StandardConnectorItem[];
|
|
177
169
|
};
|
|
@@ -183,11 +175,6 @@ export type ListMCPConnectorsResponse = Omit<ListConnectorsResponse, "connectors
|
|
|
183
175
|
data: MCPConnectorItem[];
|
|
184
176
|
connectors: MCPConnectorItem[];
|
|
185
177
|
};
|
|
186
|
-
export type ListConnectionsResponse = Omit<Schemas["CursorListResponseV1ConnectionItem"], "data"> & {
|
|
187
|
-
data: ConnectionItem[];
|
|
188
|
-
connections: ConnectionItem[];
|
|
189
|
-
has_more: boolean;
|
|
190
|
-
};
|
|
191
178
|
|
|
192
179
|
// --- Analytics ---
|
|
193
180
|
|
|
@@ -448,7 +435,6 @@ export interface ListProjectsOptions {
|
|
|
448
435
|
folder_ids?: ListProjectsQuery["folder_ids"];
|
|
449
436
|
user_id?: ListProjectsQuery["user_id"];
|
|
450
437
|
type?: ListProjectsQuery["type"];
|
|
451
|
-
include_risk?: ListProjectsQuery["include_risk"];
|
|
452
438
|
search_fields?: ListProjectsQuery["search_fields"];
|
|
453
439
|
viewed_by_me?: ListProjectsQuery["viewed_by_me"];
|
|
454
440
|
cursor?: ListProjectsQuery["cursor"];
|