/** * Platform user — the authenticated operator's profile, sessions, security * posture, and GDPR export/erasure. Distinct from `users.ts` (which is the * customer-managed end-user directory) and from `auth.ts` (credentials). * * Mirrors `apps/api/src/server/platform/routes/user.ts` — paths sourced * from `@sylphx/contract` (`usersEndpoints`, mount `/user/*`). */ import type { Client } from './client.js'; export interface WhoAmI { readonly id: string; readonly email: string; readonly role: string | null; readonly orgId: string | null; } export declare const whoami: (client: Client) => Promise; export interface PlatformProfile { readonly id: string; readonly email: string; readonly name: string | null; readonly avatarUrl: string | null; readonly locale: string | null; readonly timezone: string | null; readonly createdAt: string; } export declare const getProfile: (client: Client) => Promise<{ profile: PlatformProfile; }>; export interface UpdateProfileInput { readonly name?: string; readonly avatarUrl?: string; readonly locale?: string; readonly timezone?: string; } export declare const updateProfile: (client: Client, body: UpdateProfileInput) => Promise<{ profile: PlatformProfile; }>; export interface SecurityPosture { readonly passwordSet: boolean; readonly mfaEnabled: boolean; readonly passkeyCount: number; readonly backupCodesRemaining: number; readonly score: number; } export declare const getSecurity: (client: Client) => Promise; export declare const changePassword: (client: Client, body: { readonly currentPassword: string; readonly newPassword: string; }) => Promise<{ success: boolean; }>; export interface ConnectedAccount { readonly provider: string; readonly externalId: string; readonly email: string | null; readonly connectedAt: string; } export declare const getConnectedAccounts: (client: Client) => Promise<{ accounts: readonly ConnectedAccount[]; }>; export interface LoginHistoryEntry { readonly id: string; readonly at: string; readonly ip: string | null; readonly userAgent: string | null; readonly success: boolean; readonly method: string; } export declare const getLoginHistory: (client: Client) => Promise<{ history: readonly LoginHistoryEntry[]; }>; export interface UserSession { readonly id: string; readonly createdAt: string; readonly lastSeenAt: string; readonly ip: string | null; readonly userAgent: string | null; readonly current: boolean; } export declare const getSessions: (client: Client) => Promise<{ sessions: readonly UserSession[]; }>; export declare const revokeSession: (client: Client, sessionId: string) => Promise<{ success: boolean; }>; export declare const revokeAllSessions: (client: Client) => Promise<{ success: boolean; count: number; }>; export declare const exportData: (client: Client) => Promise<{ downloadUrl: string; expiresAt: string; }>; export declare const deleteAccount: (client: Client, body?: { readonly confirmEmail: string; }) => Promise<{ success: boolean; }>; //# sourceMappingURL=user.d.ts.map