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
@@ -0,0 +1,73 @@
#nullable enable

namespace RetellAI
{
public partial interface IRetellAiClient
{
/// <summary>
/// Create a new web call and return browser connection details.
/// </summary>
/// <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::RetellAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::RetellAI.V3CreateWebCallResponse> CreateWebCallV3Async(

global::RetellAI.CreateWebCallV3Request request,
global::RetellAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Create a new web call and return browser connection details.
/// </summary>
/// <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::RetellAI.ApiException"></exception>
global::System.Threading.Tasks.Task<global::RetellAI.AutoSDKHttpResponse<global::RetellAI.V3CreateWebCallResponse>> CreateWebCallV3AsResponseAsync(

global::RetellAI.CreateWebCallV3Request request,
global::RetellAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Create a new web call and return browser connection details.
/// </summary>
/// <param name="agentId">
/// Unique id of agent used for the call. Your agent would contain the LLM Websocket url used for this call.<br/>
/// Example: oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD
/// </param>
/// <param name="agentVersion">
/// Agent version reference. Supports a numeric version (for example 3) or a tag/environment name (for example "prod"). The string "latest" resolves to the most recently created version (the largest version number), and "latest_published" resolves to the most recently published version. When a tag is provided, resolution uses that exact tag assignment (including its dynamic variables). If the tag exists but is currently unassigned, it resolves to latest. When a numeric version, latest, or latest_published is provided, resolution applies dynamic variables from the preferred tag for that resolved version (most recently assigned), if any.
/// </param>
/// <param name="agentOverride">
/// Override configuration for agent, retell LLM, or conversation flow settings for a specific call.
/// </param>
/// <param name="metadata">
/// An arbitrary object for storage purpose only. You can put anything here like your internal customer id associated with the call. Not used for processing. You can later get this field from the call object.
/// </param>
/// <param name="retellLlmDynamicVariables">
/// Add optional dynamic variables in key value pairs of string that injects into your Response Engine prompt and tool description. Only applicable for Response Engine.<br/>
/// Example: {"customer_name":"John Doe"}
/// </param>
/// <param name="currentNodeId">
/// Start the call at this conversation flow node (stage). Must be a valid node id in the agent's conversation flow. Only applicable when the agent uses conversation flow as the response engine. Ignored for retell-llm agents.<br/>
/// Example: collect_info
/// </param>
/// <param name="currentState">
/// Start the conversation in this state (stage). Must be a valid state name in the agent's Retell LLM. Only applicable when the agent uses Retell LLM with states. Ignored for conversation-flow agents.<br/>
/// Example: information_collection
/// </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<global::RetellAI.V3CreateWebCallResponse> CreateWebCallV3Async(
string agentId,
global::RetellAI.AgentVersionReference? agentVersion = default,
global::RetellAI.AgentOverrideRequest? agentOverride = default,
object? metadata = default,
global::System.Collections.Generic.Dictionary<string, string>? retellLlmDynamicVariables = default,
string? currentNodeId = default,
string? currentState = default,
global::RetellAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace RetellAI.JsonConverters
{
/// <inheritdoc />
public sealed class CreateWebCallV3ResponseStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::RetellAI.CreateWebCallV3ResponseStatus>
{
/// <inheritdoc />
public override global::RetellAI.CreateWebCallV3ResponseStatus Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::RetellAI.CreateWebCallV3ResponseStatusExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::RetellAI.CreateWebCallV3ResponseStatus)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::RetellAI.CreateWebCallV3ResponseStatus);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::RetellAI.CreateWebCallV3ResponseStatus value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::RetellAI.CreateWebCallV3ResponseStatusExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace RetellAI.JsonConverters
{
/// <inheritdoc />
public sealed class CreateWebCallV3ResponseStatus2JsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::RetellAI.CreateWebCallV3ResponseStatus2>
{
/// <inheritdoc />
public override global::RetellAI.CreateWebCallV3ResponseStatus2 Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::RetellAI.CreateWebCallV3ResponseStatus2Extensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::RetellAI.CreateWebCallV3ResponseStatus2)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::RetellAI.CreateWebCallV3ResponseStatus2);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::RetellAI.CreateWebCallV3ResponseStatus2 value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::RetellAI.CreateWebCallV3ResponseStatus2Extensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace RetellAI.JsonConverters
{
/// <inheritdoc />
public sealed class CreateWebCallV3ResponseStatus2NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::RetellAI.CreateWebCallV3ResponseStatus2?>
{
/// <inheritdoc />
public override global::RetellAI.CreateWebCallV3ResponseStatus2? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::RetellAI.CreateWebCallV3ResponseStatus2Extensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::RetellAI.CreateWebCallV3ResponseStatus2)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::RetellAI.CreateWebCallV3ResponseStatus2?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::RetellAI.CreateWebCallV3ResponseStatus2? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

if (value == null)
{
writer.WriteNullValue();
}
else
{
writer.WriteStringValue(global::RetellAI.CreateWebCallV3ResponseStatus2Extensions.ToValueString(value.Value));
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace RetellAI.JsonConverters
{
/// <inheritdoc />
public sealed class CreateWebCallV3ResponseStatus3JsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::RetellAI.CreateWebCallV3ResponseStatus3>
{
/// <inheritdoc />
public override global::RetellAI.CreateWebCallV3ResponseStatus3 Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::RetellAI.CreateWebCallV3ResponseStatus3Extensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::RetellAI.CreateWebCallV3ResponseStatus3)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::RetellAI.CreateWebCallV3ResponseStatus3);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::RetellAI.CreateWebCallV3ResponseStatus3 value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::RetellAI.CreateWebCallV3ResponseStatus3Extensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace RetellAI.JsonConverters
{
/// <inheritdoc />
public sealed class CreateWebCallV3ResponseStatus3NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::RetellAI.CreateWebCallV3ResponseStatus3?>
{
/// <inheritdoc />
public override global::RetellAI.CreateWebCallV3ResponseStatus3? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::RetellAI.CreateWebCallV3ResponseStatus3Extensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::RetellAI.CreateWebCallV3ResponseStatus3)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::RetellAI.CreateWebCallV3ResponseStatus3?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::RetellAI.CreateWebCallV3ResponseStatus3? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

if (value == null)
{
writer.WriteNullValue();
}
else
{
writer.WriteStringValue(global::RetellAI.CreateWebCallV3ResponseStatus3Extensions.ToValueString(value.Value));
}
}
}
}
Loading