@voyantjs/auth-react 0.26.1 → 0.26.2
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/hooks/use-current-user.d.ts +2 -1
- package/dist/hooks/use-current-user.d.ts.map +1 -1
- package/dist/hooks/use-organization-member-mutation.d.ts +2 -2
- package/dist/hooks/use-organization-members.d.ts +1 -1
- package/dist/hooks/use-workspace-mutation.d.ts +2 -1
- package/dist/hooks/use-workspace-mutation.d.ts.map +1 -1
- package/dist/query-options.d.ts +12 -8
- package/dist/query-options.d.ts.map +1 -1
- package/dist/schemas.d.ts +5 -4
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +5 -2
- package/package.json +5 -5
|
@@ -3,12 +3,13 @@ export interface UseCurrentUserOptions {
|
|
|
3
3
|
}
|
|
4
4
|
export declare function useCurrentUser(options?: UseCurrentUserOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
5
|
id: string;
|
|
6
|
-
email: string;
|
|
6
|
+
email: string | null;
|
|
7
7
|
firstName: string | null;
|
|
8
8
|
lastName: string | null;
|
|
9
9
|
isSuperAdmin: boolean;
|
|
10
10
|
isSupportUser: boolean;
|
|
11
11
|
createdAt: string;
|
|
12
|
+
phoneNumber?: string | null | undefined;
|
|
12
13
|
profilePictureUrl?: string | null | undefined;
|
|
13
14
|
}, Error>;
|
|
14
15
|
//# sourceMappingURL=use-current-user.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-current-user.d.ts","sourceRoot":"","sources":["../../src/hooks/use-current-user.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,cAAc,CAAC,OAAO,GAAE,qBAA0B
|
|
1
|
+
{"version":3,"file":"use-current-user.d.ts","sourceRoot":"","sources":["../../src/hooks/use-current-user.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,cAAc,CAAC,OAAO,GAAE,qBAA0B;;;;;;;;;;UAQjE"}
|
|
@@ -18,7 +18,7 @@ export declare function useOrganizationMemberMutation(): {
|
|
|
18
18
|
createdAt: string;
|
|
19
19
|
user: {
|
|
20
20
|
id: string;
|
|
21
|
-
email: string;
|
|
21
|
+
email: string | null;
|
|
22
22
|
name?: string | null | undefined;
|
|
23
23
|
image?: string | null | undefined;
|
|
24
24
|
};
|
|
@@ -32,7 +32,7 @@ export declare function useOrganizationMemberMutation(): {
|
|
|
32
32
|
createdAt: string;
|
|
33
33
|
user: {
|
|
34
34
|
id: string;
|
|
35
|
-
email: string;
|
|
35
|
+
email: string | null;
|
|
36
36
|
name?: string | null | undefined;
|
|
37
37
|
image?: string | null | undefined;
|
|
38
38
|
};
|
|
@@ -19,12 +19,13 @@ export declare function useWorkspaceMutation(): {
|
|
|
19
19
|
}, Error, string, unknown>;
|
|
20
20
|
refreshCurrentUser: import("@tanstack/react-query").UseMutationResult<{
|
|
21
21
|
id: string;
|
|
22
|
-
email: string;
|
|
22
|
+
email: string | null;
|
|
23
23
|
firstName: string | null;
|
|
24
24
|
lastName: string | null;
|
|
25
25
|
isSuperAdmin: boolean;
|
|
26
26
|
isSupportUser: boolean;
|
|
27
27
|
createdAt: string;
|
|
28
|
+
phoneNumber?: string | null | undefined;
|
|
28
29
|
profilePictureUrl?: string | null | undefined;
|
|
29
30
|
}, Error, void, unknown>;
|
|
30
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-workspace-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-workspace-mutation.ts"],"names":[],"mappings":"AASA,wBAAgB,oBAAoB
|
|
1
|
+
{"version":3,"file":"use-workspace-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-workspace-mutation.ts"],"names":[],"mappings":"AASA,wBAAgB,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BnC"}
|
package/dist/query-options.d.ts
CHANGED
|
@@ -2,43 +2,47 @@ import { type FetchWithValidationOptions } from "./client.js";
|
|
|
2
2
|
import { type OrganizationInvitationsListFilters, type OrganizationMembersListFilters } from "./query-keys.js";
|
|
3
3
|
export declare function getCurrentUserQueryOptions(client: FetchWithValidationOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
4
4
|
id: string;
|
|
5
|
-
email: string;
|
|
5
|
+
email: string | null;
|
|
6
6
|
firstName: string | null;
|
|
7
7
|
lastName: string | null;
|
|
8
8
|
isSuperAdmin: boolean;
|
|
9
9
|
isSupportUser: boolean;
|
|
10
10
|
createdAt: string;
|
|
11
|
+
phoneNumber?: string | null | undefined;
|
|
11
12
|
profilePictureUrl?: string | null | undefined;
|
|
12
13
|
}, Error, {
|
|
13
14
|
id: string;
|
|
14
|
-
email: string;
|
|
15
|
+
email: string | null;
|
|
15
16
|
firstName: string | null;
|
|
16
17
|
lastName: string | null;
|
|
17
18
|
isSuperAdmin: boolean;
|
|
18
19
|
isSupportUser: boolean;
|
|
19
20
|
createdAt: string;
|
|
21
|
+
phoneNumber?: string | null | undefined;
|
|
20
22
|
profilePictureUrl?: string | null | undefined;
|
|
21
23
|
}, readonly ["auth", "current-user"]>, "queryFn"> & {
|
|
22
24
|
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
23
25
|
id: string;
|
|
24
|
-
email: string;
|
|
26
|
+
email: string | null;
|
|
25
27
|
firstName: string | null;
|
|
26
28
|
lastName: string | null;
|
|
27
29
|
isSuperAdmin: boolean;
|
|
28
30
|
isSupportUser: boolean;
|
|
29
31
|
createdAt: string;
|
|
32
|
+
phoneNumber?: string | null | undefined;
|
|
30
33
|
profilePictureUrl?: string | null | undefined;
|
|
31
34
|
}, readonly ["auth", "current-user"], never> | undefined;
|
|
32
35
|
} & {
|
|
33
36
|
queryKey: readonly ["auth", "current-user"] & {
|
|
34
37
|
[dataTagSymbol]: {
|
|
35
38
|
id: string;
|
|
36
|
-
email: string;
|
|
39
|
+
email: string | null;
|
|
37
40
|
firstName: string | null;
|
|
38
41
|
lastName: string | null;
|
|
39
42
|
isSuperAdmin: boolean;
|
|
40
43
|
isSupportUser: boolean;
|
|
41
44
|
createdAt: string;
|
|
45
|
+
phoneNumber?: string | null | undefined;
|
|
42
46
|
profilePictureUrl?: string | null | undefined;
|
|
43
47
|
};
|
|
44
48
|
[dataTagErrorSymbol]: Error;
|
|
@@ -153,7 +157,7 @@ export declare function getOrganizationMembersQueryOptions(filters: Organization
|
|
|
153
157
|
createdAt: string;
|
|
154
158
|
user: {
|
|
155
159
|
id: string;
|
|
156
|
-
email: string;
|
|
160
|
+
email: string | null;
|
|
157
161
|
name?: string | null | undefined;
|
|
158
162
|
image?: string | null | undefined;
|
|
159
163
|
};
|
|
@@ -167,7 +171,7 @@ export declare function getOrganizationMembersQueryOptions(filters: Organization
|
|
|
167
171
|
createdAt: string;
|
|
168
172
|
user: {
|
|
169
173
|
id: string;
|
|
170
|
-
email: string;
|
|
174
|
+
email: string | null;
|
|
171
175
|
name?: string | null | undefined;
|
|
172
176
|
image?: string | null | undefined;
|
|
173
177
|
};
|
|
@@ -182,7 +186,7 @@ export declare function getOrganizationMembersQueryOptions(filters: Organization
|
|
|
182
186
|
createdAt: string;
|
|
183
187
|
user: {
|
|
184
188
|
id: string;
|
|
185
|
-
email: string;
|
|
189
|
+
email: string | null;
|
|
186
190
|
name?: string | null | undefined;
|
|
187
191
|
image?: string | null | undefined;
|
|
188
192
|
};
|
|
@@ -199,7 +203,7 @@ export declare function getOrganizationMembersQueryOptions(filters: Organization
|
|
|
199
203
|
createdAt: string;
|
|
200
204
|
user: {
|
|
201
205
|
id: string;
|
|
202
|
-
email: string;
|
|
206
|
+
email: string | null;
|
|
203
207
|
name?: string | null | undefined;
|
|
204
208
|
image?: string | null | undefined;
|
|
205
209
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-options.d.ts","sourceRoot":"","sources":["../src/query-options.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,0BAA0B,EAAwC,MAAM,aAAa,CAAA;AACnG,OAAO,EAEL,KAAK,kCAAkC,EACvC,KAAK,8BAA8B,EACpC,MAAM,iBAAiB,CAAA;AASxB,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,0BAA0B
|
|
1
|
+
{"version":3,"file":"query-options.d.ts","sourceRoot":"","sources":["../src/query-options.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,0BAA0B,EAAwC,MAAM,aAAa,CAAA;AACnG,OAAO,EAEL,KAAK,kCAAkC,EACvC,KAAK,8BAA8B,EACpC,MAAM,iBAAiB,CAAA;AASxB,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK5E;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;EAK3E;AAED,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKjF;AAED,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,8BAA8B,EACvC,MAAM,EAAE,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWnC;AAED,wBAAgB,sCAAsC,CACpD,OAAO,EAAE,kCAAkC,EAC3C,MAAM,EAAE,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWnC"}
|
package/dist/schemas.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const currentUserSchema: z.ZodObject<{
|
|
3
3
|
id: z.ZodString;
|
|
4
|
-
email: z.ZodString
|
|
4
|
+
email: z.ZodNullable<z.ZodString>;
|
|
5
|
+
phoneNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5
6
|
firstName: z.ZodNullable<z.ZodString>;
|
|
6
7
|
lastName: z.ZodNullable<z.ZodString>;
|
|
7
8
|
isSuperAdmin: z.ZodBoolean;
|
|
@@ -54,7 +55,7 @@ export declare const organizationMemberSchema: z.ZodObject<{
|
|
|
54
55
|
createdAt: z.ZodString;
|
|
55
56
|
user: z.ZodObject<{
|
|
56
57
|
id: z.ZodString;
|
|
57
|
-
email: z.ZodString
|
|
58
|
+
email: z.ZodNullable<z.ZodString>;
|
|
58
59
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
59
60
|
image: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
60
61
|
}, z.core.$strip>;
|
|
@@ -69,7 +70,7 @@ export declare const organizationMembersResponseSchema: z.ZodObject<{
|
|
|
69
70
|
createdAt: z.ZodString;
|
|
70
71
|
user: z.ZodObject<{
|
|
71
72
|
id: z.ZodString;
|
|
72
|
-
email: z.ZodString
|
|
73
|
+
email: z.ZodNullable<z.ZodString>;
|
|
73
74
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
74
75
|
image: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
76
|
}, z.core.$strip>;
|
|
@@ -85,7 +86,7 @@ export declare const organizationRemoveMemberSchema: z.ZodObject<{
|
|
|
85
86
|
createdAt: z.ZodString;
|
|
86
87
|
user: z.ZodObject<{
|
|
87
88
|
id: z.ZodString;
|
|
88
|
-
email: z.ZodString
|
|
89
|
+
email: z.ZodNullable<z.ZodString>;
|
|
89
90
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
90
91
|
image: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
91
92
|
}, z.core.$strip>;
|
package/dist/schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,iBAAiB;;;;;;;;;;iBAY5B,CAAA;AACF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE3D,eAAO,MAAM,gBAAgB;;;;iBAI3B,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD,eAAO,MAAM,sBAAsB,6DAA6C,CAAA;AAChF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAErE,eAAO,MAAM,yBAAyB;;;;;;;iBAOpC,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAE3E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;iBAGjC,CAAA;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AASrE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;iBAOnC,CAAA;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAEzE,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;iBAE5C,CAAA;AACF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAA;AAE3F,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;iBAGzC,CAAA;AACF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAE3F,eAAO,MAAM,4BAA4B;;;;;;;;;iBASvC,CAAA;AACF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEjF,eAAO,MAAM,qCAAqC;;;;;;;;;kBAAwC,CAAA;AAC1F,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAA"}
|
package/dist/schemas.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export const currentUserSchema = z.object({
|
|
3
3
|
id: z.string(),
|
|
4
|
-
email
|
|
4
|
+
// Either email or phoneNumber is set on phone-only signups; null when
|
|
5
|
+
// the user authenticates via the other channel only.
|
|
6
|
+
email: z.string().nullable(),
|
|
7
|
+
phoneNumber: z.string().nullable().optional(),
|
|
5
8
|
firstName: z.string().nullable(),
|
|
6
9
|
lastName: z.string().nullable(),
|
|
7
10
|
isSuperAdmin: z.boolean(),
|
|
@@ -29,7 +32,7 @@ export const currentWorkspaceSchema = z.object({
|
|
|
29
32
|
});
|
|
30
33
|
const organizationMemberUserSchema = z.object({
|
|
31
34
|
id: z.string(),
|
|
32
|
-
email: z.string(),
|
|
35
|
+
email: z.string().nullable(),
|
|
33
36
|
name: z.string().nullable().optional(),
|
|
34
37
|
image: z.string().nullable().optional(),
|
|
35
38
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/auth-react",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"react": "^19.0.0",
|
|
42
42
|
"react-dom": "^19.0.0",
|
|
43
43
|
"zod": "^4.0.0",
|
|
44
|
-
"@voyantjs/auth": "0.26.
|
|
44
|
+
"@voyantjs/auth": "0.26.2"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@tanstack/react-query": "^5.96.2",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"typescript": "^6.0.2",
|
|
53
53
|
"vitest": "^4.1.2",
|
|
54
54
|
"zod": "^4.3.6",
|
|
55
|
-
"@voyantjs/auth": "0.26.
|
|
56
|
-
"@voyantjs/react": "0.26.
|
|
55
|
+
"@voyantjs/auth": "0.26.2",
|
|
56
|
+
"@voyantjs/react": "0.26.2",
|
|
57
57
|
"@voyantjs/voyant-typescript-config": "0.1.0"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@voyantjs/react": "0.26.
|
|
60
|
+
"@voyantjs/react": "0.26.2"
|
|
61
61
|
},
|
|
62
62
|
"files": [
|
|
63
63
|
"dist"
|