chatbot-template/lib/types.ts
2024-03-14 20:00:52 +03:00

30 lines
445 B
TypeScript

import { Message } from 'ai'
export interface Chat extends Record<string, any> {
id: string
title: string
createdAt: Date
userId: string
path: string
messages: Message[]
sharePath?: string
}
export type ServerActionResult<Result> = Promise<
| Result
| {
error: string
}
>
export interface Session {
user: {
id: string
email: string
}
}
export interface AuthResult {
type: string
message: string
}