2023-06-02 15:33:48 -04:00
|
|
|
import { type Message } from 'ai-connector'
|
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-02 15:15:35 -04:00
|
|
|
}
|
2023-06-16 15:20:42 +04:00
|
|
|
|
|
|
|
|
export interface Share {
|
|
|
|
|
id: string
|
|
|
|
|
title: string
|
|
|
|
|
createdAt: number
|
|
|
|
|
userId: string
|
|
|
|
|
path: string
|
|
|
|
|
chat: Chat
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export type ServerActionResult<Result> = Promise<Result | Error>
|