diff --git a/EliteAPI.Events.Generator/Program.cs b/EliteAPI.Events.Generator/Program.cs index d2a9bd4b9..b9e934546 100644 --- a/EliteAPI.Events.Generator/Program.cs +++ b/EliteAPI.Events.Generator/Program.cs @@ -10,6 +10,7 @@ var description = schema["description"]?.Value(); var properties = new List<(string type, string name)>(); + var subClasses = new Dictionary>(); if(schema["properties"] == null) { @@ -24,6 +25,10 @@ continue; var propertyType = (string)property.First!["type"]!; + + if (propertyName.EndsWith("ID") || propertyName.EndsWith("Address")) + propertyType = "string"; + var propertyTypeName = GetCSharpType(propertyType); properties.Add((propertyTypeName, propertyName)); } @@ -39,11 +44,14 @@ var jsonPropertyAttribute = $"[JsonProperty(\"{property.name}\")]"; var propertyAttribute = $"public {property.type} {property.name} {{ get; init; }}"; + if(property.type.StartsWith("SUBCLASS")) + continue; + if (!content.Contains(jsonPropertyAttribute)) { Console.WriteLine($"Property {property.name} not found in {rawSchema.name}Event.cs"); - var propertyLine = $"\n {jsonPropertyAttribute}\n {propertyAttribute}"; + var propertyLine = $"\n {jsonPropertyAttribute}\n {propertyAttribute}\n"; // Add the property to the class file, just before the last bracket @@ -51,8 +59,33 @@ content = content.Insert(lastBracket, propertyLine); - File.WriteAllText(file.FullName, content); + // Format the file + content = content.Replace("\n\n\n", "\n\n"); + // Indent based on brackets + var lines = content.Split('\n'); + var indent = 0; + for (var i = 0; i < lines.Length; i++) + { + var line = lines[i].Trim(); + indent -= line.Count(c => c == '}'); + indent += line.Count(c => c == '{'); + + if (line.StartsWith('{')) + { + lines[i] = new string('\t', indent - 1) + line; + } + else + { + lines[i] = new string('\t', indent) + line; + } + + + } + + content = string.Join('\n', lines); + + File.WriteAllText(file.FullName, content); } } } @@ -70,6 +103,8 @@ string GetCSharpType(string jsonType) "number" => "double", "integer" => "int", "boolean" => "bool", + "object" => "SUBCLASS:OBJECT", + "array" => "SUBCLASS:ARRAY", _ => jsonType }; } \ No newline at end of file diff --git a/EliteAPI.Events/ApproachSettlementEvent.cs b/EliteAPI.Events/ApproachSettlementEvent.cs index f23505677..462ef75b9 100644 --- a/EliteAPI.Events/ApproachSettlementEvent.cs +++ b/EliteAPI.Events/ApproachSettlementEvent.cs @@ -5,30 +5,39 @@ namespace EliteAPI.Events; public readonly struct ApproachSettlementEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Name")] - public string Name { get; init; } - - [JsonProperty("MarketID")] - public string MarketId { get; init; } - - [JsonProperty("SystemAddress")] - public string SystemAddress { get; init; } - - [JsonProperty("BodyID")] - public string BodyId { get; init; } - - [JsonProperty("BodyName")] - public string BodyName { get; init; } - - [JsonProperty("Latitude")] - public double Latitude { get; init; } - - [JsonProperty("Longitude")] - public double Longitude { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Name")] + public string Name { get; init; } + + [JsonProperty("MarketID")] + public string MarketId { get; init; } + + [JsonProperty("SystemAddress")] + public string SystemAddress { get; init; } + + [JsonProperty("BodyID")] + public string BodyId { get; init; } + + [JsonProperty("BodyName")] + public string BodyName { get; init; } + + [JsonProperty("Latitude")] + public double Latitude { get; init; } + + [JsonProperty("Longitude")] + public double Longitude { get; init; } + + [JsonProperty("StationGovernment")] + public string StationGovernment { get; init; } + + [JsonProperty("StationAllegiance")] + public string StationAllegiance { get; init; } + + [JsonProperty("StationEconomy")] + public string StationEconomy { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/BountyEvent.cs b/EliteAPI.Events/BountyEvent.cs index 25e53356c..0e2fe4734 100644 --- a/EliteAPI.Events/BountyEvent.cs +++ b/EliteAPI.Events/BountyEvent.cs @@ -5,40 +5,43 @@ namespace EliteAPI.Events; public readonly struct BountyEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Rewards")] - public IReadOnlyCollection Rewards { get; init; } - - [JsonProperty("Target")] - public Localised Target { get; init; } - - [JsonProperty("TotalReward")] - public long TotalReward { get; init; } - - [JsonProperty("VictimFaction")] - public string VictimFaction { get; init; } - - [JsonProperty("SharedWithOthers")] - public long SharedWithOthers { get; init; } - - [JsonProperty("Faction")] - public string Faction { get; init; } - - - [JsonProperty("Reward")] - public long Reward { get; init; } - - public readonly struct BountyRewardInfo - { - [JsonProperty("Faction")] - public string Faction { get; init; } - - [JsonProperty("Reward")] - public long Reward { get; init; } - } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Rewards")] + public IReadOnlyCollection Rewards { get; init; } + + [JsonProperty("Target")] + public Localised Target { get; init; } + + [JsonProperty("TotalReward")] + public long TotalReward { get; init; } + + [JsonProperty("VictimFaction")] + public string VictimFaction { get; init; } + + [JsonProperty("SharedWithOthers")] + public long SharedWithOthers { get; init; } + + [JsonProperty("Faction")] + public string Faction { get; init; } + + + [JsonProperty("Reward")] + public long Reward { get; init; } + + public readonly struct BountyRewardInfo + { + [JsonProperty("Faction")] + public string Faction { get; init; } + + [JsonProperty("Reward")] + public long Reward { get; init; } + } + + [JsonProperty("PilotName")] + public string PilotName { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/BuySuitEvent.cs b/EliteAPI.Events/BuySuitEvent.cs index b6f819f32..ccbc989a7 100644 --- a/EliteAPI.Events/BuySuitEvent.cs +++ b/EliteAPI.Events/BuySuitEvent.cs @@ -1,22 +1,25 @@ -using EliteAPI.Abstractions.Events; +using EliteAPI.Abstractions.Events; using Newtonsoft.Json; namespace EliteAPI.Events; public readonly struct BuySuitEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Name")] - public Localised Name { get; init; } - - [JsonProperty("Price")] - public long Price { get; init; } - - [JsonProperty("SuitId")] - public string SuitId { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Name")] + public Localised Name { get; init; } + + [JsonProperty("Price")] + public long Price { get; init; } + + [JsonProperty("SuitId")] + public string SuitId { get; init; } + + [JsonProperty("SuitID")] + public string SuitID { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/CarrierFinanceEvent.cs b/EliteAPI.Events/CarrierFinanceEvent.cs index 02e523aa4..14703196d 100644 --- a/EliteAPI.Events/CarrierFinanceEvent.cs +++ b/EliteAPI.Events/CarrierFinanceEvent.cs @@ -1,31 +1,49 @@ -using EliteAPI.Abstractions.Events; +using EliteAPI.Abstractions.Events; using Newtonsoft.Json; namespace EliteAPI.Events; public readonly struct CarrierFinanceEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("CarrierID")] - public string CarrierId { get; init; } - - [JsonProperty("TaxRate")] - public long TaxRate { get; init; } - - [JsonProperty("CarrierBalance")] - public long Balance { get; init; } - - [JsonProperty("ReserveBalance")] - public long ReserveBalance { get; init; } - - [JsonProperty("AvailableBalance")] - public long AvailableBalance { get; init; } - - [JsonProperty("ReservePercent")] - public long ReservePercent { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("CarrierID")] + public string CarrierId { get; init; } + + [JsonProperty("TaxRate")] + public long TaxRate { get; init; } + + [JsonProperty("CarrierBalance")] + public long Balance { get; init; } + + [JsonProperty("ReserveBalance")] + public long ReserveBalance { get; init; } + + [JsonProperty("AvailableBalance")] + public long AvailableBalance { get; init; } + + [JsonProperty("ReservePercent")] + public long ReservePercent { get; init; } + + [JsonProperty("TaxRate_pioneersupplies")] + public int TaxRatePioneerSupplies { get; init; } + + [JsonProperty("TaxRate_shipyard")] + public int TaxRateShipyard { get; init; } + + [JsonProperty("TaxRate_rearm")] + public int TaxRateRearm { get; init; } + + [JsonProperty("TaxRate_outfitting")] + public int TaxRateOutfitting { get; init; } + + [JsonProperty("TaxRate_refuel")] + public int TaxRateRefuel { get; init; } + + [JsonProperty("TaxRate_repair")] + public int TaxRateRepair { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/CarrierJumpEvent.cs b/EliteAPI.Events/CarrierJumpEvent.cs index c61be4274..33bc1bf87 100644 --- a/EliteAPI.Events/CarrierJumpEvent.cs +++ b/EliteAPI.Events/CarrierJumpEvent.cs @@ -5,89 +5,101 @@ namespace EliteAPI.Events; public readonly struct CarrierJumpEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Docked")] - public bool IsDocked { get; init; } - - [JsonProperty("StationName")] - public string StationName { get; init; } - - [JsonProperty("StationType")] - public string StationType { get; init; } - - [JsonProperty("MarketID")] - public string MarketId { get; init; } - - [JsonProperty("StationFaction")] - public StationFactionInfo StationFaction { get; init; } - - [JsonProperty("StationGovernment")] - public Localised StationGovernment { get; init; } - - [JsonProperty("StationServices")] - public IReadOnlyCollection StationServices { get; init; } - - [JsonProperty("StationEconomy")] - public Localised StationEconomy { get; init; } - - [JsonProperty("StationEconomies")] - public IReadOnlyCollection StationEconomies { get; init; } - - [JsonProperty("StarSystem")] - public string StarSystem { get; init; } - - [JsonProperty("SystemAddress")] - public string SystemAddress { get; init; } - - [JsonProperty("StarPos")] - public IReadOnlyCollection StarPos { get; init; } - - [JsonProperty("SystemAllegiance")] - public string SystemAllegiance { get; init; } - - [JsonProperty("SystemEconomy")] - public Localised SystemEconomy { get; init; } - - [JsonProperty("SystemSecondEconomy")] - public Localised SystemSecondEconomy { get; init; } - - [JsonProperty("SystemGovernment")] - public Localised SystemGovernment { get; init; } - - [JsonProperty("SystemSecurity")] - public Localised SystemSecurity { get; init; } - - [JsonProperty("Population")] - public long Population { get; init; } - - [JsonProperty("Body")] - public string Body { get; init; } - - [JsonProperty("BodyID")] - public string BodyId { get; init; } - - [JsonProperty("BodyType")] - public string BodyType { get; init; } - - - public readonly struct StationEconomyInfo - { - [JsonProperty("Name")] - public Localised Name { get; init; } - - [JsonProperty("Proportion")] - public double Proportion { get; init; } - } - - - public readonly struct StationFactionInfo - { - [JsonProperty("Name")] - public string Name { get; init; } - } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Docked")] + public bool IsDocked { get; init; } + + [JsonProperty("StationName")] + public string StationName { get; init; } + + [JsonProperty("StationType")] + public string StationType { get; init; } + + [JsonProperty("MarketID")] + public string MarketId { get; init; } + + [JsonProperty("StationFaction")] + public StationFactionInfo StationFaction { get; init; } + + [JsonProperty("StationGovernment")] + public Localised StationGovernment { get; init; } + + [JsonProperty("StationServices")] + public IReadOnlyCollection StationServices { get; init; } + + [JsonProperty("StationEconomy")] + public Localised StationEconomy { get; init; } + + [JsonProperty("StationEconomies")] + public IReadOnlyCollection StationEconomies { get; init; } + + [JsonProperty("StarSystem")] + public string StarSystem { get; init; } + + [JsonProperty("SystemAddress")] + public string SystemAddress { get; init; } + + [JsonProperty("StarPos")] + public IReadOnlyCollection StarPos { get; init; } + + [JsonProperty("SystemAllegiance")] + public string SystemAllegiance { get; init; } + + [JsonProperty("SystemEconomy")] + public Localised SystemEconomy { get; init; } + + [JsonProperty("SystemSecondEconomy")] + public Localised SystemSecondEconomy { get; init; } + + [JsonProperty("SystemGovernment")] + public Localised SystemGovernment { get; init; } + + [JsonProperty("SystemSecurity")] + public Localised SystemSecurity { get; init; } + + [JsonProperty("Population")] + public long Population { get; init; } + + [JsonProperty("Body")] + public string Body { get; init; } + + [JsonProperty("BodyID")] + public string BodyId { get; init; } + + [JsonProperty("BodyType")] + public string BodyType { get; init; } + + + public readonly struct StationEconomyInfo + { + [JsonProperty("Name")] + public Localised Name { get; init; } + + [JsonProperty("Proportion")] + public double Proportion { get; init; } + } + + + public readonly struct StationFactionInfo + { + [JsonProperty("Name")] + public string Name { get; init; } + } + + [JsonProperty("OnFoot")] + public bool IsOnFoot { get; init; } + + [JsonProperty("Taxi")] + public bool IsInTaxi { get; init; } + + [JsonProperty("Multicrew")] + public bool IsMulticrew { get; init; } + + [JsonProperty("PowerplayState")] + public string PowerplayState { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/CarrierJumpRequestEvent.cs b/EliteAPI.Events/CarrierJumpRequestEvent.cs index 1c6d85729..d34eea4eb 100644 --- a/EliteAPI.Events/CarrierJumpRequestEvent.cs +++ b/EliteAPI.Events/CarrierJumpRequestEvent.cs @@ -5,24 +5,27 @@ namespace EliteAPI.Events; public readonly struct CarrierJumpRequestEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("CarrierID")] - public string CarrierId { get; init; } - - [JsonProperty("SystemName")] - public string SystemName { get; init; } - - [JsonProperty("Body")] - public string Body { get; init; } - - [JsonProperty("SystemAddress")] - public string SystemAddress { get; init; } - - [JsonProperty("BodyID")] - public string BodyId { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("CarrierID")] + public string CarrierId { get; init; } + + [JsonProperty("SystemName")] + public string SystemName { get; init; } + + [JsonProperty("Body")] + public string Body { get; init; } + + [JsonProperty("SystemAddress")] + public string SystemAddress { get; init; } + + [JsonProperty("BodyID")] + public string BodyId { get; init; } + + [JsonProperty("DepartureTime")] + public string DepartureTime { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/ChangeCrewRoleEvent.cs b/EliteAPI.Events/ChangeCrewRoleEvent.cs index fa017eea1..45d4d9c87 100644 --- a/EliteAPI.Events/ChangeCrewRoleEvent.cs +++ b/EliteAPI.Events/ChangeCrewRoleEvent.cs @@ -5,12 +5,15 @@ namespace EliteAPI.Events; public readonly struct ChangeCrewRoleEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Role")] - public string Role { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Role")] + public string Role { get; init; } + + [JsonProperty("Telepresence")] + public bool IsInTelepresence { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/ClearImpoundEvent.cs b/EliteAPI.Events/ClearImpoundEvent.cs index a6ea4927f..39c7ab474 100644 --- a/EliteAPI.Events/ClearImpoundEvent.cs +++ b/EliteAPI.Events/ClearImpoundEvent.cs @@ -1,25 +1,31 @@ -using EliteAPI.Abstractions.Events; +using EliteAPI.Abstractions.Events; using Newtonsoft.Json; namespace EliteAPI.Events; public readonly struct ClearImpoundEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("ShipType")] - public string ShipType { get; init; } - - [JsonProperty("ShipID")] - public string ShipId { get; init; } - - [JsonProperty("ShipMarketID")] - public string ShipMarketId { get; init; } - - [JsonProperty("MarkedID")] - public string MarkedId { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("ShipType")] + public string ShipType { get; init; } + + [JsonProperty("ShipID")] + public string ShipId { get; init; } + + [JsonProperty("ShipMarketID")] + public string ShipMarketId { get; init; } + + [JsonProperty("MarkedID")] + public string MarkedId { get; init; } + + [JsonProperty("MarketID")] + public string MarketID { get; init; } + + [JsonProperty("System")] + public string System { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/CodexEntryEvent.cs b/EliteAPI.Events/CodexEntryEvent.cs index 73250a3d7..2a826517d 100644 --- a/EliteAPI.Events/CodexEntryEvent.cs +++ b/EliteAPI.Events/CodexEntryEvent.cs @@ -5,36 +5,51 @@ namespace EliteAPI.Events; public readonly struct CodexEntryEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("EntryID")] - public string EntryId { get; init; } - - [JsonProperty("Name")] - public Localised Name { get; init; } - - [JsonProperty("SubCategory")] - public Localised SubCategory { get; init; } - - [JsonProperty("Category")] - public Localised Category { get; init; } - - [JsonProperty("Region")] - public Localised Region { get; init; } - - [JsonProperty("System")] - public string System { get; init; } - - [JsonProperty("SystemAddress")] - public string SystemAddress { get; init; } - - [JsonProperty("IsNewEntry")] - public bool IsNewEntry { get; init; } - - [JsonProperty("NearestDestination")] - public Localised NearestDestination { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("EntryID")] + public string EntryId { get; init; } + + [JsonProperty("Name")] + public Localised Name { get; init; } + + [JsonProperty("SubCategory")] + public Localised SubCategory { get; init; } + + [JsonProperty("Category")] + public Localised Category { get; init; } + + [JsonProperty("Region")] + public Localised Region { get; init; } + + [JsonProperty("System")] + public string System { get; init; } + + [JsonProperty("SystemAddress")] + public string SystemAddress { get; init; } + + [JsonProperty("IsNewEntry")] + public bool IsNewEntry { get; init; } + + [JsonProperty("NearestDestination")] + public Localised NearestDestination { get; init; } + + [JsonProperty("BodyID")] + public string BodyID { get; init; } + + [JsonProperty("Latitude")] + public double Latitude { get; init; } + + [JsonProperty("Longitude")] + public double Longitude { get; init; } + + [JsonProperty("VoucherAmount")] + public int VoucherAmount { get; init; } + + [JsonProperty("NewTraitsDiscovered")] + public bool HasNewTraitsDiscovered { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/CollectCargoEvent.cs b/EliteAPI.Events/CollectCargoEvent.cs index 3c4cd0ca8..42bf52d47 100644 --- a/EliteAPI.Events/CollectCargoEvent.cs +++ b/EliteAPI.Events/CollectCargoEvent.cs @@ -5,15 +5,18 @@ namespace EliteAPI.Events; public readonly struct CollectCargoEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Type")] - public Localised Type { get; init; } - - [JsonProperty("Stolen")] - public bool IsStolen { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Type")] + public Localised Type { get; init; } + + [JsonProperty("Stolen")] + public bool IsStolen { get; init; } + + [JsonProperty("MissionID")] + public string MissionID { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/CrewFireEvent.cs b/EliteAPI.Events/CrewFireEvent.cs index 061066508..aa3f7c202 100644 --- a/EliteAPI.Events/CrewFireEvent.cs +++ b/EliteAPI.Events/CrewFireEvent.cs @@ -5,12 +5,15 @@ namespace EliteAPI.Events; public readonly struct CrewFireEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Name")] - public string Name { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Name")] + public string Name { get; init; } + + [JsonProperty("CrewID")] + public string CrewID { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/CrewHireEvent.cs b/EliteAPI.Events/CrewHireEvent.cs index 1738a45c6..d977542b9 100644 --- a/EliteAPI.Events/CrewHireEvent.cs +++ b/EliteAPI.Events/CrewHireEvent.cs @@ -5,21 +5,24 @@ namespace EliteAPI.Events; public readonly struct CrewHireEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Name")] - public string Name { get; init; } - - [JsonProperty("Faction")] - public string Faction { get; init; } - - [JsonProperty("Cost")] - public long Cost { get; init; } - - [JsonProperty("CombatRank")] - public long CombatRank { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Name")] + public string Name { get; init; } + + [JsonProperty("Faction")] + public string Faction { get; init; } + + [JsonProperty("Cost")] + public long Cost { get; init; } + + [JsonProperty("CombatRank")] + public long CombatRank { get; init; } + + [JsonProperty("CrewID")] + public string CrewID { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/CrewLaunchFighterEvent.cs b/EliteAPI.Events/CrewLaunchFighterEvent.cs index 98ea4b5f0..9dddf8435 100644 --- a/EliteAPI.Events/CrewLaunchFighterEvent.cs +++ b/EliteAPI.Events/CrewLaunchFighterEvent.cs @@ -5,12 +5,15 @@ namespace EliteAPI.Events; public readonly struct CrewLaunchFighterEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Crew")] - public string Crew { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Crew")] + public string Crew { get; init; } + + [JsonProperty("Telepresence")] + public bool IsInTelepresence { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/CrewMemberJoinsEvent.cs b/EliteAPI.Events/CrewMemberJoinsEvent.cs index d700a692f..b53f3773a 100644 --- a/EliteAPI.Events/CrewMemberJoinsEvent.cs +++ b/EliteAPI.Events/CrewMemberJoinsEvent.cs @@ -5,12 +5,15 @@ namespace EliteAPI.Events; public readonly struct CrewMemberJoinsEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Crew")] - public string Crew { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Crew")] + public string Crew { get; init; } + + [JsonProperty("Telepresence")] + public bool IsInTelepresence { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/CrewMemberQuitsEvent.cs b/EliteAPI.Events/CrewMemberQuitsEvent.cs index 6f7f1d8d9..2b0102b99 100644 --- a/EliteAPI.Events/CrewMemberQuitsEvent.cs +++ b/EliteAPI.Events/CrewMemberQuitsEvent.cs @@ -5,12 +5,15 @@ namespace EliteAPI.Events; public readonly struct CrewMemberQuitsEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Crew")] - public string Crew { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Crew")] + public string Crew { get; init; } + + [JsonProperty("Telepresence")] + public bool IsInTelepresence { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/CrewMemberRoleChangeEvent.cs b/EliteAPI.Events/CrewMemberRoleChangeEvent.cs index 58d638bc1..86de78a47 100644 --- a/EliteAPI.Events/CrewMemberRoleChangeEvent.cs +++ b/EliteAPI.Events/CrewMemberRoleChangeEvent.cs @@ -5,15 +5,18 @@ namespace EliteAPI.Events; public readonly struct CrewMemberRoleChangeEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Crew")] - public string Crew { get; init; } - - [JsonProperty("Role")] - public string Role { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Crew")] + public string Crew { get; init; } + + [JsonProperty("Role")] + public string Role { get; init; } + + [JsonProperty("Telepresence")] + public bool IsInTelepresence { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/CrimeVictimEvent.cs b/EliteAPI.Events/CrimeVictimEvent.cs index e62790462..a1fb43078 100644 --- a/EliteAPI.Events/CrimeVictimEvent.cs +++ b/EliteAPI.Events/CrimeVictimEvent.cs @@ -5,18 +5,21 @@ namespace EliteAPI.Events; public readonly struct CrimeVictimEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Offender")] - public string Offender { get; init; } - - [JsonProperty("CrimeType")] - public string CrimeType { get; init; } - - [JsonProperty("Bounty")] - public long Bounty { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Offender")] + public string Offender { get; init; } + + [JsonProperty("CrimeType")] + public string CrimeType { get; init; } + + [JsonProperty("Bounty")] + public long Bounty { get; init; } + + [JsonProperty("Fine")] + public int Fine { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/DiedEvent.cs b/EliteAPI.Events/DiedEvent.cs index 445e7377b..12dac7ee2 100644 --- a/EliteAPI.Events/DiedEvent.cs +++ b/EliteAPI.Events/DiedEvent.cs @@ -5,15 +5,18 @@ namespace EliteAPI.Events; public readonly struct DiedEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("KillerName")] - public string KillerName { get; init; } - - [JsonProperty("KillerShip")] - public string KillerShip { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("KillerName")] + public string KillerName { get; init; } + + [JsonProperty("KillerShip")] + public string KillerShip { get; init; } + + [JsonProperty("KillerRank")] + public string KillerRank { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/DisembarkEvent.cs b/EliteAPI.Events/DisembarkEvent.cs index 290ab4ea3..1389368bf 100644 --- a/EliteAPI.Events/DisembarkEvent.cs +++ b/EliteAPI.Events/DisembarkEvent.cs @@ -1,49 +1,52 @@ -using EliteAPI.Abstractions.Events; +using EliteAPI.Abstractions.Events; using Newtonsoft.Json; namespace EliteAPI.Events; public readonly struct DisembarkEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("SRV")] - public bool IsSrv { get; init; } - - [JsonProperty("Taxi")] - public bool IsTaxi { get; init; } - - [JsonProperty("Multicrew")] - public bool IsMulticrew { get; init; } - - [JsonProperty("StarSystem")] - public string StarSystem { get; init; } - - [JsonProperty("SystemAddress")] - public string SystemAddress { get; init; } - - [JsonProperty("Body")] - public string Body { get; init; } - - [JsonProperty("BodyID")] - public string BodyId { get; init; } - - [JsonProperty("OnStation")] - public bool IsOnStation { get; init; } - - [JsonProperty("OnPlanet")] - public bool IsOnPlanet { get; init; } - - [JsonProperty("StationName")] - public string StationName { get; init; } - - [JsonProperty("StationType")] - public string StationType { get; init; } - - [JsonProperty("MarketID")] - public string MarketId { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("SRV")] + public bool IsSrv { get; init; } + + [JsonProperty("Taxi")] + public bool IsTaxi { get; init; } + + [JsonProperty("Multicrew")] + public bool IsMulticrew { get; init; } + + [JsonProperty("StarSystem")] + public string StarSystem { get; init; } + + [JsonProperty("SystemAddress")] + public string SystemAddress { get; init; } + + [JsonProperty("Body")] + public string Body { get; init; } + + [JsonProperty("BodyID")] + public string BodyId { get; init; } + + [JsonProperty("OnStation")] + public bool IsOnStation { get; init; } + + [JsonProperty("OnPlanet")] + public bool IsOnPlanet { get; init; } + + [JsonProperty("StationName")] + public string StationName { get; init; } + + [JsonProperty("StationType")] + public string StationType { get; init; } + + [JsonProperty("MarketID")] + public string MarketId { get; init; } + + [JsonProperty("ID")] + public string ID { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/DockSRVEvent.cs b/EliteAPI.Events/DockSRVEvent.cs index 54046dbb5..0ef32f89b 100644 --- a/EliteAPI.Events/DockSRVEvent.cs +++ b/EliteAPI.Events/DockSRVEvent.cs @@ -6,12 +6,15 @@ namespace EliteAPI.Events; public readonly struct DockSrvEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("ID")] - public string Id { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("ID")] + public string Id { get; init; } + + [JsonProperty("SRVType")] + public string SRVType { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/DockedEvent.cs b/EliteAPI.Events/DockedEvent.cs index a92470132..9a636f621 100644 --- a/EliteAPI.Events/DockedEvent.cs +++ b/EliteAPI.Events/DockedEvent.cs @@ -5,90 +5,99 @@ namespace EliteAPI.Events; public readonly struct DockedEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("StationName")] - public string StationName { get; init; } - - [JsonProperty("StationType")] - public string StationType { get; init; } - - [JsonProperty("StarSystem")] - public string StarSystem { get; init; } - - [JsonProperty("SystemAddress")] - public string SystemAddress { get; init; } - - [JsonProperty("MarketID")] - public string MarketId { get; init; } - - [JsonProperty("StationFaction")] - public StationFactionInfo StationFaction { get; init; } - - [JsonProperty("StationGovernment")] - public Localised StationGovernment { get; init; } - - [JsonProperty("StationAllegiance")] - public string StationAllegiance { get; init; } - - [JsonProperty("StationServices")] - public IReadOnlyCollection StationServices { get; init; } - - [JsonProperty("StationEconomy")] - public Localised StationEconomy { get; init; } - - [JsonProperty("StationEconomies")] - public IReadOnlyCollection StationEconomies { get; init; } - - [JsonProperty("DistFromStarLS")] - public double DistanceFromStarInLightSeconds { get; init; } - - [JsonProperty("ActiveFine")] - public bool HasActiveFine { get; init; } - - [JsonProperty("Taxi")] - public bool IsTaxi { get; init; } - - [JsonProperty("Multicrew")] - public bool IsMulticrew { get; init; } - - [JsonProperty("LandingPads")] - public LandingPadsInfo LandingPads { get; init; } - - - public readonly struct LandingPadsInfo - { - [JsonProperty("Small")] - public long Small { get; init; } - - [JsonProperty("Medium")] - public long Medium { get; init; } - - [JsonProperty("Large")] - public long Large { get; init; } - } - - - public readonly struct StationEconomyInfo - { - [JsonProperty("Name")] - public Localised Name { get; init; } - - [JsonProperty("Proportion")] - public double Proportion { get; init; } - } - - - public readonly struct StationFactionInfo - { - [JsonProperty("Name")] - public string Name { get; init; } - - [JsonProperty("FactionState")] - public string FactionState { get; init; } - } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("StationName")] + public string StationName { get; init; } + + [JsonProperty("StationType")] + public string StationType { get; init; } + + [JsonProperty("StarSystem")] + public string StarSystem { get; init; } + + [JsonProperty("SystemAddress")] + public string SystemAddress { get; init; } + + [JsonProperty("MarketID")] + public string MarketId { get; init; } + + [JsonProperty("StationFaction")] + public StationFactionInfo StationFaction { get; init; } + + [JsonProperty("StationGovernment")] + public Localised StationGovernment { get; init; } + + [JsonProperty("StationAllegiance")] + public string StationAllegiance { get; init; } + + [JsonProperty("StationServices")] + public IReadOnlyCollection StationServices { get; init; } + + [JsonProperty("StationEconomy")] + public Localised StationEconomy { get; init; } + + [JsonProperty("StationEconomies")] + public IReadOnlyCollection StationEconomies { get; init; } + + [JsonProperty("DistFromStarLS")] + public double DistanceFromStarInLightSeconds { get; init; } + + [JsonProperty("ActiveFine")] + public bool HasActiveFine { get; init; } + + [JsonProperty("Taxi")] + public bool IsTaxi { get; init; } + + [JsonProperty("Multicrew")] + public bool IsMulticrew { get; init; } + + [JsonProperty("LandingPads")] + public LandingPadsInfo LandingPads { get; init; } + + + public readonly struct LandingPadsInfo + { + [JsonProperty("Small")] + public long Small { get; init; } + + [JsonProperty("Medium")] + public long Medium { get; init; } + + [JsonProperty("Large")] + public long Large { get; init; } + } + + + public readonly struct StationEconomyInfo + { + [JsonProperty("Name")] + public Localised Name { get; init; } + + [JsonProperty("Proportion")] + public double Proportion { get; init; } + } + + + public readonly struct StationFactionInfo + { + [JsonProperty("Name")] + public string Name { get; init; } + + [JsonProperty("FactionState")] + public string FactionState { get; init; } + } + + [JsonProperty("Wanted")] + public bool IsWanted { get; init; } + + [JsonProperty("CockpitBreach")] + public bool HasBreachedCockpit { get; init; } + + [JsonProperty("StationState")] + public string StationState { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/DockingCancelledEvent.cs b/EliteAPI.Events/DockingCancelledEvent.cs index 077e6b7af..b245cce97 100644 --- a/EliteAPI.Events/DockingCancelledEvent.cs +++ b/EliteAPI.Events/DockingCancelledEvent.cs @@ -5,12 +5,18 @@ namespace EliteAPI.Events; public readonly struct DockingCancelledEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("StationName")] - public string StationName { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("StationName")] + public string StationName { get; init; } + + [JsonProperty("MarketID")] + public string MarketID { get; init; } + + [JsonProperty("StationType")] + public string StationType { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/DockingTimeoutEvent.cs b/EliteAPI.Events/DockingTimeoutEvent.cs index b1742a9b8..29600bf0d 100644 --- a/EliteAPI.Events/DockingTimeoutEvent.cs +++ b/EliteAPI.Events/DockingTimeoutEvent.cs @@ -5,12 +5,18 @@ namespace EliteAPI.Events; public readonly struct DockingTimeoutEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("StationName")] - public string StationName { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("StationName")] + public string StationName { get; init; } + + [JsonProperty("MarketID")] + public string MarketID { get; init; } + + [JsonProperty("StationType")] + public string StationType { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/EjectCargoEvent.cs b/EliteAPI.Events/EjectCargoEvent.cs index 84a52e5ff..2039289a8 100644 --- a/EliteAPI.Events/EjectCargoEvent.cs +++ b/EliteAPI.Events/EjectCargoEvent.cs @@ -5,18 +5,24 @@ namespace EliteAPI.Events; public readonly struct EjectCargoEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Type")] - public Localised Type { get; init; } - - [JsonProperty("Count")] - public long Count { get; init; } - - [JsonProperty("Abandoned")] - public bool IsAbandoned { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Type")] + public Localised Type { get; init; } + + [JsonProperty("Count")] + public long Count { get; init; } + + [JsonProperty("Abandoned")] + public bool IsAbandoned { get; init; } + + [JsonProperty("MissionID")] + public string MissionID { get; init; } + + [JsonProperty("PowerplayOrigin")] + public string PowerplayOrigin { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/EmbarkEvent.cs b/EliteAPI.Events/EmbarkEvent.cs index d9bba9a97..53d9b2a00 100644 --- a/EliteAPI.Events/EmbarkEvent.cs +++ b/EliteAPI.Events/EmbarkEvent.cs @@ -1,49 +1,52 @@ -using EliteAPI.Abstractions.Events; +using EliteAPI.Abstractions.Events; using Newtonsoft.Json; namespace EliteAPI.Events; public readonly struct EmbarkEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("SRV")] - public bool IsSrv { get; init; } - - [JsonProperty("Taxi")] - public bool IsTaxi { get; init; } - - [JsonProperty("Multicrew")] - public bool IsMulticrew { get; init; } - - [JsonProperty("StarSystem")] - public string StarSystem { get; init; } - - [JsonProperty("SystemAddress")] - public string SystemAddress { get; init; } - - [JsonProperty("Body")] - public string Body { get; init; } - - [JsonProperty("BodyID")] - public string BodyId { get; init; } - - [JsonProperty("OnStation")] - public bool IsOnStation { get; init; } - - [JsonProperty("OnPlanet")] - public bool IsOnPlanet { get; init; } - - [JsonProperty("StationName")] - public string StationName { get; init; } - - [JsonProperty("StationType")] - public string StationType { get; init; } - - [JsonProperty("MarketID")] - public string MarketId { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("SRV")] + public bool IsSrv { get; init; } + + [JsonProperty("Taxi")] + public bool IsTaxi { get; init; } + + [JsonProperty("Multicrew")] + public bool IsMulticrew { get; init; } + + [JsonProperty("StarSystem")] + public string StarSystem { get; init; } + + [JsonProperty("SystemAddress")] + public string SystemAddress { get; init; } + + [JsonProperty("Body")] + public string Body { get; init; } + + [JsonProperty("BodyID")] + public string BodyId { get; init; } + + [JsonProperty("OnStation")] + public bool IsOnStation { get; init; } + + [JsonProperty("OnPlanet")] + public bool IsOnPlanet { get; init; } + + [JsonProperty("StationName")] + public string StationName { get; init; } + + [JsonProperty("StationType")] + public string StationType { get; init; } + + [JsonProperty("MarketID")] + public string MarketId { get; init; } + + [JsonProperty("ID")] + public string ID { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/EndCrewSessionEvent.cs b/EliteAPI.Events/EndCrewSessionEvent.cs index 14c67342c..8186c5538 100644 --- a/EliteAPI.Events/EndCrewSessionEvent.cs +++ b/EliteAPI.Events/EndCrewSessionEvent.cs @@ -5,12 +5,15 @@ namespace EliteAPI.Events; public readonly struct EndCrewSessionEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("OnCrime")] - public bool IsCrime { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("OnCrime")] + public bool IsCrime { get; init; } + + [JsonProperty("Telepresence")] + public bool IsInTelepresence { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/EngineerContributionEvent.cs b/EliteAPI.Events/EngineerContributionEvent.cs index 277e29e6c..f3e3b7835 100644 --- a/EliteAPI.Events/EngineerContributionEvent.cs +++ b/EliteAPI.Events/EngineerContributionEvent.cs @@ -1,28 +1,34 @@ -using EliteAPI.Abstractions.Events; +using EliteAPI.Abstractions.Events; using Newtonsoft.Json; namespace EliteAPI.Events; public readonly struct EngineerContributionEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Engineer")] - public string Engineer { get; init; } - - [JsonProperty("Type")] - public string Type { get; init; } - - [JsonProperty("Material")] - public string Material { get; init; } - - [JsonProperty("Quantity")] - public long Quantity { get; init; } - - [JsonProperty("TotalQuantity")] - public long TotalQuantity { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Engineer")] + public string Engineer { get; init; } + + [JsonProperty("Type")] + public string Type { get; init; } + + [JsonProperty("Material")] + public string Material { get; init; } + + [JsonProperty("Quantity")] + public long Quantity { get; init; } + + [JsonProperty("TotalQuantity")] + public long TotalQuantity { get; init; } + + [JsonProperty("EngineerID")] + public string EngineerID { get; init; } + + [JsonProperty("Commodity")] + public string Commodity { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/EngineerCraftEvent.cs b/EliteAPI.Events/EngineerCraftEvent.cs index 1ccb1504a..0192fe966 100644 --- a/EliteAPI.Events/EngineerCraftEvent.cs +++ b/EliteAPI.Events/EngineerCraftEvent.cs @@ -5,68 +5,74 @@ namespace EliteAPI.Events; public readonly struct EngineerCraftEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Slot")] - public string Slot { get; init; } - - [JsonProperty("Module")] - public string Module { get; init; } - - [JsonProperty("Ingredients")] - public IReadOnlyCollection Ingredients { get; init; } - - [JsonProperty("Engineer")] - public string Engineer { get; init; } - - [JsonProperty("EngineerID")] - public string EngineerId { get; init; } - - [JsonProperty("BlueprintID")] - public string BlueprintId { get; init; } - - [JsonProperty("BlueprintName")] - public string BlueprintName { get; init; } - - [JsonProperty("Level")] - public long Level { get; init; } - - [JsonProperty("Quality")] - public double Quality { get; init; } - - [JsonProperty("Modifiers")] - public IReadOnlyCollection Modifiers { get; init; } - - - public readonly struct IngredientInfo - { - [JsonProperty("Name")] - public Localised Name { get; init; } - - [JsonProperty("Count")] - public long Count { get; init; } - } - - - public readonly struct ModifierInfo - { - [JsonProperty("Label")] - public string Label { get; init; } - - [JsonProperty("Value")] - public double Value { get; init; } - - [JsonProperty("ValueStr")] - public string ValueString { get; init; } - - [JsonProperty("OriginalValue")] - public double OriginalValue { get; init; } - - [JsonProperty("LessIsGood")] - public long LessIsGood { get; init; } - } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Slot")] + public string Slot { get; init; } + + [JsonProperty("Module")] + public string Module { get; init; } + + [JsonProperty("Ingredients")] + public IReadOnlyCollection Ingredients { get; init; } + + [JsonProperty("Engineer")] + public string Engineer { get; init; } + + [JsonProperty("EngineerID")] + public string EngineerId { get; init; } + + [JsonProperty("BlueprintID")] + public string BlueprintId { get; init; } + + [JsonProperty("BlueprintName")] + public string BlueprintName { get; init; } + + [JsonProperty("Level")] + public long Level { get; init; } + + [JsonProperty("Quality")] + public double Quality { get; init; } + + [JsonProperty("Modifiers")] + public IReadOnlyCollection Modifiers { get; init; } + + + public readonly struct IngredientInfo + { + [JsonProperty("Name")] + public Localised Name { get; init; } + + [JsonProperty("Count")] + public long Count { get; init; } + } + + + public readonly struct ModifierInfo + { + [JsonProperty("Label")] + public string Label { get; init; } + + [JsonProperty("Value")] + public double Value { get; init; } + + [JsonProperty("ValueStr")] + public string ValueString { get; init; } + + [JsonProperty("OriginalValue")] + public double OriginalValue { get; init; } + + [JsonProperty("LessIsGood")] + public long LessIsGood { get; init; } + } + + [JsonProperty("ApplyExperimentalEffect")] + public string ApplyExperimentalEffect { get; init; } + + [JsonProperty("ExperimentalEffect")] + public string ExperimentalEffect { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/EscapeInterdictionEvent.cs b/EliteAPI.Events/EscapeInterdictionEvent.cs index 757488bca..0a068f65d 100644 --- a/EliteAPI.Events/EscapeInterdictionEvent.cs +++ b/EliteAPI.Events/EscapeInterdictionEvent.cs @@ -5,15 +5,18 @@ namespace EliteAPI.Events; public readonly struct EscapeInterdictionEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Interdictor")] - public string Interdictor { get; init; } - - [JsonProperty("IsPlayer")] - public bool IsPlayer { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Interdictor")] + public string Interdictor { get; init; } + + [JsonProperty("IsPlayer")] + public bool IsPlayer { get; init; } + + [JsonProperty("IsThargoid")] + public bool IsThargoid { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/FSDJumpEvent.cs b/EliteAPI.Events/FSDJumpEvent.cs index af3a30f57..cb4a81c64 100644 --- a/EliteAPI.Events/FSDJumpEvent.cs +++ b/EliteAPI.Events/FSDJumpEvent.cs @@ -5,169 +5,175 @@ namespace EliteAPI.Events; public readonly struct FsdJumpEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("StarSystem")] - public string StarSystem { get; init; } - - [JsonProperty("SystemAddress")] - public string SystemAddress { get; init; } - - [JsonProperty("StarPos")] - public IReadOnlyCollection StarPos { get; init; } - - [JsonProperty("SystemAllegiance")] - public string SystemAllegiance { get; init; } - - [JsonProperty("SystemEconomy")] - public Localised SystemEconomy { get; init; } - - [JsonProperty("SystemSecondEconomy")] - public Localised SystemSecondEconomy { get; init; } - - [JsonProperty("SystemGovernment")] - public Localised SystemGovernment { get; init; } - - [JsonProperty("SystemSecurity")] - public Localised SystemSecurity { get; init; } - - [JsonProperty("Population")] - public long Population { get; init; } - - [JsonProperty("Body")] - public string Body { get; init; } - - [JsonProperty("BodyID")] - public string BodyId { get; init; } - - [JsonProperty("BodyType")] - public string BodyType { get; init; } - - [JsonProperty("JumpDist")] - public double JumpDist { get; init; } - - [JsonProperty("FuelUsed")] - public double FuelUsed { get; init; } - - [JsonProperty("FuelLevel")] - public double FuelLevel { get; init; } - - [JsonProperty("Taxi")] - public bool IsTaxi { get; init; } - - [JsonProperty("Multicrew")] - public bool IsMulticrew { get; init; } - - [JsonProperty("SystemFaction")] - public SystemFactionInfo SystemFaction { get; init; } - - [JsonProperty("Factions")] - public IReadOnlyCollection Factions { get; init; } - - [JsonProperty("Conflicts")] - public IReadOnlyCollection Conflicts { get; init; } - - - public readonly struct FactionInfo - { - [JsonProperty("Name")] - public string Name { get; init; } - - [JsonProperty("FactionState")] - public string FactionState { get; init; } - - [JsonProperty("Government")] - public string Government { get; init; } - - [JsonProperty("Influence")] - public double Influence { get; init; } - - [JsonProperty("Allegiance")] - public string Allegiance { get; init; } - - [JsonProperty("Happiness")] - public Localised Happiness { get; init; } - - [JsonProperty("MyReputation")] - public double MyReputation { get; init; } - - [JsonProperty("PendingStates")] - public IReadOnlyCollection PendingStates { get; init; } - - [JsonProperty("RecoveringStates")] - public IReadOnlyCollection RecoveringStates { get; init; } - - [JsonProperty("ActiveStates")] - public IReadOnlyCollection ActiveStates { get; init; } - } - - - public readonly struct ActiveStateInfo - { - [JsonProperty("State")] - public string State { get; init; } - } - - - public readonly struct PendingStateInfo - { - [JsonProperty("State")] - public string State { get; init; } - - [JsonProperty("Trend")] - public double Trend { get; init; } - } - - - public readonly struct RecoveringStateInfo - { - [JsonProperty("State")] - public string State { get; init; } - - [JsonProperty("Trend")] - public double Trend { get; init; } - } - - - public readonly struct SystemFactionInfo - { - [JsonProperty("Name")] - public string Name { get; init; } - - [JsonProperty("FactionState")] - public string FactionState { get; init; } - } - - - public readonly struct ConflictInfo - { - [JsonProperty("WarType")] - public string WarType { get; init; } - - [JsonProperty("Status")] - public string Status { get; init; } - - [JsonProperty("Faction1")] - public ConflictFactionInfo Faction1 { get; init; } - - [JsonProperty("Faction2")] - public ConflictFactionInfo Faction2 { get; init; } - } - - - public readonly struct ConflictFactionInfo - { - [JsonProperty("Name")] - public string Name { get; init; } - - [JsonProperty("Stake")] - public string Stake { get; init; } - - [JsonProperty("WonDays")] - public long WonDays { get; init; } - } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("StarSystem")] + public string StarSystem { get; init; } + + [JsonProperty("SystemAddress")] + public string SystemAddress { get; init; } + + [JsonProperty("StarPos")] + public IReadOnlyCollection StarPos { get; init; } + + [JsonProperty("SystemAllegiance")] + public string SystemAllegiance { get; init; } + + [JsonProperty("SystemEconomy")] + public Localised SystemEconomy { get; init; } + + [JsonProperty("SystemSecondEconomy")] + public Localised SystemSecondEconomy { get; init; } + + [JsonProperty("SystemGovernment")] + public Localised SystemGovernment { get; init; } + + [JsonProperty("SystemSecurity")] + public Localised SystemSecurity { get; init; } + + [JsonProperty("Population")] + public long Population { get; init; } + + [JsonProperty("Body")] + public string Body { get; init; } + + [JsonProperty("BodyID")] + public string BodyId { get; init; } + + [JsonProperty("BodyType")] + public string BodyType { get; init; } + + [JsonProperty("JumpDist")] + public double JumpDist { get; init; } + + [JsonProperty("FuelUsed")] + public double FuelUsed { get; init; } + + [JsonProperty("FuelLevel")] + public double FuelLevel { get; init; } + + [JsonProperty("Taxi")] + public bool IsTaxi { get; init; } + + [JsonProperty("Multicrew")] + public bool IsMulticrew { get; init; } + + [JsonProperty("SystemFaction")] + public SystemFactionInfo SystemFaction { get; init; } + + [JsonProperty("Factions")] + public IReadOnlyCollection Factions { get; init; } + + [JsonProperty("Conflicts")] + public IReadOnlyCollection Conflicts { get; init; } + + + public readonly struct FactionInfo + { + [JsonProperty("Name")] + public string Name { get; init; } + + [JsonProperty("FactionState")] + public string FactionState { get; init; } + + [JsonProperty("Government")] + public string Government { get; init; } + + [JsonProperty("Influence")] + public double Influence { get; init; } + + [JsonProperty("Allegiance")] + public string Allegiance { get; init; } + + [JsonProperty("Happiness")] + public Localised Happiness { get; init; } + + [JsonProperty("MyReputation")] + public double MyReputation { get; init; } + + [JsonProperty("PendingStates")] + public IReadOnlyCollection PendingStates { get; init; } + + [JsonProperty("RecoveringStates")] + public IReadOnlyCollection RecoveringStates { get; init; } + + [JsonProperty("ActiveStates")] + public IReadOnlyCollection ActiveStates { get; init; } + } + + + public readonly struct ActiveStateInfo + { + [JsonProperty("State")] + public string State { get; init; } + } + + + public readonly struct PendingStateInfo + { + [JsonProperty("State")] + public string State { get; init; } + + [JsonProperty("Trend")] + public double Trend { get; init; } + } + + + public readonly struct RecoveringStateInfo + { + [JsonProperty("State")] + public string State { get; init; } + + [JsonProperty("Trend")] + public double Trend { get; init; } + } + + + public readonly struct SystemFactionInfo + { + [JsonProperty("Name")] + public string Name { get; init; } + + [JsonProperty("FactionState")] + public string FactionState { get; init; } + } + + + public readonly struct ConflictInfo + { + [JsonProperty("WarType")] + public string WarType { get; init; } + + [JsonProperty("Status")] + public string Status { get; init; } + + [JsonProperty("Faction1")] + public ConflictFactionInfo Faction1 { get; init; } + + [JsonProperty("Faction2")] + public ConflictFactionInfo Faction2 { get; init; } + } + + + public readonly struct ConflictFactionInfo + { + [JsonProperty("Name")] + public string Name { get; init; } + + [JsonProperty("Stake")] + public string Stake { get; init; } + + [JsonProperty("WonDays")] + public long WonDays { get; init; } + } + + [JsonProperty("PowerplayState")] + public string PowerplayState { get; init; } + + [JsonProperty("BoostUsed")] + public int BoostUsed { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/FSSDiscoveryScanEvent.cs b/EliteAPI.Events/FSSDiscoveryScanEvent.cs index 063dbc924..32f0e007c 100644 --- a/EliteAPI.Events/FSSDiscoveryScanEvent.cs +++ b/EliteAPI.Events/FSSDiscoveryScanEvent.cs @@ -5,18 +5,24 @@ namespace EliteAPI.Events; public readonly struct FssDiscoveryScanEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Progress")] - public double Progress { get; init; } - - [JsonProperty("BodyCount")] - public long BodyCount { get; init; } - - [JsonProperty("NonBodyCount")] - public long NonBodyCount { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Progress")] + public double Progress { get; init; } + + [JsonProperty("BodyCount")] + public long BodyCount { get; init; } + + [JsonProperty("NonBodyCount")] + public long NonBodyCount { get; init; } + + [JsonProperty("SystemName")] + public string SystemName { get; init; } + + [JsonProperty("SystemAddress")] + public string SystemAddress { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/FSSSignalDiscoveredEvent.cs b/EliteAPI.Events/FSSSignalDiscoveredEvent.cs index a1d9bc48d..519e189a3 100644 --- a/EliteAPI.Events/FSSSignalDiscoveredEvent.cs +++ b/EliteAPI.Events/FSSSignalDiscoveredEvent.cs @@ -5,15 +5,36 @@ namespace EliteAPI.Events; public readonly struct FssSignalDiscoveredEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("SystemAddress")] - public string SystemAddress { get; init; } - - [JsonProperty("SignalName")] - public string SignalName { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("SystemAddress")] + public string SystemAddress { get; init; } + + [JsonProperty("SignalName")] + public string SignalName { get; init; } + + [JsonProperty("SignalType")] + public string SignalType { get; init; } + + [JsonProperty("IsStation")] + public bool IsStation { get; init; } + + [JsonProperty("USSType")] + public string USSType { get; init; } + + [JsonProperty("SpawningState")] + public string SpawningState { get; init; } + + [JsonProperty("SpawningFaction")] + public string SpawningFaction { get; init; } + + [JsonProperty("ThreatLevel")] + public int ThreatLevel { get; init; } + + [JsonProperty("TimeRemaining")] + public double TimeRemaining { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/HeatDamageEvent.cs b/EliteAPI.Events/HeatDamageEvent.cs index d98a71fef..0d4af1dff 100644 --- a/EliteAPI.Events/HeatDamageEvent.cs +++ b/EliteAPI.Events/HeatDamageEvent.cs @@ -5,9 +5,12 @@ namespace EliteAPI.Events; public readonly struct HeatDamageEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("ID")] + public string ID { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/InterdictedEvent.cs b/EliteAPI.Events/InterdictedEvent.cs index 619615998..98e375ad2 100644 --- a/EliteAPI.Events/InterdictedEvent.cs +++ b/EliteAPI.Events/InterdictedEvent.cs @@ -5,21 +5,30 @@ namespace EliteAPI.Events; public readonly struct InterdictedEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Submitted")] - public bool HasSubmitted { get; init; } - - [JsonProperty("Interdictor")] - public Localised Interdictor { get; init; } - - [JsonProperty("IsPlayer")] - public bool IsPlayer { get; init; } - - [JsonProperty("Faction")] - public string Faction { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Submitted")] + public bool HasSubmitted { get; init; } + + [JsonProperty("Interdictor")] + public Localised Interdictor { get; init; } + + [JsonProperty("IsPlayer")] + public bool IsPlayer { get; init; } + + [JsonProperty("Faction")] + public string Faction { get; init; } + + [JsonProperty("IsThargoid")] + public bool IsThargoid { get; init; } + + [JsonProperty("CombatRank")] + public int CombatRank { get; init; } + + [JsonProperty("Power")] + public string Power { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/InterdictionEvent.cs b/EliteAPI.Events/InterdictionEvent.cs index 43b44e568..2d157f8ff 100644 --- a/EliteAPI.Events/InterdictionEvent.cs +++ b/EliteAPI.Events/InterdictionEvent.cs @@ -5,18 +5,30 @@ namespace EliteAPI.Events; public readonly struct InterdictionEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Success")] - public bool IsSuccess { get; init; } - - [JsonProperty("IsPlayer")] - public bool IsPlayer { get; init; } - - [JsonProperty("Faction")] - public string Faction { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Success")] + public bool IsSuccess { get; init; } + + [JsonProperty("IsPlayer")] + public bool IsPlayer { get; init; } + + [JsonProperty("Faction")] + public string Faction { get; init; } + + [JsonProperty("Submitted")] + public bool HasSubmitted { get; init; } + + [JsonProperty("Interdicted")] + public string Interdicted { get; init; } + + [JsonProperty("CombatRank")] + public int CombatRank { get; init; } + + [JsonProperty("Power")] + public string Power { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/JoinACrewEvent.cs b/EliteAPI.Events/JoinACrewEvent.cs index 76516a6c8..8df1630a7 100644 --- a/EliteAPI.Events/JoinACrewEvent.cs +++ b/EliteAPI.Events/JoinACrewEvent.cs @@ -5,12 +5,15 @@ namespace EliteAPI.Events; public readonly struct JoinACrewEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Captain")] - public string Captain { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Captain")] + public string Captain { get; init; } + + [JsonProperty("Telepresence")] + public bool IsInTelepresence { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/KickCrewMemberEvent.cs b/EliteAPI.Events/KickCrewMemberEvent.cs index 0dee2917d..2e948bb55 100644 --- a/EliteAPI.Events/KickCrewMemberEvent.cs +++ b/EliteAPI.Events/KickCrewMemberEvent.cs @@ -5,15 +5,18 @@ namespace EliteAPI.Events; public readonly struct KickCrewMemberEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Crew")] - public string Crew { get; init; } - - [JsonProperty("OnCrime")] - public bool IsCrime { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Crew")] + public string Crew { get; init; } + + [JsonProperty("OnCrime")] + public bool IsCrime { get; init; } + + [JsonProperty("Telepresence")] + public bool IsInTelepresence { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/LaunchSRVEvent.cs b/EliteAPI.Events/LaunchSRVEvent.cs index f907763ad..02628394a 100644 --- a/EliteAPI.Events/LaunchSRVEvent.cs +++ b/EliteAPI.Events/LaunchSRVEvent.cs @@ -5,18 +5,21 @@ namespace EliteAPI.Events; public readonly struct LaunchSrvEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Loadout")] - public string Loadout { get; init; } - - [JsonProperty("ID")] - public string Id { get; init; } - - [JsonProperty("PlayerControlled")] - public bool IsPlayerControlled { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Loadout")] + public string Loadout { get; init; } + + [JsonProperty("ID")] + public string Id { get; init; } + + [JsonProperty("PlayerControlled")] + public bool IsPlayerControlled { get; init; } + + [JsonProperty("SRVType")] + public string SRVType { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/LiftoffEvent.cs b/EliteAPI.Events/LiftoffEvent.cs index 7c77e9b33..35c5da297 100644 --- a/EliteAPI.Events/LiftoffEvent.cs +++ b/EliteAPI.Events/LiftoffEvent.cs @@ -5,39 +5,45 @@ namespace EliteAPI.Events; public readonly struct LiftoffEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("PlayerControlled")] - public bool IsPlayerControlled { get; init; } - - [JsonProperty("Latitude")] - public double Latitude { get; init; } - - [JsonProperty("Longitude")] - public double Longitude { get; init; } - - [JsonProperty("StarSystem")] - public string StarSystem { get; init; } - - [JsonProperty("SystemAddress")] - public string SystemAddress { get; init; } - - [JsonProperty("Body")] - public string Body { get; init; } - - [JsonProperty("BodyID")] - public string BodyId { get; init; } - - [JsonProperty("OnPlanet")] - public bool IsOnPlanet { get; init; } - - [JsonProperty("OnStation")] - public bool IsOnStation { get; init; } - - [JsonProperty("NearestDestination")] - public Localised NearestDestination { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("PlayerControlled")] + public bool IsPlayerControlled { get; init; } + + [JsonProperty("Latitude")] + public double Latitude { get; init; } + + [JsonProperty("Longitude")] + public double Longitude { get; init; } + + [JsonProperty("StarSystem")] + public string StarSystem { get; init; } + + [JsonProperty("SystemAddress")] + public string SystemAddress { get; init; } + + [JsonProperty("Body")] + public string Body { get; init; } + + [JsonProperty("BodyID")] + public string BodyId { get; init; } + + [JsonProperty("OnPlanet")] + public bool IsOnPlanet { get; init; } + + [JsonProperty("OnStation")] + public bool IsOnStation { get; init; } + + [JsonProperty("NearestDestination")] + public Localised NearestDestination { get; init; } + + [JsonProperty("Taxi")] + public bool IsInTaxi { get; init; } + + [JsonProperty("Multicrew")] + public bool IsMulticrew { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/LoadGameEvent.cs b/EliteAPI.Events/LoadGameEvent.cs index 9a64656c2..2b0ae9c90 100644 --- a/EliteAPI.Events/LoadGameEvent.cs +++ b/EliteAPI.Events/LoadGameEvent.cs @@ -5,60 +5,66 @@ namespace EliteAPI.Events; public readonly struct LoadGameEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("FID")] - public string Fid { get; init; } - - [JsonProperty("Commander")] - public string Commander { get; init; } - - [JsonProperty("Horizons")] - public bool HasHorizons { get; init; } - - [JsonProperty("Odyssey")] - public bool HasOdyssey { get; init; } - - [JsonProperty("Ship")] - public Localised Ship { get; init; } - - [JsonProperty("ShipID")] - public string ShipId { get; init; } - - [JsonProperty("ShipName")] - public string ShipName { get; init; } - - [JsonProperty("ShipIdent")] - public string ShipIdent { get; init; } - - [JsonProperty("FuelLevel")] - public double FuelLevel { get; init; } - - [JsonProperty("FuelCapacity")] - public double FuelCapacity { get; init; } - - [JsonProperty("StartLanded")] - public bool IsLanded { get; init; } - - [JsonProperty("GameMode")] - public string GameMode { get; init; } - - [JsonProperty("language")] - public string Language { get; init; } - - [JsonProperty("gameversion")] - public string GameVersion { get; init; } - - [JsonProperty("build")] - public string Build { get; init; } - - [JsonProperty("Credits")] - public long Credits { get; init; } - - [JsonProperty("Loan")] - public long Loan { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("FID")] + public string Fid { get; init; } + + [JsonProperty("Commander")] + public string Commander { get; init; } + + [JsonProperty("Horizons")] + public bool HasHorizons { get; init; } + + [JsonProperty("Odyssey")] + public bool HasOdyssey { get; init; } + + [JsonProperty("Ship")] + public Localised Ship { get; init; } + + [JsonProperty("ShipID")] + public string ShipId { get; init; } + + [JsonProperty("ShipName")] + public string ShipName { get; init; } + + [JsonProperty("ShipIdent")] + public string ShipIdent { get; init; } + + [JsonProperty("FuelLevel")] + public double FuelLevel { get; init; } + + [JsonProperty("FuelCapacity")] + public double FuelCapacity { get; init; } + + [JsonProperty("StartLanded")] + public bool IsLanded { get; init; } + + [JsonProperty("GameMode")] + public string GameMode { get; init; } + + [JsonProperty("language")] + public string Language { get; init; } + + [JsonProperty("gameversion")] + public string GameVersion { get; init; } + + [JsonProperty("build")] + public string Build { get; init; } + + [JsonProperty("Credits")] + public long Credits { get; init; } + + [JsonProperty("Loan")] + public long Loan { get; init; } + + [JsonProperty("Group")] + public string Group { get; init; } + + [JsonProperty("StartDead")] + public bool IsStartingDead { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/LoadoutEquipModuleEvent.cs b/EliteAPI.Events/LoadoutEquipModuleEvent.cs index 2e7eacf9d..037b3c58d 100644 --- a/EliteAPI.Events/LoadoutEquipModuleEvent.cs +++ b/EliteAPI.Events/LoadoutEquipModuleEvent.cs @@ -1,34 +1,37 @@ -using EliteAPI.Abstractions.Events; +using EliteAPI.Abstractions.Events; using Newtonsoft.Json; namespace EliteAPI.Events; public readonly struct LoadoutEquipModuleEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("LoadoutName")] - public string LoadoutName { get; init; } - - [JsonProperty("SuitID")] - public string SuitId { get; init; } - - [JsonProperty("SuitName")] - public Localised SuitName { get; init; } - - [JsonProperty("LoadoutID")] - public string LoadoutId { get; init; } - - [JsonProperty("SlotName")] - public string SlotName { get; init; } - - [JsonProperty("ModuleName")] - public Localised ModuleName { get; init; } - - [JsonProperty("SuitModuleID")] - public string SuitModuleId { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("LoadoutName")] + public string LoadoutName { get; init; } + + [JsonProperty("SuitID")] + public string SuitId { get; init; } + + [JsonProperty("SuitName")] + public Localised SuitName { get; init; } + + [JsonProperty("LoadoutID")] + public string LoadoutId { get; init; } + + [JsonProperty("SlotName")] + public string SlotName { get; init; } + + [JsonProperty("ModuleName")] + public Localised ModuleName { get; init; } + + [JsonProperty("SuitModuleID")] + public string SuitModuleId { get; init; } + + [JsonProperty("Class")] + public int Class { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/LoadoutEvent.cs b/EliteAPI.Events/LoadoutEvent.cs index 51bf9c989..a18581286 100644 --- a/EliteAPI.Events/LoadoutEvent.cs +++ b/EliteAPI.Events/LoadoutEvent.cs @@ -5,133 +5,136 @@ namespace EliteAPI.Events; public readonly struct LoadoutEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Ship")] - public string Ship { get; init; } - - [JsonProperty("ShipID")] - public string ShipId { get; init; } - - [JsonProperty("ShipName")] - public string ShipName { get; init; } - - [JsonProperty("ShipIdent")] - public string ShipIdent { get; init; } - - [JsonProperty("HullValue")] - public long HullValue { get; init; } - - [JsonProperty("ModulesValue")] - public long ModulesValue { get; init; } - - [JsonProperty("HullHealth")] - public double HullHealth { get; init; } - - [JsonProperty("UnladenMass")] - public double UnladenMass { get; init; } - - [JsonProperty("CargoCapacity")] - public long CargoCapacity { get; init; } - - [JsonProperty("MaxJumpRange")] - public double MaxJumpRange { get; init; } - - [JsonProperty("FuelCapacity")] - public FuelCapacityInfo FuelCapacity { get; init; } - - [JsonProperty("Rebuy")] - public long Rebuy { get; init; } - - [JsonProperty("Modules")] - public IReadOnlyCollection Modules { get; init; } - - - public readonly struct FuelCapacityInfo - { - [JsonProperty("Main")] - public double Main { get; init; } - - [JsonProperty("Reserve")] - public double Reserve { get; init; } - } - - - public readonly struct ModuleInfo - { - [JsonProperty("Slot")] - public string Slot { get; init; } - - [JsonProperty("Item")] - public string Item { get; init; } - - [JsonProperty("On")] - public bool IsOn { get; init; } - - [JsonProperty("Priority")] - public long Priority { get; init; } - - [JsonProperty("Value")] - public long Value { get; init; } - - [JsonProperty("Health")] - public double Health { get; init; } - - [JsonProperty("AmmoInClip")] - public long AmmoInClip { get; init; } - - [JsonProperty("AmmoInHopper")] - public long AmmoInHopper { get; init; } - - [JsonProperty("Engineering")] - public EngineeringInfo Engineering { get; init; } - } - - - public readonly struct EngineeringInfo - { - [JsonProperty("Engineer")] - public string Engineer { get; init; } - - [JsonProperty("EngineerID")] - public string EngineerId { get; init; } - - [JsonProperty("BlueprintID")] - public string BlueprintId { get; init; } - - [JsonProperty("BlueprintName")] - public string BlueprintName { get; init; } - - [JsonProperty("ExperimentalEffect")] - public Localised ExperimentalEffect { get; init; } - - [JsonProperty("Level")] - public long Level { get; init; } - - [JsonProperty("Quality")] - public double Quality { get; init; } - - [JsonProperty("Modifiers")] - public IReadOnlyCollection Modifications { get; init; } - } - - - public readonly struct ModifierInfo - { - [JsonProperty("Label")] - public string Label { get; init; } - - [JsonProperty("Value")] - public double Value { get; init; } - - [JsonProperty("OriginalValue")] - public double OriginalValue { get; init; } - - [JsonProperty("LessIsGood")] - public long LessIsGood { get; init; } - } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Ship")] + public string Ship { get; init; } + + [JsonProperty("ShipID")] + public string ShipId { get; init; } + + [JsonProperty("ShipName")] + public string ShipName { get; init; } + + [JsonProperty("ShipIdent")] + public string ShipIdent { get; init; } + + [JsonProperty("HullValue")] + public long HullValue { get; init; } + + [JsonProperty("ModulesValue")] + public long ModulesValue { get; init; } + + [JsonProperty("HullHealth")] + public double HullHealth { get; init; } + + [JsonProperty("UnladenMass")] + public double UnladenMass { get; init; } + + [JsonProperty("CargoCapacity")] + public long CargoCapacity { get; init; } + + [JsonProperty("MaxJumpRange")] + public double MaxJumpRange { get; init; } + + [JsonProperty("FuelCapacity")] + public FuelCapacityInfo FuelCapacity { get; init; } + + [JsonProperty("Rebuy")] + public long Rebuy { get; init; } + + [JsonProperty("Modules")] + public IReadOnlyCollection Modules { get; init; } + + + public readonly struct FuelCapacityInfo + { + [JsonProperty("Main")] + public double Main { get; init; } + + [JsonProperty("Reserve")] + public double Reserve { get; init; } + } + + + public readonly struct ModuleInfo + { + [JsonProperty("Slot")] + public string Slot { get; init; } + + [JsonProperty("Item")] + public string Item { get; init; } + + [JsonProperty("On")] + public bool IsOn { get; init; } + + [JsonProperty("Priority")] + public long Priority { get; init; } + + [JsonProperty("Value")] + public long Value { get; init; } + + [JsonProperty("Health")] + public double Health { get; init; } + + [JsonProperty("AmmoInClip")] + public long AmmoInClip { get; init; } + + [JsonProperty("AmmoInHopper")] + public long AmmoInHopper { get; init; } + + [JsonProperty("Engineering")] + public EngineeringInfo Engineering { get; init; } + } + + + public readonly struct EngineeringInfo + { + [JsonProperty("Engineer")] + public string Engineer { get; init; } + + [JsonProperty("EngineerID")] + public string EngineerId { get; init; } + + [JsonProperty("BlueprintID")] + public string BlueprintId { get; init; } + + [JsonProperty("BlueprintName")] + public string BlueprintName { get; init; } + + [JsonProperty("ExperimentalEffect")] + public Localised ExperimentalEffect { get; init; } + + [JsonProperty("Level")] + public long Level { get; init; } + + [JsonProperty("Quality")] + public double Quality { get; init; } + + [JsonProperty("Modifiers")] + public IReadOnlyCollection Modifications { get; init; } + } + + + public readonly struct ModifierInfo + { + [JsonProperty("Label")] + public string Label { get; init; } + + [JsonProperty("Value")] + public double Value { get; init; } + + [JsonProperty("OriginalValue")] + public double OriginalValue { get; init; } + + [JsonProperty("LessIsGood")] + public long LessIsGood { get; init; } + } + + [JsonProperty("Hot")] + public bool IsHot { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/LocationEvent.cs b/EliteAPI.Events/LocationEvent.cs index dcaa635b9..b1d2e70af 100644 --- a/EliteAPI.Events/LocationEvent.cs +++ b/EliteAPI.Events/LocationEvent.cs @@ -5,204 +5,207 @@ namespace EliteAPI.Events; public readonly struct LocationEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Longitude")] - public double Longitude { get; init; } - - [JsonProperty("Latitude")] - public double Latitude { get; init; } - - [JsonProperty("DistFromStarLS")] - public double DistanceFromStarInLightSeconds { get; init; } - - [JsonProperty("Docked")] - public bool IsDocked { get; init; } - - [JsonProperty("Taxi")] - public bool IsInTaxi { get; init; } - - [JsonProperty("Multicrew")] - public bool IsInMultiCrew { get; init; } - - [JsonProperty("InSRV")] - public bool IsInSrv { get; init; } - - [JsonProperty("OnFoot")] - public bool IsOnFoot { get; init; } - - [JsonProperty("StationName")] - public string StationName { get; init; } - - [JsonProperty("StationType")] - public string StationType { get; init; } - - [JsonProperty("MarketID")] - public string MarketId { get; init; } - - [JsonProperty("StationFaction")] - public StationFactionInfo StationFaction { get; init; } - - [JsonProperty("StationGovernment")] - public Localised StationGovernment { get; init; } - - [JsonProperty("StationAllegiance")] - public string StationAllegiance { get; init; } - - [JsonProperty("StationServices")] - public IReadOnlyCollection StationServices { get; init; } - - [JsonProperty("StationEconomy")] - public Localised StationEconomy { get; init; } - - [JsonProperty("StationEconomies")] - public IReadOnlyCollection StationEconomies { get; init; } - - [JsonProperty("StarSystem")] - public string StarSystem { get; init; } - - [JsonProperty("SystemAddress")] - public string SystemAddress { get; init; } - - [JsonProperty("StarPos")] - public IReadOnlyCollection StarPos { get; init; } - - [JsonProperty("SystemAllegiance")] - public string SystemAllegiance { get; init; } - - [JsonProperty("SystemEconomy")] - public Localised SystemEconomy { get; init; } - - [JsonProperty("SystemSecondEconomy")] - public Localised SystemSecondEconomy { get; init; } - - [JsonProperty("SystemGovernment")] - public Localised SystemGovernment { get; init; } - - [JsonProperty("SystemSecurity")] - public Localised SystemSecurity { get; init; } - - [JsonProperty("Population")] - public long Population { get; init; } - - [JsonProperty("Body")] - public string Body { get; init; } - - [JsonProperty("BodyID")] - public string BodyId { get; init; } - - [JsonProperty("BodyType")] - public string BodyType { get; init; } - - [JsonProperty("Powers")] - public IReadOnlyCollection Powers { get; init; } - - [JsonProperty("PowerplayState")] - public string PowerplayState { get; init; } - - [JsonProperty("Factions")] - public IReadOnlyCollection Factions { get; init; } - - [JsonProperty("SystemFaction")] - public StationFactionInfo SystemFaction { get; init; } - - [JsonProperty("Conflicts")] - public IReadOnlyCollection Conflicts { get; init; } - - - public readonly struct FactionInfo - { - [JsonProperty("Name")] - public string Name { get; init; } - - [JsonProperty("FactionState")] - public string FactionState { get; init; } - - [JsonProperty("Government")] - public string Government { get; init; } - - [JsonProperty("Influence")] - public double Influence { get; init; } - - [JsonProperty("Allegiance")] - public string Allegiance { get; init; } - - [JsonProperty("Happiness")] - public Localised Happiness { get; init; } - - [JsonProperty("MyReputation")] - public double MyReputation { get; init; } - - [JsonProperty("ActiveStates")] - public IReadOnlyCollection ActiveStates { get; init; } - - [JsonProperty("RecoveringStates")] - public IReadOnlyCollection RecoveringStates { get; init; } - } - - - public readonly struct FactionStateInfo - { - [JsonProperty("State")] - public string State { get; init; } - - [JsonProperty("Trend")] - public long Trend { get; init; } - } - - - public readonly struct StationEconomyInfo - { - [JsonProperty("Name")] - public string Name { get; init; } - - [JsonProperty("Name_Localised")] - public string NameLocalised { get; init; } - - [JsonProperty("Proportion")] - public double Proportion { get; init; } - } - - - public readonly struct StationFactionInfo - { - [JsonProperty("Name")] - public string Name { get; init; } - - [JsonProperty("FactionState")] - public string FactionState { get; init; } - } - - - public readonly struct ConflictInfo - { - [JsonProperty("WarType")] - public string WarType { get; init; } - - [JsonProperty("Status")] - public string Status { get; init; } - - [JsonProperty("Faction1")] - public ConflictFactionInfo Faction1 { get; init; } - - [JsonProperty("Faction2")] - public ConflictFactionInfo Faction2 { get; init; } - } - - - public readonly struct ConflictFactionInfo - { - [JsonProperty("Name")] - public string Name { get; init; } - - [JsonProperty("Stake")] - public string Stake { get; init; } - - [JsonProperty("WonDays")] - public long WonDays { get; init; } - } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Longitude")] + public double Longitude { get; init; } + + [JsonProperty("Latitude")] + public double Latitude { get; init; } + + [JsonProperty("DistFromStarLS")] + public double DistanceFromStarInLightSeconds { get; init; } + + [JsonProperty("Docked")] + public bool IsDocked { get; init; } + + [JsonProperty("Taxi")] + public bool IsInTaxi { get; init; } + + [JsonProperty("Multicrew")] + public bool IsInMultiCrew { get; init; } + + [JsonProperty("InSRV")] + public bool IsInSrv { get; init; } + + [JsonProperty("OnFoot")] + public bool IsOnFoot { get; init; } + + [JsonProperty("StationName")] + public string StationName { get; init; } + + [JsonProperty("StationType")] + public string StationType { get; init; } + + [JsonProperty("MarketID")] + public string MarketId { get; init; } + + [JsonProperty("StationFaction")] + public StationFactionInfo StationFaction { get; init; } + + [JsonProperty("StationGovernment")] + public Localised StationGovernment { get; init; } + + [JsonProperty("StationAllegiance")] + public string StationAllegiance { get; init; } + + [JsonProperty("StationServices")] + public IReadOnlyCollection StationServices { get; init; } + + [JsonProperty("StationEconomy")] + public Localised StationEconomy { get; init; } + + [JsonProperty("StationEconomies")] + public IReadOnlyCollection StationEconomies { get; init; } + + [JsonProperty("StarSystem")] + public string StarSystem { get; init; } + + [JsonProperty("SystemAddress")] + public string SystemAddress { get; init; } + + [JsonProperty("StarPos")] + public IReadOnlyCollection StarPos { get; init; } + + [JsonProperty("SystemAllegiance")] + public string SystemAllegiance { get; init; } + + [JsonProperty("SystemEconomy")] + public Localised SystemEconomy { get; init; } + + [JsonProperty("SystemSecondEconomy")] + public Localised SystemSecondEconomy { get; init; } + + [JsonProperty("SystemGovernment")] + public Localised SystemGovernment { get; init; } + + [JsonProperty("SystemSecurity")] + public Localised SystemSecurity { get; init; } + + [JsonProperty("Population")] + public long Population { get; init; } + + [JsonProperty("Body")] + public string Body { get; init; } + + [JsonProperty("BodyID")] + public string BodyId { get; init; } + + [JsonProperty("BodyType")] + public string BodyType { get; init; } + + [JsonProperty("Powers")] + public IReadOnlyCollection Powers { get; init; } + + [JsonProperty("PowerplayState")] + public string PowerplayState { get; init; } + + [JsonProperty("Factions")] + public IReadOnlyCollection Factions { get; init; } + + [JsonProperty("SystemFaction")] + public StationFactionInfo SystemFaction { get; init; } + + [JsonProperty("Conflicts")] + public IReadOnlyCollection Conflicts { get; init; } + + + public readonly struct FactionInfo + { + [JsonProperty("Name")] + public string Name { get; init; } + + [JsonProperty("FactionState")] + public string FactionState { get; init; } + + [JsonProperty("Government")] + public string Government { get; init; } + + [JsonProperty("Influence")] + public double Influence { get; init; } + + [JsonProperty("Allegiance")] + public string Allegiance { get; init; } + + [JsonProperty("Happiness")] + public Localised Happiness { get; init; } + + [JsonProperty("MyReputation")] + public double MyReputation { get; init; } + + [JsonProperty("ActiveStates")] + public IReadOnlyCollection ActiveStates { get; init; } + + [JsonProperty("RecoveringStates")] + public IReadOnlyCollection RecoveringStates { get; init; } + } + + + public readonly struct FactionStateInfo + { + [JsonProperty("State")] + public string State { get; init; } + + [JsonProperty("Trend")] + public long Trend { get; init; } + } + + + public readonly struct StationEconomyInfo + { + [JsonProperty("Name")] + public string Name { get; init; } + + [JsonProperty("Name_Localised")] + public string NameLocalised { get; init; } + + [JsonProperty("Proportion")] + public double Proportion { get; init; } + } + + + public readonly struct StationFactionInfo + { + [JsonProperty("Name")] + public string Name { get; init; } + + [JsonProperty("FactionState")] + public string FactionState { get; init; } + } + + + public readonly struct ConflictInfo + { + [JsonProperty("WarType")] + public string WarType { get; init; } + + [JsonProperty("Status")] + public string Status { get; init; } + + [JsonProperty("Faction1")] + public ConflictFactionInfo Faction1 { get; init; } + + [JsonProperty("Faction2")] + public ConflictFactionInfo Faction2 { get; init; } + } + + + public readonly struct ConflictFactionInfo + { + [JsonProperty("Name")] + public string Name { get; init; } + + [JsonProperty("Stake")] + public string Stake { get; init; } + + [JsonProperty("WonDays")] + public long WonDays { get; init; } + } + + [JsonProperty("Wanted")] + public bool IsWanted { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/MissionAbandonedEvent.cs b/EliteAPI.Events/MissionAbandonedEvent.cs index 9bf952560..0607cbe79 100644 --- a/EliteAPI.Events/MissionAbandonedEvent.cs +++ b/EliteAPI.Events/MissionAbandonedEvent.cs @@ -5,15 +5,18 @@ namespace EliteAPI.Events; public readonly struct MissionAbandonedEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Name")] - public string Name { get; init; } - - [JsonProperty("MissionID")] - public string MissionId { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Name")] + public string Name { get; init; } + + [JsonProperty("MissionID")] + public string MissionId { get; init; } + + [JsonProperty("LocalisedName")] + public string LocalisedName { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/MissionAcceptedEvent.cs b/EliteAPI.Events/MissionAcceptedEvent.cs index 6d8b841f9..a7031f518 100644 --- a/EliteAPI.Events/MissionAcceptedEvent.cs +++ b/EliteAPI.Events/MissionAcceptedEvent.cs @@ -5,54 +5,84 @@ namespace EliteAPI.Events; public readonly struct MissionAcceptedEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Faction")] - public string Faction { get; init; } - - [JsonProperty("Name")] - public string Name { get; init; } - - [JsonProperty("LocalisedName")] - public string LocalisedName { get; init; } - - [JsonProperty("TargetType")] - public Localised TargetType { get; init; } - - [JsonProperty("TargetFaction")] - public string TargetFaction { get; init; } - - [JsonProperty("DestinationSystem")] - public string DestinationSystem { get; init; } - - [JsonProperty("DestinationStation")] - public string DestinationStation { get; init; } - - [JsonProperty("Target")] - public string Target { get; init; } - - [JsonProperty("Expiry")] - public DateTime Expiry { get; init; } - - [JsonProperty("Wing")] - public bool IsWing { get; init; } - - [JsonProperty("Influence")] - public string Influence { get; init; } - - [JsonProperty("Reputation")] - public string Reputation { get; init; } - - [JsonProperty("Reward")] - public long Reward { get; init; } - - [JsonProperty("MissionID")] - public string MissionId { get; init; } - - [JsonProperty("KillCount")] - public long KillCount { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Faction")] + public string Faction { get; init; } + + [JsonProperty("Name")] + public string Name { get; init; } + + [JsonProperty("LocalisedName")] + public string LocalisedName { get; init; } + + [JsonProperty("TargetType")] + public Localised TargetType { get; init; } + + [JsonProperty("TargetFaction")] + public string TargetFaction { get; init; } + + [JsonProperty("DestinationSystem")] + public string DestinationSystem { get; init; } + + [JsonProperty("DestinationStation")] + public string DestinationStation { get; init; } + + [JsonProperty("Target")] + public string Target { get; init; } + + [JsonProperty("Expiry")] + public DateTime Expiry { get; init; } + + [JsonProperty("Wing")] + public bool IsWing { get; init; } + + [JsonProperty("Influence")] + public string Influence { get; init; } + + [JsonProperty("Reputation")] + public string Reputation { get; init; } + + [JsonProperty("Reward")] + public long Reward { get; init; } + + [JsonProperty("MissionID")] + public string MissionId { get; init; } + + [JsonProperty("KillCount")] + public long KillCount { get; init; } + + [JsonProperty("Commodity")] + public string Commodity { get; init; } + + [JsonProperty("Count")] + public int Count { get; init; } + + [JsonProperty("NewDestinationSystem")] + public string NewDestinationSystem { get; init; } + + [JsonProperty("NewDestinationStation")] + public string NewDestinationStation { get; init; } + + [JsonProperty("Donation")] + public string Donation { get; init; } + + [JsonProperty("DestinationSettlement")] + public string DestinationSettlement { get; init; } + + [JsonProperty("PassengerCount")] + public int PassengerCount { get; init; } + + [JsonProperty("PassengerVIPs")] + public bool HasPassengerVIPs { get; init; } + + [JsonProperty("PassengerWanted")] + public bool HasPassengerWanted { get; init; } + + [JsonProperty("PassengerType")] + public string PassengerType { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/MissionCompletedEvent.cs b/EliteAPI.Events/MissionCompletedEvent.cs index 709f43b75..e86a424af 100644 --- a/EliteAPI.Events/MissionCompletedEvent.cs +++ b/EliteAPI.Events/MissionCompletedEvent.cs @@ -5,87 +5,108 @@ namespace EliteAPI.Events; public readonly struct MissionCompletedEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Faction")] - public string Faction { get; init; } - - [JsonProperty("Name")] - public string Name { get; init; } - - [JsonProperty("MissionID")] - public string MissionId { get; init; } - - [JsonProperty("TargetType")] - public Localised TargetType { get; init; } - - [JsonProperty("TargetFaction")] - public string TargetFaction { get; init; } - - [JsonProperty("NewDestinationSystem")] - public string NewDestinationSystem { get; init; } - - [JsonProperty("DestinationSystem")] - public string DestinationSystem { get; init; } - - [JsonProperty("NewDestinationStation")] - public string NewDestinationStation { get; init; } - - [JsonProperty("DestinationStation")] - public string DestinationStation { get; init; } - - [JsonProperty("Target")] - public string Target { get; init; } - - [JsonProperty("Reward")] - public long Reward { get; init; } - - [JsonProperty("FactionEffects")] - public IReadOnlyCollection FactionEffects { get; init; } - - - public readonly struct FactionEffectInfo - { - [JsonProperty("Faction")] - public string Faction { get; init; } - - [JsonProperty("Effects")] - public IReadOnlyCollection Effects { get; init; } - - [JsonProperty("Influence")] - public IReadOnlyCollection Influence { get; init; } - - [JsonProperty("ReputationTrend")] - public string ReputationTrend { get; init; } - - [JsonProperty("Reputation")] - public string Reputation { get; init; } - } - - - public readonly struct EffectInfo - { - [JsonProperty("Effect")] - public Localised Effect { get; init; } - - [JsonProperty("Trend")] - public string Trend { get; init; } - } - - - public readonly struct InfluenceInfo - { - [JsonProperty("SystemAddress")] - public string SystemAddress { get; init; } - - [JsonProperty("Trend")] - public string Trend { get; init; } - - [JsonProperty("Influence")] - public string Influence { get; init; } - } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Faction")] + public string Faction { get; init; } + + [JsonProperty("Name")] + public string Name { get; init; } + + [JsonProperty("MissionID")] + public string MissionId { get; init; } + + [JsonProperty("TargetType")] + public Localised TargetType { get; init; } + + [JsonProperty("TargetFaction")] + public string TargetFaction { get; init; } + + [JsonProperty("NewDestinationSystem")] + public string NewDestinationSystem { get; init; } + + [JsonProperty("DestinationSystem")] + public string DestinationSystem { get; init; } + + [JsonProperty("NewDestinationStation")] + public string NewDestinationStation { get; init; } + + [JsonProperty("DestinationStation")] + public string DestinationStation { get; init; } + + [JsonProperty("Target")] + public string Target { get; init; } + + [JsonProperty("Reward")] + public long Reward { get; init; } + + [JsonProperty("FactionEffects")] + public IReadOnlyCollection FactionEffects { get; init; } + + + public readonly struct FactionEffectInfo + { + [JsonProperty("Faction")] + public string Faction { get; init; } + + [JsonProperty("Effects")] + public IReadOnlyCollection Effects { get; init; } + + [JsonProperty("Influence")] + public IReadOnlyCollection Influence { get; init; } + + [JsonProperty("ReputationTrend")] + public string ReputationTrend { get; init; } + + [JsonProperty("Reputation")] + public string Reputation { get; init; } + } + + + public readonly struct EffectInfo + { + [JsonProperty("Effect")] + public Localised Effect { get; init; } + + [JsonProperty("Trend")] + public string Trend { get; init; } + } + + + public readonly struct InfluenceInfo + { + [JsonProperty("SystemAddress")] + public string SystemAddress { get; init; } + + [JsonProperty("Trend")] + public string Trend { get; init; } + + [JsonProperty("Influence")] + public string Influence { get; init; } + } + + [JsonProperty("LocalisedName")] + public string LocalisedName { get; init; } + + [JsonProperty("Commodity")] + public string Commodity { get; init; } + + [JsonProperty("Count")] + public int Count { get; init; } + + [JsonProperty("Donation")] + public string Donation { get; init; } + + [JsonProperty("Donated")] + public int Donated { get; init; } + + [JsonProperty("DestinationSettlement")] + public string DestinationSettlement { get; init; } + + [JsonProperty("KillCount")] + public int KillCount { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/MissionFailedEvent.cs b/EliteAPI.Events/MissionFailedEvent.cs index f913317c3..dd73a4dba 100644 --- a/EliteAPI.Events/MissionFailedEvent.cs +++ b/EliteAPI.Events/MissionFailedEvent.cs @@ -5,15 +5,21 @@ namespace EliteAPI.Events; public readonly struct MissionFailedEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Name")] - public string Name { get; init; } - - [JsonProperty("MissionID")] - public string MissionId { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Name")] + public string Name { get; init; } + + [JsonProperty("MissionID")] + public string MissionId { get; init; } + + [JsonProperty("LocalisedName")] + public string LocalisedName { get; init; } + + [JsonProperty("Fine")] + public int Fine { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/MissionRedirectedEvent.cs b/EliteAPI.Events/MissionRedirectedEvent.cs index 5e7694db0..5247242aa 100644 --- a/EliteAPI.Events/MissionRedirectedEvent.cs +++ b/EliteAPI.Events/MissionRedirectedEvent.cs @@ -5,27 +5,30 @@ namespace EliteAPI.Events; public readonly struct MissionRedirectedEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("MissionID")] - public string MissionId { get; init; } - - [JsonProperty("Name")] - public string Name { get; init; } - - [JsonProperty("NewDestinationStation")] - public string NewDestinationStation { get; init; } - - [JsonProperty("NewDestinationSystem")] - public string NewDestinationSystem { get; init; } - - [JsonProperty("OldDestinationStation")] - public string OldDestinationStation { get; init; } - - [JsonProperty("OldDestinationSystem")] - public string OldDestinationSystem { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("MissionID")] + public string MissionId { get; init; } + + [JsonProperty("Name")] + public string Name { get; init; } + + [JsonProperty("NewDestinationStation")] + public string NewDestinationStation { get; init; } + + [JsonProperty("NewDestinationSystem")] + public string NewDestinationSystem { get; init; } + + [JsonProperty("OldDestinationStation")] + public string OldDestinationStation { get; init; } + + [JsonProperty("OldDestinationSystem")] + public string OldDestinationSystem { get; init; } + + [JsonProperty("LocalisedName")] + public string LocalisedName { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/ModuleBuyEvent.cs b/EliteAPI.Events/ModuleBuyEvent.cs index 85a17c124..ce9dc41c7 100644 --- a/EliteAPI.Events/ModuleBuyEvent.cs +++ b/EliteAPI.Events/ModuleBuyEvent.cs @@ -5,27 +5,36 @@ namespace EliteAPI.Events; public readonly struct ModuleBuyEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Slot")] - public string Slot { get; init; } - - [JsonProperty("BuyItem")] - public Localised BuyItem { get; init; } - - [JsonProperty("MarketID")] - public string MarketId { get; init; } - - [JsonProperty("BuyPrice")] - public long BuyPrice { get; init; } - - [JsonProperty("Ship")] - public string Ship { get; init; } - - [JsonProperty("ShipID")] - public string ShipId { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Slot")] + public string Slot { get; init; } + + [JsonProperty("BuyItem")] + public Localised BuyItem { get; init; } + + [JsonProperty("MarketID")] + public string MarketId { get; init; } + + [JsonProperty("BuyPrice")] + public long BuyPrice { get; init; } + + [JsonProperty("Ship")] + public string Ship { get; init; } + + [JsonProperty("ShipID")] + public string ShipId { get; init; } + + [JsonProperty("StoredItem")] + public string StoredItem { get; init; } + + [JsonProperty("SellItem")] + public string SellItem { get; init; } + + [JsonProperty("SellPrice")] + public int SellPrice { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/ModuleRetrieveEvent.cs b/EliteAPI.Events/ModuleRetrieveEvent.cs index 248b246e7..17ab0dbd9 100644 --- a/EliteAPI.Events/ModuleRetrieveEvent.cs +++ b/EliteAPI.Events/ModuleRetrieveEvent.cs @@ -5,27 +5,39 @@ namespace EliteAPI.Events; public readonly struct ModuleRetrieveEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("MarketID")] - public string MarketId { get; init; } - - [JsonProperty("Slot")] - public string Slot { get; init; } - - [JsonProperty("RetrievedItem")] - public Localised RetrievedItem { get; init; } - - [JsonProperty("Ship")] - public string Ship { get; init; } - - [JsonProperty("ShipID")] - public string ShipId { get; init; } - - [JsonProperty("Hot")] - public bool IsHot { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("MarketID")] + public string MarketId { get; init; } + + [JsonProperty("Slot")] + public string Slot { get; init; } + + [JsonProperty("RetrievedItem")] + public Localised RetrievedItem { get; init; } + + [JsonProperty("Ship")] + public string Ship { get; init; } + + [JsonProperty("ShipID")] + public string ShipId { get; init; } + + [JsonProperty("Hot")] + public bool IsHot { get; init; } + + [JsonProperty("EngineerModifications")] + public string EngineerModifications { get; init; } + + [JsonProperty("Level")] + public int Level { get; init; } + + [JsonProperty("Quality")] + public double Quality { get; init; } + + [JsonProperty("SwapOutItem")] + public string SwapOutItem { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/ModuleStoreEvent.cs b/EliteAPI.Events/ModuleStoreEvent.cs index dec02c7c9..f5a0364e9 100644 --- a/EliteAPI.Events/ModuleStoreEvent.cs +++ b/EliteAPI.Events/ModuleStoreEvent.cs @@ -5,24 +5,42 @@ namespace EliteAPI.Events; public readonly struct ModuleStoreEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Slot")] - public string Slot { get; init; } - - [JsonProperty("StoredItem")] - public Localised StoredItem { get; init; } - - [JsonProperty("Ship")] - public string Ship { get; init; } - - [JsonProperty("ShipID")] - public string ShipId { get; init; } - - [JsonProperty("EngineerModifications")] - public string EngineerModifications { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Slot")] + public string Slot { get; init; } + + [JsonProperty("StoredItem")] + public Localised StoredItem { get; init; } + + [JsonProperty("Ship")] + public string Ship { get; init; } + + [JsonProperty("ShipID")] + public string ShipId { get; init; } + + [JsonProperty("EngineerModifications")] + public string EngineerModifications { get; init; } + + [JsonProperty("MarketID")] + public string MarketID { get; init; } + + [JsonProperty("ReplacementItem")] + public string ReplacementItem { get; init; } + + [JsonProperty("Hot")] + public bool IsHot { get; init; } + + [JsonProperty("Level")] + public int Level { get; init; } + + [JsonProperty("Quality")] + public double Quality { get; init; } + + [JsonProperty("Cost")] + public int Cost { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/NavBeaconScanEvent.cs b/EliteAPI.Events/NavBeaconScanEvent.cs index a26a5e5eb..f8b1170ed 100644 --- a/EliteAPI.Events/NavBeaconScanEvent.cs +++ b/EliteAPI.Events/NavBeaconScanEvent.cs @@ -5,12 +5,15 @@ namespace EliteAPI.Events; public readonly struct NavBeaconScanEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("NumBodies")] - public long NumBodies { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("NumBodies")] + public long NumBodies { get; init; } + + [JsonProperty("SystemAddress")] + public string SystemAddress { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/PassengersEvent.cs b/EliteAPI.Events/PassengersEvent.cs index f0c5de03f..22f043ca6 100644 --- a/EliteAPI.Events/PassengersEvent.cs +++ b/EliteAPI.Events/PassengersEvent.cs @@ -27,7 +27,7 @@ public readonly struct Manifest public bool Vip { get; init; } [JsonProperty("Wanted")] - public bool Wanted { get; init; } + public bool IsWanted { get; init; } [JsonProperty("Count")] public long Count { get; init; } diff --git a/EliteAPI.Events/PayBountiesEvent.cs b/EliteAPI.Events/PayBountiesEvent.cs index 2c4330ac3..63b16a1c5 100644 --- a/EliteAPI.Events/PayBountiesEvent.cs +++ b/EliteAPI.Events/PayBountiesEvent.cs @@ -1,25 +1,28 @@ -using EliteAPI.Abstractions.Events; +using EliteAPI.Abstractions.Events; using Newtonsoft.Json; namespace EliteAPI.Events; public readonly struct PayBountiesEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Amount")] - public long Amount { get; init; } - - [JsonProperty("Faction")] - public Localised Faction { get; init; } - - [JsonProperty("ShipID")] - public string ShipId { get; init; } - - [JsonProperty("BrokerPercentage")] - public double BrokerPercentage { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Amount")] + public long Amount { get; init; } + + [JsonProperty("Faction")] + public Localised Faction { get; init; } + + [JsonProperty("ShipID")] + public string ShipId { get; init; } + + [JsonProperty("BrokerPercentage")] + public double BrokerPercentage { get; init; } + + [JsonProperty("AllFines")] + public bool IsAllFines { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/PayFinesEvent.cs b/EliteAPI.Events/PayFinesEvent.cs index 84c2ee2d7..9361d902f 100644 --- a/EliteAPI.Events/PayFinesEvent.cs +++ b/EliteAPI.Events/PayFinesEvent.cs @@ -5,21 +5,24 @@ namespace EliteAPI.Events; public readonly struct PayFinesEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Amount")] - public long Amount { get; init; } - - [JsonProperty("AllFines")] - public bool IsAllFines { get; init; } - - [JsonProperty("Faction")] - public string Faction { get; init; } - - [JsonProperty("ShipID")] - public string ShipId { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Amount")] + public long Amount { get; init; } + + [JsonProperty("AllFines")] + public bool IsAllFines { get; init; } + + [JsonProperty("Faction")] + public string Faction { get; init; } + + [JsonProperty("ShipID")] + public string ShipId { get; init; } + + [JsonProperty("BrokerPercentage")] + public double BrokerPercentage { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/PowerplayVoteEvent.cs b/EliteAPI.Events/PowerplayVoteEvent.cs index d0114dc31..51c434c5b 100644 --- a/EliteAPI.Events/PowerplayVoteEvent.cs +++ b/EliteAPI.Events/PowerplayVoteEvent.cs @@ -5,18 +5,24 @@ namespace EliteAPI.Events; public readonly struct PowerplayVoteEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Power")] - public string Power { get; init; } - - [JsonProperty("Votes")] - public long Votes { get; init; } - - [JsonProperty("")] - public long Empty { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Power")] + public string Power { get; init; } + + [JsonProperty("Votes")] + public long Votes { get; init; } + + [JsonProperty("")] + public long Empty { get; init; } + + [JsonProperty("VoteToConsolidate")] + public int VoteToConsolidate { get; init; } + + [JsonProperty("System")] + public string System { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/PromotionEvent.cs b/EliteAPI.Events/PromotionEvent.cs index d0db17f0a..830a429a2 100644 --- a/EliteAPI.Events/PromotionEvent.cs +++ b/EliteAPI.Events/PromotionEvent.cs @@ -5,12 +5,30 @@ namespace EliteAPI.Events; public readonly struct PromotionEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Empire")] - public long Empire { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Empire")] + public long Empire { get; init; } + + [JsonProperty("Explore")] + public int Explore { get; init; } + + [JsonProperty("Combat")] + public int Combat { get; init; } + + [JsonProperty("Soldier")] + public int Soldier { get; init; } + + [JsonProperty("Federation")] + public int Federation { get; init; } + + [JsonProperty("Exobiologist")] + public int Exobiologist { get; init; } + + [JsonProperty("Trade")] + public int Trade { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/QuitACrewEvent.cs b/EliteAPI.Events/QuitACrewEvent.cs index a1b5810c7..593b5580f 100644 --- a/EliteAPI.Events/QuitACrewEvent.cs +++ b/EliteAPI.Events/QuitACrewEvent.cs @@ -5,12 +5,15 @@ namespace EliteAPI.Events; public readonly struct QuitACrewEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Captain")] - public string Captain { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Captain")] + public string Captain { get; init; } + + [JsonProperty("Telepresence")] + public bool IsInTelepresence { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/RedeemVoucherEvent.cs b/EliteAPI.Events/RedeemVoucherEvent.cs index eac30eea5..cb9c93539 100644 --- a/EliteAPI.Events/RedeemVoucherEvent.cs +++ b/EliteAPI.Events/RedeemVoucherEvent.cs @@ -5,18 +5,21 @@ namespace EliteAPI.Events; public readonly struct RedeemVoucherEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Type")] - public string Type { get; init; } - - [JsonProperty("Amount")] - public long Amount { get; init; } - - [JsonProperty("Faction")] - public string Faction { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Type")] + public string Type { get; init; } + + [JsonProperty("Amount")] + public long Amount { get; init; } + + [JsonProperty("Faction")] + public string Faction { get; init; } + + [JsonProperty("BrokerPercentage")] + public double BrokerPercentage { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/RepairDroneEvent.cs b/EliteAPI.Events/RepairDroneEvent.cs index 74d9afc59..58202c070 100644 --- a/EliteAPI.Events/RepairDroneEvent.cs +++ b/EliteAPI.Events/RepairDroneEvent.cs @@ -5,12 +5,18 @@ namespace EliteAPI.Events; public readonly struct RepairDroneEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("HullRepaired")] - public double HullRepaired { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("HullRepaired")] + public double HullRepaired { get; init; } + + [JsonProperty("CockpitRepaired")] + public double CockpitRepaired { get; init; } + + [JsonProperty("CorrosionRepaired")] + public double CorrosionRepaired { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/RestockVehicleEvent.cs b/EliteAPI.Events/RestockVehicleEvent.cs index d22171efa..fbb8898b9 100644 --- a/EliteAPI.Events/RestockVehicleEvent.cs +++ b/EliteAPI.Events/RestockVehicleEvent.cs @@ -5,21 +5,24 @@ namespace EliteAPI.Events; public readonly struct RestockVehicleEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Type")] - public string Type { get; init; } - - [JsonProperty("Loadout")] - public string Loadout { get; init; } - - [JsonProperty("Cost")] - public long Cost { get; init; } - - [JsonProperty("Count")] - public long Count { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Type")] + public string Type { get; init; } + + [JsonProperty("Loadout")] + public string Loadout { get; init; } + + [JsonProperty("Cost")] + public long Cost { get; init; } + + [JsonProperty("Count")] + public long Count { get; init; } + + [JsonProperty("ID")] + public string ID { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/SRVDestroyedEvent.cs b/EliteAPI.Events/SRVDestroyedEvent.cs index a0f889a2c..defecd8c6 100644 --- a/EliteAPI.Events/SRVDestroyedEvent.cs +++ b/EliteAPI.Events/SRVDestroyedEvent.cs @@ -1,13 +1,19 @@ -using EliteAPI.Abstractions.Events; +using EliteAPI.Abstractions.Events; using Newtonsoft.Json; namespace EliteAPI.Events; public readonly struct SrvDestroyedEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("ID")] + public string ID { get; init; } + + [JsonProperty("SRVType")] + public string SRVType { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/ScanEvent.cs b/EliteAPI.Events/ScanEvent.cs index 091369f61..e26e012d6 100644 --- a/EliteAPI.Events/ScanEvent.cs +++ b/EliteAPI.Events/ScanEvent.cs @@ -5,188 +5,197 @@ namespace EliteAPI.Events; public readonly struct ScanEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("ScanType")] - public string ScanType { get; init; } - - [JsonProperty("BodyName")] - public string BodyName { get; init; } - - [JsonProperty("BodyID")] - public string BodyId { get; init; } - - [JsonProperty("Parents")] - public IReadOnlyCollection Parents { get; init; } - - [JsonProperty("StarSystem")] - public string StarSystem { get; init; } - - [JsonProperty("SystemAddress")] - public string SystemAddress { get; init; } - - [JsonProperty("DistanceFromArrivalLS")] - public double DistanceFromArrivalLs { get; init; } - - [JsonProperty("StarType")] - public string StarType { get; init; } - - [JsonProperty("StarClass")] - public long StarClass { get; init; } - - [JsonProperty("StellarMass")] - public double StellarMass { get; init; } - - [JsonProperty("Radius")] - public double Radius { get; init; } - - [JsonProperty("AbsoluteMagnitude")] - public double AbsoluteMagnitude { get; init; } - - [JsonProperty("Age_MY")] - public long AgeMy { get; init; } - - [JsonProperty("SurfaceTemperature")] - public double SurfaceTemperature { get; init; } - - [JsonProperty("Luminosity")] - public string Luminosity { get; init; } - - [JsonProperty("SemiMajorAxis")] - public double SemiMajorAxis { get; init; } - - [JsonProperty("Eccentricity")] - public double Eccentricity { get; init; } - - [JsonProperty("OrbitalInclination")] - public double OrbitalInclination { get; init; } - - [JsonProperty("Periapsis")] - public double Periapsis { get; init; } - - [JsonProperty("OrbitalPeriod")] - public double OrbitalPeriod { get; init; } - - [JsonProperty("RotationPeriod")] - public double RotationPeriod { get; init; } - - [JsonProperty("AxialTilt")] - public double AxialTilt { get; init; } - - [JsonProperty("Rings")] - public IReadOnlyCollection Rings { get; init; } - - [JsonProperty("WasDiscovered")] - public bool WasDiscovered { get; init; } - - [JsonProperty("WasMapped")] - public bool WasMapped { get; init; } - - [JsonProperty("TidalLock")] - public bool IsTidalLock { get; init; } - - [JsonProperty("TerraformState")] - public string TerraformState { get; init; } - - [JsonProperty("PlanetState")] - public string PlanetState { get; init; } - - [JsonProperty("PlanetClass")] - public string PlanetClass { get; init; } - - [JsonProperty("Atmosphere")] - public string Atmosphere { get; init; } - - [JsonProperty("AtmosphereType")] - public string AtmosphereType { get; init; } - - [JsonProperty("Volcanism")] - public string Volcanism { get; init; } - - [JsonProperty("MassEM")] - public double MassEm { get; init; } - - [JsonProperty("SurfaceGravity")] - public double SurfaceGravity { get; init; } - - [JsonProperty("SurfacePressure")] - public double SurfacePressure { get; init; } - - [JsonProperty("Landable")] - public bool IsLandable { get; init; } - - [JsonProperty("Materials")] - public IReadOnlyCollection Materials { get; init; } - - [JsonProperty("Composition")] - public CompositionInfo Composition { get; init; } - - [JsonProperty("AtmosphereComposition")] - public IReadOnlyCollection AtmosphereComposition { get; init; } - - [JsonProperty("ReserveLevel")] - public string ReserveLevel { get; init; } - - - public readonly struct ParentInfo - { - [JsonProperty("Null")] - public long Null { get; init; } - } - - - public readonly struct RingInfo - { - [JsonProperty("Name")] - public string Name { get; init; } - - [JsonProperty("RingClass")] - public string RingClass { get; init; } - - [JsonProperty("MassMT")] - public long MassMt { get; init; } - - [JsonProperty("InnerRad")] - public long InnerRad { get; init; } - - [JsonProperty("OuterRad")] - public long OuterRad { get; init; } - } - - - public readonly struct MaterialInfo - { - [JsonProperty("Name")] - public string Name { get; init; } - - [JsonProperty("Percent")] - public double Percent { get; init; } - } - - - public readonly struct AtmosphereCompositionInfo - { - [JsonProperty("Name")] - public string Name { get; init; } - - [JsonProperty("Percent")] - public double Percent { get; init; } - } - - - public readonly struct CompositionInfo - { - [JsonProperty("Ice")] - public double Ice { get; init; } - - [JsonProperty("Rock")] - public double Rock { get; init; } - - [JsonProperty("Metal")] - public double Metal { get; init; } - } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("ScanType")] + public string ScanType { get; init; } + + [JsonProperty("BodyName")] + public string BodyName { get; init; } + + [JsonProperty("BodyID")] + public string BodyId { get; init; } + + [JsonProperty("Parents")] + public IReadOnlyCollection Parents { get; init; } + + [JsonProperty("StarSystem")] + public string StarSystem { get; init; } + + [JsonProperty("SystemAddress")] + public string SystemAddress { get; init; } + + [JsonProperty("DistanceFromArrivalLS")] + public double DistanceFromArrivalLs { get; init; } + + [JsonProperty("StarType")] + public string StarType { get; init; } + + [JsonProperty("StarClass")] + public long StarClass { get; init; } + + [JsonProperty("StellarMass")] + public double StellarMass { get; init; } + + [JsonProperty("Radius")] + public double Radius { get; init; } + + [JsonProperty("AbsoluteMagnitude")] + public double AbsoluteMagnitude { get; init; } + + [JsonProperty("Age_MY")] + public long AgeMy { get; init; } + + [JsonProperty("SurfaceTemperature")] + public double SurfaceTemperature { get; init; } + + [JsonProperty("Luminosity")] + public string Luminosity { get; init; } + + [JsonProperty("SemiMajorAxis")] + public double SemiMajorAxis { get; init; } + + [JsonProperty("Eccentricity")] + public double Eccentricity { get; init; } + + [JsonProperty("OrbitalInclination")] + public double OrbitalInclination { get; init; } + + [JsonProperty("Periapsis")] + public double Periapsis { get; init; } + + [JsonProperty("OrbitalPeriod")] + public double OrbitalPeriod { get; init; } + + [JsonProperty("RotationPeriod")] + public double RotationPeriod { get; init; } + + [JsonProperty("AxialTilt")] + public double AxialTilt { get; init; } + + [JsonProperty("Rings")] + public IReadOnlyCollection Rings { get; init; } + + [JsonProperty("WasDiscovered")] + public bool WasDiscovered { get; init; } + + [JsonProperty("WasMapped")] + public bool WasMapped { get; init; } + + [JsonProperty("TidalLock")] + public bool IsTidalLock { get; init; } + + [JsonProperty("TerraformState")] + public string TerraformState { get; init; } + + [JsonProperty("PlanetState")] + public string PlanetState { get; init; } + + [JsonProperty("PlanetClass")] + public string PlanetClass { get; init; } + + [JsonProperty("Atmosphere")] + public string Atmosphere { get; init; } + + [JsonProperty("AtmosphereType")] + public string AtmosphereType { get; init; } + + [JsonProperty("Volcanism")] + public string Volcanism { get; init; } + + [JsonProperty("MassEM")] + public double MassEm { get; init; } + + [JsonProperty("SurfaceGravity")] + public double SurfaceGravity { get; init; } + + [JsonProperty("SurfacePressure")] + public double SurfacePressure { get; init; } + + [JsonProperty("Landable")] + public bool IsLandable { get; init; } + + [JsonProperty("Materials")] + public IReadOnlyCollection Materials { get; init; } + + [JsonProperty("Composition")] + public CompositionInfo Composition { get; init; } + + [JsonProperty("AtmosphereComposition")] + public IReadOnlyCollection AtmosphereComposition { get; init; } + + [JsonProperty("ReserveLevel")] + public string ReserveLevel { get; init; } + + + public readonly struct ParentInfo + { + [JsonProperty("Null")] + public long Null { get; init; } + } + + + public readonly struct RingInfo + { + [JsonProperty("Name")] + public string Name { get; init; } + + [JsonProperty("RingClass")] + public string RingClass { get; init; } + + [JsonProperty("MassMT")] + public long MassMt { get; init; } + + [JsonProperty("InnerRad")] + public long InnerRad { get; init; } + + [JsonProperty("OuterRad")] + public long OuterRad { get; init; } + } + + + public readonly struct MaterialInfo + { + [JsonProperty("Name")] + public string Name { get; init; } + + [JsonProperty("Percent")] + public double Percent { get; init; } + } + + + public readonly struct AtmosphereCompositionInfo + { + [JsonProperty("Name")] + public string Name { get; init; } + + [JsonProperty("Percent")] + public double Percent { get; init; } + } + + + public readonly struct CompositionInfo + { + [JsonProperty("Ice")] + public double Ice { get; init; } + + [JsonProperty("Rock")] + public double Rock { get; init; } + + [JsonProperty("Metal")] + public double Metal { get; init; } + } + + [JsonProperty("AscendingNode")] + public double AscendingNode { get; init; } + + [JsonProperty("MeanAnomaly")] + public double MeanAnomaly { get; init; } + + [JsonProperty("Subclass")] + public int Subclass { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/ScreenshotEvent.cs b/EliteAPI.Events/ScreenshotEvent.cs index 5931ead31..5edd996d2 100644 --- a/EliteAPI.Events/ScreenshotEvent.cs +++ b/EliteAPI.Events/ScreenshotEvent.cs @@ -5,24 +5,36 @@ namespace EliteAPI.Events; public readonly struct ScreenshotEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Filename")] - public string Filename { get; init; } - - [JsonProperty("Width")] - public long Width { get; init; } - - [JsonProperty("Height")] - public long Height { get; init; } - - [JsonProperty("System")] - public string System { get; init; } - - [JsonProperty("Body")] - public string Body { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Filename")] + public string Filename { get; init; } + + [JsonProperty("Width")] + public long Width { get; init; } + + [JsonProperty("Height")] + public long Height { get; init; } + + [JsonProperty("System")] + public string System { get; init; } + + [JsonProperty("Body")] + public string Body { get; init; } + + [JsonProperty("Latitude")] + public double Latitude { get; init; } + + [JsonProperty("Longitude")] + public double Longitude { get; init; } + + [JsonProperty("Altitude")] + public double Altitude { get; init; } + + [JsonProperty("Heading")] + public int Heading { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/SearchAndRescueEvent.cs b/EliteAPI.Events/SearchAndRescueEvent.cs index f53fcd4d5..4580c8686 100644 --- a/EliteAPI.Events/SearchAndRescueEvent.cs +++ b/EliteAPI.Events/SearchAndRescueEvent.cs @@ -5,18 +5,21 @@ namespace EliteAPI.Events; public readonly struct SearchAndRescueEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Name")] - public string Name { get; init; } - - [JsonProperty("Count")] - public long Count { get; init; } - - [JsonProperty("Reward")] - public long Reward { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Name")] + public string Name { get; init; } + + [JsonProperty("Count")] + public long Count { get; init; } + + [JsonProperty("Reward")] + public long Reward { get; init; } + + [JsonProperty("MarketID")] + public string MarketID { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/SellExplorationDataEvent.cs b/EliteAPI.Events/SellExplorationDataEvent.cs index a15511cce..290f56cee 100644 --- a/EliteAPI.Events/SellExplorationDataEvent.cs +++ b/EliteAPI.Events/SellExplorationDataEvent.cs @@ -5,21 +5,24 @@ namespace EliteAPI.Events; public readonly struct SellExplorationDataEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Systems")] - public IReadOnlyCollection Systems { get; init; } - - [JsonProperty("Discovered")] - public IReadOnlyCollection Discovered { get; init; } - - [JsonProperty("BaseValue")] - public long BaseValue { get; init; } - - [JsonProperty("Bonus")] - public long Bonus { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Systems")] + public IReadOnlyCollection Systems { get; init; } + + [JsonProperty("Discovered")] + public IReadOnlyCollection Discovered { get; init; } + + [JsonProperty("BaseValue")] + public long BaseValue { get; init; } + + [JsonProperty("Bonus")] + public long Bonus { get; init; } + + [JsonProperty("TotalEarnings")] + public int TotalEarnings { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/SellMicroResourcesEvent.cs b/EliteAPI.Events/SellMicroResourcesEvent.cs index 766f6d303..1d4b28450 100644 --- a/EliteAPI.Events/SellMicroResourcesEvent.cs +++ b/EliteAPI.Events/SellMicroResourcesEvent.cs @@ -1,34 +1,37 @@ -using EliteAPI.Abstractions.Events; +using EliteAPI.Abstractions.Events; using Newtonsoft.Json; namespace EliteAPI.Events; public readonly struct SellMicroResourcesEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("MicroResources")] - public IReadOnlyCollection MicroResources { get; init; } - - [JsonProperty("Price")] - public long Price { get; init; } - - [JsonProperty("MarketID")] - public string MarketId { get; init; } - - public readonly struct MicroResourceInfo - { - [JsonProperty("Name")] - public Localised Name { get; init; } - - [JsonProperty("Category")] - public string Category { get; init; } - - [JsonProperty("Count")] - public long Count { get; init; } - } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("MicroResources")] + public IReadOnlyCollection MicroResources { get; init; } + + [JsonProperty("Price")] + public long Price { get; init; } + + [JsonProperty("MarketID")] + public string MarketId { get; init; } + + public readonly struct MicroResourceInfo + { + [JsonProperty("Name")] + public Localised Name { get; init; } + + [JsonProperty("Category")] + public string Category { get; init; } + + [JsonProperty("Count")] + public long Count { get; init; } + } + + [JsonProperty("TotalCount")] + public int TotalCount { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/SellShipOnRebuyEvent.cs b/EliteAPI.Events/SellShipOnRebuyEvent.cs index 05d83d0a8..7f6590f5e 100644 --- a/EliteAPI.Events/SellShipOnRebuyEvent.cs +++ b/EliteAPI.Events/SellShipOnRebuyEvent.cs @@ -1,25 +1,28 @@ -using EliteAPI.Abstractions.Events; +using EliteAPI.Abstractions.Events; using Newtonsoft.Json; namespace EliteAPI.Events; public readonly struct SellShipOnRebuyEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("ShipType")] - public string ShipType { get; init; } - - [JsonProperty("System")] - public string System { get; init; } - - [JsonProperty("SellShipId")] - public string SellShipId { get; init; } - - [JsonProperty("SellShipPrice")] - public long SellShipPrice { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("ShipType")] + public string ShipType { get; init; } + + [JsonProperty("System")] + public string System { get; init; } + + [JsonProperty("SellShipId")] + public string SellShipId { get; init; } + + [JsonProperty("SellShipPrice")] + public long SellShipPrice { get; init; } + + [JsonProperty("ShipPrice")] + public int ShipPrice { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/SellSuitEvent.cs b/EliteAPI.Events/SellSuitEvent.cs index 5105cab29..4e08bb977 100644 --- a/EliteAPI.Events/SellSuitEvent.cs +++ b/EliteAPI.Events/SellSuitEvent.cs @@ -1,22 +1,25 @@ -using EliteAPI.Abstractions.Events; +using EliteAPI.Abstractions.Events; using Newtonsoft.Json; namespace EliteAPI.Events; public readonly struct SellSuitEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Name")] - public Localised Name { get; init; } - - [JsonProperty("Price")] - public long Price { get; init; } - - [JsonProperty("SuitId")] - public string SuitId { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Name")] + public Localised Name { get; init; } + + [JsonProperty("Price")] + public long Price { get; init; } + + [JsonProperty("SuitId")] + public string SuitId { get; init; } + + [JsonProperty("SuitID")] + public string SuitID { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/SellWeaponEvent.cs b/EliteAPI.Events/SellWeaponEvent.cs index 93a7531c0..058f18703 100644 --- a/EliteAPI.Events/SellWeaponEvent.cs +++ b/EliteAPI.Events/SellWeaponEvent.cs @@ -1,22 +1,25 @@ -using EliteAPI.Abstractions.Events; +using EliteAPI.Abstractions.Events; using Newtonsoft.Json; namespace EliteAPI.Events; public readonly struct SellWeaponEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Name")] - public Localised Name { get; init; } - - [JsonProperty("Price")] - public long Price { get; init; } - - [JsonProperty("SuitModuleID")] - public string SuitModuleId { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Name")] + public Localised Name { get; init; } + + [JsonProperty("Price")] + public long Price { get; init; } + + [JsonProperty("SuitModuleID")] + public string SuitModuleId { get; init; } + + [JsonProperty("Class")] + public int Class { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/ShipTargetedEvent.cs b/EliteAPI.Events/ShipTargetedEvent.cs index 55544075a..c04f1669e 100644 --- a/EliteAPI.Events/ShipTargetedEvent.cs +++ b/EliteAPI.Events/ShipTargetedEvent.cs @@ -5,45 +5,51 @@ namespace EliteAPI.Events; public readonly struct ShipTargetedEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("TargetLocked")] - public bool IsTargetLocked { get; init; } - - [JsonProperty("Ship")] - public Localised Ship { get; init; } - - [JsonProperty("ScanStage")] - public long ScanStage { get; init; } - - [JsonProperty("PilotName")] - public Localised PilotName { get; init; } - - [JsonProperty("PilotRank")] - public string PilotRank { get; init; } - - [JsonProperty("SquadronID")] - public string SquadronId { get; init; } - - [JsonProperty("ShieldHealth")] - public double ShieldHealth { get; init; } - - [JsonProperty("HullHealth")] - public double HullHealth { get; init; } - - [JsonProperty("LegalStatus")] - public string LegalStatus { get; init; } - - [JsonProperty("Faction")] - public string Faction { get; init; } - - [JsonProperty("Subsystem")] - public Localised Subsystem { get; init; } - - [JsonProperty("SubsystemHealth")] - public double SubsystemHealth { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("TargetLocked")] + public bool IsTargetLocked { get; init; } + + [JsonProperty("Ship")] + public Localised Ship { get; init; } + + [JsonProperty("ScanStage")] + public long ScanStage { get; init; } + + [JsonProperty("PilotName")] + public Localised PilotName { get; init; } + + [JsonProperty("PilotRank")] + public string PilotRank { get; init; } + + [JsonProperty("SquadronID")] + public string SquadronId { get; init; } + + [JsonProperty("ShieldHealth")] + public double ShieldHealth { get; init; } + + [JsonProperty("HullHealth")] + public double HullHealth { get; init; } + + [JsonProperty("LegalStatus")] + public string LegalStatus { get; init; } + + [JsonProperty("Faction")] + public string Faction { get; init; } + + [JsonProperty("Subsystem")] + public Localised Subsystem { get; init; } + + [JsonProperty("SubsystemHealth")] + public double SubsystemHealth { get; init; } + + [JsonProperty("Power")] + public string Power { get; init; } + + [JsonProperty("Bounty")] + public int Bounty { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/ShipyardBuyEvent.cs b/EliteAPI.Events/ShipyardBuyEvent.cs index 4cbc789fb..0648811ba 100644 --- a/EliteAPI.Events/ShipyardBuyEvent.cs +++ b/EliteAPI.Events/ShipyardBuyEvent.cs @@ -5,24 +5,33 @@ namespace EliteAPI.Events; public readonly struct ShipyardBuyEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("ShipType")] - public Localised ShipType { get; init; } - - [JsonProperty("ShipPrice")] - public long ShipPrice { get; init; } - - [JsonProperty("StoreOldShip")] - public string StoreOldShip { get; init; } - - [JsonProperty("StoreShipID")] - public string StoreShipId { get; init; } - - [JsonProperty("MarketID")] - public string MarketId { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("ShipType")] + public Localised ShipType { get; init; } + + [JsonProperty("ShipPrice")] + public long ShipPrice { get; init; } + + [JsonProperty("StoreOldShip")] + public string StoreOldShip { get; init; } + + [JsonProperty("StoreShipID")] + public string StoreShipId { get; init; } + + [JsonProperty("MarketID")] + public string MarketId { get; init; } + + [JsonProperty("SellOldShip")] + public string SellOldShip { get; init; } + + [JsonProperty("SellShipID")] + public string SellShipID { get; init; } + + [JsonProperty("SellPrice")] + public int SellPrice { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/ShipyardSellEvent.cs b/EliteAPI.Events/ShipyardSellEvent.cs index ad55cde3a..837fb49ca 100644 --- a/EliteAPI.Events/ShipyardSellEvent.cs +++ b/EliteAPI.Events/ShipyardSellEvent.cs @@ -5,21 +5,27 @@ namespace EliteAPI.Events; public readonly struct ShipyardSellEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("ShipType")] - public string ShipType { get; init; } - - [JsonProperty("SellShipID")] - public string SellShipId { get; init; } - - [JsonProperty("ShipPrice")] - public long ShipPrice { get; init; } - - [JsonProperty("System")] - public string System { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("ShipType")] + public string ShipType { get; init; } + + [JsonProperty("SellShipID")] + public string SellShipId { get; init; } + + [JsonProperty("ShipPrice")] + public long ShipPrice { get; init; } + + [JsonProperty("System")] + public string System { get; init; } + + [JsonProperty("MarketID")] + public string MarketID { get; init; } + + [JsonProperty("ShipMarketID")] + public string ShipMarketID { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/StartJumpEvent.cs b/EliteAPI.Events/StartJumpEvent.cs index f67c6ef30..7d2903b33 100644 --- a/EliteAPI.Events/StartJumpEvent.cs +++ b/EliteAPI.Events/StartJumpEvent.cs @@ -5,21 +5,24 @@ namespace EliteAPI.Events; public readonly struct StartJumpEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("JumpType")] - public string JumpType { get; init; } - - [JsonProperty("StarSystem")] - public string StarSystem { get; init; } - - [JsonProperty("SystemAddress")] - public string SystemAddress { get; init; } - - [JsonProperty("StarClass")] - public string StarClass { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("JumpType")] + public string JumpType { get; init; } + + [JsonProperty("StarSystem")] + public string StarSystem { get; init; } + + [JsonProperty("SystemAddress")] + public string SystemAddress { get; init; } + + [JsonProperty("StarClass")] + public string StarClass { get; init; } + + [JsonProperty("Taxi")] + public bool IsInTaxi { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/StoredModulesEvent.cs b/EliteAPI.Events/StoredModulesEvent.cs index d63305fc8..a0a1d62c5 100644 --- a/EliteAPI.Events/StoredModulesEvent.cs +++ b/EliteAPI.Events/StoredModulesEvent.cs @@ -48,7 +48,7 @@ public readonly struct Item public long BuyPrice { get; init; } [JsonProperty("Hot")] - public bool Hot { get; init; } + public bool IsHot { get; init; } [JsonProperty("EngineerModifications")] public string EngineerModifications { get; init; } diff --git a/EliteAPI.Events/StoredShipsEvent.cs b/EliteAPI.Events/StoredShipsEvent.cs index 6f652b641..62bc023f8 100644 --- a/EliteAPI.Events/StoredShipsEvent.cs +++ b/EliteAPI.Events/StoredShipsEvent.cs @@ -38,7 +38,7 @@ public readonly struct ShipsInfo public long Value { get; init; } [JsonProperty("Hot")] - public bool Hot { get; init; } + public bool IsHot { get; init; } [JsonProperty("Name")] public string Name { get; init; } diff --git a/EliteAPI.Events/SupercruiseEntryEvent.cs b/EliteAPI.Events/SupercruiseEntryEvent.cs index 0fe693e0c..ebf92e1a1 100644 --- a/EliteAPI.Events/SupercruiseEntryEvent.cs +++ b/EliteAPI.Events/SupercruiseEntryEvent.cs @@ -5,21 +5,24 @@ namespace EliteAPI.Events; public readonly struct SupercruiseEntryEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("StarSystem")] - public string StarSystem { get; init; } - - [JsonProperty("SystemAddress")] - public string SystemAddress { get; init; } - - [JsonProperty("Taxi")] - public bool IsTaxi { get; init; } - - [JsonProperty("Multicrew")] - public bool IsMulticrew { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("StarSystem")] + public string StarSystem { get; init; } + + [JsonProperty("SystemAddress")] + public string SystemAddress { get; init; } + + [JsonProperty("Taxi")] + public bool IsTaxi { get; init; } + + [JsonProperty("Multicrew")] + public bool IsMulticrew { get; init; } + + [JsonProperty("Wanted")] + public bool IsWanted { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/TouchdownEvent.cs b/EliteAPI.Events/TouchdownEvent.cs index ee761fa0f..dddaf9b21 100644 --- a/EliteAPI.Events/TouchdownEvent.cs +++ b/EliteAPI.Events/TouchdownEvent.cs @@ -5,39 +5,45 @@ namespace EliteAPI.Events; public readonly struct TouchdownEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("PlayerControlled")] - public bool IsPlayerControlled { get; init; } - - [JsonProperty("Latitude")] - public double Latitude { get; init; } - - [JsonProperty("Longitude")] - public double Longitude { get; init; } - - [JsonProperty("StarSystem")] - public string StarSystem { get; init; } - - [JsonProperty("SystemAddress")] - public string SystemAddress { get; init; } - - [JsonProperty("Body")] - public string Body { get; init; } - - [JsonProperty("BodyID")] - public string BodyId { get; init; } - - [JsonProperty("OnPlanet")] - public bool IsOnPlanet { get; init; } - - [JsonProperty("OnStation")] - public bool IsOnStation { get; init; } - - [JsonProperty("NearestDestination")] - public Localised NearestDestination { get; init; } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("PlayerControlled")] + public bool IsPlayerControlled { get; init; } + + [JsonProperty("Latitude")] + public double Latitude { get; init; } + + [JsonProperty("Longitude")] + public double Longitude { get; init; } + + [JsonProperty("StarSystem")] + public string StarSystem { get; init; } + + [JsonProperty("SystemAddress")] + public string SystemAddress { get; init; } + + [JsonProperty("Body")] + public string Body { get; init; } + + [JsonProperty("BodyID")] + public string BodyId { get; init; } + + [JsonProperty("OnPlanet")] + public bool IsOnPlanet { get; init; } + + [JsonProperty("OnStation")] + public bool IsOnStation { get; init; } + + [JsonProperty("NearestDestination")] + public Localised NearestDestination { get; init; } + + [JsonProperty("Taxi")] + public bool IsInTaxi { get; init; } + + [JsonProperty("Multicrew")] + public bool IsMulticrew { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Events/TradeMicroResourcesEvent.cs b/EliteAPI.Events/TradeMicroResourcesEvent.cs index f88df39c5..caa9ba07b 100644 --- a/EliteAPI.Events/TradeMicroResourcesEvent.cs +++ b/EliteAPI.Events/TradeMicroResourcesEvent.cs @@ -1,37 +1,40 @@ -using EliteAPI.Abstractions.Events; +using EliteAPI.Abstractions.Events; using Newtonsoft.Json; namespace EliteAPI.Events; public readonly struct TradeMicroResourcesEvent : IEvent { - [JsonProperty("timestamp")] - public DateTime Timestamp { get; init; } - - [JsonProperty("event")] - public string Event { get; init; } - - [JsonProperty("Offered")] - public IReadOnlyCollection Transfers { get; init; } - - [JsonProperty("Received")] - public string Received { get; init; } - - [JsonProperty("Count")] - public long Count { get; init; } - - [JsonProperty("MarketID")] - public string MarketId { get; init; } - - public readonly struct MicroResourceInfo - { - [JsonProperty("Name")] - public Localised Name { get; init; } - - [JsonProperty("Category")] - public string Category { get; init; } - - [JsonProperty("Count")] - public long Count { get; init; } - } + [JsonProperty("timestamp")] + public DateTime Timestamp { get; init; } + + [JsonProperty("event")] + public string Event { get; init; } + + [JsonProperty("Offered")] + public IReadOnlyCollection Transfers { get; init; } + + [JsonProperty("Received")] + public string Received { get; init; } + + [JsonProperty("Count")] + public long Count { get; init; } + + [JsonProperty("MarketID")] + public string MarketId { get; init; } + + public readonly struct MicroResourceInfo + { + [JsonProperty("Name")] + public Localised Name { get; init; } + + [JsonProperty("Category")] + public string Category { get; init; } + + [JsonProperty("Count")] + public long Count { get; init; } + } + + [JsonProperty("TotalCount")] + public int TotalCount { get; init; } } \ No newline at end of file diff --git a/EliteAPI.Status/FCMaterials/FcMaterialsEvent.cs b/EliteAPI.Status/FCMaterials/FcMaterialsEvent.cs index a7b33d93b..c7c9efb77 100644 --- a/EliteAPI.Status/FCMaterials/FcMaterialsEvent.cs +++ b/EliteAPI.Status/FCMaterials/FcMaterialsEvent.cs @@ -12,7 +12,7 @@ namespace EliteAPI.Events.Status.FCMaterials; public string Event { get; init; } [JsonProperty("MarketID")] - public long MarketId { get; init; } + public string MarketId { get; init; } [JsonProperty("CarrierName")] public string CarrierName { get; init; } diff --git a/EliteAPI.Status/Ship/StatusEvent.cs b/EliteAPI.Status/Ship/StatusEvent.cs index 624dda6fb..39ff78c61 100644 --- a/EliteAPI.Status/Ship/StatusEvent.cs +++ b/EliteAPI.Status/Ship/StatusEvent.cs @@ -53,22 +53,22 @@ namespace EliteAPI.Events.Status.Ship; [JsonProperty("Flags2")] public CommanderFlags Flags2 { get; init; } - public bool OnFoot => GetCommanderFlag(0); + public bool IsOnFoot => GetCommanderFlag(0); public bool InTaxi => GetCommanderFlag(1); public bool InMultiCrew => GetCommanderFlag(2); - public bool OnFootInStation => GetCommanderFlag(3); - public bool OnFootOnPlanet => GetCommanderFlag(4); + public bool IsOnFootInStation => GetCommanderFlag(3); + public bool IsOnFootOnPlanet => GetCommanderFlag(4); public bool AimDownSight => GetCommanderFlag(5); public bool LowOxygen => GetCommanderFlag(6); public bool LowHealth => GetCommanderFlag(7); - public bool Cold => GetCommanderFlag(8); - public bool Hot => GetCommanderFlag(9); + public bool IsCold => GetCommanderFlag(8); + public bool IsHot => GetCommanderFlag(9); public bool VeryCold => GetCommanderFlag(10); public bool VeryHot => GetCommanderFlag(11); public bool Gliding => GetCommanderFlag(12); - public bool OnFootInHangar => GetCommanderFlag(13); - public bool OnFootInSocialSpace => GetCommanderFlag(14); - public bool OnFootInExterior => GetCommanderFlag(15); + public bool IsOnFootInHangar => GetCommanderFlag(13); + public bool IsOnFootInSocialSpace => GetCommanderFlag(14); + public bool IsOnFootInExterior => GetCommanderFlag(15); public bool BreathableAtmosphere => GetCommanderFlag(16); [JsonProperty("Pips")] diff --git a/EliteAPI.Tests/Conventions.cs b/EliteAPI.Tests/Conventions.cs index ec2b052c8..d68ac4108 100644 --- a/EliteAPI.Tests/Conventions.cs +++ b/EliteAPI.Tests/Conventions.cs @@ -107,6 +107,13 @@ public void PropertyType(PropertyInfo property) Assert.That(prefixes.Any(x => property.Name.StartsWith(x)), $"Property {name} should start with {string.Join(" or ", prefixes)}"); } + + // Collections should be of type IReadOnlyCollection + if(property.PropertyType.IsArray) + { + Assert.That(property.PropertyType == typeof(IReadOnlyCollection<>).MakeGenericType(property.PropertyType.GetGenericArguments()), + $"Property {name} should be of type IReadOnlyCollection"); + } } [Test(Description = "Property id or address")] @@ -116,8 +123,8 @@ public void PropertyIdOrAddressNaming(PropertyInfo property) var name = property.DeclaringType!.Name + "." + property.Name; // Properties ending with ID and Address should be of type string and spelled as 'Id' and 'Address' - if (property.Name.EndsWith("ID", StringComparison.OrdinalIgnoreCase) || - property.Name.EndsWith("Address", StringComparison.OrdinalIgnoreCase)) + if ((property.Name.EndsWith("ID", StringComparison.OrdinalIgnoreCase) || + property.Name.EndsWith("Address", StringComparison.OrdinalIgnoreCase)) && !property.Name.EndsWith("Thargoid", StringComparison.OrdinalIgnoreCase)) { if(property.Name.EndsWith("paid", StringComparison.InvariantCultureIgnoreCase)) return; diff --git a/Examples/Example/Program.cs b/Examples/Example/Program.cs index cc7986419..3ddb3a65b 100644 --- a/Examples/Example/Program.cs +++ b/Examples/Example/Program.cs @@ -17,9 +17,9 @@ }); // Subscribe to all events -api.Events.OnAny(e => +api.Events.On(e => { - var eventName = e.Event; + Console.WriteLine(e.Commodities.Count); }); // Handle gear changes in the OnGearChange method