import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { CONSUMER_PROFILE_API_ROUTES } from '../constants'; import { IProfileRequestPayload, IProfileResponse, IResetPasswordRequest } from '../models'; @Injectable({ providedIn: 'root' }) export class ProfileService { constructor(private readonly http: HttpClient) {} getInfo(): Observable { return this.http.get(CONSUMER_PROFILE_API_ROUTES.info()); } updateProfile(payload: IProfileRequestPayload): Observable { return this.http.patch(CONSUMER_PROFILE_API_ROUTES.updateInfo(), payload); } resetPassword(payload: IResetPasswordRequest): Observable { return this.http.put(CONSUMER_PROFILE_API_ROUTES.resetPassword(), payload); } }