goji-search 3.0.4 → 3.0.6

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.
Files changed (40) hide show
  1. package/README.md +4 -0
  2. package/dist/__tests__/integration.test.d.ts +1 -0
  3. package/dist/__tests__/new-features-e2e.test.d.ts +7 -0
  4. package/dist/goji-search/assets/chat-logo.png +0 -0
  5. package/dist/goji-search/components/__tests__/goji-search-component.test.d.ts +1 -0
  6. package/dist/goji-search/components/elements/__tests__/choice-bubbles.test.d.ts +1 -0
  7. package/dist/goji-search/components/elements/__tests__/deep-analysis-card.test.d.ts +1 -0
  8. package/dist/goji-search/components/elements/__tests__/email-input-box.test.d.ts +1 -0
  9. package/dist/goji-search/components/elements/__tests__/expandable-section.test.d.ts +1 -0
  10. package/dist/goji-search/components/elements/__tests__/message-list.test.d.ts +1 -0
  11. package/dist/goji-search/components/elements/__tests__/roi-calculator-card.test.d.ts +1 -0
  12. package/dist/goji-search/components/elements/__tests__/slide-panel.test.d.ts +1 -0
  13. package/dist/goji-search/components/elements/action-buttons.d.ts +1 -4
  14. package/dist/goji-search/components/elements/calendar-integration.d.ts +1 -1
  15. package/dist/goji-search/components/elements/deep-analysis-card.d.ts +4 -4
  16. package/dist/goji-search/components/elements/email-input-box.d.ts +6 -4
  17. package/dist/goji-search/components/elements/expandable-section.d.ts +2 -1
  18. package/dist/goji-search/components/elements/help-actions-row.d.ts +15 -0
  19. package/dist/goji-search/components/elements/inspiration-menu.d.ts +2 -2
  20. package/dist/goji-search/components/elements/message-list.d.ts +18 -13
  21. package/dist/goji-search/components/elements/roi-calculator-card.d.ts +9 -0
  22. package/dist/goji-search/components/elements/search-input.d.ts +1 -1
  23. package/dist/goji-search/components/goji-search-component.d.ts +8 -12
  24. package/dist/goji-search/config/company.d.ts +6 -0
  25. package/dist/goji-search/hooks/__tests__/useCompanyTheme.test.d.ts +1 -0
  26. package/dist/goji-search/hooks/__tests__/useIdleReengagement.test.d.ts +1 -0
  27. package/dist/goji-search/hooks/__tests__/useReturningVisitor.test.d.ts +1 -0
  28. package/dist/goji-search/hooks/useChatStream.d.ts +14 -7
  29. package/dist/goji-search/hooks/useCompanyTheme.d.ts +16 -1
  30. package/dist/goji-search/lib/__tests__/goji-client.test.d.ts +1 -0
  31. package/dist/goji-search/lib/__tests__/utm-capture.test.d.ts +1 -0
  32. package/dist/goji-search/lib/__tests__/visitor-id.test.d.ts +1 -0
  33. package/dist/goji-search/lib/calendar-config.d.ts +1 -1
  34. package/dist/goji-search/lib/formula-parser.d.ts +17 -0
  35. package/dist/goji-search/lib/goji-client.d.ts +39 -2
  36. package/dist/index.js +6468 -5768
  37. package/dist/web-component.d.ts +6 -1
  38. package/dist/widget.js +168 -332
  39. package/package.json +1 -1
  40. package/dist/goji-search/components/elements/deep-analysis-modal.d.ts +0 -9
package/README.md CHANGED
@@ -94,6 +94,10 @@ npm run test:coverage # Run tests with coverage
94
94
 
95
95
  ## Documentation
96
96
 
97
+ See [docs/README.md](./docs/README.md) for the frontend documentation index.
98
+
97
99
  See [USAGE.md](./USAGE.md) for detailed documentation, advanced usage, and API reference.
98
100
 
