@marketrix.ai/widget 3.8.314 → 3.8.333

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.
@@ -1,31 +1,14 @@
1
- /** Real-time RRWeb recording; batched events POSTed to the API widget-message endpoint. */
2
1
  export declare class RrwebSessionRecorder {
3
- private eventQueue;
4
- private estimatedQueueBytes;
5
- private sessionId;
2
+ private readonly chatId;
3
+ private readonly applicationId;
4
+ private events;
5
+ private readonly sessionId;
6
6
  private stopRecording;
7
- private isRecording;
8
- private chatId;
9
- private applicationId;
10
- private metadataSent;
11
- private startPromise;
12
- private stopRequested;
13
7
  private flushTimer;
14
- private consecutiveFailures;
15
- private isFlushing;
8
+ private flushPromise;
16
9
  constructor(chatId: string, applicationId: number);
17
- private metadataEmit;
18
- private bufferEvent;
19
- /**
20
- * POST buffered events (batch capped at MAX_BATCH_BYTES). Transient errors (5xx/network) re-queue
21
- * up to MAX_CONSECUTIVE_FAILURES; permanent errors (4xx) drop immediately (a retry never succeeds).
22
- */
23
- private flush;
24
- /** Concurrent-call safe — returns the in-flight startPromise. */
25
10
  start(): Promise<void>;
26
- /** Rechecks stopRequested at each async boundary so a mid-startup stop aborts cleanly. */
27
- private doStart;
28
11
  stop(): void;
29
- getSessionId(): string;
30
- isActive(): boolean;
12
+ private buffer;
13
+ private flush;
31
14
  }
@@ -35,7 +35,6 @@ declare class StorageService {
35
35
  private isValidChatId;
36
36
  /** window.name takes priority over localStorage — it persists across page navigations. */
37
37
  getChatId(): string | null;
38
- /** Dispatches a 'marketrix:chatid' event so other services (e.g. RrwebSessionRecorder) can react. */
39
38
  setChatId(chatId: string | null): void;
40
39
  getMessages(): StoredMessage[];
41
40
  setMessages(messages: StoredMessage[]): void;
@@ -21,12 +21,14 @@ export declare class StreamClient {
21
21
  private config?;
22
22
  private connectionId;
23
23
  private readonly tabId;
24
+ private registrationWaiters;
24
25
  private constructor();
25
26
  static getInstance(): StreamClient;
26
27
  addCallbacks(callbacks: StreamClientCallbacks): void;
27
28
  removeCallbacks(callbacks: StreamClientCallbacks): void;
28
29
  getStatus(): StreamStatus;
29
30
  isConnected(): boolean;
31
+ waitUntilRegistered(): Promise<void>;
30
32
  connect(chatId: string, config?: {
31
33
  mtxId?: string;
32
34
  mtxKey?: string;