@pillar-ai/sdk 0.1.23 → 0.1.25

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 (44) hide show
  1. package/README.md +1 -1
  2. package/dist/actions/index.d.ts +1 -1
  3. package/dist/actions/types.d.ts +89 -0
  4. package/dist/api/client.d.ts +18 -0
  5. package/dist/button/FloatingButton.d.ts +44 -0
  6. package/dist/cli/sync.js +6 -1
  7. package/dist/components/DevTools/DOMScannerPreview.d.ts +21 -0
  8. package/dist/components/PagePilot/styles.d.ts +1 -1
  9. package/dist/components/Panel/styles.d.ts +1 -1
  10. package/dist/components/Views/ArticleChatView.d.ts +1 -2
  11. package/dist/components/Views/DeveloperView.d.ts +6 -0
  12. package/dist/core/Pillar.d.ts +3 -3
  13. package/dist/core/config.d.ts +13 -0
  14. package/dist/panel/Panel.d.ts +53 -0
  15. package/dist/panel/PanelUI.d.ts +43 -0
  16. package/dist/panel/components/ArticleCard.d.ts +10 -0
  17. package/dist/panel/components/CategoryCard.d.ts +10 -0
  18. package/dist/panel/components/ChatInput.d.ts +36 -0
  19. package/dist/panel/components/Header.d.ts +16 -0
  20. package/dist/panel/components/SearchInput.d.ts +11 -0
  21. package/dist/panel/styles.d.ts +5 -0
  22. package/dist/panel/views/ArticleView.d.ts +21 -0
  23. package/dist/panel/views/CategoryView.d.ts +20 -0
  24. package/dist/panel/views/ChatView.d.ts +30 -0
  25. package/dist/panel/views/HomeView.d.ts +18 -0
  26. package/dist/panel/views/SearchView.d.ts +22 -0
  27. package/dist/pillar.esm.js +1 -1
  28. package/dist/store/developer.d.ts +19 -0
  29. package/dist/tools/index.d.ts +1 -0
  30. package/dist/tools/types.d.ts +42 -7
  31. package/dist/tooltips/Tooltip.d.ts +63 -0
  32. package/dist/tooltips/TooltipManager.d.ts +42 -0
  33. package/dist/tooltips/styles.d.ts +5 -0
  34. package/dist/ui/config.d.ts +96 -0
  35. package/dist/ui/executor.d.ts +75 -0
  36. package/dist/ui/index.d.ts +11 -0
  37. package/dist/ui/scanner.d.ts +105 -0
  38. package/dist/ui/types.d.ts +293 -0
  39. package/dist/utils/tracing.d.ts +43 -0
  40. package/package.json +8 -1
  41. package/dist/components/Panel/TabNavigation.d.ts +0 -16
  42. package/dist/components/Views/HelpCenterArticles.d.ts +0 -17
  43. package/dist/components/Views/SupportView.d.ts +0 -15
  44. package/dist/utils/helpdesk.d.ts +0 -33
