@service_laboratory/auth 0.0.4 → 0.0.6
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LoginForm } from './LoginForm';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,75 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AxiosResponse } from 'axios';
|
|
3
|
-
import { Derived } from '@tanstack/store';
|
|
4
|
-
import { Store } from '@tanstack/store';
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
5
2
|
|
|
6
|
-
declare
|
|
7
|
-
user: AccountUser;
|
|
8
|
-
isLoaded: boolean;
|
|
9
|
-
isAuthenticated: boolean;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export declare interface AccountUser {
|
|
13
|
-
id: string | null;
|
|
14
|
-
email: string | null;
|
|
15
|
-
roles: Role[];
|
|
16
|
-
is_enabled: boolean;
|
|
17
|
-
is_active: boolean;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
declare interface ActivateRequest {
|
|
21
|
-
code: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export declare class Auth {
|
|
25
|
-
accountStore: Store<AccountData, (cb: AccountData) => AccountData>;
|
|
26
|
-
httpClient: Axios;
|
|
27
|
-
constructor(httpClient: Axios);
|
|
28
|
-
initAuthData(): void;
|
|
29
|
-
load(): Promise<void>;
|
|
30
|
-
login(values: LoginRequest): Promise<any>;
|
|
31
|
-
register(values: RegisterRequest): Promise<AxiosResponse<any, any>>;
|
|
32
|
-
activate(values: ActivateRequest): Promise<void>;
|
|
33
|
-
logout(): void;
|
|
34
|
-
startResetPassword(values: StartResetPasswordRequest): Promise<AxiosResponse<any, any>>;
|
|
35
|
-
resetPassword(values: ResetPasswordRequest): Promise<void>;
|
|
36
|
-
_initUserData({ user, access_token }: {
|
|
37
|
-
user: AccountUser;
|
|
38
|
-
access_token: string;
|
|
39
|
-
}): void;
|
|
40
|
-
_setAuthData(token: string): void;
|
|
41
|
-
_clearAuthData(): void;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export declare const isAdmin: Derived<boolean, readonly [Store<AccountData, (cb: AccountData) => AccountData>]>;
|
|
45
|
-
|
|
46
|
-
declare interface LoginRequest {
|
|
47
|
-
email: string;
|
|
48
|
-
password: string;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
declare interface Permission {
|
|
52
|
-
name: string;
|
|
53
|
-
app: string;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
declare interface RegisterRequest {
|
|
57
|
-
email: string;
|
|
58
|
-
password: string;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
declare interface ResetPasswordRequest {
|
|
62
|
-
code: string;
|
|
63
|
-
password: string;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
declare interface Role {
|
|
67
|
-
name: string;
|
|
68
|
-
permissions: Permission[];
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
declare interface StartResetPasswordRequest {
|
|
72
|
-
email: string;
|
|
73
|
-
}
|
|
3
|
+
export declare function LoginForm(): JSX.Element;
|
|
74
4
|
|
|
75
5
|
export { }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@service_laboratory/auth",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.umd.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
"types": "./dist/index.d.ts",
|
|
18
18
|
"import": "./dist/index.js",
|
|
19
19
|
"require": "./dist/index.umd.cjs"
|
|
20
|
+
},
|
|
21
|
+
"./forms": {
|
|
22
|
+
"types": "./dist/forms/index.d.ts",
|
|
23
|
+
"import": "./dist/forms/index.js",
|
|
24
|
+
"require": "./dist/forms/index.umd.cjs"
|
|
20
25
|
}
|
|
21
26
|
},
|
|
22
27
|
"dependencies": {
|
package/dist/forms.d.ts
DELETED
|
File without changes
|
|
File without changes
|