Skip to content

Commit

Permalink
Merge pull request #53 from DFE-Digital/feature/187136-all-projects-i…
Browse files Browse the repository at this point in the history
…n-progress

Feature/187136 Add all projects in progress page and commands
  • Loading branch information
sukhybhullar-nimble authored Jan 29, 2025
2 parents 51d0770 + e23efff commit 9907d6e
Show file tree
Hide file tree
Showing 89 changed files with 3,346 additions and 727 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# complete-api
API service to the Complete application to help the process of schools converting to academies, transferring between academy trusts or changing their academy status.

## Setup

### Frontend setup

- wwwroot npm i then npm run build
- Setup db
- Run migration
- User secrets
389 changes: 217 additions & 172 deletions src/Api/Dfe.Complete.Api.Client/Generated/Client.g.cs

Large diffs are not rendered by default.

118 changes: 91 additions & 27 deletions src/Api/Dfe.Complete.Api.Client/Generated/Contracts.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,46 +25,69 @@ namespace Dfe.Complete.Client.Contracts
using System = global::System;

[System.CodeDom.Compiler.GeneratedCode("NSwag", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial interface ICreateProjectClient
public partial interface IProjectsClient
{
/// <summary>
/// Creates a new Project
/// </summary>
/// <param name="request">The request.</param>
/// <returns>Project created successfully.</returns>
/// <exception cref="PersonsApiException">A server side error occurred.</exception>
System.Threading.Tasks.Task<ProjectId> Projects_CreateProject_Async(CreateConversionProjectCommand request);
/// <exception cref="CompleteApiException">A server side error occurred.</exception>
System.Threading.Tasks.Task<ProjectId> CreateProjectAsync(CreateConversionProjectCommand request);

/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>
/// Creates a new Project
/// </summary>
/// <param name="request">The request.</param>
/// <returns>Project created successfully.</returns>
/// <exception cref="PersonsApiException">A server side error occurred.</exception>
System.Threading.Tasks.Task<ProjectId> Projects_CreateProject_Async(CreateConversionProjectCommand request, System.Threading.CancellationToken cancellationToken);
/// <exception cref="CompleteApiException">A server side error occurred.</exception>
System.Threading.Tasks.Task<ProjectId> CreateProjectAsync(CreateConversionProjectCommand request, System.Threading.CancellationToken cancellationToken);

}

[System.CodeDom.Compiler.GeneratedCode("NSwag", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial interface IGetProjectClient
{
/// <summary>
/// Gets a Project
/// </summary>
/// <param name="request">The request.</param>
/// <returns>Project</returns>
/// <exception cref="PersonsApiException">A server side error occurred.</exception>
System.Threading.Tasks.Task<ProjectDto> Projects_GetProject_Async(GetProjectByUrnQuery request);
/// <exception cref="CompleteApiException">A server side error occurred.</exception>
System.Threading.Tasks.Task<ProjectDto> GetProjectAsync(int? urn_Value);

/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>
/// Gets a Project
/// </summary>
/// <param name="request">The request.</param>
/// <returns>Project</returns>
/// <exception cref="PersonsApiException">A server side error occurred.</exception>
System.Threading.Tasks.Task<ProjectDto> Projects_GetProject_Async(GetProjectByUrnQuery request, System.Threading.CancellationToken cancellationToken);
/// <exception cref="CompleteApiException">A server side error occurred.</exception>
System.Threading.Tasks.Task<ProjectDto> GetProjectAsync(int? urn_Value, System.Threading.CancellationToken cancellationToken);

/// <summary>
/// Returns a list of Projects
/// </summary>
/// <returns>Project</returns>
/// <exception cref="CompleteApiException">A server side error occurred.</exception>
System.Threading.Tasks.Task<System.Collections.ObjectModel.ObservableCollection<ListAllProjectsResultModel>> ListAllProjectsAsync(ProjectState? projectStatus, ProjectType? type, int? page, int? count);

/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>
/// Returns a list of Projects
/// </summary>
/// <returns>Project</returns>
/// <exception cref="CompleteApiException">A server side error occurred.</exception>
System.Threading.Tasks.Task<System.Collections.ObjectModel.ObservableCollection<ListAllProjectsResultModel>> ListAllProjectsAsync(ProjectState? projectStatus, ProjectType? type, int? page, int? count, System.Threading.CancellationToken cancellationToken);

/// <summary>
/// Returns the number of Projects
/// </summary>
/// <returns>Project</returns>
/// <exception cref="CompleteApiException">A server side error occurred.</exception>
System.Threading.Tasks.Task<int> CountAllProjectsAsync(ProjectState? projectStatus, ProjectType? type);

/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>
/// Returns the number of Projects
/// </summary>
/// <returns>Project</returns>
/// <exception cref="CompleteApiException">A server side error occurred.</exception>
System.Threading.Tasks.Task<int> CountAllProjectsAsync(ProjectState? projectStatus, ProjectType? type, System.Threading.CancellationToken cancellationToken);

}

Expand All @@ -76,7 +99,7 @@ public partial interface IGetProjectGroupByGroupReferenceNumberClient
/// </summary>
/// <param name="groupReferenceNumber">The group reference number.</param>
/// <returns>Project Group returned successfully.</returns>
/// <exception cref="PersonsApiException">A server side error occurred.</exception>
/// <exception cref="CompleteApiException">A server side error occurred.</exception>
System.Threading.Tasks.Task<ProjectGroupDto> Projects_GetProjectGroupByGroupReferenceNumber_Async(string groupReferenceNumber);

/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
Expand All @@ -85,7 +108,7 @@ public partial interface IGetProjectGroupByGroupReferenceNumberClient
/// </summary>
/// <param name="groupReferenceNumber">The group reference number.</param>
/// <returns>Project Group returned successfully.</returns>
/// <exception cref="PersonsApiException">A server side error occurred.</exception>
/// <exception cref="CompleteApiException">A server side error occurred.</exception>
System.Threading.Tasks.Task<ProjectGroupDto> Projects_GetProjectGroupByGroupReferenceNumber_Async(string groupReferenceNumber, System.Threading.CancellationToken cancellationToken);

}
Expand Down Expand Up @@ -324,7 +347,8 @@ public partial class ProjectDto
public string? NewTrustName { get; set; } = default!;

[Newtonsoft.Json.JsonProperty("state", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? State { get; set; } = default!;
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public ProjectState? State { get; set; } = default!;

[Newtonsoft.Json.JsonProperty("prepareId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? PrepareId { get; set; } = default!;
Expand Down Expand Up @@ -503,6 +527,21 @@ public static ContactId FromJson(string data)

}

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")]
public enum ProjectState
{

[System.Runtime.Serialization.EnumMember(Value = @"Active")]
Active = 0,

[System.Runtime.Serialization.EnumMember(Value = @"Completed")]
Completed = 1,

[System.Runtime.Serialization.EnumMember(Value = @"Cancelled")]
Cancelled = 2,

}

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class ProjectGroupId
{
Expand Down Expand Up @@ -786,7 +825,8 @@ public partial class Project : BaseAggregateRoot
public string? NewTrustName { get; set; } = default!;

[Newtonsoft.Json.JsonProperty("state", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? State { get; set; } = default!;
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public ProjectState? State { get; set; } = default!;

[Newtonsoft.Json.JsonProperty("prepareId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int? PrepareId { get; set; } = default!;
Expand Down Expand Up @@ -951,21 +991,45 @@ public static IDomainEvent FromJson(string data)
}

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class GetProjectByUrnQuery
public partial class ListAllProjectsResultModel
{
[Newtonsoft.Json.JsonProperty("establishmentName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string? EstablishmentName { get; set; } = default!;

[Newtonsoft.Json.JsonProperty("projectId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public ProjectId? ProjectId { get; set; } = default!;

[Newtonsoft.Json.JsonProperty("urn", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Urn? Urn { get; set; } = default!;

[Newtonsoft.Json.JsonProperty("conversionOrTransferDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[Newtonsoft.Json.JsonConverter(typeof(DateFormatConverter))]
public System.DateTime? ConversionOrTransferDate { get; set; } = default!;

[Newtonsoft.Json.JsonProperty("state", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public ProjectState? State { get; set; } = default!;

[Newtonsoft.Json.JsonProperty("projectType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public ProjectType? ProjectType { get; set; } = default!;

[Newtonsoft.Json.JsonProperty("isFormAMAT", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? IsFormAMAT { get; set; } = default!;

[Newtonsoft.Json.JsonProperty("assignedToFullName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string? AssignedToFullName { get; set; } = default!;

public string ToJson()
{

return Newtonsoft.Json.JsonConvert.SerializeObject(this, new Newtonsoft.Json.JsonSerializerSettings());

}
public static GetProjectByUrnQuery FromJson(string data)
public static ListAllProjectsResultModel FromJson(string data)
{

return Newtonsoft.Json.JsonConvert.DeserializeObject<GetProjectByUrnQuery>(data, new Newtonsoft.Json.JsonSerializerSettings());
return Newtonsoft.Json.JsonConvert.DeserializeObject<ListAllProjectsResultModel>(data, new Newtonsoft.Json.JsonSerializerSettings());

}

Expand Down Expand Up @@ -1016,15 +1080,15 @@ public DateFormatConverter()


[System.CodeDom.Compiler.GeneratedCode("NSwag", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class PersonsApiException : System.Exception
public partial class CompleteApiException : System.Exception
{
public int StatusCode { get; private set; }

public string? Response { get; private set; }

public System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> Headers { get; private set; }

public PersonsApiException(string message, int statusCode, string? response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, System.Exception? innerException)
public CompleteApiException(string message, int statusCode, string? response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, System.Exception? innerException)
: base(message + "\n\nStatus: " + statusCode + "\nResponse: \n" + ((response == null) ? "(null)" : response.Substring(0, response.Length >= 512 ? 512 : response.Length)), innerException)
{
StatusCode = statusCode;
Expand All @@ -1039,11 +1103,11 @@ public override string ToString()
}

[System.CodeDom.Compiler.GeneratedCode("NSwag", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class PersonsApiException<TResult> : PersonsApiException
public partial class CompleteApiException<TResult> : CompleteApiException
{
public TResult Result { get; private set; }

public PersonsApiException(string message, int statusCode, string? response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, TResult result, System.Exception? innerException)
public CompleteApiException(string message, int statusCode, string? response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, TResult result, System.Exception? innerException)
: base(message, statusCode, response, headers, innerException)
{
Result = result;
Expand Down
Loading

0 comments on commit 9907d6e

Please sign in to comment.