import { client, normalizePage, pageQuery, type Page, type PageParams } from "../client"; import type { PaymentLine } from "./types"; export async function getPaymentLedgerByUserId( userId: string, params?: PageParams, signal?: AbortSignal, ): Promise> { const data = await client( `/payments/ledger/${encodeURIComponent(userId)}${pageQuery(params)}`, { signal }, ); return normalizePage(data); }