@oxyhq/services 5.17.17 → 5.18.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 +32 -38
- package/lib/commonjs/core/CrossDomainAuth.js +277 -0
- package/lib/commonjs/core/CrossDomainAuth.js.map +1 -0
- package/lib/commonjs/core/HttpService.js +82 -15
- package/lib/commonjs/core/HttpService.js.map +1 -1
- package/lib/commonjs/core/OxyServices.base.js +11 -3
- package/lib/commonjs/core/OxyServices.base.js.map +1 -1
- package/lib/commonjs/core/OxyServices.js +4 -1
- package/lib/commonjs/core/OxyServices.js.map +1 -1
- package/lib/commonjs/core/index.js +30 -0
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/core/mixins/OxyServices.assets.js +16 -3
- package/lib/commonjs/core/mixins/OxyServices.assets.js.map +1 -1
- package/lib/commonjs/core/mixins/OxyServices.auth.js +73 -32
- package/lib/commonjs/core/mixins/OxyServices.auth.js.map +1 -1
- package/lib/commonjs/core/mixins/OxyServices.features.js +372 -0
- package/lib/commonjs/core/mixins/OxyServices.features.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.fedcm.js +289 -0
- package/lib/commonjs/core/mixins/OxyServices.fedcm.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.popup.js +352 -0
- package/lib/commonjs/core/mixins/OxyServices.popup.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.redirect.js +378 -0
- package/lib/commonjs/core/mixins/OxyServices.redirect.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.user.js +35 -24
- package/lib/commonjs/core/mixins/OxyServices.user.js.map +1 -1
- package/lib/commonjs/core/mixins/index.js +28 -15
- package/lib/commonjs/core/mixins/index.js.map +1 -1
- package/lib/commonjs/crypto/index.js +30 -0
- package/lib/commonjs/crypto/index.js.map +1 -1
- package/lib/commonjs/crypto/keyManager.js +902 -0
- package/lib/commonjs/crypto/keyManager.js.map +1 -0
- package/lib/commonjs/crypto/polyfill.js +14 -5
- package/lib/commonjs/crypto/polyfill.js.map +1 -1
- package/lib/commonjs/crypto/recoveryPhrase.js +152 -0
- package/lib/commonjs/crypto/recoveryPhrase.js.map +1 -0
- package/lib/commonjs/crypto/signatureService.js +289 -0
- package/lib/commonjs/crypto/signatureService.js.map +1 -0
- package/lib/commonjs/i18n/locales/en-US.json +1 -1
- package/lib/commonjs/index.js +40 -26
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/interfaces.js +0 -15
- package/lib/commonjs/models/interfaces.js.map +1 -1
- package/lib/commonjs/ui/components/BottomSheetRouter.js +9 -1
- package/lib/commonjs/ui/components/BottomSheetRouter.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedItem.js +11 -1
- package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
- package/lib/commonjs/ui/components/Icon.js.map +1 -1
- package/lib/commonjs/ui/components/IconButton/utils.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +41 -11
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/SettingRow.js +17 -4
- package/lib/commonjs/ui/components/SettingRow.js.map +1 -1
- package/lib/commonjs/ui/components/TextField/Adornment/utils.js.map +1 -1
- package/lib/commonjs/ui/components/TextField/helpers.js.map +1 -1
- package/lib/commonjs/ui/components/TouchableRipple/utils.js.map +1 -1
- package/lib/commonjs/ui/components/Typography/AnimatedText.js.map +1 -1
- package/lib/commonjs/ui/components/feedback/FormInput.js +72 -0
- package/lib/commonjs/ui/components/feedback/FormInput.js.map +1 -0
- package/lib/commonjs/ui/components/feedback/ProgressIndicator.js +33 -0
- package/lib/commonjs/ui/components/feedback/ProgressIndicator.js.map +1 -0
- package/lib/commonjs/ui/components/feedback/constants.js +59 -0
- package/lib/commonjs/ui/components/feedback/constants.js.map +1 -0
- package/lib/commonjs/ui/components/feedback/feedbackStyles.js +262 -0
- package/lib/commonjs/ui/components/feedback/feedbackStyles.js.map +1 -0
- package/lib/commonjs/ui/components/feedback/index.js +54 -0
- package/lib/commonjs/ui/components/feedback/index.js.map +1 -0
- package/lib/commonjs/ui/components/feedback/types.js +6 -0
- package/lib/commonjs/ui/components/feedback/types.js.map +1 -0
- package/lib/commonjs/ui/components/feedback/useFeedbackForm.js +52 -0
- package/lib/commonjs/ui/components/feedback/useFeedbackForm.js.map +1 -0
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +282 -0
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -0
- package/lib/commonjs/ui/components/modals/index.js +14 -0
- package/lib/commonjs/ui/components/modals/index.js.map +1 -0
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +309 -0
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -0
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js +79 -0
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js.map +1 -0
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js +108 -0
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js.map +1 -0
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js +79 -0
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js.map +1 -0
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js +176 -0
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js.map +1 -0
- package/lib/commonjs/ui/components/payment/constants.js +53 -0
- package/lib/commonjs/ui/components/payment/constants.js.map +1 -0
- package/lib/commonjs/ui/components/payment/index.js +80 -0
- package/lib/commonjs/ui/components/payment/index.js.map +1 -0
- package/lib/commonjs/ui/components/payment/paymentStyles.js +409 -0
- package/lib/commonjs/ui/components/payment/paymentStyles.js.map +1 -0
- package/lib/commonjs/ui/components/payment/types.js +6 -0
- package/lib/commonjs/ui/components/payment/types.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +110 -199
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +150 -19
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useSessionManagement.js +279 -0
- package/lib/commonjs/ui/context/hooks/useSessionManagement.js.map +1 -0
- package/lib/commonjs/ui/hooks/index.js +26 -0
- package/lib/commonjs/ui/hooks/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +79 -72
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +38 -51
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useSecurityQueries.js +3 -3
- package/lib/commonjs/ui/hooks/queries/useSecurityQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +18 -12
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAsyncAction.js +95 -0
- package/lib/commonjs/ui/hooks/useAsyncAction.js.map +1 -0
- package/lib/commonjs/ui/hooks/useProfileEditing.js +3 -5
- package/lib/commonjs/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionManagement.js +4 -8
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionSocket.js +162 -315
- package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSettingToggle.js +126 -0
- package/lib/commonjs/ui/hooks/useSettingToggle.js.map +1 -0
- package/lib/commonjs/ui/hooks/useStorage.js +24 -58
- package/lib/commonjs/ui/hooks/useStorage.js.map +1 -1
- package/lib/commonjs/ui/index.js +50 -21
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +6 -1
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +6 -4
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +33 -30
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +29 -24
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +3 -3
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +315 -0
- package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/FeedbackScreen.js +73 -590
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HelpSupportScreen.js +8 -7
- package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/OxyAuthScreen.js +134 -66
- package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +67 -1395
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +6 -13
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +13 -5
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +16 -10
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +23 -11
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/stores/accountStore.js +2 -4
- package/lib/commonjs/ui/stores/accountStore.js.map +1 -1
- package/lib/commonjs/ui/stores/authStore.js +45 -32
- package/lib/commonjs/ui/stores/authStore.js.map +1 -1
- package/lib/commonjs/ui/styles/spacing.js +54 -2
- package/lib/commonjs/ui/styles/spacing.js.map +1 -1
- package/lib/commonjs/ui/utils/avatarUtils.js +37 -41
- package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
- package/lib/commonjs/ui/utils/storageHelpers.js.map +1 -1
- package/lib/commonjs/utils/errorUtils.js +13 -0
- package/lib/commonjs/utils/errorUtils.js.map +1 -1
- package/lib/commonjs/utils/validationUtils.js +15 -1
- package/lib/commonjs/utils/validationUtils.js.map +1 -1
- package/lib/module/core/CrossDomainAuth.js +271 -0
- package/lib/module/core/CrossDomainAuth.js.map +1 -0
- package/lib/module/core/HttpService.js +82 -15
- package/lib/module/core/HttpService.js.map +1 -1
- package/lib/module/core/OxyServices.base.js +11 -4
- package/lib/module/core/OxyServices.base.js.map +1 -1
- package/lib/module/core/OxyServices.js +4 -1
- package/lib/module/core/OxyServices.js.map +1 -1
- package/lib/module/core/index.js +6 -1
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/core/mixins/OxyServices.assets.js +16 -3
- package/lib/module/core/mixins/OxyServices.assets.js.map +1 -1
- package/lib/module/core/mixins/OxyServices.auth.js +73 -32
- package/lib/module/core/mixins/OxyServices.auth.js.map +1 -1
- package/lib/module/core/mixins/OxyServices.features.js +369 -0
- package/lib/module/core/mixins/OxyServices.features.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.fedcm.js +286 -0
- package/lib/module/core/mixins/OxyServices.fedcm.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.popup.js +349 -0
- package/lib/module/core/mixins/OxyServices.popup.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.redirect.js +375 -0
- package/lib/module/core/mixins/OxyServices.redirect.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.user.js +35 -24
- package/lib/module/core/mixins/OxyServices.user.js.map +1 -1
- package/lib/module/core/mixins/index.js +16 -3
- package/lib/module/core/mixins/index.js.map +1 -1
- package/lib/module/crypto/index.js +8 -4
- package/lib/module/crypto/index.js.map +1 -1
- package/lib/module/crypto/keyManager.js +899 -0
- package/lib/module/crypto/keyManager.js.map +1 -0
- package/lib/module/crypto/polyfill.js +6 -5
- package/lib/module/crypto/polyfill.js.map +1 -1
- package/lib/module/crypto/recoveryPhrase.js +147 -0
- package/lib/module/crypto/recoveryPhrase.js.map +1 -0
- package/lib/module/crypto/signatureService.js +286 -0
- package/lib/module/crypto/signatureService.js.map +1 -0
- package/lib/module/i18n/locales/en-US.json +1 -1
- package/lib/module/index.js +6 -9
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/interfaces.js +0 -15
- package/lib/module/models/interfaces.js.map +1 -1
- package/lib/module/ui/components/BottomSheetRouter.js +6 -2
- package/lib/module/ui/components/BottomSheetRouter.js.map +1 -1
- package/lib/module/ui/components/GroupedItem.js +11 -1
- package/lib/module/ui/components/GroupedItem.js.map +1 -1
- package/lib/module/ui/components/Icon.js.map +1 -1
- package/lib/module/ui/components/IconButton/utils.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +41 -11
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/SettingRow.js +17 -4
- package/lib/module/ui/components/SettingRow.js.map +1 -1
- package/lib/module/ui/components/TextField/Adornment/utils.js.map +1 -1
- package/lib/module/ui/components/TextField/helpers.js.map +1 -1
- package/lib/module/ui/components/TouchableRipple/utils.js.map +1 -1
- package/lib/module/ui/components/Typography/AnimatedText.js.map +1 -1
- package/lib/module/ui/components/feedback/FormInput.js +67 -0
- package/lib/module/ui/components/feedback/FormInput.js.map +1 -0
- package/lib/module/ui/components/feedback/ProgressIndicator.js +28 -0
- package/lib/module/ui/components/feedback/ProgressIndicator.js.map +1 -0
- package/lib/module/ui/components/feedback/constants.js +55 -0
- package/lib/module/ui/components/feedback/constants.js.map +1 -0
- package/lib/module/ui/components/feedback/feedbackStyles.js +257 -0
- package/lib/module/ui/components/feedback/feedbackStyles.js.map +1 -0
- package/lib/module/ui/components/feedback/index.js +8 -0
- package/lib/module/ui/components/feedback/index.js.map +1 -0
- package/lib/module/ui/components/feedback/types.js +4 -0
- package/lib/module/ui/components/feedback/types.js.map +1 -0
- package/lib/module/ui/components/feedback/useFeedbackForm.js +47 -0
- package/lib/module/ui/components/feedback/useFeedbackForm.js.map +1 -0
- package/lib/module/ui/components/modals/DeleteAccountModal.js +276 -0
- package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -0
- package/lib/module/ui/components/modals/index.js +4 -0
- package/lib/module/ui/components/modals/index.js.map +1 -0
- package/lib/module/ui/components/payment/PaymentDetailsStep.js +303 -0
- package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -0
- package/lib/module/ui/components/payment/PaymentMethodStep.js +73 -0
- package/lib/module/ui/components/payment/PaymentMethodStep.js.map +1 -0
- package/lib/module/ui/components/payment/PaymentReviewStep.js +102 -0
- package/lib/module/ui/components/payment/PaymentReviewStep.js.map +1 -0
- package/lib/module/ui/components/payment/PaymentSuccessStep.js +73 -0
- package/lib/module/ui/components/payment/PaymentSuccessStep.js.map +1 -0
- package/lib/module/ui/components/payment/PaymentSummaryStep.js +170 -0
- package/lib/module/ui/components/payment/PaymentSummaryStep.js.map +1 -0
- package/lib/module/ui/components/payment/constants.js +47 -0
- package/lib/module/ui/components/payment/constants.js.map +1 -0
- package/lib/module/ui/components/payment/index.js +10 -0
- package/lib/module/ui/components/payment/index.js.map +1 -0
- package/lib/module/ui/components/payment/paymentStyles.js +404 -0
- package/lib/module/ui/components/payment/paymentStyles.js.map +1 -0
- package/lib/module/ui/components/payment/types.js +4 -0
- package/lib/module/ui/components/payment/types.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +112 -191
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +150 -19
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/context/hooks/useSessionManagement.js +274 -0
- package/lib/module/ui/context/hooks/useSessionManagement.js.map +1 -0
- package/lib/module/ui/hooks/index.js +2 -0
- package/lib/module/ui/hooks/index.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +80 -72
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/module/ui/hooks/queries/useAccountQueries.js +31 -44
- package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/useSecurityQueries.js +1 -1
- package/lib/module/ui/hooks/queries/useSecurityQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/useServicesQueries.js +13 -7
- package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/module/ui/hooks/useAsyncAction.js +89 -0
- package/lib/module/ui/hooks/useAsyncAction.js.map +1 -0
- package/lib/module/ui/hooks/useProfileEditing.js +3 -5
- package/lib/module/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js +4 -8
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/module/ui/hooks/useSessionSocket.js +162 -315
- package/lib/module/ui/hooks/useSessionSocket.js.map +1 -1
- package/lib/module/ui/hooks/useSettingToggle.js +120 -0
- package/lib/module/ui/hooks/useSettingToggle.js.map +1 -0
- package/lib/module/ui/hooks/useStorage.js +25 -59
- package/lib/module/ui/hooks/useStorage.js.map +1 -1
- package/lib/module/ui/index.js +15 -10
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +6 -1
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +6 -4
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +33 -30
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +29 -24
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +3 -3
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +310 -0
- package/lib/module/ui/screens/FAQScreen.js.map +1 -0
- package/lib/module/ui/screens/FeedbackScreen.js +64 -581
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js +8 -7
- package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/module/ui/screens/OxyAuthScreen.js +135 -68
- package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +67 -1397
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +6 -13
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +13 -5
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +16 -10
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +23 -11
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/module/ui/stores/accountStore.js +2 -4
- package/lib/module/ui/stores/accountStore.js.map +1 -1
- package/lib/module/ui/stores/authStore.js +45 -32
- package/lib/module/ui/stores/authStore.js.map +1 -1
- package/lib/module/ui/styles/spacing.js +6 -2
- package/lib/module/ui/styles/spacing.js.map +1 -1
- package/lib/module/ui/utils/avatarUtils.js +37 -40
- package/lib/module/ui/utils/avatarUtils.js.map +1 -1
- package/lib/module/ui/utils/storageHelpers.js.map +1 -1
- package/lib/module/utils/errorUtils.js +7 -0
- package/lib/module/utils/errorUtils.js.map +1 -1
- package/lib/module/utils/validationUtils.js +13 -0
- package/lib/module/utils/validationUtils.js.map +1 -1
- package/lib/typescript/core/CrossDomainAuth.d.ts +161 -0
- package/lib/typescript/core/CrossDomainAuth.d.ts.map +1 -0
- package/lib/typescript/core/HttpService.d.ts +1 -1
- package/lib/typescript/core/HttpService.d.ts.map +1 -1
- package/lib/typescript/core/OxyServices.base.d.ts +0 -6
- package/lib/typescript/core/OxyServices.base.d.ts.map +1 -1
- package/lib/typescript/core/OxyServices.d.ts +5 -36
- package/lib/typescript/core/OxyServices.d.ts.map +1 -1
- package/lib/typescript/core/index.d.ts +4 -0
- package/lib/typescript/core/index.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.analytics.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.assets.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.auth.d.ts +40 -20
- package/lib/typescript/core/mixins/OxyServices.auth.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.developer.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.devices.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.features.d.ts +229 -0
- package/lib/typescript/core/mixins/OxyServices.features.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.fedcm.d.ts +195 -0
- package/lib/typescript/core/mixins/OxyServices.fedcm.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.karma.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.language.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.location.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.payment.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.popup.d.ts +206 -0
- package/lib/typescript/core/mixins/OxyServices.popup.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.privacy.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.redirect.d.ts +246 -0
- package/lib/typescript/core/mixins/OxyServices.redirect.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.security.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.user.d.ts +6 -4
- package/lib/typescript/core/mixins/OxyServices.user.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.utility.d.ts.map +1 -1
- package/lib/typescript/core/mixins/index.d.ts +291 -9
- package/lib/typescript/core/mixins/index.d.ts.map +1 -1
- package/lib/typescript/crypto/index.d.ts +6 -3
- package/lib/typescript/crypto/index.d.ts.map +1 -1
- package/lib/typescript/crypto/keyManager.d.ts +190 -0
- package/lib/typescript/crypto/keyManager.d.ts.map +1 -0
- package/lib/typescript/crypto/polyfill.d.ts +4 -3
- package/lib/typescript/crypto/polyfill.d.ts.map +1 -1
- package/lib/typescript/crypto/recoveryPhrase.d.ts +59 -0
- package/lib/typescript/crypto/recoveryPhrase.d.ts.map +1 -0
- package/lib/typescript/crypto/signatureService.d.ts +87 -0
- package/lib/typescript/crypto/signatureService.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +5 -6
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/models/interfaces.d.ts +2 -14
- package/lib/typescript/models/interfaces.d.ts.map +1 -1
- package/lib/typescript/models/session.d.ts +0 -9
- package/lib/typescript/models/session.d.ts.map +1 -1
- package/lib/typescript/types/bip39.d.ts +32 -0
- package/lib/typescript/ui/components/BottomSheetRouter.d.ts +5 -0
- package/lib/typescript/ui/components/BottomSheetRouter.d.ts.map +1 -1
- package/lib/typescript/ui/components/GroupedItem.d.ts +5 -1
- package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
- package/lib/typescript/ui/components/IconButton/utils.d.ts +1 -1
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/SettingRow.d.ts +6 -0
- package/lib/typescript/ui/components/SettingRow.d.ts.map +1 -1
- package/lib/typescript/ui/components/TextField/Addons/Outline.d.ts +2 -2
- package/lib/typescript/ui/components/TextField/Adornment/utils.d.ts +1 -1
- package/lib/typescript/ui/components/TextField/Adornment/utils.d.ts.map +1 -1
- package/lib/typescript/ui/components/TextField/helpers.d.ts +8 -8
- package/lib/typescript/ui/components/TextField/types.d.ts +1 -0
- package/lib/typescript/ui/components/TextField/types.d.ts.map +1 -1
- package/lib/typescript/ui/components/feedback/FormInput.d.ts +20 -0
- package/lib/typescript/ui/components/feedback/FormInput.d.ts.map +1 -0
- package/lib/typescript/ui/components/feedback/ProgressIndicator.d.ts +11 -0
- package/lib/typescript/ui/components/feedback/ProgressIndicator.d.ts.map +1 -0
- package/lib/typescript/ui/components/feedback/constants.d.ts +5 -0
- package/lib/typescript/ui/components/feedback/constants.d.ts.map +1 -0
- package/lib/typescript/ui/components/feedback/feedbackStyles.d.ts +280 -0
- package/lib/typescript/ui/components/feedback/feedbackStyles.d.ts.map +1 -0
- package/lib/typescript/ui/components/feedback/index.d.ts +7 -0
- package/lib/typescript/ui/components/feedback/index.d.ts.map +1 -0
- package/lib/typescript/ui/components/feedback/types.d.ts +46 -0
- package/lib/typescript/ui/components/feedback/types.d.ts.map +1 -0
- package/lib/typescript/ui/components/feedback/useFeedbackForm.d.ts +9 -0
- package/lib/typescript/ui/components/feedback/useFeedbackForm.d.ts.map +1 -0
- package/lib/typescript/ui/components/modals/DeleteAccountModal.d.ts +19 -0
- package/lib/typescript/ui/components/modals/DeleteAccountModal.d.ts.map +1 -0
- package/lib/typescript/ui/components/modals/index.d.ts +2 -0
- package/lib/typescript/ui/components/modals/index.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/PaymentDetailsStep.d.ts +21 -0
- package/lib/typescript/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/PaymentMethodStep.d.ts +14 -0
- package/lib/typescript/ui/components/payment/PaymentMethodStep.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/PaymentReviewStep.d.ts +16 -0
- package/lib/typescript/ui/components/payment/PaymentReviewStep.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/PaymentSuccessStep.d.ts +10 -0
- package/lib/typescript/ui/components/payment/PaymentSuccessStep.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/PaymentSummaryStep.d.ts +15 -0
- package/lib/typescript/ui/components/payment/PaymentSummaryStep.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/constants.d.ts +7 -0
- package/lib/typescript/ui/components/payment/constants.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/index.d.ts +9 -0
- package/lib/typescript/ui/components/payment/index.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/paymentStyles.d.ts +396 -0
- package/lib/typescript/ui/components/payment/paymentStyles.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/types.d.ts +40 -0
- package/lib/typescript/ui/components/payment/types.d.ts.map +1 -0
- package/lib/typescript/ui/components/types.d.ts +4 -0
- package/lib/typescript/ui/components/types.d.ts.map +1 -1
- package/lib/typescript/ui/context/OxyContext.d.ts +57 -3
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts +10 -3
- package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/ui/context/hooks/useSessionManagement.d.ts +41 -0
- package/lib/typescript/ui/context/hooks/useSessionManagement.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/index.d.ts +2 -0
- package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useAsyncAction.d.ts +51 -0
- package/lib/typescript/ui/hooks/useAsyncAction.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useProfileEditing.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useSessionSocket.d.ts +1 -2
- package/lib/typescript/ui/hooks/useSessionSocket.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useSettingToggle.d.ts +55 -0
- package/lib/typescript/ui/hooks/useSettingToggle.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useStorage.d.ts +3 -9
- package/lib/typescript/ui/hooks/useStorage.d.ts.map +1 -1
- package/lib/typescript/ui/index.d.ts +6 -2
- package/lib/typescript/ui/index.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/ui/navigation/routes.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/FAQScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/FAQScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/HelpSupportScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/OxyAuthScreen.d.ts +1 -1
- package/lib/typescript/ui/screens/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts +3 -15
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -1
- package/lib/typescript/ui/stores/accountStore.d.ts.map +1 -1
- package/lib/typescript/ui/stores/authStore.d.ts +8 -7
- package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
- package/lib/typescript/ui/styles/spacing.d.ts +5 -0
- package/lib/typescript/ui/styles/spacing.d.ts.map +1 -1
- package/lib/typescript/ui/types/navigation.d.ts +2 -1
- package/lib/typescript/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/ui/utils/avatarUtils.d.ts +2 -13
- package/lib/typescript/ui/utils/avatarUtils.d.ts.map +1 -1
- package/lib/typescript/ui/utils/storageHelpers.d.ts +0 -3
- package/lib/typescript/ui/utils/storageHelpers.d.ts.map +1 -1
- package/lib/typescript/utils/errorUtils.d.ts +6 -0
- package/lib/typescript/utils/errorUtils.d.ts.map +1 -1
- package/lib/typescript/utils/validationUtils.d.ts +8 -0
- package/lib/typescript/utils/validationUtils.d.ts.map +1 -1
- package/package.json +8 -7
- package/src/core/CrossDomainAuth.ts +307 -0
- package/src/core/HttpService.ts +99 -16
- package/src/core/OxyServices.base.ts +20 -3
- package/src/core/OxyServices.ts +7 -3
- package/src/core/index.ts +9 -1
- package/src/core/mixins/OxyServices.assets.ts +14 -3
- package/src/core/mixins/OxyServices.auth.ts +105 -36
- package/src/core/mixins/OxyServices.features.ts +428 -0
- package/src/core/mixins/OxyServices.fedcm.ts +315 -0
- package/src/core/mixins/OxyServices.popup.ts +402 -0
- package/src/core/mixins/OxyServices.redirect.ts +397 -0
- package/src/core/mixins/OxyServices.user.ts +39 -24
- package/src/core/mixins/index.ts +33 -14
- package/src/crypto/index.ts +16 -5
- package/src/crypto/keyManager.ts +966 -0
- package/src/crypto/polyfill.ts +6 -5
- package/src/crypto/recoveryPhrase.ts +166 -0
- package/src/crypto/signatureService.ts +323 -0
- package/src/i18n/locales/en-US.json +1 -1
- package/src/index.ts +19 -15
- package/src/models/interfaces.ts +4 -16
- package/src/models/session.ts +2 -11
- package/src/types/bip39.d.ts +32 -0
- package/src/ui/components/BottomSheetRouter.tsx +6 -1
- package/src/ui/components/GroupedItem.tsx +19 -1
- package/src/ui/components/Icon.tsx +1 -1
- package/src/ui/components/IconButton/utils.ts +1 -1
- package/src/ui/components/OxyProvider.tsx +44 -12
- package/src/ui/components/SettingRow.tsx +26 -4
- package/src/ui/components/TextField/Addons/Outline.tsx +2 -2
- package/src/ui/components/TextField/Adornment/utils.ts +2 -2
- package/src/ui/components/TextField/helpers.tsx +10 -10
- package/src/ui/components/TextField/types.tsx +1 -1
- package/src/ui/components/TouchableRipple/utils.ts +2 -2
- package/src/ui/components/Typography/AnimatedText.tsx +2 -2
- package/src/ui/components/feedback/FormInput.tsx +84 -0
- package/src/ui/components/feedback/ProgressIndicator.tsx +35 -0
- package/src/ui/components/feedback/constants.ts +22 -0
- package/src/ui/components/feedback/feedbackStyles.ts +247 -0
- package/src/ui/components/feedback/index.ts +6 -0
- package/src/ui/components/feedback/types.ts +52 -0
- package/src/ui/components/feedback/useFeedbackForm.ts +44 -0
- package/src/ui/components/modals/DeleteAccountModal.tsx +294 -0
- package/src/ui/components/modals/index.ts +1 -0
- package/src/ui/components/payment/PaymentDetailsStep.tsx +222 -0
- package/src/ui/components/payment/PaymentMethodStep.tsx +89 -0
- package/src/ui/components/payment/PaymentReviewStep.tsx +126 -0
- package/src/ui/components/payment/PaymentSuccessStep.tsx +71 -0
- package/src/ui/components/payment/PaymentSummaryStep.tsx +159 -0
- package/src/ui/components/payment/constants.ts +39 -0
- package/src/ui/components/payment/index.ts +9 -0
- package/src/ui/components/payment/paymentStyles.ts +397 -0
- package/src/ui/components/payment/types.ts +45 -0
- package/src/ui/components/types.tsx +6 -0
- package/src/ui/context/OxyContext.tsx +173 -195
- package/src/ui/context/hooks/useAuthOperations.ts +177 -36
- package/src/ui/context/hooks/useSessionManagement.ts +399 -0
- package/src/ui/hooks/index.ts +3 -1
- package/src/ui/hooks/mutations/useAccountMutations.ts +83 -76
- package/src/ui/hooks/queries/useAccountQueries.ts +29 -35
- package/src/ui/hooks/queries/useSecurityQueries.ts +1 -1
- package/src/ui/hooks/queries/useServicesQueries.ts +14 -6
- package/src/ui/hooks/useAsyncAction.ts +129 -0
- package/src/ui/hooks/useProfileEditing.ts +3 -3
- package/src/ui/hooks/useSessionManagement.ts +5 -10
- package/src/ui/hooks/useSessionSocket.ts +46 -175
- package/src/ui/hooks/useSettingToggle.ts +147 -0
- package/src/ui/hooks/useStorage.ts +24 -76
- package/src/ui/index.ts +22 -13
- package/src/ui/navigation/routes.ts +8 -2
- package/src/ui/screens/AccountCenterScreen.tsx +4 -4
- package/src/ui/screens/AccountOverviewScreen.tsx +36 -38
- package/src/ui/screens/AccountSettingsScreen.tsx +34 -37
- package/src/ui/screens/AccountSwitcherScreen.tsx +4 -4
- package/src/ui/screens/FAQScreen.tsx +332 -0
- package/src/ui/screens/FeedbackScreen.tsx +91 -626
- package/src/ui/screens/HelpSupportScreen.tsx +7 -5
- package/src/ui/screens/OxyAuthScreen.tsx +138 -64
- package/src/ui/screens/PaymentGatewayScreen.tsx +96 -1275
- package/src/ui/screens/PrivacySettingsScreen.tsx +6 -12
- package/src/ui/screens/ProfileScreen.tsx +11 -6
- package/src/ui/screens/SavesCollectionsScreen.tsx +19 -10
- package/src/ui/screens/karma/KarmaCenterScreen.tsx +10 -10
- package/src/ui/stores/accountStore.ts +1 -11
- package/src/ui/stores/authStore.ts +43 -44
- package/src/ui/styles/spacing.ts +15 -2
- package/src/ui/types/navigation.ts +2 -2
- package/src/ui/utils/avatarUtils.ts +39 -46
- package/src/ui/utils/storageHelpers.ts +0 -4
- package/src/utils/__tests__/validationUtils.test.ts +16 -1
- package/src/utils/errorUtils.ts +8 -1
- package/src/utils/validationUtils.ts +12 -0
- package/lib/commonjs/core/services/SessionService.js +0 -163
- package/lib/commonjs/core/services/SessionService.js.map +0 -1
- package/lib/commonjs/core/services/TokenService.js +0 -220
- package/lib/commonjs/core/services/TokenService.js.map +0 -1
- package/lib/commonjs/crypto/types.js +0 -2
- package/lib/commonjs/crypto/types.js.map +0 -1
- package/lib/commonjs/ui/context/OxyContextBase.js +0 -21
- package/lib/commonjs/ui/context/OxyContextBase.js.map +0 -1
- package/lib/commonjs/ui/context/hooks/useStorage.js +0 -79
- package/lib/commonjs/ui/context/hooks/useStorage.js.map +0 -1
- package/lib/commonjs/ui/hooks/useAvatarPicker.js +0 -56
- package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +0 -1
- package/lib/module/core/services/SessionService.js +0 -159
- package/lib/module/core/services/SessionService.js.map +0 -1
- package/lib/module/core/services/TokenService.js +0 -217
- package/lib/module/core/services/TokenService.js.map +0 -1
- package/lib/module/crypto/types.js +0 -2
- package/lib/module/crypto/types.js.map +0 -1
- package/lib/module/ui/context/OxyContextBase.js +0 -16
- package/lib/module/ui/context/OxyContextBase.js.map +0 -1
- package/lib/module/ui/context/hooks/useStorage.js +0 -74
- package/lib/module/ui/context/hooks/useStorage.js.map +0 -1
- package/lib/module/ui/hooks/useAvatarPicker.js +0 -50
- package/lib/module/ui/hooks/useAvatarPicker.js.map +0 -1
- package/lib/typescript/core/services/SessionService.d.ts +0 -78
- package/lib/typescript/core/services/SessionService.d.ts.map +0 -1
- package/lib/typescript/core/services/TokenService.d.ts +0 -72
- package/lib/typescript/core/services/TokenService.d.ts.map +0 -1
- package/lib/typescript/crypto/types.d.ts +0 -22
- package/lib/typescript/crypto/types.d.ts.map +0 -1
- package/lib/typescript/ui/context/OxyContextBase.d.ts +0 -63
- package/lib/typescript/ui/context/OxyContextBase.d.ts.map +0 -1
- package/lib/typescript/ui/context/hooks/useStorage.d.ts +0 -22
- package/lib/typescript/ui/context/hooks/useStorage.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/useAvatarPicker.d.ts +0 -19
- package/lib/typescript/ui/hooks/useAvatarPicker.d.ts.map +0 -1
- package/src/core/services/SessionService.ts +0 -173
- package/src/core/services/TokenService.ts +0 -237
- package/src/crypto/types.ts +0 -23
- package/src/ui/context/OxyContextBase.tsx +0 -78
- package/src/ui/context/hooks/useStorage.ts +0 -104
- package/src/ui/hooks/useAvatarPicker.ts +0 -61
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Features Methods Mixin
|
|
3
|
+
*
|
|
4
|
+
* Provides methods for various features:
|
|
5
|
+
* - Feedback submission
|
|
6
|
+
* - Subscription plans
|
|
7
|
+
* - Saves/Collections
|
|
8
|
+
* - User history
|
|
9
|
+
* - FAQ
|
|
10
|
+
* - User stats
|
|
11
|
+
* - Achievements
|
|
12
|
+
*/
|
|
13
|
+
import type { OxyServicesBase } from '../OxyServices.base';
|
|
14
|
+
export interface FeedbackPayload {
|
|
15
|
+
type: 'bug' | 'feature' | 'general' | 'support';
|
|
16
|
+
title: string;
|
|
17
|
+
description: string;
|
|
18
|
+
priority: 'low' | 'medium' | 'high' | 'critical';
|
|
19
|
+
category: string;
|
|
20
|
+
contactEmail?: string;
|
|
21
|
+
systemInfo?: {
|
|
22
|
+
platform: string;
|
|
23
|
+
version: string;
|
|
24
|
+
appVersion: string;
|
|
25
|
+
userId?: string;
|
|
26
|
+
username?: string;
|
|
27
|
+
timestamp: string;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface FeedbackResult {
|
|
31
|
+
id: string;
|
|
32
|
+
status: string;
|
|
33
|
+
createdAt: string;
|
|
34
|
+
}
|
|
35
|
+
export interface SubscriptionPlan {
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
description: string;
|
|
39
|
+
price: number;
|
|
40
|
+
currency: string;
|
|
41
|
+
interval: 'month' | 'year';
|
|
42
|
+
features: string[];
|
|
43
|
+
}
|
|
44
|
+
export interface SubscriptionResult {
|
|
45
|
+
subscriptionId: string;
|
|
46
|
+
status: string;
|
|
47
|
+
currentPeriodEnd: string;
|
|
48
|
+
}
|
|
49
|
+
export interface SavedItem {
|
|
50
|
+
id: string;
|
|
51
|
+
itemId: string;
|
|
52
|
+
itemType: string;
|
|
53
|
+
title: string;
|
|
54
|
+
createdAt: string;
|
|
55
|
+
}
|
|
56
|
+
export interface Collection {
|
|
57
|
+
id: string;
|
|
58
|
+
name: string;
|
|
59
|
+
description?: string;
|
|
60
|
+
itemCount: number;
|
|
61
|
+
createdAt: string;
|
|
62
|
+
}
|
|
63
|
+
export interface UserStats {
|
|
64
|
+
postCount: number;
|
|
65
|
+
commentCount: number;
|
|
66
|
+
followerCount: number;
|
|
67
|
+
followingCount: number;
|
|
68
|
+
karmaScore?: number;
|
|
69
|
+
}
|
|
70
|
+
export interface HistoryItem {
|
|
71
|
+
id: string;
|
|
72
|
+
type: string;
|
|
73
|
+
title: string;
|
|
74
|
+
timestamp: string;
|
|
75
|
+
metadata?: Record<string, any>;
|
|
76
|
+
}
|
|
77
|
+
export interface FAQ {
|
|
78
|
+
id: string;
|
|
79
|
+
question: string;
|
|
80
|
+
answer: string;
|
|
81
|
+
category: string;
|
|
82
|
+
}
|
|
83
|
+
export interface Achievement {
|
|
84
|
+
id: string;
|
|
85
|
+
name: string;
|
|
86
|
+
description: string;
|
|
87
|
+
icon: string;
|
|
88
|
+
unlockedAt?: string;
|
|
89
|
+
}
|
|
90
|
+
export declare function OxyServicesFeaturesMixin<T extends typeof OxyServicesBase>(Base: T): {
|
|
91
|
+
new (...args: any[]): {
|
|
92
|
+
/**
|
|
93
|
+
* Submit user feedback
|
|
94
|
+
*/
|
|
95
|
+
submitFeedback(payload: FeedbackPayload): Promise<FeedbackResult>;
|
|
96
|
+
/**
|
|
97
|
+
* Get available subscription plans
|
|
98
|
+
*/
|
|
99
|
+
getSubscriptionPlans(): Promise<SubscriptionPlan[]>;
|
|
100
|
+
/**
|
|
101
|
+
* Get individual purchasable features
|
|
102
|
+
*/
|
|
103
|
+
getIndividualFeatures(): Promise<any[]>;
|
|
104
|
+
/**
|
|
105
|
+
* Subscribe to a plan
|
|
106
|
+
*/
|
|
107
|
+
subscribe(planId: string, paymentMethodId?: string): Promise<SubscriptionResult>;
|
|
108
|
+
/**
|
|
109
|
+
* Subscribe to an individual feature
|
|
110
|
+
*/
|
|
111
|
+
subscribeToFeature(featureId: string, paymentMethodId?: string): Promise<SubscriptionResult>;
|
|
112
|
+
/**
|
|
113
|
+
* Cancel subscription
|
|
114
|
+
*/
|
|
115
|
+
cancelSubscription(subscriptionId: string): Promise<void>;
|
|
116
|
+
/**
|
|
117
|
+
* Reactivate subscription
|
|
118
|
+
*/
|
|
119
|
+
reactivateSubscription(subscriptionId: string): Promise<void>;
|
|
120
|
+
/**
|
|
121
|
+
* Get current user's subscription
|
|
122
|
+
*/
|
|
123
|
+
getCurrentSubscription(): Promise<SubscriptionResult | null>;
|
|
124
|
+
/**
|
|
125
|
+
* Get user's saved items
|
|
126
|
+
*/
|
|
127
|
+
getSavedItems(userId?: string): Promise<SavedItem[]>;
|
|
128
|
+
/**
|
|
129
|
+
* Get user's collections
|
|
130
|
+
*/
|
|
131
|
+
getCollections(userId?: string): Promise<Collection[]>;
|
|
132
|
+
/**
|
|
133
|
+
* Save an item
|
|
134
|
+
*/
|
|
135
|
+
saveItem(itemId: string, itemType: string, collectionId?: string): Promise<SavedItem>;
|
|
136
|
+
/**
|
|
137
|
+
* Remove an item from saves
|
|
138
|
+
*/
|
|
139
|
+
removeSavedItem(saveId: string): Promise<void>;
|
|
140
|
+
/**
|
|
141
|
+
* Create a collection
|
|
142
|
+
*/
|
|
143
|
+
createCollection(name: string, description?: string): Promise<Collection>;
|
|
144
|
+
/**
|
|
145
|
+
* Delete a collection
|
|
146
|
+
*/
|
|
147
|
+
deleteCollection(collectionId: string): Promise<void>;
|
|
148
|
+
/**
|
|
149
|
+
* Get user statistics
|
|
150
|
+
*/
|
|
151
|
+
getUserStats(userId: string): Promise<UserStats>;
|
|
152
|
+
/**
|
|
153
|
+
* Get user history
|
|
154
|
+
*/
|
|
155
|
+
getUserHistory(userId?: string, limit?: number, offset?: number): Promise<HistoryItem[]>;
|
|
156
|
+
/**
|
|
157
|
+
* Clear user history
|
|
158
|
+
*/
|
|
159
|
+
clearUserHistory(): Promise<void>;
|
|
160
|
+
/**
|
|
161
|
+
* Delete a history item
|
|
162
|
+
*/
|
|
163
|
+
deleteHistoryItem(itemId: string): Promise<void>;
|
|
164
|
+
/**
|
|
165
|
+
* Get FAQs
|
|
166
|
+
*/
|
|
167
|
+
getFAQs(category?: string): Promise<FAQ[]>;
|
|
168
|
+
/**
|
|
169
|
+
* Search FAQs
|
|
170
|
+
*/
|
|
171
|
+
searchFAQs(query: string): Promise<FAQ[]>;
|
|
172
|
+
/**
|
|
173
|
+
* Get user achievements
|
|
174
|
+
*/
|
|
175
|
+
getUserAchievements(userId?: string): Promise<Achievement[]>;
|
|
176
|
+
/**
|
|
177
|
+
* Get all available achievements
|
|
178
|
+
*/
|
|
179
|
+
getAllAchievements(): Promise<Achievement[]>;
|
|
180
|
+
/**
|
|
181
|
+
* Delete user account (requires password confirmation)
|
|
182
|
+
*/
|
|
183
|
+
deleteAccount(password: string): Promise<void>;
|
|
184
|
+
httpService: import("../HttpService").HttpService;
|
|
185
|
+
cloudURL: string;
|
|
186
|
+
config: import("../OxyServices.base").OxyConfig;
|
|
187
|
+
makeRequest<T_1>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../HttpService").RequestOptions): Promise<T_1>;
|
|
188
|
+
getBaseURL(): string;
|
|
189
|
+
getClient(): import("../HttpService").HttpService;
|
|
190
|
+
getMetrics(): {
|
|
191
|
+
totalRequests: number;
|
|
192
|
+
successfulRequests: number;
|
|
193
|
+
failedRequests: number;
|
|
194
|
+
cacheHits: number;
|
|
195
|
+
cacheMisses: number;
|
|
196
|
+
averageResponseTime: number;
|
|
197
|
+
};
|
|
198
|
+
clearCache(): void;
|
|
199
|
+
clearCacheEntry(key: string): void;
|
|
200
|
+
getCacheStats(): {
|
|
201
|
+
size: number;
|
|
202
|
+
hits: number;
|
|
203
|
+
misses: number;
|
|
204
|
+
hitRate: number;
|
|
205
|
+
};
|
|
206
|
+
getCloudURL(): string;
|
|
207
|
+
setTokens(accessToken: string, refreshToken?: string): void;
|
|
208
|
+
clearTokens(): void;
|
|
209
|
+
getCurrentUserId(): string | null;
|
|
210
|
+
hasValidToken(): boolean;
|
|
211
|
+
getAccessToken(): string | null;
|
|
212
|
+
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
213
|
+
withAuthRetry<T_1>(operation: () => Promise<T_1>, operationName: string, options?: {
|
|
214
|
+
maxRetries?: number;
|
|
215
|
+
retryDelay?: number;
|
|
216
|
+
authTimeoutMs?: number;
|
|
217
|
+
}): Promise<T_1>;
|
|
218
|
+
validate(): Promise<boolean>;
|
|
219
|
+
handleError(error: unknown): Error;
|
|
220
|
+
healthCheck(): Promise<{
|
|
221
|
+
status: string;
|
|
222
|
+
users?: number;
|
|
223
|
+
timestamp?: string;
|
|
224
|
+
[key: string]: any;
|
|
225
|
+
}>;
|
|
226
|
+
};
|
|
227
|
+
__resetTokensForTests(): void;
|
|
228
|
+
} & T;
|
|
229
|
+
//# sourceMappingURL=OxyServices.features.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OxyServices.features.d.ts","sourceRoot":"","sources":["../../../../src/core/mixins/OxyServices.features.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAI3D,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE;QACT,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;KACrB,CAAC;CACL;AAED,MAAM,WAAW,cAAc;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,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C,WAAW,EAAE,CAAC;QAc9F;;WAEG;4BACuB,OAAO,CAAC,IAAI,CAAC;QAMvC;;WAEG;kCAC6B,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;QAUtD;;WAEG;2BACsB,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;QAYhD;;WAEG;0BACqB,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;QAe/C;;WAEG;qCACgC,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;QAUlE;;WAEG;8BACyB,OAAO,CAAC,WAAW,EAAE,CAAC;QAelD;;WAEG;gCAC2B,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBA9MxC,CAAV;sBACM,CAAZ;yBACW,CAAC;;;;;;iBAuF4B,CAAC;qBAEjC,CAAZ;;;;;MAyHC"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import type { OxyServicesBase } from '../OxyServices.base';
|
|
2
|
+
import type { SessionLoginResponse } from '../../models/session';
|
|
3
|
+
export interface FedCMAuthOptions {
|
|
4
|
+
nonce?: string;
|
|
5
|
+
context?: 'signin' | 'signup' | 'continue' | 'use';
|
|
6
|
+
}
|
|
7
|
+
export interface FedCMConfig {
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
configURL: string;
|
|
10
|
+
clientId?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Federated Credential Management (FedCM) Authentication Mixin
|
|
14
|
+
*
|
|
15
|
+
* Implements the modern browser-native identity federation API that enables
|
|
16
|
+
* Google-style cross-domain authentication without third-party cookies.
|
|
17
|
+
*
|
|
18
|
+
* Browser Support:
|
|
19
|
+
* - Chrome 108+
|
|
20
|
+
* - Safari 16.4+
|
|
21
|
+
* - Edge 108+
|
|
22
|
+
* - Firefox: Not yet supported (fallback required)
|
|
23
|
+
*
|
|
24
|
+
* Key Features:
|
|
25
|
+
* - No redirects or popups required
|
|
26
|
+
* - Browser-native UI prompts
|
|
27
|
+
* - Privacy-preserving (IdP can't track users)
|
|
28
|
+
* - Automatic SSO across domains
|
|
29
|
+
* - Silent re-authentication support
|
|
30
|
+
*
|
|
31
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/FedCM_API
|
|
32
|
+
*/
|
|
33
|
+
export declare function OxyServicesFedCMMixin<T extends typeof OxyServicesBase>(Base: T): {
|
|
34
|
+
new (...args: any[]): {
|
|
35
|
+
/**
|
|
36
|
+
* Instance method to check FedCM support
|
|
37
|
+
*/
|
|
38
|
+
isFedCMSupported(): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Sign in using FedCM (Federated Credential Management API)
|
|
41
|
+
*
|
|
42
|
+
* This provides a Google-style authentication experience:
|
|
43
|
+
* - Browser shows native "Sign in with Oxy" prompt
|
|
44
|
+
* - No redirect or popup required
|
|
45
|
+
* - User approves → credential exchange happens in browser
|
|
46
|
+
* - All apps automatically get SSO after first sign-in
|
|
47
|
+
*
|
|
48
|
+
* @param options - Authentication options
|
|
49
|
+
* @returns Session with access token and user data
|
|
50
|
+
* @throws {OxyAuthenticationError} If FedCM not supported or user cancels
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```typescript
|
|
54
|
+
* try {
|
|
55
|
+
* const session = await oxyServices.signInWithFedCM();
|
|
56
|
+
* console.log('Signed in:', session.user);
|
|
57
|
+
* } catch (error) {
|
|
58
|
+
* // Fallback to popup or redirect auth
|
|
59
|
+
* await oxyServices.signInWithPopup();
|
|
60
|
+
* }
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
signInWithFedCM(options?: FedCMAuthOptions): Promise<SessionLoginResponse>;
|
|
64
|
+
/**
|
|
65
|
+
* Silent sign-in using FedCM
|
|
66
|
+
*
|
|
67
|
+
* Attempts to automatically re-authenticate the user without any UI.
|
|
68
|
+
* This is what enables "instant sign-in" across all Oxy domains after
|
|
69
|
+
* the user has signed in once.
|
|
70
|
+
*
|
|
71
|
+
* The browser will:
|
|
72
|
+
* 1. Check if user has previously signed in to Oxy
|
|
73
|
+
* 2. Check if user is still signed in at auth.oxy.so
|
|
74
|
+
* 3. If yes, automatically provide credential without prompting
|
|
75
|
+
*
|
|
76
|
+
* @returns Session if user is already signed in, null otherwise
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```typescript
|
|
80
|
+
* // On app startup
|
|
81
|
+
* useEffect(() => {
|
|
82
|
+
* const checkAuth = async () => {
|
|
83
|
+
* const session = await oxyServices.silentSignInWithFedCM();
|
|
84
|
+
* if (session) {
|
|
85
|
+
* setUser(session.user);
|
|
86
|
+
* } else {
|
|
87
|
+
* // Show sign-in button
|
|
88
|
+
* }
|
|
89
|
+
* };
|
|
90
|
+
* checkAuth();
|
|
91
|
+
* }, []);
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
silentSignInWithFedCM(): Promise<SessionLoginResponse | null>;
|
|
95
|
+
/**
|
|
96
|
+
* Request identity credential from browser using FedCM API
|
|
97
|
+
*
|
|
98
|
+
* @private
|
|
99
|
+
*/
|
|
100
|
+
requestIdentityCredential(options: {
|
|
101
|
+
configURL: string;
|
|
102
|
+
clientId: string;
|
|
103
|
+
nonce: string;
|
|
104
|
+
context?: string;
|
|
105
|
+
mediation?: "silent" | "optional" | "required";
|
|
106
|
+
}): Promise<{
|
|
107
|
+
token: string;
|
|
108
|
+
} | null>;
|
|
109
|
+
/**
|
|
110
|
+
* Exchange FedCM ID token for Oxy session
|
|
111
|
+
*
|
|
112
|
+
* The ID token is a JWT issued by auth.oxy.so that proves the user's
|
|
113
|
+
* identity. We exchange it for a full Oxy session with access token.
|
|
114
|
+
*
|
|
115
|
+
* @private
|
|
116
|
+
*/
|
|
117
|
+
exchangeIdTokenForSession(idToken: string): Promise<SessionLoginResponse>;
|
|
118
|
+
/**
|
|
119
|
+
* Revoke FedCM credential (sign out)
|
|
120
|
+
*
|
|
121
|
+
* This tells the browser to forget the FedCM credential for this app.
|
|
122
|
+
* The user will need to re-authenticate next time.
|
|
123
|
+
*/
|
|
124
|
+
revokeFedCMCredential(): Promise<void>;
|
|
125
|
+
/**
|
|
126
|
+
* Get configuration for FedCM
|
|
127
|
+
*
|
|
128
|
+
* @returns FedCM configuration with browser support info
|
|
129
|
+
*/
|
|
130
|
+
getFedCMConfig(): FedCMConfig;
|
|
131
|
+
/**
|
|
132
|
+
* Generate a cryptographically secure nonce for FedCM
|
|
133
|
+
*
|
|
134
|
+
* @private
|
|
135
|
+
*/
|
|
136
|
+
generateNonce(): string;
|
|
137
|
+
/**
|
|
138
|
+
* Get the client ID for this origin
|
|
139
|
+
*
|
|
140
|
+
* @private
|
|
141
|
+
*/
|
|
142
|
+
getClientId(): string;
|
|
143
|
+
httpService: import("../HttpService").HttpService;
|
|
144
|
+
cloudURL: string;
|
|
145
|
+
config: import("../OxyServices.base").OxyConfig;
|
|
146
|
+
makeRequest<T_1>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../HttpService").RequestOptions): Promise<T_1>;
|
|
147
|
+
getBaseURL(): string;
|
|
148
|
+
getClient(): import("../HttpService").HttpService;
|
|
149
|
+
getMetrics(): {
|
|
150
|
+
totalRequests: number;
|
|
151
|
+
successfulRequests: number;
|
|
152
|
+
failedRequests: number;
|
|
153
|
+
cacheHits: number;
|
|
154
|
+
cacheMisses: number;
|
|
155
|
+
averageResponseTime: number;
|
|
156
|
+
};
|
|
157
|
+
clearCache(): void;
|
|
158
|
+
clearCacheEntry(key: string): void;
|
|
159
|
+
getCacheStats(): {
|
|
160
|
+
size: number;
|
|
161
|
+
hits: number;
|
|
162
|
+
misses: number;
|
|
163
|
+
hitRate: number;
|
|
164
|
+
};
|
|
165
|
+
getCloudURL(): string;
|
|
166
|
+
setTokens(accessToken: string, refreshToken?: string): void;
|
|
167
|
+
clearTokens(): void;
|
|
168
|
+
getCurrentUserId(): string | null;
|
|
169
|
+
hasValidToken(): boolean;
|
|
170
|
+
getAccessToken(): string | null;
|
|
171
|
+
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
172
|
+
withAuthRetry<T_1>(operation: () => Promise<T_1>, operationName: string, options?: {
|
|
173
|
+
maxRetries?: number;
|
|
174
|
+
retryDelay?: number;
|
|
175
|
+
authTimeoutMs?: number;
|
|
176
|
+
}): Promise<T_1>;
|
|
177
|
+
validate(): Promise<boolean>;
|
|
178
|
+
handleError(error: unknown): Error;
|
|
179
|
+
healthCheck(): Promise<{
|
|
180
|
+
status: string;
|
|
181
|
+
users?: number;
|
|
182
|
+
timestamp?: string;
|
|
183
|
+
[key: string]: any;
|
|
184
|
+
}>;
|
|
185
|
+
};
|
|
186
|
+
readonly DEFAULT_CONFIG_URL: "https://auth.oxy.so/fedcm.json";
|
|
187
|
+
readonly FEDCM_TIMEOUT: 60000;
|
|
188
|
+
/**
|
|
189
|
+
* Check if FedCM is supported in the current browser
|
|
190
|
+
*/
|
|
191
|
+
isFedCMSupported(): boolean;
|
|
192
|
+
__resetTokensForTests(): void;
|
|
193
|
+
} & T;
|
|
194
|
+
export { OxyServicesFedCMMixin as FedCMMixin };
|
|
195
|
+
//# sourceMappingURL=OxyServices.fedcm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OxyServices.fedcm.d.ts","sourceRoot":"","sources":["../../../../src/core/mixins/OxyServices.fedcm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,KAAK,CAAC;CACpD;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ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AAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAa87F,CAAC;sBAA0B,CAAC;yBAA6B,CAAC;;;;;;iBAAuhG,CAAC;qBAAwB,CAAC;;;;;MAF/kM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyServices.language.d.ts","sourceRoot":"","sources":["../../../../src/core/mixins/OxyServices.language.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,OAAO,eAAe,EAAE,IAAI,EAAE,CAAC;kBAEzD,GAAG,EAAE;QAG1B;;WAEG;sBACwB,OAAO,CAAC;YACjC,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;YACjD,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;YACvD,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;SAC5C,CAAC;QAuCF;;;;WAIG;8CACwC,MAAM,GAAmB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;QA8B1F;;;;WAIG;sDACgD,MAAM,GAAmB,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;QAK5G;;;;WAIG;kDAC4C,MAAM,GAAmB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;QAM9F;;;;WAIG;wDACkD,MAAM,GAAmB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"OxyServices.language.d.ts","sourceRoot":"","sources":["../../../../src/core/mixins/OxyServices.language.ts"],"names":[],"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C;kBAEzD,GAAG,EAAE;QAI1B;;;;;WAKG;iCAC4B,MAAM,aAAa,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;QAWvE;;;;WAIG;gCAC2B,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"OxyServices.location.d.ts","sourceRoot":"","sources":["../../../../src/core/mixins/OxyServices.location.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,OAAO,eAAe,EAAE,IAAI,EAAE,CAAC;kBAEzD,GAAG,EAAE;QAI1B;;;;;WAKG;iCAC4B,MAAM,aAAa,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;QAWvE;;;;WAIG;gCAC2B,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAaokJ,CAAC;sBAA0B,CAAC;yBAA6B,CAAC;;;;;;iBAAuhG,CAAC;qBAAwB,CAAC;;;;;MAFvuP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyServices.payment.d.ts","sourceRoot":"","sources":["../../../../src/core/mixins/OxyServices.payment.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG3D,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,OAAO,eAAe,EAAE,IAAI,EAAE,CAAC;kBAExD,GAAG,EAAE;QAI1B;;;;WAIG;4BACuB,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;QAQ5C;;;;WAIG;8BACyB,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;QAWjD;;;WAGG;2BACsB,OAAO,CAAC,GAAG,EAAE,CAAC;QAUvC;;;;WAIG;gCAC2B,M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M,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,GAAG,OAAO,CAAC,GAAG,CAAC;QAiBxG;;;;WAIG;mDAC8C;YAAE,KAAK,CAAC,EAAE,MAAM,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,GAAG,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAcirC,CAAC;sBAA0B,CAAC;yBAA6B,CAAC;;;;;;iBAAuhG,CAAC;qBAAwB,CAAC;;;;;MAFl4I"}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import type { OxyServicesBase } from '../OxyServices.base';
|
|
2
|
+
import type { SessionLoginResponse } from '../../models/session';
|
|
3
|
+
export interface PopupAuthOptions {
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
timeout?: number;
|
|
7
|
+
mode?: 'login' | 'signup';
|
|
8
|
+
}
|
|
9
|
+
export interface SilentAuthOptions {
|
|
10
|
+
timeout?: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Popup-based Cross-Domain Authentication Mixin
|
|
14
|
+
*
|
|
15
|
+
* Implements OAuth2-style authentication using popup windows and postMessage.
|
|
16
|
+
* This is the primary authentication method for modern browsers, providing a
|
|
17
|
+
* Google-like experience without full page redirects.
|
|
18
|
+
*
|
|
19
|
+
* Flow:
|
|
20
|
+
* 1. Opens small popup window to auth.oxy.so
|
|
21
|
+
* 2. User signs in (auth.oxy.so sets its own first-party cookie)
|
|
22
|
+
* 3. auth.oxy.so sends token back via postMessage
|
|
23
|
+
* 4. Popup closes, parent app has the session
|
|
24
|
+
*
|
|
25
|
+
* Features:
|
|
26
|
+
* - No full page redirect (preserves app state)
|
|
27
|
+
* - Works across different domains (homiio.com, mention.earth, etc.)
|
|
28
|
+
* - Silent refresh using hidden iframe for seamless SSO
|
|
29
|
+
* - CSRF protection via state parameter
|
|
30
|
+
* - XSS protection via origin validation
|
|
31
|
+
*
|
|
32
|
+
* Browser Support: All modern browsers (IE11+)
|
|
33
|
+
*/
|
|
34
|
+
export declare function OxyServicesPopupAuthMixin<T extends typeof OxyServicesBase>(Base: T): {
|
|
35
|
+
new (...args: any[]): {
|
|
36
|
+
/**
|
|
37
|
+
* Sign in using popup window
|
|
38
|
+
*
|
|
39
|
+
* Opens a centered popup window to auth.oxy.so where the user can sign in.
|
|
40
|
+
* The popup automatically closes after successful authentication and the
|
|
41
|
+
* session is returned to the parent window.
|
|
42
|
+
*
|
|
43
|
+
* @param options - Popup configuration options
|
|
44
|
+
* @returns Session with access token and user data
|
|
45
|
+
* @throws {OxyAuthenticationError} If popup is blocked or auth fails
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```typescript
|
|
49
|
+
* const handleSignIn = async () => {
|
|
50
|
+
* try {
|
|
51
|
+
* const session = await oxyServices.signInWithPopup();
|
|
52
|
+
* console.log('Signed in:', session.user);
|
|
53
|
+
* } catch (error) {
|
|
54
|
+
* if (error.message.includes('blocked')) {
|
|
55
|
+
* alert('Please allow popups for this site');
|
|
56
|
+
* }
|
|
57
|
+
* }
|
|
58
|
+
* };
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
signInWithPopup(options?: PopupAuthOptions): Promise<SessionLoginResponse>;
|
|
62
|
+
/**
|
|
63
|
+
* Sign up using popup window
|
|
64
|
+
*
|
|
65
|
+
* Same as signInWithPopup but opens the signup page by default.
|
|
66
|
+
*
|
|
67
|
+
* @param options - Popup configuration options
|
|
68
|
+
* @returns Session with access token and user data
|
|
69
|
+
*/
|
|
70
|
+
signUpWithPopup(options?: PopupAuthOptions): Promise<SessionLoginResponse>;
|
|
71
|
+
/**
|
|
72
|
+
* Silent sign-in using hidden iframe
|
|
73
|
+
*
|
|
74
|
+
* Attempts to automatically re-authenticate the user without any UI.
|
|
75
|
+
* This is what enables seamless SSO across all Oxy domains.
|
|
76
|
+
*
|
|
77
|
+
* How it works:
|
|
78
|
+
* 1. Creates hidden iframe pointing to auth.oxy.so/silent-auth
|
|
79
|
+
* 2. If user has valid session at auth.oxy.so, it sends token via postMessage
|
|
80
|
+
* 3. If not, iframe responds with null (no error thrown)
|
|
81
|
+
*
|
|
82
|
+
* This should be called on app startup to check for existing sessions.
|
|
83
|
+
*
|
|
84
|
+
* @param options - Silent auth options
|
|
85
|
+
* @returns Session if user is signed in, null otherwise
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```typescript
|
|
89
|
+
* useEffect(() => {
|
|
90
|
+
* const checkAuth = async () => {
|
|
91
|
+
* const session = await oxyServices.silentSignIn();
|
|
92
|
+
* if (session) {
|
|
93
|
+
* setUser(session.user);
|
|
94
|
+
* }
|
|
95
|
+
* };
|
|
96
|
+
* checkAuth();
|
|
97
|
+
* }, []);
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
silentSignIn(options?: SilentAuthOptions): Promise<SessionLoginResponse | null>;
|
|
101
|
+
/**
|
|
102
|
+
* Open a centered popup window
|
|
103
|
+
*
|
|
104
|
+
* @private
|
|
105
|
+
*/
|
|
106
|
+
openCenteredPopup(url: string, title: string, width: number, height: number): Window | null;
|
|
107
|
+
/**
|
|
108
|
+
* Wait for authentication response from popup
|
|
109
|
+
*
|
|
110
|
+
* @private
|
|
111
|
+
*/
|
|
112
|
+
waitForPopupAuth(popup: Window, expectedState: string, timeout: number): Promise<SessionLoginResponse>;
|
|
113
|
+
/**
|
|
114
|
+
* Wait for authentication response from iframe
|
|
115
|
+
*
|
|
116
|
+
* @private
|
|
117
|
+
*/
|
|
118
|
+
waitForIframeAuth(iframe: HTMLIFrameElement, timeout: number, expectedOrigin: string): Promise<SessionLoginResponse | null>;
|
|
119
|
+
/**
|
|
120
|
+
* Build authentication URL with query parameters
|
|
121
|
+
*
|
|
122
|
+
* @private
|
|
123
|
+
*/
|
|
124
|
+
buildAuthUrl(params: {
|
|
125
|
+
mode: string;
|
|
126
|
+
state: string;
|
|
127
|
+
nonce: string;
|
|
128
|
+
clientId: string;
|
|
129
|
+
redirectUri: string;
|
|
130
|
+
}): string;
|
|
131
|
+
/**
|
|
132
|
+
* Generate cryptographically secure state for CSRF protection
|
|
133
|
+
*
|
|
134
|
+
* @private
|
|
135
|
+
*/
|
|
136
|
+
generateState(): string;
|
|
137
|
+
/**
|
|
138
|
+
* Generate nonce for replay attack prevention
|
|
139
|
+
*
|
|
140
|
+
* @private
|
|
141
|
+
*/
|
|
142
|
+
generateNonce(): string;
|
|
143
|
+
/**
|
|
144
|
+
* Store auth state in session storage
|
|
145
|
+
*
|
|
146
|
+
* @private
|
|
147
|
+
*/
|
|
148
|
+
storeAuthState(state: string, nonce: string): void;
|
|
149
|
+
/**
|
|
150
|
+
* Clear auth state from session storage
|
|
151
|
+
*
|
|
152
|
+
* @private
|
|
153
|
+
*/
|
|
154
|
+
clearAuthState(state: string): void;
|
|
155
|
+
httpService: import("../HttpService").HttpService;
|
|
156
|
+
cloudURL: string;
|
|
157
|
+
config: import("../OxyServices.base").OxyConfig;
|
|
158
|
+
makeRequest<T_1>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../HttpService").RequestOptions): Promise<T_1>;
|
|
159
|
+
getBaseURL(): string;
|
|
160
|
+
getClient(): import("../HttpService").HttpService;
|
|
161
|
+
getMetrics(): {
|
|
162
|
+
totalRequests: number;
|
|
163
|
+
successfulRequests: number;
|
|
164
|
+
failedRequests: number;
|
|
165
|
+
cacheHits: number;
|
|
166
|
+
cacheMisses: number;
|
|
167
|
+
averageResponseTime: number;
|
|
168
|
+
};
|
|
169
|
+
clearCache(): void;
|
|
170
|
+
clearCacheEntry(key: string): void;
|
|
171
|
+
getCacheStats(): {
|
|
172
|
+
size: number;
|
|
173
|
+
hits: number;
|
|
174
|
+
misses: number;
|
|
175
|
+
hitRate: number;
|
|
176
|
+
};
|
|
177
|
+
getCloudURL(): string;
|
|
178
|
+
setTokens(accessToken: string, refreshToken?: string): void;
|
|
179
|
+
clearTokens(): void;
|
|
180
|
+
getCurrentUserId(): string | null;
|
|
181
|
+
hasValidToken(): boolean;
|
|
182
|
+
getAccessToken(): string | null;
|
|
183
|
+
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
184
|
+
withAuthRetry<T_1>(operation: () => Promise<T_1>, operationName: string, options?: {
|
|
185
|
+
maxRetries?: number;
|
|
186
|
+
retryDelay?: number;
|
|
187
|
+
authTimeoutMs?: number;
|
|
188
|
+
}): Promise<T_1>;
|
|
189
|
+
validate(): Promise<boolean>;
|
|
190
|
+
handleError(error: unknown): Error;
|
|
191
|
+
healthCheck(): Promise<{
|
|
192
|
+
status: string;
|
|
193
|
+
users?: number;
|
|
194
|
+
timestamp?: string;
|
|
195
|
+
[key: string]: any;
|
|
196
|
+
}>;
|
|
197
|
+
};
|
|
198
|
+
readonly AUTH_URL: "https://auth.oxy.so";
|
|
199
|
+
readonly POPUP_WIDTH: 500;
|
|
200
|
+
readonly POPUP_HEIGHT: 700;
|
|
201
|
+
readonly POPUP_TIMEOUT: 60000;
|
|
202
|
+
readonly SILENT_TIMEOUT: 5000;
|
|
203
|
+
__resetTokensForTests(): void;
|
|
204
|
+
} & T;
|
|
205
|
+
export { OxyServicesPopupAuthMixin as PopupAuthMixin };
|
|
206
|
+
//# sourceMappingURL=OxyServices.popup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OxyServices.popup.d.ts","sourceRoot":"","sources":["../../../../src/core/mixins/OxyServices.popup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,OAA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