@ujet/websdk-headless 6.34.1 → 6.37.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 +18 -0
- package/dist/index.js +80 -80
- package/dist/index.mjs +7435 -7248
- package/package.json +1 -1
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;
|
|
@@ -929,6 +945,7 @@ declare class Chat {
|
|
|
929
945
|
private settleEndedConnect;
|
|
930
946
|
private localOriginalCacheEnabled;
|
|
931
947
|
private sanitizesInboundPaths;
|
|
948
|
+
private inboundSanitizer;
|
|
932
949
|
/**
|
|
933
950
|
* Joins the original onto `message.unredacted` for the end user's own
|
|
934
951
|
* redacted text: local cache → in-band `unredacted` → (returns true) a
|
|
@@ -951,6 +968,7 @@ declare class Chat {
|
|
|
951
968
|
stopTyping(): void;
|
|
952
969
|
saveMedia(index: AttachmentKey, file: File): void;
|
|
953
970
|
destroy(): Promise<void>;
|
|
971
|
+
private startTaskStateResync;
|
|
954
972
|
clearMediaStore(): Promise<void>;
|
|
955
973
|
private triggerEvent;
|
|
956
974
|
private registerProviderEvents;
|