import { Amount } from '../../../../commonStateTypes/amount'; import { FetchStateAndError, FetchedState, ID } from '../../../../commonStateTypes/common'; import { Address } from '../../../../entity/address/addressState'; import { ChargeCard } from '../../../../entity/chargeCard/chargeCard'; import { ClassBase } from '../../../../entity/class/classState'; import { User } from '../../../../entity/user/userState'; import { UserRole } from '../../../../entity/userRole/userRoleState'; import { ZeniDate } from '../../../../zeniDayJS'; import { SpendManagementUIState } from '../../billPay/billList/billListState'; import { ChargeCardPaymentMethod } from './chargeCardListPayload'; export interface ChargeCardWithUser extends ChargeCard { billingAddress: Address; cardCreatedByUser: User; cardHolderRoles: UserRole; cardHolderUser: User; department?: ClassBase; mailingAddress?: Address; } export interface ChargeCardWithUserAndShippingAddress extends ChargeCardWithUser { shippingAddress?: Address; } export interface ChargeCardListState extends FetchedState { bulkActionCardIds: ID[]; cardIds: ID[]; closeChargeCardsFetchState: FetchStateAndError; creditAccount: CreditAccount; creditAccountRepayment: CreditAccountRepayment; debitCardSummaries: DebitCardSummaries; lockChargeCardsFetchState: FetchStateAndError; resendCardInvite: ResendRevokeCardInvite; revokeCardInvite: ResendRevokeCardInvite; revokeChargeCardsInviteFetchState: FetchStateAndError; searchText: string; uiState: ChargeCardListUIState; unlockChargeCardsFetchState: FetchStateAndError; updateChargeCardsSpendLimitFetchState: FetchStateAndError; rowActionCardId?: ID; unAssignedCredits?: Amount; } export interface ResendRevokeCardInvite { saveStatus: FetchStateAndError; cardId?: ID; } export interface ChargeCardListUIState extends SpendManagementUIState { sortKey: ChargeCardViewSortKey; } export interface DebitCardSummaries extends FetchStateAndError { currentMonthSpends: Amount; lastCompletedMonthEndTime: ZeniDate; lastCompletedMonthSpends: Amount; lastCompletedMonthStartTime: ZeniDate; spendsPercentChange: number; } export interface CreditAccount extends FetchStateAndError { available: Amount; balance: Amount; hold: Amount; id: ID; limit: Amount; status: CreditAccountStatusType; cashback?: Amount; } export interface CreditAccountRepayment extends FetchStateAndError { creditAccountId: ID; currentBalance: Amount; initiatedRepayments: Amount; nextRepaymentDueDate: ZeniDate; providerCreditAccountId: ID; remainingAmountDue: Amount; remainingAmountOverdue: Amount; statementPeriodEnd: ZeniDate; statementPeriodStart: ZeniDate; initiatedRepaymentDate?: ZeniDate; paymentMethod?: ChargeCardPaymentMethod; } export declare const initialCreditAcc: CreditAccount; export declare const initialDebitCardSummaries: DebitCardSummaries; export declare const initialResendRevokeCardInvite: ResendRevokeCardInvite; export declare const initialCreditAccountRepayment: CreditAccountRepayment; export declare const toChargeCardSortKeyType: (v: string) => "status" | "department" | "accountType" | "owner" | "cardName" | "cardType" | "utilisation" | "limit"; export declare type ChargeCardViewSortKey = ReturnType; export declare const ALL_CASHBACK_SORT_KEYS: readonly ["month", "cashback"]; export declare const toCashbackSortKeyType: (v: string) => "month" | "cashback"; export declare type CashbackViewSortKey = ReturnType; export declare const toCreditAccountStatusType: (v: string) => "open" | "close"; export declare type CreditAccountStatusType = ReturnType;