@oxyhq/services 5.16.43 → 5.17.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 +29 -10
- package/lib/commonjs/core/OxyServices.js +1 -1
- package/lib/commonjs/core/index.js +20 -15
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/core/mixins/OxyServices.auth.js +36 -53
- package/lib/commonjs/core/mixins/OxyServices.auth.js.map +1 -1
- package/lib/commonjs/core/mixins/OxyServices.user.js +10 -17
- package/lib/commonjs/core/mixins/OxyServices.user.js.map +1 -1
- package/lib/commonjs/core/services/TokenService.js +27 -13
- package/lib/commonjs/core/services/TokenService.js.map +1 -1
- package/lib/commonjs/crypto/index.js +0 -16
- package/lib/commonjs/crypto/index.js.map +1 -1
- package/lib/commonjs/crypto/keyManager.js +21 -22
- package/lib/commonjs/crypto/keyManager.js.map +1 -1
- package/lib/commonjs/crypto/polyfill.js +1 -10
- package/lib/commonjs/crypto/polyfill.js.map +1 -1
- package/lib/commonjs/crypto/signatureService.js +18 -32
- package/lib/commonjs/crypto/signatureService.js.map +1 -1
- package/lib/commonjs/index.js +13 -134
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/interfaces.js +0 -7
- package/lib/commonjs/models/interfaces.js.map +1 -1
- package/lib/commonjs/node/index.js +1 -10
- package/lib/commonjs/node/index.js.map +1 -1
- package/lib/commonjs/ui/components/BottomSheetRouter.js +1 -9
- package/lib/commonjs/ui/components/BottomSheetRouter.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +779 -450
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +551 -0
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -0
- package/lib/commonjs/ui/context/hooks/useDeviceManagement.js +73 -0
- package/lib/commonjs/ui/context/hooks/useDeviceManagement.js.map +1 -0
- package/lib/commonjs/ui/context/hooks/useStorage.js +79 -0
- package/lib/commonjs/ui/context/hooks/useStorage.js.map +1 -0
- package/lib/commonjs/ui/hooks/index.js +0 -20
- package/lib/commonjs/ui/hooks/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/index.js +0 -12
- package/lib/commonjs/ui/hooks/mutations/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +23 -74
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/index.js +0 -12
- package/lib/commonjs/ui/hooks/queries/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/queryKeys.js +1 -3
- package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +28 -64
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +6 -4
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/useDeviceManagement.js +73 -0
- package/lib/commonjs/ui/hooks/useDeviceManagement.js.map +1 -0
- package/lib/commonjs/ui/hooks/useProfileEditing.js +5 -3
- package/lib/commonjs/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionManagement.js +284 -0
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -0
- package/lib/commonjs/ui/index.js +2 -10
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +1 -5
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +4 -9
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +19 -37
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +5 -5
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/OxyAuthScreen.js +15 -2
- package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +97 -76
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +6 -6
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/stores/authStore.js +6 -54
- package/lib/commonjs/ui/stores/authStore.js.map +1 -1
- package/lib/commonjs/ui/styles/spacing.js +2 -54
- package/lib/commonjs/ui/styles/spacing.js.map +1 -1
- package/lib/commonjs/ui/utils/avatarUtils.js +12 -9
- package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
- package/lib/commonjs/ui/utils/sessionHelpers.js +1 -7
- package/lib/commonjs/ui/utils/sessionHelpers.js.map +1 -1
- package/lib/commonjs/utils/deviceManager.js +177 -0
- package/lib/commonjs/utils/deviceManager.js.map +1 -0
- package/lib/commonjs/utils/errorUtils.js +0 -13
- package/lib/commonjs/utils/errorUtils.js.map +1 -1
- package/lib/commonjs/utils/index.js +7 -0
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/sessionUtils.js +1 -8
- package/lib/commonjs/utils/sessionUtils.js.map +1 -1
- package/lib/commonjs/utils/validationUtils.js +1 -15
- package/lib/commonjs/utils/validationUtils.js.map +1 -1
- package/lib/module/core/OxyServices.js +1 -1
- package/lib/module/core/index.js +4 -6
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/core/mixins/OxyServices.auth.js +36 -53
- package/lib/module/core/mixins/OxyServices.auth.js.map +1 -1
- package/lib/module/core/mixins/OxyServices.user.js +10 -17
- package/lib/module/core/mixins/OxyServices.user.js.map +1 -1
- package/lib/module/core/services/TokenService.js +27 -13
- package/lib/module/core/services/TokenService.js.map +1 -1
- package/lib/module/crypto/index.js +0 -3
- package/lib/module/crypto/index.js.map +1 -1
- package/lib/module/crypto/keyManager.js +21 -22
- package/lib/module/crypto/keyManager.js.map +1 -1
- package/lib/module/crypto/polyfill.js +1 -2
- package/lib/module/crypto/polyfill.js.map +1 -1
- package/lib/module/crypto/signatureService.js +18 -32
- package/lib/module/crypto/signatureService.js.map +1 -1
- package/lib/module/index.js +7 -19
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/interfaces.js +0 -7
- package/lib/module/models/interfaces.js.map +1 -1
- package/lib/module/node/index.js +0 -3
- package/lib/module/node/index.js.map +1 -1
- package/lib/module/ui/components/BottomSheetRouter.js +2 -6
- package/lib/module/ui/components/BottomSheetRouter.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +779 -450
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +545 -0
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -0
- package/lib/module/ui/context/hooks/useDeviceManagement.js +68 -0
- package/lib/module/ui/context/hooks/useDeviceManagement.js.map +1 -0
- package/lib/module/ui/context/hooks/useStorage.js +74 -0
- package/lib/module/ui/context/hooks/useStorage.js.map +1 -0
- package/lib/module/ui/hooks/index.js +0 -1
- package/lib/module/ui/hooks/index.js.map +1 -1
- package/lib/module/ui/hooks/mutations/index.js +1 -1
- package/lib/module/ui/hooks/mutations/index.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +21 -71
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/module/ui/hooks/queries/index.js +1 -1
- package/lib/module/ui/hooks/queries/index.js.map +1 -1
- package/lib/module/ui/hooks/queries/queryKeys.js +1 -3
- package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/module/ui/hooks/queries/useAccountQueries.js +27 -61
- package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/useServicesQueries.js +6 -4
- package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/module/ui/hooks/useDeviceManagement.js +68 -0
- package/lib/module/ui/hooks/useDeviceManagement.js.map +1 -0
- package/lib/module/ui/hooks/useProfileEditing.js +5 -3
- package/lib/module/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js +279 -0
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -0
- package/lib/module/ui/index.js +1 -2
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +1 -5
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +4 -9
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +19 -37
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +5 -5
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/OxyAuthScreen.js +15 -2
- package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +98 -77
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +6 -6
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/stores/authStore.js +6 -54
- package/lib/module/ui/stores/authStore.js.map +1 -1
- package/lib/module/ui/styles/spacing.js +2 -6
- package/lib/module/ui/styles/spacing.js.map +1 -1
- package/lib/module/ui/utils/avatarUtils.js +12 -9
- package/lib/module/ui/utils/avatarUtils.js.map +1 -1
- package/lib/module/ui/utils/sessionHelpers.js +1 -7
- package/lib/module/ui/utils/sessionHelpers.js.map +1 -1
- package/lib/module/utils/deviceManager.js +171 -0
- package/lib/module/utils/deviceManager.js.map +1 -0
- package/lib/module/utils/errorUtils.js +0 -7
- package/lib/module/utils/errorUtils.js.map +1 -1
- package/lib/module/utils/index.js +1 -2
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/sessionUtils.js +1 -8
- package/lib/module/utils/sessionUtils.js.map +1 -1
- package/lib/module/utils/validationUtils.js +0 -13
- package/lib/module/utils/validationUtils.js.map +1 -1
- package/lib/typescript/core/OxyServices.d.ts +1 -1
- package/lib/typescript/core/index.d.ts +3 -3
- package/lib/typescript/core/index.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.auth.d.ts +21 -44
- package/lib/typescript/core/mixins/OxyServices.auth.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.user.d.ts +1 -0
- package/lib/typescript/core/mixins/OxyServices.user.d.ts.map +1 -1
- package/lib/typescript/core/mixins/index.d.ts +8 -15
- package/lib/typescript/core/mixins/index.d.ts.map +1 -1
- package/lib/typescript/core/services/TokenService.d.ts.map +1 -1
- package/lib/typescript/crypto/index.d.ts +0 -1
- package/lib/typescript/crypto/index.d.ts.map +1 -1
- package/lib/typescript/crypto/keyManager.d.ts +2 -15
- package/lib/typescript/crypto/keyManager.d.ts.map +1 -1
- package/lib/typescript/crypto/polyfill.d.ts +1 -2
- package/lib/typescript/crypto/polyfill.d.ts.map +1 -1
- package/lib/typescript/crypto/signatureService.d.ts +0 -13
- package/lib/typescript/crypto/signatureService.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +7 -12
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/models/interfaces.d.ts +36 -5
- package/lib/typescript/models/interfaces.d.ts.map +1 -1
- package/lib/typescript/models/session.d.ts +18 -3
- package/lib/typescript/models/session.d.ts.map +1 -1
- package/lib/typescript/node/index.d.ts +0 -1
- package/lib/typescript/node/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/BottomSheetRouter.d.ts +0 -5
- package/lib/typescript/ui/components/BottomSheetRouter.d.ts.map +1 -1
- package/lib/typescript/ui/components/TextField/Addons/Outline.d.ts +2 -2
- package/lib/typescript/ui/components/TextField/helpers.d.ts +2 -2
- package/lib/typescript/ui/components/TextField/types.d.ts +0 -1
- package/lib/typescript/ui/components/TextField/types.d.ts.map +1 -1
- package/lib/typescript/ui/context/OxyContext.d.ts +28 -5
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts +59 -0
- package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts.map +1 -0
- package/lib/typescript/ui/context/hooks/useDeviceManagement.d.ts +27 -0
- package/lib/typescript/ui/context/hooks/useDeviceManagement.d.ts.map +1 -0
- package/lib/typescript/ui/context/hooks/useStorage.d.ts +22 -0
- package/lib/typescript/ui/context/hooks/useStorage.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/index.d.ts +0 -1
- package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/mutations/index.d.ts +1 -1
- package/lib/typescript/ui/hooks/mutations/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/mutations/useAccountMutations.d.ts +8 -19
- package/lib/typescript/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/mutations/useServicesMutations.d.ts +1 -1
- package/lib/typescript/ui/hooks/mutations/useServicesMutations.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/queries/index.d.ts +1 -1
- package/lib/typescript/ui/hooks/queries/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/queries/queryKeys.d.ts +0 -2
- package/lib/typescript/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/queries/useAccountQueries.d.ts +5 -17
- package/lib/typescript/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useDeviceManagement.d.ts +27 -0
- package/lib/typescript/ui/hooks/useDeviceManagement.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useProfileEditing.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useSessionManagement.d.ts +41 -0
- package/lib/typescript/ui/hooks/useSessionManagement.d.ts.map +1 -0
- package/lib/typescript/ui/index.d.ts +0 -1
- package/lib/typescript/ui/index.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/stores/authStore.d.ts +1 -8
- package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
- package/lib/typescript/ui/styles/spacing.d.ts +0 -5
- package/lib/typescript/ui/styles/spacing.d.ts.map +1 -1
- package/lib/typescript/ui/utils/avatarUtils.d.ts +4 -1
- package/lib/typescript/ui/utils/avatarUtils.d.ts.map +1 -1
- package/lib/typescript/ui/utils/sessionHelpers.d.ts +0 -1
- package/lib/typescript/ui/utils/sessionHelpers.d.ts.map +1 -1
- package/lib/typescript/utils/deviceManager.d.ts +66 -0
- package/lib/typescript/utils/deviceManager.d.ts.map +1 -0
- package/lib/typescript/utils/errorUtils.d.ts +0 -6
- package/lib/typescript/utils/errorUtils.d.ts.map +1 -1
- package/lib/typescript/utils/index.d.ts +2 -0
- package/lib/typescript/utils/index.d.ts.map +1 -1
- package/lib/typescript/utils/sessionUtils.d.ts.map +1 -1
- package/lib/typescript/utils/validationUtils.d.ts +0 -8
- package/lib/typescript/utils/validationUtils.d.ts.map +1 -1
- package/package.json +1 -6
- package/src/core/OxyServices.ts +1 -1
- package/src/core/index.ts +5 -8
- package/src/core/mixins/OxyServices.auth.ts +44 -87
- package/src/core/mixins/OxyServices.user.ts +10 -18
- package/src/core/services/TokenService.ts +27 -16
- package/src/crypto/index.ts +1 -3
- package/src/crypto/keyManager.ts +21 -30
- package/src/crypto/polyfill.ts +1 -2
- package/src/crypto/signatureService.ts +19 -43
- package/src/index.ts +6 -41
- package/src/models/interfaces.ts +39 -12
- package/src/models/session.ts +19 -7
- package/src/node/index.ts +0 -3
- package/src/ui/components/BottomSheetRouter.tsx +1 -6
- package/src/ui/components/TextField/Addons/Outline.tsx +2 -2
- package/src/ui/components/TextField/helpers.tsx +2 -2
- package/src/ui/components/TextField/types.tsx +1 -1
- package/src/ui/context/OxyContext.tsx +831 -463
- package/src/ui/context/hooks/useAuthOperations.ts +620 -0
- package/src/ui/context/hooks/useDeviceManagement.ts +108 -0
- package/src/ui/context/hooks/useStorage.ts +104 -0
- package/src/ui/hooks/index.ts +1 -2
- package/src/ui/hooks/mutations/index.ts +0 -2
- package/src/ui/hooks/mutations/useAccountMutations.ts +20 -66
- package/src/ui/hooks/queries/index.ts +0 -2
- package/src/ui/hooks/queries/queryKeys.ts +0 -2
- package/src/ui/hooks/queries/useAccountQueries.ts +19 -53
- package/src/ui/hooks/queries/useServicesQueries.ts +5 -5
- package/src/ui/hooks/useDeviceManagement.ts +108 -0
- package/src/ui/hooks/useProfileEditing.ts +3 -3
- package/src/ui/hooks/useSessionManagement.ts +405 -0
- package/src/ui/index.ts +1 -2
- package/src/ui/navigation/routes.ts +2 -6
- package/src/ui/screens/AccountCenterScreen.tsx +4 -9
- package/src/ui/screens/AccountSettingsScreen.tsx +31 -49
- package/src/ui/screens/AccountSwitcherScreen.tsx +5 -5
- package/src/ui/screens/OxyAuthScreen.tsx +19 -4
- package/src/ui/screens/PrivacySettingsScreen.tsx +101 -67
- package/src/ui/screens/ProfileScreen.tsx +10 -10
- package/src/ui/stores/authStore.ts +8 -48
- package/src/ui/styles/spacing.ts +2 -15
- package/src/ui/utils/avatarUtils.ts +21 -19
- package/src/ui/utils/sessionHelpers.ts +0 -7
- package/src/utils/__tests__/validationUtils.test.ts +1 -16
- package/src/utils/deviceManager.ts +198 -0
- package/src/utils/errorUtils.ts +1 -8
- package/src/utils/index.ts +2 -1
- package/src/utils/sessionUtils.ts +0 -8
- package/src/utils/validationUtils.ts +0 -12
- package/lib/commonjs/adapters/expo/crypto.js +0 -56
- package/lib/commonjs/adapters/expo/crypto.js.map +0 -1
- package/lib/commonjs/adapters/expo/fetch.js +0 -30
- package/lib/commonjs/adapters/expo/fetch.js.map +0 -1
- package/lib/commonjs/adapters/expo/index.js +0 -48
- package/lib/commonjs/adapters/expo/index.js.map +0 -1
- package/lib/commonjs/adapters/expo/storage.js +0 -201
- package/lib/commonjs/adapters/expo/storage.js.map +0 -1
- package/lib/commonjs/adapters/index.js +0 -37
- package/lib/commonjs/adapters/index.js.map +0 -1
- package/lib/commonjs/adapters/node/crypto.js +0 -40
- package/lib/commonjs/adapters/node/crypto.js.map +0 -1
- package/lib/commonjs/adapters/node/fetch.js +0 -62
- package/lib/commonjs/adapters/node/fetch.js.map +0 -1
- package/lib/commonjs/adapters/node/index.js +0 -34
- package/lib/commonjs/adapters/node/index.js.map +0 -1
- package/lib/commonjs/adapters/node/storage.js +0 -163
- package/lib/commonjs/adapters/node/storage.js.map +0 -1
- package/lib/commonjs/core/identity-session/DeviceManager.js +0 -237
- package/lib/commonjs/core/identity-session/DeviceManager.js.map +0 -1
- package/lib/commonjs/core/identity-session/INTEGRATION_GUIDE.md +0 -287
- package/lib/commonjs/core/identity-session/IdentityManager.js +0 -400
- package/lib/commonjs/core/identity-session/IdentityManager.js.map +0 -1
- package/lib/commonjs/core/identity-session/IdentitySessionCore.js +0 -394
- package/lib/commonjs/core/identity-session/IdentitySessionCore.js.map +0 -1
- package/lib/commonjs/core/identity-session/RefreshManager.js +0 -137
- package/lib/commonjs/core/identity-session/RefreshManager.js.map +0 -1
- package/lib/commonjs/core/identity-session/SessionManager.js +0 -427
- package/lib/commonjs/core/identity-session/SessionManager.js.map +0 -1
- package/lib/commonjs/core/identity-session/createIdentitySessionCore.js +0 -24
- package/lib/commonjs/core/identity-session/createIdentitySessionCore.js.map +0 -1
- package/lib/commonjs/core/identity-session/errors.js +0 -176
- package/lib/commonjs/core/identity-session/errors.js.map +0 -1
- package/lib/commonjs/core/identity-session/index.js +0 -80
- package/lib/commonjs/core/identity-session/index.js.map +0 -1
- package/lib/commonjs/core/identity-session/types.js +0 -2
- package/lib/commonjs/core/identity-session/types.js.map +0 -1
- package/lib/commonjs/crypto/README.md +0 -142
- package/lib/commonjs/crypto/core.js +0 -147
- package/lib/commonjs/crypto/core.js.map +0 -1
- package/lib/commonjs/node/signatureService.js +0 -107
- package/lib/commonjs/node/signatureService.js.map +0 -1
- package/lib/commonjs/ui/hooks/auth/index.js +0 -37
- package/lib/commonjs/ui/hooks/auth/index.js.map +0 -1
- package/lib/commonjs/ui/hooks/auth/useUsernameValidation.js +0 -171
- package/lib/commonjs/ui/hooks/auth/useUsernameValidation.js.map +0 -1
- package/lib/commonjs/ui/hooks/useAvatarPicker.js +0 -52
- package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +0 -1
- package/lib/commonjs/ui/hooks/useIdentityTransfer.js +0 -125
- package/lib/commonjs/ui/hooks/useIdentityTransfer.js.map +0 -1
- package/lib/commonjs/ui/hooks/useTransferCodesPersistence.js +0 -81
- package/lib/commonjs/ui/hooks/useTransferCodesPersistence.js.map +0 -1
- package/lib/commonjs/ui/hooks/useTransferQueries.js +0 -85
- package/lib/commonjs/ui/hooks/useTransferQueries.js.map +0 -1
- package/lib/commonjs/ui/stores/transferStore.js +0 -157
- package/lib/commonjs/ui/stores/transferStore.js.map +0 -1
- package/lib/module/adapters/expo/crypto.js +0 -51
- package/lib/module/adapters/expo/crypto.js.map +0 -1
- package/lib/module/adapters/expo/fetch.js +0 -26
- package/lib/module/adapters/expo/fetch.js.map +0 -1
- package/lib/module/adapters/expo/index.js +0 -45
- package/lib/module/adapters/expo/index.js.map +0 -1
- package/lib/module/adapters/expo/storage.js +0 -198
- package/lib/module/adapters/expo/storage.js.map +0 -1
- package/lib/module/adapters/index.js +0 -34
- package/lib/module/adapters/index.js.map +0 -1
- package/lib/module/adapters/node/crypto.js +0 -36
- package/lib/module/adapters/node/crypto.js.map +0 -1
- package/lib/module/adapters/node/fetch.js +0 -57
- package/lib/module/adapters/node/fetch.js.map +0 -1
- package/lib/module/adapters/node/index.js +0 -31
- package/lib/module/adapters/node/index.js.map +0 -1
- package/lib/module/adapters/node/storage.js +0 -159
- package/lib/module/adapters/node/storage.js.map +0 -1
- package/lib/module/core/identity-session/DeviceManager.js +0 -232
- package/lib/module/core/identity-session/DeviceManager.js.map +0 -1
- package/lib/module/core/identity-session/INTEGRATION_GUIDE.md +0 -287
- package/lib/module/core/identity-session/IdentityManager.js +0 -395
- package/lib/module/core/identity-session/IdentityManager.js.map +0 -1
- package/lib/module/core/identity-session/IdentitySessionCore.js +0 -390
- package/lib/module/core/identity-session/IdentitySessionCore.js.map +0 -1
- package/lib/module/core/identity-session/RefreshManager.js +0 -132
- package/lib/module/core/identity-session/RefreshManager.js.map +0 -1
- package/lib/module/core/identity-session/SessionManager.js +0 -422
- package/lib/module/core/identity-session/SessionManager.js.map +0 -1
- package/lib/module/core/identity-session/createIdentitySessionCore.js +0 -21
- package/lib/module/core/identity-session/createIdentitySessionCore.js.map +0 -1
- package/lib/module/core/identity-session/errors.js +0 -170
- package/lib/module/core/identity-session/errors.js.map +0 -1
- package/lib/module/core/identity-session/index.js +0 -17
- package/lib/module/core/identity-session/index.js.map +0 -1
- package/lib/module/core/identity-session/types.js +0 -2
- package/lib/module/core/identity-session/types.js.map +0 -1
- package/lib/module/crypto/README.md +0 -142
- package/lib/module/crypto/core.js +0 -133
- package/lib/module/crypto/core.js.map +0 -1
- package/lib/module/node/signatureService.js +0 -101
- package/lib/module/node/signatureService.js.map +0 -1
- package/lib/module/ui/hooks/auth/index.js +0 -7
- package/lib/module/ui/hooks/auth/index.js.map +0 -1
- package/lib/module/ui/hooks/auth/useUsernameValidation.js +0 -167
- package/lib/module/ui/hooks/auth/useUsernameValidation.js.map +0 -1
- package/lib/module/ui/hooks/useAvatarPicker.js +0 -48
- package/lib/module/ui/hooks/useAvatarPicker.js.map +0 -1
- package/lib/module/ui/hooks/useIdentityTransfer.js +0 -121
- package/lib/module/ui/hooks/useIdentityTransfer.js.map +0 -1
- package/lib/module/ui/hooks/useTransferCodesPersistence.js +0 -77
- package/lib/module/ui/hooks/useTransferCodesPersistence.js.map +0 -1
- package/lib/module/ui/hooks/useTransferQueries.js +0 -80
- package/lib/module/ui/hooks/useTransferQueries.js.map +0 -1
- package/lib/module/ui/stores/transferStore.js +0 -152
- package/lib/module/ui/stores/transferStore.js.map +0 -1
- package/lib/typescript/adapters/expo/crypto.d.ts +0 -17
- package/lib/typescript/adapters/expo/crypto.d.ts.map +0 -1
- package/lib/typescript/adapters/expo/fetch.d.ts +0 -16
- package/lib/typescript/adapters/expo/fetch.d.ts.map +0 -1
- package/lib/typescript/adapters/expo/index.d.ts +0 -23
- package/lib/typescript/adapters/expo/index.d.ts.map +0 -1
- package/lib/typescript/adapters/expo/storage.d.ts +0 -23
- package/lib/typescript/adapters/expo/storage.d.ts.map +0 -1
- package/lib/typescript/adapters/index.d.ts +0 -17
- package/lib/typescript/adapters/index.d.ts.map +0 -1
- package/lib/typescript/adapters/node/crypto.d.ts +0 -17
- package/lib/typescript/adapters/node/crypto.d.ts.map +0 -1
- package/lib/typescript/adapters/node/fetch.d.ts +0 -16
- package/lib/typescript/adapters/node/fetch.d.ts.map +0 -1
- package/lib/typescript/adapters/node/index.d.ts +0 -23
- package/lib/typescript/adapters/node/index.d.ts.map +0 -1
- package/lib/typescript/adapters/node/storage.d.ts +0 -23
- package/lib/typescript/adapters/node/storage.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/DeviceManager.d.ts +0 -64
- package/lib/typescript/core/identity-session/DeviceManager.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/IdentityManager.d.ts +0 -88
- package/lib/typescript/core/identity-session/IdentityManager.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/IdentitySessionCore.d.ts +0 -141
- package/lib/typescript/core/identity-session/IdentitySessionCore.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/RefreshManager.d.ts +0 -36
- package/lib/typescript/core/identity-session/RefreshManager.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/SessionManager.d.ts +0 -104
- package/lib/typescript/core/identity-session/SessionManager.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/createIdentitySessionCore.d.ts +0 -11
- package/lib/typescript/core/identity-session/createIdentitySessionCore.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/errors.d.ts +0 -63
- package/lib/typescript/core/identity-session/errors.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/index.d.ts +0 -14
- package/lib/typescript/core/identity-session/index.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/types.d.ts +0 -196
- package/lib/typescript/core/identity-session/types.d.ts.map +0 -1
- package/lib/typescript/crypto/core.d.ts +0 -56
- package/lib/typescript/crypto/core.d.ts.map +0 -1
- package/lib/typescript/node/signatureService.d.ts +0 -55
- package/lib/typescript/node/signatureService.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/auth/index.d.ts +0 -6
- package/lib/typescript/ui/hooks/auth/index.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/auth/useUsernameValidation.d.ts +0 -32
- package/lib/typescript/ui/hooks/auth/useUsernameValidation.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/useAvatarPicker.d.ts +0 -18
- package/lib/typescript/ui/hooks/useAvatarPicker.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/useIdentityTransfer.d.ts +0 -24
- package/lib/typescript/ui/hooks/useIdentityTransfer.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/useTransferCodesPersistence.d.ts +0 -6
- package/lib/typescript/ui/hooks/useTransferCodesPersistence.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/useTransferQueries.d.ts +0 -26
- package/lib/typescript/ui/hooks/useTransferQueries.d.ts.map +0 -1
- package/lib/typescript/ui/stores/transferStore.d.ts +0 -36
- package/lib/typescript/ui/stores/transferStore.d.ts.map +0 -1
- package/src/adapters/expo/crypto.ts +0 -55
- package/src/adapters/expo/fetch.ts +0 -28
- package/src/adapters/expo/index.ts +0 -51
- package/src/adapters/expo/storage.ts +0 -228
- package/src/adapters/index.ts +0 -34
- package/src/adapters/node/crypto.ts +0 -39
- package/src/adapters/node/fetch.ts +0 -59
- package/src/adapters/node/index.ts +0 -37
- package/src/adapters/node/storage.ts +0 -170
- package/src/core/identity-session/DeviceManager.ts +0 -273
- package/src/core/identity-session/INTEGRATION_GUIDE.md +0 -287
- package/src/core/identity-session/IdentityManager.ts +0 -474
- package/src/core/identity-session/IdentitySessionCore.ts +0 -464
- package/src/core/identity-session/RefreshManager.ts +0 -189
- package/src/core/identity-session/SessionManager.ts +0 -500
- package/src/core/identity-session/createIdentitySessionCore.ts +0 -19
- package/src/core/identity-session/errors.ts +0 -197
- package/src/core/identity-session/index.ts +0 -15
- package/src/core/identity-session/types.ts +0 -188
- package/src/crypto/README.md +0 -142
- package/src/crypto/__tests__/core.test.ts +0 -203
- package/src/crypto/core.ts +0 -142
- package/src/node/signatureService.ts +0 -126
- package/src/ui/hooks/auth/index.ts +0 -9
- package/src/ui/hooks/auth/useUsernameValidation.ts +0 -177
- package/src/ui/hooks/useAvatarPicker.ts +0 -62
- package/src/ui/hooks/useIdentityTransfer.ts +0 -135
- package/src/ui/hooks/useTransferCodesPersistence.ts +0 -80
- package/src/ui/hooks/useTransferQueries.ts +0 -102
- package/src/ui/stores/transferStore.ts +0 -201
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Node.js Platform Adapter
|
|
3
|
-
*
|
|
4
|
-
* Provides storage, crypto, and fetch adapters for Node.js
|
|
5
|
-
*/
|
|
6
|
-
import { type StorageAdapter } from './storage';
|
|
7
|
-
import { type CryptoAdapter } from './crypto';
|
|
8
|
-
import { type FetchAdapter } from './fetch';
|
|
9
|
-
import type { Platform as PlatformType } from '../../core/identity-session/types';
|
|
10
|
-
/**
|
|
11
|
-
* Platform Adapter Interface
|
|
12
|
-
*/
|
|
13
|
-
export interface PlatformAdapter {
|
|
14
|
-
storage: StorageAdapter;
|
|
15
|
-
crypto: CryptoAdapter;
|
|
16
|
-
fetch: FetchAdapter;
|
|
17
|
-
platform: PlatformType;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Create Node Platform Adapter
|
|
21
|
-
*/
|
|
22
|
-
export declare function createNodeAdapter(): Promise<PlatformAdapter>;
|
|
23
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapters/node/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAA4B,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAC1E,OAAO,EAA2B,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AACvE,OAAO,EAA0B,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAElF;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE,aAAa,CAAC;IACtB,KAAK,EAAE,YAAY,CAAC;IACpB,QAAQ,EAAE,YAAY,CAAC;CACxB;AAED;;GAEG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,eAAe,CAAC,CAWlE"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Node.js Storage Adapter
|
|
3
|
-
*
|
|
4
|
-
* Uses filesystem for storage
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Storage Adapter Interface
|
|
8
|
-
*/
|
|
9
|
-
export interface StorageAdapter {
|
|
10
|
-
secureGet(key: string): Promise<string | null>;
|
|
11
|
-
secureSet(key: string, value: string): Promise<void>;
|
|
12
|
-
secureDelete(key: string): Promise<void>;
|
|
13
|
-
isSecureStorageAvailable(): boolean;
|
|
14
|
-
get(key: string): Promise<string | null>;
|
|
15
|
-
set(key: string, value: string): Promise<void>;
|
|
16
|
-
remove(key: string): Promise<void>;
|
|
17
|
-
clear(): Promise<void>;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Create Node Storage Adapter
|
|
21
|
-
*/
|
|
22
|
-
export declare function createNodeStorageAdapter(): Promise<StorageAdapter>;
|
|
23
|
-
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../../src/adapters/node/storage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH;;GAEG;AACH,MAAM,WAAW,cAAc;IAE7B,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC/C,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,wBAAwB,IAAI,OAAO,CAAC;IAGpC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACzC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AA0CD;;GAEG;AACH,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,cAAc,CAAC,CAkGxE"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Device Manager
|
|
3
|
-
*
|
|
4
|
-
* Manages device identification and device sessions (Native + Web)
|
|
5
|
-
*/
|
|
6
|
-
import type { PlatformAdapter } from '../../adapters';
|
|
7
|
-
import type { Device, DeviceInfo } from './types';
|
|
8
|
-
/**
|
|
9
|
-
* Device Manager Class
|
|
10
|
-
*/
|
|
11
|
-
export declare class DeviceManager {
|
|
12
|
-
private adapter;
|
|
13
|
-
private cachedDevice;
|
|
14
|
-
constructor(adapter: PlatformAdapter);
|
|
15
|
-
/**
|
|
16
|
-
* Invalidate cached device
|
|
17
|
-
*/
|
|
18
|
-
invalidateCache(): void;
|
|
19
|
-
/**
|
|
20
|
-
* Get device fingerprint
|
|
21
|
-
*/
|
|
22
|
-
private getDeviceFingerprint;
|
|
23
|
-
/**
|
|
24
|
-
* Generate a unique device ID
|
|
25
|
-
*/
|
|
26
|
-
private generateDeviceId;
|
|
27
|
-
/**
|
|
28
|
-
* Get a user-friendly device name based on platform
|
|
29
|
-
*/
|
|
30
|
-
private getDefaultDeviceName;
|
|
31
|
-
/**
|
|
32
|
-
* Get stored device info or create new one
|
|
33
|
-
*/
|
|
34
|
-
getCurrentDevice(): Promise<Device | null>;
|
|
35
|
-
/**
|
|
36
|
-
* Create new device info and store it
|
|
37
|
-
*/
|
|
38
|
-
createNewDevice(): Promise<Device>;
|
|
39
|
-
/**
|
|
40
|
-
* Get device type
|
|
41
|
-
*/
|
|
42
|
-
private getDeviceType;
|
|
43
|
-
/**
|
|
44
|
-
* Save device info to storage
|
|
45
|
-
*/
|
|
46
|
-
private saveDeviceInfo;
|
|
47
|
-
/**
|
|
48
|
-
* Update device name
|
|
49
|
-
*/
|
|
50
|
-
updateDeviceName(deviceName: string): Promise<Device>;
|
|
51
|
-
/**
|
|
52
|
-
* Get device info for session creation
|
|
53
|
-
*/
|
|
54
|
-
getDeviceInfo(): Promise<DeviceInfo>;
|
|
55
|
-
/**
|
|
56
|
-
* Get browser name from user agent
|
|
57
|
-
*/
|
|
58
|
-
private getBrowserName;
|
|
59
|
-
/**
|
|
60
|
-
* Clear stored device info
|
|
61
|
-
*/
|
|
62
|
-
clearDeviceInfo(): Promise<void>;
|
|
63
|
-
}
|
|
64
|
-
//# sourceMappingURL=DeviceManager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceManager.d.ts","sourceRoot":"","sources":["../../../../src/core/identity-session/DeviceManager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAgBlD;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,YAAY,CAAuB;gBAE/B,OAAO,EAAE,eAAe;IAIpC;;OAEG;IACH,eAAe,IAAI,IAAI;IAIvB;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAoB5B;;OAEG;YACW,gBAAgB;IAK9B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAgB5B;;OAEG;IACG,gBAAgB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAqChD;;OAEG;IACG,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC;IA6BxC;;OAEG;IACH,OAAO,CAAC,aAAa;IAQrB;;OAEG;YACW,cAAc;IAY5B;;OAEG;IACG,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IA0B3D;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,UAAU,CAAC;IAuB1C;;OAEG;IACH,OAAO,CAAC,cAAc;IAatB;;OAEG;IACG,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;CAQvC"}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Identity Manager
|
|
3
|
-
*
|
|
4
|
-
* Manages cryptographic identity (OxyID) - SOLO NATIVE
|
|
5
|
-
* Handles key generation, storage, import, export, and signing operations.
|
|
6
|
-
*/
|
|
7
|
-
import type { ECKeyPair } from 'elliptic';
|
|
8
|
-
import type { PlatformAdapter } from '../../adapters';
|
|
9
|
-
import type { BackupData } from './types';
|
|
10
|
-
/**
|
|
11
|
-
* Identity Manager Class
|
|
12
|
-
*/
|
|
13
|
-
export declare class IdentityManager {
|
|
14
|
-
private adapter;
|
|
15
|
-
private cachedPublicKey;
|
|
16
|
-
private cachedHasIdentity;
|
|
17
|
-
constructor(adapter: PlatformAdapter);
|
|
18
|
-
/**
|
|
19
|
-
* Invalidate cached identity state
|
|
20
|
-
*/
|
|
21
|
-
invalidateCache(): void;
|
|
22
|
-
/**
|
|
23
|
-
* Check if identity operations are available (only on native)
|
|
24
|
-
*/
|
|
25
|
-
private ensureNativePlatform;
|
|
26
|
-
/**
|
|
27
|
-
* Convert Uint8Array to hexadecimal string
|
|
28
|
-
*/
|
|
29
|
-
private uint8ArrayToHex;
|
|
30
|
-
/**
|
|
31
|
-
* Generate a new ECDSA secp256k1 key pair
|
|
32
|
-
*/
|
|
33
|
-
generateKeyPair(): Promise<{
|
|
34
|
-
publicKey: string;
|
|
35
|
-
privateKey: string;
|
|
36
|
-
}>;
|
|
37
|
-
/**
|
|
38
|
-
* Create a new identity (generate and store key pair)
|
|
39
|
-
*/
|
|
40
|
-
createIdentity(): Promise<string>;
|
|
41
|
-
/**
|
|
42
|
-
* Import an existing key pair (e.g., from backup file)
|
|
43
|
-
*/
|
|
44
|
-
importKeyPair(privateKey: string): Promise<string>;
|
|
45
|
-
/**
|
|
46
|
-
* Get the stored private key
|
|
47
|
-
* WARNING: Only use this for signing operations within the app
|
|
48
|
-
*/
|
|
49
|
-
getPrivateKey(): Promise<string | null>;
|
|
50
|
-
/**
|
|
51
|
-
* Get the stored public key (cached for performance)
|
|
52
|
-
*/
|
|
53
|
-
getPublicKey(): Promise<string | null>;
|
|
54
|
-
/**
|
|
55
|
-
* Check if an identity (key pair) exists on this device (cached for performance)
|
|
56
|
-
*/
|
|
57
|
-
hasIdentity(): Promise<boolean>;
|
|
58
|
-
/**
|
|
59
|
-
* Delete the stored identity (both keys)
|
|
60
|
-
*/
|
|
61
|
-
deleteIdentity(skipBackup?: boolean, force?: boolean, userConfirmed?: boolean): Promise<void>;
|
|
62
|
-
/**
|
|
63
|
-
* Backup identity to SecureStore (separate backup storage)
|
|
64
|
-
*/
|
|
65
|
-
backupIdentity(): Promise<boolean>;
|
|
66
|
-
/**
|
|
67
|
-
* Restore identity from backup if primary storage is corrupted
|
|
68
|
-
*/
|
|
69
|
-
restoreIdentityFromBackup(): Promise<boolean>;
|
|
70
|
-
/**
|
|
71
|
-
* Verify identity integrity - checks if keys are valid and accessible
|
|
72
|
-
*/
|
|
73
|
-
verifyIdentityIntegrity(): Promise<boolean>;
|
|
74
|
-
/**
|
|
75
|
-
* Get the elliptic curve key object from the stored private key
|
|
76
|
-
* Used internally for signing operations
|
|
77
|
-
*/
|
|
78
|
-
getKeyPairObject(): Promise<ECKeyPair | null>;
|
|
79
|
-
/**
|
|
80
|
-
* Decrypt backup data and import identity
|
|
81
|
-
*/
|
|
82
|
-
decryptAndImportBackup(backupData: BackupData, password: string): Promise<string>;
|
|
83
|
-
/**
|
|
84
|
-
* Sign a challenge using the stored private key
|
|
85
|
-
*/
|
|
86
|
-
signChallenge(challenge: string): Promise<string>;
|
|
87
|
-
}
|
|
88
|
-
//# sourceMappingURL=IdentityManager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityManager.d.ts","sourceRoot":"","sources":["../../../../src/core/identity-session/IdentityManager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAY,UAAU,EAAE,MAAM,SAAS,CAAC;AAsBpD;;GAEG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,OAAO,CA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|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Identity Session Core
|
|
3
|
-
*
|
|
4
|
-
* Main orchestrator for identity and session management.
|
|
5
|
-
* Provides a unified API for all identity and session operations.
|
|
6
|
-
*/
|
|
7
|
-
import type { PlatformAdapter } from '../../adapters';
|
|
8
|
-
import type { Identity, Session, Device, BackupData, IdentitySessionEvent } from './types';
|
|
9
|
-
import { IdentityManager } from './IdentityManager';
|
|
10
|
-
import { SessionManager } from './SessionManager';
|
|
11
|
-
import { DeviceManager } from './DeviceManager';
|
|
12
|
-
import { RefreshManager } from './RefreshManager';
|
|
13
|
-
/**
|
|
14
|
-
* Identity Session Core Class
|
|
15
|
-
*/
|
|
16
|
-
export declare class IdentitySessionCore {
|
|
17
|
-
private adapter;
|
|
18
|
-
private identityManager;
|
|
19
|
-
private sessionManager;
|
|
20
|
-
private deviceManager;
|
|
21
|
-
private refreshManager;
|
|
22
|
-
private baseURL;
|
|
23
|
-
private eventListeners;
|
|
24
|
-
private initialized;
|
|
25
|
-
constructor(adapter: PlatformAdapter, baseURL?: string);
|
|
26
|
-
/**
|
|
27
|
-
* Set base URL for API requests
|
|
28
|
-
*/
|
|
29
|
-
setBaseURL(baseURL: string): void;
|
|
30
|
-
/**
|
|
31
|
-
* Initialize the core (load data from storage)
|
|
32
|
-
*/
|
|
33
|
-
initialize(): Promise<void>;
|
|
34
|
-
/**
|
|
35
|
-
* Emit an event to all subscribers
|
|
36
|
-
*/
|
|
37
|
-
private emit;
|
|
38
|
-
/**
|
|
39
|
-
* Get current identity (SOLO NATIVE)
|
|
40
|
-
*/
|
|
41
|
-
getCurrentIdentity(): Promise<Identity | null>;
|
|
42
|
-
/**
|
|
43
|
-
* Create a new identity (SOLO NATIVE)
|
|
44
|
-
*/
|
|
45
|
-
createIdentity(username?: string): Promise<Identity>;
|
|
46
|
-
/**
|
|
47
|
-
* Import identity from backup (SOLO NATIVE)
|
|
48
|
-
*/
|
|
49
|
-
importIdentity(backupData: BackupData, password: string): Promise<Identity>;
|
|
50
|
-
/**
|
|
51
|
-
* Delete identity (SOLO NATIVE)
|
|
52
|
-
*/
|
|
53
|
-
deleteIdentity(skipBackup?: boolean, force?: boolean, userConfirmed?: boolean): Promise<void>;
|
|
54
|
-
/**
|
|
55
|
-
* Sign a challenge (SOLO NATIVE)
|
|
56
|
-
*/
|
|
57
|
-
signChallenge(challenge: string): Promise<string>;
|
|
58
|
-
/**
|
|
59
|
-
* Generate a random challenge string
|
|
60
|
-
*/
|
|
61
|
-
generateChallenge(): Promise<string>;
|
|
62
|
-
/**
|
|
63
|
-
* Create a registration signature (SOLO NATIVE)
|
|
64
|
-
*/
|
|
65
|
-
createRegistrationSignature(): Promise<{
|
|
66
|
-
signature: string;
|
|
67
|
-
publicKey: string;
|
|
68
|
-
timestamp: number;
|
|
69
|
-
}>;
|
|
70
|
-
/**
|
|
71
|
-
* Sign challenge for authentication (SOLO NATIVE)
|
|
72
|
-
* Returns AuthChallenge object with signature, publicKey, and timestamp
|
|
73
|
-
*/
|
|
74
|
-
signChallengeForAuth(challenge: string): Promise<{
|
|
75
|
-
challenge: string;
|
|
76
|
-
signature: string;
|
|
77
|
-
publicKey: string;
|
|
78
|
-
timestamp: number;
|
|
79
|
-
}>;
|
|
80
|
-
/**
|
|
81
|
-
* Check if identity exists
|
|
82
|
-
*/
|
|
83
|
-
hasIdentity(): Promise<boolean>;
|
|
84
|
-
/**
|
|
85
|
-
* Get public key
|
|
86
|
-
*/
|
|
87
|
-
getPublicKey(): Promise<string | null>;
|
|
88
|
-
/**
|
|
89
|
-
* Get current session (Native + Web)
|
|
90
|
-
*/
|
|
91
|
-
getSession(): Promise<Session | null>;
|
|
92
|
-
/**
|
|
93
|
-
* Get all sessions (Native + Web)
|
|
94
|
-
*/
|
|
95
|
-
getAllSessions(): Promise<Session[]>;
|
|
96
|
-
/**
|
|
97
|
-
* Get active session ID (Native + Web)
|
|
98
|
-
*/
|
|
99
|
-
getActiveSessionId(): Promise<string | null>;
|
|
100
|
-
/**
|
|
101
|
-
* Create a new session (sign in) (Native + Web)
|
|
102
|
-
*/
|
|
103
|
-
createSession(deviceName?: string): Promise<Session>;
|
|
104
|
-
/**
|
|
105
|
-
* Refresh current session (Native + Web)
|
|
106
|
-
*/
|
|
107
|
-
refreshSession(): Promise<Session>;
|
|
108
|
-
/**
|
|
109
|
-
* Invalidate a session (Native + Web)
|
|
110
|
-
*/
|
|
111
|
-
invalidateSession(sessionId?: string): Promise<void>;
|
|
112
|
-
/**
|
|
113
|
-
* Invalidate all sessions (Native + Web)
|
|
114
|
-
*/
|
|
115
|
-
invalidateAllSessions(): Promise<void>;
|
|
116
|
-
/**
|
|
117
|
-
* Get current device (Native + Web)
|
|
118
|
-
*/
|
|
119
|
-
getCurrentDevice(): Promise<Device | null>;
|
|
120
|
-
/**
|
|
121
|
-
* Subscribe to identity and session events
|
|
122
|
-
*/
|
|
123
|
-
subscribe(callback: (event: IdentitySessionEvent) => void): () => void;
|
|
124
|
-
/**
|
|
125
|
-
* Get identity manager (for advanced operations)
|
|
126
|
-
*/
|
|
127
|
-
getIdentityManager(): IdentityManager;
|
|
128
|
-
/**
|
|
129
|
-
* Get session manager (for advanced operations)
|
|
130
|
-
*/
|
|
131
|
-
getSessionManager(): SessionManager;
|
|
132
|
-
/**
|
|
133
|
-
* Get device manager (for advanced operations)
|
|
134
|
-
*/
|
|
135
|
-
getDeviceManager(): DeviceManager;
|
|
136
|
-
/**
|
|
137
|
-
* Get refresh manager (for advanced operations)
|
|
138
|
-
*/
|
|
139
|
-
getRefreshManager(): RefreshManager;
|
|
140
|
-
}
|
|
141
|
-
//# sourceMappingURL=IdentitySessionCore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IdentitySessionCore.d.ts","sourceRoot":"","sources":["../../../../src/core/identity-session/IdentitySessionCore.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,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AAK,IAAI,GAAG,MAAM,IAAI;IAWtE;;OAEG;IACH,kBAAkB,IAAI,eAAe;IAIrC;;OAEG;IACH,iBAAiB,IAAI,cAAc;IAInC;;OAEG;IACH,gBAAgB,IAAI,aAAa;IAIjC;;OAEG;IACH,iBAAiB,IAAI,cAAc;CAGpC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Refresh Manager
|
|
3
|
-
*
|
|
4
|
-
* Manages token refresh operations (Native + Web)
|
|
5
|
-
*/
|
|
6
|
-
import type { PlatformAdapter } from '../../adapters';
|
|
7
|
-
/**
|
|
8
|
-
* Refresh Manager Class
|
|
9
|
-
*/
|
|
10
|
-
export declare class RefreshManager {
|
|
11
|
-
private adapter;
|
|
12
|
-
private baseURL;
|
|
13
|
-
private refreshPromise;
|
|
14
|
-
constructor(adapter: PlatformAdapter, baseURL?: string);
|
|
15
|
-
/**
|
|
16
|
-
* Set base URL for API requests
|
|
17
|
-
*/
|
|
18
|
-
setBaseURL(baseURL: string): void;
|
|
19
|
-
/**
|
|
20
|
-
* Check if token is expiring soon (within 60 seconds)
|
|
21
|
-
*/
|
|
22
|
-
isTokenExpiringSoon(accessToken: string | null): boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Get userId from access token
|
|
25
|
-
*/
|
|
26
|
-
getUserIdFromToken(accessToken: string | null): string | null;
|
|
27
|
-
/**
|
|
28
|
-
* Refresh access token if expiring soon
|
|
29
|
-
*/
|
|
30
|
-
refreshTokenIfNeeded(getAccessToken: () => string | null, setTokens: (accessToken: string, refreshToken?: string) => void, clearTokens: () => void): Promise<void>;
|
|
31
|
-
/**
|
|
32
|
-
* Perform token refresh
|
|
33
|
-
*/
|
|
34
|
-
private _performRefresh;
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=RefreshManager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RefreshManager.d.ts","sourceRoot":"","sources":["../../../../src/core/identity-session/RefreshManager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAetD;;GAEG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,cAAc,CAA8B;gBAExC,OAAO,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,MAAM;IAKtD;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIjC;;OAEG;IACH,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO;IAcxD;;OAEG;IACH,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI;IAW7D;;OAEG;IACG,oBAAoB,CACxB,cAAc,EAAE,MAAM,MAAM,GAAG,IAAI,EACnC,SAAS,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,KAAK,IAAI,EAC/D,WAAW,EAAE,MAAM,IAAI,GACtB,OAAO,CAAC,IAAI,CAAC;IA4BhB;;OAEG;YACW,eAAe;CA4E9B"}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Session Manager
|
|
3
|
-
*
|
|
4
|
-
* Manages user sessions (Native + Web)
|
|
5
|
-
* Handles session creation, storage, refresh, and invalidation.
|
|
6
|
-
*/
|
|
7
|
-
import type { PlatformAdapter } from '../../adapters';
|
|
8
|
-
import type { Session } from './types';
|
|
9
|
-
import { DeviceManager } from './DeviceManager';
|
|
10
|
-
import { RefreshManager } from './RefreshManager';
|
|
11
|
-
/**
|
|
12
|
-
* Session Manager Class
|
|
13
|
-
*/
|
|
14
|
-
export declare class SessionManager {
|
|
15
|
-
private adapter;
|
|
16
|
-
private deviceManager;
|
|
17
|
-
private refreshManager;
|
|
18
|
-
private baseURL;
|
|
19
|
-
private cachedSessions;
|
|
20
|
-
private cachedActiveSessionId;
|
|
21
|
-
private tokenStore;
|
|
22
|
-
constructor(adapter: PlatformAdapter, deviceManager: DeviceManager, refreshManager: RefreshManager, baseURL?: string);
|
|
23
|
-
/**
|
|
24
|
-
* Set base URL for API requests
|
|
25
|
-
*/
|
|
26
|
-
setBaseURL(baseURL: string): void;
|
|
27
|
-
/**
|
|
28
|
-
* Invalidate cached sessions
|
|
29
|
-
*/
|
|
30
|
-
invalidateCache(): void;
|
|
31
|
-
/**
|
|
32
|
-
* Load tokens from storage
|
|
33
|
-
*/
|
|
34
|
-
private loadTokens;
|
|
35
|
-
/**
|
|
36
|
-
* Save tokens to storage
|
|
37
|
-
*/
|
|
38
|
-
private saveTokens;
|
|
39
|
-
/**
|
|
40
|
-
* Get access token
|
|
41
|
-
*/
|
|
42
|
-
getAccessToken(): string | null;
|
|
43
|
-
/**
|
|
44
|
-
* Get refresh token
|
|
45
|
-
*/
|
|
46
|
-
getRefreshToken(): string | null;
|
|
47
|
-
/**
|
|
48
|
-
* Set tokens
|
|
49
|
-
*/
|
|
50
|
-
setTokens(accessToken: string, refreshToken?: string): Promise<void>;
|
|
51
|
-
/**
|
|
52
|
-
* Clear tokens
|
|
53
|
-
*/
|
|
54
|
-
clearTokens(): Promise<void>;
|
|
55
|
-
/**
|
|
56
|
-
* Load sessions from storage
|
|
57
|
-
*/
|
|
58
|
-
loadSessions(): Promise<Session[]>;
|
|
59
|
-
/**
|
|
60
|
-
* Save sessions to storage
|
|
61
|
-
*/
|
|
62
|
-
private saveSessions;
|
|
63
|
-
/**
|
|
64
|
-
* Get active session ID
|
|
65
|
-
*/
|
|
66
|
-
getActiveSessionId(): Promise<string | null>;
|
|
67
|
-
/**
|
|
68
|
-
* Set active session ID
|
|
69
|
-
*/
|
|
70
|
-
setActiveSessionId(sessionId: string | null): Promise<void>;
|
|
71
|
-
/**
|
|
72
|
-
* Get all sessions
|
|
73
|
-
*/
|
|
74
|
-
getAllSessions(): Promise<Session[]>;
|
|
75
|
-
/**
|
|
76
|
-
* Get current session
|
|
77
|
-
*/
|
|
78
|
-
getSession(): Promise<Session | null>;
|
|
79
|
-
/**
|
|
80
|
-
* Create a new session (sign in)
|
|
81
|
-
*/
|
|
82
|
-
createSession(publicKey: string, signature: string, timestamp: number, deviceName?: string): Promise<Session>;
|
|
83
|
-
/**
|
|
84
|
-
* Refresh current session
|
|
85
|
-
*/
|
|
86
|
-
refreshSession(): Promise<Session>;
|
|
87
|
-
/**
|
|
88
|
-
* Invalidate a session
|
|
89
|
-
*/
|
|
90
|
-
invalidateSession(sessionId?: string): Promise<void>;
|
|
91
|
-
/**
|
|
92
|
-
* Clear local session data
|
|
93
|
-
*/
|
|
94
|
-
private clearLocalSession;
|
|
95
|
-
/**
|
|
96
|
-
* Invalidate all sessions
|
|
97
|
-
*/
|
|
98
|
-
invalidateAllSessions(): Promise<void>;
|
|
99
|
-
/**
|
|
100
|
-
* Initialize - load tokens and sessions from storage
|
|
101
|
-
*/
|
|
102
|
-
initialize(): Promise<void>;
|
|
103
|
-
}
|
|
104
|
-
//# sourceMappingURL=SessionManager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SessionManager.d.ts","sourceRoot":"","sources":["../../../../src/core/identity-session/SessionManager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,OAAO,EAAY,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAwBlD;;GAEG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,cAAc,CAA0B;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AAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA2B1D;;OAEG;YACW,iBAAiB;IAa/B;;OAEG;IACG,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC;IAwB5C;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAIlC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Create Identity Session Core
|
|
3
|
-
*
|
|
4
|
-
* Factory function to create and initialize IdentitySessionCore
|
|
5
|
-
*/
|
|
6
|
-
import { IdentitySessionCore } from './IdentitySessionCore';
|
|
7
|
-
/**
|
|
8
|
-
* Create and initialize IdentitySessionCore
|
|
9
|
-
*/
|
|
10
|
-
export declare function createIdentitySessionCore(baseURL?: string): Promise<IdentitySessionCore>;
|
|
11
|
-
//# sourceMappingURL=createIdentitySessionCore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createIdentitySessionCore.d.ts","sourceRoot":"","sources":["../../../../src/core/identity-session/createIdentitySessionCore.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;GAEG;AACH,wBAAsB,yBAAyB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAK9F"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Identity and Session Error Codes
|
|
3
|
-
*
|
|
4
|
-
* Aligned with backend error codes for consistency across the ecosystem
|
|
5
|
-
*/
|
|
6
|
-
export declare const IdentitySessionErrorCodes: {
|
|
7
|
-
readonly UNAUTHORIZED: "UNAUTHORIZED";
|
|
8
|
-
readonly FORBIDDEN: "FORBIDDEN";
|
|
9
|
-
readonly INVALID_TOKEN: "INVALID_TOKEN";
|
|
10
|
-
readonly MISSING_TOKEN: "MISSING_TOKEN";
|
|
11
|
-
readonly TOKEN_EXPIRED: "TOKEN_EXPIRED";
|
|
12
|
-
readonly TOKEN_NOT_YET_VALID: "TOKEN_NOT_YET_VALID";
|
|
13
|
-
readonly INVALID_SIGNATURE: "INVALID_SIGNATURE";
|
|
14
|
-
readonly MALFORMED_TOKEN: "MALFORMED_TOKEN";
|
|
15
|
-
readonly INVALID_SESSION: "INVALID_SESSION";
|
|
16
|
-
readonly IDENTITY_NOT_FOUND: "IDENTITY_NOT_FOUND";
|
|
17
|
-
readonly IDENTITY_ALREADY_EXISTS: "IDENTITY_ALREADY_EXISTS";
|
|
18
|
-
readonly IDENTITY_NOT_AVAILABLE_ON_WEB: "IDENTITY_NOT_AVAILABLE_ON_WEB";
|
|
19
|
-
readonly IDENTITY_NOT_SYNCED: "IDENTITY_NOT_SYNCED";
|
|
20
|
-
readonly INVALID_PUBLIC_KEY: "INVALID_PUBLIC_KEY";
|
|
21
|
-
readonly INVALID_PRIVATE_KEY: "INVALID_PRIVATE_KEY";
|
|
22
|
-
readonly IDENTITY_CREATION_FAILED: "IDENTITY_CREATION_FAILED";
|
|
23
|
-
readonly IDENTITY_IMPORT_FAILED: "IDENTITY_IMPORT_FAILED";
|
|
24
|
-
readonly IDENTITY_DELETE_FAILED: "IDENTITY_DELETE_FAILED";
|
|
25
|
-
readonly BACKUP_DECRYPTION_FAILED: "BACKUP_DECRYPTION_FAILED";
|
|
26
|
-
readonly SESSION_NOT_FOUND: "SESSION_NOT_FOUND";
|
|
27
|
-
readonly SESSION_EXPIRED: "SESSION_EXPIRED";
|
|
28
|
-
readonly SESSION_INVALID: "SESSION_INVALID";
|
|
29
|
-
readonly SESSION_CREATION_FAILED: "SESSION_CREATION_FAILED";
|
|
30
|
-
readonly SESSION_REFRESH_FAILED: "SESSION_REFRESH_FAILED";
|
|
31
|
-
readonly DEVICE_NOT_FOUND: "DEVICE_NOT_FOUND";
|
|
32
|
-
readonly DEVICE_CREATION_FAILED: "DEVICE_CREATION_FAILED";
|
|
33
|
-
readonly VALIDATION_ERROR: "VALIDATION_ERROR";
|
|
34
|
-
readonly BAD_REQUEST: "BAD_REQUEST";
|
|
35
|
-
readonly MISSING_PARAMETER: "MISSING_PARAMETER";
|
|
36
|
-
readonly INVALID_FORMAT: "INVALID_FORMAT";
|
|
37
|
-
readonly NOT_FOUND: "NOT_FOUND";
|
|
38
|
-
readonly ALREADY_EXISTS: "ALREADY_EXISTS";
|
|
39
|
-
readonly CONFLICT: "CONFLICT";
|
|
40
|
-
readonly INTERNAL_ERROR: "INTERNAL_ERROR";
|
|
41
|
-
readonly SERVICE_UNAVAILABLE: "SERVICE_UNAVAILABLE";
|
|
42
|
-
readonly TIMEOUT: "TIMEOUT";
|
|
43
|
-
readonly NETWORK_ERROR: "NETWORK_ERROR";
|
|
44
|
-
readonly CONNECTION_FAILED: "CONNECTION_FAILED";
|
|
45
|
-
readonly STORAGE_ERROR: "STORAGE_ERROR";
|
|
46
|
-
readonly STORAGE_NOT_AVAILABLE: "STORAGE_NOT_AVAILABLE";
|
|
47
|
-
readonly SECURE_STORAGE_NOT_AVAILABLE: "SECURE_STORAGE_NOT_AVAILABLE";
|
|
48
|
-
readonly UNKNOWN_ERROR: "UNKNOWN_ERROR";
|
|
49
|
-
};
|
|
50
|
-
export type IdentitySessionErrorCode = typeof IdentitySessionErrorCodes[keyof typeof IdentitySessionErrorCodes];
|
|
51
|
-
/**
|
|
52
|
-
* IdentitySessionError - Custom error class for identity and session operations
|
|
53
|
-
*/
|
|
54
|
-
export declare class IdentitySessionError extends Error {
|
|
55
|
-
readonly code: IdentitySessionErrorCode;
|
|
56
|
-
readonly statusCode: number;
|
|
57
|
-
constructor(message: string, code?: IdentitySessionErrorCode, statusCode?: number);
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Create error from code
|
|
61
|
-
*/
|
|
62
|
-
export declare function createIdentitySessionError(code: IdentitySessionErrorCode, message?: string, statusCode?: number): IdentitySessionError;
|
|
63
|
-
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/core/identity-session/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8D5B,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAAG,OAAO,yBAAyB,CAAC,MAAM,OAAO,yBAAyB,CAAC,CAAC;AAEhH;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,SAAgB,IAAI,EAAE,wBAAwB,CAAC;IAC/C,SAAgB,UAAU,EAAE,MAAM,CAAC;gBAGjC,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,wBAAkE,EACxE,UAAU,GAAE,MAAY;CAQ3B;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,MAAM,GAClB,oBAAoB,CAgGtB"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Identity Session Core
|
|
3
|
-
*
|
|
4
|
-
* Main entry point for identity and session management
|
|
5
|
-
*/
|
|
6
|
-
export { IdentitySessionCore } from './IdentitySessionCore';
|
|
7
|
-
export { IdentityManager } from './IdentityManager';
|
|
8
|
-
export { SessionManager } from './SessionManager';
|
|
9
|
-
export { DeviceManager } from './DeviceManager';
|
|
10
|
-
export { RefreshManager } from './RefreshManager';
|
|
11
|
-
export { createIdentitySessionCore } from './createIdentitySessionCore';
|
|
12
|
-
export * from './types';
|
|
13
|
-
export * from './errors';
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/identity-session/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
|