-
Notifications
You must be signed in to change notification settings - Fork 116
/
Copy pathIUserService.cs
98 lines (51 loc) · 3.14 KB
/
IUserService.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
namespace Masa.BuildingBlocks.StackSdks.Auth.Service;
public interface IUserService
{
Task<List<StaffModel>> GetListByTeamAsync(Guid teamId);
Task<List<StaffModel>> GetListByRoleAsync(Guid roleId);
Task<List<StaffModel>> GetListByDepartmentAsync(Guid departmentId);
Task<long> GetTotalByDepartmentAsync(Guid departmentId);
Task<long> GetTotalByRoleAsync(Guid roleId);
Task<long> GetTotalByTeamAsync(Guid teamId);
Task<UserModel> AddAsync(AddUserModel user);
Task<UserModel> UpsertThirdPartyUserAsync(UpsertThirdPartyUserModel user);
Task<UserModel> AddThirdPartyUserAsync(AddThirdPartyUserModel user, bool whenExistReturn = true);
Task<UserModel?> GetThirdPartyUserAsync(GetThirdPartyUserModel model);
Task<UserModel> UpsertAsync(UpsertUserModel user);
Task<UserModel?> ValidateCredentialsByAccountAsync(string account, string password, bool isLdap = false);
Task<UserModel?> FindByAccountAsync(string account);
Task<UserModel?> FindByPhoneNumberAsync(string phoneNumber);
Task<UserModel?> FindByEmailAsync(string email);
Task<UserModel?> FindByIdAsync(Guid userId);
Task<UserModel?> GetCurrentUserAsync();
Task<StaffDetailModel?> GetCurrentStaffAsync();
Task VisitedAsync(string appId, string url);
Task<List<UserVisitedModel>> GetVisitedListAsync();
Task UpdatePasswordAsync(UpdateUserPasswordModel user);
Task UpdateUserAvatarAsync(UpdateUserAvatarModel user);
Task UpdateStaffAvatarAsync(UpdateStaffAvatarModel staff);
Task SendMsgCodeAsync(SendMsgCodeModel model);
Task<bool> VerifyMsgCodeAsync(VerifyMsgCodeModel model);
Task<bool> UpdatePhoneNumberAsync(UpdateUserPhoneNumberModel user);
Task UpdateBasicInfoAsync(UpdateUserBasicInfoModel user);
Task UpdateStaffBasicInfoAsync(UpdateStaffBasicInfoModel user);
Task<List<UserPortraitModel>> GetUserPortraitsAsync(params Guid[] userIds);
Task SaveUserSystemDataAsync<T>(string systemId, T data);
Task<T?> GetUserSystemDataAsync<T>(string systemId);
Task<bool> DisableUserAsync(DisableUserModel user);
Task<List<UserSimpleModel>> GetListByAccountAsync(IEnumerable<string> accounts);
Task<UserModel?> LoginByPhoneNumberAsync(LoginByPhoneNumberModel login);
Task<TokenModel> LoginByPhoneNumberFromSsoAsync(string address, LoginByPhoneNumberFromSso login);
Task RemoveUserRolesAsync(RemoveUserRolesModel user);
Task SetCurrentTeamAsync(Guid teamId);
Task SendEmailAsync(SendEmailModel model);
Task RegisterByPhoneAsync(RegisterByPhoneModel model);
Task RegisterByEmailAsync(RegisterByEmailModel model);
Task<bool> HasPasswordAsync(Guid userId = default);
Task<UserModel> RegisterThirdPartyUserAsync(RegisterThirdPartyUserModel model);
Task<bool> HasPhoneNumberInEnvAsync(string env, string phoneNumber);
Task<bool> ResetPasswordByEmailAsync(ResetPasswordByEmailModel resetPasswordByEmailModel);
Task<bool> ResetPasswordByPhoneAsync(ResetPasswordByPhoneModel resetPasswordByPhoneModel);
}