import httpService from '../../core/services/http.service' ; export interface UsageResponse { _id : string ; total : number ; } export async function fetchUsage ( ) { return httpService . get ( '/api/usage' ) ; } function getUsagePercent ( usage , limit ) { return Math . ceil ( ( usage / limit ) * 100 ) ; } const usageService = { fetchUsage , getUsagePercent , } ; export default usageService ;