@useago/sdk 1.9.0 → 1.12.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +104 -0
  2. package/README.md +53 -0
  3. package/dist/angular.cjs +1 -1
  4. package/dist/angular.d.cts +313 -0
  5. package/dist/angular.d.ts +313 -0
  6. package/dist/angular.js +1 -1
  7. package/dist/{createConversationSession-BaaXBQ5b.js → createConversationSession-B1Qn-y0I.js} +1 -1
  8. package/dist/{createConversationSession-CU0b-t1W.cjs → createConversationSession-B3v_xOU7.cjs} +1 -1
  9. package/dist/{createFormCollector-DfN1xZBy.cjs → createFormCollector-FvwDOqnV.cjs} +1 -1
  10. package/dist/{createFormCollector-Cf7kGhCB.js → createFormCollector-m79zk_NA.js} +1 -1
  11. package/dist/createMockClient-BEOXI8yW.cjs +1 -0
  12. package/dist/{createMockClient-5YF-ZbVu.js → createMockClient-Beao82tu.js} +15 -3
  13. package/dist/devtools.d.cts +313 -0
  14. package/dist/devtools.d.ts +313 -0
  15. package/dist/index.cjs +1 -1
  16. package/dist/index.d.cts +389 -4
  17. package/dist/index.d.ts +389 -4
  18. package/dist/index.js +118 -114
  19. package/dist/react.cjs +1 -1
  20. package/dist/react.d.cts +313 -0
  21. package/dist/react.d.ts +313 -0
  22. package/dist/react.js +8 -6
  23. package/dist/sheetController-BThJRtOu.cjs +1 -0
  24. package/dist/sheetController-aEKXIvjk.js +343 -0
  25. package/dist/testing.cjs +1 -1
  26. package/dist/testing.d.cts +313 -0
  27. package/dist/testing.d.ts +313 -0
  28. package/dist/testing.js +1 -1
  29. package/dist/types-Ct1hlKwg.js +2408 -0
  30. package/dist/types-mcW8vB1U.cjs +10 -0
  31. package/dist/vue.cjs +1 -1
  32. package/dist/vue.d.cts +505 -0
  33. package/dist/vue.d.ts +505 -0
  34. package/dist/vue.js +1 -1
  35. package/dist/widget.cjs +6 -4
  36. package/dist/widget.d.cts +585 -2
  37. package/dist/widget.d.ts +585 -2
  38. package/dist/widget.js +3985 -995
  39. package/llms-full.txt +125 -6
  40. package/package.json +1 -1
  41. package/dist/createMockClient-BZbOe-23.cjs +0 -1
  42. package/dist/sheetController-CBUVOroo.js +0 -205
  43. package/dist/sheetController-DY-sC13T.cjs +0 -1
  44. package/dist/types-CPga11Of.js +0 -2068
  45. package/dist/types-D3YQl1jx.cjs +0 -9
