Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#nullable enable

namespace Nixtla
{
public partial interface IAsyncJobsClient
{
/// <summary>
/// List your team's async jobs<br/>
/// Lists your team's jobs under `jobs` — use it to recover a `job_id` you no longer hold, then poll it on its task's status endpoint or cancel it. Defaults to pending and running; pass `status` (repeatable) for terminal ones, which stay listed only for the orchestrator's retention window. Page with `page_size` and `next_page_token`, continuing until that token is null rather than until a short page: a page can be short, or empty, and still have more behind it. A `page_token` is valid only for the `status` filter it was returned with. Rows are newest first, within a page and across them, so the job you just submitted is at the front of page one.
/// </summary>
/// <param name="status">
/// Job statuses to list. Repeatable. Defaults to pending and running.
/// </param>
/// <param name="pageSize">
/// Maximum rows per page.<br/>
/// Default Value: 200
/// </param>
/// <param name="pageToken">
/// `next_page_token` from the previous page.
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Nixtla.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Nixtla.AsyncJobsResponse> ListAsyncJobsV2AsyncJobsGetAsync(
global::System.Collections.Generic.IList<global::Nixtla.AsyncJobStatus>? status = default,
int? pageSize = default,
string? pageToken = default,
global::Nixtla.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// List your team's async jobs<br/>
/// Lists your team's jobs under `jobs` — use it to recover a `job_id` you no longer hold, then poll it on its task's status endpoint or cancel it. Defaults to pending and running; pass `status` (repeatable) for terminal ones, which stay listed only for the orchestrator's retention window. Page with `page_size` and `next_page_token`, continuing until that token is null rather than until a short page: a page can be short, or empty, and still have more behind it. A `page_token` is valid only for the `status` filter it was returned with. Rows are newest first, within a page and across them, so the job you just submitted is at the front of page one.
/// </summary>
/// <param name="status">
/// Job statuses to list. Repeatable. Defaults to pending and running.
/// </param>
/// <param name="pageSize">
/// Maximum rows per page.<br/>
/// Default Value: 200
/// </param>
/// <param name="pageToken">
/// `next_page_token` from the previous page.
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Nixtla.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Nixtla.AutoSDKHttpResponse<global::Nixtla.AsyncJobsResponse>> ListAsyncJobsV2AsyncJobsGetAsResponseAsync(
global::System.Collections.Generic.IList<global::Nixtla.AsyncJobStatus>? status = default,
int? pageSize = default,
string? pageToken = default,
global::Nixtla.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#nullable enable

namespace Nixtla
{
public partial interface INixtlaClient
{
/// <summary>
/// List Models<br/>
/// List the models available to your API key. Use a returned `name` as the `model` field of a forecast, cross-validation or anomaly-detection request. A model absent here is one those endpoints would reject with 403.
/// </summary>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Nixtla.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Nixtla.ModelsResponse> V2ModelsV2ModelsGetAsync(
global::Nixtla.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// List Models<br/>
/// List the models available to your API key. Use a returned `name` as the `model` field of a forecast, cross-validation or anomaly-detection request. A model absent here is one those endpoints would reject with 403.
/// </summary>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Nixtla.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Nixtla.AutoSDKHttpResponse<global::Nixtla.ModelsResponse>> V2ModelsV2ModelsGetAsResponseAsync(
global::Nixtla.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace Nixtla.JsonConverters
{
/// <inheritdoc />
public sealed class AsyncJobTaskNameJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Nixtla.AsyncJobTaskName>
{
/// <inheritdoc />
public override global::Nixtla.AsyncJobTaskName Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::Nixtla.AsyncJobTaskNameExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Nixtla.AsyncJobTaskName)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::Nixtla.AsyncJobTaskName);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Nixtla.AsyncJobTaskName value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::Nixtla.AsyncJobTaskNameExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace Nixtla.JsonConverters
{
/// <inheritdoc />
public sealed class AsyncJobTaskNameNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Nixtla.AsyncJobTaskName?>
{
/// <inheritdoc />
public override global::Nixtla.AsyncJobTaskName? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::Nixtla.AsyncJobTaskNameExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Nixtla.AsyncJobTaskName)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::Nixtla.AsyncJobTaskName?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Nixtla.AsyncJobTaskName? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

if (value == null)
{
writer.WriteNullValue();
}
else
{
writer.WriteStringValue(global::Nixtla.AsyncJobTaskNameExtensions.ToValueString(value.Value));
}
}
}
}
17 changes: 15 additions & 2 deletions src/libs/Nixtla/Generated/Nixtla.JsonSerializerContext.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ namespace Nixtla

typeof(global::Nixtla.JsonConverters.AsyncJobStatusNullableJsonConverter),

typeof(global::Nixtla.JsonConverters.AsyncJobTaskNameJsonConverter),

typeof(global::Nixtla.JsonConverters.AsyncJobTaskNameNullableJsonConverter),

typeof(global::Nixtla.JsonConverters.CrossValidationAsyncRequestFinetuneLossJsonConverter),

typeof(global::Nixtla.JsonConverters.CrossValidationAsyncRequestFinetuneLossNullableJsonConverter),
Expand Down Expand Up @@ -149,6 +153,9 @@ namespace Nixtla
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Nixtla.HTTPValidationError))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::Nixtla.ValidationError>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Nixtla.ValidationError))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Nixtla.ModelInfo))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Nixtla.ModelsResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::Nixtla.ModelInfo>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Nixtla.OnlineAnomalyInput))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Nixtla.OnlineAnomalyInputThresholdMethod), TypeInfoPropertyName = "OnlineAnomalyInputThresholdMethod2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Nixtla.OnlineAnomalyInputFinetuneLoss), TypeInfoPropertyName = "OnlineAnomalyInputFinetuneLoss2")]
Expand All @@ -165,6 +172,10 @@ namespace Nixtla
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Nixtla.AsyncJobStatus), TypeInfoPropertyName = "AsyncJobStatus2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Nixtla.AsyncJobStatusResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Nixtla.AsyncJobSubmitResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Nixtla.AsyncJobSummary))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Nixtla.AsyncJobTaskName), TypeInfoPropertyName = "AsyncJobTaskName2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Nixtla.AsyncJobsResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::Nixtla.AsyncJobSummary>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Nixtla.CrossValidationAsyncRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Nixtla.CrossValidationAsyncRequestFinetuneLoss), TypeInfoPropertyName = "CrossValidationAsyncRequestFinetuneLoss2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Nixtla.CrossValidationAsyncRequestFeatureContributionsType), TypeInfoPropertyName = "CrossValidationAsyncRequestFeatureContributionsType2")]
Expand All @@ -175,10 +186,9 @@ namespace Nixtla
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Nixtla.ForecastAsyncRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Nixtla.ForecastAsyncRequestFinetuneLoss), TypeInfoPropertyName = "ForecastAsyncRequestFinetuneLoss2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Nixtla.ForecastAsyncRequestFeatureContributionsType), TypeInfoPropertyName = "ForecastAsyncRequestFeatureContributionsType2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Nixtla.OpenJobCounts))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Nixtla.SimulateAsyncRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::Nixtla.AsyncJobStatus>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary<string, global::Nixtla.OpenJobCounts>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<int>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<double>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<double>>))]
Expand All @@ -188,9 +198,12 @@ namespace Nixtla
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<string>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::Nixtla.FinetunedModel>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::Nixtla.ValidationError>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::Nixtla.ModelInfo>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::System.Collections.Generic.List<global::Nixtla.AnyOf<double?, string>>>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::Nixtla.AnyOf<double?, string>>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::Nixtla.AnyOf<string, int?>>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::Nixtla.AsyncJobSummary>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::Nixtla.AsyncJobStatus>))]
public sealed partial class SourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext
{
}
Expand Down
Loading