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
289 changes: 146 additions & 143 deletions src/libs/Vapi/Generated/Vapi.JsonSerializerContext.g.cs

Large diffs are not rendered by default.

3,066 changes: 1,535 additions & 1,531 deletions src/libs/Vapi/Generated/Vapi.JsonSerializerContextTypes.g.cs

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions src/libs/Vapi/Generated/Vapi.Models.Call.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ public sealed partial class Call
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vapi.JsonConverters.OneOfJsonConverter<global::Vapi.VapiWebsocketTransport, global::Vapi.VonageTransport, global::Vapi.TwilioTransport, global::Vapi.VapiSipTransport, global::Vapi.TelnyxTransport, global::Vapi.VapiWebCallTransport>))]
public global::Vapi.OneOf<global::Vapi.VapiWebsocketTransport, global::Vapi.VonageTransport, global::Vapi.TwilioTransport, global::Vapi.VapiSipTransport, global::Vapi.TelnyxTransport, global::Vapi.VapiWebCallTransport>? Transport { get; set; }

/// <summary>
/// This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead.<br/>
/// Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("phoneNumber")]
public global::Vapi.TransientTwilioPhoneNumber? PhoneNumber { get; set; }

/// <summary>
/// This is the unique identifier for the call.
/// </summary>
Expand Down Expand Up @@ -276,13 +283,6 @@ public sealed partial class Call
[global::System.Text.Json.Serialization.JsonPropertyName("phoneNumberId")]
public string? PhoneNumberId { get; set; }

/// <summary>
/// This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead.<br/>
/// Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("phoneNumber")]
public global::Vapi.ImportTwilioPhoneNumberDTO? PhoneNumber { get; set; }

