@aikaara/chat-sdk 1.5.18 → 1.5.19

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/headless.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MountTenant-lU2E6T8p.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.runMethodSelectPreflight=e.runMethodSelectPreflight;exports.FormBridge=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MountTenant-C-dsPfDW.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.runMethodSelectPreflight=e.runMethodSelectPreflight;exports.FormBridge=s;
package/dist/headless.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { E as s } from "./MountTenant-mK4EzOxi.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, G as w } from "./MountTenant-mK4EzOxi.mjs";
1
+ import { E as s } from "./MountTenant-BzTKCfBi.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, G as w } from "./MountTenant-BzTKCfBi.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-lU2E6T8p.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.runMethodSelectPreflight=e.runMethodSelectPreflight;exports.FormBridge=s.FormBridge;exports.mount=l;exports.unmount=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MountTenant-C-dsPfDW.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.runMethodSelectPreflight=e.runMethodSelectPreflight;exports.FormBridge=s.FormBridge;exports.mount=l;exports.unmount=d;
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { r as o } from "./MountTenant-mK4EzOxi.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 T, h as b, i as f, j as v, k as S, C as y, l as M, m as w, E, M as x, S as B, n as F, T as U, o as D, p as I, q as P, s as j, t as q, u as H, v as R, w as W, x as z, y as G, z as K, B as L, D as O, F as J, G as N } from "./MountTenant-mK4EzOxi.mjs";
1
+ import { r as o } from "./MountTenant-BzTKCfBi.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 T, h as b, i as f, j as v, k as S, C as y, l as M, m as w, E, M as x, S as B, n as F, T as U, o as D, p as I, q as P, s as j, t as q, u as H, v as R, w as W, x as z, y as G, z as K, B as L, D as O, F as J, G as N } from "./MountTenant-BzTKCfBi.mjs";
3
3
  import { FormBridge as V } 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-lU2E6T8p.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.AikaaraSchemaForm=a.AikaaraSchemaForm;exports.AikaaraSmartEditModal=a.AikaaraSmartEditModal;exports.AikaaraStreamingMessage=a.AikaaraStreamingMessage;exports.AikaaraSubmitAction=a.AikaaraSubmitAction;exports.AikaaraSystemPill=a.AikaaraSystemPill;exports.AikaaraTemplateRenderer=a.AikaaraTemplateRenderer;exports.AikaaraTextInput=a.AikaaraTextInput;exports.AikaaraTypingIndicator=a.AikaaraTypingIndicator;exports.registerComponents=a.registerComponents;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./MountTenant-C-dsPfDW.cjs");exports.AikaaraCallConfirmation=a.AikaaraCallConfirmation;exports.AikaaraCallUpload=a.AikaaraCallUpload;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.AikaaraPriceBreakdown=a.AikaaraPriceBreakdown;exports.AikaaraSchemaForm=a.AikaaraSchemaForm;exports.AikaaraServiceDetails=a.AikaaraServiceDetails;exports.AikaaraServicePicker=a.AikaaraServicePicker;exports.AikaaraSlotPicker=a.AikaaraSlotPicker;exports.AikaaraSmartEditModal=a.AikaaraSmartEditModal;exports.AikaaraStreamingMessage=a.AikaaraStreamingMessage;exports.AikaaraSubmitAction=a.AikaaraSubmitAction;exports.AikaaraSystemPill=a.AikaaraSystemPill;exports.AikaaraTemplateRenderer=a.AikaaraTemplateRenderer;exports.AikaaraTextInput=a.AikaaraTextInput;exports.AikaaraTypingIndicator=a.AikaaraTypingIndicator;exports.registerComponents=a.registerComponents;
