tanya-chatbot 0.2.8 → 0.2.9

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.
@@ -98,8 +98,8 @@ function pn({
98
98
  }) {
99
99
  return /* @__PURE__ */ l(wr.Trigger, { "data-slot": "popover-trigger", ...t });
100
100
  }
101
- const wt = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1.amazonaws.com/dev/api/bedrock/invoke/stream", xAPIKey: "BJBtjpPkqGatuoa3qJqdR8aHXSsHkgvGaootbubi", serverUrl: "http://localhost:4001/", basePath: "sc-api" }), xr = async () => {
102
- const t = "http://localhost:4001/";
101
+ const wt = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1.amazonaws.com/dev/api/bedrock/invoke/stream", xAPIKey: "BJBtjpPkqGatuoa3qJqdR8aHXSsHkgvGaootbubi", serverUrl: "https://tanya-sfcc-server.vercel.app/", basePath: "sc-api" }), xr = async () => {
102
+ const t = "https://tanya-sfcc-server.vercel.app/";
103
103
  try {
104
104
  const e = await z.post(
105
105
  `${t}api/auth/token-bm-grant?baseUrl=${ut()}&siteId=${et()}`
@@ -109,7 +109,7 @@ const wt = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
109
109
  return z.isAxiosError(e) ? console.error("Error fetching token:", e.response || e.message) : console.error("Unexpected error:", e), null;
110
110
  }
111
111
  }, vr = async (t) => {
112
- const e = "http://localhost:4001/";
112
+ const e = "https://tanya-sfcc-server.vercel.app/";
113
113
  try {
114
114
  const r = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, n = await z.post(
115
115
  `${e}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${ut()}&siteId=${et()}&pubCfg=${dt()}&envRef=${ft()}&orgRef=${pt()}`,
@@ -143,7 +143,7 @@ async function Ut() {
143
143
  withCredentials: !0
144
144
  }
145
145
  );
146
- return console.log(s.data), localStorage.setItem("access_token", s.data.access_token), localStorage.setItem(
146
+ return localStorage.setItem("access_token", s.data.access_token), localStorage.setItem(
147
147
  "expires_in",
148
148
  String((/* @__PURE__ */ new Date()).getTime() + s.data.expires_in * 1e3)
149
149
  ), localStorage.setItem("isGuest", r ? "true" : "false"), s.data;