@e-xi/xion 0.0.23 → 0.0.25
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/main/app/index.js
CHANGED
|
@@ -44,7 +44,7 @@ import "../../chunk-files/chunk-J34MOWJP.js";
|
|
|
44
44
|
import "../../chunk-files/chunk-RSUM4GBD.js";
|
|
45
45
|
import {
|
|
46
46
|
BannerManager
|
|
47
|
-
} from "../../chunk-files/chunk-
|
|
47
|
+
} from "../../chunk-files/chunk-5UTMFRI6.js";
|
|
48
48
|
import "../../chunk-files/chunk-YLZRRUY7.js";
|
|
49
49
|
import {
|
|
50
50
|
defineAppConfig,
|
|
@@ -1,43 +1,35 @@
|
|
|
1
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
1
2
|
/**
|
|
2
|
-
* JWT 认证 Store
|
|
3
|
+
* JWT 认证 Store 的 setup 返回类型
|
|
3
4
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
isAuthenticated: import("vue").ComputedRef<boolean>;
|
|
25
|
-
isUnauthenticated: import("vue").ComputedRef<boolean>;
|
|
26
|
-
isError: import("vue").ComputedRef<boolean>;
|
|
27
|
-
initialize: () => Promise<void>;
|
|
28
|
-
login: (request: XoAuth.LoginRequest) => Promise<void>;
|
|
29
|
-
logout: () => Promise<void>;
|
|
30
|
-
}, "isInitializing" | "isAuthenticating" | "isRefreshing" | "isAuthenticated" | "isUnauthenticated" | "isError">, Pick<{
|
|
31
|
-
status: import("vue").Ref<"error" | "unauthenticated" | "initializing" | "authenticating" | "refreshing" | "authenticated", "error" | "unauthenticated" | "initializing" | "authenticating" | "refreshing" | "authenticated">;
|
|
32
|
-
user: import("vue").Ref<unknown, unknown>;
|
|
33
|
-
error: import("vue").Ref<string | undefined, string | undefined>;
|
|
34
|
-
isInitializing: import("vue").ComputedRef<boolean>;
|
|
35
|
-
isAuthenticating: import("vue").ComputedRef<boolean>;
|
|
36
|
-
isRefreshing: import("vue").ComputedRef<boolean>;
|
|
37
|
-
isAuthenticated: import("vue").ComputedRef<boolean>;
|
|
38
|
-
isUnauthenticated: import("vue").ComputedRef<boolean>;
|
|
39
|
-
isError: import("vue").ComputedRef<boolean>;
|
|
5
|
+
interface AuthStoreSetup {
|
|
6
|
+
/** 当前认证状态 */
|
|
7
|
+
status: Ref<XoAuth.Status>;
|
|
8
|
+
/** 当前登录用户 */
|
|
9
|
+
user: Ref<XoAuth.User | undefined>;
|
|
10
|
+
/** 最近一次认证错误信息 */
|
|
11
|
+
error: Ref<string | undefined>;
|
|
12
|
+
/** 是否正在初始化 */
|
|
13
|
+
isInitializing: ComputedRef<boolean>;
|
|
14
|
+
/** 是否正在登录 */
|
|
15
|
+
isAuthenticating: ComputedRef<boolean>;
|
|
16
|
+
/** 是否正在刷新 */
|
|
17
|
+
isRefreshing: ComputedRef<boolean>;
|
|
18
|
+
/** 是否已登录 */
|
|
19
|
+
isAuthenticated: ComputedRef<boolean>;
|
|
20
|
+
/** 是否未登录 */
|
|
21
|
+
isUnauthenticated: ComputedRef<boolean>;
|
|
22
|
+
/** 是否认证异常 */
|
|
23
|
+
isError: ComputedRef<boolean>;
|
|
24
|
+
/** 初始化认证状态与监听器 */
|
|
40
25
|
initialize: () => Promise<void>;
|
|
26
|
+
/** 登录 */
|
|
41
27
|
login: (request: XoAuth.LoginRequest) => Promise<void>;
|
|
28
|
+
/** 退出登录 */
|
|
42
29
|
logout: () => Promise<void>;
|
|
43
|
-
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* JWT 认证 Store
|
|
33
|
+
*/
|
|
34
|
+
export declare const useXoAuthStore: import("pinia").StoreDefinition<"useXoAuthStore", Pick<AuthStoreSetup, "error" | "status" | "user">, Pick<AuthStoreSetup, "isInitializing" | "isAuthenticating" | "isRefreshing" | "isAuthenticated" | "isUnauthenticated" | "isError">, Pick<AuthStoreSetup, "login" | "logout" | "initialize">>;
|
|
35
|
+
export {};
|