(row: Record<string, unknown>)
| 781 | } |
| 782 | |
| 783 | private deserializeMessage(row: Record<string, unknown>): SiSessionMessage { |
| 784 | return { |
| 785 | id: row.id as string, |
| 786 | session_id: row.session_id as string, |
| 787 | role: row.role as "user" | "brand_agent" | "system", |
| 788 | content: row.content as string, |
| 789 | ui_elements: row.ui_elements |
| 790 | ? typeof row.ui_elements === "string" |
| 791 | ? JSON.parse(row.ui_elements as string) |
| 792 | : row.ui_elements |
| 793 | : null, |
| 794 | action_response: row.action_response |
| 795 | ? typeof row.action_response === "string" |
| 796 | ? JSON.parse(row.action_response as string) |
| 797 | : row.action_response |
| 798 | : null, |
| 799 | created_at: new Date(row.created_at as string), |
| 800 | }; |
| 801 | } |
| 802 | |
| 803 | private deserializeRelationship( |
| 804 | row: Record<string, unknown> |
no outgoing calls
no test coverage detected