import { IPaginatedResponse } from '@/core/models/service.model'; import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { PARTNER_ACCOUNTS_API_ROUTES } from '../constants'; import { IAccountRawResponse, IAccountRequest, IAccountResponse } from '../models'; @Injectable({ providedIn: 'root' }) export class AccountsService { constructor(private http: HttpClient) {} private apiRoutes = PARTNER_ACCOUNTS_API_ROUTES; getAll(): Observable> { return this.http.get>(this.apiRoutes.list()); } getSingle(accountId: string): Observable { return this.http.get(this.apiRoutes.single(accountId)); } update(accountId: string, userData: IAccountRequest): Observable { return this.http.patch(this.apiRoutes.single(accountId), userData); } }