@insight-health/aura 0.0.12 → 0.1.0-beta.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.
@@ -7,10 +7,11 @@ import { RegisterTemplatesPayload, AuraWidgetInitParams, AuraWidgetEmitEvent, Au
7
7
  declare class AuraWidgetService {
8
8
  private config;
9
9
  private widgetFrame;
10
- private unsubsciptions;
10
+ private unsubscriptions;
11
11
  private messageQueue;
12
12
  private isQueueingEnabled;
13
13
  private methodRegistry;
14
+ private eventBus;
14
15
  isFrameReady: boolean;
15
16
  isFrameAuthenticated: boolean;
16
17
  constructor();
@@ -46,10 +47,13 @@ declare class AuraWidgetService {
46
47
  */
47
48
  unregisterMethod: <N extends keyof SupportedMethods>(name: N) => boolean;
48
49
  /**
49
- * Get SDK version
50
+ * Get SDK config
50
51
  */
51
52
  getConfig: () => AuraWidgetInitParams | null;
52
- getVersion: () => string;
53
+ /**
54
+ * Get SDK version from core package
55
+ */
56
+ getVersion: () => any;
53
57
  }
54
58
  export declare const AuraWidget: AuraWidgetService;
55
59
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"auraWidget.d.ts","sourceRoot":"","sources":["../src/auraWidget.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EAEpB,mBAAmB,EACnB,UAAU,EAEV,gBAAgB,EAChB,4BAA4B,EAC5B,+BAA+B,EAC/B,WAAW,EACX,YAAY,EACb,MAAM,SAAS,CAAC;AA0BjB;;;GAGG;AACH,cAAM,iBAAiB;IACrB,OAAO,CAAC,MAAM,CAAqC;IACnD,OAAO,CAAC,WAAW,CAAkC;IACrD,OAAO,CAAC,cAAc,CAAsB;IAC5C,OAAO,CAAC,YAAY,CAA6B;IACjD,OAAO,CAAC,iBAAiB,CAAkB;IAC3C,OAAO,CAAC,cAAc,CAAiC;IACvD,YAAY,EAAE,OAAO,CAAS;IAC9B,oBAAoB,EAAE,OAAO,CAAS;;IAoBtC,OAA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gB,GAAI,CAAC,SAAS,MAAM,gBAAgB,EAAE,MAAM,CAAC,KAAG,OAAO,CAErE;IAEF;;OAEG;IACH,SAAS,oCAEP;IAEF;;OAEG;IACH,UAAU,YAER;CACH;AAWD,eAAO,MAAM,UAAU,mBAAgB,CAAC"}
package/dist/index.cjs CHANGED
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x={insightBaseUrl:"https://anywhere.insighthealth.ai"};let w=null;function W(){return w}function O(i){w={...x,...i}}function U(i){O(i)}function l(){const i=W();if(!i)throw new Error("Aura SDK not configured. Call configure() first to set global configuration.");return i}function y(){return"0.0.12"}class T{constructor(){this.events={},this.subscribe=(e,t)=>(this.events[e]||(this.events[e]=[]),this.events[e].push(t),()=>{this.events[e]=this.events[e].filter(s=>s!==t)}),this.emit=(e,t)=>{this.events[e]&&this.events[e].forEach(s=>s(t))}}}const u=new T,d={log:i=>{console.log(`[Insight Health Aura Widget]: ${i}`)},warn:i=>{console.warn(`[Insight Health Aura Widget]: ${i}`)},error:i=>{console.error(`[Insight Health Aura Widget]: ${i}`)}},p={opacity:"0",pointerEvents:"none",width:"0",height:"0",maxWidth:"0",maxHeight:"0"},I={border:"none",borderRadius:"10px",boxShadow:"0 0 10px 0 rgba(0, 0, 0, 0.1)",overflow:"hidden",background:"#fff",position:"fixed",bottom:"20px",right:"20px",transition:"opacity 0.2s ease-in-out, width 0.2s ease-in-out, height 0.2s ease-in-out, max-width 0.2s ease-in-out, max-height 0.2s ease-in-out",zIndex:"9999"};class _{constructor(){this.config=null,this.widgetFrame=null,this.unsubsciptions=[],this.messageQueue=[],this.isQueueingEnabled=!1,this.methodRegistry={},this.isFrameReady=!1,this.isFrameAuthenticated=!1,this.postMessage=e=>{var s;if(!((s=this.widgetFrame)!=null&&s.contentWindow)){d.warn("No widget iframe to communicate with");return}const t=l();this.widgetFrame.contentWindow.postMessage(e,{targetOrigin:t.insightBaseUrl})},this.enableQueue=()=>{this.isQueueingEnabled=!0},this.disableQueue=(e=!1)=>{this.isQueueingEnabled=!1,e&&this.flushQueue()},this.flushQueue=()=>{const e=[...this.messageQueue];this.clearQueue(),e.forEach(t=>{this.postMessage(t)})},this.clearQueue=()=>{this.messageQueue=[]},this.sendOrQueue=e=>{if(this.isQueueingEnabled){this.messageQueue.push(e);return}this.postMessage(e)},this.handleMethodCall=async e=>{const{callId:t,methodName:s,args:a}=e,r=this.methodRegistry[s];if(!r){this.postMessage({type:"Method.Response",payload:{callId:t,methodName:s,success:!1,error:{message:`Method "${s}" is not registered`,code:"METHOD_NOT_FOUND"}}});return}try{const n=await r(a||{});this.postMessage({type:"Method.Response",payload:{callId:t,methodName:s,success:!0,result:n}})}catch(n){const o=n instanceof Error?n:new Error(String(n));this.postMessage({type:"Method.Response",payload:{callId:t,success:!1,methodName:s,error:{message:o.message,code:"METHOD_EXECUTION_ERROR",stack:o.stack,name:o.name,cause:o.cause,apiResponse:o.response}}})}},this.init=e=>new Promise(t=>{if(!this.widgetFrame){this.reset(),this.enableQueue();const s=l(),{themeConfig:a,entitlements:r={},tenantId:n,tenantName:o,user:b,language:F,container:c,widgetId:M,widgetStyles:h}=e;this.config=e,this.isFrameReady=!1,this.widgetFrame=document.createElement("iframe");const E=(h==null?void 0:h.width)||"350px",Q=(h==null?void 0:h.height)||"600px",R={...I,...h,...p};Object.assign(this.widgetFrame.style,R),this.widgetFrame.id=M||"aura-widget",this.widgetFrame.setAttribute("allow",`microphone ${s.insightBaseUrl}; camera ${s.insightBaseUrl}; clipboard-read ${s.insightBaseUrl}; clipboard-write ${s.insightBaseUrl};`),this.widgetFrame.src=`${s.insightBaseUrl}`,this.widgetFrame.__desiredWidth=E,this.widgetFrame.__desiredHeight=Q,this.widgetFrame.onerror=()=>{d.error(`Failed to load iframe. Please ensure your Content Security Policy includes:
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x={insightBaseUrl:"https://anywhere.insighthealth.ai"};let p=null;function A(){return p}function v(i){p={...x,...i}}function O(i){v(i)}function g(){const i=A();if(!i)throw new Error("Insight SDK not configured. Call configure() first to set global configuration.");return i}class C{constructor(){this.events={},this.subscribe=(e,t)=>(this.events[e]||(this.events[e]=[]),this.events[e].push(t),()=>{this.events[e]=this.events[e].filter(s=>s!==t)}),this.emit=(e,t)=>{this.events[e]&&this.events[e].forEach(s=>s(t))}}}function U(i){return{log:e=>{console.log(`[${i}]: ${e}`)},warn:e=>{console.warn(`[${i}]: ${e}`)},error:e=>{console.error(`[${i}]: ${e}`)}}}const u=U("Insight Health Aura Widget"),f={opacity:"0",pointerEvents:"none",width:"0",height:"0",maxWidth:"0",maxHeight:"0"},W={border:"none",borderRadius:"10px",boxShadow:"0 0 10px 0 rgba(0, 0, 0, 0.1)",overflow:"hidden",background:"#fff",position:"fixed",bottom:"20px",right:"20px",transition:"opacity 0.2s ease-in-out, width 0.2s ease-in-out, height 0.2s ease-in-out, max-width 0.2s ease-in-out, max-height 0.2s ease-in-out",zIndex:"9999"};class B{constructor(){this.config=null,this.widgetFrame=null,this.unsubscriptions=[],this.messageQueue=[],this.isQueueingEnabled=!1,this.methodRegistry={},this.eventBus=new C,this.isFrameReady=!1,this.isFrameAuthenticated=!1,this.postMessage=e=>{var s;if(!((s=this.widgetFrame)!=null&&s.contentWindow)){u.warn("No widget iframe to communicate with");return}const t=g();this.widgetFrame.contentWindow.postMessage(e,{targetOrigin:t.insightBaseUrl})},this.enableQueue=()=>{this.isQueueingEnabled=!0},this.disableQueue=(e=!1)=>{this.isQueueingEnabled=!1,e&&this.flushQueue()},this.flushQueue=()=>{const e=[...this.messageQueue];this.clearQueue(),e.forEach(t=>{this.postMessage(t)})},this.clearQueue=()=>{this.messageQueue=[]},this.sendOrQueue=e=>{if(this.isQueueingEnabled){this.messageQueue.push(e);return}this.postMessage(e)},this.handleMethodCall=async e=>{const{callId:t,methodName:s,args:a}=e,r=this.methodRegistry[s];if(!r){this.postMessage({type:"Method.Response",payload:{callId:t,methodName:s,success:!1,error:{message:`Method "${s}" is not registered`,code:"METHOD_NOT_FOUND"}}});return}try{const n=await r(a||{});this.postMessage({type:"Method.Response",payload:{callId:t,methodName:s,success:!0,result:n}})}catch(n){const h=n instanceof Error?n:new Error(String(n));this.postMessage({type:"Method.Response",payload:{callId:t,success:!1,methodName:s,error:{message:h.message,code:"METHOD_EXECUTION_ERROR",stack:h.stack,name:h.name,cause:h.cause,apiResponse:h.response}}})}},this.init=e=>new Promise(t=>{if(!this.widgetFrame){this.reset(),this.enableQueue();const s=g(),{themeConfig:a,entitlements:r={},tenantId:n,tenantName:h,user:w,language:y,container:c,widgetId:b,widgetStyles:o}=e;this.config=e,this.isFrameReady=!1,this.widgetFrame=document.createElement("iframe");const F=(o==null?void 0:o.width)||"350px",M=(o==null?void 0:o.height)||"600px",E={...W,...o,...f};Object.assign(this.widgetFrame.style,E),this.widgetFrame.id=b||"aura-widget",this.widgetFrame.setAttribute("allow",`microphone ${s.insightBaseUrl}; camera ${s.insightBaseUrl}; clipboard-read ${s.insightBaseUrl}; clipboard-write ${s.insightBaseUrl};`),this.widgetFrame.src=`${s.insightBaseUrl}`,this.widgetFrame.__desiredWidth=F,this.widgetFrame.__desiredHeight=M,this.widgetFrame.onerror=()=>{u.error(`Failed to load iframe. Please ensure your Content Security Policy includes:
2
2
  frame-src ${s.insightBaseUrl}
3
- `)},(c&&document.querySelector(c)||document.body).appendChild(this.widgetFrame);const C=u.subscribe("Auth.Ready",()=>{this.isFrameReady=!0,a&&this.setTheme(a),r&&this.setEntitlements(r),this.setUser({tenantId:n,tenantName:o,user:b,language:F})}),A=u.subscribe("Auth.Complete",m=>{var f;this.isFrameAuthenticated=!0,this.disableQueue(!0),t(m),(f=e.onAuthenticated)==null||f.call(e,m)});this.unsubsciptions.push(C,A)}}),this.setUser=e=>{const t=this.config.partnerKey,{tenantId:s,tenantName:a,user:r,language:n}=e;this.config.tenantId=s,this.config.tenantName=a,this.config.user=r,this.config.language=n,this.isFrameAuthenticated=!1,this.postMessage({type:"Auth.Login",payload:{partnerKey:t,tenantId:s,tenantName:a,user:r,language:n}})},this.setTheme=e=>{this.postMessage({type:"Theme.Update",payload:{...e}})},this.setEntitlements=e=>{this.postMessage({type:"Entitlements.Update",payload:{entitlements:e}})},this.show=()=>{if(this.widgetFrame){const e=this.widgetFrame.__desiredWidth||"350px",t=this.widgetFrame.__desiredHeight||"600px",s={opacity:"1",pointerEvents:"auto",width:e,height:t,maxWidth:e,maxHeight:t};Object.assign(this.widgetFrame.style,{...s})}},this.hide=()=>{this.widgetFrame&&Object.assign(this.widgetFrame.style,{...p})},this.reset=()=>{this.widgetFrame&&this.widgetFrame.remove(),this.widgetFrame=null,this.isFrameReady=!1,this.isFrameAuthenticated=!1,this.unsubsciptions.forEach(e=>e==null?void 0:e()),this.unsubsciptions=[],this.disableQueue(),this.clearQueue(),this.methodRegistry={}},this.command=e=>{this.sendOrQueue(e),this.show()},this.emit=this.command,this.on=(e,t)=>u.subscribe(e,t),this.registerTemplates=e=>{this.sendOrQueue({type:"Template.Register",payload:e})},this.autoRegisterTemplates=e=>{this.sendOrQueue({type:"Template.AutoRegister",payload:e})},this.registerMethod=(e,t)=>{if(typeof e!="string"){d.error("Method name must be a string");return}if(typeof t!="function"){d.error("Method handler for name "+e+" must be a function");return}this.methodRegistry[e]=t},this.unregisterMethod=e=>delete this.methodRegistry[e],this.getConfig=()=>this.config,this.getVersion=()=>y(),window.addEventListener("message",e=>{var t;if(!(e.source!==((t=this.widgetFrame)==null?void 0:t.contentWindow)||!e.data)){if(e.data.type==="Method.Call"){this.handleMethodCall(e.data.payload);return}u.emit(e.data.type,e.data.payload)}})}}let g=null;function H(){return g||(g=new _),g}const S=H();exports.AuraWidget=S;exports.configure=U;exports.getConfig=l;exports.getVersion=y;
3
+ `)},(c&&document.querySelector(c)||document.body).appendChild(this.widgetFrame);const Q=this.eventBus.subscribe("Auth.Ready",()=>{this.isFrameReady=!0,a&&this.setTheme(a),r&&this.setEntitlements(r),this.setUser({tenantId:n,tenantName:h,user:w,language:y})}),R=this.eventBus.subscribe("Auth.Complete",l=>{var m;this.isFrameAuthenticated=!0,this.disableQueue(!0),t(l),(m=e.onAuthenticated)==null||m.call(e,l)});this.unsubscriptions.push(Q,R)}}),this.setUser=e=>{const t=this.config.partnerKey,{tenantId:s,tenantName:a,user:r,language:n}=e;this.config.tenantId=s,this.config.tenantName=a,this.config.user=r,this.config.language=n,this.isFrameAuthenticated=!1,this.postMessage({type:"Auth.Login",payload:{partnerKey:t,tenantId:s,tenantName:a,user:r,language:n}})},this.setTheme=e=>{this.postMessage({type:"Theme.Update",payload:{...e}})},this.setEntitlements=e=>{this.postMessage({type:"Entitlements.Update",payload:{entitlements:e}})},this.show=()=>{if(this.widgetFrame){const e=this.widgetFrame.__desiredWidth||"350px",t=this.widgetFrame.__desiredHeight||"600px",s={opacity:"1",pointerEvents:"auto",width:e,height:t,maxWidth:e,maxHeight:t};Object.assign(this.widgetFrame.style,{...s})}},this.hide=()=>{this.widgetFrame&&Object.assign(this.widgetFrame.style,{...f})},this.reset=()=>{this.widgetFrame&&this.widgetFrame.remove(),this.widgetFrame=null,this.isFrameReady=!1,this.isFrameAuthenticated=!1,this.unsubscriptions.forEach(e=>e==null?void 0:e()),this.unsubscriptions=[],this.disableQueue(),this.clearQueue(),this.methodRegistry={}},this.command=e=>{this.sendOrQueue(e),this.show()},this.emit=this.command,this.on=(e,t)=>this.eventBus.subscribe(e,t),this.registerTemplates=e=>{this.sendOrQueue({type:"Template.Register",payload:e})},this.autoRegisterTemplates=e=>{this.sendOrQueue({type:"Template.AutoRegister",payload:e})},this.registerMethod=(e,t)=>{if(typeof e!="string"){u.error("Method name must be a string");return}if(typeof t!="function"){u.error("Method handler for name "+e+" must be a function");return}this.methodRegistry[e]=t},this.unregisterMethod=e=>delete this.methodRegistry[e],this.getConfig=()=>this.config,this.getVersion=()=>"0.1.0-beta.0",window.addEventListener("message",e=>{var t;if(!(e.source!==((t=this.widgetFrame)==null?void 0:t.contentWindow)||!e.data)){if(e.data.type==="Method.Call"){this.handleMethodCall(e.data.payload);return}this.eventBus.emit(e.data.type,e.data.payload)}})}}let d=null;function T(){return d||(d=new B),d}const $=T();exports.AuraWidget=$;exports.configure=O;exports.getConfig=g;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from './root';
1
+ export { configure, getConfig } from '@insight-health/core';
2
2
  export * from './auraWidget';
3
3
  export * from './types';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC5D,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -1,28 +1,25 @@
1
1
  const x = {
2
2
  insightBaseUrl: "https://anywhere.insighthealth.ai"
3
3
  };
4
- let w = null;
4
+ let p = null;
5
5
  function A() {
6
- return w;
6
+ return p;
7
7
  }
8
- function W(i) {
9
- w = { ...x, ...i };
8
+ function v(i) {
9
+ p = { ...x, ...i };
10
10
  }
11
- function H(i) {
12
- W(i);
11
+ function $(i) {
12
+ v(i);
13
13
  }
14
- function f() {
14
+ function m() {
15
15
  const i = A();
16
16
  if (!i)
17
17
  throw new Error(
18
- "Aura SDK not configured. Call configure() first to set global configuration."
18
+ "Insight SDK not configured. Call configure() first to set global configuration."
19
19
  );
20
20
  return i;
21
21
  }
22
- function O() {
23
- return "0.0.12";
24
- }
25
- class U {
22
+ class C {
26
23
  constructor() {
27
24
  this.events = {}, this.subscribe = (e, t) => (this.events[e] || (this.events[e] = []), this.events[e].push(t), () => {
28
25
  this.events[e] = this.events[e].filter((s) => s !== t);
@@ -31,24 +28,27 @@ class U {
31
28
  };
32
29
  }
33
30
  }
34
- const d = new U(), u = {
35
- log: (i) => {
36
- console.log(`[Insight Health Aura Widget]: ${i}`);
37
- },
38
- warn: (i) => {
39
- console.warn(`[Insight Health Aura Widget]: ${i}`);
40
- },
41
- error: (i) => {
42
- console.error(`[Insight Health Aura Widget]: ${i}`);
43
- }
44
- }, p = {
31
+ function O(i) {
32
+ return {
33
+ log: (e) => {
34
+ console.log(`[${i}]: ${e}`);
35
+ },
36
+ warn: (e) => {
37
+ console.warn(`[${i}]: ${e}`);
38
+ },
39
+ error: (e) => {
40
+ console.error(`[${i}]: ${e}`);
41
+ }
42
+ };
43
+ }
44
+ const d = O("Insight Health Aura Widget"), f = {
45
45
  opacity: "0",
46
46
  pointerEvents: "none",
47
47
  width: "0",
48
48
  height: "0",
49
49
  maxWidth: "0",
50
50
  maxHeight: "0"
51
- }, I = {
51
+ }, U = {
52
52
  border: "none",
53
53
  borderRadius: "10px",
54
54
  boxShadow: "0 0 10px 0 rgba(0, 0, 0, 0.1)",
@@ -60,15 +60,15 @@ const d = new U(), u = {
60
60
  transition: "opacity 0.2s ease-in-out, width 0.2s ease-in-out, height 0.2s ease-in-out, max-width 0.2s ease-in-out, max-height 0.2s ease-in-out",
61
61
  zIndex: "9999"
62
62
  };
63
- class T {
63
+ class B {
64
64
  constructor() {
65
- this.config = null, this.widgetFrame = null, this.unsubsciptions = [], this.messageQueue = [], this.isQueueingEnabled = !1, this.methodRegistry = {}, this.isFrameReady = !1, this.isFrameAuthenticated = !1, this.postMessage = (e) => {
65
+ this.config = null, this.widgetFrame = null, this.unsubscriptions = [], this.messageQueue = [], this.isQueueingEnabled = !1, this.methodRegistry = {}, this.eventBus = new C(), this.isFrameReady = !1, this.isFrameAuthenticated = !1, this.postMessage = (e) => {
66
66
  var s;
67
67
  if (!((s = this.widgetFrame) != null && s.contentWindow)) {
68
- u.warn("No widget iframe to communicate with");
68
+ d.warn("No widget iframe to communicate with");
69
69
  return;
70
70
  }
71
- const t = f();
71
+ const t = m();
72
72
  this.widgetFrame.contentWindow.postMessage(e, {
73
73
  targetOrigin: t.insightBaseUrl
74
74
  });
@@ -118,7 +118,7 @@ class T {
118
118
  }
119
119
  });
120
120
  } catch (n) {
121
- const o = n instanceof Error ? n : new Error(String(n));
121
+ const h = n instanceof Error ? n : new Error(String(n));
122
122
  this.postMessage({
123
123
  type: "Method.Response",
124
124
  payload: {
@@ -126,12 +126,12 @@ class T {
126
126
  success: !1,
127
127
  methodName: s,
128
128
  error: {
129
- message: o.message,
129
+ message: h.message,
130
130
  code: "METHOD_EXECUTION_ERROR",
131
- stack: o.stack,
132
- name: o.name,
133
- cause: o.cause,
134
- apiResponse: o.response
131
+ stack: h.stack,
132
+ name: h.name,
133
+ cause: h.cause,
134
+ apiResponse: h.response
135
135
  }
136
136
  }
137
137
  });
@@ -139,43 +139,49 @@ class T {
139
139
  }, this.init = (e) => new Promise((t) => {
140
140
  if (!this.widgetFrame) {
141
141
  this.reset(), this.enableQueue();
142
- const s = f(), {
142
+ const s = m(), {
143
143
  themeConfig: a,
144
144
  entitlements: r = {},
145
145
  tenantId: n,
146
- tenantName: o,
147
- user: y,
148
- language: b,
149
- container: l,
150
- widgetId: F,
151
- widgetStyles: h
146
+ tenantName: h,
147
+ user: w,
148
+ language: y,
149
+ container: g,
150
+ widgetId: b,
151
+ widgetStyles: o
152
152
  } = e;
153
153
  this.config = e, this.isFrameReady = !1, this.widgetFrame = document.createElement("iframe");
154
- const E = (h == null ? void 0 : h.width) || "350px", M = (h == null ? void 0 : h.height) || "600px", Q = {
155
- ...I,
156
- ...h,
157
- ...p
154
+ const F = (o == null ? void 0 : o.width) || "350px", M = (o == null ? void 0 : o.height) || "600px", E = {
155
+ ...U,
156
+ ...o,
157
+ ...f
158
158
  };
159
- Object.assign(this.widgetFrame.style, Q), this.widgetFrame.id = F || "aura-widget", this.widgetFrame.setAttribute(
159
+ Object.assign(this.widgetFrame.style, E), this.widgetFrame.id = b || "aura-widget", this.widgetFrame.setAttribute(
160
160
  "allow",
161
161
  `microphone ${s.insightBaseUrl}; camera ${s.insightBaseUrl}; clipboard-read ${s.insightBaseUrl}; clipboard-write ${s.insightBaseUrl};`
162
- ), this.widgetFrame.src = `${s.insightBaseUrl}`, this.widgetFrame.__desiredWidth = E, this.widgetFrame.__desiredHeight = M, this.widgetFrame.onerror = () => {
163
- u.error(
162
+ ), this.widgetFrame.src = `${s.insightBaseUrl}`, this.widgetFrame.__desiredWidth = F, this.widgetFrame.__desiredHeight = M, this.widgetFrame.onerror = () => {
163
+ d.error(
164
164
  `Failed to load iframe. Please ensure your Content Security Policy includes:
165
165
  frame-src ${s.insightBaseUrl}
166
166
  `
167
167
  );
168
- }, (l && document.querySelector(l) || document.body).appendChild(this.widgetFrame);
169
- const R = d.subscribe("Auth.Ready", () => {
170
- this.isFrameReady = !0, a && this.setTheme(a), r && this.setEntitlements(r), this.setUser({ tenantId: n, tenantName: o, user: y, language: b });
171
- }), C = d.subscribe(
168
+ }, (g && document.querySelector(g) || document.body).appendChild(this.widgetFrame);
169
+ const Q = this.eventBus.subscribe(
170
+ "Auth.Ready",
171
+ () => {
172
+ this.isFrameReady = !0, a && this.setTheme(a), r && this.setEntitlements(r), this.setUser({ tenantId: n, tenantName: h, user: w, language: y });
173
+ }
174
+ ), R = this.eventBus.subscribe(
172
175
  "Auth.Complete",
173
176
  (c) => {
174
- var m;
175
- this.isFrameAuthenticated = !0, this.disableQueue(!0), t(c), (m = e.onAuthenticated) == null || m.call(e, c);
177
+ var l;
178
+ this.isFrameAuthenticated = !0, this.disableQueue(!0), t(c), (l = e.onAuthenticated) == null || l.call(e, c);
176
179
  }
177
180
  );
178
- this.unsubsciptions.push(R, C);
181
+ this.unsubscriptions.push(
182
+ Q,
183
+ R
184
+ );
179
185
  }
180
186
  }), this.setUser = (e) => {
181
187
  const t = this.config.partnerKey, { tenantId: s, tenantName: a, user: r, language: n } = e;
@@ -216,12 +222,12 @@ class T {
216
222
  Object.assign(this.widgetFrame.style, { ...s });
217
223
  }
218
224
  }, this.hide = () => {
219
- this.widgetFrame && Object.assign(this.widgetFrame.style, { ...p });
225
+ this.widgetFrame && Object.assign(this.widgetFrame.style, { ...f });
220
226
  }, this.reset = () => {
221
- this.widgetFrame && this.widgetFrame.remove(), this.widgetFrame = null, this.isFrameReady = !1, this.isFrameAuthenticated = !1, this.unsubsciptions.forEach((e) => e == null ? void 0 : e()), this.unsubsciptions = [], this.disableQueue(), this.clearQueue(), this.methodRegistry = {};
227
+ this.widgetFrame && this.widgetFrame.remove(), this.widgetFrame = null, this.isFrameReady = !1, this.isFrameAuthenticated = !1, this.unsubscriptions.forEach((e) => e == null ? void 0 : e()), this.unsubscriptions = [], this.disableQueue(), this.clearQueue(), this.methodRegistry = {};
222
228
  }, this.command = (e) => {
223
229
  this.sendOrQueue(e), this.show();
224
- }, this.emit = this.command, this.on = (e, t) => d.subscribe(e, t), this.registerTemplates = (e) => {
230
+ }, this.emit = this.command, this.on = (e, t) => this.eventBus.subscribe(e, t), this.registerTemplates = (e) => {
225
231
  this.sendOrQueue({
226
232
  type: "Template.Register",
227
233
  payload: e
@@ -233,15 +239,15 @@ class T {
233
239
  });
234
240
  }, this.registerMethod = (e, t) => {
235
241
  if (typeof e != "string") {
236
- u.error("Method name must be a string");
242
+ d.error("Method name must be a string");
237
243
  return;
238
244
  }
239
245
  if (typeof t != "function") {
240
- u.error("Method handler for name " + e + " must be a function");
246
+ d.error("Method handler for name " + e + " must be a function");
241
247
  return;
242
248
  }
243
249
  this.methodRegistry[e] = t;
244
- }, this.unregisterMethod = (e) => delete this.methodRegistry[e], this.getConfig = () => this.config, this.getVersion = () => O(), window.addEventListener(
250
+ }, this.unregisterMethod = (e) => delete this.methodRegistry[e], this.getConfig = () => this.config, this.getVersion = () => "0.1.0-beta.0", window.addEventListener(
245
251
  "message",
246
252
  (e) => {
247
253
  var t;
@@ -252,20 +258,19 @@ class T {
252
258
  );
253
259
  return;
254
260
  }
255
- d.emit(e.data.type, e.data.payload);
261
+ this.eventBus.emit(e.data.type, e.data.payload);
256
262
  }
257
263
  }
258
264
  );
259
265
  }
260
266
  }
261
- let g = null;
262
- function _() {
263
- return g || (g = new T()), g;
267
+ let u = null;
268
+ function W() {
269
+ return u || (u = new B()), u;
264
270
  }
265
- const B = _();
271
+ const T = W();
266
272
  export {
267
- B as AuraWidget,
268
- H as configure,
269
- f as getConfig,
270
- O as getVersion
273
+ T as AuraWidget,
274
+ $ as configure,
275
+ m as getConfig
271
276
  };
package/dist/index.umd.js CHANGED
@@ -1,3 +1,3 @@
1
- (function(r,u){typeof exports=="object"&&typeof module<"u"?u(exports):typeof define=="function"&&define.amd?define(["exports"],u):(r=typeof globalThis<"u"?globalThis:r||self,u(r.InsightAura={}))})(this,function(r){"use strict";const u={insightBaseUrl:"https://anywhere.insighthealth.ai"};let m=null;function M(){return m}function E(i){m={...u,...i}}function Q(i){E(i)}function c(){const i=M();if(!i)throw new Error("Aura SDK not configured. Call configure() first to set global configuration.");return i}function p(){return"0.0.12"}class R{constructor(){this.events={},this.subscribe=(e,t)=>(this.events[e]||(this.events[e]=[]),this.events[e].push(t),()=>{this.events[e]=this.events[e].filter(s=>s!==t)}),this.emit=(e,t)=>{this.events[e]&&this.events[e].forEach(s=>s(t))}}}const g=new R,l={log:i=>{console.log(`[Insight Health Aura Widget]: ${i}`)},warn:i=>{console.warn(`[Insight Health Aura Widget]: ${i}`)},error:i=>{console.error(`[Insight Health Aura Widget]: ${i}`)}},w={opacity:"0",pointerEvents:"none",width:"0",height:"0",maxWidth:"0",maxHeight:"0"},A={border:"none",borderRadius:"10px",boxShadow:"0 0 10px 0 rgba(0, 0, 0, 0.1)",overflow:"hidden",background:"#fff",position:"fixed",bottom:"20px",right:"20px",transition:"opacity 0.2s ease-in-out, width 0.2s ease-in-out, height 0.2s ease-in-out, max-width 0.2s ease-in-out, max-height 0.2s ease-in-out",zIndex:"9999"};class C{constructor(){this.config=null,this.widgetFrame=null,this.unsubsciptions=[],this.messageQueue=[],this.isQueueingEnabled=!1,this.methodRegistry={},this.isFrameReady=!1,this.isFrameAuthenticated=!1,this.postMessage=e=>{var s;if(!((s=this.widgetFrame)!=null&&s.contentWindow)){l.warn("No widget iframe to communicate with");return}const t=c();this.widgetFrame.contentWindow.postMessage(e,{targetOrigin:t.insightBaseUrl})},this.enableQueue=()=>{this.isQueueingEnabled=!0},this.disableQueue=(e=!1)=>{this.isQueueingEnabled=!1,e&&this.flushQueue()},this.flushQueue=()=>{const e=[...this.messageQueue];this.clearQueue(),e.forEach(t=>{this.postMessage(t)})},this.clearQueue=()=>{this.messageQueue=[]},this.sendOrQueue=e=>{if(this.isQueueingEnabled){this.messageQueue.push(e);return}this.postMessage(e)},this.handleMethodCall=async e=>{const{callId:t,methodName:s,args:o}=e,a=this.methodRegistry[s];if(!a){this.postMessage({type:"Method.Response",payload:{callId:t,methodName:s,success:!1,error:{message:`Method "${s}" is not registered`,code:"METHOD_NOT_FOUND"}}});return}try{const n=await a(o||{});this.postMessage({type:"Method.Response",payload:{callId:t,methodName:s,success:!0,result:n}})}catch(n){const h=n instanceof Error?n:new Error(String(n));this.postMessage({type:"Method.Response",payload:{callId:t,success:!1,methodName:s,error:{message:h.message,code:"METHOD_EXECUTION_ERROR",stack:h.stack,name:h.name,cause:h.cause,apiResponse:h.response}}})}},this.init=e=>new Promise(t=>{if(!this.widgetFrame){this.reset(),this.enableQueue();const s=c(),{themeConfig:o,entitlements:a={},tenantId:n,tenantName:h,user:O,language:T,container:y,widgetId:U,widgetStyles:d}=e;this.config=e,this.isFrameReady=!1,this.widgetFrame=document.createElement("iframe");const I=(d==null?void 0:d.width)||"350px",_=(d==null?void 0:d.height)||"600px",H={...A,...d,...w};Object.assign(this.widgetFrame.style,H),this.widgetFrame.id=U||"aura-widget",this.widgetFrame.setAttribute("allow",`microphone ${s.insightBaseUrl}; camera ${s.insightBaseUrl}; clipboard-read ${s.insightBaseUrl}; clipboard-write ${s.insightBaseUrl};`),this.widgetFrame.src=`${s.insightBaseUrl}`,this.widgetFrame.__desiredWidth=I,this.widgetFrame.__desiredHeight=_,this.widgetFrame.onerror=()=>{l.error(`Failed to load iframe. Please ensure your Content Security Policy includes:
1
+ (function(r,u){typeof exports=="object"&&typeof module<"u"?u(exports):typeof define=="function"&&define.amd?define(["exports"],u):(r=typeof globalThis<"u"?globalThis:r||self,u(r.InsightAura={}))})(this,function(r){"use strict";const u={insightBaseUrl:"https://anywhere.insighthealth.ai"};let m=null;function b(){return m}function F(i){m={...u,...i}}function M(i){F(i)}function c(){const i=b();if(!i)throw new Error("Insight SDK not configured. Call configure() first to set global configuration.");return i}class E{constructor(){this.events={},this.subscribe=(e,t)=>(this.events[e]||(this.events[e]=[]),this.events[e].push(t),()=>{this.events[e]=this.events[e].filter(s=>s!==t)}),this.emit=(e,t)=>{this.events[e]&&this.events[e].forEach(s=>s(t))}}}function Q(i){return{log:e=>{console.log(`[${i}]: ${e}`)},warn:e=>{console.warn(`[${i}]: ${e}`)},error:e=>{console.error(`[${i}]: ${e}`)}}}const g=Q("Insight Health Aura Widget"),f={opacity:"0",pointerEvents:"none",width:"0",height:"0",maxWidth:"0",maxHeight:"0"},R={border:"none",borderRadius:"10px",boxShadow:"0 0 10px 0 rgba(0, 0, 0, 0.1)",overflow:"hidden",background:"#fff",position:"fixed",bottom:"20px",right:"20px",transition:"opacity 0.2s ease-in-out, width 0.2s ease-in-out, height 0.2s ease-in-out, max-width 0.2s ease-in-out, max-height 0.2s ease-in-out",zIndex:"9999"};class x{constructor(){this.config=null,this.widgetFrame=null,this.unsubscriptions=[],this.messageQueue=[],this.isQueueingEnabled=!1,this.methodRegistry={},this.eventBus=new E,this.isFrameReady=!1,this.isFrameAuthenticated=!1,this.postMessage=e=>{var s;if(!((s=this.widgetFrame)!=null&&s.contentWindow)){g.warn("No widget iframe to communicate with");return}const t=c();this.widgetFrame.contentWindow.postMessage(e,{targetOrigin:t.insightBaseUrl})},this.enableQueue=()=>{this.isQueueingEnabled=!0},this.disableQueue=(e=!1)=>{this.isQueueingEnabled=!1,e&&this.flushQueue()},this.flushQueue=()=>{const e=[...this.messageQueue];this.clearQueue(),e.forEach(t=>{this.postMessage(t)})},this.clearQueue=()=>{this.messageQueue=[]},this.sendOrQueue=e=>{if(this.isQueueingEnabled){this.messageQueue.push(e);return}this.postMessage(e)},this.handleMethodCall=async e=>{const{callId:t,methodName:s,args:h}=e,a=this.methodRegistry[s];if(!a){this.postMessage({type:"Method.Response",payload:{callId:t,methodName:s,success:!1,error:{message:`Method "${s}" is not registered`,code:"METHOD_NOT_FOUND"}}});return}try{const n=await a(h||{});this.postMessage({type:"Method.Response",payload:{callId:t,methodName:s,success:!0,result:n}})}catch(n){const o=n instanceof Error?n:new Error(String(n));this.postMessage({type:"Method.Response",payload:{callId:t,success:!1,methodName:s,error:{message:o.message,code:"METHOD_EXECUTION_ERROR",stack:o.stack,name:o.name,cause:o.cause,apiResponse:o.response}}})}},this.init=e=>new Promise(t=>{if(!this.widgetFrame){this.reset(),this.enableQueue();const s=c(),{themeConfig:h,entitlements:a={},tenantId:n,tenantName:o,user:O,language:T,container:p,widgetId:C,widgetStyles:d}=e;this.config=e,this.isFrameReady=!1,this.widgetFrame=document.createElement("iframe");const U=(d==null?void 0:d.width)||"350px",W=(d==null?void 0:d.height)||"600px",B={...R,...d,...f};Object.assign(this.widgetFrame.style,B),this.widgetFrame.id=C||"aura-widget",this.widgetFrame.setAttribute("allow",`microphone ${s.insightBaseUrl}; camera ${s.insightBaseUrl}; clipboard-read ${s.insightBaseUrl}; clipboard-write ${s.insightBaseUrl};`),this.widgetFrame.src=`${s.insightBaseUrl}`,this.widgetFrame.__desiredWidth=U,this.widgetFrame.__desiredHeight=W,this.widgetFrame.onerror=()=>{g.error(`Failed to load iframe. Please ensure your Content Security Policy includes:
2
2
  frame-src ${s.insightBaseUrl}
3
- `)},(y&&document.querySelector(y)||document.body).appendChild(this.widgetFrame);const S=g.subscribe("Auth.Ready",()=>{this.isFrameReady=!0,o&&this.setTheme(o),a&&this.setEntitlements(a),this.setUser({tenantId:n,tenantName:h,user:O,language:T})}),B=g.subscribe("Auth.Complete",b=>{var F;this.isFrameAuthenticated=!0,this.disableQueue(!0),t(b),(F=e.onAuthenticated)==null||F.call(e,b)});this.unsubsciptions.push(S,B)}}),this.setUser=e=>{const t=this.config.partnerKey,{tenantId:s,tenantName:o,user:a,language:n}=e;this.config.tenantId=s,this.config.tenantName=o,this.config.user=a,this.config.language=n,this.isFrameAuthenticated=!1,this.postMessage({type:"Auth.Login",payload:{partnerKey:t,tenantId:s,tenantName:o,user:a,language:n}})},this.setTheme=e=>{this.postMessage({type:"Theme.Update",payload:{...e}})},this.setEntitlements=e=>{this.postMessage({type:"Entitlements.Update",payload:{entitlements:e}})},this.show=()=>{if(this.widgetFrame){const e=this.widgetFrame.__desiredWidth||"350px",t=this.widgetFrame.__desiredHeight||"600px",s={opacity:"1",pointerEvents:"auto",width:e,height:t,maxWidth:e,maxHeight:t};Object.assign(this.widgetFrame.style,{...s})}},this.hide=()=>{this.widgetFrame&&Object.assign(this.widgetFrame.style,{...w})},this.reset=()=>{this.widgetFrame&&this.widgetFrame.remove(),this.widgetFrame=null,this.isFrameReady=!1,this.isFrameAuthenticated=!1,this.unsubsciptions.forEach(e=>e==null?void 0:e()),this.unsubsciptions=[],this.disableQueue(),this.clearQueue(),this.methodRegistry={}},this.command=e=>{this.sendOrQueue(e),this.show()},this.emit=this.command,this.on=(e,t)=>g.subscribe(e,t),this.registerTemplates=e=>{this.sendOrQueue({type:"Template.Register",payload:e})},this.autoRegisterTemplates=e=>{this.sendOrQueue({type:"Template.AutoRegister",payload:e})},this.registerMethod=(e,t)=>{if(typeof e!="string"){l.error("Method name must be a string");return}if(typeof t!="function"){l.error("Method handler for name "+e+" must be a function");return}this.methodRegistry[e]=t},this.unregisterMethod=e=>delete this.methodRegistry[e],this.getConfig=()=>this.config,this.getVersion=()=>p(),window.addEventListener("message",e=>{var t;if(!(e.source!==((t=this.widgetFrame)==null?void 0:t.contentWindow)||!e.data)){if(e.data.type==="Method.Call"){this.handleMethodCall(e.data.payload);return}g.emit(e.data.type,e.data.payload)}})}}let f=null;function x(){return f||(f=new C),f}const W=x();r.AuraWidget=W,r.configure=Q,r.getConfig=c,r.getVersion=p,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
3
+ `)},(p&&document.querySelector(p)||document.body).appendChild(this.widgetFrame);const $=this.eventBus.subscribe("Auth.Ready",()=>{this.isFrameReady=!0,h&&this.setTheme(h),a&&this.setEntitlements(a),this.setUser({tenantId:n,tenantName:o,user:O,language:T})}),I=this.eventBus.subscribe("Auth.Complete",w=>{var y;this.isFrameAuthenticated=!0,this.disableQueue(!0),t(w),(y=e.onAuthenticated)==null||y.call(e,w)});this.unsubscriptions.push($,I)}}),this.setUser=e=>{const t=this.config.partnerKey,{tenantId:s,tenantName:h,user:a,language:n}=e;this.config.tenantId=s,this.config.tenantName=h,this.config.user=a,this.config.language=n,this.isFrameAuthenticated=!1,this.postMessage({type:"Auth.Login",payload:{partnerKey:t,tenantId:s,tenantName:h,user:a,language:n}})},this.setTheme=e=>{this.postMessage({type:"Theme.Update",payload:{...e}})},this.setEntitlements=e=>{this.postMessage({type:"Entitlements.Update",payload:{entitlements:e}})},this.show=()=>{if(this.widgetFrame){const e=this.widgetFrame.__desiredWidth||"350px",t=this.widgetFrame.__desiredHeight||"600px",s={opacity:"1",pointerEvents:"auto",width:e,height:t,maxWidth:e,maxHeight:t};Object.assign(this.widgetFrame.style,{...s})}},this.hide=()=>{this.widgetFrame&&Object.assign(this.widgetFrame.style,{...f})},this.reset=()=>{this.widgetFrame&&this.widgetFrame.remove(),this.widgetFrame=null,this.isFrameReady=!1,this.isFrameAuthenticated=!1,this.unsubscriptions.forEach(e=>e==null?void 0:e()),this.unsubscriptions=[],this.disableQueue(),this.clearQueue(),this.methodRegistry={}},this.command=e=>{this.sendOrQueue(e),this.show()},this.emit=this.command,this.on=(e,t)=>this.eventBus.subscribe(e,t),this.registerTemplates=e=>{this.sendOrQueue({type:"Template.Register",payload:e})},this.autoRegisterTemplates=e=>{this.sendOrQueue({type:"Template.AutoRegister",payload:e})},this.registerMethod=(e,t)=>{if(typeof e!="string"){g.error("Method name must be a string");return}if(typeof t!="function"){g.error("Method handler for name "+e+" must be a function");return}this.methodRegistry[e]=t},this.unregisterMethod=e=>delete this.methodRegistry[e],this.getConfig=()=>this.config,this.getVersion=()=>"0.1.0-beta.0",window.addEventListener("message",e=>{var t;if(!(e.source!==((t=this.widgetFrame)==null?void 0:t.contentWindow)||!e.data)){if(e.data.type==="Method.Call"){this.handleMethodCall(e.data.payload);return}this.eventBus.emit(e.data.type,e.data.payload)}})}}let l=null;function A(){return l||(l=new x),l}const v=A();r.AuraWidget=v,r.configure=M,r.getConfig=c,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
package/dist/types.d.ts CHANGED
@@ -1,25 +1,7 @@
1
- /**
2
- * A type that represents an object with any key and value.
3
- */
4
- export type AnyObject = Record<string | number | symbol, any>;
5
- /**
6
- * Require at least one of the specified keys to be present.
7
- */
8
- export type AtLeastOneOf<T extends AnyObject, K extends keyof T> = Omit<T, K> & {
9
- [P in K]: Required<Pick<T, P>> & Partial<Pick<T, Exclude<K, P>>>;
10
- }[K];
11
- export type AuraWidgetEmitEvent<T = any> = {
12
- type: string;
13
- payload: T;
14
- };
15
- export type OverrideThemeColors = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info';
16
- export type ThemeConfig = {
17
- /**
18
- * Override theme colors (hex strings) for the in-frame widget.
19
- */
20
- colors?: Partial<Record<OverrideThemeColors, string>>;
21
- };
22
- export type Entitlements = Record<string, boolean>;
1
+ import { AtLeastOneOf, WidgetEmitEvent, WidgetMessageEvent, ThemeConfig, Entitlements } from '@insight-health/core';
2
+ export type { AnyObject, AtLeastOneOf, WidgetEmitEvent, WidgetMessageEvent, OverrideThemeColors, ThemeConfig, Entitlements, } from '@insight-health/core';
3
+ export type AuraWidgetEmitEvent<T = any> = WidgetEmitEvent<T>;
4
+ export type AuraWidgetMessageEvent<T = any> = WidgetMessageEvent<T>;
23
5
  export type AuraWidgetInitParams = {
24
6
  partnerKey: string;
25
7
  tenantId: string | number;
@@ -46,10 +28,6 @@ export type AuraWidgetInitParams = {
46
28
  entitlements?: Entitlements;
47
29
  };
48
30
  export type AuthParams = Pick<AuraWidgetInitParams, 'tenantId' | 'tenantName' | 'user' | 'language'>;
49
- export type AuraWidgetMessageEvent<T = any> = {
50
- type: string;
51
- payload: T;
52
- };
53
31
  export type TemplateSectionDefinition = {
54
32
  name: string;
55
33
  type: 'openText' | 'singleSelect' | 'multiSelect' | 'openSingleSelect' | 'openMultiSelect' | 'boolean' | 'number';
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,SAAS,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAC3E;KAAG,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC,CAAC,CAAC,CAAC;AAE1E,MAAM,MAAM,mBAAmB,CAAC,CAAC,GAAG,GAAG,IAAI;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAC3B,SAAS,GACT,WAAW,GACX,SAAS,GACT,SAAS,GACT,OAAO,GACP,MAAM,CAAC;AAEX,MAA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",
3
+ "version": "0.1.0-beta.0",
4
4
  "description": "Aura SDK package for Insight Health AI",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -31,6 +31,9 @@
31
31
  "url": "https://github.com/insight-health-ai/insight-sdk-web.git",
32
32
  "directory": "packages/aura"
33
33
  },
34
+ "devDependencies": {
35
+ "@insight-health/core": "0.0.1"
36
+ },
34
37
  "publishConfig": {
35
38
  "access": "public"
36
39
  },
@@ -1,27 +0,0 @@
1
- /**
2
- * Global storage for Aura SDK configuration
3
- */
4
- /**
5
- * Root-level global configuration
6
- * Shared across all services/interfaces
7
- */
8
- export interface GlobalConfig {
9
- insightBaseUrl?: string;
10
- }
11
- /**
12
- * Get the global configuration
13
- */
14
- export declare function getGlobalConfig(): GlobalConfig | null;
15
- /**
16
- * Set the global configuration
17
- */
18
- export declare function setGlobalConfig(config: GlobalConfig): void;
19
- /**
20
- * Clear the global configuration
21
- */
22
- export declare function clearGlobalConfig(): void;
23
- /**
24
- * Check if global configuration is set
25
- */
26
- export declare function hasGlobalConfig(): boolean;
27
- //# sourceMappingURL=globalConfig.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"globalConfig.d.ts","sourceRoot":"","sources":["../src/globalConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CAEzB;AAQD;;GAEG;AACH,wBAAgB,eAAe,IAAI,YAAY,GAAG,IAAI,CAErD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAE1D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAExC;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAEzC"}
package/dist/root.d.ts DELETED
@@ -1,11 +0,0 @@
1
- import { GlobalConfig } from './globalConfig';
2
-
3
- /**
4
- * Configure the Aura SDK globally (root-level)
5
- * Sets base configuration like baseUrl, apiKey, etc.
6
- * This configuration is shared across all services
7
- */
8
- export declare function configure(config: GlobalConfig): void;
9
- export declare function getConfig(): GlobalConfig;
10
- export declare function getVersion(): string;
11
- //# sourceMappingURL=root.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../src/root.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,YAAY,EAAmB,MAAM,gBAAgB,CAAC;AAEhF;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAEpD;AAED,wBAAgB,SAAS,IAAI,YAAY,CAQxC;AAED,wBAAgB,UAAU,IAAI,MAAM,CAEnC"}
@@ -1,8 +0,0 @@
1
- declare class EventBus {
2
- private events;
3
- subscribe: (event: string, callback: (data: any) => void) => () => void;
4
- emit: (event: string, payload: any) => void;
5
- }
6
- export declare const eventBus: EventBus;
7
- export {};
8
- //# sourceMappingURL=eventBus.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eventBus.d.ts","sourceRoot":"","sources":["../../src/utils/eventBus.ts"],"names":[],"mappings":"AAAA,cAAM,QAAQ;IACZ,OAAO,CAAC,MAAM,CAA+C;IAE7D,SAAS,GAAI,OAAO,MAAM,EAAE,UAAU,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,gBASvD;IAEF,IAAI,GAAI,OAAO,MAAM,EAAE,SAAS,GAAG,UAKjC;CACH;AAED,eAAO,MAAM,QAAQ,UAAiB,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from './eventBus';
2
- export * from './logger';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
@@ -1,6 +0,0 @@
1
- export declare const logger: {
2
- log: (message: string) => void;
3
- warn: (message: string) => void;
4
- error: (message: string) => void;
5
- };
6
- //# sourceMappingURL=logger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;mBACF,MAAM;oBAGL,MAAM;qBAGL,MAAM;CAGxB,CAAC"}