import type { ClientReceipt } from '@entities' import type { HttpClient } from '@services' import type { ApiError, Response } from '@types' export type CreateClientReceipByContractIdInput = { contractId: string receipt: { address: string city: string comment?: string company_name?: string country: string deductible_vat: boolean first_name: string last_name: string owner_vat_amount: number owner_vat_attachment: File payment_transaction_ids: string[] zip_code: string } } const createClientReceipByContractId = (http: HttpClient) => ({ query: ( input: CreateClientReceipByContractIdInput, ): Promise> => { return http.post( `v3/admin/contracts/${input.contractId}/client_receipts`, { ...input.receipt }, { headers: { 'Content-Type': 'multipart/form-data' }, responseType: 'blob', }, ) }, }) export default createClientReceipByContractId