import { Observable } from 'rxjs'; import { SubtrakService } from './subtrak.service'; import { Invoice, InvoiceWithRelations, ListInvoicesParams, PaginatedResponse, InvoiceStatus } from '../models'; import * as i0 from "@angular/core"; /** * Service for managing customer invoices * * @example * ```typescript * constructor(private invoices: InvoicesService) {} * * // List invoices * this.invoices.listInvoices({ customerId: 'cus_123' }).subscribe(response => { * console.log('Invoices:', response.data); * }); * * // Download invoice PDF * this.invoices.downloadInvoicePdf('inv_123').subscribe(blob => { * // Create download link * const url = URL.createObjectURL(blob); * const a = document.createElement('a'); * a.href = url; * a.download = 'invoice.pdf'; * a.click(); * }); * ``` */ export declare class InvoicesService { private subtrak; constructor(subtrak: SubtrakService); /** * List invoices with optional filtering * * @param params - Query parameters for filtering * @returns Observable of paginated invoices */ listInvoices(params?: ListInvoicesParams): Observable>; /** * Get a specific invoice by ID * * @param invoiceId - Invoice ID * @returns Observable of the invoice */ getInvoice(invoiceId: string): Observable; /** * Get invoice PDF URL * * @param invoiceId - Invoice ID * @returns Observable of PDF URL */ getInvoicePdfUrl(invoiceId: string): Observable; /** * Download invoice as PDF blob * * @param invoiceId - Invoice ID * @returns Observable of Blob */ downloadInvoicePdf(invoiceId: string): Observable; /** * Send invoice via email * * @param invoiceId - Invoice ID * @param email - Email address to send to (optional, defaults to customer email) * @returns Observable of void */ sendInvoiceEmail(invoiceId: string, email?: string): Observable; /** * Get invoices for a specific customer * * @param customerId - Customer ID * @param status - Optional status filter * @returns Observable of invoices */ getCustomerInvoices(customerId: string, status?: InvoiceStatus): Observable; /** * Get invoices for a specific subscription * * @param subscriptionId - Subscription ID * @returns Observable of invoices */ getSubscriptionInvoices(subscriptionId: string): Observable; /** * Get paid invoices for a customer * * @param customerId - Customer ID * @returns Observable of paid invoices */ getPaidInvoices(customerId: string): Observable; /** * Get unpaid (open) invoices for a customer * * @param customerId - Customer ID * @returns Observable of open invoices */ getUnpaidInvoices(customerId: string): Observable; /** * Get the latest invoice for a customer * * @param customerId - Customer ID * @returns Observable of the latest invoice */ getLatestInvoice(customerId: string): Observable; /** * Calculate total amount paid by customer * * @param customerId - Customer ID * @returns Observable of total amount */ getTotalPaid(customerId: string): Observable; /** * Calculate total outstanding amount for customer * * @param customerId - Customer ID * @returns Observable of total outstanding */ getTotalOutstanding(customerId: string): Observable; /** * Check if customer has any unpaid invoices * * @param customerId - Customer ID * @returns Observable of boolean */ hasUnpaidInvoices(customerId: string): Observable; /** * Get invoice count for a customer * * @param customerId - Customer ID * @returns Observable of count */ getInvoiceCount(customerId: string): Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }