import type { AdminUser, Comment } from '@entities' import type { FilterType, HttpClient, IncludeType } from '@services' import { endpointMaker } from '@services' import type { ApiError, Response } from '@types' export type GetCommentInput = { contractId: string include?: IncludeType filter?: FilterType pagination?: { per: string; page: string } } const getComments = (http: HttpClient) => ({ query: ( input: GetCommentInput, ): Promise> => { const query = endpointMaker({ includes: input.include, filter: input.filter, pagination: input.pagination, }) return http.get(`v3/admin/contracts/${input.contractId}/comments${query}`) }, }) export default getComments