101
+ See [docs/FRONTEND_STATE_AND_TRANSPORT_MAP.md](./docs/FRONTEND_STATE_AND_TRANSPORT_MAP.md) for the widget architecture map, state ownership, and backend transport contract.
102
+
99
103
  See [CHANGELOG.md](./CHANGELOG.md) for version history.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * End-to-End Integration Tests for New Features
3
+ *
4
+ * Tests the complete flow of each new feature to ensure they work
5
+ * correctly in realistic scenarios.
6
+ */
7
+ export {};
@@ -7,10 +7,7 @@ interface ActionButtonsProps {
7
7
  hideCalendar?: boolean;
8
8
  onSubmit: () => void;
9
9
  onVoiceSearch: () => void;
10
- onClose: () => void;
11
10
  onCalendarClick: () => void;
12
- showBookACall?: boolean;
13
11
  }
14
- export declare function ActionButtons({ size, isHovered, isStreaming, searchQuery, isRecording, hideCalendar, onSubmit, onVoiceSearch, onClose, onCalendarClick, // Added calendar click handler
15
- showBookACall, }: ActionButtonsProps): import("react/jsx-runtime").JSX.Element | null;
12
+ export declare function ActionButtons({ size, isHovered, isStreaming, searchQuery, isRecording, hideCalendar, onSubmit, onVoiceSearch, onCalendarClick, }: ActionButtonsProps): import("react/jsx-runtime").JSX.Element | null;
16
13
  export {};
@@ -2,5 +2,5 @@ interface CalendarIntegrationProps {
2
2
  calLink?: string;
3
3
  onBooked?: () => void;
4
4
  }
5
- export default function CalendarIntegration(props?: CalendarIntegrationProps): import("react/jsx-runtime").JSX.Element;
5
+ export default function CalendarIntegration({ calLink, onBooked, }?: CalendarIntegrationProps): import("react/jsx-runtime").JSX.Element;
6
6
  export {};
@@ -1,4 +1,4 @@
1
- export type AnalysisType = "roi" | "comparison" | "cost_breakdown" | "key_metrics";
1
+ export type AnalysisType = "roi" | "comparison";
2
2
  export type ConfidenceLevel = "high" | "medium" | "low";
