sg-delivery-customer/app/api/customerDetailsApi.ts

19 lines
553 B
TypeScript

import {
CustomerResponse,
WalletResponse,
WalletTransaction,
} from '@interfaces';
import { apiClient } from '@services';
export const getCustomerDetails = async () => {
return await apiClient.get<CustomerResponse>('/customers/profile');
};
export const getWalletDetails = async (): Promise<WalletResponse> => {
return await apiClient.get<WalletResponse>('/wallets/balance');
};
export const getWalletTransactions = async (): Promise<WalletTransaction[]> => {
return await apiClient.get<WalletTransaction[]>('/wallets/transactions');
};