@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["EMAIL_REGEX","USERNAME_REGEX","isValidEmail","email","test","isValidUsername","username","isRequiredString","value","trim","length","isRequiredNumber","Number","isNaN","isRequiredBoolean","isValidArray","Array","isArray","isValidObject","isValidUUID","uuid","UUID_REGEX","isValidURL","url","URL","isValidDate","dateString","date","Date","getTime","isValidFileSize","size","maxSize","isValidFileType","filename","allowedTypes","extension","split","pop","toLowerCase","includes","sanitizeString","input","replace","sanitizeHTML","isValidObjectId","id","OBJECT_ID_REGEX","validateAndSanitizeUserInput","type","sanitized"],"sourceRoot":"../../../src","sources":["utils/validationUtils.ts"],"mappings":";;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO,MAAMA,WAAW,GAAG,4BAA4B;;AAEvD;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAG,uBAAuB;;
|
|
1
|
+
{"version":3,"names":["EMAIL_REGEX","USERNAME_REGEX","PASSWORD_REGEX","isValidEmail","email","test","isValidUsername","username","isValidPassword","password","isRequiredString","value","trim","length","isRequiredNumber","Number","isNaN","isRequiredBoolean","isValidArray","Array","isArray","isValidObject","isValidUUID","uuid","UUID_REGEX","isValidURL","url","URL","isValidDate","dateString","date","Date","getTime","isValidFileSize","size","maxSize","isValidFileType","filename","allowedTypes","extension","split","pop","toLowerCase","includes","sanitizeString","input","replace","sanitizeHTML","isValidObjectId","id","OBJECT_ID_REGEX","validateAndSanitizeUserInput","type","sanitized"],"sourceRoot":"../../../src","sources":["utils/validationUtils.ts"],"mappings":";;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO,MAAMA,WAAW,GAAG,4BAA4B;;AAEvD;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAG,uBAAuB;;AAErD;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAG,SAAS;;AAEvC;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAACC,KAAa,EAAW;EACnD,OAAOJ,WAAW,CAACK,IAAI,CAACD,KAAK,CAAC;AAChC;;AAEA;AACA;AACA;AACA,OAAO,SAASE,eAAeA,CAACC,QAAgB,EAAW;EACzD,OAAON,cAAc,CAACI,IAAI,CAACE,QAAQ,CAAC;AACtC;;AAEA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAACC,QAAgB,EAAW;EACzD,OAAOP,cAAc,CAACG,IAAI,CAACI,QAAQ,CAAC;AACtC;;AAEA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAACC,KAAc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,SAAS,GAAGT,cAAc,CAACC,KAAK,CAAC;EAEvC,QAAQO,IAAI;IACV,KAAK,OAAO;MACV,OAAOjD,YAAY,CAACkD,SAAS,CAAC,GAAGA,SAAS,GAAG,IAAI;IACnD,KAAK,UAAU;MACb,OAAO/C,eAAe,CAAC+C,SAAS,CAAC,GAAGA,SAAS,GAAG,IAAI;IACtD,KAAK,QAAQ;MACX,OAAO3C,gBAAgB,CAAC2C,SAAS,CAAC,GAAGA,SAAS,GAAG,IAAI;IACvD;MACE,OAAO,IAAI;EACf;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cross-Domain Authentication Helper
|
|
3
|
+
*
|
|
4
|
+
* Provides a simplified API for cross-domain SSO authentication that automatically
|
|
5
|
+
* selects the best authentication method based on browser capabilities:
|
|
6
|
+
*
|
|
7
|
+
* 1. FedCM (if supported) - Modern, Google-style browser-native auth
|
|
8
|
+
* 2. Popup (fallback) - OAuth2-style popup window
|
|
9
|
+
* 3. Redirect (final fallback) - Traditional full-page redirect
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* ```typescript
|
|
13
|
+
* import { CrossDomainAuth } from '@oxyhq/services';
|
|
14
|
+
*
|
|
15
|
+
* const auth = new CrossDomainAuth(oxyServices);
|
|
16
|
+
*
|
|
17
|
+
* // Automatic method selection
|
|
18
|
+
* const session = await auth.signIn();
|
|
19
|
+
*
|
|
20
|
+
* // Or use specific method
|
|
21
|
+
* const session = await auth.signInWithPopup();
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
import type { OxyServices } from './OxyServices';
|
|
25
|
+
import type { SessionLoginResponse } from '../models/session';
|
|
26
|
+
export interface CrossDomainAuthOptions {
|
|
27
|
+
/**
|
|
28
|
+
* Preferred authentication method
|
|
29
|
+
* - 'auto': Automatically select best method (default)
|
|
30
|
+
* - 'fedcm': Use FedCM (browser-native)
|
|
31
|
+
* - 'popup': Use popup window
|
|
32
|
+
* - 'redirect': Use full-page redirect
|
|
33
|
+
*/
|
|
34
|
+
method?: 'auto' | 'fedcm' | 'popup' | 'redirect';
|
|
35
|
+
/**
|
|
36
|
+
* Custom redirect URI (for redirect method)
|
|
37
|
+
*/
|
|
38
|
+
redirectUri?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Whether to open signup page instead of login
|
|
41
|
+
*/
|
|
42
|
+
isSignup?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Popup window dimensions (for popup method)
|
|
45
|
+
*/
|
|
46
|
+
popupDimensions?: {
|
|
47
|
+
width?: number;
|
|
48
|
+
height?: number;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Callback when auth method is selected
|
|
52
|
+
*/
|
|
53
|
+
onMethodSelected?: (method: 'fedcm' | 'popup' | 'redirect') => void;
|
|
54
|
+
}
|
|
55
|
+
export declare class CrossDomainAuth {
|
|
56
|
+
private oxyServices;
|
|
57
|
+
constructor(oxyServices: OxyServices);
|
|
58
|
+
/**
|
|
59
|
+
* Sign in with automatic method selection
|
|
60
|
+
*
|
|
61
|
+
* Tries methods in this order:
|
|
62
|
+
* 1. FedCM (if supported and not in private browsing)
|
|
63
|
+
* 2. Popup (if not blocked)
|
|
64
|
+
* 3. Redirect (always works)
|
|
65
|
+
*
|
|
66
|
+
* @param options - Authentication options
|
|
67
|
+
* @returns Session with user data and access token
|
|
68
|
+
*/
|
|
69
|
+
signIn(options?: CrossDomainAuthOptions): Promise<SessionLoginResponse | null>;
|
|
70
|
+
/**
|
|
71
|
+
* Automatic sign-in with progressive enhancement
|
|
72
|
+
*
|
|
73
|
+
* @private
|
|
74
|
+
*/
|
|
75
|
+
private autoSignIn;
|
|
76
|
+
/**
|
|
77
|
+
* Sign in using FedCM (Federated Credential Management)
|
|
78
|
+
*
|
|
79
|
+
* Best method - browser-native, no popups, Google-like experience
|
|
80
|
+
*/
|
|
81
|
+
signInWithFedCM(options?: CrossDomainAuthOptions): Promise<SessionLoginResponse>;
|
|
82
|
+
/**
|
|
83
|
+
* Sign in using popup window
|
|
84
|
+
*
|
|
85
|
+
* Good method - preserves app state, no full page reload
|
|
86
|
+
*/
|
|
87
|
+
signInWithPopup(options?: CrossDomainAuthOptions): Promise<SessionLoginResponse>;
|
|
88
|
+
/**
|
|
89
|
+
* Sign in using full-page redirect
|
|
90
|
+
*
|
|
91
|
+
* Fallback method - works everywhere but loses app state
|
|
92
|
+
*/
|
|
93
|
+
signInWithRedirect(options?: CrossDomainAuthOptions): void;
|
|
94
|
+
/**
|
|
95
|
+
* Handle redirect callback
|
|
96
|
+
*
|
|
97
|
+
* Call this on app startup to check if we're returning from auth redirect
|
|
98
|
+
*/
|
|
99
|
+
handleRedirectCallback(): SessionLoginResponse | null;
|
|
100
|
+
/**
|
|
101
|
+
* Silent sign-in (check for existing session)
|
|
102
|
+
*
|
|
103
|
+
* Tries to automatically sign in without user interaction.
|
|
104
|
+
* Works with both FedCM and popup/iframe methods.
|
|
105
|
+
*
|
|
106
|
+
* @returns Session if user is already signed in, null otherwise
|
|
107
|
+
*/
|
|
108
|
+
silentSignIn(): Promise<SessionLoginResponse | null>;
|
|
109
|
+
/**
|
|
110
|
+
* Restore session from storage
|
|
111
|
+
*
|
|
112
|
+
* For redirect method - restores previously authenticated session from localStorage
|
|
113
|
+
*/
|
|
114
|
+
restoreSession(): boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Check if FedCM is supported in current browser
|
|
117
|
+
*/
|
|
118
|
+
isFedCMSupported(): boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Get recommended authentication method for current environment
|
|
121
|
+
*
|
|
122
|
+
* @returns Recommended method name and reason
|
|
123
|
+
*/
|
|
124
|
+
getRecommendedMethod(): {
|
|
125
|
+
method: 'fedcm' | 'popup' | 'redirect';
|
|
126
|
+
reason: string;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Initialize cross-domain auth on app startup
|
|
130
|
+
*
|
|
131
|
+
* This handles:
|
|
132
|
+
* 1. Redirect callback (if returning from auth.oxy.so)
|
|
133
|
+
* 2. Session restoration (from localStorage)
|
|
134
|
+
* 3. Silent sign-in (check for existing SSO session)
|
|
135
|
+
*
|
|
136
|
+
* @returns Session if user is authenticated, null otherwise
|
|
137
|
+
*/
|
|
138
|
+
initialize(): Promise<SessionLoginResponse | null>;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Helper function to create CrossDomainAuth instance
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* ```typescript
|
|
145
|
+
* import { createCrossDomainAuth } from '@oxyhq/services';
|
|
146
|
+
*
|
|
147
|
+
* const oxyServices = new OxyServices({ baseURL: 'https://api.oxy.so' });
|
|
148
|
+
* const auth = createCrossDomainAuth(oxyServices);
|
|
149
|
+
*
|
|
150
|
+
* // On app startup
|
|
151
|
+
* const session = await auth.initialize();
|
|
152
|
+
* if (session) {
|
|
153
|
+
* console.log('User is signed in:', session.user);
|
|
154
|
+
* }
|
|
155
|
+
*
|
|
156
|
+
* // Sign in button click
|
|
157
|
+
* const session = await auth.signIn();
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
export declare function createCrossDomainAuth(oxyServices: OxyServices): CrossDomainAuth;
|
|
161
|
+
//# sourceMappingURL=CrossDomainAuth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CrossDomainAuth.d.ts","sourceRoot":"","sources":["../../../src/core/CrossDomainAuth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,MAAM,WAAW,sBAAsB;IACrC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,CAAC;IAEjD;;OAEG;IACH,WAAW,CAAC,E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AW,EAAE,WAAW,GAAG,eAAe,CAE/E"}
|
|
@@ -37,6 +37,7 @@ interface RequestConfig extends RequestOptions {
|
|
|
37
37
|
*/
|
|
38
38
|
export declare class HttpService {
|
|
39
39
|
private baseURL;
|
|
40
|
+
private tokenStore;
|
|
40
41
|
private cache;
|
|
41
42
|
private deduplicator;
|
|
42
43
|
private requestQueue;
|
|
@@ -64,7 +65,6 @@ export declare class HttpService {
|
|
|
64
65
|
private buildURL;
|
|
65
66
|
/**
|
|
66
67
|
* Get auth header with automatic token refresh
|
|
67
|
-
* Uses TokenService for all token operations
|
|
68
68
|
*/
|
|
69
69
|
private getAuthHeader;
|
|
70
70
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpService.d.ts","sourceRoot":"","sources":["../../../src/core/HttpService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;
|
|
1
|
+
{"version":3,"file":"HttpService.d.ts","sourceRoot":"","sources":["../../../src/core/HttpService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAOH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAUtD,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,UAAU,aAAc,SAAQ,cAAc;IAC5C,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;IACpD,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EA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AAC,CAAC,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,CAAC,CAAA;KAAE,CAAC;IAKlI;;;;;;;;;;;;OAYG;IACG,KAAK,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,CAAC,CAAA;KAAE,CAAC;IAK9H,MAAM,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,GAAG,KAAK,CAAC,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,CAAC,CAAA;KAAE,CAAC;IAM5G,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,SAAK,GAAG,IAAI;IAIvD,WAAW,IAAI,IAAI;IAInB,cAAc,IAAI,MAAM,GAAG,IAAI;IAI/B,cAAc,IAAI,OAAO;IAIzB,UAAU,IAAI,MAAM;IAKpB,UAAU,IAAI,IAAI;IAIlB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIlC,aAAa;;;;;;IAWb,UAAU;;;;;;;;IAKV,MAAM,CAAC,qBAAqB,IAAI,IAAI;CAQrC"}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OxyServices Base Class
|
|
3
|
-
*
|
|
4
|
-
* Contains core infrastructure, HTTP client, request management, and error handling
|
|
5
|
-
*/
|
|
6
1
|
import type { OxyConfig as OxyConfigBase } from '../models/interfaces';
|
|
7
2
|
import { HttpService, type RequestOptions } from './HttpService';
|
|
8
3
|
export interface OxyConfig extends OxyConfigBase {
|
|
@@ -73,7 +68,6 @@ export declare class OxyServicesBase {
|
|
|
73
68
|
clearTokens(): void;
|
|
74
69
|
/**
|
|
75
70
|
* Get the current user ID from the access token
|
|
76
|
-
* Returns MongoDB ObjectId (never publicKey)
|
|
77
71
|
*/
|
|
78
72
|
getCurrentUserId(): string | null;
|
|
79
73
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyServices.base.d.ts","sourceRoot":"","sources":["../../../src/core/OxyServices.base.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OxyServices.base.d.ts","sourceRoot":"","sources":["../../../src/core/OxyServices.base.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,IAAI,aAAa,EAAkB,MAAM,sBAAsB,CAAC;AAEvF,OAAO,EAAE,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAGjE,MAAM,WAAW,SAAU,SAAQ,aAAa;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAUD;;GAEG;AACH,qBAAa,eAAe;IACnB,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,SAAS,CAAC;gBAEb,GAAG,IAAI,EAAE,GAAG,EAAE;IAa1B,MAAM,CAAC,qBAAqB,IAAI,IAAI;IAIpC;;;OAGG;IACU,WAAW,CAAC,CAAC,EACxB,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,EACnD,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,GAAG,EACV,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,CAAC,CAAC;IAcb;;OAEG;IACI,UAAU,IAAI,MAAM;IAI3B;;;OAGG;IACI,SAAS,IAAI,WAAW;IAI/B;;OAEG;IACI,UAAU;;;;;;;;IAIjB;;OAEG;IACI,UAAU,IAAI,IAAI;IAIzB;;OAEG;IACI,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIzC;;OAEG;IACI,aAAa;;;;;;IAIpB;;OAEG;IACI,WAAW,IAAI,MAAM;IAI5B;;OAEG;IACI,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,SAAK,GAAG,IAAI;IAI9D;;OAEG;IACI,WAAW,IAAI,IAAI;IAI1B;;OAEG;IACI,gBAAgB,IAAI,MAAM,GAAG,IAAI;IAcxC;;OAEG;IACI,aAAa,IAAI,OAAO;IAI/B;;OAEG;IACI,cAAc,IAAI,MAAM,GAAG,IAAI;IAItC;;;;;;;;;;;;;;;;;OAiBG;IACU,WAAW,CAAC,SAAS,SAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IA6B5D;;;OAGG;IACU,aAAa,CAAC,CAAC,EAC1B,SAAS,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAC3B,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE;QACP,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,aAAa,CAAC,EAAE,MAAM,CAAC;KACnB,GACL,OAAO,CAAC,CAAC,CAAC;IAuDb;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC;IAgBlC;;OAEG;IACI,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK;IAWzC;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC;QAC3B,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KACnB,CAAC;CAWH"}
|
|
@@ -59,46 +59,15 @@
|
|
|
59
59
|
import { type OxyConfig } from './OxyServices.base';
|
|
60
60
|
import { OxyAuthenticationError, OxyAuthenticationTimeoutError } from './OxyServices.errors';
|
|
61
61
|
import { composeOxyServices } from './mixins';
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
*
|
|
65
|
-
* This class provides all API functionality in one simple, easy-to-use interface.
|
|
66
|
-
*
|
|
67
|
-
* ## Architecture
|
|
68
|
-
* - **HttpService**: Unified HTTP service handling authentication, caching, deduplication, queuing, and retry
|
|
69
|
-
* - **OxyServices**: Provides high-level API methods
|
|
70
|
-
*
|
|
71
|
-
* ## Mixin Composition
|
|
72
|
-
* The class is composed using TypeScript mixins for better code organization:
|
|
73
|
-
* - **Base**: Core infrastructure (HTTP client, request management, error handling)
|
|
74
|
-
* - **Auth**: Authentication and session management
|
|
75
|
-
* - **User**: User profiles, follow, notifications
|
|
76
|
-
* - **Privacy**: Blocked and restricted users
|
|
77
|
-
* - **Language**: Language detection and metadata
|
|
78
|
-
* - **Payment**: Payment processing
|
|
79
|
-
* - **Karma**: Karma system
|
|
80
|
-
* - **Assets**: File upload and asset management
|
|
81
|
-
* - **Developer**: Developer API management
|
|
82
|
-
* - **Location**: Location-based features
|
|
83
|
-
* - **Analytics**: Analytics tracking
|
|
84
|
-
* - **Devices**: Device management
|
|
85
|
-
* - **Utility**: Utility methods and Express middleware
|
|
86
|
-
*
|
|
87
|
-
* @example
|
|
88
|
-
* ```typescript
|
|
89
|
-
* const oxy = new OxyServices({
|
|
90
|
-
* baseURL: 'https://api.oxy.so',
|
|
91
|
-
* cloudURL: 'https://cloud.oxy.so'
|
|
92
|
-
* });
|
|
93
|
-
* ```
|
|
94
|
-
*/
|
|
95
|
-
declare const OxyServicesComposed: ReturnType<typeof composeOxyServices>;
|
|
96
|
-
export declare class OxyServices extends OxyServicesComposed {
|
|
62
|
+
declare const OxyServices_base: any;
|
|
63
|
+
export declare class OxyServices extends OxyServices_base {
|
|
97
64
|
constructor(config: OxyConfig);
|
|
98
65
|
}
|
|
66
|
+
export interface OxyServices extends InstanceType<ReturnType<typeof composeOxyServices>> {
|
|
67
|
+
}
|
|
99
68
|
export { OxyAuthenticationError, OxyAuthenticationTimeoutError };
|
|
100
69
|
/**
|
|
101
|
-
*
|
|
70
|
+
* Export the default Oxy Cloud URL (for backward compatibility)
|
|
102
71
|
*/
|
|
103
72
|
export declare const OXY_CLOUD_URL = "https://cloud.oxy.so";
|
|
104
73
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyServices.d.ts","sourceRoot":"","sources":["../../../src/core/OxyServices.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAG7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"OxyServices.d.ts","sourceRoot":"","sources":["../../../src/core/OxyServices.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAG7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;gCAuCW,GAAG;AAA5D,qBAAa,WAAY,SAAQ,gBAA4B;gBAC/C,MAAM,EAAE,SAAS;CAG9B;AAID,MAAM,WAAW,WAAY,SAAQ,YAAY,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;CAAG;AAG3F,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,CAAC;AAEjE;;GAEG;AACH,eAAO,MAAM,aAAa,yBAAyB,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,WAAW,KAAqG,CAAC;AAE9H;;;GAGG;AACH,eAAO,MAAM,SAAS,aAAqE,CAAC"}
|
|
@@ -6,10 +6,14 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export { OxyServices, OxyAuthenticationError, OxyAuthenticationTimeoutError } from './OxyServices';
|
|
8
8
|
export { OXY_CLOUD_URL, oxyClient } from './OxyServices';
|
|
9
|
+
export { CrossDomainAuth, createCrossDomainAuth } from './CrossDomainAuth';
|
|
10
|
+
export type { CrossDomainAuthOptions } from './CrossDomainAuth';
|
|
9
11
|
export * from '../models/interfaces';
|
|
10
12
|
export * from '../models/session';
|
|
11
13
|
export { DeviceManager } from '../utils/deviceManager';
|
|
12
14
|
export type { DeviceFingerprint, StoredDeviceInfo } from '../utils/deviceManager';
|
|
13
15
|
export { SUPPORTED_LANGUAGES, getLanguageMetadata, getLanguageName, getNativeLanguageName, normalizeLanguageCode } from '../utils/languageUtils';
|
|
14
16
|
export type { LanguageMetadata } from '../utils/languageUtils';
|
|
17
|
+
import { OxyServices } from './OxyServices';
|
|
18
|
+
export default OxyServices;
|
|
15
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAGzD,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAGlC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAGlF,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAGzD,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,YAAY,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAGhE,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAGlC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAGlF,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG/D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyServices.analytics.d.ts","sourceRoot":"","sources":["../../../../src/core/mixins/OxyServices.analytics.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG3D,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,OAAO,eAAe,EAAE,IAAI,EAAE,CAAC;kBAE1D,GAAG,EAAE;QAI1B;;;;WAIG;8BACyB,MAAM,eAAe,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;QAWpF;;;;;WAKG;iCAC4B,MAAM,YAAY,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"OxyServices.analytics.d.ts","sourceRoot":"","sources":["../../../../src/core/mixins/OxyServices.analytics.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG3D,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,OAAO,eAAe,EAAE,IAAI,EAAE,CAAC;kBAE1D,GAAG,EAAE;QAI1B;;;;WAIG;8BACyB,MAAM,eAAe,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;QAWpF;;;;;WAKG;iCAC4B,MAAM,YAAY,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAiBgwI,CAAC;sBAA0B,CAAC;yBAA6B,CAAC;;;;;;iBAAuhG,CAAC;qBAAwB,CAAC;;;;;MAFp7O"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyServices.assets.d.ts","sourceRoot":"","sources":["../../../../src/core/mixins/OxyServices.assets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC3G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,OAAO,eAAe,EAAE,IAAI,EAAE,CAAC;kBAEvD,GAAG,EAAE;QAI1B;;WAEG;2BACsB,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;QAQ9C;;WAEG;mCACwB,MAAM,YAAY,MAAM,cAAc,MAAM,GAAG,MAAM;QAahF;;WAEG;wCACmC,MAAM,YAAY,MAAM,cAAc,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAepG;;WAEG;8BACyB,M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QAWrK;;WAEG;4BACuB,MAAM,OAAO,MAAM,cAAc,MAAM,YAAY,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;QAYlG;;WAEG;yBACoB,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;QAW5C;;WAEG;4BACuB,MAAM,YAAY,MAAM,cAAc,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;QAelG;;WAEG;6BACwB,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;QAQhD;;WAEG;4BACuB,MAAM,UAAS,OAAO,GAAW,OAAO,CAAC,GAAG,CAAC;QASvE;;WAEG;iCAC4B,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;QAS/D;;WAEG;sCACiC,MAAM,cAAc,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC;2BAU/E,IAAI,UAAU,MAAM,QAAO,MAAM,GAAgB,OAAO,CAAC,GAAG,CAAC;kCAUtD,IAAI,UAAU,MAAM,QAAO,MAAM,GAAgB,OAAO,CAAC,GAAG,CAAC;wCAUtD,MAAM;sCAMnC,MAAM,YACJ,MAAM,aACL,MAAM,cACL,MAAM,GACjB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;+BAkBW,MAAM,QAAQ,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;+BACtC,MAAM,QAAQ,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBA9N7B,CAAC;sBACtC,CAAR;yBAA6B,CAAC;;;;;;iBAwFxB,CAAP;qBAAwB,CAAC;;;;;MA8IzB"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Authentication Methods Mixin
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* No passwords required - authentication is done via challenge-response.
|
|
4
|
+
* Supports password-based login (email/username) and public key challenge-response.
|
|
6
5
|
*/
|
|
7
6
|
import type { User } from '../../models/interfaces';
|
|
8
7
|
import type { SessionLoginResponse } from '../../models/session';
|
|
@@ -11,6 +10,21 @@ export interface ChallengeResponse {
|
|
|
11
10
|
challenge: string;
|
|
12
11
|
expiresAt: string;
|
|
13
12
|
}
|
|
13
|
+
export interface RegistrationRequest {
|
|
14
|
+
publicKey: string;
|
|
15
|
+
username: string;
|
|
16
|
+
email?: string;
|
|
17
|
+
signature: string;
|
|
18
|
+
timestamp: number;
|
|
19
|
+
}
|
|
20
|
+
export interface ChallengeVerifyRequest {
|
|
21
|
+
publicKey: string;
|
|
22
|
+
challenge: string;
|
|
23
|
+
signature: string;
|
|
24
|
+
timestamp: number;
|
|
25
|
+
deviceName?: string;
|
|
26
|
+
deviceFingerprint?: string;
|
|
27
|
+
}
|
|
14
28
|
export interface PublicKeyCheckResponse {
|
|
15
29
|
registered: boolean;
|
|
16
30
|
message: string;
|
|
@@ -18,48 +32,45 @@ export interface PublicKeyCheckResponse {
|
|
|
18
32
|
export declare function OxyServicesAuthMixin<T extends typeof OxyServicesBase>(Base: T): {
|
|
19
33
|
new (...args: any[]): {
|
|
20
34
|
/**
|
|
21
|
-
* Register a new identity
|
|
22
|
-
*
|
|
23
|
-
* Register a new identity (public key only).
|
|
24
|
-
* Profile data should be synced separately via updateProfile after sign-in.
|
|
35
|
+
* Register a new identity with public key authentication
|
|
36
|
+
* Identity is purely cryptographic - username and profile data are optional
|
|
25
37
|
*
|
|
26
38
|
* @param publicKey - The user's ECDSA public key (hex)
|
|
27
|
-
* @
|
|
39
|
+
* @param signature - Signature of the registration request
|
|
40
|
+
* @param timestamp - Timestamp when the signature was created
|
|
28
41
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
42
|
+
register(publicKey: string, signature: string, timestamp: number): Promise<{
|
|
43
|
+
message: string;
|
|
31
44
|
user: User;
|
|
32
45
|
}>;
|
|
33
46
|
/**
|
|
34
47
|
* Request an authentication challenge
|
|
35
48
|
* The client must sign this challenge with their private key
|
|
36
49
|
*
|
|
37
|
-
* @param
|
|
50
|
+
* @param publicKey - The user's public key
|
|
38
51
|
*/
|
|
39
|
-
requestChallenge(
|
|
52
|
+
requestChallenge(publicKey: string): Promise<ChallengeResponse>;
|
|
40
53
|
/**
|
|
41
54
|
* Verify a signed challenge and create a session
|
|
42
55
|
*
|
|
43
|
-
* @param
|
|
44
|
-
* @param
|
|
56
|
+
* @param publicKey - The user's public key
|
|
57
|
+
* @param challenge - The challenge string from requestChallenge
|
|
45
58
|
* @param signature - Signature of the auth message
|
|
46
59
|
* @param timestamp - Timestamp when the signature was created
|
|
47
60
|
* @param deviceName - Optional device name
|
|
48
61
|
* @param deviceFingerprint - Optional device fingerprint
|
|
49
62
|
*/
|
|
50
|
-
verifyChallenge(
|
|
63
|
+
verifyChallenge(publicKey: string, challenge: string, signature: string, timestamp: number, deviceName?: string, deviceFingerprint?: string): Promise<SessionLoginResponse>;
|
|
51
64
|
/**
|
|
52
65
|
* Check if a public key is already registered
|
|
53
66
|
*/
|
|
54
67
|
checkPublicKeyRegistered(publicKey: string): Promise<PublicKeyCheckResponse>;
|
|
55
68
|
/**
|
|
56
69
|
* Get user by public key
|
|
57
|
-
* Services never caches profile - always fetch fresh from backend
|
|
58
70
|
*/
|
|
59
71
|
getUserByPublicKey(publicKey: string): Promise<User>;
|
|
60
72
|
/**
|
|
61
73
|
* Get user by session ID
|
|
62
|
-
* Services never caches profile - always fetch fresh from backend
|
|
63
74
|
*/
|
|
64
75
|
getUserBySession(sessionId: string): Promise<User>;
|
|
65
76
|
/**
|
|
@@ -72,12 +83,9 @@ export declare function OxyServicesAuthMixin<T extends typeof OxyServicesBase>(B
|
|
|
72
83
|
/**
|
|
73
84
|
* Get access token by session ID
|
|
74
85
|
*/
|
|
75
|
-
getTokenBySession(sessionId: string
|
|
86
|
+
getTokenBySession(sessionId: string): Promise<{
|
|
76
87
|
accessToken: string;
|
|
77
|
-
refreshToken: string;
|
|
78
88
|
expiresAt: string;
|
|
79
|
-
sessionId: string;
|
|
80
|
-
deviceId: string;
|
|
81
89
|
}>;
|
|
82
90
|
/**
|
|
83
91
|
* Get sessions by session ID
|
|
@@ -119,6 +127,18 @@ export declare function OxyServicesAuthMixin<T extends typeof OxyServicesBase>(B
|
|
|
119
127
|
available: boolean;
|
|
120
128
|
message: string;
|
|
121
129
|
}>;
|
|
130
|
+
/**
|
|
131
|
+
* Register a new user with email/username and password
|
|
132
|
+
*/
|
|
133
|
+
signUp(username: string, email: string, password: string, deviceName?: string, deviceFingerprint?: any): Promise<SessionLoginResponse>;
|
|
134
|
+
/**
|
|
135
|
+
* Sign in with email or username and password
|
|
136
|
+
*/
|
|
137
|
+
signIn(identifier: string, password: string, deviceName?: string, deviceFingerprint?: any): Promise<SessionLoginResponse>;
|
|
138
|
+
/**
|
|
139
|
+
* Convenience helper for email sign-in
|
|
140
|
+
*/
|
|
141
|
+
signInWithEmail(email: string, password: string, deviceName?: string, deviceFingerprint?: any): Promise<SessionLoginResponse>;
|
|
122
142
|
httpService: import("../HttpService").HttpService;
|
|
123
143
|
cloudURL: string;
|
|
124
144
|
config: import("../OxyServices.base").OxyConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyServices.auth.d.ts","sourceRoot":"","sources":["../../../../src/core/mixins/OxyServices.auth.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"OxyServices.auth.d.ts","sourceRoot":"","sources":["../../../../src/core/mixins/OxyServices.auth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG3D,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CA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AC;;;;;;iBA4GV,CAAC;qBACL,CAAC;;;;;MAuClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyServices.developer.d.ts","sourceRoot":"","sources":["../../../../src/core/mixins/OxyServices.developer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG3D,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,OAAO,eAAe,EAAE,IAAI,EAAE,CAAC;kBAE1D,GAAG,EAAE;QAI1B;;;WAGG;4BACuB,OAAO,CAAC,GAAG,EAAE,CAAC;QAYxC;;;;WAIG;iCAC4B;YAC7B,IAAI,EAAE,MAAM,CAAC;YACb,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,UAAU,EAAE,MAAM,CAAC;YACnB,aAAa,CAAC,EAAE,MAAM,CAAC;YACvB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;SACnB,GAAG,OAAO,CAAC,GAAG,CAAC;QAShB;;WAEG;+BAC0B,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;QAYlD;;;;;WAKG;kCAC6B,MAAM,QAAQ;YAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,aAAa,CAAC,EAAE,MAAM,CAAC;YACvB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;SACnB,GAAG,OAAO,CAAC,GAAG,CAAC;QAShB;;;;WAIG;4CACuC,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;QAQ/D;;;;WAIG;kCAC6B,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"OxyServices.developer.d.ts","sourceRoot":"","sources":["../../../../src/core/mixins/OxyServices.developer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OA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