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 @@ -5,25 +5,53 @@ namespace Ultravox
public partial interface IToolsClient
{
/// <summary>
/// Test a tool by executing it with the provided parameters.
/// 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<string> ToolsTestCreateAsync(
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.
/// 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<string>> ToolsTestCreateAsResponseAsync(
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="authTokens">
/// Values satisfying the tool's security requirements, keyed by requirement name. Applied the same way as for a real call: a headerApiKey requirement sends its value as the named header, a queryApiKey requirement as the named query parameter, and an httpAuth requirement as an Authorization header prefixed with the requirement's scheme.<br/>
/// Example: {"myServiceApiKey":"my-secret-value"}
/// </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::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<string> ToolsTestCreateAsync(
global::System.Guid toolId,
global::System.Collections.Generic.Dictionary<string, string>? authTokens = default,
global::Ultravox.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ namespace Ultravox
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.UltravoxV1TimedMessageEndBehavior), TypeInfoPropertyName = "UltravoxV1TimedMessageEndBehavior2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.ToolsCreateRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.ToolsTestCreateRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.VoicesCreateRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.AccountsMeUsageConcurrencyRetrieveBucket), TypeInfoPropertyName = "AccountsMeUsageConcurrencyRetrieveBucket2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ultravox.AgentsScheduledBatchesScheduledCallsListStatus), TypeInfoPropertyName = "AgentsScheduledBatchesScheduledCallsListStatus2")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1036,71 +1036,75 @@ public sealed partial class JsonSerializerContextTypes
/// <summary>
///
/// </summary>
public global::Ultravox.VoicesCreateRequest? Type252 { get; set; }
public global::Ultravox.ToolsTestCreateRequest? Type252 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.AccountsMeUsageConcurrencyRetrieveBucket? Type253 { get; set; }
public global::Ultravox.VoicesCreateRequest? Type253 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.AgentsScheduledBatchesScheduledCallsListStatus? Type254 { get; set; }
public global::Ultravox.AccountsMeUsageConcurrencyRetrieveBucket? Type254 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.CallsEventsListMinimumSeverity? Type255 { get; set; }
public global::Ultravox.AgentsScheduledBatchesScheduledCallsListStatus? Type255 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.CallsMessagesListMode? Type256 { get; set; }
public global::Ultravox.CallsEventsListMinimumSeverity? Type256 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.SchemaRetrieveFormat? Type257 { get; set; }
public global::Ultravox.CallsMessagesListMode? Type257 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.SchemaRetrieveLang? Type258 { get; set; }
public global::Ultravox.SchemaRetrieveFormat? Type258 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.ToolsListOwnership? Type259 { get; set; }
public global::Ultravox.SchemaRetrieveLang? Type259 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.ToolsListSortOrder? Type260 { get; set; }
public global::Ultravox.ToolsListOwnership? Type260 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.VoicesListBillingStyle? Type261 { get; set; }
public global::Ultravox.ToolsListSortOrder? Type261 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.VoicesListOwnership? Type262 { get; set; }
public global::Ultravox.VoicesListBillingStyle? Type262 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::Ultravox.VoicesListProviderItem>? Type263 { get; set; }
public global::Ultravox.VoicesListOwnership? Type263 { get; set; }
/// <summary>
///
/// </summary>
public global::Ultravox.VoicesListProviderItem? Type264 { get; set; }
public global::System.Collections.Generic.IList<global::Ultravox.VoicesListProviderItem>? Type264 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::Ultravox.Account>? Type265 { get; set; }
public global::Ultravox.VoicesListProviderItem? Type265 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::Ultravox.AgentUsage>? Type266 { get; set; }
public global::System.Collections.Generic.IList<global::Ultravox.Account>? Type266 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::Ultravox.CallTool>? Type267 { get; set; }
public global::System.Collections.Generic.IList<global::Ultravox.AgentUsage>? Type267 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::Ultravox.UltravoxV1CorpusQueryResult>? Type268 { get; set; }
public global::System.Collections.Generic.IList<global::Ultravox.CallTool>? Type268 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::Ultravox.UltravoxV1CorpusQueryResult>? Type269 { get; set; }