@@ -0,0 +1,293 @@
1
+ /**
2
+ * UI Interaction Types
3
+ *
4
+ * Type definitions for the UI scanning and interaction system.
5
+ * This enables AI agents to understand and interact with page elements.
6
+ */
7
+ /**
8
+ * Supported UI interaction types.
9
+ *
10
+ * - click: Click/tap on an element
11
+ * - type: Enter text into an input field
12
+ * - select: Select an option from a dropdown/select
13
+ * - scroll: Scroll element into view
14
+ * - hover: Hover over an element
15
+ * - focus: Focus an element
16
+ * - clear: Clear an input field's value
17
+ */
18
+ export type UIInteractionType = 'click' | 'type' | 'select' | 'scroll' | 'hover' | 'focus' | 'clear';
19
+ /**
20
+ * Element types detected by the scanner.
21
+ */
22
+ export type UIElementType = 'button' | 'link' | 'input' | 'textarea' | 'select' | 'checkbox' | 'radio' | 'switch' | 'slider' | 'menu' | 'menuitem' | 'tab' | 'dialog' | 'custom' | 'unknown';
23
+ /**
24
+ * Bounding rectangle for an element.
25
+ */
26
+ export interface UIElementRect {
27
+ x: number;
28
+ y: number;
29
+ width: number;
30
+ height: number;
31
+ }
32
+ /**
33
+ * Represents a scanned UI element.
34
+ *
35
+ * Contains all information needed for the AI to understand
36
+ * and interact with a page element.
37
+ */
38
+ export interface UIElement {
39
+ /**
40
+ * Unique identifier for this element.
41
+ * Generated during scanning (e.g., "pillar-el-0").
42
+ * Used to target the element for interactions.
43
+ */
44
+ id: string;
45
+ /**
46
+ * HTML tag name (lowercase).
47
+ * @example "button", "input", "div"
48
+ */
49
+ tag: string;
50
+ /**
51
+ * Semantic element type.
52
+ * Derived from tag, role, or type attribute.
53
+ */
54
+ type: UIElementType;
55
+ /**
56
+ * Human-readable label for the AI.
57
+ * Extracted from aria-label, text content, title, etc.
58
+ */
59
+ label: string;
60
+ /**
61
+ * Whether the element can be interacted with.
62
+ * False if disabled or not interactive.
63
+ */
64
+ interactable: boolean;
65
+ /**
66
+ * List of interactions this element supports.
67
+ * Determined by element type and attributes.
68
+ */
69
+ interactions: UIInteractionType[];
70
+ /**
71
+ * Current value for inputs, textareas, selects.
72
+ */
73
+ value?: string;
74
+ /**
75
+ * Available options for select elements.
76
+ */
77
+ options?: string[];
78
+ /**
79
+ * Placeholder text for inputs/textareas.
80
+ */
81
+ placeholder?: string;
82
+ /**
83
+ * Whether checkbox/radio/switch is checked.
84
+ */
85
+ checked?: boolean;
86
+ /**
87
+ * Whether the element is disabled.
88
+ */
89
+ disabled?: boolean;
90
+ /**
91
+ * Element's bounding rectangle.
92
+ * Useful for understanding layout context.
93
+ */
94
+ rect: UIElementRect;
95
+ /**
96
+ * Relevant attributes from the element.
97
+ * Includes data-pillar-* attributes and key attributes.
98
+ */
99
+ attributes: Record<string, string>;
100
+ /**
101
+ * XPath for precise element targeting.
102
+ * Used as a fallback if ID-based lookup fails.
103
+ */
104
+ xpath: string;
105
+ /**
106
+ * Nearby text or labels for additional context.
107
+ * Helps AI understand the element's purpose.
108
+ */
109
+ context?: string;
110
+ /**
111
+ * Reference to the actual DOM element.
112
+ * Only available client-side, not serialized.
113
+ * @internal
114
+ */
115
+ _element?: HTMLElement;
116
+ }
117
+ /**
118
+ * Scroll position on the page.
119
+ */
120
+ export interface UIScrollPosition {
121
+ x: number;
122
+ y: number;
123
+ }
124
+ /**
125
+ * Page-level UI state.
126
+ *
127
+ * Represents a snapshot of the page's interactable elements
128
+ * at a specific point in time.
129
+ */
130
+ export interface UIPageState {
131
+ /**
132
+ * Current page URL.
133
+ */
134
+ url: string;
135
+ /**
136
+ * Page title.
137
+ */
138
+ title: string;
139
+ /**
140
+ * Timestamp when the scan was performed.
141
+ */
142
+ timestamp: number;
143
+ /**
144
+ * List of interactable elements on the page.
145
+ */
146
+ elements: UIElement[];
147
+ /**
148
+ * ID of the currently focused element, if any.
149
+ */
150
+ focusedElementId?: string;
151
+ /**
152
+ * Current scroll position.
153
+ */
154
+ scrollPosition: UIScrollPosition;
155
+ }
156
+ /**
157
+ * Represents a UI interaction request from the AI.
158
+ */
159
+ export interface UIInteraction {
160
+ /**
161
+ * ID of the element to interact with.
162
+ * Must match an element from UIPageState.elements.
163
+ */
164
+ elementId: string;
165
+ /**
166
+ * Type of interaction to perform.
167
+ */
168
+ action: UIInteractionType;
169
+ /**
170
+ * Value for type/select interactions.
171
+ */
172
+ value?: string;
173
+ /**
174
+ * Additional options for the interaction.
175
+ */
176
+ options?: UIInteractionOptions;
177
+ }
178
+ /**
179
+ * Options for UI interactions.
180
+ */
181
+ export interface UIInteractionOptions {
182
+ /**
183
+ * Whether to clear existing value before typing.
184
+ * Only applies to 'type' action.
185
+ * @default true
186
+ */
187
+ clearBeforeType?: boolean;
188
+ /**
189
+ * Delay in ms between keystrokes for type action.
190
+ * Use 0 for instant typing.
191
+ * @default 0
192
+ */
193
+ typeDelay?: number;
194
+ /**
195
+ * Whether to scroll element into view before interaction.
196
+ * @default true
197
+ */
198
+ scrollIntoView?: boolean;
199
+ /**
200
+ * Whether to wait for element to be visible.
201
+ * @default true
202
+ */
203
+ waitForVisible?: boolean;
204
+ /**
205
+ * Timeout in ms for waiting operations.
206
+ * @default 5000
207
+ */
208
+ timeout?: number;
209
+ }
210
+ /**
211
+ * Result of a UI interaction.
212
+ */
213
+ export interface UIInteractionResult {
214
+ /**
215
+ * Whether the interaction succeeded.
216
+ */
217
+ success: boolean;
218
+ /**
219
+ * Error message if the interaction failed.
220
+ */
221
+ error?: string;
222
+ /**
223
+ * The element ID that was interacted with.
224
+ */
225
+ elementId: string;
226
+ /**
227
+ * The action that was performed.
228
+ */
229
+ action: UIInteractionType;
230
+ /**
231
+ * New value after the interaction (for inputs).
232
+ */
233
+ newValue?: string;
234
+ /**
235
+ * Whether the element is still present after interaction.
236
+ * May be false if clicking caused navigation or element removal.
237
+ */
238
+ elementStillPresent?: boolean;
239
+ /**
240
+ * Any data extracted from the interaction.
241
+ * For example, selected option text.
242
+ */
243
+ data?: Record<string, unknown>;
244
+ }
245
+ /**
246
+ * Simplified element representation for AI context.
247
+ *
248
+ * Contains only essential information to reduce token usage
249
+ * while still providing enough context for the AI.
250
+ */
251
+ export interface UIElementSummary {
252
+ /**
253
+ * Element ID for targeting.
254
+ */
255
+ id: string;
256
+ /**
257
+ * Human-readable label.
258
+ */
259
+ label: string;
260
+ /**
261
+ * Element type (button, input, etc.).
262
+ */
263
+ type: string;
264
+ /**
265
+ * Available interactions.
266
+ */
267
+ interactions: string[];
268
+ /**
269
+ * Current value (if applicable).
270
+ */
271
+ value?: string;
272
+ /**
273
+ * Available options (for selects).
274
+ */
275
+ options?: string[];
276
+ /**
277
+ * Additional context about the element.
278
+ */
279
+ context?: string;
280
+ }
281
+ /**
282
+ * Convert a full UIElement to a summary for AI context.
283
+ */
284
+ export declare function toElementSummary(element: UIElement): UIElementSummary;
285
+ /**
286
+ * Convert UIPageState to a minimal representation for AI context.
287
+ */
288
+ export declare function toPageStateSummary(state: UIPageState): {
289
+ url: string;
290
+ title: string;
291
+ elements: UIElementSummary[];
292
+ focusedElementId?: string;
293
+ };
@@ -0,0 +1,43 @@
1
+ /**
2
+ * OpenTelemetry browser tracing for Pillar SDK.
3
+ *
4
+ * Initialises a WebTracerProvider that exports spans via OTLP/JSON to the
5
+ * backend proxy endpoint (`/mcp/telemetry/v1/traces`). The backend forwards
6
+ * them to Google Cloud Trace so browser and server spans share the same
7
+ * project and can be correlated by trace ID.
8
+ *
9
+ * Tracing is opt-in via `Pillar.init({ tracing: true })` or automatically
10
+ * when `debug: true`.
11
+ */
12
+ import { trace, context, type Tracer, type Span, SpanStatusCode } from '@opentelemetry/api';
13
+ /**
14
+ * Initialise the browser tracing provider.
15
+ *
16
+ * @param apiBaseUrl The SDK's API base URL (e.g. `https://help-api.trypillar.com`)
17
+ * @param attrs Extra resource attributes (product key, visitor id, …)
18
+ */
19
+ export declare function initTracing(apiBaseUrl: string, attrs?: Record<string, string>): Tracer;
20
+ /** Return the active tracer (or a no-op tracer if tracing is not initialised). */
21
+ export declare function getTracer(): Tracer;
22
+ /** Whether tracing has been initialised. */
23
+ export declare function isTracingEnabled(): boolean;
24
+ /**
25
+ * Build a W3C `traceparent` header value from the current active span.
26
+ * Returns `undefined` if there is no active span.
27
+ */
28
+ export declare function getTraceparentHeader(): string | undefined;
29
+ /**
30
+ * Inject `traceparent` (and optionally `tracestate`) into a headers object.
31
+ * Mutates and returns the headers dict.
32
+ */
33
+ export declare function injectTraceHeaders(headers: Record<string, string>): Record<string, string>;
34
+ /**
35
+ * Force-flush any pending spans. Call on page unload or when needed.
36
+ */
37
+ export declare function flushTracing(): Promise<void>;
38
+ /**
39
+ * Shut down the provider (call on SDK destroy).
40
+ */
41
+ export declare function shutdownTracing(): Promise<void>;
42
+ export { trace, context, SpanStatusCode };
43
+ export type { Span };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pillar-ai/sdk",
3
- "version": "0.1.23",
3
+ "version": "0.1.25",
4
4
  "description": "Product copilot SDK for SaaS and web apps — AI assistant that executes tasks, not just answers questions",
