From 2667582bdfc7ba81e945286b23617baff27829b7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 10 May 2026 19:14:29 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...ApplicationJsonSchemaDynamicVariables.g.cs | 36 ++++ ...JsonSchemaItemIntelligenceDescription.g.cs | 24 +++ ...JsonSchemaItemIntelligenceDescription.g.cs | 24 +++ ...tionJsonSchemaItemMetricsHasWatermark.g.cs | 24 +++ .../Generated/ResembleAI.OneOf.2.g.cs | 24 +++ .../Generated/ResembleAI.OptionsSupport.g.cs | 175 ++++++++++++++++++ 6 files changed, 307 insertions(+) diff --git a/src/libs/ResembleAI/Generated/ResembleAI.Models.AgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariables.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.Models.AgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariables.g.cs index adb894d..6fcdb5f 100644 --- a/src/libs/ResembleAI/Generated/ResembleAI.Models.AgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariables.g.cs +++ b/src/libs/ResembleAI/Generated/ResembleAI.Models.AgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariables.g.cs @@ -39,6 +39,13 @@ public bool TryPickAgentsPostRequestBodyContentApplicationJsonSchemaDynamicVaria return IsAgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariablesVariant1; } + /// + /// + /// + public string PickAgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariablesVariant1() => IsAgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariablesVariant1 + ? AgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariablesVariant1! + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariablesVariant1' but the value was {ToString()}."); + /// /// /// @@ -69,6 +76,13 @@ public bool TryPickAgentsPostRequestBodyContentApplicationJsonSchemaDynamicVaria return IsAgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariablesVariant2; } + /// + /// + /// + public double PickAgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariablesVariant2() => IsAgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariablesVariant2 + ? AgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariablesVariant2!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariablesVariant2' but the value was {ToString()}."); + /// /// /// @@ -98,6 +112,13 @@ public bool TryPickAgentsPostRequestBodyContentApplicationJsonSchemaDynamicVaria value = AgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariablesVariant3; return IsAgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariablesVariant3; } + + /// + /// + /// + public bool PickAgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariablesVariant3() => IsAgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariablesVariant3 + ? AgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariablesVariant3!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'AgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariablesVariant3' but the value was {ToString()}."); /// /// /// @@ -116,6 +137,11 @@ public AgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariables(string? AgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariablesVariant1 = value; } + /// + /// + /// + public static AgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariables FromAgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariablesVariant1(string? value) => new AgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariables(value); + /// /// /// @@ -134,6 +160,11 @@ public AgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariables(double? AgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariablesVariant2 = value; } + /// + /// + /// + public static AgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariables FromAgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariablesVariant2(double? value) => new AgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariables(value); + /// /// /// @@ -152,6 +183,11 @@ public AgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariables(bool? v AgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariablesVariant3 = value; } + /// + /// + /// + public static AgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariables FromAgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariablesVariant3(bool? value) => new AgentsPostRequestBodyContentApplicationJsonSchemaDynamicVariables(value); + /// /// /// diff --git a/src/libs/ResembleAI/Generated/ResembleAI.Models.DetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescription.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.Models.DetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescription.g.cs index d6cc935..13d2788 100644 --- a/src/libs/ResembleAI/Generated/ResembleAI.Models.DetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescription.g.cs +++ b/src/libs/ResembleAI/Generated/ResembleAI.Models.DetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescription.g.cs @@ -39,6 +39,13 @@ public bool TryPickDetectPostResponsesContentApplicationJsonSchemaItemIntelligen return IsDetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescriptionVariant1; } + /// + /// + /// + public string PickDetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescriptionVariant1() => IsDetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescriptionVariant1 + ? DetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescriptionVariant1! + : throw new global::System.InvalidOperationException($"Expected union variant 'DetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescriptionVariant1' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickDetectPostResponsesContentApplicationJsonSchemaItemIntelligen value = DetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescription1; return IsDetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescription1; } + + /// + /// + /// + public global::ResembleAI.DetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescription1 PickDetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescription1() => IsDetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescription1 + ? DetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescription1! + : throw new global::System.InvalidOperationException($"Expected union variant 'DetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescription1' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public DetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescriptio DetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescriptionVariant1 = value; } + /// + /// + /// + public static DetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescription FromDetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescriptionVariant1(string? value) => new DetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescription(value); + /// /// /// @@ -104,6 +123,11 @@ public DetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescriptio DetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescription1 = value; } + /// + /// + /// + public static DetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescription FromDetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescription1(global::ResembleAI.DetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescription1? value) => new DetectPostResponsesContentApplicationJsonSchemaItemIntelligenceDescription(value); + /// /// /// diff --git a/src/libs/ResembleAI/Generated/ResembleAI.Models.DetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescription.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.Models.DetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescription.g.cs index bfbd4ad..f1323ad 100644 --- a/src/libs/ResembleAI/Generated/ResembleAI.Models.DetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescription.g.cs +++ b/src/libs/ResembleAI/Generated/ResembleAI.Models.DetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescription.g.cs @@ -39,6 +39,13 @@ public bool TryPickDetectUuidGetResponsesContentApplicationJsonSchemaItemIntelli return IsDetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescriptionVariant1; } + /// + /// + /// + public string PickDetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescriptionVariant1() => IsDetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescriptionVariant1 + ? DetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescriptionVariant1! + : throw new global::System.InvalidOperationException($"Expected union variant 'DetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescriptionVariant1' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickDetectUuidGetResponsesContentApplicationJsonSchemaItemIntelli value = DetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescription1; return IsDetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescription1; } + + /// + /// + /// + public global::ResembleAI.DetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescription1 PickDetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescription1() => IsDetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescription1 + ? DetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescription1! + : throw new global::System.InvalidOperationException($"Expected union variant 'DetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescription1' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public DetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescrip DetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescriptionVariant1 = value; } + /// + /// + /// + public static DetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescription FromDetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescriptionVariant1(string? value) => new DetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescription(value); + /// /// /// @@ -104,6 +123,11 @@ public DetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescrip DetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescription1 = value; } + /// + /// + /// + public static DetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescription FromDetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescription1(global::ResembleAI.DetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescription1? value) => new DetectUuidGetResponsesContentApplicationJsonSchemaItemIntelligenceDescription(value); + /// /// /// diff --git a/src/libs/ResembleAI/Generated/ResembleAI.Models.WatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetricsHasWatermark.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.Models.WatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetricsHasWatermark.g.cs index 0ae4760..dae6596 100644 --- a/src/libs/ResembleAI/Generated/ResembleAI.Models.WatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetricsHasWatermark.g.cs +++ b/src/libs/ResembleAI/Generated/ResembleAI.Models.WatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetricsHasWatermark.g.cs @@ -39,6 +39,13 @@ public bool TryPickWatermarkDetectUuidResultGetResponsesContentApplicationJsonSc return IsWatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetricsHasWatermarkVariant1; } + /// + /// + /// + public global::System.Collections.Generic.Dictionary PickWatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetricsHasWatermarkVariant1() => IsWatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetricsHasWatermarkVariant1 + ? WatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetricsHasWatermarkVariant1! + : throw new global::System.InvalidOperationException($"Expected union variant 'WatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetricsHasWatermarkVariant1' but the value was {ToString()}."); + /// /// /// @@ -68,6 +75,13 @@ public bool TryPickWatermarkDetectUuidResultGetResponsesContentApplicationJsonSc value = WatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetricsHasWatermarkVariant2; return IsWatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetricsHasWatermarkVariant2; } + + /// + /// + /// + public bool PickWatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetricsHasWatermarkVariant2() => IsWatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetricsHasWatermarkVariant2 + ? WatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetricsHasWatermarkVariant2!.Value + : throw new global::System.InvalidOperationException($"Expected union variant 'WatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetricsHasWatermarkVariant2' but the value was {ToString()}."); /// /// /// @@ -86,6 +100,11 @@ public WatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetr WatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetricsHasWatermarkVariant1 = value; } + /// + /// + /// + public static WatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetricsHasWatermark FromWatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetricsHasWatermarkVariant1(global::System.Collections.Generic.Dictionary? value) => new WatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetricsHasWatermark(value); + /// /// /// @@ -104,6 +123,11 @@ public WatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetr WatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetricsHasWatermarkVariant2 = value; } + /// + /// + /// + public static WatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetricsHasWatermark FromWatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetricsHasWatermarkVariant2(bool? value) => new WatermarkDetectUuidResultGetResponsesContentApplicationJsonSchemaItemMetricsHasWatermark(value); + /// /// /// diff --git a/src/libs/ResembleAI/Generated/ResembleAI.OneOf.2.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.OneOf.2.g.cs index 63df703..952426b 100644 --- a/src/libs/ResembleAI/Generated/ResembleAI.OneOf.2.g.cs +++ b/src/libs/ResembleAI/Generated/ResembleAI.OneOf.2.g.cs @@ -38,6 +38,13 @@ public bool TryPickValue1( return IsValue1; } + /// + /// + /// + public T1 PickValue1() => IsValue1 + ? Value1! + : throw new global::System.InvalidOperationException($"Expected union variant 'Value1' but the value was {ToString()}."); + /// /// /// @@ -67,6 +74,13 @@ public bool TryPickValue2( value = Value2; return IsValue2; } + + /// + /// + /// + public T2 PickValue2() => IsValue2 + ? Value2! + : throw new global::System.InvalidOperationException($"Expected union variant 'Value2' but the value was {ToString()}."); /// /// /// @@ -85,6 +99,11 @@ public OneOf(T1? value) Value1 = value; } + /// + /// + /// + public static OneOf FromValue1(T1? value) => new OneOf(value); + /// /// /// @@ -103,6 +122,11 @@ public OneOf(T2? value) Value2 = value; } + /// + /// + /// + public static OneOf FromValue2(T2? value) => new OneOf(value); + /// /// /// diff --git a/src/libs/ResembleAI/Generated/ResembleAI.OptionsSupport.g.cs b/src/libs/ResembleAI/Generated/ResembleAI.OptionsSupport.g.cs index 0688739..9a9a9e7 100644 --- a/src/libs/ResembleAI/Generated/ResembleAI.OptionsSupport.g.cs +++ b/src/libs/ResembleAI/Generated/ResembleAI.OptionsSupport.g.cs @@ -54,6 +54,172 @@ public sealed class AutoSDKClientOptions Hooks.Add(hook ?? throw new global::System.ArgumentNullException(nameof(hook))); return this; } + + /// + /// Optional per-request authorization provider invoked before each request is sent. + /// Set this when the client is registered as a singleton in DI but each call needs + /// a fresh credential resolved from a provider, secret-store, or session — instead + /// of mutating the shared Authorizations list at construction time. + /// + public global::ResembleAI.IAutoSDKAuthorizationProvider? AuthorizationProvider { get; set; } + + /// + /// Convenience helper that registers + /// using so request-level auth is resolved without + /// touching shared client state. + /// + /// + public global::ResembleAI.AutoSDKClientOptions UseAuthorizationProvider( + global::ResembleAI.IAutoSDKAuthorizationProvider provider) + { + AuthorizationProvider = provider ?? throw new global::System.ArgumentNullException(nameof(provider)); + if (Hooks.Find(static x => x is global::ResembleAI.AutoSDKAuthorizationProviderHook) == null) + { + Hooks.Add(new global::ResembleAI.AutoSDKAuthorizationProviderHook()); + } + + return this; + } + } + + /// + /// A request-level authorization value supplied by . + /// Mirrors the runtime fields the SDK applies for HTTP / OAuth2 / API-key auth without + /// requiring the consumer to construct the generated EndPointAuthorization type. + /// + public readonly struct AutoSDKAuthorizationValue + { + /// + /// Initializes a new . + /// + /// + /// + /// + /// + /// + public AutoSDKAuthorizationValue( + string value, + string scheme = "Bearer", + string? headerName = null, + string location = "Header", + string type = "Http") + { + Value = value ?? string.Empty; + Scheme = string.IsNullOrWhiteSpace(scheme) ? "Bearer" : scheme; + HeaderName = headerName ?? string.Empty; + Location = string.IsNullOrWhiteSpace(location) ? "Header" : location; + Type = string.IsNullOrWhiteSpace(type) ? "Http" : type; + } + + /// The credential value (token, API key, etc.). + public string Value { get; } + + /// The HTTP authorization scheme — typically Bearer, Basic, or Token. + public string Scheme { get; } + + /// The custom header name when is ApiKey; ignored for HTTP/OAuth2 auth. + public string HeaderName { get; } + + /// The credential location — Header, Query, or Cookie. + public string Location { get; } + + /// The auth type — Http, OAuth2, OpenIdConnect, or ApiKey. + public string Type { get; } + + /// Convenience factory for a Bearer token. + public static global::ResembleAI.AutoSDKAuthorizationValue Bearer(string token) => new(value: token, scheme: "Bearer"); + + /// Convenience factory for an API-key header. + public static global::ResembleAI.AutoSDKAuthorizationValue ApiKeyHeader(string name, string value) => + new(value: value, headerName: name, location: "Header", type: "ApiKey"); + } + + /// + /// Resolves request-level authorization values without mutating the shared client + /// authorization list. Implementations should be safe to invoke concurrently — + /// the hook calls them once per outgoing request. + /// + public interface IAutoSDKAuthorizationProvider + { + /// + /// Returns one or more values to apply to + /// the current request, or an empty list / null to leave the request as-is. + /// + /// + global::System.Threading.Tasks.Task?> ResolveAsync( + global::ResembleAI.AutoSDKHookContext context); + } + + /// + /// Built-in that consults + /// before every outgoing + /// request and stamps the resolved values onto the . + /// + public sealed class AutoSDKAuthorizationProviderHook : global::ResembleAI.AutoSDKHook + { + /// + public override async global::System.Threading.Tasks.Task OnBeforeRequestAsync( + global::ResembleAI.AutoSDKHookContext context) + { + context = context ?? throw new global::System.ArgumentNullException(nameof(context)); + + if (context.Request == null) + { + return; + } + + var perRequest = context.RequestOptions?.Authorizations; + if (perRequest != null && perRequest.Count > 0) + { + for (var index = 0; index < perRequest.Count; index++) + { + ApplyAuthorization(context.Request, perRequest[index]); + } + + return; + } + + var provider = context.ClientOptions?.AuthorizationProvider; + if (provider == null) + { + return; + } + + var resolved = await provider.ResolveAsync(context).ConfigureAwait(false); + if (resolved == null || resolved.Count == 0) + { + return; + } + + for (var index = 0; index < resolved.Count; index++) + { + ApplyAuthorization(context.Request, resolved[index]); + } + } + + private static void ApplyAuthorization( + global::System.Net.Http.HttpRequestMessage request, + global::ResembleAI.AutoSDKAuthorizationValue authorization) + { + switch (authorization.Type) + { + case "Http": + case "OAuth2": + case "OpenIdConnect": + request.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: authorization.Scheme, + parameter: authorization.Value); + break; + case "ApiKey": + if (string.Equals(authorization.Location, "Header", global::System.StringComparison.OrdinalIgnoreCase) && + !string.IsNullOrEmpty(authorization.HeaderName)) + { + request.Headers.Remove(authorization.HeaderName); + request.Headers.TryAddWithoutValidation(authorization.HeaderName, authorization.Value ?? string.Empty); + } + break; + } + } } /// @@ -87,6 +253,15 @@ public sealed class AutoSDKRequestOptions /// Overrides response buffering for this request when set. /// public bool? ReadResponseAsString { get; set; } + + /// + /// Optional per-request authorization values. When non-empty, the built-in + /// applies these instead of consulting + /// for this request only. + /// Useful for multi-tenant routing or "act-as" admin tooling that needs a different + /// credential per call without mutating shared client state. + /// + public global::System.Collections.Generic.IReadOnlyList? Authorizations { get; set; } } ///