package/dist/vue.d.ts CHANGED
@@ -61,6 +61,7 @@ declare class AgoClient {
61
61
  private contextRegistry;
62
62
  private eventEmitter;
63
63
  private activityLedger;
64
+ private errorWatcher;
64
65
  private lastSentPageState;
65
66
  private config;
66
67
  /** Conversations already warned about an empty reply (one warning each). */
@@ -230,6 +231,26 @@ declare class AgoClient {
230
231
  * `SSEHandler.parseToolCall` so persisted and streamed tool calls match.
231
232
  */
232
233
  private static mapPersistedToolCalls;
234
+ /**
235
+ * The tenant's SDK configuration (`GET /api/sdk/v1/config`): per-permission
236
+ * agents, the ticket form the agent's `ago_ticketing` tool opens, and the
237
+ * file-attachment flag. The vanilla widget fetches it once, when a ticket
238
+ * form first appears in a conversation.
239
+ */
240
+ getConfig(): Promise<SdkConfig>;
241
+ /**
242
+ * The dashboard's home screen content. A starter card shows its
243
+ * `description` and sends its `initial_message`; one with neither is
244
+ * unusable and is dropped rather than rendered as an empty card.
245
+ */
246
+ private static mapHomePage;
247
+ private static mapTicketForm;
248
+ /**
249
+ * Create a support ticket (`POST /api/sdk/v1/tickets`, multipart). This is
250
+ * what the ticket form in the conversation does before it completes the
251
+ * `form` tool call with {@link submitToolCallForm}.
252
+ */
253
+ createTicket(input: CreateTicketInput): Promise<CreateTicketResult>;
233
254
  /**
234
255
  * Get messages for a conversation
235
256
  */
@@ -488,6 +509,15 @@ declare class AgoClient {
488
509
  /* Excluded from this release type: emitProactiveEvent */
489
510
  /* Excluded from this release type: getHttp */
490
511
  /* Excluded from this release type: getConfiguredAgent */
512
+ /**
513
+ * How the SDK identifies the visitor: the configured `userEmail`, and
514
+ * whether a `userJwt` is set. The ticket form asks for an email when it has
515
+ * neither.
516
+ */
517
+ getUserIdentity(): {
518
+ email?: string;
519
+ hasJwt: boolean;
520
+ };
491
521
  /**
492
522
  * Enable automatic capture of the current browser page (URL + title).
493
523
  * Injected as a dynamic context entry named `browser-page`.
@@ -510,6 +540,26 @@ declare class AgoClient {
510
540
  private addActivity;
511
541
  private recordAgentAction;
512
542
  private registerActivityContext;
543
+ /**
544
+ * Start capturing the page's JavaScript errors (uncaught exceptions,
545
+ * unhandled rejections, `console.error` calls, {@link reportError}) and send
546
+ * the recent ones as the `errors:recent` context entry on every message.
547
+ * Same as setting `errorWatcher` in the config. Calling it again replaces
548
+ * the watcher (and its options); the captured errors are not kept.
549
+ */
550
+ enableErrorWatcher(options?: ErrorWatcherOptions): void;
551
+ /** Stop capturing errors and drop the `errors:recent` context entry. */
552
+ disableErrorWatcher(): void;
553
+ /**
554
+ * Record an error the app caught itself (React error boundary, Vue
555
+ * `errorHandler`, Angular `ErrorHandler`, a try/catch) so the agent sees it
556
+ * like an uncaught one. No-op unless the error watcher is enabled. `context`
557
+ * is size-clamped before it is stored; keep it small and free of secrets.
558
+ */
559
+ reportError(error: unknown, context?: Record<string, unknown>): void;
560
+ /** Errors the watcher currently holds, oldest first (a copy). Empty when disabled. */
561
+ getRecentErrors(): CapturedError[];
562
+ clearErrors(): void;
513
563
  /**
514
564
  * Subscribe to an event
515
565
  */
@@ -704,6 +754,12 @@ declare interface AgoClientEvents {
704
754
  };
705
755
  /** A user- or agent-action was recorded into the activity ledger. */
706
756
  "activity:recorded": ActivityEntry;
757
+ /**
758
+ * The error watcher captured a JavaScript error (uncaught exception,
759
+ * unhandled rejection, `console.error` call, or `reportError`). Fires on
760
+ * repeats too, with the updated `count`. Requires `errorWatcher` in the config.
761
+ */
762
+ "error:captured": CapturedError;
707
763
  }
708
764
 
709
765
  /**
@@ -724,6 +780,8 @@ export declare interface AgoConfig {
724
780
  userEmail?: string;
725
781
  /** JWT token for authenticated users */
726
782
  userJwt?: string;
783
+ /** User metadata sent with messages. Use null to stop sending defaults. Not an authentication credential. */
784
+ metadata?: Record<string, unknown> | null;
727
785
  /** Enable debug logging */
728
786
  debug?: boolean;
729
787
  /**
@@ -783,6 +841,18 @@ export declare interface AgoConfig {
783
841
  * default otherwise.
784
842
  */
785
843
  proactive?: ProactiveOptions;
844
+ /**
845
+ * Capture the page's JavaScript errors as agent context. When set, the SDK
846
+ * listens for uncaught exceptions and unhandled promise rejections, wraps
847
+ * `console.error` (calling through; restored on `destroy`), and sends the
848
+ * recent errors (deduplicated, capped, pruned after 10 min) as the
849
+ * `errors:recent` context entry on every message. `true` uses the defaults;
850
+ * pass {@link ErrorWatcherOptions} to tune the caps or add a `filter` that
851
+ * redacts messages. Off by default: error messages can carry PII or internal
852
+ * URLs, so enabling it is the host's call. Errors also feed the proactive
853
+ * mode's `jsErrors` signal. See `client.reportError()` for caught errors.
854
+ */
855
+ errorWatcher?: boolean | ErrorWatcherOptions;
786
856
  }
787
857
 
788
858
  declare type AgoEventHandler<K extends AgoEventName> = (data: AgoClientEvents[K]) => void;
@@ -988,6 +1058,32 @@ declare type AgoStateSetResult = {
988
1058
  result: "unchanged";
989
1059
  };
990
1060
 
1061
+ /** One JavaScript error captured on the page (deduplicated, see `count`). */
1062
+ declare interface CapturedError {
1063
+ type: CapturedErrorType;
1064
+ /** Error message, truncated to 500 chars. */
1065
+ message: string;
1066
+ /** Script URL the error came from, without its query string. */
1067
+ source?: string;
1068
+ line?: number;
1069
+ col?: number;
1070
+ /** Leading stack frames, truncated (see `maxStackChars`). */
1071
+ stack?: string;
1072
+ /** Pathname at capture time. */
1073
+ route: string;
1074
+ /** Epoch ms of the first occurrence. */
1075
+ firstAt: number;
1076
+ /** Epoch ms of the most recent occurrence. */
1077
+ lastAt: number;
1078
+ /** How many times this same error (type + message + source + line) fired. */
1079
+ count: number;
1080
+ /** App-provided context, manual reports only (size-clamped). */
1081
+ context?: Record<string, unknown>;
1082
+ }
1083
+
1084
+ /** How an error reached the watcher. */
1085
+ declare type CapturedErrorType = "error" | "unhandledrejection" | "console" | "manual";
1086
+
991
1087
  /**
992
1088
  * Single-object function definition — combines name, schema, and handler.
993
1089
  *
@@ -1121,6 +1217,30 @@ export declare interface Conversation {
1121
1217
  messages?: AgoMessage[];
1122
1218
  }
1123
1219
 
1220
+ /** Input of `AgoClient.createTicket` (`POST /api/sdk/v1/tickets`). */
1221
+ declare interface CreateTicketInput {
1222
+ subject: string;
1223
+ body: string;
1224
+ priority?: string;
1225
+ typology?: string;
1226
+ /** Conversation the ticket is filed from. */
1227
+ conversationId?: string;
1228
+ /** Reporter email, for a visitor the SDK does not otherwise identify. */
1229
+ email?: string;
1230
+ customFields?: Array<{
1231
+ id: string;
1232
+ value: string;
1233
+ }>;
1234
+ files?: File[];
1235
+ ticketFormId?: string;
1236
+ }
1237
+
1238
+ /** Response of `AgoClient.createTicket`. */
1239
+ declare interface CreateTicketResult {
1240
+ id: string;
1241
+ url?: string;
1242
+ }
1243
+
1124
1244
  /**
1125
1245
  * A function that returns a fresh context entry on demand.
1126
1246
  * Evaluated every time a message is sent — use it to pull data from stores,
@@ -1128,6 +1248,23 @@ export declare interface Conversation {
1128
1248
  */
1129
1249
  declare type DynamicContextProvider = () => ContextEntry | null | undefined;
1130
1250
 
1251
+ declare interface ErrorWatcherOptions {
1252
+ /** Max distinct errors kept. Oldest dropped first. Default 10. */
1253
+ maxErrors?: number;
1254
+ /**
1255
+ * Errors older than this are pruned when the buffer is read, so a crash from
1256
+ * an hour ago does not confuse the agent. Default 600 000 (10 min).
1257
+ */
1258
+ maxAgeMs?: number;
1259
+ /** Max chars of stack kept per error. Default 2000. */
1260
+ maxStackChars?: number;
1261
+ /**
1262
+ * Redact or drop an error before it is stored. Return the (possibly edited)
1263
+ * error to keep it, `null` to drop it. Runs on every capture, so keep it cheap.
1264
+ */
1265
+ filter?: (error: CapturedError) => CapturedError | null;
1266
+ }
1267
+
1131
1268
  /** The four values of {@link FeedbackReason}, in dashboard order. */
1132
1269
  export declare const FEEDBACK_REASONS: readonly FeedbackReason[];
1133
1270
 
@@ -1507,6 +1644,12 @@ declare interface ProactiveTriggerWhen {
1507
1644
  pageState?: Partial<Record<string, unknown>>;
1508
1645
  /** Min rage-click bursts on the current route. */
1509
1646
  rageClicks?: number;
1647
+ /**
1648
+ * Min JavaScript errors captured on the current route. Needs the client's
1649
+ * `errorWatcher` enabled; without it the count stays at 0 and the matcher
1650
+ * never passes.
1651
+ */
1652
+ jsErrors?: number;
1510
1653
  /** Min A→B→A→B route oscillations this session. */
1511
1654
  routeBounces?: number;
1512
1655
  /** Per-field minimum error counts (field NAME → min count). */
@@ -1524,10 +1667,69 @@ declare type ResumeGate = (info: {
1524
1667
  messageId: string;
1525
1668
  }) => Promise<void> | void;
1526
1669
 
1670
+ /** Response of `GET /api/sdk/v1/config` (see `AgoClient.getConfig`). */
1671
+ declare interface SdkConfig {
1672
+ permissions: SdkPermissionConfig[];
1673
+ proactive: {
1674
+ enabled: boolean;
1675
+ };
1676
+ }
1677
+
1678
+ /** The dashboard's home screen content (title, subtitle, starter cards). */
1679
+ declare interface SdkHomePageConfig {
1680
+ title?: string;
1681
+ /** Markdown. */
1682
+ subtitle?: string;
1683
+ starters: SdkHomeStarter[];
1684
+ widgetStarter?: SdkWidgetStarter;
1685
+ }
1686
+
1687
+ /**
1688
+ * A conversation starter card configured in the AGO dashboard. `label` is what
1689
+ * the card shows; clicking it sends `message`.
1690
+ */
1691
+ declare interface SdkHomeStarter {
1692
+ id: string;
1693
+ /** The card's text (the starter's `description` in the dashboard). */
1694
+ label: string;
1695
+ /** What is sent when the card is clicked. */
1696
+ message: string;
1697
+ /** Answer with this agent instead of the configured default. */
1698
+ agentId?: string;
1699
+ }
1700
+
1701
+ /** One permission's configuration in {@link SdkConfig}. */
1702
+ declare interface SdkPermissionConfig {
1703
+ id?: string;
1704
+ name?: string;
1705
+ displayName?: string;
1706
+ agents: Array<{
1707
+ id: string;
1708
+ name?: string;
1709
+ }>;
1710
+ ticketForm?: TicketForm;
1711
+ /** Home screen content, when the tenant configured one. */
1712
+ homePage?: SdkHomePageConfig;
1713
+ fileAttachmentsEnabled: boolean;
1714
+ voiceEnabled: boolean;
1715
+ }
1716
+
1717
+ /**
1718
+ * The starter the dashboard sends by itself on a fresh visit, before the
1719
+ * visitor types anything.
1720
+ */
1721
+ declare interface SdkWidgetStarter {
1722
+ id: string;
1723
+ message: string;
1724
+ agentId?: string;
1725
+ }
1726
+
1527
1727
  /**
1528
1728
  * Options for sending a message
1529
1729
  */
1530
1730
  declare interface SendMessageOptions {
1731
+ /** Replaces config.metadata for this message; null omits metadata for this message. */
1732
+ metadata?: Record<string, unknown> | null;
1531
1733
  /** Existing conversation ID */
1532
1734
  conversationId?: string;
1533
1735
  /** Override default agent */
@@ -1576,6 +1778,12 @@ declare interface SignalsSnapshot {
1576
1778
  idleMs: number;
1577
1779
  /** Rage-click bursts detected on the current route. */
1578
1780
  rageClicks: number;
1781
+ /**
1782
+ * JavaScript errors captured on the current route (count only; the messages
1783
+ * travel in `client_context` under `errors:recent`). Always `0` unless the
1784
+ * client has `errorWatcher` enabled.
1785
+ */
1786
+ jsErrors: number;
1579
1787
  /**
1580
1788
  * A→B→A→B route oscillations detected in the recent route sequence. Rolling
1581
1789
  * session counter (cross-route by nature); trigger cooldowns and dismissal
@@ -1634,6 +1842,13 @@ declare interface SSEChunkData {
1634
1842
  follow_up_replies?: string[];
1635
1843
  satisfaction_feedback?: unknown;
1636
1844
  ask_to_talk_to_human?: boolean;
1845
+ allowed_to_create_ticket?: boolean;
1846
+ ticket?: ToolCallTicketPrefill;
1847
+ mode?: "form" | "embed";
1848
+ ticket_form_id?: string;
1849
+ embed_html?: string;
1850
+ embed_description?: string;
1851
+ display_mode?: "collapsible" | "display" | "both";
1637
1852
  /** Tool call ids still awaiting a client result, sent with the final `WAITING_CLIENT` event. */
1638
1853
  waiting_tool_call_ids?: string[];
1639
1854
  }
@@ -1708,12 +1923,82 @@ declare type SubmitConfig<V = Record<string, unknown>> = string | {
1708
1923
  declare interface SubmitToolCallResult {
1709
1924
  status: string;
1710
1925
  result?: unknown;
1926
+ /** Set when `status` is `"error"`. */
1927
+ error?: string;
1928
+ /** The ticket a ticketing `form` tool call resolved to, when it did. */
1929
+ ticket?: {
1930
+ ticket_id: string;
1931
+ ticket_url?: string;
1932
+ [key: string]: unknown;
1933
+ };
1711
1934
  resume?: {
1712
1935
  message_id: string;
1713
1936
  ready: boolean;
1714
1937
  };
1715
1938
  }
1716
1939
 
1940
+ /** A custom field of a ticket form. */
1941
+ declare interface TicketField {
1942
+ id: string;
1943
+ /** The key the ticketing backend expects; used as the submit key when set. */
1944
+ externalId?: string;
1945
+ title?: string;
1946
+ /** Field kind, e.g. `"text"`, `"checkbox"`, `"tagger"`. */
1947
+ type?: string;
1948
+ required: boolean;
1949
+ /** Carried in the submission but never shown. */
1950
+ hidden: boolean;
1951
+ active?: boolean;
1952
+ /** Bypass progressive disclosure, while still respecting conditions. */
1953
+ alwaysVisible?: boolean;
1954
+ regexpForValidation?: string;
1955
+ position: number;
1956
+ /** Non-empty turns the field into a select. */
1957
+ options: TicketFieldOption[];
1958
+ /** Show this field only when the parent field holds `conditionalFieldValue`. */
1959
+ conditionalFieldId?: string;
1960
+ /** Legacy comma-separated condition values. */
1961
+ conditionalFieldValue?: string;
1962
+ /** Takes precedence over conditionalFieldValue when non-empty. */
1963
+ conditionalFieldValues?: string[];
1964
+ }
1965
+
1966
+ /** An option of a ticket form field (`GET /config` → `ticket_form.fields[].options[]`). */
1967
+ declare interface TicketFieldOption {
1968
+ id: string;
1969
+ /** Label shown to the user. */
1970
+ name?: string;
1971
+ /** Value submitted. Falls back to `name` when absent. */
1972
+ value?: string;
1973
+ /** Preselected when the form opens. */
1974
+ default: boolean;
1975
+ /** A note shown under the field once this option is picked. */
1976
+ message?: string;
1977
+ messageType: "info" | "warning" | "danger";
1978
+ position?: number;
1979
+ group?: string;
1980
+ noDisplay?: boolean;
1981
+ conditionalFieldId?: string;
1982
+ /** Available when the parent matches any of these values. */
1983
+ conditionalFieldValues?: string[];
1984
+ }
1985
+
1986
+ /** The ticket form an agent's `ago_ticketing` tool opens in the conversation. */
1987
+ declare interface TicketForm {
1988
+ id: string;
1989
+ name?: string;
1990
+ /** `"form"` renders the SDK's own fields; `"embed"` hosts third-party HTML. */
1991
+ mode: "form" | "embed";
1992
+ showSubject: boolean;
1993
+ showBody: boolean;
1994
+ showPriority: boolean;
1995
+ showTypology: boolean;
1996
+ priorityTypologies?: string[];
1997
+ successMessageText?: string;
1998
+ successMessageUrlLabel?: string;
1999
+ fields: TicketField[];
2000
+ }
2001
+
1717
2002
  /**
1718
2003
  * Tool call data from SSE stream
1719
2004
  */
@@ -1728,6 +2013,34 @@ export declare interface ToolCallData {
1728
2013
  data?: Record<string, unknown>;
1729
2014
  functionName?: string;
1730
2015
  arguments?: Record<string, unknown>;
2016
+ /**
2017
+ * Where the hosted widget shows the call: in the collapsible "reasoning"
2018
+ * section, in the message body, or both. Absent means collapsible only.
2019
+ */
2020
+ displayMode?: "collapsible" | "display" | "both";
2021
+ /** The user asked to talk to a human. */
2022
+ askToTalkToHuman?: boolean;
2023
+ /** `false` when the tenant blocks ticket creation for this visitor. */
2024
+ allowedToCreateTicket?: boolean;
2025
+ /** Fields the agent pre-filled from the conversation. */
2026
+ ticket?: ToolCallTicketPrefill;
2027
+ /** `"embed"` hosts third-party HTML (`embedHtml`); otherwise the SDK's form. */
2028
+ mode?: "form" | "embed";
2029
+ ticketFormId?: string;
2030
+ embedHtml?: string;
2031
+ embedDescription?: string;
2032
+ }
2033
+
2034
+ /** The ticket the agent pre-filled on a ticketing `form` tool call. */
2035
+ declare interface ToolCallTicketPrefill {
2036
+ subject?: string;
2037
+ body?: string;
2038
+ typology?: string;
2039
+ priority?: string;
2040
+ tag?: string;
2041
+ products?: string[];
2042
+ /** Keyed by the field's external id, or a lowercased, underscored title. */
2043
+ custom_fields?: Record<string, string>;
1731
2044
  }
1732
2045
 
1733
2046
  declare type ToolCallType = "form" | "confirmation_input" | "status_message" | "progress_indicator" | "client_function" | "reasoning" | "mcp_ui_resource";
@@ -1886,6 +2199,22 @@ export declare function useChat(options?: UseChatOptions): {
1886
2199
  data?: Record<string, unknown> | undefined;
1887
2200
  functionName?: string | undefined;
1888
2201
  arguments?: Record<string, unknown> | undefined;
2202
+ displayMode?: "collapsible" | "display" | "both" | undefined;
2203
+ askToTalkToHuman?: boolean | undefined;
2204
+ allowedToCreateTicket?: boolean | undefined;
2205
+ ticket?: {
2206
+ subject?: string | undefined;
2207
+ body?: string | undefined;
2208
+ typology?: string | undefined;
2209
+ priority?: string | undefined;
2210
+ tag?: string | undefined;
2211
+ products?: string[] | undefined;
2212
+ custom_fields?: Record<string, string> | undefined;
2213
+ } | undefined;
2214
+ mode?: "form" | "embed" | undefined;
2215
+ ticketFormId?: string | undefined;
2216
+ embedHtml?: string | undefined;
2217
+ embedDescription?: string | undefined;
1889
2218
  }[] | undefined;
1890
2219
  followUpReplies?: string[] | undefined;
1891
2220
  attachments?: {
@@ -1929,6 +2258,22 @@ export declare function useChat(options?: UseChatOptions): {
1929
2258
  data?: Record<string, unknown> | undefined;
1930
2259
  functionName?: string | undefined;
1931
2260
  arguments?: Record<string, unknown> | undefined;
2261
+ displayMode?: "collapsible" | "display" | "both" | undefined;
2262
+ askToTalkToHuman?: boolean | undefined;
2263
+ allowedToCreateTicket?: boolean | undefined;
2264
+ ticket?: {
2265
+ subject?: string | undefined;
2266
+ body?: string | undefined;
2267
+ typology?: string | undefined;
2268
+ priority?: string | undefined;
2269
+ tag?: string | undefined;
2270
+ products?: string[] | undefined;
2271
+ custom_fields?: Record<string, string> | undefined;
2272
+ } | undefined;
2273
+ mode?: "form" | "embed" | undefined;
2274
+ ticketFormId?: string | undefined;
2275
+ embedHtml?: string | undefined;
2276
+ embedDescription?: string | undefined;
1932
2277
  }[] | undefined;
1933
2278
  followUpReplies?: string[] | undefined;
1934
2279
  attachments?: {
@@ -1983,6 +2328,22 @@ export declare function useChat(options?: UseChatOptions): {
1983
2328
  data?: Record<string, unknown> | undefined;
1984
2329
  functionName?: string | undefined;
1985
2330
  arguments?: Record<string, unknown> | undefined;
2331
+ displayMode?: "collapsible" | "display" | "both" | undefined;
2332
+ askToTalkToHuman?: boolean | undefined;
2333
+ allowedToCreateTicket?: boolean | undefined;
2334
+ ticket?: {
2335
+ subject?: string | undefined;
2336
+ body?: string | undefined;
2337
+ typology?: string | undefined;
2338
+ priority?: string | undefined;
2339
+ tag?: string | undefined;
2340
+ products?: string[] | undefined;
2341
+ custom_fields?: Record<string, string> | undefined;
2342
+ } | undefined;
2343
+ mode?: "form" | "embed" | undefined;
2344
+ ticketFormId?: string | undefined;
2345
+ embedHtml?: string | undefined;
2346
+ embedDescription?: string | undefined;
1986
2347
  }[] | undefined;
1987
2348
  followUpReplies?: string[] | undefined;
1988
2349
  attachments?: {
@@ -2031,6 +2392,22 @@ export declare function useChat(options?: UseChatOptions): {
2031
2392
  data?: Record<string, unknown> | undefined;
2032
2393
  functionName?: string | undefined;
2033
2394
  arguments?: Record<string, unknown> | undefined;
2395
+ displayMode?: "collapsible" | "display" | "both" | undefined;
2396
+ askToTalkToHuman?: boolean | undefined;
2397
+ allowedToCreateTicket?: boolean | undefined;
2398
+ ticket?: {
2399
+ subject?: string | undefined;
2400
+ body?: string | undefined;
2401
+ typology?: string | undefined;
2402
+ priority?: string | undefined;
2403
+ tag?: string | undefined;
2404
+ products?: string[] | undefined;
2405
+ custom_fields?: Record<string, string> | undefined;
2406
+ } | undefined;
2407
+ mode?: "form" | "embed" | undefined;
2408
+ ticketFormId?: string | undefined;
2409
+ embedHtml?: string | undefined;
2410
+ embedDescription?: string | undefined;
2034
2411
  }[] | undefined;
2035
2412
  followUpReplies?: string[] | undefined;
2036
2413
  attachments?: {
@@ -2080,6 +2457,22 @@ export declare function useChat(options?: UseChatOptions): {
2080
2457
  data?: Record<string, unknown> | undefined;
2081
2458
  functionName?: string | undefined;
2082
2459
  arguments?: Record<string, unknown> | undefined;
2460
+ displayMode?: "collapsible" | "display" | "both" | undefined;
2461
+ askToTalkToHuman?: boolean | undefined;
2462
+ allowedToCreateTicket?: boolean | undefined;
2463
+ ticket?: {
2464
+ subject?: string | undefined;
2465
+ body?: string | undefined;
2466
+ typology?: string | undefined;
2467
+ priority?: string | undefined;
2468
+ tag?: string | undefined;
2469
+ products?: string[] | undefined;
2470
+ custom_fields?: Record<string, string> | undefined;
2471
+ } | undefined;
2472
+ mode?: "form" | "embed" | undefined;
2473
+ ticketFormId?: string | undefined;
2474
+ embedHtml?: string | undefined;
2475
+ embedDescription?: string | undefined;
2083
2476
  }[] | undefined;
2084
2477
  followUpReplies?: string[] | undefined;
2085
2478
  attachments?: {
@@ -2128,6 +2521,22 @@ export declare function useChat(options?: UseChatOptions): {
2128
2521
  data?: Record<string, unknown> | undefined;
2129
2522
  functionName?: string | undefined;
2130
2523
  arguments?: Record<string, unknown> | undefined;
2524
+ displayMode?: "collapsible" | "display" | "both" | undefined;
2525
+ askToTalkToHuman?: boolean | undefined;
2526
+ allowedToCreateTicket?: boolean | undefined;
2527
+ ticket?: {
2528
+ subject?: string | undefined;
2529
+ body?: string | undefined;
2530
+ typology?: string | undefined;
2531
+ priority?: string | undefined;
2532
+ tag?: string | undefined;
2533
+ products?: string[] | undefined;
2534
+ custom_fields?: Record<string, string> | undefined;
2535
+ } | undefined;
2536
+ mode?: "form" | "embed" | undefined;
2537
+ ticketFormId?: string | undefined;
2538
+ embedHtml?: string | undefined;
2539
+ embedDescription?: string | undefined;
2131
2540
  }[] | undefined;
2132
2541
  followUpReplies?: string[] | undefined;
2133
2542
  attachments?: {
@@ -2197,6 +2606,22 @@ export declare function useConversation(options?: UseConversationOptions): {
2197
2606
  data?: Record<string, unknown> | undefined;
2198
2607
  functionName?: string | undefined;
2199
2608
  arguments?: Record<string, unknown> | undefined;
2609
+ displayMode?: "collapsible" | "display" | "both" | undefined;
2610
+ askToTalkToHuman?: boolean | undefined;
2611
+ allowedToCreateTicket?: boolean | undefined;
2612
+ ticket?: {
2613
+ subject?: string | undefined;
2614
+ body?: string | undefined;
2615
+ typology?: string | undefined;
2616
+ priority?: string | undefined;
2617
+ tag?: string | undefined;
2618
+ products?: string[] | undefined;
2619
+ custom_fields?: Record<string, string> | undefined;
2620
+ } | undefined;
2621
+ mode?: "form" | "embed" | undefined;
2622
+ ticketFormId?: string | undefined;
2623
+ embedHtml?: string | undefined;
2624
+ embedDescription?: string | undefined;
2200
2625
  }[] | undefined;
2201
2626
  followUpReplies?: string[] | undefined;
2202
2627
  attachments?: {
@@ -2245,6 +2670,22 @@ export declare function useConversation(options?: UseConversationOptions): {
2245
2670
  data?: Record<string, unknown> | undefined;
2246
2671
  functionName?: string | undefined;
2247
2672
  arguments?: Record<string, unknown> | undefined;
2673
+ displayMode?: "collapsible" | "display" | "both" | undefined;
2674
+ askToTalkToHuman?: boolean | undefined;
2675
+ allowedToCreateTicket?: boolean | undefined;
2676
+ ticket?: {
2677
+ subject?: string | undefined;
2678
+ body?: string | undefined;
2679
+ typology?: string | undefined;
2680
+ priority?: string | undefined;
2681
+ tag?: string | undefined;
2682
+ products?: string[] | undefined;
2683
+ custom_fields?: Record<string, string> | undefined;
2684
+ } | undefined;
2685
+ mode?: "form" | "embed" | undefined;
2686
+ ticketFormId?: string | undefined;
2687
+ embedHtml?: string | undefined;
2688
+ embedDescription?: string | undefined;
2248
2689
  }[] | undefined;
2249
2690
  followUpReplies?: string[] | undefined;
2250
2691
  attachments?: {
@@ -2294,6 +2735,22 @@ export declare function useConversation(options?: UseConversationOptions): {
2294
2735
  data?: Record<string, unknown> | undefined;
2295
2736
  functionName?: string | undefined;
2296
2737
  arguments?: Record<string, unknown> | undefined;
2738
+ displayMode?: "collapsible" | "display" | "both" | undefined;
2739
+ askToTalkToHuman?: boolean | undefined;
2740
+ allowedToCreateTicket?: boolean | undefined;
2741
+ ticket?: {
2742
+ subject?: string | undefined;
2743
+ body?: string | undefined;
2744
+ typology?: string | undefined;
2745
+ priority?: string | undefined;
2746
+ tag?: string | undefined;
2747
+ products?: string[] | undefined;
2748
+ custom_fields?: Record<string, string> | undefined;
2749
+ } | undefined;
2750
+ mode?: "form" | "embed" | undefined;
2751
+ ticketFormId?: string | undefined;
2752
+ embedHtml?: string | undefined;
2753
+ embedDescription?: string | undefined;
2297
2754
  }[] | undefined;
2298
2755
  followUpReplies?: string[] | undefined;
2299
2756
  attachments?: {
@@ -2342,6 +2799,22 @@ export declare function useConversation(options?: UseConversationOptions): {
2342
2799
  data?: Record<string, unknown> | undefined;
2343
2800
  functionName?: string | undefined;
2344
2801
  arguments?: Record<string, unknown> | undefined;
2802
+ displayMode?: "collapsible" | "display" | "both" | undefined;
2803
+ askToTalkToHuman?: boolean | undefined;
2804
+ allowedToCreateTicket?: boolean | undefined;
2805
+ ticket?: {
2806
+ subject?: string | undefined;
2807
+ body?: string | undefined;
2808
+ typology?: string | undefined;
2809
+ priority?: string | undefined;
2810
+ tag?: string | undefined;
2811
+ products?: string[] | undefined;
2812
+ custom_fields?: Record<string, string> | undefined;
2813
+ } | undefined;
2814
+ mode?: "form" | "embed" | undefined;
2815
+ ticketFormId?: string | undefined;
2816
+ embedHtml?: string | undefined;
2817
+ embedDescription?: string | undefined;
2345
2818
  }[] | undefined;
2346
2819
  followUpReplies?: string[] | undefined;
2347
2820
  attachments?: {
@@ -2434,6 +2907,22 @@ export declare function useMessages(options?: UseMessagesOptions): {
2434
2907
  data?: Record<string, unknown> | undefined;
2435
2908
  functionName?: string | undefined;
2436
2909
  arguments?: Record<string, unknown> | undefined;
2910
+ displayMode?: "collapsible" | "display" | "both" | undefined;
2911
+ askToTalkToHuman?: boolean | undefined;
2912
+ allowedToCreateTicket?: boolean | undefined;
2913
+ ticket?: {
2914
+ subject?: string | undefined;
2915
+ body?: string | undefined;
2916
+ typology?: string | undefined;
2917
+ priority?: string | undefined;
2918
+ tag?: string | undefined;
2919
+ products?: string[] | undefined;
2920
+ custom_fields?: Record<string, string> | undefined;
2921
+ } | undefined;
2922
+ mode?: "form" | "embed" | undefined;
2923
+ ticketFormId?: string | undefined;
2924
+ embedHtml?: string | undefined;
2925
+ embedDescription?: string | undefined;
2437
2926
  }[] | undefined;
2438
2927
  followUpReplies?: string[] | undefined;
2439
2928
  attachments?: {
@@ -2477,6 +2966,22 @@ export declare function useMessages(options?: UseMessagesOptions): {
2477
2966
  data?: Record<string, unknown> | undefined;
2478
2967
  functionName?: string | undefined;
2479
2968
  arguments?: Record<string, unknown> | undefined;
2969
+ displayMode?: "collapsible" | "display" | "both" | undefined;
2970
+ askToTalkToHuman?: boolean | undefined;
2971
+ allowedToCreateTicket?: boolean | undefined;
2972
+ ticket?: {
2973
+ subject?: string | undefined;
2974
+ body?: string | undefined;
2975
+ typology?: string | undefined;
2976
+ priority?: string | undefined;
2977
+ tag?: string | undefined;
2978
+ products?: string[] | undefined;
2979
+ custom_fields?: Record<string, string> | undefined;
2980
+ } | undefined;
2981
+ mode?: "form" | "embed" | undefined;
2982
+ ticketFormId?: string | undefined;
2983
+ embedHtml?: string | undefined;
2984
+ embedDescription?: string | undefined;
2480
2985
  }[] | undefined;
2481
2986
  followUpReplies?: string[] | undefined;
2482
2987
  attachments?: {