@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 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inzombieland/core",
3
- "version": "1.18.31",
3
+ "version": "1.18.32",
4
4
  "type": "module",
5
5
  "license": "ISC",
6
6
  "main": "./index.mjs",
package/user-actions.d.ts CHANGED
@@ -56,4 +56,5 @@ 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
+ logoutFromAllActiveSessions: () => Promise<any>;
59
60
  };
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
  }