Skip to content

Commit

Permalink
Merge pull request #84 from opensky-to/tracking-event-updates
Browse files Browse the repository at this point in the history
Tracking event updates
  • Loading branch information
sushiat authored Dec 2, 2023
2 parents 8657dee + ffe41df commit 92f6d4d
Show file tree
Hide file tree
Showing 15 changed files with 867 additions and 523 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/discord-release-msg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
color: "1711650"
username: "Agent Release Changelog"
avatar_url: "https://cdn.discordapp.com/icons/837475420923756544/941238cca4a5e355f16a9d710b423c0e.webp?size=96"
content: "||@everyone||"
content: "||@progress ping||"
footer_title: "Changelog"
footer_icon_url: "https://cdn.discordapp.com/icons/837475420923756544/941238cca4a5e355f16a9d710b423c0e.webp?size=96"
footer_timestamp: true
4 changes: 2 additions & 2 deletions OpenSky.Agent.SimConnectMSFS/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("1f9cbede-669d-4510-bca2-e6ad29d6a498")]
[assembly: AssemblyVersion("0.5.5")]
[assembly: AssemblyFileVersion("0.5.5")]
[assembly: AssemblyVersion("0.5.6")]
[assembly: AssemblyFileVersion("0.5.6")]
2 changes: 1 addition & 1 deletion OpenSky.Agent.Simulator/Models/PayloadStations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public class PayloadStations
this.Name17?.Replace("TT:MENU.PAYLOAD.", string.Empty),
this.Name18?.Replace("TT:MENU.PAYLOAD.", string.Empty),
this.Name19?.Replace("TT:MENU.PAYLOAD.", string.Empty),
this.Name20?.Replace("TT:MENU.PAYLOAD.", string.Empty),
this.Name20?.Replace("TT:MENU.PAYLOAD.", string.Empty)
};

/// -------------------------------------------------------------------------------------------------
Expand Down
132 changes: 131 additions & 1 deletion OpenSky.Agent.Simulator/OpenAPIs/swagger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1326,6 +1326,98 @@ public virtual async System.Threading.Tasks.Task<StringApiResponse> PurchaseNewA
}
}

/// <summary>
/// Re-register aircraft.
/// </summary>
/// <remarks>
/// sushi.at, 28/11/2023.
/// </remarks>
/// <param name="body">The re-register data.</param>
/// <returns>Success</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public virtual System.Threading.Tasks.Task<StringApiResponse> ReRegisterAircraftAsync(ReRegisterAircraft body)
{
return ReRegisterAircraftAsync(body, System.Threading.CancellationToken.None);
}

/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <summary>
/// Re-register aircraft.
/// </summary>
/// <remarks>
/// sushi.at, 28/11/2023.
/// </remarks>
/// <param name="body">The re-register data.</param>
/// <returns>Success</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public virtual async System.Threading.Tasks.Task<StringApiResponse> ReRegisterAircraftAsync(ReRegisterAircraft body, System.Threading.CancellationToken cancellationToken)
{
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Aircraft/reregister");

var client_ = _httpClient;
var disposeClient_ = false;
try
{
using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false))
{
var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
var content_ = new System.Net.Http.StringContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
request_.Method = new System.Net.Http.HttpMethod("PUT");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain"));

PrepareRequest(client_, request_, urlBuilder_);

var url_ = urlBuilder_.ToString();
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);

PrepareRequest(client_, request_, url_);

var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
var disposeResponse_ = true;
try
{
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
if (response_.Content != null && response_.Content.Headers != null)
{
foreach (var item_ in response_.Content.Headers)
headers_[item_.Key] = item_.Value;
}

ProcessResponse(client_, response_);

var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
var objectResponse_ = await ReadObjectResponseAsync<StringApiResponse>(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
}
return objectResponse_.Object;
}
else
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null);
}
}
finally
{
if (disposeResponse_)
response_.Dispose();
}
}
}
finally
{
if (disposeClient_)
client_.Dispose();
}
}

/// <summary>
/// Searches for aircraft around a given airport.
/// </summary>
Expand Down Expand Up @@ -9414,6 +9506,13 @@ public partial class AircraftType
[Newtonsoft.Json.JsonProperty("uploaderName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string UploaderName { get; set; }

/// <summary>
/// Gets or sets a value indicating whether this aircraft uses the strobe light instead of the
/// <br/>beacon - most likely because it doesn't have a beacon.
/// </summary>
[Newtonsoft.Json.JsonProperty("usesStrobeForBeacon", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool UsesStrobeForBeacon { get; set; }

/// <summary>
/// Gets or sets the variants of this aircraft.
/// </summary>
Expand Down Expand Up @@ -9590,7 +9689,7 @@ public partial class AirlineMemberAirlinePermissionHashSetDictionaryApiResponse
}

/// <summary>
/// Airline roles. 10 = BuyAircraft, 11 = SellAircraft, 12 = RentAircraft, 13 = RentOutAircraft, 14 = AssignAircraft, 15 = RenameAircraft, 20 = BuyFBO, 21 = SellFBO, 22 = RentFBO, 23 = RentOutFBO, 24 = RenameFBO, 25 = OrderFuel, 30 = AcceptJobs, 31 = Dispatch, 32 = OutsourceJobs, 33 = AbortJobs, 40 = ModifyAircraft, 41 = MaintainAircraft, 42 = ReplaceAircraftParts, 43 = PerformGroundOperations, 50 = FinancialRecords, 90 = ChangePermissions, 91 = BoardMember, 92 = AllPermissions
/// Airline roles. 10 = BuyAircraft, 11 = SellAircraft, 12 = RentAircraft, 13 = RentOutAircraft, 14 = AssignAircraft, 15 = RenameAircraft, 16 = ReRegisterAircraft, 20 = BuyFBO, 21 = SellFBO, 22 = RentFBO, 23 = RentOutFBO, 24 = RenameFBO, 25 = OrderFuel, 30 = AcceptJobs, 31 = Dispatch, 32 = OutsourceJobs, 33 = AbortJobs, 40 = ModifyAircraft, 41 = MaintainAircraft, 42 = ReplaceAircraftParts, 43 = PerformGroundOperations, 50 = FinancialRecords, 90 = ChangePermissions, 91 = BoardMember, 92 = AllPermissions
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")]
public enum AirlinePermission
Expand All @@ -9608,6 +9707,8 @@ public enum AirlinePermission

RenameAircraft = 15,

ReRegisterAircraft = 16,

BuyFBO = 20,

SellFBO = 21,
Expand Down Expand Up @@ -12076,6 +12177,12 @@ public enum FuelType
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")]
public partial class GroundOperations
{
/// <summary>
/// Gets or sets a value indicating whether we allow fuel trucking.
/// </summary>
[Newtonsoft.Json.JsonProperty("allowFuelTrucking", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool AllowFuelTrucking { get; set; }

/// <summary>
/// Gets or sets the target fuel in gallons.
/// </summary>
Expand Down Expand Up @@ -12932,6 +13039,29 @@ public partial class PurchaseNewAircraft

}

/// <summary>
/// Re-register aircraft model.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")]
public partial class ReRegisterAircraft
{
/// <summary>
/// Gets or sets the old registry.
/// </summary>
[Newtonsoft.Json.JsonProperty("from", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string From { get; set; }

[Newtonsoft.Json.JsonProperty("inCountry", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Country InCountry { get; set; }

/// <summary>
/// Gets or sets the new registry.
/// </summary>
[Newtonsoft.Json.JsonProperty("to", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string To { get; set; }

}

/// <summary>
/// Refresh JWT token model.
/// </summary>
Expand Down
85 changes: 84 additions & 1 deletion OpenSky.Agent.Simulator/OpenAPIs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,58 @@
}
}
},
"/Aircraft/reregister": {
"put": {
"tags": [
"Aircraft"
],
"summary": "Re-register aircraft.",
"description": "sushi.at, 28/11/2023.",
"operationId": "ReRegisterAircraft",
"requestBody": {
"description": "The re-register data.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReRegisterAircraft"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/ReRegisterAircraft"
}
},
"application/*+json": {
"schema": {
"$ref": "#/components/schemas/ReRegisterAircraft"
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/StringApiResponse"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/StringApiResponse"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/StringApiResponse"
}
}
}
}
}
}
},
"/Aircraft/searchAroundAirport": {
"post": {
"tags": [
Expand Down Expand Up @@ -4772,6 +4824,10 @@
"nullable": true,
"readOnly": true
},
"usesStrobeForBeacon": {
"type": "boolean",
"description": "Gets or sets a value indicating whether this aircraft uses the strobe light instead of the\r\nbeacon - most likely because it doesn't have a beacon."
},
"variants": {
"type": "array",
"items": {
Expand Down Expand Up @@ -4960,6 +5016,7 @@
13,
14,
15,
16,
20,
21,
22,
Expand All @@ -4980,7 +5037,7 @@
92
],
"type": "integer",
"description": "Airline roles. 10 = BuyAircraft, 11 = SellAircraft, 12 = RentAircraft, 13 = RentOutAircraft, 14 = AssignAircraft, 15 = RenameAircraft, 20 = BuyFBO, 21 = SellFBO, 22 = RentFBO, 23 = RentOutFBO, 24 = RenameFBO, 25 = OrderFuel, 30 = AcceptJobs, 31 = Dispatch, 32 = OutsourceJobs, 33 = AbortJobs, 40 = ModifyAircraft, 41 = MaintainAircraft, 42 = ReplaceAircraftParts, 43 = PerformGroundOperations, 50 = FinancialRecords, 90 = ChangePermissions, 91 = BoardMember, 92 = AllPermissions",
"description": "Airline roles. 10 = BuyAircraft, 11 = SellAircraft, 12 = RentAircraft, 13 = RentOutAircraft, 14 = AssignAircraft, 15 = RenameAircraft, 16 = ReRegisterAircraft, 20 = BuyFBO, 21 = SellFBO, 22 = RentFBO, 23 = RentOutFBO, 24 = RenameFBO, 25 = OrderFuel, 30 = AcceptJobs, 31 = Dispatch, 32 = OutsourceJobs, 33 = AbortJobs, 40 = ModifyAircraft, 41 = MaintainAircraft, 42 = ReplaceAircraftParts, 43 = PerformGroundOperations, 50 = FinancialRecords, 90 = ChangePermissions, 91 = BoardMember, 92 = AllPermissions",
"format": "int32",
"x-enumNames": [
"BuyAircraft",
Expand All @@ -4989,6 +5046,7 @@
"RentOutAircraft",
"AssignAircraft",
"RenameAircraft",
"ReRegisterAircraft",
"BuyFBO",
"SellFBO",
"RentFBO",
Expand All @@ -5015,6 +5073,7 @@
"RentOutAircraft",
"AssignAircraft",
"RenameAircraft",
"ReRegisterAircraft",
"BuyFBO",
"SellFBO",
"RentFBO",
Expand Down Expand Up @@ -7588,6 +7647,10 @@
"GroundOperations": {
"type": "object",
"properties": {
"allowFuelTrucking": {
"type": "boolean",
"description": "Gets or sets a value indicating whether we allow fuel trucking."
},
"fuel": {
"type": "number",
"description": "Gets or sets the target fuel in gallons.",
Expand Down Expand Up @@ -8374,6 +8437,26 @@
"additionalProperties": false,
"description": "Purchase new aircraft model."
},
"ReRegisterAircraft": {
"type": "object",
"properties": {
"from": {
"type": "string",
"description": "Gets or sets the old registry.",
"nullable": true
},
"inCountry": {
"$ref": "#/components/schemas/Country"
},
"to": {
"type": "string",
"description": "Gets or sets the new registry.",
"nullable": true
}
},
"additionalProperties": false,
"description": "Re-register aircraft model."
},
"RefreshToken": {
"type": "object",
"properties": {
Expand Down
4 changes: 2 additions & 2 deletions OpenSky.Agent.Simulator/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("30c467e8-2eee-41e5-be01-0142a61ba171")]
[assembly: AssemblyVersion("0.5.5")]
[assembly: AssemblyFileVersion("0.5.5")]
[assembly: AssemblyVersion("0.5.6")]
[assembly: AssemblyFileVersion("0.5.6")]
Loading

0 comments on commit 92f6d4d

Please sign in to comment.