chatbot-template/lib/types.ts

31 lines
445 B
TypeScript
Raw Normal View History

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[]
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
}