@ujet/websdk-headless 6.34.1 → 6.35.0

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
@@ -172,6 +172,8 @@ interface ChatResponse {
172
172
  post_session_opt_in_required?: boolean;
173
173
  post_session_transfer_status?: string;
174
174
  check_in_status?: CheckInStatus;
175
+ /** Whether a task virtual agent is active on the chat; only on the single-chat read, and absent on older servers. */
176
+ task_virtual_agent_active?: boolean | undefined;
175
177
  }
176
178
  interface CallApiResponse {
177
179
  created_at: string;
@@ -808,6 +810,8 @@ interface ChatHooks {
808
810
  isRiskFlagEnabled?: (flagName: string) => boolean;
809
811
  /** Ownership-checked lookup of a redacted message's original; rejects with `{ status }` on HTTP errors. */
810
812
  fetchMessageOriginal?: (redactionRef: number) => Promise<ChatMessageOriginalResponse>;
813
+ /** The server's current task-VA state for this chat; undefined when the server does not report it. */
814
+ fetchTaskVaActive?: (() => Promise<boolean | undefined>) | undefined;
811
815
  }
812
816
  declare class Chat {
813
817
  private provider;
@@ -833,7 +837,11 @@ declare class Chat {
833
837
  private sendTrackingReleased;
834
838
  private newestSid;
835
839
  private sendFloors;
840
+ private sentAwaitingEcho;
841
+ private pairedEchoIds;
836
842
  private sentFiles;
843
+ private taskStateResync;
844
+ private readonly onTaskStateSignal;
837
845
  constructor(state: ChatResponse, issueChatToken: IssueChatTokenMethod, hooks?: ChatHooks, providerContext?: ProviderContext);
838
846
  private handleConnectionEnded;
839
847
  private endConnection;
@@ -907,6 +915,14 @@ declare class Chat {
907
915
  * The echo is given that send's client_message_id, so listeners pair it by id as the SDK did.
908
916
  */
909
917
  private settleOwnEcho;
918
+ /**
919
+ * An own echo without the id that comes after its send was reported `sent` (the ack came first, or release()
920
+ * ended it) gets that send's id too, by the same checks, so listeners still pair it by id.
921
+ */
922
+ private pairLateEcho;
923
+ private givePairedId;
924
+ private awaitEcho;
925
+ private forgetSent;
910
926
  /** Whether the message was published after this send was queued. With nothing seen before the send, any is. */
911
927
  private isAfterSend;
912
928
  private noteSid;
@@ -951,6 +967,7 @@ declare class Chat {
951
967
  stopTyping(): void;
952
968
  saveMedia(index: AttachmentKey, file: File): void;
953
969
  destroy(): Promise<void>;
970
+ private startTaskStateResync;
954
971
  clearMediaStore(): Promise<void>;
955
972
  private triggerEvent;
956
973
  private registerProviderEvents;