Compare commits

...

3 Commits

Author SHA1 Message Date
Sergio Matias Urquin
e5c2dcd2aa Fix: pass the internal server error through layers. 2025-08-31 17:47:58 -06:00
Ignacio Gomez
255062adff Update nuget 2025-06-21 22:49:13 -06:00
Sergio Matias Urquin
8744e8841b remove old dependencies 2025-05-17 18:45:14 -06:00
11 changed files with 7 additions and 226 deletions

View File

@ -34,7 +34,7 @@ namespace Lib.Architecture.BuildingBlocks.Helpers
}
}
if (refitException.StatusCode == HttpStatusCode.InternalServerError)
if (refitException.StatusCode == HttpStatusCode.InternalServerError && (errorMessage is string || errorMessage is HttpError))
port.InternalServerError(errorMessage);
else if (refitException.StatusCode == HttpStatusCode.NotFound)

View File

@ -1,6 +1,6 @@
// ***********************************************************************
// <copyright file="AuthenticatedHttpClientHandler.cs">
// Heath
// AgileWebs
// </copyright>
// ***********************************************************************

View File

@ -1,6 +1,6 @@
// ***********************************************************************
// <copyright file="HttpContextTokenProvider.cs">
// Heath
// AgileWebs
// </copyright>
// ***********************************************************************

View File

@ -1,6 +1,6 @@
// ***********************************************************************
// <copyright file="ITokenProvider.cs">
// Heath
// AgileWebs
// </copyright>
// ***********************************************************************

View File

@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Core.Blueprint.Mongo" Version="0.3.0-alpha0047" />
<PackageReference Include="Core.Blueprint.Mongo" Version="1.0.0" />
<PackageReference Include="FluentValidation" Version="11.11.0" />
<PackageReference Include="FluentValidation.AspNetCore" Version="11.3.0" />
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.11.0" />

View File

@ -1,6 +1,6 @@
// ***********************************************************************
// <copyright file="ErrorDetailsDto.cs">
// Heath
// AgileWebs
// </copyright>
// ***********************************************************************

View File

@ -1,6 +1,6 @@
// ***********************************************************************
// <copyright file="HttpErrorDto.cs">
// Heath
// AgileWebs
// </copyright>
// ***********************************************************************

View File

@ -1,88 +0,0 @@
using Core.Blueprint.Mongo;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using Newtonsoft.Json;
namespace Lib.Architecture.BuildingBlocks.Adapters;
[CollectionAttributeName("GPSPoints")]
public class GPSPointAdapter : Document
{
[BsonElement("features")]
[JsonProperty("features")]
public List<FeatureCollection> Features { get; set; } = null!;
[BsonElement("timestamp")]
[JsonProperty("timestamp")]
public DateTime Timestamp { get; set; }
}
public class FeatureCollection
{
[BsonElement("type")]
[JsonProperty("type")]
public string Type { get; set; } = null!;
[BsonElement("geometry")]
[JsonProperty("geometry")]
public Geometry Geometry { get; set; } = null!;
[BsonElement("properties")]
[JsonProperty("properties")]
public Properties Properties { get; set; } = null!;
}
public class Properties
{
[BsonElement("technicianId")]
[BsonRepresentation(BsonType.ObjectId)]
[JsonProperty("technicianId")]
public string TechnicianId { get; set; } = null!;
[BsonElement("technicianName")]
[JsonProperty("technicianName")]
public string TechnicianName { get; set; } = null!;
[BsonElement("sbuSurveyId")]
[BsonRepresentation(BsonType.ObjectId)]
[JsonProperty("sbuSurveyId")]
public string SbuSurveyId { get; set; } = null!;
[BsonElement("sbuSurveyMapsheetId")]
[BsonRepresentation(BsonType.ObjectId)]
[JsonProperty("sbuSurveyMapsheetId")]
public string SbuSurveyMapsheetId { get; set; } = null!;
[BsonElement("trailId")]
[JsonProperty("trailId")]
public string TrailId { get; set; } = null!;
[BsonElement("deviceSerialNumber")]
[JsonProperty("deviceSerialNumber")]
public string DeviceSerialNumber { get; set; } = null!;
}
public class Geometry
{
[BsonElement("type")]
[JsonProperty("type")]
public string Type { get; set; } = null!;
[BsonElement("coordinates")]
[JsonProperty("coordinates")]
public List<double> Coordinates { get; set; } = null!;
[BsonElement("latitude")]
[JsonProperty("latitude")]
public double Latitude { get; set; }
[BsonElement("longitude")]
[JsonProperty("longitude")]
public double Longitude { get; set; }
[BsonElement("orientation")]
[JsonProperty("orientation")]
public double Orientation { get; set; }
[BsonElement("accuracy")]
[JsonProperty("accuracy")]
public int Accuracy { get; set; }
}

