import type { Contract } from '@entities' import type { FilterType, HttpClient } from '@services' import { endpointMaker } from '@services' import type { ApiError, Response } from '@types' export type SignatoryOwnerContractInput = { houseId: string filters: FilterType } const getSignatoryOwnerContracts = (http: HttpClient) => { return { query: ( input: SignatoryOwnerContractInput, ): Promise< Response< Contract<{ serialized: true withRelationships: false attributeOptions: | 'checkInDate' | 'checkOutDate' | 'currencyTrigram' | 'houseName' | 'ownerPrice' }>[], undefined, ApiError > > => { const query = endpointMaker({ filter: input.filters }) return http.get( `v3/user/houses/${input.houseId}/signatory_owner_contracts${query}`, ) }, } } export default getSignatoryOwnerContracts