Skip to content

Commit 5d46bf4

Browse files
authored
feat: Add initial types for connect
1 parent ac7be2f commit 5d46bf4

File tree

8 files changed

+2351
-8
lines changed

8 files changed

+2351
-8
lines changed

src/lib/seam/connect/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
export * from "./models/index.js"
1+
import * as schemas from "./schemas.js"
2+
3+
export { schemas }
4+
5+
export * from "./model-types.js"
6+
export { default as openapi } from "./openapi.js"
7+
// UPSTREAM: Reserve this named export until nextlove is able to generate this.
8+
export const routes = {}

src/lib/seam/connect/model-types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export type { ConnectWebview } from "./models/index.js"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { z } from "zod"
2+
3+
export const connect_webview = z.object({
4+
connect_webview_id: z.string().uuid(),
5+
connected_account_id: z.string().uuid().optional(),
6+
url: z.string().url(),
7+
workspace_id: z.string().uuid(),
8+
device_selection_mode: z.enum(["none", "single", "multiple"]),
9+
accepted_providers: z.array(z.string()),
10+
accepted_devices: z.array(z.string()),
11+
any_provider_allowed: z.boolean(),
12+
any_device_allowed: z.boolean(),
13+
created_at: z.string().datetime(),
14+
login_successful: z.boolean(),
15+
status: z.enum(["pending", "failed", "authorized"]),
16+
})
17+
18+
export type ConnectWebview = z.infer<typeof connect_webview>

src/lib/seam/connect/models/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from "./workspace.js"
1+
export * from "./connect-webview.js"

src/lib/seam/connect/models/workspace.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/lib/seam/connect/openapi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default {}

0 commit comments

Comments
 (0)