View File

@ -1,15 +0,0 @@
using MongoDB.Bson.Serialization.Attributes;
using Newtonsoft.Json;
namespace Lib.Architecture.BuildingBlocks.Adapters;
public class GeometryAdapter
{
[BsonElement("type")]
[JsonProperty("type")]
public string Type { get; set; } = null!;
[BsonElement("coordinates")]
[JsonProperty("coordinates")]
public List<double> Coordinates { get; set; } = null!;
}

View File

@ -1,87 +0,0 @@
using Core.Blueprint.Mongo;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using Newtonsoft.Json;
using System.Text.Json.Serialization;
namespace Lib.Architecture.BuildingBlocks.Adapters;
[CollectionAttributeName("Mapsheets")]
public class MapsheetAdapter : Document
{
[BsonElement("features")]
[JsonProperty("features")]
public List<MapsheetCollection>? Features { get; set; }
[BsonElement("timestamp")]
[JsonProperty("timestamp")]
public DateTime Timestamp { get; set; }
}
public class MapsheetTechnicians
{
[BsonElement("technicianId")]
[BsonRepresentation(BsonType.ObjectId)]
[JsonProperty("technicianId")]
public string TechnicianId { get; set; } = null!;
[BsonElement("technicianName")]
[JsonProperty("technicianName")]
public string TechnicianName { get; set; } = null!;
}
public class MapsheetProperties
{
[BsonElement("surveyId")]
[BsonRepresentation(BsonType.ObjectId)]
[JsonProperty("surveyId")]
public string SurveyId { get; set; }
[BsonElement("mapsheetName")]
[JsonProperty("mapsheetName")]
public string MapsheetName { get; set; } = null!;
[BsonElement("workOrderNumber")]
[JsonProperty("workOrderNumber")]
public string WorkOrderNumber { get; set; } = null!;
[BsonElement("mapsheetStatus")]
[BsonRepresentation(BsonType.String)]
[JsonProperty("mapsheetStatus")]
[System.Text.Json.Serialization.JsonConverter(typeof(JsonStringEnumConverter))]
public MapsheetStatus MapsheetStatus { get; set; }
[BsonElement("footage")]
[JsonProperty("footage")]
public int Footage { get; set; }
}
[System.Text.Json.Serialization.JsonConverter(typeof(JsonStringEnumConverter))]
public enum MapsheetStatus
{
Ready = 1,
InProgress = 2,
Complete = 3,
QaPending = 4,
Closed = 5,
Reopened = 6
}
public class MapsheetCollection
{
[BsonElement("type")]
[JsonProperty("type")]
public string Type { get; set; } = null!;
[BsonElement("mapsheetTechnicians")]
[JsonProperty("mapsheetTechnicians")]
public List<MapsheetTechnicians>? MapsheetTechnicians { get; set; }
[BsonElement("geometry")]
[JsonProperty("geometry")]
public List<GeometryAdapter> Geometry { get; set; } = null!;
[BsonElement("properties")]
[JsonProperty("properties")]
public MapsheetProperties? Properties { get; set; }
}

View File

@ -1,29 +0,0 @@
using Core.Blueprint.Mongo;
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Lib.Architecture.BuildingBlocks.Adapters;
[CollectionAttributeName("Surveys")]
public class SurveyAdapter : Document
{
[BsonElement("surveyName")]
[JsonPropertyName("surveyName")]
public string SurveyName { get; set; } = null!;
[BsonElement("surveyType")]
[JsonPropertyName("surveyType")]
public string SurveyType { get; set; } = null!;
[BsonElement("locations")]
[JsonPropertyName("locations")]
public List<string> Locations { get; set; } = [];
[BsonElement("project")]
[JsonPropertyName("project")]
public string Project { get; set; } = null!;
[BsonElement("surveyStatus")]
[JsonPropertyName("surveyStatus")]
public string SurveyStatus { get; set; } = null!;
}