@omniretail/lending 0.0.0-stage → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +322 -2
- package/lib/assets/fonts/GorditaBold.ttf +0 -0
- package/lib/assets/fonts/GorditaMedium.ttf +0 -0
- package/lib/assets/fonts/GorditaRegular.ttf +0 -0
- package/lib/assets/lending/close.png +0 -0
- package/lib/assets/lending/icon-apply.png +0 -0
- package/lib/assets/lending/icon-approval-clock.png +0 -0
- package/lib/assets/lending/icon-clock.png +0 -0
- package/lib/assets/lending/icon-close.png +0 -0
- package/lib/assets/lending/icon-copy.png +0 -0
- package/lib/assets/lending/icon-download.png +0 -0
- package/lib/assets/lending/icon-eye.png +0 -0
- package/lib/assets/lending/icon-filter.png +0 -0
- package/lib/assets/lending/icon-history.png +0 -0
- package/lib/assets/lending/icon-megaphone.png +0 -0
- package/lib/assets/lending/icon-payment-success.png +0 -0
- package/lib/assets/lending/icon-plan-check.png +0 -0
- package/lib/assets/lending/icon-plus.png +0 -0
- package/lib/assets/lending/icon-radio-on.png +0 -0
- package/lib/assets/lending/icon-repay.png +0 -0
- package/lib/assets/lending/icon-statement-synced.png +0 -0
- package/lib/assets/lending/icon-step-done.png +0 -0
- package/lib/assets/lending/icon-step-pending.png +0 -0
- package/lib/assets/lending/icon-submitted-check.png +0 -0
- package/lib/assets/lending/icon-synced.png +0 -0
- package/lib/assets/lending/icon-tx-credit.png +0 -0
- package/lib/assets/lending/icon-tx-debit.png +0 -0
- package/lib/assets/lending/icon-upgrade.png +0 -0
- package/lib/assets/lending/icon-upload.png +0 -0
- package/lib/assets/lending/illo-auth-details.png +0 -0
- package/lib/assets/lending/illo-brand-selection.png +0 -0
- package/lib/assets/lending/illo-coins.png +0 -0
- package/lib/assets/lending/illo-credit-amount.png +0 -0
- package/lib/assets/lending/illo-customer-agreement.png +0 -0
- package/lib/assets/lending/illo-hand.png +0 -0
- package/lib/assets/lending/illo-limit-pending.png +0 -0
- package/lib/assets/lending/illo-limit-rejected.png +0 -0
- package/lib/assets/lending/illo-manufacturer.png +0 -0
- package/lib/assets/lending/illo-no-active-credit.png +0 -0
- package/lib/assets/lending/illo-proof-account.png +0 -0
- package/lib/assets/lending/illo-repay-phone.png +0 -0
- package/lib/assets/lending/illo-request-pending.png +0 -0
- package/lib/assets/lending/logo-cbn.png +0 -0
- package/lib/assets/lending/logo-collections.png +0 -0
- package/lib/assets/lending/logo-fmn.png +0 -0
- package/lib/assets/lending/logo-golden-penny.png +0 -0
- package/lib/assets/lending/logo-guinness.png +0 -0
- package/lib/assets/lending/logo-ndic.png +0 -0
- package/lib/assets/lending/logo-nestle.png +0 -0
- package/lib/assets/lending/logo-omnipay.png +0 -0
- package/lib/assets/lending/sig-beneficiary.png +0 -0
- package/lib/assets/lending/sig-omnipay.png +0 -0
- package/lib/assets/lending/watermark-receipt.png +0 -0
- package/lib/components/IconBack.d.ts +7 -0
- package/lib/components/IconBack.d.ts.map +1 -0
- package/lib/components/IconBack.js +17 -0
- package/lib/components/IconBack.js.map +1 -0
- package/lib/components/LicensingFooter.d.ts +6 -0
- package/lib/components/LicensingFooter.d.ts.map +1 -0
- package/lib/components/LicensingFooter.js +76 -0
- package/lib/components/LicensingFooter.js.map +1 -0
- package/lib/components/ScreenHeader.d.ts +10 -0
- package/lib/components/ScreenHeader.d.ts.map +1 -0
- package/lib/components/ScreenHeader.js +72 -0
- package/lib/components/ScreenHeader.js.map +1 -0
- package/lib/components/index.d.ts +5 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +4 -0
- package/lib/components/index.js.map +1 -0
- package/lib/flows/lending/AgreementSigningSheet.d.ts +8 -0
- package/lib/flows/lending/AgreementSigningSheet.d.ts.map +1 -0
- package/lib/flows/lending/AgreementSigningSheet.js +178 -0
- package/lib/flows/lending/AgreementSigningSheet.js.map +1 -0
- package/lib/flows/lending/ApplyCreditFlow.d.ts +6 -0
- package/lib/flows/lending/ApplyCreditFlow.d.ts.map +1 -0
- package/lib/flows/lending/ApplyCreditFlow.js +64 -0
- package/lib/flows/lending/ApplyCreditFlow.js.map +1 -0
- package/lib/flows/lending/AuthorisationDetailsSheet.d.ts +9 -0
- package/lib/flows/lending/AuthorisationDetailsSheet.d.ts.map +1 -0
- package/lib/flows/lending/AuthorisationDetailsSheet.js +94 -0
- package/lib/flows/lending/AuthorisationDetailsSheet.js.map +1 -0
- package/lib/flows/lending/BankListSheet.d.ts +12 -0
- package/lib/flows/lending/BankListSheet.d.ts.map +1 -0
- package/lib/flows/lending/BankListSheet.js +105 -0
- package/lib/flows/lending/BankListSheet.js.map +1 -0
- package/lib/flows/lending/BankStatementSyncedSheet.d.ts +7 -0
- package/lib/flows/lending/BankStatementSyncedSheet.d.ts.map +1 -0
- package/lib/flows/lending/BankStatementSyncedSheet.js +71 -0
- package/lib/flows/lending/BankStatementSyncedSheet.js.map +1 -0
- package/lib/flows/lending/BottomSheet.d.ts +11 -0
- package/lib/flows/lending/BottomSheet.d.ts.map +1 -0
- package/lib/flows/lending/BottomSheet.js +72 -0
- package/lib/flows/lending/BottomSheet.js.map +1 -0
- package/lib/flows/lending/BrandCreditOverview.d.ts +6 -0
- package/lib/flows/lending/BrandCreditOverview.d.ts.map +1 -0
- package/lib/flows/lending/BrandCreditOverview.js +43 -0
- package/lib/flows/lending/BrandCreditOverview.js.map +1 -0
- package/lib/flows/lending/BrandLimitCard.d.ts +19 -0
- package/lib/flows/lending/BrandLimitCard.d.ts.map +1 -0
- package/lib/flows/lending/BrandLimitCard.js +122 -0
- package/lib/flows/lending/BrandLimitCard.js.map +1 -0
- package/lib/flows/lending/BrandSelectionSheet.d.ts +10 -0
- package/lib/flows/lending/BrandSelectionSheet.d.ts.map +1 -0
- package/lib/flows/lending/BrandSelectionSheet.js +88 -0
- package/lib/flows/lending/BrandSelectionSheet.js.map +1 -0
- package/lib/flows/lending/CompletePaymentSheet.d.ts +11 -0
- package/lib/flows/lending/CompletePaymentSheet.d.ts.map +1 -0
- package/lib/flows/lending/CompletePaymentSheet.js +139 -0
- package/lib/flows/lending/CompletePaymentSheet.js.map +1 -0
- package/lib/flows/lending/ConfirmStatusSheet.d.ts +11 -0
- package/lib/flows/lending/ConfirmStatusSheet.d.ts.map +1 -0
- package/lib/flows/lending/ConfirmStatusSheet.js +63 -0
- package/lib/flows/lending/ConfirmStatusSheet.js.map +1 -0
- package/lib/flows/lending/CreditAgreementSheet.d.ts +13 -0
- package/lib/flows/lending/CreditAgreementSheet.d.ts.map +1 -0
- package/lib/flows/lending/CreditAgreementSheet.js +298 -0
- package/lib/flows/lending/CreditAgreementSheet.js.map +1 -0
- package/lib/flows/lending/CreditAmountSheet.d.ts +9 -0
- package/lib/flows/lending/CreditAmountSheet.d.ts.map +1 -0
- package/lib/flows/lending/CreditAmountSheet.js +96 -0
- package/lib/flows/lending/CreditAmountSheet.js.map +1 -0
- package/lib/flows/lending/CreditBreakdownSheet.d.ts +8 -0
- package/lib/flows/lending/CreditBreakdownSheet.d.ts.map +1 -0
- package/lib/flows/lending/CreditBreakdownSheet.js +82 -0
- package/lib/flows/lending/CreditBreakdownSheet.js.map +1 -0
- package/lib/flows/lending/CreditFlow.d.ts +12 -0
- package/lib/flows/lending/CreditFlow.d.ts.map +1 -0
- package/lib/flows/lending/CreditFlow.js +458 -0
- package/lib/flows/lending/CreditFlow.js.map +1 -0
- package/lib/flows/lending/CreditHistory.screen.d.ts +10 -0
- package/lib/flows/lending/CreditHistory.screen.d.ts.map +1 -0
- package/lib/flows/lending/CreditHistory.screen.js +138 -0
- package/lib/flows/lending/CreditHistory.screen.js.map +1 -0
- package/lib/flows/lending/CreditReceipt.screen.d.ts +12 -0
- package/lib/flows/lending/CreditReceipt.screen.d.ts.map +1 -0
- package/lib/flows/lending/CreditReceipt.screen.js +73 -0
- package/lib/flows/lending/CreditReceipt.screen.js.map +1 -0
- package/lib/flows/lending/CreditUpgrade.screen.d.ts +12 -0
- package/lib/flows/lending/CreditUpgrade.screen.d.ts.map +1 -0
- package/lib/flows/lending/CreditUpgrade.screen.js +168 -0
- package/lib/flows/lending/CreditUpgrade.screen.js.map +1 -0
- package/lib/flows/lending/DowngradeLimitSheet.d.ts +8 -0
- package/lib/flows/lending/DowngradeLimitSheet.d.ts.map +1 -0
- package/lib/flows/lending/DowngradeLimitSheet.js +103 -0
- package/lib/flows/lending/DowngradeLimitSheet.js.map +1 -0
- package/lib/flows/lending/FindCreditSheet.d.ts +11 -0
- package/lib/flows/lending/FindCreditSheet.d.ts.map +1 -0
- package/lib/flows/lending/FindCreditSheet.js +140 -0
- package/lib/flows/lending/FindCreditSheet.js.map +1 -0
- package/lib/flows/lending/FlatLoanAgreementBody.d.ts +8 -0
- package/lib/flows/lending/FlatLoanAgreementBody.d.ts.map +1 -0
- package/lib/flows/lending/FlatLoanAgreementBody.js +190 -0
- package/lib/flows/lending/FlatLoanAgreementBody.js.map +1 -0
- package/lib/flows/lending/FlatLoanDetailsSheet.d.ts +6 -0
- package/lib/flows/lending/FlatLoanDetailsSheet.d.ts.map +1 -0
- package/lib/flows/lending/FlatLoanDetailsSheet.js +127 -0
- package/lib/flows/lending/FlatLoanDetailsSheet.js.map +1 -0
- package/lib/flows/lending/GetStatementSheet.d.ts +6 -0
- package/lib/flows/lending/GetStatementSheet.d.ts.map +1 -0
- package/lib/flows/lending/GetStatementSheet.js +90 -0
- package/lib/flows/lending/GetStatementSheet.js.map +1 -0
- package/lib/flows/lending/HistoryFilterSheet.d.ts +6 -0
- package/lib/flows/lending/HistoryFilterSheet.d.ts.map +1 -0
- package/lib/flows/lending/HistoryFilterSheet.js +140 -0
- package/lib/flows/lending/HistoryFilterSheet.js.map +1 -0
- package/lib/flows/lending/IconClose.d.ts +6 -0
- package/lib/flows/lending/IconClose.d.ts.map +1 -0
- package/lib/flows/lending/IconClose.js +11 -0
- package/lib/flows/lending/IconClose.js.map +1 -0
- package/lib/flows/lending/IconEyeOpen.d.ts +4 -0
- package/lib/flows/lending/IconEyeOpen.d.ts.map +1 -0
- package/lib/flows/lending/IconEyeOpen.js +11 -0
- package/lib/flows/lending/IconEyeOpen.js.map +1 -0
- package/lib/flows/lending/IconPayArrow.d.ts +5 -0
- package/lib/flows/lending/IconPayArrow.d.ts.map +1 -0
- package/lib/flows/lending/IconPayArrow.js +10 -0
- package/lib/flows/lending/IconPayArrow.js.map +1 -0
- package/lib/flows/lending/IconPinStar.d.ts +10 -0
- package/lib/flows/lending/IconPinStar.d.ts.map +1 -0
- package/lib/flows/lending/IconPinStar.js +11 -0
- package/lib/flows/lending/IconPinStar.js.map +1 -0
- package/lib/flows/lending/IncreaseSpendingLimitSheet.d.ts +6 -0
- package/lib/flows/lending/IncreaseSpendingLimitSheet.d.ts.map +1 -0
- package/lib/flows/lending/IncreaseSpendingLimitSheet.js +115 -0
- package/lib/flows/lending/IncreaseSpendingLimitSheet.js.map +1 -0
- package/lib/flows/lending/Lending.screen.d.ts +12 -0
- package/lib/flows/lending/Lending.screen.d.ts.map +1 -0
- package/lib/flows/lending/Lending.screen.js +244 -0
- package/lib/flows/lending/Lending.screen.js.map +1 -0
- package/lib/flows/lending/LendingDetails.screen.d.ts +5 -0
- package/lib/flows/lending/LendingDetails.screen.d.ts.map +1 -0
- package/lib/flows/lending/LendingDetails.screen.js +34 -0
- package/lib/flows/lending/LendingDetails.screen.js.map +1 -0
- package/lib/flows/lending/LimitHomeWithLimit.screen.d.ts +17 -0
- package/lib/flows/lending/LimitHomeWithLimit.screen.d.ts.map +1 -0
- package/lib/flows/lending/LimitHomeWithLimit.screen.js +295 -0
- package/lib/flows/lending/LimitHomeWithLimit.screen.js.map +1 -0
- package/lib/flows/lending/ListSearchField.d.ts +8 -0
- package/lib/flows/lending/ListSearchField.d.ts.map +1 -0
- package/lib/flows/lending/ListSearchField.js +37 -0
- package/lib/flows/lending/ListSearchField.js.map +1 -0
- package/lib/flows/lending/ManufacturerListSheet.d.ts +7 -0
- package/lib/flows/lending/ManufacturerListSheet.d.ts.map +1 -0
- package/lib/flows/lending/ManufacturerListSheet.js +83 -0
- package/lib/flows/lending/ManufacturerListSheet.js.map +1 -0
- package/lib/flows/lending/ManufacturerStatementSheet.d.ts +15 -0
- package/lib/flows/lending/ManufacturerStatementSheet.d.ts.map +1 -0
- package/lib/flows/lending/ManufacturerStatementSheet.js +177 -0
- package/lib/flows/lending/ManufacturerStatementSheet.js.map +1 -0
- package/lib/flows/lending/PaymentSuccessfulSheet.d.ts +6 -0
- package/lib/flows/lending/PaymentSuccessfulSheet.d.ts.map +1 -0
- package/lib/flows/lending/PaymentSuccessfulSheet.js +56 -0
- package/lib/flows/lending/PaymentSuccessfulSheet.js.map +1 -0
- package/lib/flows/lending/ProofOfAccountSheet.d.ts +23 -0
- package/lib/flows/lending/ProofOfAccountSheet.d.ts.map +1 -0
- package/lib/flows/lending/ProofOfAccountSheet.js +213 -0
- package/lib/flows/lending/ProofOfAccountSheet.js.map +1 -0
- package/lib/flows/lending/ReferScreenChrome.d.ts +8 -0
- package/lib/flows/lending/ReferScreenChrome.d.ts.map +1 -0
- package/lib/flows/lending/ReferScreenChrome.js +31 -0
- package/lib/flows/lending/ReferScreenChrome.js.map +1 -0
- package/lib/flows/lending/ReferralCodeSheet.d.ts +11 -0
- package/lib/flows/lending/ReferralCodeSheet.d.ts.map +1 -0
- package/lib/flows/lending/ReferralCodeSheet.js +137 -0
- package/lib/flows/lending/ReferralCodeSheet.js.map +1 -0
- package/lib/flows/lending/RepayCredit.screen.d.ts +6 -0
- package/lib/flows/lending/RepayCredit.screen.d.ts.map +1 -0
- package/lib/flows/lending/RepayCredit.screen.js +352 -0
- package/lib/flows/lending/RepayCredit.screen.js.map +1 -0
- package/lib/flows/lending/RepayErrorSheet.d.ts +6 -0
- package/lib/flows/lending/RepayErrorSheet.d.ts.map +1 -0
- package/lib/flows/lending/RepayErrorSheet.js +71 -0
- package/lib/flows/lending/RepayErrorSheet.js.map +1 -0
- package/lib/flows/lending/RepaymentPlanSheet.d.ts +8 -0
- package/lib/flows/lending/RepaymentPlanSheet.d.ts.map +1 -0
- package/lib/flows/lending/RepaymentPlanSheet.js +49 -0
- package/lib/flows/lending/RepaymentPlanSheet.js.map +1 -0
- package/lib/flows/lending/RequestPendingSheet.d.ts +9 -0
- package/lib/flows/lending/RequestPendingSheet.d.ts.map +1 -0
- package/lib/flows/lending/RequestPendingSheet.js +109 -0
- package/lib/flows/lending/RequestPendingSheet.js.map +1 -0
- package/lib/flows/lending/SubLimitEmpty.d.ts +5 -0
- package/lib/flows/lending/SubLimitEmpty.d.ts.map +1 -0
- package/lib/flows/lending/SubLimitEmpty.js +65 -0
- package/lib/flows/lending/SubLimitEmpty.js.map +1 -0
- package/lib/flows/lending/Transactions.screen.d.ts +5 -0
- package/lib/flows/lending/Transactions.screen.d.ts.map +1 -0
- package/lib/flows/lending/Transactions.screen.js +124 -0
- package/lib/flows/lending/Transactions.screen.js.map +1 -0
- package/lib/flows/lending/agreements/CustomerAgreementBody.d.ts +8 -0
- package/lib/flows/lending/agreements/CustomerAgreementBody.d.ts.map +1 -0
- package/lib/flows/lending/agreements/CustomerAgreementBody.js +35 -0
- package/lib/flows/lending/agreements/CustomerAgreementBody.js.map +1 -0
- package/lib/flows/lending/agreements/agreementFormat.d.ts +16 -0
- package/lib/flows/lending/agreements/agreementFormat.d.ts.map +1 -0
- package/lib/flows/lending/agreements/agreementFormat.js +73 -0
- package/lib/flows/lending/agreements/agreementFormat.js.map +1 -0
- package/lib/flows/lending/agreements/agreementPrintHtml.d.ts +7 -0
- package/lib/flows/lending/agreements/agreementPrintHtml.d.ts.map +1 -0
- package/lib/flows/lending/agreements/agreementPrintHtml.generated.d.ts +7 -0
- package/lib/flows/lending/agreements/agreementPrintHtml.generated.d.ts.map +1 -0
- package/lib/flows/lending/agreements/agreementPrintHtml.generated.js +5520 -0
- package/lib/flows/lending/agreements/agreementPrintHtml.generated.js.map +1 -0
- package/lib/flows/lending/agreements/agreementPrintHtml.js +32 -0
- package/lib/flows/lending/agreements/agreementPrintHtml.js.map +1 -0
- package/lib/flows/lending/agreements/agreementStyles.d.ts +92 -0
- package/lib/flows/lending/agreements/agreementStyles.d.ts.map +1 -0
- package/lib/flows/lending/agreements/agreementStyles.js +70 -0
- package/lib/flows/lending/agreements/agreementStyles.js.map +1 -0
- package/lib/flows/lending/agreements/agreementTypes.d.ts +11 -0
- package/lib/flows/lending/agreements/agreementTypes.d.ts.map +1 -0
- package/lib/flows/lending/agreements/agreementTypes.js +2 -0
- package/lib/flows/lending/agreements/agreementTypes.js.map +1 -0
- package/lib/flows/lending/agreements/generalAgreement.d.ts +4 -0
- package/lib/flows/lending/agreements/generalAgreement.d.ts.map +1 -0
- package/lib/flows/lending/agreements/generalAgreement.js +14 -0
- package/lib/flows/lending/agreements/generalAgreement.js.map +1 -0
- package/lib/flows/lending/agreements/generalAgreementV2.d.ts +4 -0
- package/lib/flows/lending/agreements/generalAgreementV2.d.ts.map +1 -0
- package/lib/flows/lending/agreements/generalAgreementV2.js +14 -0
- package/lib/flows/lending/agreements/generalAgreementV2.js.map +1 -0
- package/lib/flows/lending/agreements/generalAgreementV3.d.ts +4 -0
- package/lib/flows/lending/agreements/generalAgreementV3.d.ts.map +1 -0
- package/lib/flows/lending/agreements/generalAgreementV3.js +14 -0
- package/lib/flows/lending/agreements/generalAgreementV3.js.map +1 -0
- package/lib/flows/lending/agreements/generalAgreementV4.d.ts +4 -0
- package/lib/flows/lending/agreements/generalAgreementV4.d.ts.map +1 -0
- package/lib/flows/lending/agreements/generalAgreementV4.js +14 -0
- package/lib/flows/lending/agreements/generalAgreementV4.js.map +1 -0
- package/lib/flows/lending/agreements/generalAgreementV5.d.ts +4 -0
- package/lib/flows/lending/agreements/generalAgreementV5.d.ts.map +1 -0
- package/lib/flows/lending/agreements/generalAgreementV5.js +14 -0
- package/lib/flows/lending/agreements/generalAgreementV5.js.map +1 -0
- package/lib/flows/lending/agreements/ghanaAgreement.d.ts +4 -0
- package/lib/flows/lending/agreements/ghanaAgreement.d.ts.map +1 -0
- package/lib/flows/lending/agreements/ghanaAgreement.js +14 -0
- package/lib/flows/lending/agreements/ghanaAgreement.js.map +1 -0
- package/lib/flows/lending/agreements/mcplAgreement.d.ts +4 -0
- package/lib/flows/lending/agreements/mcplAgreement.d.ts.map +1 -0
- package/lib/flows/lending/agreements/mcplAgreement.js +14 -0
- package/lib/flows/lending/agreements/mcplAgreement.js.map +1 -0
- package/lib/flows/lending/agreements/mcplAgreementV2.d.ts +4 -0
- package/lib/flows/lending/agreements/mcplAgreementV2.d.ts.map +1 -0
- package/lib/flows/lending/agreements/mcplAgreementV2.js +14 -0
- package/lib/flows/lending/agreements/mcplAgreementV2.js.map +1 -0
- package/lib/flows/lending/agreements/omnibizAgreement.d.ts +4 -0
- package/lib/flows/lending/agreements/omnibizAgreement.d.ts.map +1 -0
- package/lib/flows/lending/agreements/omnibizAgreement.js +14 -0
- package/lib/flows/lending/agreements/omnibizAgreement.js.map +1 -0
- package/lib/flows/lending/agreements/omnibizAgreementV2.d.ts +4 -0
- package/lib/flows/lending/agreements/omnibizAgreementV2.d.ts.map +1 -0
- package/lib/flows/lending/agreements/omnibizAgreementV2.js +14 -0
- package/lib/flows/lending/agreements/omnibizAgreementV2.js.map +1 -0
- package/lib/flows/lending/agreements/pickAgreementKind.d.ts +13 -0
- package/lib/flows/lending/agreements/pickAgreementKind.d.ts.map +1 -0
- package/lib/flows/lending/agreements/pickAgreementKind.js +43 -0
- package/lib/flows/lending/agreements/pickAgreementKind.js.map +1 -0
- package/lib/flows/lending/downloadDisplayedAgreement.d.ts +13 -0
- package/lib/flows/lending/downloadDisplayedAgreement.d.ts.map +1 -0
- package/lib/flows/lending/downloadDisplayedAgreement.js +48 -0
- package/lib/flows/lending/downloadDisplayedAgreement.js.map +1 -0
- package/lib/flows/lending/ghanaBanks.d.ts +3 -0
- package/lib/flows/lending/ghanaBanks.d.ts.map +1 -0
- package/lib/flows/lending/ghanaBanks.js +7 -0
- package/lib/flows/lending/ghanaBanks.js.map +1 -0
- package/lib/flows/lending/inventoryCreditAgreementCopy.d.ts +4 -0
- package/lib/flows/lending/inventoryCreditAgreementCopy.d.ts.map +1 -0
- package/lib/flows/lending/inventoryCreditAgreementCopy.js +117 -0
- package/lib/flows/lending/inventoryCreditAgreementCopy.js.map +1 -0
- package/lib/flows/lending/manufacturers.d.ts +11 -0
- package/lib/flows/lending/manufacturers.d.ts.map +1 -0
- package/lib/flows/lending/manufacturers.js +7 -0
- package/lib/flows/lending/manufacturers.js.map +1 -0
- package/lib/flows/lending/useAccountNameInquiry.d.ts +5 -0
- package/lib/flows/lending/useAccountNameInquiry.d.ts.map +1 -0
- package/lib/flows/lending/useAccountNameInquiry.js +35 -0
- package/lib/flows/lending/useAccountNameInquiry.js.map +1 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +7 -0
- package/lib/index.js.map +1 -0
- package/lib/sdk/SDKRoot.d.ts +6 -0
- package/lib/sdk/SDKRoot.d.ts.map +1 -0
- package/lib/sdk/SDKRoot.js +28 -0
- package/lib/sdk/SDKRoot.js.map +1 -0
- package/lib/sdk/bootstrap/SDKConfigProvider.d.ts +7 -0
- package/lib/sdk/bootstrap/SDKConfigProvider.d.ts.map +1 -0
- package/lib/sdk/bootstrap/SDKConfigProvider.js +132 -0
- package/lib/sdk/bootstrap/SDKConfigProvider.js.map +1 -0
- package/lib/sdk/bootstrap/bootstrapScreens.d.ts +8 -0
- package/lib/sdk/bootstrap/bootstrapScreens.d.ts.map +1 -0
- package/lib/sdk/bootstrap/bootstrapScreens.js +44 -0
- package/lib/sdk/bootstrap/bootstrapScreens.js.map +1 -0
- package/lib/sdk/configIdentity.d.ts +4 -0
- package/lib/sdk/configIdentity.d.ts.map +1 -0
- package/lib/sdk/configIdentity.js +17 -0
- package/lib/sdk/configIdentity.js.map +1 -0
- package/lib/sdk/providers/ApplicationFlowProvider.d.ts +9 -0
- package/lib/sdk/providers/ApplicationFlowProvider.d.ts.map +1 -0
- package/lib/sdk/providers/ApplicationFlowProvider.js +21 -0
- package/lib/sdk/providers/ApplicationFlowProvider.js.map +1 -0
- package/lib/sdk/providers/BrandColorProvider.d.ts +19 -0
- package/lib/sdk/providers/BrandColorProvider.d.ts.map +1 -0
- package/lib/sdk/providers/BrandColorProvider.js +24 -0
- package/lib/sdk/providers/BrandColorProvider.js.map +1 -0
- package/lib/sdk/providers/PayLimitProvider.d.ts +2 -0
- package/lib/sdk/providers/PayLimitProvider.d.ts.map +1 -0
- package/lib/sdk/providers/PayLimitProvider.js +2 -0
- package/lib/sdk/providers/PayLimitProvider.js.map +1 -0
- package/lib/sdk/providers/SDKFontProvider.d.ts +5 -0
- package/lib/sdk/providers/SDKFontProvider.d.ts.map +1 -0
- package/lib/sdk/providers/SDKFontProvider.js +23 -0
- package/lib/sdk/providers/SDKFontProvider.js.map +1 -0
- package/lib/sdk/providers/SDKProviders.d.ts +6 -0
- package/lib/sdk/providers/SDKProviders.d.ts.map +1 -0
- package/lib/sdk/providers/SDKProviders.js +10 -0
- package/lib/sdk/providers/SDKProviders.js.map +1 -0
- package/lib/sdk/providers/ToastProvider.d.ts +5 -0
- package/lib/sdk/providers/ToastProvider.d.ts.map +1 -0
- package/lib/sdk/providers/ToastProvider.js +53 -0
- package/lib/sdk/providers/ToastProvider.js.map +1 -0
- package/lib/sdk/screens/InterceptAndToastScreen.d.ts +6 -0
- package/lib/sdk/screens/InterceptAndToastScreen.d.ts.map +1 -0
- package/lib/sdk/screens/InterceptAndToastScreen.js +91 -0
- package/lib/sdk/screens/InterceptAndToastScreen.js.map +1 -0
- package/lib/sdk/screens/registry.d.ts +42 -0
- package/lib/sdk/screens/registry.d.ts.map +1 -0
- package/lib/sdk/screens/registry.js +41 -0
- package/lib/sdk/screens/registry.js.map +1 -0
- package/lib/sdk/types.d.ts +104 -0
- package/lib/sdk/types.d.ts.map +1 -0
- package/lib/sdk/types.js +48 -0
- package/lib/sdk/types.js.map +1 -0
- package/lib/services/apply/accountNameInquiry.d.ts +6 -0
- package/lib/services/apply/accountNameInquiry.d.ts.map +1 -0
- package/lib/services/apply/accountNameInquiry.js +45 -0
- package/lib/services/apply/accountNameInquiry.js.map +1 -0
- package/lib/services/apply/applicationFlow.d.ts +21 -0
- package/lib/services/apply/applicationFlow.d.ts.map +1 -0
- package/lib/services/apply/applicationFlow.js +96 -0
- package/lib/services/apply/applicationFlow.js.map +1 -0
- package/lib/services/apply/bankStatement.d.ts +55 -0
- package/lib/services/apply/bankStatement.d.ts.map +1 -0
- package/lib/services/apply/bankStatement.js +154 -0
- package/lib/services/apply/bankStatement.js.map +1 -0
- package/lib/services/apply/creditTierUpgradeStatus.d.ts +10 -0
- package/lib/services/apply/creditTierUpgradeStatus.d.ts.map +1 -0
- package/lib/services/apply/creditTierUpgradeStatus.js +74 -0
- package/lib/services/apply/creditTierUpgradeStatus.js.map +1 -0
- package/lib/services/apply/customerAgreement.d.ts +42 -0
- package/lib/services/apply/customerAgreement.d.ts.map +1 -0
- package/lib/services/apply/customerAgreement.js +190 -0
- package/lib/services/apply/customerAgreement.js.map +1 -0
- package/lib/services/apply/customerProduct.d.ts +10 -0
- package/lib/services/apply/customerProduct.d.ts.map +1 -0
- package/lib/services/apply/customerProduct.js +62 -0
- package/lib/services/apply/customerProduct.js.map +1 -0
- package/lib/services/apply/customerUpgradeDetails.d.ts +6 -0
- package/lib/services/apply/customerUpgradeDetails.d.ts.map +1 -0
- package/lib/services/apply/customerUpgradeDetails.js +35 -0
- package/lib/services/apply/customerUpgradeDetails.js.map +1 -0
- package/lib/services/apply/flatLoanAmountDue.d.ts +14 -0
- package/lib/services/apply/flatLoanAmountDue.d.ts.map +1 -0
- package/lib/services/apply/flatLoanAmountDue.js +68 -0
- package/lib/services/apply/flatLoanAmountDue.js.map +1 -0
- package/lib/services/apply/getLoans.d.ts +55 -0
- package/lib/services/apply/getLoans.d.ts.map +1 -0
- package/lib/services/apply/getLoans.js +116 -0
- package/lib/services/apply/getLoans.js.map +1 -0
- package/lib/services/apply/getPaylaterTransactions.d.ts +9 -0
- package/lib/services/apply/getPaylaterTransactions.d.ts.map +1 -0
- package/lib/services/apply/getPaylaterTransactions.js +61 -0
- package/lib/services/apply/getPaylaterTransactions.js.map +1 -0
- package/lib/services/apply/getTransactions.d.ts +18 -0
- package/lib/services/apply/getTransactions.d.ts.map +1 -0
- package/lib/services/apply/getTransactions.js +73 -0
- package/lib/services/apply/getTransactions.js.map +1 -0
- package/lib/services/apply/index.d.ts +47 -0
- package/lib/services/apply/index.d.ts.map +1 -0
- package/lib/services/apply/index.js +29 -0
- package/lib/services/apply/index.js.map +1 -0
- package/lib/services/apply/loanBrands.d.ts +15 -0
- package/lib/services/apply/loanBrands.d.ts.map +1 -0
- package/lib/services/apply/loanBrands.js +63 -0
- package/lib/services/apply/loanBrands.js.map +1 -0
- package/lib/services/apply/manufacturerStatement.d.ts +41 -0
- package/lib/services/apply/manufacturerStatement.d.ts.map +1 -0
- package/lib/services/apply/manufacturerStatement.js +207 -0
- package/lib/services/apply/manufacturerStatement.js.map +1 -0
- package/lib/services/apply/mapCatalog.d.ts +30 -0
- package/lib/services/apply/mapCatalog.d.ts.map +1 -0
- package/lib/services/apply/mapCatalog.js +153 -0
- package/lib/services/apply/mapCatalog.js.map +1 -0
- package/lib/services/apply/mapLimitHome.d.ts +66 -0
- package/lib/services/apply/mapLimitHome.d.ts.map +1 -0
- package/lib/services/apply/mapLimitHome.js +152 -0
- package/lib/services/apply/mapLimitHome.js.map +1 -0
- package/lib/services/apply/paths.d.ts +87 -0
- package/lib/services/apply/paths.d.ts.map +1 -0
- package/lib/services/apply/paths.js +99 -0
- package/lib/services/apply/paths.js.map +1 -0
- package/lib/services/apply/payLaterLimitRequest.d.ts +19 -0
- package/lib/services/apply/payLaterLimitRequest.d.ts.map +1 -0
- package/lib/services/apply/payLaterLimitRequest.js +91 -0
- package/lib/services/apply/payLaterLimitRequest.js.map +1 -0
- package/lib/services/apply/productBucket.d.ts +75 -0
- package/lib/services/apply/productBucket.d.ts.map +1 -0
- package/lib/services/apply/productBucket.js +224 -0
- package/lib/services/apply/productBucket.js.map +1 -0
- package/lib/services/apply/referralDetails.d.ts +26 -0
- package/lib/services/apply/referralDetails.d.ts.map +1 -0
- package/lib/services/apply/referralDetails.js +187 -0
- package/lib/services/apply/referralDetails.js.map +1 -0
- package/lib/services/apply/repayLoan.d.ts +9 -0
- package/lib/services/apply/repayLoan.d.ts.map +1 -0
- package/lib/services/apply/repayLoan.js +58 -0
- package/lib/services/apply/repayLoan.js.map +1 -0
- package/lib/services/apply/sdkSession.d.ts +12 -0
- package/lib/services/apply/sdkSession.d.ts.map +1 -0
- package/lib/services/apply/sdkSession.js +104 -0
- package/lib/services/apply/sdkSession.js.map +1 -0
- package/lib/services/apply/statementBanks.d.ts +4 -0
- package/lib/services/apply/statementBanks.d.ts.map +1 -0
- package/lib/services/apply/statementBanks.js +17 -0
- package/lib/services/apply/statementBanks.js.map +1 -0
- package/lib/services/apply/statementParseBanks.d.ts +8 -0
- package/lib/services/apply/statementParseBanks.d.ts.map +1 -0
- package/lib/services/apply/statementParseBanks.js +84 -0
- package/lib/services/apply/statementParseBanks.js.map +1 -0
- package/lib/services/apply/sublimitDowngrade.d.ts +5 -0
- package/lib/services/apply/sublimitDowngrade.d.ts.map +1 -0
- package/lib/services/apply/sublimitDowngrade.js +27 -0
- package/lib/services/apply/sublimitDowngrade.js.map +1 -0
- package/lib/services/apply/sublimitRequestDetails.d.ts +5 -0
- package/lib/services/apply/sublimitRequestDetails.d.ts.map +1 -0
- package/lib/services/apply/sublimitRequestDetails.js +31 -0
- package/lib/services/apply/sublimitRequestDetails.js.map +1 -0
- package/lib/services/apply/walletBanks.d.ts +3 -0
- package/lib/services/apply/walletBanks.d.ts.map +1 -0
- package/lib/services/apply/walletBanks.js +14 -0
- package/lib/services/apply/walletBanks.js.map +1 -0
- package/lib/services/customerBoot.d.ts +4 -0
- package/lib/services/customerBoot.d.ts.map +1 -0
- package/lib/services/customerBoot.js +103 -0
- package/lib/services/customerBoot.js.map +1 -0
- package/lib/services/customerRuntime.d.ts +36 -0
- package/lib/services/customerRuntime.d.ts.map +1 -0
- package/lib/services/customerRuntime.js +40 -0
- package/lib/services/customerRuntime.js.map +1 -0
- package/lib/services/deviceInfo.d.ts +7 -0
- package/lib/services/deviceInfo.d.ts.map +1 -0
- package/lib/services/deviceInfo.js +22 -0
- package/lib/services/deviceInfo.js.map +1 -0
- package/lib/services/gatewayHash.d.ts +57 -0
- package/lib/services/gatewayHash.d.ts.map +1 -0
- package/lib/services/gatewayHash.js +382 -0
- package/lib/services/gatewayHash.js.map +1 -0
- package/lib/services/http.d.ts +30 -0
- package/lib/services/http.d.ts.map +1 -0
- package/lib/services/http.js +122 -0
- package/lib/services/http.js.map +1 -0
- package/lib/services/httpRuntime.d.ts +39 -0
- package/lib/services/httpRuntime.d.ts.map +1 -0
- package/lib/services/httpRuntime.js +122 -0
- package/lib/services/httpRuntime.js.map +1 -0
- package/lib/services/md5.d.ts +3 -0
- package/lib/services/md5.d.ts.map +1 -0
- package/lib/services/md5.js +134 -0
- package/lib/services/md5.js.map +1 -0
- package/lib/services/pickDocument.d.ts +15 -0
- package/lib/services/pickDocument.d.ts.map +1 -0
- package/lib/services/pickDocument.js +11 -0
- package/lib/services/pickDocument.js.map +1 -0
- package/lib/services/serviceHelper.d.ts +2 -0
- package/lib/services/serviceHelper.d.ts.map +1 -0
- package/lib/services/serviceHelper.js +19 -0
- package/lib/services/serviceHelper.js.map +1 -0
- package/lib/theme/brandColor.d.ts +8 -0
- package/lib/theme/brandColor.d.ts.map +1 -0
- package/lib/theme/brandColor.js +30 -0
- package/lib/theme/brandColor.js.map +1 -0
- package/lib/theme/fonts.d.ts +12 -0
- package/lib/theme/fonts.d.ts.map +1 -0
- package/lib/theme/fonts.js +18 -0
- package/lib/theme/fonts.js.map +1 -0
- package/lib/utils/fontScale.d.ts +13 -0
- package/lib/utils/fontScale.d.ts.map +1 -0
- package/lib/utils/fontScale.js +17 -0
- package/lib/utils/fontScale.js.map +1 -0
- package/lib/utils/formatAmount.d.ts +28 -0
- package/lib/utils/formatAmount.d.ts.map +1 -0
- package/lib/utils/formatAmount.js +88 -0
- package/lib/utils/formatAmount.js.map +1 -0
- package/lib/utils/messageCleaner.d.ts +2 -0
- package/lib/utils/messageCleaner.d.ts.map +1 -0
- package/lib/utils/messageCleaner.js +11 -0
- package/lib/utils/messageCleaner.js.map +1 -0
- package/lib/utils/responseObserver.d.ts +10 -0
- package/lib/utils/responseObserver.d.ts.map +1 -0
- package/lib/utils/responseObserver.js +50 -0
- package/lib/utils/responseObserver.js.map +1 -0
- package/lib/web/index.d.ts +8 -0
- package/lib/web/index.d.ts.map +1 -0
- package/lib/web/index.js +7 -0
- package/lib/web/index.js.map +1 -0
- package/package.json +49 -4
- package/react-native.config.js +3 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { DEFAULT_BRAND_COLOR, onBrandColor, resolveBrandColor } from "../../theme/brandColor";
|
|
4
|
+
const BrandColorContext = React.createContext(DEFAULT_BRAND_COLOR);
|
|
5
|
+
export function BrandColorProvider(props) {
|
|
6
|
+
const value = resolveBrandColor(props.color);
|
|
7
|
+
return _jsx(BrandColorContext.Provider, { value: value, children: props.children });
|
|
8
|
+
}
|
|
9
|
+
export function useBrandColor() {
|
|
10
|
+
return React.useContext(BrandColorContext);
|
|
11
|
+
}
|
|
12
|
+
/** Primary fill + contrasting label/spinner for host `config.color`. */
|
|
13
|
+
export function useBrandCta() {
|
|
14
|
+
const backgroundColor = useBrandColor();
|
|
15
|
+
const onColor = onBrandColor(backgroundColor);
|
|
16
|
+
return {
|
|
17
|
+
backgroundColor,
|
|
18
|
+
onColor,
|
|
19
|
+
fill: { backgroundColor },
|
|
20
|
+
label: { color: onColor },
|
|
21
|
+
spinner: onColor
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=BrandColorProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrandColorProvider.js","sourceRoot":"","sources":["../../../src/sdk/providers/BrandColorProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE9F,MAAM,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;AAEnE,MAAM,UAAU,kBAAkB,CAAC,KAAoD;IACrF,MAAM,KAAK,GAAG,iBAAiB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC7C,OAAO,KAAC,iBAAiB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,KAAK,CAAC,QAAQ,GAA8B,CAAC;AACjG,CAAC;AAED,MAAM,UAAU,aAAa;IAC3B,OAAO,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;AAC7C,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,WAAW;IACzB,MAAM,eAAe,GAAG,aAAa,EAAE,CAAC;IACxC,MAAM,OAAO,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;IAC9C,OAAO;QACL,eAAe;QACf,OAAO;QACP,IAAI,EAAE,EAAE,eAAe,EAAE;QACzB,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;QACzB,OAAO,EAAE,OAAO;KACjB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PayLimitProvider.d.ts","sourceRoot":"","sources":["../../../src/sdk/providers/PayLimitProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PayLimitProvider.js","sourceRoot":"","sources":["../../../src/sdk/providers/PayLimitProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SDKFontProvider.d.ts","sourceRoot":"","sources":["../../../src/sdk/providers/SDKFontProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,wBAAgB,eAAe,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBAgBnE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { ActivityIndicator, StyleSheet, View } from "react-native";
|
|
3
|
+
import { useFonts } from "expo-font";
|
|
4
|
+
import { getSdkFontLoadMap } from "../../theme/fonts";
|
|
5
|
+
export function SDKFontProvider(props) {
|
|
6
|
+
const [fontsLoaded, fontError] = useFonts(getSdkFontLoadMap());
|
|
7
|
+
if (fontError && __DEV__) {
|
|
8
|
+
console.warn("[Lending] Font load error:", fontError);
|
|
9
|
+
}
|
|
10
|
+
if (!fontsLoaded && !fontError) {
|
|
11
|
+
return (_jsx(View, { style: styles.bootWrap, accessibilityLabel: "Loading fonts", children: _jsx(ActivityIndicator, { size: "large", color: "#111827" }) }));
|
|
12
|
+
}
|
|
13
|
+
return _jsx(_Fragment, { children: props.children });
|
|
14
|
+
}
|
|
15
|
+
const styles = StyleSheet.create({
|
|
16
|
+
bootWrap: {
|
|
17
|
+
flex: 1,
|
|
18
|
+
alignItems: "center",
|
|
19
|
+
justifyContent: "center",
|
|
20
|
+
backgroundColor: "#ffffff"
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=SDKFontProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SDKFontProvider.js","sourceRoot":"","sources":["../../../src/sdk/providers/SDKFontProvider.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,UAAU,eAAe,CAAC,KAAoC;IAClE,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,iBAAiB,EAAE,CAAC,CAAC;IAE/D,IAAI,SAAS,IAAI,OAAO,EAAE,CAAC;QACzB,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE,SAAS,CAAC,CAAC;IACxD,CAAC;IAED,IAAI,CAAC,WAAW,IAAI,CAAC,SAAS,EAAE,CAAC;QAC/B,OAAO,CACL,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,kBAAkB,EAAC,eAAe,YAC9D,KAAC,iBAAiB,IAAC,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,SAAS,GAAG,GAC7C,CACR,CAAC;IACJ,CAAC;IAED,OAAO,4BAAG,KAAK,CAAC,QAAQ,GAAI,CAAC;AAC/B,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,QAAQ,EAAE;QACR,IAAI,EAAE,CAAC;QACP,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,eAAe,EAAE,SAAS;KAC3B;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SDKProviders.d.ts","sourceRoot":"","sources":["../../../src/sdk/providers/SDKProviders.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,qBAYrF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { SafeAreaProvider } from "react-native-safe-area-context";
|
|
3
|
+
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
|
4
|
+
import { SDKFontProvider } from "./SDKFontProvider";
|
|
5
|
+
import { ToastProvider } from "./ToastProvider";
|
|
6
|
+
import { BrandColorProvider } from "./BrandColorProvider";
|
|
7
|
+
export function SDKProviders(props) {
|
|
8
|
+
return (_jsx(GestureHandlerRootView, { style: { flex: 1, backgroundColor: "#ffffff" }, children: _jsx(SafeAreaProvider, { children: _jsx(SDKFontProvider, { children: _jsx(BrandColorProvider, { color: props.brandColor, children: _jsx(ToastProvider, { children: props.children }) }) }) }) }));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=SDKProviders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SDKProviders.js","sourceRoot":"","sources":["../../../src/sdk/providers/SDKProviders.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,UAAU,YAAY,CAAC,KAAyD;IACpF,OAAO,CACL,KAAC,sBAAsB,IAAC,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,eAAe,EAAE,SAAS,EAAE,YACpE,KAAC,gBAAgB,cACf,KAAC,eAAe,cACd,KAAC,kBAAkB,IAAC,KAAK,EAAE,KAAK,CAAC,UAAU,YACzC,KAAC,aAAa,cAAE,KAAK,CAAC,QAAQ,GAAiB,GAC5B,GACL,GACD,GACI,CAC1B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToastProvider.d.ts","sourceRoot":"","sources":["../../../src/sdk/providers/ToastProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,wBAAgB,aAAa,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBAkCjE"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Modal, StyleSheet, Text, View } from "react-native";
|
|
4
|
+
import { GorditaFamily } from "../../theme/fonts";
|
|
5
|
+
import { sdkTypography } from "../../utils/fontScale";
|
|
6
|
+
import { setGlobalToastHandler } from "../../utils/responseObserver";
|
|
7
|
+
export function ToastProvider(props) {
|
|
8
|
+
const [toast, setToast] = React.useState({ visible: false, message: "" });
|
|
9
|
+
const timeoutRef = React.useRef(null);
|
|
10
|
+
const showToast = React.useCallback((message, durationMs) => {
|
|
11
|
+
const hold = durationMs ?? Math.min(8000, Math.max(2800, message.length * 40));
|
|
12
|
+
setToast({ visible: true, message });
|
|
13
|
+
if (timeoutRef.current)
|
|
14
|
+
clearTimeout(timeoutRef.current);
|
|
15
|
+
timeoutRef.current = setTimeout(() => {
|
|
16
|
+
setToast({ visible: false, message: "" });
|
|
17
|
+
timeoutRef.current = null;
|
|
18
|
+
}, hold);
|
|
19
|
+
}, []);
|
|
20
|
+
React.useEffect(() => {
|
|
21
|
+
setGlobalToastHandler(showToast);
|
|
22
|
+
return () => {
|
|
23
|
+
setGlobalToastHandler(null);
|
|
24
|
+
if (timeoutRef.current)
|
|
25
|
+
clearTimeout(timeoutRef.current);
|
|
26
|
+
};
|
|
27
|
+
}, [showToast]);
|
|
28
|
+
return (_jsxs(View, { style: styles.root, children: [_jsx(View, { style: styles.content, children: props.children }), _jsx(Modal, { transparent: true, animationType: "fade", visible: toast.visible, statusBarTranslucent: true, onRequestClose: () => undefined, children: _jsx(View, { pointerEvents: "none", style: styles.toastWrap, children: _jsx(View, { style: styles.toast, children: _jsx(Text, { style: styles.toastText, children: toast.message }) }) }) })] }));
|
|
29
|
+
}
|
|
30
|
+
const styles = StyleSheet.create({
|
|
31
|
+
root: { flex: 1 },
|
|
32
|
+
content: { flex: 1 },
|
|
33
|
+
toastWrap: {
|
|
34
|
+
flex: 1,
|
|
35
|
+
justifyContent: "flex-end",
|
|
36
|
+
alignItems: "center",
|
|
37
|
+
paddingHorizontal: 16,
|
|
38
|
+
paddingBottom: 40
|
|
39
|
+
},
|
|
40
|
+
toast: {
|
|
41
|
+
backgroundColor: "rgba(17, 24, 39, 0.95)",
|
|
42
|
+
paddingHorizontal: 14,
|
|
43
|
+
paddingVertical: 10,
|
|
44
|
+
borderRadius: 12,
|
|
45
|
+
maxWidth: 520
|
|
46
|
+
},
|
|
47
|
+
toastText: {
|
|
48
|
+
fontFamily: GorditaFamily.medium,
|
|
49
|
+
color: "#ffffff",
|
|
50
|
+
fontSize: sdkTypography.body
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
//# sourceMappingURL=ToastProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToastProvider.js","sourceRoot":"","sources":["../../../src/sdk/providers/ToastProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAIrE,MAAM,UAAU,aAAa,CAAC,K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AAC;AAa/B,wBAAgB,uBAAuB,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,IAAI,CAAA;CAAE,qBA2CxF"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { ActivityIndicator, Pressable, StyleSheet, Text, View } from "react-native";
|
|
4
|
+
import { ScreenHeader } from "../../components/ScreenHeader";
|
|
5
|
+
import { GET } from "../../services/http";
|
|
6
|
+
import { GorditaFamily } from "../../theme/fonts";
|
|
7
|
+
import { sdkTypography } from "../../utils/fontScale";
|
|
8
|
+
export function InterceptAndToastScreen(props) {
|
|
9
|
+
const [loading, setLoading] = React.useState(false);
|
|
10
|
+
const [result, setResult] = React.useState(null);
|
|
11
|
+
const run = React.useCallback(async () => {
|
|
12
|
+
setLoading(true);
|
|
13
|
+
try {
|
|
14
|
+
const body = await GET({ requestUrl: "/mocked/error" });
|
|
15
|
+
setResult(body);
|
|
16
|
+
}
|
|
17
|
+
catch (e) {
|
|
18
|
+
setResult({ thrown: e instanceof Error ? e.message : String(e) });
|
|
19
|
+
}
|
|
20
|
+
finally {
|
|
21
|
+
setLoading(false);
|
|
22
|
+
}
|
|
23
|
+
}, []);
|
|
24
|
+
return (_jsxs(View, { style: styles.page, children: [_jsx(ScreenHeader, { title: "Interceptor + Toast", onBack: props.onGoBack }), _jsxs(View, { style: styles.container, children: [_jsx(Text, { style: styles.subtitle, children: "Calls `/mocked/error` (expected 400 + status:false)" }), _jsxs(Text, { style: styles.body, children: ["Environment: ", props.envLabel] }), _jsx(View, { style: styles.row, children: _jsx(Pressable, { accessibilityRole: "button", onPress: run, disabled: loading, style: [styles.button, loading ? styles.buttonDisabled : null], children: loading ? _jsx(ActivityIndicator, { color: "#ffffff" }) : _jsx(Text, { style: styles.buttonText, children: "GET /mocked/error" }) }) }), _jsx(Text, { style: styles.body, children: "Response (returned or thrown):" }), _jsx(Text, { style: styles.code, children: JSON.stringify(result, null, 2) }), _jsx(Text, { style: styles.hint, children: "If your interceptor is working, you should see a toast once, and this screen should still receive the body (not throw) for intercepted statuses." })] })] }));
|
|
25
|
+
}
|
|
26
|
+
const styles = StyleSheet.create({
|
|
27
|
+
page: {
|
|
28
|
+
flex: 1,
|
|
29
|
+
backgroundColor: "#F8F9FA"
|
|
30
|
+
},
|
|
31
|
+
container: {
|
|
32
|
+
flex: 1,
|
|
33
|
+
padding: 16,
|
|
34
|
+
alignItems: "center",
|
|
35
|
+
justifyContent: "center"
|
|
36
|
+
},
|
|
37
|
+
row: {
|
|
38
|
+
flexDirection: "row",
|
|
39
|
+
marginTop: 14,
|
|
40
|
+
marginBottom: 14
|
|
41
|
+
},
|
|
42
|
+
subtitle: {
|
|
43
|
+
fontFamily: GorditaFamily.regular,
|
|
44
|
+
fontSize: sdkTypography.subtitle,
|
|
45
|
+
opacity: 0.8,
|
|
46
|
+
textAlign: "center",
|
|
47
|
+
marginBottom: 10
|
|
48
|
+
},
|
|
49
|
+
body: {
|
|
50
|
+
fontFamily: GorditaFamily.regular,
|
|
51
|
+
fontSize: sdkTypography.body,
|
|
52
|
+
opacity: 0.9,
|
|
53
|
+
marginBottom: 6,
|
|
54
|
+
textAlign: "center"
|
|
55
|
+
},
|
|
56
|
+
code: {
|
|
57
|
+
fontFamily: GorditaFamily.regular,
|
|
58
|
+
fontSize: sdkTypography.small,
|
|
59
|
+
opacity: 0.85,
|
|
60
|
+
textAlign: "left",
|
|
61
|
+
width: "100%",
|
|
62
|
+
maxWidth: 520,
|
|
63
|
+
marginTop: 6
|
|
64
|
+
},
|
|
65
|
+
hint: {
|
|
66
|
+
fontFamily: GorditaFamily.regular,
|
|
67
|
+
fontSize: sdkTypography.small,
|
|
68
|
+
opacity: 0.7,
|
|
69
|
+
textAlign: "center",
|
|
70
|
+
marginTop: 12,
|
|
71
|
+
maxWidth: 520
|
|
72
|
+
},
|
|
73
|
+
button: {
|
|
74
|
+
paddingHorizontal: 14,
|
|
75
|
+
paddingVertical: 10,
|
|
76
|
+
borderRadius: 10,
|
|
77
|
+
backgroundColor: "#111827",
|
|
78
|
+
minWidth: 150,
|
|
79
|
+
alignItems: "center",
|
|
80
|
+
justifyContent: "center"
|
|
81
|
+
},
|
|
82
|
+
buttonDisabled: {
|
|
83
|
+
opacity: 0.7
|
|
84
|
+
},
|
|
85
|
+
buttonText: {
|
|
86
|
+
fontFamily: GorditaFamily.medium,
|
|
87
|
+
color: "#ffffff",
|
|
88
|
+
fontSize: sdkTypography.body
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
//# sourceMappingURL=InterceptAndToastScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InterceptAndToastScreen.js","sourceRoot":"","sources":["../../../src/sdk/screens/InterceptAndToastScreen.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAQtD,MAAM,UAAU,uBAAuB,CAAC,KAAiD;IACvF,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAU,IAAI,CAAC,CAAC;IAE1D,MAAM,GAAG,GAAG,KAAK,CAAC,WAAW,CAAC,KAAK,IAAI,EAAE;QACvC,UAAU,CAAC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AC,OAAO;QACjC,QAAQ,EAAE,aAAa,CAAC,KAAK;QAC7B,OAAO,EAAE,GAAG;QACZ,SAAS,EAAE,QAAQ;QACnB,SAAS,EAAE,EAAE;QACb,QAAQ,EAAE,GAAG;KACd;IACD,MAAM,EAAE;QACN,iBAAiB,EAAE,EAAE;QACrB,eAAe,EAAE,EAAE;QACnB,YAAY,EAAE,EAAE;QAChB,eAAe,EAAE,SAAS;QAC1B,QAAQ,EAAE,GAAG;QACb,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;KACzB;IACD,cAAc,EAAE;QACd,OAAO,EAAE,GAAG;KACb;IACD,UAAU,EAAE;QACV,UAAU,EAAE,aAAa,CAAC,MAAM;QAChC,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,aAAa,CAAC,IAAI;KAC7B;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { LimitStatus } from "../types";
|
|
3
|
+
export type SDKScreenName = "lending_home" | "credit_upgrade" | "repay_credit" | "transactions" | "credit_history" | "credit_receipt" | "lending_blank_detail" | "intercept_and_toast";
|
|
4
|
+
export type SDKScreenParamsMap = {
|
|
5
|
+
lending_home: undefined;
|
|
6
|
+
credit_upgrade: {
|
|
7
|
+
signed: boolean;
|
|
8
|
+
amount: number;
|
|
9
|
+
productTitle: string;
|
|
10
|
+
};
|
|
11
|
+
repay_credit: undefined;
|
|
12
|
+
transactions: undefined;
|
|
13
|
+
credit_history: {
|
|
14
|
+
brandName: string;
|
|
15
|
+
subLimitId: string;
|
|
16
|
+
sublimitReference: string;
|
|
17
|
+
};
|
|
18
|
+
credit_receipt: {
|
|
19
|
+
brandName: string;
|
|
20
|
+
subLimitId: string;
|
|
21
|
+
sublimitReference: string;
|
|
22
|
+
transactionId: string;
|
|
23
|
+
orderId: string;
|
|
24
|
+
amount: number;
|
|
25
|
+
createdDate: string;
|
|
26
|
+
description: string;
|
|
27
|
+
transactionType: string;
|
|
28
|
+
};
|
|
29
|
+
lending_blank_detail: undefined;
|
|
30
|
+
intercept_and_toast: undefined;
|
|
31
|
+
};
|
|
32
|
+
export type ScreenContext = {
|
|
33
|
+
envLabel: string;
|
|
34
|
+
tokenPresent: boolean;
|
|
35
|
+
hasLimit: boolean;
|
|
36
|
+
limitStatus: LimitStatus;
|
|
37
|
+
hasActiveCredit: boolean;
|
|
38
|
+
isPayLimit: boolean;
|
|
39
|
+
navigate: <N extends SDKScreenName>(name: N, params: SDKScreenParamsMap[N]) => void;
|
|
40
|
+
};
|
|
41
|
+
export declare function renderScreen(name: SDKScreenName, ctx: ScreenContext, params: SDKScreenParamsMap[SDKScreenName]): React.ReactNode;
|
|
42
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/sdk/screens/registry.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,MAAM,MAAM,aAAa,GACrB,cAAc,GACd,gBAAgB,GAChB,cAAc,GACd,cAAc,GACd,gBAAgB,GAChB,gBAAgB,GAChB,sBAAsB,GACtB,qBAAqB,CAAC;AAE1B,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,EAAE,SAAS,CAAC;IACxB,cAAc,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1E,YAAY,EAAE,SAAS,CAAC;IACxB,YAAY,EAAE,SAAS,CAAC;IACxB,cAAc,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,iBAAiB,EAAE,MAAM,CAAA;KAAE,CAAC;IACrF,cAAc,EAAE;QACd,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,aAAa,EAAE,MAAM,CAAC;QACtB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC;QACpB,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,oBAAoB,EAAE,SAAS,CAAC;IAChC,mBAAmB,EAAE,SAAS,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,WAAW,CAAC;IACzB,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,CAAC,SAAS,aAAa,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;CACrF,CAAC;AAsEF,wBAAgB,YAAY,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,EAAE,kBAAkB,CAAC,aAAa,CAAC,mBAE9G"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import CreditFlow from "../../flows/lending/CreditFlow";
|
|
3
|
+
import { ApplyCreditFlow } from "../../flows/lending/ApplyCreditFlow";
|
|
4
|
+
import LendingDetailsScreen from "../../flows/lending/LendingDetails.screen";
|
|
5
|
+
import { CreditHistoryScreen } from "../../flows/lending/CreditHistory.screen";
|
|
6
|
+
import { CreditReceiptScreen } from "../../flows/lending/CreditReceipt.screen";
|
|
7
|
+
import { RepayCreditScreen } from "../../flows/lending/RepayCredit.screen";
|
|
8
|
+
import { TransactionsScreen } from "../../flows/lending/Transactions.screen";
|
|
9
|
+
import { InterceptAndToastScreen } from "./InterceptAndToastScreen";
|
|
10
|
+
const screenRenderers = {
|
|
11
|
+
lending_home: (ctx) => (_jsx(CreditFlow, { envLabel: ctx.envLabel, tokenPresent: ctx.tokenPresent, hasLimit: ctx.hasLimit, limitStatus: ctx.limitStatus, isPayLimit: ctx.isPayLimit, navigate: ctx.navigate })),
|
|
12
|
+
credit_upgrade: (ctx, params) => (_jsx(ApplyCreditFlow, { amount: params.amount, onBack: () => ctx.navigate("lending_home", undefined) })),
|
|
13
|
+
repay_credit: (ctx) => (_jsx(RepayCreditScreen, { hasActiveCredit: ctx.hasActiveCredit, onBack: () => ctx.navigate("lending_home", undefined) })),
|
|
14
|
+
transactions: (ctx) => _jsx(TransactionsScreen, { onBack: () => ctx.navigate("lending_home", undefined) }),
|
|
15
|
+
credit_history: (ctx, params) => (_jsx(CreditHistoryScreen, { brandName: params.brandName, subLimitId: params.subLimitId, sublimitReference: params.sublimitReference, onBack: () => ctx.navigate("lending_home", undefined), onReceipt: (tx) => {
|
|
16
|
+
if (!tx.transactionId)
|
|
17
|
+
return;
|
|
18
|
+
ctx.navigate("credit_receipt", {
|
|
19
|
+
brandName: params.brandName,
|
|
20
|
+
subLimitId: params.subLimitId,
|
|
21
|
+
sublimitReference: params.sublimitReference,
|
|
22
|
+
transactionId: tx.transactionId,
|
|
23
|
+
orderId: tx.orderId,
|
|
24
|
+
amount: tx.amount,
|
|
25
|
+
createdDate: tx.createdDate,
|
|
26
|
+
description: tx.description,
|
|
27
|
+
transactionType: tx.transactionType
|
|
28
|
+
});
|
|
29
|
+
} })),
|
|
30
|
+
credit_receipt: (ctx, params) => (_jsx(CreditReceiptScreen, { brandName: params.brandName, transactionId: params.transactionId, orderId: params.orderId, amount: params.amount, createdDate: params.createdDate, description: params.description, transactionType: params.transactionType, onBack: () => ctx.navigate("credit_history", {
|
|
31
|
+
brandName: params.brandName,
|
|
32
|
+
subLimitId: params.subLimitId,
|
|
33
|
+
sublimitReference: params.sublimitReference
|
|
34
|
+
}) })),
|
|
35
|
+
lending_blank_detail: (ctx) => (_jsx(LendingDetailsScreen, { onGoBack: () => ctx.navigate("lending_home", undefined) })),
|
|
36
|
+
intercept_and_toast: (ctx) => (_jsx(InterceptAndToastScreen, { envLabel: ctx.envLabel, onGoBack: () => ctx.navigate("lending_home", undefined) }))
|
|
37
|
+
};
|
|
38
|
+
export function renderScreen(name, ctx, params) {
|
|
39
|
+
return screenRenderers[name](ctx, params);
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/sdk/screens/registry.tsx"],"names":[],"mappings":";AACA,OAAO,UAAU,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,oBAAoB,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AA8CpE,MAAM,eAAe,GAAgD;IACnE,YAAY,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CACrB,KAAC,UAAU,IACT,QAAQ,EAAE,GAAG,CAAC,QAAQ,EACtB,YAAY,EAAE,GAAG,CAAC,YAAY,EAC9B,QAAQ,EAAE,GAAG,CAAC,QAAQ,EACtB,WAAW,EAAE,GAAG,CAAC,WAAW,EAC5B,UAAU,EAAE,GAAG,CAAC,UAAU,EAC1B,QAAQ,EAAE,GAAG,CAAC,QAAQ,GACtB,CACH;IACD,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,E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|
+
export type SDKEvent = {
|
|
2
|
+
name: "sdk_mounted";
|
|
3
|
+
payload?: undefined;
|
|
4
|
+
} | {
|
|
5
|
+
name: "sdk_init_error";
|
|
6
|
+
payload: {
|
|
7
|
+
message: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
/** Limit home: never applied, in review, declined, or already has a limit. */
|
|
11
|
+
export type LimitStatus = "none" | "pending" | "rejected" | "on";
|
|
12
|
+
export declare function resolveLimitStatus(limit?: LimitStatus | "off"): LimitStatus;
|
|
13
|
+
export declare const BUSINESS_LINE_OPTIONS: readonly [{
|
|
14
|
+
readonly label: "Manufacturer";
|
|
15
|
+
readonly value: 1;
|
|
16
|
+
}, {
|
|
17
|
+
readonly label: "Distributor";
|
|
18
|
+
readonly value: 2;
|
|
19
|
+
}, {
|
|
20
|
+
readonly label: "HORECA";
|
|
21
|
+
readonly value: 3;
|
|
22
|
+
}, {
|
|
23
|
+
readonly label: "Modern Trade";
|
|
24
|
+
readonly value: 4;
|
|
25
|
+
}, {
|
|
26
|
+
readonly label: "Retailers";
|
|
27
|
+
readonly value: 5;
|
|
28
|
+
}, {
|
|
29
|
+
readonly label: "Consumers";
|
|
30
|
+
readonly value: 6;
|
|
31
|
+
}, {
|
|
32
|
+
readonly label: "Others";
|
|
33
|
+
readonly value: 7;
|
|
34
|
+
}];
|
|
35
|
+
export declare const BUSINESS_LINE_RETAILER_ID = 5;
|
|
36
|
+
export declare const BUSINESS_LINE_OTHERS_ID = 7;
|
|
37
|
+
export declare const COUNTRY_CODE_NIGERIA = 1;
|
|
38
|
+
export type BusinessLineOption = (typeof BUSINESS_LINE_OPTIONS)[number];
|
|
39
|
+
export type BusinessLineId = BusinessLineOption["value"];
|
|
40
|
+
/** Hosts pass a business-line option `value`. Default Others (7). */
|
|
41
|
+
export declare function resolveBusinessLineId(value: unknown): number;
|
|
42
|
+
/** Hosts pass a numeric country code. Default Nigeria (1). */
|
|
43
|
+
export declare function resolveCountryCode(value: unknown): number;
|
|
44
|
+
/** Retailer (5) or any country other than Nigeria (1) uses the PayLimit apply/home flow. */
|
|
45
|
+
export declare function resolveIsPayLimit(input?: {
|
|
46
|
+
businessLineId?: unknown;
|
|
47
|
+
countryCode?: unknown;
|
|
48
|
+
}): boolean;
|
|
49
|
+
export type SDKConfig = {
|
|
50
|
+
accessToken?: string;
|
|
51
|
+
/** ompy host. Wallet customer details, banks, KYC agreement, repay POST. */
|
|
52
|
+
apiBaseUrl: string;
|
|
53
|
+
/** OmniPay loan host. Session auth, brands, products, statements, repay list. */
|
|
54
|
+
loanApiBaseUrl: string;
|
|
55
|
+
publicKey: string;
|
|
56
|
+
customerPhone: string;
|
|
57
|
+
/**
|
|
58
|
+
* Session from the host `createSdkSession` call.
|
|
59
|
+
* The SDK authenticates this before `getCustomerDetails` and Limit home.
|
|
60
|
+
*/
|
|
61
|
+
sessionId: string;
|
|
62
|
+
/** Query `customerRef` for getCustomerDetails. */
|
|
63
|
+
customerRef?: string;
|
|
64
|
+
/** Query `userRef` for getCustomerDetails. */
|
|
65
|
+
userRef?: string;
|
|
66
|
+
/** Gateway `redirectservice` header. Defaults to `wallet`. */
|
|
67
|
+
redirectService?: string;
|
|
68
|
+
/** Gateway `redirecturl` header. Defaults to empty (used in generated `hash`). */
|
|
69
|
+
redirectUrl?: string;
|
|
70
|
+
onTokenExpired?: () => void;
|
|
71
|
+
interceptedStatusCodes?: number[];
|
|
72
|
+
onEvent?: (event: SDKEvent) => void;
|
|
73
|
+
/**
|
|
74
|
+
* Host business line option `value`. Default `7` (Others).
|
|
75
|
+
* `5` (Retailers) uses the PayLimit apply/home flow.
|
|
76
|
+
*/
|
|
77
|
+
businessLineId?: number;
|
|
78
|
+
/**
|
|
79
|
+
* Host country code. Default `1` (Nigeria).
|
|
80
|
+
* Any value other than `1` uses the PayLimit apply/home flow.
|
|
81
|
+
*/
|
|
82
|
+
countryCode?: number;
|
|
83
|
+
/**
|
|
84
|
+
* Device identity for repayLoan `device`. Host should pass these from the parent app.
|
|
85
|
+
* If omitted, the SDK uses a session fallback (`Platform.OS` + uuid). No Expo modules.
|
|
86
|
+
*/
|
|
87
|
+
deviceId?: string;
|
|
88
|
+
deviceName?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Brand color for primary button fills and the active PIN box border.
|
|
91
|
+
* CTA label/spinner contrast is derived from this. Optional. Defaults to `#000000`.
|
|
92
|
+
*/
|
|
93
|
+
color?: string;
|
|
94
|
+
/** Host file picker for Proof of Account. Return selected documents or null if cancelled. */
|
|
95
|
+
onPickDocument?: (opts?: {
|
|
96
|
+
types?: string[];
|
|
97
|
+
multiple?: boolean;
|
|
98
|
+
}) => Promise<Array<{
|
|
99
|
+
name: string;
|
|
100
|
+
uri: string;
|
|
101
|
+
mimeType?: string;
|
|
102
|
+
}> | null | undefined>;
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/sdk/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAChB;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,OAAO,CAAC,EAAE,SAAS,CAAA;CAAE,GAC5C;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,OAAO,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC;AAE7D,8EAA8E;AAC9E,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,IAAI,CAAC;AAEjE,wBAAgB,kBAAkB,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,WAAW,CAG3E;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;EAQxB,CAAC;AAEX,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAC3C,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC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IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6FAA6F;IAC7F,cAAc,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;QACvB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,KAAK,OAAO,CAAC,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;CAC3F,CAAC"}
|
package/lib/sdk/types.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export function resolveLimitStatus(limit) {
|
|
2
|
+
if (limit === "on" || limit === "pending" || limit === "rejected" || limit === "none")
|
|
3
|
+
return limit;
|
|
4
|
+
return "none";
|
|
5
|
+
}
|
|
6
|
+
export const BUSINESS_LINE_OPTIONS = [
|
|
7
|
+
{ label: "Manufacturer", value: 1 },
|
|
8
|
+
{ label: "Distributor", value: 2 },
|
|
9
|
+
{ label: "HORECA", value: 3 },
|
|
10
|
+
{ label: "Modern Trade", value: 4 },
|
|
11
|
+
{ label: "Retailers", value: 5 },
|
|
12
|
+
{ label: "Consumers", value: 6 },
|
|
13
|
+
{ label: "Others", value: 7 }
|
|
14
|
+
];
|
|
15
|
+
export const BUSINESS_LINE_RETAILER_ID = 5;
|
|
16
|
+
export const BUSINESS_LINE_OTHERS_ID = 7;
|
|
17
|
+
export const COUNTRY_CODE_NIGERIA = 1;
|
|
18
|
+
function asPositiveInt(value) {
|
|
19
|
+
if (typeof value === "number" && Number.isFinite(value))
|
|
20
|
+
return Math.trunc(value);
|
|
21
|
+
if (typeof value === "string" && value.trim()) {
|
|
22
|
+
const n = Number(value.trim());
|
|
23
|
+
if (Number.isFinite(n))
|
|
24
|
+
return Math.trunc(n);
|
|
25
|
+
}
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
/** Hosts pass a business-line option `value`. Default Others (7). */
|
|
29
|
+
export function resolveBusinessLineId(value) {
|
|
30
|
+
const n = asPositiveInt(value);
|
|
31
|
+
if (n != null && BUSINESS_LINE_OPTIONS.some((row) => row.value === n))
|
|
32
|
+
return n;
|
|
33
|
+
return BUSINESS_LINE_OTHERS_ID;
|
|
34
|
+
}
|
|
35
|
+
/** Hosts pass a numeric country code. Default Nigeria (1). */
|
|
36
|
+
export function resolveCountryCode(value) {
|
|
37
|
+
const n = asPositiveInt(value);
|
|
38
|
+
if (n != null && n > 0)
|
|
39
|
+
return n;
|
|
40
|
+
return COUNTRY_CODE_NIGERIA;
|
|
41
|
+
}
|
|
42
|
+
/** Retailer (5) or any country other than Nigeria (1) uses the PayLimit apply/home flow. */
|
|
43
|
+
export function resolveIsPayLimit(input) {
|
|
44
|
+
const businessLineId = resolveBusinessLineId(input?.businessLineId);
|
|
45
|
+
const countryCode = resolveCountryCode(input?.countryCode);
|
|
46
|
+
return businessLineId === BUSINESS_LINE_RETAILER_ID || countryCode !== COUNTRY_CODE_NIGERIA;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/sdk/types.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,kBAAkB,CAAC,KAA2B;IAC5D,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,UAAU,IAAI,KAAK,KAAK,MAAM;QAAE,OAAO,KAAK,CAAC;IACpG,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,EAAE;IACnC,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,EAAE;IAClC,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;AAED,8DAA8D;AAC9D,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC/C,MAAM,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IAC/B,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,CAAC,CAAC;IACjC,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED,4FAA4F;AAC5F,MAAM,UAAU,iBAAiB,CAAC,KAA2D;IAC3F,MAAM,cAAc,GAAG,qBAAqB,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;IACpE,MAAM,WAAW,GAAG,kBAAkB,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IAC3D,OAAO,cAAc,KAAK,yBAAyB,IAAI,WAAW,KAAK,oBAAoB,CAAC;AAC9F,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountNameInquiry.d.ts","sourceRoot":"","sources":["../../../src/services/apply/accountNameInquiry.ts"],"names":[],"mappings":"AAsBA,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAI3D;AAED,wBAAsB,kBAAkB,CAAC,IAAI,EAAE;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAc3G"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { GET } from "../http";
|
|
2
|
+
import { getAccountInquiryHeaders } from "../gatewayHash";
|
|
3
|
+
import { getLoanApiBaseUrl } from "../httpRuntime";
|
|
4
|
+
import { applyCustomerId } from "./payLaterLimitRequest";
|
|
5
|
+
import { ACCOUNT_NAME_INQUIRY_PATH } from "./paths";
|
|
6
|
+
function asRecord(value) {
|
|
7
|
+
if (value && typeof value === "object" && !Array.isArray(value))
|
|
8
|
+
return value;
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
function pickName(value) {
|
|
12
|
+
if (typeof value === "string" && value.trim())
|
|
13
|
+
return value.trim();
|
|
14
|
+
const row = asRecord(value);
|
|
15
|
+
if (!row)
|
|
16
|
+
return "";
|
|
17
|
+
for (const key of ["accountName", "customerName", "accountHolderName", "name"]) {
|
|
18
|
+
const v = row[key];
|
|
19
|
+
if (typeof v === "string" && v.trim())
|
|
20
|
+
return v.trim();
|
|
21
|
+
}
|
|
22
|
+
return "";
|
|
23
|
+
}
|
|
24
|
+
export function mapAccountNameInquiry(body) {
|
|
25
|
+
const root = asRecord(body);
|
|
26
|
+
if (!root)
|
|
27
|
+
return pickName(body);
|
|
28
|
+
return pickName(root.data) || pickName(root);
|
|
29
|
+
}
|
|
30
|
+
export async function inquireAccountName(args) {
|
|
31
|
+
const accountNumber = args.accountNumber.replace(/\D/g, "");
|
|
32
|
+
const bankCode = args.bankCode.trim();
|
|
33
|
+
if (accountNumber.length < 10 || !bankCode)
|
|
34
|
+
return "";
|
|
35
|
+
const qs = new URLSearchParams({ accountNumber, bankCode }).toString();
|
|
36
|
+
const body = await GET({
|
|
37
|
+
requestUrl: `${ACCOUNT_NAME_INQUIRY_PATH}?${qs}`,
|
|
38
|
+
baseUrl: getLoanApiBaseUrl(),
|
|
39
|
+
exactHeaders: true,
|
|
40
|
+
skipHash: true,
|
|
41
|
+
customHeaders: getAccountInquiryHeaders(applyCustomerId())
|
|
42
|
+
});
|
|
43
|
+
return mapAccountNameInquiry(body);
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=accountNameInquiry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountNameInquiry.js","sourceRoot":"","sources":["../../../src/services/apply/accountNameInquiry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAA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