| | | 1 | | namespace Anichron.API.Infrastructure; |
| | | 2 | | |
| | | 3 | | internal static class ApiPaths |
| | | 4 | | { |
| | | 5 | | internal const string Base = "/api/v1"; |
| | | 6 | | internal const string Healthz = $"{Base}/healthz"; |
| | | 7 | | |
| | | 8 | | internal static class Auth |
| | | 9 | | { |
| | | 10 | | internal const string Group = "auth"; |
| | | 11 | | internal const string Register = "/register"; |
| | | 12 | | internal const string Login = "/login"; |
| | | 13 | | internal const string LoginMobile = "/login/mobile"; |
| | | 14 | | internal const string Refresh = "/refresh"; |
| | | 15 | | internal const string Logout = "/logout"; |
| | | 16 | | internal const string PasswordResetRequest = "/password-reset/request"; |
| | | 17 | | internal const string PasswordResetConfirm = "/password-reset/confirm"; |
| | | 18 | | |
| | | 19 | | internal const string LogoutPath = $"{Base}/{Group}{Logout}"; |
| | | 20 | | } |
| | | 21 | | |
| | | 22 | | internal static class Users |
| | | 23 | | { |
| | | 24 | | internal const string Group = "users"; |
| | | 25 | | internal const string Me = "/me"; |
| | | 26 | | internal const string ChangePassword = $"{Me}/password"; |
| | | 27 | | internal const string StorageConfigs = "storage-configs"; |
| | | 28 | | |
| | | 29 | | internal const string ById = "{userId:guid}"; |
| | | 30 | | internal const string PasswordReset = "{userId:guid}/password-reset"; |
| | | 31 | | internal const string UserStorageConfigs = $"{{userId:guid}}/{StorageConfigs}"; |
| | | 32 | | internal const string UserStorageConfigById = $"{{userId:guid}}/{StorageConfigs}/{{configId:guid}}"; |
| | | 33 | | |
| | | 34 | | internal const string MePath = $"{Base}/{Group}{Me}"; |
| | | 35 | | internal const string ChangePasswordPath = $"{Base}/{Group}{ChangePassword}"; |
| | | 36 | | |
| | | 37 | | internal static string UserLocation(Guid userId) |
| | 1 | 38 | | => $"{Base}/{Group}/{userId}"; |
| | | 39 | | |
| | | 40 | | internal static string StorageConfigLocation(Guid userId, Guid configId) |
| | 1 | 41 | | => $"{Base}/{Group}/{userId}/{StorageConfigs}/{configId}"; |
| | | 42 | | } |
| | | 43 | | } |