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 @@ -50,7 +50,7 @@ public partial interface IRetellAiClient
/// Example: true
/// </param>
/// <param name="maxChunkSize">
/// Maximum number of characters per chunk when splitting knowledge base content. Default is 2000. Immutable after creation.<br/>
/// Maximum number of characters per chunk when splitting knowledge base. Default is 2000. content. Immutable after creation.<br/>
/// Example: 2000
/// </param>
/// <param name="minChunkSize">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public partial interface IRetellAiClient
/// Example: true
/// </param>
/// <param name="terminationUri">
/// The termination uri to uniquely identify your elastic SIP trunk. This is used for outbound calls. For Twilio elastic SIP trunks it always ends with ".pstn.twilio.com".<br/>
/// The termination uri to uniquely identify your elastic SIP trunk. This is used for outbound calls. For Twilio elastic SIP trunks it always end with ".pstn.twilio.com".<br/>
/// Example: someuri.pstn.twilio.com
/// </param>
/// <param name="sipTrunkAuthUsername">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public partial interface IRetellAiClient
/// Example: Use [sigh] for thoughtful pauses and [excited] for good news.
/// </param>
/// <param name="responsiveness">
/// Controls how responsive the agent is. Value ranging from [0,1]. Lower value means less responsive agent (wait more, respond slower), while higher value means faster exchanges (respond when it can). If unset, default value 1 will apply.<br/>
/// Controls how responsive is the agent. Value ranging from [0,1]. Lower value means less responsive agent (wait more, respond slower), while higher value means faster exchanges (respond when it can). If unset, default value 1 will apply.<br/>
/// Example: 1
/// </param>
/// <param name="interruptionSensitivity">
Expand Down Expand Up @@ -161,7 +161,7 @@ public partial interface IRetellAiClient
/// Specifies what language(s) the agent will operate in. Accepts either a single locale (e.g. `en-US`) or an array of locales for multilingual agents (e.g. `["en-US","es-ES"]`). The scalar value `multi` is deprecated but still accepted as a scalar, and is stored and returned as the ten locales it used to mean. It must not appear inside the array form. Send an explicit locale array instead. If unset, defaults to `en-US`.
/// </param>
/// <param name="webhookUrl">
/// The webhook for agent to listen to call events. See what events it would get at [webhook doc](/features/webhook). If set, will bind webhook events for this agent to the specified url, and will ignore the account level webhook for this agent. Set to `null` to remove webhook url from this agent.<br/>
/// The webhook for agent to listen to call events. See what events it would get at [webhook doc](/features/webhook). If set, will binds webhook events for this agent to the specified url, and will ignore the account level webhook for this agent. Set to `null` to remove webhook url from this agent.<br/>
/// Example: https://webhook-url-here
/// </param>
/// <param name="webhookEvents">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public partial interface IRetellAiClient
/// Specifies what language(s) the agent will operate in. Accepts either a single locale (e.g. `en-US`) or an array of locales for multilingual agents (e.g. `["en-US","es-ES"]`). The scalar value `multi` is deprecated but still accepted as a scalar, and is stored and returned as the ten locales it used to mean. It must not appear inside the array form. Send an explicit locale array instead. If unset, defaults to `en-US`.
/// </param>
/// <param name="webhookUrl">
/// The webhook for agent to listen to chat events. See what events it would get at [webhook doc](/features/webhook). If set, will bind webhook events for this agent to the specified url, and will ignore the account level webhook for this agent. Set to `null` to remove webhook url from this agent.<br/>
/// The webhook for agent to listen to chat events. See what events it would get at [webhook doc](/features/webhook). If set, will binds webhook events for this agent to the specified url, and will ignore the account level webhook for this agent. Set to `null` to remove webhook url from this agent.<br/>
/// Example: https://webhook-url-here
/// </param>
/// <param name="webhookEvents">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
#nullable enable
#pragma warning disable CS0618 // Type or member is obsolete

namespace RetellAI.JsonConverters
{
/// <inheritdoc />
public class ChartConfigWithIdJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::RetellAI.ChartConfigWithId>
{
/// <inheritdoc />
public override global::RetellAI.ChartConfigWithId Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
options = options ?? throw new global::System.ArgumentNullException(nameof(options));
var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");

using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();

global::RetellAI.ChartConfig? chartConfig = default;
try
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::RetellAI.ChartConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::RetellAI.ChartConfig> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::RetellAI.ChartConfig).Name}");
chartConfig = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
}
catch (global::System.InvalidOperationException)
{
}

object? chartConfigWithIdVariant2 = default;
try
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(object), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<object> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(object).Name}");
chartConfigWithIdVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
}
catch (global::System.InvalidOperationException)
{
}
var __value = new global::RetellAI.ChartConfigWithId(
chartConfig,

chartConfigWithIdVariant2
);

return __value;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::RetellAI.ChartConfigWithId value,
global::System.Text.Json.JsonSerializerOptions options)
{
options = options ?? throw new global::System.ArgumentNullException(nameof(options));
var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");


writer.WriteStartObject();
var __writtenPropertyNames = new global::System.Collections.Generic.HashSet<string>(global::System.StringComparer.Ordinal);
if (value.IsChartConfig)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::RetellAI.ChartConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::RetellAI.ChartConfig?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::RetellAI.ChartConfig).Name}");
var __element0 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.ChartConfig!, typeInfo);
if (__element0.ValueKind != global::System.Text.Json.JsonValueKind.Object)
{
throw new global::System.Text.Json.JsonException("AllOf values must serialize as JSON objects.");
}

