@inzombieland/core 1.18.32 → 1.18.33
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 +12 -0
- package/package.json +1 -1
- package/user-actions.d.ts +4 -0
- package/user-actions.mjs +3 -0
package/index.d.ts
CHANGED
|
@@ -64,6 +64,10 @@ export declare function initApiFetch($fetch: Fetch, config: FetchConfig): {
|
|
|
64
64
|
}) => Promise<void>;
|
|
65
65
|
changeAvatar: (body: FormData) => Promise<void>;
|
|
66
66
|
deleteAvatar: () => Promise<void>;
|
|
67
|
+
logoutActiveSession: (body: {
|
|
68
|
+
sessionId: string;
|
|
69
|
+
visitorId: string;
|
|
70
|
+
}) => Promise<any>;
|
|
67
71
|
logoutFromAllActiveSessions: () => Promise<any>;
|
|
68
72
|
};
|
|
69
73
|
};
|
|
@@ -123,6 +127,10 @@ export declare const useUserActions: () => Ref<{
|
|
|
123
127
|
}) => Promise<void>;
|
|
124
128
|
changeAvatar: (body: FormData) => Promise<void>;
|
|
125
129
|
deleteAvatar: () => Promise<void>;
|
|
130
|
+
logoutActiveSession: (body: {
|
|
131
|
+
sessionId: string;
|
|
132
|
+
visitorId: string;
|
|
133
|
+
}) => Promise<any>;
|
|
126
134
|
logoutFromAllActiveSessions: () => Promise<any>;
|
|
127
135
|
}, {
|
|
128
136
|
signIn: (body: Record<string, any>) => Promise<import("./types").GetUserResponse | {
|
|
@@ -180,5 +188,9 @@ export declare const useUserActions: () => Ref<{
|
|
|
180
188
|
}) => Promise<void>;
|
|
181
189
|
changeAvatar: (body: FormData) => Promise<void>;
|
|
182
190
|
deleteAvatar: () => Promise<void>;
|
|
191
|
+
logoutActiveSession: (body: {
|
|
192
|
+
sessionId: string;
|
|
193
|
+
visitorId: string;
|
|
194
|
+
}) => Promise<any>;
|
|
183
195
|
logoutFromAllActiveSessions: () => Promise<any>;
|
|
184
196
|
}> | undefined;
|
package/package.json
CHANGED
package/user-actions.d.ts
CHANGED
|
@@ -56,5 +56,9 @@ export declare const createApiUserActions: (fetch: Fetch, config: FetchConfig, g
|
|
|
56
56
|
}) => Promise<void>;
|
|
57
57
|
changeAvatar: (body: FormData) => Promise<void>;
|
|
58
58
|
deleteAvatar: () => Promise<void>;
|
|
59
|
+
logoutActiveSession: (body: {
|
|
60
|
+
sessionId: string;
|
|
61
|
+
visitorId: string;
|
|
62
|
+
}) => Promise<any>;
|
|
59
63
|
logoutFromAllActiveSessions: () => Promise<any>;
|
|
60
64
|
};
|
package/user-actions.mjs
CHANGED
|
@@ -109,6 +109,9 @@ export const createApiUserActions = once(
|
|
|
109
109
|
await fetch("/account/1/delete/avatar", { body: { avatar: user.value?.avatar }, method: "DELETE" });
|
|
110
110
|
updateUser({ avatar: "" });
|
|
111
111
|
},
|
|
112
|
+
logoutActiveSession: async (body) => {
|
|
113
|
+
return await fetch("/account/1/logout/session", { body, method: "POST" });
|
|
114
|
+
},
|
|
112
115
|
logoutFromAllActiveSessions: async () => {
|
|
113
116
|
return await fetch("/account/1/logout/sessions", { method: "POST" });
|
|
114
117
|
}
|