forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiB5fcd955Burak Boduroğlu2 months ago730 commits

getPaymentLedgerByUserId.ts14 lines, 458 bytesHistoryRawDownload
1import { client, normalizePage, pageQuery, type Page, type PageParams } from "../client";
2import type { PaymentLine } from "./types";
3
4export async function getPaymentLedgerByUserId(
5 userId: string,
6 params?: PageParams,
7 signal?: AbortSignal,
8): Promise<Page<PaymentLine>> {
9 const data = await client<unknown>(
10 `/payments/ledger/${encodeURIComponent(userId)}${pageQuery(params)}`,
11 { signal },
12 );
13 return normalizePage<PaymentLine>(data);
14}