@oxyhq/services 22.13.0 → 23.0.0
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 +1 -1
- package/lib/commonjs/index.js +74 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/notifications/deviceNotifications.js +424 -0
- package/lib/commonjs/notifications/deviceNotifications.js.map +1 -0
- package/lib/commonjs/ui/boot/runProviderColdBoot.js +20 -64
- package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/commonjs/ui/components/AvatarCameraBadge.js +3 -2
- package/lib/commonjs/ui/components/AvatarCameraBadge.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAuthChooser.js +5 -4
- package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +5 -6
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInRequestSurface.js +147 -0
- package/lib/commonjs/ui/components/OxySignInRequestSurface.js.map +1 -0
- package/lib/commonjs/ui/components/ProfileButton.js +4 -3
- package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
- package/lib/commonjs/ui/components/SettingsIcon.js +3 -2
- package/lib/commonjs/ui/components/SettingsIcon.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js +7 -7
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/SignInEntryView.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/SignInRequestView.js +65 -103
- package/lib/commonjs/ui/components/authChooser/SignInRequestView.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.js +0 -2
- package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/primitives.js +5 -4
- package/lib/commonjs/ui/components/authChooser/primitives.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/requestSurfaces.js +14 -10
- package/lib/commonjs/ui/components/authChooser/requestSurfaces.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/types.js +11 -0
- package/lib/commonjs/ui/components/authChooser/types.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js +3 -2
- package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +3 -2
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js +15 -14
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +6 -5
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +3 -2
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +6 -6
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js +5 -5
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js +10 -9
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js +4 -3
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js +6 -5
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/commonjs/ui/components/styles/shadow.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +14 -45
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/commitSessionFlow.js +0 -43
- package/lib/commonjs/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/commonjs/ui/context/useOxyAccountGraph.js +3 -4
- package/lib/commonjs/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/userCache.js +17 -17
- package/lib/commonjs/ui/hooks/queries/userCache.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAssets.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAuth.js +4 -2
- package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
- package/lib/commonjs/ui/hooks/useOnlineStatus.js +3 -2
- package/lib/commonjs/ui/hooks/useOnlineStatus.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionManagement.js +0 -2
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountMembersScreen.js +4 -3
- package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +1 -1
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CreateAccountScreen.js +7 -6
- package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +4 -3
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +3 -2
- package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +96 -96
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +19 -18
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +4 -29
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +4 -3
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +2 -2
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +3 -3
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +10 -9
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +1 -0
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +12 -13
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserListScreen.js +4 -4
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +6 -6
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js +4 -3
- package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/FileListSection.js +4 -3
- package/lib/commonjs/ui/screens/fileManagement/FileListSection.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +5 -7
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/UploadBar.js +3 -2
- package/lib/commonjs/ui/screens/fileManagement/UploadBar.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +3 -2
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +5 -4
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +4 -3
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/utils/fileManagement.js +24 -24
- package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
- package/lib/commonjs/ui/utils/netConnectivity.js +28 -0
- package/lib/commonjs/ui/utils/netConnectivity.js.map +1 -0
- package/lib/commonjs/ui/utils/oauthReturn.js +15 -28
- package/lib/commonjs/ui/utils/oauthReturn.js.map +1 -1
- package/lib/module/index.js +18 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/notifications/deviceNotifications.js +414 -0
- package/lib/module/notifications/deviceNotifications.js.map +1 -0
- package/lib/module/ui/boot/runProviderColdBoot.js +21 -65
- package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/module/ui/components/AvatarCameraBadge.js +1 -1
- package/lib/module/ui/components/AvatarCameraBadge.js.map +1 -1
- package/lib/module/ui/components/OxyAuthChooser.js +5 -4
- package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +5 -6
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInRequestSurface.js +141 -0
- package/lib/module/ui/components/OxySignInRequestSurface.js.map +1 -0
- package/lib/module/ui/components/ProfileButton.js +1 -1
- package/lib/module/ui/components/ProfileButton.js.map +1 -1
- package/lib/module/ui/components/SettingsIcon.js +1 -1
- package/lib/module/ui/components/SettingsIcon.js.map +1 -1
- package/lib/module/ui/components/authChooser/AccountsMenuView.js +1 -1
- package/lib/module/ui/components/authChooser/AccountsMenuView.js.map +1 -1
- package/lib/module/ui/components/authChooser/SignInEntryView.js.map +1 -1
- package/lib/module/ui/components/authChooser/SignInRequestView.js +66 -104
- package/lib/module/ui/components/authChooser/SignInRequestView.js.map +1 -1
- package/lib/module/ui/components/authChooser/TroubleDisclosure.js +0 -2
- package/lib/module/ui/components/authChooser/TroubleDisclosure.js.map +1 -1
- package/lib/module/ui/components/authChooser/primitives.js +1 -1
- package/lib/module/ui/components/authChooser/primitives.js.map +1 -1
- package/lib/module/ui/components/authChooser/requestSurfaces.js +13 -9
- package/lib/module/ui/components/authChooser/requestSurfaces.js.map +1 -1
- package/lib/module/ui/components/authChooser/types.js +11 -0
- package/lib/module/ui/components/authChooser/types.js.map +1 -1
- package/lib/module/ui/components/fileManagement/AnimatedButton.js +1 -1
- package/lib/module/ui/components/fileManagement/AnimatedButton.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js +1 -1
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileViewer.js +1 -1
- package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js +1 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/module/ui/components/modals/DeleteAccountModal.js +1 -1
- package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentMethodStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentMethodStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentReviewStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSuccessStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSummaryStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/module/ui/components/styles/shadow.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +16 -47
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/commitSessionFlow.js +0 -42
- package/lib/module/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/module/ui/context/useOxyAccountGraph.js +3 -4
- package/lib/module/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/module/ui/hooks/queries/userCache.js +17 -17
- package/lib/module/ui/hooks/queries/userCache.js.map +1 -1
- package/lib/module/ui/hooks/useAssets.js.map +1 -1
- package/lib/module/ui/hooks/useAuth.js +4 -2
- package/lib/module/ui/hooks/useAuth.js.map +1 -1
- package/lib/module/ui/hooks/useOnlineStatus.js +3 -2
- package/lib/module/ui/hooks/useOnlineStatus.js.map +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js +0 -2
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/module/ui/screens/AccountMembersScreen.js +1 -1
- package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/module/ui/screens/ConnectedAppsScreen.js +1 -1
- package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/module/ui/screens/CreateAccountScreen.js +1 -1
- package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +1 -1
- package/lib/module/ui/screens/FAQScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +91 -90
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +2 -1
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +4 -29
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.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 +2 -2
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +1 -0
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +4 -5
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/UserListScreen.js +3 -3
- package/lib/module/ui/screens/UserListScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +5 -6
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/FileLibraryError.js +1 -1
- package/lib/module/ui/screens/fileManagement/FileLibraryError.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/FileListSection.js +1 -1
- package/lib/module/ui/screens/fileManagement/FileListSection.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +3 -5
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/UploadBar.js +1 -1
- package/lib/module/ui/screens/fileManagement/UploadBar.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +3 -3
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/module/ui/utils/fileManagement.js +25 -25
- package/lib/module/ui/utils/fileManagement.js.map +1 -1
- package/lib/module/ui/utils/netConnectivity.js +23 -0
- package/lib/module/ui/utils/netConnectivity.js.map +1 -0
- package/lib/module/ui/utils/oauthReturn.js +15 -27
- package/lib/module/ui/utils/oauthReturn.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +5 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts +173 -0
- package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts +11 -30
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +5 -3
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxySignInRequestSurface.d.ts +108 -0
- package/lib/typescript/commonjs/ui/components/OxySignInRequestSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/SettingsIcon.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/SettingsIcon.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts +18 -18
- package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/TroubleDisclosure.d.ts +3 -10
- package/lib/typescript/commonjs/ui/components/authChooser/TroubleDisclosure.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts +8 -4
- package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts +18 -0
- package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/types.d.ts +6 -6
- package/lib/typescript/commonjs/ui/components/payment/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts +0 -40
- package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +4 -7
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts +0 -1
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/userCache.d.ts +2 -2
- package/lib/typescript/commonjs/ui/hooks/queries/userCache.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAsyncAction.d.ts +2 -2
- package/lib/typescript/commonjs/ui/hooks/useAsyncAction.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts +4 -2
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts +3 -2
- package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts +2 -2
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +20 -19
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +5 -5
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/netConnectivity.d.ts +17 -0
- package/lib/typescript/commonjs/ui/utils/netConnectivity.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts +15 -12
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +5 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/notifications/deviceNotifications.d.ts +173 -0
- package/lib/typescript/module/notifications/deviceNotifications.d.ts.map +1 -0
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts +11 -30
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +5 -3
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxySignInRequestSurface.d.ts +108 -0
- package/lib/typescript/module/ui/components/OxySignInRequestSurface.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/SettingsIcon.d.ts +1 -1
- package/lib/typescript/module/ui/components/SettingsIcon.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts +18 -18
- package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/TroubleDisclosure.d.ts +3 -10
- package/lib/typescript/module/ui/components/authChooser/TroubleDisclosure.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts +8 -4
- package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/types.d.ts +18 -0
- package/lib/typescript/module/ui/components/authChooser/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/types.d.ts +6 -6
- package/lib/typescript/module/ui/components/payment/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/commitSessionFlow.d.ts +0 -40
- package/lib/typescript/module/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +4 -7
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts +0 -1
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/userCache.d.ts +2 -2
- package/lib/typescript/module/ui/hooks/queries/userCache.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAssets.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useAssets.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAsyncAction.d.ts +2 -2
- package/lib/typescript/module/ui/hooks/useAsyncAction.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts +4 -2
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts +3 -2
- package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts +2 -2
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +20 -19
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts +5 -5
- package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/netConnectivity.d.ts +17 -0
- package/lib/typescript/module/ui/utils/netConnectivity.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts +15 -12
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts.map +1 -1
- package/package.json +18 -8
- package/src/index.ts +32 -0
- package/src/notifications/deviceNotifications.ts +458 -0
- package/src/ui/boot/__tests__/coldBootNoIdpRedirect.test.ts +215 -0
- package/src/ui/boot/runProviderColdBoot.ts +24 -101
- package/src/ui/components/AvatarCameraBadge.tsx +1 -1
- package/src/ui/components/OxyAuthChooser.tsx +5 -4
- package/src/ui/components/OxyProvider.tsx +5 -6
- package/src/ui/components/OxySignInRequestSurface.tsx +202 -0
- package/src/ui/components/ProfileButton.tsx +1 -1
- package/src/ui/components/SettingsIcon.tsx +1 -1
- package/src/ui/components/authChooser/AccountsMenuView.tsx +1 -1
- package/src/ui/components/authChooser/SignInEntryView.tsx +9 -3
- package/src/ui/components/authChooser/SignInRequestView.tsx +78 -111
- package/src/ui/components/authChooser/TroubleDisclosure.tsx +3 -11
- package/src/ui/components/authChooser/primitives.tsx +1 -1
- package/src/ui/components/authChooser/requestSurfaces.tsx +15 -11
- package/src/ui/components/authChooser/types.ts +19 -0
- package/src/ui/components/fileManagement/AnimatedButton.tsx +1 -1
- package/src/ui/components/fileManagement/FileDetailsModal.tsx +1 -1
- package/src/ui/components/fileManagement/FileViewer.tsx +1 -1
- package/src/ui/components/fileManagement/UploadPreview.tsx +1 -1
- package/src/ui/components/modals/DeleteAccountModal.tsx +1 -1
- package/src/ui/components/payment/PaymentDetailsStep.tsx +1 -1
- package/src/ui/components/payment/PaymentMethodStep.tsx +1 -1
- package/src/ui/components/payment/PaymentReviewStep.tsx +1 -1
- package/src/ui/components/payment/PaymentSuccessStep.tsx +1 -1
- package/src/ui/components/payment/PaymentSummaryStep.tsx +1 -1
- package/src/ui/components/payment/types.ts +24 -24
- package/src/ui/components/styles/shadow.tsx +2 -2
- package/src/ui/context/OxyContext.tsx +15 -46
- package/src/ui/context/__tests__/commitSessionFlow.test.ts +0 -89
- package/src/ui/context/commitSessionFlow.ts +0 -61
- package/src/ui/context/oxyContextTypes.ts +4 -7
- package/src/ui/context/useOxyAccountGraph.ts +4 -4
- package/src/ui/hooks/queries/userCache.ts +169 -148
- package/src/ui/hooks/useAssets.ts +1 -1
- package/src/ui/hooks/useAsyncAction.ts +2 -2
- package/src/ui/hooks/useAuth.ts +4 -2
- package/src/ui/hooks/useOnlineStatus.ts +3 -2
- package/src/ui/hooks/useSessionManagement.ts +0 -2
- package/src/ui/screens/AccountMembersScreen.tsx +1 -1
- package/src/ui/screens/ConnectedAppsScreen.tsx +1 -1
- package/src/ui/screens/CreateAccountScreen.tsx +1 -1
- package/src/ui/screens/EditProfileFieldScreen.tsx +1 -1
- package/src/ui/screens/FAQScreen.tsx +1 -1
- package/src/ui/screens/FeedbackScreen.tsx +740 -574
- package/src/ui/screens/FileManagementScreen.tsx +2 -1
- package/src/ui/screens/HistoryViewScreen.tsx +4 -19
- package/src/ui/screens/LanguageSelectorScreen.tsx +1 -1
- package/src/ui/screens/ManageAccountScreen.tsx +1 -1
- package/src/ui/screens/PaymentGatewayScreen.tsx +1 -1
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +2 -2
- package/src/ui/screens/PrivacySettingsScreen.tsx +1 -0
- package/src/ui/screens/ProfileScreen.tsx +6 -4
- package/src/ui/screens/UserListScreen.tsx +3 -3
- package/src/ui/screens/WelcomeNewUserScreen.tsx +6 -6
- package/src/ui/screens/fileManagement/FileLibraryError.tsx +1 -1
- package/src/ui/screens/fileManagement/FileListSection.tsx +1 -1
- package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +3 -2
- package/src/ui/screens/fileManagement/UploadBar.tsx +1 -1
- package/src/ui/screens/trust/TrustCenterScreen.tsx +1 -1
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +4 -3
- package/src/ui/screens/trust/TrustRewardsScreen.tsx +1 -1
- package/src/ui/types/navigation.ts +20 -19
- package/src/ui/utils/fileManagement.ts +108 -92
- package/src/ui/utils/netConnectivity.ts +27 -0
- package/src/ui/utils/oauthReturn.ts +15 -30
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js +0 -48
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js.map +0 -1
- package/lib/commonjs/ui/utils/crossOriginRestore.js +0 -140
- package/lib/commonjs/ui/utils/crossOriginRestore.js.map +0 -1
- package/lib/module/ui/oauth/legacyRedirectLanes.js +0 -44
- package/lib/module/ui/oauth/legacyRedirectLanes.js.map +0 -1
- package/lib/module/ui/utils/crossOriginRestore.js +0 -131
- package/lib/module/ui/utils/crossOriginRestore.js.map +0 -1
- package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts +0 -40
- package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts +0 -43
- package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts.map +0 -1
- package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts +0 -40
- package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts.map +0 -1
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts +0 -43
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts.map +0 -1
- package/src/ui/boot/__tests__/coldBootWebAuthMode.test.ts +0 -281
- package/src/ui/oauth/legacyRedirectLanes.ts +0 -43
- package/src/ui/utils/__tests__/crossOriginRestore.test.ts +0 -160
- package/src/ui/utils/crossOriginRestore.ts +0 -168
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { Platform } from
|
|
3
|
+
import { Platform } from "react-native";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Extended File interface that includes a `uri` property for mobile preview support.
|
|
@@ -19,11 +19,11 @@ import { Platform } from 'react-native';
|
|
|
19
19
|
* (carries a URI but is not a real DOM `File` / `Blob` instance).
|
|
20
20
|
*/
|
|
21
21
|
export function isRNFileDescriptor(input) {
|
|
22
|
-
if (!input || typeof input !==
|
|
22
|
+
if (!input || typeof input !== "object") return false;
|
|
23
23
|
const obj = input;
|
|
24
|
-
if (typeof obj.uri !==
|
|
25
|
-
if (typeof File !==
|
|
26
|
-
if (typeof Blob !==
|
|
24
|
+
if (typeof obj.uri !== "string") return false;
|
|
25
|
+
if (typeof File !== "undefined" && input instanceof File) return false;
|
|
26
|
+
if (typeof Blob !== "undefined" && input instanceof Blob) return false;
|
|
27
27
|
return true;
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -31,9 +31,9 @@ export function isRNFileDescriptor(input) {
|
|
|
31
31
|
* Format file size in bytes to human-readable string
|
|
32
32
|
*/
|
|
33
33
|
export function formatFileSize(bytes) {
|
|
34
|
-
if (bytes === 0) return
|
|
34
|
+
if (bytes === 0) return "0 Bytes";
|
|
35
35
|
const k = 1024;
|
|
36
|
-
const sizes = [
|
|
36
|
+
const sizes = ["Bytes", "KB", "MB", "GB"];
|
|
37
37
|
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
38
38
|
return `${Number.parseFloat((bytes / k ** i).toFixed(2))} ${sizes[i]}`;
|
|
39
39
|
}
|
|
@@ -42,14 +42,14 @@ export function formatFileSize(bytes) {
|
|
|
42
42
|
* Get icon name for file based on content type
|
|
43
43
|
*/
|
|
44
44
|
export function getFileIcon(contentType) {
|
|
45
|
-
if (contentType.startsWith(
|
|
46
|
-
if (contentType.startsWith(
|
|
47
|
-
if (contentType.startsWith(
|
|
48
|
-
if (contentType.includes(
|
|
49
|
-
if (contentType.includes(
|
|
50
|
-
if (contentType.includes(
|
|
51
|
-
if (contentType.includes(
|
|
52
|
-
return
|
|
45
|
+
if (contentType.startsWith("image/")) return "image";
|
|
46
|
+
if (contentType.startsWith("video/")) return "videocam";
|
|
47
|
+
if (contentType.startsWith("audio/")) return "musical-notes";
|
|
48
|
+
if (contentType.includes("pdf")) return "document-text";
|
|
49
|
+
if (contentType.includes("word") || contentType.includes("doc")) return "document";
|
|
50
|
+
if (contentType.includes("excel") || contentType.includes("sheet")) return "grid";
|
|
51
|
+
if (contentType.includes("zip") || contentType.includes("archive")) return "archive";
|
|
52
|
+
return "document-outline";
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
@@ -66,18 +66,18 @@ export function getFileIcon(contentType) {
|
|
|
66
66
|
*/
|
|
67
67
|
export async function convertDocumentPickerAssetToFile(doc, index) {
|
|
68
68
|
const fileName = doc.name || `file-${index + 1}`;
|
|
69
|
-
const fileType = doc.mimeType ||
|
|
69
|
+
const fileType = doc.mimeType || "application/octet-stream";
|
|
70
70
|
|
|
71
71
|
// React Native path — return the descriptor as-is. FormData handles it.
|
|
72
|
-
if (Platform.OS !==
|
|
72
|
+
if (Platform.OS !== "web") {
|
|
73
73
|
if (!doc.uri) {
|
|
74
|
-
throw new Error(
|
|
74
|
+
throw new Error("Missing file data (no uri property)");
|
|
75
75
|
}
|
|
76
76
|
return {
|
|
77
77
|
uri: doc.uri,
|
|
78
78
|
type: fileType,
|
|
79
79
|
name: fileName,
|
|
80
|
-
size: typeof doc.size ===
|
|
80
|
+
size: typeof doc.size === "number" ? doc.size : undefined
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
try {
|
|
@@ -85,7 +85,7 @@ export async function convertDocumentPickerAssetToFile(doc, index) {
|
|
|
85
85
|
|
|
86
86
|
// Priority 1: Use doc.file if available (web native File API).
|
|
87
87
|
// This is the most efficient path as it doesn't require fetching.
|
|
88
|
-
if (doc.file && typeof globalThis.File !==
|
|
88
|
+
if (doc.file && typeof globalThis.File !== "undefined" && doc.file instanceof globalThis.File) {
|
|
89
89
|
file = doc.file;
|
|
90
90
|
// Ensure file has required properties
|
|
91
91
|
if (!file.name && doc.name) {
|
|
@@ -109,22 +109,22 @@ export async function convertDocumentPickerAssetToFile(doc, index) {
|
|
|
109
109
|
throw new Error(`Failed to fetch file: ${response.statusText}`);
|
|
110
110
|
}
|
|
111
111
|
const blob = await response.blob();
|
|
112
|
-
const resolvedType = doc.mimeType || blob.type ||
|
|
112
|
+
const resolvedType = doc.mimeType || blob.type || "application/octet-stream";
|
|
113
113
|
file = new globalThis.File([blob], fileName, {
|
|
114
114
|
type: resolvedType
|
|
115
115
|
});
|
|
116
116
|
file.uri = doc.uri;
|
|
117
117
|
return file;
|
|
118
118
|
} catch (error) {
|
|
119
|
-
console.error(
|
|
120
|
-
throw new Error(`Failed to load file: ${(error instanceof Error ? error.message : null) ||
|
|
119
|
+
console.error("Failed to read file from URI:", error);
|
|
120
|
+
throw new Error(`Failed to load file: ${(error instanceof Error ? error.message : null) || "Unknown error"}`);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
// No file or URI available - this shouldn't happen with Expo 54
|
|
125
|
-
throw new Error(
|
|
125
|
+
throw new Error("Missing file data (no file or uri property)");
|
|
126
126
|
} catch (error) {
|
|
127
|
-
console.error(
|
|
127
|
+
console.error("Error converting document to file:", error);
|
|
128
128
|
throw error;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","isRNFileDescriptor","input","obj","uri","File","Blob","formatFileSize","bytes","k","sizes","i","Math","floor","log","Number","parseFloat","toFixed","getFileIcon","contentType","startsWith","includes","convertDocumentPickerAssetToFile","doc","index","fileName","name","fileType","mimeType","OS","Error","type","size","undefined","file","globalThis","response","fetch","ok","statusText","blob","resolvedType","error","console","message","uploadFileRaw","userId","oxyServices","visibility","uploadRawFile"],"sourceRoot":"../../../../src","sources":["ui/utils/fileManagement.ts"],"mappings":";;AAGA,SAASA,QAAQ,QAAQ,cAAc;;AAEvC;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAACC,KAAc,EAA6B;
|
|
1
|
+
{"version":3,"names":["Platform","isRNFileDescriptor","input","obj","uri","File","Blob","formatFileSize","bytes","k","sizes","i","Math","floor","log","Number","parseFloat","toFixed","getFileIcon","contentType","startsWith","includes","convertDocumentPickerAssetToFile","doc","index","fileName","name","fileType","mimeType","OS","Error","type","size","undefined","file","globalThis","response","fetch","ok","statusText","blob","resolvedType","error","console","message","uploadFileRaw","userId","oxyServices","visibility","uploadRawFile"],"sourceRoot":"../../../../src","sources":["ui/utils/fileManagement.ts"],"mappings":";;AAGA,SAASA,QAAQ,QAAQ,cAAc;;AAEvC;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAACC,KAAc,EAA6B;EAC7E,IAAI,CAACA,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE,OAAO,KAAK;EACrD,MAAMC,GAAG,GAAGD,KAAgC;EAC5C,IAAI,OAAOC,GAAG,CAACC,GAAG,KAAK,QAAQ,EAAE,OAAO,KAAK;EAC7C,IAAI,OAAOC,IAAI,KAAK,WAAW,IAAIH,KAAK,YAAYG,IAAI,EAAE,OAAO,KAAK;EACtE,IAAI,OAAOC,IAAI,KAAK,WAAW,IAAIJ,KAAK,YAAYI,IAAI,EAAE,OAAO,KAAK;EACtE,OAAO,IAAI;AACZ;;AAEA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAACC,KAAa,EAAU;EACrD,IAAIA,KAAK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|
+
* Mirrors Bloom `ConnectionStatusToasts` reachability semantics: a link that
|
|
5
|
+
* reports connected but explicitly unreachable (captive portal, no route) counts
|
|
6
|
+
* as offline.
|
|
7
|
+
*/
|
|
8
|
+
export function isNetConnectivityOnline(state) {
|
|
9
|
+
return Boolean(state.isConnected && state.isInternetReachable !== false);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Conservative offline verdict for boot-path probes. Unknown / probing states
|
|
14
|
+
* (`null`, timed-out fetch) resolve to "not offline" so a flaky probe never
|
|
15
|
+
* skips a real sign-in.
|
|
16
|
+
*/
|
|
17
|
+
export function isNetConnectivityExplicitlyOffline(state) {
|
|
18
|
+
if (!state) return false;
|
|
19
|
+
if (state.isConnected === false) return true;
|
|
20
|
+
if (state.isConnected === true && state.isInternetReachable === false) return true;
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=netConnectivity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isNetConnectivityOnline","state","Boolean","isConnected","isInternetReachable","isNetConnectivityExplicitlyOffline"],"sourceRoot":"../../../../src","sources":["ui/utils/netConnectivity.ts"],"mappings":";;AAKA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,uBAAuBA,CAACC,KAAuB,EAAW;EACxE,OAAOC,OAAO,CAACD,KAAK,CAACE,WAAW,IAAIF,KAAK,CAACG,mBAAmB,KAAK,KAAK,CAAC;AAC1E;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kCAAkCA,CAChDJ,KAA0C,EACjC;EACT,IAAI,CAACA,KAAK,EAAE,OAAO,KAAK;EACxB,IAAIA,KAAK,CAACE,WAAW,KAAK,KAAK,EAAE,OAAO,IAAI;EAC5C,IAAIF,KAAK,CAACE,WAAW,KAAK,IAAI,IAAIF,KAAK,CAACG,mBAAmB,KAAK,KAAK,EAAE,OAAO,IAAI;EAClF,OAAO,KAAK;AACd","ignoreList":[]}
|
|
@@ -8,12 +8,21 @@ import { isWebBrowser } from "./isWebBrowser.js";
|
|
|
8
8
|
* When the RP lands with `?code=` after signing in at auth.oxy.so, exchange the
|
|
9
9
|
* code for a device-first session before cold boot runs.
|
|
10
10
|
*
|
|
11
|
-
* This is the REDIRECT transport's return leg.
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
11
|
+
* This is the REDIRECT transport's return leg. The SDK never starts a full-page
|
|
12
|
+
* authorize navigation on its own any more (#691 phase 7b), but this lane is
|
|
13
|
+
* still load-bearing: a browser-BLOCKED sign-in popup falls back to a full-page
|
|
14
|
+
* redirect (`startWebOAuthSignIn`), and that redirect comes back here.
|
|
15
|
+
*
|
|
16
|
+
* It owns only what is specific to a full-page round trip — reading the code off
|
|
17
|
+
* the URL, recovering the handshake `sessionStorage` carried across the
|
|
18
|
+
* navigation, and cleaning both up afterwards — and delegates state validation,
|
|
19
|
+
* the PKCE exchange, and the session commit to `completeOAuthCode`, the same
|
|
20
|
+
* function the popup transport runs.
|
|
21
|
+
*
|
|
22
|
+
* It is also the SINGLE cleanup path for an OAuth `error` landing on the URL:
|
|
23
|
+
* any `?error=…` (including an `error=login_required` left over from the
|
|
24
|
+
* now-deleted silent restore) is stripped along with `state` /
|
|
25
|
+
* `error_description`, and the stale PKCE handshake is cleared.
|
|
17
26
|
*/
|
|
18
27
|
export async function tryCompleteOAuthReturn(opts) {
|
|
19
28
|
if (!isWebBrowser()) return false;
|
|
@@ -108,27 +117,6 @@ function stripOAuthParamsFromUrl() {
|
|
|
108
117
|
url.searchParams.delete('state');
|
|
109
118
|
url.searchParams.delete('error');
|
|
110
119
|
url.searchParams.delete('error_description');
|
|
111
|
-
url.searchParams.delete('hub_sync');
|
|
112
|
-
replaceUrlAfterOAuthReturn(`${url.pathname}${url.search}${url.hash}`);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* When auth.oxy.so hub-sync redeem fails, the IdP redirects back with
|
|
117
|
-
* `?hub_sync=failed`. Strip the param and log so cold boot can continue
|
|
118
|
-
* without leaving a stale query string.
|
|
119
|
-
*/
|
|
120
|
-
export function consumeHubSyncFailure() {
|
|
121
|
-
if (!isWebBrowser()) return false;
|
|
122
|
-
const location = globalThis.location;
|
|
123
|
-
if (!location) return false;
|
|
124
|
-
const params = new URLSearchParams(location.search);
|
|
125
|
-
if (params.get('hub_sync') !== 'failed') return false;
|
|
126
|
-
logger.warn('Hub sync failed — IdP device session may be out of sync', {
|
|
127
|
-
component: 'hubSync'
|
|
128
|
-
});
|
|
129
|
-
const url = new URL(location.href);
|
|
130
|
-
url.searchParams.delete('hub_sync');
|
|
131
120
|
replaceUrlAfterOAuthReturn(`${url.pathname}${url.search}${url.hash}`);
|
|
132
|
-
return true;
|
|
133
121
|
}
|
|
134
122
|
//# sourceMappingURL=oauthReturn.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["clearOAuthHandshake","consumeOAuthReturnPath","logger","canonicalizeOAuthRedirectUri","readOAuthHandshake","completeOAuthCode","isWebBrowser","tryCompleteOAuthReturn","opts","location","globalThis","params","URLSearchParams","search","code","get","oauthError","stripOAuthParamsFromUrl","clientId","warn","component","handshake","redirectUri","authRedirectUri","origin","result","oxyServices","returnedState","commitSession","cleanup","ok","replaceUrlAfterOAuthReturn","fallbackUrl","history","replaceState","current","pathname","hash","target","state","dispatch","dispatchEvent","event","PopStateEvent","Event","call","error","url","URL","href","searchParams","delete"
|
|
1
|
+
{"version":3,"names":["clearOAuthHandshake","consumeOAuthReturnPath","logger","canonicalizeOAuthRedirectUri","readOAuthHandshake","completeOAuthCode","isWebBrowser","tryCompleteOAuthReturn","opts","location","globalThis","params","URLSearchParams","search","code","get","oauthError","stripOAuthParamsFromUrl","clientId","warn","component","handshake","redirectUri","authRedirectUri","origin","result","oxyServices","returnedState","commitSession","cleanup","ok","replaceUrlAfterOAuthReturn","fallbackUrl","history","replaceState","current","pathname","hash","target","state","dispatch","dispatchEvent","event","PopStateEvent","Event","call","error","url","URL","href","searchParams","delete"],"sourceRoot":"../../../../src","sources":["ui/utils/oauthReturn.ts"],"mappings":";;AACA,SACEA,mBAAmB,EACnBC,sBAAsB,EACtBC,MAAM,EACNC,4BAA4B,EAC5BC,kBAAkB,QACb,aAAa;AACpB,SAASC,iBAAiB,QAAQ,+BAA4B;AAE9D,SAASC,YAAY,QAAQ,mBAAgB;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,sBAAsBA,CAACC,IAK5C,EAAoB;EACnB,IAAI,CAACF,YAAY,CAAC,CAAC,EAAE,OAAO,KAAK;EACjC,MAAMG,QAAQ,GAAIC,UAAU,CAA6BD,QAAQ;EACjE,IAAI,CAACA,QAAQ,EAAE,OAAO,KAAK;EAE3B,MAAME,MAAM,GAAG,IAAIC,eAAe,CAACH,QAAQ,CAACI,MAAM,CAAC;EACnD,MAAMC,IAAI,GAAGH,MAAM,CAACI,GAAG,CAAC,MAAM,CAAC;EAC/B,MAAMC,UAAU,GAAGL,MAAM,CAACI,GAAG,CAAC,OAAO,CAAC;EACtC,IAAIC,UAAU,EAAE;IACdC,uBAAuB,CAAC,CAAC;IACzBjB,mBAAmB,CAAC,CAAC;IACrB,OAAO,KAAK;EACd;EACA,IAAI,CAACc,IAAI,EAAE,OAAO,KAAK;EAEvB,MAAMI,QAAQ,GAAGV,IAAI,CAACU,QAAQ;EAC9B,IAAI,CAACA,QAAQ,EAAE;IACbhB,MAAM,CAACiB,IAAI,CAAC,wCAAwC,EAAE;MAAEC,SAAS,EAAE;IAAc,CAAC,CAAC;IACnFH,uBAAuB,CAAC,CAAC;IACzBjB,mBAAmB,CAAC,CAAC;IACrB,OAAO,KAAK;EACd;EAEA,MAAMqB,SAAS,GAAGjB,kBAAkB,CAAC,CAAC;EACtC,MAAMkB,WAAW,G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MAAME,KAAK,GACT,OAAOC,aAAa,KAAK,UAAU,GAC/B,IAAIA,aAAa,CAAC,UAAU,EAAE;MAAEJ,KAAK,EAAEN,OAAO,CAACM;IAAM,CAAC,CAAC,GACvD,IAAIK,KAAK,CAAC,UAAU,CAAC;IAC3BJ,QAAQ,CAACK,IAAI,CAACnC,UAAU,EAAEgC,KAAK,CAAC;EAClC,CAAC,CAAC,OAAOI,KAAK,EAAE;IACd5C,MAAM,CAACiB,IAAI,CAAC,yCAAyC,EAAE;MAAEC,SAAS,EAAE;IAAc,CAAC,EAAE0B,KAAK,CAAC;EAC7F;AACF;AAEA,SAAS7B,uBAAuBA,CAAA,EAAS;EACvC,MAAMR,QAAQ,GAAIC,UAAU,CAAgDD,QAAQ;EACpF,MAAMwB,OAAO,GAAIvB,UAAU,CAA2BuB,OAAO;EAC7D,IAAI,CAACxB,QAAQ,IAAI,CAACwB,OAAO,EAAEC,YAAY,EAAE;EACzC,MAAMa,GAAG,GAAG,IAAIC,GAAG,CAACvC,QAAQ,CAACwC,IAAI,CAAC;EAClCF,GAAG,CAACG,YAAY,CAACC,MAAM,CAAC,MAAM,CAAC;EAC/BJ,GAAG,CAACG,YAAY,CAACC,MAAM,CAAC,OAAO,CAAC;EAChCJ,GAAG,CAACG,YAAY,CAACC,MAAM,CAAC,OAAO,CAAC;EAChCJ,GAAG,CAACG,YAAY,CAACC,MAAM,CAAC,mBAAmB,CAAC;EAC5CpB,0BAA0B,CAAC,GAAGgB,GAAG,CAACX,QAAQ,GAAGW,GAAG,CAAClC,MAAM,GAAGkC,GAAG,CAACV,IAAI,EAAE,CAAC;AACvE","ignoreList":[]}
|
|
@@ -56,6 +56,8 @@ export { handleAuthError, isInvalidSessionError, isTimeoutOrNetworkError, extrac
|
|
|
56
56
|
export type { HandleAuthErrorOptions } from './ui/utils/errorHandlers';
|
|
57
57
|
export { useFileFiltering } from './ui/hooks/useFileFiltering';
|
|
58
58
|
export type { ViewMode, SortBy, SortOrder } from './ui/hooks/useFileFiltering';
|
|
59
|
+
export { pushTokenPlatform, hasNotificationPermission, requestNotificationPermission, getExpoPushToken, takeLaunchNotificationData, ensureNotificationChannel, installForegroundNotificationHandler, subscribeToNotificationResponses, } from './notifications/deviceNotifications';
|
|
60
|
+
export type { NotificationChannelImportance, NotificationChannelSpec, ForegroundPresentation } from './notifications/deviceNotifications';
|
|
59
61
|
export { OXY_OAUTH_STATE_STORAGE_KEY, OXY_OAUTH_CODE_VERIFIER_STORAGE_KEY, } from '@oxyhq/core';
|
|
60
62
|
export { default as OxySignInButton } from './ui/components/OxySignInButton';
|
|
61
63
|
export type { OxySignInButtonProps, OxyOAuthResult } from './ui/components/OxySignInButton';
|
|
@@ -79,6 +81,9 @@ export { default as ProfileButton } from './ui/components/ProfileButton';
|
|
|
79
81
|
export type { ProfileButtonProps } from './ui/components/ProfileButton';
|
|
80
82
|
export { default as OxyAuthChooser } from './ui/components/OxyAuthChooser';
|
|
81
83
|
export type { OxyAuthChooserProps } from './ui/components/OxyAuthChooser';
|
|
84
|
+
export { OxySignInRequestSurface } from './ui/components/OxySignInRequestSurface';
|
|
85
|
+
export type { OxySignInRequestSurfaceProps } from './ui/components/OxySignInRequestSurface';
|
|
86
|
+
export type { OxySignInSurfaceAction } from './ui/components/authChooser/types';
|
|
82
87
|
export { useSwitchableAccounts } from './ui/hooks/useSwitchableAccounts';
|
|
83
88
|
export type { UseSwitchableAccountsResult } from './ui/hooks/useSwitchableAccounts';
|
|
84
89
|
export { default as ProfileScreen } from './ui/screens/ProfileScreen';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAYH,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,YAAY,EAAE,eAAe,EAAE,MAAM,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4B,EAAE,MAAM,yCAAyC,CAAC;AAC5F,YAAY,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAQhF,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,YAAY,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAGpF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGlF,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAKtF,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACvF,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAKxD,OAAO,EAAE,gBAAgB,EAAE,KAAK,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAC1F,OAAO,EAAE,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAMzG,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,sCAAsC,CAAC"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ONE place `@oxyhq/services` touches `expo-notifications`.
|
|
3
|
+
*
|
|
4
|
+
* Every Oxy app that receives push needs the identical adapter — native-only,
|
|
5
|
+
* dynamically imported, reading the OS permission and minting an EXPO push
|
|
6
|
+
* token — so it lives here instead of being copied into each app. The
|
|
7
|
+
* bearer-authenticated transport (`registerPushToken` / `unregisterPushToken`)
|
|
8
|
+
* already lives in `@oxyhq/core`; core may never import an `expo-*` module, and
|
|
9
|
+
* this adapter is the Expo-side half that closes that gap.
|
|
10
|
+
*
|
|
11
|
+
* ## Native-only by construction
|
|
12
|
+
*
|
|
13
|
+
* Every entry point resolves its null/no-op result from `Platform.OS` BEFORE the
|
|
14
|
+
* dynamic `import()`, so a web bundle never requests `expo-notifications` at all.
|
|
15
|
+
* `expo-notifications` and `expo-constants` are OPTIONAL peer dependencies: an
|
|
16
|
+
* app that does not use push never installs them, and a build without them
|
|
17
|
+
* degrades to "notifications unavailable" rather than throwing at
|
|
18
|
+
* module-evaluation time.
|
|
19
|
+
*
|
|
20
|
+
* ## The token is an EXPO push token — never a raw device token
|
|
21
|
+
*
|
|
22
|
+
* {@link getExpoPushToken} calls `getExpoPushTokenAsync()`, which returns the
|
|
23
|
+
* `ExponentPushToken[…]` handle Expo's push service delivers through — the only
|
|
24
|
+
* form it accepts. `getDevicePushTokenAsync()` — the raw APNs/FCM token — is
|
|
25
|
+
* deliberately NOT used anywhere: registering one of those looks entirely
|
|
26
|
+
* successful (the row is stored, the endpoint returns 200) and then every push
|
|
27
|
+
* silently fails at delivery time. `@oxyhq/core`'s `registerPushToken` rejects a
|
|
28
|
+
* raw device token before sending, and this module is the reason it never has to.
|
|
29
|
+
*
|
|
30
|
+
* ## The payload is untrusted
|
|
31
|
+
*
|
|
32
|
+
* Nothing here surfaces a notification's `title` / `body` / `subtitle`. The only
|
|
33
|
+
* payload that leaves this module is the raw `content.data` — the routing keys —
|
|
34
|
+
* typed `unknown`, so a caller has to validate it before acting on it and there
|
|
35
|
+
* is no exported shape that invites rendering push-delivered text. The
|
|
36
|
+
* foreground handler likewise answers with a visibility verdict and nothing else.
|
|
37
|
+
*/
|
|
38
|
+
import type { PushTokenPlatform } from '@oxyhq/core';
|
|
39
|
+
/**
|
|
40
|
+
* The platform tag the push-token registry stores this installation under, or
|
|
41
|
+
* `null` on a platform Oxy does not deliver push to.
|
|
42
|
+
*
|
|
43
|
+
* Synchronous and import-free — the answer is a property of the bundle, not of
|
|
44
|
+
* any native module.
|
|
45
|
+
*
|
|
46
|
+
* Web is `null` on purpose: the registry accepts a `web` platform, but browser
|
|
47
|
+
* push needs a VAPID key + service-worker subscription no Oxy app has wired, so
|
|
48
|
+
* there is no token to register and claiming otherwise would store a row nothing
|
|
49
|
+
* can ever deliver to.
|
|
50
|
+
*/
|
|
51
|
+
export declare function pushTokenPlatform(): PushTokenPlatform | null;
|
|
52
|
+
/**
|
|
53
|
+
* Whether the OS notification permission is ALREADY granted.
|
|
54
|
+
*
|
|
55
|
+
* Never prompts, so an app can re-check on every cold boot without ever asking
|
|
56
|
+
* the user twice. Use {@link requestNotificationPermission} for the one place
|
|
57
|
+
* that is allowed to show the system dialog.
|
|
58
|
+
*/
|
|
59
|
+
export declare function hasNotificationPermission(): Promise<boolean>;
|
|
60
|
+
/**
|
|
61
|
+
* Ensure the OS notification permission, prompting at most once.
|
|
62
|
+
*
|
|
63
|
+
* An installation that already answered the system dialog is never asked again:
|
|
64
|
+
* an already-granted permission resolves `true` without a second dialog, and a
|
|
65
|
+
* denial with `canAskAgain: false` resolves `false` without issuing a request
|
|
66
|
+
* the OS would silently ignore.
|
|
67
|
+
*
|
|
68
|
+
* @returns Whether notifications are granted once this call is done.
|
|
69
|
+
*/
|
|
70
|
+
export declare function requestNotificationPermission(): Promise<boolean>;
|
|
71
|
+
/**
|
|
72
|
+
* This installation's Expo push token (`ExponentPushToken[…]`), or `null` when
|
|
73
|
+
* one cannot be minted.
|
|
74
|
+
*
|
|
75
|
+
* Deliberately `getExpoPushTokenAsync` — see the module header for why the raw
|
|
76
|
+
* device-token variant is never used.
|
|
77
|
+
*
|
|
78
|
+
* Every `null` is logged with the reason it happened. A missing EAS project id
|
|
79
|
+
* in particular is a BUILD MISCONFIGURATION, not a user state: no token can ever
|
|
80
|
+
* be minted, so push is off for every install of that build until the config is
|
|
81
|
+
* fixed. It is reported as such rather than blending into the
|
|
82
|
+
* indistinguishable "permission denied / offline" bucket.
|
|
83
|
+
*/
|
|
84
|
+
export declare function getExpoPushToken(): Promise<string | null>;
|
|
85
|
+
/**
|
|
86
|
+
* Take the payload of the notification that COLD-LAUNCHED the app, if any.
|
|
87
|
+
*
|
|
88
|
+
* "Take" is literal: the response is cleared from `expo-notifications` once
|
|
89
|
+
* read, so a listener attached later in the same launch is not handed the same
|
|
90
|
+
* tap again. Clearing is best-effort across OS/module versions, so a caller that
|
|
91
|
+
* must not act twice still needs its own idempotency ledger.
|
|
92
|
+
*
|
|
93
|
+
* @returns The raw, untrusted `content.data` of the launching notification, or
|
|
94
|
+
* `null`. Parsing/validation is the caller's job.
|
|
95
|
+
*/
|
|
96
|
+
export declare function takeLaunchNotificationData(): Promise<unknown>;
|
|
97
|
+
/**
|
|
98
|
+
* What the OS should do with a notification that arrives while the app is
|
|
99
|
+
* FOREGROUNDED.
|
|
100
|
+
*
|
|
101
|
+
* `'suppress'` is `expo-notifications`' own default for a foregrounded app, so a
|
|
102
|
+
* decision function that only ever returns `'show'` for the payloads it
|
|
103
|
+
* recognises leaves every other notification exactly as it behaves today.
|
|
104
|
+
*/
|
|
105
|
+
export type ForegroundPresentation = 'show' | 'suppress';
|
|
106
|
+
/** How prominently Android surfaces a channel's notifications. */
|
|
107
|
+
export type NotificationChannelImportance = 'default' | 'high';
|
|
108
|
+
/** An Android notification channel this app delivers on. */
|
|
109
|
+
export interface NotificationChannelSpec {
|
|
110
|
+
/**
|
|
111
|
+
* The channel id. It MUST match the id the sender attaches: Android 8+ drops
|
|
112
|
+
* a notification whose channel the app has not created, silently and with no
|
|
113
|
+
* error on either side, which is the hardest push symptom there is to
|
|
114
|
+
* diagnose. Ids that cross the wire belong in `@oxyhq/contracts`, not in a
|
|
115
|
+
* string typed on both sides.
|
|
116
|
+
*/
|
|
117
|
+
id: string;
|
|
118
|
+
/** User-visible channel name — app copy, so the caller localizes it. */
|
|
119
|
+
name: string;
|
|
120
|
+
/** User-visible description shown in Android's notification settings. */
|
|
121
|
+
description?: string;
|
|
122
|
+
importance?: NotificationChannelImportance;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Create (or update) an Android notification channel.
|
|
126
|
+
*
|
|
127
|
+
* A no-op everywhere but Android: iOS has no channels, and web never loads the
|
|
128
|
+
* native module. Call it BEFORE registering a push token, so the very first
|
|
129
|
+
* notification the server sends already has a channel to land on.
|
|
130
|
+
*
|
|
131
|
+
* Failure is non-fatal and logged: a missing channel costs visibility, and
|
|
132
|
+
* refusing to register a token over it would cost the feature entirely.
|
|
133
|
+
*
|
|
134
|
+
* @returns Whether the channel was actually created (`false` off Android, or
|
|
135
|
+
* when the native module is unavailable, or when creation failed).
|
|
136
|
+
*/
|
|
137
|
+
export declare function ensureNotificationChannel(spec: NotificationChannelSpec): Promise<boolean>;
|
|
138
|
+
/**
|
|
139
|
+
* Install the ONE process-wide handler that decides whether an incoming
|
|
140
|
+
* notification is shown while the app is in the FOREGROUND.
|
|
141
|
+
*
|
|
142
|
+
* Without a handler, `expo-notifications` shows nothing at all while the app is
|
|
143
|
+
* open — which is exactly when a time-critical notification (a "Sign in with
|
|
144
|
+
* Oxy" approval request, say) matters most, because the user is already holding
|
|
145
|
+
* the phone.
|
|
146
|
+
*
|
|
147
|
+
* The handler ONLY decides visibility. It never navigates, never acts on the
|
|
148
|
+
* notification, and never reads the payload for display — `decide` is handed the
|
|
149
|
+
* raw, untrusted `content.data` and may answer nothing but `'show'` /
|
|
150
|
+
* `'suppress'`. Acting on a notification stays with a TAP, routed by
|
|
151
|
+
* {@link subscribeToNotificationResponses}. No notification actions/categories
|
|
152
|
+
* are registered here, so the banner cannot carry an action button.
|
|
153
|
+
*
|
|
154
|
+
* The one-shot latch is set BEFORE the first `await`, so concurrent callers
|
|
155
|
+
* cannot both reach `setNotificationHandler`.
|
|
156
|
+
*
|
|
157
|
+
* @param decide - Maps the raw, untrusted payload to a presentation verdict.
|
|
158
|
+
* Must not throw; a throw is reported by the OS as a handling error and the
|
|
159
|
+
* notification is dropped.
|
|
160
|
+
* @returns Whether a handler was installed by THIS call (`false` on a repeat
|
|
161
|
+
* call, on web, or when the native module is unavailable).
|
|
162
|
+
*/
|
|
163
|
+
export declare function installForegroundNotificationHandler(decide: (data: unknown) => ForegroundPresentation): Promise<boolean>;
|
|
164
|
+
/**
|
|
165
|
+
* Subscribe to notification TAPS (responses) while the app is running.
|
|
166
|
+
*
|
|
167
|
+
* @param listener - Receives the raw, untrusted `content.data` of the tapped
|
|
168
|
+
* notification. Parsing/validation is the caller's job.
|
|
169
|
+
* @returns An unsubscribe function. Safe to call even if the subscription could
|
|
170
|
+
* not be established.
|
|
171
|
+
*/
|
|
172
|
+
export declare function subscribeToNotificationResponses(listener: (data: unknown) => void): Promise<() => void>;
|
|
173
|
+
//# sourceMappingURL=deviceNotifications.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deviceNotifications.d.ts","sourceRoot":"","sources":["../../../../src/notifications/deviceNotifications.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AA4ErD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,IAAI,iBAAiB,GAAG,IAAI,CAE5D;AAED;;;;;;GAMG;AACH,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,OAAO,CAAC,CAgBlE;AAED;;;;;;;;;GASG;AACH,wBAAsB,6BAA6B,IAAI,OAAO,CAAC,OAAO,CAAC,CAuBtE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA0B/D;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,OAAO,CAAC,CA6BnE;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,UAAU,CAAC;AAiBzD,kEAAkE;AAClE,MAAM,MAAM,6BAA6B,GAAG,SAAS,GAAG,MAAM,CAAC;AAE/D,4DAA4D;AAC5D,MAAM,WAAW,uBAAuB;IACtC;;;;;;OAMG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,6BAA6B,CAAC;CAC5C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,uBAAuB,GAC5B,OAAO,CAAC,OAAO,CAAC,CA0BlB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,oCAAoC,CACxD,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,sBAAsB,GAChD,OAAO,CAAC,OAAO,CAAC,CAsClB;AAED;;;;;;;GAOG;AACH,wBAAsB,gCAAgC,CACpD,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,GAChC,OAAO,CAAC,MAAM,IAAI,CAAC,CAkBrB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type AuthStateStore, type IdentityBinding, type OxyServices, type SessionMode } from '@oxyhq/core';
|
|
2
2
|
import type { SessionClient } from '@oxyhq/core';
|
|
3
|
-
import type { WebAuthMode } from '../oauth/types';
|
|
4
3
|
import type { CommitInput } from '../context/oxyContextTypes';
|
|
5
4
|
/** How long the cold boot waits for the post-boot SessionClient handoff (ms). */
|
|
6
5
|
export declare const SESSION_HANDOFF_DEADLINE_MS = 6000;
|
|
@@ -21,38 +20,20 @@ export interface RunProviderColdBootOptions {
|
|
|
21
20
|
authStore: AuthStateStore;
|
|
22
21
|
clientId?: string;
|
|
23
22
|
authRedirectUri?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Authorize endpoint override for silent cross-origin restore. Defaults to
|
|
26
|
-
* the production Oxy IdP when unset; a local/staging deployment sets it so the
|
|
27
|
-
* silent-restore redirect targets its own IdP, never production.
|
|
28
|
-
*/
|
|
29
|
-
authorizeBaseUrl?: string;
|
|
30
23
|
/**
|
|
31
24
|
* Who owns the session this boot resolves. `'account'` (the default) is the
|
|
32
25
|
* device's active account — every ordinary Oxy app. `'identity'` binds the
|
|
33
26
|
* boot to the owner of this device's PRIMARY identity key and REQUIRES
|
|
34
|
-
* {@link identity}; it also disables the
|
|
35
|
-
*
|
|
27
|
+
* {@link identity}; it also disables the web OAuth return leg below, which
|
|
28
|
+
* commits whatever account the IdP hands back.
|
|
36
29
|
*/
|
|
37
30
|
sessionMode?: SessionMode;
|
|
38
31
|
/** The identity binding required by `sessionMode: 'identity'`. */
|
|
39
32
|
identity?: IdentityBinding;
|
|
40
|
-
/**
|
|
41
|
-
* How this provider's WEB sign-in reaches the IdP
|
|
42
|
-
* (`OxyProviderProps.webAuthMode`).
|
|
43
|
-
*
|
|
44
|
-
* A first-class INPUT to the boot, not a UI-only concern: `'popup'` forbids
|
|
45
|
-
* the automatic full-page `prompt=none` restore in step 3, so a domain with no
|
|
46
|
-
* local credential resolves SIGNED OUT instead of bouncing the top-level
|
|
47
|
-
* window to `auth.oxy.so`. See `allowsAutomaticIdpRedirect`.
|
|
48
|
-
* @default 'redirect'
|
|
49
|
-
*/
|
|
50
|
-
webAuthMode?: WebAuthMode;
|
|
51
33
|
sessionClient: SessionClient;
|
|
52
34
|
syncDeviceCredentialToHost: () => Promise<void>;
|
|
53
35
|
commitSession: (input: CommitInput, options: {
|
|
54
36
|
activate: boolean;
|
|
55
|
-
hubSync?: boolean;
|
|
56
37
|
}) => Promise<void>;
|
|
57
38
|
markAuthResolved: () => void;
|
|
58
39
|
setTokenReady: (ready: boolean) => void;
|
|
@@ -61,19 +42,19 @@ export interface RunProviderColdBootOptions {
|
|
|
61
42
|
* Device-first cold boot for `@oxyhq/services` providers.
|
|
62
43
|
*
|
|
63
44
|
* Ordered pipeline:
|
|
64
|
-
* 1. Complete OAuth authorization-code return (web)
|
|
45
|
+
* 1. Complete an OAuth authorization-code return already on the URL (web)
|
|
65
46
|
* 2. `runSessionColdBoot` — device-secret mint (+ native shared-key, or the
|
|
66
47
|
* primary-identity-key lane in `sessionMode: 'identity'`)
|
|
67
|
-
* 3. Silent OAuth for all web apps when mint finds no session
|
|
68
48
|
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
49
|
+
* Step 1 is ACCOUNT-MODE ONLY: it commits whichever account the IdP resolves,
|
|
50
|
+
* which for an identity-bound client is somebody else's account by construction.
|
|
51
|
+
* In `'identity'` mode the boot is exactly step 2.
|
|
72
52
|
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
53
|
+
* The boot NEVER navigates the top-level window. There is no automatic
|
|
54
|
+
* `prompt=none` bounce to the IdP: a web origin with no local device credential
|
|
55
|
+
* resolves SIGNED OUT and waits for the user's next explicit "Continue with
|
|
56
|
+
* Oxy", which opens a popup from a real gesture (#691 phase 7b). Step 1 is not a
|
|
57
|
+
* navigation — it only consumes a code that is already in the address bar.
|
|
77
58
|
*/
|
|
78
59
|
export declare function runProviderColdBoot(opts: RunProviderColdBootOptions): Promise<void>;
|
|
79
60
|
//# sourceMappingURL=runProviderColdBoot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runProviderColdBoot.d.ts","sourceRoot":"","sources":["../../../../../src/ui/boot/runProviderColdBoot.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"runProviderColdBoot.d.ts","sourceRoot":"","sources":["../../../../../src/ui/boot/runProviderColdBoot.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D,iFAAiF;AACjF,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAEhD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,6BAA6B,QAAS,CAAC;AA0CpD,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,WAAW,CAAC;IACzB,SAAS,EAAE,cAAc,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,kEAAkE;IAClE,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,aAAa,EAAE,aAAa,CAAC;IAC7B,0BAA0B,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,aAAa,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrF,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC,CA4HzF"}
|
|
@@ -20,9 +20,11 @@
|
|
|
20
20
|
* auto-starts the instant the view is reached, because the request surface
|
|
21
21
|
* (a QR on an unknown desktop, "Check Commons on your phone" where Oxy could
|
|
22
22
|
* deliver) IS the primary route there, never something behind a second tap.
|
|
23
|
-
* - `qr` → `SignInRequestView` — the ACTIVE REQUEST: the
|
|
24
|
-
*
|
|
25
|
-
*
|
|
23
|
+
* - `qr` → `SignInRequestView` — the ACTIVE REQUEST: the controller-bound
|
|
24
|
+
* wiring over the shared, presentational `OxySignInRequestSurface` (the same
|
|
25
|
+
* component the auth.oxy.so IdP mounts from its OAuth-bound request). It maps
|
|
26
|
+
* `snapshot.signIn` onto that surface's props; alternatives stay behind
|
|
27
|
+
* "Having trouble?" until the chosen route reports `routeFailed`.
|
|
26
28
|
* - `signup` → `SignUpView` — account creation, Commons-first.
|
|
27
29
|
*
|
|
28
30
|
* Per-account color re-theming uses Bloom's `APP_COLOR_PRESETS` + `BloomColorScope`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyAuthChooser.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAuthChooser.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"OxyAuthChooser.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAuthChooser.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAoC/B,MAAM,WAAW,mBAAmB;IAClC,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;GAIG;AACH,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA0UjD,CAAC;AA4BF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyProvider.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;AAI7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"OxyProvider.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;AAI7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AA6C5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA2OrC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|