Migrate authorize{ actions, actionType, reducer} to TS & make factory service for interfaces #15
This commit is contained in:
41
app/services/authorize/IAuthorizeService.ts
Normal file
41
app/services/authorize/IAuthorizeService.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import { User } from "domain/users";
|
||||
import { LoginUser, RegisterUserResult } from "domain/authorize";
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Authentication service interface
|
||||
*
|
||||
* @export
|
||||
* @interface IAuthorizeService
|
||||
*/
|
||||
export interface IAuthorizeService {
|
||||
|
||||
/**
|
||||
* Login the user
|
||||
*
|
||||
* @returns {Promise<void>}
|
||||
* @memberof IAuthorizeService
|
||||
*/
|
||||
login: (email: string, password: string) => Promise<LoginUser>;
|
||||
|
||||
/**
|
||||
* Logs out the user
|
||||
*
|
||||
* @returns {Promise<void>}
|
||||
* @memberof IAuthorizeService
|
||||
*/
|
||||
logout: () => Promise<void>;
|
||||
|
||||
/**
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
updatePassword: (newPassword: string) => Promise<void>;
|
||||
|
||||
/**
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
registerUser: (user: User) => Promise<RegisterUserResult>;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user