import type { SupportedCurrencies } from './Contract' export type CreditCategory = | 'cancellation' | 'date_changes' | 'marketing' | 'other' export type CreditScopeOfUse = 'all_owned_houses' | 'only_one_house' export type CreditState = 'to_use' | 'used' export type Credit = { amount: string category: CreditCategory comment?: string contractId?: string createdAt: string createdBy: string currency: SupportedCurrencies houseId?: string id: string ownerFullName: string remainingAmount: number scopeOfUse: CreditScopeOfUse state: CreditState type: 'credit' updatedAt: string usedAmount: number userId?: string | { label: string; value: string } } export type CreditPayload = { credit: { amount: number category: CreditCategory comment?: string contract_id?: string currency?: SupportedCurrencies scope_of_use: CreditScopeOfUse house_id?: string user_id?: string state?: CreditState } }