3
3
  export interface DeepAnalysisData {
4
4
  analysis_type: AnalysisType;
@@ -8,9 +8,9 @@ export interface DeepAnalysisData {
8
8
  generated_at?: number;
9
9
  }
10
10
  export interface DeepAnalysisCardProps {
11
- analysisType: AnalysisType;
11
+ analysisType: AnalysisType | string;
12
12
  data?: DeepAnalysisData;
13
13
  isLoading?: boolean;
14
- onClick?: () => void;
14
+ onCollapse?: () => void;
15
15
  }
16
- export declare function DeepAnalysisCard({ analysisType, data, isLoading, onClick, }: DeepAnalysisCardProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare function DeepAnalysisCard({ analysisType, data, isLoading, onCollapse, }: DeepAnalysisCardProps): import("react/jsx-runtime").JSX.Element | null;
@@ -4,20 +4,22 @@
4
4
  * Displays a dedicated email input box when the backend requests email collection.
5
5
  * - Appears below follow-up questions (after ClosingCard if present)
6
6
  * - Includes email validation
7
- * - Animated entrance/exit
7
+ * - Animated entrance
8
8
  * - Respects localized prompt text from backend
9
+ *
10
+ * Lifecycle is controlled by the parent via mount/unmount (currentEmailRequest state).
9
11
  */
10
12
  interface EmailInputBoxProps {
11
13
  /** Localized prompt text from backend */
12
14
  promptText: string;
13
- /** Session ID for submission */
14
- sessionId?: string;
15
15
  /** Callback when email is submitted */
16
16
  onSubmit: (email: string) => Promise<void>;
17
17
  /** Callback when user dismisses the box */
18
18
  onDismiss?: () => void;
19
19
  /** Additional CSS class */
20
20
  className?: string;
21
+ /** Session ID for tracking */
22
+ sessionId?: string;
21
23
  }
22
- export declare function EmailInputBox({ promptText, sessionId, onSubmit, onDismiss, className, }: EmailInputBoxProps): import("react/jsx-runtime").JSX.Element | null;
24
+ export declare function EmailInputBox({ promptText, onSubmit, onDismiss, className, sessionId, }: EmailInputBoxProps): import("react/jsx-runtime").JSX.Element | null;
23
25
  export {};
@@ -2,6 +2,7 @@ interface ExpandableSectionProps {
2
2
  title: string;
3
3
  children: React.ReactNode;
4
4
  defaultExpanded?: boolean;
5
+ isLoading?: boolean;
5
6
  }
6
- export declare function ExpandableSection({ title, children, defaultExpanded }: ExpandableSectionProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function ExpandableSection({ title, children, defaultExpanded, isLoading, }: ExpandableSectionProps): import("react/jsx-runtime").JSX.Element;
7
8
  export {};
@@ -0,0 +1,15 @@
1
+ import type { HelpAction } from "../../lib/goji-client";
2
+ interface HelpActionsRowProps {
3
+ actions: HelpAction[];
4
+ heading?: string;
5
+ disabled?: boolean;
6
+ onActionClick?: (action: HelpAction) => void;
7
+ }
8
+ interface HelpActionChipProps {
9
+ action: HelpAction;
10
+ disabled?: boolean;
11
+ onActionClick?: (action: HelpAction) => void;
12
+ }
13
+ export declare function HelpActionChip({ action, disabled, onActionClick, }: HelpActionChipProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function HelpActionsRow({ actions, heading, disabled, onActionClick, }: HelpActionsRowProps): import("react/jsx-runtime").JSX.Element | null;
15
+ export {};
@@ -3,12 +3,12 @@ interface InspirationMenuProps {
3
3
  onQuestionClick: (question: string) => void;
4
4
  onClose: () => void;
5
5
  suggestedLabel?: string;
6
+ color?: string;
6
7
  showLanguageSelector?: boolean;
7
8
  supportedLanguages?: string[];
8
9
  currentLanguage?: string;
9
10
  onLanguageChange?: (lang: string) => void;
10
11
  languageLabels?: Record<string, string>;
11
- color?: string;
12
12
  }
13
- export declare function InspirationMenu({ questions, onQuestionClick, onClose, suggestedLabel, showLanguageSelector, supportedLanguages, currentLanguage, onLanguageChange, languageLabels, color }: InspirationMenuProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function InspirationMenu({ questions, onQuestionClick, onClose, suggestedLabel, color, showLanguageSelector, supportedLanguages, currentLanguage, onLanguageChange, languageLabels, }: InspirationMenuProps): import("react/jsx-runtime").JSX.Element;
14
14
  export {};
@@ -1,4 +1,4 @@
1
- import { DeepAnalysis, PendingAnalysis } from "../../lib/goji-client";
1
+ import type { HelpAction, ROICalculatorConfig } from "../../lib/goji-client";
2
2
  interface ChatSource {
3
3
  index: number;
4
4
  url: string;
@@ -17,14 +17,11 @@ interface Message {
17
17
  choicesSelected?: boolean;
18
18
  choicesVariant?: "default" | "faded" | "dark";
19
19
  choiceMode?: "send" | "action";
20
- deepAnalysis?: {
21
- current?: DeepAnalysis;
22
- pending?: PendingAnalysis;
23
- };
24
- emailRequest?: {
25
- prompt: string;
26
- sessionId?: string;
27
- };
20
+ choicesHidden?: boolean;
21
+ helpActions?: HelpAction[];
22
+ helpActionsSelected?: boolean;
23
+ roiCalculatorConfig?: ROICalculatorConfig;
24
+ roiCalculatorOpen?: boolean;
28
25
  }
29
26
  interface MessageListProps {
30
27
  messages: Message[];
@@ -33,11 +30,19 @@ interface MessageListProps {
33
30
  size?: "m" | "l" | "xl" | "s" | "xs";
34
31
  brandName?: string;
35
32
  onChoiceClick?: (messageIndex: number, choice: string) => void;
36
- onDeepAnalysisClick?: () => void;
37
- onEmailSubmit?: (email: string, sessionId?: string) => Promise<void>;
33
+ onHelpActionClick?: (messageIndex: number, action: HelpAction) => void;
34
+ onRoiOpenClick?: (messageIndex: number) => void;
35
+ helpActionsHeading?: string;
36
+ roiSuggestionLabel?: string;
37
+ roiSuggestionPrompt?: string;
38
+ roiOpenLabel?: string;
39
+ roiOpenPrompt?: string;
40
+ roiCalculatorTitle?: string;
41
+ roiEstimatedResultLabel?: string;
42
+ roiLocale?: string;
38
43
  userMessageBackgroundColor?: string;
39
- aiColor?: string;
40
44
  showLogo?: boolean;
45
+ aiColor?: string;
41
46
  }
42
- export declare function MessageList({ messages, isStreaming, aiAvatarSrc, size, brandName, onChoiceClick, onDeepAnalysisClick, onEmailSubmit, userMessageBackgroundColor, aiColor, showLogo, }: MessageListProps): import("react/jsx-runtime").JSX.Element;
47
+ export declare function MessageList({ messages, isStreaming, aiAvatarSrc, size, brandName, onChoiceClick, onHelpActionClick, onRoiOpenClick, helpActionsHeading, roiSuggestionLabel, roiSuggestionPrompt, roiOpenLabel, roiOpenPrompt, roiCalculatorTitle, roiEstimatedResultLabel, roiLocale, userMessageBackgroundColor, showLogo, aiColor, }: MessageListProps): import("react/jsx-runtime").JSX.Element;
43
48
  export {};
@@ -0,0 +1,9 @@
1
+ import type { ROICalculatorConfig } from "../../lib/goji-client";
2
+ export interface ROICalculatorCardProps {
3
+ config: ROICalculatorConfig;
4
+ title?: string;
5
+ estimatedResultLabel?: string;
6
+ locale?: string;
7
+ initiallyExpanded?: boolean;
8
+ }
9
+ export declare function ROICalculatorCard({ config, title, estimatedResultLabel, locale, initiallyExpanded, }: ROICalculatorCardProps): import("react/jsx-runtime").JSX.Element;
@@ -20,5 +20,5 @@ interface SearchInputProps {
20
20
  forceMenuOpenToken?: number;
21
21
  color?: string;
22
22
  }
23
- export declare function SearchInput({ value, onChange, onFocus, onBlur, placeholder, size, setSize, inputRef, inspirationQuestions, onInspirationClick, sparkleRef, suggestedLabel, showLanguageSelector, supportedLanguages, currentLanguage, onLanguageChange, languageLabels, forceMenuOpenToken, color }: SearchInputProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function SearchInput({ value, onChange, onFocus, onBlur, placeholder, size, setSize, inputRef, inspirationQuestions, onInspirationClick, sparkleRef, suggestedLabel, showLanguageSelector, supportedLanguages, currentLanguage, onLanguageChange, languageLabels, forceMenuOpenToken, color, }: SearchInputProps): import("react/jsx-runtime").JSX.Element;
24
24
  export {};
@@ -27,21 +27,17 @@ export interface GojiSearchComponentProps {
27
27
  * @example "#E8E8FF"
28
28
  */
29
29
  userMessageBackgroundColor?: string;
30
- /**
31
- * Widget position on the horizontal axis.
32
- * - "left": anchored to the left side
33
- * - "center": centered (default)
34
- * - "right": anchored to the right side
35
- */
30
+ /** Widget horizontal position */
36
31
  position?: "left" | "center" | "right";
37
- /**
38
- * If set to "left" or "right", the widget will "merge" into that edge
39
- * by the given fraction of its own width. Value between 0 and 0.5.
40
- * Example: `mergeAmount={0.2}` will shift the widget 20% off-screen.
41
- */
32
+ /** Merge widget into a page edge */
42
33
  mergeFrom?: "left" | "right" | null;
34
+ /** How much to merge (0 to 0.5) */
43
35
  mergeAmount?: number;
36
+ /** Show "Book a call" button */
44
37
  showBookACall?: boolean;
38
+ /** Show AI logo in messages */
45
39
  showLogo?: boolean;
40
+ /** Link to logo */
41
+ logoUrl?: string;
46
42
  }
47
- export declare function GojiSearchComponent({ apiUrl, companyId, apiKey, aiColor, userMessageBackgroundColor, position, mergeFrom, mergeAmount, showBookACall, showLogo }: GojiSearchComponentProps): import("react/jsx-runtime").JSX.Element;
43
+ export declare function GojiSearchComponent({ apiUrl, companyId, apiKey, aiColor, userMessageBackgroundColor, position, mergeFrom, mergeAmount, showBookACall, showLogo, logoUrl }: GojiSearchComponentProps): import("react/jsx-runtime").JSX.Element;
@@ -19,6 +19,12 @@ interface LanguageConfig {
19
19
  bookDemoDialogDescription: string;
20
20
  errorMessage: string;
21
21
  suggested: string;
22
+ roiChipLabel: string;
23
+ roiSuggestionPrompt: string;
24
+ roiOpenButtonLabel: string;
25
+ roiOpenPrompt: string;
26
+ roiCalculatorTitle: string;
27
+ roiEstimatedResult: string;
22
28
  }
23
29
  export declare const companyConfig: {
24
30
  brandName: string;
@@ -1,4 +1,4 @@
1
- import type { GojiSearchClient, ChatSource, CTACard, EmailRequest, DeepAnalysis, PendingAnalysis, VisualSlide } from "../lib/goji-client";
1
+ import type { GojiSearchClient, ChatSource, CTACard, EmailRequest, DeepAnalysis, HelpAction, PendingAnalysis, VisualSlide, ROICalculatorConfig, SupportModeInfo } from "../lib/goji-client";
2
2
  import type { VisitorContext } from "../lib/utm-capture";
3
3
  export interface Message {
4
4
  role: "user" | "assistant";
@@ -11,18 +11,23 @@ export interface Message {
11
11
  choicesSelected?: boolean;
12
12
  choicesVariant?: "default" | "faded" | "dark";
13
13
  choiceMode?: "send" | "action";
14
+ choicesHidden?: boolean;
15
+ helpActions?: HelpAction[];
16
+ helpActionsSelected?: boolean;
14
17
  emailToken?: string;
15
- deepAnalysis?: {
16
- current?: DeepAnalysis;
17
- pending?: PendingAnalysis;
18
- };
18
+ roiCalculatorConfig?: ROICalculatorConfig;
19
+ roiCalculatorOpen?: boolean;
20
+ supportMode?: SupportModeInfo;
19
21
  }
20
22
  export interface UseChatStreamOptions {
21
23
  client: GojiSearchClient;
22
24
  visitorId: string | undefined;
23
25
  companyId: string;
24
26
  supportedLanguages: string[];
27
+ supportContactCtaLabel?: string;
28
+ supportContactQuestion?: string;
25
29
  onLanguageDetected?: (lang: string) => void;
30
+ onStreamingStart?: () => void;
26
31
  onResponseComplete?: () => void;
27
32
  resetIdleTimerRef: React.MutableRefObject<() => void>;
28
33
  }
@@ -45,8 +50,10 @@ export interface UseChatStreamReturn {
45
50
  backendSuggestedQuestions: string[] | null;
46
51
  setBackendSuggestedQuestions: React.Dispatch<React.SetStateAction<string[] | null>>;
47
52
  streamingCancelRef: React.MutableRefObject<(() => void) | null>;
48
- sendMessage: (message: string, language: string, visitorContext: VisitorContext | undefined, options?: {
53
+ sendMessage: (message: string, language: string | undefined, visitorContext: VisitorContext | undefined, options?: {
49
54
  preAction?: () => void;
55
+ helpActionId?: string;
56
+ helpActionDetail?: string;
50
57
  }) => Promise<void>;
51
58
  }
52
- export declare function useChatStream({ client, visitorId, companyId, supportedLanguages, onLanguageDetected, onResponseComplete, resetIdleTimerRef, }: UseChatStreamOptions): UseChatStreamReturn;
59
+ export declare function useChatStream({ client, visitorId, companyId, supportedLanguages, supportContactCtaLabel, supportContactQuestion, onLanguageDetected, onStreamingStart, onResponseComplete, resetIdleTimerRef, }: UseChatStreamOptions): UseChatStreamReturn;
@@ -17,6 +17,21 @@ interface CompanyTheme {
17
17
  default: string;
18
18
  };
19
19
  calendar_link?: string;
20
+ roi_calculator?: {
21
+ enabled: boolean;
22
+ currency: string;
23
+ inputs: Array<{
24
+ id: string;
25
+ label: string;
26
+ type: "number" | "percent" | "currency";
27
+ default: number;
28
+ min: number;
29
+ max: number;
30
+ step: number;
31
+ }>;
32
+ formula: string;
33
+ output_template: string;
34
+ };
20
35
  }
21
36
  export interface ThemeCSSVars {
22
37
  '--brand-color': string;
@@ -26,7 +41,7 @@ export interface ThemeCSSVars {
26
41
  '--brand-color-rgb': string;
27
42
  '--brand-color-dark-rgb': string;
28
43
  }
29
- export declare function useCompanyTheme(apiUrl: string, companyId: string, apiKey: string): {
44
+ export declare function useCompanyTheme(apiUrl: string, companyId: string, apiKey: string, language?: string): {
30
45
  theme: CompanyTheme | null;
31
46
  cssVars: ThemeCSSVars | null;
32
47
  loading: boolean;
@@ -3,7 +3,7 @@ export interface CalendarConfig {
3
3
  link: string;
4
4
  namespace?: string;
5
5
  theme?: "light" | "dark";
6
- layout?: "month_view" | "week_view" | "agenda";
6
+ layout?: "month_view" | "week_view" | "column_view";
7
7
  }
8
8
  export declare const calendarConfig: CalendarConfig;
9
9
  export declare function getCalendarConfig(): CalendarConfig;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Safe formula parser — recursive descent, no eval().
3
+ *
4
+ * Supports: numbers, +, -, *, /, parentheses, variable names.
5
+ * Variables are substituted from a Record<string, number>.
6
+ * Rejects unknown tokens or unresolved variables.
7
+ *
8
+ * Grammar:
9
+ * expr → term (('+' | '-') term)*
10
+ * term → factor (('*' | '/') factor)*
11
+ * factor → NUMBER | VARIABLE | '(' expr ')'
12
+ */
13
+ /**
14
+ * Evaluate a formula string with variable substitution.
15
+ * Returns the computed number, or null if the formula is invalid.
16
+ */
17
+ export declare function evaluateFormula(formula: string, vars: Record<string, number>): number | null;
@@ -35,8 +35,25 @@ export interface EmailRequest {
35
35
  reason: string;
36
36
  email_token?: string;
37
37
  }
38
+ /** ROI Calculator types */
39
+ export interface ROICalculatorInput {
40
+ id: string;
41
+ label: string;
42
+ type: "number" | "percent" | "currency";
43
+ default: number;
44
+ min: number;
45
+ max: number;
46
+ step: number;
47
+ }
48
+ export interface ROICalculatorConfig {
49
+ enabled: boolean;
50
+ currency: string;
51
+ inputs: ROICalculatorInput[];
52
+ formula: string;
53
+ output_template: string;
54
+ }
38
55
  /** Deep analysis types */
39
- export type DeepAnalysisType = "roi" | "comparison" | "cost_breakdown" | "key_metrics";
56
+ export type DeepAnalysisType = "roi" | "comparison";
40
57
  export type ConfidenceLevel = "high" | "medium" | "low";
41
58
  /** Deep analysis data from backend */
42
59
  export interface DeepAnalysis {
@@ -53,6 +70,14 @@ export interface PendingAnalysis {
53
70
  session_id: string;
54
71
  analysis_id?: string;
55
72
  }
73
+ export interface HelpAction {
74
+ id: string;
75
+ category: string;
76
+ label: string;
77
+ icon: string;
78
+ detail?: string;
79
+ subtitle?: string;
80
+ }
56
81
  /** Returning visitor context from backend */
57
82
  export interface ReturningVisitorContext {
58
83
  visitor_id: string;
@@ -86,6 +111,7 @@ export interface ChatResponse {
86
111
  session_id: string;
87
112
  answer: string;
88
113
  sources: ChatSource[];
114
+ help_actions?: HelpAction[];
89
115
  email_token?: string;
90
116
  suggested_questions?: string[];
91
117
  cta_card?: CTACard;
@@ -94,6 +120,7 @@ export interface ChatResponse {
94
120
  visual_slides?: VisualSlide[];
95
121
  request_email?: EmailRequest;
96
122
  pending_analysis?: PendingAnalysis;
123
+ roi_calculator?: ROICalculatorConfig;
97
124
  choices?: string[];
98
125
  choices_variant?: "default" | "faded" | "dark";
99
126
  choice_mode?: "send" | "action";
@@ -110,6 +137,7 @@ export interface StreamDoneMessage {
110
137
  session_id: string;
111
138
  answer: string;
112
139
  sources: ChatSource[];
140
+ help_actions?: HelpAction[];
113
141
  email_token?: string;
114
142
  suggested_questions?: string[];
115
143
  cta_card?: CTACard;
@@ -118,6 +146,7 @@ export interface StreamDoneMessage {
118
146
  visual_slides?: VisualSlide[];
119
147
  request_email?: EmailRequest;
120
148
  pending_analysis?: PendingAnalysis;
149
+ roi_calculator?: ROICalculatorConfig;
121
150
  choices?: string[];
122
151
  choices_variant?: "default" | "faded" | "dark";
123
152
  choice_mode?: "send" | "action";
@@ -225,6 +254,8 @@ export declare class GojiSearchClient {
225
254
  */
226
255
  chat(params: {
227
256
  message: string;
257
+ helpActionId?: string;
258
+ helpActionDetail?: string;
228
259
  sessionId?: string;
229
260
  visitorId?: string;
230
261
  language?: string;
@@ -236,6 +267,8 @@ export declare class GojiSearchClient {
236
267
  */
237
268
  streamChat(params: {
238
269
  message: string;
270
+ helpActionId?: string;
271
+ helpActionDetail?: string;
239
272
  sessionId?: string;
240
273
  visitorId?: string;
241
274
  language?: string;
@@ -336,4 +369,8 @@ export declare class GojiSearchClient {
336
369
  * ```
337
370
  */
338
371
  export declare function createGojiClient(apiUrl?: string, apiKey?: string): GojiSearchClient;
339
- export declare function getGojiClient(): GojiSearchClient;
372
+ /**
373
+ * Default client instance for convenience (points to localhost)
374
+ * For production use, create your own instance with createGojiClient()
375
+ */
376
+ export declare const gojiClient: GojiSearchClient;