UNPKG

@cranberry-money/shared-types

Version:

Shared TypeScript type definitions for Blueberry platform

74 lines 4.03 kB
import type { WITHDRAWAL_STATUS_PENDING_REVIEW, WITHDRAWAL_STATUS_APPROVED, WITHDRAWAL_STATUS_REJECTED, WITHDRAWAL_STATUS_PROCESSING, WITHDRAWAL_STATUS_AWAITING_LIQUIDATION, WITHDRAWAL_STATUS_LIQUIDATION_IN_PROGRESS, WITHDRAWAL_STATUS_COMPLETED, WITHDRAWAL_STATUS_CANCELLED, WITHDRAWAL_STATUS_FAILED, WITHDRAWAL_TYPE_FULL_CASH, WITHDRAWAL_TYPE_PARTIAL_CASH, WITHDRAWAL_REASON_INVESTMENT_STRATEGY, WITHDRAWAL_REASON_PERSONAL_EXPENSES, WITHDRAWAL_REASON_EMERGENCY, WITHDRAWAL_REASON_OTHER, LIQUIDATION_STATUS_PENDING, LIQUIDATION_STATUS_TRADES_CREATED, LIQUIDATION_STATUS_EXECUTED, LIQUIDATION_STATUS_SETTLED, LIQUIDATION_STATUS_FAILED } from '@cranberry-money/shared-constants'; export interface LiquidationProgress { total: number; pending: number; inProgress: number; completed: number; failed: number; completionRate: number; } export type SimpleWithdrawalStatus = typeof WITHDRAWAL_STATUS_PENDING_REVIEW | typeof WITHDRAWAL_STATUS_APPROVED | typeof WITHDRAWAL_STATUS_REJECTED | typeof WITHDRAWAL_STATUS_PROCESSING | typeof WITHDRAWAL_STATUS_AWAITING_LIQUIDATION | typeof WITHDRAWAL_STATUS_LIQUIDATION_IN_PROGRESS | typeof WITHDRAWAL_STATUS_COMPLETED | typeof WITHDRAWAL_STATUS_CANCELLED | typeof WITHDRAWAL_STATUS_FAILED; export type WithdrawalType = typeof WITHDRAWAL_TYPE_FULL_CASH | typeof WITHDRAWAL_TYPE_PARTIAL_CASH; export type WithdrawalReason = typeof WITHDRAWAL_REASON_INVESTMENT_STRATEGY | typeof WITHDRAWAL_REASON_PERSONAL_EXPENSES | typeof WITHDRAWAL_REASON_EMERGENCY | typeof WITHDRAWAL_REASON_OTHER; export type SimpleWithdrawalLiquidationStatus = typeof LIQUIDATION_STATUS_PENDING | typeof LIQUIDATION_STATUS_TRADES_CREATED | typeof LIQUIDATION_STATUS_EXECUTED | typeof LIQUIDATION_STATUS_SETTLED | typeof LIQUIDATION_STATUS_FAILED; export interface WithdrawalRequest { uuid: string; account: string; requestedBy: string; requestedAmount: string; withdrawalType: WithdrawalType; status: string; requestedDate: string; targetTradeSheet: string | null; reason: WithdrawalReason | null; createdAt: string; updatedAt: string; } export interface WithdrawalAssetLiquidation { uuid: string; withdrawalRequest: string; assetHolding: string; sharesToLiquidate: number; estimatedValue: string; targetCompletionDate: string | null; expectedSettlementDate: string | null; liquidationStatus: string; targetTrade: string | null; instrumentName: string; instrumentSymbol: string; instrumentCurrency: string | null; createdAt: string; updatedAt: string; } export type CreateWithdrawalRequest = Omit<WithdrawalRequest, 'uuid' | 'requestedBy' | 'status' | 'requestedDate' | 'createdAt' | 'updatedAt'>; export type UpdateWithdrawalRequest = Partial<Omit<WithdrawalRequest, 'uuid' | 'requestedBy' | 'requestedDate' | 'createdAt' | 'updatedAt'>>; export type CreateWithdrawalAssetLiquidation = Omit<WithdrawalAssetLiquidation, 'uuid' | 'instrumentName' | 'instrumentSymbol' | 'instrumentCurrency' | 'createdAt' | 'updatedAt'>; export type UpdateWithdrawalAssetLiquidation = Partial<Omit<WithdrawalAssetLiquidation, 'uuid' | 'instrumentName' | 'instrumentSymbol' | 'instrumentCurrency' | 'createdAt' | 'updatedAt'>>; export interface WithdrawalRequestQueryParams { account?: string; status?: string; withdrawal_type?: string; start_date?: string; end_date?: string; min_amount?: string; max_amount?: string; order_by?: string; page?: number; page_size?: number; } export interface WithdrawalAssetLiquidationQueryParams { withdrawal_request?: string; asset_holding?: string; liquidation_status?: string; target_completion_start_date?: string; target_completion_end_date?: string; expected_settlement_start_date?: string; expected_settlement_end_date?: string; target_trade?: string; min_value?: string; max_value?: string; order_by?: string; page?: number; page_size?: number; } //# sourceMappingURL=withdrawal.d.ts.map