IUsAppAuthAppService.cs
3.31 KB
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
using FoodLabeling.Application.Contracts.Dtos.UsAppAuth;
using Volo.Abp.Application.Services;
using Yi.Framework.Rbac.Application.Contracts.Dtos.Account;
namespace FoodLabeling.Application.Contracts.IServices;
/// <summary>
/// 美国版移动端认证(登录返回绑定门店)
/// </summary>
public interface IUsAppAuthAppService : IApplicationService
{
/// <summary>
/// App 登录:使用邮箱 + 密码校验并签发 Token,同时返回 userlocation 绑定的门店
/// </summary>
Task<UsAppLoginOutputDto> LoginAsync(UsAppLoginInputVo input);
/// <summary>
/// 获取当前登录账号已绑定的门店(用于切换门店等场景)
/// </summary>
Task<List<UsAppBoundLocationDto>> GetMyLocationsAsync();
/// <summary>
/// 获取当前登录用户资料(My Profile:姓名、邮箱、电话、员工号、角色)
/// </summary>
/// <returns>资料 DTO</returns>
/// <response code="200">成功</response>
/// <response code="400">未登录或用户不存在</response>
/// <response code="500">服务器错误</response>
Task<UsAppMyProfileOutputDto> GetMyProfileAsync();
/// <summary>
/// 当前登录用户修改密码(校验原密码与复杂度规则)
/// </summary>
/// <param name="input">当前密码、新密码、确认密码</param>
/// <remarks>
/// 新密码需满足:至少 8 位;含大写与小写字母;至少 1 位数字;至少 1 个非字母数字特殊字符。
/// </remarks>
/// <response code="200">成功</response>
/// <response code="400">参数或校验失败</response>
/// <response code="500">服务器错误</response>
Task ChangePasswordAsync(UsAppChangePasswordInputVo input);
/// <summary>
/// 按门店 Id 查询 Location 详情(须为当前账号 userlocation 绑定门店)
/// </summary>
/// <param name="locationId">门店 Guid 字符串</param>
/// <returns>店名、地址、电话、经营时间(operatingHours)、店长信息</returns>
/// <response code="200">成功</response>
/// <response code="400">参数非法、未绑定或无权限</response>
/// <response code="500">服务器错误</response>
Task<UsAppLocationDetailOutputDto> GetLocationDetailAsync(string locationId);
/// <summary>
/// App forgot password: send email verification code (same user store and rules as platform).
/// </summary>
/// <remarks>
/// When <c>RbacOptions.EnableCaptcha</c> is true, pass <c>Uuid</c> and <c>Code</c> from platform captcha API.
/// </remarks>
/// <param name="input">Email and optional image captcha.</param>
/// <response code="200">Accepted.</response>
/// <response code="400">Validation or rate limit.</response>
/// <response code="500">Server error</response>
Task PostSendForgotPasswordCodeByEmailAsync(EmailCaptchaImageDto input);
/// <summary>
/// App forgot password: reset password with email OTP.
/// </summary>
/// <param name="input">Email, OTP, new password.</param>
/// <returns>Account user name.</returns>
/// <response code="200">Password updated.</response>
/// <response code="400">Invalid code or password policy.</response>
/// <response code="500">Server error</response>
Task<string> PostResetPasswordByEmailAsync(RetrievePasswordByEmailDto input);
}