/// <summary>
///
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
#nullable enable

namespace Ultravox
{
public sealed partial class ToolsTestCreateRequest
{
/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
/// </summary>
public string ToJson(
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
this.GetType(),
jsonSerializerContext);
}

/// <summary>
/// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
/// </summary>
public string ToJson()
{
return ToJson(global::Ultravox.SourceGenerationContext.Default);
}

/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
/// </summary>
#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::Ultravox.SourceGenerationContext.Default);
}

return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerContext.
/// </summary>
public static global::Ultravox.ToolsTestCreateRequest? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
typeof(global::Ultravox.ToolsTestCreateRequest),
jsonSerializerContext) as global::Ultravox.ToolsTestCreateRequest;
}

/// <summary>
/// Deserializes a JSON string using the generated default JsonSerializerContext.
/// </summary>
public static global::Ultravox.ToolsTestCreateRequest? FromJson(
string json)
{
return FromJson(
json,
global::Ultravox.SourceGenerationContext.Default);
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerOptions.
/// </summary>
#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.ToolsTestCreateRequest? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
if (jsonSerializerOptions is null)
{
return FromJson(
json,
global::Ultravox.SourceGenerationContext.Default);
}

return global::System.Text.Json.JsonSerializer.Deserialize<global::Ultravox.ToolsTestCreateRequest>(
json,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::Ultravox.ToolsTestCreateRequest?> 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.ToolsTestCreateRequest),
jsonSerializerContext).ConfigureAwait(false)) as global::Ultravox.ToolsTestCreateRequest;
}

/// <summary>
/// Deserializes a JSON stream using the generated default JsonSerializerContext.
/// </summary>
public static global::System.Threading.Tasks.ValueTask<global::Ultravox.ToolsTestCreateRequest?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream)
{
return FromJsonStreamAsync(
jsonStream,
global::Ultravox.SourceGenerationContext.Default);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#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<global::Ultravox.ToolsTestCreateRequest?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
if (jsonSerializerOptions is null)
{
return FromJsonStreamAsync(
jsonStream,
global::Ultravox.SourceGenerationContext.Default);
}

return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Ultravox.ToolsTestCreateRequest?>(
jsonStream,
jsonSerializerOptions);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

#nullable enable

namespace Ultravox
{
/// <summary>
///
/// </summary>
public sealed partial class ToolsTestCreateRequest
{
/// <summary>
/// Values satisfying the tool's security requirements, keyed by requirement name. Applied the same way as for a real call: a headerApiKey requirement sends its value as the named header, a queryApiKey requirement as the named query parameter, and an httpAuth requirement as an Authorization header prefixed with the requirement's scheme.<br/>
/// Example: {"myServiceApiKey":"my-secret-value"}
/// </summary>
/// <example>{"myServiceApiKey":"my-secret-value"}</example>
[global::System.Text.Json.Serialization.JsonPropertyName("authTokens")]
public global::System.Collections.Generic.Dictionary<string, string>? AuthTokens { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();

/// <summary>
/// Initializes a new instance of the <see cref="ToolsTestCreateRequest" /> class.
/// </summary>
/// <param name="authTokens">
/// Values satisfying the tool's security requirements, keyed by requirement name. Applied the same way as for a real call: a headerApiKey requirement sends its value as the named header, a queryApiKey requirement as the named query parameter, and an httpAuth requirement as an Authorization header prefixed with the requirement's scheme.<br/>
/// Example: {"myServiceApiKey":"my-secret-value"}
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public ToolsTestCreateRequest(
global::System.Collections.Generic.Dictionary<string, string>? authTokens)
{
this.AuthTokens = authTokens;
}

/// <summary>
/// Initializes a new instance of the <see cref="ToolsTestCreateRequest" /> class.
/// </summary>
public ToolsTestCreateRequest()
{
}

}
}
Loading