@howone/sdk 0.3.5 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -439,7 +439,7 @@ declare const AUTH_TOKEN_KEY = "auth_token";
439
439
  declare function setToken(token: string | null): void;
440
440
  declare function getToken(): string | null;
441
441
  declare function parseUserFromToken(token: string | null): {
442
- id: string;
442
+ id: {};
443
443
  email: string;
444
444
  name: string;
445
445
  avatar: string;
@@ -448,7 +448,7 @@ declare function isTokenValid(token: string | null): boolean;
448
448
  declare function useAuth(): {
449
449
  token: string | null;
450
450
  user: {
451
- id: string;
451
+ id: {};
452
452
  email: string;
453
453
  name: string;
454
454
  avatar: string;
@@ -855,7 +855,7 @@ declare function createClient(opts: {
855
855
  delete(id: string): Promise<void>;
856
856
  };
857
857
  me: () => Promise<{
858
- id: string;
858
+ id: {};
859
859
  email: string;
860
860
  name: string;
861
861
  avatar: string;
@@ -933,7 +933,7 @@ declare class HowoneAuthClient {
933
933
  login(): void;
934
934
  logout(): void;
935
935
  getUser(): {
936
- id: string;
936
+ id: {};
937
937
  email: string;
938
938
  name: string;
939
939
  avatar: string;
package/dist/index.d.ts CHANGED
@@ -439,7 +439,7 @@ declare const AUTH_TOKEN_KEY = "auth_token";
439
439
  declare function setToken(token: string | null): void;
440
440
  declare function getToken(): string | null;
441
441
  declare function parseUserFromToken(token: string | null): {
442
- id: string;
442
+ id: {};
443
443
  email: string;
444
444
  name: string;
445
445
  avatar: string;
@@ -448,7 +448,7 @@ declare function isTokenValid(token: string | null): boolean;
448
448
  declare function useAuth(): {
449
449
  token: string | null;
450
450
  user: {
451
- id: string;
451
+ id: {};
452
452
  email: string;
453
453
  name: string;
454
454
  avatar: string;
@@ -855,7 +855,7 @@ declare function createClient(opts: {
855
855
  delete(id: string): Promise<void>;
856
856
  };
857
857
  me: () => Promise<{
858
- id: string;
858
+ id: {};
859
859
  email: string;
860
860
  name: string;
861
861
  avatar: string;
@@ -933,7 +933,7 @@ declare class HowoneAuthClient {
933
933
  login(): void;
934
934
  logout(): void;
935
935
  getUser(): {
936
- id: string;
936
+ id: {};
937
937
  email: string;
938
938
  name: string;
939
939
  avatar: string;
package/dist/index.js CHANGED
@@ -172,7 +172,7 @@ function parseUserFromToken(token) {
172
172
  const payload = decodeJwtPayload(token);
173
173
  if (!payload) return null;
174
174
  return {
175
- id: payload.userId || payload.sub || "",
175
+ id: payload.puid || payload.userId || payload.sub || "",
176
176
  email: payload.email || "",
177
177
  name: payload.name || "",
178
178
  avatar: payload.avatar || payload.picture || ""
@@ -1448,7 +1448,7 @@ var HowOneProvider = ({
1448
1448
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ElementSelectorProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(HowoneContext.Provider, { value, children: [
1449
1449
  children,
1450
1450
  showFloatingButton && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FloatingButton, { onClick: () => window.open("https://howone.ai", "_blank") }),
1451
- pendingRedirect && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "fixed inset-0 z-[10000] h-full w-full flex flex-col items-center justify-center bg-black/65 backdrop-blur-sm text-white", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "relative mt-6 flex h-[220px] w-[220px] items-center justify-center", children: [
1451
+ pendingRedirect && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "fixed inset-0 z-[100000] h-full w-full flex flex-col items-center justify-center bg-black/65 backdrop-blur-sm text-white", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "relative mt-6 flex h-[220px] w-[220px] items-center justify-center", children: [
1452
1452
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1453
1453
  "div",
1454
1454
  {