diff --git a/src/libs/Tripo/Generated/JsonSerializerContextTypes.g.cs b/src/libs/Tripo/Generated/JsonSerializerContextTypes.g.cs index 80019b7..42629ab 100644 --- a/src/libs/Tripo/Generated/JsonSerializerContextTypes.g.cs +++ b/src/libs/Tripo/Generated/JsonSerializerContextTypes.g.cs @@ -10,6 +10,11 @@ namespace Tripo /// public sealed partial class JsonSerializerContextTypes { + /// + /// + /// + public global::System.Collections.Generic.Dictionary? StringStringDictionary { get; set; } + /// /// /// diff --git a/src/libs/Tripo/Generated/Tripo.PathBuilder.g.cs b/src/libs/Tripo/Generated/Tripo.PathBuilder.g.cs index 3034b07..ff54d8b 100644 --- a/src/libs/Tripo/Generated/Tripo.PathBuilder.g.cs +++ b/src/libs/Tripo/Generated/Tripo.PathBuilder.g.cs @@ -230,6 +230,16 @@ public PathBuilder AddOptionalParameter( /// public class EndPointAuthorization { + /// + /// + /// + public string Type { get; set; } = string.Empty; + + /// + /// + /// + public string Location { get; set; } = string.Empty; + /// /// /// diff --git a/src/libs/Tripo/Generated/Tripo.TripoApi.Authorizations.Bearer.g.cs b/src/libs/Tripo/Generated/Tripo.TripoApi.Authorizations.Bearer.g.cs index 80b9c24..fb54130 100644 --- a/src/libs/Tripo/Generated/Tripo.TripoApi.Authorizations.Bearer.g.cs +++ b/src/libs/Tripo/Generated/Tripo.TripoApi.Authorizations.Bearer.g.cs @@ -14,11 +14,14 @@ public void AuthorizeUsingBearer( { apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); - _authorization = new global::Tripo.EndPointAuthorization + _authorizations.Clear(); + _authorizations.Add(new global::Tripo.EndPointAuthorization { + Type = "Http", + Location = "Header", Name = "Bearer", Value = apiKey, - }; + }); } } } \ No newline at end of file diff --git a/src/libs/Tripo/Generated/Tripo.TripoApi.Constructors.Bearer.g.cs b/src/libs/Tripo/Generated/Tripo.TripoApi.Constructors.Bearer.g.cs index 1970a89..dbcab07 100644 --- a/src/libs/Tripo/Generated/Tripo.TripoApi.Constructors.Bearer.g.cs +++ b/src/libs/Tripo/Generated/Tripo.TripoApi.Constructors.Bearer.g.cs @@ -5,12 +5,12 @@ namespace Tripo { public sealed partial class TripoApi { - /// + /// public TripoApi( string apiKey, global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::Tripo.EndPointAuthorization? authorization = null) : this(httpClient, baseUri, authorization) + global::System.Collections.Generic.List? authorizations = null) : this(httpClient, baseUri, authorizations) { Authorizing(_httpClient, ref apiKey); diff --git a/src/libs/Tripo/Generated/Tripo.TripoApi.CreateTask.g.cs b/src/libs/Tripo/Generated/Tripo.TripoApi.CreateTask.g.cs index e19bb60..d5ef04f 100644 --- a/src/libs/Tripo/Generated/Tripo.TripoApi.CreateTask.g.cs +++ b/src/libs/Tripo/Generated/Tripo.TripoApi.CreateTask.g.cs @@ -45,12 +45,21 @@ partial void ProcessCreateTaskResponseContent( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - if (_authorization != null) - {{ - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); - }} + foreach (var _authorization in _authorizations) + { + if (_authorization.Type == "Http" || + _authorization.Type == "OAuth2") + { + 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 = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); var __httpRequestContent = new global::System.Net.Http.StringContent( content: __httpRequestContentBody, diff --git a/src/libs/Tripo/Generated/Tripo.TripoApi.GetBalance.g.cs b/src/libs/Tripo/Generated/Tripo.TripoApi.GetBalance.g.cs index 04d8f71..0a051b4 100644 --- a/src/libs/Tripo/Generated/Tripo.TripoApi.GetBalance.g.cs +++ b/src/libs/Tripo/Generated/Tripo.TripoApi.GetBalance.g.cs @@ -40,12 +40,21 @@ partial void ProcessGetBalanceResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - if (_authorization != null) - {{ - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); - }} + foreach (var _authorization in _authorizations) + { + if (_authorization.Type == "Http" || + _authorization.Type == "OAuth2") + { + 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); + } + } PrepareRequest( client: _httpClient, diff --git a/src/libs/Tripo/Generated/Tripo.TripoApi.GetTask.g.cs b/src/libs/Tripo/Generated/Tripo.TripoApi.GetTask.g.cs index 3ecd446..6e76f7b 100644 --- a/src/libs/Tripo/Generated/Tripo.TripoApi.GetTask.g.cs +++ b/src/libs/Tripo/Generated/Tripo.TripoApi.GetTask.g.cs @@ -45,12 +45,21 @@ partial void ProcessGetTaskResponseContent( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - if (_authorization != null) - {{ - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); - }} + foreach (var _authorization in _authorizations) + { + if (_authorization.Type == "Http" || + _authorization.Type == "OAuth2") + { + 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); + } + } PrepareRequest( client: _httpClient, diff --git a/src/libs/Tripo/Generated/Tripo.TripoApi.UploadFile.g.cs b/src/libs/Tripo/Generated/Tripo.TripoApi.UploadFile.g.cs index 0dc8d59..62fae20 100644 --- a/src/libs/Tripo/Generated/Tripo.TripoApi.UploadFile.g.cs +++ b/src/libs/Tripo/Generated/Tripo.TripoApi.UploadFile.g.cs @@ -47,12 +47,21 @@ partial void ProcessUploadFileResponseContent( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - if (_authorization != null) - {{ - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); - }} + foreach (var _authorization in _authorizations) + { + if (_authorization.Type == "Http" || + _authorization.Type == "OAuth2") + { + 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); + } + } using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); __httpRequestContent.Add( content: new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()) diff --git a/src/libs/Tripo/Generated/Tripo.TripoApi.g.cs b/src/libs/Tripo/Generated/Tripo.TripoApi.g.cs index de492a6..50deaf6 100644 --- a/src/libs/Tripo/Generated/Tripo.TripoApi.g.cs +++ b/src/libs/Tripo/Generated/Tripo.TripoApi.g.cs @@ -16,7 +16,7 @@ public sealed partial class TripoApi : global::Tripo.ITripoApi, global::System.I public const string BaseUrl = "https://api.tripo3d.ai/v2/openapi"; private readonly global::System.Net.Http.HttpClient _httpClient; - private global::Tripo.EndPointAuthorization? _authorization; + private global::System.Collections.Generic.List _authorizations; /// /// @@ -31,15 +31,15 @@ public sealed partial class TripoApi : global::Tripo.ITripoApi, global::System.I /// /// /// - /// + /// public TripoApi( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::Tripo.EndPointAuthorization? authorization = null) + global::System.Collections.Generic.List? authorizations = null) { _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorization = authorization; + _authorizations = authorizations ?? new global::System.Collections.Generic.List(); Initialized(_httpClient); }