@lovable.dev/sdk 1.1.1 → 1.2.3
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 +7997 -8373
- package/dist/index.js +1172 -1221
- package/dist/index.js.map +1 -1
- package/dist/schemas.d.ts +2765 -4126
- package/dist/schemas.js +1353 -2029
- package/dist/schemas.js.map +1 -1
- package/package.json +5 -4
- package/src/client.ts +0 -1
- package/src/generated/paths.ts +215 -481
- package/src/generated/zod/zod.gen.ts +100 -557
- package/src/schemas.ts +23 -0
- package/src/types.ts +10 -10
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 ---
|
|
@@ -448,7 +449,6 @@ export interface ListProjectsOptions {
|
|
|
448
449
|
folder_ids?: ListProjectsQuery["folder_ids"];
|
|
449
450
|
user_id?: ListProjectsQuery["user_id"];
|
|
450
451
|
type?: ListProjectsQuery["type"];
|
|
451
|
-
include_risk?: ListProjectsQuery["include_risk"];
|
|
452
452
|
search_fields?: ListProjectsQuery["search_fields"];
|
|
453
453
|
viewed_by_me?: ListProjectsQuery["viewed_by_me"];
|
|
454
454
|
cursor?: ListProjectsQuery["cursor"];
|