From 7c4c7db78ddb71b24b1302355149d7e1f5ea743b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 15 Sep 2025 12:20:04 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../Recraft..JsonSerializerContext.g.cs | 2 + .../Recraft.IImageClient.CreativeUpscale.g.cs | 2 + .../Recraft.IImageClient.CrispUpscale.g.cs | 2 + .../Recraft.IImageClient.GenerateImage.g.cs | 2 + ...Recraft.IImageClient.RemoveBackground.g.cs | 2 + .../Recraft.IImageClient.VectorizeImage.g.cs | 2 + .../Recraft.ImageClient.CreativeUpscale.g.cs | 9 +++ .../Recraft.ImageClient.CrispUpscale.g.cs | 9 +++ .../Recraft.ImageClient.GenerateImage.g.cs | 3 + .../Recraft.ImageClient.RemoveBackground.g.cs | 9 +++ .../Recraft.ImageClient.VectorizeImage.g.cs | 9 +++ .../Recraft.JsonConverters.UpscaleMode.g.cs | 53 ++++++++++++++++ ...ft.JsonConverters.UpscaleModeNullable.g.cs | 60 +++++++++++++++++++ .../Recraft.JsonSerializerContextTypes.g.cs | 40 +++++++------ .../Recraft.Models.GenerateImageRequest.g.cs | 12 +++- .../Recraft.Models.ProcessImageRequest.g.cs | 12 +++- .../Recraft.Models.TransformModel.g.cs | 6 ++ .../Generated/Recraft.Models.UpscaleMode.g.cs | 51 ++++++++++++++++ src/libs/Recraft/openapi.yaml | 10 ++++ 19 files changed, 275 insertions(+), 20 deletions(-) create mode 100644 src/libs/Recraft/Generated/Recraft.JsonConverters.UpscaleMode.g.cs create mode 100644 src/libs/Recraft/Generated/Recraft.JsonConverters.UpscaleModeNullable.g.cs create mode 100644 src/libs/Recraft/Generated/Recraft.Models.UpscaleMode.g.cs diff --git a/src/libs/Recraft/Generated/Recraft..JsonSerializerContext.g.cs b/src/libs/Recraft/Generated/Recraft..JsonSerializerContext.g.cs index 74fc36a..e095f16 100644 --- a/src/libs/Recraft/Generated/Recraft..JsonSerializerContext.g.cs +++ b/src/libs/Recraft/Generated/Recraft..JsonSerializerContext.g.cs @@ -25,6 +25,8 @@ namespace Recraft typeof(global::Recraft.JsonConverters.ResponseFormatNullableJsonConverter), typeof(global::Recraft.JsonConverters.ImageSizeJsonConverter), typeof(global::Recraft.JsonConverters.ImageSizeNullableJsonConverter), + typeof(global::Recraft.JsonConverters.UpscaleModeJsonConverter), + typeof(global::Recraft.JsonConverters.UpscaleModeNullableJsonConverter), typeof(global::Recraft.JsonConverters.CreateStyleResponseJsonConverter), typeof(global::Recraft.JsonConverters.TransformImageWithMaskRequestJsonConverter), typeof(global::Recraft.JsonConverters.UnixTimestampJsonConverter), diff --git a/src/libs/Recraft/Generated/Recraft.IImageClient.CreativeUpscale.g.cs b/src/libs/Recraft/Generated/Recraft.IImageClient.CreativeUpscale.g.cs index 344a9b5..7b76d9c 100644 --- a/src/libs/Recraft/Generated/Recraft.IImageClient.CreativeUpscale.g.cs +++ b/src/libs/Recraft/Generated/Recraft.IImageClient.CreativeUpscale.g.cs @@ -22,6 +22,7 @@ public partial interface IImageClient /// /// /// + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreativeUpscaleAsync( @@ -30,6 +31,7 @@ public partial interface IImageClient bool? expire = default, global::Recraft.ImageFormat? imageFormat = default, global::Recraft.ResponseFormat? responseFormat = default, + global::Recraft.UpscaleMode? upscale = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recraft/Generated/Recraft.IImageClient.CrispUpscale.g.cs b/src/libs/Recraft/Generated/Recraft.IImageClient.CrispUpscale.g.cs index 0e5a6ec..527f091 100644 --- a/src/libs/Recraft/Generated/Recraft.IImageClient.CrispUpscale.g.cs +++ b/src/libs/Recraft/Generated/Recraft.IImageClient.CrispUpscale.g.cs @@ -22,6 +22,7 @@ public partial interface IImageClient /// /// /// + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CrispUpscaleAsync( @@ -30,6 +31,7 @@ public partial interface IImageClient bool? expire = default, global::Recraft.ImageFormat? imageFormat = default, global::Recraft.ResponseFormat? responseFormat = default, + global::Recraft.UpscaleMode? upscale = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recraft/Generated/Recraft.IImageClient.GenerateImage.g.cs b/src/libs/Recraft/Generated/Recraft.IImageClient.GenerateImage.g.cs index dd1d9c9..22c08e3 100644 --- a/src/libs/Recraft/Generated/Recraft.IImageClient.GenerateImage.g.cs +++ b/src/libs/Recraft/Generated/Recraft.IImageClient.GenerateImage.g.cs @@ -33,6 +33,7 @@ public partial interface IImageClient /// /// /// + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task GenerateImageAsync( @@ -52,6 +53,7 @@ public partial interface IImageClient global::System.Guid? styleId = default, global::Recraft.ImageSubStyle? substyle = default, global::System.Collections.Generic.IList? textLayout = default, + global::Recraft.UpscaleMode? upscale = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recraft/Generated/Recraft.IImageClient.RemoveBackground.g.cs b/src/libs/Recraft/Generated/Recraft.IImageClient.RemoveBackground.g.cs index 8b79813..4d66a56 100644 --- a/src/libs/Recraft/Generated/Recraft.IImageClient.RemoveBackground.g.cs +++ b/src/libs/Recraft/Generated/Recraft.IImageClient.RemoveBackground.g.cs @@ -22,6 +22,7 @@ public partial interface IImageClient /// /// /// + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task RemoveBackgroundAsync( @@ -30,6 +31,7 @@ public partial interface IImageClient bool? expire = default, global::Recraft.ImageFormat? imageFormat = default, global::Recraft.ResponseFormat? responseFormat = default, + global::Recraft.UpscaleMode? upscale = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recraft/Generated/Recraft.IImageClient.VectorizeImage.g.cs b/src/libs/Recraft/Generated/Recraft.IImageClient.VectorizeImage.g.cs index f0525f3..4b5d616 100644 --- a/src/libs/Recraft/Generated/Recraft.IImageClient.VectorizeImage.g.cs +++ b/src/libs/Recraft/Generated/Recraft.IImageClient.VectorizeImage.g.cs @@ -22,6 +22,7 @@ public partial interface IImageClient /// /// /// + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task VectorizeImageAsync( @@ -30,6 +31,7 @@ public partial interface IImageClient bool? expire = default, global::Recraft.ImageFormat? imageFormat = default, global::Recraft.ResponseFormat? responseFormat = default, + global::Recraft.UpscaleMode? upscale = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recraft/Generated/Recraft.ImageClient.CreativeUpscale.g.cs b/src/libs/Recraft/Generated/Recraft.ImageClient.CreativeUpscale.g.cs index 333a9b5..eb4dbde 100644 --- a/src/libs/Recraft/Generated/Recraft.ImageClient.CreativeUpscale.g.cs +++ b/src/libs/Recraft/Generated/Recraft.ImageClient.CreativeUpscale.g.cs @@ -88,6 +88,12 @@ partial void ProcessCreativeUpscaleResponseContent( __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.ResponseFormat?.ToValueString()}"), name: "response_format"); + } + if (request.Upscale != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Upscale?.ToValueString()}"), + name: "upscale"); } __httpRequest.Content = __httpRequestContent; @@ -191,6 +197,7 @@ partial void ProcessCreativeUpscaleResponseContent( /// /// /// + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreativeUpscaleAsync( @@ -199,6 +206,7 @@ partial void ProcessCreativeUpscaleResponseContent( bool? expire = default, global::Recraft.ImageFormat? imageFormat = default, global::Recraft.ResponseFormat? responseFormat = default, + global::Recraft.UpscaleMode? upscale = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::Recraft.ProcessImageRequest @@ -208,6 +216,7 @@ partial void ProcessCreativeUpscaleResponseContent( Imagename = imagename, ImageFormat = imageFormat, ResponseFormat = responseFormat, + Upscale = upscale, }; return await CreativeUpscaleAsync( diff --git a/src/libs/Recraft/Generated/Recraft.ImageClient.CrispUpscale.g.cs b/src/libs/Recraft/Generated/Recraft.ImageClient.CrispUpscale.g.cs index 6c4144b..d3b412d 100644 --- a/src/libs/Recraft/Generated/Recraft.ImageClient.CrispUpscale.g.cs +++ b/src/libs/Recraft/Generated/Recraft.ImageClient.CrispUpscale.g.cs @@ -88,6 +88,12 @@ partial void ProcessCrispUpscaleResponseContent( __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.ResponseFormat?.ToValueString()}"), name: "response_format"); + } + if (request.Upscale != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Upscale?.ToValueString()}"), + name: "upscale"); } __httpRequest.Content = __httpRequestContent; @@ -191,6 +197,7 @@ partial void ProcessCrispUpscaleResponseContent( /// /// /// + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CrispUpscaleAsync( @@ -199,6 +206,7 @@ partial void ProcessCrispUpscaleResponseContent( bool? expire = default, global::Recraft.ImageFormat? imageFormat = default, global::Recraft.ResponseFormat? responseFormat = default, + global::Recraft.UpscaleMode? upscale = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::Recraft.ProcessImageRequest @@ -208,6 +216,7 @@ partial void ProcessCrispUpscaleResponseContent( Imagename = imagename, ImageFormat = imageFormat, ResponseFormat = responseFormat, + Upscale = upscale, }; return await CrispUpscaleAsync( diff --git a/src/libs/Recraft/Generated/Recraft.ImageClient.GenerateImage.g.cs b/src/libs/Recraft/Generated/Recraft.ImageClient.GenerateImage.g.cs index ae1c153..1002337 100644 --- a/src/libs/Recraft/Generated/Recraft.ImageClient.GenerateImage.g.cs +++ b/src/libs/Recraft/Generated/Recraft.ImageClient.GenerateImage.g.cs @@ -184,6 +184,7 @@ partial void ProcessGenerateImageResponseContent( /// /// /// + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task GenerateImageAsync( @@ -203,6 +204,7 @@ partial void ProcessGenerateImageResponseContent( global::System.Guid? styleId = default, global::Recraft.ImageSubStyle? substyle = default, global::System.Collections.Generic.IList? textLayout = default, + global::Recraft.UpscaleMode? upscale = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::Recraft.GenerateImageRequest @@ -223,6 +225,7 @@ partial void ProcessGenerateImageResponseContent( StyleId = styleId, Substyle = substyle, TextLayout = textLayout, + Upscale = upscale, }; return await GenerateImageAsync( diff --git a/src/libs/Recraft/Generated/Recraft.ImageClient.RemoveBackground.g.cs b/src/libs/Recraft/Generated/Recraft.ImageClient.RemoveBackground.g.cs index 95fe390..9e3667b 100644 --- a/src/libs/Recraft/Generated/Recraft.ImageClient.RemoveBackground.g.cs +++ b/src/libs/Recraft/Generated/Recraft.ImageClient.RemoveBackground.g.cs @@ -88,6 +88,12 @@ partial void ProcessRemoveBackgroundResponseContent( __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.ResponseFormat?.ToValueString()}"), name: "response_format"); + } + if (request.Upscale != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Upscale?.ToValueString()}"), + name: "upscale"); } __httpRequest.Content = __httpRequestContent; @@ -191,6 +197,7 @@ partial void ProcessRemoveBackgroundResponseContent( /// /// /// + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task RemoveBackgroundAsync( @@ -199,6 +206,7 @@ partial void ProcessRemoveBackgroundResponseContent( bool? expire = default, global::Recraft.ImageFormat? imageFormat = default, global::Recraft.ResponseFormat? responseFormat = default, + global::Recraft.UpscaleMode? upscale = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::Recraft.ProcessImageRequest @@ -208,6 +216,7 @@ partial void ProcessRemoveBackgroundResponseContent( Imagename = imagename, ImageFormat = imageFormat, ResponseFormat = responseFormat, + Upscale = upscale, }; return await RemoveBackgroundAsync( diff --git a/src/libs/Recraft/Generated/Recraft.ImageClient.VectorizeImage.g.cs b/src/libs/Recraft/Generated/Recraft.ImageClient.VectorizeImage.g.cs index d28dd06..bc685db 100644 --- a/src/libs/Recraft/Generated/Recraft.ImageClient.VectorizeImage.g.cs +++ b/src/libs/Recraft/Generated/Recraft.ImageClient.VectorizeImage.g.cs @@ -88,6 +88,12 @@ partial void ProcessVectorizeImageResponseContent( __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.ResponseFormat?.ToValueString()}"), name: "response_format"); + } + if (request.Upscale != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Upscale?.ToValueString()}"), + name: "upscale"); } __httpRequest.Content = __httpRequestContent; @@ -191,6 +197,7 @@ partial void ProcessVectorizeImageResponseContent( /// /// /// + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task VectorizeImageAsync( @@ -199,6 +206,7 @@ partial void ProcessVectorizeImageResponseContent( bool? expire = default, global::Recraft.ImageFormat? imageFormat = default, global::Recraft.ResponseFormat? responseFormat = default, + global::Recraft.UpscaleMode? upscale = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::Recraft.ProcessImageRequest @@ -208,6 +216,7 @@ partial void ProcessVectorizeImageResponseContent( Imagename = imagename, ImageFormat = imageFormat, ResponseFormat = responseFormat, + Upscale = upscale, }; return await VectorizeImageAsync( diff --git a/src/libs/Recraft/Generated/Recraft.JsonConverters.UpscaleMode.g.cs b/src/libs/Recraft/Generated/Recraft.JsonConverters.UpscaleMode.g.cs new file mode 100644 index 0000000..0cae1fb --- /dev/null +++ b/src/libs/Recraft/Generated/Recraft.JsonConverters.UpscaleMode.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Recraft.JsonConverters +{ + /// + public sealed class UpscaleModeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Recraft.UpscaleMode Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Recraft.UpscaleModeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Recraft.UpscaleMode)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Recraft.UpscaleMode); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Recraft.UpscaleMode value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Recraft.UpscaleModeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Recraft/Generated/Recraft.JsonConverters.UpscaleModeNullable.g.cs b/src/libs/Recraft/Generated/Recraft.JsonConverters.UpscaleModeNullable.g.cs new file mode 100644 index 0000000..c15a173 --- /dev/null +++ b/src/libs/Recraft/Generated/Recraft.JsonConverters.UpscaleModeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Recraft.JsonConverters +{ + /// + public sealed class UpscaleModeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Recraft.UpscaleMode? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Recraft.UpscaleModeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Recraft.UpscaleMode)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Recraft.UpscaleMode?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Recraft.UpscaleMode? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Recraft.UpscaleModeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Recraft/Generated/Recraft.JsonSerializerContextTypes.g.cs b/src/libs/Recraft/Generated/Recraft.JsonSerializerContextTypes.g.cs index 0fbe1c2..58ae30e 100644 --- a/src/libs/Recraft/Generated/Recraft.JsonSerializerContextTypes.g.cs +++ b/src/libs/Recraft/Generated/Recraft.JsonSerializerContextTypes.g.cs @@ -142,74 +142,78 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Recraft.GenerateImageResponse? Type29 { get; set; } + public global::Recraft.UpscaleMode? Type29 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type30 { get; set; } + public global::Recraft.GenerateImageResponse? Type30 { get; set; } /// /// /// - public global::Recraft.Image? Type31 { get; set; } + public global::System.Collections.Generic.IList? Type31 { get; set; } /// /// /// - public global::Recraft.ImageFeatures? Type32 { get; set; } + public global::Recraft.Image? Type32 { get; set; } /// /// /// - public global::Recraft.ImageToImageRequest? Type33 { get; set; } + public global::Recraft.ImageFeatures? Type33 { get; set; } /// /// /// - public global::Recraft.ListBasicStylesResponse? Type34 { get; set; } + public global::Recraft.ImageToImageRequest? Type34 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type35 { get; set; } + public global::Recraft.ListBasicStylesResponse? Type35 { get; set; } /// /// /// - public global::Recraft.ListStylesResponse? Type36 { get; set; } + public global::System.Collections.Generic.IList? Type36 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type37 { get; set; } + public global::Recraft.ListStylesResponse? Type37 { get; set; } /// /// /// - public global::Recraft.ProcessImageRequest? Type38 { get; set; } + public global::System.Collections.Generic.IList? Type38 { get; set; } /// /// /// - public global::Recraft.ProcessImageResponse? Type39 { get; set; } + public global::Recraft.ProcessImageRequest? Type39 { get; set; } /// /// /// - public global::Recraft.SystemStatus? Type40 { get; set; } + public global::Recraft.ProcessImageResponse? Type40 { get; set; } /// /// /// - public global::Recraft.TransformImageRequest? Type41 { get; set; } + public global::Recraft.SystemStatus? Type41 { get; set; } /// /// /// - public global::Recraft.TransformImageWithMaskRequest? Type42 { get; set; } + public global::Recraft.TransformImageRequest? Type42 { get; set; } /// /// /// - public global::Recraft.TransformImageWithMaskRequestVariant2? Type43 { get; set; } + public global::Recraft.TransformImageWithMaskRequest? Type43 { get; set; } /// /// /// - public global::Recraft.User? Type44 { get; set; } + public global::Recraft.TransformImageWithMaskRequestVariant2? Type44 { get; set; } /// /// /// - public global::Recraft.VariateImageRequest? Type45 { get; set; } + public global::Recraft.User? Type45 { get; set; } /// /// /// - public object? Type46 { get; set; } + public global::Recraft.VariateImageRequest? Type46 { get; set; } + /// + /// + /// + public object? Type47 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Recraft/Generated/Recraft.Models.GenerateImageRequest.g.cs b/src/libs/Recraft/Generated/Recraft.Models.GenerateImageRequest.g.cs index 8e121f3..b015919 100644 --- a/src/libs/Recraft/Generated/Recraft.Models.GenerateImageRequest.g.cs +++ b/src/libs/Recraft/Generated/Recraft.Models.GenerateImageRequest.g.cs @@ -110,6 +110,13 @@ public sealed partial class GenerateImageRequest [global::System.Text.Json.Serialization.JsonPropertyName("text_layout")] public global::System.Collections.Generic.IList? TextLayout { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("upscale")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Recraft.JsonConverters.UpscaleModeJsonConverter))] + public global::Recraft.UpscaleMode? Upscale { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -135,6 +142,7 @@ public sealed partial class GenerateImageRequest /// /// /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -154,7 +162,8 @@ public GenerateImageRequest( string? style, global::System.Guid? styleId, global::Recraft.ImageSubStyle? substyle, - global::System.Collections.Generic.IList? textLayout) + global::System.Collections.Generic.IList? textLayout, + global::Recraft.UpscaleMode? upscale) { this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt)); this.BlockNsfw = blockNsfw; @@ -172,6 +181,7 @@ public GenerateImageRequest( this.StyleId = styleId; this.Substyle = substyle; this.TextLayout = textLayout; + this.Upscale = upscale; } /// diff --git a/src/libs/Recraft/Generated/Recraft.Models.ProcessImageRequest.g.cs b/src/libs/Recraft/Generated/Recraft.Models.ProcessImageRequest.g.cs index 5e0f32c..e892dcc 100644 --- a/src/libs/Recraft/Generated/Recraft.Models.ProcessImageRequest.g.cs +++ b/src/libs/Recraft/Generated/Recraft.Models.ProcessImageRequest.g.cs @@ -42,6 +42,13 @@ public sealed partial class ProcessImageRequest [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Recraft.JsonConverters.ResponseFormatJsonConverter))] public global::Recraft.ResponseFormat? ResponseFormat { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("upscale")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Recraft.JsonConverters.UpscaleModeJsonConverter))] + public global::Recraft.UpscaleMode? Upscale { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -56,6 +63,7 @@ public sealed partial class ProcessImageRequest /// /// /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -64,13 +72,15 @@ public ProcessImageRequest( string imagename, bool? expire, global::Recraft.ImageFormat? imageFormat, - global::Recraft.ResponseFormat? responseFormat) + global::Recraft.ResponseFormat? responseFormat, + global::Recraft.UpscaleMode? upscale) { this.Image = image ?? throw new global::System.ArgumentNullException(nameof(image)); this.Imagename = imagename ?? throw new global::System.ArgumentNullException(nameof(imagename)); this.Expire = expire; this.ImageFormat = imageFormat; this.ResponseFormat = responseFormat; + this.Upscale = upscale; } /// diff --git a/src/libs/Recraft/Generated/Recraft.Models.TransformModel.g.cs b/src/libs/Recraft/Generated/Recraft.Models.TransformModel.g.cs index a6423d8..6cd6075 100644 --- a/src/libs/Recraft/Generated/Recraft.Models.TransformModel.g.cs +++ b/src/libs/Recraft/Generated/Recraft.Models.TransformModel.g.cs @@ -88,6 +88,10 @@ public enum TransformModel /// /// Gemini25FlashImage, + /// + /// + /// + BytedanceSeedreamv4, } /// @@ -122,6 +126,7 @@ public static string ToValueString(this TransformModel value) TransformModel.IdeogramV3Quality => "ideogram_v3_quality", TransformModel.QwenImage => "qwen_image", TransformModel.Gemini25FlashImage => "gemini_25_flash_image", + TransformModel.BytedanceSeedreamv4 => "bytedance-seedreamv4", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -152,6 +157,7 @@ public static string ToValueString(this TransformModel value) "ideogram_v3_quality" => TransformModel.IdeogramV3Quality, "qwen_image" => TransformModel.QwenImage, "gemini_25_flash_image" => TransformModel.Gemini25FlashImage, + "bytedance-seedreamv4" => TransformModel.BytedanceSeedreamv4, _ => null, }; } diff --git a/src/libs/Recraft/Generated/Recraft.Models.UpscaleMode.g.cs b/src/libs/Recraft/Generated/Recraft.Models.UpscaleMode.g.cs new file mode 100644 index 0000000..05e8689 --- /dev/null +++ b/src/libs/Recraft/Generated/Recraft.Models.UpscaleMode.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace Recraft +{ + /// + /// + /// + public enum UpscaleMode + { + /// + /// + /// + Upscale4mp, + /// + /// + /// + Upscale16mp, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UpscaleModeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UpscaleMode value) + { + return value switch + { + UpscaleMode.Upscale4mp => "upscale4mp", + UpscaleMode.Upscale16mp => "upscale16mp", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UpscaleMode? ToEnum(string value) + { + return value switch + { + "upscale4mp" => UpscaleMode.Upscale4mp, + "upscale16mp" => UpscaleMode.Upscale16mp, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Recraft/openapi.yaml b/src/libs/Recraft/openapi.yaml index 3b83012..d858aa5 100644 --- a/src/libs/Recraft/openapi.yaml +++ b/src/libs/Recraft/openapi.yaml @@ -462,6 +462,8 @@ components: $ref: '#/components/schemas/ImageSubStyle' text_layout: $ref: '#/components/schemas/TextLayout' + upscale: + $ref: '#/components/schemas/UpscaleMode' GenerateImageResponse: required: - created @@ -733,6 +735,8 @@ components: $ref: '#/components/schemas/ImageFormat' response_format: $ref: '#/components/schemas/ResponseFormat' + upscale: + $ref: '#/components/schemas/UpscaleMode' ProcessImageResponse: required: - created @@ -879,6 +883,12 @@ components: - ideogram_v3_quality - qwen_image - gemini_25_flash_image + - bytedance-seedreamv4 + type: string + UpscaleMode: + enum: + - upscale4mp + - upscale16mp type: string User: required: