diff --git a/example/SeqQuery/SeqQuery.csproj b/example/SeqQuery/SeqQuery.csproj index 7a9f0bd..40bca25 100644 --- a/example/SeqQuery/SeqQuery.csproj +++ b/example/SeqQuery/SeqQuery.csproj @@ -1,12 +1,9 @@  - net46;netcoreapp1.0 + net461;netcoreapp2.2 seq-query Exe - SeqQuery - $(PackageTargetFallback);dnxcore50;portable-net45+win8 - 1.0.4 @@ -21,9 +18,4 @@ - - - - - diff --git a/example/SeqTail/SeqTail.csproj b/example/SeqTail/SeqTail.csproj index 7dc54c5..3ceeb51 100644 --- a/example/SeqTail/SeqTail.csproj +++ b/example/SeqTail/SeqTail.csproj @@ -1,13 +1,9 @@  - net46;netcoreapp1.0 + net461;netcoreapp2.2 seq-tail Exe - SeqTail - win - $(PackageTargetFallback);dnxcore50;portable-net45+win8 - 1.0.4 @@ -19,16 +15,10 @@ - - - - - - diff --git a/example/SignalCopy/SignalCopy.csproj b/example/SignalCopy/SignalCopy.csproj index ca49fbe..3f1644b 100644 --- a/example/SignalCopy/SignalCopy.csproj +++ b/example/SignalCopy/SignalCopy.csproj @@ -1,12 +1,9 @@  - net46;netcoreapp1.0 + net461;netcoreapp2.2 signal-copy Exe - SignalCopy - $(PackageTargetFallback);dnxcore50;portable-net45+win8 - 1.0.4 @@ -21,9 +18,4 @@ - - - - - diff --git a/src/Seq.Api/Client/SeqApiClient.cs b/src/Seq.Api/Client/SeqApiClient.cs index d5256c4..3afd2c7 100644 --- a/src/Seq.Api/Client/SeqApiClient.cs +++ b/src/Seq.Api/Client/SeqApiClient.cs @@ -26,7 +26,7 @@ public class SeqApiClient : IDisposable // Future versions of Seq may not completely support v1 features, however // providing this as an Accept header will ensure what compatibility is available // can be utilised. - const string SeqApiV6MediaType = "application/vnd.datalust.seq.v6+json"; + const string SeqApiV7MediaType = "application/vnd.datalust.seq.v7+json"; readonly HttpClient _httpClient; readonly CookieContainer _cookies = new CookieContainer(); @@ -181,7 +181,7 @@ async Task HttpSendAsync(HttpRequestMessage request, CancellationToken c if (_apiKey != null) request.Headers.Add("X-Seq-ApiKey", _apiKey); - request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(SeqApiV6MediaType)); + request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(SeqApiV7MediaType)); var response = await _httpClient.SendAsync(request, cancellationToken).ConfigureAwait(false); var stream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false); diff --git a/src/Seq.Api/Model/AppInstances/AppInstanceEntity.cs b/src/Seq.Api/Model/AppInstances/AppInstanceEntity.cs index cbae7ef..380771a 100644 --- a/src/Seq.Api/Model/AppInstances/AppInstanceEntity.cs +++ b/src/Seq.Api/Model/AppInstances/AppInstanceEntity.cs @@ -17,21 +17,42 @@ public AppInstanceEntity() Metrics = new AppInstanceMetricsPart(); } - public string Title { get; set; } - public bool IsManualInputOnly { get; set; } public string AppId { get; set; } + public string Title { get; set; } public Dictionary Settings { get; set; } + + /// + /// If true, administrative users may invoke the app manually or through alerts. + /// This field is read-only from the API and generally indicates that the app is an input. + /// + public bool AcceptPrivilegedInvocation { get; set; } + + /// + /// If true, regular users can manually send events to the app, or use the app + /// as the target for alert notifications. + /// + public bool AcceptDirectInvocation { get; set; } public List InvocationOverridableSettings { get; set; } - public TimeSpan? ArrivalWindow { get; set; } + public List InvocationOverridableSettingDefinitions { get; set; } + + /// + /// If true, events will be streamed to the app. + /// + public bool AcceptStreamedEvents { get; set; } public SignalExpressionPart InputSignalExpression { get; set; } - public bool DisallowManualInput { get; set; } - public int ChannelCapacity { get; set; } + public TimeSpan? ArrivalWindow { get; set; } public TimeSpan SuppressionTime { get; set; } public int EventsPerSuppressionWindow { get; set; } - public List InvocationOverridableSettingDefinitions { get; set; } - [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] public AppInstanceMetricsPart Metrics { get; set; } + + [Obsolete("Use !AcceptStreamedEvents instead. This field will be removed in Seq 6.0.")] + [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] + public bool? IsManualInputOnly { get; set; } + + [Obsolete("Use !AcceptDirectInvocation instead. This field will be removed in Seq 6.0.")] + [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] + public bool? DisallowManualInput { get; set; } } } diff --git a/src/Seq.Api/Model/Apps/AppEntity.cs b/src/Seq.Api/Model/Apps/AppEntity.cs index e30861c..1deae4a 100644 --- a/src/Seq.Api/Model/Apps/AppEntity.cs +++ b/src/Seq.Api/Model/Apps/AppEntity.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using Newtonsoft.Json; namespace Seq.Api.Model.Apps { @@ -8,28 +9,22 @@ public class AppEntity : Entity public AppEntity() { Name = "New App"; -#pragma warning disable CS0618 // Type or member is obsolete - AssemblyNames = new List(); AvailableSettings = new List(); -#pragma warning restore CS0618 // Type or member is obsolete } public string Name { get; set; } public string Description { get; set; } - [Obsolete("Packages must be installed via a feed.")] - public string MainReactorTypeName { get; set; } - - [Obsolete("Packages must be installed via a feed.")] - public List AssemblyNames { get; set; } - public List AvailableSettings { get; set; } public bool AllowReprocessing { get; set; } - public bool IsReadOnly { get; set; } - public AppPackagePart Package { get; set; } + + /// + /// If true, the app produces an input stream and does not accept events itself. + /// + public bool IsInput { get; set; } } } diff --git a/src/Seq.Api/Model/License/LicenseEntity.cs b/src/Seq.Api/Model/License/LicenseEntity.cs index a071676..c610991 100644 --- a/src/Seq.Api/Model/License/LicenseEntity.cs +++ b/src/Seq.Api/Model/License/LicenseEntity.cs @@ -8,5 +8,6 @@ public class LicenseEntity : Entity public string StatusDescription { get; set; } public bool IsWarning { get; set; } public bool CanRenewOnlineNow { get; set; } + public int? LicensedUsers { get; set; } } } diff --git a/src/Seq.Api/Model/Monitoring/ChartQueryPart.cs b/src/Seq.Api/Model/Monitoring/ChartQueryPart.cs index b3800b7..fa5a53a 100644 --- a/src/Seq.Api/Model/Monitoring/ChartQueryPart.cs +++ b/src/Seq.Api/Model/Monitoring/ChartQueryPart.cs @@ -12,5 +12,8 @@ public class ChartQueryPart public List GroupBy { get; set; } = new List(); public MeasurementDisplayStylePart DisplayStyle { get; set; } = new MeasurementDisplayStylePart(); public List Alerts { get; set; } = new List(); + public string Having { get; set; } + public List OrderBy { get; set; } = new List(); + public int? Limit { get; set; } } } diff --git a/src/Seq.Api/Model/Monitoring/MeasurementDisplayType.cs b/src/Seq.Api/Model/Monitoring/MeasurementDisplayType.cs index cc7e0d0..ed40ae9 100644 --- a/src/Seq.Api/Model/Monitoring/MeasurementDisplayType.cs +++ b/src/Seq.Api/Model/Monitoring/MeasurementDisplayType.cs @@ -6,6 +6,7 @@ public enum MeasurementDisplayType Bar, Point, Value, - Pie + Pie, + Table } } diff --git a/src/Seq.Api/ResourceGroups/RetentionPoliciesResourceGroup.cs b/src/Seq.Api/ResourceGroups/RetentionPoliciesResourceGroup.cs index 1e3ac18..1291b76 100644 --- a/src/Seq.Api/ResourceGroups/RetentionPoliciesResourceGroup.cs +++ b/src/Seq.Api/ResourceGroups/RetentionPoliciesResourceGroup.cs @@ -31,7 +31,7 @@ public async Task TemplateAsync(CancellationToken cancell public async Task AddAsync(RetentionPolicyEntity entity, CancellationToken cancellationToken = default) { - return await Client.PostAsync(entity, "Create", entity, cancellationToken: cancellationToken).ConfigureAwait(false); + return await GroupCreateAsync(entity, cancellationToken: cancellationToken).ConfigureAwait(false); } public async Task RemoveAsync(RetentionPolicyEntity entity, CancellationToken cancellationToken = default) diff --git a/src/Seq.Api/ResourceGroups/SettingsResourceGroup.cs b/src/Seq.Api/ResourceGroups/SettingsResourceGroup.cs index 9968d1c..d774ee5 100644 --- a/src/Seq.Api/ResourceGroups/SettingsResourceGroup.cs +++ b/src/Seq.Api/ResourceGroups/SettingsResourceGroup.cs @@ -24,11 +24,6 @@ public async Task FindNamedAsync(SettingName name, CancellationTo return await GroupGetAsync(name.ToString(), cancellationToken: cancellationToken).ConfigureAwait(false); } - public async Task> ListAsync(CancellationToken cancellationToken = default) - { - return await GroupListAsync("Items", cancellationToken: cancellationToken).ConfigureAwait(false); - } - public async Task TemplateAsync(CancellationToken cancellationToken = default) { return await GroupGetAsync("Template", cancellationToken: cancellationToken).ConfigureAwait(false); diff --git a/src/Seq.Api/Seq.Api.csproj b/src/Seq.Api/Seq.Api.csproj index ae20a8a..677b359 100644 --- a/src/Seq.Api/Seq.Api.csproj +++ b/src/Seq.Api/Seq.Api.csproj @@ -1,27 +1,24 @@ - + Client library for the Seq HTTP API. - 5.0.1 + 5.1.0 Datalust;Contributors - netstandard1.3;net46;netstandard2.0 - $(NoWarn);CS1591;CS1573 + netstandard2.0 + $(NoWarn);CS1591 true true Seq.Api Seq.Api seq - Copyright © 2014-2018 Datalust Pty Ltd and Contributors - https://getseq.net/images/seq-nuget.png + Copyright © 2014-2019 Datalust Pty Ltd and Contributors + https://datalust.co/images/seq-nuget.png https://github.com/datalust/seq-api http://www.apache.org/licenses/LICENSE-2.0 Seq.Api - 7.1 + 7.3 - - + - - - + \ No newline at end of file diff --git a/test/Seq.Api.Tests/Seq.Api.Tests.csproj b/test/Seq.Api.Tests/Seq.Api.Tests.csproj index b573d26..6545b6f 100644 --- a/test/Seq.Api.Tests/Seq.Api.Tests.csproj +++ b/test/Seq.Api.Tests/Seq.Api.Tests.csproj @@ -1,7 +1,7 @@  - net46;netcoreapp2.0 + net461;netcoreapp2.2 true @@ -15,7 +15,7 @@ - +