5
5
  "type": "module",
6
6
  "main": "./dist/pillar.esm.js",
@@ -65,6 +65,13 @@
65
65
  }
66
66
  },
67
67
  "dependencies": {
68
+ "@opentelemetry/api": "^1.9.0",
69
+ "@opentelemetry/context-zone": "^2.5.1",
70
+ "@opentelemetry/core": "^2.5.1",
71
+ "@opentelemetry/exporter-trace-otlp-http": "^0.212.0",
72
+ "@opentelemetry/resources": "^2.5.1",
73
+ "@opentelemetry/sdk-trace-base": "^2.5.1",
74
+ "@opentelemetry/sdk-trace-web": "^2.5.1",
68
75
  "@preact/signals": "^1.3.1",
69
76
  "marked": "^17.0.1",
70
77
  "preact": "^10.25.4",
@@ -1,16 +0,0 @@
1
- /**
2
- * Tab Navigation Component
3
- * Vertical tabs on the right edge of the panel for switching between Assistant and Support
4
- */
5
- import { h } from 'preact';
6
- import type { ResolvedSupportConfig } from '../../core/config';
7
- interface TabNavigationProps {
8
- supportConfig: ResolvedSupportConfig;
9
- }
10
- export declare function TabNavigation({ supportConfig }: TabNavigationProps): h.JSX.Element;
11
- /**
12
- * CSS Styles for Tab Navigation
13
- * Should be appended to PANEL_STYLES
14
- */
15
- export declare const TAB_NAVIGATION_STYLES = "\n/* ============================================================================\n Panel Wrapper (for tab layout)\n Horizontal flex container with main content + tab nav\n ============================================================================ */\n\n._pillar-panel-wrapper {\n display: flex;\n flex-direction: row;\n height: 100%;\n overflow: hidden;\n}\n\n._pillar-panel-wrapper > ._pillar-panel-ui {\n flex: 1;\n min-width: 0;\n}\n\n.pillar-panel-wrapper {}\n\n/* ============================================================================\n Tab Navigation\n Vertical tabs on the right edge of the panel\n ============================================================================ */\n\n._pillar-tab-nav {\n display: flex;\n flex-direction: column;\n width: 48px;\n min-width: 48px;\n background: var(--pillar-bg-secondary);\n border-left: 1px solid var(--pillar-border);\n padding: var(--pillar-spacing-sm) 0;\n gap: var(--pillar-spacing-xs);\n}\n\n._pillar-tab {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 2px;\n padding: var(--pillar-spacing-sm) var(--pillar-spacing-xs);\n margin: 0 var(--pillar-spacing-xs);\n border: none;\n border-radius: var(--pillar-radius-md);\n background: transparent;\n color: var(--pillar-text-muted);\n cursor: pointer;\n transition: all var(--pillar-transition-fast);\n position: relative;\n}\n\n._pillar-tab:hover {\n background: var(--pillar-bg-tertiary);\n color: var(--pillar-text);\n}\n\n._pillar-tab--active {\n background: var(--pillar-primary-light);\n color: var(--pillar-primary);\n}\n\n._pillar-tab--active:hover {\n background: var(--pillar-primary-light-hover);\n color: var(--pillar-primary);\n}\n\n._pillar-tab-icon {\n width: 20px;\n height: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n._pillar-tab-icon svg {\n width: 100%;\n height: 100%;\n}\n\n._pillar-tab-label {\n font-size: 9px;\n font-weight: 500;\n text-align: center;\n line-height: 1.2;\n max-width: 40px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Public override classes */\n.pillar-tab-nav {}\n.pillar-tab {}\n.pillar-tab-icon {}\n.pillar-tab-label {}\n";
16
- export {};
@@ -1,17 +0,0 @@
1
- /**
2
- * Help Center Articles Component
3
- * Shows contextual articles based on current page + browse option
4
- */
5
- import { h } from 'preact';
6
- interface HelpCenterArticlesProps {
7
- /** Current page path/URL for contextual search */
8
- currentPage?: string;
9
- /** Maximum number of articles to show */
10
- maxArticles?: number;
11
- }
12
- export declare function HelpCenterArticles({ currentPage, maxArticles }: HelpCenterArticlesProps): h.JSX.Element;
13
- /**
14
- * CSS Styles for Help Center Articles
15
- */
16
- export declare const HELP_CENTER_ARTICLES_STYLES = "\n/* ============================================================================\n Help Center Articles\n ============================================================================ */\n\n._pillar-hc-articles {\n display: flex;\n flex-direction: column;\n gap: var(--pillar-spacing-md);\n}\n\n._pillar-hc-articles-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--pillar-spacing-md);\n}\n\n._pillar-hc-articles-title {\n font-size: var(--pillar-font-size-sm);\n font-weight: 600;\n color: var(--pillar-text-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n\n._pillar-hc-articles-browse {\n display: flex;\n align-items: center;\n gap: var(--pillar-spacing-xs);\n padding: var(--pillar-spacing-xs) var(--pillar-spacing-sm);\n background: transparent;\n border: 1px solid var(--pillar-border);\n border-radius: var(--pillar-radius-md);\n font-size: var(--pillar-font-size-sm);\n color: var(--pillar-text-muted);\n cursor: pointer;\n transition: all var(--pillar-transition-fast);\n}\n\n._pillar-hc-articles-browse:hover {\n background: var(--pillar-bg-secondary);\n color: var(--pillar-text);\n border-color: var(--pillar-primary);\n}\n\n._pillar-hc-articles-browse svg {\n width: 14px;\n height: 14px;\n}\n\n._pillar-hc-articles-list {\n display: flex;\n flex-direction: column;\n gap: var(--pillar-spacing-sm);\n}\n\n._pillar-hc-articles-empty {\n padding: var(--pillar-spacing-lg);\n text-align: center;\n color: var(--pillar-text-muted);\n font-size: var(--pillar-font-size-sm);\n}\n\n._pillar-hc-articles-browse-btn {\n margin-top: var(--pillar-spacing-md);\n padding: var(--pillar-spacing-sm) var(--pillar-spacing-lg);\n background: var(--pillar-primary);\n color: white;\n border: none;\n border-radius: var(--pillar-radius-md);\n font-size: var(--pillar-font-size-sm);\n font-weight: 500;\n cursor: pointer;\n transition: all var(--pillar-transition-fast);\n}\n\n._pillar-hc-articles-browse-btn:hover {\n background: var(--pillar-primary-hover);\n}\n\n/* Public override classes */\n.pillar-hc-articles {}\n.pillar-hc-articles-header {}\n.pillar-hc-articles-title {}\n.pillar-hc-articles-browse {}\n.pillar-hc-articles-list {}\n.pillar-hc-articles-empty {}\n.pillar-hc-articles-browse-btn {}\n";
17
- export {};
@@ -1,15 +0,0 @@
1
- /**
2
- * Support View Component
3
- * Displays configurable support channels and help center articles
4
- */
5
- import { h } from 'preact';
6
- import type { ResolvedSupportConfig } from '../../core/config';
7
- interface SupportViewProps {
8
- supportConfig: ResolvedSupportConfig;
9
- }
10
- export declare function SupportView({ supportConfig }: SupportViewProps): h.JSX.Element;
11
- /**
12
- * CSS Styles for Support View
13
- */
14
- export declare const SUPPORT_VIEW_STYLES = "\n/* ============================================================================\n Support View\n ============================================================================ */\n\n._pillar-support-view {\n display: flex;\n flex-direction: column;\n gap: var(--pillar-spacing-md);\n padding: var(--pillar-spacing-lg);\n overflow-y: auto;\n}\n\n._pillar-support-card {\n display: flex;\n align-items: center;\n gap: var(--pillar-spacing-md);\n padding: var(--pillar-spacing-md) var(--pillar-spacing-lg);\n background: var(--pillar-bg-secondary);\n border: 1px solid var(--pillar-border);\n border-radius: var(--pillar-radius-lg);\n cursor: pointer;\n transition: all var(--pillar-transition-fast);\n text-align: left;\n width: 100%;\n}\n\n._pillar-support-card:hover {\n background: var(--pillar-bg-tertiary);\n border-color: var(--pillar-primary);\n}\n\n._pillar-support-card-icon {\n width: 24px;\n height: 24px;\n color: var(--pillar-primary);\n flex-shrink: 0;\n}\n\n._pillar-support-card-icon svg {\n width: 100%;\n height: 100%;\n}\n\n._pillar-support-card-content {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0;\n}\n\n._pillar-support-card-title {\n font-size: var(--pillar-font-size-base);\n font-weight: 500;\n color: var(--pillar-text);\n}\n\n._pillar-support-card-desc {\n font-size: var(--pillar-font-size-sm);\n color: var(--pillar-text-muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n._pillar-support-card-external {\n width: 16px;\n height: 16px;\n color: var(--pillar-text-muted);\n flex-shrink: 0;\n}\n\n._pillar-support-card-external svg {\n width: 100%;\n height: 100%;\n}\n\n._pillar-support-articles {\n margin-top: var(--pillar-spacing-lg);\n padding-top: var(--pillar-spacing-lg);\n border-top: 1px solid var(--pillar-border);\n}\n\n._pillar-support-section-title {\n font-size: var(--pillar-font-size-sm);\n font-weight: 600;\n color: var(--pillar-text-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n margin-bottom: var(--pillar-spacing-md);\n}\n\n/* Public override classes */\n.pillar-support-view {}\n.pillar-support-card {}\n.pillar-support-card-icon {}\n.pillar-support-card-content {}\n.pillar-support-card-title {}\n.pillar-support-card-desc {}\n.pillar-support-card-external {}\n.pillar-support-articles {}\n.pillar-support-section-title {}\n";
15
- export {};
@@ -1,33 +0,0 @@
1
- /**
2
- * Help Desk Utilities
3
- * Functions to trigger external help desk widgets (Intercom, Pylon, Zendesk, Freshdesk)
4
- */
5
- import type { HelpDeskProvider } from '../core/config';
6
- declare global {
7
- interface Window {
8
- Intercom?: (command: string, ...args: unknown[]) => void;
9
- Pylon?: (command: string, ...args: unknown[]) => void;
10
- zE?: (widget: string, command: string, ...args: unknown[]) => void;
11
- FreshworksWidget?: (command: string, ...args: unknown[]) => void;
12
- }
13
- }
14
- /**
15
- * Context to pass to help desk when escalating
16
- */
17
- export interface HelpDeskContext {
18
- conversationSummary?: string;
19
- currentPage?: string;
20
- userId?: string;
21
- }
22
- /**
23
- * Trigger the appropriate help desk widget based on provider
24
- */
25
- export declare function triggerHelpDesk(provider: HelpDeskProvider, context?: HelpDeskContext): boolean;
26
- /**
27
- * Open email client with optional subject and body
28
- */
29
- export declare function openEmail(emailAddress: string, subject?: string, body?: string): void;
30
- /**
31
- * Open a URL in a new tab
32
- */
33
- export declare function openUrl(url: string): void;