12 lines
537 B
TypeScript
12 lines
537 B
TypeScript
import { apiRequest } from "@/shared/api/request";
|
|
import { API_ENDPOINTS, API_OPERATIONS, apiEndpointPath } from "@/shared/api/generated/endpoints";
|
|
import type { ApiPage, CoinLedgerEntryDto, PageQuery } from "@/shared/api/types";
|
|
|
|
export function listCoinLedger(query: PageQuery = {}): Promise<ApiPage<CoinLedgerEntryDto>> {
|
|
const endpoint = API_ENDPOINTS.listCoinLedger;
|
|
return apiRequest<ApiPage<CoinLedgerEntryDto>>(apiEndpointPath(API_OPERATIONS.listCoinLedger), {
|
|
method: endpoint.method,
|
|
query,
|
|
});
|
|
}
|