* Gets the threshold tier for a given balance. * Returns null if balance is above all thresholds.
(balance: number)
| 74 | * Returns null if balance is above all thresholds. |
| 75 | */ |
| 76 | function getThresholdTier(balance: number): number | null { |
| 77 | if (balance < LOW_CREDITS_THRESHOLD) return LOW_CREDITS_THRESHOLD |
| 78 | if (balance < MEDIUM_CREDITS_THRESHOLD) return MEDIUM_CREDITS_THRESHOLD |
| 79 | if (balance < HIGH_CREDITS_THRESHOLD) return HIGH_CREDITS_THRESHOLD |
| 80 | return null |
| 81 | } |
| 82 | |
| 83 | export interface AutoShowDecision { |
| 84 | shouldShow: boolean |
no outgoing calls
no test coverage detected