-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initiatives list to project dashboard and stub out initiative das…
…hboard
- Loading branch information
1 parent
959f702
commit beb9dd8
Showing
106 changed files
with
1,211 additions
and
670 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Bones.Api.Controllers; | ||
|
||
public sealed partial class AccountController | ||
{ | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
Backend/Bones.Api/Controllers/AccountController.Responses.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Bones.Api.Controllers; | ||
|
||
public sealed partial class AccountController | ||
{ | ||
/// <summary> | ||
/// | ||
/// </summary> | ||
/// <param name="Email"></param> | ||
/// <param name="DisplayName"></param> | ||
[Serializable] | ||
[JsonSerializable(typeof(GetMyBasicInfoResponse))] | ||
public record GetMyBasicInfoResponse(string Email, string DisplayName); | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
/// <param name="Email"></param> | ||
/// <param name="EmailConfirmed"></param> | ||
/// <param name="EmailConfirmedDateTime"></param> | ||
/// <param name="DisplayName"></param> | ||
/// <param name="CreateDateTime"></param> | ||
[Serializable] | ||
[JsonSerializable(typeof(GetMyProfileResponse))] | ||
public record GetMyProfileResponse(string Email, bool EmailConfirmed, DateTimeOffset? EmailConfirmedDateTime, string DisplayName, DateTimeOffset CreateDateTime); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
Backend/Bones.Api/Controllers/AnonymousController.Requests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Bones.Api.Controllers; | ||
|
||
public sealed partial class AnonymousController | ||
{ | ||
/// <summary> | ||
/// Request to register a new user | ||
/// </summary> | ||
/// <param name="Email">Email, must be valid and unique</param> | ||
/// <param name="Password">Password, must pass validation (1 upper, 1 lower, 1 number, 1 special character, and at least 8 characters long)</param> | ||
[Serializable] | ||
[JsonSerializable(typeof(RegisterUserApiRequest))] | ||
public sealed record RegisterUserApiRequest([Required] string Email, [Required] string Password); | ||
} |
6 changes: 6 additions & 0 deletions
6
Backend/Bones.Api/Controllers/AnonymousController.Responses.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Bones.Api.Controllers; | ||
|
||
public sealed partial class AnonymousController | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Bones.Api.Controllers; | ||
|
||
public sealed partial class LoginController | ||
{ | ||
/// <summary> | ||
/// Request to login | ||
/// </summary> | ||
/// <param name="Email">The users email address</param> | ||
/// <param name="Password">The users password</param> | ||
/// <param name="TwoFactorCode">If they have 2fa, include the code here</param> | ||
/// <param name="TwoFactorRecoveryCode">If they have 2fa and can't use their authenticator, include a recovery code here</param> | ||
[Serializable] | ||
[JsonSerializable(typeof(LoginUserApiRequest))] | ||
public sealed record LoginUserApiRequest([Required] string Email, [Required] string Password, string? TwoFactorCode, string? TwoFactorRecoveryCode); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Bones.Api.Controllers; | ||
|
||
public sealed partial class LoginController | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
Backend/Bones.Api/Controllers/ProjectController.Requests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
using System.Text.Json.Serialization; | ||
using Bones.Shared.Backend.Enums; | ||
|
||
namespace Bones.Api.Controllers; | ||
|
||
public sealed partial class ProjectController | ||
{ | ||
/// <summary> | ||
/// Request to create a new project | ||
/// </summary> | ||
/// <param name="Name">Name of the project to create</param> | ||
/// <param name="OrganizationId">Optionally the organization that this should be created under, if not specified will be created for the requesting user.</param> | ||
[Serializable] | ||
[JsonSerializable(typeof(CreateProjectRequest))] | ||
public record CreateProjectRequest([Required] string Name, Guid? OrganizationId = null); | ||
|
||
/// <summary> | ||
/// Request to create a new initiative | ||
/// </summary> | ||
/// <param name="Name">Name of the initiative to create</param> | ||
[Serializable] | ||
[JsonSerializable(typeof(CreateInitiativeRequest))] | ||
public record CreateInitiativeRequest([Required] string Name); | ||
|
||
/// <summary> | ||
/// Request to get the projects for a given User/Organization | ||
/// </summary> | ||
/// <param name="OwnerType">OwnerType to get</param> | ||
/// <param name="OrganizationId">Optionally the organization that this should be created under, if not specified will be created for the requesting user.</param> | ||
[Serializable] | ||
[JsonSerializable(typeof(GetProjectsByOwnerRequest))] | ||
public record GetProjectsByOwnerRequest([Required] OwnershipType OwnerType, Guid? OrganizationId = null); | ||
} |
53 changes: 53 additions & 0 deletions
53
Backend/Bones.Api/Controllers/ProjectController.Responses.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
using System.Text.Json.Serialization; | ||
using Bones.Shared.Backend.Enums; | ||
|
||
namespace Bones.Api.Controllers; | ||
|
||
public sealed partial class ProjectController | ||
{ | ||
/// <summary> | ||
/// | ||
/// </summary> | ||
/// <param name="ProjectId"></param> | ||
/// <param name="ProjectName"></param> | ||
[Serializable] | ||
[JsonSerializable(typeof(GetProjectQuickSelectResponse))] | ||
public record GetProjectQuickSelectResponse( | ||
Guid ProjectId, | ||
string ProjectName | ||
); | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
/// <param name="ProjectId"></param> | ||
/// <param name="ProjectName"></param> | ||
/// <param name="OwnerType"></param> | ||
/// <param name="OwnerId"></param> | ||
/// <param name="InitiativeCount"></param> | ||
/// <param name="Initiatives"></param> | ||
[Serializable] | ||
[JsonSerializable(typeof(GetProjectDashboardResponse))] | ||
public record GetProjectDashboardResponse( | ||
Guid ProjectId, | ||
string ProjectName, | ||
OwnershipType OwnerType, | ||
Guid OwnerId, | ||
int InitiativeCount, | ||
List<InitiativeListModel> Initiatives | ||
); | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
/// <param name="InitiativeId"></param> | ||
/// <param name="InitiativeName"></param> | ||
/// <param name="QueueCount"></param> | ||
[Serializable] | ||
[JsonSerializable(typeof(InitiativeListModel))] | ||
public sealed record InitiativeListModel( | ||
Guid InitiativeId, | ||
string InitiativeName, | ||
int QueueCount | ||
); | ||
} |
Oops, something went wrong.