chatbot-template/lib/types.ts
2024-03-19 04:37:30 +03:00

37 lines
563 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
}
export interface User extends Record<string, any> {
id: string
email: string
password: string
salt: string
}