import type { Area } from '@entities' import { endpointMaker } from '@services' import type { FilterType, HttpClient } from '@services' import type { ApiError, Response } from '@types' type GetAreasInput = { houseId: string areaGroupId: string included?: { filter?: FilterType pagination: { per: string; page: string } } } const getAreas = (http: HttpClient) => ({ query: ( input: GetAreasInput, ): Promise> => { const query = endpointMaker({ filter: input.included?.filter, pagination: input?.included?.pagination, }) return http.get( `v3/admin/houses/${input.houseId}/area_groups/${input.areaGroupId}/areas${query}`, ) }, }) export default getAreas