@oxyhq/services 5.11.12 → 5.12.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 +48 -7
- package/lib/commonjs/core/OxyServices.js +168 -5
- package/lib/commonjs/core/OxyServices.js.map +1 -1
- package/lib/commonjs/i18n/index.js +40 -0
- package/lib/commonjs/i18n/index.js.map +1 -0
- package/lib/commonjs/i18n/locales/en-US.json +681 -0
- package/lib/commonjs/i18n/locales/es-ES.json +689 -0
- package/lib/commonjs/ui/components/GroupedItem.js +2 -1
- package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
- package/lib/commonjs/ui/components/Header.js +4 -3
- package/lib/commonjs/ui/components/Header.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +110 -103
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileCard.js +5 -1
- package/lib/commonjs/ui/components/ProfileCard.js.map +1 -1
- package/lib/commonjs/ui/components/Section.js +1 -1
- package/lib/commonjs/ui/components/StepBasedScreen.js +16 -16
- package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +15 -3
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/commonjs/ui/components/internal/PinInput.js +10 -4
- package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +128 -12
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/useI18n.js +22 -0
- package/lib/commonjs/ui/hooks/useI18n.js.map +1 -0
- package/lib/commonjs/ui/navigation/OxyRouter.js +11 -131
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +127 -0
- package/lib/commonjs/ui/navigation/routes.js.map +1 -0
- package/lib/commonjs/ui/navigation/types.js +7 -0
- package/lib/commonjs/ui/navigation/types.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +55 -47
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +69 -61
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +378 -37
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +52 -34
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +40 -36
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +105 -78
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +92 -60
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +21 -11
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js +30 -8
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignInScreen.js +47 -26
- package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +31 -24
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +11 -7
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +12 -6
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +11 -7
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +15 -11
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +19 -27
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +8 -4
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +14 -10
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +7 -3
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js +19 -14
- package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/RecoverResetPasswordStep.js +130 -0
- package/lib/commonjs/ui/screens/steps/RecoverResetPasswordStep.js.map +1 -0
- package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js +13 -13
- package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js +14 -20
- package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js +22 -8
- package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/SignInTotpStep.js +161 -0
- package/lib/commonjs/ui/screens/steps/SignInTotpStep.js.map +1 -0
- package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js +12 -6
- package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js +10 -6
- package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js +10 -6
- package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js +34 -4
- package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js.map +1 -1
- package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js +9 -10
- package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js.map +1 -1
- package/lib/commonjs/ui/styles/authStyles.js +1 -2
- package/lib/commonjs/ui/styles/authStyles.js.map +1 -1
- package/lib/commonjs/utils/deviceManager.js +1 -1
- package/lib/commonjs/utils/deviceManager.js.map +1 -1
- package/lib/commonjs/utils/validationUtils.js +4 -2
- package/lib/commonjs/utils/validationUtils.js.map +1 -1
- package/lib/module/core/OxyServices.js +168 -5
- package/lib/module/core/OxyServices.js.map +1 -1
- package/lib/module/i18n/index.js +35 -0
- package/lib/module/i18n/index.js.map +1 -0
- package/lib/module/i18n/locales/en-US.json +681 -0
- package/lib/module/i18n/locales/es-ES.json +689 -0
- package/lib/module/ui/components/GroupedItem.js +2 -1
- package/lib/module/ui/components/GroupedItem.js.map +1 -1
- package/lib/module/ui/components/Header.js +4 -3
- package/lib/module/ui/components/Header.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +109 -103
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/ProfileCard.js +5 -1
- package/lib/module/ui/components/ProfileCard.js.map +1 -1
- package/lib/module/ui/components/Section.js +1 -1
- package/lib/module/ui/components/StepBasedScreen.js +16 -16
- package/lib/module/ui/components/StepBasedScreen.js.map +1 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js +15 -3
- package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/module/ui/components/internal/PinInput.js +9 -4
- package/lib/module/ui/components/internal/PinInput.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +128 -12
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/useI18n.js +18 -0
- package/lib/module/ui/hooks/useI18n.js.map +1 -0
- package/lib/module/ui/navigation/OxyRouter.js +7 -124
- package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +122 -0
- package/lib/module/ui/navigation/routes.js.map +1 -0
- package/lib/module/ui/navigation/types.js +19 -1
- package/lib/module/ui/navigation/types.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +55 -47
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +69 -61
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +378 -37
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +52 -34
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +40 -36
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +107 -80
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +92 -60
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +21 -11
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/RecoverAccountScreen.js +30 -8
- package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/SignInScreen.js +47 -26
- package/lib/module/ui/screens/SignInScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +31 -24
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/internal/SignInPasswordStep.js +11 -7
- package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -1
- package/lib/module/ui/screens/internal/SignInUsernameStep.js +12 -6
- package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js +11 -7
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +15 -11
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js +19 -27
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +8 -4
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +14 -10
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js +7 -3
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/module/ui/screens/steps/RecoverRequestStep.js +19 -14
- package/lib/module/ui/screens/steps/RecoverRequestStep.js.map +1 -1
- package/lib/module/ui/screens/steps/RecoverResetPasswordStep.js +125 -0
- package/lib/module/ui/screens/steps/RecoverResetPasswordStep.js.map +1 -0
- package/lib/module/ui/screens/steps/RecoverSuccessStep.js +13 -13
- package/lib/module/ui/screens/steps/RecoverSuccessStep.js.map +1 -1
- package/lib/module/ui/screens/steps/RecoverVerifyStep.js +14 -20
- package/lib/module/ui/screens/steps/RecoverVerifyStep.js.map +1 -1
- package/lib/module/ui/screens/steps/SignInPasswordStep.js +22 -8
- package/lib/module/ui/screens/steps/SignInPasswordStep.js.map +1 -1
- package/lib/module/ui/screens/steps/SignInTotpStep.js +156 -0
- package/lib/module/ui/screens/steps/SignInTotpStep.js.map +1 -0
- package/lib/module/ui/screens/steps/SignInUsernameStep.js +12 -6
- package/lib/module/ui/screens/steps/SignInUsernameStep.js.map +1 -1
- package/lib/module/ui/screens/steps/SignUpIdentityStep.js +10 -6
- package/lib/module/ui/screens/steps/SignUpIdentityStep.js.map +1 -1
- package/lib/module/ui/screens/steps/SignUpSecurityStep.js +10 -6
- package/lib/module/ui/screens/steps/SignUpSecurityStep.js.map +1 -1
- package/lib/module/ui/screens/steps/SignUpSummaryStep.js +34 -4
- package/lib/module/ui/screens/steps/SignUpSummaryStep.js.map +1 -1
- package/lib/module/ui/screens/steps/SignUpWelcomeStep.js +9 -10
- package/lib/module/ui/screens/steps/SignUpWelcomeStep.js.map +1 -1
- package/lib/module/ui/styles/authStyles.js +1 -2
- package/lib/module/ui/styles/authStyles.js.map +1 -1
- package/lib/module/utils/deviceManager.js +1 -1
- package/lib/module/utils/deviceManager.js.map +1 -1
- package/lib/module/utils/validationUtils.js +4 -2
- package/lib/module/utils/validationUtils.js.map +1 -1
- package/lib/typescript/core/OxyServices.d.ts +58 -3
- package/lib/typescript/core/OxyServices.d.ts.map +1 -1
- package/lib/typescript/i18n/index.d.ts +4 -0
- package/lib/typescript/i18n/index.d.ts.map +1 -0
- package/lib/typescript/models/interfaces.d.ts +4 -0
- package/lib/typescript/models/interfaces.d.ts.map +1 -1
- package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
- package/lib/typescript/ui/components/Header.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxyProvider.d.ts +1 -1
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/ProfileCard.d.ts.map +1 -1
- package/lib/typescript/ui/components/StepBasedScreen.d.ts +2 -1
- package/lib/typescript/ui/components/StepBasedScreen.d.ts.map +1 -1
- package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts.map +1 -1
- package/lib/typescript/ui/components/internal/PinInput.d.ts +6 -3
- package/lib/typescript/ui/components/internal/PinInput.d.ts.map +1 -1
- package/lib/typescript/ui/context/OxyContext.d.ts +7 -4
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useI18n.d.ts +5 -0
- package/lib/typescript/ui/hooks/useI18n.d.ts.map +1 -0
- package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/routes.d.ts +9 -0
- package/lib/typescript/ui/navigation/routes.d.ts.map +1 -0
- package/lib/typescript/ui/navigation/types.d.ts +24 -10
- package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +2 -1
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/RecoverRequestStep.d.ts +4 -1
- package/lib/typescript/ui/screens/steps/RecoverRequestStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/RecoverResetPasswordStep.d.ts +24 -0
- package/lib/typescript/ui/screens/steps/RecoverResetPasswordStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/steps/RecoverSuccessStep.d.ts +2 -1
- package/lib/typescript/ui/screens/steps/RecoverSuccessStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/RecoverVerifyStep.d.ts +3 -1
- package/lib/typescript/ui/screens/steps/RecoverVerifyStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts +1 -0
- package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/SignInTotpStep.d.ts +19 -0
- package/lib/typescript/ui/screens/steps/SignInTotpStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/steps/SignInUsernameStep.d.ts +2 -1
- package/lib/typescript/ui/screens/steps/SignInUsernameStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/SignUpIdentityStep.d.ts +2 -1
- package/lib/typescript/ui/screens/steps/SignUpIdentityStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/SignUpSecurityStep.d.ts +2 -1
- package/lib/typescript/ui/screens/steps/SignUpSecurityStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/SignUpSummaryStep.d.ts +2 -1
- package/lib/typescript/ui/screens/steps/SignUpSummaryStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/steps/SignUpWelcomeStep.d.ts +2 -1
- package/lib/typescript/ui/screens/steps/SignUpWelcomeStep.d.ts.map +1 -1
- package/lib/typescript/ui/styles/authStyles.d.ts +0 -1
- package/lib/typescript/ui/styles/authStyles.d.ts.map +1 -1
- package/lib/typescript/utils/validationUtils.d.ts.map +1 -1
- package/package.json +48 -14
- package/src/core/OxyServices.ts +143 -9
- package/src/i18n/index.ts +39 -0
- package/src/i18n/locales/en-US.json +681 -0
- package/src/i18n/locales/es-ES.json +689 -0
- package/src/models/interfaces.ts +6 -1
- package/src/ui/components/GroupedItem.tsx +2 -1
- package/src/ui/components/Header.tsx +4 -3
- package/src/ui/components/OxyProvider.tsx +105 -112
- package/src/ui/components/ProfileCard.tsx +5 -1
- package/src/ui/components/Section.tsx +1 -1
- package/src/ui/components/StepBasedScreen.tsx +16 -13
- package/src/ui/components/internal/GroupedPillButtons.tsx +10 -6
- package/src/ui/components/internal/PinInput.tsx +15 -6
- package/src/ui/context/OxyContext.tsx +123 -20
- package/src/ui/hooks/useI18n.ts +12 -0
- package/src/ui/navigation/OxyRouter.tsx +15 -134
- package/src/ui/navigation/routes.ts +153 -0
- package/src/ui/navigation/types.ts +28 -10
- package/src/ui/screens/AccountCenterScreen.tsx +47 -45
- package/src/ui/screens/AccountOverviewScreen.tsx +68 -70
- package/src/ui/screens/AccountSettingsScreen.tsx +265 -41
- package/src/ui/screens/AccountSwitcherScreen.tsx +35 -33
- package/src/ui/screens/FeedbackScreen.tsx +39 -37
- package/src/ui/screens/LanguageSelectorScreen.tsx +99 -70
- package/src/ui/screens/PaymentGatewayScreen.tsx +5 -5
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +56 -54
- package/src/ui/screens/ProfileScreen.tsx +14 -8
- package/src/ui/screens/RecoverAccountScreen.tsx +29 -8
- package/src/ui/screens/SignInScreen.tsx +39 -30
- package/src/ui/screens/WelcomeNewUserScreen.tsx +31 -17
- package/src/ui/screens/internal/SignInPasswordStep.tsx +11 -8
- package/src/ui/screens/internal/SignInUsernameStep.tsx +10 -8
- package/src/ui/screens/karma/KarmaAboutScreen.tsx +23 -11
- package/src/ui/screens/karma/KarmaCenterScreen.tsx +21 -11
- package/src/ui/screens/karma/KarmaFAQScreen.tsx +15 -33
- package/src/ui/screens/karma/KarmaLeaderboardScreen.tsx +6 -4
- package/src/ui/screens/karma/KarmaRewardsScreen.tsx +28 -10
- package/src/ui/screens/karma/KarmaRulesScreen.tsx +5 -3
- package/src/ui/screens/steps/RecoverRequestStep.tsx +20 -17
- package/src/ui/screens/steps/RecoverResetPasswordStep.tsx +133 -0
- package/src/ui/screens/steps/RecoverSuccessStep.tsx +12 -19
- package/src/ui/screens/steps/RecoverVerifyStep.tsx +15 -24
- package/src/ui/screens/steps/SignInPasswordStep.tsx +19 -6
- package/src/ui/screens/steps/SignInTotpStep.tsx +129 -0
- package/src/ui/screens/steps/SignInUsernameStep.tsx +11 -10
- package/src/ui/screens/steps/SignUpIdentityStep.tsx +10 -11
- package/src/ui/screens/steps/SignUpSecurityStep.tsx +10 -11
- package/src/ui/screens/steps/SignUpSummaryStep.tsx +24 -9
- package/src/ui/screens/steps/SignUpWelcomeStep.tsx +8 -14
- package/src/ui/styles/authStyles.ts +0 -1
- package/src/utils/deviceManager.ts +1 -1
- package/src/utils/validationUtils.ts +5 -3
package/package.json
CHANGED
|
@@ -1,29 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxyhq/services",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.12.1",
|
|
4
4
|
"description": "Reusable OxyHQ module to handle authentication, user management, karma system, device-based session management and more 🚀",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
7
7
|
"types": "lib/typescript/index.d.ts",
|
|
8
8
|
"react-native": "src/index.ts",
|
|
9
9
|
"source": "src/index.ts",
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
10
14
|
"exports": {
|
|
11
15
|
".": {
|
|
16
|
+
"react-native": "./src/index.ts",
|
|
17
|
+
"node": {
|
|
18
|
+
"import": "./lib/module/core/index.js",
|
|
19
|
+
"require": "./lib/commonjs/core/index.js",
|
|
20
|
+
"types": "./lib/typescript/core/index.d.ts"
|
|
21
|
+
},
|
|
12
22
|
"import": "./lib/module/index.js",
|
|
13
23
|
"require": "./lib/commonjs/index.js",
|
|
14
24
|
"types": "./lib/typescript/index.d.ts"
|
|
15
25
|
},
|
|
16
26
|
"./core": {
|
|
27
|
+
"react-native": "./src/core/index.ts",
|
|
17
28
|
"import": "./lib/module/core/index.js",
|
|
18
29
|
"require": "./lib/commonjs/core/index.js",
|
|
19
30
|
"types": "./lib/typescript/core/index.d.ts"
|
|
20
31
|
},
|
|
21
32
|
"./ui": {
|
|
33
|
+
"react-native": "./src/ui/index.ts",
|
|
22
34
|
"import": "./lib/module/ui/index.js",
|
|
23
35
|
"require": "./lib/commonjs/ui/index.js",
|
|
24
36
|
"types": "./lib/typescript/ui/index.d.ts"
|
|
25
37
|
},
|
|
26
38
|
"./full": {
|
|
39
|
+
"react-native": "./src/index.ts",
|
|
27
40
|
"import": "./lib/module/index.js",
|
|
28
41
|
"require": "./lib/commonjs/index.js",
|
|
29
42
|
"types": "./lib/typescript/index.d.ts"
|
|
@@ -66,32 +79,25 @@
|
|
|
66
79
|
"copy-dts": "copyfiles -u 1 \"src/**/*.d.ts\" lib/typescript",
|
|
67
80
|
"delete-debug-view": "rm -rf ./lib/commonjs/components/bottomSheetDebugView ./lib/module/components/bottomSheetDebugView ./lib/typescript/components/bottomSheetDebugView || true",
|
|
68
81
|
"delete-dts.js": "find ./lib/commonjs -name '*.d.js*' -delete && find ./lib/module -name '*.d.js*' -delete",
|
|
69
|
-
"release": "rm -rf lib && npm run build && release-it"
|
|
82
|
+
"release": "rm -rf lib && npm run build && release-it",
|
|
83
|
+
"prepublishOnly": "npm run typescript && npm test && npm run build"
|
|
70
84
|
},
|
|
71
85
|
"dependencies": {
|
|
86
|
+
"@amir-hossein-karimi/bottom-sheet": "^9.1.2",
|
|
87
|
+
"@gorhom/bottom-sheet": "^5.1.6",
|
|
72
88
|
"@react-native-async-storage/async-storage": "2.1.2",
|
|
73
|
-
"@react-
|
|
89
|
+
"@tanstack/react-query": "^5.59.0",
|
|
74
90
|
"@th3rdwave/react-navigation-bottom-sheet": "^0.3.2",
|
|
75
91
|
"axios": "^1.9.0",
|
|
76
|
-
"expo": "^53.0.20",
|
|
77
|
-
"expo-font": "^13.3.1",
|
|
78
|
-
"expo-image": "~2.4.0",
|
|
79
|
-
"expo-linear-gradient": "^14.1.4",
|
|
80
92
|
"invariant": "^2.2.4",
|
|
81
93
|
"jwt-decode": "^4.0.0",
|
|
82
|
-
"react-native-iap": "^12.16.4",
|
|
83
94
|
"react-native-qrcode-svg": "^6.3.0",
|
|
84
|
-
"react-native-safe-area-context": "^5.4.0",
|
|
85
95
|
"react-native-url-polyfill": "^2.0.0",
|
|
86
96
|
"socket.io-client": "^4.8.1",
|
|
87
97
|
"sonner": "^2.0.4",
|
|
88
98
|
"sonner-native": "^0.20.0",
|
|
89
|
-
"tailwindcss": "^4.1.11",
|
|
90
99
|
"zod": "^3.25.64",
|
|
91
|
-
"zustand": "^5.0.6"
|
|
92
|
-
"@tanstack/react-query": "^5.59.0",
|
|
93
|
-
"@amir-hossein-karimi/bottom-sheet": "^9.1.2",
|
|
94
|
-
"@gorhom/bottom-sheet": "^5.1.6"
|
|
100
|
+
"zustand": "^5.0.6"
|
|
95
101
|
},
|
|
96
102
|
"devDependencies": {
|
|
97
103
|
"@biomejs/biome": "^1.9.4",
|
|
@@ -108,13 +114,17 @@
|
|
|
108
114
|
"@types/react": "~19.0.10",
|
|
109
115
|
"@types/react-native": "~0.73.0",
|
|
110
116
|
"copyfiles": "^2.4.1",
|
|
117
|
+
"expo-font": "^13.3.2",
|
|
118
|
+
"expo-image": "^2.4.0",
|
|
111
119
|
"husky": "^4.3.8",
|
|
112
120
|
"jest": "~29.7.0",
|
|
113
121
|
"lint-staged": "^13.2.2",
|
|
114
122
|
"metro-react-native-babel-preset": "^0.77.0",
|
|
115
123
|
"react-native-builder-bob": "^0.30.3",
|
|
116
124
|
"react-native-gesture-handler": "~2.24.0",
|
|
125
|
+
"react-native-iap": "^13.0.4",
|
|
117
126
|
"react-native-reanimated": "~3.17.4",
|
|
127
|
+
"react-native-safe-area-context": "^5.6.1",
|
|
118
128
|
"react-native-svg": "15.11.2",
|
|
119
129
|
"react-test-renderer": "^18.3.1",
|
|
120
130
|
"release-it": "^17.6.0",
|
|
@@ -123,14 +133,20 @@
|
|
|
123
133
|
},
|
|
124
134
|
"peerDependencies": {
|
|
125
135
|
"@expo/vector-icons": "^14.1.0",
|
|
136
|
+
"@react-navigation/native": "^7.0.0",
|
|
126
137
|
"@types/react": "*",
|
|
127
138
|
"@types/react-native": "*",
|
|
128
139
|
"axios": "^1.9.0",
|
|
140
|
+
"expo": "^53.0.0",
|
|
141
|
+
"expo-font": "^13.0.0",
|
|
142
|
+
"expo-image": "^2.4.0",
|
|
143
|
+
"expo-linear-gradient": "^14.0.0",
|
|
129
144
|
"invariant": "^2.2.4",
|
|
130
145
|
"jwt-decode": "^4.0.0",
|
|
131
146
|
"react": ">=18.0.0",
|
|
132
147
|
"react-native": ">=0.76.0",
|
|
133
148
|
"react-native-gesture-handler": ">=2.16.1",
|
|
149
|
+
"react-native-iap": "^12.16.0",
|
|
134
150
|
"react-native-reanimated": ">=3.16.0",
|
|
135
151
|
"react-native-safe-area-context": "^5.4.0",
|
|
136
152
|
"react-native-svg": ">=13.0.0"
|
|
@@ -147,6 +163,24 @@
|
|
|
147
163
|
},
|
|
148
164
|
"react-native-qrcode-svg": {
|
|
149
165
|
"optional": true
|
|
166
|
+
},
|
|
167
|
+
"expo": {
|
|
168
|
+
"optional": true
|
|
169
|
+
},
|
|
170
|
+
"expo-font": {
|
|
171
|
+
"optional": true
|
|
172
|
+
},
|
|
173
|
+
"expo-image": {
|
|
174
|
+
"optional": true
|
|
175
|
+
},
|
|
176
|
+
"expo-linear-gradient": {
|
|
177
|
+
"optional": true
|
|
178
|
+
},
|
|
179
|
+
"@react-navigation/native": {
|
|
180
|
+
"optional": true
|
|
181
|
+
},
|
|
182
|
+
"react-native-iap": {
|
|
183
|
+
"optional": true
|
|
150
184
|
}
|
|
151
185
|
},
|
|
152
186
|
"react-native-builder-bob": {
|
package/src/core/OxyServices.ts
CHANGED
|
@@ -177,12 +177,18 @@ export class OxyServices {
|
|
|
177
177
|
baseURL: config.baseURL,
|
|
178
178
|
timeout: 10000 // 10 second timeout
|
|
179
179
|
});
|
|
180
|
-
this.cloudURL = config.cloudURL ||
|
|
181
|
-
this.cloudURL = config.cloudURL || 'https://cloud.oxy.so';
|
|
180
|
+
this.cloudURL = config.cloudURL || OXY_CLOUD_URL;
|
|
182
181
|
this.tokenStore = TokenStore.getInstance();
|
|
183
182
|
this.setupInterceptors();
|
|
184
183
|
}
|
|
185
184
|
|
|
185
|
+
// Test-only utility to reset global tokens between jest tests
|
|
186
|
+
static __resetTokensForTests(): void {
|
|
187
|
+
try {
|
|
188
|
+
TokenStore.getInstance().clearTokens();
|
|
189
|
+
} catch {}
|
|
190
|
+
}
|
|
191
|
+
|
|
186
192
|
/**
|
|
187
193
|
* Setup axios interceptors for authentication and error handling
|
|
188
194
|
*/
|
|
@@ -453,8 +459,13 @@ export class OxyServices {
|
|
|
453
459
|
/**
|
|
454
460
|
* Centralized error handling
|
|
455
461
|
*/
|
|
456
|
-
protected handleError(error: any):
|
|
457
|
-
|
|
462
|
+
protected handleError(error: any): Error {
|
|
463
|
+
const api = handleHttpError(error);
|
|
464
|
+
const err = new Error(api.message) as Error & { code?: string; status?: number; details?: Record<string, unknown> };
|
|
465
|
+
err.code = api.code;
|
|
466
|
+
err.status = api.status;
|
|
467
|
+
err.details = api.details as any;
|
|
468
|
+
return err;
|
|
458
469
|
}
|
|
459
470
|
|
|
460
471
|
/**
|
|
@@ -488,16 +499,90 @@ export class OxyServices {
|
|
|
488
499
|
email,
|
|
489
500
|
password
|
|
490
501
|
});
|
|
502
|
+
if (!res || !res.data || (typeof res.data === 'object' && Object.keys(res.data).length === 0)) {
|
|
503
|
+
throw new OxyAuthenticationError('Sign up failed', 'SIGNUP_FAILED', 400);
|
|
504
|
+
}
|
|
491
505
|
return res.data;
|
|
492
506
|
} catch (error) {
|
|
493
507
|
throw this.handleError(error);
|
|
494
508
|
}
|
|
495
509
|
}
|
|
496
510
|
|
|
511
|
+
/**
|
|
512
|
+
* Request account recovery (send verification code)
|
|
513
|
+
*/
|
|
514
|
+
async requestRecovery(identifier: string): Promise<{ delivery?: string; destination?: string }> {
|
|
515
|
+
try {
|
|
516
|
+
const res = await this.client.post('/api/auth/recover/request', { identifier });
|
|
517
|
+
return res.data;
|
|
518
|
+
} catch (error: any) {
|
|
519
|
+
throw this.handleError(error);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* Verify recovery code
|
|
525
|
+
*/
|
|
526
|
+
async verifyRecoveryCode(identifier: string, code: string): Promise<{ verified: boolean }> {
|
|
527
|
+
try {
|
|
528
|
+
const res = await this.client.post('/api/auth/recover/verify', { identifier, code });
|
|
529
|
+
return res.data;
|
|
530
|
+
} catch (error: any) {
|
|
531
|
+
throw this.handleError(error);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* Reset password using verified code
|
|
537
|
+
*/
|
|
538
|
+
async resetPassword(identifier: string, code: string, newPassword: string): Promise<{ success: boolean }> {
|
|
539
|
+
try {
|
|
540
|
+
const res = await this.client.post('/api/auth/recover/reset', { identifier, code, newPassword });
|
|
541
|
+
return res.data;
|
|
542
|
+
} catch (error: any) {
|
|
543
|
+
throw this.handleError(error);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Reset password using TOTP code (recommended recovery)
|
|
549
|
+
*/
|
|
550
|
+
async resetPasswordWithTotp(identifier: string, code: string, newPassword: string): Promise<{ success: boolean }> {
|
|
551
|
+
try {
|
|
552
|
+
const res = await this.client.post('/api/auth/recover/totp/reset', { identifier, code, newPassword });
|
|
553
|
+
return res.data;
|
|
554
|
+
} catch (error: any) {
|
|
555
|
+
throw this.handleError(error);
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
async resetPasswordWithBackupCode(identifier: string, backupCode: string, newPassword: string): Promise<{ success: boolean }> {
|
|
560
|
+
try {
|
|
561
|
+
const res = await this.client.post('/api/auth/recover/backup/reset', { identifier, backupCode, newPassword });
|
|
562
|
+
return res.data;
|
|
563
|
+
} catch (error: any) {
|
|
564
|
+
throw this.handleError(error);
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
async resetPasswordWithRecoveryKey(identifier: string, recoveryKey: string, newPassword: string): Promise<{ success: boolean; nextRecoveryKey?: string }> {
|
|
569
|
+
try {
|
|
570
|
+
const res = await this.client.post('/api/auth/recover/recovery-key/reset', { identifier, recoveryKey, newPassword });
|
|
571
|
+
return res.data;
|
|
572
|
+
} catch (error: any) {
|
|
573
|
+
throw this.handleError(error);
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
|
|
497
577
|
/**
|
|
498
578
|
* Sign in with device management
|
|
499
579
|
*/
|
|
500
|
-
async signIn(
|
|
580
|
+
async signIn(
|
|
581
|
+
username: string,
|
|
582
|
+
password: string,
|
|
583
|
+
deviceName?: string,
|
|
584
|
+
deviceFingerprint?: any
|
|
585
|
+
): Promise<SessionLoginResponse | { mfaRequired: true; mfaToken: string; expiresAt: string }> {
|
|
501
586
|
try {
|
|
502
587
|
const res = await this.client.post('/api/auth/login', {
|
|
503
588
|
username,
|
|
@@ -511,6 +596,18 @@ export class OxyServices {
|
|
|
511
596
|
}
|
|
512
597
|
}
|
|
513
598
|
|
|
599
|
+
/**
|
|
600
|
+
* Complete login by verifying TOTP with MFA token
|
|
601
|
+
*/
|
|
602
|
+
async verifyTotpLogin(mfaToken: string, code: string): Promise<SessionLoginResponse> {
|
|
603
|
+
try {
|
|
604
|
+
const res = await this.client.post('/api/auth/totp/verify-login', { mfaToken, code });
|
|
605
|
+
return res.data;
|
|
606
|
+
} catch (error) {
|
|
607
|
+
throw this.handleError(error);
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
|
|
514
611
|
/**
|
|
515
612
|
* Get user by session ID
|
|
516
613
|
*/
|
|
@@ -657,6 +754,43 @@ export class OxyServices {
|
|
|
657
754
|
}
|
|
658
755
|
}
|
|
659
756
|
|
|
757
|
+
// ============================================================================
|
|
758
|
+
// TOTP ENROLLMENT
|
|
759
|
+
// ============================================================================
|
|
760
|
+
|
|
761
|
+
async startTotpEnrollment(sessionId: string): Promise<{ secret: string; otpauthUrl: string; issuer: string; label: string }> {
|
|
762
|
+
try {
|
|
763
|
+
const res = await this.client.post('/api/auth/totp/enroll/start', { sessionId }, {
|
|
764
|
+
headers: { 'x-session-id': sessionId }
|
|
765
|
+
});
|
|
766
|
+
return res.data;
|
|
767
|
+
} catch (error) {
|
|
768
|
+
throw this.handleError(error);
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
async verifyTotpEnrollment(sessionId: string, code: string): Promise<{ enabled: boolean; backupCodes?: string[]; recoveryKey?: string }> {
|
|
773
|
+
try {
|
|
774
|
+
const res = await this.client.post('/api/auth/totp/enroll/verify', { sessionId, code }, {
|
|
775
|
+
headers: { 'x-session-id': sessionId }
|
|
776
|
+
});
|
|
777
|
+
return res.data;
|
|
778
|
+
} catch (error) {
|
|
779
|
+
throw this.handleError(error);
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
async disableTotp(sessionId: string, code: string): Promise<{ disabled: boolean }> {
|
|
784
|
+
try {
|
|
785
|
+
const res = await this.client.post('/api/auth/totp/disable', { sessionId, code }, {
|
|
786
|
+
headers: { 'x-session-id': sessionId }
|
|
787
|
+
});
|
|
788
|
+
return res.data;
|
|
789
|
+
} catch (error) {
|
|
790
|
+
throw this.handleError(error);
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
|
|
660
794
|
/**
|
|
661
795
|
* Search user profiles
|
|
662
796
|
*/
|
|
@@ -1631,14 +1765,14 @@ export class OxyServices {
|
|
|
1631
1765
|
|
|
1632
1766
|
next();
|
|
1633
1767
|
} catch (error) {
|
|
1634
|
-
const apiError = this.handleError(error);
|
|
1768
|
+
const apiError = this.handleError(error) as any;
|
|
1635
1769
|
|
|
1636
1770
|
if (debug) {
|
|
1637
1771
|
console.log(`❌ Auth: Unexpected error:`, apiError);
|
|
1638
1772
|
}
|
|
1639
1773
|
|
|
1640
1774
|
if (onError) return onError(apiError);
|
|
1641
|
-
return res.status(apiError.status || 500).json(apiError);
|
|
1775
|
+
return res.status((apiError && apiError.status) || 500).json(apiError);
|
|
1642
1776
|
}
|
|
1643
1777
|
};
|
|
1644
1778
|
}
|
|
@@ -1647,7 +1781,7 @@ export class OxyServices {
|
|
|
1647
1781
|
/**
|
|
1648
1782
|
* Export the default Oxy Cloud URL (for backward compatibility)
|
|
1649
1783
|
*/
|
|
1650
|
-
export const OXY_CLOUD_URL = 'https://cloud.
|
|
1784
|
+
export const OXY_CLOUD_URL = 'https://cloud.oxyhq.com';
|
|
1651
1785
|
|
|
1652
1786
|
/**
|
|
1653
1787
|
* Export the default Oxy API URL (for documentation)
|
|
@@ -1658,4 +1792,4 @@ export const OXY_API_URL = 'https://api.oxy.so';
|
|
|
1658
1792
|
* Pre-configured client instance for easy import
|
|
1659
1793
|
* Uses OXY_API_URL as baseURL and OXY_CLOUD_URL as cloudURL
|
|
1660
1794
|
*/
|
|
1661
|
-
export const oxyClient = new OxyServices({ baseURL: OXY_API_URL, cloudURL: OXY_CLOUD_URL });
|
|
1795
|
+
export const oxyClient = new OxyServices({ baseURL: OXY_API_URL, cloudURL: OXY_CLOUD_URL });
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Use JSON locale files (RN Metro supports static requires reliably)
|
|
2
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
3
|
+
const enUS = require('./locales/en-US.json') as Record<string, any>;
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
5
|
+
const esES = require('./locales/es-ES.json') as Record<string, any>;
|
|
6
|
+
|
|
7
|
+
export type LocaleDict = Record<string, any>;
|
|
8
|
+
|
|
9
|
+
const DICTS: Record<string, LocaleDict> = {
|
|
10
|
+
'en': enUS as LocaleDict,
|
|
11
|
+
'en-US': enUS as LocaleDict,
|
|
12
|
+
'es': esES as LocaleDict,
|
|
13
|
+
'es-ES': esES as LocaleDict,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const FALLBACK = 'en-US';
|
|
17
|
+
|
|
18
|
+
function getNested(obj: any, path: string): any {
|
|
19
|
+
return path.split('.').reduce((acc, key) => (acc && acc[key] != null ? acc[key] : undefined), obj);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function translate(locale: string | undefined, key: string, vars?: Record<string, string | number>): string {
|
|
23
|
+
const lang = locale && DICTS[locale] ? locale : FALLBACK;
|
|
24
|
+
const dict = DICTS[lang] || DICTS[FALLBACK];
|
|
25
|
+
let val = getNested(dict, key);
|
|
26
|
+
if (typeof val !== 'string') return key; // fallback to key if missing
|
|
27
|
+
if (vars) {
|
|
28
|
+
Object.keys(vars).forEach(k => {
|
|
29
|
+
const token = `{{${k}}}`;
|
|
30
|
+
val = val.replaceAll(token, String(vars[k]));
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
return val;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function hasKey(locale: string | undefined, key: string): boolean {
|
|
37
|
+
const lang = locale && DICTS[locale] ? locale : FALLBACK;
|
|
38
|
+
return getNested(DICTS[lang], key) != null || getNested(DICTS[FALLBACK], key) != null;
|
|
39
|
+
}
|