import {BalanceInfo, BalanceTransaction} from "../types/balance";
import apiClient from "./apiClient";

const router = '/balance';
const balanceApi = {
    getTransactions: async (page: number): Promise<{ balanceTransactions: BalanceTransaction[] }> => {
        const response = await apiClient.get(`${router}/transactions`, {params: {page}});
        return response.data;
    },
    getBalanceInfo: async (): Promise<BalanceInfo> => {
        const response = await apiClient.get(`${router}/info`);
        return response.data;
    }
}

export default balanceApi;