/// <summary>
/// This is the customer that will be called. To call a transient customer , use `customer` instead.<br/>
/// Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
Expand Down Expand Up @@ -364,6 +364,10 @@ public sealed partial class Call
/// <param name="transport">
/// This is the transport of the call.
/// </param>
/// <param name="phoneNumber">
/// This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead.<br/>
/// Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
/// </param>
/// <param name="startedAt">
/// This is the ISO 8601 date-time string of when the call was started.
/// </param>
Expand Down Expand Up @@ -450,10 +454,6 @@ public sealed partial class Call
/// This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.<br/>
/// Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
/// </param>
/// <param name="phoneNumber">
/// This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead.<br/>
/// Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
/// </param>
/// <param name="customerId">
/// This is the customer that will be called. To call a transient customer , use `customer` instead.<br/>
/// Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
Expand Down Expand Up @@ -487,6 +487,7 @@ public Call(
string? assistantVersion,
string? squadVersion,
global::Vapi.OneOf<global::Vapi.VapiWebsocketTransport, global::Vapi.VonageTransport, global::Vapi.TwilioTransport, global::Vapi.VapiSipTransport, global::Vapi.TelnyxTransport, global::Vapi.VapiWebCallTransport>? transport,
global::Vapi.TransientTwilioPhoneNumber? phoneNumber,
global::System.DateTime? startedAt,
global::System.DateTime? endedAt,
double? cost,
Expand All @@ -507,7 +508,6 @@ public Call(
global::Vapi.CreateWorkflowDTO? workflow,
global::Vapi.WorkflowOverrides? workflowOverrides,
string? phoneNumberId,
global::Vapi.ImportTwilioPhoneNumberDTO? phoneNumber,
string? customerId,
global::Vapi.CreateCustomerDTO? customer,
string? name,
Expand All @@ -524,6 +524,7 @@ public Call(
this.AssistantVersion = assistantVersion;
this.SquadVersion = squadVersion;
this.Transport = transport;
this.PhoneNumber = phoneNumber;
this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id));
this.OrgId = orgId ?? throw new global::System.ArgumentNullException(nameof(orgId));
this.CreatedAt = createdAt;
Expand All @@ -548,7 +549,6 @@ public Call(
this.Workflow = workflow;
this.WorkflowOverrides = workflowOverrides;
this.PhoneNumberId = phoneNumberId;
this.PhoneNumber = phoneNumber;
this.CustomerId = customerId;
this.Customer = customer;
this.Name = name;
Expand Down
6 changes: 6 additions & 0 deletions src/libs/Vapi/Generated/Vapi.Models.CallEndedReason.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1307,6 +1307,10 @@ public enum CallEndedReason
/// <summary>
///
/// </summary>
CallStartErrorVapifaultWorkerNotAvailable,
/// <summary>
///
/// </summary>
CallStartSquadVersionErrorValidation,
/// <summary>
///
Expand Down Expand Up @@ -2758,6 +2762,7 @@ public static string ToValueString(this CallEndedReason value)
CallEndedReason.CallStartErrorVapifaultDatabaseError => "call.start.error-vapifault-database-error",
CallEndedReason.CallStartErrorVapifaultGetOrg => "call.start.error-vapifault-get-org",
CallEndedReason.CallStartErrorVapifaultGetSubscription => "call.start.error-vapifault-get-subscription",
CallEndedReason.CallStartErrorVapifaultWorkerNotAvailable => "call.start.error-vapifault-worker-not-available",
CallEndedReason.CallStartSquadVersionErrorValidation => "call.start.squad-version-error-validation",
CallEndedReason.CustomerBusy => "customer-busy",
CallEndedReason.CustomerDidNotAnswer => "customer-did-not-answer",
Expand Down Expand Up @@ -3371,6 +3376,7 @@ public static string ToValueString(this CallEndedReason value)
"call.start.error-vapifault-database-error" => CallEndedReason.CallStartErrorVapifaultDatabaseError,
"call.start.error-vapifault-get-org" => CallEndedReason.CallStartErrorVapifaultGetOrg,
"call.start.error-vapifault-get-subscription" => CallEndedReason.CallStartErrorVapifaultGetSubscription,
"call.start.error-vapifault-worker-not-available" => CallEndedReason.CallStartErrorVapifaultWorkerNotAvailable,
"call.start.squad-version-error-validation" => CallEndedReason.CallStartSquadVersionErrorValidation,
"customer-busy" => CallEndedReason.CustomerBusy,
"customer-did-not-answer" => CallEndedReason.CustomerDidNotAnswer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1307,6 +1307,10 @@ public enum ServerMessageEndOfCallReportEndedReason
/// <summary>
///
/// </summary>
CallStartErrorVapifaultWorkerNotAvailable,
/// <summary>
///
/// </summary>
CallStartSquadVersionErrorValidation,
/// <summary>
///
Expand Down Expand Up @@ -2758,6 +2762,7 @@ public static string ToValueString(this ServerMessageEndOfCallReportEndedReason
ServerMessageEndOfCallReportEndedReason.CallStartErrorVapifaultDatabaseError => "call.start.error-vapifault-database-error",
ServerMessageEndOfCallReportEndedReason.CallStartErrorVapifaultGetOrg => "call.start.error-vapifault-get-org",
ServerMessageEndOfCallReportEndedReason.CallStartErrorVapifaultGetSubscription => "call.start.error-vapifault-get-subscription",
ServerMessageEndOfCallReportEndedReason.CallStartErrorVapifaultWorkerNotAvailable => "call.start.error-vapifault-worker-not-available",
ServerMessageEndOfCallReportEndedReason.CallStartSquadVersionErrorValidation => "call.start.squad-version-error-validation",
ServerMessageEndOfCallReportEndedReason.CustomerBusy => "customer-busy",
ServerMessageEndOfCallReportEndedReason.CustomerDidNotAnswer => "customer-did-not-answer",
Expand Down Expand Up @@ -3371,6 +3376,7 @@ public static string ToValueString(this ServerMessageEndOfCallReportEndedReason
"call.start.error-vapifault-database-error" => ServerMessageEndOfCallReportEndedReason.CallStartErrorVapifaultDatabaseError,
"call.start.error-vapifault-get-org" => ServerMessageEndOfCallReportEndedReason.CallStartErrorVapifaultGetOrg,
"call.start.error-vapifault-get-subscription" => ServerMessageEndOfCallReportEndedReason.CallStartErrorVapifaultGetSubscription,
"call.start.error-vapifault-worker-not-available" => ServerMessageEndOfCallReportEndedReason.CallStartErrorVapifaultWorkerNotAvailable,
"call.start.squad-version-error-validation" => ServerMessageEndOfCallReportEndedReason.CallStartSquadVersionErrorValidation,
"customer-busy" => ServerMessageEndOfCallReportEndedReason.CustomerBusy,
"customer-did-not-answer" => ServerMessageEndOfCallReportEndedReason.CustomerDidNotAnswer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1307,6 +1307,10 @@ public enum ServerMessageStatusUpdateEndedReason
/// <summary>
///
/// </summary>
CallStartErrorVapifaultWorkerNotAvailable,
/// <summary>
///
/// </summary>
CallStartSquadVersionErrorValidation,
/// <summary>
///
Expand Down Expand Up @@ -2758,6 +2762,7 @@ public static string ToValueString(this ServerMessageStatusUpdateEndedReason val
ServerMessageStatusUpdateEndedReason.CallStartErrorVapifaultDatabaseError => "call.start.error-vapifault-database-error",
ServerMessageStatusUpdateEndedReason.CallStartErrorVapifaultGetOrg => "call.start.error-vapifault-get-org",
ServerMessageStatusUpdateEndedReason.CallStartErrorVapifaultGetSubscription => "call.start.error-vapifault-get-subscription",
ServerMessageStatusUpdateEndedReason.CallStartErrorVapifaultWorkerNotAvailable => "call.start.error-vapifault-worker-not-available",
ServerMessageStatusUpdateEndedReason.CallStartSquadVersionErrorValidation => "call.start.squad-version-error-validation",
ServerMessageStatusUpdateEndedReason.CustomerBusy => "customer-busy",
ServerMessageStatusUpdateEndedReason.CustomerDidNotAnswer => "customer-did-not-answer",
Expand Down Expand Up @@ -3371,6 +3376,7 @@ public static string ToValueString(this ServerMessageStatusUpdateEndedReason val
"call.start.error-vapifault-database-error" => ServerMessageStatusUpdateEndedReason.CallStartErrorVapifaultDatabaseError,
"call.start.error-vapifault-get-org" => ServerMessageStatusUpdateEndedReason.CallStartErrorVapifaultGetOrg,
"call.start.error-vapifault-get-subscription" => ServerMessageStatusUpdateEndedReason.CallStartErrorVapifaultGetSubscription,
"call.start.error-vapifault-worker-not-available" => ServerMessageStatusUpdateEndedReason.CallStartErrorVapifaultWorkerNotAvailable,
"call.start.squad-version-error-validation" => ServerMessageStatusUpdateEndedReason.CallStartSquadVersionErrorValidation,
"customer-busy" => ServerMessageStatusUpdateEndedReason.CustomerBusy,
"customer-did-not-answer" => ServerMessageStatusUpdateEndedReason.CustomerDidNotAnswer,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
#nullable enable

namespace Vapi
{
public sealed partial class TransientTwilioPhoneNumber
{
/// <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::Vapi.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::Vapi.SourceGenerationContext.Default);
}

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

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

/// <summary>
/// Deserializes a JSON string using the generated default JsonSerializerContext.
/// </summary>
public static global::Vapi.TransientTwilioPhoneNumber? FromJson(
string json)
{
return FromJson(
json,
global::Vapi.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::Vapi.TransientTwilioPhoneNumber? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
if (jsonSerializerOptions is null)
{
return FromJson(
json,
global::Vapi.SourceGenerationContext.Default);
}

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

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::Vapi.TransientTwilioPhoneNumber?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
typeof(global::Vapi.TransientTwilioPhoneNumber),
jsonSerializerContext).ConfigureAwait(false)) as global::Vapi.TransientTwilioPhoneNumber;
}

/// <summary>
/// Deserializes a JSON stream using the generated default JsonSerializerContext.
/// </summary>
public static global::System.Threading.Tasks.ValueTask<global::Vapi.TransientTwilioPhoneNumber?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream)
{
return FromJsonStreamAsync(
jsonStream,
global::Vapi.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::Vapi.TransientTwilioPhoneNumber?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
if (jsonSerializerOptions is null)
{
return FromJsonStreamAsync(
jsonStream,
global::Vapi.SourceGenerationContext.Default);
}

return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Vapi.TransientTwilioPhoneNumber?>(
jsonStream,
jsonSerializerOptions);
}
}
}
Loading
Loading