From c3e8e0f4f09b489ab18b3a54b6a156ee8a14fd58 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 4 Sep 2025 00:54:39 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...ox.AgentsClient.AgentsRevisionsCreate.g.cs | 199 +++++++++++++ ...avox.AgentsClient.AgentsRevisionsList.g.cs | 176 ++++++++++++ ...tsClient.AgentsRevisionsPublishCreate.g.cs | 167 +++++++++++ ....AgentsClient.AgentsRevisionsRetrieve.g.cs | 167 +++++++++++ ...x.IAgentsClient.AgentsRevisionsCreate.g.cs | 33 +++ ...vox.IAgentsClient.AgentsRevisionsList.g.cs | 21 ++ ...tsClient.AgentsRevisionsPublishCreate.g.cs | 20 ++ ...IAgentsClient.AgentsRevisionsRetrieve.g.cs | 20 ++ .../Ultravox.JsonSerializerContextTypes.g.cs | 264 +++++++++--------- .../Generated/Ultravox.Models.Agent.g.cs | 11 + .../Ultravox.Models.AgentRevision.Json.g.cs | 92 ++++++ .../Ultravox.Models.AgentRevision.g.cs | 82 ++++++ ...odels.PaginatedAgentRevisionList.Json.g.cs | 92 ++++++ ...vox.Models.PaginatedAgentRevisionList.g.cs | 80 ++++++ .../Ultravox.Models.PatchedAgent.g.cs | 11 + src/libs/Ultravox/openapi.yaml | 169 +++++++++++ 16 files changed, 1478 insertions(+), 126 deletions(-) create mode 100644 src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsRevisionsCreate.g.cs create mode 100644 src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsRevisionsList.g.cs create mode 100644 src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsRevisionsPublishCreate.g.cs create mode 100644 src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsRevisionsRetrieve.g.cs create mode 100644 src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsRevisionsCreate.g.cs create mode 100644 src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsRevisionsList.g.cs create mode 100644 src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsRevisionsPublishCreate.g.cs create mode 100644 src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsRevisionsRetrieve.g.cs create mode 100644 src/libs/Ultravox/Generated/Ultravox.Models.AgentRevision.Json.g.cs create mode 100644 src/libs/Ultravox/Generated/Ultravox.Models.AgentRevision.g.cs create mode 100644 src/libs/Ultravox/Generated/Ultravox.Models.PaginatedAgentRevisionList.Json.g.cs create mode 100644 src/libs/Ultravox/Generated/Ultravox.Models.PaginatedAgentRevisionList.g.cs diff --git a/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsRevisionsCreate.g.cs b/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsRevisionsCreate.g.cs new file mode 100644 index 0000000..5152930 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsRevisionsCreate.g.cs @@ -0,0 +1,199 @@ + +#nullable enable + +namespace Ultravox +{ + public partial class AgentsClient + { + partial void PrepareAgentsRevisionsCreateArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid agentId, + global::Ultravox.AgentRevision request); + partial void PrepareAgentsRevisionsCreateRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid agentId, + global::Ultravox.AgentRevision request); + partial void ProcessAgentsRevisionsCreateResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessAgentsRevisionsCreateResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AgentsRevisionsCreateAsync( + global::System.Guid agentId, + global::Ultravox.AgentRevision request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareAgentsRevisionsCreateArguments( + httpClient: HttpClient, + agentId: ref agentId, + request: request); + + var __pathBuilder = new global::Ultravox.PathBuilder( + path: $"/api/agents/{agentId}/revisions", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + 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") + { + __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); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareAgentsRevisionsCreateRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + agentId: agentId, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessAgentsRevisionsCreateResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessAgentsRevisionsCreateResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Ultravox.AgentRevision.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Ultravox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + 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 + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::Ultravox.AgentRevision.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::Ultravox.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// + /// + /// + /// + /// A CallTemplate that can be used to create Ultravox calls with shared properties. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AgentsRevisionsCreateAsync( + global::System.Guid agentId, + global::Ultravox.UltravoxV1CallTemplate callTemplate, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Ultravox.AgentRevision + { + CallTemplate = callTemplate, + }; + + return await AgentsRevisionsCreateAsync( + agentId: agentId, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsRevisionsList.g.cs b/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsRevisionsList.g.cs new file mode 100644 index 0000000..37d060a --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsRevisionsList.g.cs @@ -0,0 +1,176 @@ + +#nullable enable + +namespace Ultravox +{ + public partial class AgentsClient + { + partial void PrepareAgentsRevisionsListArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid agentId, + ref string? cursor, + ref int? pageSize); + partial void PrepareAgentsRevisionsListRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid agentId, + string? cursor, + int? pageSize); + partial void ProcessAgentsRevisionsListResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessAgentsRevisionsListResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AgentsRevisionsListAsync( + global::System.Guid agentId, + string? cursor = default, + int? pageSize = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareAgentsRevisionsListArguments( + httpClient: HttpClient, + agentId: ref agentId, + cursor: ref cursor, + pageSize: ref pageSize); + + var __pathBuilder = new global::Ultravox.PathBuilder( + path: $"/api/agents/{agentId}/revisions", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("cursor", cursor) + .AddOptionalParameter("pageSize", pageSize?.ToString()) + ; + var __path = __pathBuilder.ToString(); + using 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") + { + __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); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareAgentsRevisionsListRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + agentId: agentId, + cursor: cursor, + pageSize: pageSize); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessAgentsRevisionsListResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessAgentsRevisionsListResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Ultravox.PaginatedAgentRevisionList.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Ultravox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + 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 + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::Ultravox.PaginatedAgentRevisionList.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::Ultravox.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsRevisionsPublishCreate.g.cs b/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsRevisionsPublishCreate.g.cs new file mode 100644 index 0000000..1f8c3b2 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsRevisionsPublishCreate.g.cs @@ -0,0 +1,167 @@ + +#nullable enable + +namespace Ultravox +{ + public partial class AgentsClient + { + partial void PrepareAgentsRevisionsPublishCreateArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid agentId, + ref global::System.Guid revisionId); + partial void PrepareAgentsRevisionsPublishCreateRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid agentId, + global::System.Guid revisionId); + partial void ProcessAgentsRevisionsPublishCreateResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessAgentsRevisionsPublishCreateResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Publish an agent revision.
+ /// Sets a specific agent revision as the published version, which will be used for all subsequent calls to this agent. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AgentsRevisionsPublishCreateAsync( + global::System.Guid agentId, + global::System.Guid revisionId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareAgentsRevisionsPublishCreateArguments( + httpClient: HttpClient, + agentId: ref agentId, + revisionId: ref revisionId); + + var __pathBuilder = new global::Ultravox.PathBuilder( + path: $"/api/agents/{agentId}/revisions/{revisionId}/publish", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + 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") + { + __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); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareAgentsRevisionsPublishCreateRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + agentId: agentId, + revisionId: revisionId); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessAgentsRevisionsPublishCreateResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessAgentsRevisionsPublishCreateResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Ultravox.Agent.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Ultravox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + 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 + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::Ultravox.Agent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::Ultravox.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsRevisionsRetrieve.g.cs b/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsRevisionsRetrieve.g.cs new file mode 100644 index 0000000..32b0f32 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.AgentsClient.AgentsRevisionsRetrieve.g.cs @@ -0,0 +1,167 @@ + +#nullable enable + +namespace Ultravox +{ + public partial class AgentsClient + { + partial void PrepareAgentsRevisionsRetrieveArguments( + global::System.Net.Http.HttpClient httpClient, + ref global::System.Guid agentId, + ref global::System.Guid revisionId); + partial void PrepareAgentsRevisionsRetrieveRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::System.Guid agentId, + global::System.Guid revisionId); + partial void ProcessAgentsRevisionsRetrieveResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessAgentsRevisionsRetrieveResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get agent revision details.
+ /// Retrieve detailed information about a specific agent revision. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AgentsRevisionsRetrieveAsync( + global::System.Guid agentId, + global::System.Guid revisionId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareAgentsRevisionsRetrieveArguments( + httpClient: HttpClient, + agentId: ref agentId, + revisionId: ref revisionId); + + var __pathBuilder = new global::Ultravox.PathBuilder( + path: $"/api/agents/{agentId}/revisions/{revisionId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using 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") + { + __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); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareAgentsRevisionsRetrieveRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + agentId: agentId, + revisionId: revisionId); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessAgentsRevisionsRetrieveResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessAgentsRevisionsRetrieveResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Ultravox.AgentRevision.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Ultravox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + 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 + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::Ultravox.AgentRevision.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::Ultravox.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsRevisionsCreate.g.cs b/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsRevisionsCreate.g.cs new file mode 100644 index 0000000..8fe47b8 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsRevisionsCreate.g.cs @@ -0,0 +1,33 @@ +#nullable enable + +namespace Ultravox +{ + public partial interface IAgentsClient + { + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AgentsRevisionsCreateAsync( + global::System.Guid agentId, + global::Ultravox.AgentRevision request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// + /// + /// + /// + /// A CallTemplate that can be used to create Ultravox calls with shared properties. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AgentsRevisionsCreateAsync( + global::System.Guid agentId, + global::Ultravox.UltravoxV1CallTemplate callTemplate, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsRevisionsList.g.cs b/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsRevisionsList.g.cs new file mode 100644 index 0000000..f6ebf82 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsRevisionsList.g.cs @@ -0,0 +1,21 @@ +#nullable enable + +namespace Ultravox +{ + public partial interface IAgentsClient + { + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AgentsRevisionsListAsync( + global::System.Guid agentId, + string? cursor = default, + int? pageSize = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsRevisionsPublishCreate.g.cs b/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsRevisionsPublishCreate.g.cs new file mode 100644 index 0000000..78bd6d2 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsRevisionsPublishCreate.g.cs @@ -0,0 +1,20 @@ +#nullable enable + +namespace Ultravox +{ + public partial interface IAgentsClient + { + /// + /// Publish an agent revision.
+ /// Sets a specific agent revision as the published version, which will be used for all subsequent calls to this agent. + ///
+ /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AgentsRevisionsPublishCreateAsync( + global::System.Guid agentId, + global::System.Guid revisionId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsRevisionsRetrieve.g.cs b/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsRevisionsRetrieve.g.cs new file mode 100644 index 0000000..7e54962 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.IAgentsClient.AgentsRevisionsRetrieve.g.cs @@ -0,0 +1,20 @@ +#nullable enable + +namespace Ultravox +{ + public partial interface IAgentsClient + { + /// + /// Get agent revision details.
+ /// Retrieve detailed information about a specific agent revision. + ///
+ /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AgentsRevisionsRetrieveAsync( + global::System.Guid agentId, + global::System.Guid revisionId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.JsonSerializerContextTypes.g.cs b/src/libs/Ultravox/Generated/Ultravox.JsonSerializerContextTypes.g.cs index a082992..95d957f 100644 --- a/src/libs/Ultravox/Generated/Ultravox.JsonSerializerContextTypes.g.cs +++ b/src/libs/Ultravox/Generated/Ultravox.JsonSerializerContextTypes.g.cs @@ -286,506 +286,518 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Ultravox.BillingReasonEnum? Type65 { get; set; } + public global::Ultravox.AgentRevision? Type65 { get; set; } /// /// /// - public global::Ultravox.BillingStyleEnum? Type66 { get; set; } + public global::Ultravox.BillingReasonEnum? Type66 { get; set; } /// /// /// - public global::Ultravox.BillingUsageDay? Type67 { get; set; } + public global::Ultravox.BillingStyleEnum? Type67 { get; set; } /// /// /// - public double? Type68 { get; set; } + public global::Ultravox.BillingUsageDay? Type68 { get; set; } /// /// /// - public global::Ultravox.Call? Type69 { get; set; } + public double? Type69 { get; set; } /// /// /// - public global::Ultravox.OneOf? Type70 { get; set; } + public global::Ultravox.Call? Type70 { get; set; } /// /// /// - public global::Ultravox.EndReasonEnum? Type71 { get; set; } + public global::Ultravox.OneOf? Type71 { get; set; } /// /// /// - public global::Ultravox.NullEnum? Type72 { get; set; } + public global::Ultravox.EndReasonEnum? Type72 { get; set; } /// /// /// - public global::Ultravox.FirstSpeakerEnum? Type73 { get; set; } + public global::Ultravox.NullEnum? Type73 { get; set; } /// /// /// - public global::Ultravox.InitialOutputMediumEnum? Type74 { get; set; } + public global::Ultravox.FirstSpeakerEnum? Type74 { get; set; } /// /// /// - public global::Ultravox.CallEvent? Type75 { get; set; } + public global::Ultravox.InitialOutputMediumEnum? Type75 { get; set; } /// /// /// - public global::Ultravox.SeverityEnum? Type76 { get; set; } + public global::Ultravox.CallEvent? Type76 { get; set; } /// /// /// - public global::Ultravox.CallStage? Type77 { get; set; } + public global::Ultravox.SeverityEnum? Type77 { get; set; } /// /// /// - public global::Ultravox.CallStatistics? Type78 { get; set; } + public global::Ultravox.CallStage? Type78 { get; set; } /// /// /// - public global::Ultravox.CallTombstone? Type79 { get; set; } + public global::Ultravox.CallStatistics? Type79 { get; set; } /// /// /// - public global::Ultravox.CallTool? Type80 { get; set; } + public global::Ultravox.CallTombstone? Type80 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CallTool? Type81 { get; set; } + public global::Ultravox.CallTool? Type81 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1HttpCallToolDetails? Type82 { get; set; } + public global::Ultravox.UltravoxV1CallTool? Type82 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CallToolDefaultReaction? Type83 { get; set; } + public global::Ultravox.UltravoxV1HttpCallToolDetails? Type83 { get; set; } /// /// /// - public global::Ultravox.CallUsage? Type84 { get; set; } + public global::Ultravox.UltravoxV1CallToolDefaultReaction? Type84 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type85 { get; set; } + public global::Ultravox.CallUsage? Type85 { get; set; } /// /// /// - public global::Ultravox.DailyCallStatistics? Type86 { get; set; } + public global::System.Collections.Generic.IList? Type86 { get; set; } /// /// /// - public global::Ultravox.CorpusUploadsRequest? Type87 { get; set; } + public global::Ultravox.DailyCallStatistics? Type87 { get; set; } /// /// /// - public global::Ultravox.CorpusUploadsResponse? Type88 { get; set; } + public global::Ultravox.CorpusUploadsRequest? Type88 { get; set; } /// /// /// - public global::Ultravox.EventsEnum? Type89 { get; set; } + public global::Ultravox.CorpusUploadsResponse? Type89 { get; set; } /// /// /// - public global::Ultravox.Invoice? Type90 { get; set; } + public global::Ultravox.EventsEnum? Type90 { get; set; } /// /// /// - public global::Ultravox.InvoiceStatusEnum? Type91 { get; set; } + public global::Ultravox.Invoice? Type91 { get; set; } /// /// /// - public global::Ultravox.ModelAlias? Type92 { get; set; } + public global::Ultravox.InvoiceStatusEnum? Type92 { get; set; } /// /// /// - public global::Ultravox.OwnershipEnum? Type93 { get; set; } + public global::Ultravox.ModelAlias? Type93 { get; set; } /// /// /// - public global::Ultravox.PaginatedAPIKeyList? Type94 { get; set; } + public global::Ultravox.OwnershipEnum? Type94 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type95 { get; set; } + public global::Ultravox.PaginatedAPIKeyList? Type95 { get; set; } /// /// /// - public global::Ultravox.PaginatedAgentList? Type96 { get; set; } + public global::System.Collections.Generic.IList? Type96 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type97 { get; set; } + public global::Ultravox.PaginatedAgentList? Type97 { get; set; } /// /// /// - public global::Ultravox.PaginatedCallEventList? Type98 { get; set; } + public global::System.Collections.Generic.IList? Type98 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type99 { get; set; } + public global::Ultravox.PaginatedAgentRevisionList? Type99 { get; set; } /// /// /// - public global::Ultravox.PaginatedCallList? Type100 { get; set; } + public global::System.Collections.Generic.IList? Type100 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type101 { get; set; } + public global::Ultravox.PaginatedCallEventList? Type101 { get; set; } /// /// /// - public global::Ultravox.PaginatedCallStageList? Type102 { get; set; } + public global::System.Collections.Generic.IList? Type102 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type103 { get; set; } + public global::Ultravox.PaginatedCallList? Type103 { get; set; } /// /// /// - public global::Ultravox.PaginatedCallTombstoneList? Type104 { get; set; } + public global::System.Collections.Generic.IList? Type104 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type105 { get; set; } + public global::Ultravox.PaginatedCallStageList? Type105 { get; set; } /// /// /// - public global::Ultravox.PaginatedInvoiceList? Type106 { get; set; } + public global::System.Collections.Generic.IList? Type106 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type107 { get; set; } + public global::Ultravox.PaginatedCallTombstoneList? Type107 { get; set; } /// /// /// - public global::Ultravox.PaginatedModelAliasList? Type108 { get; set; } + public global::System.Collections.Generic.IList? Type108 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type109 { get; set; } + public global::Ultravox.PaginatedInvoiceList? Type109 { get; set; } /// /// /// - public global::Ultravox.PaginatedScheduledCallBatchList? Type110 { get; set; } + public global::System.Collections.Generic.IList? Type110 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type111 { get; set; } + public global::Ultravox.PaginatedModelAliasList? Type111 { get; set; } /// /// /// - public global::Ultravox.ScheduledCallBatch? Type112 { get; set; } + public global::System.Collections.Generic.IList? Type112 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type113 { get; set; } + public global::Ultravox.PaginatedScheduledCallBatchList? Type113 { get; set; } /// /// /// - public global::Ultravox.ScheduledCall? Type114 { get; set; } + public global::System.Collections.Generic.IList? Type114 { get; set; } /// /// /// - public global::Ultravox.ScheduledCallStatusEnum? Type115 { get; set; } + public global::Ultravox.ScheduledCallBatch? Type115 { get; set; } /// /// /// - public global::Ultravox.PaginatedScheduledCallList? Type116 { get; set; } + public global::System.Collections.Generic.IList? Type116 { get; set; } /// /// /// - public global::Ultravox.PaginatedToolHistoryList? Type117 { get; set; } + public global::Ultravox.ScheduledCall? Type117 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type118 { get; set; } + public global::Ultravox.ScheduledCallStatusEnum? Type118 { get; set; } /// /// /// - public global::Ultravox.ToolHistory? Type119 { get; set; } + public global::Ultravox.PaginatedScheduledCallList? Type119 { get; set; } /// /// /// - public global::Ultravox.PaginatedToolList? Type120 { get; set; } + public global::Ultravox.PaginatedToolHistoryList? Type120 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type121 { get; set; } + public global::System.Collections.Generic.IList? Type121 { get; set; } /// /// /// - public global::Ultravox.Tool? Type122 { get; set; } + public global::Ultravox.ToolHistory? Type122 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1QueryApiKeyRequirement? Type123 { get; set; } + public global::Ultravox.PaginatedToolList? Type123 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1HeaderApiKeyRequirement? Type124 { get; set; } + public global::System.Collections.Generic.IList? Type124 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1HttpAuthRequirement? Type125 { get; set; } + public global::Ultravox.Tool? Type125 { get; set; } /// /// /// - public global::Ultravox.PaginatedVoiceList? Type126 { get; set; } + public global::Ultravox.UltravoxV1QueryApiKeyRequirement? Type126 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type127 { get; set; } + public global::Ultravox.UltravoxV1HeaderApiKeyRequirement? Type127 { get; set; } /// /// /// - public global::Ultravox.Voice? Type128 { get; set; } + public global::Ultravox.UltravoxV1HttpAuthRequirement? Type128 { get; set; } /// /// /// - public global::Ultravox.PaginatedWebhookList? Type129 { get; set; } + public global::Ultravox.PaginatedVoiceList? Type129 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type130 { get; set; } + public global::System.Collections.Generic.IList? Type130 { get; set; } /// /// /// - public global::Ultravox.Webhook? Type131 { get; set; } + public global::Ultravox.Voice? Type131 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type132 { get; set; } + public global::Ultravox.PaginatedWebhookList? Type132 { get; set; } /// /// /// - public global::Ultravox.WebhookStatusEnum? Type133 { get; set; } + public global::System.Collections.Generic.IList? Type133 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type134 { get; set; } + public global::Ultravox.Webhook? Type134 { get; set; } /// /// /// - public global::Ultravox.WebhookFailure? Type135 { get; set; } + public global::System.Collections.Generic.IList? Type135 { get; set; } /// /// /// - public global::Ultravox.PaginatedultravoxV1CorpusDocumentList? Type136 { get; set; } + public global::Ultravox.WebhookStatusEnum? Type136 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type137 { get; set; } + public global::System.Collections.Generic.IList? Type137 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CorpusDocument? Type138 { get; set; } + public global::Ultravox.WebhookFailure? Type138 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CorpusDocumentMetadata? Type139 { get; set; } + public global::Ultravox.PaginatedultravoxV1CorpusDocumentList? Type139 { get; set; } /// /// /// - public global::Ultravox.PaginatedultravoxV1CorpusList? Type140 { get; set; } + public global::System.Collections.Generic.IList? Type140 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type141 { get; set; } + public global::Ultravox.UltravoxV1CorpusDocument? Type141 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1Corpus? Type142 { get; set; } + public global::Ultravox.UltravoxV1CorpusDocumentMetadata? Type142 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CorpusStats? Type143 { get; set; } + public global::Ultravox.PaginatedultravoxV1CorpusList? Type143 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CorpusStatsStatus? Type144 { get; set; } + public global::System.Collections.Generic.IList? Type144 { get; set; } /// /// /// - public global::Ultravox.PaginatedultravoxV1CorpusSourceList? Type145 { get; set; } + public global::Ultravox.UltravoxV1Corpus? Type145 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type146 { get; set; } + public global::Ultravox.UltravoxV1CorpusStats? Type146 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CorpusSource? Type147 { get; set; } + public global::Ultravox.UltravoxV1CorpusStatsStatus? Type147 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1SourceStats? Type148 { get; set; } + public global::Ultravox.PaginatedultravoxV1CorpusSourceList? Type148 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1SourceStatsStatus? Type149 { get; set; } + public global::System.Collections.Generic.IList? Type149 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CrawlSpec? Type150 { get; set; } + public global::Ultravox.UltravoxV1CorpusSource? Type150 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1MimeTypeFilter? Type151 { get; set; } + public global::Ultravox.UltravoxV1SourceStats? Type151 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1MimeTypeSet? Type152 { get; set; } + public global::Ultravox.UltravoxV1SourceStatsStatus? Type152 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1UploadSpec? Type153 { get; set; } + public global::Ultravox.UltravoxV1CrawlSpec? Type153 { get; set; } /// /// /// - public global::Ultravox.PaginatedultravoxV1MessageList? Type154 { get; set; } + public global::Ultravox.UltravoxV1MimeTypeFilter? Type154 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type155 { get; set; } + public global::Ultravox.UltravoxV1MimeTypeSet? Type155 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1Message? Type156 { get; set; } + public global::Ultravox.UltravoxV1UploadSpec? Type156 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1MessageRole? Type157 { get; set; } + public global::Ultravox.PaginatedultravoxV1MessageList? Type157 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1MessageMedium? Type158 { get; set; } + public global::System.Collections.Generic.IList? Type158 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1InCallTimespan? Type159 { get; set; } + public global::Ultravox.UltravoxV1Message? Type159 { get; set; } /// /// /// - public global::Ultravox.PatchedAPIKey? Type160 { get; set; } + public global::Ultravox.UltravoxV1MessageRole? Type160 { get; set; } /// /// /// - public global::Ultravox.PatchedAgent? Type161 { get; set; } + public global::Ultravox.UltravoxV1MessageMedium? Type161 { get; set; } /// /// /// - public global::Ultravox.PatchedAgentStatistics? Type162 { get; set; } + public global::Ultravox.UltravoxV1InCallTimespan? Type162 { get; set; } /// /// /// - public global::Ultravox.PatchedScheduledCallBatch? Type163 { get; set; } + public global::Ultravox.PatchedAPIKey? Type163 { get; set; } /// /// /// - public global::Ultravox.PatchedSetTelephonyApiKeysRequest? Type164 { get; set; } + public global::Ultravox.PatchedAgent? Type164 { get; set; } /// /// /// - public global::Ultravox.PatchedSetTtsApiKeysRequest? Type165 { get; set; } + public global::Ultravox.PatchedAgentStatistics? Type165 { get; set; } /// /// /// - public global::Ultravox.PatchedVoice? Type166 { get; set; } + public global::Ultravox.PatchedScheduledCallBatch? Type166 { get; set; } /// /// /// - public global::Ultravox.PatchedWebhook? Type167 { get; set; } + public global::Ultravox.PatchedSetTelephonyApiKeysRequest? Type167 { get; set; } /// /// /// - public global::Ultravox.UsageResponse? Type168 { get; set; } + public global::Ultravox.PatchedSetTtsApiKeysRequest? Type168 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type169 { get; set; } + public global::Ultravox.PatchedVoice? Type169 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CorpusQueryResult? Type170 { get; set; } + public global::Ultravox.PatchedWebhook? Type170 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1CorpusQueryResultCitation? Type171 { get; set; } + public global::Ultravox.UsageResponse? Type171 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1QueryCorpusRequest? Type172 { get; set; } + public global::System.Collections.Generic.IList? Type172 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1StartAgentCallRequest? Type173 { get; set; } + public global::Ultravox.UltravoxV1CorpusQueryResult? Type173 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1StartAgentCallRequestInitialOutputMedium? Type174 { get; set; } + public global::Ultravox.UltravoxV1CorpusQueryResultCitation? Type174 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1StartCallRequest? Type175 { get; set; } + public global::Ultravox.UltravoxV1QueryCorpusRequest? Type175 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1StartCallRequestFirstSpeaker? Type176 { get; set; } + public global::Ultravox.UltravoxV1StartAgentCallRequest? Type176 { get; set; } /// /// /// - public global::Ultravox.UltravoxV1StartCallRequestInitialOutputMedium? Type177 { get; set; } + public global::Ultravox.UltravoxV1StartAgentCallRequestInitialOutputMedium? Type177 { get; set; } /// /// /// - public global::Ultravox.ToolsCreateRequest? Type178 { get; set; } + public global::Ultravox.UltravoxV1StartCallRequest? Type178 { get; set; } /// /// /// - public byte[]? Type179 { get; set; } + public global::Ultravox.UltravoxV1StartCallRequestFirstSpeaker? Type179 { get; set; } /// /// /// - public global::Ultravox.VoicesCreateRequest? Type180 { get; set; } + public global::Ultravox.UltravoxV1StartCallRequestInitialOutputMedium? Type180 { get; set; } /// /// /// - public global::Ultravox.AgentsScheduledBatchesScheduledCallsListStatus? Type181 { get; set; } + public global::Ultravox.ToolsCreateRequest? Type181 { get; set; } /// /// /// - public global::Ultravox.CallsEventsListMinimumSeverity? Type182 { get; set; } + public byte[]? Type182 { get; set; } /// /// /// - public global::Ultravox.CallsMessagesListMode? Type183 { get; set; } + public global::Ultravox.VoicesCreateRequest? Type183 { get; set; } /// /// /// - public global::Ultravox.SchemaRetrieveFormat? Type184 { get; set; } + public global::Ultravox.AgentsScheduledBatchesScheduledCallsListStatus? Type184 { get; set; } /// /// /// - public global::Ultravox.SchemaRetrieveLang? Type185 { get; set; } + public global::Ultravox.CallsEventsListMinimumSeverity? Type185 { get; set; } /// /// /// - public global::Ultravox.VoicesListBillingStyle? Type186 { get; set; } + public global::Ultravox.CallsMessagesListMode? Type186 { get; set; } /// /// /// - public global::Ultravox.VoicesListOwnership? Type187 { get; set; } + public global::Ultravox.SchemaRetrieveFormat? Type187 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type188 { get; set; } + public global::Ultravox.SchemaRetrieveLang? Type188 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type189 { get; set; } + public global::Ultravox.VoicesListBillingStyle? Type189 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type190 { get; set; } + public global::Ultravox.VoicesListOwnership? Type190 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type191 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type192 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type193 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.Models.Agent.g.cs b/src/libs/Ultravox/Generated/Ultravox.Models.Agent.g.cs index c1d7f59..b3b4198 100644 --- a/src/libs/Ultravox/Generated/Ultravox.Models.Agent.g.cs +++ b/src/libs/Ultravox/Generated/Ultravox.Models.Agent.g.cs @@ -15,6 +15,12 @@ public sealed partial class Agent [global::System.Text.Json.Serialization.JsonPropertyName("agentId")] public global::System.Guid AgentId { get; set; } = default!; + /// + /// Included only in responses + /// + [global::System.Text.Json.Serialization.JsonPropertyName("publishedRevisionId")] + public global::System.Guid? PublishedRevisionId { get; set; } + /// /// /// @@ -54,6 +60,9 @@ public sealed partial class Agent /// /// Included only in responses /// + /// + /// Included only in responses + /// /// /// /// Included only in responses @@ -67,6 +76,7 @@ public sealed partial class Agent [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public Agent( + global::System.Guid? publishedRevisionId, string? name, global::Ultravox.UltravoxV1CallTemplate? callTemplate, global::System.Guid agentId = default!, @@ -74,6 +84,7 @@ public Agent( global::Ultravox.AgentStatistics statistics = default!) { this.AgentId = agentId; + this.PublishedRevisionId = publishedRevisionId; this.Name = name; this.Created = created; this.CallTemplate = callTemplate; diff --git a/src/libs/Ultravox/Generated/Ultravox.Models.AgentRevision.Json.g.cs b/src/libs/Ultravox/Generated/Ultravox.Models.AgentRevision.Json.g.cs new file mode 100644 index 0000000..b105542 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.Models.AgentRevision.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Ultravox +{ + public sealed partial class AgentRevision + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Ultravox.AgentRevision? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Ultravox.AgentRevision), + jsonSerializerContext) as global::Ultravox.AgentRevision; + } + + /// + /// 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::Ultravox.AgentRevision? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Ultravox.AgentRevision), + jsonSerializerContext).ConfigureAwait(false)) as global::Ultravox.AgentRevision; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Ultravox/Generated/Ultravox.Models.AgentRevision.g.cs b/src/libs/Ultravox/Generated/Ultravox.Models.AgentRevision.g.cs new file mode 100644 index 0000000..a47846e --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.Models.AgentRevision.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace Ultravox +{ + /// + /// + /// + public sealed partial class AgentRevision + { + /// + /// Included only in responses + /// + /// default! + [global::System.Text.Json.Serialization.JsonPropertyName("revisionId")] + public global::System.Guid RevisionId { get; set; } = default!; + + /// + /// Included only in responses + /// + /// default! + [global::System.Text.Json.Serialization.JsonPropertyName("created")] + public global::System.DateTime Created { get; set; } = default!; + + /// + /// Included only in responses + /// + /// default! + [global::System.Text.Json.Serialization.JsonPropertyName("isPublished")] + public bool IsPublished { get; set; } = default!; + + /// + /// A CallTemplate that can be used to create Ultravox calls with shared properties. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("callTemplate")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Ultravox.UltravoxV1CallTemplate CallTemplate { 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. + /// + /// + /// Included only in responses + /// + /// + /// Included only in responses + /// + /// + /// Included only in responses + /// + /// + /// A CallTemplate that can be used to create Ultravox calls with shared properties. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AgentRevision( + global::Ultravox.UltravoxV1CallTemplate callTemplate, + global::System.Guid revisionId = default!, + global::System.DateTime created = default!, + bool isPublished = default!) + { + this.CallTemplate = callTemplate ?? throw new global::System.ArgumentNullException(nameof(callTemplate)); + this.RevisionId = revisionId; + this.Created = created; + this.IsPublished = isPublished; + } + + /// + /// Initializes a new instance of the class. + /// + public AgentRevision() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.Models.PaginatedAgentRevisionList.Json.g.cs b/src/libs/Ultravox/Generated/Ultravox.Models.PaginatedAgentRevisionList.Json.g.cs new file mode 100644 index 0000000..1836bd3 --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.Models.PaginatedAgentRevisionList.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Ultravox +{ + public sealed partial class PaginatedAgentRevisionList + { + /// + /// 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 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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Ultravox.PaginatedAgentRevisionList? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Ultravox.PaginatedAgentRevisionList), + jsonSerializerContext) as global::Ultravox.PaginatedAgentRevisionList; + } + + /// + /// 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::Ultravox.PaginatedAgentRevisionList? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + 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::Ultravox.PaginatedAgentRevisionList), + jsonSerializerContext).ConfigureAwait(false)) as global::Ultravox.PaginatedAgentRevisionList; + } + + /// + /// 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) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Ultravox/Generated/Ultravox.Models.PaginatedAgentRevisionList.g.cs b/src/libs/Ultravox/Generated/Ultravox.Models.PaginatedAgentRevisionList.g.cs new file mode 100644 index 0000000..691a7ef --- /dev/null +++ b/src/libs/Ultravox/Generated/Ultravox.Models.PaginatedAgentRevisionList.g.cs @@ -0,0 +1,80 @@ + +#nullable enable + +namespace Ultravox +{ + /// + /// + /// + public sealed partial class PaginatedAgentRevisionList + { + /// + /// Example: http://api.example.org/accounts/?cursor=cD00ODY%3D" + /// + /// http://api.example.org/accounts/?cursor=cD00ODY%3D" + [global::System.Text.Json.Serialization.JsonPropertyName("next")] + public string? Next { get; set; } + + /// + /// Example: http://api.example.org/accounts/?cursor=cj0xJnA9NDg3 + /// + /// http://api.example.org/accounts/?cursor=cj0xJnA9NDg3 + [global::System.Text.Json.Serialization.JsonPropertyName("previous")] + public string? Previous { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("results")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Results { get; set; } + + /// + /// Example: 123 + /// + /// 123 + [global::System.Text.Json.Serialization.JsonPropertyName("total")] + public int? Total { 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. + /// + /// + /// Example: http://api.example.org/accounts/?cursor=cD00ODY%3D" + /// + /// + /// Example: http://api.example.org/accounts/?cursor=cj0xJnA9NDg3 + /// + /// + /// + /// Example: 123 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public PaginatedAgentRevisionList( + global::System.Collections.Generic.IList results, + string? next, + string? previous, + int? total) + { + this.Results = results ?? throw new global::System.ArgumentNullException(nameof(results)); + this.Next = next; + this.Previous = previous; + this.Total = total; + } + + /// + /// Initializes a new instance of the class. + /// + public PaginatedAgentRevisionList() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Ultravox/Generated/Ultravox.Models.PatchedAgent.g.cs b/src/libs/Ultravox/Generated/Ultravox.Models.PatchedAgent.g.cs index c19a51c..eeaaaae 100644 --- a/src/libs/Ultravox/Generated/Ultravox.Models.PatchedAgent.g.cs +++ b/src/libs/Ultravox/Generated/Ultravox.Models.PatchedAgent.g.cs @@ -14,6 +14,12 @@ public sealed partial class PatchedAgent [global::System.Text.Json.Serialization.JsonPropertyName("agentId")] public global::System.Guid? AgentId { get; set; } + /// + /// Included only in responses + /// + [global::System.Text.Json.Serialization.JsonPropertyName("publishedRevisionId")] + public global::System.Guid? PublishedRevisionId { get; set; } + /// /// /// @@ -51,6 +57,9 @@ public sealed partial class PatchedAgent /// /// Included only in responses /// + /// + /// Included only in responses + /// /// /// /// Included only in responses @@ -65,12 +74,14 @@ public sealed partial class PatchedAgent #endif public PatchedAgent( global::System.Guid? agentId, + global::System.Guid? publishedRevisionId, string? name, global::System.DateTime? created, global::Ultravox.UltravoxV1CallTemplate? callTemplate, global::Ultravox.PatchedAgentStatistics? statistics) { this.AgentId = agentId; + this.PublishedRevisionId = publishedRevisionId; this.Name = name; this.Created = created; this.CallTemplate = callTemplate; diff --git a/src/libs/Ultravox/openapi.yaml b/src/libs/Ultravox/openapi.yaml index f2a615f..28818f3 100644 --- a/src/libs/Ultravox/openapi.yaml +++ b/src/libs/Ultravox/openapi.yaml @@ -397,6 +397,121 @@ paths: $ref: '#/components/schemas/Call' security: - apiKeyAuth: [ ] + '/api/agents/{agent_id}/revisions': + get: + tags: + - agents + operationId: agents_revisions_list + parameters: + - name: agent_id + in: path + required: true + schema: + type: string + format: uuid + - name: cursor + in: query + description: The pagination cursor value. + schema: + type: string + - name: pageSize + in: query + description: Number of results to return per page. + schema: + type: integer + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/PaginatedAgentRevisionList' + security: + - apiKeyAuth: [ ] + post: + tags: + - agents + operationId: agents_revisions_create + parameters: + - name: agent_id + in: path + required: true + schema: + type: string + format: uuid + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AgentRevision' + required: true + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/AgentRevision' + security: + - apiKeyAuth: [ ] + '/api/agents/{agent_id}/revisions/{revision_id}': + get: + tags: + - agents + summary: Get agent revision details. + description: Retrieve detailed information about a specific agent revision. + operationId: agents_revisions_retrieve + parameters: + - name: agent_id + in: path + required: true + schema: + type: string + format: uuid + - name: revision_id + in: path + required: true + schema: + type: string + format: uuid + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/AgentRevision' + security: + - apiKeyAuth: [ ] + '/api/agents/{agent_id}/revisions/{revision_id}/publish': + post: + tags: + - agents + summary: Publish an agent revision. + description: 'Sets a specific agent revision as the published version, which will be used for all subsequent calls to this agent.' + operationId: agents_revisions_publish_create + parameters: + - name: agent_id + in: path + required: true + schema: + type: string + format: uuid + - name: revision_id + in: path + required: true + schema: + type: string + format: uuid + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/Agent' + security: + - apiKeyAuth: [ ] '/api/agents/{agent_id}/scheduled_batches': get: tags: @@ -2615,6 +2730,7 @@ components: required: - agentId - created + - publishedRevisionId - statistics type: object properties: @@ -2622,6 +2738,11 @@ components: type: string format: uuid readOnly: true + publishedRevisionId: + type: string + format: uuid + nullable: true + readOnly: true name: maxLength: 64 type: string @@ -2640,6 +2761,27 @@ components: type: integer description: Statistics about the agent's usage readOnly: true + AgentRevision: + required: + - callTemplate + - created + - isPublished + - revisionId + type: object + properties: + revisionId: + type: string + format: uuid + readOnly: true + created: + type: string + format: date-time + readOnly: true + isPublished: + type: boolean + readOnly: true + callTemplate: + $ref: '#/components/schemas/ultravox.v1.CallTemplate' BillingReasonEnum: enum: - manual @@ -3206,6 +3348,28 @@ components: total: type: integer example: 123 + PaginatedAgentRevisionList: + required: + - results + type: object + properties: + next: + type: string + format: uri + nullable: true + example: http://api.example.org/accounts/?cursor=cD00ODY%3D" + previous: + type: string + format: uri + nullable: true + example: http://api.example.org/accounts/?cursor=cj0xJnA9NDg3 + results: + type: array + items: + $ref: '#/components/schemas/AgentRevision' + total: + type: integer + example: 123 PaginatedCallEventList: required: - results @@ -3592,6 +3756,11 @@ components: type: string format: uuid readOnly: true + publishedRevisionId: + type: string + format: uuid + nullable: true + readOnly: true name: maxLength: 64 type: string