Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions src/libs/Anam/Generated/Anam.AnamClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public sealed partial class AnamClient : global::Anam.IAnamClient, global::Syste
/// <summary>
///
/// </summary>
public AuthClient Auth => new AuthClient(HttpClient, authorizations: Authorizations, options: Options)
public AuthClient Auth => new AuthClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
Expand All @@ -52,7 +52,7 @@ public sealed partial class AnamClient : global::Anam.IAnamClient, global::Syste
/// <summary>
///
/// </summary>
public AvatarsClient Avatars => new AvatarsClient(HttpClient, authorizations: Authorizations, options: Options)
public AvatarsClient Avatars => new AvatarsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
Expand All @@ -61,7 +61,7 @@ public sealed partial class AnamClient : global::Anam.IAnamClient, global::Syste
/// <summary>
///
/// </summary>
public KnowledgeClient Knowledge => new KnowledgeClient(HttpClient, authorizations: Authorizations, options: Options)
public KnowledgeClient Knowledge => new KnowledgeClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
Expand All @@ -70,7 +70,7 @@ public sealed partial class AnamClient : global::Anam.IAnamClient, global::Syste
/// <summary>
///
/// </summary>
public LLMsClient LLMs => new LLMsClient(HttpClient, authorizations: Authorizations, options: Options)
public LLMsClient LLMs => new LLMsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
Expand All @@ -79,7 +79,7 @@ public sealed partial class AnamClient : global::Anam.IAnamClient, global::Syste
/// <summary>
///
/// </summary>
public PersonasClient Personas => new PersonasClient(HttpClient, authorizations: Authorizations, options: Options)
public PersonasClient Personas => new PersonasClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
Expand All @@ -88,7 +88,7 @@ public sealed partial class AnamClient : global::Anam.IAnamClient, global::Syste
/// <summary>
///
/// </summary>
public SessionsClient Sessions => new SessionsClient(HttpClient, authorizations: Authorizations, options: Options)
public SessionsClient Sessions => new SessionsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
Expand All @@ -97,7 +97,7 @@ public sealed partial class AnamClient : global::Anam.IAnamClient, global::Syste
/// <summary>
///
/// </summary>
public ShareLinksClient ShareLinks => new ShareLinksClient(HttpClient, authorizations: Authorizations, options: Options)
public ShareLinksClient ShareLinks => new ShareLinksClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
Expand All @@ -106,7 +106,7 @@ public sealed partial class AnamClient : global::Anam.IAnamClient, global::Syste
/// <summary>
///
/// </summary>
public ToolsClient Tools => new ToolsClient(HttpClient, authorizations: Authorizations, options: Options)
public ToolsClient Tools => new ToolsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
Expand All @@ -115,7 +115,7 @@ public sealed partial class AnamClient : global::Anam.IAnamClient, global::Syste
/// <summary>
///
/// </summary>
public VoicesClient Voices => new VoicesClient(HttpClient, authorizations: Authorizations, options: Options)
public VoicesClient Voices => new VoicesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
Expand Down Expand Up @@ -154,10 +154,10 @@ public AnamClient(
/// <param name="options">Client-wide request defaults such as headers, query parameters, retries, and timeout.</param>
/// <param name="disposeHttpClient">Dispose the HttpClient when the instance is disposed. True by default.</param>
public AnamClient(
global::System.Net.Http.HttpClient? httpClient = null,
global::System.Uri? baseUri = null,
global::System.Collections.Generic.List<global::Anam.EndPointAuthorization>? authorizations = null,
global::Anam.AutoSDKClientOptions? options = null,
global::System.Net.Http.HttpClient? httpClient,
global::System.Uri? baseUri,
global::System.Collections.Generic.List<global::Anam.EndPointAuthorization>? authorizations,
global::Anam.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{

Expand Down
66 changes: 58 additions & 8 deletions src/libs/Anam/Generated/Anam.AuthClient.CreateSessionToken.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,29 @@ partial void ProcessCreateSessionTokenResponseContent(
/// <exception cref="global::Anam.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::Anam.CreateSessionTokenResponse> CreateSessionTokenAsync(

global::Anam.CreateSessionTokenRequest request,
global::Anam.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __response = await CreateSessionTokenAsResponseAsync(

request: request,
requestOptions: requestOptions,
cancellationToken: cancellationToken
).ConfigureAwait(false);

return __response.Body;
}
/// <summary>
/// Create session token<br/>
/// Creates a temporary session token for client-side use. The session token is valid for 1 hour.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Anam.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::Anam.AutoSDKHttpResponse<global::Anam.CreateSessionTokenResponse>> CreateSessionTokenAsResponseAsync(

global::Anam.CreateSessionTokenRequest request,
global::Anam.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
Expand Down Expand Up @@ -85,6 +108,7 @@ partial void ProcessCreateSessionTokenResponseContent(

global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{

var __pathBuilder = new global::Anam.PathBuilder(
path: "/v1/auth/session-token",
baseUri: HttpClient.BaseAddress);
Expand Down Expand Up @@ -164,6 +188,8 @@ partial void ProcessCreateSessionTokenResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
retryDelay: null,
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
Expand All @@ -174,6 +200,11 @@ partial void ProcessCreateSessionTokenResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
var __retryDelay = global::Anam.AutoSDKRequestOptionsSupport.GetRetryDelay(
clientOptions: Options,
requestOptions: requestOptions,
response: null,
attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Anam.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
Expand All @@ -191,6 +222,8 @@ partial void ProcessCreateSessionTokenResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
Expand All @@ -200,8 +233,7 @@ partial void ProcessCreateSessionTokenResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Anam.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
clientOptions: Options,
requestOptions: requestOptions,
retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
Expand All @@ -210,6 +242,11 @@ partial void ProcessCreateSessionTokenResponseContent(
__attempt < __maxAttempts &&
global::Anam.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
var __retryDelay = global::Anam.AutoSDKRequestOptionsSupport.GetRetryDelay(
clientOptions: Options,
requestOptions: requestOptions,
response: __response,
attempt: __attempt);
await global::Anam.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Anam.AutoSDKRequestOptionsSupport.CreateHookContext(
Expand All @@ -226,14 +263,15 @@ partial void ProcessCreateSessionTokenResponseContent(
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::Anam.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
clientOptions: Options,
requestOptions: requestOptions,
retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
Expand Down Expand Up @@ -273,6 +311,8 @@ partial void ProcessCreateSessionTokenResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
retryDelay: null,
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
Expand All @@ -293,6 +333,8 @@ partial void ProcessCreateSessionTokenResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
retryDelay: null,
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
//
Expand Down Expand Up @@ -416,9 +458,13 @@ partial void ProcessCreateSessionTokenResponseContent(
{
__response.EnsureSuccessStatusCode();

return
global::Anam.CreateSessionTokenResponse.FromJson(__content, JsonSerializerContext) ??
var __value = global::Anam.CreateSessionTokenResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
return new global::Anam.AutoSDKHttpResponse<global::Anam.CreateSessionTokenResponse>(
statusCode: __response.StatusCode,
headers: global::Anam.AutoSDKHttpResponse.CreateHeaders(__response),
requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
{
Expand Down Expand Up @@ -446,9 +492,13 @@ partial void ProcessCreateSessionTokenResponseContent(
#endif
).ConfigureAwait(false);

return
await global::Anam.CreateSessionTokenResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
var __value = await global::Anam.CreateSessionTokenResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
return new global::Anam.AutoSDKHttpResponse<global::Anam.CreateSessionTokenResponse>(
statusCode: __response.StatusCode,
headers: global::Anam.AutoSDKHttpResponse.CreateHeaders(__response),
requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
{
Expand Down
8 changes: 4 additions & 4 deletions src/libs/Anam/Generated/Anam.AuthClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ public AuthClient(
/// <param name="options">Client-wide request defaults such as headers, query parameters, retries, and timeout.</param>
/// <param name="disposeHttpClient">Dispose the HttpClient when the instance is disposed. True by default.</param>
public AuthClient(
global::System.Net.Http.HttpClient? httpClient = null,
global::System.Uri? baseUri = null,
global::System.Collections.Generic.List<global::Anam.EndPointAuthorization>? authorizations = null,
global::Anam.AutoSDKClientOptions? options = null,
global::System.Net.Http.HttpClient? httpClient,
global::System.Uri? baseUri,
global::System.Collections.Generic.List<global::Anam.EndPointAuthorization>? authorizations,
global::Anam.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{

Expand Down
Loading