@replyke/core
Version:
Replyke: Build interactive apps with social features like comments, votes, feeds, user lists, notifications, and more.
25 lines (24 loc) • 1.94 kB
TypeScript
import type { RootState } from '../index';
import type { AuthUser } from '../../interfaces/models/User';
export interface AuthState {
accessToken: string | null;
refreshToken: string | null;
user: AuthUser | null;
loadingInitial: boolean;
isAuthenticating: boolean;
initialized: boolean;
signedToken: string | null;
}
export declare const setTokens: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
accessToken: string | null;
refreshToken?: string | null;
}, "auth/setTokens">, clearTokens: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"auth/clearTokens">, setUser: import("@reduxjs/toolkit").ActionCreatorWithPayload<AuthUser | null, "auth/setUser">, setLoadingInitial: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "auth/setLoadingInitial">, setAuthenticating: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "auth/setAuthenticating">, setInitialized: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "auth/setInitialized">, setSignedToken: import("@reduxjs/toolkit").ActionCreatorWithPayload<string | null, "auth/setSignedToken">, resetAuth: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"auth/resetAuth">, setRefreshToken: import("@reduxjs/toolkit").ActionCreatorWithPayload<string | null, "auth/setRefreshToken">;
export declare const selectAccessToken: (state: RootState) => string | null;
export declare const selectRefreshToken: (state: RootState) => string | null;
export declare const selectUser: (state: RootState) => AuthUser | null;
export declare const selectLoadingInitial: (state: RootState) => boolean;
export declare const selectIsAuthenticating: (state: RootState) => boolean;
export declare const selectInitialized: (state: RootState) => boolean;
export declare const selectSignedToken: (state: RootState) => string | null;
declare const _default: import("@reduxjs/toolkit").Reducer<AuthState>;
export default _default;