@replyke/core 5.1.6-beta.0 → 5.1.6-beta.2
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/dist/cjs/context/index.d.ts +0 -1
- package/dist/cjs/context/index.js +3 -3
- package/dist/cjs/context/index.js.map +1 -1
- package/dist/cjs/helpers/addNotificationsMessages.js +7 -7
- package/dist/cjs/helpers/addNotificationsMessages.js.map +1 -1
- package/dist/cjs/hooks/app-notifications-redux/index.d.ts +1 -2
- package/dist/cjs/hooks/app-notifications-redux/index.js +1 -3
- package/dist/cjs/hooks/app-notifications-redux/index.js.map +1 -1
- package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.d.ts +18 -4
- package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.js +78 -8
- package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.js.map +1 -1
- package/dist/cjs/hooks/lists-redux/index.d.ts +2 -0
- package/dist/cjs/hooks/lists-redux/index.js +12 -0
- package/dist/cjs/hooks/lists-redux/index.js.map +1 -0
- package/dist/cjs/hooks/lists-redux/useListsActionsRedux.d.ts +21 -0
- package/dist/cjs/hooks/lists-redux/useListsActionsRedux.js +329 -0
- package/dist/cjs/hooks/lists-redux/useListsActionsRedux.js.map +1 -0
- package/dist/cjs/hooks/{lists/useListsData.d.ts → lists-redux/useListsRedux.d.ts} +9 -5
- package/dist/cjs/hooks/lists-redux/useListsRedux.js +239 -0
- package/dist/cjs/hooks/lists-redux/useListsRedux.js.map +1 -0
- package/dist/cjs/hooks/user-redux/index.d.ts +2 -0
- package/dist/cjs/hooks/user-redux/index.js +12 -0
- package/dist/cjs/hooks/user-redux/index.js.map +1 -0
- package/dist/cjs/hooks/user-redux/useUserActionsRedux.d.ts +12 -0
- package/dist/cjs/hooks/user-redux/useUserActionsRedux.js +125 -0
- package/dist/cjs/hooks/user-redux/useUserActionsRedux.js.map +1 -0
- package/dist/cjs/hooks/user-redux/useUserRedux.d.ts +18 -0
- package/dist/cjs/hooks/user-redux/useUserRedux.js +116 -0
- package/dist/cjs/hooks/user-redux/useUserRedux.js.map +1 -0
- package/dist/cjs/hooks/users/index.d.ts +0 -2
- package/dist/cjs/hooks/users/index.js +4 -5
- package/dist/cjs/hooks/users/index.js.map +1 -1
- package/dist/cjs/index.d.ts +7 -6
- package/dist/cjs/index.js +11 -18
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/store/api/appNotificationsApi.d.ts +144 -141
- package/dist/cjs/store/api/appNotificationsApi.js +11 -0
- package/dist/cjs/store/api/appNotificationsApi.js.map +1 -1
- package/dist/cjs/store/api/baseApi.d.ts +1 -1
- package/dist/cjs/store/api/baseApi.js +2 -2
- package/dist/cjs/store/api/baseApi.js.map +1 -1
- package/dist/cjs/store/api/index.d.ts +1 -0
- package/dist/cjs/store/api/index.js +2 -1
- package/dist/cjs/store/api/index.js.map +1 -1
- package/dist/cjs/store/api/listsApi.d.ts +3044 -0
- package/dist/cjs/store/api/listsApi.js +288 -0
- package/dist/cjs/store/api/listsApi.js.map +1 -0
- package/dist/cjs/store/api/userApi.d.ts +183 -0
- package/dist/cjs/store/api/userApi.js +38 -0
- package/dist/cjs/store/api/userApi.js.map +1 -0
- package/dist/cjs/store/index.d.ts +6 -2
- package/dist/cjs/store/rootReducer.d.ts +6 -2
- package/dist/cjs/store/rootReducer.js +4 -0
- package/dist/cjs/store/rootReducer.js.map +1 -1
- package/dist/cjs/store/slices/authThunks.js +6 -0
- package/dist/cjs/store/slices/authThunks.js.map +1 -1
- package/dist/cjs/store/slices/listsSlice.d.ts +66 -0
- package/dist/cjs/store/slices/listsSlice.js +213 -0
- package/dist/cjs/store/slices/listsSlice.js.map +1 -0
- package/dist/cjs/store/slices/userSlice.d.ts +29 -0
- package/dist/cjs/store/slices/userSlice.js +87 -0
- package/dist/cjs/store/slices/userSlice.js.map +1 -0
- package/dist/esm/context/index.d.ts +0 -1
- package/dist/esm/context/index.js +2 -1
- package/dist/esm/context/index.js.map +1 -1
- package/dist/esm/helpers/addNotificationsMessages.js +7 -7
- package/dist/esm/helpers/addNotificationsMessages.js.map +1 -1
- package/dist/esm/hooks/app-notifications-redux/index.d.ts +1 -2
- package/dist/esm/hooks/app-notifications-redux/index.js +0 -1
- package/dist/esm/hooks/app-notifications-redux/index.js.map +1 -1
- package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.d.ts +18 -4
- package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.js +77 -9
- package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.js.map +1 -1
- package/dist/esm/hooks/lists-redux/index.d.ts +2 -0
- package/dist/esm/hooks/lists-redux/index.js +4 -0
- package/dist/esm/hooks/lists-redux/index.js.map +1 -0
- package/dist/esm/hooks/lists-redux/useListsActionsRedux.d.ts +21 -0
- package/dist/esm/hooks/lists-redux/useListsActionsRedux.js +326 -0
- package/dist/esm/hooks/lists-redux/useListsActionsRedux.js.map +1 -0
- package/dist/esm/hooks/{lists/useListsData.d.ts → lists-redux/useListsRedux.d.ts} +9 -5
- package/dist/esm/hooks/lists-redux/useListsRedux.js +234 -0
- package/dist/esm/hooks/lists-redux/useListsRedux.js.map +1 -0
- package/dist/esm/hooks/user-redux/index.d.ts +2 -0
- package/dist/esm/hooks/user-redux/index.js +4 -0
- package/dist/esm/hooks/user-redux/index.js.map +1 -0
- package/dist/esm/hooks/user-redux/useUserActionsRedux.d.ts +12 -0
- package/dist/esm/hooks/user-redux/useUserActionsRedux.js +122 -0
- package/dist/esm/hooks/user-redux/useUserActionsRedux.js.map +1 -0
- package/dist/esm/hooks/user-redux/useUserRedux.d.ts +18 -0
- package/dist/esm/hooks/user-redux/useUserRedux.js +111 -0
- package/dist/esm/hooks/user-redux/useUserRedux.js.map +1 -0
- package/dist/esm/hooks/users/index.d.ts +0 -2
- package/dist/esm/hooks/users/index.js +3 -2
- package/dist/esm/hooks/users/index.js.map +1 -1
- package/dist/esm/index.d.ts +7 -6
- package/dist/esm/index.js +9 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/store/api/appNotificationsApi.d.ts +144 -141
- package/dist/esm/store/api/appNotificationsApi.js +11 -0
- package/dist/esm/store/api/appNotificationsApi.js.map +1 -1
- package/dist/esm/store/api/baseApi.d.ts +1 -1
- package/dist/esm/store/api/baseApi.js +2 -2
- package/dist/esm/store/api/baseApi.js.map +1 -1
- package/dist/esm/store/api/index.d.ts +1 -0
- package/dist/esm/store/api/index.js +2 -1
- package/dist/esm/store/api/index.js.map +1 -1
- package/dist/esm/store/api/listsApi.d.ts +3044 -0
- package/dist/esm/store/api/listsApi.js +285 -0
- package/dist/esm/store/api/listsApi.js.map +1 -0
- package/dist/esm/store/api/userApi.d.ts +183 -0
- package/dist/esm/store/api/userApi.js +35 -0
- package/dist/esm/store/api/userApi.js.map +1 -0
- package/dist/esm/store/index.d.ts +6 -2
- package/dist/esm/store/rootReducer.d.ts +6 -2
- package/dist/esm/store/rootReducer.js +4 -0
- package/dist/esm/store/rootReducer.js.map +1 -1
- package/dist/esm/store/slices/authThunks.js +6 -0
- package/dist/esm/store/slices/authThunks.js.map +1 -1
- package/dist/esm/store/slices/listsSlice.d.ts +66 -0
- package/dist/esm/store/slices/listsSlice.js +203 -0
- package/dist/esm/store/slices/listsSlice.js.map +1 -0
- package/dist/esm/store/slices/userSlice.d.ts +29 -0
- package/dist/esm/store/slices/userSlice.js +78 -0
- package/dist/esm/store/slices/userSlice.js.map +1 -0
- package/package.json +1 -1
- package/dist/cjs/context/lists-context.d.ts +0 -9
- package/dist/cjs/context/lists-context.js +0 -17
- package/dist/cjs/context/lists-context.js.map +0 -1
- package/dist/cjs/context/user-context.d.ts +0 -8
- package/dist/cjs/context/user-context.js +0 -28
- package/dist/cjs/context/user-context.js.map +0 -1
- package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.d.ts +0 -21
- package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.js +0 -108
- package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.js.map +0 -1
- package/dist/cjs/hooks/lists/index.d.ts +0 -10
- package/dist/cjs/hooks/lists/index.js +0 -27
- package/dist/cjs/hooks/lists/index.js.map +0 -1
- package/dist/cjs/hooks/lists/useAddToList.d.ts +0 -6
- package/dist/cjs/hooks/lists/useAddToList.js +0 -70
- package/dist/cjs/hooks/lists/useAddToList.js.map +0 -1
- package/dist/cjs/hooks/lists/useCreateList.d.ts +0 -6
- package/dist/cjs/hooks/lists/useCreateList.js +0 -70
- package/dist/cjs/hooks/lists/useCreateList.js.map +0 -1
- package/dist/cjs/hooks/lists/useDeleteList.d.ts +0 -4
- package/dist/cjs/hooks/lists/useDeleteList.js +0 -69
- package/dist/cjs/hooks/lists/useDeleteList.js.map +0 -1
- package/dist/cjs/hooks/lists/useFetchRootList.d.ts +0 -3
- package/dist/cjs/hooks/lists/useFetchRootList.js +0 -69
- package/dist/cjs/hooks/lists/useFetchRootList.js.map +0 -1
- package/dist/cjs/hooks/lists/useFetchSubLists.d.ts +0 -5
- package/dist/cjs/hooks/lists/useFetchSubLists.js +0 -68
- package/dist/cjs/hooks/lists/useFetchSubLists.js.map +0 -1
- package/dist/cjs/hooks/lists/useIsEntitySaved.d.ts +0 -5
- package/dist/cjs/hooks/lists/useIsEntitySaved.js +0 -78
- package/dist/cjs/hooks/lists/useIsEntitySaved.js.map +0 -1
- package/dist/cjs/hooks/lists/useLists.d.ts +0 -2
- package/dist/cjs/hooks/lists/useLists.js +0 -9
- package/dist/cjs/hooks/lists/useLists.js.map +0 -1
- package/dist/cjs/hooks/lists/useListsData.js +0 -391
- package/dist/cjs/hooks/lists/useListsData.js.map +0 -1
- package/dist/cjs/hooks/lists/useRemoveFromList.d.ts +0 -6
- package/dist/cjs/hooks/lists/useRemoveFromList.js +0 -70
- package/dist/cjs/hooks/lists/useRemoveFromList.js.map +0 -1
- package/dist/cjs/hooks/lists/useUpdateList.d.ts +0 -8
- package/dist/cjs/hooks/lists/useUpdateList.js +0 -70
- package/dist/cjs/hooks/lists/useUpdateList.js.map +0 -1
- package/dist/cjs/hooks/users/useUser.d.ts +0 -2
- package/dist/cjs/hooks/users/useUser.js +0 -9
- package/dist/cjs/hooks/users/useUser.js.map +0 -1
- package/dist/cjs/hooks/users/useUserData.d.ts +0 -12
- package/dist/cjs/hooks/users/useUserData.js +0 -76
- package/dist/cjs/hooks/users/useUserData.js.map +0 -1
- package/dist/cjs/legacy/context/app-notifications-context.d.ts +0 -8
- package/dist/cjs/legacy/context/app-notifications-context.js +0 -28
- package/dist/cjs/legacy/context/app-notifications-context.js.map +0 -1
- package/dist/cjs/legacy/context/auth-context.d.ts +0 -8
- package/dist/cjs/legacy/context/auth-context.js +0 -29
- package/dist/cjs/legacy/context/auth-context.js.map +0 -1
- package/dist/cjs/legacy/hooks/app-notifications/index.d.ts +0 -5
- package/dist/cjs/legacy/hooks/app-notifications/index.js +0 -17
- package/dist/cjs/legacy/hooks/app-notifications/index.js.map +0 -1
- package/dist/cjs/legacy/hooks/app-notifications/useAppNotifications.d.ts +0 -2
- package/dist/cjs/legacy/hooks/app-notifications/useAppNotifications.js +0 -9
- package/dist/cjs/legacy/hooks/app-notifications/useAppNotifications.js.map +0 -1
- package/dist/cjs/legacy/hooks/app-notifications/useAppNotificationsData.d.ts +0 -16
- package/dist/cjs/legacy/hooks/app-notifications/useAppNotificationsData.js +0 -225
- package/dist/cjs/legacy/hooks/app-notifications/useAppNotificationsData.js.map +0 -1
- package/dist/cjs/legacy/hooks/app-notifications/useCountUnreadNotifications.d.ts +0 -2
- package/dist/cjs/legacy/hooks/app-notifications/useCountUnreadNotifications.js +0 -72
- package/dist/cjs/legacy/hooks/app-notifications/useCountUnreadNotifications.js.map +0 -1
- package/dist/cjs/legacy/hooks/app-notifications/useFetchAppNotifications.d.ts +0 -6
- package/dist/cjs/legacy/hooks/app-notifications/useFetchAppNotifications.js +0 -79
- package/dist/cjs/legacy/hooks/app-notifications/useFetchAppNotifications.js.map +0 -1
- package/dist/cjs/legacy/hooks/app-notifications/useMarkNotificationAsRead.d.ts +0 -2
- package/dist/cjs/legacy/hooks/app-notifications/useMarkNotificationAsRead.js +0 -74
- package/dist/cjs/legacy/hooks/app-notifications/useMarkNotificationAsRead.js.map +0 -1
- package/dist/cjs/legacy/hooks/auth/index.d.ts +0 -8
- package/dist/cjs/legacy/hooks/auth/index.js +0 -23
- package/dist/cjs/legacy/hooks/auth/index.js.map +0 -1
- package/dist/cjs/legacy/hooks/auth/useAuth.d.ts +0 -2
- package/dist/cjs/legacy/hooks/auth/useAuth.js +0 -9
- package/dist/cjs/legacy/hooks/auth/useAuth.js.map +0 -1
- package/dist/cjs/legacy/hooks/auth/useAuthData.d.ts +0 -41
- package/dist/cjs/legacy/hooks/auth/useAuthData.js +0 -271
- package/dist/cjs/legacy/hooks/auth/useAuthData.js.map +0 -1
- package/dist/cjs/legacy/hooks/auth/useChangePassword.d.ts +0 -5
- package/dist/cjs/legacy/hooks/auth/useChangePassword.js +0 -70
- package/dist/cjs/legacy/hooks/auth/useChangePassword.js.map +0 -1
- package/dist/cjs/legacy/hooks/auth/useRequestNewAccessToken.d.ts +0 -7
- package/dist/cjs/legacy/hooks/auth/useRequestNewAccessToken.js +0 -71
- package/dist/cjs/legacy/hooks/auth/useRequestNewAccessToken.js.map +0 -1
- package/dist/cjs/legacy/hooks/auth/useSignInWithEmailAndPassword.d.ts +0 -9
- package/dist/cjs/legacy/hooks/auth/useSignInWithEmailAndPassword.js +0 -72
- package/dist/cjs/legacy/hooks/auth/useSignInWithEmailAndPassword.js.map +0 -1
- package/dist/cjs/legacy/hooks/auth/useSignOut.d.ts +0 -4
- package/dist/cjs/legacy/hooks/auth/useSignOut.js +0 -67
- package/dist/cjs/legacy/hooks/auth/useSignOut.js.map +0 -1
- package/dist/cjs/legacy/hooks/auth/useSignUpWithEmailAndPassword.d.ts +0 -20
- package/dist/cjs/legacy/hooks/auth/useSignUpWithEmailAndPassword.js +0 -80
- package/dist/cjs/legacy/hooks/auth/useSignUpWithEmailAndPassword.js.map +0 -1
- package/dist/cjs/legacy/hooks/auth/useVerifyExternalUser.d.ts +0 -8
- package/dist/cjs/legacy/hooks/auth/useVerifyExternalUser.js +0 -70
- package/dist/cjs/legacy/hooks/auth/useVerifyExternalUser.js.map +0 -1
- package/dist/esm/context/lists-context.d.ts +0 -9
- package/dist/esm/context/lists-context.js +0 -10
- package/dist/esm/context/lists-context.js.map +0 -1
- package/dist/esm/context/user-context.d.ts +0 -8
- package/dist/esm/context/user-context.js +0 -21
- package/dist/esm/context/user-context.js.map +0 -1
- package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.d.ts +0 -21
- package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.js +0 -103
- package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.js.map +0 -1
- package/dist/esm/hooks/lists/index.d.ts +0 -10
- package/dist/esm/hooks/lists/index.js +0 -11
- package/dist/esm/hooks/lists/index.js.map +0 -1
- package/dist/esm/hooks/lists/useAddToList.d.ts +0 -6
- package/dist/esm/hooks/lists/useAddToList.js +0 -65
- package/dist/esm/hooks/lists/useAddToList.js.map +0 -1
- package/dist/esm/hooks/lists/useCreateList.d.ts +0 -6
- package/dist/esm/hooks/lists/useCreateList.js +0 -65
- package/dist/esm/hooks/lists/useCreateList.js.map +0 -1
- package/dist/esm/hooks/lists/useDeleteList.d.ts +0 -4
- package/dist/esm/hooks/lists/useDeleteList.js +0 -64
- package/dist/esm/hooks/lists/useDeleteList.js.map +0 -1
- package/dist/esm/hooks/lists/useFetchRootList.d.ts +0 -3
- package/dist/esm/hooks/lists/useFetchRootList.js +0 -64
- package/dist/esm/hooks/lists/useFetchRootList.js.map +0 -1
- package/dist/esm/hooks/lists/useFetchSubLists.d.ts +0 -5
- package/dist/esm/hooks/lists/useFetchSubLists.js +0 -63
- package/dist/esm/hooks/lists/useFetchSubLists.js.map +0 -1
- package/dist/esm/hooks/lists/useIsEntitySaved.d.ts +0 -5
- package/dist/esm/hooks/lists/useIsEntitySaved.js +0 -73
- package/dist/esm/hooks/lists/useIsEntitySaved.js.map +0 -1
- package/dist/esm/hooks/lists/useLists.d.ts +0 -2
- package/dist/esm/hooks/lists/useLists.js +0 -6
- package/dist/esm/hooks/lists/useLists.js.map +0 -1
- package/dist/esm/hooks/lists/useListsData.js +0 -386
- package/dist/esm/hooks/lists/useListsData.js.map +0 -1
- package/dist/esm/hooks/lists/useRemoveFromList.d.ts +0 -6
- package/dist/esm/hooks/lists/useRemoveFromList.js +0 -65
- package/dist/esm/hooks/lists/useRemoveFromList.js.map +0 -1
- package/dist/esm/hooks/lists/useUpdateList.d.ts +0 -8
- package/dist/esm/hooks/lists/useUpdateList.js +0 -65
- package/dist/esm/hooks/lists/useUpdateList.js.map +0 -1
- package/dist/esm/hooks/users/useUser.d.ts +0 -2
- package/dist/esm/hooks/users/useUser.js +0 -6
- package/dist/esm/hooks/users/useUser.js.map +0 -1
- package/dist/esm/hooks/users/useUserData.d.ts +0 -12
- package/dist/esm/hooks/users/useUserData.js +0 -71
- package/dist/esm/hooks/users/useUserData.js.map +0 -1
- package/dist/esm/legacy/context/app-notifications-context.d.ts +0 -8
- package/dist/esm/legacy/context/app-notifications-context.js +0 -21
- package/dist/esm/legacy/context/app-notifications-context.js.map +0 -1
- package/dist/esm/legacy/context/auth-context.d.ts +0 -8
- package/dist/esm/legacy/context/auth-context.js +0 -22
- package/dist/esm/legacy/context/auth-context.js.map +0 -1
- package/dist/esm/legacy/hooks/app-notifications/index.d.ts +0 -5
- package/dist/esm/legacy/hooks/app-notifications/index.js +0 -6
- package/dist/esm/legacy/hooks/app-notifications/index.js.map +0 -1
- package/dist/esm/legacy/hooks/app-notifications/useAppNotifications.d.ts +0 -2
- package/dist/esm/legacy/hooks/app-notifications/useAppNotifications.js +0 -6
- package/dist/esm/legacy/hooks/app-notifications/useAppNotifications.js.map +0 -1
- package/dist/esm/legacy/hooks/app-notifications/useAppNotificationsData.d.ts +0 -16
- package/dist/esm/legacy/hooks/app-notifications/useAppNotificationsData.js +0 -220
- package/dist/esm/legacy/hooks/app-notifications/useAppNotificationsData.js.map +0 -1
- package/dist/esm/legacy/hooks/app-notifications/useCountUnreadNotifications.d.ts +0 -2
- package/dist/esm/legacy/hooks/app-notifications/useCountUnreadNotifications.js +0 -67
- package/dist/esm/legacy/hooks/app-notifications/useCountUnreadNotifications.js.map +0 -1
- package/dist/esm/legacy/hooks/app-notifications/useFetchAppNotifications.d.ts +0 -6
- package/dist/esm/legacy/hooks/app-notifications/useFetchAppNotifications.js +0 -74
- package/dist/esm/legacy/hooks/app-notifications/useFetchAppNotifications.js.map +0 -1
- package/dist/esm/legacy/hooks/app-notifications/useMarkNotificationAsRead.d.ts +0 -2
- package/dist/esm/legacy/hooks/app-notifications/useMarkNotificationAsRead.js +0 -69
- package/dist/esm/legacy/hooks/app-notifications/useMarkNotificationAsRead.js.map +0 -1
- package/dist/esm/legacy/hooks/auth/index.d.ts +0 -8
- package/dist/esm/legacy/hooks/auth/index.js +0 -9
- package/dist/esm/legacy/hooks/auth/index.js.map +0 -1
- package/dist/esm/legacy/hooks/auth/useAuth.d.ts +0 -2
- package/dist/esm/legacy/hooks/auth/useAuth.js +0 -6
- package/dist/esm/legacy/hooks/auth/useAuth.js.map +0 -1
- package/dist/esm/legacy/hooks/auth/useAuthData.d.ts +0 -41
- package/dist/esm/legacy/hooks/auth/useAuthData.js +0 -266
- package/dist/esm/legacy/hooks/auth/useAuthData.js.map +0 -1
- package/dist/esm/legacy/hooks/auth/useChangePassword.d.ts +0 -5
- package/dist/esm/legacy/hooks/auth/useChangePassword.js +0 -65
- package/dist/esm/legacy/hooks/auth/useChangePassword.js.map +0 -1
- package/dist/esm/legacy/hooks/auth/useRequestNewAccessToken.d.ts +0 -7
- package/dist/esm/legacy/hooks/auth/useRequestNewAccessToken.js +0 -66
- package/dist/esm/legacy/hooks/auth/useRequestNewAccessToken.js.map +0 -1
- package/dist/esm/legacy/hooks/auth/useSignInWithEmailAndPassword.d.ts +0 -9
- package/dist/esm/legacy/hooks/auth/useSignInWithEmailAndPassword.js +0 -67
- package/dist/esm/legacy/hooks/auth/useSignInWithEmailAndPassword.js.map +0 -1
- package/dist/esm/legacy/hooks/auth/useSignOut.d.ts +0 -4
- package/dist/esm/legacy/hooks/auth/useSignOut.js +0 -62
- package/dist/esm/legacy/hooks/auth/useSignOut.js.map +0 -1
- package/dist/esm/legacy/hooks/auth/useSignUpWithEmailAndPassword.d.ts +0 -20
- package/dist/esm/legacy/hooks/auth/useSignUpWithEmailAndPassword.js +0 -75
- package/dist/esm/legacy/hooks/auth/useSignUpWithEmailAndPassword.js.map +0 -1
- package/dist/esm/legacy/hooks/auth/useVerifyExternalUser.d.ts +0 -8
- package/dist/esm/legacy/hooks/auth/useVerifyExternalUser.js +0 -65
- package/dist/esm/legacy/hooks/auth/useVerifyExternalUser.js.map +0 -1
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
-
};
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
var react_1 = require("react");
|
|
43
|
-
var useAxiosPrivate_1 = __importDefault(require("../../../config/useAxiosPrivate"));
|
|
44
|
-
var useProject_1 = __importDefault(require("../../../hooks/projects/useProject"));
|
|
45
|
-
var auth_redux_1 = require("../../../hooks/auth-redux");
|
|
46
|
-
function useCountUnreadNotifications() {
|
|
47
|
-
var _this = this;
|
|
48
|
-
var axios = (0, useAxiosPrivate_1.default)();
|
|
49
|
-
var projectId = (0, useProject_1.default)().projectId;
|
|
50
|
-
var user = (0, auth_redux_1.useUserRedux)().user;
|
|
51
|
-
var countUnreadNotifications = (0, react_1.useCallback)(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
52
|
-
var response;
|
|
53
|
-
return __generator(this, function (_a) {
|
|
54
|
-
switch (_a.label) {
|
|
55
|
-
case 0:
|
|
56
|
-
if (!user) {
|
|
57
|
-
throw new Error("No authenticated user");
|
|
58
|
-
}
|
|
59
|
-
if (!projectId) {
|
|
60
|
-
throw new Error("No projectId available.");
|
|
61
|
-
}
|
|
62
|
-
return [4 /*yield*/, axios.get("/".concat(projectId, "/app-notifications/count"), { withCredentials: true })];
|
|
63
|
-
case 1:
|
|
64
|
-
response = _a.sent();
|
|
65
|
-
return [2 /*return*/, response.data];
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
}); }, [projectId, user, axios]);
|
|
69
|
-
return countUnreadNotifications;
|
|
70
|
-
}
|
|
71
|
-
exports.default = useCountUnreadNotifications;
|
|
72
|
-
//# sourceMappingURL=useCountUnreadNotifications.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCountUnreadNotifications.js","sourceRoot":"","sources":["../../../../../src/legacy/hooks/app-notifications/useCountUnreadNotifications.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,oFAA8D;AAC9D,kFAA4D;AAC5D,wDAAyD;AAEzD,SAAS,2BAA2B;IAApC,iBAsBC;IArBC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IACxB,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IAC3B,IAAA,IAAI,GAAK,IAAA,yBAAY,GAAE,KAAnB,CAAoB;IAEhC,IAAM,wBAAwB,GAAG,IAAA,mBAAW,EAAC;;;;;oBAC3C,IAAI,CAAC,IAAI,EAAE,CAAC;wBACV,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;oBAC3C,CAAC;oBAED,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,GAAG,CAC9B,WAAI,SAAS,6BAA0B,EACvC,EAAE,eAAe,EAAE,IAAI,EAAE,CAC1B,EAAA;;oBAHK,QAAQ,GAAG,SAGhB;oBACD,sBAAO,QAAQ,CAAC,IAAc,EAAC;;;SAChC,EAAE,CAAC,SAAS,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;IAE7B,OAAO,wBAAwB,CAAC;AAClC,CAAC;AAED,kBAAe,2BAA2B,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { UnifiedAppNotification } from "../../../interfaces/models/AppNotification";
|
|
2
|
-
declare function useFetchAppNotifications(): ({ page, limit }: {
|
|
3
|
-
page: number;
|
|
4
|
-
limit: number;
|
|
5
|
-
}) => Promise<UnifiedAppNotification[]>;
|
|
6
|
-
export default useFetchAppNotifications;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
-
};
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
var react_1 = require("react");
|
|
43
|
-
var useAxiosPrivate_1 = __importDefault(require("../../../config/useAxiosPrivate"));
|
|
44
|
-
var useProject_1 = __importDefault(require("../../../hooks/projects/useProject"));
|
|
45
|
-
var auth_redux_1 = require("../../../hooks/auth-redux");
|
|
46
|
-
function useFetchAppNotifications() {
|
|
47
|
-
var _this = this;
|
|
48
|
-
var axios = (0, useAxiosPrivate_1.default)();
|
|
49
|
-
var projectId = (0, useProject_1.default)().projectId;
|
|
50
|
-
var user = (0, auth_redux_1.useUserRedux)().user;
|
|
51
|
-
var fetchAppNotifications = (0, react_1.useCallback)(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
52
|
-
var response;
|
|
53
|
-
var page = _b.page, limit = _b.limit;
|
|
54
|
-
return __generator(this, function (_c) {
|
|
55
|
-
switch (_c.label) {
|
|
56
|
-
case 0:
|
|
57
|
-
if (!user) {
|
|
58
|
-
throw new Error("No authenticated user");
|
|
59
|
-
}
|
|
60
|
-
if (!projectId) {
|
|
61
|
-
throw new Error("No projectId available.");
|
|
62
|
-
}
|
|
63
|
-
return [4 /*yield*/, axios.get("/".concat(projectId, "/app-notifications"), {
|
|
64
|
-
params: {
|
|
65
|
-
page: page,
|
|
66
|
-
limit: limit,
|
|
67
|
-
},
|
|
68
|
-
withCredentials: true,
|
|
69
|
-
})];
|
|
70
|
-
case 1:
|
|
71
|
-
response = _c.sent();
|
|
72
|
-
return [2 /*return*/, response.data];
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
}); }, [projectId, axios, user]);
|
|
76
|
-
return fetchAppNotifications;
|
|
77
|
-
}
|
|
78
|
-
exports.default = useFetchAppNotifications;
|
|
79
|
-
//# sourceMappingURL=useFetchAppNotifications.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useFetchAppNotifications.js","sourceRoot":"","sources":["../../../../../src/legacy/hooks/app-notifications/useFetchAppNotifications.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,oFAA8D;AAC9D,kFAA4D;AAE5D,wDAAyD;AAEzD,SAAS,wBAAwB;IAAjC,iBAgCC;IA/BC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IACxB,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IAC3B,IAAA,IAAI,GAAK,IAAA,yBAAY,GAAE,KAAnB,CAAoB;IAEhC,IAAM,qBAAqB,GAAG,IAAA,mBAAW,EACvC,gEAAO,EAAgD;;YAA9C,IAAI,UAAA,EAAE,KAAK,WAAA;;;;oBAClB,IAAI,CAAC,IAAI,EAAE,CAAC;wBACV,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;oBAC3C,CAAC;oBAED,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,GAAG,CAC9B,WAAI,SAAS,uBAAoB,EACjC;4BACE,MAAM,EAAE;gCACN,IAAI,MAAA;gCACJ,KAAK,OAAA;6BACN;4BACD,eAAe,EAAE,IAAI;yBACtB,CACF,EAAA;;oBATK,QAAQ,GAAG,SAShB;oBAED,sBAAO,QAAQ,CAAC,IAAgC,EAAC;;;SAClD,EACD,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,CACzB,CAAC;IAEF,OAAO,qBAAqB,CAAC;AAC/B,CAAC;AAED,kBAAe,wBAAwB,CAAC"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
-
};
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
var react_1 = require("react");
|
|
43
|
-
var useAxiosPrivate_1 = __importDefault(require("../../../config/useAxiosPrivate"));
|
|
44
|
-
var useProject_1 = __importDefault(require("../../../hooks/projects/useProject"));
|
|
45
|
-
var auth_redux_1 = require("../../../hooks/auth-redux");
|
|
46
|
-
function useMarkNotificationAsRead() {
|
|
47
|
-
var _this = this;
|
|
48
|
-
var axios = (0, useAxiosPrivate_1.default)();
|
|
49
|
-
var projectId = (0, useProject_1.default)().projectId;
|
|
50
|
-
var user = (0, auth_redux_1.useUserRedux)().user;
|
|
51
|
-
var markNotificationAsRead = (0, react_1.useCallback)(function (notificationId) { return __awaiter(_this, void 0, void 0, function () {
|
|
52
|
-
return __generator(this, function (_a) {
|
|
53
|
-
switch (_a.label) {
|
|
54
|
-
case 0:
|
|
55
|
-
if (!user) {
|
|
56
|
-
throw new Error("No authenticated user");
|
|
57
|
-
}
|
|
58
|
-
if (!projectId) {
|
|
59
|
-
throw new Error("No projectId available.");
|
|
60
|
-
}
|
|
61
|
-
if (!notificationId) {
|
|
62
|
-
throw new Error("No notification ID provided.");
|
|
63
|
-
}
|
|
64
|
-
return [4 /*yield*/, axios.patch("/".concat(projectId, "/app-notifications/").concat(notificationId, "/mark-as-read"), {}, { withCredentials: true })];
|
|
65
|
-
case 1:
|
|
66
|
-
_a.sent();
|
|
67
|
-
return [2 /*return*/];
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
}); }, [projectId, axios, user]);
|
|
71
|
-
return markNotificationAsRead;
|
|
72
|
-
}
|
|
73
|
-
exports.default = useMarkNotificationAsRead;
|
|
74
|
-
//# sourceMappingURL=useMarkNotificationAsRead.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useMarkNotificationAsRead.js","sourceRoot":"","sources":["../../../../../src/legacy/hooks/app-notifications/useMarkNotificationAsRead.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,oFAA8D;AAC9D,kFAA4D;AAC5D,wDAAyD;AAEzD,SAAS,yBAAyB;IAAlC,iBA6BC;IA5BC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IACxB,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IAC3B,IAAA,IAAI,GAAK,IAAA,yBAAY,GAAE,KAAnB,CAAoB;IAEhC,IAAM,sBAAsB,GAAG,IAAA,mBAAW,EACxC,UAAO,cAAsB;;;;oBAC3B,IAAI,CAAC,IAAI,EAAE,CAAC;wBACV,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;oBAC3C,CAAC;oBAED,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAED,IAAI,CAAC,cAAc,EAAE,CAAC;wBACpB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;oBAClD,CAAC;oBAED,qBAAM,KAAK,CAAC,KAAK,CACf,WAAI,SAAS,gCAAsB,cAAc,kBAAe,EAChE,EAAE,EACF,EAAE,eAAe,EAAE,IAAI,EAAE,CAC1B,EAAA;;oBAJD,SAIC,CAAC;;;;SACH,EACD,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,CACzB,CAAC;IAEF,OAAO,sBAAsB,CAAC;AAChC,CAAC;AAED,kBAAe,yBAAyB,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { default as useAuth } from "./useAuth";
|
|
2
|
-
export { default as useAuthData } from "./useAuthData";
|
|
3
|
-
export { default as useRequestNewAccessToken } from "./useRequestNewAccessToken";
|
|
4
|
-
export { default as useSignUpWithEmailAndPassword } from "./useSignUpWithEmailAndPassword";
|
|
5
|
-
export { default as useSignInWithEmailAndPassword } from "./useSignInWithEmailAndPassword";
|
|
6
|
-
export { default as useSignOut } from "./useSignOut";
|
|
7
|
-
export { default as useChangePassword } from "./useChangePassword";
|
|
8
|
-
export { default as useVerifyExternalUser } from "./useVerifyExternalUser";
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useVerifyExternalUser = exports.useChangePassword = exports.useSignOut = exports.useSignInWithEmailAndPassword = exports.useSignUpWithEmailAndPassword = exports.useRequestNewAccessToken = exports.useAuthData = exports.useAuth = void 0;
|
|
7
|
-
var useAuth_1 = require("./useAuth");
|
|
8
|
-
Object.defineProperty(exports, "useAuth", { enumerable: true, get: function () { return __importDefault(useAuth_1).default; } });
|
|
9
|
-
var useAuthData_1 = require("./useAuthData");
|
|
10
|
-
Object.defineProperty(exports, "useAuthData", { enumerable: true, get: function () { return __importDefault(useAuthData_1).default; } });
|
|
11
|
-
var useRequestNewAccessToken_1 = require("./useRequestNewAccessToken");
|
|
12
|
-
Object.defineProperty(exports, "useRequestNewAccessToken", { enumerable: true, get: function () { return __importDefault(useRequestNewAccessToken_1).default; } });
|
|
13
|
-
var useSignUpWithEmailAndPassword_1 = require("./useSignUpWithEmailAndPassword");
|
|
14
|
-
Object.defineProperty(exports, "useSignUpWithEmailAndPassword", { enumerable: true, get: function () { return __importDefault(useSignUpWithEmailAndPassword_1).default; } });
|
|
15
|
-
var useSignInWithEmailAndPassword_1 = require("./useSignInWithEmailAndPassword");
|
|
16
|
-
Object.defineProperty(exports, "useSignInWithEmailAndPassword", { enumerable: true, get: function () { return __importDefault(useSignInWithEmailAndPassword_1).default; } });
|
|
17
|
-
var useSignOut_1 = require("./useSignOut");
|
|
18
|
-
Object.defineProperty(exports, "useSignOut", { enumerable: true, get: function () { return __importDefault(useSignOut_1).default; } });
|
|
19
|
-
var useChangePassword_1 = require("./useChangePassword");
|
|
20
|
-
Object.defineProperty(exports, "useChangePassword", { enumerable: true, get: function () { return __importDefault(useChangePassword_1).default; } });
|
|
21
|
-
var useVerifyExternalUser_1 = require("./useVerifyExternalUser");
|
|
22
|
-
Object.defineProperty(exports, "useVerifyExternalUser", { enumerable: true, get: function () { return __importDefault(useVerifyExternalUser_1).default; } });
|
|
23
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/legacy/hooks/auth/index.ts"],"names":[],"mappings":";;;;;;AAAA,qCAA+C;AAAtC,mHAAA,OAAO,OAAW;AAC3B,6CAAuD;AAA9C,2HAAA,OAAO,OAAe;AAC/B,uEAAiF;AAAxE,qJAAA,OAAO,OAA4B;AAC5C,iFAA2F;AAAlF,+JAAA,OAAO,OAAiC;AACjD,iFAA2F;AAAlF,+JAAA,OAAO,OAAiC;AACjD,2CAAqD;AAA5C,yHAAA,OAAO,OAAc;AAC9B,yDAAmE;AAA1D,uIAAA,OAAO,OAAqB;AACrC,iEAA2E;AAAlE,+IAAA,OAAO,OAAyB"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = useAuth;
|
|
4
|
-
var react_1 = require("react");
|
|
5
|
-
var auth_context_1 = require("../../context/auth-context");
|
|
6
|
-
function useAuth() {
|
|
7
|
-
return (0, react_1.useContext)(auth_context_1.AuthContext);
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=useAuth.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useAuth.js","sourceRoot":"","sources":["../../../../../src/legacy/hooks/auth/useAuth.tsx"],"names":[],"mappings":";;AAGA,0BAEC;AALD,+BAAmC;AACnC,2DAA4E;AAE5E,SAAwB,OAAO;IAC7B,OAAO,IAAA,kBAAU,EAAC,0BAAW,CAAC,CAAC;AACjC,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { AuthUser } from "../../../interfaces/models/User";
|
|
2
|
-
export interface UseAuthDataProps {
|
|
3
|
-
signedToken?: string | null | undefined;
|
|
4
|
-
}
|
|
5
|
-
export interface UseAuthDataValues {
|
|
6
|
-
loadingInitial: boolean;
|
|
7
|
-
user: AuthUser | null;
|
|
8
|
-
setUser: (newUser: AuthUser) => void;
|
|
9
|
-
accessToken: string | null;
|
|
10
|
-
refreshToken: string | null;
|
|
11
|
-
setRefreshToken: React.Dispatch<React.SetStateAction<string | null>>;
|
|
12
|
-
signUpWithEmailAndPassword: (props: {
|
|
13
|
-
email: string;
|
|
14
|
-
password: string;
|
|
15
|
-
name?: string;
|
|
16
|
-
username?: string;
|
|
17
|
-
avatar?: string;
|
|
18
|
-
bio?: string;
|
|
19
|
-
location?: {
|
|
20
|
-
latitude: number;
|
|
21
|
-
longitude: number;
|
|
22
|
-
};
|
|
23
|
-
birthdate?: Date;
|
|
24
|
-
metadata?: Record<string, any>;
|
|
25
|
-
secureMetadata?: Record<string, any>;
|
|
26
|
-
}) => Promise<void>;
|
|
27
|
-
signInWithEmailAndPassword: (props: {
|
|
28
|
-
email: string;
|
|
29
|
-
password: string;
|
|
30
|
-
}) => Promise<void>;
|
|
31
|
-
signOut: () => Promise<void>;
|
|
32
|
-
changePassword: (props: {
|
|
33
|
-
publicKeyBase64: string | null;
|
|
34
|
-
email: string;
|
|
35
|
-
password: string;
|
|
36
|
-
newPassword: string;
|
|
37
|
-
}) => Promise<void>;
|
|
38
|
-
requestNewAccessToken: () => Promise<void>;
|
|
39
|
-
}
|
|
40
|
-
declare function useAuthData({ signedToken }: UseAuthDataProps): UseAuthDataValues;
|
|
41
|
-
export default useAuthData;
|
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
24
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
50
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
51
|
-
};
|
|
52
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
-
var react_1 = require("react");
|
|
54
|
-
var handleError_1 = require("../../../utils/handleError");
|
|
55
|
-
var isReactNative_1 = require("../../../utils/isReactNative");
|
|
56
|
-
var useSignUpWithEmailAndPassword_1 = __importDefault(require("./useSignUpWithEmailAndPassword"));
|
|
57
|
-
var useSignInWithEmailAndPassword_1 = __importDefault(require("./useSignInWithEmailAndPassword"));
|
|
58
|
-
var useSignOut_1 = __importDefault(require("./useSignOut"));
|
|
59
|
-
var useRequestNewAccessToken_1 = __importDefault(require("./useRequestNewAccessToken"));
|
|
60
|
-
var useVerifyExternalUser_1 = __importDefault(require("./useVerifyExternalUser"));
|
|
61
|
-
var useChangePassword_1 = __importDefault(require("./useChangePassword"));
|
|
62
|
-
function useAuthData(_a) {
|
|
63
|
-
var _this = this;
|
|
64
|
-
var signedToken = _a.signedToken;
|
|
65
|
-
var _b = (0, react_1.useState)(null), accessToken = _b[0], setAccessToken = _b[1];
|
|
66
|
-
var _c = (0, react_1.useState)(null), refreshToken = _c[0], setRefreshToken = _c[1];
|
|
67
|
-
var _d = (0, react_1.useState)(null), user = _d[0], setUser = _d[1];
|
|
68
|
-
var _e = (0, react_1.useState)(true), loadingInitial = _e[0], setLoadingInitial = _e[1];
|
|
69
|
-
var signUpWithEmailAndPassword = (0, useSignUpWithEmailAndPassword_1.default)();
|
|
70
|
-
var signInWithEmailAndPassword = (0, useSignInWithEmailAndPassword_1.default)();
|
|
71
|
-
var signOut = (0, useSignOut_1.default)();
|
|
72
|
-
var changePassword = (0, useChangePassword_1.default)();
|
|
73
|
-
var requestNewAccessToken = (0, useRequestNewAccessToken_1.default)();
|
|
74
|
-
var verifyExternalUser = (0, useVerifyExternalUser_1.default)();
|
|
75
|
-
var handleSignUpWithEmailAndPassword = (0, react_1.useCallback)(function (props) { return __awaiter(_this, void 0, void 0, function () {
|
|
76
|
-
var response, err_1;
|
|
77
|
-
return __generator(this, function (_a) {
|
|
78
|
-
switch (_a.label) {
|
|
79
|
-
case 0:
|
|
80
|
-
_a.trys.push([0, 2, , 3]);
|
|
81
|
-
return [4 /*yield*/, signUpWithEmailAndPassword(__assign({}, props))];
|
|
82
|
-
case 1:
|
|
83
|
-
response = _a.sent();
|
|
84
|
-
if (response) {
|
|
85
|
-
setRefreshToken(response.refreshToken);
|
|
86
|
-
setAccessToken(response.accessToken);
|
|
87
|
-
setUser(response.user);
|
|
88
|
-
}
|
|
89
|
-
return [3 /*break*/, 3];
|
|
90
|
-
case 2:
|
|
91
|
-
err_1 = _a.sent();
|
|
92
|
-
(0, handleError_1.handleError)(err_1, "Failed to register user with email and password: ");
|
|
93
|
-
if (err_1 instanceof Error) {
|
|
94
|
-
throw err_1;
|
|
95
|
-
}
|
|
96
|
-
return [3 /*break*/, 3];
|
|
97
|
-
case 3: return [2 /*return*/];
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
}); }, [signUpWithEmailAndPassword]);
|
|
101
|
-
var handleSignInWithEmailAndPassword = (0, react_1.useCallback)(function (props) { return __awaiter(_this, void 0, void 0, function () {
|
|
102
|
-
var response, err_2;
|
|
103
|
-
return __generator(this, function (_a) {
|
|
104
|
-
switch (_a.label) {
|
|
105
|
-
case 0:
|
|
106
|
-
_a.trys.push([0, 2, , 3]);
|
|
107
|
-
return [4 /*yield*/, signInWithEmailAndPassword(__assign({}, props))];
|
|
108
|
-
case 1:
|
|
109
|
-
response = _a.sent();
|
|
110
|
-
if (response) {
|
|
111
|
-
setRefreshToken(response.refreshToken);
|
|
112
|
-
setAccessToken(response.accessToken);
|
|
113
|
-
setUser(response.user);
|
|
114
|
-
}
|
|
115
|
-
return [3 /*break*/, 3];
|
|
116
|
-
case 2:
|
|
117
|
-
err_2 = _a.sent();
|
|
118
|
-
(0, handleError_1.handleError)(err_2, "Failed to log user in: ");
|
|
119
|
-
if (err_2 instanceof Error) {
|
|
120
|
-
throw err_2;
|
|
121
|
-
}
|
|
122
|
-
return [3 /*break*/, 3];
|
|
123
|
-
case 3: return [2 /*return*/];
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
}); }, [signInWithEmailAndPassword]);
|
|
127
|
-
var handleSignOut = (0, react_1.useCallback)(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
128
|
-
var tempUser, tempAccessToken, tempRefreshToken, err_3;
|
|
129
|
-
return __generator(this, function (_a) {
|
|
130
|
-
switch (_a.label) {
|
|
131
|
-
case 0:
|
|
132
|
-
if ((0, isReactNative_1.isReactNative)() && !refreshToken)
|
|
133
|
-
throw new Error("No refresh token");
|
|
134
|
-
tempUser = user;
|
|
135
|
-
tempAccessToken = accessToken;
|
|
136
|
-
tempRefreshToken = refreshToken;
|
|
137
|
-
_a.label = 1;
|
|
138
|
-
case 1:
|
|
139
|
-
_a.trys.push([1, 3, , 4]);
|
|
140
|
-
setUser(null);
|
|
141
|
-
setAccessToken(null);
|
|
142
|
-
setRefreshToken(null);
|
|
143
|
-
return [4 /*yield*/, signOut({ refreshToken: refreshToken })];
|
|
144
|
-
case 2:
|
|
145
|
-
_a.sent();
|
|
146
|
-
return [3 /*break*/, 4];
|
|
147
|
-
case 3:
|
|
148
|
-
err_3 = _a.sent();
|
|
149
|
-
(0, handleError_1.handleError)(err_3, "Failed to log user out: ");
|
|
150
|
-
setUser(tempUser);
|
|
151
|
-
setAccessToken(tempAccessToken);
|
|
152
|
-
setRefreshToken(tempRefreshToken);
|
|
153
|
-
if (err_3 instanceof Error) {
|
|
154
|
-
throw err_3;
|
|
155
|
-
}
|
|
156
|
-
return [3 /*break*/, 4];
|
|
157
|
-
case 4: return [2 /*return*/];
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
}); }, [signOut, user, accessToken, refreshToken]);
|
|
161
|
-
var handleChangePassword = (0, react_1.useCallback)(function (props) { return __awaiter(_this, void 0, void 0, function () {
|
|
162
|
-
var err_4;
|
|
163
|
-
return __generator(this, function (_a) {
|
|
164
|
-
switch (_a.label) {
|
|
165
|
-
case 0:
|
|
166
|
-
if (!user)
|
|
167
|
-
throw new Error("No user is authenticated");
|
|
168
|
-
_a.label = 1;
|
|
169
|
-
case 1:
|
|
170
|
-
_a.trys.push([1, 3, , 4]);
|
|
171
|
-
return [4 /*yield*/, changePassword(__assign({}, props))];
|
|
172
|
-
case 2:
|
|
173
|
-
_a.sent();
|
|
174
|
-
return [3 /*break*/, 4];
|
|
175
|
-
case 3:
|
|
176
|
-
err_4 = _a.sent();
|
|
177
|
-
(0, handleError_1.handleError)(err_4, "Failed to log user in: ");
|
|
178
|
-
return [3 /*break*/, 4];
|
|
179
|
-
case 4: return [2 /*return*/];
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
}); }, [changePassword, user]);
|
|
183
|
-
var handleRequestNewAccessToken = (0, react_1.useCallback)(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
184
|
-
var response, err_5;
|
|
185
|
-
return __generator(this, function (_a) {
|
|
186
|
-
switch (_a.label) {
|
|
187
|
-
case 0:
|
|
188
|
-
if ((0, isReactNative_1.isReactNative)() && !refreshToken)
|
|
189
|
-
return [2 /*return*/];
|
|
190
|
-
_a.label = 1;
|
|
191
|
-
case 1:
|
|
192
|
-
_a.trys.push([1, 3, , 4]);
|
|
193
|
-
return [4 /*yield*/, requestNewAccessToken({ refreshToken: refreshToken })];
|
|
194
|
-
case 2:
|
|
195
|
-
response = _a.sent();
|
|
196
|
-
if (response) {
|
|
197
|
-
setUser(response.user);
|
|
198
|
-
setAccessToken(response.accessToken);
|
|
199
|
-
return [2 /*return*/, response.accessToken];
|
|
200
|
-
}
|
|
201
|
-
return [3 /*break*/, 4];
|
|
202
|
-
case 3:
|
|
203
|
-
err_5 = _a.sent();
|
|
204
|
-
(0, handleError_1.handleError)(err_5, "Request new access token error: ");
|
|
205
|
-
return [3 /*break*/, 4];
|
|
206
|
-
case 4: return [2 /*return*/];
|
|
207
|
-
}
|
|
208
|
-
});
|
|
209
|
-
}); }, [requestNewAccessToken, refreshToken]);
|
|
210
|
-
var handleVerifyExternalUser = (0, react_1.useCallback)(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
211
|
-
var response, err_6;
|
|
212
|
-
return __generator(this, function (_a) {
|
|
213
|
-
switch (_a.label) {
|
|
214
|
-
case 0:
|
|
215
|
-
if (!signedToken)
|
|
216
|
-
return [2 /*return*/];
|
|
217
|
-
_a.label = 1;
|
|
218
|
-
case 1:
|
|
219
|
-
_a.trys.push([1, 3, , 4]);
|
|
220
|
-
return [4 /*yield*/, verifyExternalUser({ userJwt: signedToken })];
|
|
221
|
-
case 2:
|
|
222
|
-
response = _a.sent();
|
|
223
|
-
if (response) {
|
|
224
|
-
setRefreshToken(response.refreshToken);
|
|
225
|
-
setAccessToken(response.accessToken);
|
|
226
|
-
setUser(response.user);
|
|
227
|
-
}
|
|
228
|
-
return [3 /*break*/, 4];
|
|
229
|
-
case 3:
|
|
230
|
-
err_6 = _a.sent();
|
|
231
|
-
(0, handleError_1.handleError)(err_6, "Verify external user error: ");
|
|
232
|
-
return [3 /*break*/, 4];
|
|
233
|
-
case 4: return [2 /*return*/];
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
}); }, [signedToken, verifyExternalUser]);
|
|
237
|
-
(0, react_1.useEffect)(function () {
|
|
238
|
-
handleVerifyExternalUser();
|
|
239
|
-
}, [handleVerifyExternalUser]);
|
|
240
|
-
(0, react_1.useEffect)(function () {
|
|
241
|
-
var fetchInitial = function () {
|
|
242
|
-
setTimeout(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
243
|
-
return __generator(this, function (_a) {
|
|
244
|
-
switch (_a.label) {
|
|
245
|
-
case 0: return [4 /*yield*/, handleRequestNewAccessToken()];
|
|
246
|
-
case 1:
|
|
247
|
-
_a.sent();
|
|
248
|
-
setLoadingInitial(false);
|
|
249
|
-
return [2 /*return*/];
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
|
-
}); }, 0);
|
|
253
|
-
};
|
|
254
|
-
fetchInitial();
|
|
255
|
-
}, [handleRequestNewAccessToken]);
|
|
256
|
-
return {
|
|
257
|
-
loadingInitial: loadingInitial,
|
|
258
|
-
user: user,
|
|
259
|
-
setUser: function (newUser) { return setUser(newUser); },
|
|
260
|
-
accessToken: accessToken,
|
|
261
|
-
refreshToken: refreshToken,
|
|
262
|
-
setRefreshToken: setRefreshToken,
|
|
263
|
-
signUpWithEmailAndPassword: handleSignUpWithEmailAndPassword,
|
|
264
|
-
signInWithEmailAndPassword: handleSignInWithEmailAndPassword,
|
|
265
|
-
signOut: handleSignOut,
|
|
266
|
-
changePassword: handleChangePassword,
|
|
267
|
-
requestNewAccessToken: handleRequestNewAccessToken,
|
|
268
|
-
};
|
|
269
|
-
}
|
|
270
|
-
exports.default = useAuthData;
|
|
271
|
-
//# sourceMappingURL=useAuthData.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useAuthData.js","sourceRoot":"","sources":["../../../../../src/legacy/hooks/auth/useAuthData.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAyD;AAEzD,0DAAyD;AAEzD,8DAA6D;AAC7D,kGAA4E;AAC5E,kGAA4E;AAC5E,4DAAsC;AACtC,wFAAkE;AAClE,kFAA4D;AAC5D,0EAAoD;AA0CpD,SAAS,WAAW,CAAC,EAAiC;IAAtD,iBAuKC;QAvKsB,WAAW,iBAAA;IAC1B,IAAA,KAAgC,IAAA,gBAAQ,EAAgB,IAAI,CAAC,EAA5D,WAAW,QAAA,E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