@thrillee/aegischat 0.1.5 → 0.1.7

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/index.d.mts CHANGED
@@ -162,7 +162,7 @@ interface ChannelsResponse {
162
162
 
163
163
  interface UseChatOptions {
164
164
  config?: AegisConfig;
165
- role: 'lawyer' | 'client';
165
+ role?: "lawyer" | "client";
166
166
  clientId?: string;
167
167
  initialSession?: ChatSession | null;
168
168
  autoConnect?: boolean;
@@ -204,8 +204,9 @@ interface UseChatReturn {
204
204
  retryMessage: (tempId: string) => Promise<void>;
205
205
  deleteFailedMessage: (tempId: string) => void;
206
206
  markAsRead: (channelId: string) => Promise<void>;
207
+ setup: (options: UseChatOptions) => void;
207
208
  }
208
- declare function useChat(options: UseChatOptions): UseChatReturn;
209
+ declare function useChat(options?: Partial<UseChatOptions>): UseChatReturn;
209
210
 
210
211
  interface UseAutoReadOptions {
211
212
  onMarkAsRead?: (channelId: string) => void;
package/dist/index.d.ts CHANGED
@@ -162,7 +162,7 @@ interface ChannelsResponse {
162
162
 
163
163
  interface UseChatOptions {
164
164
  config?: AegisConfig;
165
- role: 'lawyer' | 'client';
165
+ role?: "lawyer" | "client";
166
166
  clientId?: string;
167
167
  initialSession?: ChatSession | null;
168
168
  autoConnect?: boolean;
@@ -204,8 +204,9 @@ interface UseChatReturn {
204
204
  retryMessage: (tempId: string) => Promise<void>;
205
205
  deleteFailedMessage: (tempId: string) => void;
206
206
  markAsRead: (channelId: string) => Promise<void>;
207
+ setup: (options: UseChatOptions) => void;
207
208
  }
208
- declare function useChat(options: UseChatOptions): UseChatReturn;
209
+ declare function useChat(options?: Partial<UseChatOptions>): UseChatReturn;
209
210
 
210
211
  interface UseAutoReadOptions {
211
212
  onMarkAsRead?: (channelId: string) => void;