Removed requeets form netweorks tab
Actiev sessions now refreshes every 5 seconds Better session mgmt
This commit is contained in:
+51
-6
@@ -1663,15 +1663,20 @@ export const api = {
|
||||
),
|
||||
|
||||
// ── Sessions ──────────────────────────────────────────────────────────────
|
||||
listSessions: (orgId: string, requestConfig?: RequestConfig) =>
|
||||
request<{ sessions: ActivationSession[]; count: number }>(
|
||||
listUserSessions: (orgId: string, requestConfig?: RequestConfig) =>
|
||||
request<{ sessions: UserSession[]; count: number }>(
|
||||
`/organizations/${orgId}/sessions`, {}, true, requestConfig,
|
||||
),
|
||||
|
||||
endSession: (orgId: string, sessionId: string, requestConfig?: RequestConfig) =>
|
||||
request<{ message: string }>(
|
||||
`/organizations/${orgId}/sessions/${sessionId}`,
|
||||
{ method: "DELETE" }, true, requestConfig,
|
||||
adminListSessions: (orgId: string, requestConfig?: RequestConfig) =>
|
||||
request<{ sessions: AdminSession[]; count: number }>(
|
||||
`/organizations/${orgId}/admin/sessions`, {}, true, requestConfig,
|
||||
),
|
||||
|
||||
adminEndSession: (orgId: string, sessionId: string, requestConfig?: RequestConfig) =>
|
||||
request<{ session: ActivationSession; message: string }>(
|
||||
`/organizations/${orgId}/admin/sessions/${sessionId}/end`,
|
||||
{ method: "POST", body: "{}" }, true, requestConfig,
|
||||
),
|
||||
|
||||
// ── Kill Switch ───────────────────────────────────────────────────────────
|
||||
@@ -2193,6 +2198,46 @@ export interface ActivationSession {
|
||||
is_active: boolean;
|
||||
}
|
||||
|
||||
export interface UserSessionDevice {
|
||||
id: string;
|
||||
node_id: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface UserSessionNetwork {
|
||||
id: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface UserSession {
|
||||
id: string;
|
||||
authenticated_at: string;
|
||||
expires_at: string;
|
||||
duration_seconds: number;
|
||||
remaining_seconds: number;
|
||||
is_active: boolean;
|
||||
is_expired: boolean;
|
||||
ended_at: string | null;
|
||||
end_reason: string | null;
|
||||
device: UserSessionDevice;
|
||||
network: UserSessionNetwork;
|
||||
}
|
||||
|
||||
export interface AdminSession {
|
||||
id: string;
|
||||
user: { id: string; full_name: string; email: string };
|
||||
authenticated_at: string;
|
||||
expires_at: string;
|
||||
duration_seconds: number;
|
||||
remaining_seconds: number;
|
||||
is_active: boolean;
|
||||
is_expired: boolean;
|
||||
ended_at: string | null;
|
||||
end_reason: string | null;
|
||||
device: UserSessionDevice;
|
||||
network: UserSessionNetwork;
|
||||
}
|
||||
|
||||
export interface KillSwitchEvent {
|
||||
id: string;
|
||||
organization_id: string;
|
||||
|
||||
Reference in New Issue
Block a user