@inzombieland/core 1.18.23 → 1.18.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/define-vue-plugins.mjs +2 -1
- package/index.d.ts +78 -0
- package/package.json +1 -1
- package/plugins/index.d.ts +1 -0
- package/plugins/index.mjs +1 -0
- package/plugins/otp-input.d.ts +4 -0
- package/plugins/otp-input.mjs +4 -0
- package/user-actions.d.ts +26 -0
- package/user-actions.mjs +18 -0
package/define-vue-plugins.mjs
CHANGED
package/index.d.ts
CHANGED
|
@@ -33,6 +33,32 @@ export declare function initApiFetch($fetch: Fetch, config: FetchConfig): {
|
|
|
33
33
|
changeGender: (body: {
|
|
34
34
|
gender: "" | "male" | "female";
|
|
35
35
|
}) => Promise<void>;
|
|
36
|
+
changePassword: (body: {
|
|
37
|
+
password: string;
|
|
38
|
+
newPassword: string;
|
|
39
|
+
}) => Promise<{
|
|
40
|
+
key: string;
|
|
41
|
+
}>;
|
|
42
|
+
confirmPasswordChange: (body: {
|
|
43
|
+
key: string;
|
|
44
|
+
code: string;
|
|
45
|
+
newPassword?: string;
|
|
46
|
+
}) => Promise<void>;
|
|
47
|
+
changeEmail: (body: {
|
|
48
|
+
email: string;
|
|
49
|
+
password: string;
|
|
50
|
+
}) => Promise<{
|
|
51
|
+
key: string;
|
|
52
|
+
}>;
|
|
53
|
+
confirmEmailChange: (body: {
|
|
54
|
+
key: string;
|
|
55
|
+
code: string;
|
|
56
|
+
email?: string;
|
|
57
|
+
}) => Promise<void>;
|
|
58
|
+
changePhone: (body: {
|
|
59
|
+
phone: string;
|
|
60
|
+
password: string;
|
|
61
|
+
}) => Promise<void>;
|
|
36
62
|
changeTheme: (body: {
|
|
37
63
|
theme: "light" | "dark";
|
|
38
64
|
}) => Promise<void>;
|
|
@@ -68,6 +94,32 @@ export declare const useUserActions: () => Ref<{
|
|
|
68
94
|
changeGender: (body: {
|
|
69
95
|
gender: "" | "male" | "female";
|
|
70
96
|
}) => Promise<void>;
|
|
97
|
+
changePassword: (body: {
|
|
98
|
+
password: string;
|
|
99
|
+
newPassword: string;
|
|
100
|
+
}) => Promise<{
|
|
101
|
+
key: string;
|
|
102
|
+
}>;
|
|
103
|
+
confirmPasswordChange: (body: {
|
|
104
|
+
key: string;
|
|
105
|
+
code: string;
|
|
106
|
+
newPassword?: string;
|
|
107
|
+
}) => Promise<void>;
|
|
108
|
+
changeEmail: (body: {
|
|
109
|
+
email: string;
|
|
110
|
+
password: string;
|
|
111
|
+
}) => Promise<{
|
|
112
|
+
key: string;
|
|
113
|
+
}>;
|
|
114
|
+
confirmEmailChange: (body: {
|
|
115
|
+
key: string;
|
|
116
|
+
code: string;
|
|
117
|
+
email?: string;
|
|
118
|
+
}) => Promise<void>;
|
|
119
|
+
changePhone: (body: {
|
|
120
|
+
phone: string;
|
|
121
|
+
password: string;
|
|
122
|
+
}) => Promise<void>;
|
|
71
123
|
changeTheme: (body: {
|
|
72
124
|
theme: "light" | "dark";
|
|
73
125
|
}) => Promise<void>;
|
|
@@ -101,6 +153,32 @@ export declare const useUserActions: () => Ref<{
|
|
|
101
153
|
changeGender: (body: {
|
|
102
154
|
gender: "" | "male" | "female";
|
|
103
155
|
}) => Promise<void>;
|
|
156
|
+
changePassword: (body: {
|
|
157
|
+
password: string;
|
|
158
|
+
newPassword: string;
|
|
159
|
+
}) => Promise<{
|
|
160
|
+
key: string;
|
|
161
|
+
}>;
|
|
162
|
+
confirmPasswordChange: (body: {
|
|
163
|
+
key: string;
|
|
164
|
+
code: string;
|
|
165
|
+
newPassword?: string;
|
|
166
|
+
}) => Promise<void>;
|
|
167
|
+
changeEmail: (body: {
|
|
168
|
+
email: string;
|
|
169
|
+
password: string;
|
|
170
|
+
}) => Promise<{
|
|
171
|
+
key: string;
|
|
172
|
+
}>;
|
|
173
|
+
confirmEmailChange: (body: {
|
|
174
|
+
key: string;
|
|
175
|
+
code: string;
|
|
176
|
+
email?: string;
|
|
177
|
+
}) => Promise<void>;
|
|
178
|
+
changePhone: (body: {
|
|
179
|
+
phone: string;
|
|
180
|
+
password: string;
|
|
181
|
+
}) => Promise<void>;
|
|
104
182
|
changeTheme: (body: {
|
|
105
183
|
theme: "light" | "dark";
|
|
106
184
|
}) => Promise<void>;
|
package/package.json
CHANGED
package/plugins/index.d.ts
CHANGED
package/plugins/index.mjs
CHANGED
package/user-actions.d.ts
CHANGED
|
@@ -25,6 +25,32 @@ export declare const createApiUserActions: (fetch: Fetch, config: FetchConfig, g
|
|
|
25
25
|
changeGender: (body: {
|
|
26
26
|
gender: "" | "male" | "female";
|
|
27
27
|
}) => Promise<void>;
|
|
28
|
+
changePassword: (body: {
|
|
29
|
+
password: string;
|
|
30
|
+
newPassword: string;
|
|
31
|
+
}) => Promise<{
|
|
32
|
+
key: string;
|
|
33
|
+
}>;
|
|
34
|
+
confirmPasswordChange: (body: {
|
|
35
|
+
key: string;
|
|
36
|
+
code: string;
|
|
37
|
+
newPassword?: string;
|
|
38
|
+
}) => Promise<void>;
|
|
39
|
+
changeEmail: (body: {
|
|
40
|
+
email: string;
|
|
41
|
+
password: string;
|
|
42
|
+
}) => Promise<{
|
|
43
|
+
key: string;
|
|
44
|
+
}>;
|
|
45
|
+
confirmEmailChange: (body: {
|
|
46
|
+
key: string;
|
|
47
|
+
code: string;
|
|
48
|
+
email?: string;
|
|
49
|
+
}) => Promise<void>;
|
|
50
|
+
changePhone: (body: {
|
|
51
|
+
phone: string;
|
|
52
|
+
password: string;
|
|
53
|
+
}) => Promise<void>;
|
|
28
54
|
changeTheme: (body: {
|
|
29
55
|
theme: "light" | "dark";
|
|
30
56
|
}) => Promise<void>;
|
package/user-actions.mjs
CHANGED
|
@@ -55,6 +55,24 @@ export const createApiUserActions = once(
|
|
|
55
55
|
await fetch("/account/1/change/gender", { body, method: "POST" });
|
|
56
56
|
updateUser(body);
|
|
57
57
|
},
|
|
58
|
+
changePassword: async (body) => {
|
|
59
|
+
return await fetch("/account/1/change/password", { body, method: "POST" });
|
|
60
|
+
},
|
|
61
|
+
confirmPasswordChange: async (body) => {
|
|
62
|
+
await fetch("/account/1/change/password", { body, method: "PUT" });
|
|
63
|
+
updateUser({ passwordLastSet: /* @__PURE__ */ new Date() });
|
|
64
|
+
},
|
|
65
|
+
changeEmail: async (body) => {
|
|
66
|
+
return await fetch("/account/1/change/email", { body, method: "POST" });
|
|
67
|
+
},
|
|
68
|
+
confirmEmailChange: async (body) => {
|
|
69
|
+
await fetch("/account/1/change/email", { body, method: "PUT" });
|
|
70
|
+
updateUser({ email: body.email });
|
|
71
|
+
},
|
|
72
|
+
changePhone: async (body) => {
|
|
73
|
+
await fetch("/account/1/change/phone", { body, method: "POST" });
|
|
74
|
+
updateUser({ phone: body.phone });
|
|
75
|
+
},
|
|
58
76
|
changeTheme: async (body) => {
|
|
59
77
|
const user = useUser();
|
|
60
78
|
if (user.value) {
|