@inzombieland/nuxt-common 1.19.21 → 1.19.23
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/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/composables/use-api-fetch.d.ts +1 -1
- package/dist/runtime/composables/use-api-fetch.js +1 -1
- package/dist/runtime/composables/use-user-actions.d.ts +98 -1
- package/dist/runtime/composables/use-user-actions.js +1 -1
- package/dist/runtime/plugin.js +1 -1
- package/dist/runtime/server/api/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
2
2
|
import { defineNuxtModule, createResolver, addServerHandler, addImportsDir, addPlugin, addComponent } from '@nuxt/kit';
|
|
3
3
|
|
|
4
4
|
const name = "@inzombieland/nuxt-common";
|
|
5
|
-
const version = "1.19.
|
|
5
|
+
const version = "1.19.23";
|
|
6
6
|
|
|
7
7
|
const module$1 = defineNuxtModule({
|
|
8
8
|
meta: {
|
|
@@ -1 +1,98 @@
|
|
|
1
|
-
export declare const useUserActions: () =>
|
|
1
|
+
export declare const useUserActions: () => {
|
|
2
|
+
signIn: (body: Record<string, any>) => Promise<import("../packages/core/index.js").GetUserResponse | {
|
|
3
|
+
key: string;
|
|
4
|
+
}>;
|
|
5
|
+
signInByCodeSendCode: (body: Record<string, any>) => Promise<{
|
|
6
|
+
key: string;
|
|
7
|
+
}>;
|
|
8
|
+
signInByCodeVerifyCode: (body: Record<string, any>) => Promise<import("../packages/core/index.js").GetUserResponse>;
|
|
9
|
+
getToken: (body: Record<string, any>) => Promise<import("../packages/core/index.js").GetUserResponse>;
|
|
10
|
+
signUp: (body: Record<string, any>) => Promise<{
|
|
11
|
+
key: string;
|
|
12
|
+
}>;
|
|
13
|
+
confirmEmail: (body: {
|
|
14
|
+
key: string;
|
|
15
|
+
code: string;
|
|
16
|
+
}) => Promise<{}>;
|
|
17
|
+
resendActivationEmail: (body: {
|
|
18
|
+
email: string;
|
|
19
|
+
}) => Promise<{
|
|
20
|
+
key: string;
|
|
21
|
+
}>;
|
|
22
|
+
logout: () => Promise<void>;
|
|
23
|
+
recovery: (body: Record<string, any>) => Promise<{
|
|
24
|
+
key: string;
|
|
25
|
+
}>;
|
|
26
|
+
confirmRecovery: (body: {
|
|
27
|
+
key: string;
|
|
28
|
+
code: string;
|
|
29
|
+
}) => Promise<{
|
|
30
|
+
key: string;
|
|
31
|
+
}>;
|
|
32
|
+
resetPassword: (body: {
|
|
33
|
+
key: string;
|
|
34
|
+
password: string;
|
|
35
|
+
}) => Promise<{}>;
|
|
36
|
+
changeName: (body: {
|
|
37
|
+
firstName: string;
|
|
38
|
+
lastName?: string;
|
|
39
|
+
middleName?: string;
|
|
40
|
+
}) => Promise<void>;
|
|
41
|
+
changeBirthday: (body: {
|
|
42
|
+
day?: number;
|
|
43
|
+
month?: number;
|
|
44
|
+
year?: number;
|
|
45
|
+
}) => Promise<void>;
|
|
46
|
+
changeGender: (body: {
|
|
47
|
+
gender: string;
|
|
48
|
+
}) => Promise<void>;
|
|
49
|
+
changePassword: (body: {
|
|
50
|
+
password: string;
|
|
51
|
+
newPassword: string;
|
|
52
|
+
}) => Promise<{
|
|
53
|
+
key: string;
|
|
54
|
+
}>;
|
|
55
|
+
confirmPasswordChange: (body: {
|
|
56
|
+
key: string;
|
|
57
|
+
code: string;
|
|
58
|
+
newPassword?: string;
|
|
59
|
+
}) => Promise<void>;
|
|
60
|
+
changeEmail: (body: {
|
|
61
|
+
email: string;
|
|
62
|
+
password: string;
|
|
63
|
+
}) => Promise<{
|
|
64
|
+
key: string;
|
|
65
|
+
}>;
|
|
66
|
+
confirmEmailChange: (body: {
|
|
67
|
+
key: string;
|
|
68
|
+
code: string;
|
|
69
|
+
email?: string;
|
|
70
|
+
}) => Promise<void>;
|
|
71
|
+
changePhone: (body: {
|
|
72
|
+
phone: string;
|
|
73
|
+
password: string;
|
|
74
|
+
}) => Promise<void>;
|
|
75
|
+
changeTheme: (body: {
|
|
76
|
+
theme: "light" | "dark";
|
|
77
|
+
}) => Promise<void>;
|
|
78
|
+
changeLocale: (body: {
|
|
79
|
+
locale: string;
|
|
80
|
+
}) => Promise<void>;
|
|
81
|
+
changeAvatar: (body: FormData) => Promise<void>;
|
|
82
|
+
deleteAvatar: () => Promise<void>;
|
|
83
|
+
fetchActiveSessions: () => Promise<{
|
|
84
|
+
sessions: import("../packages/core/index.js").ActiveSession[];
|
|
85
|
+
}>;
|
|
86
|
+
logoutActiveSession: (body: {
|
|
87
|
+
sessionId: string;
|
|
88
|
+
visitorId: string;
|
|
89
|
+
}) => Promise<any>;
|
|
90
|
+
logoutFromAllActiveSessions: () => Promise<any>;
|
|
91
|
+
deleteAccount: () => Promise<{
|
|
92
|
+
key: string;
|
|
93
|
+
}>;
|
|
94
|
+
confirmDeleteAccount: (body: {
|
|
95
|
+
key: string;
|
|
96
|
+
code: string;
|
|
97
|
+
}) => Promise<void>;
|
|
98
|
+
};
|
package/dist/runtime/plugin.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { addRouteMiddleware, defineNuxtPlugin } from "#app";
|
|
2
2
|
import { useNuxtApp, useRequestHeaders, useRuntimeConfig, useState } from "#imports";
|
|
3
3
|
import { watch } from "vue";
|
|
4
|
-
import { fetch, getUser } from "./api";
|
|
5
4
|
import { authMiddleware, guestMiddleware, localeMiddleware } from "./middleware/index.js";
|
|
6
5
|
import { defineVuePlugins, useThemeMode } from "./packages/core/index.js";
|
|
7
6
|
import { flush, setToken, setUser } from "./packages/core/api-client.js";
|
|
7
|
+
import { fetch, getUser } from "./server/api/index.js";
|
|
8
8
|
const useAuth = () => {
|
|
9
9
|
return useState("auth", () => null);
|
|
10
10
|
};
|