From b1642aa68f771d4879bc24320b499bbe60bf2e69 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 29 Aug 2026 05:34:23 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...nConverters.RedactedAudioNotification.g.cs | 74 +++---- ...blyAI.JsonConverters.TranscriptParams.g.cs | 196 +++++------------- .../AssemblyAI.JsonSerializerContext.g.cs | 2 +- ...AssemblyAI.JsonSerializerContextTypes.g.cs | 5 + ...mblyAI.Realtime.JsonSerializerContext.g.cs | 1 + ...I.Realtime.JsonSerializerContextTypes.g.cs | 5 + 6 files changed, 86 insertions(+), 197 deletions(-) diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.RedactedAudioNotification.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.RedactedAudioNotification.g.cs index d742a5b..61074ce 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.RedactedAudioNotification.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.RedactedAudioNotification.g.cs @@ -17,60 +17,20 @@ public class RedactedAudioNotificationJsonConverter : global::System.Text.Json.S using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); var __rawJson = __jsonDocument.RootElement.GetRawText(); - var __jsonProps = new global::System.Collections.Generic.HashSet(); - if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) - { - foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) - { - __jsonProps.Add(__jsonProp.Name); - - } - } - - var __score0 = 0; - if (__jsonProps.Contains("redacted_audio_url")) __score0++; - if (__jsonProps.Contains("status")) __score0++; - var __bestScore = 0; - var __bestIndex = -1; - if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } global::AssemblyAI.RedactedAudioResponse? response = default; - if (__bestIndex >= 0) + try { - if (__bestIndex == 0) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.RedactedAudioResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.RedactedAudioResponse).Name}"); - response = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.RedactedAudioResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.RedactedAudioResponse).Name}"); + response = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } - - if (response == null) + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) { - try - { - - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.RedactedAudioResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.RedactedAudioResponse).Name}"); - response = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } } - var __value = new global::AssemblyAI.RedactedAudioNotification( response ); @@ -87,12 +47,28 @@ public override void Write( 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(global::System.StringComparer.Ordinal); if (value.IsResponse) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.RedactedAudioResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.RedactedAudioResponse).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Response!, typeInfo); + var __element0 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.Response!, 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); + } + } } + writer.WriteEndObject(); } } } \ No newline at end of file diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.TranscriptParams.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.TranscriptParams.g.cs index ac6ce97..195b0e1 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.TranscriptParams.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.TranscriptParams.g.cs @@ -17,160 +17,34 @@ public class TranscriptParamsJsonConverter : global::System.Text.Json.Serializat using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); var __rawJson = __jsonDocument.RootElement.GetRawText(); - var __jsonProps = new global::System.Collections.Generic.HashSet(); - if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) - { - foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) - { - __jsonProps.Add(__jsonProp.Name); - if (__jsonProp.Value.ValueKind == global::System.Text.Json.JsonValueKind.Object) - { - foreach (var __nestedJsonProp in __jsonProp.Value.EnumerateObject()) - { - __jsonProps.Add(__jsonProp.Name + "." + __nestedJsonProp.Name); - } - } - } + global::AssemblyAI.TranscriptParamsVariant1? transcriptParamsVariant1 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.TranscriptParamsVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.TranscriptParamsVariant1).Name}"); + transcriptParamsVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { } - var __score0 = 0; - if (__jsonProps.Contains("audio_url")) __score0++; - var __score1 = 0; - if (__jsonProps.Contains("audio_end_at")) __score1++; - if (__jsonProps.Contains("audio_start_from")) __score1++; - if (__jsonProps.Contains("auto_chapters")) __score1++; - if (__jsonProps.Contains("auto_highlights")) __score1++; - if (__jsonProps.Contains("content_safety")) __score1++; - if (__jsonProps.Contains("content_safety_confidence")) __score1++; - if (__jsonProps.Contains("custom_spelling")) __score1++; - if (__jsonProps.Contains("custom_topics")) __score1++; - if (__jsonProps.Contains("disfluencies")) __score1++; - if (__jsonProps.Contains("domain")) __score1++; - if (__jsonProps.Contains("entity_detection")) __score1++; - if (__jsonProps.Contains("filter_profanity")) __score1++; - if (__jsonProps.Contains("format_text")) __score1++; - if (__jsonProps.Contains("iab_categories")) __score1++; - if (__jsonProps.Contains("keyterms_prompt")) __score1++; - if (__jsonProps.Contains("language_code")) __score1++; - if (__jsonProps.Contains("language_codes")) __score1++; - if (__jsonProps.Contains("language_confidence_threshold")) __score1++; - if (__jsonProps.Contains("language_detection")) __score1++; - if (__jsonProps.Contains("language_detection_options")) __score1++; - if (__jsonProps.Contains("language_detection_options.code_switching")) __score1++; - if (__jsonProps.Contains("language_detection_options.code_switching_confidence_threshold")) __score1++; - if (__jsonProps.Contains("language_detection_options.expected_languages")) __score1++; - if (__jsonProps.Contains("language_detection_options.fallback_language")) __score1++; - if (__jsonProps.Contains("language_detection_options.localization")) __score1++; - if (__jsonProps.Contains("language_detection_options.on_no_speech_detected")) __score1++; - if (__jsonProps.Contains("multichannel")) __score1++; - if (__jsonProps.Contains("prompt")) __score1++; - if (__jsonProps.Contains("punctuate")) __score1++; - if (__jsonProps.Contains("redact_pii")) __score1++; - if (__jsonProps.Contains("redact_pii_audio")) __score1++; - if (__jsonProps.Contains("redact_pii_audio_options")) __score1++; - if (__jsonProps.Contains("redact_pii_audio_options.override_audio_redaction_method")) __score1++; - if (__jsonProps.Contains("redact_pii_audio_options.return_redacted_no_speech_audio")) __score1++; - if (__jsonProps.Contains("redact_pii_audio_quality")) __score1++; - if (__jsonProps.Contains("redact_pii_policies")) __score1++; - if (__jsonProps.Contains("redact_pii_return_unredacted")) __score1++; - if (__jsonProps.Contains("redact_pii_sub")) __score1++; - if (__jsonProps.Contains("redact_static_entities")) __score1++; - if (__jsonProps.Contains("remove_audio_tags")) __score1++; - if (__jsonProps.Contains("sentiment_analysis")) __score1++; - if (__jsonProps.Contains("speaker_labels")) __score1++; - if (__jsonProps.Contains("speaker_options")) __score1++; - if (__jsonProps.Contains("speaker_options.max_speakers_expected")) __score1++; - if (__jsonProps.Contains("speaker_options.min_speakers_expected")) __score1++; - if (__jsonProps.Contains("speakers_expected")) __score1++; - if (__jsonProps.Contains("speech_model")) __score1++; - if (__jsonProps.Contains("speech_models")) __score1++; - if (__jsonProps.Contains("speech_threshold")) __score1++; - if (__jsonProps.Contains("speech_understanding")) __score1++; - if (__jsonProps.Contains("speech_understanding.request")) __score1++; - if (__jsonProps.Contains("summarization")) __score1++; - if (__jsonProps.Contains("summary_model")) __score1++; - if (__jsonProps.Contains("summary_type")) __score1++; - if (__jsonProps.Contains("temperature")) __score1++; - if (__jsonProps.Contains("topics")) __score1++; - if (__jsonProps.Contains("webhook_auth_header_name")) __score1++; - if (__jsonProps.Contains("webhook_auth_header_value")) __score1++; - if (__jsonProps.Contains("webhook_url")) __score1++; - var __bestScore = 0; - var __bestIndex = -1; - if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } - if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } - - global::AssemblyAI.TranscriptParamsVariant1? transcriptParamsVariant1 = default; global::AssemblyAI.TranscriptOptionalParams? optional = default; - if (__bestIndex >= 0) + try { - if (__bestIndex == 0) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.TranscriptParamsVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.TranscriptParamsVariant1).Name}"); - transcriptParamsVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - else if (__bestIndex == 1) - { - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.TranscriptOptionalParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.TranscriptOptionalParams).Name}"); - optional = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.TranscriptOptionalParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.TranscriptOptionalParams).Name}"); + optional = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } - - if (transcriptParamsVariant1 == null && optional == null) + catch (global::System.Text.Json.JsonException) { - try - { - - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.TranscriptParamsVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.TranscriptParamsVariant1).Name}"); - transcriptParamsVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } } - - if (transcriptParamsVariant1 == null && optional == null) + catch (global::System.InvalidOperationException) { - try - { - - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.TranscriptOptionalParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.TranscriptOptionalParams).Name}"); - optional = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } } - var __value = new global::AssemblyAI.TranscriptParams( transcriptParamsVariant1, @@ -189,18 +63,46 @@ public override void Write( 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(global::System.StringComparer.Ordinal); if (value.IsTranscriptParamsVariant1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.TranscriptParamsVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.TranscriptParamsVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.TranscriptParamsVariant1!, typeInfo); + var __element0 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.TranscriptParamsVariant1!, 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); + } + } } - else if (value.IsOptional) + if (value.IsOptional) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.TranscriptOptionalParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.TranscriptOptionalParams).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Optional!, typeInfo); + var __element1 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.Optional!, 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(); } } } \ No newline at end of file diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonSerializerContext.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonSerializerContext.g.cs index 949c4a3..7c46a52 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonSerializerContext.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonSerializerContext.g.cs @@ -130,6 +130,7 @@ namespace AssemblyAI typeof(global::AssemblyAI.JsonConverters.UnixTimestampJsonConverter), })] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.JsonSerializerContextTypes))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.TranscriptReadyNotification))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Guid))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.TranscriptReadyStatus), TypeInfoPropertyName = "TranscriptReadyStatus2")] @@ -288,7 +289,6 @@ namespace AssemblyAI [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] public sealed partial class SourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext { } diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonSerializerContextTypes.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonSerializerContextTypes.g.cs index d8cc6cf..5243b22 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonSerializerContextTypes.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonSerializerContextTypes.g.cs @@ -20,6 +20,11 @@ public sealed partial class JsonSerializerContextTypes /// public global::System.Collections.Generic.Dictionary? StringObjectDictionary { get; set; } + /// + /// Runtime object lists used by dynamic JSON payloads such as tool arguments. + /// + public global::System.Collections.Generic.List? ObjectList { get; set; } + /// /// /// diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.Realtime.JsonSerializerContext.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.Realtime.JsonSerializerContext.g.cs index 12dfb34..3a1fbf2 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.Realtime.JsonSerializerContext.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.Realtime.JsonSerializerContext.g.cs @@ -64,6 +64,7 @@ namespace AssemblyAI.Realtime typeof(global::AssemblyAI.Realtime.JsonConverters.ServerEventJsonConverter), })] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.Realtime.JsonSerializerContextTypes))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.Realtime.UpdateConfigurationPayload))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.Realtime.UpdateConfigurationPayloadType), TypeInfoPropertyName = "UpdateConfigurationPayloadType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.Realtime.JsonSerializerContextTypes.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.Realtime.JsonSerializerContextTypes.g.cs index e1a2ce8..648681d 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.Realtime.JsonSerializerContextTypes.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.Realtime.JsonSerializerContextTypes.g.cs @@ -20,6 +20,11 @@ public sealed partial class JsonSerializerContextTypes /// public global::System.Collections.Generic.Dictionary? StringObjectDictionary { get; set; } + /// + /// Runtime object lists used by dynamic JSON payloads such as tool arguments. + /// + public global::System.Collections.Generic.List? ObjectList { get; set; } + /// /// ///