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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,10 @@ partial void ProcessAgentsTelephonyXmlResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
mediaType: "application/x-www-form-urlencoded");
var __formValues = new global::System.Collections.Generic.List<global::System.Collections.Generic.KeyValuePair<string, string>>();
var __httpRequestContent = new global::System.Net.Http.FormUrlEncodedContent(__formValues);
__httpRequest.Content = __httpRequestContent;

global::Ultravox.AutoSDKRequestOptionsSupport.ApplyHeaders(
request: __httpRequest,
clientHeaders: Options.Headers,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace Ultravox
{
public partial interface ISchemaClient
{
/// <summary>
/// OpenApi3 schema for this API. Format can be selected via content negotiation.<br/>
/// - YAML: application/vnd.oai.openapi<br/>
/// - JSON: application/vnd.oai.openapi+json
/// </summary>
/// <param name="format"></param>
/// <param name="lang"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Ultravox.ApiException"></exception>
global::System.Threading.Tasks.Task<byte[]> SchemaRetrieveAsBytesAsync(
global::Ultravox.SchemaRetrieveFormat? format = default,
global::Ultravox.SchemaRetrieveLang? lang = default,
global::Ultravox.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// OpenApi3 schema for this API. Format can be selected via content negotiation.<br/>
/// - YAML: application/vnd.oai.openapi<br/>
/// - JSON: application/vnd.oai.openapi+json
/// </summary>
/// <param name="format"></param>
/// <param name="lang"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Ultravox.ApiException"></exception>
global::System.Threading.Tasks.Task<global::System.IO.Stream> SchemaRetrieveAsBytesAsStreamAsync(
global::Ultravox.SchemaRetrieveFormat? format = default,
global::Ultravox.SchemaRetrieveLang? lang = default,
global::Ultravox.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// OpenApi3 schema for this API. Format can be selected via content negotiation.<br/>
/// - YAML: application/vnd.oai.openapi<br/>
/// - JSON: application/vnd.oai.openapi+json
/// </summary>
/// <param name="format"></param>
/// <param name="lang"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Ultravox.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Ultravox.AutoSDKHttpResponse<byte[]>> SchemaRetrieveAsBytesAsResponseAsync(
global::Ultravox.SchemaRetrieveFormat? format = default,
global::Ultravox.SchemaRetrieveLang? lang = default,
global::Ultravox.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public partial interface IToolsClient
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Ultravox.ApiException"></exception>
global::System.Threading.Tasks.Task<string> ToolsTestCreateAsync(
global::System.Threading.Tasks.Task<byte[]> ToolsTestCreateAsync(
global::System.Guid toolId,

global::Ultravox.ToolsTestCreateRequest request,
Expand All @@ -30,7 +30,23 @@ public partial interface IToolsClient
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Ultravox.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Ultravox.AutoSDKHttpResponse<string>> ToolsTestCreateAsResponseAsync(
global::System.Threading.Tasks.Task<global::System.IO.Stream> ToolsTestCreateAsStreamAsync(
global::System.Guid toolId,

global::Ultravox.ToolsTestCreateRequest request,
global::Ultravox.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Test a tool by executing it with the provided parameters.<br/>
/// Every property other than `authTokens` is treated as a value for one of the tool's dynamic parameters, matched by parameter name and sent in whichever location that parameter declares (query, path, header, or body). Properties that don't match a dynamic parameter are ignored. The tool's static and automatic parameters are filled in automatically, so they should not be supplied here.<br/>
/// Only HTTP tools can be tested. Tools requiring an Ultravox call token are rejected, since no call exists to issue one against.
/// </summary>
/// <param name="toolId"></param>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Ultravox.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Ultravox.AutoSDKHttpResponse<byte[]>> ToolsTestCreateAsResponseAsync(
global::System.Guid toolId,

global::Ultravox.ToolsTestCreateRequest request,
Expand All @@ -49,7 +65,7 @@ public partial interface IToolsClient
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<string> ToolsTestCreateAsync(
global::System.Threading.Tasks.Task<byte[]> ToolsTestCreateAsync(
global::System.Guid toolId,
global::System.Collections.Generic.Dictionary<string, string>? authTokens = default,
global::Ultravox.AutoSDKRequestOptions? requestOptions = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ partial void ProcessSchemaRetrieveResponseContent(
__httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
#endif

__httpRequest.Headers.TryAddWithoutValidation(
"Accept",
"application/vnd.oai.openapi+json");

foreach (var __authorization in __authorizations)
{
if (__authorization.Type == "Http" ||
Expand Down
Loading