hazo_chat 1.1.0 → 2.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.
- package/README.md +161 -152
- package/SETUP_CHECKLIST.md +191 -587
- package/package.json +17 -7
- package/dist/components/hazo_chat/hazo_chat.d.ts +0 -16
- package/dist/components/hazo_chat/hazo_chat.d.ts.map +0 -1
- package/dist/components/hazo_chat/hazo_chat.js +0 -155
- package/dist/components/hazo_chat/hazo_chat.js.map +0 -1
- package/dist/components/hazo_chat/hazo_chat_attachment_preview.d.ts +0 -17
- package/dist/components/hazo_chat/hazo_chat_attachment_preview.d.ts.map +0 -1
- package/dist/components/hazo_chat/hazo_chat_attachment_preview.js +0 -60
- package/dist/components/hazo_chat/hazo_chat_attachment_preview.js.map +0 -1
- package/dist/components/hazo_chat/hazo_chat_context.d.ts +0 -36
- package/dist/components/hazo_chat/hazo_chat_context.d.ts.map +0 -1
- package/dist/components/hazo_chat/hazo_chat_context.js +0 -249
- package/dist/components/hazo_chat/hazo_chat_context.js.map +0 -1
- package/dist/components/hazo_chat/hazo_chat_document_viewer.d.ts +0 -15
- package/dist/components/hazo_chat/hazo_chat_document_viewer.d.ts.map +0 -1
- package/dist/components/hazo_chat/hazo_chat_document_viewer.js +0 -111
- package/dist/components/hazo_chat/hazo_chat_document_viewer.js.map +0 -1
- package/dist/components/hazo_chat/hazo_chat_header.d.ts +0 -16
- package/dist/components/hazo_chat/hazo_chat_header.d.ts.map +0 -1
- package/dist/components/hazo_chat/hazo_chat_header.js +0 -24
- package/dist/components/hazo_chat/hazo_chat_header.js.map +0 -1
- package/dist/components/hazo_chat/hazo_chat_input.d.ts +0 -18
- package/dist/components/hazo_chat/hazo_chat_input.d.ts.map +0 -1
- package/dist/components/hazo_chat/hazo_chat_input.js +0 -134
- package/dist/components/hazo_chat/hazo_chat_input.js.map +0 -1
- package/dist/components/hazo_chat/hazo_chat_messages.d.ts +0 -17
- package/dist/components/hazo_chat/hazo_chat_messages.d.ts.map +0 -1
- package/dist/components/hazo_chat/hazo_chat_messages.js +0 -109
- package/dist/components/hazo_chat/hazo_chat_messages.js.map +0 -1
- package/dist/components/hazo_chat/hazo_chat_reference_list.d.ts +0 -16
- package/dist/components/hazo_chat/hazo_chat_reference_list.d.ts.map +0 -1
- package/dist/components/hazo_chat/hazo_chat_reference_list.js +0 -59
- package/dist/components/hazo_chat/hazo_chat_reference_list.js.map +0 -1
- package/dist/components/hazo_chat/hazo_chat_sidebar.d.ts +0 -18
- package/dist/components/hazo_chat/hazo_chat_sidebar.d.ts.map +0 -1
- package/dist/components/hazo_chat/hazo_chat_sidebar.js +0 -72
- package/dist/components/hazo_chat/hazo_chat_sidebar.js.map +0 -1
- package/dist/components/hazo_chat/index.d.ts +0 -16
- package/dist/components/hazo_chat/index.d.ts.map +0 -1
- package/dist/components/hazo_chat/index.js +0 -19
- package/dist/components/hazo_chat/index.js.map +0 -1
- package/dist/components/index.d.ts +0 -9
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/index.js +0 -11
- package/dist/components/index.js.map +0 -1
- package/dist/components/ui/avatar.d.ts +0 -13
- package/dist/components/ui/avatar.d.ts.map +0 -1
- package/dist/components/ui/avatar.js +0 -28
- package/dist/components/ui/avatar.js.map +0 -1
- package/dist/components/ui/badge.d.ts +0 -16
- package/dist/components/ui/badge.d.ts.map +0 -1
- package/dist/components/ui/badge.js +0 -36
- package/dist/components/ui/badge.js.map +0 -1
- package/dist/components/ui/button.d.ts +0 -18
- package/dist/components/ui/button.d.ts.map +0 -1
- package/dist/components/ui/button.js +0 -47
- package/dist/components/ui/button.js.map +0 -1
- package/dist/components/ui/chat_bubble.d.ts +0 -19
- package/dist/components/ui/chat_bubble.d.ts.map +0 -1
- package/dist/components/ui/chat_bubble.js +0 -101
- package/dist/components/ui/chat_bubble.js.map +0 -1
- package/dist/components/ui/index.d.ts +0 -18
- package/dist/components/ui/index.d.ts.map +0 -1
- package/dist/components/ui/index.js +0 -20
- package/dist/components/ui/index.js.map +0 -1
- package/dist/components/ui/input.d.ts +0 -11
- package/dist/components/ui/input.d.ts.map +0 -1
- package/dist/components/ui/input.js +0 -18
- package/dist/components/ui/input.js.map +0 -1
- package/dist/components/ui/loading_skeleton.d.ts +0 -19
- package/dist/components/ui/loading_skeleton.d.ts.map +0 -1
- package/dist/components/ui/loading_skeleton.js +0 -30
- package/dist/components/ui/loading_skeleton.js.map +0 -1
- package/dist/components/ui/scroll-area.d.ts +0 -12
- package/dist/components/ui/scroll-area.d.ts.map +0 -1
- package/dist/components/ui/scroll-area.js +0 -25
- package/dist/components/ui/scroll-area.js.map +0 -1
- package/dist/components/ui/separator.d.ts +0 -11
- package/dist/components/ui/separator.d.ts.map +0 -1
- package/dist/components/ui/separator.js +0 -18
- package/dist/components/ui/separator.js.map +0 -1
- package/dist/components/ui/skeleton.d.ts +0 -9
- package/dist/components/ui/skeleton.d.ts.map +0 -1
- package/dist/components/ui/skeleton.js +0 -16
- package/dist/components/ui/skeleton.js.map +0 -1
- package/dist/components/ui/textarea.d.ts +0 -11
- package/dist/components/ui/textarea.d.ts.map +0 -1
- package/dist/components/ui/textarea.js +0 -18
- package/dist/components/ui/textarea.js.map +0 -1
- package/dist/components/ui/tooltip.d.ts +0 -14
- package/dist/components/ui/tooltip.d.ts.map +0 -1
- package/dist/components/ui/tooltip.js +0 -30
- package/dist/components/ui/tooltip.js.map +0 -1
- package/dist/hooks/index.d.ts +0 -10
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/index.js +0 -10
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/use_chat_messages.d.ts +0 -25
- package/dist/hooks/use_chat_messages.d.ts.map +0 -1
- package/dist/hooks/use_chat_messages.js +0 -430
- package/dist/hooks/use_chat_messages.js.map +0 -1
- package/dist/hooks/use_chat_references.d.ts +0 -17
- package/dist/hooks/use_chat_references.d.ts.map +0 -1
- package/dist/hooks/use_chat_references.js +0 -133
- package/dist/hooks/use_chat_references.js.map +0 -1
- package/dist/hooks/use_file_upload.d.ts +0 -23
- package/dist/hooks/use_file_upload.d.ts.map +0 -1
- package/dist/hooks/use_file_upload.js +0 -212
- package/dist/hooks/use_file_upload.js.map +0 -1
- package/dist/index.d.ts +0 -13
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -17
- package/dist/index.js.map +0 -1
- package/dist/lib/config.d.ts +0 -41
- package/dist/lib/config.d.ts.map +0 -1
- package/dist/lib/config.js +0 -93
- package/dist/lib/config.js.map +0 -1
- package/dist/lib/constants.d.ts +0 -39
- package/dist/lib/constants.d.ts.map +0 -1
- package/dist/lib/constants.js +0 -70
- package/dist/lib/constants.js.map +0 -1
- package/dist/lib/index.d.ts +0 -9
- package/dist/lib/index.d.ts.map +0 -1
- package/dist/lib/index.js +0 -9
- package/dist/lib/index.js.map +0 -1
- package/dist/lib/utils.d.ts +0 -17
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js +0 -20
- package/dist/lib/utils.js.map +0 -1
- package/dist/types/index.d.ts +0 -367
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -8
- package/dist/types/index.js.map +0 -1
package/dist/types/index.d.ts
DELETED
|
@@ -1,367 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type definitions for the hazo_chat package
|
|
3
|
-
*
|
|
4
|
-
* Contains all TypeScript interfaces and types used across the package
|
|
5
|
-
* for props, messages, references, user profiles, and configuration.
|
|
6
|
-
*/
|
|
7
|
-
import type { ReactNode } from 'react';
|
|
8
|
-
/**
|
|
9
|
-
* Re-export HazoConnectAdapter from hazo_connect for convenience
|
|
10
|
-
* Consumers should use getHazoConnectSingleton() or createHazoConnectFromEnv()
|
|
11
|
-
* from hazo_connect/nextjs/setup to create an adapter instance
|
|
12
|
-
*/
|
|
13
|
-
export type { HazoConnectAdapter } from 'hazo_connect';
|
|
14
|
-
/**
|
|
15
|
-
* Legacy alias for backward compatibility
|
|
16
|
-
* @deprecated Use HazoConnectAdapter instead
|
|
17
|
-
*/
|
|
18
|
-
export type HazoConnectInstance = import('hazo_connect').HazoConnectAdapter;
|
|
19
|
-
/**
|
|
20
|
-
* Interface for hazo_auth authentication service
|
|
21
|
-
*/
|
|
22
|
-
export interface HazoAuthInstance {
|
|
23
|
-
hazo_get_auth: () => Promise<HazoAuthUser | null>;
|
|
24
|
-
hazo_get_user_profiles: (user_ids: string[]) => Promise<HazoUserProfile[]>;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Authenticated user from hazo_auth
|
|
28
|
-
*/
|
|
29
|
-
export interface HazoAuthUser {
|
|
30
|
-
id: string;
|
|
31
|
-
email?: string;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* User profile from hazo_auth
|
|
35
|
-
*/
|
|
36
|
-
export interface HazoUserProfile {
|
|
37
|
-
id: string;
|
|
38
|
-
name: string;
|
|
39
|
-
email?: string;
|
|
40
|
-
avatar_url?: string;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Database schema for hazo_chat table
|
|
44
|
-
*/
|
|
45
|
-
export interface ChatMessageDB {
|
|
46
|
-
id: string;
|
|
47
|
-
reference_id: string;
|
|
48
|
-
reference_type: string;
|
|
49
|
-
sender_user_id: string;
|
|
50
|
-
receiver_user_id: string;
|
|
51
|
-
message_text: string | null;
|
|
52
|
-
reference_list: ChatReferenceItem[] | null;
|
|
53
|
-
read_at: string | null;
|
|
54
|
-
deleted_at: string | null;
|
|
55
|
-
created_at: string;
|
|
56
|
-
changed_at: string;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Chat message with user profile data attached
|
|
60
|
-
*/
|
|
61
|
-
export interface ChatMessage extends ChatMessageDB {
|
|
62
|
-
sender_profile?: HazoUserProfile;
|
|
63
|
-
receiver_profile?: HazoUserProfile;
|
|
64
|
-
is_sender: boolean;
|
|
65
|
-
send_status?: MessageSendStatus;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Status of message sending operation
|
|
69
|
-
*/
|
|
70
|
-
export type MessageSendStatus = 'sending' | 'sent' | 'failed';
|
|
71
|
-
/**
|
|
72
|
-
* Payload for creating a new chat message
|
|
73
|
-
*/
|
|
74
|
-
export interface CreateMessagePayload {
|
|
75
|
-
reference_id: string;
|
|
76
|
-
reference_type: string;
|
|
77
|
-
receiver_user_id: string;
|
|
78
|
-
message_text: string;
|
|
79
|
-
reference_list?: ChatReferenceItem[];
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Type of reference item
|
|
83
|
-
*/
|
|
84
|
-
export type ReferenceType = 'document' | 'field' | 'url';
|
|
85
|
-
/**
|
|
86
|
-
* Scope of reference (where it's visible)
|
|
87
|
-
*/
|
|
88
|
-
export type ReferenceScope = 'chat' | 'field';
|
|
89
|
-
/**
|
|
90
|
-
* Reference item in reference list or reference_list JSON column
|
|
91
|
-
*/
|
|
92
|
-
export interface ChatReferenceItem {
|
|
93
|
-
id: string;
|
|
94
|
-
type: ReferenceType;
|
|
95
|
-
scope: ReferenceScope;
|
|
96
|
-
name: string;
|
|
97
|
-
url: string;
|
|
98
|
-
mime_type?: string;
|
|
99
|
-
file_size?: number;
|
|
100
|
-
message_id?: string;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Reference item passed as prop (external references)
|
|
104
|
-
*/
|
|
105
|
-
export interface ReferenceItem {
|
|
106
|
-
id: string;
|
|
107
|
-
type: ReferenceType;
|
|
108
|
-
scope: ReferenceScope;
|
|
109
|
-
name: string;
|
|
110
|
-
url: string;
|
|
111
|
-
mime_type?: string;
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Pending file attachment before upload
|
|
115
|
-
*/
|
|
116
|
-
export interface PendingAttachment {
|
|
117
|
-
id: string;
|
|
118
|
-
file: File;
|
|
119
|
-
preview_url?: string;
|
|
120
|
-
upload_progress?: number;
|
|
121
|
-
upload_status: 'pending' | 'uploading' | 'uploaded' | 'failed';
|
|
122
|
-
error_message?: string;
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Uploaded file result
|
|
126
|
-
*/
|
|
127
|
-
export interface UploadedFile {
|
|
128
|
-
id: string;
|
|
129
|
-
name: string;
|
|
130
|
-
url: string;
|
|
131
|
-
mime_type: string;
|
|
132
|
-
file_size: number;
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* File upload validation result
|
|
136
|
-
*/
|
|
137
|
-
export interface FileValidationResult {
|
|
138
|
-
valid: boolean;
|
|
139
|
-
error?: string;
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Main HazoChat component props
|
|
143
|
-
*/
|
|
144
|
-
export interface HazoChatProps {
|
|
145
|
-
/** hazo_connect adapter instance (required) - from getHazoConnectSingleton() or createHazoConnectFromEnv() */
|
|
146
|
-
hazo_connect: import('hazo_connect').HazoConnectAdapter;
|
|
147
|
-
/** hazo_auth authentication service (required) */
|
|
148
|
-
hazo_auth: HazoAuthInstance;
|
|
149
|
-
/** UUID of the chat recipient (required) */
|
|
150
|
-
receiver_user_id: string;
|
|
151
|
-
/** Path/bucket for uploaded documents (required) */
|
|
152
|
-
document_save_location: string;
|
|
153
|
-
/** Main field reference ID (optional) */
|
|
154
|
-
reference_id?: string;
|
|
155
|
-
/** Reference type for the main reference */
|
|
156
|
-
reference_type?: string;
|
|
157
|
-
/** Additional field references (optional) */
|
|
158
|
-
additional_references?: ReferenceItem[];
|
|
159
|
-
/** Timezone for timestamps (default: "GMT+10") */
|
|
160
|
-
timezone?: string;
|
|
161
|
-
/** Chat window title */
|
|
162
|
-
title?: string;
|
|
163
|
-
/** Chat window subtitle */
|
|
164
|
-
subtitle?: string;
|
|
165
|
-
/** Close button callback */
|
|
166
|
-
on_close?: () => void;
|
|
167
|
-
/** Additional CSS classes */
|
|
168
|
-
className?: string;
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Props for HazoChatHeader component
|
|
172
|
-
*/
|
|
173
|
-
export interface HazoChatHeaderProps {
|
|
174
|
-
title?: string;
|
|
175
|
-
subtitle?: string;
|
|
176
|
-
on_close?: () => void;
|
|
177
|
-
on_toggle_sidebar?: () => void;
|
|
178
|
-
is_sidebar_open?: boolean;
|
|
179
|
-
className?: string;
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Props for HazoChatSidebar component
|
|
183
|
-
*/
|
|
184
|
-
export interface HazoChatSidebarProps {
|
|
185
|
-
is_open: boolean;
|
|
186
|
-
on_close: () => void;
|
|
187
|
-
className?: string;
|
|
188
|
-
children?: ReactNode;
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Props for HazoChatReferenceList component
|
|
192
|
-
*/
|
|
193
|
-
export interface HazoChatReferenceListProps {
|
|
194
|
-
references: ChatReferenceItem[];
|
|
195
|
-
selected_reference_id?: string;
|
|
196
|
-
on_select: (reference: ChatReferenceItem) => void;
|
|
197
|
-
className?: string;
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Props for HazoChatDocumentViewer component
|
|
201
|
-
*/
|
|
202
|
-
export interface HazoChatDocumentViewerProps {
|
|
203
|
-
reference?: ChatReferenceItem;
|
|
204
|
-
className?: string;
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* Props for HazoChatMessages component
|
|
208
|
-
*/
|
|
209
|
-
export interface HazoChatMessagesProps {
|
|
210
|
-
messages: ChatMessage[];
|
|
211
|
-
current_user_id: string;
|
|
212
|
-
timezone: string;
|
|
213
|
-
is_loading: boolean;
|
|
214
|
-
has_more: boolean;
|
|
215
|
-
on_load_more: () => void;
|
|
216
|
-
on_delete_message: (message_id: string) => void;
|
|
217
|
-
on_scroll_to_message?: (message_id: string) => void;
|
|
218
|
-
highlighted_message_id?: string;
|
|
219
|
-
className?: string;
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* Props for HazoChatInput component
|
|
223
|
-
*/
|
|
224
|
-
export interface HazoChatInputProps {
|
|
225
|
-
on_send: (message: string, attachments: UploadedFile[]) => void;
|
|
226
|
-
pending_attachments: PendingAttachment[];
|
|
227
|
-
on_add_attachment: (files: File[]) => void;
|
|
228
|
-
on_remove_attachment: (attachment_id: string) => void;
|
|
229
|
-
is_disabled?: boolean;
|
|
230
|
-
placeholder?: string;
|
|
231
|
-
className?: string;
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* Props for HazoChatAttachmentPreview component
|
|
235
|
-
*/
|
|
236
|
-
export interface HazoChatAttachmentPreviewProps {
|
|
237
|
-
attachments: PendingAttachment[];
|
|
238
|
-
on_remove: (attachment_id: string) => void;
|
|
239
|
-
className?: string;
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Props for ChatBubble component
|
|
243
|
-
*/
|
|
244
|
-
export interface ChatBubbleProps {
|
|
245
|
-
message: ChatMessage;
|
|
246
|
-
is_sender: boolean;
|
|
247
|
-
sender_profile?: HazoUserProfile;
|
|
248
|
-
timezone: string;
|
|
249
|
-
on_delete?: () => void;
|
|
250
|
-
on_reference_click?: (reference: ChatReferenceItem) => void;
|
|
251
|
-
is_highlighted?: boolean;
|
|
252
|
-
className?: string;
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* Props for LoadingSkeleton component
|
|
256
|
-
*/
|
|
257
|
-
export interface LoadingSkeletonProps {
|
|
258
|
-
type: 'message' | 'reference' | 'viewer';
|
|
259
|
-
count?: number;
|
|
260
|
-
className?: string;
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
* State for HazoChatContext
|
|
264
|
-
*/
|
|
265
|
-
export interface HazoChatContextState {
|
|
266
|
-
/** Current authenticated user */
|
|
267
|
-
current_user: HazoUserProfile | null;
|
|
268
|
-
/** Selected reference to display in viewer */
|
|
269
|
-
selected_reference: ChatReferenceItem | null;
|
|
270
|
-
/** ID of message to scroll to and highlight */
|
|
271
|
-
highlighted_message_id: string | null;
|
|
272
|
-
/** Pending file attachments */
|
|
273
|
-
pending_attachments: PendingAttachment[];
|
|
274
|
-
/** Whether sidebar is open (mobile) */
|
|
275
|
-
is_sidebar_open: boolean;
|
|
276
|
-
/** Polling connection status */
|
|
277
|
-
polling_status: PollingStatus;
|
|
278
|
-
/** All references from messages and props */
|
|
279
|
-
all_references: ChatReferenceItem[];
|
|
280
|
-
/** Error message if any */
|
|
281
|
-
error_message: string | null;
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Actions for HazoChatContext
|
|
285
|
-
*/
|
|
286
|
-
export interface HazoChatContextActions {
|
|
287
|
-
set_selected_reference: (reference: ChatReferenceItem | null) => void;
|
|
288
|
-
set_highlighted_message_id: (message_id: string | null) => void;
|
|
289
|
-
add_pending_attachment: (file: File) => void;
|
|
290
|
-
remove_pending_attachment: (attachment_id: string) => void;
|
|
291
|
-
update_pending_attachment: (attachment_id: string, updates: Partial<PendingAttachment>) => void;
|
|
292
|
-
clear_pending_attachments: () => void;
|
|
293
|
-
toggle_sidebar: () => void;
|
|
294
|
-
set_sidebar_open: (is_open: boolean) => void;
|
|
295
|
-
set_error_message: (message: string | null) => void;
|
|
296
|
-
add_reference: (reference: ChatReferenceItem) => void;
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* Full HazoChatContext value
|
|
300
|
-
*/
|
|
301
|
-
export interface HazoChatContextValue extends HazoChatContextState, HazoChatContextActions {
|
|
302
|
-
}
|
|
303
|
-
/**
|
|
304
|
-
* Polling connection status
|
|
305
|
-
*/
|
|
306
|
-
export type PollingStatus = 'connected' | 'reconnecting' | 'error';
|
|
307
|
-
/**
|
|
308
|
-
* Return type for useChatMessages hook
|
|
309
|
-
*/
|
|
310
|
-
export interface UseChatMessagesReturn {
|
|
311
|
-
messages: ChatMessage[];
|
|
312
|
-
is_loading: boolean;
|
|
313
|
-
is_loading_more: boolean;
|
|
314
|
-
has_more: boolean;
|
|
315
|
-
error: string | null;
|
|
316
|
-
polling_status: PollingStatus;
|
|
317
|
-
load_more: () => void;
|
|
318
|
-
send_message: (payload: CreateMessagePayload) => Promise<boolean>;
|
|
319
|
-
delete_message: (message_id: string) => Promise<boolean>;
|
|
320
|
-
mark_as_read: (message_id: string) => Promise<void>;
|
|
321
|
-
refresh: () => void;
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* Return type for useChatReferences hook
|
|
325
|
-
*/
|
|
326
|
-
export interface UseChatReferencesReturn {
|
|
327
|
-
references: ChatReferenceItem[];
|
|
328
|
-
selected_reference: ChatReferenceItem | null;
|
|
329
|
-
select_reference: (reference: ChatReferenceItem) => void;
|
|
330
|
-
clear_selection: () => void;
|
|
331
|
-
add_reference: (reference: ChatReferenceItem) => void;
|
|
332
|
-
get_message_for_reference: (reference_id: string) => string | null;
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* Return type for useFileUpload hook
|
|
336
|
-
*/
|
|
337
|
-
export interface UseFileUploadReturn {
|
|
338
|
-
pending_attachments: PendingAttachment[];
|
|
339
|
-
add_files: (files: File[]) => void;
|
|
340
|
-
remove_file: (attachment_id: string) => void;
|
|
341
|
-
upload_all: () => Promise<UploadedFile[]>;
|
|
342
|
-
clear_all: () => void;
|
|
343
|
-
is_uploading: boolean;
|
|
344
|
-
validation_errors: string[];
|
|
345
|
-
}
|
|
346
|
-
/**
|
|
347
|
-
* Chat configuration from hazo_chat_config.ini
|
|
348
|
-
*/
|
|
349
|
-
export interface ChatConfig {
|
|
350
|
-
polling_interval: number;
|
|
351
|
-
messages_per_page: number;
|
|
352
|
-
}
|
|
353
|
-
/**
|
|
354
|
-
* Upload configuration from hazo_chat_config.ini
|
|
355
|
-
*/
|
|
356
|
-
export interface UploadConfig {
|
|
357
|
-
max_file_size_mb: number;
|
|
358
|
-
allowed_types: string[];
|
|
359
|
-
}
|
|
360
|
-
/**
|
|
361
|
-
* Full configuration object
|
|
362
|
-
*/
|
|
363
|
-
export interface HazoChatConfig {
|
|
364
|
-
chat: ChatConfig;
|
|
365
|
-
uploads: UploadConfig;
|
|
366
|
-
}
|
|
367
|
-
//# s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IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B;AAMD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,YAAY,CAAC;CACvB"}
|
package/dist/types/index.js
DELETED
package/dist/types/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|