@oxyhq/services 5.26.4 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +113 -484
- package/lib/commonjs/index.js +82 -607
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/client.js +0 -7
- package/lib/commonjs/ui/client.js.map +1 -1
- package/lib/commonjs/ui/components/SignInModal.js +2 -2
- package/lib/commonjs/ui/components/SignInModal.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +13 -16
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +6 -7
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useDeviceManagement.js +2 -2
- package/lib/commonjs/ui/context/hooks/useDeviceManagement.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useLanguageManagement.js +7 -7
- package/lib/commonjs/ui/context/hooks/useLanguageManagement.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useSessionManagement.js +3 -3
- package/lib/commonjs/ui/context/hooks/useSessionManagement.js.map +1 -1
- package/lib/commonjs/ui/hooks/useDeviceManagement.js +2 -2
- package/lib/commonjs/ui/hooks/useDeviceManagement.js.map +1 -1
- package/lib/commonjs/ui/hooks/useI18n.js +2 -2
- package/lib/commonjs/ui/hooks/useI18n.js.map +1 -1
- package/lib/commonjs/ui/hooks/useLanguageManagement.js +7 -7
- package/lib/commonjs/ui/hooks/useLanguageManagement.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionManagement.js +3 -3
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionSocket.js +9 -10
- package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -1
- package/lib/commonjs/ui/index.js +1 -11
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +3 -3
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +13 -13
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +2 -2
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +2 -2
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +3 -3
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/OxyAuthScreen.js +2 -2
- package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +3 -3
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserListScreen.js +2 -2
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/server.js +1 -11
- package/lib/commonjs/ui/server.js.map +1 -1
- package/lib/commonjs/ui/stores/authStore.js +2 -2
- package/lib/commonjs/ui/stores/authStore.js.map +1 -1
- package/lib/commonjs/ui/utils/colorUtils.js +8 -8
- package/lib/commonjs/ui/utils/colorUtils.js.map +1 -1
- package/lib/commonjs/ui/utils/themeUtils.js +6 -6
- package/lib/commonjs/ui/utils/themeUtils.js.map +1 -1
- package/lib/module/index.js +30 -75
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/client.js +0 -2
- package/lib/module/ui/client.js.map +1 -1
- package/lib/module/ui/components/SignInModal.js +1 -1
- package/lib/module/ui/components/SignInModal.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +4 -4
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +2 -2
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/context/hooks/useDeviceManagement.js +1 -1
- package/lib/module/ui/context/hooks/useDeviceManagement.js.map +1 -1
- package/lib/module/ui/context/hooks/useLanguageManagement.js +1 -1
- package/lib/module/ui/context/hooks/useLanguageManagement.js.map +1 -1
- package/lib/module/ui/context/hooks/useSessionManagement.js +1 -1
- package/lib/module/ui/context/hooks/useSessionManagement.js.map +1 -1
- package/lib/module/ui/hooks/useDeviceManagement.js +1 -1
- package/lib/module/ui/hooks/useDeviceManagement.js.map +1 -1
- package/lib/module/ui/hooks/useI18n.js +1 -1
- package/lib/module/ui/hooks/useI18n.js.map +1 -1
- package/lib/module/ui/hooks/useLanguageManagement.js +1 -1
- package/lib/module/ui/hooks/useLanguageManagement.js.map +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/module/ui/hooks/useSessionSocket.js +2 -2
- package/lib/module/ui/hooks/useSessionSocket.js.map +1 -1
- package/lib/module/ui/index.js +0 -2
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/OxyAuthScreen.js +1 -1
- package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +1 -1
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/UserListScreen.js +1 -1
- package/lib/module/ui/screens/UserListScreen.js.map +1 -1
- package/lib/module/ui/server.js +0 -2
- package/lib/module/ui/server.js.map +1 -1
- package/lib/module/ui/stores/authStore.js +1 -1
- package/lib/module/ui/stores/authStore.js.map +1 -1
- package/lib/module/ui/utils/colorUtils.js +1 -1
- package/lib/module/ui/utils/colorUtils.js.map +1 -1
- package/lib/module/ui/utils/themeUtils.js +1 -1
- package/lib/module/ui/utils/themeUtils.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +18 -35
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/client.d.ts +0 -2
- package/lib/typescript/commonjs/ui/client.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/FileViewer.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/photogrid/JustifiedPhotoGrid.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/photogrid/JustifiedPhotoGrid.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +3 -3
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts +3 -3
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useDeviceManagement.d.ts +2 -2
- package/lib/typescript/commonjs/ui/context/hooks/useDeviceManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useLanguageManagement.d.ts +2 -2
- package/lib/typescript/commonjs/ui/context/hooks/useLanguageManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useSessionManagement.d.ts +3 -3
- package/lib/typescript/commonjs/ui/context/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/mutationFactory.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/mutationFactory.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useSecurityQueries.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useSecurityQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts +2 -2
- package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useDeviceManagement.d.ts +2 -2
- package/lib/typescript/commonjs/ui/hooks/useDeviceManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useFileDownloadUrl.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/useFileDownloadUrl.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useFileFiltering.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/useFileFiltering.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useLanguageManagement.d.ts +2 -2
- package/lib/typescript/commonjs/ui/hooks/useLanguageManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts +3 -3
- package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useStorage.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/useStorage.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useWebSSO.d.ts +2 -2
- package/lib/typescript/commonjs/ui/hooks/useWebSSO.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/index.d.ts +0 -2
- package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/server.d.ts +0 -2
- package/lib/typescript/commonjs/ui/server.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/stores/accountStore.d.ts +1 -1
- package/lib/typescript/commonjs/ui/stores/accountStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/stores/assetStore.d.ts +1 -1
- package/lib/typescript/commonjs/ui/stores/assetStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/stores/authStore.d.ts +1 -1
- package/lib/typescript/commonjs/ui/stores/authStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/stores/fileStore.d.ts +1 -1
- package/lib/typescript/commonjs/ui/stores/fileStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/stores/followStore.d.ts +1 -1
- package/lib/typescript/commonjs/ui/stores/followStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/fileManagement.d.ts +1 -1
- package/lib/typescript/commonjs/ui/types/fileManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/authHelpers.d.ts +1 -1
- package/lib/typescript/commonjs/ui/utils/authHelpers.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/avatarUtils.d.ts +2 -2
- package/lib/typescript/commonjs/ui/utils/avatarUtils.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/colorUtils.d.ts +1 -1
- package/lib/typescript/commonjs/ui/utils/colorUtils.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/errorHandlers.d.ts +1 -1
- package/lib/typescript/commonjs/ui/utils/errorHandlers.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +1 -1
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/sessionHelpers.d.ts +1 -1
- package/lib/typescript/commonjs/ui/utils/sessionHelpers.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/themeUtils.d.ts +2 -2
- package/lib/typescript/commonjs/ui/utils/themeUtils.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +18 -35
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/client.d.ts +0 -2
- package/lib/typescript/module/ui/client.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts +1 -1
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/FileViewer.d.ts +1 -1
- package/lib/typescript/module/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/photogrid/JustifiedPhotoGrid.d.ts +1 -1
- package/lib/typescript/module/ui/components/photogrid/JustifiedPhotoGrid.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts +3 -3
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +3 -3
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useDeviceManagement.d.ts +2 -2
- package/lib/typescript/module/ui/context/hooks/useDeviceManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useLanguageManagement.d.ts +2 -2
- package/lib/typescript/module/ui/context/hooks/useLanguageManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useSessionManagement.d.ts +3 -3
- package/lib/typescript/module/ui/context/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/mutationFactory.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/mutations/mutationFactory.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useSecurityQueries.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/queries/useSecurityQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAssets.d.ts +2 -2
- package/lib/typescript/module/ui/hooks/useAssets.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useDeviceManagement.d.ts +2 -2
- package/lib/typescript/module/ui/hooks/useDeviceManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useFileDownloadUrl.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useFileDownloadUrl.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useFileFiltering.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useFileFiltering.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useLanguageManagement.d.ts +2 -2
- package/lib/typescript/module/ui/hooks/useLanguageManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts +3 -3
- package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useStorage.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useStorage.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useWebSSO.d.ts +2 -2
- package/lib/typescript/module/ui/hooks/useWebSSO.d.ts.map +1 -1
- package/lib/typescript/module/ui/index.d.ts +0 -2
- package/lib/typescript/module/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/server.d.ts +0 -2
- package/lib/typescript/module/ui/server.d.ts.map +1 -1
- package/lib/typescript/module/ui/stores/accountStore.d.ts +1 -1
- package/lib/typescript/module/ui/stores/accountStore.d.ts.map +1 -1
- package/lib/typescript/module/ui/stores/assetStore.d.ts +1 -1
- package/lib/typescript/module/ui/stores/assetStore.d.ts.map +1 -1
- package/lib/typescript/module/ui/stores/authStore.d.ts +1 -1
- package/lib/typescript/module/ui/stores/authStore.d.ts.map +1 -1
- package/lib/typescript/module/ui/stores/fileStore.d.ts +1 -1
- package/lib/typescript/module/ui/stores/fileStore.d.ts.map +1 -1
- package/lib/typescript/module/ui/stores/followStore.d.ts +1 -1
- package/lib/typescript/module/ui/stores/followStore.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/fileManagement.d.ts +1 -1
- package/lib/typescript/module/ui/types/fileManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/authHelpers.d.ts +1 -1
- package/lib/typescript/module/ui/utils/authHelpers.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/avatarUtils.d.ts +2 -2
- package/lib/typescript/module/ui/utils/avatarUtils.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/colorUtils.d.ts +1 -1
- package/lib/typescript/module/ui/utils/colorUtils.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/errorHandlers.d.ts +1 -1
- package/lib/typescript/module/ui/utils/errorHandlers.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/sessionHelpers.d.ts +1 -1
- package/lib/typescript/module/ui/utils/sessionHelpers.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/themeUtils.d.ts +2 -2
- package/lib/typescript/module/ui/utils/themeUtils.d.ts.map +1 -1
- package/package.json +39 -171
- package/src/index.ts +56 -254
- package/src/ui/client.ts +0 -4
- package/src/ui/components/SignInModal.tsx +1 -1
- package/src/ui/components/fileManagement/FileDetailsModal.tsx +1 -1
- package/src/ui/components/fileManagement/FileViewer.tsx +1 -1
- package/src/ui/components/photogrid/JustifiedPhotoGrid.tsx +1 -1
- package/src/ui/context/OxyContext.tsx +6 -6
- package/src/ui/context/hooks/useAuthOperations.ts +5 -5
- package/src/ui/context/hooks/useDeviceManagement.ts +3 -3
- package/src/ui/context/hooks/useLanguageManagement.ts +2 -2
- package/src/ui/context/hooks/useSessionManagement.ts +4 -4
- package/src/ui/hooks/mutations/mutationFactory.ts +1 -1
- package/src/ui/hooks/mutations/useAccountMutations.ts +1 -1
- package/src/ui/hooks/mutations/useServicesMutations.ts +1 -1
- package/src/ui/hooks/queries/useAccountQueries.ts +1 -1
- package/src/ui/hooks/queries/useSecurityQueries.ts +1 -1
- package/src/ui/hooks/queries/useServicesQueries.ts +1 -1
- package/src/ui/hooks/useAssets.ts +7 -7
- package/src/ui/hooks/useAuth.ts +1 -1
- package/src/ui/hooks/useDeviceManagement.ts +3 -3
- package/src/ui/hooks/useFileDownloadUrl.ts +1 -1
- package/src/ui/hooks/useFileFiltering.ts +1 -1
- package/src/ui/hooks/useI18n.ts +1 -1
- package/src/ui/hooks/useLanguageManagement.ts +2 -2
- package/src/ui/hooks/useSessionManagement.ts +4 -4
- package/src/ui/hooks/useSessionSocket.ts +2 -2
- package/src/ui/hooks/useStorage.ts +1 -1
- package/src/ui/hooks/useWebSSO.ts +2 -2
- package/src/ui/index.ts +0 -3
- package/src/ui/screens/AccountCenterScreen.tsx +1 -1
- package/src/ui/screens/AccountSwitcherScreen.tsx +2 -2
- package/src/ui/screens/AppInfoScreen.tsx +1 -1
- package/src/ui/screens/EditProfileFieldScreen.tsx +1 -1
- package/src/ui/screens/FeedbackScreen.tsx +1 -1
- package/src/ui/screens/FileManagementScreen.tsx +1 -1
- package/src/ui/screens/LanguageSelectorScreen.tsx +1 -1
- package/src/ui/screens/OxyAuthScreen.tsx +1 -1
- package/src/ui/screens/PrivacySettingsScreen.tsx +1 -1
- package/src/ui/screens/ProfileScreen.tsx +2 -2
- package/src/ui/screens/SearchSettingsScreen.tsx +1 -1
- package/src/ui/screens/SessionManagementScreen.tsx +1 -1
- package/src/ui/screens/UserListScreen.tsx +2 -2
- package/src/ui/server.ts +0 -4
- package/src/ui/stores/accountStore.ts +1 -1
- package/src/ui/stores/assetStore.ts +1 -1
- package/src/ui/stores/authStore.ts +2 -2
- package/src/ui/stores/fileStore.ts +1 -1
- package/src/ui/stores/followStore.ts +1 -1
- package/src/ui/types/fileManagement.ts +1 -1
- package/src/ui/types/navigation.ts +2 -2
- package/src/ui/utils/authHelpers.ts +1 -1
- package/src/ui/utils/avatarUtils.ts +2 -2
- package/src/ui/utils/colorUtils.ts +1 -1
- package/src/ui/utils/errorHandlers.ts +1 -1
- package/src/ui/utils/fileManagement.ts +1 -1
- package/src/ui/utils/sessionHelpers.ts +1 -1
- package/src/ui/utils/themeUtils.ts +2 -2
- package/lib/commonjs/constants/version.js +0 -28
- package/lib/commonjs/constants/version.js.map +0 -1
- package/lib/commonjs/core/AuthManager.js +0 -405
- package/lib/commonjs/core/AuthManager.js.map +0 -1
- package/lib/commonjs/core/CrossDomainAuth.js +0 -277
- package/lib/commonjs/core/CrossDomainAuth.js.map +0 -1
- package/lib/commonjs/core/HttpService.js +0 -697
- package/lib/commonjs/core/HttpService.js.map +0 -1
- package/lib/commonjs/core/OxyServices.base.js +0 -291
- package/lib/commonjs/core/OxyServices.base.js.map +0 -1
- package/lib/commonjs/core/OxyServices.errors.js +0 -26
- package/lib/commonjs/core/OxyServices.errors.js.map +0 -1
- package/lib/commonjs/core/OxyServices.js +0 -149
- package/lib/commonjs/core/OxyServices.js.map +0 -1
- package/lib/commonjs/core/index.js +0 -158
- package/lib/commonjs/core/index.js.map +0 -1
- package/lib/commonjs/core/mixins/OxyServices.analytics.js +0 -60
- package/lib/commonjs/core/mixins/OxyServices.analytics.js.map +0 -1
- package/lib/commonjs/core/mixins/OxyServices.assets.js +0 -390
- package/lib/commonjs/core/mixins/OxyServices.assets.js.map +0 -1
- package/lib/commonjs/core/mixins/OxyServices.auth.js +0 -296
- package/lib/commonjs/core/mixins/OxyServices.auth.js.map +0 -1
- package/lib/commonjs/core/mixins/OxyServices.developer.js +0 -115
- package/lib/commonjs/core/mixins/OxyServices.developer.js.map +0 -1
- package/lib/commonjs/core/mixins/OxyServices.devices.js +0 -133
- package/lib/commonjs/core/mixins/OxyServices.devices.js.map +0 -1
- package/lib/commonjs/core/mixins/OxyServices.features.js +0 -372
- package/lib/commonjs/core/mixins/OxyServices.features.js.map +0 -1
- package/lib/commonjs/core/mixins/OxyServices.fedcm.js +0 -464
- package/lib/commonjs/core/mixins/OxyServices.fedcm.js.map +0 -1
- package/lib/commonjs/core/mixins/OxyServices.karma.js +0 -117
- package/lib/commonjs/core/mixins/OxyServices.karma.js.map +0 -1
- package/lib/commonjs/core/mixins/OxyServices.language.js +0 -124
- package/lib/commonjs/core/mixins/OxyServices.language.js.map +0 -1
- package/lib/commonjs/core/mixins/OxyServices.location.js +0 -55
- package/lib/commonjs/core/mixins/OxyServices.location.js.map +0 -1
- package/lib/commonjs/core/mixins/OxyServices.payment.js +0 -168
- package/lib/commonjs/core/mixins/OxyServices.payment.js.map +0 -1
- package/lib/commonjs/core/mixins/OxyServices.popup.js +0 -393
- package/lib/commonjs/core/mixins/OxyServices.popup.js.map +0 -1
- package/lib/commonjs/core/mixins/OxyServices.privacy.js +0 -174
- package/lib/commonjs/core/mixins/OxyServices.privacy.js.map +0 -1
- package/lib/commonjs/core/mixins/OxyServices.redirect.js +0 -378
- package/lib/commonjs/core/mixins/OxyServices.redirect.js.map +0 -1
- package/lib/commonjs/core/mixins/OxyServices.security.js +0 -96
- package/lib/commonjs/core/mixins/OxyServices.security.js.map +0 -1
- package/lib/commonjs/core/mixins/OxyServices.user.js +0 -393
- package/lib/commonjs/core/mixins/OxyServices.user.js.map +0 -1
- package/lib/commonjs/core/mixins/OxyServices.utility.js +0 -165
- package/lib/commonjs/core/mixins/OxyServices.utility.js.map +0 -1
- package/lib/commonjs/core/mixins/index.js +0 -75
- package/lib/commonjs/core/mixins/index.js.map +0 -1
- package/lib/commonjs/core/mixins/mixinHelpers.js +0 -62
- package/lib/commonjs/core/mixins/mixinHelpers.js.map +0 -1
- package/lib/commonjs/crypto/index.js +0 -34
- package/lib/commonjs/crypto/index.js.map +0 -1
- package/lib/commonjs/crypto/keyManager.js +0 -942
- package/lib/commonjs/crypto/keyManager.js.map +0 -1
- package/lib/commonjs/crypto/polyfill.js +0 -86
- package/lib/commonjs/crypto/polyfill.js.map +0 -1
- package/lib/commonjs/crypto/recoveryPhrase.js +0 -152
- package/lib/commonjs/crypto/recoveryPhrase.js.map +0 -1
- package/lib/commonjs/crypto/signatureService.js +0 -289
- package/lib/commonjs/crypto/signatureService.js.map +0 -1
- package/lib/commonjs/i18n/index.js +0 -76
- package/lib/commonjs/i18n/index.js.map +0 -1
- package/lib/commonjs/i18n/locales/ar-SA.json +0 -120
- package/lib/commonjs/i18n/locales/ca-ES.json +0 -120
- package/lib/commonjs/i18n/locales/de-DE.json +0 -120
- package/lib/commonjs/i18n/locales/en-US.json +0 -956
- package/lib/commonjs/i18n/locales/es-ES.json +0 -944
- package/lib/commonjs/i18n/locales/fr-FR.json +0 -120
- package/lib/commonjs/i18n/locales/it-IT.json +0 -120
- package/lib/commonjs/i18n/locales/ja-JP.json +0 -119
- package/lib/commonjs/i18n/locales/ko-KR.json +0 -120
- package/lib/commonjs/i18n/locales/pt-PT.json +0 -120
- package/lib/commonjs/i18n/locales/zh-CN.json +0 -120
- package/lib/commonjs/models/interfaces.js +0 -61
- package/lib/commonjs/models/interfaces.js.map +0 -1
- package/lib/commonjs/models/session.js +0 -2
- package/lib/commonjs/models/session.js.map +0 -1
- package/lib/commonjs/node/index.js +0 -59
- package/lib/commonjs/node/index.js.map +0 -1
- package/lib/commonjs/shared/index.js +0 -227
- package/lib/commonjs/shared/index.js.map +0 -1
- package/lib/commonjs/shared/utils/colorUtils.js +0 -161
- package/lib/commonjs/shared/utils/colorUtils.js.map +0 -1
- package/lib/commonjs/shared/utils/debugUtils.js +0 -84
- package/lib/commonjs/shared/utils/debugUtils.js.map +0 -1
- package/lib/commonjs/shared/utils/errorUtils.js +0 -190
- package/lib/commonjs/shared/utils/errorUtils.js.map +0 -1
- package/lib/commonjs/shared/utils/index.js +0 -196
- package/lib/commonjs/shared/utils/index.js.map +0 -1
- package/lib/commonjs/shared/utils/networkUtils.js +0 -213
- package/lib/commonjs/shared/utils/networkUtils.js.map +0 -1
- package/lib/commonjs/shared/utils/themeUtils.js +0 -118
- package/lib/commonjs/shared/utils/themeUtils.js.map +0 -1
- package/lib/commonjs/utils/apiUtils.js +0 -79
- package/lib/commonjs/utils/apiUtils.js.map +0 -1
- package/lib/commonjs/utils/asyncUtils.js +0 -207
- package/lib/commonjs/utils/asyncUtils.js.map +0 -1
- package/lib/commonjs/utils/cache.js +0 -259
- package/lib/commonjs/utils/cache.js.map +0 -1
- package/lib/commonjs/utils/deviceManager.js +0 -177
- package/lib/commonjs/utils/deviceManager.js.map +0 -1
- package/lib/commonjs/utils/errorUtils.js +0 -168
- package/lib/commonjs/utils/errorUtils.js.map +0 -1
- package/lib/commonjs/utils/index.js +0 -106
- package/lib/commonjs/utils/index.js.map +0 -1
- package/lib/commonjs/utils/languageUtils.js +0 -159
- package/lib/commonjs/utils/languageUtils.js.map +0 -1
- package/lib/commonjs/utils/loggerUtils.js +0 -160
- package/lib/commonjs/utils/loggerUtils.js.map +0 -1
- package/lib/commonjs/utils/platform.js +0 -129
- package/lib/commonjs/utils/platform.js.map +0 -1
- package/lib/commonjs/utils/platformInit.js +0 -13
- package/lib/commonjs/utils/platformInit.js.map +0 -1
- package/lib/commonjs/utils/platformInit.native.js +0 -16
- package/lib/commonjs/utils/platformInit.native.js.map +0 -1
- package/lib/commonjs/utils/requestUtils.js +0 -218
- package/lib/commonjs/utils/requestUtils.js.map +0 -1
- package/lib/commonjs/utils/sessionUtils.js +0 -191
- package/lib/commonjs/utils/sessionUtils.js.map +0 -1
- package/lib/commonjs/utils/validationUtils.js +0 -191
- package/lib/commonjs/utils/validationUtils.js.map +0 -1
- package/lib/commonjs/web/WebOxyContext.js +0 -384
- package/lib/commonjs/web/WebOxyContext.js.map +0 -1
- package/lib/commonjs/web/index.js +0 -319
- package/lib/commonjs/web/index.js.map +0 -1
- package/lib/commonjs/web.js +0 -659
- package/lib/commonjs/web.js.map +0 -1
- package/lib/module/constants/version.js +0 -21
- package/lib/module/constants/version.js.map +0 -1
- package/lib/module/core/AuthManager.js +0 -399
- package/lib/module/core/AuthManager.js.map +0 -1
- package/lib/module/core/CrossDomainAuth.js +0 -271
- package/lib/module/core/CrossDomainAuth.js.map +0 -1
- package/lib/module/core/HttpService.js +0 -692
- package/lib/module/core/HttpService.js.map +0 -1
- package/lib/module/core/OxyServices.base.js +0 -285
- package/lib/module/core/OxyServices.base.js.map +0 -1
- package/lib/module/core/OxyServices.errors.js +0 -20
- package/lib/module/core/OxyServices.errors.js.map +0 -1
- package/lib/module/core/OxyServices.js +0 -134
- package/lib/module/core/OxyServices.js.map +0 -1
- package/lib/module/core/index.js +0 -31
- package/lib/module/core/index.js.map +0 -1
- package/lib/module/core/mixins/OxyServices.analytics.js +0 -56
- package/lib/module/core/mixins/OxyServices.analytics.js.map +0 -1
- package/lib/module/core/mixins/OxyServices.assets.js +0 -386
- package/lib/module/core/mixins/OxyServices.assets.js.map +0 -1
- package/lib/module/core/mixins/OxyServices.auth.js +0 -292
- package/lib/module/core/mixins/OxyServices.auth.js.map +0 -1
- package/lib/module/core/mixins/OxyServices.developer.js +0 -111
- package/lib/module/core/mixins/OxyServices.developer.js.map +0 -1
- package/lib/module/core/mixins/OxyServices.devices.js +0 -129
- package/lib/module/core/mixins/OxyServices.devices.js.map +0 -1
- package/lib/module/core/mixins/OxyServices.features.js +0 -369
- package/lib/module/core/mixins/OxyServices.features.js.map +0 -1
- package/lib/module/core/mixins/OxyServices.fedcm.js +0 -461
- package/lib/module/core/mixins/OxyServices.fedcm.js.map +0 -1
- package/lib/module/core/mixins/OxyServices.karma.js +0 -113
- package/lib/module/core/mixins/OxyServices.karma.js.map +0 -1
- package/lib/module/core/mixins/OxyServices.language.js +0 -120
- package/lib/module/core/mixins/OxyServices.language.js.map +0 -1
- package/lib/module/core/mixins/OxyServices.location.js +0 -51
- package/lib/module/core/mixins/OxyServices.location.js.map +0 -1
- package/lib/module/core/mixins/OxyServices.payment.js +0 -164
- package/lib/module/core/mixins/OxyServices.payment.js.map +0 -1
- package/lib/module/core/mixins/OxyServices.popup.js +0 -390
- package/lib/module/core/mixins/OxyServices.popup.js.map +0 -1
- package/lib/module/core/mixins/OxyServices.privacy.js +0 -170
- package/lib/module/core/mixins/OxyServices.privacy.js.map +0 -1
- package/lib/module/core/mixins/OxyServices.redirect.js +0 -375
- package/lib/module/core/mixins/OxyServices.redirect.js.map +0 -1
- package/lib/module/core/mixins/OxyServices.security.js +0 -92
- package/lib/module/core/mixins/OxyServices.security.js.map +0 -1
- package/lib/module/core/mixins/OxyServices.user.js +0 -389
- package/lib/module/core/mixins/OxyServices.user.js.map +0 -1
- package/lib/module/core/mixins/OxyServices.utility.js +0 -160
- package/lib/module/core/mixins/OxyServices.utility.js.map +0 -1
- package/lib/module/core/mixins/index.js +0 -72
- package/lib/module/core/mixins/index.js.map +0 -1
- package/lib/module/core/mixins/mixinHelpers.js +0 -56
- package/lib/module/core/mixins/mixinHelpers.js.map +0 -1
- package/lib/module/crypto/index.js +0 -18
- package/lib/module/crypto/index.js.map +0 -1
- package/lib/module/crypto/keyManager.js +0 -939
- package/lib/module/crypto/keyManager.js.map +0 -1
- package/lib/module/crypto/polyfill.js +0 -78
- package/lib/module/crypto/polyfill.js.map +0 -1
- package/lib/module/crypto/recoveryPhrase.js +0 -147
- package/lib/module/crypto/recoveryPhrase.js.map +0 -1
- package/lib/module/crypto/signatureService.js +0 -286
- package/lib/module/crypto/signatureService.js.map +0 -1
- package/lib/module/i18n/index.js +0 -71
- package/lib/module/i18n/index.js.map +0 -1
- package/lib/module/i18n/locales/ar-SA.json +0 -120
- package/lib/module/i18n/locales/ca-ES.json +0 -120
- package/lib/module/i18n/locales/de-DE.json +0 -120
- package/lib/module/i18n/locales/en-US.json +0 -956
- package/lib/module/i18n/locales/es-ES.json +0 -944
- package/lib/module/i18n/locales/fr-FR.json +0 -120
- package/lib/module/i18n/locales/it-IT.json +0 -120
- package/lib/module/i18n/locales/ja-JP.json +0 -119
- package/lib/module/i18n/locales/ko-KR.json +0 -120
- package/lib/module/i18n/locales/pt-PT.json +0 -120
- package/lib/module/i18n/locales/zh-CN.json +0 -120
- package/lib/module/models/interfaces.js +0 -57
- package/lib/module/models/interfaces.js.map +0 -1
- package/lib/module/models/session.js +0 -2
- package/lib/module/models/session.js.map +0 -1
- package/lib/module/node/index.js +0 -20
- package/lib/module/node/index.js.map +0 -1
- package/lib/module/shared/index.js +0 -37
- package/lib/module/shared/index.js.map +0 -1
- package/lib/module/shared/utils/colorUtils.js +0 -150
- package/lib/module/shared/utils/colorUtils.js.map +0 -1
- package/lib/module/shared/utils/debugUtils.js +0 -75
- package/lib/module/shared/utils/debugUtils.js.map +0 -1
- package/lib/module/shared/utils/errorUtils.js +0 -176
- package/lib/module/shared/utils/errorUtils.js.map +0 -1
- package/lib/module/shared/utils/index.js +0 -21
- package/lib/module/shared/utils/index.js.map +0 -1
- package/lib/module/shared/utils/networkUtils.js +0 -202
- package/lib/module/shared/utils/networkUtils.js.map +0 -1
- package/lib/module/shared/utils/themeUtils.js +0 -109
- package/lib/module/shared/utils/themeUtils.js.map +0 -1
- package/lib/module/utils/apiUtils.js +0 -72
- package/lib/module/utils/apiUtils.js.map +0 -1
- package/lib/module/utils/asyncUtils.js +0 -192
- package/lib/module/utils/asyncUtils.js.map +0 -1
- package/lib/module/utils/cache.js +0 -250
- package/lib/module/utils/cache.js.map +0 -1
- package/lib/module/utils/deviceManager.js +0 -171
- package/lib/module/utils/deviceManager.js.map +0 -1
- package/lib/module/utils/errorUtils.js +0 -160
- package/lib/module/utils/errorUtils.js.map +0 -1
- package/lib/module/utils/index.js +0 -11
- package/lib/module/utils/index.js.map +0 -1
- package/lib/module/utils/languageUtils.js +0 -151
- package/lib/module/utils/languageUtils.js.map +0 -1
- package/lib/module/utils/loggerUtils.js +0 -149
- package/lib/module/utils/loggerUtils.js.map +0 -1
- package/lib/module/utils/platform.js +0 -118
- package/lib/module/utils/platform.js.map +0 -1
- package/lib/module/utils/platformInit.js +0 -13
- package/lib/module/utils/platformInit.js.map +0 -1
- package/lib/module/utils/platformInit.native.js +0 -16
- package/lib/module/utils/platformInit.native.js.map +0 -1
- package/lib/module/utils/requestUtils.js +0 -212
- package/lib/module/utils/requestUtils.js.map +0 -1
- package/lib/module/utils/sessionUtils.js +0 -180
- package/lib/module/utils/sessionUtils.js.map +0 -1
- package/lib/module/utils/validationUtils.js +0 -170
- package/lib/module/utils/validationUtils.js.map +0 -1
- package/lib/module/web/WebOxyContext.js +0 -377
- package/lib/module/web/WebOxyContext.js.map +0 -1
- package/lib/module/web/index.js +0 -72
- package/lib/module/web/index.js.map +0 -1
- package/lib/module/web.js +0 -76
- package/lib/module/web.js.map +0 -1
- package/lib/typescript/commonjs/constants/version.d.ts +0 -14
- package/lib/typescript/commonjs/constants/version.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/AuthManager.d.ts +0 -144
- package/lib/typescript/commonjs/core/AuthManager.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/CrossDomainAuth.d.ts +0 -161
- package/lib/typescript/commonjs/core/CrossDomainAuth.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/HttpService.d.ts +0 -164
- package/lib/typescript/commonjs/core/HttpService.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/OxyServices.base.d.ts +0 -127
- package/lib/typescript/commonjs/core/OxyServices.base.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/OxyServices.d.ts +0 -82
- package/lib/typescript/commonjs/core/OxyServices.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/OxyServices.errors.d.ts +0 -12
- package/lib/typescript/commonjs/core/OxyServices.errors.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/index.d.ts +0 -21
- package/lib/typescript/commonjs/core/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/mixins/OxyServices.analytics.d.ts +0 -67
- package/lib/typescript/commonjs/core/mixins/OxyServices.analytics.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/mixins/OxyServices.assets.d.ts +0 -136
- package/lib/typescript/commonjs/core/mixins/OxyServices.assets.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/mixins/OxyServices.auth.d.ts +0 -187
- package/lib/typescript/commonjs/core/mixins/OxyServices.auth.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/mixins/OxyServices.developer.d.ts +0 -100
- package/lib/typescript/commonjs/core/mixins/OxyServices.developer.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/mixins/OxyServices.devices.d.ts +0 -97
- package/lib/typescript/commonjs/core/mixins/OxyServices.devices.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/mixins/OxyServices.features.d.ts +0 -229
- package/lib/typescript/commonjs/core/mixins/OxyServices.features.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/mixins/OxyServices.fedcm.d.ts +0 -201
- package/lib/typescript/commonjs/core/mixins/OxyServices.fedcm.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/mixins/OxyServices.karma.d.ts +0 -86
- package/lib/typescript/commonjs/core/mixins/OxyServices.karma.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/mixins/OxyServices.language.d.ts +0 -82
- package/lib/typescript/commonjs/core/mixins/OxyServices.language.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/mixins/OxyServices.location.d.ts +0 -65
- package/lib/typescript/commonjs/core/mixins/OxyServices.location.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/mixins/OxyServices.payment.d.ts +0 -112
- package/lib/typescript/commonjs/core/mixins/OxyServices.payment.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/mixins/OxyServices.popup.d.ts +0 -206
- package/lib/typescript/commonjs/core/mixins/OxyServices.popup.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/mixins/OxyServices.privacy.d.ts +0 -123
- package/lib/typescript/commonjs/core/mixins/OxyServices.privacy.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/mixins/OxyServices.redirect.d.ts +0 -246
- package/lib/typescript/commonjs/core/mixins/OxyServices.redirect.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/mixins/OxyServices.security.d.ts +0 -79
- package/lib/typescript/commonjs/core/mixins/OxyServices.security.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/mixins/OxyServices.user.d.ts +0 -185
- package/lib/typescript/commonjs/core/mixins/OxyServices.user.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/mixins/OxyServices.utility.d.ts +0 -94
- package/lib/typescript/commonjs/core/mixins/OxyServices.utility.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/mixins/index.d.ts +0 -31
- package/lib/typescript/commonjs/core/mixins/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/mixins/mixinHelpers.d.ts +0 -32
- package/lib/typescript/commonjs/core/mixins/mixinHelpers.d.ts.map +0 -1
- package/lib/typescript/commonjs/crypto/index.d.ts +0 -12
- package/lib/typescript/commonjs/crypto/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/crypto/keyManager.d.ts +0 -190
- package/lib/typescript/commonjs/crypto/keyManager.d.ts.map +0 -1
- package/lib/typescript/commonjs/crypto/polyfill.d.ts +0 -13
- package/lib/typescript/commonjs/crypto/polyfill.d.ts.map +0 -1
- package/lib/typescript/commonjs/crypto/recoveryPhrase.d.ts +0 -59
- package/lib/typescript/commonjs/crypto/recoveryPhrase.d.ts.map +0 -1
- package/lib/typescript/commonjs/crypto/signatureService.d.ts +0 -87
- package/lib/typescript/commonjs/crypto/signatureService.d.ts.map +0 -1
- package/lib/typescript/commonjs/i18n/index.d.ts +0 -4
- package/lib/typescript/commonjs/i18n/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/models/interfaces.d.ts +0 -416
- package/lib/typescript/commonjs/models/interfaces.d.ts.map +0 -1
- package/lib/typescript/commonjs/models/session.d.ts +0 -28
- package/lib/typescript/commonjs/models/session.d.ts.map +0 -1
- package/lib/typescript/commonjs/node/index.d.ts +0 -10
- package/lib/typescript/commonjs/node/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/shared/index.d.ts +0 -29
- package/lib/typescript/commonjs/shared/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/shared/utils/colorUtils.d.ts +0 -105
- package/lib/typescript/commonjs/shared/utils/colorUtils.d.ts.map +0 -1
- package/lib/typescript/commonjs/shared/utils/debugUtils.d.ts +0 -49
- package/lib/typescript/commonjs/shared/utils/debugUtils.d.ts.map +0 -1
- package/lib/typescript/commonjs/shared/utils/errorUtils.d.ts +0 -98
- package/lib/typescript/commonjs/shared/utils/errorUtils.d.ts.map +0 -1
- package/lib/typescript/commonjs/shared/utils/index.d.ts +0 -14
- package/lib/typescript/commonjs/shared/utils/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/shared/utils/networkUtils.d.ts +0 -140
- package/lib/typescript/commonjs/shared/utils/networkUtils.d.ts.map +0 -1
- package/lib/typescript/commonjs/shared/utils/themeUtils.d.ts +0 -91
- package/lib/typescript/commonjs/shared/utils/themeUtils.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/apiUtils.d.ts +0 -54
- package/lib/typescript/commonjs/utils/apiUtils.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/asyncUtils.d.ts +0 -59
- package/lib/typescript/commonjs/utils/asyncUtils.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/cache.d.ts +0 -128
- package/lib/typescript/commonjs/utils/cache.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/deviceManager.d.ts +0 -66
- package/lib/typescript/commonjs/utils/deviceManager.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/errorUtils.d.ts +0 -47
- package/lib/typescript/commonjs/utils/errorUtils.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/index.d.ts +0 -7
- package/lib/typescript/commonjs/utils/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/languageUtils.d.ts +0 -38
- package/lib/typescript/commonjs/utils/languageUtils.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/loggerUtils.d.ts +0 -49
- package/lib/typescript/commonjs/utils/loggerUtils.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/platform.d.ts +0 -41
- package/lib/typescript/commonjs/utils/platform.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/platformInit.d.ts +0 -10
- package/lib/typescript/commonjs/utils/platformInit.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/platformInit.native.d.ts +0 -2
- package/lib/typescript/commonjs/utils/platformInit.native.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/requestUtils.d.ts +0 -124
- package/lib/typescript/commonjs/utils/requestUtils.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/sessionUtils.d.ts +0 -55
- package/lib/typescript/commonjs/utils/sessionUtils.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/validationUtils.d.ts +0 -86
- package/lib/typescript/commonjs/utils/validationUtils.d.ts.map +0 -1
- package/lib/typescript/commonjs/web/WebOxyContext.d.ts +0 -152
- package/lib/typescript/commonjs/web/WebOxyContext.d.ts.map +0 -1
- package/lib/typescript/commonjs/web/index.d.ts +0 -53
- package/lib/typescript/commonjs/web/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/web.d.ts +0 -54
- package/lib/typescript/commonjs/web.d.ts.map +0 -1
- package/lib/typescript/module/constants/version.d.ts +0 -14
- package/lib/typescript/module/constants/version.d.ts.map +0 -1
- package/lib/typescript/module/core/AuthManager.d.ts +0 -144
- package/lib/typescript/module/core/AuthManager.d.ts.map +0 -1
- package/lib/typescript/module/core/CrossDomainAuth.d.ts +0 -161
- package/lib/typescript/module/core/CrossDomainAuth.d.ts.map +0 -1
- package/lib/typescript/module/core/HttpService.d.ts +0 -164
- package/lib/typescript/module/core/HttpService.d.ts.map +0 -1
- package/lib/typescript/module/core/OxyServices.base.d.ts +0 -127
- package/lib/typescript/module/core/OxyServices.base.d.ts.map +0 -1
- package/lib/typescript/module/core/OxyServices.d.ts +0 -82
- package/lib/typescript/module/core/OxyServices.d.ts.map +0 -1
- package/lib/typescript/module/core/OxyServices.errors.d.ts +0 -12
- package/lib/typescript/module/core/OxyServices.errors.d.ts.map +0 -1
- package/lib/typescript/module/core/index.d.ts +0 -21
- package/lib/typescript/module/core/index.d.ts.map +0 -1
- package/lib/typescript/module/core/mixins/OxyServices.analytics.d.ts +0 -67
- package/lib/typescript/module/core/mixins/OxyServices.analytics.d.ts.map +0 -1
- package/lib/typescript/module/core/mixins/OxyServices.assets.d.ts +0 -136
- package/lib/typescript/module/core/mixins/OxyServices.assets.d.ts.map +0 -1
- package/lib/typescript/module/core/mixins/OxyServices.auth.d.ts +0 -187
- package/lib/typescript/module/core/mixins/OxyServices.auth.d.ts.map +0 -1
- package/lib/typescript/module/core/mixins/OxyServices.developer.d.ts +0 -100
- package/lib/typescript/module/core/mixins/OxyServices.developer.d.ts.map +0 -1
- package/lib/typescript/module/core/mixins/OxyServices.devices.d.ts +0 -97
- package/lib/typescript/module/core/mixins/OxyServices.devices.d.ts.map +0 -1
- package/lib/typescript/module/core/mixins/OxyServices.features.d.ts +0 -229
- package/lib/typescript/module/core/mixins/OxyServices.features.d.ts.map +0 -1
- package/lib/typescript/module/core/mixins/OxyServices.fedcm.d.ts +0 -201
- package/lib/typescript/module/core/mixins/OxyServices.fedcm.d.ts.map +0 -1
- package/lib/typescript/module/core/mixins/OxyServices.karma.d.ts +0 -86
- package/lib/typescript/module/core/mixins/OxyServices.karma.d.ts.map +0 -1
- package/lib/typescript/module/core/mixins/OxyServices.language.d.ts +0 -82
- package/lib/typescript/module/core/mixins/OxyServices.language.d.ts.map +0 -1
- package/lib/typescript/module/core/mixins/OxyServices.location.d.ts +0 -65
- package/lib/typescript/module/core/mixins/OxyServices.location.d.ts.map +0 -1
- package/lib/typescript/module/core/mixins/OxyServices.payment.d.ts +0 -112
- package/lib/typescript/module/core/mixins/OxyServices.payment.d.ts.map +0 -1
- package/lib/typescript/module/core/mixins/OxyServices.popup.d.ts +0 -206
- package/lib/typescript/module/core/mixins/OxyServices.popup.d.ts.map +0 -1
- package/lib/typescript/module/core/mixins/OxyServices.privacy.d.ts +0 -123
- package/lib/typescript/module/core/mixins/OxyServices.privacy.d.ts.map +0 -1
- package/lib/typescript/module/core/mixins/OxyServices.redirect.d.ts +0 -246
- package/lib/typescript/module/core/mixins/OxyServices.redirect.d.ts.map +0 -1
- package/lib/typescript/module/core/mixins/OxyServices.security.d.ts +0 -79
- package/lib/typescript/module/core/mixins/OxyServices.security.d.ts.map +0 -1
- package/lib/typescript/module/core/mixins/OxyServices.user.d.ts +0 -185
- package/lib/typescript/module/core/mixins/OxyServices.user.d.ts.map +0 -1
- package/lib/typescript/module/core/mixins/OxyServices.utility.d.ts +0 -94
- package/lib/typescript/module/core/mixins/OxyServices.utility.d.ts.map +0 -1
- package/lib/typescript/module/core/mixins/index.d.ts +0 -31
- package/lib/typescript/module/core/mixins/index.d.ts.map +0 -1
- package/lib/typescript/module/core/mixins/mixinHelpers.d.ts +0 -32
- package/lib/typescript/module/core/mixins/mixinHelpers.d.ts.map +0 -1
- package/lib/typescript/module/crypto/index.d.ts +0 -12
- package/lib/typescript/module/crypto/index.d.ts.map +0 -1
- package/lib/typescript/module/crypto/keyManager.d.ts +0 -190
- package/lib/typescript/module/crypto/keyManager.d.ts.map +0 -1
- package/lib/typescript/module/crypto/polyfill.d.ts +0 -13
- package/lib/typescript/module/crypto/polyfill.d.ts.map +0 -1
- package/lib/typescript/module/crypto/recoveryPhrase.d.ts +0 -59
- package/lib/typescript/module/crypto/recoveryPhrase.d.ts.map +0 -1
- package/lib/typescript/module/crypto/signatureService.d.ts +0 -87
- package/lib/typescript/module/crypto/signatureService.d.ts.map +0 -1
- package/lib/typescript/module/i18n/index.d.ts +0 -4
- package/lib/typescript/module/i18n/index.d.ts.map +0 -1
- package/lib/typescript/module/models/interfaces.d.ts +0 -416
- package/lib/typescript/module/models/interfaces.d.ts.map +0 -1
- package/lib/typescript/module/models/session.d.ts +0 -28
- package/lib/typescript/module/models/session.d.ts.map +0 -1
- package/lib/typescript/module/node/index.d.ts +0 -10
- package/lib/typescript/module/node/index.d.ts.map +0 -1
- package/lib/typescript/module/shared/index.d.ts +0 -29
- package/lib/typescript/module/shared/index.d.ts.map +0 -1
- package/lib/typescript/module/shared/utils/colorUtils.d.ts +0 -105
- package/lib/typescript/module/shared/utils/colorUtils.d.ts.map +0 -1
- package/lib/typescript/module/shared/utils/debugUtils.d.ts +0 -49
- package/lib/typescript/module/shared/utils/debugUtils.d.ts.map +0 -1
- package/lib/typescript/module/shared/utils/errorUtils.d.ts +0 -98
- package/lib/typescript/module/shared/utils/errorUtils.d.ts.map +0 -1
- package/lib/typescript/module/shared/utils/index.d.ts +0 -14
- package/lib/typescript/module/shared/utils/index.d.ts.map +0 -1
- package/lib/typescript/module/shared/utils/networkUtils.d.ts +0 -140
- package/lib/typescript/module/shared/utils/networkUtils.d.ts.map +0 -1
- package/lib/typescript/module/shared/utils/themeUtils.d.ts +0 -91
- package/lib/typescript/module/shared/utils/themeUtils.d.ts.map +0 -1
- package/lib/typescript/module/utils/apiUtils.d.ts +0 -54
- package/lib/typescript/module/utils/apiUtils.d.ts.map +0 -1
- package/lib/typescript/module/utils/asyncUtils.d.ts +0 -59
- package/lib/typescript/module/utils/asyncUtils.d.ts.map +0 -1
- package/lib/typescript/module/utils/cache.d.ts +0 -128
- package/lib/typescript/module/utils/cache.d.ts.map +0 -1
- package/lib/typescript/module/utils/deviceManager.d.ts +0 -66
- package/lib/typescript/module/utils/deviceManager.d.ts.map +0 -1
- package/lib/typescript/module/utils/errorUtils.d.ts +0 -47
- package/lib/typescript/module/utils/errorUtils.d.ts.map +0 -1
- package/lib/typescript/module/utils/index.d.ts +0 -7
- package/lib/typescript/module/utils/index.d.ts.map +0 -1
- package/lib/typescript/module/utils/languageUtils.d.ts +0 -38
- package/lib/typescript/module/utils/languageUtils.d.ts.map +0 -1
- package/lib/typescript/module/utils/loggerUtils.d.ts +0 -49
- package/lib/typescript/module/utils/loggerUtils.d.ts.map +0 -1
- package/lib/typescript/module/utils/platform.d.ts +0 -41
- package/lib/typescript/module/utils/platform.d.ts.map +0 -1
- package/lib/typescript/module/utils/platformInit.d.ts +0 -10
- package/lib/typescript/module/utils/platformInit.d.ts.map +0 -1
- package/lib/typescript/module/utils/platformInit.native.d.ts +0 -2
- package/lib/typescript/module/utils/platformInit.native.d.ts.map +0 -1
- package/lib/typescript/module/utils/requestUtils.d.ts +0 -124
- package/lib/typescript/module/utils/requestUtils.d.ts.map +0 -1
- package/lib/typescript/module/utils/sessionUtils.d.ts +0 -55
- package/lib/typescript/module/utils/sessionUtils.d.ts.map +0 -1
- package/lib/typescript/module/utils/validationUtils.d.ts +0 -86
- package/lib/typescript/module/utils/validationUtils.d.ts.map +0 -1
- package/lib/typescript/module/web/WebOxyContext.d.ts +0 -152
- package/lib/typescript/module/web/WebOxyContext.d.ts.map +0 -1
- package/lib/typescript/module/web/index.d.ts +0 -53
- package/lib/typescript/module/web/index.d.ts.map +0 -1
- package/lib/typescript/module/web.d.ts +0 -54
- package/lib/typescript/module/web.d.ts.map +0 -1
- package/lib/typescript/types/bip39.d.ts +0 -32
- package/lib/typescript/types/buffer.d.ts +0 -97
- package/lib/typescript/types/color.d.ts +0 -20
- package/lib/typescript/types/elliptic.d.ts +0 -62
- package/src/constants/version.ts +0 -15
- package/src/core/AuthManager.ts +0 -436
- package/src/core/CrossDomainAuth.ts +0 -307
- package/src/core/HttpService.ts +0 -752
- package/src/core/OxyServices.base.ts +0 -334
- package/src/core/OxyServices.errors.ts +0 -26
- package/src/core/OxyServices.ts +0 -129
- package/src/core/index.ts +0 -42
- package/src/core/mixins/OxyServices.analytics.ts +0 -53
- package/src/core/mixins/OxyServices.assets.ts +0 -412
- package/src/core/mixins/OxyServices.auth.ts +0 -358
- package/src/core/mixins/OxyServices.developer.ts +0 -114
- package/src/core/mixins/OxyServices.devices.ts +0 -119
- package/src/core/mixins/OxyServices.features.ts +0 -428
- package/src/core/mixins/OxyServices.fedcm.ts +0 -494
- package/src/core/mixins/OxyServices.karma.ts +0 -111
- package/src/core/mixins/OxyServices.language.ts +0 -127
- package/src/core/mixins/OxyServices.location.ts +0 -46
- package/src/core/mixins/OxyServices.payment.ts +0 -163
- package/src/core/mixins/OxyServices.popup.ts +0 -443
- package/src/core/mixins/OxyServices.privacy.ts +0 -182
- package/src/core/mixins/OxyServices.redirect.ts +0 -397
- package/src/core/mixins/OxyServices.security.ts +0 -103
- package/src/core/mixins/OxyServices.user.ts +0 -392
- package/src/core/mixins/OxyServices.utility.ts +0 -191
- package/src/core/mixins/index.ts +0 -91
- package/src/core/mixins/mixinHelpers.ts +0 -69
- package/src/crypto/index.ts +0 -25
- package/src/crypto/keyManager.ts +0 -962
- package/src/crypto/polyfill.ts +0 -81
- package/src/crypto/recoveryPhrase.ts +0 -166
- package/src/crypto/signatureService.ts +0 -323
- package/src/i18n/index.ts +0 -75
- package/src/i18n/locales/ar-SA.json +0 -120
- package/src/i18n/locales/ca-ES.json +0 -120
- package/src/i18n/locales/de-DE.json +0 -120
- package/src/i18n/locales/en-US.json +0 -956
- package/src/i18n/locales/es-ES.json +0 -944
- package/src/i18n/locales/fr-FR.json +0 -120
- package/src/i18n/locales/it-IT.json +0 -120
- package/src/i18n/locales/ja-JP.json +0 -119
- package/src/i18n/locales/ko-KR.json +0 -120
- package/src/i18n/locales/pt-PT.json +0 -120
- package/src/i18n/locales/zh-CN.json +0 -120
- package/src/models/interfaces.ts +0 -511
- package/src/models/session.ts +0 -30
- package/src/node/index.ts +0 -17
- package/src/shared/index.ts +0 -82
- package/src/shared/utils/colorUtils.ts +0 -155
- package/src/shared/utils/debugUtils.ts +0 -73
- package/src/shared/utils/errorUtils.ts +0 -181
- package/src/shared/utils/index.ts +0 -59
- package/src/shared/utils/networkUtils.ts +0 -248
- package/src/shared/utils/themeUtils.ts +0 -115
- package/src/types/bip39.d.ts +0 -32
- package/src/types/buffer.d.ts +0 -97
- package/src/types/color.d.ts +0 -20
- package/src/types/elliptic.d.ts +0 -62
- package/src/utils/__tests__/validationUtils.test.ts +0 -236
- package/src/utils/apiUtils.ts +0 -88
- package/src/utils/asyncUtils.ts +0 -252
- package/src/utils/cache.ts +0 -264
- package/src/utils/deviceManager.ts +0 -198
- package/src/utils/errorUtils.ts +0 -216
- package/src/utils/index.ts +0 -21
- package/src/utils/languageUtils.ts +0 -174
- package/src/utils/loggerUtils.ts +0 -153
- package/src/utils/platform.ts +0 -117
- package/src/utils/platformInit.native.ts +0 -13
- package/src/utils/platformInit.ts +0 -11
- package/src/utils/requestUtils.ts +0 -237
- package/src/utils/sessionUtils.ts +0 -206
- package/src/utils/validationUtils.ts +0 -174
- package/src/web/WebOxyContext.tsx +0 -470
- package/src/web/index.ts +0 -157
- package/src/web.ts +0 -230
|
@@ -1,692 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Unified HTTP Service
|
|
5
|
-
*
|
|
6
|
-
* Consolidates HttpClient + RequestManager into a single efficient class.
|
|
7
|
-
* Uses native fetch instead of axios for smaller bundle size.
|
|
8
|
-
*
|
|
9
|
-
* Handles:
|
|
10
|
-
* - Authentication (token management, auto-refresh)
|
|
11
|
-
* - Caching (TTL-based)
|
|
12
|
-
* - Deduplication (concurrent requests)
|
|
13
|
-
* - Retry logic
|
|
14
|
-
* - Error handling
|
|
15
|
-
* - Request queuing
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
import { TTLCache, registerCacheForCleanup } from "../utils/cache.js";
|
|
19
|
-
import { RequestDeduplicator, RequestQueue, SimpleLogger } from "../utils/requestUtils.js";
|
|
20
|
-
import { retryAsync } from "../utils/asyncUtils.js";
|
|
21
|
-
import { handleHttpError } from "../utils/errorUtils.js";
|
|
22
|
-
import { jwtDecode } from 'jwt-decode';
|
|
23
|
-
import { isNative, getPlatformOS } from "../utils/platform.js";
|
|
24
|
-
/**
|
|
25
|
-
* Check if we're running in a native app environment (React Native, not web)
|
|
26
|
-
* This is used to determine CSRF handling mode
|
|
27
|
-
*/
|
|
28
|
-
const isNativeApp = isNative();
|
|
29
|
-
/**
|
|
30
|
-
* Token store for authentication (singleton)
|
|
31
|
-
*/
|
|
32
|
-
class TokenStore {
|
|
33
|
-
accessToken = null;
|
|
34
|
-
refreshToken = null;
|
|
35
|
-
csrfToken = null;
|
|
36
|
-
csrfTokenFetchPromise = null;
|
|
37
|
-
constructor() {}
|
|
38
|
-
static getInstance() {
|
|
39
|
-
if (!TokenStore.instance) {
|
|
40
|
-
TokenStore.instance = new TokenStore();
|
|
41
|
-
}
|
|
42
|
-
return TokenStore.instance;
|
|
43
|
-
}
|
|
44
|
-
setTokens(accessToken, refreshToken = '') {
|
|
45
|
-
this.accessToken = accessToken;
|
|
46
|
-
this.refreshToken = refreshToken;
|
|
47
|
-
}
|
|
48
|
-
getAccessToken() {
|
|
49
|
-
return this.accessToken;
|
|
50
|
-
}
|
|
51
|
-
getRefreshToken() {
|
|
52
|
-
return this.refreshToken;
|
|
53
|
-
}
|
|
54
|
-
clearTokens() {
|
|
55
|
-
this.accessToken = null;
|
|
56
|
-
this.refreshToken = null;
|
|
57
|
-
}
|
|
58
|
-
hasAccessToken() {
|
|
59
|
-
return !!this.accessToken;
|
|
60
|
-
}
|
|
61
|
-
setCsrfToken(token) {
|
|
62
|
-
this.csrfToken = token;
|
|
63
|
-
}
|
|
64
|
-
getCsrfToken() {
|
|
65
|
-
return this.csrfToken;
|
|
66
|
-
}
|
|
67
|
-
setCsrfTokenFetchPromise(promise) {
|
|
68
|
-
this.csrfTokenFetchPromise = promise;
|
|
69
|
-
}
|
|
70
|
-
getCsrfTokenFetchPromise() {
|
|
71
|
-
return this.csrfTokenFetchPromise;
|
|
72
|
-
}
|
|
73
|
-
clearCsrfToken() {
|
|
74
|
-
this.csrfToken = null;
|
|
75
|
-
this.csrfTokenFetchPromise = null;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Unified HTTP Service
|
|
81
|
-
*
|
|
82
|
-
* Consolidates HttpClient + RequestManager into a single efficient class.
|
|
83
|
-
* Uses native fetch instead of axios for smaller bundle size.
|
|
84
|
-
*/
|
|
85
|
-
export class HttpService {
|
|
86
|
-
// Performance monitoring
|
|
87
|
-
requestMetrics = {
|
|
88
|
-
totalRequests: 0,
|
|
89
|
-
successfulRequests: 0,
|
|
90
|
-
failedRequests: 0,
|
|
91
|
-
cacheHits: 0,
|
|
92
|
-
cacheMisses: 0,
|
|
93
|
-
averageResponseTime: 0
|
|
94
|
-
};
|
|
95
|
-
constructor(config) {
|
|
96
|
-
this.config = config;
|
|
97
|
-
this.baseURL = config.baseURL;
|
|
98
|
-
this.tokenStore = TokenStore.getInstance();
|
|
99
|
-
this.logger = new SimpleLogger(config.enableLogging || false, config.logLevel || 'error', 'HttpService');
|
|
100
|
-
|
|
101
|
-
// Initialize performance infrastructure
|
|
102
|
-
this.cache = new TTLCache(config.cacheTTL || 5 * 60 * 1000);
|
|
103
|
-
registerCacheForCleanup(this.cache);
|
|
104
|
-
this.deduplicator = new RequestDeduplicator();
|
|
105
|
-
this.requestQueue = new RequestQueue(config.maxConcurrentRequests || 10, config.requestQueueSize || 100);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Robust FormData detection that works in browser and Node.js environments
|
|
110
|
-
* Checks multiple conditions to handle different FormData implementations
|
|
111
|
-
*/
|
|
112
|
-
isFormData(data) {
|
|
113
|
-
if (!data) {
|
|
114
|
-
return false;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
// Primary check: instanceof FormData (works in browser and Node.js with proper polyfills)
|
|
118
|
-
if (data instanceof FormData) {
|
|
119
|
-
return true;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// Fallback: Check constructor name (handles Node.js polyfills like form-data)
|
|
123
|
-
if (typeof data === 'object' && data !== null) {
|
|
124
|
-
const constructorName = data.constructor?.name;
|
|
125
|
-
if (constructorName === 'FormData' || constructorName === 'FormDataImpl') {
|
|
126
|
-
return true;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// Additional check: Look for FormData-like methods
|
|
130
|
-
if (typeof data.append === 'function' && typeof data.get === 'function' && typeof data.has === 'function') {
|
|
131
|
-
return true;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
return false;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Main request method - handles everything in one place
|
|
139
|
-
*/
|
|
140
|
-
async request(config) {
|
|
141
|
-
const {
|
|
142
|
-
method,
|
|
143
|
-
url,
|
|
144
|
-
data,
|
|
145
|
-
params,
|
|
146
|
-
timeout = this.config.requestTimeout || 5000,
|
|
147
|
-
signal,
|
|
148
|
-
cache = method === 'GET',
|
|
149
|
-
cacheTTL,
|
|
150
|
-
deduplicate = true,
|
|
151
|
-
retry = this.config.enableRetry !== false,
|
|
152
|
-
maxRetries = this.config.maxRetries || 3
|
|
153
|
-
} = config;
|
|
154
|
-
|
|
155
|
-
// Generate cache key (optimized for large objects)
|
|
156
|
-
const cacheKey = cache ? this.generateCacheKey(method, url, data || params) : null;
|
|
157
|
-
|
|
158
|
-
// Check cache first
|
|
159
|
-
if (cache && cacheKey) {
|
|
160
|
-
const cached = this.cache.get(cacheKey);
|
|
161
|
-
if (cached !== null) {
|
|
162
|
-
this.requestMetrics.cacheHits++;
|
|
163
|
-
this.logger.debug('Cache hit:', url);
|
|
164
|
-
return cached;
|
|
165
|
-
}
|
|
166
|
-
this.requestMetrics.cacheMisses++;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// Request function
|
|
170
|
-
const requestFn = async () => {
|
|
171
|
-
const startTime = Date.now();
|
|
172
|
-
try {
|
|
173
|
-
// Build URL with params
|
|
174
|
-
const fullUrl = this.buildURL(url, params);
|
|
175
|
-
|
|
176
|
-
// Get auth token (with auto-refresh)
|
|
177
|
-
const authHeader = await this.getAuthHeader();
|
|
178
|
-
|
|
179
|
-
// Get CSRF token for state-changing requests
|
|
180
|
-
const isStateChangingMethod = ['POST', 'PUT', 'PATCH', 'DELETE'].includes(method);
|
|
181
|
-
const csrfToken = isStateChangingMethod ? await this.fetchCsrfToken() : null;
|
|
182
|
-
|
|
183
|
-
// Determine if data is FormData using robust detection
|
|
184
|
-
const isFormData = this.isFormData(data);
|
|
185
|
-
|
|
186
|
-
// Make fetch request
|
|
187
|
-
const controller = new AbortController();
|
|
188
|
-
const timeoutId = timeout ? setTimeout(() => controller.abort(), timeout) : null;
|
|
189
|
-
if (signal) {
|
|
190
|
-
signal.addEventListener('abort', () => controller.abort());
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
// Build headers - start with defaults
|
|
194
|
-
const headers = {
|
|
195
|
-
'Accept': 'application/json'
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
// Only set Content-Type for non-FormData requests (FormData sets it automatically with boundary)
|
|
199
|
-
if (!isFormData) {
|
|
200
|
-
headers['Content-Type'] = 'application/json';
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
// Add authorization header if available
|
|
204
|
-
if (authHeader) {
|
|
205
|
-
headers['Authorization'] = authHeader;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
// Add CSRF token header for state-changing requests
|
|
209
|
-
if (csrfToken) {
|
|
210
|
-
headers['X-CSRF-Token'] = csrfToken;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
// Add native app header for React Native (required for CSRF validation)
|
|
214
|
-
// Native apps can't persist cookies like browsers, so the server uses
|
|
215
|
-
// header-only CSRF validation when this header is present
|
|
216
|
-
if (isNativeApp && isStateChangingMethod) {
|
|
217
|
-
headers['X-Native-App'] = 'true';
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
// Debug logging for CSRF issues
|
|
221
|
-
if (isStateChangingMethod && __DEV__) {
|
|
222
|
-
console.log('[HttpService] CSRF Debug:', {
|
|
223
|
-
url,
|
|
224
|
-
method,
|
|
225
|
-
isNativeApp,
|
|
226
|
-
platformOS: getPlatformOS(),
|
|
227
|
-
hasCsrfToken: !!csrfToken,
|
|
228
|
-
csrfTokenLength: csrfToken?.length,
|
|
229
|
-
hasNativeAppHeader: headers['X-Native-App'] === 'true'
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
// Merge custom headers if provided
|
|
234
|
-
if (config.headers) {
|
|
235
|
-
Object.entries(config.headers).forEach(([key, value]) => {
|
|
236
|
-
// For FormData, explicitly remove Content-Type if user tries to set it
|
|
237
|
-
// The browser/fetch API will set it automatically with the boundary
|
|
238
|
-
if (isFormData && key.toLowerCase() === 'content-type') {
|
|
239
|
-
this.logger.debug('Ignoring Content-Type header for FormData - will be set automatically');
|
|
240
|
-
return;
|
|
241
|
-
}
|
|
242
|
-
headers[key] = value;
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
|
-
const bodyValue = method !== 'GET' && data ? isFormData ? data : JSON.stringify(data) : undefined;
|
|
246
|
-
const response = await fetch(fullUrl, {
|
|
247
|
-
method,
|
|
248
|
-
headers,
|
|
249
|
-
body: bodyValue,
|
|
250
|
-
signal: controller.signal,
|
|
251
|
-
credentials: 'include' // Include cookies for cross-origin requests (CSRF, session)
|
|
252
|
-
});
|
|
253
|
-
if (timeoutId) clearTimeout(timeoutId);
|
|
254
|
-
|
|
255
|
-
// Handle response
|
|
256
|
-
if (!response.ok) {
|
|
257
|
-
if (response.status === 401) {
|
|
258
|
-
this.tokenStore.clearTokens();
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
// Try to parse error response (handle empty/malformed JSON)
|
|
262
|
-
let errorMessage = `HTTP ${response.status}: ${response.statusText}`;
|
|
263
|
-
const contentType = response.headers.get('content-type');
|
|
264
|
-
if (contentType && contentType.includes('application/json')) {
|
|
265
|
-
try {
|
|
266
|
-
const errorData = await response.json();
|
|
267
|
-
// Check both 'message' and 'error' fields for backwards compatibility
|
|
268
|
-
if (errorData?.message) {
|
|
269
|
-
errorMessage = errorData.message;
|
|
270
|
-
} else if (errorData?.error) {
|
|
271
|
-
errorMessage = errorData.error;
|
|
272
|
-
}
|
|
273
|
-
} catch (parseError) {
|
|
274
|
-
// Malformed JSON or empty response - use status text
|
|
275
|
-
this.logger.warn('Failed to parse error response JSON:', parseError);
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
const error = new Error(errorMessage);
|
|
279
|
-
error.status = response.status;
|
|
280
|
-
error.response = {
|
|
281
|
-
status: response.status,
|
|
282
|
-
statusText: response.statusText
|
|
283
|
-
};
|
|
284
|
-
throw error;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
// Handle different response types (optimized - read response once)
|
|
288
|
-
const contentType = response.headers.get('content-type');
|
|
289
|
-
let responseData;
|
|
290
|
-
if (contentType && contentType.includes('application/json')) {
|
|
291
|
-
// Use response.json() directly for better performance
|
|
292
|
-
try {
|
|
293
|
-
responseData = await response.json();
|
|
294
|
-
// Handle null/undefined responses
|
|
295
|
-
if (responseData === null || responseData === undefined) {
|
|
296
|
-
responseData = null;
|
|
297
|
-
} else {
|
|
298
|
-
// Unwrap standardized API response format for JSON
|
|
299
|
-
responseData = this.unwrapResponse(responseData);
|
|
300
|
-
}
|
|
301
|
-
} catch (parseError) {
|
|
302
|
-
// Handle malformed JSON or empty responses gracefully
|
|
303
|
-
// Note: Once response.json() is called, the body is consumed and cannot be read again
|
|
304
|
-
// So we check the error type to determine if it's empty or malformed
|
|
305
|
-
if (parseError instanceof SyntaxError) {
|
|
306
|
-
this.logger.warn('Failed to parse JSON response (malformed or empty):', parseError);
|
|
307
|
-
// SyntaxError typically means empty or malformed JSON
|
|
308
|
-
// For empty responses, return null; for malformed JSON, throw descriptive error
|
|
309
|
-
responseData = null; // Treat as empty response for safety
|
|
310
|
-
} else {
|
|
311
|
-
this.logger.warn('Failed to read response:', parseError);
|
|
312
|
-
throw new Error('Failed to read response from server');
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
} else if (contentType && (contentType.includes('application/octet-stream') || contentType.includes('image/') || contentType.includes('video/') || contentType.includes('audio/'))) {
|
|
316
|
-
// For binary responses (blobs), return the blob directly without unwrapping
|
|
317
|
-
responseData = await response.blob();
|
|
318
|
-
} else {
|
|
319
|
-
// For other responses, return as text
|
|
320
|
-
const text = await response.text();
|
|
321
|
-
responseData = text || null;
|
|
322
|
-
}
|
|
323
|
-
const duration = Date.now() - startTime;
|
|
324
|
-
this.updateMetrics(true, duration);
|
|
325
|
-
this.config.onRequestEnd?.(url, method, duration, true);
|
|
326
|
-
return responseData;
|
|
327
|
-
} catch (error) {
|
|
328
|
-
const duration = Date.now() - startTime;
|
|
329
|
-
this.updateMetrics(false, duration);
|
|
330
|
-
this.config.onRequestEnd?.(url, method, duration, false);
|
|
331
|
-
this.config.onRequestError?.(url, method, error instanceof Error ? error : new Error(String(error)));
|
|
332
|
-
|
|
333
|
-
// Handle AbortError specifically for better error messages
|
|
334
|
-
if (error instanceof Error && error.name === 'AbortError') {
|
|
335
|
-
throw handleHttpError(error);
|
|
336
|
-
}
|
|
337
|
-
throw handleHttpError(error);
|
|
338
|
-
}
|
|
339
|
-
};
|
|
340
|
-
|
|
341
|
-
// Wrap with retry if enabled
|
|
342
|
-
const requestWithRetry = retry ? () => retryAsync(requestFn, maxRetries, this.config.retryDelay || 1000) : requestFn;
|
|
343
|
-
|
|
344
|
-
// Wrap with deduplication if enabled (use optimized key generation)
|
|
345
|
-
const dedupeKey = deduplicate ? this.generateCacheKey(method, url, data || params) : null;
|
|
346
|
-
const finalRequest = dedupeKey ? () => this.deduplicator.deduplicate(dedupeKey, requestWithRetry) : requestWithRetry;
|
|
347
|
-
|
|
348
|
-
// Execute request (with queue if needed)
|
|
349
|
-
const result = await this.requestQueue.enqueue(finalRequest);
|
|
350
|
-
|
|
351
|
-
// Cache the result if caching is enabled
|
|
352
|
-
if (cache && cacheKey && result) {
|
|
353
|
-
this.cache.set(cacheKey, result, cacheTTL);
|
|
354
|
-
}
|
|
355
|
-
return result;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
/**
|
|
359
|
-
* Generate cache key efficiently
|
|
360
|
-
* Uses simple hash for large objects to avoid expensive JSON.stringify
|
|
361
|
-
*/
|
|
362
|
-
generateCacheKey(method, url, data) {
|
|
363
|
-
if (!data || typeof data === 'object' && Object.keys(data).length === 0) {
|
|
364
|
-
return `${method}:${url}`;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
// For small objects, use JSON.stringify
|
|
368
|
-
const dataStr = JSON.stringify(data);
|
|
369
|
-
if (dataStr.length < 1000) {
|
|
370
|
-
return `${method}:${url}:${dataStr}`;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
// For large objects, use a simple hash based on keys and values length
|
|
374
|
-
// This avoids expensive serialization while still being unique enough
|
|
375
|
-
const hash = typeof data === 'object' && data !== null ? Object.keys(data).sort().join(',') + ':' + dataStr.length : String(data).substring(0, 100);
|
|
376
|
-
return `${method}:${url}:${hash}`;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
/**
|
|
380
|
-
* Build full URL with query params
|
|
381
|
-
*/
|
|
382
|
-
buildURL(url, params) {
|
|
383
|
-
const base = url.startsWith('http') ? url : `${this.baseURL}${url}`;
|
|
384
|
-
if (!params || Object.keys(params).length === 0) {
|
|
385
|
-
return base;
|
|
386
|
-
}
|
|
387
|
-
const searchParams = new URLSearchParams();
|
|
388
|
-
Object.entries(params).forEach(([key, value]) => {
|
|
389
|
-
if (value !== undefined && value !== null) {
|
|
390
|
-
searchParams.append(key, String(value));
|
|
391
|
-
}
|
|
392
|
-
});
|
|
393
|
-
const queryString = searchParams.toString();
|
|
394
|
-
return queryString ? `${base}${base.includes('?') ? '&' : '?'}${queryString}` : base;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
/**
|
|
398
|
-
* Fetch CSRF token from server (with deduplication)
|
|
399
|
-
* Required for state-changing requests (POST, PUT, PATCH, DELETE)
|
|
400
|
-
*/
|
|
401
|
-
async fetchCsrfToken() {
|
|
402
|
-
// Return cached token if available
|
|
403
|
-
const cachedToken = this.tokenStore.getCsrfToken();
|
|
404
|
-
if (cachedToken) {
|
|
405
|
-
if (__DEV__) console.log('[HttpService] Using cached CSRF token');
|
|
406
|
-
return cachedToken;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
// Deduplicate concurrent CSRF token fetches
|
|
410
|
-
const existingPromise = this.tokenStore.getCsrfTokenFetchPromise();
|
|
411
|
-
if (existingPromise) {
|
|
412
|
-
if (__DEV__) console.log('[HttpService] Waiting for existing CSRF fetch');
|
|
413
|
-
return existingPromise;
|
|
414
|
-
}
|
|
415
|
-
const fetchPromise = (async () => {
|
|
416
|
-
try {
|
|
417
|
-
if (__DEV__) console.log('[HttpService] Fetching CSRF token from:', `${this.baseURL}/api/csrf-token`);
|
|
418
|
-
|
|
419
|
-
// Use AbortController for timeout (more compatible than AbortSignal.timeout)
|
|
420
|
-
const controller = new AbortController();
|
|
421
|
-
const timeoutId = setTimeout(() => controller.abort(), 5000);
|
|
422
|
-
const response = await fetch(`${this.baseURL}/api/csrf-token`, {
|
|
423
|
-
method: 'GET',
|
|
424
|
-
headers: {
|
|
425
|
-
'Accept': 'application/json'
|
|
426
|
-
},
|
|
427
|
-
credentials: 'include',
|
|
428
|
-
// Required to receive and send cookies
|
|
429
|
-
signal: controller.signal
|
|
430
|
-
});
|
|
431
|
-
clearTimeout(timeoutId);
|
|
432
|
-
if (__DEV__) console.log('[HttpService] CSRF fetch response:', response.status, response.ok);
|
|
433
|
-
if (response.ok) {
|
|
434
|
-
const data = await response.json();
|
|
435
|
-
if (__DEV__) console.log('[HttpService] CSRF response data:', data);
|
|
436
|
-
const token = data.csrfToken || null;
|
|
437
|
-
this.tokenStore.setCsrfToken(token);
|
|
438
|
-
this.logger.debug('CSRF token fetched');
|
|
439
|
-
return token;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
// Also check response header for CSRF token
|
|
443
|
-
const headerToken = response.headers.get('X-CSRF-Token');
|
|
444
|
-
if (headerToken) {
|
|
445
|
-
this.tokenStore.setCsrfToken(headerToken);
|
|
446
|
-
this.logger.debug('CSRF token from header');
|
|
447
|
-
return headerToken;
|
|
448
|
-
}
|
|
449
|
-
if (__DEV__) console.log('[HttpService] CSRF fetch failed with status:', response.status);
|
|
450
|
-
this.logger.warn('Failed to fetch CSRF token:', response.status);
|
|
451
|
-
return null;
|
|
452
|
-
} catch (error) {
|
|
453
|
-
if (__DEV__) console.log('[HttpService] CSRF fetch error:', error);
|
|
454
|
-
this.logger.warn('CSRF token fetch error:', error);
|
|
455
|
-
return null;
|
|
456
|
-
} finally {
|
|
457
|
-
this.tokenStore.setCsrfTokenFetchPromise(null);
|
|
458
|
-
}
|
|
459
|
-
})();
|
|
460
|
-
this.tokenStore.setCsrfTokenFetchPromise(fetchPromise);
|
|
461
|
-
return fetchPromise;
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
/**
|
|
465
|
-
* Get auth header with automatic token refresh
|
|
466
|
-
*/
|
|
467
|
-
async getAuthHeader() {
|
|
468
|
-
const accessToken = this.tokenStore.getAccessToken();
|
|
469
|
-
if (!accessToken) {
|
|
470
|
-
return null;
|
|
471
|
-
}
|
|
472
|
-
try {
|
|
473
|
-
const decoded = jwtDecode(accessToken);
|
|
474
|
-
const currentTime = Math.floor(Date.now() / 1000);
|
|
475
|
-
|
|
476
|
-
// If token expires in less than 60 seconds, refresh it
|
|
477
|
-
if (decoded.exp && decoded.exp - currentTime < 60 && decoded.sessionId) {
|
|
478
|
-
try {
|
|
479
|
-
const refreshUrl = `${this.baseURL}/api/session/token/${decoded.sessionId}`;
|
|
480
|
-
|
|
481
|
-
// Use AbortSignal.timeout for consistent timeout handling
|
|
482
|
-
const response = await fetch(refreshUrl, {
|
|
483
|
-
method: 'GET',
|
|
484
|
-
headers: {
|
|
485
|
-
'Accept': 'application/json'
|
|
486
|
-
},
|
|
487
|
-
signal: AbortSignal.timeout(5000),
|
|
488
|
-
credentials: 'include' // Include cookies for cross-origin requests
|
|
489
|
-
});
|
|
490
|
-
if (response.ok) {
|
|
491
|
-
const {
|
|
492
|
-
accessToken: newToken
|
|
493
|
-
} = await response.json();
|
|
494
|
-
this.tokenStore.setTokens(newToken);
|
|
495
|
-
this.logger.debug('Token refreshed');
|
|
496
|
-
return `Bearer ${newToken}`;
|
|
497
|
-
}
|
|
498
|
-
} catch (refreshError) {
|
|
499
|
-
this.logger.warn('Token refresh failed, using current token');
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
return `Bearer ${accessToken}`;
|
|
503
|
-
} catch (error) {
|
|
504
|
-
this.logger.error('Error processing token:', error);
|
|
505
|
-
return `Bearer ${accessToken}`;
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
/**
|
|
510
|
-
* Unwrap standardized API response format
|
|
511
|
-
*/
|
|
512
|
-
unwrapResponse(responseData) {
|
|
513
|
-
// Handle paginated responses: { data: [...], pagination: {...} }
|
|
514
|
-
if (responseData && typeof responseData === 'object' && 'data' in responseData && 'pagination' in responseData) {
|
|
515
|
-
return responseData;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
// Handle regular success responses: { data: ... }
|
|
519
|
-
if (responseData && typeof responseData === 'object' && 'data' in responseData && !Array.isArray(responseData)) {
|
|
520
|
-
return responseData.data;
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
// Return as-is for responses that don't use sendSuccess wrapper
|
|
524
|
-
return responseData;
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
/**
|
|
528
|
-
* Update request metrics
|
|
529
|
-
*/
|
|
530
|
-
updateMetrics(success, duration) {
|
|
531
|
-
this.requestMetrics.totalRequests++;
|
|
532
|
-
if (success) {
|
|
533
|
-
this.requestMetrics.successfulRequests++;
|
|
534
|
-
} else {
|
|
535
|
-
this.requestMetrics.failedRequests++;
|
|
536
|
-
}
|
|
537
|
-
const alpha = 0.1;
|
|
538
|
-
this.requestMetrics.averageResponseTime = this.requestMetrics.averageResponseTime * (1 - alpha) + duration * alpha;
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
// Convenience methods (for backward compatibility)
|
|
542
|
-
/**
|
|
543
|
-
* GET request convenience method
|
|
544
|
-
*/
|
|
545
|
-
async get(url, config) {
|
|
546
|
-
const result = await this.request({
|
|
547
|
-
method: 'GET',
|
|
548
|
-
url,
|
|
549
|
-
...config
|
|
550
|
-
});
|
|
551
|
-
return {
|
|
552
|
-
data: result
|
|
553
|
-
};
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
/**
|
|
557
|
-
* POST request convenience method
|
|
558
|
-
* Supports FormData uploads - Content-Type will be set automatically for FormData
|
|
559
|
-
* @param url - Request URL
|
|
560
|
-
* @param data - Request body (can be FormData for file uploads)
|
|
561
|
-
* @param config - Request configuration including optional headers
|
|
562
|
-
* @example
|
|
563
|
-
* ```typescript
|
|
564
|
-
* const formData = new FormData();
|
|
565
|
-
* formData.append('file', file);
|
|
566
|
-
* await api.post('/upload', formData, { headers: { 'X-Custom-Header': 'value' } });
|
|
567
|
-
* ```
|
|
568
|
-
*/
|
|
569
|
-
async post(url, data, config) {
|
|
570
|
-
const result = await this.request({
|
|
571
|
-
method: 'POST',
|
|
572
|
-
url,
|
|
573
|
-
data,
|
|
574
|
-
...config
|
|
575
|
-
});
|
|
576
|
-
return {
|
|
577
|
-
data: result
|
|
578
|
-
};
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
/**
|
|
582
|
-
* PUT request convenience method
|
|
583
|
-
* Supports FormData uploads - Content-Type will be set automatically for FormData
|
|
584
|
-
* @param url - Request URL
|
|
585
|
-
* @param data - Request body (can be FormData for file uploads)
|
|
586
|
-
* @param config - Request configuration including optional headers
|
|
587
|
-
* @example
|
|
588
|
-
* ```typescript
|
|
589
|
-
* const formData = new FormData();
|
|
590
|
-
* formData.append('file', file);
|
|
591
|
-
* await api.put('/upload', formData, { headers: { 'X-Custom-Header': 'value' } });
|
|
592
|
-
* ```
|
|
593
|
-
*/
|
|
594
|
-
async put(url, data, config) {
|
|
595
|
-
const result = await this.request({
|
|
596
|
-
method: 'PUT',
|
|
597
|
-
url,
|
|
598
|
-
data,
|
|
599
|
-
...config
|
|
600
|
-
});
|
|
601
|
-
return {
|
|
602
|
-
data: result
|
|
603
|
-
};
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
/**
|
|
607
|
-
* PATCH request convenience method
|
|
608
|
-
* Supports FormData uploads - Content-Type will be set automatically for FormData
|
|
609
|
-
* @param url - Request URL
|
|
610
|
-
* @param data - Request body (can be FormData for file uploads)
|
|
611
|
-
* @param config - Request configuration including optional headers
|
|
612
|
-
* @example
|
|
613
|
-
* ```typescript
|
|
614
|
-
* const formData = new FormData();
|
|
615
|
-
* formData.append('file', file);
|
|
616
|
-
* await api.patch('/upload', formData, { headers: { 'X-Custom-Header': 'value' } });
|
|
617
|
-
* ```
|
|
618
|
-
*/
|
|
619
|
-
async patch(url, data, config) {
|
|
620
|
-
const result = await this.request({
|
|
621
|
-
method: 'PATCH',
|
|
622
|
-
url,
|
|
623
|
-
data,
|
|
624
|
-
...config
|
|
625
|
-
});
|
|
626
|
-
return {
|
|
627
|
-
data: result
|
|
628
|
-
};
|
|
629
|
-
}
|
|
630
|
-
async delete(url, config) {
|
|
631
|
-
const result = await this.request({
|
|
632
|
-
method: 'DELETE',
|
|
633
|
-
url,
|
|
634
|
-
...config
|
|
635
|
-
});
|
|
636
|
-
return {
|
|
637
|
-
data: result
|
|
638
|
-
};
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
// Token management
|
|
642
|
-
setTokens(accessToken, refreshToken = '') {
|
|
643
|
-
this.tokenStore.setTokens(accessToken, refreshToken);
|
|
644
|
-
}
|
|
645
|
-
clearTokens() {
|
|
646
|
-
this.tokenStore.clearTokens();
|
|
647
|
-
this.tokenStore.clearCsrfToken();
|
|
648
|
-
}
|
|
649
|
-
getAccessToken() {
|
|
650
|
-
return this.tokenStore.getAccessToken();
|
|
651
|
-
}
|
|
652
|
-
hasAccessToken() {
|
|
653
|
-
return this.tokenStore.hasAccessToken();
|
|
654
|
-
}
|
|
655
|
-
getBaseURL() {
|
|
656
|
-
return this.baseURL;
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
// Cache management
|
|
660
|
-
clearCache() {
|
|
661
|
-
this.cache.clear();
|
|
662
|
-
}
|
|
663
|
-
clearCacheEntry(key) {
|
|
664
|
-
this.cache.delete(key);
|
|
665
|
-
}
|
|
666
|
-
getCacheStats() {
|
|
667
|
-
const cacheStats = this.cache.getStats();
|
|
668
|
-
const total = this.requestMetrics.cacheHits + this.requestMetrics.cacheMisses;
|
|
669
|
-
return {
|
|
670
|
-
size: cacheStats.size,
|
|
671
|
-
hits: this.requestMetrics.cacheHits,
|
|
672
|
-
misses: this.requestMetrics.cacheMisses,
|
|
673
|
-
hitRate: total > 0 ? this.requestMetrics.cacheHits / total : 0
|
|
674
|
-
};
|
|
675
|
-
}
|
|
676
|
-
getMetrics() {
|
|
677
|
-
return {
|
|
678
|
-
...this.requestMetrics
|
|
679
|
-
};
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
// Test-only utility
|
|
683
|
-
static __resetTokensForTests() {
|
|
684
|
-
try {
|
|
685
|
-
TokenStore.getInstance().clearTokens();
|
|
686
|
-
} catch (error) {
|
|
687
|
-
// Silently fail in test cleanup - this is expected behavior
|
|
688
|
-
// TokenStore might not be initialized in some test scenarios
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
//# sourceMappingURL=HttpService.js.map
|