@syntrologie/adapt-chatbot 2.52.0 → 2.54.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/AdaptiveChatBarMountable.d.ts.map +1 -1
- package/dist/LeaveAMessageLit.d.ts +68 -9
- package/dist/LeaveAMessageLit.d.ts.map +1 -1
- package/dist/findSmartCanvas.d.ts +19 -0
- package/dist/findSmartCanvas.d.ts.map +1 -0
- package/dist/runtime.js +729 -456
- package/dist/runtime.js.map +4 -4
- package/dist/schema.d.ts +72 -4
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +17 -0
- package/dist/schema.js.map +2 -2
- package/dist/support-chat/__tests__/lc-fetch-stub.d.ts +26 -1
- package/dist/support-chat/__tests__/lc-fetch-stub.d.ts.map +1 -1
- package/dist/support-chat/boot.d.ts +35 -3
- package/dist/support-chat/boot.d.ts.map +1 -1
- package/dist/support-chat/inbox.d.ts +57 -0
- package/dist/support-chat/inbox.d.ts.map +1 -0
- package/dist/support-chat/inbox.test.d.ts +2 -0
- package/dist/support-chat/inbox.test.d.ts.map +1 -0
- package/dist/support-chat/leadconnector.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type SupportChatInboxConfig } from './boot';
|
|
2
|
+
import type { SupportChatBridge } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Page-level inbox for the site's support-chat vendor (BUG-1789078665).
|
|
5
|
+
*
|
|
6
|
+
* The handoff card (`adaptive-chatbot:leave-a-message`) owns the thread
|
|
7
|
+
* while it is mounted and listening. Every other moment — the vendor's own
|
|
8
|
+
* proactive trigger firing before anyone asked for a human, a reply landing
|
|
9
|
+
* after navigation tore the card down — a team message would otherwise
|
|
10
|
+
* vanish behind a hidden vendor bubble. This listener, wired once at
|
|
11
|
+
* chat-bar boot, catches those messages and:
|
|
12
|
+
*
|
|
13
|
+
* 1. hands them to a mounted card that is not yet listening;
|
|
14
|
+
* 2. otherwise writes them into the SAME persisted thread the card
|
|
15
|
+
* hydrates from, and announces them through the canvas with the
|
|
16
|
+
* workspace's words and the message itself as the body;
|
|
17
|
+
* 3. on tap, mounts the workspace's leave-a-message template locally,
|
|
18
|
+
* opened on the thread, so the visitor reads and replies in place.
|
|
19
|
+
*/
|
|
20
|
+
export declare const LEAVE_A_MESSAGE_WIDGET_ID = "adaptive-chatbot:leave-a-message";
|
|
21
|
+
/** Instance id of the locally mounted thread card. */
|
|
22
|
+
export declare const SUPPORT_CHAT_INBOX_INSTANCE_ID = "supportchat-inbox";
|
|
23
|
+
export interface SupportChatInboxRuntime {
|
|
24
|
+
events: {
|
|
25
|
+
publish: (name: string, props?: Record<string, unknown>) => void;
|
|
26
|
+
subscribe?: (filter: {
|
|
27
|
+
names?: string[];
|
|
28
|
+
}, cb: (e: {
|
|
29
|
+
name: string;
|
|
30
|
+
props?: Record<string, unknown>;
|
|
31
|
+
}) => void) => () => void;
|
|
32
|
+
};
|
|
33
|
+
state?: {
|
|
34
|
+
ns?: (namespace: string) => {
|
|
35
|
+
get: (key: string) => unknown;
|
|
36
|
+
set: (key: string, value: unknown) => void;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export interface SupportChatInboxOptions {
|
|
41
|
+
bridge: SupportChatBridge;
|
|
42
|
+
inbox: SupportChatInboxConfig | undefined;
|
|
43
|
+
runtime: SupportChatInboxRuntime | undefined;
|
|
44
|
+
/** The chat-bar's `uiTemplates` block — where the leave-a-message
|
|
45
|
+
* template's slot and `default_widget_props` come from. */
|
|
46
|
+
uiTemplates: Record<string, unknown> | undefined;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Wire the inbox for this page. Idempotent per page: a second chat-bar
|
|
50
|
+
* mount (SPA re-render) reuses the first wiring.
|
|
51
|
+
*/
|
|
52
|
+
export declare function wireSupportChatInbox(opts: SupportChatInboxOptions): () => void;
|
|
53
|
+
/** Has this page already wired its inbox? (chat-bar mounts are per-surface). */
|
|
54
|
+
export declare function isSupportChatInboxWired(): boolean;
|
|
55
|
+
/** Test seam: tear down the page's inbox wiring. */
|
|
56
|
+
export declare function _resetSupportChatInboxForTests(): void;
|
|
57
|
+
//# sourceMappingURL=inbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbox.d.ts","sourceRoot":"","sources":["../../src/support-chat/inbox.ts"],"names":[],"mappings":"AAcA,OAAO,EAAsB,KAAK,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;;;;;;;;;;;;;;;;GAgBG;AAEH,eAAO,MAAM,yBAAyB,qCAAqC,CAAC;AAC5E,sDAAsD;AACtD,eAAO,MAAM,8BAA8B,sBAAsB,CAAC;AAElE,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE;QACN,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;QACjE,SAAS,CAAC,EAAE,CACV,MAAM,EAAE;YAAE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;SAAE,EAC5B,EAAE,EAAE,CAAC,CAAC,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;SAAE,KAAK,IAAI,KAC/D,MAAM,IAAI,CAAC;KACjB,CAAC;IACF,KAAK,CAAC,EAAE;QACN,EAAE,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK;YAC1B,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;YAC9B,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;SAC5C,CAAC;KACH,CAAC;CACH;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,KAAK,EAAE,sBAAsB,GAAG,SAAS,CAAC;IAC1C,OAAO,EAAE,uBAAuB,GAAG,SAAS,CAAC;IAC7C;gEAC4D;IAC5D,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;CAClD;AA0BD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,uBAAuB,GAAG,MAAM,IAAI,CAoH9E;AAED,gFAAgF;AAChF,wBAAgB,uBAAuB,IAAI,OAAO,CAEjD;AAED,oDAAoD;AACpD,wBAAgB,8BAA8B,IAAI,IAAI,CAGrD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbox.test.d.ts","sourceRoot":"","sources":["../../src/support-chat/inbox.test.ts"],"names":[],"mappings":"AAGA,OAAO,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leadconnector.d.ts","sourceRoot":"","sources":["../../src/support-chat/leadconnector.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,eAAO,MAAM,WAAW,yCAAyC,CAAC;AAClE,eAAO,MAAM,UAAU,QAAS,CAAC;AAGjC,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAErD;
|
|
1
|
+
{"version":3,"file":"leadconnector.d.ts","sourceRoot":"","sources":["../../src/support-chat/leadconnector.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,eAAO,MAAM,WAAW,yCAAyC,CAAC;AAClE,eAAO,MAAM,UAAU,QAAS,CAAC;AAGjC,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAErD;AAwBD,UAAU,QAAQ;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAmND,eAAO,MAAM,mBAAmB,EAAE,iBAAiB,GAAG;IAAE,SAAS,CAAC,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAA;CA0CnF,CAAC;AAEF,wBAAgB,2BAA2B,IAAI,IAAI,CAElD"}
|