import type { Contract } from '@entities' import type { HttpClient } from '@services' import type { ApiError, Response } from '@types' export type ContractByIdInput = { contractId: string } const getContractById = (http: HttpClient) => { return { query: ( input: ContractByIdInput, ): Promise< Response< Contract<{ serialized: true; attributeType: 'contract' }>, undefined, ApiError > > => { return http.get(`v1/owner_contracts/${input.contractId}`) }, } } export default getContractById