import { SendConfirmSignup, Signin, Signup } from '@niama/auth/types'; import { Observable, Observabler, RawLocation, SagaCfg, SagaO, UseSagaReturnsO } from '@niama/core/types'; import { Po } from './main'; import * as O from './objects'; // CHANGE PASSWORD ========================================================================================================================= export type ChangePasswordC = SagaCfg, void, Done, Fail>; export type ChangePasswordP = ChangePasswordC['P']; export type ChangePasswordR = ChangePasswordC['R']; export type UseChangePasswordP = ChangePasswordC['UseP']; export type UseChangePasswordL$P = ChangePasswordC['L$P']; // CONFIRM SIGNUP ========================================================================================================================== export type ConfirmSignupC = SagaCfg; export type ConfirmSignupP = ConfirmSignupC['P']; export type ConfirmSignupR = ConfirmSignupC['R']; export type UseConfirmSignupP = ConfirmSignupC['UseP']; export type UseConfirmSignupL$P = ConfirmSignupC['L$P']; // GET CURRENT ============================================================================================================================= export type GetCurrentO = SagaO; export interface GetCurrentP extends GetCurrentO { skipCache?: boolean; } export type GetCurrentR = Observable; export interface UseGetCurrentP extends UseSagaReturnsO, GetCurrentO {} export interface UseGetCurrentR extends Observabler {} // REFRESHER =============================================================================================================================== export interface Refresh$P { redirect?: RawLocation; switcher?: Observabler; } // RESET PASSWORD ========================================================================================================================== export type ResetPasswordC = SagaCfg; export type ResetPasswordP = ResetPasswordC['P']; export type ResetPasswordR = ResetPasswordC['R']; export type UseResetPasswordP = ResetPasswordC['UseP']; export type UseResetPasswordL$P = ResetPasswordC['L$P']; // SEND CONFIRM SIGNUP ===================================================================================================================== export type SendConfirmSignupC = SagaCfg; export type SendConfirmSignupP = SendConfirmSignupC['P']; export type SendConfirmSignupR = SendConfirmSignupC['R']; export type UseSendConfirmSignupP = SendConfirmSignupC['UseP']; export type UseSendConfirmSignupL$P = SendConfirmSignupC['L$P']; // SEND RESET PASSWORD ===================================================================================================================== export type SendResetPasswordC = SagaCfg; export type SendResetPasswordP = SendResetPasswordC['P']; export type SendResetPasswordR = SendResetPasswordC['R']; export type UseSendResetPasswordP = SendResetPasswordC['UseP']; export type UseSendResetPasswordL$P = SendResetPasswordC['L$P']; // SEND VERIFY EMAIL ======================================================================================================================= export type SendVerifyEmailC = SagaCfg; export type SendVerifyEmailP = SendVerifyEmailC['P']; export type SendVerifyEmailR = SendVerifyEmailC['R']; export type UseSendVerifyEmailP = SendVerifyEmailC['UseP']; export type UseSendVerifyEmailL$P = SendVerifyEmailC['L$P']; // SIGNIN ================================================================================================================================== export type SigninC = SagaCfg; export type SigninP = SigninC['P']; export type SigninR = SigninC['R']; export type UseSigninP = SigninC['UseP']; export type UseSigninL$P = SigninC['L$P']; // SIGNOUT ================================================================================================================================== export type SignoutC = SagaCfg; export type SignoutP = SignoutC['P']; export type SignoutR = SignoutC['R']; export type UseSignoutP = SignoutC['UseP']; export type UseSignoutL$P = SignoutC['L$P']; // SIGNUP ================================================================================================================================== export type SignupC = SagaCfg; export type SignupP = SignupC['P']; export type SignupR = SignupC['R']; export type UseSignupP = SignupC['UseP']; export type UseSignupL$P = SignupC['L$P']; // VERIFY EMAIL ============================================================================================================================ export type VerifyEmailC = SagaCfg; export type VerifyEmailP = VerifyEmailC['P']; export type VerifyEmailR = VerifyEmailC['R']; export type UseVerifyEmailP = VerifyEmailC['UseP']; export type UseVerifyEmailL$P = VerifyEmailC['L$P']; /*export type DeleteCurrentP = ServiceP<'auth' | 'router'>; export interface RefreshP extends GetCurrentP { $niama: Pick; navigate?: string; resetApi?: boolean; switcher?: Observabler; } export type SendEmailResetCodeP = ServiceP; export interface UpdateAttrsP extends ServiceP<'auth' | 'router'> { attrs: Attrs; }*/