@explita/cloud-auth-client 0.1.1 → 0.1.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/components/change-password.js +58 -75
- package/dist/components/icons/alert-circle.d.ts +5 -0
- package/dist/components/icons/alert-circle.js +13 -0
- package/dist/components/icons/chevron-down.d.ts +5 -0
- package/dist/components/icons/chevron-down.js +11 -0
- package/dist/components/icons/lock.d.ts +2 -1
- package/dist/components/icons/lock.js +2 -2
- package/dist/components/icons/logout.d.ts +2 -1
- package/dist/components/icons/logout.js +2 -2
- package/dist/components/icons/setting.d.ts +2 -1
- package/dist/components/icons/setting.js +2 -2
- package/dist/components/icons/shield.d.ts +5 -0
- package/dist/components/icons/shield.js +11 -0
- package/dist/components/icons/user.d.ts +5 -0
- package/dist/components/icons/user.js +12 -0
- package/dist/components/login-form.d.ts +3 -1
- package/dist/components/login-form.js +45 -34
- package/dist/components/reset-password.d.ts +2 -1
- package/dist/components/reset-password.js +62 -60
- package/dist/components/settings.js +16 -8
- package/dist/components/signup-form.d.ts +4 -3
- package/dist/components/signup-form.js +72 -60
- package/dist/components/toggle-2fa.js +42 -26
- package/dist/components/toggle-account-status.js +55 -64
- package/dist/components/ui/input.js +1 -1
- package/dist/components/user-card.js +48 -23
- package/dist/contexts/auth-provider.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/lib/utils.js +7 -1
- package/dist/server/user.d.ts +3 -1
- package/dist/server/user.js +33 -0
- package/dist/styles.css +901 -61
- package/dist/types.d.ts +21 -7
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -85,17 +85,30 @@ export type Login = {
|
|
|
85
85
|
authToken?: string | null;
|
|
86
86
|
};
|
|
87
87
|
export type CreateUser = {
|
|
88
|
-
|
|
89
|
-
groupId?: string | null;
|
|
88
|
+
groupId: string | number;
|
|
90
89
|
firstName: string;
|
|
91
90
|
lastName: string;
|
|
92
|
-
username?: string
|
|
91
|
+
username?: string;
|
|
93
92
|
email: string;
|
|
94
93
|
password: string;
|
|
95
94
|
confirmPassword: string;
|
|
96
95
|
metadata?: Record<string, any>;
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
} & ({
|
|
97
|
+
roleId: string;
|
|
98
|
+
} | {
|
|
99
|
+
isSuperAdmin: boolean;
|
|
100
|
+
});
|
|
101
|
+
export type CreateServiceSub = {
|
|
102
|
+
serviceKey: string;
|
|
103
|
+
userId: string;
|
|
104
|
+
groupId: string;
|
|
105
|
+
metadata?: Record<string, any>;
|
|
106
|
+
shouldGenerateAuthToken?: boolean;
|
|
107
|
+
} & ({
|
|
108
|
+
isSuperAdmin: boolean;
|
|
109
|
+
} | {
|
|
110
|
+
roleId: string;
|
|
111
|
+
});
|
|
99
112
|
export type UpdateUser = Omit<CreateUser, "password" | "confirmPassword">;
|
|
100
113
|
export type GeneralResponse = {
|
|
101
114
|
status: "failure";
|
|
@@ -141,7 +154,7 @@ export type ResetPasswordWithUserId = ResetPassword & {
|
|
|
141
154
|
};
|
|
142
155
|
export type AuthContextType = {
|
|
143
156
|
user: User | null;
|
|
144
|
-
|
|
157
|
+
isLoading: boolean;
|
|
145
158
|
isAuthenticated: boolean;
|
|
146
159
|
error: AuthError | null;
|
|
147
160
|
login: (credentials: Login) => Promise<Partial<AuthError> | null>;
|
|
@@ -154,8 +167,9 @@ export type AuthContextType = {
|
|
|
154
167
|
};
|
|
155
168
|
export type User = {
|
|
156
169
|
id: string;
|
|
170
|
+
subId: string;
|
|
157
171
|
roleId?: string | null;
|
|
158
|
-
groupId
|
|
172
|
+
groupId: string;
|
|
159
173
|
email: string;
|
|
160
174
|
username: string | null;
|
|
161
175
|
firstName: string;
|