@ujet/websdk-headless 6.8.0 → 6.10.1

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.ts CHANGED
@@ -195,6 +195,7 @@ interface MessageResponse {
195
195
  messages: string[];
196
196
  type: any;
197
197
  };
198
+ server_message_id?: number;
198
199
  title?: string;
199
200
  type: string;
200
201
  unredacted?: string;
@@ -622,6 +623,8 @@ interface UjetConversationMessageItem {
622
623
  data: Record<string, any>;
623
624
  user: string;
624
625
  published_at: string;
626
+ /** Aggregated translation_update payloads for this row, when any exist. */
627
+ attributes?: unknown;
625
628
  }
626
629
  interface UjetConversationHistoryQuery {
627
630
  limit?: number;
@@ -690,7 +693,7 @@ declare abstract class BaseProvider {
690
693
  abstract create(): Promise<void>;
691
694
  abstract destroy(): Promise<void>;
692
695
  abstract join(sid: string): Promise<void>;
693
- abstract preview(text: string): Promise<void>;
696
+ abstract preview(text: string | undefined): Promise<void>;
694
697
  abstract fetchMessages(files: {
695
698
  [index: AttachmentKey]: File;
696
699
  }): Promise<MessageResponse[]>;
@@ -704,6 +707,7 @@ declare function addProviderType(Provider: typeof BaseProvider): void;
704
707
  interface ChatHooks {
705
708
  leaveChat?: () => Promise<void>;
706
709
  leaveChatBeacon?: () => void;
710
+ isRiskFlagEnabled?: (flagName: string) => boolean;
707
711
  }
708
712
  declare class Chat {
709
713
  private provider;
@@ -719,6 +723,7 @@ declare class Chat {
719
723
  private leaveSent;
720
724
  private beaconAttempted;
721
725
  constructor(state: ChatResponse, issueChatToken: IssueChatTokenMethod, hooks?: ChatHooks, providerContext?: ProviderContext);
726
+ private handleConnectionEnded;
722
727
  get id(): number;
723
728
  get menuId(): number;
724
729
  get channelId(): string;
@@ -762,7 +767,7 @@ declare class Chat {
762
767
  * `chat` is public too. Pairing still uses the provider's wide key.
763
768
  */
764
769
  sendMessage(message: MessageRequest, file?: File): Promise<number>;
765
- preview(text: string): Promise<void>;
770
+ preview(text: string | undefined): Promise<void>;
766
771
  fetchMessages(): Promise<MessageResponse[]>;
767
772
  startTyping(): void;
768
773
  stopTyping(): void;