({id}: RuleV2)
| 78 | } |
| 79 | |
| 80 | const getRuleType = ({id}: RuleV2): RuleType | undefined => { |
| 81 | const RESERVED_IDS = { |
| 82 | 1000: RuleType.BOOST_LOW_VOLUME_PROJECTS, |
| 83 | 1001: RuleType.BOOST_ENVIRONMENTS, |
| 84 | 1002: RuleType.IGNORE_HEALTH_CHECKS, |
| 85 | 1003: RuleType.BOOST_KEY_TRANSACTIONS, |
| 86 | 1004: RuleType.RECALIBRATION_RULE, |
| 87 | 1005: RuleType.BOOST_REPLAY_ID, |
| 88 | 1006: RuleType.MINIMUM_SAMPLE_RATE_TARGET, |
| 89 | }; |
| 90 | |
| 91 | if (id in RESERVED_IDS) { |
| 92 | // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message |
| 93 | return RESERVED_IDS[id]; |
| 94 | } |
| 95 | if (id >= 1400 && id < 1500) { |
| 96 | return RuleType.REBALANCE_TRANSACTIONS; |
| 97 | } |
| 98 | if (id >= 1500 && id < 1600) { |
| 99 | return RuleType.BOOST_LATEST_RELEASES; |
| 100 | } |
| 101 | if (id >= 3000 && id < 5000) { |
| 102 | return RuleType.INVESTIGATION_RULE; |
| 103 | } |
| 104 | |
| 105 | return undefined; |
| 106 | }; |
| 107 | |
| 108 | function getStringifiedCondition(condition: Record<string, any>): string { |
| 109 | const inner = Array.isArray(condition.inner) ? condition.inner : [condition.inner]; |
no outgoing calls
no test coverage detected