@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
package/src/utils/cache.ts
DELETED
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Centralized cache utility with TTL support
|
|
3
|
-
*
|
|
4
|
-
* This is a production-ready cache implementation used across the codebase
|
|
5
|
-
* for consistent caching behavior and performance optimization.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Cache entry with expiration tracking
|
|
10
|
-
*/
|
|
11
|
-
interface CacheEntry<T> {
|
|
12
|
-
data: T;
|
|
13
|
-
timestamp: number;
|
|
14
|
-
expiresAt: number;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Cache statistics
|
|
19
|
-
*/
|
|
20
|
-
export interface CacheStats {
|
|
21
|
-
size: number;
|
|
22
|
-
hits: number;
|
|
23
|
-
misses: number;
|
|
24
|
-
hitRate: number;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* TTL-based cache implementation
|
|
29
|
-
*
|
|
30
|
-
* Features:
|
|
31
|
-
* - Automatic expiration based on TTL
|
|
32
|
-
* - Manual cleanup of expired entries
|
|
33
|
-
* - Statistics tracking (hits, misses, hit rate)
|
|
34
|
-
* - Type-safe generic interface
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```typescript
|
|
38
|
-
* const cache = new TTLCache<string>(5 * 60 * 1000); // 5 minutes
|
|
39
|
-
*
|
|
40
|
-
* // Set with default TTL
|
|
41
|
-
* cache.set('key', 'value');
|
|
42
|
-
*
|
|
43
|
-
* // Set with custom TTL
|
|
44
|
-
* cache.set('key', 'value', 10 * 60 * 1000); // 10 minutes
|
|
45
|
-
*
|
|
46
|
-
* // Get value
|
|
47
|
-
* const value = cache.get('key');
|
|
48
|
-
*
|
|
49
|
-
* // Get statistics
|
|
50
|
-
* const stats = cache.getStats();
|
|
51
|
-
* ```
|
|
52
|
-
*/
|
|
53
|
-
export class TTLCache<T> {
|
|
54
|
-
private cache = new Map<string, CacheEntry<T>>();
|
|
55
|
-
private defaultTTL: number;
|
|
56
|
-
private hits = 0;
|
|
57
|
-
private misses = 0;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Create a new TTL cache
|
|
61
|
-
* @param defaultTTL Default TTL in milliseconds (default: 5 minutes)
|
|
62
|
-
*/
|
|
63
|
-
constructor(defaultTTL: number = 5 * 60 * 1000) {
|
|
64
|
-
this.defaultTTL = defaultTTL;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Get a value from cache
|
|
69
|
-
* @param key Cache key
|
|
70
|
-
* @returns Cached value or null if not found or expired
|
|
71
|
-
*/
|
|
72
|
-
get(key: string): T | null {
|
|
73
|
-
const entry = this.cache.get(key);
|
|
74
|
-
if (!entry) {
|
|
75
|
-
this.misses++;
|
|
76
|
-
return null;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const now = Date.now();
|
|
80
|
-
if (now > entry.expiresAt) {
|
|
81
|
-
this.cache.delete(key);
|
|
82
|
-
this.misses++;
|
|
83
|
-
return null;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
this.hits++;
|
|
87
|
-
return entry.data;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Set a value in cache
|
|
92
|
-
* @param key Cache key
|
|
93
|
-
* @param data Data to cache
|
|
94
|
-
* @param ttl Optional TTL override (uses default if not provided)
|
|
95
|
-
*/
|
|
96
|
-
set(key: string, data: T, ttl?: number): void {
|
|
97
|
-
const now = Date.now();
|
|
98
|
-
const expiresAt = now + (ttl || this.defaultTTL);
|
|
99
|
-
this.cache.set(key, { data, timestamp: now, expiresAt });
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Delete a specific cache entry
|
|
104
|
-
* @param key Cache key
|
|
105
|
-
* @returns true if entry was deleted, false if not found
|
|
106
|
-
*/
|
|
107
|
-
delete(key: string): boolean {
|
|
108
|
-
return this.cache.delete(key);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Clear all cache entries
|
|
113
|
-
*/
|
|
114
|
-
clear(): void {
|
|
115
|
-
this.cache.clear();
|
|
116
|
-
this.hits = 0;
|
|
117
|
-
this.misses = 0;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* Check if a key exists and is not expired
|
|
122
|
-
* @param key Cache key
|
|
123
|
-
* @returns true if key exists and is valid
|
|
124
|
-
*/
|
|
125
|
-
has(key: string): boolean {
|
|
126
|
-
const entry = this.cache.get(key);
|
|
127
|
-
if (!entry) return false;
|
|
128
|
-
|
|
129
|
-
if (Date.now() > entry.expiresAt) {
|
|
130
|
-
this.cache.delete(key);
|
|
131
|
-
return false;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
return true;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Get all valid cache keys
|
|
139
|
-
* @returns Array of valid cache keys
|
|
140
|
-
*/
|
|
141
|
-
keys(): string[] {
|
|
142
|
-
const now = Date.now();
|
|
143
|
-
const validKeys: string[] = [];
|
|
144
|
-
|
|
145
|
-
for (const [key, entry] of this.cache.entries()) {
|
|
146
|
-
if (now <= entry.expiresAt) {
|
|
147
|
-
validKeys.push(key);
|
|
148
|
-
} else {
|
|
149
|
-
this.cache.delete(key);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
return validKeys;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Clean up expired entries
|
|
158
|
-
* @returns Number of entries removed
|
|
159
|
-
*/
|
|
160
|
-
cleanup(): number {
|
|
161
|
-
const now = Date.now();
|
|
162
|
-
let removed = 0;
|
|
163
|
-
|
|
164
|
-
for (const [key, entry] of this.cache.entries()) {
|
|
165
|
-
if (now > entry.expiresAt) {
|
|
166
|
-
this.cache.delete(key);
|
|
167
|
-
removed++;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
return removed;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* Get cache size (number of entries)
|
|
176
|
-
*/
|
|
177
|
-
size(): number {
|
|
178
|
-
return this.cache.size;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Get cache statistics
|
|
183
|
-
*/
|
|
184
|
-
getStats(): CacheStats {
|
|
185
|
-
const total = this.hits + this.misses;
|
|
186
|
-
return {
|
|
187
|
-
size: this.cache.size,
|
|
188
|
-
hits: this.hits,
|
|
189
|
-
misses: this.misses,
|
|
190
|
-
hitRate: total > 0 ? this.hits / total : 0,
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Reset statistics (keeps cache entries)
|
|
196
|
-
*/
|
|
197
|
-
resetStats(): void {
|
|
198
|
-
this.hits = 0;
|
|
199
|
-
this.misses = 0;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Create a TTL cache instance (convenience function)
|
|
205
|
-
*
|
|
206
|
-
* @example
|
|
207
|
-
* ```typescript
|
|
208
|
-
* const cache = createCache<string>(5 * 60 * 1000);
|
|
209
|
-
* ```
|
|
210
|
-
*/
|
|
211
|
-
export function createCache<T>(ttl: number = 5 * 60 * 1000): TTLCache<T> {
|
|
212
|
-
return new TTLCache<T>(ttl);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* Global cache cleanup interval (runs every minute)
|
|
217
|
-
* This helps prevent memory leaks from expired cache entries
|
|
218
|
-
*/
|
|
219
|
-
let cleanupInterval: ReturnType<typeof setInterval> | null = null;
|
|
220
|
-
const activeCaches = new Set<TTLCache<any>>();
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* Register a cache for automatic cleanup
|
|
224
|
-
* @param cache Cache instance to register
|
|
225
|
-
*/
|
|
226
|
-
export function registerCacheForCleanup(cache: TTLCache<any>): void {
|
|
227
|
-
activeCaches.add(cache);
|
|
228
|
-
|
|
229
|
-
// Start cleanup interval if not already running
|
|
230
|
-
if (!cleanupInterval) {
|
|
231
|
-
cleanupInterval = setInterval(() => {
|
|
232
|
-
for (const cache of activeCaches) {
|
|
233
|
-
cache.cleanup();
|
|
234
|
-
}
|
|
235
|
-
}, 60000); // Every minute
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* Unregister a cache from automatic cleanup
|
|
241
|
-
* @param cache Cache instance to unregister
|
|
242
|
-
*/
|
|
243
|
-
export function unregisterCacheFromCleanup(cache: TTLCache<any>): void {
|
|
244
|
-
activeCaches.delete(cache);
|
|
245
|
-
|
|
246
|
-
// Stop cleanup interval if no caches are registered
|
|
247
|
-
if (activeCaches.size === 0 && cleanupInterval) {
|
|
248
|
-
clearInterval(cleanupInterval);
|
|
249
|
-
cleanupInterval = null;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
/**
|
|
254
|
-
* Stop all cleanup intervals (useful for testing)
|
|
255
|
-
* This will clear the interval and unregister all caches
|
|
256
|
-
*/
|
|
257
|
-
export function stopAllCleanupIntervals(): void {
|
|
258
|
-
if (cleanupInterval) {
|
|
259
|
-
clearInterval(cleanupInterval);
|
|
260
|
-
cleanupInterval = null;
|
|
261
|
-
}
|
|
262
|
-
activeCaches.clear();
|
|
263
|
-
}
|
|
264
|
-
|
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
export interface DeviceFingerprint {
|
|
2
|
-
userAgent: string;
|
|
3
|
-
platform: string;
|
|
4
|
-
language?: string;
|
|
5
|
-
timezone?: string;
|
|
6
|
-
screen?: {
|
|
7
|
-
width: number;
|
|
8
|
-
height: number;
|
|
9
|
-
colorDepth: number;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface StoredDeviceInfo {
|
|
14
|
-
deviceId: string;
|
|
15
|
-
deviceName?: string;
|
|
16
|
-
fingerprint?: string;
|
|
17
|
-
createdAt: string;
|
|
18
|
-
lastUsed: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Client-side device management utility
|
|
23
|
-
* Handles persistent device identification across app sessions
|
|
24
|
-
*/
|
|
25
|
-
export class DeviceManager {
|
|
26
|
-
private static DEVICE_KEY = 'oxy_device_info';
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Check if we're in React Native environment
|
|
30
|
-
*/
|
|
31
|
-
private static isReactNative(): boolean {
|
|
32
|
-
return typeof navigator !== 'undefined' && navigator.product === 'ReactNative';
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Get appropriate storage for the platform
|
|
37
|
-
*/
|
|
38
|
-
private static async getStorage(): Promise<{
|
|
39
|
-
getItem: (key: string) => Promise<string | null>;
|
|
40
|
-
setItem: (key: string, value: string) => Promise<void>;
|
|
41
|
-
removeItem: (key: string) => Promise<void>;
|
|
42
|
-
}> {
|
|
43
|
-
if (this.isReactNative()) {
|
|
44
|
-
try {
|
|
45
|
-
const asyncStorageModule = await import('@react-native-async-storage/async-storage');
|
|
46
|
-
const storage = (asyncStorageModule.default as unknown) as import('@react-native-async-storage/async-storage').AsyncStorageStatic;
|
|
47
|
-
return {
|
|
48
|
-
getItem: storage.getItem.bind(storage),
|
|
49
|
-
setItem: storage.setItem.bind(storage),
|
|
50
|
-
removeItem: storage.removeItem.bind(storage),
|
|
51
|
-
};
|
|
52
|
-
} catch (error) {
|
|
53
|
-
console.error('AsyncStorage not available in React Native:', error);
|
|
54
|
-
throw new Error('AsyncStorage is required in React Native environment');
|
|
55
|
-
}
|
|
56
|
-
} else {
|
|
57
|
-
// Use localStorage for web
|
|
58
|
-
return {
|
|
59
|
-
getItem: async (key: string) => localStorage.getItem(key),
|
|
60
|
-
setItem: async (key: string, value: string) => localStorage.setItem(key, value),
|
|
61
|
-
removeItem: async (key: string) => localStorage.removeItem(key)
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Get or create device fingerprint for current device
|
|
68
|
-
*/
|
|
69
|
-
static getDeviceFingerprint(): DeviceFingerprint {
|
|
70
|
-
const fingerprint: DeviceFingerprint = {
|
|
71
|
-
userAgent: typeof navigator !== 'undefined' ? navigator.userAgent : 'unknown',
|
|
72
|
-
platform: typeof navigator !== 'undefined' ? navigator.platform : 'unknown',
|
|
73
|
-
language: typeof navigator !== 'undefined' ? navigator.language : undefined,
|
|
74
|
-
timezone: typeof Intl !== 'undefined' ? Intl.DateTimeFormat().resolvedOptions().timeZone : undefined,
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
// Add screen info if available
|
|
78
|
-
if (typeof screen !== 'undefined') {
|
|
79
|
-
fingerprint.screen = {
|
|
80
|
-
width: screen.width,
|
|
81
|
-
height: screen.height,
|
|
82
|
-
colorDepth: screen.colorDepth
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
return fingerprint;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Get stored device info or create new one
|
|
91
|
-
*/
|
|
92
|
-
static async getDeviceInfo(): Promise<StoredDeviceInfo> {
|
|
93
|
-
try {
|
|
94
|
-
const storage = await this.getStorage();
|
|
95
|
-
const stored = await storage.getItem(this.DEVICE_KEY);
|
|
96
|
-
|
|
97
|
-
if (stored) {
|
|
98
|
-
const deviceInfo: StoredDeviceInfo = JSON.parse(stored);
|
|
99
|
-
|
|
100
|
-
// Update last used timestamp
|
|
101
|
-
deviceInfo.lastUsed = new Date().toISOString();
|
|
102
|
-
await this.saveDeviceInfo(deviceInfo);
|
|
103
|
-
|
|
104
|
-
return deviceInfo;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// Create new device info
|
|
108
|
-
return await this.createNewDeviceInfo();
|
|
109
|
-
} catch (error) {
|
|
110
|
-
console.error('Error getting device info:', error);
|
|
111
|
-
return await this.createNewDeviceInfo();
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Create new device info and store it
|
|
117
|
-
*/
|
|
118
|
-
static async createNewDeviceInfo(): Promise<StoredDeviceInfo> {
|
|
119
|
-
const deviceInfo: StoredDeviceInfo = {
|
|
120
|
-
deviceId: this.generateDeviceId(),
|
|
121
|
-
fingerprint: JSON.stringify(this.getDeviceFingerprint()),
|
|
122
|
-
createdAt: new Date().toISOString(),
|
|
123
|
-
lastUsed: new Date().toISOString()
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
await this.saveDeviceInfo(deviceInfo);
|
|
127
|
-
return deviceInfo;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Save device info to storage
|
|
132
|
-
*/
|
|
133
|
-
static async saveDeviceInfo(deviceInfo: StoredDeviceInfo): Promise<void> {
|
|
134
|
-
try {
|
|
135
|
-
const storage = await this.getStorage();
|
|
136
|
-
await storage.setItem(this.DEVICE_KEY, JSON.stringify(deviceInfo));
|
|
137
|
-
} catch (error) {
|
|
138
|
-
console.error('Error saving device info:', error);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Update device name
|
|
144
|
-
*/
|
|
145
|
-
static async updateDeviceName(deviceName: string): Promise<void> {
|
|
146
|
-
try {
|
|
147
|
-
const deviceInfo = await this.getDeviceInfo();
|
|
148
|
-
deviceInfo.deviceName = deviceName;
|
|
149
|
-
await this.saveDeviceInfo(deviceInfo);
|
|
150
|
-
} catch (error) {
|
|
151
|
-
console.error('Error updating device name:', error);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Clear stored device info (useful for testing or reset)
|
|
157
|
-
*/
|
|
158
|
-
static async clearDeviceInfo(): Promise<void> {
|
|
159
|
-
try {
|
|
160
|
-
const storage = await this.getStorage();
|
|
161
|
-
await storage.removeItem(this.DEVICE_KEY);
|
|
162
|
-
} catch (error) {
|
|
163
|
-
console.error('Error clearing device info:', error);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Generate a unique device ID
|
|
169
|
-
*/
|
|
170
|
-
private static generateDeviceId(): string {
|
|
171
|
-
// Use crypto.getRandomValues if available, otherwise fallback to Math.random
|
|
172
|
-
if (typeof crypto !== 'undefined' && crypto.getRandomValues) {
|
|
173
|
-
const array = new Uint8Array(32);
|
|
174
|
-
crypto.getRandomValues(array);
|
|
175
|
-
return Array.from(array, byte => byte.toString(16).padStart(2, '0')).join('');
|
|
176
|
-
} else {
|
|
177
|
-
// Fallback for environments without crypto.getRandomValues
|
|
178
|
-
return 'device_' + Date.now().toString(36) + Math.random().toString(36).substr(2);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* Get a user-friendly device name based on platform
|
|
184
|
-
*/
|
|
185
|
-
static getDefaultDeviceName(): string {
|
|
186
|
-
const fingerprint = this.getDeviceFingerprint();
|
|
187
|
-
const platform = (fingerprint.platform || '').toLowerCase();
|
|
188
|
-
|
|
189
|
-
if (platform.includes('win')) return 'Windows Computer';
|
|
190
|
-
if (platform.includes('mac')) return 'Mac Computer';
|
|
191
|
-
if (platform.includes('linux')) return 'Linux Computer';
|
|
192
|
-
if (platform.includes('iphone')) return 'iPhone';
|
|
193
|
-
if (platform.includes('ipad')) return 'iPad';
|
|
194
|
-
if (platform.includes('android')) return 'Android Device';
|
|
195
|
-
|
|
196
|
-
return 'Unknown Device';
|
|
197
|
-
}
|
|
198
|
-
}
|
package/src/utils/errorUtils.ts
DELETED
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
import type { ApiError } from '../models/interfaces';
|
|
2
|
-
import { logger } from './loggerUtils';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Error handling utilities for consistent error processing
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Common error codes
|
|
10
|
-
*/
|
|
11
|
-
export const ErrorCodes = {
|
|
12
|
-
// Authentication errors
|
|
13
|
-
UNAUTHORIZED: 'UNAUTHORIZED',
|
|
14
|
-
FORBIDDEN: 'FORBIDDEN',
|
|
15
|
-
INVALID_TOKEN: 'INVALID_TOKEN',
|
|
16
|
-
MISSING_TOKEN: 'MISSING_TOKEN',
|
|
17
|
-
|
|
18
|
-
// Validation errors
|
|
19
|
-
VALIDATION_ERROR: 'VALIDATION_ERROR',
|
|
20
|
-
BAD_REQUEST: 'BAD_REQUEST',
|
|
21
|
-
MISSING_PARAMETER: 'MISSING_PARAMETER',
|
|
22
|
-
INVALID_FORMAT: 'INVALID_FORMAT',
|
|
23
|
-
|
|
24
|
-
// Resource errors
|
|
25
|
-
NOT_FOUND: 'NOT_FOUND',
|
|
26
|
-
ALREADY_EXISTS: 'ALREADY_EXISTS',
|
|
27
|
-
CONFLICT: 'CONFLICT',
|
|
28
|
-
|
|
29
|
-
// Server errors
|
|
30
|
-
INTERNAL_ERROR: 'INTERNAL_ERROR',
|
|
31
|
-
SERVICE_UNAVAILABLE: 'SERVICE_UNAVAILABLE',
|
|
32
|
-
TIMEOUT: 'TIMEOUT',
|
|
33
|
-
|
|
34
|
-
// Network errors
|
|
35
|
-
NETWORK_ERROR: 'NETWORK_ERROR',
|
|
36
|
-
CONNECTION_FAILED: 'CONNECTION_FAILED'
|
|
37
|
-
} as const;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Create a standardized API error
|
|
41
|
-
*/
|
|
42
|
-
export function createApiError(
|
|
43
|
-
message: string,
|
|
44
|
-
code: string = ErrorCodes.INTERNAL_ERROR,
|
|
45
|
-
status = 500,
|
|
46
|
-
details?: Record<string, unknown>
|
|
47
|
-
): ApiError {
|
|
48
|
-
return {
|
|
49
|
-
message,
|
|
50
|
-
code,
|
|
51
|
-
status,
|
|
52
|
-
details
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Handle common HTTP errors and convert to ApiError
|
|
58
|
-
*/
|
|
59
|
-
export function handleHttpError(error: unknown): ApiError {
|
|
60
|
-
// If it's already an ApiError, ensure it has a non-empty message
|
|
61
|
-
if (error && typeof error === 'object' && 'code' in error && 'status' in error) {
|
|
62
|
-
const apiError = error as ApiError;
|
|
63
|
-
// Ensure message is not empty
|
|
64
|
-
if (!apiError.message || !apiError.message.trim()) {
|
|
65
|
-
return {
|
|
66
|
-
...apiError,
|
|
67
|
-
message: apiError.message || 'An error occurred',
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
return apiError;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// Handle AbortError (timeout or cancelled requests)
|
|
74
|
-
if (error instanceof Error && error.name === 'AbortError') {
|
|
75
|
-
return createApiError(
|
|
76
|
-
'Request timeout or cancelled',
|
|
77
|
-
ErrorCodes.TIMEOUT,
|
|
78
|
-
0
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// Handle TypeError (network failures, CORS, etc.)
|
|
83
|
-
if (error instanceof TypeError) {
|
|
84
|
-
// Check if it's a network-related TypeError
|
|
85
|
-
if (error.message.includes('fetch') || error.message.includes('network') || error.message.includes('Failed to fetch')) {
|
|
86
|
-
return createApiError(
|
|
87
|
-
'Network error - failed to connect to server',
|
|
88
|
-
ErrorCodes.NETWORK_ERROR,
|
|
89
|
-
0
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
return createApiError(
|
|
93
|
-
error.message || 'Network error occurred',
|
|
94
|
-
ErrorCodes.NETWORK_ERROR,
|
|
95
|
-
0
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// Handle fetch Response errors - check if it has response property with status
|
|
100
|
-
if (error && typeof error === 'object' && 'response' in error) {
|
|
101
|
-
const fetchError = error as {
|
|
102
|
-
response?: {
|
|
103
|
-
status: number;
|
|
104
|
-
statusText?: string;
|
|
105
|
-
};
|
|
106
|
-
status?: number;
|
|
107
|
-
message?: string;
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
const status = fetchError.response?.status || fetchError.status;
|
|
111
|
-
if (status) {
|
|
112
|
-
return createApiError(
|
|
113
|
-
fetchError.message || `HTTP ${status} error`,
|
|
114
|
-
getErrorCodeFromStatus(status),
|
|
115
|
-
status
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
// Handle standard errors
|
|
121
|
-
if (error instanceof Error) {
|
|
122
|
-
// Check for common error patterns
|
|
123
|
-
if (error.message.includes('timeout') || error.message.includes('aborted')) {
|
|
124
|
-
return createApiError(
|
|
125
|
-
'Request timeout',
|
|
126
|
-
ErrorCodes.TIMEOUT,
|
|
127
|
-
0
|
|
128
|
-
);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (error.message.includes('network') || error.message.includes('fetch')) {
|
|
132
|
-
return createApiError(
|
|
133
|
-
error.message || 'Network error occurred',
|
|
134
|
-
ErrorCodes.NETWORK_ERROR,
|
|
135
|
-
0
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
return createApiError(
|
|
140
|
-
error.message || 'Unknown error occurred',
|
|
141
|
-
ErrorCodes.INTERNAL_ERROR,
|
|
142
|
-
500
|
|
143
|
-
);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
// Handle other errors - ensure we always return a non-empty message
|
|
147
|
-
const errorString = error ? String(error) : '';
|
|
148
|
-
const message = errorString.trim() || 'Unknown error occurred';
|
|
149
|
-
return createApiError(
|
|
150
|
-
message,
|
|
151
|
-
ErrorCodes.INTERNAL_ERROR,
|
|
152
|
-
500
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Get error code from HTTP status
|
|
158
|
-
* Exported for use in other modules
|
|
159
|
-
*/
|
|
160
|
-
export function getErrorCodeFromStatus(status: number): string {
|
|
161
|
-
switch (status) {
|
|
162
|
-
case 400:
|
|
163
|
-
return ErrorCodes.BAD_REQUEST;
|
|
164
|
-
case 401:
|
|
165
|
-
return ErrorCodes.UNAUTHORIZED;
|
|
166
|
-
case 403:
|
|
167
|
-
return ErrorCodes.FORBIDDEN;
|
|
168
|
-
case 404:
|
|
169
|
-
return ErrorCodes.NOT_FOUND;
|
|
170
|
-
case 409:
|
|
171
|
-
return ErrorCodes.CONFLICT;
|
|
172
|
-
case 422:
|
|
173
|
-
return ErrorCodes.VALIDATION_ERROR;
|
|
174
|
-
case 500:
|
|
175
|
-
return ErrorCodes.INTERNAL_ERROR;
|
|
176
|
-
case 503:
|
|
177
|
-
return ErrorCodes.SERVICE_UNAVAILABLE;
|
|
178
|
-
default:
|
|
179
|
-
return ErrorCodes.INTERNAL_ERROR;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Validate required fields and throw error if missing
|
|
185
|
-
*/
|
|
186
|
-
export function validateRequiredFields(data: Record<string, unknown>, fields: string[]): void {
|
|
187
|
-
const missing = fields.filter(field => !data[field]);
|
|
188
|
-
|
|
189
|
-
if (missing.length > 0) {
|
|
190
|
-
throw createApiError(
|
|
191
|
-
`Missing required fields: ${missing.join(', ')}`,
|
|
192
|
-
ErrorCodes.MISSING_PARAMETER,
|
|
193
|
-
400
|
|
194
|
-
);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Safe error logging with context
|
|
200
|
-
*/
|
|
201
|
-
export function logError(error: unknown, context?: string): void {
|
|
202
|
-
if (error instanceof Error) {
|
|
203
|
-
logger.error(error.message, {
|
|
204
|
-
component: context || 'errorUtils',
|
|
205
|
-
method: 'logError',
|
|
206
|
-
stack: error.stack,
|
|
207
|
-
});
|
|
208
|
-
} else {
|
|
209
|
-
logger.error(String(error), {
|
|
210
|
-
component: context || 'errorUtils',
|
|
211
|
-
method: 'logError',
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
|
package/src/utils/index.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export { DeviceManager } from './deviceManager';
|
|
2
|
-
export type { DeviceFingerprint, StoredDeviceInfo } from './deviceManager';
|
|
3
|
-
|
|
4
|
-
// Request utilities
|
|
5
|
-
export { RequestDeduplicator, RequestQueue, SimpleLogger } from './requestUtils';
|
|
6
|
-
|
|
7
|
-
// Cache utilities
|
|
8
|
-
export { TTLCache, createCache, registerCacheForCleanup, unregisterCacheFromCleanup } from './cache';
|
|
9
|
-
export type { CacheStats } from './cache';
|
|
10
|
-
|
|
11
|
-
// Session utilities
|
|
12
|
-
export {
|
|
13
|
-
normalizeSession,
|
|
14
|
-
sortSessions,
|
|
15
|
-
deduplicateSessions,
|
|
16
|
-
deduplicateSessionsByUserId,
|
|
17
|
-
normalizeAndSortSessions,
|
|
18
|
-
mergeSessions,
|
|
19
|
-
sessionsEqual,
|
|
20
|
-
sessionsArraysEqual
|
|
21
|
-
} from './sessionUtils';
|