foreach (var __property in __element0.EnumerateObject())
{
if (__writtenPropertyNames.Add(__property.Name))
{
__property.WriteTo(writer);
}
}
}
if (value.IsChartConfigWithIdVariant2)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(object), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<object?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(object).Name}");
var __element1 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.ChartConfigWithIdVariant2!, typeInfo);
if (__element1.ValueKind != global::System.Text.Json.JsonValueKind.Object)
{
throw new global::System.Text.Json.JsonException("AllOf values must serialize as JSON objects.");
}

foreach (var __property in __element1.EnumerateObject())
{
if (__writtenPropertyNames.Add(__property.Name))
{
__property.WriteTo(writer);
}
}
}
writer.WriteEndObject();
}
}
}
108 changes: 108 additions & 0 deletions src/libs/RetellAI/Generated/RetellAI.JsonConverters.ChartUpdate.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
#nullable enable
#pragma warning disable CS0618 // Type or member is obsolete

namespace RetellAI.JsonConverters
{
/// <inheritdoc />
public class ChartUpdateJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::RetellAI.ChartUpdate>
{
/// <inheritdoc />
public override global::RetellAI.ChartUpdate Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
options = options ?? throw new global::System.ArgumentNullException(nameof(options));
var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");

using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
var __rawJson = __jsonDocument.RootElement.GetRawText();

global::RetellAI.ChartConfigWithId? configWithId = default;
try
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::RetellAI.ChartConfigWithId), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::RetellAI.ChartConfigWithId> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::RetellAI.ChartConfigWithId).Name}");
configWithId = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
}
catch (global::System.InvalidOperationException)
{
}

global::RetellAI.ChartUpdateVariant2? chartUpdateVariant2 = default;
try
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::RetellAI.ChartUpdateVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::RetellAI.ChartUpdateVariant2> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::RetellAI.ChartUpdateVariant2).Name}");
chartUpdateVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
}
catch (global::System.Text.Json.JsonException)
{
}
catch (global::System.InvalidOperationException)
{
}
var __value = new global::RetellAI.ChartUpdate(
configWithId,

chartUpdateVariant2
);

return __value;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::RetellAI.ChartUpdate value,
global::System.Text.Json.JsonSerializerOptions options)
{
options = options ?? throw new global::System.ArgumentNullException(nameof(options));
var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");


writer.WriteStartObject();
var __writtenPropertyNames = new global::System.Collections.Generic.HashSet<string>(global::System.StringComparer.Ordinal);
if (value.IsConfigWithId)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::RetellAI.ChartConfigWithId), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::RetellAI.ChartConfigWithId> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::RetellAI.ChartConfigWithId).Name}");
var __element0 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.ConfigWithId!.Value, typeInfo);
if (__element0.ValueKind != global::System.Text.Json.JsonValueKind.Object)
{
throw new global::System.Text.Json.JsonException("AllOf values must serialize as JSON objects.");
}

foreach (var __property in __element0.EnumerateObject())
{
if (__writtenPropertyNames.Add(__property.Name))
{
__property.WriteTo(writer);
}
}
}
if (value.IsChartUpdateVariant2)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::RetellAI.ChartUpdateVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::RetellAI.ChartUpdateVariant2?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::RetellAI.ChartUpdateVariant2).Name}");
var __element1 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.ChartUpdateVariant2!, typeInfo);
if (__element1.ValueKind != global::System.Text.Json.JsonValueKind.Object)
{
throw new global::System.Text.Json.JsonException("AllOf values must serialize as JSON objects.");
}

foreach (var __property in __element1.EnumerateObject())
{
if (__writtenPropertyNames.Add(__property.Name))
{
__property.WriteTo(writer);
}
}
}
writer.WriteEndObject();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace RetellAI.JsonConverters
{
/// <inheritdoc />
public sealed class CallTransportJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::RetellAI.CallTransport>
public sealed class CreateCreditTopupInvoicePendingResponsePaymentStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::RetellAI.CreateCreditTopupInvoicePendingResponsePaymentStatus>
{
/// <inheritdoc />
public override global::RetellAI.CallTransport Read(
public override global::RetellAI.CreateCreditTopupInvoicePendingResponsePaymentStatus Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
Expand All @@ -18,19 +18,19 @@ public sealed class CallTransportJsonConverter : global::System.Text.Json.Serial
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::RetellAI.CallTransportExtensions.ToEnum(stringValue) ?? default;
return global::RetellAI.CreateCreditTopupInvoicePendingResponsePaymentStatusExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::RetellAI.CallTransport)numValue;
return (global::RetellAI.CreateCreditTopupInvoicePendingResponsePaymentStatus)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::RetellAI.CallTransport);
return default(global::RetellAI.CreateCreditTopupInvoicePendingResponsePaymentStatus);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
Expand All @@ -42,12 +42,12 @@ public sealed class CallTransportJsonConverter : global::System.Text.Json.Serial
/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::RetellAI.CallTransport value,
global::RetellAI.CreateCreditTopupInvoicePendingResponsePaymentStatus value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::RetellAI.CallTransportExtensions.ToValueString(value));
writer.WriteStringValue(global::RetellAI.CreateCreditTopupInvoicePendingResponsePaymentStatusExtensions.ToValueString(value));
}
}
}
Loading