UNPKG

@authup/core-http-kit

Version:

Package containing global constants, types & interfaces.

33 lines 1.56 kB
import type { BuildInput } from 'rapiq'; import type { User } from '@authup/core-kit'; import { BaseAPI } from '../../base'; import type { EntityAPI, EntityCollectionResponse, EntityRecordResponse } from '../../types-base'; export type PasswordForgotResponse = { reset_expires: string; }; export type PasswordResetResponse = { reset_at: string; }; export type RegisterResponse = { active: true; }; export declare class UserAPI extends BaseAPI implements EntityAPI<User> { getMany(options?: BuildInput<User>): Promise<EntityCollectionResponse<User>>; getOne(id: User['id'], options?: BuildInput<User>): Promise<EntityRecordResponse<User>>; delete(id: User['id']): Promise<EntityRecordResponse<User>>; create(data: Partial<User>): Promise<EntityRecordResponse<User>>; update(id: User['id'], data: Partial<User> & { password_repeat?: User['password']; }): Promise<EntityRecordResponse<User>>; createOrUpdate(idOrName: string, data: Partial<User> & { password_repeat?: User['password']; }): Promise<EntityRecordResponse<User>>; activate(token: string): Promise<User>; register(data: Partial<Pick<User, 'email' | 'name' | 'password' | 'realm_id'>>): Promise<RegisterResponse>; passwordForgot(data: Partial<Pick<User, 'email' | 'name' | 'realm_id'>>): Promise<PasswordForgotResponse>; passwordReset(data: Partial<Pick<User, 'email' | 'name' | 'realm_id'>> & { token: string; password: string; }): Promise<PasswordResetResponse>; } //# sourceMappingURL=module.d.ts.map