From 354452de059d72be261306bdb9efc708aa06779c Mon Sep 17 00:00:00 2001 From: Lokesh Jain Date: Mon, 15 Jan 2024 16:04:53 +0530 Subject: [PATCH] refactor: cleanup routing typs --- src/screens/HyperSwitch/Routing/RoutingTypes.res | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/screens/HyperSwitch/Routing/RoutingTypes.res b/src/screens/HyperSwitch/Routing/RoutingTypes.res index 8f2de9636..4852ee162 100644 --- a/src/screens/HyperSwitch/Routing/RoutingTypes.res +++ b/src/screens/HyperSwitch/Routing/RoutingTypes.res @@ -2,6 +2,9 @@ type routingType = SINGLE | PRIORITY | VOLUME_SPLIT | ADVANCED | COST | DEFAULTF type formState = CreateConfig | EditConfig | ViewConfig type status = ACTIVE | APPROVED | PENDING | REJECTED type pageState = Preview | Create | Edit +type variantType = Number | Enum_variant | Metadata_value | String_value | UnknownVariant(string) +type logicalOperator = AND | OR | UnknownLogicalOperator(string) +type val = StringArray(array) | String(string) | Int(int) type historyColType = | Name @@ -32,10 +35,6 @@ type operator = | NOT_EQUAL_TO | UnknownOperator(string) -type variantType = Number | Enum_variant | Metadata_value | String_value | UnknownVariant(string) -type logicalOperator = AND | OR | UnknownLogicalOperator(string) -type val = StringArray(array) | String(string) | Int(int) - type modalValue = {conType: string, conText: React.element} type routingValueType = {heading: string, subHeading: string} type modalObj = (routingType, string) => modalValue @@ -46,11 +45,13 @@ type wasmModule = { getAllConnectors: unit => array, getVariantValues: string => array, } + type gateway = { distribution: int, disableFallback: bool, gateway_name: string, } + type volumeDistribution = { connector: string, split: int, @@ -63,12 +64,15 @@ type condition = { value: val, logicalOperator: logicalOperator, } + type routingOutputType = {override_3ds: string} + type rule = { gateways: array, conditions: array, routingOutput?: routingOutputType, } + type ruleInfoType = { rules: array, default_gateways: array, @@ -85,6 +89,7 @@ type historyData = { } type value = {"type": Js.Json.t, "value": Js.Json.t} + type payloadCondition = { lhs: string, comparison: string,