@inzombieland/core 1.18.29 → 1.18.31
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 +6 -45
- package/package.json +1 -1
- package/user-actions.d.ts +2 -15
- package/user-actions.mjs +0 -7
package/index.d.ts
CHANGED
|
@@ -9,23 +9,10 @@ export declare function initApiFetch($fetch: Fetch, config: FetchConfig): {
|
|
|
9
9
|
getUser: () => Promise<import("./types").GetUserResponse>;
|
|
10
10
|
useApiFetch: () => Fetch;
|
|
11
11
|
userActions: {
|
|
12
|
-
signIn: (body: {
|
|
13
|
-
username: string;
|
|
14
|
-
password: string;
|
|
15
|
-
rememberMe: boolean;
|
|
16
|
-
}) => Promise<import("./types").GetUserResponse | {
|
|
12
|
+
signIn: (body: Record<string, any>) => Promise<import("./types").GetUserResponse | {
|
|
17
13
|
key: string;
|
|
18
14
|
}>;
|
|
19
|
-
|
|
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>;
|
|
15
|
+
signInByCodeVerifyCode: (body: Record<string, any>) => Promise<import("./types").GetUserResponse>;
|
|
29
16
|
logout: () => Promise<void>;
|
|
30
17
|
fetchActiveSessions: () => Promise<{
|
|
31
18
|
sessions: import("./types").ActiveSession[];
|
|
@@ -80,23 +67,10 @@ export declare function initApiFetch($fetch: Fetch, config: FetchConfig): {
|
|
|
80
67
|
};
|
|
81
68
|
};
|
|
82
69
|
export declare const useUserActions: () => Ref<{
|
|
83
|
-
signIn: (body: {
|
|
84
|
-
username: string;
|
|
85
|
-
password: string;
|
|
86
|
-
rememberMe: boolean;
|
|
87
|
-
}) => Promise<import("./types").GetUserResponse | {
|
|
88
|
-
key: string;
|
|
89
|
-
}>;
|
|
90
|
-
signInByCodeSendCode: (body: {
|
|
91
|
-
username: string;
|
|
92
|
-
}) => Promise<{
|
|
70
|
+
signIn: (body: Record<string, any>) => Promise<import("./types").GetUserResponse | {
|
|
93
71
|
key: string;
|
|
94
72
|
}>;
|
|
95
|
-
signInByCodeVerifyCode: (body:
|
|
96
|
-
key: string;
|
|
97
|
-
code: string;
|
|
98
|
-
rememberMe?: boolean;
|
|
99
|
-
}) => Promise<import("./types").GetUserResponse>;
|
|
73
|
+
signInByCodeVerifyCode: (body: Record<string, any>) => Promise<import("./types").GetUserResponse>;
|
|
100
74
|
logout: () => Promise<void>;
|
|
101
75
|
fetchActiveSessions: () => Promise<{
|
|
102
76
|
sessions: import("./types").ActiveSession[];
|
|
@@ -149,23 +123,10 @@ export declare const useUserActions: () => Ref<{
|
|
|
149
123
|
changeAvatar: (body: FormData) => Promise<void>;
|
|
150
124
|
deleteAvatar: () => Promise<void>;
|
|
151
125
|
}, {
|
|
152
|
-
signIn: (body: {
|
|
153
|
-
username: string;
|
|
154
|
-
password: string;
|
|
155
|
-
rememberMe: boolean;
|
|
156
|
-
}) => Promise<import("./types").GetUserResponse | {
|
|
126
|
+
signIn: (body: Record<string, any>) => Promise<import("./types").GetUserResponse | {
|
|
157
127
|
key: string;
|
|
158
128
|
}>;
|
|
159
|
-
|
|
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>;
|
|
129
|
+
signInByCodeVerifyCode: (body: Record<string, any>) => Promise<import("./types").GetUserResponse>;
|
|
169
130
|
logout: () => Promise<void>;
|
|
170
131
|
fetchActiveSessions: () => Promise<{
|
|
171
132
|
sessions: import("./types").ActiveSession[];
|
package/package.json
CHANGED
package/user-actions.d.ts
CHANGED
|
@@ -1,23 +1,10 @@
|
|
|
1
1
|
import type { ActiveSession, Fetch, FetchConfig, GetUserResponse } from "./types";
|
|
2
2
|
export type UserActions = ReturnType<typeof createApiUserActions>;
|
|
3
3
|
export declare const createApiUserActions: (fetch: Fetch, config: FetchConfig, getUser: () => Promise<GetUserResponse>) => {
|
|
4
|
-
signIn: (body: {
|
|
5
|
-
username: string;
|
|
6
|
-
password: string;
|
|
7
|
-
rememberMe: boolean;
|
|
8
|
-
}) => Promise<GetUserResponse | {
|
|
9
|
-
key: string;
|
|
10
|
-
}>;
|
|
11
|
-
signInByCodeSendCode: (body: {
|
|
12
|
-
username: string;
|
|
13
|
-
}) => Promise<{
|
|
4
|
+
signIn: (body: Record<string, any>) => Promise<GetUserResponse | {
|
|
14
5
|
key: string;
|
|
15
6
|
}>;
|
|
16
|
-
signInByCodeVerifyCode: (body:
|
|
17
|
-
key: string;
|
|
18
|
-
code: string;
|
|
19
|
-
rememberMe?: boolean;
|
|
20
|
-
}) => Promise<GetUserResponse>;
|
|
7
|
+
signInByCodeVerifyCode: (body: Record<string, any>) => Promise<GetUserResponse>;
|
|
21
8
|
logout: () => Promise<void>;
|
|
22
9
|
fetchActiveSessions: () => Promise<{
|
|
23
10
|
sessions: ActiveSession[];
|
package/user-actions.mjs
CHANGED
|
@@ -20,13 +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
23
|
signInByCodeVerifyCode: async (body) => {
|
|
31
24
|
const response = await fetch("/account/0/signinbycode/verifycode", {
|
|
32
25
|
body,
|