@inzombieland/nuxt-common 1.19.22 → 1.19.24

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inzombieland/nuxt-common",
3
- "version": "1.19.22",
3
+ "version": "1.19.24",
4
4
  "configKey": "nuxt-common",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
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.22";
5
+ const version = "1.19.24";
6
6
 
7
7
  const module$1 = defineNuxtModule({
8
8
  meta: {
@@ -1,3 +1,3 @@
1
- import { useApiFetch } from "../api.js";
1
+ import { useApiFetch } from "../server/api/index.js";
2
2
  export { useApiFetch };
3
3
  export default useApiFetch;
@@ -1,3 +1,3 @@
1
- import { useApiFetch } from "../api";
1
+ import { useApiFetch } from "../server/api/index.js";
2
2
  export { useApiFetch };
3
3
  export default useApiFetch;
@@ -1 +1,98 @@
1
- export declare const useUserActions: () => any;
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
+ };
@@ -1,4 +1,4 @@
1
- import userActions from "../api/user-actions";
1
+ import userActions from "../server/api/user-actions.js";
2
2
  export const useUserActions = () => {
3
3
  return userActions;
4
4
  };
@@ -14,6 +14,7 @@ export default defineEventHandler(async (event) => {
14
14
  appendResponseHeaders(response.headers);
15
15
  return response._data;
16
16
  } catch (error) {
17
+ console.error(error);
17
18
  appendResponseHeaders(error?.response?.headers);
18
19
  return error;
19
20
  }
@@ -8,7 +8,7 @@ export declare const config: {
8
8
  isDesktopApp: any;
9
9
  appName: any;
10
10
  getHostname: () => string;
11
- getDevice: () => Promise<string>;
11
+ getDevice: () => Promise<any>;
12
12
  useRequestHeaders: (include?: string[]) => {
13
13
  baseURL: string;
14
14
  headers: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inzombieland/nuxt-common",
3
- "version": "1.19.22",
3
+ "version": "1.19.24",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "exports": {