@bagelink/auth 1.5.7 → 1.5.11

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.cjs CHANGED
@@ -690,6 +690,7 @@ function accountToUser(account) {
690
690
  roles: account.person.roles,
691
691
  isActive: account.is_active,
692
692
  isVerified: account.is_verified,
693
+ person: account.person,
693
694
  lastLogin: account.last_login
694
695
  };
695
696
  }
package/dist/index.d.cts CHANGED
@@ -48,6 +48,8 @@ interface PersonInfo {
48
48
  name: string;
49
49
  email?: string;
50
50
  roles: string[];
51
+ first_name: string;
52
+ last_name: string;
51
53
  }
52
54
  interface AuthMethodInfo {
53
55
  id: string;
@@ -111,6 +113,8 @@ interface User {
111
113
  entityType?: string;
112
114
  /** Additional metadata */
113
115
  metadata?: Record<string, any>;
116
+ /** Person-specific info (only for person accounts) */
117
+ person?: PersonInfo;
114
118
  }
115
119
  interface RegisterRequest {
116
120
  email: string;
@@ -543,6 +547,8 @@ declare function useAuth(): {
543
547
  name: string;
544
548
  email?: string | undefined;
545
549
  roles: string[];
550
+ first_name: string;
551
+ last_name: string;
546
552
  } | undefined;
547
553
  entity?: {
548
554
  id: string;
@@ -572,6 +578,8 @@ declare function useAuth(): {
572
578
  name: string;
573
579
  email?: string | undefined;
574
580
  roles: string[];
581
+ first_name: string;
582
+ last_name: string;
575
583
  } | undefined;
576
584
  entity?: {
577
585
  id: string;
package/dist/index.d.mts CHANGED
@@ -48,6 +48,8 @@ interface PersonInfo {
48
48
  name: string;
49
49
  email?: string;
50
50
  roles: string[];
51
+ first_name: string;
52
+ last_name: string;
51
53
  }
52
54
  interface AuthMethodInfo {
53
55
  id: string;
@@ -111,6 +113,8 @@ interface User {
111
113
  entityType?: string;
112
114
  /** Additional metadata */
113
115
  metadata?: Record<string, any>;
116
+ /** Person-specific info (only for person accounts) */
117
+ person?: PersonInfo;
114
118
  }
115
119
  interface RegisterRequest {
116
120
  email: string;
@@ -543,6 +547,8 @@ declare function useAuth(): {
543
547
  name: string;
544
548
  email?: string | undefined;
545
549
  roles: string[];
550
+ first_name: string;
551
+ last_name: string;
546
552
  } | undefined;
547
553
  entity?: {
548
554
  id: string;
@@ -572,6 +578,8 @@ declare function useAuth(): {
572
578
  name: string;
573
579
  email?: string | undefined;
574
580
  roles: string[];
581
+ first_name: string;
582
+ last_name: string;
575
583
  } | undefined;
576
584
  entity?: {
577
585
  id: string;
package/dist/index.d.ts CHANGED
@@ -48,6 +48,8 @@ interface PersonInfo {
48
48
  name: string;
49
49
  email?: string;
50
50
  roles: string[];
51
+ first_name: string;
52
+ last_name: string;
51
53
  }
52
54
  interface AuthMethodInfo {
53
55
  id: string;
@@ -111,6 +113,8 @@ interface User {
111
113
  entityType?: string;
112
114
  /** Additional metadata */
113
115
  metadata?: Record<string, any>;
116
+ /** Person-specific info (only for person accounts) */
117
+ person?: PersonInfo;
114
118
  }
115
119
  interface RegisterRequest {
116
120
  email: string;
@@ -543,6 +547,8 @@ declare function useAuth(): {
543
547
  name: string;
544
548
  email?: string | undefined;
545
549
  roles: string[];
550
+ first_name: string;
551
+ last_name: string;
546
552
  } | undefined;
547
553
  entity?: {
548
554
  id: string;
@@ -572,6 +578,8 @@ declare function useAuth(): {
572
578
  name: string;
573
579
  email?: string | undefined;
574
580
  roles: string[];
581
+ first_name: string;
582
+ last_name: string;
575
583
  } | undefined;
576
584
  entity?: {
577
585
  id: string;
package/dist/index.mjs CHANGED
@@ -684,6 +684,7 @@ function accountToUser(account) {
684
684
  roles: account.person.roles,
685
685
  isActive: account.is_active,
686
686
  isVerified: account.is_verified,
687
+ person: account.person,
687
688
  lastLogin: account.last_login
688
689
  };
689
690
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/auth",
3
3
  "type": "module",
4
- "version": "1.5.7",
4
+ "version": "1.5.11",
5
5
  "description": "Bagelink auth package",
6
6
  "author": {
7
7
  "name": "Bagel Studio",
package/src/types.ts CHANGED
@@ -65,6 +65,8 @@ export interface PersonInfo {
65
65
  name: string
66
66
  email?: string
67
67
  roles: string[]
68
+ first_name: string
69
+ last_name: string
68
70
  }
69
71
 
70
72
  export interface AuthMethodInfo {
@@ -137,6 +139,8 @@ export interface User {
137
139
  entityType?: string
138
140
  /** Additional metadata */
139
141
  metadata?: Record<string, any>
142
+ /** Person-specific info (only for person accounts) */
143
+ person?: PersonInfo
140
144
  }
141
145
 
142
146
  // ============================================
@@ -319,6 +323,7 @@ export function accountToUser(account: AccountInfo | null): User | null {
319
323
  roles: account.person.roles,
320
324
  isActive: account.is_active,
321
325
  isVerified: account.is_verified,
326
+ person: account.person,
322
327
  lastLogin: account.last_login,
323
328
  }
324
329
  }