import { Type, type Static } from '@eggjs/typebox-validate/typebox'; import { Context } from 'egg'; import { AbstractController } from './AbstractController.ts'; declare const UserRule: Type.TObject<{ type: Type.TLiteral<"user">; name: Type.TString; password: Type.TString; email: Type.TOptional; }>; type User = Static; export declare class UserController extends AbstractController { loginOrCreateUser(ctx: Context, username: string, user: User): Promise<{ ok: boolean; id: string; rev: string | undefined; token: string | undefined; }>; logout(ctx: Context, token: string): Promise<{ ok: boolean; }>; showUser(ctx: Context, username: string): Promise<{ _id: string; name: string; email: string | undefined; }>; whoami(ctx: Context): Promise<{ username: string; name: string; description: string | undefined; allowedPackages: string[] | undefined; allowedScopes: string[] | undefined; lastUsedAt: Date; expiredAt: Date; key: string; cidr_whitelist: string[]; readonly: boolean; created: Date; updated: Date; type: import("../../core/entity/Token.ts").TokenType | undefined; } | { name?: undefined; description?: undefined; allowedPackages?: undefined; allowedScopes?: undefined; lastUsedAt?: undefined; expiredAt?: undefined; key?: undefined; cidr_whitelist?: undefined; readonly?: undefined; created?: undefined; updated?: undefined; type?: undefined; username: string; }>; starredByUser(): Promise; showProfile(ctx: Context): Promise<{ name: string; email: string; email_verified: boolean; created: Date; updated: Date; }>; saveProfile(): Promise; } export {};