@inzombieland/core 1.18.31 → 1.18.32
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 +3 -0
- package/package.json +1 -1
- package/user-actions.d.ts +1 -0
- package/user-actions.mjs +3 -0
package/index.d.ts
CHANGED
|
@@ -64,6 +64,7 @@ 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
|
+
logoutFromAllActiveSessions: () => Promise<any>;
|
|
67
68
|
};
|
|
68
69
|
};
|
|
69
70
|
export declare const useUserActions: () => Ref<{
|
|
@@ -122,6 +123,7 @@ export declare const useUserActions: () => Ref<{
|
|
|
122
123
|
}) => Promise<void>;
|
|
123
124
|
changeAvatar: (body: FormData) => Promise<void>;
|
|
124
125
|
deleteAvatar: () => Promise<void>;
|
|
126
|
+
logoutFromAllActiveSessions: () => Promise<any>;
|
|
125
127
|
}, {
|
|
126
128
|
signIn: (body: Record<string, any>) => Promise<import("./types").GetUserResponse | {
|
|
127
129
|
key: string;
|
|
@@ -178,4 +180,5 @@ export declare const useUserActions: () => Ref<{
|
|
|
178
180
|
}) => Promise<void>;
|
|
179
181
|
changeAvatar: (body: FormData) => Promise<void>;
|
|
180
182
|
deleteAvatar: () => Promise<void>;
|
|
183
|
+
logoutFromAllActiveSessions: () => Promise<any>;
|
|
181
184
|
}> | undefined;
|
package/package.json
CHANGED
package/user-actions.d.ts
CHANGED
package/user-actions.mjs
CHANGED
|
@@ -108,6 +108,9 @@ export const createApiUserActions = once(
|
|
|
108
108
|
const user = useUser();
|
|
109
109
|
await fetch("/account/1/delete/avatar", { body: { avatar: user.value?.avatar }, method: "DELETE" });
|
|
110
110
|
updateUser({ avatar: "" });
|
|
111
|
+
},
|
|
112
|
+
logoutFromAllActiveSessions: async () => {
|
|
113
|
+
return await fetch("/account/1/logout/sessions", { method: "POST" });
|
|
111
114
|
}
|
|
112
115
|
};
|
|
113
116
|
}
|