@oxyhq/services 5.5.9 → 5.6.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 +16 -2
- package/lib/commonjs/core/index.js +69 -82
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/index.js +24 -183
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/node/index.js +0 -2
- package/lib/commonjs/node/index.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +100 -229
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxyPayButton.js +131 -0
- package/lib/commonjs/ui/components/OxyPayButton.js.map +1 -0
- package/lib/commonjs/ui/components/OxyProvider.js +41 -198
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +15 -2
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
- package/lib/commonjs/ui/components/icon/FAIRWalletIcon.js +66 -0
- package/lib/commonjs/ui/components/icon/FAIRWalletIcon.js.map +1 -0
- package/lib/commonjs/ui/components/icon/index.js +7 -0
- package/lib/commonjs/ui/components/icon/index.js.map +1 -1
- package/lib/commonjs/ui/components/index.js +7 -0
- package/lib/commonjs/ui/components/index.js.map +1 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +14 -7
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/commonjs/ui/components/internal/PinInput.js +108 -0
- package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -0
- package/lib/commonjs/ui/components/internal/TextField.js +20 -0
- package/lib/commonjs/ui/components/internal/TextField.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +116 -84
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/index.js +2 -15
- package/lib/commonjs/ui/hooks/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFollow.js +52 -136
- package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionSocket.js +52 -0
- package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -0
- package/lib/commonjs/ui/index.js +8 -191
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/navigation/OxyRouter.js +52 -60
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +18 -30
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +4 -22
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +90 -39
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +37 -66
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +21 -44
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +44 -23
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +59 -78
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +1588 -0
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +22 -36
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js +269 -0
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +47 -69
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignInScreen.js +99 -333
- package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignUpScreen.js +136 -340
- package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +192 -0
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +135 -0
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js +108 -0
- package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js +126 -0
- package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignUpSummaryStep.js +84 -0
- package/lib/commonjs/ui/screens/internal/SignUpSummaryStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignUpWelcomeStep.js +59 -0
- package/lib/commonjs/ui/screens/internal/SignUpWelcomeStep.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +15 -2
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/stores/authStore.js +66 -0
- package/lib/commonjs/ui/stores/authStore.js.map +1 -0
- package/lib/commonjs/ui/stores/followStore.js +124 -0
- package/lib/commonjs/ui/stores/followStore.js.map +1 -0
- package/lib/commonjs/ui/styles/index.js +0 -11
- package/lib/commonjs/ui/styles/index.js.map +1 -1
- package/lib/commonjs/ui/utils/confirmAction.js +28 -0
- package/lib/commonjs/ui/utils/confirmAction.js.map +1 -0
- package/lib/module/core/index.js +69 -81
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/index.js +14 -17
- package/lib/module/index.js.map +1 -1
- package/lib/module/node/index.js +0 -3
- package/lib/module/node/index.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +100 -229
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/OxyPayButton.js +125 -0
- package/lib/module/ui/components/OxyPayButton.js.map +1 -0
- package/lib/module/ui/components/OxyProvider.js +42 -199
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +15 -2
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/components/icon/FAIRWalletIcon.js +60 -0
- package/lib/module/ui/components/icon/FAIRWalletIcon.js.map +1 -0
- package/lib/module/ui/components/icon/index.js +1 -0
- package/lib/module/ui/components/icon/index.js.map +1 -1
- package/lib/module/ui/components/index.js +1 -0
- package/lib/module/ui/components/index.js.map +1 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js +15 -8
- package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/module/ui/components/internal/PinInput.js +103 -0
- package/lib/module/ui/components/internal/PinInput.js.map +1 -0
- package/lib/module/ui/components/internal/TextField.js +20 -0
- package/lib/module/ui/components/internal/TextField.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +117 -85
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/index.js +1 -2
- package/lib/module/ui/hooks/index.js.map +1 -1
- package/lib/module/ui/hooks/useFollow.js +52 -137
- package/lib/module/ui/hooks/useFollow.js.map +1 -1
- package/lib/module/ui/hooks/useSessionSocket.js +47 -0
- package/lib/module/ui/hooks/useSessionSocket.js.map +1 -0
- package/lib/module/ui/index.js +2 -13
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/navigation/OxyRouter.js +53 -61
- package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +6 -18
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +5 -23
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +91 -40
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +38 -67
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +22 -45
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +44 -23
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +59 -78
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +1583 -0
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -0
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +23 -37
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/RecoverAccountScreen.js +263 -0
- package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -0
- package/lib/module/ui/screens/SessionManagementScreen.js +47 -69
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/SignInScreen.js +100 -334
- package/lib/module/ui/screens/SignInScreen.js.map +1 -1
- package/lib/module/ui/screens/SignUpScreen.js +137 -341
- package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/module/ui/screens/internal/SignInPasswordStep.js +186 -0
- package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignInUsernameStep.js +129 -0
- package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignUpIdentityStep.js +102 -0
- package/lib/module/ui/screens/internal/SignUpIdentityStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignUpSecurityStep.js +120 -0
- package/lib/module/ui/screens/internal/SignUpSecurityStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignUpSummaryStep.js +79 -0
- package/lib/module/ui/screens/internal/SignUpSummaryStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignUpWelcomeStep.js +54 -0
- package/lib/module/ui/screens/internal/SignUpWelcomeStep.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +16 -3
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/module/ui/stores/authStore.js +62 -0
- package/lib/module/ui/stores/authStore.js.map +1 -0
- package/lib/module/ui/stores/followStore.js +120 -0
- package/lib/module/ui/stores/followStore.js.map +1 -0
- package/lib/module/ui/styles/index.js +0 -1
- package/lib/module/ui/styles/index.js.map +1 -1
- package/lib/module/ui/utils/confirmAction.js +25 -0
- package/lib/module/ui/utils/confirmAction.js.map +1 -0
- package/lib/typescript/core/index.d.ts +28 -10
- package/lib/typescript/core/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +5 -4
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/models/interfaces.d.ts +6 -0
- package/lib/typescript/models/interfaces.d.ts.map +1 -1
- package/lib/typescript/models/secureSession.d.ts +0 -1
- package/lib/typescript/models/secureSession.d.ts.map +1 -1
- package/lib/typescript/node/index.d.ts +0 -1
- package/lib/typescript/node/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/FollowButton.d.ts +1 -77
- package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxyPayButton.d.ts +29 -0
- package/lib/typescript/ui/components/OxyPayButton.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts +8 -0
- package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts.map +1 -0
- package/lib/typescript/ui/components/icon/index.d.ts +1 -0
- package/lib/typescript/ui/components/icon/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/index.d.ts +1 -0
- package/lib/typescript/ui/components/index.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 +12 -0
- package/lib/typescript/ui/components/internal/PinInput.d.ts.map +1 -0
- package/lib/typescript/ui/components/internal/TextField.d.ts +1 -0
- package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -1
- package/lib/typescript/ui/context/OxyContext.d.ts +0 -2
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/index.d.ts +1 -2
- package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useFollow.d.ts +14 -15
- package/lib/typescript/ui/hooks/useFollow.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useSessionSocket.d.ts +11 -0
- package/lib/typescript/ui/hooks/useSessionSocket.d.ts.map +1 -0
- package/lib/typescript/ui/index.d.ts +2 -5
- package/lib/typescript/ui/index.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/types.d.ts +5 -23
- 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/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts +27 -0
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts +8 -0
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +27 -0
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts +26 -0
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts +20 -0
- package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts +24 -0
- package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignUpSummaryStep.d.ts +15 -0
- package/lib/typescript/ui/screens/internal/SignUpSummaryStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignUpWelcomeStep.d.ts +13 -0
- package/lib/typescript/ui/screens/internal/SignUpWelcomeStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/stores/authStore.d.ts +16 -0
- package/lib/typescript/ui/stores/authStore.d.ts.map +1 -0
- package/lib/typescript/ui/stores/followStore.d.ts +15 -0
- package/lib/typescript/ui/stores/followStore.d.ts.map +1 -0
- package/lib/typescript/ui/styles/index.d.ts +0 -1
- package/lib/typescript/ui/styles/index.d.ts.map +1 -1
- package/lib/typescript/ui/utils/confirmAction.d.ts +7 -0
- package/lib/typescript/ui/utils/confirmAction.d.ts.map +1 -0
- package/package.json +12 -7
- package/src/core/index.ts +78 -88
- package/src/index.ts +8 -45
- package/src/models/interfaces.ts +7 -1
- package/src/models/secureSession.ts +1 -2
- package/src/node/index.ts +0 -3
- package/src/ui/components/FollowButton.tsx +100 -322
- package/src/ui/components/OxyPayButton.tsx +133 -0
- package/src/ui/components/OxyProvider.tsx +39 -201
- package/src/ui/components/OxySignInButton.tsx +13 -2
- package/src/ui/components/icon/FAIRWalletIcon.tsx +49 -0
- package/src/ui/components/icon/index.ts +1 -0
- package/src/ui/components/index.ts +1 -0
- package/src/ui/components/internal/GroupedPillButtons.tsx +12 -8
- package/src/ui/components/internal/PinInput.tsx +102 -0
- package/src/ui/components/internal/TextField.tsx +9 -0
- package/src/ui/context/OxyContext.tsx +74 -91
- package/src/ui/hooks/index.ts +1 -2
- package/src/ui/hooks/useFollow.ts +58 -129
- package/src/ui/hooks/useSessionSocket.ts +50 -0
- package/src/ui/index.ts +2 -37
- package/src/ui/navigation/OxyRouter.tsx +47 -63
- package/src/ui/navigation/types.ts +5 -26
- package/src/ui/screens/AccountCenterScreen.tsx +12 -21
- package/src/ui/screens/AccountOverviewScreen.tsx +6 -30
- package/src/ui/screens/AccountSettingsScreen.tsx +75 -46
- package/src/ui/screens/AccountSwitcherScreen.tsx +46 -88
- package/src/ui/screens/AppInfoScreen.tsx +27 -47
- package/src/ui/screens/FeedbackScreen.tsx +34 -19
- package/src/ui/screens/FileManagementScreen.tsx +293 -321
- package/src/ui/screens/PaymentGatewayScreen.tsx +1315 -0
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +109 -124
- package/src/ui/screens/RecoverAccountScreen.tsx +260 -0
- package/src/ui/screens/SessionManagementScreen.tsx +65 -137
- package/src/ui/screens/SignInScreen.tsx +89 -283
- package/src/ui/screens/SignUpScreen.tsx +138 -291
- package/src/ui/screens/internal/SignInPasswordStep.tsx +179 -0
- package/src/ui/screens/internal/SignInUsernameStep.tsx +139 -0
- package/src/ui/screens/internal/SignUpIdentityStep.tsx +114 -0
- package/src/ui/screens/internal/SignUpSecurityStep.tsx +132 -0
- package/src/ui/screens/internal/SignUpSummaryStep.tsx +66 -0
- package/src/ui/screens/internal/SignUpWelcomeStep.tsx +52 -0
- package/src/ui/screens/karma/KarmaRewardsScreen.tsx +13 -3
- package/src/ui/stores/authStore.ts +45 -0
- package/src/ui/stores/followStore.ts +80 -0
- package/src/ui/styles/index.ts +0 -1
- package/src/ui/utils/confirmAction.ts +23 -0
- package/lib/commonjs/ui/components/bottomSheet/index.js +0 -37
- package/lib/commonjs/ui/components/bottomSheet/index.js.map +0 -1
- package/lib/commonjs/ui/hooks/useAuthFetch.js +0 -217
- package/lib/commonjs/ui/hooks/useAuthFetch.js.map +0 -1
- package/lib/commonjs/ui/hooks/useOxyFollow.js +0 -190
- package/lib/commonjs/ui/hooks/useOxyFollow.js.map +0 -1
- package/lib/commonjs/ui/screens/BillingManagementScreen.js +0 -636
- package/lib/commonjs/ui/screens/BillingManagementScreen.js.map +0 -1
- package/lib/commonjs/ui/store/index.js +0 -67
- package/lib/commonjs/ui/store/index.js.map +0 -1
- package/lib/commonjs/ui/store/setupOxyStore.js +0 -63
- package/lib/commonjs/ui/store/setupOxyStore.js.map +0 -1
- package/lib/commonjs/ui/store/slices/authSlice.js +0 -56
- package/lib/commonjs/ui/store/slices/authSlice.js.map +0 -1
- package/lib/commonjs/ui/store/slices/followSlice.js +0 -238
- package/lib/commonjs/ui/store/slices/followSlice.js.map +0 -1
- package/lib/commonjs/ui/store/slices/index.js +0 -129
- package/lib/commonjs/ui/store/slices/index.js.map +0 -1
- package/lib/commonjs/ui/store/slices/types.js +0 -19
- package/lib/commonjs/ui/store/slices/types.js.map +0 -1
- package/lib/commonjs/ui/styles/shadows.js +0 -123
- package/lib/commonjs/ui/styles/shadows.js.map +0 -1
- package/lib/commonjs/utils/polyfills.js +0 -42
- package/lib/commonjs/utils/polyfills.js.map +0 -1
- package/lib/module/ui/components/bottomSheet/index.js +0 -5
- package/lib/module/ui/components/bottomSheet/index.js.map +0 -1
- package/lib/module/ui/hooks/useAuthFetch.js +0 -212
- package/lib/module/ui/hooks/useAuthFetch.js.map +0 -1
- package/lib/module/ui/hooks/useOxyFollow.js +0 -186
- package/lib/module/ui/hooks/useOxyFollow.js.map +0 -1
- package/lib/module/ui/screens/BillingManagementScreen.js +0 -631
- package/lib/module/ui/screens/BillingManagementScreen.js.map +0 -1
- package/lib/module/ui/store/index.js +0 -33
- package/lib/module/ui/store/index.js.map +0 -1
- package/lib/module/ui/store/setupOxyStore.js +0 -59
- package/lib/module/ui/store/setupOxyStore.js.map +0 -1
- package/lib/module/ui/store/slices/authSlice.js +0 -48
- package/lib/module/ui/store/slices/authSlice.js.map +0 -1
- package/lib/module/ui/store/slices/followSlice.js +0 -232
- package/lib/module/ui/store/slices/followSlice.js.map +0 -1
- package/lib/module/ui/store/slices/index.js +0 -11
- package/lib/module/ui/store/slices/index.js.map +0 -1
- package/lib/module/ui/store/slices/types.js +0 -15
- package/lib/module/ui/store/slices/types.js.map +0 -1
- package/lib/module/ui/styles/shadows.js +0 -119
- package/lib/module/ui/styles/shadows.js.map +0 -1
- package/lib/module/utils/polyfills.js +0 -36
- package/lib/module/utils/polyfills.js.map +0 -1
- package/lib/typescript/types/react-redux.d.ts +0 -5
- package/lib/typescript/ui/components/bottomSheet/index.d.ts +0 -4
- package/lib/typescript/ui/components/bottomSheet/index.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/useAuthFetch.d.ts +0 -34
- package/lib/typescript/ui/hooks/useAuthFetch.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/useOxyFollow.d.ts +0 -81
- package/lib/typescript/ui/hooks/useOxyFollow.d.ts.map +0 -1
- package/lib/typescript/ui/screens/BillingManagementScreen.d.ts +0 -5
- package/lib/typescript/ui/screens/BillingManagementScreen.d.ts.map +0 -1
- package/lib/typescript/ui/store/index.d.ts +0 -27
- package/lib/typescript/ui/store/index.d.ts.map +0 -1
- package/lib/typescript/ui/store/setupOxyStore.d.ts +0 -29
- package/lib/typescript/ui/store/setupOxyStore.d.ts.map +0 -1
- package/lib/typescript/ui/store/slices/authSlice.d.ts +0 -32
- package/lib/typescript/ui/store/slices/authSlice.d.ts.map +0 -1
- package/lib/typescript/ui/store/slices/followSlice.d.ts +0 -120
- package/lib/typescript/ui/store/slices/followSlice.d.ts.map +0 -1
- package/lib/typescript/ui/store/slices/index.d.ts +0 -9
- package/lib/typescript/ui/store/slices/index.d.ts.map +0 -1
- package/lib/typescript/ui/store/slices/types.d.ts +0 -16
- package/lib/typescript/ui/store/slices/types.d.ts.map +0 -1
- package/lib/typescript/ui/styles/shadows.d.ts +0 -233
- package/lib/typescript/ui/styles/shadows.d.ts.map +0 -1
- package/lib/typescript/utils/polyfills.d.ts +0 -6
- package/lib/typescript/utils/polyfills.d.ts.map +0 -1
- package/src/__tests__/backend-middleware.test.ts +0 -209
- package/src/__tests__/polyfills.test.ts +0 -30
- package/src/__tests__/setup.ts +0 -43
- package/src/__tests__/ui/hooks/authfetch-integration.test.ts +0 -197
- package/src/__tests__/ui/hooks/backward-compatibility.test.ts +0 -159
- package/src/__tests__/ui/hooks/real-world-scenarios.test.ts +0 -224
- package/src/__tests__/ui/hooks/url-resolution.test.ts +0 -129
- package/src/__tests__/ui/hooks/useAuthFetch-separation.test.ts +0 -69
- package/src/__tests__/ui/hooks/useAuthFetch.test.ts +0 -70
- package/src/__tests__/ui/hooks/useOxyFollow.test.tsx +0 -92
- package/src/__tests__/ui/screens/AccountSettingsScreen.test.tsx +0 -112
- package/src/__tests__/ui/store/setupOxyStore.test.ts +0 -50
- package/src/__tests__/validate-structure.js +0 -91
- package/src/__tests__/validation.js +0 -42
- package/src/types/react-redux.d.ts +0 -5
- package/src/ui/components/bottomSheet/index.tsx +0 -14
- package/src/ui/hooks/useAuthFetch.ts +0 -238
- package/src/ui/hooks/useOxyFollow.ts +0 -188
- package/src/ui/screens/BillingManagementScreen.tsx +0 -589
- package/src/ui/store/index.ts +0 -36
- package/src/ui/store/setupOxyStore.ts +0 -58
- package/src/ui/store/slices/authSlice.ts +0 -43
- package/src/ui/store/slices/followSlice.ts +0 -207
- package/src/ui/store/slices/index.ts +0 -31
- package/src/ui/store/slices/types.ts +0 -33
- package/src/ui/styles/shadows.ts +0 -112
- package/src/utils/polyfills.ts +0 -34
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppInfoScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/AppInfoScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAanD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"AppInfoScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/AppInfoScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAanD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAqBtD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA0jB5C,CAAC;AA2FF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeedbackScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/FeedbackScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAgBjF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"FeedbackScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/FeedbackScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAgBjF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAsetD,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAwiB7C,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileManagementScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/FileManagementScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAezE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAOtD,UAAU,yBAA0B,SAAQ,eAAe;IACvD,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;
|
|
1
|
+
{"version":3,"file":"FileManagementScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/FileManagementScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAezE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAOtD,UAAU,yBAA0B,SAAQ,eAAe;IACvD,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAwBD,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA2vD7D,CAAC;AA4qBF,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseScreenProps } from '../navigation/types';
|
|
3
|
+
export type PaymentItem = {
|
|
4
|
+
type: 'product' | 'subscription' | 'service' | 'fee' | string;
|
|
5
|
+
name: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
quantity?: number;
|
|
8
|
+
period?: string;
|
|
9
|
+
price: number;
|
|
10
|
+
currency?: string;
|
|
11
|
+
};
|
|
12
|
+
interface PaymentGatewayResult {
|
|
13
|
+
success: boolean;
|
|
14
|
+
details?: any;
|
|
15
|
+
error?: string;
|
|
16
|
+
}
|
|
17
|
+
interface PaymentGatewayScreenProps extends BaseScreenProps {
|
|
18
|
+
onPaymentResult?: (result: PaymentGatewayResult) => void;
|
|
19
|
+
amount: string | number;
|
|
20
|
+
currency?: string;
|
|
21
|
+
onClose?: () => void;
|
|
22
|
+
paymentItems?: PaymentItem[];
|
|
23
|
+
description?: string;
|
|
24
|
+
}
|
|
25
|
+
declare const PaymentGatewayScreen: React.FC<PaymentGatewayScreenProps>;
|
|
26
|
+
export default PaymentGatewayScreen;
|
|
27
|
+
//# sourceMappingURL=PaymentGatewayScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaymentGatewayScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/PaymentGatewayScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAiBjF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AA8BtD,MAAM,MAAM,WAAW,GAAG;IACtB,IAAI,EAAE,SAAS,GAAG,cAAc,GAAG,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAGF,UAAU,oBAAoB;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,yBAA0B,SAAQ,eAAe;IACvD,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACzD,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAqDD,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAmvB7D,CAAC;AAmbF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PremiumSubscriptionScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/PremiumSubscriptionScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAanD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"PremiumSubscriptionScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/PremiumSubscriptionScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAanD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAiDtD,QAAA,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA0jCxD,CAAC;AAodF,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface RecoverAccountScreenProps {
|
|
3
|
+
navigate: (screen: string) => void;
|
|
4
|
+
theme: string;
|
|
5
|
+
}
|
|
6
|
+
declare const RecoverAccountScreen: React.FC<RecoverAccountScreenProps>;
|
|
7
|
+
export default RecoverAccountScreen;
|
|
8
|
+
//# sourceMappingURL=RecoverAccountScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecoverAccountScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/RecoverAccountScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAS7D,UAAU,yBAAyB;IAC/B,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;CACjB;AAID,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAkL7D,CAAC;AAiEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionManagementScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/SessionManagementScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAYnD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"SessionManagementScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/SessionManagementScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAYnD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAQtD,QAAA,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAsPtD,CAAC;AAiIF,eAAe,uBAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignInScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/SignInScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAiBjF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"SignInScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/SignInScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAiBjF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AActD,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAgZ3C,CAAC;AAqQF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignUpScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/SignUpScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAejF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"SignUpScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/SignUpScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAejF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAwlBtD,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAkO3C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Animated } from 'react-native';
|
|
3
|
+
interface SignInPasswordStepProps {
|
|
4
|
+
styles: any;
|
|
5
|
+
fadeAnim: Animated.Value;
|
|
6
|
+
slideAnim: Animated.Value;
|
|
7
|
+
scaleAnim: Animated.Value;
|
|
8
|
+
colors: any;
|
|
9
|
+
userProfile: any;
|
|
10
|
+
username: string;
|
|
11
|
+
theme: string;
|
|
12
|
+
logoAnim: Animated.Value;
|
|
13
|
+
errorMessage: string;
|
|
14
|
+
inputScaleAnim: Animated.Value;
|
|
15
|
+
isInputFocused: boolean;
|
|
16
|
+
password: string;
|
|
17
|
+
showPassword: boolean;
|
|
18
|
+
handleInputFocus: () => void;
|
|
19
|
+
handleInputBlur: () => void;
|
|
20
|
+
handlePasswordChange: (text: string) => void;
|
|
21
|
+
handleSignIn: () => void;
|
|
22
|
+
isLoading: boolean;
|
|
23
|
+
prevStep: () => void;
|
|
24
|
+
}
|
|
25
|
+
declare const SignInPasswordStep: React.FC<SignInPasswordStepProps>;
|
|
26
|
+
export default SignInPasswordStep;
|
|
27
|
+
//# sourceMappingURL=SignInPasswordStep.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignInPasswordStep.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/internal/SignInPasswordStep.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAc,QAAQ,EAA0C,MAAM,cAAc,CAAC;AAO5F,UAAU,uBAAuB;IAC7B,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC;IACzB,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC;IAC1B,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC;IAC1B,MAAM,EAAE,GAAG,CAAC;IACZ,WAAW,EAAE,GAAG,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,QAAQ,CAAC,KAAK,CAAC;IAC/B,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,oBAAoB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAiJzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Animated } from 'react-native';
|
|
3
|
+
interface SignInUsernameStepProps {
|
|
4
|
+
styles: any;
|
|
5
|
+
fadeAnim: Animated.Value;
|
|
6
|
+
slideAnim: Animated.Value;
|
|
7
|
+
scaleAnim: Animated.Value;
|
|
8
|
+
colors: any;
|
|
9
|
+
isAddAccountMode: boolean;
|
|
10
|
+
user: any;
|
|
11
|
+
errorMessage: string;
|
|
12
|
+
inputScaleAnim: Animated.Value;
|
|
13
|
+
isInputFocused: boolean;
|
|
14
|
+
username: string;
|
|
15
|
+
validationStatus: 'idle' | 'validating' | 'valid' | 'invalid';
|
|
16
|
+
userProfile: any;
|
|
17
|
+
isValidating: boolean;
|
|
18
|
+
handleInputFocus: () => void;
|
|
19
|
+
handleInputBlur: () => void;
|
|
20
|
+
handleUsernameChange: (text: string) => void;
|
|
21
|
+
handleUsernameContinue: () => void;
|
|
22
|
+
navigate: any;
|
|
23
|
+
}
|
|
24
|
+
declare const SignInUsernameStep: React.FC<SignInUsernameStepProps>;
|
|
25
|
+
export default SignInUsernameStep;
|
|
26
|
+
//# sourceMappingURL=SignInUsernameStep.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignInUsernameStep.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/internal/SignInUsernameStep.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AACtC,OAAO,EAAyB,QAAQ,EAAE,MAAM,cAAc,CAAC;AAM/D,UAAU,uBAAuB;IAC7B,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC;IACzB,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC;IAC1B,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC;IAC1B,MAAM,EAAE,GAAG,CAAC;IACZ,gBAAgB,EAAE,OAAO,CAAC;IAC1B,IAAI,EAAE,GAAG,CAAC;IACV,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,QAAQ,CAAC,KAAK,CAAC;IAC/B,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,GAAG,YAAY,GAAG,OAAO,GAAG,SAAS,CAAC;IAC9D,WAAW,EAAE,GAAG,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,oBAAoB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,sBAAsB,EAAE,MAAM,IAAI,CAAC;IACnC,QAAQ,EAAE,GAAG,CAAC;CACjB;AAED,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA2GzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Animated } from 'react-native';
|
|
3
|
+
interface SignUpIdentityStepProps {
|
|
4
|
+
styles: any;
|
|
5
|
+
fadeAnim: Animated.Value;
|
|
6
|
+
slideAnim: Animated.Value;
|
|
7
|
+
colors: any;
|
|
8
|
+
formData: any;
|
|
9
|
+
validationState: any;
|
|
10
|
+
updateField: (field: string, value: string) => void;
|
|
11
|
+
setErrorMessage: (msg: string) => void;
|
|
12
|
+
prevStep: () => void;
|
|
13
|
+
handleIdentityNext: () => void;
|
|
14
|
+
ValidationMessage: React.FC<any>;
|
|
15
|
+
validateEmail: (email: string) => boolean;
|
|
16
|
+
navigate: any;
|
|
17
|
+
}
|
|
18
|
+
declare const SignUpIdentityStep: React.FC<SignUpIdentityStepProps>;
|
|
19
|
+
export default SignUpIdentityStep;
|
|
20
|
+
//# sourceMappingURL=SignUpIdentityStep.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignUpIdentityStep.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/internal/SignUpIdentityStep.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AACtC,OAAO,EAAc,QAAQ,EAA+B,MAAM,cAAc,CAAC;AAMjF,UAAU,uBAAuB;IAC7B,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC;IACzB,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC;IAC1B,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,GAAG,CAAC;IACd,eAAe,EAAE,GAAG,CAAC;IACrB,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,eAAe,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACjC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IAC1C,QAAQ,EAAE,GAAG,CAAC;CACjB;AAED,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAwFzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Animated } from 'react-native';
|
|
3
|
+
interface SignUpSecurityStepProps {
|
|
4
|
+
styles: any;
|
|
5
|
+
fadeAnim: Animated.Value;
|
|
6
|
+
slideAnim: Animated.Value;
|
|
7
|
+
colors: any;
|
|
8
|
+
formData: any;
|
|
9
|
+
passwordVisibility: {
|
|
10
|
+
password: boolean;
|
|
11
|
+
confirmPassword: boolean;
|
|
12
|
+
};
|
|
13
|
+
updateField: (field: string, value: string) => void;
|
|
14
|
+
validatePassword: (password: string) => boolean;
|
|
15
|
+
validatePasswordsMatch: (password: string, confirmPassword: string) => boolean;
|
|
16
|
+
prevStep: () => void;
|
|
17
|
+
handleSecurityNext: () => void;
|
|
18
|
+
setErrorMessage: (msg: string) => void;
|
|
19
|
+
togglePasswordVisibility: () => void;
|
|
20
|
+
PASSWORD_MIN_LENGTH: number;
|
|
21
|
+
}
|
|
22
|
+
declare const SignUpSecurityStep: React.FC<SignUpSecurityStepProps>;
|
|
23
|
+
export default SignUpSecurityStep;
|
|
24
|
+
//# sourceMappingURL=SignUpSecurityStep.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignUpSecurityStep.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/internal/SignUpSecurityStep.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAc,QAAQ,EAAa,MAAM,cAAc,CAAC;AAI/D,UAAU,uBAAuB;IAC7B,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC;IACzB,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC;IAC1B,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,GAAG,CAAC;IACd,kBAAkB,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,eAAe,EAAE,OAAO,CAAA;KAAE,CAAC;IACpE,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;IAChD,sBAAsB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,KAAK,OAAO,CAAC;IAC/E,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,eAAe,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,wBAAwB,EAAE,MAAM,IAAI,CAAC;IACrC,mBAAmB,EAAE,MAAM,CAAC;CAC/B;AAED,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA2GzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Animated } from 'react-native';
|
|
3
|
+
interface SignUpSummaryStepProps {
|
|
4
|
+
styles: any;
|
|
5
|
+
fadeAnim: Animated.Value;
|
|
6
|
+
slideAnim: Animated.Value;
|
|
7
|
+
colors: any;
|
|
8
|
+
formData: any;
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
handleSignUp: () => void;
|
|
11
|
+
prevStep: () => void;
|
|
12
|
+
}
|
|
13
|
+
declare const SignUpSummaryStep: React.FC<SignUpSummaryStepProps>;
|
|
14
|
+
export default SignUpSummaryStep;
|
|
15
|
+
//# sourceMappingURL=SignUpSummaryStep.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignUpSummaryStep.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/internal/SignUpSummaryStep.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAc,QAAQ,EAAoB,MAAM,cAAc,CAAC;AAGtE,UAAU,sBAAsB;IAC5B,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC;IACzB,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC;IAC1B,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,GAAG,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAgDvD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Animated } from 'react-native';
|
|
3
|
+
interface SignUpWelcomeStepProps {
|
|
4
|
+
styles: any;
|
|
5
|
+
fadeAnim: Animated.Value;
|
|
6
|
+
slideAnim: Animated.Value;
|
|
7
|
+
colors: any;
|
|
8
|
+
nextStep: () => void;
|
|
9
|
+
navigate: any;
|
|
10
|
+
}
|
|
11
|
+
declare const SignUpWelcomeStep: React.FC<SignUpWelcomeStepProps>;
|
|
12
|
+
export default SignUpWelcomeStep;
|
|
13
|
+
//# sourceMappingURL=SignUpWelcomeStep.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignUpWelcomeStep.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/internal/SignUpWelcomeStep.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAc,QAAQ,EAAE,MAAM,cAAc,CAAC;AAIpD,UAAU,sBAAsB;IAC5B,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC;IACzB,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC;IAC1B,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,GAAG,CAAC;CACjB;AAED,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAmCvD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KarmaRewardsScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/karma/KarmaRewardsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"KarmaRewardsScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/karma/KarmaRewardsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA4BjD,CAAC;AA6BF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { User } from '../../models/interfaces';
|
|
2
|
+
interface AuthState {
|
|
3
|
+
user: User | null;
|
|
4
|
+
isAuthenticated: boolean;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
error: string | null;
|
|
7
|
+
loginStart: () => void;
|
|
8
|
+
loginSuccess: (user: User) => void;
|
|
9
|
+
loginFailure: (error: string) => void;
|
|
10
|
+
logout: () => void;
|
|
11
|
+
fetchUser: (oxyServices: any) => Promise<void>;
|
|
12
|
+
updateUser: (updates: Partial<User>, oxyServices: any) => Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
export declare const useAuthStore: import("zustand").UseBoundStore<import("zustand").StoreApi<AuthState>>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=authStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authStore.d.ts","sourceRoot":"","sources":["../../../../src/ui/stores/authStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,UAAU,SAAS;IACjB,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,EAAE,CAAC,WAAW,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACzE;AAED,eAAO,MAAM,YAAY,wEA4BtB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OxyServices } from '../../core';
|
|
2
|
+
interface FollowState {
|
|
3
|
+
followingUsers: Record<string, boolean>;
|
|
4
|
+
loadingUsers: Record<string, boolean>;
|
|
5
|
+
fetchingUsers: Record<string, boolean>;
|
|
6
|
+
errors: Record<string, string | null>;
|
|
7
|
+
setFollowingStatus: (userId: string, isFollowing: boolean) => void;
|
|
8
|
+
clearFollowError: (userId: string) => void;
|
|
9
|
+
resetFollowState: () => void;
|
|
10
|
+
fetchFollowStatus: (userId: string, oxyServices: OxyServices) => Promise<void>;
|
|
11
|
+
toggleFollowUser: (userId: string, oxyServices: OxyServices, isCurrentlyFollowing: boolean) => Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
export declare const useFollowStore: import("zustand").UseBoundStore<import("zustand").StoreApi<FollowState>>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=followStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"followStore.d.ts","sourceRoot":"","sources":["../../../../src/ui/stores/followStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,UAAU,WAAW;IACnB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;IACtC,kBAAkB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;IACnE,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/E,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,oBAAoB,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9G;AAED,eAAO,MAAM,cAAc,0EAgExB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/styles/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/styles/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cross-platform confirm dialog. Uses window.confirm on web, Alert.alert on native.
|
|
3
|
+
* @param message The message to display
|
|
4
|
+
* @param onConfirm Callback if user confirms
|
|
5
|
+
*/
|
|
6
|
+
export declare function confirmAction(message: string, onConfirm: () => void): void;
|
|
7
|
+
//# sourceMappingURL=confirmAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirmAction.d.ts","sourceRoot":"","sources":["../../../../src/ui/utils/confirmAction.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,IAAI,QAenE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxyhq/services",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.6.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/node/index.js",
|
|
6
6
|
"module": "lib/module/node/index.js",
|
|
@@ -68,20 +68,23 @@
|
|
|
68
68
|
"bootstrap": "yarn install && yarn example"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@gorhom/bottom-sheet": "^5.1.6",
|
|
72
71
|
"@oxyhq/services": "^5.4.0",
|
|
73
72
|
"@react-native-async-storage/async-storage": "^2.1.2",
|
|
74
|
-
"@
|
|
73
|
+
"@react-navigation/native": "^7.1.14",
|
|
74
|
+
"@th3rdwave/react-navigation-bottom-sheet": "^0.3.2",
|
|
75
75
|
"axios": "^1.9.0",
|
|
76
76
|
"expo-font": "^13.3.1",
|
|
77
77
|
"expo-linear-gradient": "^14.1.4",
|
|
78
|
-
"form-data": "^4.0.0",
|
|
79
78
|
"invariant": "^2.2.4",
|
|
80
79
|
"jwt-decode": "^4.0.0",
|
|
80
|
+
"react-native-iap": "^12.16.4",
|
|
81
81
|
"react-native-safe-area-context": "^5.4.0",
|
|
82
|
-
"react-
|
|
82
|
+
"react-native-url-polyfill": "^2.0.0",
|
|
83
|
+
"socket.io-client": "^4.8.1",
|
|
83
84
|
"sonner": "^2.0.4",
|
|
84
|
-
"sonner-native": "^0.20.0"
|
|
85
|
+
"sonner-native": "^0.20.0",
|
|
86
|
+
"zustand": "^5.0.6",
|
|
87
|
+
"react-native-qrcode-svg": "^6.3.0"
|
|
85
88
|
},
|
|
86
89
|
"devDependencies": {
|
|
87
90
|
"@biomejs/biome": "^1.9.4",
|
|
@@ -97,7 +100,6 @@
|
|
|
97
100
|
"@types/node": "^20.5.1",
|
|
98
101
|
"@types/react": "~18.3.12",
|
|
99
102
|
"@types/react-native": "~0.73.0",
|
|
100
|
-
"@types/react-redux": "^7.1.25",
|
|
101
103
|
"copyfiles": "^2.4.1",
|
|
102
104
|
"husky": "^4.3.8",
|
|
103
105
|
"jest": "^30.0.0",
|
|
@@ -135,6 +137,9 @@
|
|
|
135
137
|
},
|
|
136
138
|
"@types/react": {
|
|
137
139
|
"optional": true
|
|
140
|
+
},
|
|
141
|
+
"react-native-qrcode-svg": {
|
|
142
|
+
"optional": true
|
|
138
143
|
}
|
|
139
144
|
},
|
|
140
145
|
"react-native-builder-bob": {
|
package/src/core/index.ts
CHANGED
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
import axios, { AxiosInstance, AxiosError, AxiosRequestConfig, InternalAxiosRequestConfig } from 'axios';
|
|
2
2
|
import { jwtDecode } from 'jwt-decode';
|
|
3
|
-
import { getFormDataConstructor } from '../utils/polyfills';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// Check if we're in Node.js environment
|
|
8
|
-
if (typeof window === 'undefined') {
|
|
9
|
-
try {
|
|
10
|
-
NodeFormData = require('form-data');
|
|
11
|
-
} catch (e) {
|
|
12
|
-
console.warn('form-data module not found, file uploads from Buffer may fail in Node.js');
|
|
13
|
-
}
|
|
14
|
-
}
|
|
4
|
+
// Remove all FormData, form-data, and polyfill logic. Delete uploadFile and uploadFiles methods. Add a comment to use the new raw upload approach instead.
|
|
15
5
|
|
|
16
6
|
import {
|
|
17
7
|
OxyConfig,
|
|
@@ -164,17 +154,6 @@ export class OxyServices {
|
|
|
164
154
|
return this.client.defaults.baseURL || '';
|
|
165
155
|
}
|
|
166
156
|
|
|
167
|
-
/**
|
|
168
|
-
* Sets/updates the base URL for this OxyServices instance
|
|
169
|
-
* @param baseURL - The new base URL to use for API requests
|
|
170
|
-
*/
|
|
171
|
-
public setBaseURL(baseURL: string): void {
|
|
172
|
-
if (!baseURL) {
|
|
173
|
-
throw new Error('Base URL cannot be empty');
|
|
174
|
-
}
|
|
175
|
-
this.client.defaults.baseURL = baseURL;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
157
|
/**
|
|
179
158
|
* Gets the currently authenticated user ID from the token
|
|
180
159
|
* @returns The user ID or null if not authenticated
|
|
@@ -202,14 +181,6 @@ export class OxyServices {
|
|
|
202
181
|
return this.accessToken !== null;
|
|
203
182
|
}
|
|
204
183
|
|
|
205
|
-
/**
|
|
206
|
-
* Get the current access token
|
|
207
|
-
* @returns Current access token or null if not authenticated
|
|
208
|
-
*/
|
|
209
|
-
public getAccessToken(): string | null {
|
|
210
|
-
return this.accessToken;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
184
|
/**
|
|
214
185
|
* Sets authentication tokens directly (useful for initializing from storage)
|
|
215
186
|
* @param accessToken - JWT access token
|
|
@@ -1052,8 +1023,9 @@ export class OxyServices {
|
|
|
1052
1023
|
filename: string,
|
|
1053
1024
|
metadata?: Record<string, any>
|
|
1054
1025
|
): Promise<FileMetadata> {
|
|
1055
|
-
|
|
1056
|
-
|
|
1026
|
+
// This method is deprecated. Use uploadFilesRaw instead.
|
|
1027
|
+
// For now, we'll throw an error as the underlying logic is removed.
|
|
1028
|
+
throw new Error('uploadFile is deprecated. Use uploadFilesRaw instead.');
|
|
1057
1029
|
}
|
|
1058
1030
|
|
|
1059
1031
|
/**
|
|
@@ -1068,61 +1040,9 @@ export class OxyServices {
|
|
|
1068
1040
|
filenames: string[],
|
|
1069
1041
|
metadata?: Record<string, any>
|
|
1070
1042
|
): Promise<FileUploadResponse> {
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
}
|
|
1075
|
-
|
|
1076
|
-
// Create form data to handle the file upload
|
|
1077
|
-
let formData: any;
|
|
1078
|
-
|
|
1079
|
-
if (typeof window === 'undefined' && NodeFormData) {
|
|
1080
|
-
// Node.js environment - prefer node-specific form-data
|
|
1081
|
-
formData = new NodeFormData();
|
|
1082
|
-
} else {
|
|
1083
|
-
// Browser/React Native environment - use polyfilled or native FormData
|
|
1084
|
-
const FormDataConstructor = getFormDataConstructor();
|
|
1085
|
-
formData = new FormDataConstructor();
|
|
1086
|
-
}
|
|
1087
|
-
|
|
1088
|
-
// Add all files to the form data
|
|
1089
|
-
files.forEach((file, index) => {
|
|
1090
|
-
const filename = filenames[index];
|
|
1091
|
-
|
|
1092
|
-
// Handle different file types (Browser vs Node.js vs React Native)
|
|
1093
|
-
const isNodeBuffer = typeof window === 'undefined' &&
|
|
1094
|
-
file &&
|
|
1095
|
-
typeof file.constructor === 'function' &&
|
|
1096
|
-
file.constructor.name === 'Buffer';
|
|
1097
|
-
|
|
1098
|
-
if (isNodeBuffer) {
|
|
1099
|
-
// Node.js environment with Buffer
|
|
1100
|
-
if (!NodeFormData) {
|
|
1101
|
-
throw new Error('form-data module is required for file uploads from Buffer but not found.');
|
|
1102
|
-
}
|
|
1103
|
-
// form-data handles Buffers directly.
|
|
1104
|
-
formData.append('files', file, { filename }); // Pass filename in options for form-data
|
|
1105
|
-
} else {
|
|
1106
|
-
// Browser/React Native environment with File or Blob
|
|
1107
|
-
formData.append('files', file as Blob, filename);
|
|
1108
|
-
}
|
|
1109
|
-
});
|
|
1110
|
-
|
|
1111
|
-
// Add metadata as JSON string if provided
|
|
1112
|
-
if (metadata) {
|
|
1113
|
-
formData.append('metadata', JSON.stringify(metadata));
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
const res = await this.client.post('/files/upload', formData, {
|
|
1117
|
-
headers: {
|
|
1118
|
-
'Content-Type': 'multipart/form-data',
|
|
1119
|
-
},
|
|
1120
|
-
});
|
|
1121
|
-
|
|
1122
|
-
return res.data;
|
|
1123
|
-
} catch (error) {
|
|
1124
|
-
throw this.handleError(error);
|
|
1125
|
-
}
|
|
1043
|
+
// This method is deprecated. Use uploadFilesRaw instead.
|
|
1044
|
+
// For now, we'll throw an error as the underlying logic is removed.
|
|
1045
|
+
throw new Error('uploadFiles is deprecated. Use uploadFilesRaw instead.');
|
|
1126
1046
|
}
|
|
1127
1047
|
|
|
1128
1048
|
/**
|
|
@@ -1695,6 +1615,76 @@ export class OxyServices {
|
|
|
1695
1615
|
throw this.handleError(error);
|
|
1696
1616
|
}
|
|
1697
1617
|
}
|
|
1618
|
+
|
|
1619
|
+
/**
|
|
1620
|
+
* Health check endpoint to verify API connectivity
|
|
1621
|
+
* @returns Health status and basic server info
|
|
1622
|
+
*/
|
|
1623
|
+
async healthCheck(): Promise<{
|
|
1624
|
+
status: string;
|
|
1625
|
+
users?: number;
|
|
1626
|
+
timestamp?: string;
|
|
1627
|
+
[key: string]: any
|
|
1628
|
+
}> {
|
|
1629
|
+
try {
|
|
1630
|
+
const res = await this.client.get('/');
|
|
1631
|
+
return res.data;
|
|
1632
|
+
} catch (error) {
|
|
1633
|
+
throw this.handleError(error);
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
/**
|
|
1638
|
+
* Download file content using authenticated request
|
|
1639
|
+
* @param fileId - The file ID to download
|
|
1640
|
+
* @returns Response object for further processing
|
|
1641
|
+
*/
|
|
1642
|
+
async downloadFileContent(fileId: string): Promise<Response> {
|
|
1643
|
+
try {
|
|
1644
|
+
const downloadUrl = this.getFileDownloadUrl(fileId);
|
|
1645
|
+
const response = await fetch(downloadUrl);
|
|
1646
|
+
|
|
1647
|
+
if (!response.ok) {
|
|
1648
|
+
throw new Error(`Download failed: ${response.status} ${response.statusText}`);
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
return response;
|
|
1652
|
+
} catch (error) {
|
|
1653
|
+
throw this.handleError(error);
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
/**
|
|
1658
|
+
* Get file content as text using authenticated request
|
|
1659
|
+
* @param fileId - The file ID to get content for
|
|
1660
|
+
* @returns File content as string
|
|
1661
|
+
*/
|
|
1662
|
+
async getFileContentAsText(fileId: string): Promise<string> {
|
|
1663
|
+
try {
|
|
1664
|
+
const response = await this.downloadFileContent(fileId);
|
|
1665
|
+
return await response.text();
|
|
1666
|
+
} catch (error) {
|
|
1667
|
+
throw this.handleError(error);
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
/**
|
|
1672
|
+
* Get file content as blob using authenticated request
|
|
1673
|
+
* @param fileId - The file ID to get content for
|
|
1674
|
+
* @returns File content as blob
|
|
1675
|
+
*/
|
|
1676
|
+
async getFileContentAsBlob(fileId: string): Promise<Blob> {
|
|
1677
|
+
try {
|
|
1678
|
+
const response = await this.downloadFileContent(fileId);
|
|
1679
|
+
return await response.blob();
|
|
1680
|
+
} catch (error) {
|
|
1681
|
+
throw this.handleError(error);
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1698
1684
|
}
|
|
1699
1685
|
|
|
1700
|
-
export default OxyServices;
|
|
1686
|
+
export default OxyServices;
|
|
1687
|
+
|
|
1688
|
+
if (typeof FormData === 'undefined') {
|
|
1689
|
+
console.warn('[OxyHQ/Services] FormData is not available. If you are using Hermes, add "import \'react-native-url-polyfill/auto\'" at the top of your app entry file.');
|
|
1690
|
+
}
|