2024-03-14 20:00:52 +03:00
|
|
|
import { Message } from 'ai'
|
2023-06-02 15:15:35 -04:00
|
|
|
|
|
|
|
|
export interface Chat extends Record<string, any> {
|
2023-06-02 15:33:48 -04:00
|
|
|
id: string
|
|
|
|
|
title: string
|
|
|
|
|
createdAt: Date
|
|
|
|
|
userId: string
|
2023-06-16 15:20:42 +04:00
|
|
|
path: string
|
2023-06-02 15:33:48 -04:00
|
|
|
messages: Message[]
|
2023-06-16 16:18:52 +04:00
|
|
|
sharePath?: string
|
2023-06-16 15:20:42 +04:00
|
|
|
}
|
|
|
|
|
|
2023-06-16 21:52:01 +04:00
|
|
|
export type ServerActionResult<Result> = Promise<
|
|
|
|
|
| Result
|
|
|
|
|
| {
|
|
|
|
|
error: string
|
|
|
|
|
}
|
|
|
|
|
>
|
2024-03-14 20:00:52 +03:00
|
|
|
|
|
|
|
|
export interface Session {
|
|
|
|
|
user: {
|
|
|
|
|
id: string
|
|
|
|
|
email: string
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface AuthResult {
|
|
|
|
|
type: string
|
|
|
|
|
message: string
|
|
|
|
|
}
|