sprof 0.5.0 → 0.5.2
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/dist/core/auth/AuthLog.d.ts +17 -0
- package/dist/core/auth/AuthLog.test.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/sprof.js +1888 -1835
- package/dist/sprof.umd.cjs +12 -12
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type AuthLogOperation = 'login' | 'logout' | 'heartbeat';
|
|
2
|
+
export type AuthLogReason = 'user' | 'tab-close' | 'token-expired' | '';
|
|
3
|
+
/** Пользователь из провайдера auth (поля, которые реально использует аудит). */
|
|
4
|
+
export interface AuthLogUser {
|
|
5
|
+
id?: string;
|
|
6
|
+
username?: string;
|
|
7
|
+
email?: string;
|
|
8
|
+
roles?: string[];
|
|
9
|
+
}
|
|
10
|
+
/** Провайдер auth-событий: реализуется клиентским Auth (keycloak-адаптер и т.п.). */
|
|
11
|
+
export interface AuthLogProvider {
|
|
12
|
+
on(event: 'login' | 'logout' | 'session-expired', cb: () => void): unknown;
|
|
13
|
+
isAuth(): boolean;
|
|
14
|
+
getToken(): string | null | undefined;
|
|
15
|
+
UserInfo(): AuthLogUser | null;
|
|
16
|
+
}
|
|
17
|
+
export declare function initAuthLog(auth: AuthLogProvider): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -47,3 +47,5 @@ export { useCrud, useFilters, usePagination } from './core/composables/index';
|
|
|
47
47
|
export type { UseCrudOptions, UseCrudReturn } from './core/composables/useCrud';
|
|
48
48
|
export type { UseFiltersReturn } from './core/composables/useFilters';
|
|
49
49
|
export type { UsePaginationReturn } from './core/composables/usePagination';
|
|
50
|
+
export type { AuthLogOperation, AuthLogProvider, AuthLogReason, AuthLogUser } from './core/auth/AuthLog';
|
|
51
|
+
export { initAuthLog } from './core/auth/AuthLog';
|