import { IPaginatedResponse } from '@/core/models/service.model'; import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { CUSTOMER_SALE_INVOICES_API_ROUTES } from '../constants/apiRoutes/saleInvoices'; import { ICustomerSaleInvoicesRawResponse, ICustomerSaleInvoicesResponse } from '../models'; @Injectable({ providedIn: 'root' }) export class CustomerSaleInvoicesService { constructor(private http: HttpClient) {} private apiRoutes = CUSTOMER_SALE_INVOICES_API_ROUTES; getAll(customerId: string): Observable> { return this.http.get>( this.apiRoutes.list(customerId), ); } getSingle(customerId: string, invoiceId: string): Observable { return this.http.get( this.apiRoutes.single(customerId, invoiceId), ); } }