Skip to content

Commit 87f178b

Browse files
committed
TD-6127: Added Api calls from Blazor WASM to Open Api not included the models.
1 parent fd45e10 commit 87f178b

29 files changed

+738
-36
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using Newtonsoft.Json;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
8+
namespace LearningHub.Nhs.Models.Shared
9+
{
10+
public class AutoSuggestionCatalogue
11+
{
12+
/// <summary>
13+
/// Gets or sets the id.
14+
/// </summary>
15+
[JsonProperty("id")]
16+
public string Id { get; set; }
17+
18+
/// <summary>
19+
/// Gets or sets the NumberOfHits.
20+
/// </summary>
21+
[JsonProperty("numberOfHits")]
22+
public int TotalHits { get; set; }
23+
24+
/// <summary>
25+
/// Gets or sets the CatalogueDocumentList.
26+
/// </summary>
27+
[JsonProperty("documents")]
28+
public List<AutoSuggestionCatalogueDocument> CatalogueDocumentList { get; set; }
29+
}
30+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using Newtonsoft.Json;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
8+
namespace LearningHub.Nhs.Models.Shared
9+
{
10+
public class AutoSuggestionCatalogueDocument
11+
{
12+
/// <summary>
13+
/// Gets or sets the id.
14+
/// </summary>
15+
[JsonProperty("_id")]
16+
public string Id { get; set; }
17+
18+
/// <summary>
19+
/// Gets or sets the name.
20+
/// </summary>
21+
[JsonProperty("name")]
22+
public string Name { get; set; }
23+
24+
/// <summary>
25+
/// Gets or sets the url.
26+
/// </summary>
27+
public string Url { get; set; }
28+
29+
/// <summary>
30+
/// Gets or sets the click details.
31+
/// </summary>
32+
[JsonProperty("_click")]
33+
public AutoSuggestionClickModel Click { get; set; }
34+
}
35+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using Newtonsoft.Json;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
8+
namespace LearningHub.Nhs.Models.Shared
9+
{
10+
public class AutoSuggestionClickModel
11+
{
12+
/// <summary>
13+
/// Gets or sets the search feedback action payload.
14+
/// </summary>
15+
[JsonProperty(PropertyName = "payload")]
16+
public AutoSuggestionClickPayloadModel Payload { get; set; }
17+
18+
/// <summary>
19+
/// Gets or sets the url.
20+
/// </summary>
21+
[JsonProperty(PropertyName = "url")]
22+
public string Url { get; set; }
23+
}
24+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
using Newtonsoft.Json;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
8+
namespace LearningHub.Nhs.Models.Shared
9+
{
10+
public class AutoSuggestionClickPayloadModel
11+
{
12+
/// <summary>
13+
/// Initializes a new instance of the <see cref="AutoSuggestionClickPayloadModel"/> class.
14+
/// </summary>
15+
public AutoSuggestionClickPayloadModel()
16+
{
17+
this.SearchSignal = new SearchClickSignalModel();
18+
this.DocumentFields = new SearchClickDocumentModel();
19+
}
20+
21+
/// <summary>
22+
/// Gets or sets the search action.
23+
/// </summary>
24+
[JsonProperty(PropertyName = "searchSignal")]
25+
public SearchClickSignalModel SearchSignal { get; set; }
26+
27+
/// <summary>
28+
/// Gets or sets the hit number.
29+
/// </summary>
30+
[JsonProperty(PropertyName = "hitNumber")]
31+
public int HitNumber { get; set; }
32+
33+
/// <summary>
34+
/// Gets or sets the click target url.
35+
/// </summary>
36+
[JsonProperty(PropertyName = "clickTargetUrl")]
37+
public string ClickTargetUrl { get; set; }
38+
39+
/// <summary>
40+
/// Gets or sets the search stats.
41+
/// </summary>
42+
[JsonProperty(PropertyName = "documentFields")]
43+
public SearchClickDocumentModel DocumentFields { get; set; }
44+
45+
/// <summary>
46+
/// Gets or sets the container Id.
47+
/// </summary>
48+
[JsonProperty(PropertyName = "containerId")]
49+
public string ContainerId { get; set; }
50+
51+
/// <summary>
52+
/// Gets or sets the time of click.
53+
/// </summary>
54+
[JsonProperty(PropertyName = "timeOfClick")]
55+
public long? TimeOfClick { get; set; }
56+
}
57+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using Newtonsoft.Json;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
8+
namespace LearningHub.Nhs.Models.Shared
9+
{
10+
public class AutoSuggestionConcept
11+
{
12+
/// <summary>
13+
/// Gets or sets the id.
14+
/// </summary>
15+
[JsonProperty("id")]
16+
public string Id { get; set; }
17+
18+
/// <summary>
19+
/// Gets or sets the NumberOfHits.
20+
/// </summary>
21+
[JsonProperty("numberOfHits")]
22+
public int TotalHits { get; set; }
23+
24+
/// <summary>
25+
/// Gets or sets the ConceptDocumentList.
26+
/// </summary>
27+
[JsonProperty("documents")]
28+
public List<AutoSuggestionConceptDocument> ConceptDocumentList { get; set; }
29+
}
30+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using Newtonsoft.Json;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
8+
namespace LearningHub.Nhs.Models.Shared
9+
{
10+
public class AutoSuggestionConceptDocument
11+
{
12+
/// <summary>
13+
/// Gets or sets the id.
14+
/// </summary>
15+
[JsonProperty("_id")]
16+
public string Id { get; set; }
17+
18+
/// <summary>
19+
/// Gets or sets the Title.
20+
/// </summary>
21+
[JsonProperty("title")]
22+
public string Title { get; set; }
23+
24+
/// <summary>
25+
/// Gets or sets the Concept.
26+
/// </summary>
27+
[JsonProperty("concept")]
28+
public string Concept { get; set; }
29+
30+
/// <summary>
31+
/// Gets or sets the click details.
32+
/// </summary>
33+
[JsonProperty("_click")]
34+
public AutoSuggestionClickModel Click { get; set; }
35+
}
36+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using Newtonsoft.Json;
2+
3+
namespace LearningHub.Nhs.Models.Shared
4+
{
5+
public class AutoSuggestionModel
6+
{
7+
/// <summary>
8+
/// Gets or sets the stats.
9+
/// </summary>
10+
[JsonProperty("stats")]
11+
public Stats Stats { get; set; }
12+
13+
/// <summary>
14+
/// Gets or sets the Catalogue documents.
15+
/// </summary>
16+
[JsonProperty("catalogues_documents")]
17+
public AutoSuggestionCatalogue CatalogueDocument { get; set; }
18+
19+
/// <summary>
20+
/// Gets or sets the Concept documents.
21+
/// </summary>
22+
[JsonProperty("concepts_documents")]
23+
public AutoSuggestionConcept ConceptDocument { get; set; }
24+
25+
/// <summary>
26+
/// Gets or sets the Resource Documents.
27+
/// </summary>
28+
[JsonProperty("resources_documents")]
29+
public AutoSuggestionResource ResourceDocument { get; set; }
30+
}
31+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using Newtonsoft.Json;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
8+
namespace LearningHub.Nhs.Models.Shared
9+
{
10+
public class AutoSuggestionResource
11+
{
12+
/// <summary>
13+
/// Gets or sets the id.
14+
/// </summary>
15+
[JsonProperty("id")]
16+
public string Id { get; set; }
17+
18+
/// <summary>
19+
/// Gets or sets the NumberOfHits.
20+
/// </summary>
21+
[JsonProperty("numberOfHits")]
22+
public int TotalHits { get; set; }
23+
24+
/// <summary>
25+
/// Gets or sets the ResourceDocumentList.
26+
/// </summary>
27+
[JsonProperty("documents")]
28+
public List<AutoSuggestionResourceDocument> ResourceDocumentList { get; set; }
29+
}
30+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using Newtonsoft.Json;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
8+
namespace LearningHub.Nhs.Models.Shared
9+
{
10+
public class AutoSuggestionResourceDocument
11+
{
12+
/// <summary>
13+
/// Gets or sets the id.
14+
/// </summary>
15+
[JsonProperty("_id")]
16+
public string Id { get; set; }
17+
18+
/// <summary>
19+
/// Gets or sets the Title.
20+
/// </summary>
21+
[JsonProperty("title")]
22+
public string Title { get; set; }
23+
24+
/// <summary>
25+
/// Gets or sets the resource reference id.
26+
/// </summary>
27+
[JsonProperty("resource_reference_id")]
28+
public int ResourceReferenceId { get; set; }
29+
30+
/// <summary>
31+
/// Gets or sets the click details.
32+
/// </summary>
33+
[JsonProperty("_click")]
34+
public AutoSuggestionClickModel Click { get; set; }
35+
}
36+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
11+
</ItemGroup>
12+
13+
</Project>

0 commit comments

Comments
 (0)