@aikaara/chat-sdk 0.9.4 → 0.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MountTenant-B-CCyWWA.mjs → MountTenant-8e0Xr4P8.mjs} +1860 -1834
- package/dist/{MountTenant-CLSvsaX7.cjs → MountTenant-B9NagbKc.cjs} +16 -16
- package/dist/cdn/aikaara-chat.iife.js +21 -21
- package/dist/headless.cjs +1 -1
- package/dist/headless.d.ts +7 -4
- package/dist/headless.mjs +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +10 -5
- package/dist/index.mjs +2 -2
- package/dist/ui.cjs +1 -1
- package/dist/ui.d.ts +4 -2
- package/dist/ui.mjs +1 -1
- package/package.json +1 -1
package/dist/headless.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MountTenant-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MountTenant-B9NagbKc.cjs");class s extends e.EventEmitter{registration=null;pendingEdits=[];constructor(t){super(),this.setupListeners(t)}registerForm(t){this.registration=t;const i=this.pendingEdits.filter(r=>r.entity_type===t.entityType&&String(r.entity_id)===String(t.entityId));if(i.length>0){for(const r of i)t.onFieldUpdate(r.fields),this.emit("edit:applied",{entityType:r.entity_type,entityId:r.entity_id,fields:r.fields});this.pendingEdits=this.pendingEdits.filter(r=>!(r.entity_type===t.entityType&&String(r.entity_id)===String(t.entityId)))}}unregisterForm(t,i){this.registration?.entityType===t&&String(this.registration?.entityId)===String(i)&&(this.registration=null)}get currentForm(){return this.registration}pushFieldUpdates(t,i,r){this.registration&&this.registration.entityType===t&&String(this.registration.entityId)===String(i)?(this.registration.onFieldUpdate(r),this.emit("edit:applied",{entityType:t,entityId:i,fields:r})):(this.pendingEdits.push({action:"edit_entity",entity_type:t,entity_id:i,fields:r}),this.emit("edit:pending",{entityType:t,entityId:i,fields:r}))}async requestSave(){if(!this.registration)return{success:!1,error:"No form registered"};try{return await this.registration.onSave(),this.emit("save:success",{entityType:this.registration.entityType,entityId:this.registration.entityId}),{success:!0}}catch(t){const i=t instanceof Error?t.message:"Save failed";return this.emit("save:error",{entityType:this.registration.entityType,entityId:this.registration.entityId,error:i}),{success:!1,error:i}}}async requestTest(t){if(!this.registration?.onTest)return{success:!1,error:"Current form does not support testing"};try{return await this.registration.onTest(t),{success:!0}}catch(i){return{success:!1,error:i instanceof Error?i.message:"Test failed"}}}setupListeners(t){t.on("action:edit_entity",i=>{this.pushFieldUpdates(i.entity_type,i.entity_id,i.fields)}),t.on("action:save_entity",i=>{this.requestSave()}),t.on("action:test_tool",i=>{this.emit("test:triggered",{toolId:i.tool_id,parameters:i.parameters}),this.requestTest(i.parameters)})}}exports.ActionCableClient=e.ActionCableClient;exports.AikaaraChatClient=e.AikaaraChatClient;exports.ApiClient=e.ApiClient;exports.ChannelSubscription=e.ChannelSubscription;exports.ConnectionManager=e.ConnectionManager;exports.ConversationManager=e.ConversationManager;exports.EventEmitter=e.EventEmitter;exports.MessageStore=e.MessageStore;exports.SessionAuthAdapter=e.SessionAuthAdapter;exports.SsoExchangeAdapter=e.SsoExchangeAdapter;exports.TiledeskTransport=e.TiledeskTransport;exports.TokenDiscoveryError=e.TokenDiscoveryError;exports.TokenDiscoveryReader=e.TokenDiscoveryReader;exports.clearPersistedConversationId=e.clearPersistedConversationId;exports.collectSsoCredentials=e.collectSsoCredentials;exports.createFetchUploadAdapter=e.createFetchUploadAdapter;exports.createPresigned3StepUploadAdapter=e.createPresigned3StepUploadAdapter;exports.createTiledeskHistoryAdapter=e.createTiledeskHistoryAdapter;exports.discoverToken=e.discoverToken;exports.extractTiledeskFileEnvelope=e.extractTiledeskFileEnvelope;exports.inferTiledeskRole=e.inferTiledeskRole;exports.isTiledeskSelfEcho=e.isTiledeskSelfEcho;exports.mountFromSlug=e.mountFromSlug;exports.mountTenantWidget=e.mount;exports.parseTiledeskTemplate=e.parseTiledeskTemplate;exports.FormBridge=s;
|
package/dist/headless.d.ts
CHANGED
|
@@ -2058,7 +2058,7 @@ export declare interface WidgetConfig extends ChatClientConfig {
|
|
|
2058
2058
|
persistConversation?: boolean;
|
|
2059
2059
|
showHeader?: boolean;
|
|
2060
2060
|
hideSystemMessages?: string[];
|
|
2061
|
-
timestampFormat?: 'time' | 'datetime' | 'date' | 'none';
|
|
2061
|
+
timestampFormat?: 'time' | 'time-24' | 'time-seconds' | 'datetime' | 'datetime-seconds' | 'datetime-24' | 'date' | 'relative' | 'none';
|
|
2062
2062
|
input?: {
|
|
2063
2063
|
attachPosition?: 'left' | 'right';
|
|
2064
2064
|
sendButtonShape?: 'circle' | 'square';
|
|
@@ -2111,12 +2111,15 @@ export declare interface WidgetConfigDescriptor {
|
|
|
2111
2111
|
hideSystemMessages?: string[];
|
|
2112
2112
|
/**
|
|
2113
2113
|
* Timestamp display under each bubble.
|
|
2114
|
-
* - `time` (default): locale time, e.g. "11:26 AM"
|
|
2114
|
+
* - `time` (default): locale time 12h, e.g. "11:26 AM".
|
|
2115
|
+
* - `time-24`: 24h clock, e.g. "23:14".
|
|
2116
|
+
* - `time-seconds`: locale time including seconds, e.g. "11:26:35 AM".
|
|
2115
2117
|
* - `datetime`: short month/day + time, e.g. "May 08, 11:26 AM".
|
|
2116
|
-
* - `date`: short month/day only.
|
|
2118
|
+
* - `date`: short month/day only, e.g. "May 08".
|
|
2119
|
+
* - `relative`: "just now" / "5 min ago" / "Yesterday".
|
|
2117
2120
|
* - `none`: equivalent to `showTimestamps: false`.
|
|
2118
2121
|
*/
|
|
2119
|
-
timestampFormat?: 'time' | 'datetime' | 'date' | 'none';
|
|
2122
|
+
timestampFormat?: 'time' | 'time-24' | 'time-seconds' | 'datetime' | 'datetime-seconds' | 'datetime-24' | 'date' | 'relative' | 'none';
|
|
2120
2123
|
/** Composer styling — attach button position and send button shape. */
|
|
2121
2124
|
input?: {
|
|
2122
2125
|
/** Where the paperclip button sits relative to the textarea. Default `left`. */
|
package/dist/headless.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as s } from "./MountTenant-
|
|
2
|
-
import { A as p, b as l, k as g, C as c, l as h, m as y, M as u, S as m, n as f, T, o as S, p as _, q as v, s as E, t as C, u as F, v as k, w as A, x as I, y as x, z as U, B as q, D as M, F as b } from "./MountTenant-
|
|
1
|
+
import { E as s } from "./MountTenant-8e0Xr4P8.mjs";
|
|
2
|
+
import { A as p, b as l, k as g, C as c, l as h, m as y, M as u, S as m, n as f, T, o as S, p as _, q as v, s as E, t as C, u as F, v as k, w as A, x as I, y as x, z as U, B as q, D as M, F as b } from "./MountTenant-8e0Xr4P8.mjs";
|
|
3
3
|
class a extends s {
|
|
4
4
|
registration = null;
|
|
5
5
|
pendingEdits = [];
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MountTenant-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MountTenant-B9NagbKc.cjs"),s=require("./headless.cjs");function l(a){e.registerComponents();const t=document.createElement("aikaara-chat-widget"),i={baseUrl:"base-url",userToken:"user-token",apiKey:"api-key",title:"title",subtitle:"subtitle",theme:"theme",primaryColor:"primary-color",position:"position",width:"width",height:"height",placeholder:"placeholder",welcomeMessage:"welcome-message",avatarUrl:"avatar-url"};for(const[o,n]of Object.entries(i)){const r=a[o];r!=null&&t.setAttribute(n,String(r))}return t.configure(a),document.body.appendChild(t),t}function d(){const a=document.querySelector("aikaara-chat-widget");a&&a.remove()}exports.ActionCableClient=e.ActionCableClient;exports.AikaaraChatBubble=e.AikaaraChatBubble;exports.AikaaraChatClient=e.AikaaraChatClient;exports.AikaaraChatHeader=e.AikaaraChatHeader;exports.AikaaraChatInput=e.AikaaraChatInput;exports.AikaaraChatWidget=e.AikaaraChatWidget;exports.AikaaraErrorBanner=e.AikaaraErrorBanner;exports.AikaaraMessageBubble=e.AikaaraMessageBubble;exports.AikaaraMessageList=e.AikaaraMessageList;exports.AikaaraStreamingMessage=e.AikaaraStreamingMessage;exports.AikaaraTypingIndicator=e.AikaaraTypingIndicator;exports.ApiClient=e.ApiClient;exports.ChannelSubscription=e.ChannelSubscription;exports.ConnectionManager=e.ConnectionManager;exports.ConversationManager=e.ConversationManager;exports.EventEmitter=e.EventEmitter;exports.MessageStore=e.MessageStore;exports.SessionAuthAdapter=e.SessionAuthAdapter;exports.SsoExchangeAdapter=e.SsoExchangeAdapter;exports.TiledeskTransport=e.TiledeskTransport;exports.TokenDiscoveryError=e.TokenDiscoveryError;exports.TokenDiscoveryReader=e.TokenDiscoveryReader;exports.clearPersistedConversationId=e.clearPersistedConversationId;exports.collectSsoCredentials=e.collectSsoCredentials;exports.createFetchUploadAdapter=e.createFetchUploadAdapter;exports.createPresigned3StepUploadAdapter=e.createPresigned3StepUploadAdapter;exports.createTiledeskHistoryAdapter=e.createTiledeskHistoryAdapter;exports.discoverToken=e.discoverToken;exports.extractTiledeskFileEnvelope=e.extractTiledeskFileEnvelope;exports.inferTiledeskRole=e.inferTiledeskRole;exports.isTiledeskSelfEcho=e.isTiledeskSelfEcho;exports.mountFromSlug=e.mountFromSlug;exports.mountTenantWidget=e.mount;exports.parseTiledeskTemplate=e.parseTiledeskTemplate;exports.registerComponents=e.registerComponents;exports.FormBridge=s.FormBridge;exports.mount=l;exports.unmount=d;
|
package/dist/index.d.ts
CHANGED
|
@@ -233,7 +233,7 @@ export declare class AikaaraMessageList extends HTMLElement {
|
|
|
233
233
|
private linkHandlers;
|
|
234
234
|
private getLinkBearer;
|
|
235
235
|
setHideSystemMessages(items: string[]): void;
|
|
236
|
-
setTimestampFormat(fmt:
|
|
236
|
+
setTimestampFormat(fmt: TimestampFormat): void;
|
|
237
237
|
private templateLayout;
|
|
238
238
|
setTemplateLayout(layout: 'inside' | 'outside'): void;
|
|
239
239
|
/** Returns true when a message should be hidden by the descriptor's
|
|
@@ -1652,6 +1652,8 @@ export declare interface TiledeskTransportConfig {
|
|
|
1652
1652
|
debug?: boolean;
|
|
1653
1653
|
}
|
|
1654
1654
|
|
|
1655
|
+
declare type TimestampFormat = 'time' | 'time-24' | 'time-seconds' | 'datetime' | 'datetime-seconds' | 'datetime-24' | 'date' | 'relative' | 'none';
|
|
1656
|
+
|
|
1655
1657
|
export declare interface TokenDiscoveryDescriptor {
|
|
1656
1658
|
/** `"partner"` today; reserved for future SSO families. */
|
|
1657
1659
|
provider?: string;
|
|
@@ -1820,7 +1822,7 @@ export declare interface WidgetConfig extends ChatClientConfig {
|
|
|
1820
1822
|
persistConversation?: boolean;
|
|
1821
1823
|
showHeader?: boolean;
|
|
1822
1824
|
hideSystemMessages?: string[];
|
|
1823
|
-
timestampFormat?: 'time' | 'datetime' | 'date' | 'none';
|
|
1825
|
+
timestampFormat?: 'time' | 'time-24' | 'time-seconds' | 'datetime' | 'datetime-seconds' | 'datetime-24' | 'date' | 'relative' | 'none';
|
|
1824
1826
|
input?: {
|
|
1825
1827
|
attachPosition?: 'left' | 'right';
|
|
1826
1828
|
sendButtonShape?: 'circle' | 'square';
|
|
@@ -1873,12 +1875,15 @@ export declare interface WidgetConfigDescriptor {
|
|
|
1873
1875
|
hideSystemMessages?: string[];
|
|
1874
1876
|
/**
|
|
1875
1877
|
* Timestamp display under each bubble.
|
|
1876
|
-
* - `time` (default): locale time, e.g. "11:26 AM"
|
|
1878
|
+
* - `time` (default): locale time 12h, e.g. "11:26 AM".
|
|
1879
|
+
* - `time-24`: 24h clock, e.g. "23:14".
|
|
1880
|
+
* - `time-seconds`: locale time including seconds, e.g. "11:26:35 AM".
|
|
1877
1881
|
* - `datetime`: short month/day + time, e.g. "May 08, 11:26 AM".
|
|
1878
|
-
* - `date`: short month/day only.
|
|
1882
|
+
* - `date`: short month/day only, e.g. "May 08".
|
|
1883
|
+
* - `relative`: "just now" / "5 min ago" / "Yesterday".
|
|
1879
1884
|
* - `none`: equivalent to `showTimestamps: false`.
|
|
1880
1885
|
*/
|
|
1881
|
-
timestampFormat?: 'time' | 'datetime' | 'date' | 'none';
|
|
1886
|
+
timestampFormat?: 'time' | 'time-24' | 'time-seconds' | 'datetime' | 'datetime-seconds' | 'datetime-24' | 'date' | 'relative' | 'none';
|
|
1882
1887
|
/** Composer styling — attach button position and send button shape. */
|
|
1883
1888
|
input?: {
|
|
1884
1889
|
/** Where the paperclip button sits relative to the textarea. Default `left`. */
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as o } from "./MountTenant-
|
|
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-
|
|
1
|
+
import { r as o } from "./MountTenant-8e0Xr4P8.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-8e0Xr4P8.mjs";
|
|
3
3
|
import { FormBridge as Q } from "./headless.mjs";
|
|
4
4
|
function l(e) {
|
|
5
5
|
o();
|
package/dist/ui.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./MountTenant-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./MountTenant-B9NagbKc.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.d.ts
CHANGED
|
@@ -291,7 +291,7 @@ export declare class AikaaraMessageList extends HTMLElement {
|
|
|
291
291
|
private linkHandlers;
|
|
292
292
|
private getLinkBearer;
|
|
293
293
|
setHideSystemMessages(items: string[]): void;
|
|
294
|
-
setTimestampFormat(fmt:
|
|
294
|
+
setTimestampFormat(fmt: TimestampFormat): void;
|
|
295
295
|
private templateLayout;
|
|
296
296
|
setTemplateLayout(layout: 'inside' | 'outside'): void;
|
|
297
297
|
/** Returns true when a message should be hidden by the descriptor's
|
|
@@ -1067,6 +1067,8 @@ declare interface TiledeskTransportConfig_2 {
|
|
|
1067
1067
|
debug?: boolean;
|
|
1068
1068
|
}
|
|
1069
1069
|
|
|
1070
|
+
declare type TimestampFormat = 'time' | 'time-24' | 'time-seconds' | 'datetime' | 'datetime-seconds' | 'datetime-24' | 'date' | 'relative' | 'none';
|
|
1071
|
+
|
|
1070
1072
|
declare interface ToolCall {
|
|
1071
1073
|
id: string;
|
|
1072
1074
|
type: 'function';
|
|
@@ -1168,7 +1170,7 @@ declare interface WidgetConfig extends ChatClientConfig {
|
|
|
1168
1170
|
persistConversation?: boolean;
|
|
1169
1171
|
showHeader?: boolean;
|
|
1170
1172
|
hideSystemMessages?: string[];
|
|
1171
|
-
timestampFormat?: 'time' | 'datetime' | 'date' | 'none';
|
|
1173
|
+
timestampFormat?: 'time' | 'time-24' | 'time-seconds' | 'datetime' | 'datetime-seconds' | 'datetime-24' | 'date' | 'relative' | 'none';
|
|
1172
1174
|
input?: {
|
|
1173
1175
|
attachPosition?: 'left' | 'right';
|
|
1174
1176
|
sendButtonShape?: 'circle' | 'square';
|
package/dist/ui.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-8e0Xr4P8.mjs";
|
|
2
2
|
export {
|
|
3
3
|
i as AikaaraChat,
|
|
4
4
|
s as AikaaraChatBubble,
|