@gengage/assistant-fe 0.4.19 → 0.4.21
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/api-paths-Bg6iwO5w.js +1250 -0
- package/dist/chat-runtime.js +1 -1
- package/dist/chat.iife.js +17 -17
- package/dist/chat.js +1 -1
- package/dist/{common-Bpp43wr0.js → common-DDJSeQhg.js} +2 -2
- package/dist/common.js +79 -77
- package/dist/{connection-warning-C7ehvQxx.js → connection-warning-BeD-B0Ec.js} +1 -1
- package/dist/{fastIntent-CINRmM8r.js → fastIntent-BeeDIwd2.js} +1 -1
- package/dist/index.js +75 -73
- package/dist/native.iife.js +18 -18
- package/dist/qna-runtime.js +1 -1
- package/dist/qna.iife.js +22 -22
- package/dist/qna.js +1 -1
- package/dist/{runtime-B0hDHRlN.js → runtime-C8ZBidd2.js} +13 -13
- package/dist/{runtime-CLcYqzoA.js → runtime-CRSFPLku.js} +17 -17
- package/dist/{runtime-DhdfOJEN.js → runtime-Ct1qOl8V.js} +855 -848
- package/dist/{simbut-3kqLW3SM.js → simbut-BrAeZ6SH.js} +19 -22
- package/dist/simbut.iife.js +9 -9
- package/dist/simbut.js +1 -1
- package/dist/{simrel-fQg2EIB8.js → simrel-Cha5de6P.js} +1 -1
- package/dist/simrel-runtime.js +1 -1
- package/dist/simrel.iife.js +7 -7
- package/dist/simrel.js +2 -2
- package/dist/{widget-base-bdJaGJYi.js → widget-base-BtBl_PCR.js} +91 -83
- package/package.json +9 -5
- package/dist/api-paths-BX3Lea3A.js +0 -1213
- package/dist/chat/api.d.ts +0 -88
- package/dist/chat/assistant-mode.d.ts +0 -19
- package/dist/chat/attachment-utils.d.ts +0 -9
- package/dist/chat/catalog.d.ts +0 -826
- package/dist/chat/chat-presentation-state.d.ts +0 -53
- package/dist/chat/components/AIGroupingCards.d.ts +0 -3
- package/dist/chat/components/AISuggestedSearchCards.d.ts +0 -3
- package/dist/chat/components/AITopPicks.d.ts +0 -3
- package/dist/chat/components/BeautyPhotoStep.d.ts +0 -16
- package/dist/chat/components/CategoriesContainer.d.ts +0 -3
- package/dist/chat/components/ChatDrawer.d.ts +0 -360
- package/dist/chat/components/ChoicePrompter.d.ts +0 -21
- package/dist/chat/components/ComparisonTable.d.ts +0 -57
- package/dist/chat/components/ConsultingStylePicker.d.ts +0 -34
- package/dist/chat/components/FloatingComparisonButton.d.ts +0 -2
- package/dist/chat/components/FloatingLauncher.d.ts +0 -79
- package/dist/chat/components/GroundingReviewCard.d.ts +0 -3
- package/dist/chat/components/HandoffNotice.d.ts +0 -4
- package/dist/chat/components/KvkkBanner.d.ts +0 -6
- package/dist/chat/components/Launcher.d.ts +0 -28
- package/dist/chat/components/PanelRestoreCard.d.ts +0 -4
- package/dist/chat/components/PanelTopBar.d.ts +0 -32
- package/dist/chat/components/PhotoAnalysisCard.d.ts +0 -20
- package/dist/chat/components/ProductSummaryCard.d.ts +0 -3
- package/dist/chat/components/ProsAndCons.d.ts +0 -8
- package/dist/chat/components/ReviewHighlights.d.ts +0 -9
- package/dist/chat/components/actionClassifier.d.ts +0 -12
- package/dist/chat/components/product-price-layout.d.ts +0 -18
- package/dist/chat/components/productMentionLinker.d.ts +0 -25
- package/dist/chat/components/renderUISpec.d.ts +0 -11
- package/dist/chat/components/typewriter.d.ts +0 -24
- package/dist/chat/extendedModeManager.d.ts +0 -32
- package/dist/chat/features/beauty-consulting/consulting-grid.d.ts +0 -31
- package/dist/chat/features/beauty-consulting/drawer-extensions.d.ts +0 -20
- package/dist/chat/features/beauty-consulting/mode-controller.d.ts +0 -53
- package/dist/chat/features/beauty-consulting/registry.d.ts +0 -3
- package/dist/chat/features/beauty-consulting/stream-handler.d.ts +0 -38
- package/dist/chat/history-storage.d.ts +0 -85
- package/dist/chat/index.d.ts +0 -5
- package/dist/chat/kvkk.d.ts +0 -20
- package/dist/chat/locales/en.d.ts +0 -2
- package/dist/chat/locales/index.d.ts +0 -5
- package/dist/chat/locales/tr.d.ts +0 -2
- package/dist/chat/panel-manager.d.ts +0 -126
- package/dist/chat/runtime.d.ts +0 -399
- package/dist/chat/session-persistence.d.ts +0 -65
- package/dist/chat/stream-error-display.d.ts +0 -6
- package/dist/chat/types.d.ts +0 -543
- package/dist/chat/utils/chat-presentation-debug.d.ts +0 -19
- package/dist/chat/utils/get-chat-scroll-element.d.ts +0 -10
- package/dist/chat/utils/ui.d.ts +0 -10
- package/dist/common/action-router.d.ts +0 -26
- package/dist/common/activity-tracker.d.ts +0 -37
- package/dist/common/analytics-events.d.ts +0 -91
- package/dist/common/analytics.d.ts +0 -61
- package/dist/common/api-paths.d.ts +0 -15
- package/dist/common/client.d.ts +0 -27
- package/dist/common/communication-bridge.d.ts +0 -51
- package/dist/common/config-constants.d.ts +0 -1
- package/dist/common/config-schema.d.ts +0 -81
- package/dist/common/connection-warning.d.ts +0 -8
- package/dist/common/consulting-sources.d.ts +0 -9
- package/dist/common/context.d.ts +0 -27
- package/dist/common/css-escape.d.ts +0 -1
- package/dist/common/customization-factories.d.ts +0 -62
- package/dist/common/debug.d.ts +0 -13
- package/dist/common/events.d.ts +0 -46
- package/dist/common/fastIntent.d.ts +0 -1
- package/dist/common/ga-datalayer.d.ts +0 -89
- package/dist/common/global-error-toast.d.ts +0 -6
- package/dist/common/index.d.ts +0 -49
- package/dist/common/indexed-db.d.ts +0 -79
- package/dist/common/locale.d.ts +0 -1
- package/dist/common/native-webview.d.ts +0 -60
- package/dist/common/navigation.d.ts +0 -5
- package/dist/common/overlay.d.ts +0 -168
- package/dist/common/page-detect.d.ts +0 -30
- package/dist/common/pill-launcher.d.ts +0 -51
- package/dist/common/preflight.d.ts +0 -13
- package/dist/common/price-formatter.d.ts +0 -35
- package/dist/common/product-utils.d.ts +0 -35
- package/dist/common/protocol-adapter.d.ts +0 -105
- package/dist/common/renderer/dom.d.ts +0 -3
- package/dist/common/renderer/index.d.ts +0 -4
- package/dist/common/renderer/overrides.d.ts +0 -23
- package/dist/common/renderer/registry.d.ts +0 -2
- package/dist/common/renderer/types.d.ts +0 -19
- package/dist/common/safe-html.d.ts +0 -22
- package/dist/common/skeleton.d.ts +0 -8
- package/dist/common/streaming.d.ts +0 -37
- package/dist/common/suggested-search-keywords.d.ts +0 -18
- package/dist/common/theme-utils.d.ts +0 -15
- package/dist/common/tts-player.d.ts +0 -13
- package/dist/common/types.d.ts +0 -381
- package/dist/common/ui-theme.d.ts +0 -9
- package/dist/common/uuidv7.d.ts +0 -7
- package/dist/common/voice-input.d.ts +0 -74
- package/dist/common/widget-base.d.ts +0 -97
- package/dist/index.d.ts +0 -25
- package/dist/native/index.d.ts +0 -2
- package/dist/overlay.d.ts +0 -4
- package/dist/qna/api.d.ts +0 -23
- package/dist/qna/catalog.d.ts +0 -73
- package/dist/qna/components/ButtonRow.d.ts +0 -15
- package/dist/qna/components/TextInput.d.ts +0 -11
- package/dist/qna/components/renderUISpec.d.ts +0 -7
- package/dist/qna/index.d.ts +0 -3
- package/dist/qna/locales/en.d.ts +0 -2
- package/dist/qna/locales/index.d.ts +0 -5
- package/dist/qna/locales/tr.d.ts +0 -2
- package/dist/qna/normalize-ui-specs.d.ts +0 -15
- package/dist/qna/runtime.d.ts +0 -62
- package/dist/qna/types.d.ts +0 -98
- package/dist/simbut/index.d.ts +0 -22
- package/dist/simbut/locales.d.ts +0 -3
- package/dist/simbut/types.d.ts +0 -43
- package/dist/simrel/api.d.ts +0 -25
- package/dist/simrel/catalog.d.ts +0 -110
- package/dist/simrel/components/GroupTabs.d.ts +0 -24
- package/dist/simrel/components/ProductCard.d.ts +0 -19
- package/dist/simrel/components/ProductGrid.d.ts +0 -17
- package/dist/simrel/components/renderUISpec.d.ts +0 -7
- package/dist/simrel/index.d.ts +0 -5
- package/dist/simrel/locales/en.d.ts +0 -2
- package/dist/simrel/locales/index.d.ts +0 -5
- package/dist/simrel/locales/tr.d.ts +0 -2
- package/dist/simrel/renderers/default.d.ts +0 -40
- package/dist/simrel/runtime.d.ts +0 -59
- package/dist/simrel/types.d.ts +0 -141
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { AnalyticsInput } from './analytics.js';
|
|
2
|
-
export interface AnalyticsContext {
|
|
3
|
-
account_id: string;
|
|
4
|
-
session_id: string;
|
|
5
|
-
correlation_id: string;
|
|
6
|
-
view_id?: string;
|
|
7
|
-
user_id?: string;
|
|
8
|
-
page_type?: string;
|
|
9
|
-
sku?: string;
|
|
10
|
-
ab_test_variant?: string;
|
|
11
|
-
ab_test_experiment_id?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare function streamStartEvent(ctx: AnalyticsContext, payload: {
|
|
14
|
-
endpoint: string;
|
|
15
|
-
request_id: string;
|
|
16
|
-
widget?: 'chat' | 'qna' | 'simrel';
|
|
17
|
-
}): AnalyticsInput;
|
|
18
|
-
export declare function streamChunkEvent(ctx: AnalyticsContext, payload: {
|
|
19
|
-
request_id: string;
|
|
20
|
-
chunk_index: number;
|
|
21
|
-
latency_ms?: number;
|
|
22
|
-
widget?: 'chat' | 'qna' | 'simrel';
|
|
23
|
-
}): AnalyticsInput;
|
|
24
|
-
export declare function streamUiSpecEvent(ctx: AnalyticsContext, payload: {
|
|
25
|
-
request_id: string;
|
|
26
|
-
chunk_index: number;
|
|
27
|
-
component_type: string;
|
|
28
|
-
widget?: 'chat' | 'qna' | 'simrel';
|
|
29
|
-
}): AnalyticsInput;
|
|
30
|
-
export declare function streamDoneEvent(ctx: AnalyticsContext, payload: {
|
|
31
|
-
request_id: string;
|
|
32
|
-
latency_ms: number;
|
|
33
|
-
chunk_count: number;
|
|
34
|
-
widget?: 'chat' | 'qna' | 'simrel';
|
|
35
|
-
}): AnalyticsInput;
|
|
36
|
-
export declare function streamErrorEvent(ctx: AnalyticsContext, payload: {
|
|
37
|
-
request_id: string;
|
|
38
|
-
error_code: string;
|
|
39
|
-
error_message: string;
|
|
40
|
-
widget?: 'chat' | 'qna' | 'simrel';
|
|
41
|
-
}): AnalyticsInput;
|
|
42
|
-
export declare function llmUsageEvent(ctx: AnalyticsContext, payload: {
|
|
43
|
-
model: string;
|
|
44
|
-
prompt_tokens: number;
|
|
45
|
-
completion_tokens: number;
|
|
46
|
-
total_tokens: number;
|
|
47
|
-
provider?: string;
|
|
48
|
-
}): AnalyticsInput;
|
|
49
|
-
export declare function meteringIncrementEvent(ctx: AnalyticsContext, payload: {
|
|
50
|
-
meter_key: string;
|
|
51
|
-
quantity: number;
|
|
52
|
-
unit: string;
|
|
53
|
-
}): AnalyticsInput;
|
|
54
|
-
export declare function meteringSummaryEvent(ctx: AnalyticsContext, payload: {
|
|
55
|
-
meter_key: string;
|
|
56
|
-
quantity: number;
|
|
57
|
-
unit: string;
|
|
58
|
-
}): AnalyticsInput;
|
|
59
|
-
export declare function chatHistorySnapshotEvent(ctx: AnalyticsContext, payload: {
|
|
60
|
-
message_count: number;
|
|
61
|
-
history_ref: string;
|
|
62
|
-
redaction_level: string;
|
|
63
|
-
}): AnalyticsInput;
|
|
64
|
-
export declare function widgetHistorySnapshotEvent(ctx: AnalyticsContext, payload: {
|
|
65
|
-
message_count: number;
|
|
66
|
-
history_ref: string;
|
|
67
|
-
redaction_level: string;
|
|
68
|
-
widget: 'chat' | 'qna' | 'simrel';
|
|
69
|
-
}): AnalyticsInput;
|
|
70
|
-
export declare function basketAddEvent(ctx: AnalyticsContext, payload: {
|
|
71
|
-
attribution_source: 'chat' | 'qna' | 'simrel';
|
|
72
|
-
attribution_action_id: string;
|
|
73
|
-
cart_value: number;
|
|
74
|
-
currency: string;
|
|
75
|
-
line_items: number;
|
|
76
|
-
sku: string;
|
|
77
|
-
}): AnalyticsInput;
|
|
78
|
-
export declare function checkoutStartEvent(ctx: AnalyticsContext, payload: {
|
|
79
|
-
attribution_source: 'chat' | 'qna' | 'simrel';
|
|
80
|
-
attribution_action_id: string;
|
|
81
|
-
cart_value: number;
|
|
82
|
-
currency: string;
|
|
83
|
-
line_items: number;
|
|
84
|
-
}): AnalyticsInput;
|
|
85
|
-
export declare function checkoutCompleteEvent(ctx: AnalyticsContext, payload: {
|
|
86
|
-
attribution_source: 'chat' | 'qna' | 'simrel';
|
|
87
|
-
attribution_action_id: string;
|
|
88
|
-
cart_value: number;
|
|
89
|
-
currency: string;
|
|
90
|
-
line_items: number;
|
|
91
|
-
}): AnalyticsInput;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { AnalyticsAuthMode } from './config-schema.js';
|
|
2
|
-
export interface AnalyticsEnvelope {
|
|
3
|
-
event_name: string;
|
|
4
|
-
event_version: '1';
|
|
5
|
-
timestamp_ms: number;
|
|
6
|
-
account_id: string;
|
|
7
|
-
session_id: string;
|
|
8
|
-
correlation_id: string;
|
|
9
|
-
view_id?: string;
|
|
10
|
-
user_id?: string;
|
|
11
|
-
widget?: 'chat' | 'qna' | 'simrel';
|
|
12
|
-
page_type?: string;
|
|
13
|
-
sku?: string;
|
|
14
|
-
payload: Record<string, unknown>;
|
|
15
|
-
}
|
|
16
|
-
export interface AnalyticsAuthConfig {
|
|
17
|
-
mode?: AnalyticsAuthMode;
|
|
18
|
-
key?: string;
|
|
19
|
-
headerName?: string;
|
|
20
|
-
bodyField?: string;
|
|
21
|
-
}
|
|
22
|
-
export interface AnalyticsClientConfig {
|
|
23
|
-
enabled?: boolean;
|
|
24
|
-
middlewareUrl: string;
|
|
25
|
-
endpoint?: string;
|
|
26
|
-
auth?: AnalyticsAuthConfig;
|
|
27
|
-
fireAndForget?: boolean;
|
|
28
|
-
useBeacon?: boolean;
|
|
29
|
-
keepaliveFetch?: boolean;
|
|
30
|
-
timeoutMs?: number;
|
|
31
|
-
maxRetries?: number;
|
|
32
|
-
batchSize?: number;
|
|
33
|
-
flushIntervalMs?: number;
|
|
34
|
-
}
|
|
35
|
-
export type AnalyticsInput = Omit<AnalyticsEnvelope, 'event_version' | 'timestamp_ms'> & Partial<Pick<AnalyticsEnvelope, 'event_version' | 'timestamp_ms'>>;
|
|
36
|
-
/**
|
|
37
|
-
* Fire-and-forget analytics client.
|
|
38
|
-
*
|
|
39
|
-
* All transport errors are silently suppressed — the backend analytics
|
|
40
|
-
* endpoint is not yet implemented, so callers must never observe failures.
|
|
41
|
-
*/
|
|
42
|
-
export declare class AnalyticsClient {
|
|
43
|
-
private readonly config;
|
|
44
|
-
private readonly queue;
|
|
45
|
-
private flushTimer;
|
|
46
|
-
private readonly onPageHideBound;
|
|
47
|
-
constructor(config: AnalyticsClientConfig);
|
|
48
|
-
track(input: AnalyticsInput): void;
|
|
49
|
-
flush(): void;
|
|
50
|
-
/** Drain the entire queue synchronously (used on page hide). */
|
|
51
|
-
flushAll(): void;
|
|
52
|
-
destroy(): void;
|
|
53
|
-
private scheduleFlush;
|
|
54
|
-
private scheduleImmediateFlush;
|
|
55
|
-
private buildTransportBody;
|
|
56
|
-
/** Best-effort send — all errors silently suppressed. */
|
|
57
|
-
private send;
|
|
58
|
-
/** Synchronous flush using sendBeacon only (for page unload). */
|
|
59
|
-
private flushAllSync;
|
|
60
|
-
}
|
|
61
|
-
export declare function createAnalyticsClient(config: AnalyticsClientConfig): AnalyticsClient;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Endpoint path helpers.
|
|
3
|
-
*
|
|
4
|
-
* All endpoints use `/chat/*` prefix. API versioning is handled via
|
|
5
|
-
* request-level compatibility params or feature-toggle params.
|
|
6
|
-
*/
|
|
7
|
-
export type ChatEndpointName = 'process_action' | 'launcher_action' | 'similar_products' | 'product_groupings';
|
|
8
|
-
export interface ChatTransportConfig {
|
|
9
|
-
middlewareUrl: string;
|
|
10
|
-
attachment?: File;
|
|
11
|
-
/** Account ID (used in URL path when needed). */
|
|
12
|
-
accountId?: string;
|
|
13
|
-
}
|
|
14
|
-
export declare function normalizeMiddlewareUrl(input?: string): string;
|
|
15
|
-
export declare function buildChatEndpointUrl(endpoint: ChatEndpointName, config: ChatTransportConfig): string;
|
package/dist/common/client.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { AccountRuntimeConfig } from './config-schema.js';
|
|
2
|
-
import { OverlayWidgetsController, OverlayWidgetsOptions } from './overlay.js';
|
|
3
|
-
import { PageContext } from './types.js';
|
|
4
|
-
export interface HostActions {
|
|
5
|
-
onAddToCart?: (params: import('./types.js').AddToCartParams) => void;
|
|
6
|
-
onProductNavigate?: (url: string, sku: string, sessionId: string | null) => void;
|
|
7
|
-
onFindSimilar?: (detail: {
|
|
8
|
-
sku: string;
|
|
9
|
-
imageUrl?: string;
|
|
10
|
-
}) => void;
|
|
11
|
-
onScriptCall?: (params: {
|
|
12
|
-
name: string;
|
|
13
|
-
payload?: Record<string, unknown>;
|
|
14
|
-
}) => void;
|
|
15
|
-
}
|
|
16
|
-
export interface GengageClientOptions {
|
|
17
|
-
runtimeConfig: AccountRuntimeConfig | unknown;
|
|
18
|
-
contextResolver?: () => Partial<PageContext>;
|
|
19
|
-
hostActions?: HostActions;
|
|
20
|
-
preflight?: boolean;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Maps validated account runtime config to overlay widget options.
|
|
24
|
-
* Exported for unit tests.
|
|
25
|
-
*/
|
|
26
|
-
export declare function mapAccountRuntimeConfigToOverlayOptions(config: AccountRuntimeConfig, hostActions?: HostActions, initialContext?: Partial<PageContext>): OverlayWidgetsOptions;
|
|
27
|
-
export declare function initGengageClient(options: GengageClientOptions): Promise<OverlayWidgetsController>;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Two-way communication bridge between the host page and embedded widgets.
|
|
3
|
-
*
|
|
4
|
-
* Host -> Widget: The host sends `window.postMessage({ gengage, type, payload })`.
|
|
5
|
-
* The bridge validates the origin, checks the namespace, and routes to handlers.
|
|
6
|
-
*
|
|
7
|
-
* Widget -> Host: The bridge dispatches a `CustomEvent('gengage:bridge:message')`
|
|
8
|
-
* on window so the host can listen without tight coupling.
|
|
9
|
-
*
|
|
10
|
-
* Built-in message types:
|
|
11
|
-
* - 'addToCart' -- host confirms cart addition
|
|
12
|
-
* - 'productFavorite' -- widget → host: product card heart toggled (payload: sku, product, favorited, sessionId)
|
|
13
|
-
* - 'navigate' -- host navigates to URL
|
|
14
|
-
* - 'openChat' -- programmatic open
|
|
15
|
-
* - 'closeChat' -- programmatic close
|
|
16
|
-
* - 'getContext' -- host requests current context
|
|
17
|
-
*/
|
|
18
|
-
export interface BridgeMessage {
|
|
19
|
-
type: string;
|
|
20
|
-
payload?: unknown;
|
|
21
|
-
}
|
|
22
|
-
export interface CommunicationBridgeOptions {
|
|
23
|
-
/** Widget namespace for message identification (e.g. 'chat', 'qna'). */
|
|
24
|
-
namespace: string;
|
|
25
|
-
/** Allowed origins for postMessage security (default: ['*']). */
|
|
26
|
-
allowedOrigins?: string[];
|
|
27
|
-
/** Callback when a message is received from the host. */
|
|
28
|
-
onMessage?: (msg: BridgeMessage) => void;
|
|
29
|
-
}
|
|
30
|
-
type BridgeHandler = (payload: unknown) => void;
|
|
31
|
-
export declare class CommunicationBridge {
|
|
32
|
-
private readonly _namespace;
|
|
33
|
-
private readonly _allowedOrigins;
|
|
34
|
-
private readonly _onMessage;
|
|
35
|
-
private readonly _handlers;
|
|
36
|
-
private readonly _messageListener;
|
|
37
|
-
private _destroyed;
|
|
38
|
-
constructor(options: CommunicationBridgeOptions);
|
|
39
|
-
/** Send a message to the host page via CustomEvent on window. */
|
|
40
|
-
send(type: string, payload?: unknown): void;
|
|
41
|
-
/**
|
|
42
|
-
* Register a handler for a specific message type.
|
|
43
|
-
* Returns an unsubscribe function.
|
|
44
|
-
*/
|
|
45
|
-
on(type: string, handler: BridgeHandler): () => void;
|
|
46
|
-
/** Clean up all event listeners and handlers. */
|
|
47
|
-
destroy(): void;
|
|
48
|
-
private _handlePostMessage;
|
|
49
|
-
private _isOriginAllowed;
|
|
50
|
-
}
|
|
51
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const DEFAULT_IDEMPOTENCY_KEY = "__gengageWidgetsInit";
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const AnalyticsAuthModeSchema: z.ZodEnum<{
|
|
3
|
-
none: "none";
|
|
4
|
-
"x-api-key-header": "x-api-key-header";
|
|
5
|
-
"bearer-header": "bearer-header";
|
|
6
|
-
"body-api-key": "body-api-key";
|
|
7
|
-
}>;
|
|
8
|
-
export declare const UnknownActionPolicySchema: z.ZodEnum<{
|
|
9
|
-
"log-and-ignore": "log-and-ignore";
|
|
10
|
-
throw: "throw";
|
|
11
|
-
delegate: "delegate";
|
|
12
|
-
}>;
|
|
13
|
-
export declare const AccountRuntimeConfigSchema: z.ZodObject<{
|
|
14
|
-
version: z.ZodLiteral<"1">;
|
|
15
|
-
accountId: z.ZodString;
|
|
16
|
-
middlewareUrl: z.ZodString;
|
|
17
|
-
locale: z.ZodOptional<z.ZodString>;
|
|
18
|
-
widgets: z.ZodObject<{
|
|
19
|
-
chat: z.ZodDefault<z.ZodObject<{
|
|
20
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
21
|
-
}, z.core.$strip>>;
|
|
22
|
-
qna: z.ZodDefault<z.ZodObject<{
|
|
23
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
24
|
-
}, z.core.$strip>>;
|
|
25
|
-
simrel: z.ZodOptional<z.ZodObject<{
|
|
26
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
27
|
-
}, z.core.$strip>>;
|
|
28
|
-
simbut: z.ZodDefault<z.ZodObject<{
|
|
29
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
30
|
-
}, z.core.$strip>>;
|
|
31
|
-
}, z.core.$strip>;
|
|
32
|
-
mounts: z.ZodDefault<z.ZodObject<{
|
|
33
|
-
chat: z.ZodOptional<z.ZodString>;
|
|
34
|
-
qna: z.ZodOptional<z.ZodString>;
|
|
35
|
-
simrel: z.ZodOptional<z.ZodString>;
|
|
36
|
-
simbut: z.ZodOptional<z.ZodString>;
|
|
37
|
-
}, z.core.$strip>>;
|
|
38
|
-
transport: z.ZodDefault<z.ZodObject<{}, z.core.$strip>>;
|
|
39
|
-
analytics: z.ZodDefault<z.ZodObject<{
|
|
40
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
41
|
-
endpoint: z.ZodDefault<z.ZodString>;
|
|
42
|
-
auth: z.ZodDefault<z.ZodObject<{
|
|
43
|
-
mode: z.ZodDefault<z.ZodEnum<{
|
|
44
|
-
none: "none";
|
|
45
|
-
"x-api-key-header": "x-api-key-header";
|
|
46
|
-
"bearer-header": "bearer-header";
|
|
47
|
-
"body-api-key": "body-api-key";
|
|
48
|
-
}>>;
|
|
49
|
-
key: z.ZodOptional<z.ZodString>;
|
|
50
|
-
headerName: z.ZodOptional<z.ZodString>;
|
|
51
|
-
bodyField: z.ZodDefault<z.ZodString>;
|
|
52
|
-
}, z.core.$strip>>;
|
|
53
|
-
fireAndForget: z.ZodDefault<z.ZodBoolean>;
|
|
54
|
-
useBeacon: z.ZodDefault<z.ZodBoolean>;
|
|
55
|
-
keepaliveFetch: z.ZodDefault<z.ZodBoolean>;
|
|
56
|
-
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
57
|
-
maxRetries: z.ZodDefault<z.ZodNumber>;
|
|
58
|
-
}, z.core.$strip>>;
|
|
59
|
-
gtm: z.ZodDefault<z.ZodObject<{
|
|
60
|
-
idempotencyKey: z.ZodDefault<z.ZodString>;
|
|
61
|
-
requireDomReady: z.ZodDefault<z.ZodBoolean>;
|
|
62
|
-
}, z.core.$strip>>;
|
|
63
|
-
actionHandling: z.ZodDefault<z.ZodObject<{
|
|
64
|
-
unknownActionPolicy: z.ZodDefault<z.ZodEnum<{
|
|
65
|
-
"log-and-ignore": "log-and-ignore";
|
|
66
|
-
throw: "throw";
|
|
67
|
-
delegate: "delegate";
|
|
68
|
-
}>>;
|
|
69
|
-
allowScriptCall: z.ZodDefault<z.ZodBoolean>;
|
|
70
|
-
}, z.core.$strip>>;
|
|
71
|
-
}, z.core.$strip>;
|
|
72
|
-
export type AccountRuntimeConfig = z.infer<typeof AccountRuntimeConfigSchema>;
|
|
73
|
-
export type AnalyticsAuthMode = z.infer<typeof AnalyticsAuthModeSchema>;
|
|
74
|
-
export type UnknownActionPolicy = z.infer<typeof UnknownActionPolicySchema>;
|
|
75
|
-
export declare function parseAccountRuntimeConfig(input: unknown): AccountRuntimeConfig;
|
|
76
|
-
export declare function safeParseAccountRuntimeConfig(input: unknown): ReturnType<typeof AccountRuntimeConfigSchema.safeParse>;
|
|
77
|
-
export declare function createDefaultAccountRuntimeConfig(params: {
|
|
78
|
-
accountId: string;
|
|
79
|
-
middlewareUrl: string;
|
|
80
|
-
locale?: string;
|
|
81
|
-
}): AccountRuntimeConfig;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare function configureConnectionWarning(options: {
|
|
2
|
-
probeUrl?: string;
|
|
3
|
-
}): void;
|
|
4
|
-
export interface ConnectionWarningRequestOptions {
|
|
5
|
-
source: 'chat' | 'qna' | 'simrel';
|
|
6
|
-
locale?: string | undefined;
|
|
7
|
-
}
|
|
8
|
-
export declare function trackConnectionWarningRequest(options: ConnectionWarningRequestOptions): () => void;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Wire-protocol source strings that indicate consulting-style product grids.
|
|
3
|
-
*
|
|
4
|
-
* Kept in `common/` because both the protocol adapter and chat-specific
|
|
5
|
-
* renderers need to agree on which sources activate style-variation grids.
|
|
6
|
-
*/
|
|
7
|
-
export declare const CONSULTING_SOURCES: readonly string[];
|
|
8
|
-
/** Whether a wire-protocol source string is a consulting source. */
|
|
9
|
-
export declare function isConsultingSource(source: string | undefined): boolean;
|
package/dist/common/context.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { PageContext, SessionContext } from './types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Returns the shared session ID for this browser tab session.
|
|
4
|
-
* Creates and persists it on first call.
|
|
5
|
-
*
|
|
6
|
-
* Call this once at page load and share the result with all widget configs:
|
|
7
|
-
*
|
|
8
|
-
* const sessionId = bootstrapSession();
|
|
9
|
-
* chatWidget.init({ ..., session: { sessionId } });
|
|
10
|
-
* qnaWidget.init({ ..., session: { sessionId } });
|
|
11
|
-
*/
|
|
12
|
-
export declare function bootstrapSession(): string;
|
|
13
|
-
/**
|
|
14
|
-
* Reads the current page context from window.gengage.pageContext.
|
|
15
|
-
* Returns null if not set.
|
|
16
|
-
*/
|
|
17
|
-
export declare function getWindowPageContext(): PageContext | null;
|
|
18
|
-
/**
|
|
19
|
-
* Merges a partial context update into the current window.gengage.pageContext.
|
|
20
|
-
* Dispatches 'gengage:context:update' so all listening widgets update.
|
|
21
|
-
*/
|
|
22
|
-
export declare function updatePageContext(patch: Partial<PageContext>): void;
|
|
23
|
-
/**
|
|
24
|
-
* Resolves the session context, bootstrapping if necessary.
|
|
25
|
-
* Merges provided overrides with auto-generated session ID.
|
|
26
|
-
*/
|
|
27
|
-
export declare function resolveSession(overrides?: Partial<SessionContext>): SessionContext;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function escapeCssIdentifier(value: string): string;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { ChatWidgetConfig } from '../chat/types.js';
|
|
2
|
-
import { QNAWidgetConfig } from '../qna/types.js';
|
|
3
|
-
import { SimRelWidgetConfig } from '../simrel/types.js';
|
|
4
|
-
import { AnalyticsClientConfig } from './analytics.js';
|
|
5
|
-
import { WidgetTheme } from './types.js';
|
|
6
|
-
export declare const DEFAULT_CUSTOMIZATION_LOCALE = "tr";
|
|
7
|
-
export interface AccountIdentityConfig {
|
|
8
|
-
accountId: string;
|
|
9
|
-
middlewareUrl: string;
|
|
10
|
-
locale?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface AccountIdentity {
|
|
13
|
-
ACCOUNT_ID: string;
|
|
14
|
-
MIDDLEWARE_URL: string;
|
|
15
|
-
LOCALE: string;
|
|
16
|
-
}
|
|
17
|
-
interface BaseAccountWidgetConfigInput {
|
|
18
|
-
accountId: string;
|
|
19
|
-
middlewareUrl: string;
|
|
20
|
-
sessionId: string;
|
|
21
|
-
theme?: WidgetTheme;
|
|
22
|
-
}
|
|
23
|
-
export interface FloatingChatConfigInput extends BaseAccountWidgetConfigInput {
|
|
24
|
-
locale?: string;
|
|
25
|
-
}
|
|
26
|
-
export interface PdpQnaConfigInput extends BaseAccountWidgetConfigInput {
|
|
27
|
-
sku: string;
|
|
28
|
-
mountTarget: QNAWidgetConfig['mountTarget'];
|
|
29
|
-
}
|
|
30
|
-
export interface PdpSimRelConfigInput extends BaseAccountWidgetConfigInput {
|
|
31
|
-
sku: string;
|
|
32
|
-
mountTarget: SimRelWidgetConfig['mountTarget'];
|
|
33
|
-
}
|
|
34
|
-
type FloatingChatConfigOverrides = Omit<Partial<ChatWidgetConfig>, 'accountId' | 'middlewareUrl' | 'session' | 'variant' | 'theme' | 'locale'>;
|
|
35
|
-
type PdpQnaConfigOverrides = Omit<Partial<QNAWidgetConfig>, 'accountId' | 'middlewareUrl' | 'session' | 'pageContext' | 'mountTarget' | 'theme'>;
|
|
36
|
-
type SimRelAccountConfig = Omit<SimRelWidgetConfig, 'onAddToCart' | 'onProductNavigate'>;
|
|
37
|
-
type PdpSimRelConfigOverrides = Omit<Partial<SimRelAccountConfig>, 'accountId' | 'middlewareUrl' | 'session' | 'sku' | 'mountTarget' | 'theme'>;
|
|
38
|
-
type DefaultAnalyticsConfigOverrides = Omit<AnalyticsClientConfig, 'middlewareUrl'>;
|
|
39
|
-
/**
|
|
40
|
-
* Shared account identity factory used by all customization folders.
|
|
41
|
-
* Keeps middleware URL + locale defaults centralized in the SDK layer.
|
|
42
|
-
*/
|
|
43
|
-
export declare function createAccountIdentity(config: AccountIdentityConfig): AccountIdentity;
|
|
44
|
-
/**
|
|
45
|
-
* Shared floating-chat baseline used by account customizations.
|
|
46
|
-
* Account files only pass differences via `overrides`.
|
|
47
|
-
*/
|
|
48
|
-
export declare function createFloatingChatConfig(input: FloatingChatConfigInput, overrides?: FloatingChatConfigOverrides): ChatWidgetConfig;
|
|
49
|
-
/**
|
|
50
|
-
* Shared PDP QNA baseline used by account customizations.
|
|
51
|
-
*/
|
|
52
|
-
export declare function createPdpQnaConfig(input: PdpQnaConfigInput, overrides?: PdpQnaConfigOverrides): QNAWidgetConfig;
|
|
53
|
-
/**
|
|
54
|
-
* Shared PDP SimRel baseline used by account customizations.
|
|
55
|
-
* Host-level commerce callbacks stay in account init wrappers.
|
|
56
|
-
*/
|
|
57
|
-
export declare function createPdpSimRelConfig(input: PdpSimRelConfigInput, overrides?: PdpSimRelConfigOverrides): SimRelAccountConfig;
|
|
58
|
-
/**
|
|
59
|
-
* Shared analytics defaults for account customization wrappers.
|
|
60
|
-
*/
|
|
61
|
-
export declare function createDefaultAnalyticsConfig(middlewareUrl: string, overrides?: DefaultAnalyticsConfigOverrides): AnalyticsClientConfig;
|
|
62
|
-
export {};
|
package/dist/common/debug.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Debug logging for integrators.
|
|
3
|
-
*
|
|
4
|
-
* Enable with: `localStorage.setItem('gengage:debug', '1')`
|
|
5
|
-
* Disable with: `localStorage.removeItem('gengage:debug')`
|
|
6
|
-
*
|
|
7
|
-
* When disabled, all debug calls are no-ops with zero overhead
|
|
8
|
-
* (the check is a single localStorage read cached per page load).
|
|
9
|
-
*/
|
|
10
|
-
/** Log a debug message (only when gengage:debug is enabled). */
|
|
11
|
-
export declare function debugLog(category: string, message: string, data?: unknown): void;
|
|
12
|
-
/** Reset the cached enabled state (for testing). */
|
|
13
|
-
export declare function _resetDebugCache(): void;
|
package/dist/common/events.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { GengageEventDetailMap, GengageEventName } from './types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Dispatch a typed Gengage event on window.
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* dispatch('gengage:qna:action', { title: 'About shipping', type: 'query', payload: 'shipping' });
|
|
7
|
-
*/
|
|
8
|
-
export declare function dispatch<K extends GengageEventName>(name: K, detail: GengageEventDetailMap[K]): void;
|
|
9
|
-
/**
|
|
10
|
-
* Listen for a typed Gengage event on window.
|
|
11
|
-
* Returns an unsubscribe function.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* const off = listen('gengage:qna:action', (detail) => {
|
|
15
|
-
* window.gengage?.chat?.openWithAction(detail);
|
|
16
|
-
* });
|
|
17
|
-
* // Later:
|
|
18
|
-
* off();
|
|
19
|
-
*/
|
|
20
|
-
export declare function listen<K extends GengageEventName>(name: K, handler: (detail: GengageEventDetailMap[K]) => void): () => void;
|
|
21
|
-
export interface WireQNAToChatOptions {
|
|
22
|
-
onChatUnavailable?: () => void;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Convenience: wire QNA → Chat automatically.
|
|
26
|
-
* Call this once after both widgets are initialised.
|
|
27
|
-
*
|
|
28
|
-
* Listens for 'gengage:qna:action' and forwards to window.gengage.chat.openWithAction().
|
|
29
|
-
* Listens for 'gengage:qna:open-chat' and forwards to window.gengage.chat.open().
|
|
30
|
-
*
|
|
31
|
-
* If chat is not available at dispatch time, emits a one-time console.warn and
|
|
32
|
-
* calls options.onChatUnavailable (every time) if provided.
|
|
33
|
-
*
|
|
34
|
-
* @returns unsubscribe function that removes both listeners.
|
|
35
|
-
*/
|
|
36
|
-
export declare function wireQNAToChat(options?: WireQNAToChatOptions): () => void;
|
|
37
|
-
/**
|
|
38
|
-
* Convenience: wire Similar Products → Chat for cross-page session continuity.
|
|
39
|
-
* Call this once after both widgets are initialised.
|
|
40
|
-
*
|
|
41
|
-
* When the user navigates to a product page, the chat widget can restore
|
|
42
|
-
* the conversation where it left off using saveSession().
|
|
43
|
-
*
|
|
44
|
-
* @returns unsubscribe function.
|
|
45
|
-
*/
|
|
46
|
-
export declare function wireSimilarToChat(): () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function detectFastIntent(text: string): string | null;
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Google Analytics dataLayer integration.
|
|
3
|
-
*
|
|
4
|
-
* Pushes chat activity events to `window.dataLayer` when GA is available.
|
|
5
|
-
* Silently skips pushes when GA is not detected.
|
|
6
|
-
*
|
|
7
|
-
* Event naming follows the GA4 recommended event pattern:
|
|
8
|
-
* - All lowercase, hyphen-separated
|
|
9
|
-
* - Prefixed with `gengage-` for easy filtering in GA dashboards
|
|
10
|
-
*
|
|
11
|
-
* Clients can build custom chat funnels in GA using these events.
|
|
12
|
-
*/
|
|
13
|
-
interface DataLayerEvent {
|
|
14
|
-
event: string;
|
|
15
|
-
[key: string]: unknown;
|
|
16
|
-
}
|
|
17
|
-
declare global {
|
|
18
|
-
interface Window {
|
|
19
|
-
dataLayer?: DataLayerEvent[];
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
/** Widget icon/avatar displayed on page. */
|
|
23
|
-
export declare function trackInit(widget: string): void;
|
|
24
|
-
/** Widget opened / shown to user. */
|
|
25
|
-
export declare function trackShow(widget: string): void;
|
|
26
|
-
/** Widget closed / hidden. */
|
|
27
|
-
export declare function trackHide(widget: string): void;
|
|
28
|
-
/** User clicked a suggested question / action button. */
|
|
29
|
-
export declare function trackSuggestedQuestion(title: string, type: string): void;
|
|
30
|
-
/** User clicked "Find Similar" for a product. */
|
|
31
|
-
export declare function trackFindSimilars(sku: string): void;
|
|
32
|
-
/** User pre-selected a product for comparison. */
|
|
33
|
-
export declare function trackComparePreselection(sku: string): void;
|
|
34
|
-
/** User submitted the comparison (clicked "Compare Selected"). */
|
|
35
|
-
export declare function trackCompareSelected(skus: string[]): void;
|
|
36
|
-
/** User cleared the comparison selection. */
|
|
37
|
-
export declare function trackCompareClear(): void;
|
|
38
|
-
/** Comparison results received and rendered. */
|
|
39
|
-
export declare function trackCompareReceived(productCount: number): void;
|
|
40
|
-
/** User liked / favorited a product. */
|
|
41
|
-
export declare function trackLikeProduct(sku: string): void;
|
|
42
|
-
/** User clicked the favorites/likes list button. */
|
|
43
|
-
export declare function trackLikeList(): void;
|
|
44
|
-
/** Product list / search results displayed. */
|
|
45
|
-
export declare function trackSearch(query?: string, resultCount?: number): void;
|
|
46
|
-
/** User clicked on a product to view details. */
|
|
47
|
-
export declare function trackProductDetail(sku: string, name?: string): void;
|
|
48
|
-
/** SimRel (or chat-routed similar) product card click — distinct from generic PDP detail views. */
|
|
49
|
-
export declare function trackSimilarProductClick(sku: string, extras?: {
|
|
50
|
-
url?: string;
|
|
51
|
-
name?: string;
|
|
52
|
-
session_id?: string | null;
|
|
53
|
-
}): void;
|
|
54
|
-
/** SimRel grouping / filter tab selected. */
|
|
55
|
-
export declare function trackSimilarGroupingClick(groupingLabel: string, groupingIndex: number): void;
|
|
56
|
-
/** SimRel grid rendered and shown (successful fetch + inject). */
|
|
57
|
-
export declare function trackSimilarProductsImpression(params: {
|
|
58
|
-
source_sku: string;
|
|
59
|
-
product_count: number;
|
|
60
|
-
grouped: boolean;
|
|
61
|
-
session_id?: string | null;
|
|
62
|
-
}): void;
|
|
63
|
-
/** User clicked the floating comparison dock primary action (popup bar). */
|
|
64
|
-
export declare function trackCompareProduct(skus: string[]): void;
|
|
65
|
-
/** Chat MainPane (assistant left panel) expanded into split view. */
|
|
66
|
-
export declare function trackChatbotMaximized(): void;
|
|
67
|
-
/**
|
|
68
|
-
* SDK / bridge could not become ready after bounded retries (e.g. chat not initialized).
|
|
69
|
-
* Also used when overlay bootstrap fails fatally.
|
|
70
|
-
*/
|
|
71
|
-
export declare function trackInterfaceNotReady(params?: {
|
|
72
|
-
reason?: string;
|
|
73
|
-
attempts?: number;
|
|
74
|
-
message?: string;
|
|
75
|
-
}): void;
|
|
76
|
-
/** User added a product to cart from the widget. */
|
|
77
|
-
export declare function trackCartAdd(sku: string, quantity: number): void;
|
|
78
|
-
/** User sent a chat message. */
|
|
79
|
-
export declare function trackMessageSent(): void;
|
|
80
|
-
/** Assistant responded with text. */
|
|
81
|
-
export declare function trackMessageReceived(): void;
|
|
82
|
-
/** User started a new conversation. */
|
|
83
|
-
export declare function trackConversationStart(): void;
|
|
84
|
-
/** User used voice input. */
|
|
85
|
-
export declare function trackVoiceInput(): void;
|
|
86
|
-
/** Widget or stream error occurred. */
|
|
87
|
-
export declare function trackError(widget: string, error: string): void;
|
|
88
|
-
export declare function wireGADataLayer(): () => void;
|
|
89
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { GengageEventDetailMap } from './types.js';
|
|
2
|
-
export declare function isLikelyConnectivityIssue(error?: unknown): boolean;
|
|
3
|
-
export declare function getGlobalErrorMessage(locale?: string, error?: unknown): string;
|
|
4
|
-
export declare function registerGlobalErrorToastListener(): void;
|
|
5
|
-
export declare function showGlobalErrorToast(detail: GengageEventDetailMap['gengage:global:error']): void;
|
|
6
|
-
export declare function dismissGlobalErrorToast(): void;
|
package/dist/common/index.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
export type { PageContext, SessionContext, BaseWidgetConfig, WidgetTheme, GengageWidget, StreamEvent, StreamEventMetadata, StreamEventTextChunk, StreamEventUISpec, StreamEventAction, StreamEventError, StreamEventDone, UISpec, UIElement, ActionPayload, GengageEventName, GengageEventDetailMap, } from './types.js';
|
|
2
|
-
export { BaseWidget } from './widget-base.js';
|
|
3
|
-
export type { ChatPublicAPI } from './widget-base.js';
|
|
4
|
-
export { consumeStream, streamPost } from './streaming.js';
|
|
5
|
-
export type { StreamOptions, StreamEventHandler } from './streaming.js';
|
|
6
|
-
export { dispatch, listen, wireQNAToChat, wireSimilarToChat } from './events.js';
|
|
7
|
-
export type { WireQNAToChatOptions } from './events.js';
|
|
8
|
-
export { bootstrapSession, getWindowPageContext, updatePageContext, resolveSession } from './context.js';
|
|
9
|
-
export { initOverlayWidgets, getOverlayWidgets, destroyOverlayWidgets, buildOverlayIdempotencyKey } from './overlay.js';
|
|
10
|
-
export type { OverlayWidgetsController, OverlayWidgetsOptions, OverlayChatOptions, OverlayQNAOptions, OverlaySimRelOptions, OverlaySimButOptions, } from './overlay.js';
|
|
11
|
-
export { detectNativeEnvironment, applyNativeSession, createNativeWebViewBridge, initNativeOverlayWidgets, } from './native-webview.js';
|
|
12
|
-
export type { NativeBridgeEnvironment, NativeSessionPayload, NativeBridgeMessage, NativeWebViewBridgeOptions, NativeWebViewBridge, NativeOverlayInitOptions, NativeOverlayInitResult, } from './native-webview.js';
|
|
13
|
-
export { buildChatEndpointUrl, normalizeMiddlewareUrl } from './api-paths.js';
|
|
14
|
-
export type { ChatTransportConfig, ChatEndpointName } from './api-paths.js';
|
|
15
|
-
export { AccountRuntimeConfigSchema, AnalyticsAuthModeSchema, UnknownActionPolicySchema, parseAccountRuntimeConfig, safeParseAccountRuntimeConfig, createDefaultAccountRuntimeConfig, } from './config-schema.js';
|
|
16
|
-
export type { AccountRuntimeConfig, AnalyticsAuthMode, UnknownActionPolicy } from './config-schema.js';
|
|
17
|
-
export { routeStreamAction } from './action-router.js';
|
|
18
|
-
export type { HostActionHandlers, ActionRouterOptions } from './action-router.js';
|
|
19
|
-
export { AnalyticsClient, createAnalyticsClient } from './analytics.js';
|
|
20
|
-
export type { AnalyticsEnvelope, AnalyticsInput, AnalyticsAuthConfig, AnalyticsClientConfig } from './analytics.js';
|
|
21
|
-
export { streamStartEvent, streamChunkEvent, streamUiSpecEvent, streamDoneEvent, streamErrorEvent, llmUsageEvent, meteringIncrementEvent, meteringSummaryEvent, chatHistorySnapshotEvent, widgetHistorySnapshotEvent, basketAddEvent, checkoutStartEvent, checkoutCompleteEvent, } from './analytics-events.js';
|
|
22
|
-
export type { AnalyticsContext } from './analytics-events.js';
|
|
23
|
-
export { sanitizeHtml } from './safe-html.js';
|
|
24
|
-
export { renderUISpecWithRegistry, defaultUnknownUISpecRenderer } from './renderer/index.js';
|
|
25
|
-
export { mergeUISpecRegistry } from './renderer/index.js';
|
|
26
|
-
export type { UISpecRenderHelpers, UISpecRendererOverrides, UISpecDomComponentRenderParams, UISpecDomComponentRenderer, UISpecDomRegistry, UISpecDomUnknownRendererParams, UISpecDomUnknownRenderer, RenderUISpecWithRegistryOptions, } from './renderer/index.js';
|
|
27
|
-
export { BASE_WIDGET_THEME, withBaseTheme } from './theme-utils.js';
|
|
28
|
-
export { DEFAULT_WIDGET_THEME_TOKENS, withDefaultWidgetTheme } from './ui-theme.js';
|
|
29
|
-
export { registerGlobalErrorToastListener, showGlobalErrorToast, dismissGlobalErrorToast, getGlobalErrorMessage, } from './global-error-toast.js';
|
|
30
|
-
export { trackConnectionWarningRequest, configureConnectionWarning } from './connection-warning.js';
|
|
31
|
-
export type { ConnectionWarningRequestOptions } from './connection-warning.js';
|
|
32
|
-
export { DEFAULT_CUSTOMIZATION_LOCALE, createAccountIdentity, createFloatingChatConfig, createPdpQnaConfig, createPdpSimRelConfig, createDefaultAnalyticsConfig, } from './customization-factories.js';
|
|
33
|
-
export type { AccountIdentityConfig, AccountIdentity } from './customization-factories.js';
|
|
34
|
-
export { initGengageClient } from './client.js';
|
|
35
|
-
export type { GengageClientOptions, HostActions } from './client.js';
|
|
36
|
-
export { preflightDiagnostics } from './preflight.js';
|
|
37
|
-
export type { PreflightResult, PreflightWarning } from './preflight.js';
|
|
38
|
-
export { adaptBackendEvent, productToNormalized, normalizeSimilarProductsResponse, normalizeProductGroupingsResponse, } from './protocol-adapter.js';
|
|
39
|
-
export { wireGADataLayer } from './ga-datalayer.js';
|
|
40
|
-
export { isVoiceInputSupported, VoiceInput } from './voice-input.js';
|
|
41
|
-
export type { VoiceInputState, VoiceInputErrorCode, VoiceInputCallbacks, VoiceInputOptions } from './voice-input.js';
|
|
42
|
-
export { detectPageType, extractSkuFromUrl, autoDetectPageContext } from './page-detect.js';
|
|
43
|
-
export type { DetectablePageType, PageDetectionRule } from './page-detect.js';
|
|
44
|
-
export type { NormalizedProduct, SimilarProductsJsonResponse, ProductGroupingsJsonResponse, } from './protocol-adapter.js';
|
|
45
|
-
export { getSuggestedSearchKeywords, getSuggestedSearchKeywordsText } from './suggested-search-keywords.js';
|
|
46
|
-
export type { SuggestedSearchKeywordSource } from './suggested-search-keywords.js';
|
|
47
|
-
export { detectFastIntent } from './fastIntent.js';
|
|
48
|
-
export { makePillLauncher } from './pill-launcher.js';
|
|
49
|
-
export type { PillLauncherOptions, PillLauncherKit } from './pill-launcher.js';
|