File size: 751 Bytes
3c9f03f
3ba9c0c
 
f80b091
 
bfbf1a7
 
3c9f03f
 
d0a1b70
 
 
3c9f03f
f80b091
 
 
3c9f03f
a8e1cb0
d0a1b70
 
 
abb7588
f80b091
a8e1cb0
d0a1b70
 
a86b547
d0a1b70
a86b547
d0a1b70
 
 
 
96ac62a
d0a1b70
 
bfbf1a7
d0a1b70
6b8f69a
 
 
 
 
 
bfbf1a7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import { type Message } from 'ai';

export type ServerActionResult<Result> = Promise<
  | Result
  | {
      error: string;
    }
>;

/**
 * @deprecated
 */
export type DatasetImageEntity = {
  url: string;
  selected?: boolean;
  name: string;
};

/**
 * @deprecated
 */
export type MessageWithSelectedDataset = Message & {
  dataset: DatasetImageEntity[];
};

export type MessageBase = {
  role: Message['role'];
  content: string;
  id: string;
};

export type ChatEntity = {
  url: string;
  id?: string; // a chat without id is not to be saved
  user: string; // email
  messages: MessageBase[];
  updatedAt: number;
};

export interface SignedPayload {
  id: string;
  publicUrl: string;
  signedUrl: string;
  fields: Record<string, string>;
}