@banbox/chat 1.0.0 → 1.0.2

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.
@@ -1,37 +1,42 @@
1
- // components/chat/ui/chat/types.ts
2
- import type { ChatAudio, ChatFile } from "./ChatMessageItem";
3
-
4
- export type MessageRef = {
5
- id: string;
6
- author: string | { name: string };
7
- time?: string;
8
- text?: string;
9
- images?: string[];
10
- files?: ChatFile[];
11
- audio?: ChatAudio;
12
- };
13
-
14
- export type BusinessCard = {
15
- avatarSrc: string;
16
- name: string;
17
- country: string; // e.g. "Bangladesh"
18
- flag?: string; // emoji or small image URL; default 🏳️ if not given
19
- company: string;
20
- email: string;
21
- phone: string;
22
- };
23
-
24
- export type AddressCard = {
25
- name: string;
26
- label?: "Home" | "Office";
27
- businessName?: string;
28
- mobileNumber: string;
29
- country: string;
30
- district?: string | null;
31
- policeStation?: string | null;
32
- state?: string | null;
33
- city?: string | null;
34
- postalCode?: string;
35
- addressLine: string;
36
- landMark?: string | null;
37
- };
1
+ // components/chat/ui/chat/types.ts
2
+ import type { MessageAudio, MessageFile } from "../../types";
3
+
4
+ // Re-export global types so UI components can import from this local file
5
+ export type { MessageAudio as ChatAudio, MessageFile as ChatFile };
6
+
7
+ export type MessageRef = {
8
+ id: string;
9
+ author: string | { name: string };
10
+ time?: string;
11
+ text?: string;
12
+ images?: string[];
13
+ files?: MessageFile[];
14
+ audio?: MessageAudio;
15
+ };
16
+
17
+ export type BusinessCard = {
18
+ avatarSrc?: string;
19
+ name: string;
20
+ country?: string;
21
+ flag?: string;
22
+ company?: string;
23
+ email?: string;
24
+ phone?: string;
25
+ [key: string]: string | undefined;
26
+ };
27
+
28
+ export type AddressCard = {
29
+ name?: string;
30
+ label?: string;
31
+ businessName?: string;
32
+ mobileNumber?: string;
33
+ country?: string;
34
+ district?: string | null;
35
+ policeStation?: string | null;
36
+ state?: string | null;
37
+ city?: string | null;
38
+ postalCode?: string;
39
+ addressLine?: string;
40
+ landMark?: string | null;
41
+ [key: string]: string | null | undefined;
42
+ };