@aikaara/chat-sdk 0.8.2 → 0.8.4

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/index.d.ts CHANGED
@@ -293,7 +293,17 @@ export declare class ApiClient {
293
293
  private apiKey?;
294
294
  private authToken?;
295
295
  protected userToken: string;
296
+ private refreshHook;
296
297
  constructor(baseUrl: string, userToken: string, apiKey?: string, authToken?: string);
298
+ /**
299
+ * Install a refresh hook. When a request returns 401 the client invokes
300
+ * the hook, replaces its in-memory `authToken`, and retries exactly once.
301
+ */
302
+ setAuthRefreshHook(hook: AuthRefreshHook | null): void;
303
+ /** Surface the current bearer (e.g. for upload adapters that share it). */
304
+ getAuthToken(): string | undefined;
305
+ /** Replace the bearer used by subsequent requests. */
306
+ setAuthToken(next: string | undefined): void;
297
307
  createConversation(params: {
298
308
  systemPromptId?: number;
299
309
  channel?: string;
@@ -304,8 +314,17 @@ export declare class ApiClient {
304
314
  getMessages(conversationId: string): Promise<Message[]>;
305
315
  private mapMessage;
306
316
  private request;
317
+ private fetchWithHeaders;
307
318
  }
308
319
 
320
+ export declare type ApiPanelFieldFormat = 'text' | 'currency' | 'date' | 'number';
321
+
322
+ export declare type ApiPanelRefresh = 'load' | 'assistant' | 'interval' | '30s' | '5m' | 'manual';
323
+
324
+ export declare type ApiPanelRender = 'fields' | 'steps';
325
+
326
+ export declare type ApiPanelSource = 'api' | 'paste';
327
+
309
328
  export declare interface AppContext {
310
329
  /** Current page/route path in the host app (e.g., '/products/42') */
311
330
  currentPage: string;
@@ -321,6 +340,30 @@ export declare interface AppContext {
321
340
  custom?: Record<string, unknown>;
322
341
  }
323
342
 
343
+ /**
344
+ * Static page metadata written by the dashboard's App Layout tab.
345
+ * The hosted-shell renders top/bottom nav from this list; SDK code
346
+ * doesn't consume it.
347
+ */
348
+ export declare interface AppPageDef {
349
+ id: string;
350
+ name: string;
351
+ /** Icon name from the shell's icon set (Chat, Sparkle, Book, …). */
352
+ icon?: string;
353
+ /** `"chat"` (default surface) or `"static"` (placeholder). */
354
+ kind?: 'chat' | 'static';
355
+ hint?: string;
356
+ }
357
+
358
+ /**
359
+ * Hook the API client uses to recover from a 401. Wired up by the higher
360
+ * level mount when `descriptor.sso.autoRefresh === true`: the discovered
361
+ * partner token is re-read, exchanged for a fresh chat JWT, and the
362
+ * `authToken` field below is updated in place so the retry sends the new
363
+ * bearer. Returning `null` (or throwing) lets the original 401 propagate.
364
+ */
365
+ declare type AuthRefreshHook = () => Promise<string | null>;
366
+
324
367
  export declare class ChannelSubscription {
325
368
  readonly identifier: string;
326
369
  private callbacks;
@@ -475,6 +518,16 @@ export declare class ConversationManager {
475
518
  private saveToStorage;
476
519
  }
477
520
 
521
+ export declare interface CookieSourceConfig {
522
+ /** Cookie name. */
523
+ name?: string;
524
+ /**
525
+ * Informational only. The browser enforces the actual domain scope; we
526
+ * surface this so dashboards can document intent.
527
+ */
528
+ domain?: string;
529
+ }
530
+
478
531
  declare interface CreateConversationResponse {
479
532
  id: string;
480
533
  status: string;
@@ -488,6 +541,23 @@ export declare function createTiledeskHistoryAdapter(config: TiledeskHistoryAdap
488
541
 
489
542
  export declare type CredentialProviders = Record<string, () => string | Promise<string>>;
490
543
 
544
+ export declare interface DiscoveredToken {
545
+ /** The raw partner token. */
546
+ token: string;
547
+ /** Echoed so callers can log + alert when the source changes mid-flow. */
548
+ source: TokenSourceKind;
549
+ }
550
+
551
+ /**
552
+ * Dispatcher. Resolves the partner token according to
553
+ * `descriptor.tokenSource`. Returns a Promise so async-only sources
554
+ * (`postmsg`, `global`) share the same surface as synchronous ones.
555
+ *
556
+ * Throws when the token can't be found — callers decide whether to
557
+ * fall back to a login screen (per `descriptor.fallback`).
558
+ */
559
+ export declare function discoverToken(opts: TokenDiscoveryOptions): Promise<DiscoveredToken>;
560
+
491
561
  export declare interface EditEntityAction {
492
562
  action: 'edit_entity';
493
563
  entity_type: string;
@@ -665,8 +735,25 @@ export declare interface FormRegistration {
665
735
  getCurrentValues: () => Record<string, unknown>;
666
736
  }
667
737
 
738
+ export declare interface GlobalSourceConfig {
739
+ /** Dot-path into `window` (e.g. `"PartnerSDK.session.token"`). */
740
+ path?: string;
741
+ /** Max poll time in ms (default 2000). */
742
+ timeoutMs?: number;
743
+ /** Poll interval in ms (default 100). */
744
+ intervalMs?: number;
745
+ }
746
+
747
+ export declare interface HashSourceConfig {
748
+ /** Hash key (after `#…&key=value&…`). Default `"token"`. */
749
+ key?: string;
750
+ }
751
+
668
752
  export declare function inferTiledeskRole(message: TiledeskMessage, cfg: TiledeskRoleConfig): TiledeskRole;
669
753
 
754
+ export declare interface InitSourceConfig {
755
+ }
756
+
670
757
  /**
671
758
  * Self-echo detector — Tiledesk fans the user's outgoing publish back
672
759
  * as a `clientadded` event on the same connection. UI must dedupe against
@@ -802,6 +889,21 @@ export declare interface NavigateAction {
802
889
 
803
890
  export declare function parseTiledeskTemplate(message: TiledeskMessage): TiledeskParsedTemplate;
804
891
 
892
+ export declare interface PostMsgSourceConfig {
893
+ /** Message envelope `type` field that gates which postMessage we accept. */
894
+ type?: string;
895
+ /** Property inside `event.data` carrying the token. Default `"token"`. */
896
+ key?: string;
897
+ /**
898
+ * Allowed origins (comma-separated or single string). When set, messages
899
+ * from any other origin are ignored. When unset every origin is accepted
900
+ * — partners are encouraged to set this in production.
901
+ */
902
+ origins?: string;
903
+ /** Milliseconds to wait before rejecting. Default 30_000. */
904
+ timeoutMs?: number;
905
+ }
906
+
805
907
  /**
806
908
  * One HTTP call run by the SDK before auth. Failure of `soft: true` steps
807
909
  * is logged and ignored; failure of strict steps aborts the mount.
@@ -851,6 +953,11 @@ export declare interface Presigned3StepAdapterConfig {
851
953
  extraHeaders?: Record<string, string>;
852
954
  }
853
955
 
956
+ export declare interface QuerySourceConfig {
957
+ /** Query-string parameter name. Default `"token"`. */
958
+ key?: string;
959
+ }
960
+
854
961
  export declare function registerComponents(): void;
855
962
 
856
963
  /**
@@ -858,7 +965,7 @@ export declare function registerComponents(): void;
858
965
  * loader runs. Both kinds resolve to a `Promise<HTMLElement>` after load,
859
966
  * which the runtime appends into the slot anchor.
860
967
  */
861
- declare type RemoteComponent = {
968
+ export declare type RemoteComponent = {
862
969
  kind: 'iife-element';
863
970
  /** URL of an IIFE bundle that calls `customElements.define(tag, …)`. */
864
971
  scriptUrl: string;
@@ -899,7 +1006,7 @@ declare type RemoteComponent = {
899
1006
  * `redirectIfFails` lets a guard send the user to another route id
900
1007
  * instead of erroring. Useful for `'authed'` failing → redirect to login.
901
1008
  */
902
- declare interface RouteDef {
1009
+ export declare interface RouteDef {
903
1010
  path: string;
904
1011
  component: string;
905
1012
  guards?: string[];
@@ -970,6 +1077,41 @@ export declare interface SessionAuthDescriptor {
970
1077
 
971
1078
  export declare type SessionTokenProvider = string | (() => string | Promise<string>);
972
1079
 
1080
+ export declare interface SidePanelDef {
1081
+ enabled?: boolean;
1082
+ type: SidePanelType;
1083
+ title?: string;
1084
+ mobile?: SidePanelMobile;
1085
+ steps?: Array<{
1086
+ name: string;
1087
+ hint?: string;
1088
+ }>;
1089
+ emptyText?: string;
1090
+ allowUpload?: boolean;
1091
+ summaryFields?: string[];
1092
+ supportPhone?: string;
1093
+ supportHours?: string;
1094
+ showHumanHandoff?: boolean;
1095
+ source?: ApiPanelSource;
1096
+ endpoint?: string;
1097
+ sampleJson?: string;
1098
+ refresh?: ApiPanelRefresh;
1099
+ intervalSec?: number;
1100
+ render?: ApiPanelRender;
1101
+ fields?: Array<{
1102
+ label: string;
1103
+ path: string;
1104
+ format?: ApiPanelFieldFormat;
1105
+ }>;
1106
+ stepsPath?: string;
1107
+ stepStatusKey?: string;
1108
+ customUrl?: string;
1109
+ }
1110
+
1111
+ export declare type SidePanelMobile = 'drawer' | 'hidden';
1112
+
1113
+ export declare type SidePanelType = 'steps' | 'files' | 'summary' | 'support' | 'api' | 'custom';
1114
+
973
1115
  export declare interface SlugMountedWidget extends MountedTenantWidget {
974
1116
  fullName: string;
975
1117
  /** Resolved descriptor (fallback ⊕ fetched ⊕ overrides). Host reads
@@ -977,6 +1119,13 @@ export declare interface SlugMountedWidget extends MountedTenantWidget {
977
1119
  descriptor: WidgetConfigDescriptor;
978
1120
  /** Force a fresh /chatbuddy/auth-style refetch (clears cached requestId). */
979
1121
  refreshAuth(): Promise<void>;
1122
+ /**
1123
+ * Re-discover the partner token (per `descriptor.sso.tokenSource`) and
1124
+ * re-exchange for a fresh chat JWT. Returns the new bearer or null when
1125
+ * discovery fails. Only available when `descriptor.sso.autoRefresh` is
1126
+ * `true`; returns `null` immediately otherwise.
1127
+ */
1128
+ refreshPartnerAuth(): Promise<string | null>;
980
1129
  }
981
1130
 
982
1131
  export declare interface SlugMountOptions {
@@ -1020,6 +1169,13 @@ export declare interface SlugMountOptions {
1020
1169
  * without host code per call.
1021
1170
  */
1022
1171
  identity?: Record<string, string | undefined>;
1172
+ /**
1173
+ * Partner token supplied directly by the embedding host. Used by
1174
+ * `descriptor.sso.tokenSource === "init"` (v2 sign-in flow) — every
1175
+ * other source kind discovers the token from the page itself
1176
+ * (query / hash / cookie / storage / postMessage / global).
1177
+ */
1178
+ partnerToken?: string;
1023
1179
  };
1024
1180
  /** Optional escape hatches; merge over descriptor-driven defaults. */
1025
1181
  hooks?: {
@@ -1080,8 +1236,51 @@ export declare interface SsoDescriptor {
1080
1236
  apiKey?: string;
1081
1237
  /** Extra static headers attached to the exchange POST. */
1082
1238
  headers?: Record<string, string>;
1083
- /** Browser credential collection spec. */
1084
- collect: SsoCollectSpec[];
1239
+ /**
1240
+ * Legacy v1 shape — explicit list of credential sources the browser
1241
+ * reads + posts to the exchange endpoint. Still supported for the
1242
+ * bandhan-itr / myfinancials cohort that shipped before the v2
1243
+ * sign-in tab. Mutually exclusive with `tokenSource` (v2).
1244
+ */
1245
+ collect?: SsoCollectSpec[];
1246
+ /** Provider family. `"partner"` is the only value today. */
1247
+ provider?: string;
1248
+ /** Recipe id paired with this descriptor (e.g. `partner_token_to_backend_jwt`). */
1249
+ flow?: string;
1250
+ /** Skip the login screen entirely — read token, exchange, mount chat. */
1251
+ skipLogin?: boolean;
1252
+ /** Re-read the token source on any request that 401s. */
1253
+ autoRefresh?: boolean;
1254
+ /** Selects which token reader runs at boot. */
1255
+ tokenSource?: TokenSourceKind;
1256
+ /** Per-source config (only the matching block is emitted by the dashboard). */
1257
+ tokenSourceConfig?: TokenSourceConfig;
1258
+ /** What to do when token-discovery fails — show a fallback screen. */
1259
+ fallback?: {
1260
+ enabled?: boolean;
1261
+ method?: 'phone' | 'email';
1262
+ };
1263
+ /** Dot-paths into the partner identity payload returned by `auth`. */
1264
+ map?: {
1265
+ id?: string;
1266
+ email?: string;
1267
+ name?: string;
1268
+ phone?: string;
1269
+ };
1270
+ /**
1271
+ * Name of the field inside the `{credentials: {...}}` body posted to
1272
+ * `/sso_exchange`. Default `"credential"`. Set to match what the partner's
1273
+ * `/auth` leg expects — e.g. `"idToken"` for legacy Google flows, `"token"`
1274
+ * for partner JWTs.
1275
+ */
1276
+ credentialFieldName?: string;
1277
+ /**
1278
+ * Key under `user.properties` that the sso_exchange response carries the
1279
+ * tenant session token in. Set by `user_provisioning.response_map.properties`
1280
+ * server-side. Default `"partner_token"`. The browser uses this token as
1281
+ * the Bearer for `descriptor.auth.endpoint` (e.g. `chatbuddy/auth`).
1282
+ */
1283
+ tenantTokenProperty?: string;
1085
1284
  }
1086
1285
 
1087
1286
  export declare class SsoExchangeAdapter {
@@ -1141,6 +1340,15 @@ export declare interface SsoIdentity {
1141
1340
  */
1142
1341
  export declare type SsoSourceKind = 'cookie' | 'localStorage' | 'sessionStorage' | 'url_param' | 'header_meta' | 'callback';
1143
1342
 
1343
+ export declare interface StorageSourceConfig {
1344
+ /** `"local"` (default) or `"session"`. */
1345
+ store?: 'local' | 'session';
1346
+ /** Storage key. */
1347
+ key?: string;
1348
+ /** Optional dot-path. When set the value is JSON.parsed and walked. */
1349
+ path?: string;
1350
+ }
1351
+
1144
1352
  declare type SubscriptionCallback = (data: unknown) => void;
1145
1353
 
1146
1354
  declare interface TemplateMessageEvent {
@@ -1425,6 +1633,102 @@ export declare interface TiledeskTransportConfig {
1425
1633
  debug?: boolean;
1426
1634
  }
1427
1635
 
1636
+ export declare interface TokenDiscoveryDescriptor {
1637
+ /** `"partner"` today; reserved for future SSO families. */
1638
+ provider?: string;
1639
+ /** Recipe id the backend pairs with this descriptor. */
1640
+ flow?: string;
1641
+ /** When true the embedded SDK skips the login UI entirely. */
1642
+ skipLogin?: boolean;
1643
+ /** When true the SDK re-reads the source on 401 retries. */
1644
+ autoRefresh?: boolean;
1645
+ /** One of the seven supported source kinds. */
1646
+ tokenSource: TokenSourceKind;
1647
+ /** Source-specific config; only the matching block is read. */
1648
+ tokenSourceConfig?: TokenSourceConfig;
1649
+ /** Fallback (e.g. show a phone OTP screen) when discovery fails. */
1650
+ fallback?: {
1651
+ enabled?: boolean;
1652
+ method?: 'phone' | 'email';
1653
+ };
1654
+ /** Dot-paths into the partner identity payload returned by the auth call. */
1655
+ map?: {
1656
+ id?: string;
1657
+ email?: string;
1658
+ name?: string;
1659
+ phone?: string;
1660
+ };
1661
+ }
1662
+
1663
+ export declare class TokenDiscoveryError extends Error {
1664
+ readonly source: string;
1665
+ constructor(source: string, msg: string);
1666
+ }
1667
+
1668
+ export declare interface TokenDiscoveryOptions {
1669
+ /** Descriptor from `widget_configs/:slug` (`configurations.sso`). */
1670
+ descriptor: TokenDiscoveryDescriptor;
1671
+ /**
1672
+ * Initial token explicitly passed to the SDK by the parent caller. Used
1673
+ * by the `init` source kind; ignored by every other.
1674
+ */
1675
+ initToken?: string;
1676
+ }
1677
+
1678
+ /**
1679
+ * Thin wrapper that re-runs `discoverToken` on demand. Used by
1680
+ * `ApiClient` when a request 401s and `descriptor.sso.autoRefresh` is set.
1681
+ *
1682
+ * The first call caches the token; `.refresh()` forces a re-read of the
1683
+ * source. `init` mode can't be refreshed (the partner already gave us the
1684
+ * single token) — callers should fall through to fallback there.
1685
+ */
1686
+ export declare class TokenDiscoveryReader {
1687
+ private readonly opts;
1688
+ private cached;
1689
+ constructor(opts: TokenDiscoveryOptions);
1690
+ get descriptor(): TokenDiscoveryDescriptor;
1691
+ /** Resolve the token. Returns cache if present. */
1692
+ get(): Promise<DiscoveredToken>;
1693
+ /**
1694
+ * Re-evaluate the source. For `init` mode (where the SDK has no way to
1695
+ * re-read) this returns the cached token unchanged — callers should
1696
+ * treat repeated 401s after a refresh attempt as terminal.
1697
+ */
1698
+ refresh(): Promise<DiscoveredToken>;
1699
+ }
1700
+
1701
+ export declare type TokenSourceConfig = InitSourceConfig | QuerySourceConfig | HashSourceConfig | PostMsgSourceConfig | CookieSourceConfig | StorageSourceConfig | GlobalSourceConfig;
1702
+
1703
+ /**
1704
+ * Partner-token discovery dispatcher (v2 sign-in flow).
1705
+ *
1706
+ * The dashboard's Sign-in tab writes a `descriptor.sso` block that names
1707
+ * one of seven token-source modes plus a per-mode config block. At runtime
1708
+ * the SDK reads the descriptor, dispatches to the matching reader, and
1709
+ * returns the raw partner token. When `descriptor.sso.skipLogin === true`
1710
+ * the host shell uses the token directly to do the auth exchange; when
1711
+ * `descriptor.sso.autoRefresh === true` the reader is re-evaluated on any
1712
+ * request that returned 401 (see {@link ApiClient}).
1713
+ *
1714
+ * Reading flows:
1715
+ * - `init` — supplied at construction (e.g. `Aikaara.init({token})`).
1716
+ * - `query` — `URLSearchParams(location.search).get(cfg.key)`.
1717
+ * - `hash` — `location.hash` parsed as URLSearchParams; cfg.key wins.
1718
+ * - `postmsg` — `window.addEventListener('message')` filtered by
1719
+ * `cfg.type` + `cfg.key`; origins allowlist optional.
1720
+ * - `cookie` — `document.cookie` parsed; domain scope is informational
1721
+ * (browser already enforces it for the running page).
1722
+ * - `storage` — `(localStorage|sessionStorage).getItem(cfg.key)`; when
1723
+ * `cfg.path` is set, parsed as JSON + dot-path resolved.
1724
+ * - `global` — `window[cfg.path]` resolved via dot-path; polled for
1725
+ * up to 2 seconds for late-loading partner SDKs.
1726
+ *
1727
+ * The dispatcher is intentionally side-effect-free apart from
1728
+ * `postmsg` (which has to attach a listener). Callers control caching.
1729
+ */
1730
+ export declare type TokenSourceKind = 'init' | 'query' | 'hash' | 'postmsg' | 'cookie' | 'storage' | 'global';
1731
+
1428
1732
  export declare interface ToolCall {
1429
1733
  id: string;
1430
1734
  type: 'function';
@@ -1722,6 +2026,28 @@ export declare interface WidgetConfigDescriptor {
1722
2026
  defaultRoute: string;
1723
2027
  /** Map of route id → definition. */
1724
2028
  routes: Record<string, RouteDef>;
2029
+ /**
2030
+ * Static page list rendered by the hosted-shell's top/bottom nav. The
2031
+ * dashboard's App Layout tab writes this; the SDK doesn't read it.
2032
+ * Surfaced here so descriptor consumers get a typed view.
2033
+ */
2034
+ pages?: AppPageDef[];
2035
+ /** Side panels wrapping the chat — see {@link SidePanelDef}. */
2036
+ panels?: {
2037
+ left?: SidePanelDef;
2038
+ right?: SidePanelDef;
2039
+ };
2040
+ };
2041
+ /**
2042
+ * Tenant-side API config consumed by the side-panel runtime. Right now
2043
+ * only the `api`-type panel uses this — it prefixes `panel.endpoint`
2044
+ * with `api.baseUrl` and sends the chat JWT as `Authorization`. Other
2045
+ * descriptor blocks (`upload`, `historyApiBase`, etc.) keep their own
2046
+ * fields for backwards compatibility.
2047
+ */
2048
+ api?: {
2049
+ /** Absolute base URL for tenant API calls. No trailing slash. */
2050
+ baseUrl?: string;
1725
2051
  };
1726
2052
  /**
1727
2053
  * Unified slot map. Supersedes `templates` and the bespoke
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { r as o } from "./MountTenant-DzNgBTiU.mjs";
2
- import { A as u, a as m, b as g, c as h, d as k, e as A, f as C, g as b, h as f, i as S, j as T, k as v, C as y, l as w, m as M, E, M as x, S as B, n as F, T as U, o as I, p as j, q, s as H, t as P, u as W, v as z, w as K, x as L, y as O, z as R } from "./MountTenant-DzNgBTiU.mjs";
3
- import { FormBridge as G } from "./headless.mjs";
1
+ import { r as o } from "./MountTenant-CxO7hJgs.mjs";
2
+ import { A as u, a as m, b as k, c as g, d as h, e as A, f as C, g as T, h as b, i as v, j as f, k as y, C as S, l as w, m as E, E as M, M as x, S as B, n as F, T as U, o as D, p as I, q as j, s as q, t as H, u as P, v as R, w as W, x as z, y as K, z as L, B as O, D as G, F as J } from "./MountTenant-CxO7hJgs.mjs";
3
+ import { FormBridge as Q } from "./headless.mjs";
4
4
  function l(e) {
5
5
  o();
6
6
  const a = document.createElement("aikaara-chat-widget"), r = {
@@ -31,37 +31,40 @@ function d() {
31
31
  export {
32
32
  u as ActionCableClient,
33
33
  m as AikaaraChatBubble,
34
- g as AikaaraChatClient,
35
- h as AikaaraChatHeader,
36
- k as AikaaraChatInput,
34
+ k as AikaaraChatClient,
35
+ g as AikaaraChatHeader,
36
+ h as AikaaraChatInput,
37
37
  A as AikaaraChatWidget,
38
38
  C as AikaaraErrorBanner,
39
- b as AikaaraMessageBubble,
40
- f as AikaaraMessageList,
41
- S as AikaaraStreamingMessage,
42
- T as AikaaraTypingIndicator,
43
- v as ApiClient,
44
- y as ChannelSubscription,
39
+ T as AikaaraMessageBubble,
40
+ b as AikaaraMessageList,
41
+ v as AikaaraStreamingMessage,
42
+ f as AikaaraTypingIndicator,
43
+ y as ApiClient,
44
+ S as ChannelSubscription,
45
45
  w as ConnectionManager,
46
- M as ConversationManager,
47
- E as EventEmitter,
48
- G as FormBridge,
46
+ E as ConversationManager,
47
+ M as EventEmitter,
48
+ Q as FormBridge,
49
49
  x as MessageStore,
50
50
  B as SessionAuthAdapter,
51
51
  F as SsoExchangeAdapter,
52
52
  U as TiledeskTransport,
53
- I as clearPersistedConversationId,
54
- j as collectSsoCredentials,
55
- q as createFetchUploadAdapter,
56
- H as createPresigned3StepUploadAdapter,
57
- P as createTiledeskHistoryAdapter,
58
- W as extractTiledeskFileEnvelope,
59
- z as inferTiledeskRole,
60
- K as isTiledeskSelfEcho,
53
+ D as TokenDiscoveryError,
54
+ I as TokenDiscoveryReader,
55
+ j as clearPersistedConversationId,
56
+ q as collectSsoCredentials,
57
+ H as createFetchUploadAdapter,
58
+ P as createPresigned3StepUploadAdapter,
59
+ R as createTiledeskHistoryAdapter,
60
+ W as discoverToken,
61
+ z as extractTiledeskFileEnvelope,
62
+ K as inferTiledeskRole,
63
+ L as isTiledeskSelfEcho,
61
64
  l as mount,
62
- L as mountFromSlug,
63
- O as mountTenantWidget,
64
- R as parseTiledeskTemplate,
65
+ O as mountFromSlug,
66
+ G as mountTenantWidget,
67
+ J as parseTiledeskTemplate,
65
68
  o as registerComponents,
66
69
  d as unmount
67
70
  };
package/dist/ui.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./MountTenant-DvmiAoZ_.cjs");exports.AikaaraChat=a.AikaaraChat;exports.AikaaraChatBubble=a.AikaaraChatBubble;exports.AikaaraChatHeader=a.AikaaraChatHeader;exports.AikaaraChatInput=a.AikaaraChatInput;exports.AikaaraChatWidget=a.AikaaraChatWidget;exports.AikaaraComparePlans=a.AikaaraComparePlans;exports.AikaaraErrorBanner=a.AikaaraErrorBanner;exports.AikaaraLinkModal=a.AikaaraLinkModal;exports.AikaaraMessageBubble=a.AikaaraMessageBubble;exports.AikaaraMessageList=a.AikaaraMessageList;exports.AikaaraModalAction=a.AikaaraModalAction;exports.AikaaraOptionList=a.AikaaraOptionList;exports.AikaaraStreamingMessage=a.AikaaraStreamingMessage;exports.AikaaraSubmitAction=a.AikaaraSubmitAction;exports.AikaaraSystemPill=a.AikaaraSystemPill;exports.AikaaraTemplateRenderer=a.AikaaraTemplateRenderer;exports.AikaaraTypingIndicator=a.AikaaraTypingIndicator;exports.registerComponents=a.registerComponents;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./MountTenant-BCjKRkD8.cjs");exports.AikaaraChat=a.AikaaraChat;exports.AikaaraChatBubble=a.AikaaraChatBubble;exports.AikaaraChatHeader=a.AikaaraChatHeader;exports.AikaaraChatInput=a.AikaaraChatInput;exports.AikaaraChatWidget=a.AikaaraChatWidget;exports.AikaaraComparePlans=a.AikaaraComparePlans;exports.AikaaraErrorBanner=a.AikaaraErrorBanner;exports.AikaaraLinkModal=a.AikaaraLinkModal;exports.AikaaraMessageBubble=a.AikaaraMessageBubble;exports.AikaaraMessageList=a.AikaaraMessageList;exports.AikaaraModalAction=a.AikaaraModalAction;exports.AikaaraOptionList=a.AikaaraOptionList;exports.AikaaraStreamingMessage=a.AikaaraStreamingMessage;exports.AikaaraSubmitAction=a.AikaaraSubmitAction;exports.AikaaraSystemPill=a.AikaaraSystemPill;exports.AikaaraTemplateRenderer=a.AikaaraTemplateRenderer;exports.AikaaraTypingIndicator=a.AikaaraTypingIndicator;exports.registerComponents=a.registerComponents;
package/dist/ui.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { B as i, a as s, c as e, d as t, e as A, D as k, f as n, F as o, g, h as l, G as d, H as m, i as p, I as C, J as h, K as b, j as M, r as c } from "./MountTenant-DzNgBTiU.mjs";
1
+ import { G as i, a as s, c as e, d as t, e as A, H as k, f as n, I as o, g, h as l, J as d, K as m, i as p, L as C, N as h, O as b, j as M, r as c } from "./MountTenant-CxO7hJgs.mjs";
2
2
  export {
3
3
  i as AikaaraChat,
4
4
  s as AikaaraChatBubble,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aikaara/chat-sdk",
3
- "version": "0.8.2",
3
+ "version": "0.8.4",
4
4
  "type": "module",
5
5
  "description": "Aikaara Chat SDK — embeddable chat widget and headless client",
6
6
  "license": "MIT",