UNPKG

@rnaga/wp-node

Version:

👉 **[View Full Documentation at rnaga.github.io/wp-node →](https://rnaga.github.io/wp-node/)**

53 lines • 1.98 kB
import { Config } from "../../config"; import { applicationPassword } from "../../validators/application-password"; import { Components } from "../components"; import { z } from "zod"; type ApplicationPassword = z.infer<typeof applicationPassword>; export declare class ApplicationPasswordsUtil { private config; private components; constructor(config: Config, components: Components); getMetaKey(): string; getOptionsKey(): string; isAvailable(checkSsl?: boolean): boolean; isInUse(): Promise<boolean>; createNewPassword(userId: number, options: { name: string; app_id?: string; }): Promise<{ password: string; item: { uuid: string; app_id: string; name: string; password: string; created: number; last_used: number | null; last_ip: string | null; }; }>; recordPasswordUsage(userId: number, uuid: string, options: { ip?: string | null; }): Promise<boolean>; updatePasswordName(userId: number, uuid: string, newName: string): Promise<boolean>; deletePassword(userId: number, uuid: string): Promise<boolean>; deleteAllPasswords(userId: number): Promise<boolean>; private parsePasswords; getUserPasswords(userId: number): Promise<{ uuid: string; app_id: string; name: string; password: string; created: number; last_used: number | null; last_ip: string | null; }[]>; getUserPasswordByUuid(userId: number, uuid: string): Promise<ApplicationPassword | null>; setUserPasswords(userId: number, passwords: ApplicationPassword[]): Promise<boolean>; chunkPassword(password: string): string; authenticate(userIdOrName: number | string, rawPassword: string, options?: { ip?: string; }): Promise<import("../user").User | undefined>; } export {}; //# sourceMappingURL=application-passwords.util.d.ts.map