repo
stringclasses
4 values
file_path
stringlengths
6
193
extension
stringclasses
23 values
content
stringlengths
0
1.73M
token_count
int64
0
724k
__index_level_0__
int64
0
10.8k
hyperswitch-control-center
src/screens/UserManagement/UserRevamp/InviteMember.res
.res
@react.component let make = (~isInviteUserFlow=true, ~setNewRoleSelected=_ => ()) => { open APIUtils open LogicUtils let getURL = useGetURL() let updateDetails = useUpdateMethod() let showToast = ToastState.useShowToast() let {email} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom let (l...
1,337
9,521
hyperswitch-control-center
src/screens/UserManagement/UserRevamp/ListRolesTableEntity.res
.res
open LogicUtils type rolesTableTypes = { role_name: string, role_scope: string, groups: array<JSON.t>, entity_name: string, } type rolesColTypes = | RoleName | RoleScope | EntityType | RoleGroupAccess let defaultColumnsForRoles = [RoleName, EntityType, RoleGroupAccess] let itemToObjMapperForRoles = ...
497
9,522
hyperswitch-control-center
src/screens/UserManagement/UserRevamp/UserUtils.res
.res
let getMerchantSelectBoxOption = ( ~label, ~value, ~dropdownList: array<OMPSwitchTypes.ompListTypes>, ~showAllSelection=false, ) => { let allOptions: SelectBox.dropdownOption = { label, value, customRowClass: "!border-b py-2", textColor: "font-semibold", } let orgOptions = dropdownList...
1,861
9,523
hyperswitch-control-center
src/screens/UserManagement/UserRevamp/ListRoles.res
.res
@react.component let make = () => { open APIUtils open ListRolesTableEntity let getURL = useGetURL() let fetchDetails = useGetMethod() let (screenStateRoles, setScreenStateRoles) = React.useState(_ => PageLoaderWrapper.Loading) let (rolesAvailableData, setRolesAvailableData) = React.useState(_ => []) let ...
736
9,524
hyperswitch-control-center
src/screens/UserManagement/UserRevamp/GroupAccessUtils.res
.res
open CommonAuthTypes let linkForGetShowLinkViaAccess = (~authorization, ~url) => { authorization === Access ? url : `` } let cursorStyles = authorization => authorization === Access ? "cursor-pointer" : "cursor-not-allowed"
54
9,525
hyperswitch-control-center
src/screens/UserManagement/UserRevamp/CreateCustomRole.res
.res
module RenderCustomRoles = { @react.component let make = (~heading, ~description, ~groupName) => { let groupsInput = ReactFinalForm.useField(`groups`).input let groupsAdded = groupsInput.value->LogicUtils.getStrArryFromJson let (checkboxSelected, setCheckboxSelected) = React.useState(_ => groupsAd...
1,641
9,526
hyperswitch-control-center
src/screens/UserManagement/UserRevamp/UserManagementLanding.res
.res
@react.component let make = () => { let tabList: array<Tabs.tab> = [ { title: "Users", renderContent: () => <ListUsers />, }, { title: "Roles", renderContent: () => <ListRoles />, }, ] <div className="flex flex-col"> <div className="flex justify-between items-center"> ...
197
9,527
hyperswitch-control-center
src/screens/UserManagement/UserRevamp/ListUsers.res
.res
open ListUserTableEntity @react.component let make = () => { open APIUtils open LogicUtils let getURL = useGetURL() let fetchDetails = useGetMethod() let mixpanelEvent = MixpanelHook.useSendEvent() let {checkUserEntity} = React.useContext(UserInfoProvider.defaultContext) let {userHasAccess} = GroupACLHoo...
1,010
9,528
hyperswitch-control-center
src/screens/UserManagement/UserRevamp/DropdownWithLoading.res
.res
open HeadlessUI type dropDownState = Loading | Success | NoData let commonDropdownCss = "absolute md:max-h-36 md:min-h-fit overflow-scroll z-30 w-full bg-white rounded-sm shadow-lg focus:outline-none my-1 border border-jp-gray-lightmode_steelgray border-opacity-75 ring-1 ring-black ring-opacity-5" module DropDownI...
1,283
9,529
hyperswitch-control-center
src/screens/UserManagement/UserRevamp/UserManagementTypes.res
.res
type userManagementTypes = UsersTab | RolesTab type internalUserType = InternalViewOnly | InternalAdmin | NonInternal type admin = TenantAdmin | NonTenantAdmin @unboxed type groupAccessType = | OperationsView | OperationsManage | ConnectorsView | ConnectorsManage | WorkflowsView | WorkflowsManage | Ana...
575
9,530
hyperswitch-control-center
src/screens/UserManagement/UserRevamp/UserManagementHelper.res
.res
open UserUtils module OrganisationSelection = { @react.component let make = () => { let showToast = ToastState.useShowToast() let internalSwitch = OMPSwitchHooks.useInternalSwitch() let orgList = Recoil.useRecoilValueFromAtom(HyperswitchAtom.orgListAtom) let {userInfo: {userEntity}} = React.useCont...
2,347
9,531
hyperswitch-control-center
src/screens/Customers/CustomersEntity.res
.res
open CustomersType let defaultColumns = [ CustomerId, Name, Email, PhoneCountryCode, Phone, Description, Address, CreatedAt, ] let allColumns = [CustomerId, Name, Email, Phone, PhoneCountryCode, Description, Address, CreatedAt] let getHeading = colType => { switch colType { | CustomerId => Table....
620
9,532
hyperswitch-control-center
src/screens/Customers/ShowCustomers.res
.res
module CustomerInfo = { open CustomersEntity module Details = { @react.component let make = ( ~data, ~getHeading, ~getCell, ~excludeColKeys=[], ~detailsFields, ~justifyClassName="justify-start", ~widthClass="w-1/4", ~bgColor="bg-white dark:bg-jp-gray-lightgray...
1,161
9,533
hyperswitch-control-center
src/screens/Customers/Customers.res
.res
@react.component let make = () => { open APIUtils open CustomersEntity let getURL = useGetURL() let fetchDetails = useGetMethod() let (screenState, setScreenState) = React.useState(_ => PageLoaderWrapper.Loading) let (customersData, setCustomersData) = React.useState(_ => []) let pageDetailDict = Recoil.u...
629
9,534
hyperswitch-control-center
src/screens/Customers/CustomersType.res
.res
type customers = { customer_id: string, name: string, email: string, phone: string, phone_country_code: string, description: string, address: string, created_at: string, metadata: JSON.t, } type customersColsType = | CustomerId | Name | Email | Phone | PhoneCountryCode | Description | A...
96
9,535
hyperswitch-control-center
src/screens/Recon/Recon.res
.res
@react.component let make = () => { open APIUtils let getURL = useGetURL() let (redirectToken, setRedirecToken) = React.useState(_ => "") let fetchDetails = useGetMethod() let updateDetails = useUpdateMethod() let showToast = ToastState.useShowToast() let fetchMerchantAccountDetails = MerchantDetailsHook....
1,437
9,536
hyperswitch-control-center
src/screens/Recon/ReconUtils.res
.res
open ReconTypes let getAuthStatusFromMessage = authStatus => switch authStatus { | "LoggedOut" => IframeLoggedOut | _ => IframeLoggedIn } let getEventTypeFromString = eventTypeString => switch eventTypeString { | "AuthenticationStatus" | _ => AuthenticationStatus }
70
9,537
hyperswitch-control-center
src/screens/Recon/ReconTypes.res
.res
type authStatus = IframeLoggedIn | IframeLoggedOut type eventType = AuthenticationStatus
19
9,538
hyperswitch-control-center
src/screens/Recon/ReconModule.res
.res
@react.component let make = (~urlList) => { open APIUtils open LogicUtils let getURL = useGetURL() let handleLogout = useHandleLogout() let fetchDetails = useGetMethod() let (redirectToken, setRedirectToken) = React.useState(_ => "") let (screenState, setScreenState) = React.useState(_ => PageLoaderWrapp...
1,027
9,539
hyperswitch-control-center
src/screens/SetupAccount/HSwitchSetupAccountUtils.res
.res
type stepCounterTypes = [ | #INITIALIZE | #CONNECTORS_CONFIGURED | #ROUTING_ENABLED | #GENERATE_SAMPLE_DATA | #COMPLETED ] let delayTime = 2000 let listOfStepCounter: array<stepCounterTypes> = [ #INITIALIZE, #CONNECTORS_CONFIGURED, #ROUTING_ENABLED, #GENERATE_SAMPLE_DATA, #COMPLETED, ] let constr...
855
9,540
hyperswitch-control-center
src/screens/SetupAccount/HSwitchSetupAccount.res
.res
@react.component let make = () => { open HSwitchSetupAccountUtils open APIUtils open HyperSwitchUtils let updateDetails = useUpdateMethod(~showErrorToast=false) let finalTickLottieFile = LottieFiles.useLottieJson("FinalTick.json") let (stepCounter, setStepCounter) = React.useState(_ => #INITIALIZE) let fe...
1,131
9,541
hyperswitch-control-center
src/screens/Home/Home.res
.res
@react.component let make = (~setAppScreenState) => { open HomeUtils open PageUtils let greeting = getGreeting() let {userInfo: {recoveryCodesLeft}} = React.useContext(UserInfoProvider.defaultContext) let recoveryCode = recoveryCodesLeft->Option.getOr(0) <> <div className="flex flex-col gap-4"> <...
216
9,542
hyperswitch-control-center
src/screens/Home/HomeUtils.res
.res
open CardUtils open PageUtils open HSwitchUtils let headingStyle = `${getTextClass((P2, Medium))} text-grey-700 uppercase opacity-50 px-2` let paragraphTextVariant = `${getTextClass((P2, Medium))} text-grey-700 opacity-50` let subtextStyle = `${getTextClass((P1, Regular))} text-grey-700 opacity-50` let cardHeaderText ...
2,841
9,543
hyperswitch-control-center
src/screens/Home/ProdIntent/ProdVerifyModal.res
.res
open ProdVerifyModalUtils open CardUtils @react.component let make = ( ~showModal, ~setShowModal, ~initialValues=Dict.make(), ~getProdVerifyDetails, ~productType: ProductTypes.productTypes, ) => { open APIUtils let getURL = useGetURL() let updateDetails = useUpdateMethod() let showToast = ToastState....
904
9,544
hyperswitch-control-center
src/screens/Home/ProdIntent/ProdIntentForm.res
.res
@react.component let make = (~isFromMilestoneCard=false, ~productType: ProductTypes.productTypes) => { open APIUtils open ProdVerifyModalUtils open CommonAuthHooks let fetchDetails = useGetMethod() let getURL = useGetURL() let {email} = useCommonAuthInfo()->Option.getOr(defaultAuthInfo) let {showProdInten...
426
9,545
hyperswitch-control-center
src/screens/Home/ProdIntent/ProdVerifyModalUtils.res
.res
let errorClass = "text-sm leading-4 font-medium text-start ml-1 mt-2" type prodFormColumnType = | POCemail | IsCompleted | BusinessName | Country | Website | POCName let getStringFromVariant = key => { switch key { | POCemail => "poc_email" | IsCompleted => "is_completed" | BusinessName => "legal_...
1,272
9,546
hyperswitch-control-center
src/screens/AlternatePaymentMethods/AltPaymentMethodsUtils.res
.res
open AltPaymentMethodsType let alternatePaymentConfiguration = [ { heading: "Enable Connectors & APMs", description: <span> {"Connect to your preferred payment providers and activate options like PayPal, Apple Pay, and other popular alternate payment methods."->React.string} </span>, buttonText:...
864
9,547
hyperswitch-control-center
src/screens/AlternatePaymentMethods/AltPaymentMethodsType.res
.res
type actionType = | InternalRoute(string) | ExternalLink({url: string, trackingEvent: string}) type altConfigureStep = { heading: string, description: React.element, action: actionType, buttonText: string, }
53
9,548
hyperswitch-control-center
src/screens/AlternatePaymentMethods/AltPaymentMethods.res
.res
@react.component let make = () => { open PageUtils open AltPaymentMethodsUtils <div className="flex flex-1 flex-col gap-8 w-5/6 h-screen"> <PageHeading customHeadingStyle="gap-2 flex flex-col " title="Alternate Payment Methods" customTitleStyle="text-2xl text-center font-bold text-nd_gray-7...
279
9,549
hyperswitch-control-center
src/screens/Routing/RoutingStack.res
.res
open APIUtils @react.component let make = (~remainingPath, ~previewOnly=false) => { let getURL = useGetURL() let fetchDetails = useGetMethod() let url = RescriptReactRouter.useUrl() let pathVar = url.path->List.toArray->Array.joinWith("/") let (records, setRecords) = React.useState(_ => []) let (activeRout...
1,266
9,550
hyperswitch-control-center
src/screens/Routing/RoutingTypes.res
.res
type routingType = VOLUME_SPLIT | ADVANCED | DEFAULTFALLBACK | NO_ROUTING type formState = CreateConfig | EditConfig | ViewConfig | EditReplica type status = ACTIVE | APPROVED | PENDING | REJECTED type pageState = Preview | Create | Edit type variantType = Number | Enum_variant | Metadata_value | String_value | Unknown...
819
9,551
hyperswitch-control-center
src/screens/Routing/RoutingUtils.res
.res
open RoutingTypes open LogicUtils external toWasm: Dict.t<JSON.t> => wasmModule = "%identity" let defaultThreeDsObjectValue: routingOutputType = { override_3ds: "three_ds", } let currentTimeInUTC = Js.Date.fromFloat(Date.now())->Js.Date.toUTCString let getCurrentUTCTime = () => { let currentDate = Date.now()->Js.D...
2,154
9,552
hyperswitch-control-center
src/screens/Routing/CustomModal.res
.res
module RoutingCustomModal = { @react.component let make = ( ~showModal, ~setShowModal, ~cancelButton, ~submitButton, ~headingText, ~subHeadingText, ~leftIcon, ~iconSize=25, ) => { <Modal showModal setShowModal modalClass="w-full md:w-4/12 mx-auto my-auto borde...
305
9,553
hyperswitch-control-center
src/screens/Routing/BasicDetailsForm.res
.res
open FormRenderer open RoutingTypes open LogicUtils let configurationNameInput = makeFieldInfo( ~label="Configuration Name", ~name="name", ~isRequired=true, ~placeholder="Enter Configuration Name", ~customInput=InputFields.textInput(~autoFocus=true), ) let descriptionInput = makeFieldInfo( ~label="Descript...
1,302
9,554
hyperswitch-control-center
src/screens/Routing/HistoryEntity.res
.res
open LogicUtils open RoutingUtils open RoutingTypes let allColumns: array<historyColType> = [Name, Type, Description, Created, LastUpdated, Status] let itemToObjMapper = dict => { { id: getString(dict, "id", ""), name: getString(dict, "name", ""), profile_id: getString(dict, "profile_id", ""), kind:...
653
9,555
hyperswitch-control-center
src/screens/Routing/RoutingConfigure.res
.res
open RoutingTypes open RoutingUtils @react.component let make = (~routingType) => { open LogicUtils let baseUrlForRedirection = "/routing" let url = RescriptReactRouter.useUrl() let (currentRouting, setCurrentRouting) = React.useState(() => NO_ROUTING) let (id, setId) = React.useState(() => None) let (isAct...
484
9,556
hyperswitch-control-center
src/screens/Routing/History.res
.res
open HistoryEntity module HistoryTable = { @react.component let make = (~records, ~activeRoutingIds: array<string>) => { let {userHasAccess} = GroupACLHooks.useUserGroupACLHook() let (offset, setOffset) = React.useState(_ => 0) <LoadedTable title="History" hideTitle=true actualData=re...
283
9,557
hyperswitch-control-center
src/screens/Routing/ActiveRouting.res
.res
open RoutingTypes open RoutingUtils type viewType = Loading | Error(string) | Loaded module TopLeftIcons = { @react.component let make = (~routeType: routingType) => { switch routeType { | DEFAULTFALLBACK => <Icon name="fallback" size=25 className="w-11" /> | VOLUME_SPLIT => <Icon name="processorLevel"...
1,578
9,558
hyperswitch-control-center
src/screens/Routing/AdvancedRouting/RulePreviewer.res
.res
open RoutingTypes open AdvancedRoutingUtils module GatewayView = { @react.component let make = (~gateways) => { let url = RescriptReactRouter.useUrl() let connectorType: ConnectorTypes.connectorTypeVariants = switch url->RoutingUtils.urlToVariantMapper { | PayoutRouting => ConnectorTypes.PayoutProcess...
1,931
9,559
hyperswitch-control-center
src/screens/Routing/AdvancedRouting/AdvancedRoutingUtils.res
.res
let operatorTypeToStringMapper = (operator: RoutingTypes.operator) => { switch operator { | CONTAINS => "CONTAINS" | NOT_CONTAINS => "NOT_CONTAINS" | IS => "IS" | IS_NOT => "IS_NOT" | GREATER_THAN => "GREATER THAN" | LESS_THAN => "LESS THAN" | EQUAL_TO => "EQUAL TO" | NOT_EQUAL_TO => "NOT EQUAL_TO" ...
3,023
9,560
hyperswitch-control-center
src/screens/Routing/AdvancedRouting/AdvancedRouting.res
.res
open APIUtils open RoutingTypes open AdvancedRoutingUtils open LogicUtils external toWasm: Dict.t<JSON.t> => RoutingTypes.wasmModule = "%identity" module Add3DSCondition = { @react.component let make = (~isFirst, ~id, ~isExpanded, ~threeDsType) => { let classStyle = "flex justify-center relative py-2 h-fit mi...
7,389
9,561
hyperswitch-control-center
src/screens/Routing/AdvancedRouting/AdvancedRoutingUIUtils.res
.res
open AdvancedRoutingUtils open FormRenderer module LogicalOps = { @react.component let make = (~id) => { let {globalUIConfig: {font: {textColor}}} = React.useContext(ThemeProvider.themeContext) let logicalOpsInput = ReactFinalForm.useField(`${id}.logical`).input React.useEffect(() => { if logica...
4,470
9,562
hyperswitch-control-center
src/screens/Routing/AdvancedRouting/AddRuleGateway.res
.res
external anyToEnum: 'a => RoutingTypes.connectorSelectionData = "%identity" @react.component let make = (~id, ~gatewayOptions, ~isFirst=false, ~isExpanded) => { let url = RescriptReactRouter.useUrl() let gateWaysInput = ReactFinalForm.useField(`${id}.connectorSelection.data`).input let gateWaysType = ReactFinalF...
2,014
9,563
hyperswitch-control-center
src/screens/Routing/AdvancedRouting/DuplicateAndEditUtils.res
.res
let getIsDistributed = distributedType => distributedType === "volume_split" let getConditionValue = (conditionArray, manipulatedStatementsArray, statementIndex) => { open LogicUtils let manipuatedConditionArray = conditionArray->Array.mapWithIndex(( eachContent, conditionIndex, ) => { let condition...
798
9,564
hyperswitch-control-center
src/screens/Routing/DefaultRouting/DefaultRouting.res
.res
open APIUtils open MerchantAccountUtils @react.component let make = (~urlEntityName, ~baseUrlForRedirection, ~connectorVariant) => { open LogicUtils let getURL = useGetURL() let updateDetails = useUpdateMethod() let fetchDetails = useGetMethod() let showPopUp = PopUpState.useShowPopUp() let businessProfile...
1,712
9,565
hyperswitch-control-center
src/screens/Routing/VolumeSplitRouting/VolumeSplitRouting.res
.res
open APIUtils open RoutingTypes open VolumeSplitRoutingPreviewer open LogicUtils module VolumeRoutingView = { open RoutingUtils @react.component let make = ( ~setScreenState, ~routingId, ~pageState, ~setPageState, ~connectors: array<ConnectorTypes.connectorPayload>, ~isActive, ~profil...
2,855
9,566
hyperswitch-control-center
src/screens/Routing/VolumeSplitRouting/VolumeSplitRoutingPreviewer.res
.res
open RoutingTypes module GatewayView = { @react.component let make = (~gateways, ~connectorList=?) => { let {globalUIConfig: {font: {textColor}}} = React.useContext(ThemeProvider.themeContext) let getGatewayName = name => { switch connectorList { | Some(list) => (list->ConnectorTableUti...
348
9,567
hyperswitch-control-center
src/screens/TransactionViews/TransactionViewTypes.res
.res
type operationsTypes = Orders | Refunds | Disputes type viewTypes = All | Succeeded | Failed | Dropoffs | Cancelled | Pending | None
34
9,568
hyperswitch-control-center
src/screens/TransactionViews/TransactionView.res
.res
module TransactionViewCard = { @react.component let make = (~view, ~count="", ~onViewClick, ~isActiveView) => { open TransactionViewUtils let textClass = isActiveView ? "text-primary" : "font-semibold text-jp-gray-700" let countTextClass = isActiveView ? "text-primary" : "font-semibold text-jp-gray-900...
1,157
9,569
hyperswitch-control-center
src/screens/TransactionViews/TransactionViewUtils.res
.res
open TransactionViewTypes let paymentViewsArray: array<viewTypes> = [All, Succeeded, Failed, Dropoffs, Cancelled] let refundViewsArray: array<viewTypes> = [All, Succeeded, Failed, Pending] let disputeViewsArray: array<viewTypes> = [All, Succeeded, Failed, Pending] let getCustomFilterKey = entity => switch entity ...
754
9,570
hyperswitch-control-center
src/screens/ConnectorV2/PaymentProcessorSummary.res
.res
type connectorSummarySection = AuthenticationKeys | Metadata | PMTs @react.component let make = (~baseUrl, ~showProcessorStatus=true, ~topPadding="p-6") => { open ConnectorUtils open LogicUtils open APIUtils open PageLoaderWrapper let (currentActiveSection, setCurrentActiveSection) = React.useState(_ => None)...
2,805
9,571
hyperswitch-control-center
src/screens/NewAnalytics/NewAnalyticsContainerUtils.res
.res
open NewAnalyticsTypes let getPageVariant = string => { switch string { | "new-analytics-smart-retry" => NewAnalyticsSmartRetry | "new-analytics-refund" => NewAnalyticsRefund | "new-analytics-payment" | _ => NewAnalyticsPayment } } let getPageIndex = (url: RescriptReactRouter.url) => { switch url.path->HS...
821
9,572
hyperswitch-control-center
src/screens/NewAnalytics/NewAnalyticsHelper.res
.res
let tableBorderClass = "border-2 border-solid border-jp-gray-940 border-collapse border-opacity-30 dark:border-jp-gray-dark_table_border_color dark:border-opacity-30" module Card = { @react.component let make = (~children) => { <div className={`h-full flex flex-col justify-between border rounded-lg dark:...
2,843
9,573
hyperswitch-control-center
src/screens/NewAnalytics/NewAnalyticsUtils.res
.res
// colors let redColor = "#BA3535" let blue = "#1059C1B2" let green = "#0EB025B2" let barGreenColor = "#7CC88F" let sankyBlue = "#E4EFFF" let sankyRed = "#F7E0E0" let sankyLightBlue = "#91B7EE" let sankyLightRed = "#EC6262" open NewAnalyticsTypes let globalFilter: array<filters> = [#currency] let globalExcludeValue = ...
4,801
9,574
hyperswitch-control-center
src/screens/NewAnalytics/NewAnalyticsTypes.res
.res
type analyticsPages = Payment type viewType = Graph | Table type statisticsDirection = Upward | Downward | No_Change type analyticsPagesRoutes = | @as("new-analytics-payment") NewAnalyticsPayment | @as("new-analytics-smart-retry") NewAnalyticsSmartRetry | @as("new-analytics-refund") NewAnalyticsRefund type doma...
661
9,575
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/NewPaymentAnalyticsUtils.res
.res
open LogicUtils let getColor = index => { open NewAnalyticsUtils [blue, green]->Array.get(index)->Option.getOr(blue) } let getAmountValue = (data, ~id) => { switch data->getOptionFloat(id) { | Some(value) => value /. 100.0 | _ => 0.0 } } let getLineGraphObj = ( ~array: array<JSON.t>, ~key: string, ...
468
9,576
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/NewPaymentAnalyticsEntity.res
.res
open NewAnalyticsTypes // OverView section let overviewSectionEntity: moduleEntity = { requestBodyConfig: { delta: true, metrics: [], }, title: "OverView Section", domain: #payments, } // Payments Lifecycle let paymentsLifeCycleEntity: moduleEntity = { requestBodyConfig: { delta: false, metri...
951
9,577
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/NewPaymentAnalytics.res
.res
@react.component let make = () => { open NewPaymentAnalyticsEntity let {newAnalyticsFilters} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom <div className="flex flex-col gap-14 mt-5 pt-7"> <div className="flex gap-2"> <NewAnalyticsHelper.SmartRetryToggle /> <RenderIf condition={...
279
9,578
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/PaymentsProcessed/PaymentsProcessedTypes.res
.res
type paymentsProcessedCols = | Payment_Processed_Amount | Payment_Processed_Count | Total_Payment_Processed_Amount | Total_Payment_Processed_Count | Time_Bucket type responseKeys = [ | #payment_processed_amount | #payment_processed_amount_in_usd | #payment_processed_amount_without_smart_retrie | #pay...
226
9,579
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/PaymentsProcessed/PaymentsProcessedUtils.res
.res
open PaymentsProcessedTypes open LogicUtils let getStringFromVariant = value => { switch value { | Payment_Processed_Amount => "payment_processed_amount" | Payment_Processed_Count => "payment_processed_count" | Total_Payment_Processed_Amount => "total_payment_processed_amount" | Total_Payment_Processed_Count...
2,014
9,580
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/PaymentsProcessed/PaymentsProcessed.res
.res
open NewAnalyticsTypes open NewAnalyticsHelper open NewPaymentAnalyticsEntity open PaymentsProcessedUtils open NewPaymentAnalyticsUtils module TableModule = { open LogicUtils open PaymentsProcessedTypes @react.component let make = (~data, ~className="") => { let (offset, setOffset) = React.useState(_ => 0) ...
2,632
9,581
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/PaymentsOverviewSection/NewPaymentsOverviewSectionHelper.res
.res
module SmartRetryCard = { open NewAnalyticsHelper open NewPaymentsOverviewSectionTypes open NewPaymentsOverviewSectionUtils open NewAnalyticsUtils @react.component let make = (~responseKey: overviewColumns, ~data) => { open LogicUtils let {filterValueJson} = React.useContext(FilterContext.filterCont...
429
9,582
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/PaymentsOverviewSection/NewPaymentsOverviewSectionUtils.res
.res
open NewPaymentsOverviewSectionTypes let getStringFromVariant = value => { switch value { | Total_Smart_Retried_Amount => "total_smart_retried_amount" | Total_Success_Rate => "total_success_rate" | Total_Payment_Processed_Amount => "total_payment_processed_amount" | Total_Refund_Processed_Amount => "total_re...
1,191
9,583
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/PaymentsOverviewSection/NewPaymentsOverviewSectionTypes.res
.res
type overviewColumns = | Total_Smart_Retried_Amount | Total_Success_Rate | Total_Payment_Processed_Amount | Total_Refund_Processed_Amount | Total_Dispute type responseKeys = [ | #total_smart_retried_amount | #total_smart_retried_amount_in_usd | #total_smart_retried_amount_without_smart_retries | #tot...
247
9,584
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/PaymentsOverviewSection/NewPaymentsOverviewSection.res
.res
open NewAnalyticsTypes open NewPaymentsOverviewSectionTypes @react.component let make = (~entity: moduleEntity) => { open NewPaymentsOverviewSectionUtils open LogicUtils open APIUtils open NewAnalyticsHelper open NewAnalyticsUtils let getURL = useGetURL() let updateDetails = useUpdateMethod() let (data,...
1,698
9,585
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/FailureReasonsPayments/FailureReasonsPaymentsTypes.res
.res
type failreResonsColsTypes = | Error_Reason | Failure_Reason_Count | Reasons_Count_Ratio | Total_Failure_Reasons_Count | Connector | Payment_Method | Payment_Method_Type | Authentication_Type type failreResonsObjectType = { error_reason: string, failure_reason_count: int, total_failure_reasons_co...
120
9,586
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/FailureReasonsPayments/FailureReasonsPaymentsUtils.res
.res
open NewAnalyticsTypes open FailureReasonsPaymentsTypes open LogicUtils let getStringFromVariant = value => { switch value { | Error_Reason => "error_reason" | Failure_Reason_Count => "failure_reason_count" | Reasons_Count_Ratio => "reasons_count_ratio" | Total_Failure_Reasons_Count => "total_failure_reasons...
1,376
9,587
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/FailureReasonsPayments/FailureReasonsPayments.res
.res
open NewAnalyticsTypes open FailureReasonsPaymentsTypes open NewPaymentAnalyticsEntity open FailureReasonsPaymentsUtils open NewAnalyticsHelper module TableModule = { @react.component let make = (~data, ~className="", ~selectedTab: string) => { let (offset, setOffset) = React.useState(_ => 0) let defaultS...
1,042
9,588
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/PaymentsLifeCycle/PaymentsLifeCycleTypes.res
.res
type paymentLifeCycle = { normalSuccess: int, normalFailure: int, cancelled: int, smartRetriedSuccess: int, smartRetriedFailure: int, pending: int, partialRefunded: int, refunded: int, disputed: int, drop_offs: int, } type status = | Succeeded | Failed | Cancelled | Processing | RequiresC...
191
9,589
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/PaymentsLifeCycle/PaymentsLifeCycle.res
.res
open NewAnalyticsTypes open NewAnalyticsHelper open SankeyGraphTypes @react.component let make = ( ~entity: moduleEntity, ~chartEntity: chartEntity< sankeyPayload, sankeyGraphOptions, PaymentsLifeCycleTypes.paymentLifeCycle, >, ) => { open APIUtils open LogicUtils let getURL = useGetURL() let ...
612
9,590
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/PaymentsLifeCycle/PaymentsLifeCycleUtils.res
.res
open SankeyGraphTypes open LogicUtils open PaymentsLifeCycleTypes let getstatusVariantTypeFromString = value => { switch value { | "succeeded" => Succeeded | "failed" => Failed | "cancelled" => Cancelled | "processing" => Processing | "requires_customer_action" => RequiresCustomerAction | "requires_merch...
3,368
9,591
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/PaymentsSuccessRate/PaymentsSuccessRateUtils.res
.res
open PaymentsSuccessRateTypes let getStringFromVariant = value => { switch value { | Successful_Payments => "successful_payments" | Successful_Payments_Without_Smart_Retries => "successful_payments_without_smart_retries" | Total_Payments => "total_payments" | Payments_Success_Rate => "payments_success_rate" ...
802
9,592
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/PaymentsSuccessRate/PaymentsSuccessRateTypes.res
.res
type successRateCols = | Successful_Payments | Successful_Payments_Without_Smart_Retries | Total_Payments | Payments_Success_Rate | Payments_Success_Rate_Without_Smart_Retries | Total_Success_Rate | Total_Success_Rate_Without_Smart_Retries | Time_Bucket type payments_success_rate = { successful_payme...
152
9,593
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/PaymentsSuccessRate/PaymentsSuccessRate.res
.res
open NewAnalyticsTypes open NewAnalyticsHelper open LineGraphTypes open PaymentsSuccessRateUtils open NewPaymentAnalyticsUtils module PaymentsSuccessRateHeader = { open NewAnalyticsUtils open LogicUtils @react.component let make = (~data, ~keyValue, ~granularity, ~setGranularity, ~granularityOptions) => { ...
1,944
9,594
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/FailedPaymentsDistribution/FailedPaymentsDistribution.res
.res
open NewAnalyticsTypes open NewAnalyticsHelper open NewPaymentAnalyticsEntity open BarGraphTypes open FailedPaymentsDistributionUtils open NewPaymentAnalyticsUtils module TableModule = { @react.component let make = (~data, ~className="", ~selectedTab: string) => { open LogicUtils let (offset, setOffset) =...
1,241
9,595
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/FailedPaymentsDistribution/FailedPaymentsDistributionUtils.res
.res
open FailedPaymentsDistributionTypes open LogicUtils let getStringFromVariant = value => { switch value { | Payments_Failure_Rate_Distribution => "payments_failure_rate_distribution" | Payments_Failure_Rate_Distribution_Without_Smart_Retries => "payments_failure_rate_distribution_without_smart_retries" | Conne...
1,255
9,596
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/FailedPaymentsDistribution/FailedPaymentsDistributionTypes.res
.res
type failedPaymentsDistributionCols = | Payments_Failure_Rate_Distribution | Payments_Failure_Rate_Distribution_Without_Smart_Retries | Connector | Payment_Method | Payment_Method_Type | Authentication_Type type failedPaymentsDistributionObject = { payments_failure_rate_distribution: float, payments_fa...
105
9,597
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/SuccessfulPaymentsDistribution/SuccessfulPaymentsDistributionUtils.res
.res
open SuccessfulPaymentsDistributionTypes open LogicUtils let getStringFromVariant = value => { switch value { | Payments_Success_Rate_Distribution => "payments_success_rate_distribution" | Payments_Success_Rate_Distribution_Without_Smart_Retries => "payments_success_rate_distribution_without_smart_retries" | C...
1,238
9,598
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/SuccessfulPaymentsDistribution/SuccessfulPaymentsDistributionTypes.res
.res
type successfulPaymentsDistributionCols = | Payments_Success_Rate_Distribution | Payments_Success_Rate_Distribution_Without_Smart_Retries | Connector | Payment_Method | Payment_Method_Type | Authentication_Type type successfulPaymentsDistributionObject = { payments_success_rate_distribution: float, pay...
103
9,599
hyperswitch-control-center
src/screens/NewAnalytics/PaymentAnalytics/SuccessfulPaymentsDistribution/SuccessfulPaymentsDistribution.res
.res
open NewAnalyticsTypes open NewAnalyticsHelper open NewPaymentAnalyticsEntity open BarGraphTypes open SuccessfulPaymentsDistributionUtils open NewPaymentAnalyticsUtils module TableModule = { open LogicUtils @react.component let make = (~data, ~className="", ~selectedTab: string) => { let (offset, setOffset) ...
1,230
9,600
hyperswitch-control-center
src/screens/NewAnalytics/NewAuthenticationAnalytics/NewAuthenticationAnalyticsUtils.res
.res
open NewAuthenticationAnalyticsTypes open LogicUtils let defaultQueryData: queryDataType = { authentication_count: 0, authentication_attempt_count: 0, authentication_success_count: 0, challenge_flow_count: 0, challenge_attempt_count: 0, challenge_success_count: 0, frictionless_flow_count: 0, frictionle...
2,693
9,601
hyperswitch-control-center
src/screens/NewAnalytics/NewAuthenticationAnalytics/NewAuthenticationAnalytics.res
.res
@react.component let make = () => { open APIUtils open LogicUtils open NewAuthenticationAnalyticsUtils open NewAuthenticationAnalyticsHelper let getURL = useGetURL() let fetchDetails = useGetMethod() let updateDetails = useUpdateMethod() let (screenState, setScreenState) = React.useState(_ => PageLoader...
2,198
9,602
hyperswitch-control-center
src/screens/NewAnalytics/NewAuthenticationAnalytics/NewAuthenticationAnalyticsTypes.res
.res
type timeRange = { start_time: string, end_time: string, } type queryDataType = { authentication_count: int, authentication_attempt_count: int, authentication_success_count: int, challenge_flow_count: int, challenge_attempt_count: int, challenge_success_count: int, frictionless_flow_count: int, fri...
396
9,603
hyperswitch-control-center
src/screens/NewAnalytics/NewAuthenticationAnalytics/NewAuthenticationAnalyticsHelper.res
.res
open LogicUtils open LogicUtilsTypes module Card = { @react.component let make = (~title: string, ~description: string, ~value: float, ~valueType: valueType) => { let valueString = valueFormatter(value, valueType) <div className="bg-white border rounded-lg p-4"> <div className="flex flex-col justify-...
1,078
9,604
hyperswitch-control-center
src/screens/NewAnalytics/NewAnalyticsFilters/NewAnalyticsFiltersUtils.res
.res
open NewAnalyticsTypes let defaultCurrency = { label: "All Currencies (Converted to USD*)", value: (#all_currencies: defaultFilters :> string), } let getOptions = json => { open LogicUtils let currencies = [] json ->getDictFromJsonObject ->getArrayFromDict("queryData", []) ->Array.forEach(value => { ...
214
9,605
hyperswitch-control-center
src/screens/NewAnalytics/NewAnalyticsFilters/NewAnalyticsFilters.res
.res
open LogicUtils open APIUtils open NewAnalyticsFiltersUtils open NewAnalyticsFiltersHelper open NewAnalyticsTypes module RefundsFilter = { @react.component let make = (~filterValueJson, ~dimensions, ~loadFilters, ~screenState, ~updateFilterContext) => { let startTimeVal = filterValueJson->getString("startTime"...
1,170
9,606
hyperswitch-control-center
src/screens/NewAnalytics/NewAnalyticsFilters/NewAnalyticsFiltersHelper.res
.res
module FilterLoader = { @react.component let make = () => { <div className="rounded-lg bg-white border px-10 py-2"> <div className="animate-spin"> <Icon name="spinner" size=20 /> </div> </div> } }
67
9,607
hyperswitch-control-center
src/screens/NewAnalytics/NewRefundsAnalytics/NewRefundsAnalyticsEntity.res
.res
open NewAnalyticsTypes // OverView section let overviewSectionEntity: moduleEntity = { requestBodyConfig: { delta: true, metrics: [], }, title: "OverView Section", domain: #refunds, } // Refunds Processed let refundsProcessedEntity: moduleEntity = { requestBodyConfig: { delta: false, metrics: ...
1,039
9,608
hyperswitch-control-center
src/screens/NewAnalytics/NewRefundsAnalytics/NewRefundsAnalytics.res
.res
@react.component let make = () => { open NewRefundsAnalyticsEntity let {newAnalyticsFilters} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom <div className="flex flex-col gap-14 mt-5 pt-7"> <RenderIf condition={newAnalyticsFilters}> <div className="flex gap-2"> <NewAnalyticsFil...
272
9,609
hyperswitch-control-center
src/screens/NewAnalytics/NewRefundsAnalytics/RefundsReasons/RefundsReasons.res
.res
open NewAnalyticsTypes open RefundsReasonsTypes open NewRefundsAnalyticsEntity open RefundsReasonsUtils open NewAnalyticsHelper module TableModule = { @react.component let make = (~data, ~className="") => { let (offset, setOffset) = React.useState(_ => 0) let defaultSort: Table.sortedObject = { key:...
872
9,610
hyperswitch-control-center
src/screens/NewAnalytics/NewRefundsAnalytics/RefundsReasons/RefundsReasonsUtils.res
.res
open RefundsReasonsTypes open LogicUtils let getStringFromVariant = value => { switch value { | Refund_Reason => "refund_reason" | Refund_Reason_Count => "refund_reason_count" | Total_Refund_Reason_Count => "total_refund_reason_count" | Refund_Reason_Count_Ratio => "refund_reason_count_ratio" | Connector =...
968
9,611
hyperswitch-control-center
src/screens/NewAnalytics/NewRefundsAnalytics/RefundsReasons/RefundsReasonsTypes.res
.res
type failreResonsColsTypes = | Refund_Reason | Refund_Reason_Count | Total_Refund_Reason_Count | Refund_Reason_Count_Ratio | Connector type failreResonsObjectType = { connector: string, refund_reason: string, refund_reason_count: int, total_refund_reason_count: int, refund_reason_count_ratio: float...
90
9,612
hyperswitch-control-center
src/screens/NewAnalytics/NewRefundsAnalytics/SuccessfulRefundsDistribution/SuccessfulRefundsDistributionTypes.res
.res
type successfulRefundsDistributionTypes = | Refunds_Success_Rate | Refund_Count | Refund_Success_Count | Connector type successfulRefundsDistributionObject = { refund_count: int, refund_success_count: int, refunds_success_rate: float, connector: string, }
66
9,613
hyperswitch-control-center
src/screens/NewAnalytics/NewRefundsAnalytics/SuccessfulRefundsDistribution/SuccessfulRefundsDistributionUtils.res
.res
open NewAnalyticsUtils open LogicUtils open SuccessfulRefundsDistributionTypes let getStringFromVariant = value => { switch value { | Refunds_Success_Rate => "refunds_success_rate" | Refund_Count => "refund_count" | Refund_Success_Count => "refund_success_count" | Connector => "connector" } } let successf...
754
9,614
hyperswitch-control-center
src/screens/NewAnalytics/NewRefundsAnalytics/SuccessfulRefundsDistribution/SuccessfulRefundsDistribution.res
.res
open NewAnalyticsTypes open NewAnalyticsHelper open NewRefundsAnalyticsEntity open BarGraphTypes open SuccessfulRefundsDistributionUtils open SuccessfulRefundsDistributionTypes module TableModule = { @react.component let make = (~data, ~className="") => { let (offset, setOffset) = React.useState(_ => 0) le...
1,028
9,615
hyperswitch-control-center
src/screens/NewAnalytics/NewRefundsAnalytics/RefundsOverviewSection/RefundsOverviewSectionUtils.res
.res
open RefundsOverviewSectionTypes let getStringFromVariant = value => { switch value { | Total_Refund_Processed_Amount => "total_refund_processed_amount" | Total_Refund_Success_Rate => "total_refund_success_rate" | Successful_Refund_Count => "successful_refund_count" | Failed_Refund_Count => "failed_refund_co...
980
9,616
hyperswitch-control-center
src/screens/NewAnalytics/NewRefundsAnalytics/RefundsOverviewSection/RefundsOverviewSection.res
.res
open NewAnalyticsTypes open RefundsOverviewSectionTypes open RefundsOverviewSectionUtils open NewAnalyticsHelper open LogicUtils open APIUtils open NewAnalyticsUtils @react.component let make = (~entity: moduleEntity) => { let getURL = useGetURL() let updateDetails = useUpdateMethod() let (data, setData) = React....
1,373
9,617
hyperswitch-control-center
src/screens/NewAnalytics/NewRefundsAnalytics/RefundsOverviewSection/RefundsOverviewSectionTypes.res
.res
type overviewColumns = | Total_Refund_Processed_Amount | Total_Refund_Success_Rate | Successful_Refund_Count | Failed_Refund_Count | Pending_Refund_Count type responseKeys = [ | #total_refund_processed_amount | #total_refund_processed_amount_in_usd | #total_refund_success_rate | #successful_refund_co...
152
9,618
hyperswitch-control-center
src/screens/NewAnalytics/NewRefundsAnalytics/RefundsProcessed/RefundsProcessed.res
.res
open NewAnalyticsTypes open NewAnalyticsHelper open NewRefundsAnalyticsEntity open RefundsProcessedUtils open RefundsProcessedTypes module TableModule = { open LogicUtils @react.component let make = (~data, ~className="") => { let (offset, setOffset) = React.useState(_ => 0) let defaultSort: Table.sorted...
2,545
9,619
hyperswitch-control-center
src/screens/NewAnalytics/NewRefundsAnalytics/RefundsProcessed/RefundsProcessedUtils.res
.res
open RefundsProcessedTypes open NewAnalyticsUtils open LogicUtils let getStringFromVariant = value => { switch value { | Refund_Processed_Amount => "refund_processed_amount" | Refund_Processed_Count => "refund_processed_count" | Total_Refund_Processed_Amount => "total_refund_processed_amount" | Total_Refund_...
1,881
9,620