@ccatto/react-auth 1.0.0 → 1.1.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.
package/dist/index.d.cts CHANGED
@@ -13,8 +13,13 @@ interface EnrichedUser {
13
13
  /** Custom fields added by enrichSession hook */
14
14
  playerID?: number;
15
15
  role: string;
16
- organizationId: string | null;
17
- organizations: Array<{
16
+ /**
17
+ * Optional multi-tenant fields. Apps that don't model organizations can omit
18
+ * them entirely; legacy callers that always set them (incl. to null / [])
19
+ * still typecheck.
20
+ */
21
+ organizationId?: string | null;
22
+ organizations?: Array<{
18
23
  id: string;
19
24
  name: string;
20
25
  slug: string;
@@ -42,8 +47,9 @@ interface CompatSessionUser {
42
47
  image: string | null;
43
48
  playerID?: number;
44
49
  role: string;
45
- organizationId: string | null;
46
- organizations: Array<{
50
+ /** See `EnrichedUser.organizationId` optional multi-tenant field. */
51
+ organizationId?: string | null;
52
+ organizations?: Array<{
47
53
  id: string;
48
54
  name: string;
49
55
  slug: string;
package/dist/index.d.ts CHANGED
@@ -13,8 +13,13 @@ interface EnrichedUser {
13
13
  /** Custom fields added by enrichSession hook */
14
14
  playerID?: number;
15
15
  role: string;
16
- organizationId: string | null;
17
- organizations: Array<{
16
+ /**
17
+ * Optional multi-tenant fields. Apps that don't model organizations can omit
18
+ * them entirely; legacy callers that always set them (incl. to null / [])
19
+ * still typecheck.
20
+ */
21
+ organizationId?: string | null;
22
+ organizations?: Array<{
18
23
  id: string;
19
24
  name: string;
20
25
  slug: string;
@@ -42,8 +47,9 @@ interface CompatSessionUser {
42
47
  image: string | null;
43
48
  playerID?: number;
44
49
  role: string;
45
- organizationId: string | null;
46
- organizations: Array<{
50
+ /** See `EnrichedUser.organizationId` optional multi-tenant field. */
51
+ organizationId?: string | null;
52
+ organizations?: Array<{
47
53
  id: string;
48
54
  name: string;
49
55
  slug: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccatto/react-auth",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Catto Auth - React/Next.js authentication with Better Auth, JWT, and mobile support",
5
5
  "license": "MIT",
6
6
  "author": "Chris Catto",