package/dist/ui.d.ts CHANGED
@@ -1,3 +1,34 @@
1
+ export declare class AikaaraCallConfirmation extends HTMLElement {
2
+ private shadow;
3
+ private data;
4
+ constructor();
5
+ connectedCallback(): void;
6
+ setPayload(payload: CallConfirmationPayload, _innerMessage?: string): void;
7
+ private displayDate;
8
+ private displayTime;
9
+ private render;
10
+ }
11
+
12
+ export declare class AikaaraCallUpload extends HTMLElement {
13
+ private shadow;
14
+ private data;
15
+ private query;
16
+ private fileNames;
17
+ private error;
18
+ private submitted;
19
+ constructor();
20
+ connectedCallback(): void;
21
+ setPayload(payload: CallUploadPayload, _innerMessage?: string): void;
22
+ getName(): string;
23
+ setConsumedValues(values: Record<string, string[]>): void;
24
+ private uploadConfig;
25
+ private queryConfig;
26
+ private isLocked;
27
+ private handleFiles;
28
+ private handleSubmit;
29
+ private render;
30
+ }
31
+
1
32
  /**
2
33
  * `<aikaara-chat>` declarative web component — the framework-agnostic entry.
3
34
  *
@@ -376,6 +407,18 @@ export declare class AikaaraOptionList extends HTMLElement {
376
407
  private render;
377
408
  }
378
409
 
410
+ export declare class AikaaraPriceBreakdown extends HTMLElement {
411
+ private shadow;
412
+ private data;
413
+ constructor();
414
+ connectedCallback(): void;
415
+ setPayload(payload: PriceBreakdownPayload, _innerMessage?: string): void;
416
+ getName(): string;
417
+ private locked;
418
+ private handleContinue;
419
+ private render;
420
+ }
421
+
379
422
  export declare class AikaaraSchemaForm extends HTMLElement {
380
423
  private shadow;
381
424
  private schema;
@@ -415,6 +458,65 @@ export declare class AikaaraSchemaForm extends HTMLElement {
415
458
  private css;
416
459
  }
417
460
 
461
+ export declare class AikaaraServiceDetails extends HTMLElement {
462
+ private shadow;
463
+ private data;
464
+ constructor();
465
+ connectedCallback(): void;
466
+ setPayload(payload: ServiceDetailsPayload, _innerMessage?: string): void;
467
+ getName(): string;
468
+ private locked;
469
+ private handleContinue;
470
+ private render;
471
+ }
472
+
473
+ export declare class AikaaraServicePicker extends HTMLElement {
474
+ private shadow;
475
+ private data;
476
+ private selectedId;
477
+ constructor();
478
+ connectedCallback(): void;
479
+ setPayload(payload: ServicePickerPayload, _innerMessage?: string): void;
480
+ getName(): string;
481
+ setConsumedValues(values: Record<string, string[]>): void;
482
+ private locked;
483
+ private select;
484
+ private render;
485
+ }
486
+
487
+ export declare class AikaaraSlotPicker extends HTMLElement {
488
+ private shadow;
489
+ private data;
490
+ private selectedDate;
491
+ private selectedSlot;
492
+ private availabilityOverride;
493
+ private loading;
494
+ private errorMessage;
495
+ private submitted;
496
+ constructor();
497
+ connectedCallback(): void;
498
+ setPayload(payload: SlotPickerPayload, _innerMessage?: string): void;
499
+ /** Replace availability after mount (host-fetched slots). */
500
+ setAvailability(days: SlotPickerDay[]): void;
501
+ /** Alias so descriptor `props: { setSlots: … }` works out of the box. */
502
+ setSlots(days: SlotPickerDay[]): void;
503
+ setLoading(loading: boolean): void;
504
+ setError(message: string): void;
505
+ getName(): string;
506
+ setConsumedValues(values: Record<string, string[]>): void;
507
+ private isLocked;
508
+ private normalizeDays;
509
+ /** A slot is selectable when the backend marks it available and it is not past. */
510
+ private isSelectable;
511
+ private selectDate;
512
+ private selectSlot;
513
+ private handleContinue;
514
+ private render;
515
+ private renderBody;
516
+ private lockedTemplate;
517
+ private attachListeners;
518
+ }
519
+
418
520
  /**
419
521
  * `<aikaara-smart-edit-modal>` — "Correct Your ITR Details".
420
522
  *
@@ -566,6 +668,13 @@ export declare class AikaaraTemplateRenderer extends HTMLElement {
566
668
  * via the `aikaara-link-action` event.
567
669
  */
