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
64 changes: 64 additions & 0 deletions src/libs/Vapi/Generated/Vapi.CallsClient.CallControllerCreate.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,70 @@ partial void ProcessCallControllerCreateResponseContent(
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
//
if ((int)__response.StatusCode == 400)
{
string? __content_400 = null;
global::System.Exception? __exception_400 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
}
}
catch (global::System.Exception __ex)
{
__exception_400 = __ex;
}


throw global::Vapi.ApiException.Create(
statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
responseBody: __content_400,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value));
}
//
if ((int)__response.StatusCode == 500)
{
string? __content_500 = null;
global::System.Exception? __exception_500 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
}
else
{
__content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
}
}
catch (global::System.Exception __ex)
{
__exception_500 = __ex;
}


throw global::Vapi.ApiException.Create(
statusCode: __response.StatusCode,
message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_500,
responseBody: __content_500,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value));
}

if (__effectiveReadResponseAsString)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ partial void PrepareChatControllerListChatsArguments(
ref string? squadId,
ref string? sessionId,
ref string? previousChatId,
ref string? idAny,
ref double? page,
ref global::Vapi.ChatControllerListChatsSortOrder? sortOrder,
ref global::Vapi.ChatControllerListChatsSortBy? sortBy,
Expand All @@ -54,6 +55,7 @@ partial void PrepareChatControllerListChatsRequest(
string? squadId,
string? sessionId,
string? previousChatId,
string? idAny,
double? page,
global::Vapi.ChatControllerListChatsSortOrder? sortOrder,
global::Vapi.ChatControllerListChatsSortBy? sortBy,
Expand Down Expand Up @@ -86,6 +88,7 @@ partial void ProcessChatControllerListChatsResponseContent(
/// <param name="squadId"></param>
/// <param name="sessionId"></param>
/// <param name="previousChatId"></param>
/// <param name="idAny"></param>
/// <param name="page"></param>
/// <param name="sortOrder"></param>
/// <param name="sortBy"></param>
Expand All @@ -108,6 +111,7 @@ partial void ProcessChatControllerListChatsResponseContent(
string? squadId = default,
string? sessionId = default,
string? previousChatId = default,
string? idAny = default,
double? page = default,
global::Vapi.ChatControllerListChatsSortOrder? sortOrder = default,
global::Vapi.ChatControllerListChatsSortBy? sortBy = default,
Expand All @@ -130,6 +134,7 @@ partial void ProcessChatControllerListChatsResponseContent(
squadId: squadId,
sessionId: sessionId,
previousChatId: previousChatId,
idAny: idAny,
page: page,
sortOrder: sortOrder,
sortBy: sortBy,
Expand Down Expand Up @@ -159,6 +164,7 @@ partial void ProcessChatControllerListChatsResponseContent(
/// <param name="squadId"></param>
/// <param name="sessionId"></param>
/// <param name="previousChatId"></param>
/// <param name="idAny"></param>
/// <param name="page"></param>
/// <param name="sortOrder"></param>
/// <param name="sortBy"></param>
Expand All @@ -181,6 +187,7 @@ partial void ProcessChatControllerListChatsResponseContent(
string? squadId = default,
string? sessionId = default,
string? previousChatId = default,
string? idAny = default,
double? page = default,
global::Vapi.ChatControllerListChatsSortOrder? sortOrder = default,
global::Vapi.ChatControllerListChatsSortBy? sortBy = default,
Expand All @@ -206,6 +213,7 @@ partial void ProcessChatControllerListChatsResponseContent(
squadId: ref squadId,
sessionId: ref sessionId,
previousChatId: ref previousChatId,
idAny: ref idAny,
page: ref page,
sortOrder: ref sortOrder,
sortBy: ref sortBy,
Expand Down Expand Up @@ -252,6 +260,7 @@ partial void ProcessChatControllerListChatsResponseContent(
.AddOptionalParameter("squadId", squadId)
.AddOptionalParameter("sessionId", sessionId)
.AddOptionalParameter("previousChatId", previousChatId)
.AddOptionalParameter("idAny", idAny)
.AddOptionalParameter("page", page?.ToString())
.AddOptionalParameter("sortOrder", sortOrder?.ToValueString())
.AddOptionalParameter("sortBy", sortBy?.ToValueString())
Expand Down Expand Up @@ -311,6 +320,7 @@ partial void ProcessChatControllerListChatsResponseContent(
squadId: squadId,
sessionId: sessionId,
previousChatId: previousChatId,
idAny: idAny,
page: page,
sortOrder: sortOrder,
sortBy: sortBy,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public partial interface IChatsClient
/// <param name="squadId"></param>
/// <param name="sessionId"></param>
/// <param name="previousChatId"></param>
/// <param name="idAny"></param>
/// <param name="page"></param>
/// <param name="sortOrder"></param>
/// <param name="sortBy"></param>
Expand All @@ -37,6 +38,7 @@ public partial interface IChatsClient
string? squadId = default,
string? sessionId = default,
string? previousChatId = default,
string? idAny = default,
double? page = default,
global::Vapi.ChatControllerListChatsSortOrder? sortOrder = default,
global::Vapi.ChatControllerListChatsSortBy? sortBy = default,
Expand All @@ -62,6 +64,7 @@ public partial interface IChatsClient
/// <param name="squadId"></param>
/// <param name="sessionId"></param>
/// <param name="previousChatId"></param>
/// <param name="idAny"></param>
/// <param name="page"></param>
/// <param name="sortOrder"></param>
/// <param name="sortBy"></param>
Expand All @@ -84,6 +87,7 @@ public partial interface IChatsClient
string? squadId = default,
string? sessionId = default,
string? previousChatId = default,
string? idAny = default,
double? page = default,
global::Vapi.ChatControllerListChatsSortOrder? sortOrder = default,
global::Vapi.ChatControllerListChatsSortBy? sortBy = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public partial interface ISessionsClient
/// <param name="customerNumberAny">
/// Example: +1234567890,+0987654321
/// </param>
/// <param name="idAny"></param>
/// <param name="phoneNumberId"></param>
/// <param name="phoneNumberIdAny"></param>
/// <param name="page"></param>
Expand Down Expand Up @@ -65,6 +66,7 @@ public partial interface ISessionsClient
string? email = default,
string? externalId = default,
string? customerNumberAny = default,
string? idAny = default,
string? phoneNumberId = default,
global::System.Collections.Generic.IList<string>? phoneNumberIdAny = default,
double? page = default,
Expand Down Expand Up @@ -108,6 +110,7 @@ public partial interface ISessionsClient
/// <param name="customerNumberAny">
/// Example: +1234567890,+0987654321
/// </param>
/// <param name="idAny"></param>
/// <param name="phoneNumberId"></param>
/// <param name="phoneNumberIdAny"></param>
/// <param name="page"></param>
Expand Down Expand Up @@ -142,6 +145,7 @@ public partial interface ISessionsClient
string? email = default,
string? externalId = default,
string? customerNumberAny = default,
string? idAny = default,
string? phoneNumberId = default,
global::System.Collections.Generic.IList<string>? phoneNumberIdAny = default,
double? page = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ public partial interface ISquadsClient
/// <summary>
/// List Squads
/// </summary>
/// <param name="idAny"></param>
/// <param name="limit"></param>
/// <param name="createdAtGt"></param>
/// <param name="createdAtLt"></param>
Expand All @@ -20,6 +21,7 @@ public partial interface ISquadsClient
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Vapi.ApiException"></exception>
global::System.Threading.Tasks.Task<global::System.Collections.Generic.IList<global::Vapi.Squad>> SquadControllerFindAllAsync(
global::System.Collections.Generic.IList<string>? idAny = default,
double? limit = default,
global::System.DateTime? createdAtGt = default,
global::System.DateTime? createdAtLt = default,
Expand All @@ -34,6 +36,7 @@ public partial interface ISquadsClient
/// <summary>
/// List Squads
/// </summary>
/// <param name="idAny"></param>
/// <param name="limit"></param>
/// <param name="createdAtGt"></param>
/// <param name="createdAtLt"></param>
Expand All @@ -47,6 +50,7 @@ public partial interface ISquadsClient
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Vapi.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Vapi.AutoSDKHttpResponse<global::System.Collections.Generic.IList<global::Vapi.Squad>>> SquadControllerFindAllAsResponseAsync(
global::System.Collections.Generic.IList<string>? idAny = default,
double? limit = default,
global::System.DateTime? createdAtGt = default,
global::System.DateTime? createdAtLt = default,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace Vapi.JsonConverters
{
/// <inheritdoc />
public sealed class SimulationRunListItemStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Vapi.SimulationRunListItemStatus>
{
/// <inheritdoc />
public override global::Vapi.SimulationRunListItemStatus 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::Vapi.SimulationRunListItemStatusExtensions.ToEnum(stringValue) ?? default;
}

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

return default;
}

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

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

namespace Vapi.JsonConverters
{
/// <inheritdoc />
public sealed class SimulationRunListItemStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Vapi.SimulationRunListItemStatus?>
{
/// <inheritdoc />
public override global::Vapi.SimulationRunListItemStatus? 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::Vapi.SimulationRunListItemStatusExtensions.ToEnum(stringValue);
}

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

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Vapi.SimulationRunListItemStatus? 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::Vapi.SimulationRunListItemStatusExtensions.ToValueString(value.Value));
}
}
}
}
Loading