@syntrologie/adapt-chatbot 2.52.0 → 2.53.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.
@@ -22,6 +22,31 @@ export type Call = {
22
22
  */
23
23
  export declare const calls: Call[];
24
24
  export declare function jsonResponse(status: number, body: unknown): Response;
25
- /** Mocked network: public config, first send (mints identity), search. */
25
+ export interface LcFakeMessage {
26
+ id: string;
27
+ body: string;
28
+ direction: 'inbound' | 'outbound';
29
+ dateAdded: string;
30
+ messageType: number;
31
+ }
32
+ /**
33
+ * The fake conversation store behind the default `send` and `search`
34
+ * handlers. Chronological, oldest first — `search` derives the wire order
35
+ * (newest-first) from it, the way the real endpoint does. NOT reset by
36
+ * `stubFetch` (tests re-stub mid-flow without losing the thread); reset it
37
+ * in your `beforeEach`.
38
+ */
39
+ export declare const lcServer: {
40
+ messages: LcFakeMessage[];
41
+ reset(): void;
42
+ /** A message the visitor sent (what the default send handler appends). */
43
+ addVisitor(body: string): LcFakeMessage;
44
+ /** A staff reply landing on the conversation from the GHL inbox side. */
45
+ addStaff(body: string): LcFakeMessage;
46
+ /** The live-verified search contract (see module doc). */
47
+ search(url: string): Response;
48
+ };
49
+ /** Mocked network: public config, send (appends to `lcServer` and mints the
50
+ * identity), search (the behavioral fake above). */
26
51
  export declare function stubFetch(overrides?: Partial<Record<'config' | 'send' | 'search', () => Response>>): void;
27
52
  //# sourceMappingURL=lc-fetch-stub.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lc-fetch-stub.d.ts","sourceRoot":"","sources":["../../../src/support-chat/__tests__/lc-fetch-stub.ts"],"names":[],"mappings":"AAcA;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAC/C,2DAA2D;AAC3D,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAEnD,MAAM,MAAM,IAAI,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,WAAW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D,wBAAgB,SAAS,CACvB,SAAS,GAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,GAAG,MAAM,GAAG,QAAQ,EAAE,MAAM,QAAQ,CAAC,CAAM,GAC5E,IAAI,CAmCN"}
@@ -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;AAWD,UAAU,QAAQ;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAwMD,eAAO,MAAM,mBAAmB,EAAE,iBAAiB,GAAG;IAAE,SAAS,CAAC,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAA;CA0CnF,CAAC;AAEF,wBAAgB,2BAA2B,IAAI,IAAI,CAElD"}
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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syntrologie/adapt-chatbot",
3
- "version": "2.52.0",
3
+ "version": "2.53.0",
4
4
  "description": "Adaptive Chatbot - AI chat assistant widget with action execution",
5
5
  "license": "Proprietary",
6
6
  "private": false,