feat(P4B.T2): WhiteboardPayload + shared whiteboards CRUD wrappers + tests
Adds WhiteboardPayload wire-format variant to MessagePayload/ParsedMessagePayload, creates the whiteboards.ts CRUD wrapper (createWhiteboard, listWhiteboardStrokes, insertWhiteboardStroke, clearWhiteboardStrokes), writes 5 unit tests (38/38 pass), re-exports from chat/index.ts, and registers conversation_whiteboards + whiteboard_strokes in packages/db-types so typecheck passes cleanly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -477,6 +477,67 @@ export type Database = {
|
||||
},
|
||||
]
|
||||
}
|
||||
conversation_whiteboards: {
|
||||
Row: {
|
||||
id: string
|
||||
conversation_id: string
|
||||
owner_user_id: string
|
||||
created_at: string
|
||||
}
|
||||
Insert: {
|
||||
id?: string
|
||||
conversation_id: string
|
||||
owner_user_id: string
|
||||
created_at?: string
|
||||
}
|
||||
Update: {
|
||||
id?: string
|
||||
conversation_id?: string
|
||||
owner_user_id?: string
|
||||
created_at?: string
|
||||
}
|
||||
Relationships: [
|
||||
{
|
||||
foreignKeyName: "conversation_whiteboards_conversation_id_fkey"
|
||||
columns: ["conversation_id"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "conversations"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
]
|
||||
}
|
||||
whiteboard_strokes: {
|
||||
Row: {
|
||||
id: string
|
||||
whiteboard_id: string
|
||||
author_user_id: string
|
||||
stroke_json: Json
|
||||
created_at: string
|
||||
}
|
||||
Insert: {
|
||||
id?: string
|
||||
whiteboard_id: string
|
||||
author_user_id: string
|
||||
stroke_json: Json
|
||||
created_at?: string
|
||||
}
|
||||
Update: {
|
||||
id?: string
|
||||
whiteboard_id?: string
|
||||
author_user_id?: string
|
||||
stroke_json?: Json
|
||||
created_at?: string
|
||||
}
|
||||
Relationships: [
|
||||
{
|
||||
foreignKeyName: "whiteboard_strokes_whiteboard_id_fkey"
|
||||
columns: ["whiteboard_id"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "conversation_whiteboards"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
Views: {
|
||||
[_ in never]: never
|
||||
|
||||
Reference in New Issue
Block a user