From 6ba00ead2ad3e5e993abb5a1c65071b215bdc3de Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 15 Sep 2026 08:06:04 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...obsClient.ListAsyncJobsV2AsyncJobsGet.g.cs | 500 ++++++++++++++++++ ...etAsyncJobsStatusV2AsyncJobsStatusGet.g.cs | 28 - ...obsClient.ListAsyncJobsV2AsyncJobsGet.g.cs | 54 ++ ...tla.INixtlaClient.V2ModelsV2ModelsGet.g.cs | 28 + ...ixtla.JsonConverters.AsyncJobTaskName.g.cs | 53 ++ ...onConverters.AsyncJobTaskNameNullable.g.cs | 60 +++ .../Nixtla.JsonSerializerContext.g.cs | 17 +- .../Nixtla.JsonSerializerContextTypes.g.cs | 102 ++-- ...> Nixtla.Models.AsyncJobSummary.Json.g.cs} | 26 +- .../Nixtla.Models.AsyncJobSummary.g.cs | 85 +++ .../Nixtla.Models.AsyncJobTaskName.g.cs | 81 +++ .../Nixtla.Models.AsyncJobsResponse.Json.g.cs | 141 +++++ .../Nixtla.Models.AsyncJobsResponse.g.cs | 60 +++ ...obsStatusV2AsyncJobsStatusGetResponse.g.cs | 19 - ...g.cs => Nixtla.Models.ModelInfo.Json.g.cs} | 26 +- .../Generated/Nixtla.Models.ModelInfo.g.cs | 47 ++ .../Nixtla.Models.ModelsResponse.Json.g.cs | 141 +++++ .../Nixtla.Models.ModelsResponse.g.cs | 50 ++ .../Nixtla.Models.OpenJobCounts.g.cs | 62 --- ...tla.NixtlaClient.V2ModelsV2ModelsGet.g.cs} | 82 +-- src/libs/Nixtla/openapi.json | 259 +++++++-- 21 files changed, 1673 insertions(+), 248 deletions(-) create mode 100644 src/libs/Nixtla/Generated/Nixtla.AsyncJobsClient.ListAsyncJobsV2AsyncJobsGet.g.cs delete mode 100644 src/libs/Nixtla/Generated/Nixtla.IAsyncJobsClient.GetAsyncJobsStatusV2AsyncJobsStatusGet.g.cs create mode 100644 src/libs/Nixtla/Generated/Nixtla.IAsyncJobsClient.ListAsyncJobsV2AsyncJobsGet.g.cs create mode 100644 src/libs/Nixtla/Generated/Nixtla.INixtlaClient.V2ModelsV2ModelsGet.g.cs create mode 100644 src/libs/Nixtla/Generated/Nixtla.JsonConverters.AsyncJobTaskName.g.cs create mode 100644 src/libs/Nixtla/Generated/Nixtla.JsonConverters.AsyncJobTaskNameNullable.g.cs rename src/libs/Nixtla/Generated/{Nixtla.Models.GetAsyncJobsStatusV2AsyncJobsStatusGetResponse.Json.g.cs => Nixtla.Models.AsyncJobSummary.Json.g.cs} (84%) create mode 100644 src/libs/Nixtla/Generated/Nixtla.Models.AsyncJobSummary.g.cs create mode 100644 src/libs/Nixtla/Generated/Nixtla.Models.AsyncJobTaskName.g.cs create mode 100644 src/libs/Nixtla/Generated/Nixtla.Models.AsyncJobsResponse.Json.g.cs create mode 100644 src/libs/Nixtla/Generated/Nixtla.Models.AsyncJobsResponse.g.cs delete mode 100644 src/libs/Nixtla/Generated/Nixtla.Models.GetAsyncJobsStatusV2AsyncJobsStatusGetResponse.g.cs rename src/libs/Nixtla/Generated/{Nixtla.Models.OpenJobCounts.Json.g.cs => Nixtla.Models.ModelInfo.Json.g.cs} (89%) create mode 100644 src/libs/Nixtla/Generated/Nixtla.Models.ModelInfo.g.cs create mode 100644 src/libs/Nixtla/Generated/Nixtla.Models.ModelsResponse.Json.g.cs create mode 100644 src/libs/Nixtla/Generated/Nixtla.Models.ModelsResponse.g.cs delete mode 100644 src/libs/Nixtla/Generated/Nixtla.Models.OpenJobCounts.g.cs rename src/libs/Nixtla/Generated/{Nixtla.AsyncJobsClient.GetAsyncJobsStatusV2AsyncJobsStatusGet.g.cs => Nixtla.NixtlaClient.V2ModelsV2ModelsGet.g.cs} (81%) diff --git a/src/libs/Nixtla/Generated/Nixtla.AsyncJobsClient.ListAsyncJobsV2AsyncJobsGet.g.cs b/src/libs/Nixtla/Generated/Nixtla.AsyncJobsClient.ListAsyncJobsV2AsyncJobsGet.g.cs new file mode 100644 index 0000000..ac229fa --- /dev/null +++ b/src/libs/Nixtla/Generated/Nixtla.AsyncJobsClient.ListAsyncJobsV2AsyncJobsGet.g.cs @@ -0,0 +1,500 @@ + +#nullable enable + +namespace Nixtla +{ + public partial class AsyncJobsClient + { + + + private static readonly global::Nixtla.EndPointSecurityRequirement s_ListAsyncJobsV2AsyncJobsGetSecurityRequirement0 = + new global::Nixtla.EndPointSecurityRequirement + { + Authorizations = new global::Nixtla.EndPointAuthorizationRequirement[] + { new global::Nixtla.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "HTTPBearer", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Nixtla.EndPointSecurityRequirement[] s_ListAsyncJobsV2AsyncJobsGetSecurityRequirements = + new global::Nixtla.EndPointSecurityRequirement[] + { s_ListAsyncJobsV2AsyncJobsGetSecurityRequirement0, + }; + partial void PrepareListAsyncJobsV2AsyncJobsGetArguments( + global::System.Net.Http.HttpClient httpClient, + global::System.Collections.Generic.IList? status, + ref int? pageSize, + ref string? pageToken); + partial void PrepareListAsyncJobsV2AsyncJobsGetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Collections.Generic.IList? status, + int? pageSize, + string? pageToken); + partial void ProcessListAsyncJobsV2AsyncJobsGetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListAsyncJobsV2AsyncJobsGetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List your team's async jobs
+ /// 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. + ///
+ /// + /// Job statuses to list. Repeatable. Defaults to pending and running. + /// + /// + /// Maximum rows per page.
+ /// Default Value: 200 + /// + /// + /// `next_page_token` from the previous page. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ListAsyncJobsV2AsyncJobsGetAsync( + global::System.Collections.Generic.IList? status = default, + int? pageSize = default, + string? pageToken = default, + global::Nixtla.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListAsyncJobsV2AsyncJobsGetAsResponseAsync( + status: status, + pageSize: pageSize, + pageToken: pageToken, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List your team's async jobs
+ /// 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. + ///
+ /// + /// Job statuses to list. Repeatable. Defaults to pending and running. + /// + /// + /// Maximum rows per page.
+ /// Default Value: 200 + /// + /// + /// `next_page_token` from the previous page. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListAsyncJobsV2AsyncJobsGetAsResponseAsync( + global::System.Collections.Generic.IList? status = default, + int? pageSize = default, + string? pageToken = default, + global::Nixtla.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListAsyncJobsV2AsyncJobsGetArguments( + httpClient: HttpClient, + status: status, + pageSize: ref pageSize, + pageToken: ref pageToken); + + + var __authorizations = global::Nixtla.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListAsyncJobsV2AsyncJobsGetSecurityRequirements, + operationName: "ListAsyncJobsV2AsyncJobsGetAsync"); + + using var __timeoutCancellationTokenSource = global::Nixtla.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Nixtla.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Nixtla.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Nixtla.PathBuilder( + path: "/v2/async/jobs", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("status", status, selector: static x => x.ToValueString(), delimiter: ",", explode: true) + .AddOptionalParameter("page_size", pageSize?.ToString()) + .AddOptionalParameter("page_token", pageToken) + ; + var __path = __pathBuilder.ToString(); + __path = global::Nixtla.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + global::Nixtla.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListAsyncJobsV2AsyncJobsGetRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + status: status, + pageSize: pageSize, + pageToken: pageToken); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Nixtla.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Nixtla.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListAsyncJobsV2AsyncJobsGet", + methodName: "ListAsyncJobsV2AsyncJobsGetAsync", + pathTemplate: "\"/v2/async/jobs\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Nixtla.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Nixtla.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Nixtla.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListAsyncJobsV2AsyncJobsGet", + methodName: "ListAsyncJobsV2AsyncJobsGetAsync", + pathTemplate: "\"/v2/async/jobs\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Nixtla.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Nixtla.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Nixtla.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Nixtla.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Nixtla.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListAsyncJobsV2AsyncJobsGet", + methodName: "ListAsyncJobsV2AsyncJobsGetAsync", + pathTemplate: "\"/v2/async/jobs\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Nixtla.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessListAsyncJobsV2AsyncJobsGetResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Nixtla.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Nixtla.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListAsyncJobsV2AsyncJobsGet", + methodName: "ListAsyncJobsV2AsyncJobsGetAsync", + pathTemplate: "\"/v2/async/jobs\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Nixtla.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Nixtla.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListAsyncJobsV2AsyncJobsGet", + methodName: "ListAsyncJobsV2AsyncJobsGetAsync", + pathTemplate: "\"/v2/async/jobs\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Nixtla.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Nixtla.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Nixtla.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::Nixtla.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListAsyncJobsV2AsyncJobsGetResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Nixtla.AsyncJobsResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Nixtla.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Nixtla.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Nixtla.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Nixtla.AsyncJobsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Nixtla.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Nixtla.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Nixtla.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Nixtla/Generated/Nixtla.IAsyncJobsClient.GetAsyncJobsStatusV2AsyncJobsStatusGet.g.cs b/src/libs/Nixtla/Generated/Nixtla.IAsyncJobsClient.GetAsyncJobsStatusV2AsyncJobsStatusGet.g.cs deleted file mode 100644 index f0355f5..0000000 --- a/src/libs/Nixtla/Generated/Nixtla.IAsyncJobsClient.GetAsyncJobsStatusV2AsyncJobsStatusGet.g.cs +++ /dev/null @@ -1,28 +0,0 @@ -#nullable enable - -namespace Nixtla -{ - public partial interface IAsyncJobsClient - { - /// - /// Count your team's open async jobs
- /// Returns your team's open job counts as `{task: {pending, running}}`, with an entry for every async task even when it has no jobs. Only these two states are reported — a succeeded, failed or cancelled job leaves the counts rather than moving between them, so poll a task's status endpoint to see a terminal state. Counts are approximate: they are read from the orchestrator and cached briefly. - ///
- /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task> GetAsyncJobsStatusV2AsyncJobsStatusGetAsync( - global::Nixtla.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Count your team's open async jobs
- /// Returns your team's open job counts as `{task: {pending, running}}`, with an entry for every async task even when it has no jobs. Only these two states are reported — a succeeded, failed or cancelled job leaves the counts rather than moving between them, so poll a task's status endpoint to see a terminal state. Counts are approximate: they are read from the orchestrator and cached briefly. - ///
- /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task>> GetAsyncJobsStatusV2AsyncJobsStatusGetAsResponseAsync( - global::Nixtla.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Nixtla/Generated/Nixtla.IAsyncJobsClient.ListAsyncJobsV2AsyncJobsGet.g.cs b/src/libs/Nixtla/Generated/Nixtla.IAsyncJobsClient.ListAsyncJobsV2AsyncJobsGet.g.cs new file mode 100644 index 0000000..e8733cb --- /dev/null +++ b/src/libs/Nixtla/Generated/Nixtla.IAsyncJobsClient.ListAsyncJobsV2AsyncJobsGet.g.cs @@ -0,0 +1,54 @@ +#nullable enable + +namespace Nixtla +{ + public partial interface IAsyncJobsClient + { + /// + /// List your team's async jobs
+ /// 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. + ///
+ /// + /// Job statuses to list. Repeatable. Defaults to pending and running. + /// + /// + /// Maximum rows per page.
+ /// Default Value: 200 + /// + /// + /// `next_page_token` from the previous page. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ListAsyncJobsV2AsyncJobsGetAsync( + global::System.Collections.Generic.IList? status = default, + int? pageSize = default, + string? pageToken = default, + global::Nixtla.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List your team's async jobs
+ /// 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. + ///
+ /// + /// Job statuses to list. Repeatable. Defaults to pending and running. + /// + /// + /// Maximum rows per page.
+ /// Default Value: 200 + /// + /// + /// `next_page_token` from the previous page. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListAsyncJobsV2AsyncJobsGetAsResponseAsync( + global::System.Collections.Generic.IList? status = default, + int? pageSize = default, + string? pageToken = default, + global::Nixtla.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Nixtla/Generated/Nixtla.INixtlaClient.V2ModelsV2ModelsGet.g.cs b/src/libs/Nixtla/Generated/Nixtla.INixtlaClient.V2ModelsV2ModelsGet.g.cs new file mode 100644 index 0000000..120b304 --- /dev/null +++ b/src/libs/Nixtla/Generated/Nixtla.INixtlaClient.V2ModelsV2ModelsGet.g.cs @@ -0,0 +1,28 @@ +#nullable enable + +namespace Nixtla +{ + public partial interface INixtlaClient + { + /// + /// List Models
+ /// 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. + ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task V2ModelsV2ModelsGetAsync( + global::Nixtla.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Models
+ /// 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. + ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> V2ModelsV2ModelsGetAsResponseAsync( + global::Nixtla.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Nixtla/Generated/Nixtla.JsonConverters.AsyncJobTaskName.g.cs b/src/libs/Nixtla/Generated/Nixtla.JsonConverters.AsyncJobTaskName.g.cs new file mode 100644 index 0000000..c761475 --- /dev/null +++ b/src/libs/Nixtla/Generated/Nixtla.JsonConverters.AsyncJobTaskName.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Nixtla.JsonConverters +{ + /// + public sealed class AsyncJobTaskNameJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + 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; + } + + /// + 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)); + } + } +} diff --git a/src/libs/Nixtla/Generated/Nixtla.JsonConverters.AsyncJobTaskNameNullable.g.cs b/src/libs/Nixtla/Generated/Nixtla.JsonConverters.AsyncJobTaskNameNullable.g.cs new file mode 100644 index 0000000..5eb2c0b --- /dev/null +++ b/src/libs/Nixtla/Generated/Nixtla.JsonConverters.AsyncJobTaskNameNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Nixtla.JsonConverters +{ + /// + public sealed class AsyncJobTaskNameNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + 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; + } + + /// + 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)); + } + } + } +} diff --git a/src/libs/Nixtla/Generated/Nixtla.JsonSerializerContext.g.cs b/src/libs/Nixtla/Generated/Nixtla.JsonSerializerContext.g.cs index 94962c7..81a812d 100644 --- a/src/libs/Nixtla/Generated/Nixtla.JsonSerializerContext.g.cs +++ b/src/libs/Nixtla/Generated/Nixtla.JsonSerializerContext.g.cs @@ -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), @@ -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::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::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")] @@ -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::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")] @@ -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::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary>))] @@ -188,9 +198,12 @@ namespace Nixtla [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List>>))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List>))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List>))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] public sealed partial class SourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext { } diff --git a/src/libs/Nixtla/Generated/Nixtla.JsonSerializerContextTypes.g.cs b/src/libs/Nixtla/Generated/Nixtla.JsonSerializerContextTypes.g.cs index db3576e..bd88852 100644 --- a/src/libs/Nixtla/Generated/Nixtla.JsonSerializerContextTypes.g.cs +++ b/src/libs/Nixtla/Generated/Nixtla.JsonSerializerContextTypes.g.cs @@ -185,123 +185,147 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Nixtla.OnlineAnomalyInput? Type38 { get; set; } + public global::Nixtla.ModelInfo? Type38 { get; set; } /// /// /// - public global::Nixtla.OnlineAnomalyInputThresholdMethod? Type39 { get; set; } + public global::Nixtla.ModelsResponse? Type39 { get; set; } /// /// /// - public global::Nixtla.OnlineAnomalyInputFinetuneLoss? Type40 { get; set; } + public global::System.Collections.Generic.IList? Type40 { get; set; } /// /// /// - public global::Nixtla.OnlineAnomalyOutput? Type41 { get; set; } + public global::Nixtla.OnlineAnomalyInput? Type41 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>>? Type42 { get; set; } + public global::Nixtla.OnlineAnomalyInputThresholdMethod? Type42 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type43 { get; set; } + public global::Nixtla.OnlineAnomalyInputFinetuneLoss? Type43 { get; set; } /// /// /// - public global::Nixtla.AnyOf? Type44 { get; set; } + public global::Nixtla.OnlineAnomalyOutput? Type44 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type45 { get; set; } + public global::System.Collections.Generic.IList>>? Type45 { get; set; } /// /// /// - public global::Nixtla.AnyOf? Type46 { get; set; } + public global::System.Collections.Generic.IList>? Type46 { get; set; } /// /// /// - public global::Nixtla.AnomalyDetectionAsyncRequest? Type47 { get; set; } + public global::Nixtla.AnyOf? Type47 { get; set; } /// /// /// - public global::Nixtla.AnomalyDetectionAsyncRequestThresholdMethod? Type48 { get; set; } + public global::System.Collections.Generic.IList>? Type48 { get; set; } /// /// /// - public global::Nixtla.AnomalyDetectionAsyncRequestFinetuneLoss? Type49 { get; set; } + public global::Nixtla.AnyOf? Type49 { get; set; } /// /// /// - public global::Nixtla.AsyncJobOptions? Type50 { get; set; } + public global::Nixtla.AnomalyDetectionAsyncRequest? Type50 { get; set; } /// /// /// - public global::Nixtla.AsyncJobStatus? Type51 { get; set; } + public global::Nixtla.AnomalyDetectionAsyncRequestThresholdMethod? Type51 { get; set; } /// /// /// - public global::Nixtla.AsyncJobStatusResponse? Type52 { get; set; } + public global::Nixtla.AnomalyDetectionAsyncRequestFinetuneLoss? Type52 { get; set; } /// /// /// - public global::Nixtla.AsyncJobSubmitResponse? Type53 { get; set; } + public global::Nixtla.AsyncJobOptions? Type53 { get; set; } /// /// /// - public global::Nixtla.CrossValidationAsyncRequest? Type54 { get; set; } + public global::Nixtla.AsyncJobStatus? Type54 { get; set; } /// /// /// - public global::Nixtla.CrossValidationAsyncRequestFinetuneLoss? Type55 { get; set; } + public global::Nixtla.AsyncJobStatusResponse? Type55 { get; set; } /// /// /// - public global::Nixtla.CrossValidationAsyncRequestFeatureContributionsType? Type56 { get; set; } + public global::Nixtla.AsyncJobSubmitResponse? Type56 { get; set; } /// /// /// - public global::Nixtla.ExplainAsyncRequest? Type57 { get; set; } + public global::Nixtla.AsyncJobSummary? Type57 { get; set; } /// /// /// - public global::Nixtla.ExplainAsyncRequestMethod? Type58 { get; set; } + public global::Nixtla.AsyncJobTaskName? Type58 { get; set; } /// /// /// - public global::Nixtla.FinetuneAsyncRequest? Type59 { get; set; } + public global::Nixtla.AsyncJobsResponse? Type59 { get; set; } /// /// /// - public global::Nixtla.FinetuneAsyncRequestFinetuneLoss? Type60 { get; set; } + public global::System.Collections.Generic.IList? Type60 { get; set; } /// /// /// - public global::Nixtla.ForecastAsyncRequest? Type61 { get; set; } + public global::Nixtla.CrossValidationAsyncRequest? Type61 { get; set; } /// /// /// - public global::Nixtla.ForecastAsyncRequestFinetuneLoss? Type62 { get; set; } + public global::Nixtla.CrossValidationAsyncRequestFinetuneLoss? Type62 { get; set; } /// /// /// - public global::Nixtla.ForecastAsyncRequestFeatureContributionsType? Type63 { get; set; } + public global::Nixtla.CrossValidationAsyncRequestFeatureContributionsType? Type63 { get; set; } /// /// /// - public global::Nixtla.OpenJobCounts? Type64 { get; set; } + public global::Nixtla.ExplainAsyncRequest? Type64 { get; set; } /// /// /// - public global::Nixtla.SimulateAsyncRequest? Type65 { get; set; } + public global::Nixtla.ExplainAsyncRequestMethod? Type65 { get; set; } /// /// /// - public byte[]? Type66 { get; set; } + public global::Nixtla.FinetuneAsyncRequest? Type66 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type67 { get; set; } + public global::Nixtla.FinetuneAsyncRequestFinetuneLoss? Type67 { get; set; } + /// + /// + /// + public global::Nixtla.ForecastAsyncRequest? Type68 { get; set; } + /// + /// + /// + public global::Nixtla.ForecastAsyncRequestFinetuneLoss? Type69 { get; set; } + /// + /// + /// + public global::Nixtla.ForecastAsyncRequestFeatureContributionsType? Type70 { get; set; } + /// + /// + /// + public global::Nixtla.SimulateAsyncRequest? Type71 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type72 { get; set; } + /// + /// + /// + public byte[]? Type73 { get; set; } /// /// @@ -342,14 +366,26 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List>>? ListType9 { get; set; } + public global::System.Collections.Generic.List? ListType9 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List>>? ListType10 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List>? ListType11 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List>? ListType12 { get; set; } /// /// /// - public global::System.Collections.Generic.List>? ListType10 { get; set; } + public global::System.Collections.Generic.List? ListType13 { get; set; } /// /// /// - public global::System.Collections.Generic.List>? ListType11 { get; set; } + public global::System.Collections.Generic.List? ListType14 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Nixtla/Generated/Nixtla.Models.GetAsyncJobsStatusV2AsyncJobsStatusGetResponse.Json.g.cs b/src/libs/Nixtla/Generated/Nixtla.Models.AsyncJobSummary.Json.g.cs similarity index 84% rename from src/libs/Nixtla/Generated/Nixtla.Models.GetAsyncJobsStatusV2AsyncJobsStatusGetResponse.Json.g.cs rename to src/libs/Nixtla/Generated/Nixtla.Models.AsyncJobSummary.Json.g.cs index 13525e5..5b78321 100644 --- a/src/libs/Nixtla/Generated/Nixtla.Models.GetAsyncJobsStatusV2AsyncJobsStatusGetResponse.Json.g.cs +++ b/src/libs/Nixtla/Generated/Nixtla.Models.AsyncJobSummary.Json.g.cs @@ -2,7 +2,7 @@ namespace Nixtla { - public sealed partial class GetAsyncJobsStatusV2AsyncJobsStatusGetResponse + public sealed partial class AsyncJobSummary { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Nixtla.GetAsyncJobsStatusV2AsyncJobsStatusGetResponse? FromJson( + public static global::Nixtla.AsyncJobSummary? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Nixtla.GetAsyncJobsStatusV2AsyncJobsStatusGetResponse), - jsonSerializerContext) as global::Nixtla.GetAsyncJobsStatusV2AsyncJobsStatusGetResponse; + typeof(global::Nixtla.AsyncJobSummary), + jsonSerializerContext) as global::Nixtla.AsyncJobSummary; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Nixtla.GetAsyncJobsStatusV2AsyncJobsStatusGetResponse? FromJson( + public static global::Nixtla.AsyncJobSummary? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::Nixtla.GetAsyncJobsStatusV2AsyncJobsStatusGetResponse? FromJson( + public static global::Nixtla.AsyncJobSummary? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::Nixtla.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::Nixtla.GetAsyncJobsStatusV2AsyncJobsStatusGetResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Nixtla.GetAsyncJobsStatusV2AsyncJobsStatusGetResponse; + typeof(global::Nixtla.AsyncJobSummary), + jsonSerializerContext).ConfigureAwait(false)) as global::Nixtla.AsyncJobSummary; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::Nixtla.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Nixtla/Generated/Nixtla.Models.AsyncJobSummary.g.cs b/src/libs/Nixtla/Generated/Nixtla.Models.AsyncJobSummary.g.cs new file mode 100644 index 0000000..1491ba2 --- /dev/null +++ b/src/libs/Nixtla/Generated/Nixtla.Models.AsyncJobSummary.g.cs @@ -0,0 +1,85 @@ + +#nullable enable + +namespace Nixtla +{ + /// + /// One job, as the listing endpoint names it.
+ /// A terminal job stays listed only for the orchestrator's retention window, so a row's absence is
+ /// not evidence it never existed. Carries no result — poll the task's status endpoint for that. + ///
+ public sealed partial class AsyncJobSummary + { + /// + /// Identifier for the job, usable on its task's status endpoint and on cancel. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("job_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string JobId { get; set; } + + /// + /// Which async task this job runs; null only if the `job_id` carries no recognised prefix. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("task_name")] + public global::Nixtla.AsyncJobTaskName? TaskName { get; set; } + + /// + /// Lifecycle state; terminal states are succeeded, failed, cancelled. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Nixtla.JsonConverters.AsyncJobStatusJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Nixtla.AsyncJobStatus Status { get; set; } + + /// + /// ISO-8601 timestamp of when the job was accepted. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string CreatedAt { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Identifier for the job, usable on its task's status endpoint and on cancel. + /// + /// + /// Lifecycle state; terminal states are succeeded, failed, cancelled. + /// + /// + /// ISO-8601 timestamp of when the job was accepted. + /// + /// + /// Which async task this job runs; null only if the `job_id` carries no recognised prefix. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AsyncJobSummary( + string jobId, + global::Nixtla.AsyncJobStatus status, + string createdAt, + global::Nixtla.AsyncJobTaskName? taskName) + { + this.JobId = jobId ?? throw new global::System.ArgumentNullException(nameof(jobId)); + this.TaskName = taskName; + this.Status = status; + this.CreatedAt = createdAt ?? throw new global::System.ArgumentNullException(nameof(createdAt)); + } + + /// + /// Initializes a new instance of the class. + /// + public AsyncJobSummary() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Nixtla/Generated/Nixtla.Models.AsyncJobTaskName.g.cs b/src/libs/Nixtla/Generated/Nixtla.Models.AsyncJobTaskName.g.cs new file mode 100644 index 0000000..ef244e6 --- /dev/null +++ b/src/libs/Nixtla/Generated/Nixtla.Models.AsyncJobTaskName.g.cs @@ -0,0 +1,81 @@ + +#nullable enable + +namespace Nixtla +{ + /// + /// + /// + public enum AsyncJobTaskName + { + /// + /// + /// + AnomalyDetection, + /// + /// + /// + CrossValidation, + /// + /// + /// + ExecuteStep, + /// + /// + /// + Explain, + /// + /// + /// + Finetune, + /// + /// + /// + Forecast, + /// + /// + /// + Simulate, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AsyncJobTaskNameExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AsyncJobTaskName value) + { + return value switch + { + AsyncJobTaskName.AnomalyDetection => "anomaly_detection", + AsyncJobTaskName.CrossValidation => "cross_validation", + AsyncJobTaskName.ExecuteStep => "execute_step", + AsyncJobTaskName.Explain => "explain", + AsyncJobTaskName.Finetune => "finetune", + AsyncJobTaskName.Forecast => "forecast", + AsyncJobTaskName.Simulate => "simulate", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AsyncJobTaskName? ToEnum(string value) + { + return value switch + { + "anomaly_detection" => AsyncJobTaskName.AnomalyDetection, + "cross_validation" => AsyncJobTaskName.CrossValidation, + "execute_step" => AsyncJobTaskName.ExecuteStep, + "explain" => AsyncJobTaskName.Explain, + "finetune" => AsyncJobTaskName.Finetune, + "forecast" => AsyncJobTaskName.Forecast, + "simulate" => AsyncJobTaskName.Simulate, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Nixtla/Generated/Nixtla.Models.AsyncJobsResponse.Json.g.cs b/src/libs/Nixtla/Generated/Nixtla.Models.AsyncJobsResponse.Json.g.cs new file mode 100644 index 0000000..7c7b250 --- /dev/null +++ b/src/libs/Nixtla/Generated/Nixtla.Models.AsyncJobsResponse.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Nixtla +{ + public sealed partial class AsyncJobsResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Nixtla.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Nixtla.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Nixtla.AsyncJobsResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Nixtla.AsyncJobsResponse), + jsonSerializerContext) as global::Nixtla.AsyncJobsResponse; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Nixtla.AsyncJobsResponse? FromJson( + string json) + { + return FromJson( + json, + global::Nixtla.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Nixtla.AsyncJobsResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Nixtla.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Nixtla.AsyncJobsResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Nixtla.AsyncJobsResponse; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Nixtla.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Nixtla.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Nixtla/Generated/Nixtla.Models.AsyncJobsResponse.g.cs b/src/libs/Nixtla/Generated/Nixtla.Models.AsyncJobsResponse.g.cs new file mode 100644 index 0000000..884591f --- /dev/null +++ b/src/libs/Nixtla/Generated/Nixtla.Models.AsyncJobsResponse.g.cs @@ -0,0 +1,60 @@ + +#nullable enable + +namespace Nixtla +{ + /// + /// The body of `GET /v2/async/jobs`.
+ /// An object rather than a bare array, matching the rest of the `v2` family, so a new field is not
+ /// a shape change. + ///
+ public sealed partial class AsyncJobsResponse + { + /// + /// One page of the team's jobs, newest first. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("jobs")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Jobs { get; set; } + + /// + /// Cursor for the next page, or null on the last one. Page until this is null, not until a short page — a page can be short, or empty, and still have more behind it. Valid only for the `status` filter it was returned with. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("next_page_token")] + public string? NextPageToken { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// One page of the team's jobs, newest first. + /// + /// + /// Cursor for the next page, or null on the last one. Page until this is null, not until a short page — a page can be short, or empty, and still have more behind it. Valid only for the `status` filter it was returned with. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AsyncJobsResponse( + global::System.Collections.Generic.IList jobs, + string? nextPageToken) + { + this.Jobs = jobs ?? throw new global::System.ArgumentNullException(nameof(jobs)); + this.NextPageToken = nextPageToken; + } + + /// + /// Initializes a new instance of the class. + /// + public AsyncJobsResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Nixtla/Generated/Nixtla.Models.GetAsyncJobsStatusV2AsyncJobsStatusGetResponse.g.cs b/src/libs/Nixtla/Generated/Nixtla.Models.GetAsyncJobsStatusV2AsyncJobsStatusGetResponse.g.cs deleted file mode 100644 index a80dbda..0000000 --- a/src/libs/Nixtla/Generated/Nixtla.Models.GetAsyncJobsStatusV2AsyncJobsStatusGetResponse.g.cs +++ /dev/null @@ -1,19 +0,0 @@ - -#nullable enable - -namespace Nixtla -{ - /// - /// - /// - public sealed partial class GetAsyncJobsStatusV2AsyncJobsStatusGetResponse - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - } -} \ No newline at end of file diff --git a/src/libs/Nixtla/Generated/Nixtla.Models.OpenJobCounts.Json.g.cs b/src/libs/Nixtla/Generated/Nixtla.Models.ModelInfo.Json.g.cs similarity index 89% rename from src/libs/Nixtla/Generated/Nixtla.Models.OpenJobCounts.Json.g.cs rename to src/libs/Nixtla/Generated/Nixtla.Models.ModelInfo.Json.g.cs index 9e3a3e2..327b0d1 100644 --- a/src/libs/Nixtla/Generated/Nixtla.Models.OpenJobCounts.Json.g.cs +++ b/src/libs/Nixtla/Generated/Nixtla.Models.ModelInfo.Json.g.cs @@ -2,7 +2,7 @@ namespace Nixtla { - public sealed partial class OpenJobCounts + public sealed partial class ModelInfo { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Nixtla.OpenJobCounts? FromJson( + public static global::Nixtla.ModelInfo? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Nixtla.OpenJobCounts), - jsonSerializerContext) as global::Nixtla.OpenJobCounts; + typeof(global::Nixtla.ModelInfo), + jsonSerializerContext) as global::Nixtla.ModelInfo; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Nixtla.OpenJobCounts? FromJson( + public static global::Nixtla.ModelInfo? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::Nixtla.OpenJobCounts? FromJson( + public static global::Nixtla.ModelInfo? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::Nixtla.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::Nixtla.OpenJobCounts), - jsonSerializerContext).ConfigureAwait(false)) as global::Nixtla.OpenJobCounts; + typeof(global::Nixtla.ModelInfo), + jsonSerializerContext).ConfigureAwait(false)) as global::Nixtla.ModelInfo; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::Nixtla.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Nixtla/Generated/Nixtla.Models.ModelInfo.g.cs b/src/libs/Nixtla/Generated/Nixtla.Models.ModelInfo.g.cs new file mode 100644 index 0000000..99382b7 --- /dev/null +++ b/src/libs/Nixtla/Generated/Nixtla.Models.ModelInfo.g.cs @@ -0,0 +1,47 @@ + +#nullable enable + +namespace Nixtla +{ + /// + /// A single model in a `GET /v2/models` listing. + /// + public sealed partial class ModelInfo + { + /// + /// Model name to pass as the `model` field of a request body. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Model name to pass as the `model` field of a request body. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ModelInfo( + string name) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + } + + /// + /// Initializes a new instance of the class. + /// + public ModelInfo() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Nixtla/Generated/Nixtla.Models.ModelsResponse.Json.g.cs b/src/libs/Nixtla/Generated/Nixtla.Models.ModelsResponse.Json.g.cs new file mode 100644 index 0000000..15c1484 --- /dev/null +++ b/src/libs/Nixtla/Generated/Nixtla.Models.ModelsResponse.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Nixtla +{ + public sealed partial class ModelsResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Nixtla.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Nixtla.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Nixtla.ModelsResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Nixtla.ModelsResponse), + jsonSerializerContext) as global::Nixtla.ModelsResponse; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Nixtla.ModelsResponse? FromJson( + string json) + { + return FromJson( + json, + global::Nixtla.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Nixtla.ModelsResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Nixtla.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Nixtla.ModelsResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Nixtla.ModelsResponse; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Nixtla.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Nixtla.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Nixtla/Generated/Nixtla.Models.ModelsResponse.g.cs b/src/libs/Nixtla/Generated/Nixtla.Models.ModelsResponse.g.cs new file mode 100644 index 0000000..12e76d1 --- /dev/null +++ b/src/libs/Nixtla/Generated/Nixtla.Models.ModelsResponse.g.cs @@ -0,0 +1,50 @@ + +#nullable enable + +namespace Nixtla +{ + /// + /// The body of `GET /v2/models`, which the gateway and compute apps both serve.
+ /// Which models appear is each endpoint's own business — the gateway scopes the list to the
+ /// caller's entitlements, a compute container lists everything it serves — but the shape is
+ /// declared once here so a client written against one deployment works against the other. + ///
+ public sealed partial class ModelsResponse + { + /// + /// Available models, sorted by name. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("models")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Models { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Available models, sorted by name. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ModelsResponse( + global::System.Collections.Generic.IList models) + { + this.Models = models ?? throw new global::System.ArgumentNullException(nameof(models)); + } + + /// + /// Initializes a new instance of the class. + /// + public ModelsResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Nixtla/Generated/Nixtla.Models.OpenJobCounts.g.cs b/src/libs/Nixtla/Generated/Nixtla.Models.OpenJobCounts.g.cs deleted file mode 100644 index 5523103..0000000 --- a/src/libs/Nixtla/Generated/Nixtla.Models.OpenJobCounts.g.cs +++ /dev/null @@ -1,62 +0,0 @@ - -#nullable enable - -namespace Nixtla -{ - /// - /// How many of one task's jobs are still open.
- /// Only non-terminal states appear: the orchestrator counts open workflows, so a job that has
- /// succeeded, failed or been cancelled leaves these counts entirely rather than moving between
- /// them. Poll the task's status endpoint for a specific job's terminal state. - ///
- public sealed partial class OpenJobCounts - { - /// - /// Accepted but not yet started in a sandbox. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("pending")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int Pending { get; set; } - - /// - /// Currently executing in a sandbox. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("running")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int Running { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// Accepted but not yet started in a sandbox. - /// - /// - /// Currently executing in a sandbox. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public OpenJobCounts( - int pending, - int running) - { - this.Pending = pending; - this.Running = running; - } - - /// - /// Initializes a new instance of the class. - /// - public OpenJobCounts() - { - } - - } -} \ No newline at end of file diff --git a/src/libs/Nixtla/Generated/Nixtla.AsyncJobsClient.GetAsyncJobsStatusV2AsyncJobsStatusGet.g.cs b/src/libs/Nixtla/Generated/Nixtla.NixtlaClient.V2ModelsV2ModelsGet.g.cs similarity index 81% rename from src/libs/Nixtla/Generated/Nixtla.AsyncJobsClient.GetAsyncJobsStatusV2AsyncJobsStatusGet.g.cs rename to src/libs/Nixtla/Generated/Nixtla.NixtlaClient.V2ModelsV2ModelsGet.g.cs index dcea3ff..94d21dc 100644 --- a/src/libs/Nixtla/Generated/Nixtla.AsyncJobsClient.GetAsyncJobsStatusV2AsyncJobsStatusGet.g.cs +++ b/src/libs/Nixtla/Generated/Nixtla.NixtlaClient.V2ModelsV2ModelsGet.g.cs @@ -3,11 +3,11 @@ namespace Nixtla { - public partial class AsyncJobsClient + public partial class NixtlaClient { - private static readonly global::Nixtla.EndPointSecurityRequirement s_GetAsyncJobsStatusV2AsyncJobsStatusGetSecurityRequirement0 = + private static readonly global::Nixtla.EndPointSecurityRequirement s_V2ModelsV2ModelsGetSecurityRequirement0 = new global::Nixtla.EndPointSecurityRequirement { Authorizations = new global::Nixtla.EndPointAuthorizationRequirement[] @@ -21,36 +21,36 @@ public partial class AsyncJobsClient }, }, }; - private static readonly global::Nixtla.EndPointSecurityRequirement[] s_GetAsyncJobsStatusV2AsyncJobsStatusGetSecurityRequirements = + private static readonly global::Nixtla.EndPointSecurityRequirement[] s_V2ModelsV2ModelsGetSecurityRequirements = new global::Nixtla.EndPointSecurityRequirement[] - { s_GetAsyncJobsStatusV2AsyncJobsStatusGetSecurityRequirement0, + { s_V2ModelsV2ModelsGetSecurityRequirement0, }; - partial void PrepareGetAsyncJobsStatusV2AsyncJobsStatusGetArguments( + partial void PrepareV2ModelsV2ModelsGetArguments( global::System.Net.Http.HttpClient httpClient); - partial void PrepareGetAsyncJobsStatusV2AsyncJobsStatusGetRequest( + partial void PrepareV2ModelsV2ModelsGetRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage); - partial void ProcessGetAsyncJobsStatusV2AsyncJobsStatusGetResponse( + partial void ProcessV2ModelsV2ModelsGetResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); - partial void ProcessGetAsyncJobsStatusV2AsyncJobsStatusGetResponseContent( + partial void ProcessV2ModelsV2ModelsGetResponseContent( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage, ref string content); /// - /// Count your team's open async jobs
- /// Returns your team's open job counts as `{task: {pending, running}}`, with an entry for every async task even when it has no jobs. Only these two states are reported — a succeeded, failed or cancelled job leaves the counts rather than moving between them, so poll a task's status endpoint to see a terminal state. Counts are approximate: they are read from the orchestrator and cached briefly. + /// List Models
+ /// 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. ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task> GetAsyncJobsStatusV2AsyncJobsStatusGetAsync( + public async global::System.Threading.Tasks.Task V2ModelsV2ModelsGetAsync( global::Nixtla.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { - var __response = await GetAsyncJobsStatusV2AsyncJobsStatusGetAsResponseAsync( + var __response = await V2ModelsV2ModelsGetAsResponseAsync( requestOptions: requestOptions, cancellationToken: cancellationToken ).ConfigureAwait(false); @@ -58,26 +58,26 @@ partial void ProcessGetAsyncJobsStatusV2AsyncJobsStatusGetResponseContent( return __response.Body; } /// - /// Count your team's open async jobs
- /// Returns your team's open job counts as `{task: {pending, running}}`, with an entry for every async task even when it has no jobs. Only these two states are reported — a succeeded, failed or cancelled job leaves the counts rather than moving between them, so poll a task's status endpoint to see a terminal state. Counts are approximate: they are read from the orchestrator and cached briefly. + /// List Models
+ /// 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. ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task>> GetAsyncJobsStatusV2AsyncJobsStatusGetAsResponseAsync( + public async global::System.Threading.Tasks.Task> V2ModelsV2ModelsGetAsResponseAsync( global::Nixtla.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); - PrepareGetAsyncJobsStatusV2AsyncJobsStatusGetArguments( + PrepareV2ModelsV2ModelsGetArguments( httpClient: HttpClient); var __authorizations = global::Nixtla.EndPointSecurityResolver.ResolveAuthorizations( availableAuthorizations: Authorizations, - securityRequirements: s_GetAsyncJobsStatusV2AsyncJobsStatusGetSecurityRequirements, - operationName: "GetAsyncJobsStatusV2AsyncJobsStatusGetAsync"); + securityRequirements: s_V2ModelsV2ModelsGetSecurityRequirements, + operationName: "V2ModelsV2ModelsGetAsync"); using var __timeoutCancellationTokenSource = global::Nixtla.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( clientOptions: Options, @@ -97,7 +97,7 @@ partial void ProcessGetAsyncJobsStatusV2AsyncJobsStatusGetResponseContent( { var __pathBuilder = new global::Nixtla.PathBuilder( - path: "/v2/async/jobs/status", + path: "/v2/models", baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); __path = global::Nixtla.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -136,7 +136,7 @@ partial void ProcessGetAsyncJobsStatusV2AsyncJobsStatusGetResponseContent( PrepareRequest( client: HttpClient, request: __httpRequest); - PrepareGetAsyncJobsStatusV2AsyncJobsStatusGetRequest( + PrepareV2ModelsV2ModelsGetRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest); @@ -155,9 +155,9 @@ partial void ProcessGetAsyncJobsStatusV2AsyncJobsStatusGetResponseContent( await global::Nixtla.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( clientOptions: Options, context: global::Nixtla.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetAsyncJobsStatusV2AsyncJobsStatusGet", - methodName: "GetAsyncJobsStatusV2AsyncJobsStatusGetAsync", - pathTemplate: "\"/v2/async/jobs/status\"", + operationId: "V2ModelsV2ModelsGet", + methodName: "V2ModelsV2ModelsGetAsync", + pathTemplate: "\"/v2/models\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -189,9 +189,9 @@ partial void ProcessGetAsyncJobsStatusV2AsyncJobsStatusGetResponseContent( await global::Nixtla.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Nixtla.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetAsyncJobsStatusV2AsyncJobsStatusGet", - methodName: "GetAsyncJobsStatusV2AsyncJobsStatusGetAsync", - pathTemplate: "\"/v2/async/jobs/status\"", + operationId: "V2ModelsV2ModelsGet", + methodName: "V2ModelsV2ModelsGetAsync", + pathTemplate: "\"/v2/models\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -230,9 +230,9 @@ partial void ProcessGetAsyncJobsStatusV2AsyncJobsStatusGetResponseContent( await global::Nixtla.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Nixtla.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetAsyncJobsStatusV2AsyncJobsStatusGet", - methodName: "GetAsyncJobsStatusV2AsyncJobsStatusGetAsync", - pathTemplate: "\"/v2/async/jobs/status\"", + operationId: "V2ModelsV2ModelsGet", + methodName: "V2ModelsV2ModelsGetAsync", + pathTemplate: "\"/v2/models\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -270,7 +270,7 @@ partial void ProcessGetAsyncJobsStatusV2AsyncJobsStatusGetResponseContent( ProcessResponse( client: HttpClient, response: __response); - ProcessGetAsyncJobsStatusV2AsyncJobsStatusGetResponse( + ProcessV2ModelsV2ModelsGetResponse( httpClient: HttpClient, httpResponseMessage: __response); if (__response.IsSuccessStatusCode) @@ -278,9 +278,9 @@ partial void ProcessGetAsyncJobsStatusV2AsyncJobsStatusGetResponseContent( await global::Nixtla.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( clientOptions: Options, context: global::Nixtla.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetAsyncJobsStatusV2AsyncJobsStatusGet", - methodName: "GetAsyncJobsStatusV2AsyncJobsStatusGetAsync", - pathTemplate: "\"/v2/async/jobs/status\"", + operationId: "V2ModelsV2ModelsGet", + methodName: "V2ModelsV2ModelsGetAsync", + pathTemplate: "\"/v2/models\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -300,9 +300,9 @@ partial void ProcessGetAsyncJobsStatusV2AsyncJobsStatusGetResponseContent( await global::Nixtla.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Nixtla.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "GetAsyncJobsStatusV2AsyncJobsStatusGet", - methodName: "GetAsyncJobsStatusV2AsyncJobsStatusGetAsync", - pathTemplate: "\"/v2/async/jobs/status\"", + operationId: "V2ModelsV2ModelsGet", + methodName: "V2ModelsV2ModelsGetAsync", + pathTemplate: "\"/v2/models\"", httpMethod: "GET", baseUri: BaseUri, request: __httpRequest!, @@ -330,7 +330,7 @@ partial void ProcessGetAsyncJobsStatusV2AsyncJobsStatusGetResponseContent( client: HttpClient, response: __response, content: ref __content); - ProcessGetAsyncJobsStatusV2AsyncJobsStatusGetResponseContent( + ProcessV2ModelsV2ModelsGetResponseContent( httpClient: HttpClient, httpResponseMessage: __response, content: ref __content); @@ -339,9 +339,9 @@ partial void ProcessGetAsyncJobsStatusV2AsyncJobsStatusGetResponseContent( { __response.EnsureSuccessStatusCode(); - var __value = (global::System.Collections.Generic.Dictionary?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.Dictionary), JsonSerializerContext) ?? + var __value = global::Nixtla.ModelsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - return new global::Nixtla.AutoSDKHttpResponse>( + return new global::Nixtla.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Nixtla.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, @@ -371,9 +371,9 @@ partial void ProcessGetAsyncJobsStatusV2AsyncJobsStatusGetResponseContent( #endif ).ConfigureAwait(false); - var __value = (global::System.Collections.Generic.Dictionary?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.Dictionary), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Nixtla.ModelsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); - return new global::Nixtla.AutoSDKHttpResponse>( + return new global::Nixtla.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Nixtla.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, diff --git a/src/libs/Nixtla/openapi.json b/src/libs/Nixtla/openapi.json index 7d016c9..7bc3991 100644 --- a/src/libs/Nixtla/openapi.json +++ b/src/libs/Nixtla/openapi.json @@ -3,7 +3,7 @@ "info": { "title": "Nixtla Forecast API", "description": "API for TimeGPT forecast. Just send your data as json and get results. We do the heavy lifting.", - "version": "0.4.2" + "version": "0.4.3" }, "paths": { "/v2/forecast": { @@ -937,6 +937,30 @@ ] } }, + "/v2/models": { + "get": { + "summary": "List Models", + "description": "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.", + "operationId": "v2_models_v2_models_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelsResponse" + } + } + } + } + }, + "security": [ + { + "HTTPBearer": [] + } + ] + } + }, "/v2/finetune/async": { "post": { "tags": [ @@ -2068,35 +2092,97 @@ } } }, - "/v2/async/jobs/status": { + "/v2/async/jobs": { "get": { "tags": [ "async jobs" ], - "summary": "Count your team's open async jobs", - "description": "Returns your team's open job counts as `{task: {pending, running}}`, with an entry for every async task even when it has no jobs. Only these two states are reported — a succeeded, failed or cancelled job leaves the counts rather than moving between them, so poll a task's status endpoint to see a terminal state. Counts are approximate: they are read from the orchestrator and cached briefly.", - "operationId": "get_async_jobs_status_v2_async_jobs_status_get", + "summary": "List your team's async jobs", + "description": "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.", + "operationId": "list_async_jobs_v2_async_jobs_get", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "status", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/AsyncJobStatus" + } + }, + { + "type": "null" + } + ], + "description": "Job statuses to list. Repeatable. Defaults to pending and running.", + "title": "Status" + }, + "description": "Job statuses to list. Repeatable. Defaults to pending and running." + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 200, + "minimum": 1, + "description": "Maximum rows per page.", + "default": 200, + "title": "Page Size" + }, + "description": "Maximum rows per page." + }, + { + "name": "page_token", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "maxLength": 4096 + }, + { + "type": "null" + } + ], + "description": "`next_page_token` from the previous page.", + "title": "Page Token" + }, + "description": "`next_page_token` from the previous page." + } + ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { - "additionalProperties": { - "$ref": "#/components/schemas/OpenJobCounts" - }, - "type": "object", - "title": "Response Get Async Jobs Status V2 Async Jobs Status Get" + "$ref": "#/components/schemas/AsyncJobsResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" } } } } - }, - "security": [ - { - "HTTPBearer": [] - } - ] + } } }, "/v2/async/jobs/{job_id}/cancel": { @@ -3141,6 +3227,42 @@ "type": "object", "title": "HTTPValidationError" }, + "ModelInfo": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "Model name to pass as the `model` field of a request body.", + "examples": [ + "timegpt-1" + ] + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "ModelInfo", + "description": "A single model in a `GET /v2/models` listing." + }, + "ModelsResponse": { + "properties": { + "models": { + "items": { + "$ref": "#/components/schemas/ModelInfo" + }, + "type": "array", + "title": "Models", + "description": "Available models, sorted by name." + } + }, + "type": "object", + "required": [ + "models" + ], + "title": "ModelsResponse", + "description": "The body of `GET /v2/models`, which the gateway and compute apps both serve.\n\nWhich models appear is each endpoint's own business — the gateway scopes the list to the\ncaller's entitlements, a compute container lists everything it serves — but the shape is\ndeclared once here so a client written against one deployment works against the other." + }, "OnlineAnomalyInput": { "properties": { "series": { @@ -3937,6 +4059,90 @@ "title": "AsyncJobSubmitResponse", "description": "The 202 every async submit returns. Shared by all tasks — they differ in request, not reply." }, + "AsyncJobSummary": { + "properties": { + "job_id": { + "type": "string", + "title": "Job Id", + "description": "Identifier for the job, usable on its task's status endpoint and on cancel.", + "examples": [ + "fc-4f2a1c9e8b7d4a6f9c3e1b5d7a9f2c4e" + ] + }, + "task_name": { + "anyOf": [ + { + "$ref": "#/components/schemas/AsyncJobTaskName" + }, + { + "type": "null" + } + ], + "description": "Which async task this job runs; null only if the `job_id` carries no recognised prefix." + }, + "status": { + "$ref": "#/components/schemas/AsyncJobStatus", + "description": "Lifecycle state; terminal states are succeeded, failed, cancelled." + }, + "created_at": { + "type": "string", + "title": "Created At", + "description": "ISO-8601 timestamp of when the job was accepted." + } + }, + "type": "object", + "required": [ + "job_id", + "task_name", + "status", + "created_at" + ], + "title": "AsyncJobSummary", + "description": "One job, as the listing endpoint names it.\n\nA terminal job stays listed only for the orchestrator's retention window, so a row's absence is\nnot evidence it never existed. Carries no result — poll the task's status endpoint for that." + }, + "AsyncJobTaskName": { + "type": "string", + "enum": [ + "finetune", + "forecast", + "cross_validation", + "anomaly_detection", + "simulate", + "explain", + "execute_step" + ], + "title": "AsyncJobTaskName" + }, + "AsyncJobsResponse": { + "properties": { + "jobs": { + "items": { + "$ref": "#/components/schemas/AsyncJobSummary" + }, + "type": "array", + "title": "Jobs", + "description": "One page of the team's jobs, newest first." + }, + "next_page_token": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Page Token", + "description": "Cursor for the next page, or null on the last one. Page until this is null, not until a short page — a page can be short, or empty, and still have more behind it. Valid only for the `status` filter it was returned with." + } + }, + "type": "object", + "required": [ + "jobs" + ], + "title": "AsyncJobsResponse", + "description": "The body of `GET /v2/async/jobs`.\n\nAn object rather than a bare array, matching the rest of the `v2` family, so a new field is not\na shape change." + }, "CrossValidationAsyncRequest": { "properties": { "series": { @@ -4465,27 +4671,6 @@ ], "title": "ForecastAsyncRequest" }, - "OpenJobCounts": { - "properties": { - "pending": { - "type": "integer", - "title": "Pending", - "description": "Accepted but not yet started in a sandbox." - }, - "running": { - "type": "integer", - "title": "Running", - "description": "Currently executing in a sandbox." - } - }, - "type": "object", - "required": [ - "pending", - "running" - ], - "title": "OpenJobCounts", - "description": "How many of one task's jobs are still open.\n\nOnly non-terminal states appear: the orchestrator counts open workflows, so a job that has\nsucceeded, failed or been cancelled leaves these counts entirely rather than moving between\nthem. Poll the task's status endpoint for a specific job's terminal state." - }, "SimulateAsyncRequest": { "properties": { "series": {