/*!
 * name: nuget-server
 * version: 0.19.0
 * description: NuGet server on Node.js
 * author: Kouji Matsui (@kekyo@mi.kekyo.net)
 * license: MIT
 * repository.url: https://github.com/kekyo/nuget-server.git
 * git.commit.hash: 5b9501882b352a0490b3091210ed1740cfb81389
 */

import { FastifyInstance } from 'fastify';
import { ReaderWriterLock } from 'async-primitives';
import { Logger } from '../../../types';
import { UserService } from '../../../services/userService';
import { SessionService } from '../../../services/sessionService';
import { AuthService } from '../../../services/authService';
import { MetadataService } from '../../../services/metadataService';
/**
 * Configuration for UI routes
 */
export interface UiRoutesConfig {
    userService: UserService;
    sessionService: SessionService;
    authService: AuthService;
    packagesRoot: string;
    logger: Logger;
    realm: string;
    serverUrl: {
        baseUrl?: string;
        port: number;
        isHttps: boolean;
    };
    metadataService: MetadataService;
}
/**
 * POST /api/ui/config request body (empty object)
 */
export interface ConfigRequest {
}
/**
 * POST /api/ui/config response
 */
export interface ConfigResponse {
    realm: string;
    name: string;
    version: string;
    git_commit_hash: string;
    serverUrl: {
        baseUrl?: string;
        port: number;
        isHttps: boolean;
    };
    authMode: string;
    authEnabled: {
        general: boolean;
        publish: boolean;
        admin: boolean;
    };
    currentUser: {
        username: string;
        role: string;
        authenticated: boolean;
    } | null;
}
/**
 * POST /api/ui/users request body for user management
 */
export interface UserManagementRequest {
    action: "list" | "create" | "delete" | "update";
    username?: string;
    password?: string;
    role?: "admin" | "publish" | "read";
}
/**
 * User list response
 */
export interface UserListResponse {
    users: Array<{
        id: string;
        username: string;
        role: string;
        createdAt: string;
        updatedAt: string;
    }>;
}
/**
 * User creation response
 */
export interface UserCreateResponse {
    user: {
        id: string;
        username: string;
        role: string;
        createdAt: string;
        updatedAt: string;
    };
}
/**
 * User deletion response
 */
export interface UserDeleteResponse {
    success: boolean;
    message: string;
}
/**
 * API password regeneration request (empty for current user)
 */
export interface ApiPasswordRegenerateRequest {
}
/**
 * API password regeneration response
 */
export interface ApiPasswordRegenerateResponse {
    apiPassword: string;
    username: string;
}
/**
 * Password change request
 */
export interface PasswordChangeRequest {
    currentPassword?: string;
    newPassword: string;
    username?: string;
}
/**
 * Password change response
 */
export interface PasswordChangeResponse {
    success: boolean;
    message: string;
}
/**
 * Registers UI Backend API routes with Fastify instance
 */
export declare const registerUiRoutes: (fastify: FastifyInstance, config: UiRoutesConfig, locker: ReaderWriterLock) => Promise<void>;
//# sourceMappingURL=index.d.ts.map