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 @@ -247,6 +247,13 @@ partial void ProcessAgentsCallsCreateResponseContent(
/// <param name="retentionPolicy">
/// The (overridden) retention policy for the call's data after it ends.
/// </param>
/// <param name="sharedSecrets">
/// Shared secrets used to sign outbound requests (e.g. data connection websocket).<br/>
/// When set, X-Ultravox-Call-ID, X-Ultravox-Signature-Timestamp, and<br/>
/// X-Ultravox-Signature headers will be included. If multiple secrets are provided,<br/>
/// one signature per secret is produced (comma-separated in X-Ultravox-Signature).<br/>
/// Write-only: this field is never included in API responses.
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::Ultravox.Call> AgentsCallsCreateAsync(
Expand All @@ -267,6 +274,7 @@ partial void ProcessAgentsCallsCreateResponseContent(
global::Ultravox.UltravoxV1ExternalVoice? voiceOverrides = default,
global::Ultravox.UltravoxV1ToolOverrides? toolOverrides = default,
global::Ultravox.UltravoxV1StartAgentCallRequestRetentionPolicy? retentionPolicy = default,
global::System.Collections.Generic.IList<string>? sharedSecrets = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __request = new global::Ultravox.UltravoxV1StartAgentCallRequest
Expand All @@ -287,6 +295,7 @@ partial void ProcessAgentsCallsCreateResponseContent(
VoiceOverrides = voiceOverrides,
ToolOverrides = toolOverrides,
RetentionPolicy = retentionPolicy,
SharedSecrets = sharedSecrets,
};

return await AgentsCallsCreateAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,13 @@ partial void ProcessCallsCreateResponseContent(
/// The retention policy for the call's data after it ends.<br/>
/// This feature must be enabled for your account.
/// </param>
/// <param name="sharedSecrets">
/// Shared secrets used to sign outbound requests (e.g. data connection websocket).<br/>
/// When set, X-Ultravox-Call-ID, X-Ultravox-Signature-Timestamp, and<br/>
/// X-Ultravox-Signature headers will be included. If multiple secrets are provided,<br/>
/// one signature per secret is produced (comma-separated in X-Ultravox-Signature).<br/>
/// Write-only: this field is never included in API responses.
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::Ultravox.Call> CallsCreateAsync(
Expand Down Expand Up @@ -326,6 +333,7 @@ partial void ProcessCallsCreateResponseContent(
global::Ultravox.UltravoxV1Callbacks? callbacks = default,
global::Ultravox.UltravoxV1ExternalVoice? voiceOverrides = default,
global::Ultravox.UltravoxV1StartCallRequestRetentionPolicy? retentionPolicy = default,
global::System.Collections.Generic.IList<string>? sharedSecrets = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __request = new global::Ultravox.UltravoxV1StartCallRequest
Expand Down Expand Up @@ -356,6 +364,7 @@ partial void ProcessCallsCreateResponseContent(
Callbacks = callbacks,
VoiceOverrides = voiceOverrides,
RetentionPolicy = retentionPolicy,
SharedSecrets = sharedSecrets,
};

return await CallsCreateAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ public partial interface IAgentsClient
/// <param name="retentionPolicy">
/// The (overridden) retention policy for the call's data after it ends.
/// </param>
/// <param name="sharedSecrets">
/// Shared secrets used to sign outbound requests (e.g. data connection websocket).<br/>
/// When set, X-Ultravox-Call-ID, X-Ultravox-Signature-Timestamp, and<br/>
/// X-Ultravox-Signature headers will be included. If multiple secrets are provided,<br/>
/// one signature per secret is produced (comma-separated in X-Ultravox-Signature).<br/>
/// Write-only: this field is never included in API responses.
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::Ultravox.Call> AgentsCallsCreateAsync(
Expand All @@ -98,6 +105,7 @@ public partial interface IAgentsClient
global::Ultravox.UltravoxV1ExternalVoice? voiceOverrides = default,
global::Ultravox.UltravoxV1ToolOverrides? toolOverrides = default,
global::Ultravox.UltravoxV1StartAgentCallRequestRetentionPolicy? retentionPolicy = default,
global::System.Collections.Generic.IList<string>? sharedSecrets = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@ public partial interface ICallsClient
/// The retention policy for the call's data after it ends.<br/>
/// This feature must be enabled for your account.
/// </param>
/// <param name="sharedSecrets">
/// Shared secrets used to sign outbound requests (e.g. data connection websocket).<br/>
/// When set, X-Ultravox-Call-ID, X-Ultravox-Signature-Timestamp, and<br/>
/// X-Ultravox-Signature headers will be included. If multiple secrets are provided,<br/>
/// one signature per secret is produced (comma-separated in X-Ultravox-Signature).<br/>
/// Write-only: this field is never included in API responses.
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::Ultravox.Call> CallsCreateAsync(
Expand Down Expand Up @@ -149,6 +156,7 @@ public partial interface ICallsClient
global::Ultravox.UltravoxV1Callbacks? callbacks = default,
global::Ultravox.UltravoxV1ExternalVoice? voiceOverrides = default,
global::Ultravox.UltravoxV1StartCallRequestRetentionPolicy? retentionPolicy = default,
global::System.Collections.Generic.IList<string>? sharedSecrets = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,17 @@ public sealed partial class UltravoxV1CallTemplate
[global::System.Text.Json.Serialization.JsonPropertyName("contextSchema")]
public object? ContextSchema { get; set; }

/// <summary>
/// Shared secrets used to sign outbound requests (e.g. data connection websocket).<br/>
/// When set, X-Ultravox-Call-ID, X-Ultravox-Signature-Timestamp, and<br/>
/// X-Ultravox-Signature headers will be included. If multiple secrets are provided,<br/>
/// one signature per secret is produced (comma-separated in X-Ultravox-Signature).<br/>
/// Write-only: this field is never included in API responses.<br/>
/// If multiple stages are defined for the call, this will be used only for stages without their own sharedSecrets.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("sharedSecrets")]
public global::System.Collections.Generic.IList<string>? SharedSecrets { get; set; }

/// <summary>
/// The default retention policy for calls created with this agent.
/// </summary>
Expand Down Expand Up @@ -289,6 +300,14 @@ public sealed partial class UltravoxV1CallTemplate
/// * selected_tools.http.auth_query_params.value<br/>
/// If multiple stages are defined for the call, each must define its own context schema (or use the generated one).
/// </param>
/// <param name="sharedSecrets">
/// Shared secrets used to sign outbound requests (e.g. data connection websocket).<br/>
/// When set, X-Ultravox-Call-ID, X-Ultravox-Signature-Timestamp, and<br/>
/// X-Ultravox-Signature headers will be included. If multiple secrets are provided,<br/>
/// one signature per secret is produced (comma-separated in X-Ultravox-Signature).<br/>
/// Write-only: this field is never included in API responses.<br/>
/// If multiple stages are defined for the call, this will be used only for stages without their own sharedSecrets.
/// </param>
/// <param name="retentionPolicy">
/// The default retention policy for calls created with this agent.
/// </param>
Expand Down Expand Up @@ -318,6 +337,7 @@ public UltravoxV1CallTemplate(
global::System.Collections.Generic.IList<global::Ultravox.UltravoxV1SelectedTool>? selectedTools,
global::Ultravox.UltravoxV1DataConnectionConfig? dataConnection,
object? contextSchema,
global::System.Collections.Generic.IList<string>? sharedSecrets,
global::Ultravox.UltravoxV1CallTemplateRetentionPolicy? retentionPolicy)
{
this.Name = name;
Expand All @@ -342,6 +362,7 @@ public UltravoxV1CallTemplate(
this.SelectedTools = selectedTools;
this.DataConnection = dataConnection;
this.ContextSchema = contextSchema;
this.SharedSecrets = sharedSecrets;
this.RetentionPolicy = retentionPolicy;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ public sealed partial class UltravoxV1DataConnectionConfig
[global::System.Text.Json.Serialization.JsonPropertyName("dataMessages")]
public global::Ultravox.UltravoxV1EnabledDataMessages? DataMessages { get; set; }

/// <summary>
/// Additional headers to include when connecting to the websocket endpoint.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("headers")]
public global::System.Collections.Generic.Dictionary<string, string>? Headers { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
Expand All @@ -44,17 +50,22 @@ public sealed partial class UltravoxV1DataConnectionConfig
/// <param name="dataMessages">
/// Controls which data messages are enabled for the data connection.
/// </param>
/// <param name="headers">
/// Additional headers to include when connecting to the websocket endpoint.
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public UltravoxV1DataConnectionConfig(
string? websocketUrl,
global::Ultravox.UltravoxV1DataConnectionAudioConfig? audioConfig,
global::Ultravox.UltravoxV1EnabledDataMessages? dataMessages)
global::Ultravox.UltravoxV1EnabledDataMessages? dataMessages,
global::System.Collections.Generic.Dictionary<string, string>? headers)
{
this.WebsocketUrl = websocketUrl;
this.AudioConfig = audioConfig;
this.DataMessages = dataMessages;
this.Headers = headers;
}

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

namespace Ultravox
{
public sealed partial class UltravoxV1DataConnectionConfigHeaders
{
/// <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 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)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
}

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

/// <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.UltravoxV1DataConnectionConfigHeaders? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Deserialize<global::Ultravox.UltravoxV1DataConnectionConfigHeaders>(
json,
jsonSerializerOptions);
}

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

/// <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.UltravoxV1DataConnectionConfigHeaders?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Ultravox.UltravoxV1DataConnectionConfigHeaders?>(
jsonStream,
jsonSerializerOptions);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

#nullable enable

namespace Ultravox
{
/// <summary>
/// Additional headers to include when connecting to the websocket endpoint.
/// </summary>
public sealed partial class UltravoxV1DataConnectionConfigHeaders
{

/// <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>();
}
}
Loading