@inzombieland/core 1.18.31 → 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 CHANGED
@@ -64,6 +64,11 @@ 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>;
71
+ logoutFromAllActiveSessions: () => Promise<any>;
67
72
  };
68
73
  };
69
74
  export declare const useUserActions: () => Ref<{
@@ -122,6 +127,11 @@ export declare const useUserActions: () => Ref<{
122
127
  }) => Promise<void>;
123
128
  changeAvatar: (body: FormData) => Promise<void>;
124
129
  deleteAvatar: () => Promise<void>;
130
+ logoutActiveSession: (body: {
131
+ sessionId: string;
132
+ visitorId: string;
133
+ }) => Promise<any>;
134
+ logoutFromAllActiveSessions: () => Promise<any>;
125
135
  }, {
126
136
  signIn: (body: Record<string, any>) => Promise<import("./types").GetUserResponse | {
127
137
  key: string;
@@ -178,4 +188,9 @@ export declare const useUserActions: () => Ref<{
178
188
  }) => Promise<void>;
179
189
  changeAvatar: (body: FormData) => Promise<void>;
180
190
  deleteAvatar: () => Promise<void>;
191
+ logoutActiveSession: (body: {
192
+ sessionId: string;
193
+ visitorId: string;
194
+ }) => Promise<any>;
195
+ logoutFromAllActiveSessions: () => Promise<any>;
181
196
  }> | 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.33",
4
4
  "type": "module",
5
5
  "license": "ISC",
6
6
  "main": "./index.mjs",
package/user-actions.d.ts CHANGED
@@ -56,4 +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>;
63
+ logoutFromAllActiveSessions: () => Promise<any>;
59
64
  };
package/user-actions.mjs CHANGED
@@ -108,6 +108,12 @@ 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
+ logoutActiveSession: async (body) => {
113
+ return await fetch("/account/1/logout/session", { body, method: "POST" });
114
+ },
115
+ logoutFromAllActiveSessions: async () => {
116
+ return await fetch("/account/1/logout/sessions", { method: "POST" });
111
117
  }
112
118
  };
113
119
  }