From 87c6fc31fa9bd9a624b4c740159b160f8f9b01d4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 7 May 2026 21:52:09 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- src/libs/V0/Generated/V0.AnyOf.3.g.cs | 272 ------ ...V0.IMcpServersClient.McpServersCreate.g.cs | 8 +- ...McpServersCreateOAuthAuthorizationUrl.g.cs | 54 ++ ...V0.IMcpServersClient.McpServersUpdate.g.cs | 2 +- .../Generated/V0.JsonConverters.AnyOf3.g.cs | 210 ----- .../Generated/V0.JsonSerializerContext.g.cs | 16 +- .../V0.JsonSerializerContextTypes.g.cs | 236 +++--- .../V0.McpServersClient.McpServersCreate.g.cs | 8 +- ...McpServersCreateOAuthAuthorizationUrl.g.cs | 782 ++++++++++++++++++ .../V0.McpServersClient.McpServersUpdate.g.cs | 2 +- ...eateOAuthAuthorizationUrlRequest.Json.g.cs | 92 +++ ...ersCreateOAuthAuthorizationUrlRequest.g.cs | 46 ++ ...ateOAuthAuthorizationUrlResponse.Json.g.cs | 92 +++ ...rsCreateOAuthAuthorizationUrlResponse.g.cs | 94 +++ .../V0.Models.McpServersCreateRequest.g.cs | 6 +- ...erversCreateRequestAuthVariant4.Json.g.cs} | 22 +- ...s.McpServersCreateRequestAuthVariant4.g.cs | 58 ++ ...sCreateRequestAuthVariant4Config.Json.g.cs | 92 +++ ...erversCreateRequestAuthVariant4Config.g.cs | 151 ++++ .../V0.Models.McpServersUpdateRequest.g.cs | 6 +- ...ServersUpdateRequestAuthVariant4.Json.g.cs | 92 +++ ...s.McpServersUpdateRequestAuthVariant4.g.cs | 58 ++ ...sUpdateRequestAuthVariant4Config.Json.g.cs | 92 +++ ...erversUpdateRequestAuthVariant4Config.g.cs | 151 ++++ src/libs/V0/openapi.yaml | 228 ++++- 25 files changed, 2246 insertions(+), 624 deletions(-) delete mode 100644 src/libs/V0/Generated/V0.AnyOf.3.g.cs create mode 100644 src/libs/V0/Generated/V0.IMcpServersClient.McpServersCreateOAuthAuthorizationUrl.g.cs delete mode 100644 src/libs/V0/Generated/V0.JsonConverters.AnyOf3.g.cs create mode 100644 src/libs/V0/Generated/V0.McpServersClient.McpServersCreateOAuthAuthorizationUrl.g.cs create mode 100644 src/libs/V0/Generated/V0.Models.McpServersCreateOAuthAuthorizationUrlRequest.Json.g.cs create mode 100644 src/libs/V0/Generated/V0.Models.McpServersCreateOAuthAuthorizationUrlRequest.g.cs create mode 100644 src/libs/V0/Generated/V0.Models.McpServersCreateOAuthAuthorizationUrlResponse.Json.g.cs create mode 100644 src/libs/V0/Generated/V0.Models.McpServersCreateOAuthAuthorizationUrlResponse.g.cs rename src/libs/V0/Generated/{V0.AnyOf.3.Json.g.cs => V0.Models.McpServersCreateRequestAuthVariant4.Json.g.cs} (85%) create mode 100644 src/libs/V0/Generated/V0.Models.McpServersCreateRequestAuthVariant4.g.cs create mode 100644 src/libs/V0/Generated/V0.Models.McpServersCreateRequestAuthVariant4Config.Json.g.cs create mode 100644 src/libs/V0/Generated/V0.Models.McpServersCreateRequestAuthVariant4Config.g.cs create mode 100644 src/libs/V0/Generated/V0.Models.McpServersUpdateRequestAuthVariant4.Json.g.cs create mode 100644 src/libs/V0/Generated/V0.Models.McpServersUpdateRequestAuthVariant4.g.cs create mode 100644 src/libs/V0/Generated/V0.Models.McpServersUpdateRequestAuthVariant4Config.Json.g.cs create mode 100644 src/libs/V0/Generated/V0.Models.McpServersUpdateRequestAuthVariant4Config.g.cs diff --git a/src/libs/V0/Generated/V0.AnyOf.3.g.cs b/src/libs/V0/Generated/V0.AnyOf.3.g.cs deleted file mode 100644 index 8cf8262..0000000 --- a/src/libs/V0/Generated/V0.AnyOf.3.g.cs +++ /dev/null @@ -1,272 +0,0 @@ - -#nullable enable - -namespace V0 -{ - /// - /// - /// - public readonly partial struct AnyOf : global::System.IEquatable> - { - /// - /// - /// -#if NET6_0_OR_GREATER - public T1? Value1 { get; init; } -#else - public T1? Value1 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] -#endif - public bool IsValue1 => Value1 != null; - - /// - /// - /// -#if NET6_0_OR_GREATER - public T2? Value2 { get; init; } -#else - public T2? Value2 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; - - /// - /// - /// -#if NET6_0_OR_GREATER - public T3? Value3 { get; init; } -#else - public T3? Value3 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] -#endif - public bool IsValue3 => Value3 != null; - /// - /// - /// - public static implicit operator AnyOf(T1 value) => new AnyOf((T1?)value); - - /// - /// - /// - public static implicit operator T1?(AnyOf @this) => @this.Value1; - - /// - /// - /// - public AnyOf(T1? value) - { - Value1 = value; - } - - /// - /// - /// - public static implicit operator AnyOf(T2 value) => new AnyOf((T2?)value); - - /// - /// - /// - public static implicit operator T2?(AnyOf @this) => @this.Value2; - - /// - /// - /// - public AnyOf(T2? value) - { - Value2 = value; - } - - /// - /// - /// - public static implicit operator AnyOf(T3 value) => new AnyOf((T3?)value); - - /// - /// - /// - public static implicit operator T3?(AnyOf @this) => @this.Value3; - - /// - /// - /// - public AnyOf(T3? value) - { - Value3 = value; - } - - /// - /// - /// - public AnyOf( - T1? value1, - T2? value2, - T3? value3 - ) - { - Value1 = value1; - Value2 = value2; - Value3 = value3; - } - - /// - /// - /// - public object? Object => - Value3 as object ?? - Value2 as object ?? - Value1 as object - ; - - /// - /// - /// - public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() ?? - Value3?.ToString() - ; - - /// - /// - /// - public bool Validate() - { - return IsValue1 || IsValue2 || IsValue3; - } - - /// - /// - /// - public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, - global::System.Func? value3 = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsValue1 && value1 != null) - { - return value1(Value1!); - } - else if (IsValue2 && value2 != null) - { - return value2(Value2!); - } - else if (IsValue3 && value3 != null) - { - return value3(Value3!); - } - - return default(TResult); - } - - /// - /// - /// - public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, - global::System.Action? value3 = null, - bool validate = true) - { - if (validate) - { - Validate(); - } - - if (IsValue1) - { - value1?.Invoke(Value1!); - } - else if (IsValue2) - { - value2?.Invoke(Value2!); - } - else if (IsValue3) - { - value3?.Invoke(Value3!); - } - } - - /// - /// - /// - public override int GetHashCode() - { - var fields = new object?[] - { - Value1, - typeof(T1), - Value2, - typeof(T2), - Value3, - typeof(T3), - }; - const int offset = unchecked((int)2166136261); - const int prime = 16777619; - static int HashCodeAggregator(int hashCode, object? value) => value == null - ? (hashCode ^ 0) * prime - : (hashCode ^ value.GetHashCode()) * prime; - - return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); - } - - /// - /// - /// - public bool Equals(AnyOf other) - { - return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value3, other.Value3) - ; - } - - /// - /// - /// - public static bool operator ==(AnyOf obj1, AnyOf obj2) - { - return global::System.Collections.Generic.EqualityComparer>.Default.Equals(obj1, obj2); - } - - /// - /// - /// - public static bool operator !=(AnyOf obj1, AnyOf obj2) - { - return !(obj1 == obj2); - } - - /// - /// - /// - public override bool Equals(object? obj) - { - return obj is AnyOf o && Equals(o); - } - } -} diff --git a/src/libs/V0/Generated/V0.IMcpServersClient.McpServersCreate.g.cs b/src/libs/V0/Generated/V0.IMcpServersClient.McpServersCreate.g.cs index 3a87b55..da6600e 100644 --- a/src/libs/V0/Generated/V0.IMcpServersClient.McpServersCreate.g.cs +++ b/src/libs/V0/Generated/V0.IMcpServersClient.McpServersCreate.g.cs @@ -6,7 +6,7 @@ public partial interface IMcpServersClient { /// /// Create MCP Server
- /// Creates a new MCP server configuration for the authenticated user. + /// Creates a new MCP server configuration for the authenticated user. Supports OAuth, bearer token, custom headers, and unauthenticated servers. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -19,7 +19,7 @@ public partial interface IMcpServersClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Create MCP Server
- /// Creates a new MCP server configuration for the authenticated user. + /// Creates a new MCP server configuration for the authenticated user. Supports OAuth, bearer token, custom headers, and unauthenticated servers. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -32,7 +32,7 @@ public partial interface IMcpServersClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Create MCP Server
- /// Creates a new MCP server configuration for the authenticated user. + /// Creates a new MCP server configuration for the authenticated user. Supports OAuth, bearer token, custom headers, and unauthenticated servers. ///
/// /// The display name of the MCP server. @@ -63,7 +63,7 @@ public partial interface IMcpServersClient string url, string? description = default, bool? enabled = default, - global::V0.AnyOf? auth = default, + global::V0.AnyOf? auth = default, global::V0.McpServersCreateRequestScope? scope = default, global::V0.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/V0/Generated/V0.IMcpServersClient.McpServersCreateOAuthAuthorizationUrl.g.cs b/src/libs/V0/Generated/V0.IMcpServersClient.McpServersCreateOAuthAuthorizationUrl.g.cs new file mode 100644 index 0000000..a7c5c85 --- /dev/null +++ b/src/libs/V0/Generated/V0.IMcpServersClient.McpServersCreateOAuthAuthorizationUrl.g.cs @@ -0,0 +1,54 @@ +#nullable enable + +namespace V0 +{ + public partial interface IMcpServersClient + { + /// + /// Create MCP Server OAuth Authorization URL
+ /// Creates an OAuth authorization URL for an OAuth MCP server. Redirect the user to the returned URL, and the Platform API OAuth callback will store the resulting tokens before redirecting to your returnUrl. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task McpServersCreateOAuthAuthorizationUrlAsync( + string mcpServerId, + + global::V0.McpServersCreateOAuthAuthorizationUrlRequest request, + global::V0.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create MCP Server OAuth Authorization URL
+ /// Creates an OAuth authorization URL for an OAuth MCP server. Redirect the user to the returned URL, and the Platform API OAuth callback will store the resulting tokens before redirecting to your returnUrl. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> McpServersCreateOAuthAuthorizationUrlAsResponseAsync( + string mcpServerId, + + global::V0.McpServersCreateOAuthAuthorizationUrlRequest request, + global::V0.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create MCP Server OAuth Authorization URL
+ /// Creates an OAuth authorization URL for an OAuth MCP server. Redirect the user to the returned URL, and the Platform API OAuth callback will store the resulting tokens before redirecting to your returnUrl. + ///
+ /// + /// + /// An absolute URL in your application where v0 redirects after OAuth completes. HTTPS is required in production. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task McpServersCreateOAuthAuthorizationUrlAsync( + string mcpServerId, + string returnUrl, + global::V0.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/V0/Generated/V0.IMcpServersClient.McpServersUpdate.g.cs b/src/libs/V0/Generated/V0.IMcpServersClient.McpServersUpdate.g.cs index 114ea5a..83cf593 100644 --- a/src/libs/V0/Generated/V0.IMcpServersClient.McpServersUpdate.g.cs +++ b/src/libs/V0/Generated/V0.IMcpServersClient.McpServersUpdate.g.cs @@ -66,7 +66,7 @@ public partial interface IMcpServersClient string? url = default, string? description = default, bool? enabled = default, - global::V0.AnyOf? auth = default, + global::V0.AnyOf? auth = default, global::V0.McpServersUpdateRequestScope? scope = default, global::V0.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/V0/Generated/V0.JsonConverters.AnyOf3.g.cs b/src/libs/V0/Generated/V0.JsonConverters.AnyOf3.g.cs deleted file mode 100644 index 7e69e6d..0000000 --- a/src/libs/V0/Generated/V0.JsonConverters.AnyOf3.g.cs +++ /dev/null @@ -1,210 +0,0 @@ -#nullable enable - -namespace V0.JsonConverters -{ - /// - public class AnyOfJsonConverter : global::System.Text.Json.Serialization.JsonConverter> - { - /// - public override global::V0.AnyOf 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(); - 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; - { - var __ti = typeInfoResolver.GetTypeInfo(typeof(T1), options); - if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) - { - foreach (var __prop in __ti.Properties) - { - if (__jsonProps.Contains(__prop.Name)) __score0++; - } - } - } - var __score1 = 0; - { - var __ti = typeInfoResolver.GetTypeInfo(typeof(T2), options); - if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) - { - foreach (var __prop in __ti.Properties) - { - if (__jsonProps.Contains(__prop.Name)) __score1++; - } - } - } - var __score2 = 0; - { - var __ti = typeInfoResolver.GetTypeInfo(typeof(T3), options); - if (__ti != null && __ti.Kind == global::System.Text.Json.Serialization.Metadata.JsonTypeInfoKind.Object) - { - foreach (var __prop in __ti.Properties) - { - if (__jsonProps.Contains(__prop.Name)) __score2++; - } - } - } - var __bestScore = 0; - var __bestIndex = -1; - if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } - if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } - if (__score2 > __bestScore) { __bestScore = __score2; __bestIndex = 2; } - - T1? value1 = default; - T2? value2 = default; - T3? value3 = default; - if (__bestIndex >= 0) - { - if (__bestIndex == 0) - { - try - { - - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - value1 = 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(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - - else if (__bestIndex == 2) - { - try - { - - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); - value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - } - - if (value1 == null && value2 == null && value3 == null) - { - try - { - - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - - try - { - - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - - try - { - - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); - value3 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - catch (global::System.InvalidOperationException) - { - } - } - - var __value = new global::V0.AnyOf( - value1, - - value2, - - value3 - ); - - return __value; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::V0.AnyOf 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."); - - if (value.IsValue1) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo); - } - else if (value.IsValue2) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo); - } - else if (value.IsValue3) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3!, typeInfo); - } - } - } -} \ No newline at end of file diff --git a/src/libs/V0/Generated/V0.JsonSerializerContext.g.cs b/src/libs/V0/Generated/V0.JsonSerializerContext.g.cs index c19fef8..4196041 100644 --- a/src/libs/V0/Generated/V0.JsonSerializerContext.g.cs +++ b/src/libs/V0/Generated/V0.JsonSerializerContext.g.cs @@ -309,9 +309,9 @@ namespace V0 typeof(global::V0.JsonConverters.AnyOfJsonConverter), - typeof(global::V0.JsonConverters.AnyOfJsonConverter), + typeof(global::V0.JsonConverters.AnyOfJsonConverter), - typeof(global::V0.JsonConverters.AnyOfJsonConverter), + typeof(global::V0.JsonConverters.AnyOfJsonConverter), typeof(global::V0.JsonConverters.AnyOfJsonConverter), @@ -540,17 +540,22 @@ namespace V0 [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.ProjectsUpdateEnvVarsRequestEnvironmentVariable))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.ProjectsDeleteEnvVarsRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.McpServersCreateRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.AnyOf), TypeInfoPropertyName = "AnyOfMcpServersCreateRequestAuthVariant1McpServersCreateRequestAuthVariant2McpServersCreateRequestAuthVariant32")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.AnyOf), TypeInfoPropertyName = "McpServersCreateRequestAuthVariant4_990bc977b5a8b8e5")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.McpServersCreateRequestAuthVariant1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.McpServersCreateRequestAuthVariant2))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.McpServersCreateRequestAuthVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.McpServersCreateRequestAuthVariant4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.McpServersCreateRequestAuthVariant4Config))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.McpServersCreateRequestScope), TypeInfoPropertyName = "McpServersCreateRequestScope2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.McpServersUpdateRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.AnyOf), TypeInfoPropertyName = "AnyOfMcpServersUpdateRequestAuthVariant1McpServersUpdateRequestAuthVariant2McpServersUpdateRequestAuthVariant32")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.AnyOf), TypeInfoPropertyName = "McpServersUpdateRequestAuthVariant4_5b3d5ee955ccb658")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.McpServersUpdateRequestAuthVariant1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.McpServersUpdateRequestAuthVariant2))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.McpServersUpdateRequestAuthVariant3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.McpServersUpdateRequestAuthVariant4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.McpServersUpdateRequestAuthVariant4Config))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.McpServersUpdateRequestScope), TypeInfoPropertyName = "McpServersUpdateRequestScope2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.McpServersCreateOAuthAuthorizationUrlRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.ChatsFindIsFavorite), TypeInfoPropertyName = "ChatsFindIsFavorite2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.ChatsGetVersionIncludeDefaultFiles), TypeInfoPropertyName = "ChatsGetVersionIncludeDefaultFiles2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.ChatsDownloadVersionFormat), TypeInfoPropertyName = "ChatsDownloadVersionFormat2")] @@ -653,9 +658,12 @@ namespace V0 [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.McpServersUpdateResponseAuthType), TypeInfoPropertyName = "McpServersUpdateResponseAuthType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.McpServersUpdateResponseScope), TypeInfoPropertyName = "McpServersUpdateResponseScope2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.McpServersDeleteResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.McpServersCreateOAuthAuthorizationUrlResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.AllOf?>?), TypeInfoPropertyName = "ChatsInitRequestVariant5_37d682f35fad2e9d")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.AnyOf?), TypeInfoPropertyName = "ChatsInitRequestVariant5_81f724b881d7ba5b")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.AnyOf?), TypeInfoPropertyName = "ChatsResolveTaskRequestTaskVariant4_a1ad15825c1305f0")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.AnyOf?), TypeInfoPropertyName = "McpServersCreateRequestAuthVariant4_8f63dc24968d8440")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::V0.AnyOf?), TypeInfoPropertyName = "McpServersUpdateRequestAuthVariant4_cf08077114de3796")] [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))] diff --git a/src/libs/V0/Generated/V0.JsonSerializerContextTypes.g.cs b/src/libs/V0/Generated/V0.JsonSerializerContextTypes.g.cs index d552524..87c6c4f 100644 --- a/src/libs/V0/Generated/V0.JsonSerializerContextTypes.g.cs +++ b/src/libs/V0/Generated/V0.JsonSerializerContextTypes.g.cs @@ -904,31 +904,31 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::V0.AnyOf? Type219 { get; set; } + public global::V0.McpServersCreateRequestAuthVariant1? Type219 { get; set; } /// /// /// - public global::V0.McpServersCreateRequestAuthVariant1? Type220 { get; set; } + public global::V0.McpServersCreateRequestAuthVariant2? Type220 { get; set; } /// /// /// - public global::V0.McpServersCreateRequestAuthVariant2? Type221 { get; set; } + public global::V0.McpServersCreateRequestAuthVariant3? Type221 { get; set; } /// /// /// - public global::V0.McpServersCreateRequestAuthVariant3? Type222 { get; set; } + public global::V0.McpServersCreateRequestAuthVariant4? Type222 { get; set; } /// /// /// - public global::V0.McpServersCreateRequestScope? Type223 { get; set; } + public global::V0.McpServersCreateRequestAuthVariant4Config? Type223 { get; set; } /// /// /// - public global::V0.McpServersUpdateRequest? Type224 { get; set; } + public global::V0.McpServersCreateRequestScope? Type224 { get; set; } /// /// /// - public global::V0.AnyOf? Type225 { get; set; } + public global::V0.McpServersUpdateRequest? Type225 { get; set; } /// /// /// @@ -944,415 +944,431 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::V0.McpServersUpdateRequestScope? Type229 { get; set; } + public global::V0.McpServersUpdateRequestAuthVariant4? Type229 { get; set; } /// /// /// - public global::V0.ChatsFindIsFavorite? Type230 { get; set; } + public global::V0.McpServersUpdateRequestAuthVariant4Config? Type230 { get; set; } /// /// /// - public global::V0.ChatsGetVersionIncludeDefaultFiles? Type231 { get; set; } + public global::V0.McpServersUpdateRequestScope? Type231 { get; set; } /// /// /// - public global::V0.ChatsDownloadVersionFormat? Type232 { get; set; } + public global::V0.McpServersCreateOAuthAuthorizationUrlRequest? Type232 { get; set; } /// /// /// - public global::V0.ChatsDownloadVersionIncludeDefaultFiles? Type233 { get; set; } + public global::V0.ChatsFindIsFavorite? Type233 { get; set; } /// /// /// - public global::V0.ProjectsDeleteDeleteAllChats? Type234 { get; set; } + public global::V0.ChatsGetVersionIncludeDefaultFiles? Type234 { get; set; } /// /// /// - public global::V0.ProjectsFindEnvVarsDecrypted? Type235 { get; set; } + public global::V0.ChatsDownloadVersionFormat? Type235 { get; set; } /// /// /// - public global::V0.ProjectsCreateEnvVarsDecrypted? Type236 { get; set; } + public global::V0.ChatsDownloadVersionIncludeDefaultFiles? Type236 { get; set; } /// /// /// - public global::V0.ProjectsUpdateEnvVarsDecrypted? Type237 { get; set; } + public global::V0.ProjectsDeleteDeleteAllChats? Type237 { get; set; } /// /// /// - public global::V0.ProjectsGetEnvVarDecrypted? Type238 { get; set; } + public global::V0.ProjectsFindEnvVarsDecrypted? Type238 { get; set; } /// /// /// - public int? Type239 { get; set; } + public global::V0.ProjectsCreateEnvVarsDecrypted? Type239 { get; set; } /// /// /// - public global::V0.ChatsFindResponse? Type240 { get; set; } + public global::V0.ProjectsUpdateEnvVarsDecrypted? Type240 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type241 { get; set; } + public global::V0.ProjectsGetEnvVarDecrypted? Type241 { get; set; } /// /// /// - public global::V0.ChatsDeleteResponse? Type242 { get; set; } + public int? Type242 { get; set; } /// /// /// - public global::V0.ChatsFavoriteResponse? Type243 { get; set; } + public global::V0.ChatsFindResponse? Type243 { get; set; } /// /// /// - public global::V0.ChatsFindMessagesResponse? Type244 { get; set; } + public global::System.Collections.Generic.IList? Type244 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type245 { get; set; } + public global::V0.ChatsDeleteResponse? Type245 { get; set; } /// /// /// - public global::V0.ChatsFindMessagesResponsePagination? Type246 { get; set; } + public global::V0.ChatsFavoriteResponse? Type246 { get; set; } /// /// /// - public global::V0.ChatsFindVersionsResponse? Type247 { get; set; } + public global::V0.ChatsFindMessagesResponse? Type247 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type248 { get; set; } + public global::System.Collections.Generic.IList? Type248 { get; set; } /// /// /// - public global::V0.ChatsFindVersionsResponsePagination? Type249 { get; set; } + public global::V0.ChatsFindMessagesResponsePagination? Type249 { get; set; } /// /// /// - public global::V0.ChatsFindVersionsResponseMeta? Type250 { get; set; } + public global::V0.ChatsFindVersionsResponse? Type250 { get; set; } /// /// /// - public global::V0.ChatsStopResponse? Type251 { get; set; } + public global::System.Collections.Generic.IList? Type251 { get; set; } /// /// /// - public global::V0.DeploymentsFindResponse? Type252 { get; set; } + public global::V0.ChatsFindVersionsResponsePagination? Type252 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type253 { get; set; } + public global::V0.ChatsFindVersionsResponseMeta? Type253 { get; set; } /// /// /// - public global::V0.DeploymentsDeleteResponse? Type254 { get; set; } + public global::V0.ChatsStopResponse? Type254 { get; set; } /// /// /// - public global::V0.DeploymentsFindLogsResponse? Type255 { get; set; } + public global::V0.DeploymentsFindResponse? Type255 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type256 { get; set; } + public global::System.Collections.Generic.IList? Type256 { get; set; } /// /// /// - public global::V0.DeploymentsFindLogsResponseLog? Type257 { get; set; } + public global::V0.DeploymentsDeleteResponse? Type257 { get; set; } /// /// /// - public global::V0.DeploymentsFindLogsResponseLogType? Type258 { get; set; } + public global::V0.DeploymentsFindLogsResponse? Type258 { get; set; } /// /// /// - public global::V0.DeploymentsFindLogsResponseLogLevel? Type259 { get; set; } + public global::System.Collections.Generic.IList? Type259 { get; set; } /// /// /// - public global::V0.DeploymentsFindErrorsResponse? Type260 { get; set; } + public global::V0.DeploymentsFindLogsResponseLog? Type260 { get; set; } /// /// /// - public global::V0.HooksFindResponse? Type261 { get; set; } + public global::V0.DeploymentsFindLogsResponseLogType? Type261 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type262 { get; set; } + public global::V0.DeploymentsFindLogsResponseLogLevel? Type262 { get; set; } /// /// /// - public global::V0.HooksDeleteResponse? Type263 { get; set; } + public global::V0.DeploymentsFindErrorsResponse? Type263 { get; set; } /// /// /// - public global::V0.IntegrationsVercelProjectsFindResponse? Type264 { get; set; } + public global::V0.HooksFindResponse? Type264 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type265 { get; set; } + public global::System.Collections.Generic.IList? Type265 { get; set; } /// /// /// - public global::V0.ProjectsFindResponse? Type266 { get; set; } + public global::V0.HooksDeleteResponse? Type266 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type267 { get; set; } + public global::V0.IntegrationsVercelProjectsFindResponse? Type267 { get; set; } /// /// /// - public global::V0.ProjectsDeleteResponse? Type268 { get; set; } + public global::System.Collections.Generic.IList? Type268 { get; set; } /// /// /// - public global::V0.ProjectsAssignResponse? Type269 { get; set; } + public global::V0.ProjectsFindResponse? Type269 { get; set; } /// /// /// - public global::V0.ProjectsFindEnvVarsResponse? Type270 { get; set; } + public global::System.Collections.Generic.IList? Type270 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type271 { get; set; } + public global::V0.ProjectsDeleteResponse? Type271 { get; set; } /// /// /// - public global::V0.ProjectsCreateEnvVarsResponse? Type272 { get; set; } + public global::V0.ProjectsAssignResponse? Type272 { get; set; } /// /// /// - public global::V0.ProjectsUpdateEnvVarsResponse? Type273 { get; set; } + public global::V0.ProjectsFindEnvVarsResponse? Type273 { get; set; } /// /// /// - public global::V0.ProjectsDeleteEnvVarsResponse? Type274 { get; set; } + public global::System.Collections.Generic.IList? Type274 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type275 { get; set; } + public global::V0.ProjectsCreateEnvVarsResponse? Type275 { get; set; } /// /// /// - public global::V0.ProjectsDeleteEnvVarsResponseDataItem? Type276 { get; set; } + public global::V0.ProjectsUpdateEnvVarsResponse? Type276 { get; set; } /// /// /// - public global::V0.ProjectsGetEnvVarResponse? Type277 { get; set; } + public global::V0.ProjectsDeleteEnvVarsResponse? Type277 { get; set; } /// /// /// - public global::V0.RateLimitsFindResponse? Type278 { get; set; } + public global::System.Collections.Generic.IList? Type278 { get; set; } /// /// /// - public global::V0.RateLimitsFindResponseDailyLimit? Type279 { get; set; } + public global::V0.ProjectsDeleteEnvVarsResponseDataItem? Type279 { get; set; } /// /// /// - public global::V0.AnyOf? Type280 { get; set; } + public global::V0.ProjectsGetEnvVarResponse? Type280 { get; set; } /// /// /// - public global::V0.UserGetBillingResponseVariant1? Type281 { get; set; } + public global::V0.RateLimitsFindResponse? Type281 { get; set; } /// /// /// - public global::V0.UserGetBillingResponseVariant1Data? Type282 { get; set; } + public global::V0.RateLimitsFindResponseDailyLimit? Type282 { get; set; } /// /// /// - public global::V0.UserGetBillingResponseVariant1DataBillingCycle? Type283 { get; set; } + public global::V0.AnyOf? Type283 { get; set; } /// /// /// - public global::V0.UserGetBillingResponseVariant1DataBalance? Type284 { get; set; } + public global::V0.UserGetBillingResponseVariant1? Type284 { get; set; } /// /// /// - public global::V0.UserGetBillingResponseVariant1DataOnDemand? Type285 { get; set; } + public global::V0.UserGetBillingResponseVariant1Data? Type285 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type286 { get; set; } + public global::V0.UserGetBillingResponseVariant1DataBillingCycle? Type286 { get; set; } /// /// /// - public global::V0.UserGetBillingResponseVariant1DataOnDemandBlock? Type287 { get; set; } + public global::V0.UserGetBillingResponseVariant1DataBalance? Type287 { get; set; } /// /// /// - public global::V0.UserGetBillingResponseVariant2? Type288 { get; set; } + public global::V0.UserGetBillingResponseVariant1DataOnDemand? Type288 { get; set; } /// /// /// - public global::V0.UserGetBillingResponseVariant2Data? Type289 { get; set; } + public global::System.Collections.Generic.IList? Type289 { get; set; } /// /// /// - public global::V0.UserGetPlanResponse? Type290 { get; set; } + public global::V0.UserGetBillingResponseVariant1DataOnDemandBlock? Type290 { get; set; } /// /// /// - public global::V0.UserGetPlanResponseBillingCycle? Type291 { get; set; } + public global::V0.UserGetBillingResponseVariant2? Type291 { get; set; } /// /// /// - public global::V0.UserGetPlanResponseBalance? Type292 { get; set; } + public global::V0.UserGetBillingResponseVariant2Data? Type292 { get; set; } /// /// /// - public global::V0.UserGetScopesResponse? Type293 { get; set; } + public global::V0.UserGetPlanResponse? Type293 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type294 { get; set; } + public global::V0.UserGetPlanResponseBillingCycle? Type294 { get; set; } /// /// /// - public global::V0.ReportsGetUsageResponse? Type295 { get; set; } + public global::V0.UserGetPlanResponseBalance? Type295 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type296 { get; set; } + public global::V0.UserGetScopesResponse? Type296 { get; set; } /// /// /// - public global::V0.ReportsGetUsageResponseDataItem? Type297 { get; set; } + public global::System.Collections.Generic.IList? Type297 { get; set; } /// /// /// - public global::V0.ReportsGetUsageResponseDataItemType? Type298 { get; set; } + public global::V0.ReportsGetUsageResponse? Type298 { get; set; } /// /// /// - public global::V0.ReportsGetUsageResponsePagination? Type299 { get; set; } + public global::System.Collections.Generic.IList? Type299 { get; set; } /// /// /// - public global::V0.ReportsGetUsageResponseMeta? Type300 { get; set; } + public global::V0.ReportsGetUsageResponseDataItem? Type300 { get; set; } /// /// /// - public global::V0.ReportsGetAIUsageResponse? Type301 { get; set; } + public global::V0.ReportsGetUsageResponseDataItemType? Type301 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type302 { get; set; } + public global::V0.ReportsGetUsageResponsePagination? Type302 { get; set; } /// /// /// - public global::V0.ReportsGetAIUsageResponseDataItem? Type303 { get; set; } + public global::V0.ReportsGetUsageResponseMeta? Type303 { get; set; } /// /// /// - public global::V0.ReportsGetAIUsageResponsePagination? Type304 { get; set; } + public global::V0.ReportsGetAIUsageResponse? Type304 { get; set; } /// /// /// - public global::V0.ReportsGetAIUsageResponseDateRange? Type305 { get; set; } + public global::System.Collections.Generic.IList? Type305 { get; set; } /// /// /// - public global::V0.ReportsGetUserActivityResponse? Type306 { get; set; } + public global::V0.ReportsGetAIUsageResponseDataItem? Type306 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type307 { get; set; } + public global::V0.ReportsGetAIUsageResponsePagination? Type307 { get; set; } /// /// /// - public global::V0.ReportsGetUserActivityResponseDataItem? Type308 { get; set; } + public global::V0.ReportsGetAIUsageResponseDateRange? Type308 { get; set; } /// /// /// - public global::V0.ReportsGetUserActivityResponseDataItemUser? Type309 { get; set; } + public global::V0.ReportsGetUserActivityResponse? Type309 { get; set; } /// /// /// - public global::V0.ReportsGetUserActivityResponseDataItemUserTeamV0Role2? Type310 { get; set; } + public global::System.Collections.Generic.IList? Type310 { get; set; } /// /// /// - public global::V0.ReportsGetUserActivityResponseMeta? Type311 { get; set; } + public global::V0.ReportsGetUserActivityResponseDataItem? Type311 { get; set; } /// /// /// - public global::V0.ReportsGetUserActivityResponseMetaDateRange? Type312 { get; set; } + public global::V0.ReportsGetUserActivityResponseDataItemUser? Type312 { get; set; } /// /// /// - public global::V0.McpServersFindResponse? Type313 { get; set; } + public global::V0.ReportsGetUserActivityResponseDataItemUserTeamV0Role2? Type313 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type314 { get; set; } + public global::V0.ReportsGetUserActivityResponseMeta? Type314 { get; set; } /// /// /// - public global::V0.McpServersFindResponseDataItem? Type315 { get; set; } + public global::V0.ReportsGetUserActivityResponseMetaDateRange? Type315 { get; set; } /// /// /// - public global::V0.McpServersFindResponseDataItemAuth? Type316 { get; set; } + public global::V0.McpServersFindResponse? Type316 { get; set; } /// /// /// - public global::V0.McpServersFindResponseDataItemAuthType? Type317 { get; set; } + public global::System.Collections.Generic.IList? Type317 { get; set; } /// /// /// - public global::V0.McpServersFindResponseDataItemScope? Type318 { get; set; } + public global::V0.McpServersFindResponseDataItem? Type318 { get; set; } /// /// /// - public global::V0.McpServersCreateResponse? Type319 { get; set; } + public global::V0.McpServersFindResponseDataItemAuth? Type319 { get; set; } /// /// /// - public global::V0.McpServersCreateResponseAuth? Type320 { get; set; } + public global::V0.McpServersFindResponseDataItemAuthType? Type320 { get; set; } /// /// /// - public global::V0.McpServersCreateResponseAuthType? Type321 { get; set; } + public global::V0.McpServersFindResponseDataItemScope? Type321 { get; set; } /// /// /// - public global::V0.McpServersCreateResponseScope? Type322 { get; set; } + public global::V0.McpServersCreateResponse? Type322 { get; set; } /// /// /// - public global::V0.McpServersGetByIdResponse? Type323 { get; set; } + public global::V0.McpServersCreateResponseAuth? Type323 { get; set; } /// /// /// - public global::V0.McpServersGetByIdResponseAuth? Type324 { get; set; } + public global::V0.McpServersCreateResponseAuthType? Type324 { get; set; } /// /// /// - public global::V0.McpServersGetByIdResponseAuthType? Type325 { get; set; } + public global::V0.McpServersCreateResponseScope? Type325 { get; set; } /// /// /// - public global::V0.McpServersGetByIdResponseScope? Type326 { get; set; } + public global::V0.McpServersGetByIdResponse? Type326 { get; set; } /// /// /// - public global::V0.McpServersUpdateResponse? Type327 { get; set; } + public global::V0.McpServersGetByIdResponseAuth? Type327 { get; set; } /// /// /// - public global::V0.McpServersUpdateResponseAuth? Type328 { get; set; } + public global::V0.McpServersGetByIdResponseAuthType? Type328 { get; set; } /// /// /// - public global::V0.McpServersUpdateResponseAuthType? Type329 { get; set; } + public global::V0.McpServersGetByIdResponseScope? Type329 { get; set; } /// /// /// - public global::V0.McpServersUpdateResponseScope? Type330 { get; set; } + public global::V0.McpServersUpdateResponse? Type330 { get; set; } /// /// /// - public global::V0.McpServersDeleteResponse? Type331 { get; set; } + public global::V0.McpServersUpdateResponseAuth? Type331 { get; set; } + /// + /// + /// + public global::V0.McpServersUpdateResponseAuthType? Type332 { get; set; } + /// + /// + /// + public global::V0.McpServersUpdateResponseScope? Type333 { get; set; } + /// + /// + /// + public global::V0.McpServersDeleteResponse? Type334 { get; set; } + /// + /// + /// + public global::V0.McpServersCreateOAuthAuthorizationUrlResponse? Type335 { get; set; } /// /// diff --git a/src/libs/V0/Generated/V0.McpServersClient.McpServersCreate.g.cs b/src/libs/V0/Generated/V0.McpServersClient.McpServersCreate.g.cs index 437f93b..d6b0976 100644 --- a/src/libs/V0/Generated/V0.McpServersClient.McpServersCreate.g.cs +++ b/src/libs/V0/Generated/V0.McpServersClient.McpServersCreate.g.cs @@ -43,7 +43,7 @@ partial void ProcessMcpServersCreateResponseContent( /// /// Create MCP Server
- /// Creates a new MCP server configuration for the authenticated user. + /// Creates a new MCP server configuration for the authenticated user. Supports OAuth, bearer token, custom headers, and unauthenticated servers. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -66,7 +66,7 @@ partial void ProcessMcpServersCreateResponseContent( } /// /// Create MCP Server
- /// Creates a new MCP server configuration for the authenticated user. + /// Creates a new MCP server configuration for the authenticated user. Supports OAuth, bearer token, custom headers, and unauthenticated servers. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -743,7 +743,7 @@ partial void ProcessMcpServersCreateResponseContent( } /// /// Create MCP Server
- /// Creates a new MCP server configuration for the authenticated user. + /// Creates a new MCP server configuration for the authenticated user. Supports OAuth, bearer token, custom headers, and unauthenticated servers. ///
/// /// The display name of the MCP server. @@ -774,7 +774,7 @@ partial void ProcessMcpServersCreateResponseContent( string url, string? description = default, bool? enabled = default, - global::V0.AnyOf? auth = default, + global::V0.AnyOf? auth = default, global::V0.McpServersCreateRequestScope? scope = default, global::V0.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) diff --git a/src/libs/V0/Generated/V0.McpServersClient.McpServersCreateOAuthAuthorizationUrl.g.cs b/src/libs/V0/Generated/V0.McpServersClient.McpServersCreateOAuthAuthorizationUrl.g.cs new file mode 100644 index 0000000..b5d371c --- /dev/null +++ b/src/libs/V0/Generated/V0.McpServersClient.McpServersCreateOAuthAuthorizationUrl.g.cs @@ -0,0 +1,782 @@ + +#nullable enable + +namespace V0 +{ + public partial class McpServersClient + { + + + private static readonly global::V0.EndPointSecurityRequirement s_McpServersCreateOAuthAuthorizationUrlSecurityRequirement0 = + new global::V0.EndPointSecurityRequirement + { + Authorizations = new global::V0.EndPointAuthorizationRequirement[] + { new global::V0.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::V0.EndPointSecurityRequirement[] s_McpServersCreateOAuthAuthorizationUrlSecurityRequirements = + new global::V0.EndPointSecurityRequirement[] + { s_McpServersCreateOAuthAuthorizationUrlSecurityRequirement0, + }; + partial void PrepareMcpServersCreateOAuthAuthorizationUrlArguments( + global::System.Net.Http.HttpClient httpClient, + ref string mcpServerId, + global::V0.McpServersCreateOAuthAuthorizationUrlRequest request); + partial void PrepareMcpServersCreateOAuthAuthorizationUrlRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string mcpServerId, + global::V0.McpServersCreateOAuthAuthorizationUrlRequest request); + partial void ProcessMcpServersCreateOAuthAuthorizationUrlResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessMcpServersCreateOAuthAuthorizationUrlResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create MCP Server OAuth Authorization URL
+ /// Creates an OAuth authorization URL for an OAuth MCP server. Redirect the user to the returned URL, and the Platform API OAuth callback will store the resulting tokens before redirecting to your returnUrl. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task McpServersCreateOAuthAuthorizationUrlAsync( + string mcpServerId, + + global::V0.McpServersCreateOAuthAuthorizationUrlRequest request, + global::V0.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await McpServersCreateOAuthAuthorizationUrlAsResponseAsync( + mcpServerId: mcpServerId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create MCP Server OAuth Authorization URL
+ /// Creates an OAuth authorization URL for an OAuth MCP server. Redirect the user to the returned URL, and the Platform API OAuth callback will store the resulting tokens before redirecting to your returnUrl. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> McpServersCreateOAuthAuthorizationUrlAsResponseAsync( + string mcpServerId, + + global::V0.McpServersCreateOAuthAuthorizationUrlRequest request, + global::V0.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareMcpServersCreateOAuthAuthorizationUrlArguments( + httpClient: HttpClient, + mcpServerId: ref mcpServerId, + request: request); + + + var __authorizations = global::V0.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_McpServersCreateOAuthAuthorizationUrlSecurityRequirements, + operationName: "McpServersCreateOAuthAuthorizationUrlAsync"); + + using var __timeoutCancellationTokenSource = global::V0.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::V0.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::V0.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::V0.PathBuilder( + path: $"/mcp-servers/{mcpServerId}/oauth/authorize", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::V0.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::V0.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareMcpServersCreateOAuthAuthorizationUrlRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + mcpServerId: mcpServerId!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::V0.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::V0.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "McpServersCreateOAuthAuthorizationUrl", + methodName: "McpServersCreateOAuthAuthorizationUrlAsync", + pathTemplate: "$\"/mcp-servers/{mcpServerId}/oauth/authorize\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::V0.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::V0.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::V0.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "McpServersCreateOAuthAuthorizationUrl", + methodName: "McpServersCreateOAuthAuthorizationUrlAsync", + pathTemplate: "$\"/mcp-servers/{mcpServerId}/oauth/authorize\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::V0.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::V0.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::V0.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::V0.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::V0.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "McpServersCreateOAuthAuthorizationUrl", + methodName: "McpServersCreateOAuthAuthorizationUrlAsync", + pathTemplate: "$\"/mcp-servers/{mcpServerId}/oauth/authorize\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::V0.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessMcpServersCreateOAuthAuthorizationUrlResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::V0.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::V0.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "McpServersCreateOAuthAuthorizationUrl", + methodName: "McpServersCreateOAuthAuthorizationUrlAsync", + pathTemplate: "$\"/mcp-servers/{mcpServerId}/oauth/authorize\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::V0.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::V0.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "McpServersCreateOAuthAuthorizationUrl", + methodName: "McpServersCreateOAuthAuthorizationUrlAsync", + pathTemplate: "$\"/mcp-servers/{mcpServerId}/oauth/authorize\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Unauthorized + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::V0.UnauthorizedError? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::V0.UnauthorizedError.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::V0.UnauthorizedError.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + throw new global::V0.ApiException( + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + statusCode: __response.StatusCode) + { + ResponseBody = __content_401, + ResponseObject = __value_401, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Forbidden + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::V0.ForbiddenError? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::V0.ForbiddenError.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::V0.ForbiddenError.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + throw new global::V0.ApiException( + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + statusCode: __response.StatusCode) + { + ResponseBody = __content_403, + ResponseObject = __value_403, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::V0.NotFoundError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::V0.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::V0.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + throw new global::V0.ApiException( + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Conflict + if ((int)__response.StatusCode == 409) + { + string? __content_409 = null; + global::System.Exception? __exception_409 = null; + global::V0.ConflictError? __value_409 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_409 = global::V0.ConflictError.FromJson(__content_409, JsonSerializerContext); + } + else + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_409 = global::V0.ConflictError.FromJson(__content_409, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_409 = __ex; + } + + throw new global::V0.ApiException( + message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_409, + statusCode: __response.StatusCode) + { + ResponseBody = __content_409, + ResponseObject = __value_409, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Payload Too Large + if ((int)__response.StatusCode == 413) + { + string? __content_413 = null; + global::System.Exception? __exception_413 = null; + global::V0.PayloadTooLargeError? __value_413 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_413 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_413 = global::V0.PayloadTooLargeError.FromJson(__content_413, JsonSerializerContext); + } + else + { + __content_413 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_413 = global::V0.PayloadTooLargeError.FromJson(__content_413, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_413 = __ex; + } + + throw new global::V0.ApiException( + message: __content_413 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_413, + statusCode: __response.StatusCode) + { + ResponseBody = __content_413, + ResponseObject = __value_413, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Unprocessable Entity + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::V0.UnprocessableEntityError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::V0.UnprocessableEntityError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::V0.UnprocessableEntityError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::V0.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Too Many Requests + if ((int)__response.StatusCode == 429) + { + string? __content_429 = null; + global::System.Exception? __exception_429 = null; + global::V0.TooManyRequestsError? __value_429 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_429 = global::V0.TooManyRequestsError.FromJson(__content_429, JsonSerializerContext); + } + else + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_429 = global::V0.TooManyRequestsError.FromJson(__content_429, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_429 = __ex; + } + + throw new global::V0.ApiException( + message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_429, + statusCode: __response.StatusCode) + { + ResponseBody = __content_429, + ResponseObject = __value_429, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Internal Server Error + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + global::V0.InternalServerError? __value_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_500 = global::V0.InternalServerError.FromJson(__content_500, JsonSerializerContext); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_500 = global::V0.InternalServerError.FromJson(__content_500, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + throw new global::V0.ApiException( + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + statusCode: __response.StatusCode) + { + ResponseBody = __content_500, + ResponseObject = __value_500, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessMcpServersCreateOAuthAuthorizationUrlResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::V0.McpServersCreateOAuthAuthorizationUrlResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::V0.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::V0.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::V0.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::V0.McpServersCreateOAuthAuthorizationUrlResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::V0.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::V0.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::V0.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Create MCP Server OAuth Authorization URL
+ /// Creates an OAuth authorization URL for an OAuth MCP server. Redirect the user to the returned URL, and the Platform API OAuth callback will store the resulting tokens before redirecting to your returnUrl. + ///
+ /// + /// + /// An absolute URL in your application where v0 redirects after OAuth completes. HTTPS is required in production. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task McpServersCreateOAuthAuthorizationUrlAsync( + string mcpServerId, + string returnUrl, + global::V0.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::V0.McpServersCreateOAuthAuthorizationUrlRequest + { + ReturnUrl = returnUrl, + }; + + return await McpServersCreateOAuthAuthorizationUrlAsync( + mcpServerId: mcpServerId, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/V0/Generated/V0.McpServersClient.McpServersUpdate.g.cs b/src/libs/V0/Generated/V0.McpServersClient.McpServersUpdate.g.cs index b2d7bd8..fb1eda7 100644 --- a/src/libs/V0/Generated/V0.McpServersClient.McpServersUpdate.g.cs +++ b/src/libs/V0/Generated/V0.McpServersClient.McpServersUpdate.g.cs @@ -782,7 +782,7 @@ partial void ProcessMcpServersUpdateResponseContent( string? url = default, string? description = default, bool? enabled = default, - global::V0.AnyOf? auth = default, + global::V0.AnyOf? auth = default, global::V0.McpServersUpdateRequestScope? scope = default, global::V0.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) diff --git a/src/libs/V0/Generated/V0.Models.McpServersCreateOAuthAuthorizationUrlRequest.Json.g.cs b/src/libs/V0/Generated/V0.Models.McpServersCreateOAuthAuthorizationUrlRequest.Json.g.cs new file mode 100644 index 0000000..c29084a --- /dev/null +++ b/src/libs/V0/Generated/V0.Models.McpServersCreateOAuthAuthorizationUrlRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace V0 +{ + public sealed partial class McpServersCreateOAuthAuthorizationUrlRequest + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::V0.McpServersCreateOAuthAuthorizationUrlRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::V0.McpServersCreateOAuthAuthorizationUrlRequest), + jsonSerializerContext) as global::V0.McpServersCreateOAuthAuthorizationUrlRequest; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::V0.McpServersCreateOAuthAuthorizationUrlRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::V0.McpServersCreateOAuthAuthorizationUrlRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::V0.McpServersCreateOAuthAuthorizationUrlRequest; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/V0/Generated/V0.Models.McpServersCreateOAuthAuthorizationUrlRequest.g.cs b/src/libs/V0/Generated/V0.Models.McpServersCreateOAuthAuthorizationUrlRequest.g.cs new file mode 100644 index 0000000..afac553 --- /dev/null +++ b/src/libs/V0/Generated/V0.Models.McpServersCreateOAuthAuthorizationUrlRequest.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace V0 +{ + /// + /// + /// + public sealed partial class McpServersCreateOAuthAuthorizationUrlRequest + { + /// + /// An absolute URL in your application where v0 redirects after OAuth completes. HTTPS is required in production. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("returnUrl")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ReturnUrl { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// An absolute URL in your application where v0 redirects after OAuth completes. HTTPS is required in production. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public McpServersCreateOAuthAuthorizationUrlRequest( + string returnUrl) + { + this.ReturnUrl = returnUrl ?? throw new global::System.ArgumentNullException(nameof(returnUrl)); + } + + /// + /// Initializes a new instance of the class. + /// + public McpServersCreateOAuthAuthorizationUrlRequest() + { + } + } +} \ No newline at end of file diff --git a/src/libs/V0/Generated/V0.Models.McpServersCreateOAuthAuthorizationUrlResponse.Json.g.cs b/src/libs/V0/Generated/V0.Models.McpServersCreateOAuthAuthorizationUrlResponse.Json.g.cs new file mode 100644 index 0000000..825baff --- /dev/null +++ b/src/libs/V0/Generated/V0.Models.McpServersCreateOAuthAuthorizationUrlResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace V0 +{ + public sealed partial class McpServersCreateOAuthAuthorizationUrlResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::V0.McpServersCreateOAuthAuthorizationUrlResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::V0.McpServersCreateOAuthAuthorizationUrlResponse), + jsonSerializerContext) as global::V0.McpServersCreateOAuthAuthorizationUrlResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::V0.McpServersCreateOAuthAuthorizationUrlResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::V0.McpServersCreateOAuthAuthorizationUrlResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::V0.McpServersCreateOAuthAuthorizationUrlResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/V0/Generated/V0.Models.McpServersCreateOAuthAuthorizationUrlResponse.g.cs b/src/libs/V0/Generated/V0.Models.McpServersCreateOAuthAuthorizationUrlResponse.g.cs new file mode 100644 index 0000000..dabcc46 --- /dev/null +++ b/src/libs/V0/Generated/V0.Models.McpServersCreateOAuthAuthorizationUrlResponse.g.cs @@ -0,0 +1,94 @@ + +#nullable enable + +namespace V0 +{ + /// + /// + /// + public sealed partial class McpServersCreateOAuthAuthorizationUrlResponse + { + /// + /// The object type. + /// + /// "mcp_server_oauth_authorization" + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + public string Object { get; set; } = "mcp_server_oauth_authorization"; + + /// + /// The MCP server being authorized. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("mcpServerId")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string McpServerId { get; set; } + + /// + /// The provider authorization URL to redirect the user to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Url { get; set; } + + /// + /// The OAuth state value. This expires after 5 minutes. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("state")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string State { get; set; } + + /// + /// The ISO timestamp when the authorization URL expires. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("expiresAt")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime ExpiresAt { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The MCP server being authorized. + /// + /// + /// The provider authorization URL to redirect the user to. + /// + /// + /// The OAuth state value. This expires after 5 minutes. + /// + /// + /// The ISO timestamp when the authorization URL expires. + /// + /// + /// The object type. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public McpServersCreateOAuthAuthorizationUrlResponse( + string mcpServerId, + string url, + string state, + global::System.DateTime expiresAt, + string @object = "mcp_server_oauth_authorization") + { + this.Object = @object; + this.McpServerId = mcpServerId ?? throw new global::System.ArgumentNullException(nameof(mcpServerId)); + this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); + this.State = state ?? throw new global::System.ArgumentNullException(nameof(state)); + this.ExpiresAt = expiresAt; + } + + /// + /// Initializes a new instance of the class. + /// + public McpServersCreateOAuthAuthorizationUrlResponse() + { + } + } +} \ No newline at end of file diff --git a/src/libs/V0/Generated/V0.Models.McpServersCreateRequest.g.cs b/src/libs/V0/Generated/V0.Models.McpServersCreateRequest.g.cs index d83ccc2..ca6a669 100644 --- a/src/libs/V0/Generated/V0.Models.McpServersCreateRequest.g.cs +++ b/src/libs/V0/Generated/V0.Models.McpServersCreateRequest.g.cs @@ -40,8 +40,8 @@ public sealed partial class McpServersCreateRequest /// Default Value: {"type":"none"} ///
[global::System.Text.Json.Serialization.JsonPropertyName("auth")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::V0.JsonConverters.AnyOfJsonConverter))] - public global::V0.AnyOf? Auth { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::V0.JsonConverters.AnyOfJsonConverter))] + public global::V0.AnyOf? Auth { get; set; } /// /// The scope of the MCP server. Defaults to user.
@@ -89,7 +89,7 @@ public McpServersCreateRequest( string url, string? description, bool? enabled, - global::V0.AnyOf? auth, + global::V0.AnyOf? auth, global::V0.McpServersCreateRequestScope? scope) { this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); diff --git a/src/libs/V0/Generated/V0.AnyOf.3.Json.g.cs b/src/libs/V0/Generated/V0.Models.McpServersCreateRequestAuthVariant4.Json.g.cs similarity index 85% rename from src/libs/V0/Generated/V0.AnyOf.3.Json.g.cs rename to src/libs/V0/Generated/V0.Models.McpServersCreateRequestAuthVariant4.Json.g.cs index 858cee9..4cfb7f9 100644 --- a/src/libs/V0/Generated/V0.AnyOf.3.Json.g.cs +++ b/src/libs/V0/Generated/V0.Models.McpServersCreateRequestAuthVariant4.Json.g.cs @@ -2,7 +2,7 @@ namespace V0 { - public readonly partial struct AnyOf + public sealed partial class McpServersCreateRequestAuthVariant4 { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -34,14 +34,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::V0.AnyOf? FromJson( + public static global::V0.McpServersCreateRequestAuthVariant4? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::V0.AnyOf), - jsonSerializerContext) as global::V0.AnyOf?; + typeof(global::V0.McpServersCreateRequestAuthVariant4), + jsonSerializerContext) as global::V0.McpServersCreateRequestAuthVariant4; } /// @@ -51,11 +51,11 @@ public string ToJson( [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::V0.AnyOf? FromJson( + public static global::V0.McpServersCreateRequestAuthVariant4? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize>( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -63,14 +63,14 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::V0.AnyOf), - jsonSerializerContext).ConfigureAwait(false)) as global::V0.AnyOf?; + typeof(global::V0.McpServersCreateRequestAuthVariant4), + jsonSerializerContext).ConfigureAwait(false)) as global::V0.McpServersCreateRequestAuthVariant4; } /// @@ -80,11 +80,11 @@ public string ToJson( [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?> FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.DeserializeAsync?>( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/V0/Generated/V0.Models.McpServersCreateRequestAuthVariant4.g.cs b/src/libs/V0/Generated/V0.Models.McpServersCreateRequestAuthVariant4.g.cs new file mode 100644 index 0000000..e37bf74 --- /dev/null +++ b/src/libs/V0/Generated/V0.Models.McpServersCreateRequestAuthVariant4.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace V0 +{ + /// + /// + /// + public sealed partial class McpServersCreateRequestAuthVariant4 + { + /// + /// OAuth 2.1 authentication. + /// + /// "oauth" + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = "oauth"; + + /// + /// OAuth configuration for the MCP server. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("config")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::V0.McpServersCreateRequestAuthVariant4Config Config { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// OAuth configuration for the MCP server. + /// + /// + /// OAuth 2.1 authentication. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public McpServersCreateRequestAuthVariant4( + global::V0.McpServersCreateRequestAuthVariant4Config config, + string type = "oauth") + { + this.Type = type; + this.Config = config ?? throw new global::System.ArgumentNullException(nameof(config)); + } + + /// + /// Initializes a new instance of the class. + /// + public McpServersCreateRequestAuthVariant4() + { + } + } +} \ No newline at end of file diff --git a/src/libs/V0/Generated/V0.Models.McpServersCreateRequestAuthVariant4Config.Json.g.cs b/src/libs/V0/Generated/V0.Models.McpServersCreateRequestAuthVariant4Config.Json.g.cs new file mode 100644 index 0000000..a35b42d --- /dev/null +++ b/src/libs/V0/Generated/V0.Models.McpServersCreateRequestAuthVariant4Config.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace V0 +{ + public sealed partial class McpServersCreateRequestAuthVariant4Config + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::V0.McpServersCreateRequestAuthVariant4Config? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::V0.McpServersCreateRequestAuthVariant4Config), + jsonSerializerContext) as global::V0.McpServersCreateRequestAuthVariant4Config; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::V0.McpServersCreateRequestAuthVariant4Config? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::V0.McpServersCreateRequestAuthVariant4Config), + jsonSerializerContext).ConfigureAwait(false)) as global::V0.McpServersCreateRequestAuthVariant4Config; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/V0/Generated/V0.Models.McpServersCreateRequestAuthVariant4Config.g.cs b/src/libs/V0/Generated/V0.Models.McpServersCreateRequestAuthVariant4Config.g.cs new file mode 100644 index 0000000..d5609a4 --- /dev/null +++ b/src/libs/V0/Generated/V0.Models.McpServersCreateRequestAuthVariant4Config.g.cs @@ -0,0 +1,151 @@ + +#nullable enable + +namespace V0 +{ + /// + /// OAuth configuration for the MCP server. + /// + public sealed partial class McpServersCreateRequestAuthVariant4Config + { + /// + /// The OAuth authorization endpoint URL. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("authorizationUrl")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string AuthorizationUrl { get; set; } + + /// + /// The OAuth token endpoint URL. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tokenUrl")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string TokenUrl { get; set; } + + /// + /// The optional dynamic client registration endpoint URL. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("registrationUrl")] + public string? RegistrationUrl { get; set; } + + /// + /// The OAuth client ID. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("clientId")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ClientId { get; set; } + + /// + /// The optional OAuth client secret. This value is stored securely and is never returned by the API. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("clientSecret")] + public string? ClientSecret { get; set; } + + /// + /// OAuth scopes to request during authorization.
+ /// Default Value: [] + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("scopes")] + public global::System.Collections.Generic.IList? Scopes { get; set; } + + /// + /// Whether to use PKCE for the authorization code flow.
+ /// Default Value: true + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("usePKCE")] + public bool? UsePKCE { get; set; } + + /// + /// The optional issuer identifier for mix-up protection. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("issuer")] + public string? Issuer { get; set; } + + /// + /// The optional RFC 8707 resource indicator. For MCP servers, this is usually the MCP server URL. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("resource")] + public string? Resource { get; set; } + + /// + /// Whether the authorization server supports Client ID Metadata Documents. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("clientIdMetadataDocumentSupported")] + public bool? ClientIdMetadataDocumentSupported { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The OAuth authorization endpoint URL. + /// + /// + /// The OAuth token endpoint URL. + /// + /// + /// The OAuth client ID. + /// + /// + /// The optional dynamic client registration endpoint URL. + /// + /// + /// The optional OAuth client secret. This value is stored securely and is never returned by the API. + /// + /// + /// OAuth scopes to request during authorization.
+ /// Default Value: [] + /// + /// + /// Whether to use PKCE for the authorization code flow.
+ /// Default Value: true + /// + /// + /// The optional issuer identifier for mix-up protection. + /// + /// + /// The optional RFC 8707 resource indicator. For MCP servers, this is usually the MCP server URL. + /// + /// + /// Whether the authorization server supports Client ID Metadata Documents. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public McpServersCreateRequestAuthVariant4Config( + string authorizationUrl, + string tokenUrl, + string clientId, + string? registrationUrl, + string? clientSecret, + global::System.Collections.Generic.IList? scopes, + bool? usePKCE, + string? issuer, + string? resource, + bool? clientIdMetadataDocumentSupported) + { + this.AuthorizationUrl = authorizationUrl ?? throw new global::System.ArgumentNullException(nameof(authorizationUrl)); + this.TokenUrl = tokenUrl ?? throw new global::System.ArgumentNullException(nameof(tokenUrl)); + this.RegistrationUrl = registrationUrl; + this.ClientId = clientId ?? throw new global::System.ArgumentNullException(nameof(clientId)); + this.ClientSecret = clientSecret; + this.Scopes = scopes; + this.UsePKCE = usePKCE; + this.Issuer = issuer; + this.Resource = resource; + this.ClientIdMetadataDocumentSupported = clientIdMetadataDocumentSupported; + } + + /// + /// Initializes a new instance of the class. + /// + public McpServersCreateRequestAuthVariant4Config() + { + } + } +} \ No newline at end of file diff --git a/src/libs/V0/Generated/V0.Models.McpServersUpdateRequest.g.cs b/src/libs/V0/Generated/V0.Models.McpServersUpdateRequest.g.cs index 2536af7..2c21097 100644 --- a/src/libs/V0/Generated/V0.Models.McpServersUpdateRequest.g.cs +++ b/src/libs/V0/Generated/V0.Models.McpServersUpdateRequest.g.cs @@ -36,8 +36,8 @@ public sealed partial class McpServersUpdateRequest /// Authentication configuration. ///
[global::System.Text.Json.Serialization.JsonPropertyName("auth")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::V0.JsonConverters.AnyOfJsonConverter))] - public global::V0.AnyOf? Auth { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::V0.JsonConverters.AnyOfJsonConverter))] + public global::V0.AnyOf? Auth { get; set; } /// /// The scope of the MCP server. @@ -81,7 +81,7 @@ public McpServersUpdateRequest( string? url, string? description, bool? enabled, - global::V0.AnyOf? auth, + global::V0.AnyOf? auth, global::V0.McpServersUpdateRequestScope? scope) { this.Name = name; diff --git a/src/libs/V0/Generated/V0.Models.McpServersUpdateRequestAuthVariant4.Json.g.cs b/src/libs/V0/Generated/V0.Models.McpServersUpdateRequestAuthVariant4.Json.g.cs new file mode 100644 index 0000000..6e19384 --- /dev/null +++ b/src/libs/V0/Generated/V0.Models.McpServersUpdateRequestAuthVariant4.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace V0 +{ + public sealed partial class McpServersUpdateRequestAuthVariant4 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::V0.McpServersUpdateRequestAuthVariant4? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::V0.McpServersUpdateRequestAuthVariant4), + jsonSerializerContext) as global::V0.McpServersUpdateRequestAuthVariant4; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::V0.McpServersUpdateRequestAuthVariant4? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::V0.McpServersUpdateRequestAuthVariant4), + jsonSerializerContext).ConfigureAwait(false)) as global::V0.McpServersUpdateRequestAuthVariant4; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/V0/Generated/V0.Models.McpServersUpdateRequestAuthVariant4.g.cs b/src/libs/V0/Generated/V0.Models.McpServersUpdateRequestAuthVariant4.g.cs new file mode 100644 index 0000000..c60d2f1 --- /dev/null +++ b/src/libs/V0/Generated/V0.Models.McpServersUpdateRequestAuthVariant4.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace V0 +{ + /// + /// + /// + public sealed partial class McpServersUpdateRequestAuthVariant4 + { + /// + /// OAuth 2.1 authentication. + /// + /// "oauth" + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = "oauth"; + + /// + /// OAuth configuration for the MCP server. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("config")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::V0.McpServersUpdateRequestAuthVariant4Config Config { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// OAuth configuration for the MCP server. + /// + /// + /// OAuth 2.1 authentication. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public McpServersUpdateRequestAuthVariant4( + global::V0.McpServersUpdateRequestAuthVariant4Config config, + string type = "oauth") + { + this.Type = type; + this.Config = config ?? throw new global::System.ArgumentNullException(nameof(config)); + } + + /// + /// Initializes a new instance of the class. + /// + public McpServersUpdateRequestAuthVariant4() + { + } + } +} \ No newline at end of file diff --git a/src/libs/V0/Generated/V0.Models.McpServersUpdateRequestAuthVariant4Config.Json.g.cs b/src/libs/V0/Generated/V0.Models.McpServersUpdateRequestAuthVariant4Config.Json.g.cs new file mode 100644 index 0000000..2f3e3c1 --- /dev/null +++ b/src/libs/V0/Generated/V0.Models.McpServersUpdateRequestAuthVariant4Config.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace V0 +{ + public sealed partial class McpServersUpdateRequestAuthVariant4Config + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#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) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::V0.McpServersUpdateRequestAuthVariant4Config? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::V0.McpServersUpdateRequestAuthVariant4Config), + jsonSerializerContext) as global::V0.McpServersUpdateRequestAuthVariant4Config; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#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::V0.McpServersUpdateRequestAuthVariant4Config? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::V0.McpServersUpdateRequestAuthVariant4Config), + jsonSerializerContext).ConfigureAwait(false)) as global::V0.McpServersUpdateRequestAuthVariant4Config; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#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 FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/V0/Generated/V0.Models.McpServersUpdateRequestAuthVariant4Config.g.cs b/src/libs/V0/Generated/V0.Models.McpServersUpdateRequestAuthVariant4Config.g.cs new file mode 100644 index 0000000..044dff2 --- /dev/null +++ b/src/libs/V0/Generated/V0.Models.McpServersUpdateRequestAuthVariant4Config.g.cs @@ -0,0 +1,151 @@ + +#nullable enable + +namespace V0 +{ + /// + /// OAuth configuration for the MCP server. + /// + public sealed partial class McpServersUpdateRequestAuthVariant4Config + { + /// + /// The OAuth authorization endpoint URL. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("authorizationUrl")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string AuthorizationUrl { get; set; } + + /// + /// The OAuth token endpoint URL. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tokenUrl")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string TokenUrl { get; set; } + + /// + /// The optional dynamic client registration endpoint URL. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("registrationUrl")] + public string? RegistrationUrl { get; set; } + + /// + /// The OAuth client ID. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("clientId")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ClientId { get; set; } + + /// + /// The optional OAuth client secret. This value is stored securely and is never returned by the API. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("clientSecret")] + public string? ClientSecret { get; set; } + + /// + /// OAuth scopes to request during authorization.
+ /// Default Value: [] + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("scopes")] + public global::System.Collections.Generic.IList? Scopes { get; set; } + + /// + /// Whether to use PKCE for the authorization code flow.
+ /// Default Value: true + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("usePKCE")] + public bool? UsePKCE { get; set; } + + /// + /// The optional issuer identifier for mix-up protection. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("issuer")] + public string? Issuer { get; set; } + + /// + /// The optional RFC 8707 resource indicator. For MCP servers, this is usually the MCP server URL. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("resource")] + public string? Resource { get; set; } + + /// + /// Whether the authorization server supports Client ID Metadata Documents. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("clientIdMetadataDocumentSupported")] + public bool? ClientIdMetadataDocumentSupported { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The OAuth authorization endpoint URL. + /// + /// + /// The OAuth token endpoint URL. + /// + /// + /// The OAuth client ID. + /// + /// + /// The optional dynamic client registration endpoint URL. + /// + /// + /// The optional OAuth client secret. This value is stored securely and is never returned by the API. + /// + /// + /// OAuth scopes to request during authorization.
+ /// Default Value: [] + /// + /// + /// Whether to use PKCE for the authorization code flow.
+ /// Default Value: true + /// + /// + /// The optional issuer identifier for mix-up protection. + /// + /// + /// The optional RFC 8707 resource indicator. For MCP servers, this is usually the MCP server URL. + /// + /// + /// Whether the authorization server supports Client ID Metadata Documents. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public McpServersUpdateRequestAuthVariant4Config( + string authorizationUrl, + string tokenUrl, + string clientId, + string? registrationUrl, + string? clientSecret, + global::System.Collections.Generic.IList? scopes, + bool? usePKCE, + string? issuer, + string? resource, + bool? clientIdMetadataDocumentSupported) + { + this.AuthorizationUrl = authorizationUrl ?? throw new global::System.ArgumentNullException(nameof(authorizationUrl)); + this.TokenUrl = tokenUrl ?? throw new global::System.ArgumentNullException(nameof(tokenUrl)); + this.RegistrationUrl = registrationUrl; + this.ClientId = clientId ?? throw new global::System.ArgumentNullException(nameof(clientId)); + this.ClientSecret = clientSecret; + this.Scopes = scopes; + this.UsePKCE = usePKCE; + this.Issuer = issuer; + this.Resource = resource; + this.ClientIdMetadataDocumentSupported = clientIdMetadataDocumentSupported; + } + + /// + /// Initializes a new instance of the class. + /// + public McpServersUpdateRequestAuthVariant4Config() + { + } + } +} \ No newline at end of file diff --git a/src/libs/V0/openapi.yaml b/src/libs/V0/openapi.yaml index ecfb2cf..db3a4d2 100644 --- a/src/libs/V0/openapi.yaml +++ b/src/libs/V0/openapi.yaml @@ -5904,7 +5904,7 @@ paths: - apiKey: [] post: summary: Create MCP Server - description: Creates a new MCP server configuration for the authenticated user. + description: Creates a new MCP server configuration for the authenticated user. Supports OAuth, bearer token, custom headers, and unauthenticated servers. operationId: mcpServers.create tags: - mcpServers @@ -5981,6 +5981,63 @@ paths: - type - headers additionalProperties: false + - type: object + properties: + type: + type: string + const: oauth + description: OAuth 2.1 authentication. + config: + type: object + properties: + authorizationUrl: + type: string + format: uri + description: The OAuth authorization endpoint URL. + tokenUrl: + type: string + format: uri + description: The OAuth token endpoint URL. + registrationUrl: + description: The optional dynamic client registration endpoint URL. + type: string + format: uri + clientId: + type: string + minLength: 1 + description: The OAuth client ID. + clientSecret: + description: The optional OAuth client secret. This value is stored securely and is never returned by the API. + type: string + scopes: + default: [] + description: OAuth scopes to request during authorization. + type: array + items: + type: string + usePKCE: + default: true + description: Whether to use PKCE for the authorization code flow. + type: boolean + issuer: + description: The optional issuer identifier for mix-up protection. + type: string + resource: + description: The optional RFC 8707 resource indicator. For MCP servers, this is usually the MCP server URL. + type: string + clientIdMetadataDocumentSupported: + description: Whether the authorization server supports Client ID Metadata Documents. + type: boolean + required: + - authorizationUrl + - tokenUrl + - clientId + additionalProperties: false + description: OAuth configuration for the MCP server. + required: + - type + - config + additionalProperties: false scope: default: user description: The scope of the MCP server. Defaults to user. @@ -6322,6 +6379,63 @@ paths: - type - headers additionalProperties: false + - type: object + properties: + type: + type: string + const: oauth + description: OAuth 2.1 authentication. + config: + type: object + properties: + authorizationUrl: + type: string + format: uri + description: The OAuth authorization endpoint URL. + tokenUrl: + type: string + format: uri + description: The OAuth token endpoint URL. + registrationUrl: + description: The optional dynamic client registration endpoint URL. + type: string + format: uri + clientId: + type: string + minLength: 1 + description: The OAuth client ID. + clientSecret: + description: The optional OAuth client secret. This value is stored securely and is never returned by the API. + type: string + scopes: + default: [] + description: OAuth scopes to request during authorization. + type: array + items: + type: string + usePKCE: + default: true + description: Whether to use PKCE for the authorization code flow. + type: boolean + issuer: + description: The optional issuer identifier for mix-up protection. + type: string + resource: + description: The optional RFC 8707 resource indicator. For MCP servers, this is usually the MCP server URL. + type: string + clientIdMetadataDocumentSupported: + description: Whether the authorization server supports Client ID Metadata Documents. + type: boolean + required: + - authorizationUrl + - tokenUrl + - clientId + additionalProperties: false + description: OAuth configuration for the MCP server. + required: + - type + - config + additionalProperties: false scope: description: The scope of the MCP server. type: string @@ -6542,6 +6656,118 @@ paths: description: The ID of the MCP server to delete. security: - apiKey: [] + /mcp-servers/{mcpServerId}/oauth/authorize: + post: + summary: Create MCP Server OAuth Authorization URL + description: Creates an OAuth authorization URL for an OAuth MCP server. Redirect the user to the returned URL, and the Platform API OAuth callback will store the resulting tokens before redirecting to your returnUrl. + operationId: mcpServers.createOAuthAuthorizationUrl + tags: + - mcpServers + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + returnUrl: + type: string + format: uri + description: An absolute URL in your application where v0 redirects after OAuth completes. HTTPS is required in production. + required: + - returnUrl + additionalProperties: false + responses: + "200": + description: Success + content: + application/json: + schema: + type: object + properties: + object: + type: string + const: mcp_server_oauth_authorization + description: The object type. + mcpServerId: + type: string + description: The MCP server being authorized. + url: + type: string + format: uri + description: The provider authorization URL to redirect the user to. + state: + type: string + description: The OAuth state value. This expires after 5 minutes. + expiresAt: + type: string + format: date-time + pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ + description: The ISO timestamp when the authorization URL expires. + required: + - object + - mcpServerId + - url + - state + - expiresAt + additionalProperties: false + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/UnauthorizedError" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ForbiddenError" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/NotFoundError" + "409": + description: Conflict + content: + application/json: + schema: + $ref: "#/components/schemas/ConflictError" + "413": + description: Payload Too Large + content: + application/json: + schema: + $ref: "#/components/schemas/PayloadTooLargeError" + "422": + description: Unprocessable Entity + content: + application/json: + schema: + $ref: "#/components/schemas/UnprocessableEntityError" + "429": + description: Too Many Requests + content: + application/json: + schema: + $ref: "#/components/schemas/TooManyRequestsError" + "500": + description: Internal Server Error + content: + application/json: + schema: + $ref: "#/components/schemas/InternalServerError" + parameters: + - name: mcpServerId + in: path + required: true + schema: + type: string + description: The ID of the OAuth MCP server to authorize. + security: + - apiKey: [] components: schemas: ChatDetail: