UNPKG

motidata

Version:

Data retrieval library for services (e.g. App) accessing MotiMate's main Api

33 lines 1.57 kB
import type { RegistrationDTO } from "../DTOs/RegistrationDTO.js"; import { type SimpleResponseDTO } from "../DTOs/SimpleResponseDTO.js"; import type { UserDetailsDTO } from "../DTOs/UserDetailsDTO.js"; import { BaseRepository, type BaseRepositoryConstructorParam } from "./BaseRepository.js"; export declare class UserRepository extends BaseRepository { constructor(baseArgs: BaseRepositoryConstructorParam); /** * Sends a request to register the new user with {@link RegistrationDTO} and handles saving the sessionID from the Responses Header * @throws any `fetch()` related error * @throws any `Response.json()` related error * @throws any {@link sessionRepository} related Error */ registerUser(body: RegistrationDTO): Promise<SimpleResponseDTO>; /** * @throws any `fetch()` related error * @throws any `Response.json()` related error * @throws any {@link sessionRepository} related Error */ verifyUser(verificationCode: string): Promise<SimpleResponseDTO>; /** * @throws any `fetch()` related error * @throws any `Response.json()` related error * @throws any {@link sessionRepository} related Error */ updatePersonalGoal(goalPerWeek: number): Promise<SimpleResponseDTO>; /** * @throws any `fetch()` related error * @throws any `Response.json()` related error * @throws any {@link sessionRepository} related Error */ getUserInfo(abortSignal: AbortSignal): Promise<SimpleResponseDTO<UserDetailsDTO>>; } //# sourceMappingURL=UserRepository.d.ts.map