568
670
  private mountLinkButton;
671
+ /**
672
+ * Schedule-call step entry. Mounts the widget named by `tag` and forwards
673
+ * the payload (wrapped `data` block or the flat field) plus the originating
674
+ * message id. All tags are registered by the UI entry point, so no lazy
675
+ * load is needed.
676
+ */
677
+ private mountScheduleWidget;
569
678
  private mountModal;
570
679
  }
571
680
 
@@ -639,6 +748,46 @@ declare interface BaseField {
639
748
  };
640
749
  }
641
750
 
751
+ /**
752
+ * `<aikaara-call-confirmation>` — final step of the schedule-call flow.
753
+ *
754
+ * Display-only summary card: expert, service, date, time, amount, booking id
755
+ * and document count. No postback — the flow/bot has already booked the call.
756
+ *
757
+ * Payload:
758
+ * {
759
+ * title?, // default 'Call Scheduled Successfully!'
760
+ * expert?, service?, date?, time?, amount?, bookingId?, documents?,
761
+ * note?, // default the Meet-link note
762
+ * }
763
+ *
764
+ * `date` accepts `YYYY-MM-DD` (formatted) or a display string; `time` accepts
765
+ * `HH:mm` (rendered as a 30-min range) or a display string.
766
+ */
767
+ declare interface CallConfirmationPayload {
768
+ title?: string;
769
+ expert?: string;
770
+ service?: string;
771
+ date?: string;
772
+ time?: string;
773
+ amount?: number;
774
+ bookingId?: string;
775
+ documents?: number;
776
+ note?: string;
777
+ }
778
+
779
+ declare interface CallUploadPayload {
780
+ title?: string;
781
+ subtitle?: string;
782
+ upload?: UploadConfig | boolean;
783
+ query?: QueryConfig | boolean;
784
+ submitLabel?: string;
785
+ postbackKey?: string;
786
+ postbackMessage?: string;
787
+ action?: Record<string, unknown>;
788
+ messageId?: string;
789
+ }
790
+
642
791
  declare interface ChatActionItem {
643
792
  id: string;
644
793
  label: string;
@@ -1054,6 +1203,53 @@ declare interface PlansResponse {
1054
1203
  data?: PlanRow[];
1055
1204
  }
1056
1205
 
1206
+ /**
1207
+ * `<aikaara-price-breakdown>` — step 3 of the schedule-call flow.
1208
+ *
1209
+ * Renders the fee table (Service Fee + GST − Discount = Total Payable) and a
1210
+ * Continue CTA that posts back so the flow can advance to date/time.
1211
+ *
1212
+ * Payload:
1213
+ * {
1214
+ * name?: string,
1215
+ * basePrice: number, discount?: number, gstRate?: number,
1216
+ * feeLabel?: string, // 'Service Fee'
1217
+ * discountLabel?: string, // 'Discount'
1218
+ * totalLabel?: string, // 'Total Payable'
1219
+ * note?: string, // e.g. 'Call timings: 10:00 AM – 6:00 PM, Mon–Sat.'
1220
+ * continueLabel?: string, // 'Continue to Schedule'
1221
+ * postbackKey?: string, // default 'priceAccepted'
1222
+ * postbackMessage?: string,
1223
+ * action?: Record<string, unknown>,
1224
+ * messageId?: string,
1225
+ * }
1226
+ *
1227
+ * Postback action: `{ [postbackKey]: true, serviceName?, total }`.
1228
+ */
1229
+ declare interface PriceBreakdownPayload {
1230
+ name?: string;
1231
+ basePrice: number;
1232
+ discount?: number;
1233
+ gstRate?: number;
1234
+ feeLabel?: string;
1235
+ discountLabel?: string;
1236
+ totalLabel?: string;
1237
+ note?: string;
1238
+ continueLabel?: string;
1239
+ postbackKey?: string;
1240
+ postbackMessage?: string;
1241
+ action?: Record<string, unknown>;
1242
+ messageId?: string;
1243
+ }
1244
+
1245
+ declare interface QueryConfig {
1246
+ enabled?: boolean;
1247
+ label?: string;
1248
+ placeholder?: string;
1249
+ maxLength?: number;
1250
+ required?: boolean;
1251
+ }
1252
+
1057
1253
  declare interface RadioField extends BaseField {
1058
1254
  type: 'radio';
1059
1255
  options: RadioOption[];
@@ -1124,6 +1320,143 @@ declare interface SelectField extends BaseField {
1124
1320
  placeholder?: string;
1125
1321
  }
1126
1322
 
1323
+ /**
1324
+ * `<aikaara-service-details>` — step 2 of the schedule-call flow.
1325
+ *
1326
+ * Shows what a service includes / excludes plus an inline pricing summary,
1327
+ * then a Continue CTA that posts back so the flow can advance.
1328
+ *
1329
+ * Payload:
1330
+ * {
1331
+ * name: string, tagline?: string,
1332
+ * badge?: string, // e.g. '30 min expert call'
1333
+ * inclusions?: string[],
1334
+ * limitations?: string[],
1335
+ * extraInclusions?: string[], // e.g. 'Session with a dedicated expert…'
1336
+ * extraLimitations?: string[],
1337
+ * basePrice?: number, discount?: number, gstRate?: number,
1338
+ * showPricing?: boolean, // default true when basePrice set
1339
+ * continueLabel?: string, // default 'Continue'
1340
+ * postbackKey?: string, // default 'serviceDetails'
1341
+ * postbackMessage?: string, // default continueLabel
1342
+ * action?: Record<string, unknown>,
1343
+ * messageId?: string,
1344
+ * }
1345
+ *
1346
+ * Postback action: `{ [postbackKey]: true, serviceName, total }`.
1347
+ */
1348
+ declare interface ServiceDetailsPayload {
1349
+ name: string;
1350
+ tagline?: string;
1351
+ badge?: string;
1352
+ inclusions?: string[];
1353
+ limitations?: string[];
1354
+ extraInclusions?: string[];
1355
+ extraLimitations?: string[];
1356
+ basePrice?: number;
1357
+ discount?: number;
1358
+ gstRate?: number;
1359
+ showPricing?: boolean;
1360
+ continueLabel?: string;
1361
+ postbackKey?: string;
1362
+ postbackMessage?: string;
1363
+ action?: Record<string, unknown>;
1364
+ messageId?: string;
1365
+ }
1366
+
1367
+ /**
1368
+ * `<aikaara-service-picker>` — step 1 of the schedule-call flow.
1369
+ *
1370
+ * Renders the list of bookable services as cards (name, tagline, "from ₹X").
1371
+ * Tapping a card fires a `template-action` so the dashboard flow can advance
1372
+ * to the service-details step.
1373
+ *
1374
+ * Payload (`.setPayload(payload)`):
1375
+ * {
1376
+ * title?: string, subtitle?: string,
1377
+ * services: [{ id, name, tagline?, basePrice, discount? }],
1378
+ * showFrom?: boolean, // show "from ₹X" on each card (default true)
1379
+ * postbackKey?: string, // default 'serviceId'
1380
+ * postbackMessage?: string, // default: the selected service name
1381
+ * action?: Record<string, unknown>,
1382
+ * messageId?: string,
1383
+ * }
1384
+ *
1385
+ * Postback action: `{ [postbackKey]: id, serviceName, basePrice, discount }`.
1386
+ *
1387
+ * Theming: `--aikaara-service-*` falling back to the shared `--aikaara-*` set.
1388
+ */
1389
+ declare interface ServiceOption {
1390
+ id: string;
1391
+ name: string;
1392
+ tagline?: string;
1393
+ basePrice: number;
1394
+ discount?: number;
1395
+ }
1396
+
1397
+ declare interface ServicePickerPayload {
1398
+ title?: string;
1399
+ subtitle?: string;
1400
+ services: ServiceOption[];
1401
+ showFrom?: boolean;
1402
+ postbackKey?: string;
1403
+ postbackMessage?: string;
1404
+ action?: Record<string, unknown>;
1405
+ messageId?: string;
1406
+ }
1407
+
1408
+ /**
1409
+ * `<aikaara-slot-picker>` — step 4 of the schedule-call flow (Select Date &
1410
+ * Time). Replaces the earlier single-purpose `aikaara-schedule-call` element.
1411
+ *
1412
+ * Renders date chips plus a 2-column grid of 30-minute slots. Slots flagged
1413
+ * `available: false` (or already in the past) render disabled + struck
1414
+ * through. Continue posts the chosen slot back to the chat.
1415
+ *
1416
+ * Payload:
1417
+ * {
1418
+ * title?, subtitle?,
1419
+ * days?: [{ date: 'YYYY-MM-DD', slots: [{ start: 'HH:mm', available?: boolean }] }],
1420
+ * availability?: same as days (alias),
1421
+ * slots?: same as days (alias),
1422
+ * startDate?, daysAhead?, times?, disabledDates?, timezone?, // generated fallback
1423
+ * continueLabel?, // default 'Continue'
1424
+ * postbackKey?, // default 'callSlot'
1425
+ * postbackMessage?,
1426
+ * action?, messageId?
1427
+ * }
1428
+ *
1429
+ * Postback action: `{ [postbackKey]: 'YYYY-MM-DD HH:mm', scheduledDate,
1430
+ * scheduledTime, slot, slotLabel }`.
1431
+ */
1432
+ declare interface SlotOption {
1433
+ start: string;
1434
+ available?: boolean;
1435
+ }
1436
+
1437
+ declare interface SlotPickerDay {
1438
+ date: string;
1439
+ slots: SlotOption[];
1440
+ }
1441
+
1442
+ declare interface SlotPickerPayload {
1443
+ title?: string;
1444
+ subtitle?: string;
1445
+ days?: SlotPickerDay[];
1446
+ availability?: SlotPickerDay[];
1447
+ slots?: SlotPickerDay[];
1448
+ startDate?: string;
1449
+ daysAhead?: number;
1450
+ times?: string[];
1451
+ disabledDates?: string[];
1452
+ timezone?: string;
1453
+ continueLabel?: string;
1454
+ postbackKey?: string;
1455
+ postbackMessage?: string;
1456
+ action?: Record<string, unknown>;
1457
+ messageId?: string;
1458
+ }
1459
+
1127
1460
  /**
1128
1461
  * Primary CTA submit button for contentType=300 forms.
1129
1462
  *
@@ -1498,6 +1831,37 @@ declare interface UploadAdapterResult_2 {
1498
1831
  meta?: Record<string, unknown>;
1499
1832
  }
1500
1833
 
1834
+ /**
1835
+ * `<aikaara-call-upload>` — step 5 of the schedule-call flow (Additional
1836
+ * Details): optional document upload + a short query, then Submit.
1837
+ *
1838
+ * Matches the prototype: files are captured by name (max 10) and posted back
1839
+ * with the query; the chat flow owns the actual booking. File *bytes* are not
1840
+ * uploaded here — if the flow needs the documents, the user can attach them
1841
+ * via the chat composer, or a follow-up can wire the SDK upload adapter.
1842
+ *
1843
+ * Payload:
1844
+ * {
1845
+ * title?, subtitle?,
1846
+ * upload?: { enabled?, label?, hint?, accept?, maxFiles? } | boolean,
1847
+ * query?: { enabled?, label?, placeholder?, maxLength?, required? } | boolean,
1848
+ * submitLabel?: string, // default 'Schedule Call'
1849
+ * postbackKey?: string, // default 'callDetails'
1850
+ * postbackMessage?: string,
1851
+ * action?: Record<string, unknown>,
1852
+ * messageId?: string,
1853
+ * }
1854
+ *
1855
+ * Postback action: `{ [postbackKey]: true, query, fileNames, fileCount }`.
1856
+ */
1857
+ declare interface UploadConfig {
1858
+ enabled?: boolean;
1859
+ label?: string;
1860
+ hint?: string;
1861
+ accept?: string;
1862
+ maxFiles?: number;
1863
+ }
1864
+
1501
1865
  declare interface WidgetConfig extends ChatClientConfig {
1502
1866
  position?: 'bottom-right' | 'bottom-left';
1503
1867
  offset?: {
package/dist/ui.mjs CHANGED
@@ -1,24 +1,30 @@
1
- import { I as i, a as s, c as e, d as t, e as A, J as k, f as n, K as o, g as m, h as d, L as l, N as g, O as p, P as h, i as C, Q as M, R as b, U as c, V as u, j as S, r as I } from "./MountTenant-mK4EzOxi.mjs";
1
+ import { I as i, J as s, K as e, a as k, c as A, d as t, e as o, L as n, f as l, N as d, g as m, h as c, O as C, P as p, Q as g, R as S, U as h, V as M, W as P, X as b, i as u, Y as B, Z as I, _ as L, $ as f, j as T, r as v } from "./MountTenant-BzTKCfBi.mjs";
2
2
  export {
3
- i as AikaaraChat,
4
- s as AikaaraChatBubble,
5
- e as AikaaraChatHeader,
3
+ i as AikaaraCallConfirmation,
4
+ s as AikaaraCallUpload,
5
+ e as AikaaraChat,
6
+ k as AikaaraChatBubble,
7
+ A as AikaaraChatHeader,
6
8
  t as AikaaraChatInput,
7
- A as AikaaraChatWidget,
8
- k as AikaaraComparePlans,
9
- n as AikaaraErrorBanner,
10
- o as AikaaraLinkModal,
9
+ o as AikaaraChatWidget,
10
+ n as AikaaraComparePlans,
11
+ l as AikaaraErrorBanner,
12
+ d as AikaaraLinkModal,
11
13
  m as AikaaraMessageBubble,
12
- d as AikaaraMessageList,
13
- l as AikaaraModalAction,
14
- g as AikaaraOptionList,
15
- p as AikaaraSchemaForm,
16
- h as AikaaraSmartEditModal,
17
- C as AikaaraStreamingMessage,
18
- M as AikaaraSubmitAction,
19
- b as AikaaraSystemPill,
20
- c as AikaaraTemplateRenderer,
21
- u as AikaaraTextInput,
22
- S as AikaaraTypingIndicator,
23
- I as registerComponents
14
+ c as AikaaraMessageList,
15
+ C as AikaaraModalAction,
16
+ p as AikaaraOptionList,
17
+ g as AikaaraPriceBreakdown,
18
+ S as AikaaraSchemaForm,
19
+ h as AikaaraServiceDetails,
20
+ M as AikaaraServicePicker,
21
+ P as AikaaraSlotPicker,
22
+ b as AikaaraSmartEditModal,
23
+ u as AikaaraStreamingMessage,
24
+ B as AikaaraSubmitAction,
25
+ I as AikaaraSystemPill,
26
+ L as AikaaraTemplateRenderer,
27
+ f as AikaaraTextInput,
28
+ T as AikaaraTypingIndicator,
29
+ v as registerComponents
24
30
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aikaara/chat-sdk",
3
- "version": "1.5.18",
3
+ "version": "1.5.19",
4
4
  "type": "module",
5
5
  "description": "Aikaara Chat SDK — embeddable chat widget and headless client",
6
6
  "license": "MIT",