@inzombieland/core 1.18.29 → 1.18.30
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/index.d.ts +0 -30
- package/package.json +1 -1
- package/user-actions.d.ts +0 -10
- package/user-actions.mjs +0 -20
package/index.d.ts
CHANGED
|
@@ -16,16 +16,6 @@ export declare function initApiFetch($fetch: Fetch, config: FetchConfig): {
|
|
|
16
16
|
}) => Promise<import("./types").GetUserResponse | {
|
|
17
17
|
key: string;
|
|
18
18
|
}>;
|
|
19
|
-
signInByCodeSendCode: (body: {
|
|
20
|
-
username: string;
|
|
21
|
-
}) => Promise<{
|
|
22
|
-
key: string;
|
|
23
|
-
}>;
|
|
24
|
-
signInByCodeVerifyCode: (body: {
|
|
25
|
-
key: string;
|
|
26
|
-
code: string;
|
|
27
|
-
rememberMe?: boolean;
|
|
28
|
-
}) => Promise<import("./types").GetUserResponse>;
|
|
29
19
|
logout: () => Promise<void>;
|
|
30
20
|
fetchActiveSessions: () => Promise<{
|
|
31
21
|
sessions: import("./types").ActiveSession[];
|
|
@@ -87,16 +77,6 @@ export declare const useUserActions: () => Ref<{
|
|
|
87
77
|
}) => Promise<import("./types").GetUserResponse | {
|
|
88
78
|
key: string;
|
|
89
79
|
}>;
|
|
90
|
-
signInByCodeSendCode: (body: {
|
|
91
|
-
username: string;
|
|
92
|
-
}) => Promise<{
|
|
93
|
-
key: string;
|
|
94
|
-
}>;
|
|
95
|
-
signInByCodeVerifyCode: (body: {
|
|
96
|
-
key: string;
|
|
97
|
-
code: string;
|
|
98
|
-
rememberMe?: boolean;
|
|
99
|
-
}) => Promise<import("./types").GetUserResponse>;
|
|
100
80
|
logout: () => Promise<void>;
|
|
101
81
|
fetchActiveSessions: () => Promise<{
|
|
102
82
|
sessions: import("./types").ActiveSession[];
|
|
@@ -156,16 +136,6 @@ export declare const useUserActions: () => Ref<{
|
|
|
156
136
|
}) => Promise<import("./types").GetUserResponse | {
|
|
157
137
|
key: string;
|
|
158
138
|
}>;
|
|
159
|
-
signInByCodeSendCode: (body: {
|
|
160
|
-
username: string;
|
|
161
|
-
}) => Promise<{
|
|
162
|
-
key: string;
|
|
163
|
-
}>;
|
|
164
|
-
signInByCodeVerifyCode: (body: {
|
|
165
|
-
key: string;
|
|
166
|
-
code: string;
|
|
167
|
-
rememberMe?: boolean;
|
|
168
|
-
}) => Promise<import("./types").GetUserResponse>;
|
|
169
139
|
logout: () => Promise<void>;
|
|
170
140
|
fetchActiveSessions: () => Promise<{
|
|
171
141
|
sessions: import("./types").ActiveSession[];
|
package/package.json
CHANGED
package/user-actions.d.ts
CHANGED
|
@@ -8,16 +8,6 @@ export declare const createApiUserActions: (fetch: Fetch, config: FetchConfig, g
|
|
|
8
8
|
}) => Promise<GetUserResponse | {
|
|
9
9
|
key: string;
|
|
10
10
|
}>;
|
|
11
|
-
signInByCodeSendCode: (body: {
|
|
12
|
-
username: string;
|
|
13
|
-
}) => Promise<{
|
|
14
|
-
key: string;
|
|
15
|
-
}>;
|
|
16
|
-
signInByCodeVerifyCode: (body: {
|
|
17
|
-
key: string;
|
|
18
|
-
code: string;
|
|
19
|
-
rememberMe?: boolean;
|
|
20
|
-
}) => Promise<GetUserResponse>;
|
|
21
11
|
logout: () => Promise<void>;
|
|
22
12
|
fetchActiveSessions: () => Promise<{
|
|
23
13
|
sessions: ActiveSession[];
|
package/user-actions.mjs
CHANGED
|
@@ -20,26 +20,6 @@ export const createApiUserActions = once(
|
|
|
20
20
|
setToken(accessToken);
|
|
21
21
|
return await getUser();
|
|
22
22
|
},
|
|
23
|
-
signInByCodeSendCode: async (body) => {
|
|
24
|
-
return await fetch("/account/0/signinbycode/sendcode", {
|
|
25
|
-
body,
|
|
26
|
-
method: "POST",
|
|
27
|
-
...config.useRequestHeaders?.(["cookie"]) ?? {}
|
|
28
|
-
});
|
|
29
|
-
},
|
|
30
|
-
signInByCodeVerifyCode: async (body) => {
|
|
31
|
-
const response = await fetch("/account/0/signinbycode/verifycode", {
|
|
32
|
-
body,
|
|
33
|
-
method: "POST",
|
|
34
|
-
...config.useRequestHeaders?.(["cookie"]) ?? {}
|
|
35
|
-
});
|
|
36
|
-
const { accessToken, ...rest } = response;
|
|
37
|
-
if (!accessToken) {
|
|
38
|
-
throw rest;
|
|
39
|
-
}
|
|
40
|
-
setToken(accessToken);
|
|
41
|
-
return await getUser();
|
|
42
|
-
},
|
|
43
23
|
logout: async () => {
|
|
44
24
|
const user = useUser();
|
|
45
25
|
try {
|