@uraiagent/react 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Attachment/MessageAttachments.d.ts +5 -0
- package/dist/components/Event/Text.d.ts +1 -1
- package/dist/components/User/UserMessage.d.ts +1 -1
- package/dist/contexts/session/SessionContext.d.ts +3 -0
- package/dist/contexts/session/session.api.d.ts +18 -0
- package/dist/helpers/MessageHandler.d.ts +5 -4
- package/dist/hooks/useSendMessage.d.ts +1 -1
- package/dist/index.cjs.js +20 -20
- package/dist/index.es.js +7353 -7109
- package/dist/interfaces/messages.d.ts +11 -8
- package/dist-embed/agent.js +21 -21
- package/package.json +1 -1
|
@@ -7,6 +7,15 @@ export type Meta = {
|
|
|
7
7
|
has_next: boolean;
|
|
8
8
|
has_previous: boolean;
|
|
9
9
|
};
|
|
10
|
+
/** A file attached to a message (uploaded via POST /chat/upload). `url` is a permanent public URL
|
|
11
|
+
* (object stored public-read under an unguessable randomized key). */
|
|
12
|
+
export type AttachmentRef = {
|
|
13
|
+
id: string;
|
|
14
|
+
url: string;
|
|
15
|
+
filename: string;
|
|
16
|
+
mimeType: string;
|
|
17
|
+
size: number;
|
|
18
|
+
};
|
|
10
19
|
export type AgentMessageProps<TData = Record<string, unknown>> = {
|
|
11
20
|
_id: string;
|
|
12
21
|
from: "agent";
|
|
@@ -14,20 +23,14 @@ export type AgentMessageProps<TData = Record<string, unknown>> = {
|
|
|
14
23
|
data: TData;
|
|
15
24
|
senderName?: string;
|
|
16
25
|
senderAvatarUrl?: string;
|
|
17
|
-
|
|
18
|
-
type: string;
|
|
19
|
-
value: string;
|
|
20
|
-
};
|
|
26
|
+
attachments?: AttachmentRef[];
|
|
21
27
|
createdAt: string;
|
|
22
28
|
};
|
|
23
29
|
export type UserMessageProps = {
|
|
24
30
|
_id: string;
|
|
25
31
|
from: "user";
|
|
26
32
|
message: string;
|
|
27
|
-
|
|
28
|
-
type: string;
|
|
29
|
-
value: string;
|
|
30
|
-
};
|
|
33
|
+
attachments?: AttachmentRef[];
|
|
31
34
|
createdAt: string;
|
|
32
35
|
};
|
|
33
36
|
export type EventMessageProps<TData = Record<string, unknown>> = {
|